@hivemagnus/magnus-ui 3.5.1 → 3.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +5 -4
- package/README.md +52 -4
- package/bin/magnus-ui.mjs +118 -2
- package/dist/app/apps/dashboard/.next/BUILD_ID +1 -1
- package/dist/app/apps/dashboard/.next/build-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/required-server-files.json +2 -16
- package/dist/app/apps/dashboard/.next/routes-manifest.json +9 -20
- package/dist/app/apps/dashboard/.next/server/app/_global-error.html +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/callback/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/configured/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/start/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/logout/route.js +6 -5
- package/dist/app/apps/dashboard/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/me/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/[id]/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/[id]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/health/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js +8 -6
- package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js +7 -5
- package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js +5 -5
- package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/close/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/input/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/resize/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__0lufsyh_0gqup._.js → [externals]__1k43kg5-icx7b._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0vzssf5bgd660._.js → [root-of-the-server]__0ndj_rhwp_6vf._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0ywmf3079vsm1._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__05vapur0p6d-l._.js → [root-of-the-server]__15_4jl4ba_7y3._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0iiv9pxo2yauj._.js → [root-of-the-server]__1cxla67mqwfdr._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0fwm7idn_76uf._.js → [root-of-the-server]__1rrn6p9afghbt._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0ioimsx71gr0o._.js → [root-of-the-server]__1wj2nw17pv5g8._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0jvoc4-ta3zc0._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0oj6_-g5b2lvi._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0rwz3f0jh1ty0._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_0s788ryrplkp6._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_1-ntqfqk_4-f0._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_120rsoc_nc7_3._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_1ilhtkg33m99h._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/_1xodprib7qa_j._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_runtime-embed-isolation_mjs_1ovehd-pl97ex._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_auth_ts_1hhq1tq6hjj-e._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_control-nodes-store_ts_01hjyte7nc7l2._.js +3 -2
- package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_embedded-frame_ts_1dw1tog69m3ap._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_hive-login_ts_0ab2iq7-rpy13._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__02wumq04h7-2m._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1koj-a25tcc9z._.js → [root-of-the-server]__0az7ayfxt936j._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__02rfo46o0ocq7._.js → [root-of-the-server]__0cbjirfjkahyz._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0l7okklk-ix9t._.js → [root-of-the-server]__0mtl30w3r3d8n._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1w1bkuf_-8zxm._.js → [root-of-the-server]__0n1mehgazoyys._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1y4za7l5ph9o-._.js → [root-of-the-server]__0piptu4qrcax4._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0neu-iblb1_-5._.js → [root-of-the-server]__0qoxqg_z229qc._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1jb0a4bkg6dd1._.js → [root-of-the-server]__0yvtveej1dtd6._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__000ndthd0hd5v._.js → [root-of-the-server]__0zftzxoekcfyw._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__202zczfuwkbzi._.js → [root-of-the-server]__15i5sz08w-tg0._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1ria97bl22vsq._.js → [root-of-the-server]__18k_-53xs-qpk._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1jtg9fc0ny1cg._.js → [root-of-the-server]__1cesdboqyg7rq._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1wsrd6m1h8q7q._.js → [root-of-the-server]__1p0rsbsf87odz._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1l8__2gqqi590._.js → [root-of-the-server]__1un9oi8-bokqt._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1gwofuehw8lyc._.js → [root-of-the-server]__206hwh476sy80._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_07u8d93e_m_yo._.js +3 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0caxc2bc6a__r._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1oebzzj_en62h._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_runtime-environment_mjs_11tpywm9_soif._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_0gs_s688kgg1i._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_anomalies_remediation_page_tsx_179m33swiclif._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_ardent_installations_page_tsx_0nvqgacugy6nf._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_audit_audit-client_tsx_0iyab_tlw5yus._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_files_page_tsx_1kls9-qinldks._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_governor_operations_page_tsx_1tvdkgil8mlgk._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_login_page_tsx_12_rihimtav2a._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_logs_page_tsx_0473-hcpj1mqr._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_mission-control_page_tsx_0crgxncex_u3w._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_nodes_[nodeId]_page_tsx_1q7fqu18oklzc._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_nodes_nodes-client_tsx_0pt4iarhpqbgn._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_orchestra_web-gateway_page_tsx_1fz12np0wk27t._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_security-fusion_page_tsx_0d314q7yh6fx8._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_webhooks_webhook-form_tsx_02z3be5wx7-cb._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_ui_card_tsx_1pngl2ib-xo5t._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_ui_node-selector_tsx_1ci6ldznpaofq._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_lib_api-client_ts_0tho-kkk5ez7h._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/middleware-build-manifest.js +3 -3
- package/dist/app/apps/dashboard/.next/server/pages/500.html +1 -1
- package/dist/app/apps/dashboard/.next/server/preview-props.json +3 -3
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/static/chunks/{369vzlcjad-gn.js → 017x1uhn9l7nw.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{1-vn8cqro-f08.js → 06_2psos--paq.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0i8g96dmx-fbo.css +2 -0
- package/dist/app/apps/dashboard/.next/static/chunks/0nalo72r7vipw.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/0pswbe-19xxl5.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{3ntnj6ts2r3e2.js → 0s2skhp7086pc.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{0nekvgtqt8goj.js → 0zsp_alwy1f3v.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1fpi73pmpn8v5.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/1gko0bkguj_g0.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{0lxf5l-ugq-09.js → 1t6g3-pjlavb5.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{1xdzfjeq_fj4f.js → 1ygangs-zn4yl.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2_eadjwf4989d.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2fzv4_us4q1w_.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{1cvbtmsr4d3ci.js → 2isl5q2zhjwiw.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2jaw-lni6k_dt.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2sh8fn_vg-vs5.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{1kx48jg-4j5iv.js → 2u4_fj_v8i521.js} +2 -2
- package/dist/app/apps/dashboard/.next/static/chunks/{3qr1h6_w6vi_4.js → 2zj24fir1fm27.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{3w-7xko96ljib.js → 2zjjqqg5z63sl.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/337js55ro9g08.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{37kstof-v-jwi.js → 33xay7yclh_jd.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/34yff9n0mbd1h.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{05p7s0xtb3koa.js → 3eo_31lzj51v9.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{12ju76tjcqh_z.js → 3f73kvi1pwabq.js} +4 -4
- package/dist/app/apps/dashboard/.next/static/chunks/{23o8zfgrdxuhk.js → 3kh386y5gla53.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3mwn69j8d-q9v.js +4 -0
- package/dist/app/apps/dashboard/.next/static/chunks/3p_wvl3sieoi4.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{0yb36s9l-f3_w.js → 3qrrim22gq-vp.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3ui3xvxcdyc0r.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/3ya4-24grz_0f.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{37pb0l96d03rk.js → 42j6wpibe0zrn.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/4369o9c3gezxt.js +6 -0
- package/dist/app/apps/dashboard/.next/static/rWpgppq64sqgeZO3-MlD1/_buildManifest.js +11 -0
- package/dist/app/apps/dashboard/package.json +3 -2
- package/dist/app/apps/dashboard/runtime-control-node-credentials.mjs +638 -0
- package/dist/app/apps/dashboard/runtime-embed-isolation.mjs +450 -0
- package/dist/app/apps/dashboard/runtime-environment.mjs +1 -1
- package/dist/app/apps/dashboard/runtime-integrations.mjs +4 -4
- package/dist/app/apps/dashboard/server-tls.mjs +96 -47
- package/dist/app/apps/dashboard/server.js +1 -1
- package/npm-shrinkwrap.json +4 -3
- package/package.json +3 -2
- package/dist/app/apps/dashboard/.next/static/chunks/015s19fe5dtkp.css +0 -2
- package/dist/app/apps/dashboard/.next/static/chunks/07tx3h4lr-lxl.js +0 -6
- package/dist/app/apps/dashboard/.next/static/chunks/0u9-brifz45bj.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/19-20lxkk1axv.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1j5vpju4k1wlj.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1kjl44-64ume7.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/28zpgt1trm_m4.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2lk4ailve7631.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2lulmsr2vjuw5.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/30npcziw-f8ld.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/31hx4x8k9707e.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/34mzv0h7jkx20.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3cw8xs2dab1g-.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3dao7nu2cr6a9.js +0 -4
- package/dist/app/apps/dashboard/.next/static/chunks/3gjll_bse9v1f.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3qq-otw-t-6b0.js +0 -1
- package/dist/app/apps/dashboard/.next/static/pcEuomTy_lxr51c8J4RQm/_buildManifest.js +0 -20
- /package/dist/app/apps/dashboard/.next/static/{pcEuomTy_lxr51c8J4RQm → rWpgppq64sqgeZO3-MlD1}/_clientMiddlewareManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{pcEuomTy_lxr51c8J4RQm → rWpgppq64sqgeZO3-MlD1}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
module.exports=[15958,e=>{"use strict";let t=(e={})=>({type:"string",...e}),s=(e={})=>({type:"url",...e}),r=(e={})=>({type:"path",...e}),i=(e={})=>({type:"integer",...e}),n=Object.freeze({CONTROL_API_URL:s({default:"https://localhost:4000",purpose:"Default Magnus Control API target."}),CONTROL_API_CA_PATH:r({optional:!0,purpose:"Private CA bundle used for verified Control API TLS."}),CONTROL_API_MAX_RESPONSE_BYTES:i({default:1048576,minimum:1024,purpose:"Maximum accepted Control API response size in bytes."}),DASHBOARD_PROXY_BODY_LIMIT_BYTES:i({default:1048576,minimum:1,purpose:"Maximum forwarded request body size in bytes, enforced while streaming."}),API_SECRET:t({required:!0,sensitive:!0,purpose:"Server-side secret injected into Control API proxy requests."}),CONTROL_NODE_CREDENTIAL_KEY:t({required:!0,sensitive:!0,minimumLength:32,purpose:"Dedicated key for encrypted control-node credentials at rest."}),SESSION_SECRET:t({required:!0,sensitive:!0,purpose:"Dedicated dashboard session signing secret."}),SESSION_ISSUER:t({default:"magnus-dashboard",purpose:"Required issuer claim for dashboard session tokens."}),SESSION_AUDIENCE:t({default:"magnus-dashboard-session",purpose:"Required audience claim for dashboard session tokens."}),HERMES_SSH_AUTHORIZATIONS_FILE:r({default:".magnus/hermes-ssh-authorizations.json",requirement:"Required (default path shown)",purpose:"Reviewed installation, node, address, and SSH host-key bindings."}),DASHBOARD_PUBLIC_ORIGIN:s({required:!0,purpose:"Canonical browser origin allowed to open the Hermes WebSocket bridge."}),HERMES_WEBSOCKET_ALLOWED_ORIGINS:t({optional:!0,purpose:"Comma-separated additional allowed Hermes WebSocket origins."}),DASHBOARD_ADMIN_USERNAME:t({optional:!0,requirement:"Required with DASHBOARD_ADMIN_PASSWORD_HASH; deployment may serialize it",purpose:"Dedicated dashboard administrator identity."}),DASHBOARD_ADMIN_USERNAME_B64:t({optional:!0,sensitive:!0,purpose:"Serializer-managed base64 form of the dashboard administrator identity."}),DASHBOARD_ADMIN_PASSWORD_HASH:t({optional:!0,requirement:"Required with DASHBOARD_ADMIN_USERNAME unless DASHBOARD_ADMIN_PASSWORD is set; Argon2id only",sensitive:!0,purpose:"Non-reusable Argon2id dashboard administrator password verifier."}),DASHBOARD_ADMIN_PASSWORD:t({optional:!0,sensitive:!0,requirement:"Optional; takes precedence over DASHBOARD_ADMIN_PASSWORD_HASH when set with DASHBOARD_ADMIN_USERNAME",purpose:"Plaintext dashboard administrator password. Prefer the Argon2id hash; a set value silently wins over it."}),DASHBOARD_ADMIN_PASSWORD_B64:t({optional:!0,sensitive:!0,purpose:"Serializer-managed base64 form of DASHBOARD_ADMIN_PASSWORD (same precedence)."}),LOCAL_SESSION_GENERATION:t({optional:!0,sensitive:!0,purpose:"Any value; changing it signs out every local console session (as changing the administrator credential does)."}),DASHBOARD_ADMIN_PASSWORD_HASH_B64:t({optional:!0,sensitive:!0,purpose:"Serializer-managed base64 form of the Argon2id verifier."}),DASHBOARD_ADMIN_CREDENTIAL_METADATA_B64:t({optional:!0,sensitive:!0,purpose:"Versioned non-secret credential purpose, rotation, fleet-password, and fingerprint-separation evidence."}),DASHBOARD_TRUSTED_PROXIES:t({optional:!0,purpose:"Comma-separated reverse-proxy addresses or CIDR ranges whose X-Forwarded-For names the client for login throttling and audit. Unset: the socket peer."}),REDIS_URL:s({default:"redis://127.0.0.1:6379",sensitive:!0,purpose:"Durable dashboard authentication throttling and concurrency store."}),REDIS_PREFIX:t({default:"magnus-",purpose:"Namespace prefix for durable Redis authentication limiter keys."}),AUTH_RATE_LIMIT_LABEL_KEY:t({optional:!0,sensitive:!0,purpose:"Optional dedicated HMAC key for de-identifying authentication limiter labels."}),DASHBOARD_SSH_USERNAME:t({optional:!0,requirement:"Required for the terminal and Hermes proxy",purpose:"Dedicated, unprivileged dashboard proxy account on managed nodes."}),DASHBOARD_SSH_PASSWORD:t({optional:!0,sensitive:!0,purpose:"Optional dedicated dashboard SSH password; restricted keys are preferred."}),SSH_HOST_KEY_PINNING:t({default:"enforce",purpose:"Terminal SSH host-key pinning: enforce refuses a host whose key differs from the pinned one; warn only logs the mismatch and connects anyway (never use warn in production). Any other value means enforce."}),SSH_HOST_KEYS_FILE:r({default:"terminal-audit/known-hosts.json",purpose:"Pinned terminal SSH host keys (trust on first use), relative to the working directory."}),TERMINAL_AUDIT_DIR:r({default:"terminal-audit",purpose:"Directory of the terminal host-key trust audit log, relative to the working directory."}),DASHBOARD_DEPENDENCY_TIMEOUT_MS:i({default:8e3,minimum:1,purpose:"Timeout of console requests to the Control API and Hive Router, in milliseconds."}),MAGNUS_CONTROL_NODES_CONFIG_DIR:r({optional:!0,purpose:"Test-only override of the control-node registry directory; honoured only with NODE_ENV=test (otherwise .magnus/ in the working directory)."}),DASHBOARD_SSH_PRIVATE_KEY_PATH:r({optional:!0,requirement:"Required for the terminal and Hermes proxy (or DASHBOARD_SSH_PASSWORD)",purpose:"Restricted dashboard-proxy private key with no deployment privileges."}),NEXT_PUBLIC_API_URL:s({default:"https://localhost:4000",public:!0,purpose:"Legacy build-time Control API URL; must never contain a secret."}),HIVE_OAUTH_DISCOVERY_URL:s({optional:!0,purpose:"Hive OAuth discovery URL for optional named dashboard login; HTTPS required."}),HIVE_OAUTH_CLIENT_ID:t({optional:!0,purpose:"Registered Magnus dashboard OAuth client ID."}),HIVE_OAUTH_CLIENT_SECRET:t({optional:!0,sensitive:!0,purpose:"OAuth client secret, kept server-side. Required when the client is registered as confidential; leave unset for a public PKCE client."}),HIVE_OAUTH_ISSUER:s({optional:!0,purpose:"Exact trusted Hive access-token issuer."}),HIVE_OAUTH_API_AUDIENCE:t({optional:!0,purpose:"Exact access-token audience accepted by the Control API."}),HIVE_OAUTH_SCOPE:t({default:"openid profile email",purpose:"Registered named-user OAuth scopes."}),HIVE_ROUTER_ADMIN_URL:s({optional:!0,purpose:"Deprecated: admin plane of an Emberpath (formerly Hive Router) release that still bundles an admin UI; enables the embedded router dashboard proxy."}),HIVE_ROUTER_CA_PATH:r({optional:!0,purpose:"Optional private CA bundle for hostname-verified TLS to HIVE_ROUTER_ADMIN_URL."}),MAGNUS_SECURITY_CONSOLE_URL:s({optional:!0,purpose:"Optional external security console; enables the Security pages and nav entry."}),MAGNUS_HERMES_ENABLED:t({default:"false",enum:["true","false"],purpose:"Enables the optional Hermes Agent pages, dashboard proxy and WebSocket bridge."}),PORT:i({default:3e3,minimum:1,purpose:"Listen port for magnus-ui start."}),HOST:t({default:"0.0.0.0",purpose:"Listen address for magnus-ui start."}),TLS_CERT_PATH:r({optional:!0,requirement:"Required unless MAGNUS_UI_ALLOW_HTTP=true",purpose:"PEM certificate served by magnus-ui start."}),TLS_KEY_PATH:r({optional:!0,requirement:"Required unless MAGNUS_UI_ALLOW_HTTP=true",purpose:"PEM private key for TLS_CERT_PATH."}),MAGNUS_UI_DATA_DIR:r({optional:!0,purpose:"Working directory for runtime state (.magnus/, terminal-audit/); magnus-ui start defaults it to the current directory."}),UI_SECURITY_LOG_PATH:r({default:".magnus/security-events.jsonl",purpose:"Append-only authentication audit log; login fails closed when it cannot be written."}),MAGNUS_UI_ALLOW_HTTP:t({default:"false",enum:["true","false"],purpose:"Serve plain HTTP when no TLS certificate is configured (local development or behind a TLS proxy only)."})});function o(e,t){throw Error(`${e} ${t}`)}e.s(["f",0,function(e,t=process.env){let s=n[e];s||o(e,"is not declared in the dashboard environment schema");let r=t[e]?.trim()||s.default;if(null==r||""===r){s.required&&o(e,"is required");return}if(s.enum&&!s.enum.includes(String(r))&&o(e,`must be one of: ${s.enum.join(", ")}`),"integer"===s.type){let t=Number(r);return(!Number.isSafeInteger(t)||t<(s.minimum??Number.MIN_SAFE_INTEGER))&&o(e,`must be an integer of at least ${s.minimum}`),t}if("url"===s.type)try{return new URL(String(r)).toString().replace(/\/$/,"")}catch{o(e,"must be an absolute URL")}return"path"===s.type&&String(r).includes("\0")&&o(e,"must not contain NUL bytes"),"string"===s.type&&s.minimumLength&&String(r).length<s.minimumLength&&o(e,`must contain at least ${s.minimumLength} characters`),String(r)}])},54213,e=>{"use strict";var t=e.i(15958);let s=(0,t.f)("SESSION_ISSUER"),r=(0,t.f)("SESSION_AUDIENCE");e.s(["B",0,"magnus_session","m",0,r,"E",0,86400,"W",0,s,"_",0,function(){let e=process.env.SESSION_SECRET;if(!e)throw Error(process.env.JWT_SECRET?"SESSION_SECRET is required; the JWT_SECRET session fallback was removed after it expired on 2026-10-01.":"SESSION_SECRET is required.");return new TextEncoder().encode(e)},"n",0,function(){let e=!!process.env.SESSION_SECRET;return{configured:e,source:e?"dedicated":"missing"}},"c",0,function(){return{algorithms:["HS256"],issuer:s,audience:r}}])},66990,(e,t,s)=>{t.exports=JSON.parse('{"acl":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"cat":{"arity":-2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"deluser":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"dryrun":{"arity":-4,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"genpass":{"arity":-2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"getuser":{"arity":3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"list":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"load":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"log":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"save":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"setuser":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"users":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"whoami":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0}}},"append":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arcount":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"ardel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"ardelrange":{"arity":-4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"arget":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"argetrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"argrep":{"arity":-6,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arinfo":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arinsert":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arlastitems":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"armget":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"armset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arnext":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"arop":{"arity":-5,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arring":{"arity":-4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"arscan":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arseek":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"arset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"asking":{"arity":1,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"auth":{"arity":-2,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"backup":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"abort":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"cleanup":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"list":{"arity":2,"flags":["admin","stale"],"keyStart":0,"keyStop":0,"step":0},"seal":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"start":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"status":{"arity":2,"flags":["admin","stale"],"keyStart":0,"keyStop":0,"step":0}}},"bgrewriteaof":{"arity":1,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bgsave":{"arity":-1,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bitcount":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"bitfield":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"bitfield_ro":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"bitop":{"arity":-4,"flags":["write","denyoom"],"keyStart":2,"keyStop":-1,"step":1},"bitpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"blmove":{"arity":6,"flags":["write","denyoom","blocking"],"keyStart":1,"keyStop":2,"step":1},"blmovem":{"arity":-6,"flags":["write","denyoom","blocking"],"keyStart":1,"keyStop":2,"step":1},"blmpop":{"arity":-5,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"blpop":{"arity":-3,"flags":["write","blocking"],"keyStart":1,"keyStop":-2,"step":1},"brpop":{"arity":-3,"flags":["write","blocking"],"keyStart":1,"keyStop":-2,"step":1},"brpoplpush":{"arity":4,"flags":["write","denyoom","blocking"],"keyStart":1,"keyStop":2,"step":1},"bzmpop":{"arity":-5,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"bzpopmax":{"arity":-3,"flags":["write","blocking","fast"],"keyStart":1,"keyStop":-2,"step":1},"bzpopmin":{"arity":-3,"flags":["write","blocking","fast"],"keyStart":1,"keyStop":-2,"step":1},"client":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"caching":{"arity":3,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"getname":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"getredir":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"id":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"info":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"kill":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"list":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"no-evict":{"arity":3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"no-touch":{"arity":3,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"pause":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"reply":{"arity":3,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"setinfo":{"arity":4,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"setname":{"arity":3,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"tracking":{"arity":-3,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"trackinginfo":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"unblock":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"unpause":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0}}},"cluster":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"addslots":{"arity":-3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"addslotsrange":{"arity":-4,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bumpepoch":{"arity":2,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"count-failure-reports":{"arity":3,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"countkeysinslot":{"arity":3,"flags":["stale"],"keyStart":0,"keyStop":0,"step":0},"delslots":{"arity":-3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"delslotsrange":{"arity":-4,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"failover":{"arity":-2,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"flushslots":{"arity":2,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"forget":{"arity":3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"getkeysinslot":{"arity":4,"flags":["stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"info":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"keyslot":{"arity":3,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"links":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"meet":{"arity":-4,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"migration":{"arity":-4,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"myid":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"myshardid":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"nodes":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"replicas":{"arity":3,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"replicate":{"arity":3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"reset":{"arity":-2,"flags":["admin","noscript","stale"],"keyStart":0,"keyStop":0,"step":0},"saveconfig":{"arity":2,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"set-config-epoch":{"arity":3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"setslot":{"arity":-4,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"shards":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"slaves":{"arity":3,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"slot-stats":{"arity":-4,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","step":0},"slots":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"syncslots":{"arity":-3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0}}},"command":{"arity":-1,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"count":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"docs":{"arity":-2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"getkeys":{"arity":-3,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"getkeysandflags":{"arity":-3,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"info":{"arity":-2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"list":{"arity":-2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0}}},"config":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"get":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"resetstat":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"rewrite":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"set":{"arity":-4,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0}}},"copy":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"dbsize":{"arity":1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"agg_sum","step":0},"debug":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"decr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"decrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"del":{"arity":-2,"flags":["write"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","responsePolicy":"agg_sum","step":1},"delex":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"digest":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"discard":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"dump":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"echo":{"arity":2,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"eval":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"eval_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"evalsha":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"evalsha_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"exec":{"arity":1,"flags":["noscript","loading","stale","skip_slowlog"],"keyStart":0,"keyStop":0,"step":0},"exists":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","responsePolicy":"agg_sum","step":1},"expire":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"expireat":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"expiretime":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"failover":{"arity":-1,"flags":["admin","noscript","stale"],"keyStart":0,"keyStop":0,"step":0},"fcall":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"fcall_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"flushall":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"flushdb":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"function":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"delete":{"arity":3,"flags":["write","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"dump":{"arity":2,"flags":["noscript"],"keyStart":0,"keyStop":0,"step":0},"flush":{"arity":-2,"flags":["write","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"kill":{"arity":2,"flags":["noscript","allow_busy"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"one_succeeded","step":0},"list":{"arity":-2,"flags":["noscript"],"keyStart":0,"keyStop":0,"step":0},"load":{"arity":-3,"flags":["write","denyoom","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"restore":{"arity":-3,"flags":["write","denyoom","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"stats":{"arity":2,"flags":["noscript","allow_busy"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0}}},"geoadd":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"geodist":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geohash":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geopos":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadius":{"arity":-6,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadius_ro":{"arity":-6,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember":{"arity":-5,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember_ro":{"arity":-5,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearch":{"arity":-7,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearchstore":{"arity":-8,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"get":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getbit":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getdel":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getex":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"getset":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hello":{"arity":-1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"hexists":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpire":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpireat":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpiretime":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hget":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hgetall":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hgetdel":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hgetex":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"himport":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"discard":{"arity":3,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","step":0},"discardall":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","step":0},"prepare":{"arity":-4,"flags":["denyoom"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","step":0},"set":{"arity":-5,"flags":["write","denyoom"],"keyStart":2,"keyStop":2,"step":1}}},"hincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hincrbyfloat":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hkeys":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmget":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hotkeys":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"get":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"special","responsePolicy":"special","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"reset":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"special","step":0},"start":{"arity":-2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"special","step":0},"stop":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"special","step":0}}},"hpersist":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpire":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpireat":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpiretime":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hpttl":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hrandfield":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hsetex":{"arity":-6,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hsetnx":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hstrlen":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"httl":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hvals":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"incr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrbyfloat":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"increx":{"arity":-2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"info":{"arity":-1,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0},"keys":{"arity":2,"flags":["readonly"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","step":0},"lastsave":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"latency":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"doctor":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"special","step":0},"graph":{"arity":3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"special","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"histogram":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"special","step":0},"history":{"arity":3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"special","step":0},"latest":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"special","step":0},"reset":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"agg_sum","step":0}}},"lcs":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":2,"step":1},"lindex":{"arity":3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"linsert":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"llen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"lmove":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"lmovem":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"lmpop":{"arity":-4,"flags":["write","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"lolwut":{"arity":-1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"step":0},"lpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"lpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lrem":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"lset":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"ltrim":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"memory":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"doctor":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"malloc-stats":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0},"purge":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"stats":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0},"usage":{"arity":-3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1}}},"mget":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","step":1},"migrate":{"arity":-6,"flags":["write","movablekeys"],"keyStart":3,"keyStop":3,"step":1},"module":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"list":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"load":{"arity":-3,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"loadex":{"arity":-3,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"unload":{"arity":3,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0}}},"monitor":{"arity":1,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"move":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"mset":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","responsePolicy":"all_succeeded","step":2},"msetex":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":0,"keyStop":0,"requestPolicy":"multi_shard","responsePolicy":"all_succeeded","step":0},"msetnx":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":2},"multi":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"object":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"encoding":{"arity":3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1},"freq":{"arity":3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"idletime":{"arity":3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1},"refcount":{"arity":3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1}}},"persist":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpire":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpireat":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpiretime":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"pfadd":{"arity":-2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"pfcount":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"pfdebug":{"arity":3,"flags":["write","denyoom","admin"],"keyStart":2,"keyStop":2,"step":1},"pfmerge":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"pfselftest":{"arity":1,"flags":["admin"],"keyStart":0,"keyStop":0,"step":0},"ping":{"arity":-1,"flags":["fast"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"psetex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"psubscribe":{"arity":-2,"flags":["denyoom","pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"psync":{"arity":-3,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"pttl":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"publish":{"arity":3,"flags":["pubsub","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"pubsub":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"channels":{"arity":-2,"flags":["pubsub","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"numpat":{"arity":2,"flags":["pubsub","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"numsub":{"arity":-2,"flags":["pubsub","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"shardchannels":{"arity":-2,"flags":["pubsub","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"shardnumsub":{"arity":-2,"flags":["pubsub","loading","stale"],"keyStart":0,"keyStop":0,"step":0}}},"punsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"quit":{"arity":-1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"randomkey":{"arity":1,"flags":["readonly"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0},"readonly":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"readwrite":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"rename":{"arity":3,"flags":["write"],"keyStart":1,"keyStop":2,"step":1},"renamenx":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"replconf":{"arity":-1,"flags":["admin","noscript","loading","stale","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"replicaof":{"arity":3,"flags":["admin","noscript","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"reset":{"arity":1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"restore":{"arity":-4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"restore-asking":{"arity":-4,"flags":["write","denyoom","asking"],"keyStart":1,"keyStop":1,"step":1},"role":{"arity":1,"flags":["noscript","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"rpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"rpoplpush":{"arity":3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"rpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"rpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"sadd":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"save":{"arity":1,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"scan":{"arity":-2,"flags":["readonly"],"keyStart":0,"keyStop":0,"requestPolicy":"special","responsePolicy":"special","step":0},"scard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"script":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"debug":{"arity":3,"flags":["noscript"],"keyStart":0,"keyStop":0,"step":0},"exists":{"arity":-3,"flags":["noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"agg_logical_and","step":0},"flush":{"arity":-2,"flags":["noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"kill":{"arity":2,"flags":["noscript","allow_busy"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"one_succeeded","step":0},"load":{"arity":3,"flags":["noscript","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0}}},"sdiff":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sdiffcard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"sdiffstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"select":{"arity":2,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"set":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setbit":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setnx":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"setrange":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"shutdown":{"arity":-1,"flags":["admin","noscript","loading","stale","no_multi","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"sinter":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sintercard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"sinterstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"sismember":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"slaveof":{"arity":3,"flags":["admin","noscript","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"slowlog":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"get":{"arity":-2,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"len":{"arity":2,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"agg_sum","step":0},"reset":{"arity":2,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0}}},"smembers":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"smismember":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"smove":{"arity":4,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"sort":{"arity":-2,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"sort_ro":{"arity":-2,"flags":["readonly","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"spop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"spublish":{"arity":3,"flags":["pubsub","loading","stale","fast"],"keyStart":1,"keyStop":1,"step":1},"srandmember":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"srem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"sscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"ssubscribe":{"arity":-2,"flags":["denyoom","pubsub","noscript","loading","stale"],"keyStart":1,"keyStop":-1,"step":1},"strlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"subscribe":{"arity":-2,"flags":["denyoom","pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"substr":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"sunion":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sunioncard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"sunionstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"sunsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":1,"keyStop":-1,"step":1},"swapdb":{"arity":3,"flags":["write","fast"],"keyStart":0,"keyStop":0,"step":0},"sync":{"arity":1,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"time":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"touch":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","responsePolicy":"agg_sum","step":1},"trimslots":{"arity":-5,"flags":["write"],"keyStart":0,"keyStop":0,"step":0},"ttl":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"type":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"unlink":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","responsePolicy":"agg_sum","step":1},"unsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"unwatch":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"vadd":{"arity":-5,"flags":["write","denyoom","module"],"keyStart":1,"keyStop":1,"step":1},"vcard":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vdim":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vemb":{"arity":-3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vgetattr":{"arity":3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vinfo":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vismember":{"arity":3,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vlinks":{"arity":-3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vrandmember":{"arity":-2,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vrange":{"arity":-4,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vrem":{"arity":3,"flags":["write","module"],"keyStart":1,"keyStop":1,"step":1},"vsetattr":{"arity":4,"flags":["write","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vsim":{"arity":-4,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"wait":{"arity":3,"flags":["blocking"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"agg_min","step":0},"waitaof":{"arity":4,"flags":["blocking"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"agg_min","step":0},"watch":{"arity":-2,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":1,"keyStop":-1,"step":1},"xack":{"arity":-4,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xackdel":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xadd":{"arity":-5,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xautoclaim":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xcfgset":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xclaim":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xdelex":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xgroup":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"create":{"arity":-5,"flags":["write","denyoom"],"keyStart":2,"keyStop":2,"step":1},"createconsumer":{"arity":5,"flags":["write","denyoom"],"keyStart":2,"keyStop":2,"step":1},"delconsumer":{"arity":5,"flags":["write"],"keyStart":2,"keyStop":2,"step":1},"destroy":{"arity":4,"flags":["write"],"keyStart":2,"keyStop":2,"step":1},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"setid":{"arity":-5,"flags":["write"],"keyStart":2,"keyStop":2,"step":1}}},"xidmprecord":{"arity":5,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xinfo":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"consumers":{"arity":4,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1},"groups":{"arity":3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"stream":{"arity":-3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1}}},"xlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"xnack":{"arity":-7,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xpending":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xread":{"arity":-4,"flags":["readonly","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xreadgroup":{"arity":-7,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xsetid":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xtrim":{"arity":-4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zadd":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zcard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zdiff":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zdiffstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zinter":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zintercard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zinterstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zlexcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zmpop":{"arity":-4,"flags":["write","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zmscore":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmax":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmin":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zrandmember":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangestore":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"zrank":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zrem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zremrangebylex":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyrank":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyscore":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrank":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zscore":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zunion":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zunionstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1}}')},12522,(e,t,s)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0}),s.getKeyIndexes=s.hasFlag=s.exists=s.list=void 0;let i=r(e.r(66990)).default;s.list=Object.keys(i);let n={};function o(e){"string"!=typeof e&&(e=String(e));let t=e.indexOf("->");return -1===t?e.length:t}s.list.forEach(e=>{n[e]=i[e].flags.reduce(function(e,t){return e[t]=!0,e},{})}),s.exists=function(e,t){return!!i[e=(null==t?void 0:t.caseInsensitive)?String(e).toLowerCase():e]},s.hasFlag=function(e,t,s){if(!n[e=(null==s?void 0:s.nameCaseInsensitive)?String(e).toLowerCase():e])throw Error("Unknown command "+e);return!!n[e][t]},s.getKeyIndexes=function(e,t,s){let r=i[e=(null==s?void 0:s.nameCaseInsensitive)?String(e).toLowerCase():e];if(!r)throw Error("Unknown command "+e);if(!Array.isArray(t))throw Error("Expect args to be an array");let n=r;for(let e=0;e<t.length&&n.subcommands;e++){let s=n.subcommands[String(t[e]).toLowerCase()];if(!s)break;n=s}let a=[],l=!!(s&&s.parseExternalKey),c=(e,t)=>{let s=[],r=Number(e[t]);for(let e=0;e<r;e++)s.push(e+t+1);return s},u=(e,t,s)=>{for(let r=t;r<e.length-1;r+=1)if(String(e[r]).toLowerCase()===s.toLowerCase())return r+1;return null};switch(e){case"zunionstore":case"zinterstore":case"zdiffstore":a.push(0,...c(t,1));break;case"eval":case"evalsha":case"eval_ro":case"evalsha_ro":case"fcall":case"fcall_ro":case"blmpop":case"bzmpop":a.push(...c(t,1));break;case"sdiffcard":case"sintercard":case"sunioncard":case"lmpop":case"zunion":case"zinter":case"zmpop":case"zintercard":case"zdiff":a.push(...c(t,0));break;case"msetex":{let e=Number(t[0]);for(let t=0;t<e;t++)a.push(1+2*t);break}case"georadius":{a.push(0);let e=u(t,5,"STORE");e&&a.push(e);let s=u(t,5,"STOREDIST");s&&a.push(s);break}case"georadiusbymember":{a.push(0);let e=u(t,4,"STORE");e&&a.push(e);let s=u(t,4,"STOREDIST");s&&a.push(s);break}case"sort":case"sort_ro":a.push(0);for(let e=1;e<t.length-1;e++){let s=t[e];if("string"!=typeof s)continue;let r=s.toUpperCase();"GET"===r?(e+=1,"#"!==(s=t[e])&&(l?a.push([e,o(s)]):a.push(e))):"BY"===r?(e+=1,l?a.push([e,o(t[e])]):a.push(e)):"STORE"===r&&(e+=1,a.push(e))}break;case"migrate":if(""===t[2])for(let e=5;e<t.length-1;e++){let s=t[e];if("string"==typeof s&&"KEYS"===s.toUpperCase()){for(let s=e+1;s<t.length;s++)a.push(s);break}}else a.push(2);break;case"xreadgroup":case"xread":for(let s=3*("xread"!==e);s<t.length-1;s++)if("STREAMS"===String(t[s]).toUpperCase()){for(let e=s+1;e<=s+(t.length-1-s)/2;e++)a.push(e);break}break;default:if(n.step>0){let e=n.keyStart-1,s=n.keyStop>0?n.keyStop:t.length+n.keyStop+1;for(let t=e;t<s;t+=n.step)a.push(t)}}return a}},9068,(e,t,s)=>{var r=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],i=function(e){for(var t,s=0,r=0,i=[],n=e.length;s<n;s++)(t=e.charCodeAt(s))<128?i[r++]=t:(t<2048?i[r++]=t>>6|192:((64512&t)==55296&&s+1<e.length&&(64512&e.charCodeAt(s+1))==56320?(t=65536+((1023&t)<<10)+(1023&e.charCodeAt(++s)),i[r++]=t>>18|240,i[r++]=t>>12&63|128):i[r++]=t>>12|224,i[r++]=t>>6&63|128),i[r++]=63&t|128);return i},n=t.exports=function(e){for(var t,s=0,n=-1,o=0,a=0,l="string"==typeof e?i(e):e,c=l.length;s<c;){if(t=l[s++],-1===n)123===t&&(n=s);else if(125!==t)a=r[(t^a>>8)&255]^a<<8;else if(s-1!==n)return 16383&a;o=r[(t^o>>8)&255]^o<<8}return 16383&o};t.exports.generateMulti=function(e){for(var t=1,s=e.length,r=n(e[0]);t<s;)if(n(e[t++])!==r)return -1;return r}},28452,(e,t,s)=>{let r;s.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let s="color: "+this.color;e.splice(1,0,s,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),e.splice(i,0,s)},s.save=function(e){try{e?s.storage.setItem("debug",e):s.storage.removeItem("debug")}catch(e){}},s.load=function(){let e;try{e=s.storage.getItem("debug")||s.storage.getItem("DEBUG")}catch(e){}return!e&&"u">typeof process&&"env"in process&&(e=process.env.DEBUG),e},s.useColors=function(){let e;return!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},s.storage=function(){try{return localStorage}catch(e){}}(),r=!1,s.destroy=()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],s.log=console.debug||console.log||(()=>{}),t.exports=e.r(16525)(s);let{formatters:i}=t.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},16525,(e,t,s)=>{t.exports=function(t){function s(e){let t,i,n,o=null;function a(...e){if(!a.enabled)return;let r=Number(new Date);a.diff=r-(t||r),a.prev=t,a.curr=r,t=r,e[0]=s.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,r)=>{if("%%"===t)return"%";i++;let n=s.formatters[r];if("function"==typeof n){let s=e[i];t=n.call(a,s),e.splice(i,1),i--}return t}),s.formatArgs.call(a,e),(a.log||s.log).apply(a,e)}return a.namespace=e,a.useColors=s.useColors(),a.color=s.selectColor(e),a.extend=r,a.destroy=s.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==s.namespaces&&(i=s.namespaces,n=s.enabled(e)),n),set:e=>{o=e}}),"function"==typeof s.init&&s.init(a),a}function r(e,t){let r=s(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function i(e,t){let s=0,r=0,i=-1,n=0;for(;s<e.length;)if(r<t.length&&(t[r]===e[s]||"*"===t[r]))"*"===t[r]?(i=r,n=s):s++,r++;else{if(-1===i)return!1;r=i+1,s=++n}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return s.debug=s,s.default=s,s.coerce=function(e){return e instanceof Error?e.stack||e.message:e},s.disable=function(){let e=[...s.names,...s.skips.map(e=>"-"+e)].join(",");return s.enable(""),e},s.enable=function(e){for(let t of(s.save(e),s.namespaces=e,s.names=[],s.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===t[0]?s.skips.push(t.slice(1)):s.names.push(t)},s.enabled=function(e){for(let t of s.skips)if(i(e,t))return!1;for(let t of s.names)if(i(e,t))return!0;return!1},s.humanize=e.r(41528),s.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(e=>{s[e]=t[e]}),s.names=[],s.skips=[],s.formatters={},s.selectColor=function(e){let t=0;for(let s=0;s<e.length;s++)t=(t<<5)-t+e.charCodeAt(s)|0;return s.colors[Math.abs(t)%s.colors.length]},s.enable(s.load()),s}},17293,(e,t,s)=>{"u"<typeof process||"renderer"===process.type||process.__nwjs?t.exports=e.r(28452):t.exports=e.r(23440)},23440,(e,t,s)=>{let r=e.r(70722),i=e.r(24361);s.init=function(e){e.inspectOpts={};let t=Object.keys(s.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=s.inspectOpts[t[r]]},s.log=function(...e){return process.stderr.write(i.formatWithOptions(s.inspectOpts,...e)+"\n")},s.formatArgs=function(e){let{namespace:r,useColors:i}=this;if(i){let s=this.color,i="\x1b[3"+(s<8?s:"8;5;"+s),n=` ${i};1m${r} \x1b[0m`;e[0]=n+e[0].split("\n").join("\n"+n),e.push(i+"m+"+t.exports.humanize(this.diff)+"\x1b[0m")}else e[0]=(s.inspectOpts.hideDate?"":new Date().toISOString()+" ")+r+" "+e[0]},s.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},s.load=function(){return process.env.DEBUG},s.useColors=function(){return"colors"in s.inspectOpts?!!s.inspectOpts.colors:r.isatty(process.stderr.fd)},s.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),s.colors=[6,2,3,4,5,1];try{let t=e.r(81042);t&&(t.stderr||t).level>=2&&(s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}s.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let s=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[s]=r,e},{}),t.exports=e.r(16525)(s);let{formatters:n}=t.exports;n.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},n.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},89977,(e,t,s)=>{"use strict";function r(e,t){var t=t||{};this._capacity=t.capacity,this._head=0,this._tail=0,Array.isArray(e)?this._fromArray(e):(this._capacityMask=3,this._list=[,,,,])}r.prototype.peekAt=function(e){var t=e;if(t===(0|t)){var s=this.size();if(!(t>=s)&&!(t<-s))return t<0&&(t+=s),t=this._head+t&this._capacityMask,this._list[t]}},r.prototype.get=function(e){return this.peekAt(e)},r.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},r.prototype.peekFront=function(){return this.peek()},r.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(r.prototype,"length",{get:function(){return this.size()}}),r.prototype.size=function(){return this._head===this._tail?0:this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},r.prototype.unshift=function(e){if(0==arguments.length)return this.size();var t=this._list.length;return(this._head=this._head-1+t&this._capacityMask,this._list[this._head]=e,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.pop(),this._head<this._tail)?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},r.prototype.shift=function(){var e=this._head;if(e!==this._tail){var t=this._list[e];return this._list[e]=void 0,this._head=e+1&this._capacityMask,e<2&&this._tail>1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),t}},r.prototype.push=function(e){if(0==arguments.length)return this.size();var t=this._tail;return(this._list[t]=e,this._tail=t+1&this._capacityMask,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.shift(),this._head<this._tail)?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},r.prototype.pop=function(){var e=this._tail;if(e!==this._head){var t=this._list.length;this._tail=e-1+t&this._capacityMask;var s=this._list[this._tail];return this._list[this._tail]=void 0,this._head<2&&e>1e4&&e<=t>>>2&&this._shrinkArray(),s}},r.prototype.removeOne=function(e){var t,s=e;if(s===(0|s)&&this._head!==this._tail){var r=this.size(),i=this._list.length;if(!(s>=r)&&!(s<-r)){s<0&&(s+=r),s=this._head+s&this._capacityMask;var n=this._list[s];if(e<r/2){for(t=e;t>0;t--)this._list[s]=this._list[s=s-1+i&this._capacityMask];this._list[s]=void 0,this._head=this._head+1+i&this._capacityMask}else{for(t=r-1-e;t>0;t--)this._list[s]=this._list[s=s+1+i&this._capacityMask];this._list[s]=void 0,this._tail=this._tail-1+i&this._capacityMask}return n}}},r.prototype.remove=function(e,t){var s,r,i=e,n=t;if(i===(0|i)&&this._head!==this._tail){var o=this.size(),a=this._list.length;if(!(i>=o)&&!(i<-o)&&!(t<1)){if(i<0&&(i+=o),1===t||!t)return(s=[,])[0]=this.removeOne(i),s;if(0===i&&i+t>=o)return s=this.toArray(),this.clear(),s;for(i+t>o&&(t=o-i),s=Array(t),r=0;r<t;r++)s[r]=this._list[this._head+i+r&this._capacityMask];if(i=this._head+i&this._capacityMask,e+t===o){for(this._tail=this._tail-t+a&this._capacityMask,r=t;r>0;r--)this._list[i=i+1+a&this._capacityMask]=void 0;return s}if(0===e){for(this._head=this._head+t+a&this._capacityMask,r=t-1;r>0;r--)this._list[i=i+1+a&this._capacityMask]=void 0;return s}if(i<o/2){for(this._head=this._head+e+t+a&this._capacityMask,r=e;r>0;r--)this.unshift(this._list[i=i-1+a&this._capacityMask]);for(i=this._head-1+a&this._capacityMask;n>0;)this._list[i=i-1+a&this._capacityMask]=void 0,n--;e<0&&(this._tail=i)}else{for(this._tail=i,i=i+t+a&this._capacityMask,r=o-(t+e);r>0;r--)this.push(this._list[i++]);for(i=this._tail;n>0;)this._list[i=i+1+a&this._capacityMask]=void 0,n--}return this._head<2&&this._tail>1e4&&this._tail<=a>>>2&&this._shrinkArray(),s}}},r.prototype.splice=function(e,t){var s=e;if(s===(0|s)){var r=this.size();if(s<0&&(s+=r),!(s>r))if(!(arguments.length>2))return this.remove(s,t);else{var i,n,o,a=arguments.length,l=this._list.length,c=2;if(!r||s<r/2){for(n=Array(s),i=0;i<s;i++)n[i]=this._list[this._head+i&this._capacityMask];for(0===t?(o=[],s>0&&(this._head=this._head+s+l&this._capacityMask)):(o=this.remove(s,t),this._head=this._head+s+l&this._capacityMask);a>c;)this.unshift(arguments[--a]);for(i=s;i>0;i--)this.unshift(n[i-1])}else{var u=(n=Array(r-(s+t))).length;for(i=0;i<u;i++)n[i]=this._list[this._head+s+t+i&this._capacityMask];for(0===t?(o=[],s!=r&&(this._tail=this._head+s+l&this._capacityMask)):(o=this.remove(s,t),this._tail=this._tail-u+l&this._capacityMask);c<a;)this.push(arguments[c++]);for(i=0;i<u;i++)this.push(n[i])}return o}}},r.prototype.clear=function(){this._list=Array(this._list.length),this._head=0,this._tail=0},r.prototype.isEmpty=function(){return this._head===this._tail},r.prototype.toArray=function(){return this._copyArray(!1)},r.prototype._fromArray=function(e){var t=e.length,s=this._nextPowerOf2(t);this._list=Array(s),this._capacityMask=s-1,this._tail=t;for(var r=0;r<t;r++)this._list[r]=e[r]},r.prototype._copyArray=function(e,t){var s,r=this._list,i=r.length,n=this.length;if((t|=n)==n&&this._head<this._tail)return this._list.slice(this._head,this._tail);var o=Array(t),a=0;if(e||this._head>this._tail){for(s=this._head;s<i;s++)o[a++]=r[s];for(s=0;s<this._tail;s++)o[a++]=r[s]}else for(s=this._head;s<this._tail;s++)o[a++]=r[s];return o},r.prototype._growArray=function(){if(0!=this._head){var e=this._copyArray(!0,this._list.length<<1);this._tail=this._list.length,this._head=0,this._list=e}else this._tail=this._list.length,this._list.length<<=1;this._capacityMask=this._capacityMask<<1|1},r.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1},r.prototype._nextPowerOf2=function(e){return Math.max(1<<Math.log(e)/Math.log(2)+1,4)},t.exports=r},30846,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(12522),i=e.r(9068),n=e.r(19335),o=e.r(26898),a=e.r(96686),l=e.r(58491);class c{static checkFlag(e,t){return t=t.toLowerCase(),!!this.getFlagMap()[e][t]}static setArgumentTransformer(e,t){this._transformer.argument[e]=t}static setReplyTransformer(e,t){this._transformer.reply[e]=t}static getFlagMap(){return this.flagMap||(this.flagMap=Object.keys(c.FLAGS).reduce((e,t)=>(e[t]={},c.FLAGS[t].forEach(s=>{e[t][s]=!0}),e),{})),this.flagMap}constructor(e,t=[],s={},r){if(this.name=e,this.inTransaction=!1,this.isTraced=!1,this.isResolved=!1,this.isSettled=!1,this.transformed=!1,this.replyEncoding=s.replyEncoding,this.protocol=2,this.replyMapping="legacy",this.errorStack=s.errorStack,this.args=t.flat(),this.callback=r,this.initPromise(),s.keyPrefix){let e=s.keyPrefix instanceof Buffer,t=e?s.keyPrefix:null;this._iterateKeys(r=>r instanceof Buffer?(null===t&&(t=Buffer.from(s.keyPrefix)),Buffer.concat([t,r])):e?Buffer.concat([s.keyPrefix,Buffer.from(String(r))]):s.keyPrefix+r)}s.readOnly&&(this.isReadOnly=!0)}getSlot(){if(void 0===this.slot){let e=this.getKeys()[0];this.slot=null==e?null:i(e)}return this.slot}getKeys(){return this._iterateKeys()}setReplyContext(e){this.protocol=e?.protocol??2,this.replyMapping=e?.replyMapping??"legacy"}toWritable(e){let t,s="*"+(this.args.length+1)+"\r\n$"+Buffer.byteLength(this.name)+"\r\n"+this.name+"\r\n";if(this.bufferMode){let e=new p;e.push(s);for(let t=0;t<this.args.length;++t){let s=this.args[t];s instanceof Buffer?0===s.length?e.push("$0\r\n\r\n"):(e.push("$"+s.length+"\r\n"),e.push(s),e.push("\r\n")):e.push("$"+Buffer.byteLength(s)+"\r\n"+s+"\r\n")}t=e.toBuffer()}else{t=s;for(let e=0;e<this.args.length;++e){let s=this.args[e];t+="$"+Buffer.byteLength(s)+"\r\n"+s+"\r\n"}}return t}stringifyArguments(){for(let e=0;e<this.args.length;++e){let t=this.args[e];"string"==typeof t||(t instanceof Buffer?this.bufferMode=!0:this.args[e]=(0,o.toArg)(t))}}transformReply(e){this.replyEncoding&&(e=(0,o.convertBufferToString)(e,this.replyEncoding));let t=c._transformer.reply[this.name];return t&&(e=t(e,{commandName:this.name,protocol:this.protocol,replyMapping:this.replyMapping})),e}setTimeout(e){this._commandTimeoutTimer||(this._commandTimeoutTimer=setTimeout(()=>{this.isSettled||this.reject(Error("Command timed out"))},e))}setBlockingTimeout(e){if(e<=0)return;this._blockingTimeoutTimer&&(clearTimeout(this._blockingTimeoutTimer),this._blockingTimeoutTimer=void 0);let t=Date.now();void 0===this._blockingDeadline&&(this._blockingDeadline=t+e);let s=this._blockingDeadline-t;s<=0?this.resolve(null):this._blockingTimeoutTimer=setTimeout(()=>{if(this.isSettled){this._blockingTimeoutTimer=void 0;return}this._blockingTimeoutTimer=void 0,this.resolve(null)},s)}extractBlockingTimeout(){let e=this.args;if(!e||0===e.length)return;let t=this.name.toLowerCase();return"blmovem"===t?(0,a.parseSecondsArgument)(e[4]):c.checkFlag("LAST_ARG_TIMEOUT_COMMANDS",t)?(0,a.parseSecondsArgument)(e[e.length-1]):c.checkFlag("FIRST_ARG_TIMEOUT_COMMANDS",t)?(0,a.parseSecondsArgument)(e[0]):c.checkFlag("BLOCK_OPTION_COMMANDS",t)?(0,a.parseBlockOption)(e):void 0}_clearTimers(){let e=this._commandTimeoutTimer;e&&(clearTimeout(e),delete this._commandTimeoutTimer);let t=this._blockingTimeoutTimer;t&&(clearTimeout(t),delete this._blockingTimeoutTimer)}initPromise(){this.isResolved=!1,this.isSettled=!1;let e=new Promise((e,t)=>{if(!this.transformed){this.transformed=!0;let e=c._transformer.argument[this.name];e&&(this.args=e(this.args)),this.stringifyArguments()}this.resolve=this._convertValue(e),this.reject=e=>{this._clearTimers(),this.isSettled=!0,this.errorStack?t((0,o.optimizeErrorStack)(e,this.errorStack.stack,"/ROOT/node_modules/ioredis/built")):t(e)}});this.promise=(0,n.default)(e,this.callback)}_iterateKeys(e=e=>e){if(void 0===this.keys&&(this.keys=[],(0,r.exists)(this.name,{caseInsensitive:!0})))for(let t of(0,r.getKeyIndexes)(this.name,this.args,{nameCaseInsensitive:!0}))this.args[t]=e(this.args[t]),this.keys.push(this.args[t]);return this.keys}_convertValue(e){return t=>{try{this._clearTimers(),e(this.transformReply(t)),this.isResolved=!0,this.isSettled=!0}catch(e){this.reject(e)}return this.promise}}}c.FLAGS={VALID_IN_SUBSCRIBER_MODE:["subscribe","psubscribe","unsubscribe","punsubscribe","ssubscribe","sunsubscribe","ping","quit"],VALID_IN_MONITOR_MODE:["monitor","auth"],ENTER_SUBSCRIBER_MODE:["subscribe","psubscribe","ssubscribe"],EXIT_SUBSCRIBER_MODE:["unsubscribe","punsubscribe","sunsubscribe"],WILL_DISCONNECT:["quit"],HANDSHAKE_COMMANDS:["auth","hello","select","client","readonly","info"],IGNORE_RECONNECT_ON_ERROR:["client"],BLOCKING_COMMANDS:["blpop","brpop","brpoplpush","blmove","blmovem","bzpopmin","bzpopmax","bzmpop","blmpop","xread","xreadgroup"],LAST_ARG_TIMEOUT_COMMANDS:["blpop","brpop","brpoplpush","blmove","bzpopmin","bzpopmax"],FIRST_ARG_TIMEOUT_COMMANDS:["bzmpop","blmpop"],BLOCK_OPTION_COMMANDS:["xread","xreadgroup"]},c._transformer={argument:{},reply:{}},s.default=c;let u=function(e){if(1===e.length){if(e[0]instanceof Map)return(0,o.convertMapToArray)(e[0]);if("object"==typeof e[0]&&null!==e[0])return(0,o.convertObjectToArray)(e[0])}return e},h=function(e){if(2===e.length){if(e[1]instanceof Map)return[e[0]].concat((0,o.convertMapToArray)(e[1]));if("object"==typeof e[1]&&null!==e[1])return[e[0]].concat((0,o.convertObjectToArray)(e[1]))}return e};for(let e of(c.setArgumentTransformer("mset",u),c.setArgumentTransformer("msetnx",u),c.setArgumentTransformer("hset",h),c.setArgumentTransformer("hmset",h),c.setReplyTransformer("hgetall",function(e){if(Array.isArray(e)){let t={};for(let s=0;s<e.length;s+=2){let r=e[s],i=e[s+1];r in t?Object.defineProperty(t,r,{value:i,configurable:!0,enumerable:!0,writable:!0}):t[r]=i}return t}return e}),c.setReplyTransformer("vsim",l.transformVsimReply),c.setReplyTransformer("hrandfield",l.transformPairReply),c.setReplyTransformer("xread",l.transformStreamReadReply),c.setReplyTransformer("xreadgroup",l.transformStreamReadReply),l.sortedSetWithScorePairCommands))c.setReplyTransformer(e,l.transformPairReply);class p{constructor(){this.length=0,this.items=[]}push(e){this.length+=Buffer.byteLength(e),this.items.push(e)}toBuffer(){let e=Buffer.allocUnsafe(this.length),t=0;for(let s of this.items){let r=Buffer.byteLength(s);Buffer.isBuffer(s)?s.copy(e,t):e.write(s,t,r),t+=r}return e}}},73052,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(30846),i=e.r(26898),n=e.r(89611),o=e.r(5318),a=(0,i.Debug)("dataHandler");s.default=class{constructor(e,t){var s;let r;this.redis=e;let i=(r="resp3"===(s=t).replyMapping?c:l,s.stringNumbers?{...r,[o.RESP_TYPES.NUMBER]:String,[o.RESP_TYPES.DOUBLE]:String}:r),n=new o.Decoder({getTypeMapping:()=>i,onReply:e=>{this.dispatch(()=>this.returnReply(e))},onErrorReply:e=>{this.dispatch(()=>this.returnError(e))},onPush:e=>{this.dispatch(()=>this.returnPush(e))}});e.stream.prependListener("data",e=>{try{n.write(e)}catch(e){this.returnFatalError(e)}}),e.stream.resume()}dispatch(e){try{e()}catch(e){process.nextTick(()=>{throw e})}}returnFatalError(e){e.message+=". Please report this.",this.redis.recoverFromFatalError(e,e,{offlineQueue:!1})}returnError(e){let t=this.shiftCommand(e);t&&(e.command={name:t.command.name,args:t.command.args},"ssubscribe"===t.command.name&&e.message.startsWith("MOVED ")&&this.redis.emit("moved"),this.redis.handleReconnection(e,t))}returnReply(e){if(this.handleMonitorReply(e)||3!==this.redis.condition.protocol&&this.handleSubscriberReply(e))return;let t=this.shiftCommand(e);t&&(r.default.checkFlag("ENTER_SUBSCRIBER_MODE",t.command.name)?(this.redis.condition.subscriber=new n.default,this.redis.condition.subscriber.add(t.command.name,e[1].toString()),h(t.command,e[2])||this.redis.commandQueue.unshift(t)):r.default.checkFlag("EXIT_SUBSCRIBER_MODE",t.command.name)?p(t.command,e[2])||this.redis.commandQueue.unshift(t):t.command.resolve(e))}returnPush(e){if(!Array.isArray(e)||0===e.length)return;let t=e[0].toString();switch(a('receive push "%s"',t),t){case"message":case"pmessage":case"smessage":this.handleSubscriberReply(e);break;case"ssubscribe":case"subscribe":case"psubscribe":{this.redis.condition.subscriber||(this.redis.condition.subscriber=new n.default);let s=e[1].toString();this.redis.condition.subscriber.add(t,s);let r=this.shiftCommand(e);if(!r)return;h(r.command,e[2])||this.redis.commandQueue.unshift(r);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{if(this.redis.condition.subscriber){let s=e[1]?e[1].toString():null;s&&this.redis.condition.subscriber.del(t,s)}let s=e[2];if(0===Number(s)&&(this.redis.condition.subscriber=!1),this.handleUnsolicitedUnsubscribe(t))return;let r=this.shiftCommand(e);if(!r)return;p(r.command,s)||this.redis.commandQueue.unshift(r)}}}handleUnsolicitedUnsubscribe(e){let t=this.redis.commandQueue.peekFront();return(!t||t.command.name.toLowerCase()!==e)&&("sunsubscribe"===e&&this.redis.emit("moved"),!0)}handleSubscriberReply(e){if(!this.redis.condition.subscriber)return!1;let t=Array.isArray(e)?e[0].toString():null;switch(a('receive reply "%s" in subscriber mode',t),t){case"message":this.redis.listeners("message").length>0&&this.redis.emit("message",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("messageBuffer",e[1],e[2]);break;case"pmessage":{let t=e[1].toString();this.redis.listeners("pmessage").length>0&&this.redis.emit("pmessage",t,e[2].toString(),e[3].toString()),this.redis.emit("pmessageBuffer",t,e[2],e[3]);break}case"smessage":this.redis.listeners("smessage").length>0&&this.redis.emit("smessage",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("smessageBuffer",e[1],e[2]);break;case"ssubscribe":case"subscribe":case"psubscribe":{let s=e[1].toString();this.redis.condition.subscriber.add(t,s);let r=this.shiftCommand(e);if(!r)return;h(r.command,e[2])||this.redis.commandQueue.unshift(r);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{let s=e[1]?e[1].toString():null;s&&this.redis.condition.subscriber.del(t,s);let r=e[2];if(0===Number(r)&&(this.redis.condition.subscriber=!1),this.handleUnsolicitedUnsubscribe(t))break;let i=this.shiftCommand(e);if(!i)return;p(i.command,r)||this.redis.commandQueue.unshift(i);break}default:{let t=this.shiftCommand(e);if(!t)return;t.command.resolve(e)}}return!0}handleMonitorReply(e){if("monitoring"!==this.redis.status)return!1;let t=e.toString();if("OK"===t)return!1;let s=t.indexOf(" "),r=t.slice(0,s),i=t.indexOf('"'),n=t.slice(i+1,-1).split('" "').map(e=>e.replace(/\\"/g,'"')),o=t.slice(s+2,i-2).split(" ");return this.redis.emit("monitor",r,n,o[1],o[0]),!0}shiftCommand(e){let t=this.redis.commandQueue.shift();if(!t){let t=Error("Command queue state error. If you can reproduce this, please report it."+(e instanceof Error?` Last error: ${e.message}`:` Last reply: ${e.toString()}`));return this.redis.emit("error",t),null}return t}};let l={[o.RESP_TYPES.SIMPLE_STRING]:Buffer,[o.RESP_TYPES.BLOB_STRING]:Buffer,[o.RESP_TYPES.VERBATIM_STRING]:Buffer,[o.RESP_TYPES.BIG_NUMBER]:String,[o.RESP_TYPES.DOUBLE]:Buffer,[o.RESP_TYPES.BOOLEAN]:Number,[o.RESP_TYPES.MAP]:Array,[o.RESP_TYPES.SET]:Array},c={[o.RESP_TYPES.SIMPLE_STRING]:Buffer,[o.RESP_TYPES.BLOB_STRING]:Buffer,[o.RESP_TYPES.VERBATIM_STRING]:Buffer,[o.RESP_TYPES.BIG_NUMBER]:String,[o.RESP_TYPES.SET]:Array},u=new WeakMap;function h(e,t){let s=u.has(e)?u.get(e):e.args.length;return(s-=1)<=0?(e.resolve(t),u.delete(e),!0):(u.set(e,s),!1)}function p(e,t){let s=u.has(e)?u.get(e):e.args.length;return 0===s?0===Number(t)&&(u.delete(e),e.resolve(t),!0):(s-=1)<=0?(e.resolve(t),!0):(u.set(e,s),!1)}},6135,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(9068),i=e.r(12522),n=e.r(19335),o=e.r(24361),a=e.r(30846),l=e.r(874),c=e.r(26898),u=e.r(67061),h=e.r(57355);class p extends u.default{constructor(e){super(),this.redis=e,this.isPipeline=!0,this.replyPending=0,this._queue=[],this._result=[],this._transactions=0,this._shaToScript={},this.isCluster="Cluster"===this.redis.constructor.name||this.redis.isCluster,this.options=e.options,Object.keys(e.scriptsSet).forEach(t=>{let s=e.scriptsSet[t];this._shaToScript[s.sha]=s,this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),e.addedBuiltinSet.forEach(t=>{this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t});let t=this;Object.defineProperty(this,"length",{get:function(){return t._queue.length}})}fillResult(e,t){if("exec"===this._queue[t].name&&Array.isArray(e[1])){let s=e[1].length;for(let r=0;r<s;r++){if(e[1][r]instanceof Error)continue;let i=this._queue[t-(s-r)];try{e[1][r]=i.transformReply(e[1][r])}catch(t){e[1][r]=t}}}if(this._result[t]=e,--this.replyPending)return;if(this.isCluster){let e,t=!0;for(let s=0;s<this._result.length;++s){let r=this._result[s][0],n=this._queue[s];if(r){if("exec"===n.name&&"EXECABORT Transaction discarded because of previous errors."===r.message)continue;if(e){if(e.name!==r.name||e.message!==r.message){t=!1;break}}else e={name:r.name,message:r.message}}else if(!n.inTransaction&&!((0,i.exists)(n.name,{caseInsensitive:!0})&&(0,i.hasFlag)(n.name,"readonly",{nameCaseInsensitive:!0}))){t=!1;break}}if(e&&t){let t=this,s=e.message.split(" "),r=this._queue,i=!1;this._queue=[];for(let e=0;e<r.length;++e){if("ASK"===s[0]&&!i&&"asking"!==r[e].name&&(!r[e-1]||"asking"!==r[e-1].name)){let e=new a.default("asking");e.ignore=!0,this.sendCommand(e)}r[e].initPromise(),this.sendCommand(r[e]),i=r[e].inTransaction}let n=!0;void 0===this.leftRedirections&&(this.leftRedirections={});let o=function(){t.exec()},l=this.redis;if(l.handleError(e,this.leftRedirections,{moved:function(e,s){t.preferKey=s,l.slots[e]?l.slots[e][0]!==s&&(l.slots[e]=[s]):l.slots[e]=[s],l._groupsBySlot[e]=l._groupsIds[l.slots[e].join(";")],l.refreshSlotsCache(),t.exec()},ask:function(e,s){t.preferKey=s,t.exec()},tryagain:o,clusterDown:o,connectionClosed:o,maxRedirections:()=>{n=!1},defaults:()=>{n=!1}}),n)return}}let s=0;for(let e=0;e<this._queue.length-s;++e)this._queue[e+s].ignore&&(s+=1),this._result[e]=this._result[e+s];this.resolve(this._result.slice(0,this._result.length-s))}sendCommand(e){this._transactions>0&&(e.inTransaction=!0);let t=this._queue.length;return e.pipelineIndex=t,e.promise.then(e=>{this.fillResult([null,e],t)}).catch(e=>{this.fillResult([e],t)}),this._queue.push(e),this}addBatch(e){let t,s,r;for(let i=0;i<e.length;++i)s=(t=e[i])[0],r=t.slice(1),this[s].apply(this,r);return this}}s.default=p;let d=p.prototype.multi;p.prototype.multi=function(){return this._transactions+=1,d.apply(this,arguments)};let y=p.prototype.execBuffer;p.prototype.execBuffer=(0,o.deprecate)(function(){return this._transactions>0&&(this._transactions-=1),y.apply(this,arguments)},"Pipeline#execBuffer: Use Pipeline#exec instead"),p.prototype.exec=function(e){let t,s;if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(c.noop),e&&!this.nodeifiedPromise&&(this.nodeifiedPromise=!0,(0,n.default)(this.promise,e)),this.redis.delayUntilReady(t=>{t?this.reject(t):this.exec(e)}),this.promise;if(this._transactions>0)return this._transactions-=1,y.apply(this,arguments);if(this.nodeifiedPromise||(this.nodeifiedPromise=!0,(0,n.default)(this.promise,e)),this._queue.length||this.resolve([]),this.isCluster){let e=[];for(let t=0;t<this._queue.length;t++){let s=this._queue[t].getKeys();if(s.length&&e.push(s[0]),s.length&&0>r.generateMulti(s))return this.reject(Error("All the keys in a pipeline command should belong to the same slot")),this.promise}if(e.length){if((t=function(e,t){let s=r(t[0]),i=e._groupsBySlot[s];for(let s=1;s<t.length;s++)if(e._groupsBySlot[r(t[s])]!==i)return -1;return s}(this.redis,e))<0)return this.reject(Error("All keys in the pipeline should belong to the same slots allocation group")),this.promise}else t=16384*Math.random()|0}let i=this;return(0,h.interceptHimportPipeline)({owner:i.redis,commands:i._queue,slot:t,preferredNodeKey:i.preferKey,setDestination(e){s={slot:t,redis:e}},resume:o,reject(e){i.reject(e)}})||o(),this.promise;function o(){let e,r=i.replyPending=i._queue.length;i.isCluster&&!s&&(s={slot:t,redis:i.redis.connectionPool.nodes.all[i.preferKey]});let n="",o={isPipeline:!0,destination:i.isCluster?s:{redis:i.redis},write(t){"string"!=typeof t?(e||(e=[]),n&&(e.push(Buffer.from(n,"utf8")),n=""),e.push(t)):(n.length+t.length>=l.constants.MAX_STRING_LENGTH&&(e||(e=[]),n&&(e.push(Buffer.from(n,"utf8")),n="")),n+=t),--r||(e?(n&&e.push(Buffer.from(n,"utf8")),o.destination.redis.stream.write(Buffer.concat(e))):o.destination.redis.stream.write(n),r=i._queue.length,n="",e=void 0)}};for(let e=0;e<i._queue.length;++e)i.redis.sendCommand(i._queue[e],o,s);return i.promise}}},66735,(e,t,s)=>{"use strict";var r;Object.defineProperty(s,"__esModule",{value:!0});let i=e.r(12522),n=e.r(27699),o=e.r(19335),a=e.r(83252),l=e.r(30846),c=e.r(18652),u=e.r(77420),h=e.r(45247),p=e.r(77143),d=e.r(12749),y=e.r(3422),f=e.r(26898),m=e.r(62819),g=e.r(57674),S=e.r(67061),b=e.r(57517),k=e.r(57355),_=e.r(57355),E=e.r(89977),A=(0,f.Debug)("redis");class v extends S.default{static createClient(...e){return new v(...e)}constructor(e,t,s){if(super(),this.status="wait",this.isCluster=!1,this.reconnectTimeout=null,this.connectionEpoch=0,this.retryAttempts=0,this.manuallyClosing=!1,this[r]=!1,this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this.parseOptions(e,t,s),n.EventEmitter.call(this),this.options.himportFieldsets=(0,_.cloneHimportFieldsets)(this.options.himportFieldsets),this.options.himportFieldsets?.length&&(0,k.bindHimportCoordinator)(this,new k.default(this.options.himportFieldsets),"standalone"),this.resetCommandQueue(),this.resetOfflineQueue(),this.options.Connector)this.connector=new this.options.Connector(this.options);else if(this.options.sentinels){let e=new u.default(this.options);e.emitter=this,this.connector=e}else this.connector=new c.StandaloneConnector(this.options);this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(b.noop)}get autoPipelineQueueSize(){let e=0;for(let t of this._autoPipelines.values())e+=t.length;return e}connect(e){let t=(0,m.traceConnect)(()=>this._connect(),()=>{let{address:e,port:t}=this._getServerAddress();return{serverAddress:e,serverPort:t,connectionEpoch:this.connectionEpoch}});return(0,o.default)(t,e)}_connect(){return new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(Error("Redis is already connecting/connected"));this.connectionEpoch+=1,this.setStatus("connecting");let{options:s}=this;this.condition={select:s.db,auth:s.username?[s.username,s.password]:s.password,subscriber:!1,protocol:s.protocol,replyMapping:3===s.protocol&&"resp3"===s.replyMapping?"resp3":"legacy",handshake:!1};let r=this;(0,o.default)(this.connector.connect(function(e,t){r.silentEmit(e,t)}),function(i,n){if(i){r.flushQueue(i),r.silentEmit("error",i),t(i),r.setStatus("end");return}let o=s.tls?"secureConnect":"connect";if("sentinels"in s&&s.sentinels&&!s.enableTLSForSentinelMode&&(o="connect"),r.stream=n,s.noDelay&&n.setNoDelay(!0),"number"==typeof s.keepAlive&&(n.connecting?n.once(o,()=>{n.setKeepAlive(!0,s.keepAlive)}):n.setKeepAlive(!0,s.keepAlive)),n.connecting){if(n.once(o,h.connectHandler(r)),s.connectTimeout){let e=!1;n.setTimeout(s.connectTimeout,function(){if(e)return;n.setTimeout(0),n.destroy();let t=Error("connect ETIMEDOUT");t.errorno="ETIMEDOUT",t.code="ETIMEDOUT",t.syscall="connect",h.errorHandler(r)(t)}),n.once(o,function(){e=!0,n.setTimeout(0)})}}else if(n.destroyed){let e=r.connector.firstError;e&&process.nextTick(()=>{h.errorHandler(r)(e)}),process.nextTick(h.closeHandler(r))}else process.nextTick(h.connectHandler(r));n.destroyed||(n.once("error",h.errorHandler(r)),n.once("close",h.closeHandler(r)));let a=function(){r.removeListener("close",l),e()};var l=function(){r.removeListener("ready",a),t(Error(f.CONNECTION_CLOSED_ERROR_MSG))};r.once("ready",a),r.once("close",l)})})}disconnect(e=!1){e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),"wait"===this.status?h.closeHandler(this)():this.connector.disconnect()}end(){this.disconnect()}duplicate(e){return new v({...this.options,...e??{}})}get mode(){return this.options.monitor?"monitor":(0,f.isResp2SubscriberMode)(this.condition)?"subscriber":"normal"}monitor(e){let t=this.duplicate({monitor:!0,lazyConnect:!1,himportFieldsets:void 0});return(0,o.default)(new Promise(function(e,s){t.once("error",s),t.once("monitoring",function(){e(t)})}),e)}sendCommand(e,t){if(e.setReplyContext(this.condition??this.options),"wait"===this.status&&this.connect().catch(b.noop),"end"===this.status)return e.reject(Error(f.CONNECTION_CLOSED_ERROR_MSG)),e.promise;if((0,f.isResp2SubscriberMode)(this.condition)&&!l.default.checkFlag("VALID_IN_SUBSCRIBER_MODE",e.name))return e.reject(Error("Connection in subscriber mode, only subscriber commands may be used")),e.promise;if("number"==typeof this.options.commandTimeout&&e.setTimeout(this.options.commandTimeout),!t&&this[k.hasHimportCoordinator]&&(0,k.interceptHimportCommand)(this,e,"ready"===this.status,()=>{this.sendCommand(e)}))return e.promise;let s=this.getBlockingTimeoutInMs(e),r="ready"===this.status||!t&&"connect"===this.status&&this.condition?.handshake&&(l.default.checkFlag("HANDSHAKE_COMMANDS",e.name)||(0,k.isInternalHimportCommand)(e))||!t&&"connect"===this.status&&!this.condition?.handshake&&(0,i.exists)(e.name,{caseInsensitive:!0})&&(0,i.hasFlag)(e.name,"loading",{nameCaseInsensitive:!0});if(this.stream&&this.stream.writable?this.stream._writableState&&this.stream._writableState.ended&&(r=!1):r=!1,r)A.enabled&&A("write command[%s]: %d -> %s(%o)",this._getDescription(),this.condition?.select,e.name,e.args),t?"isPipeline"in t&&t.isPipeline?t.write(e.toWritable(t.destination.redis.stream)):t.write(e.toWritable(t)):this.stream.write(e.toWritable(this.stream)),this.commandQueue.push({command:e,stream:t,select:this.condition.select}),void 0!==s&&e.setBlockingTimeout(s),l.default.checkFlag("WILL_DISCONNECT",e.name)&&(this.manuallyClosing=!0),void 0!==this.options.socketTimeout&&void 0===this.socketTimeoutTimer&&this.setSocketTimeout();else{if(!this.options.enableOfflineQueue)return e.reject(Error("Stream isn't writeable and enableOfflineQueue options is false")),e.promise;if("quit"===e.name&&0===this.offlineQueue.length)return this.disconnect(),e.resolve(Buffer.from("OK")),e.promise;if(A.enabled&&A("queue command[%s]: %d -> %s(%o)",this._getDescription(),this.condition.select,e.name,e.args),this.offlineQueue.push({command:e,stream:t,select:this.condition.select}),l.default.checkFlag("BLOCKING_COMMANDS",e.name)){let t=this.getConfiguredBlockingTimeout();void 0!==t&&e.setBlockingTimeout(t)}}if("select"===e.name&&(0,f.isInt)(e.args[0])){let t=parseInt(e.args[0],10);this.condition.select!==t&&(this.condition.select=t,this.emit("select",t),A("switch to db [%d]",this.condition.select))}return!r||e.isTraced?e.promise:(e.isTraced=!0,(0,m.traceCommand)(()=>e.promise,()=>this._buildCommandContext(e)))}getBlockingTimeoutInMs(e){if(!l.default.checkFlag("BLOCKING_COMMANDS",e.name))return;let t=this.getConfiguredBlockingTimeout();if(void 0===t)return;let s=e.extractBlockingTimeout();return"number"==typeof s?s>0?s+(this.options.blockingTimeoutGrace??p.DEFAULT_REDIS_OPTIONS.blockingTimeoutGrace):t:null===s?t:void 0}getConfiguredBlockingTimeout(){if("number"==typeof this.options.blockingTimeout&&this.options.blockingTimeout>0)return this.options.blockingTimeout}setSocketTimeout(){let e=this.stream;this.socketTimeoutTimer=setTimeout(()=>{e.destroy(Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`)),this.socketTimeoutTimer=void 0},this.options.socketTimeout),e.once("data",()=>{clearTimeout(this.socketTimeoutTimer),this.socketTimeoutTimer=void 0,0!==this.commandQueue.length&&this.setSocketTimeout()})}scanStream(e){return this.createScanStream("scan",{options:e})}scanBufferStream(e){return this.createScanStream("scanBuffer",{options:e})}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}silentEmit(e,t){let s;if("error"!==e||(s=t,"end"!==this.status&&(!this.manuallyClosing||!(s instanceof Error)||s.message!==f.CONNECTION_CLOSED_ERROR_MSG&&"connect"!==s.syscall&&"read"!==s.syscall)))return this.listeners(e).length>0?this.emit.apply(this,arguments):(s&&s instanceof Error&&console.error("[ioredis] Unhandled error event:",s.stack),!1)}recoverFromFatalError(e,t,s){this.flushQueue(t,s),this.silentEmit("error",t),this.disconnect(!0)}handleReconnection(e,t){let s=!1,r=l.default.checkFlag("IGNORE_RECONNECT_ON_ERROR",t.command.name)||this.condition?.handshake&&l.default.checkFlag("HANDSHAKE_COMMANDS",t.command.name);switch(this.options.reconnectOnError&&!r&&(s=this.options.reconnectOnError(e)),s){case 1:case!0:"reconnecting"!==this.status&&this.disconnect(!0),t.command.reject(e);break;case 2:"reconnecting"!==this.status&&this.disconnect(!0),this.condition?.select!==t.select&&"select"!==t.command.name&&this.select(t.select),this.sendCommand(t.command);break;default:t.command.reject(e)}}_getServerAddress(){return"path"in this.options&&this.options.path?{address:this.options.path,port:void 0}:{address:"host"in this.options&&this.options.host||"localhost",port:"port"in this.options&&this.options.port||6379}}_buildCommandContext(e){let{address:t,port:s}=this._getServerAddress();return{command:e.name,args:(0,m.sanitizeArgs)(e.name,e.args),database:this.condition?.select??this.options.db??0,serverAddress:t,serverPort:s}}_buildBatchContext(e){let{address:t,port:s}=this._getServerAddress();return{batchMode:"MULTI",batchSize:e,database:this.condition?.select??this.options.db??0,serverAddress:t,serverPort:s}}_getDescription(){let e;return e="path"in this.options&&this.options.path?this.options.path:this.stream&&this.stream.remoteAddress&&this.stream.remotePort?this.stream.remoteAddress+":"+this.stream.remotePort:"host"in this.options&&this.options.host?this.options.host+":"+this.options.port:"",this.options.connectionName&&(e+=` (${this.options.connectionName})`),e}resetCommandQueue(){this.commandQueue=new E}resetOfflineQueue(){this.offlineQueue=new E}parseOptions(...e){let t={},s=!1;for(let r=0;r<e.length;++r){let i=e[r];if(null!=i)if("object"==typeof i)(0,b.defaults)(t,i);else if("string"==typeof i)(0,b.defaults)(t,(0,f.parseURL)(i)),i.startsWith("rediss://")&&(s=!0);else if("number"==typeof i)t.port=i;else throw Error("Invalid argument "+i)}if(s&&(0,b.defaults)(t,{tls:!0}),(0,b.defaults)(t,v.defaultOptions),"string"==typeof t.port&&(t.port=parseInt(t.port,10)),"string"==typeof t.db&&(t.db=parseInt(t.db,10)),"resp3"===t.replyMapping&&3!==t.protocol)throw Error('The "resp3" replyMapping is only supported with protocol 3');this.options=(0,f.resolveTLSProfile)(t)}setStatus(e,t){A.enabled&&A("status[%s]: %s -> %s",this._getDescription(),this.status||"[empty]",e),this.status=e,process.nextTick(this.emit.bind(this,e,t))}createScanStream(e,{key:t,options:s={}}){return new d.default({objectMode:!0,key:t,redis:this,command:e,...s})}flushQueue(e,t){let s;if((t=(0,b.defaults)({},t,{offlineQueue:!0,commandQueue:!0})).offlineQueue)for(;s=this.offlineQueue.shift();)s.command.reject(e);if(t.commandQueue&&this.commandQueue.length>0)for(this.stream&&this.stream.removeAllListeners("data");s=this.commandQueue.shift();)s.command.reject(e)}_readyCheck(e){let t=this;this.info(function(s,r){if(s)return s.message&&s.message.includes("NOPERM")?(console.warn(`Skipping the ready check because INFO command fails: "${s.message}". You can disable ready check with "enableReadyCheck". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`),e(null,{})):e(s);if("string"!=typeof r)return e(null,r);let i={},n=r.split("\r\n");for(let e=0;e<n.length;++e){let[t,...s]=n[e].split(":"),r=s.join(":");r&&(i[t]=r)}if(i.loading&&"0"!==i.loading){let s=1e3*(i.loading_eta_seconds||1),r=t.options.maxLoadingRetryTime&&t.options.maxLoadingRetryTime<s?t.options.maxLoadingRetryTime:s;A("Redis server still loading, trying again in "+r+"ms"),setTimeout(function(){t._readyCheck(e)},r)}else e(null,i)}).catch(b.noop)}}r=k.hasHimportCoordinator,v.Cluster=a.default,v.Command=l.default,v.defaultOptions=p.DEFAULT_REDIS_OPTIONS,(0,g.default)(v,n.EventEmitter),(0,y.addTransactionSupport)(v.prototype),s.default=v},12749,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(88947);class i extends r.Readable{constructor(e){super(e),this.opt=e,this._redisCursor="0",this._redisDrained=!1}_read(){if(this._redisDrained)return void this.push(null);let e=[this._redisCursor];this.opt.key&&e.unshift(this.opt.key),this.opt.match&&e.push("MATCH",this.opt.match),this.opt.type&&e.push("TYPE",this.opt.type),this.opt.count&&e.push("COUNT",String(this.opt.count)),this.opt.noValues&&e.push("NOVALUES"),this.opt.redis[this.opt.command](e,(e,t)=>{e?this.emit("error",e):(this._redisCursor=t[0]instanceof Buffer?t[0].toString():t[0],"0"===this._redisCursor&&(this._redisDrained=!0),this.push(t[1]))})}close(){this._redisDrained=!0}}s.default=i},40162,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(54799),i=e.r(30846),n=e.r(19335);s.default=class{constructor(e,t=null,s="",n=!1){this.lua=e,this.numberOfKeys=t,this.keyPrefix=s,this.readOnly=n,this.sha=(0,r.createHash)("sha1").update(e).digest("hex");let o=this.sha,a=new WeakSet;this.Command=class extends i.default{toWritable(t){let s=this.reject;return this.reject=e=>{-1!==e.message.indexOf("NOSCRIPT")&&a.delete(t),s.call(this,e)},a.has(t)?"eval"===this.name&&(this.name="evalsha",this.args[0]=o):(a.add(t),this.name="eval",this.args[0]=e),super.toWritable(t)}}}execute(e,t,s,r){"number"==typeof this.numberOfKeys&&t.unshift(this.numberOfKeys),this.keyPrefix&&(s.keyPrefix=this.keyPrefix),this.readOnly&&(s.readOnly=!0);let i=new this.Command("evalsha",[this.sha,...t],s);return i.promise=i.promise.catch(r=>{if(-1===r.message.indexOf("NOSCRIPT"))throw r;let i=new this.Command("evalsha",[this.sha,...t],s);return(e.isPipeline?e.redis:e).sendCommand(i)}),(0,n.default)(i.promise,r),e.sendCommand(i)}}},89611,(e,t,s)=>{"use strict";function r(e){return"unsubscribe"===e?"subscribe":"punsubscribe"===e?"psubscribe":"sunsubscribe"===e?"ssubscribe":e}Object.defineProperty(s,"__esModule",{value:!0}),s.default=class{constructor(){this.set={subscribe:{},psubscribe:{},ssubscribe:{}}}add(e,t){this.set[r(e)][t]=!0}del(e,t){delete this.set[r(e)][t]}channels(e){return Object.keys(this.set[r(e)])}isEmpty(){return 0===this.channels("subscribe").length&&0===this.channels("psubscribe").length&&0===this.channels("ssubscribe").length}}},33700,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.executeWithAutoPipelining=s.getFirstValueInFlattenedArray=s.shouldUseAutoPipelining=s.notAllowedAutoPipelineCommands=s.kCallbacks=s.kExec=void 0;let r=e.r(57517),i=e.r(9068),n=e.r(19335),o=e.r(12522);function a(e){for(let t=0;t<e.length;t++){let s=e[t];if("string"==typeof s)return s;if(Array.isArray(s)||(0,r.isArguments)(s)){if(0===s.length)continue;return s[0]}let i=[s].flat();if(i.length>0)return i[0]}}s.kExec=Symbol("exec"),s.kCallbacks=Symbol("callbacks"),s.notAllowedAutoPipelineCommands=["auth","info","script","quit","cluster","pipeline","multi","subscribe","psubscribe","unsubscribe","unpsubscribe","select","client","hello","readonly","himport"],s.shouldUseAutoPipelining=function(e,t,r){return t&&e.options.enableAutoPipelining&&!e.isPipeline&&!s.notAllowedAutoPipelineCommands.includes(r)&&!e.options.autoPipeliningIgnoredCommands.includes(r)},s.getFirstValueInFlattenedArray=a,s.executeWithAutoPipelining=function e(t,l,c,u,h){if(t.isCluster&&!t.slots.length)return"wait"===t.status&&t.connect().catch(r.noop),(0,n.default)(new Promise(function(s,r){t.delayUntilReady(i=>{i?r(i):e(t,l,c,u,null).then(s,r)})}),h);let p=t.options.keyPrefix||"",d=t.isCluster?t.slots[i(`${p}${function(e,t){if((0,o.exists)(e,{caseInsensitive:!0})){let s=t.flat(),r=(0,o.getKeyIndexes)(e,s,{nameCaseInsensitive:!0});if(r.length)return s[r[0]]}return a(t)}(c,u)}`)].join(","):"main";if(t.isCluster&&"master"!==t.options.scaleReads&&(d+=(0,o.exists)(c)&&(0,o.hasFlag)(c,"readonly")?":read":":write"),!t._autoPipelines.has(d)){let e=t.pipeline();e[s.kExec]=!1,e[s.kCallbacks]=[],t._autoPipelines.set(d,e)}let y=t._autoPipelines.get(d);y[s.kExec]||(y[s.kExec]=!0,setImmediate(function e(t,r){if(t._runningAutoPipelines.has(r)||!t._autoPipelines.has(r))return;t._runningAutoPipelines.add(r);let i=t._autoPipelines.get(r);t._autoPipelines.delete(r);let n=i[s.kCallbacks];i[s.kCallbacks]=null,i.exec(function(s,i){if(t._runningAutoPipelines.delete(r),s)for(let e=0;e<n.length;e++)process.nextTick(n[e],s);else for(let e=0;e<n.length;e++)process.nextTick(n[e],...i[e]);t._autoPipelines.has(r)&&e(t,r)})},t,d));let f=new Promise(function(e,t){y[s.kCallbacks].push(function(s,r){s?t(s):e(r)}),"call"===l&&u.unshift(c),y[l](...u)});return(0,n.default)(f,h)}},23086,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.DEFAULT_CLUSTER_OPTIONS=void 0;let r=e.r(79594);s.DEFAULT_CLUSTER_OPTIONS={clusterRetryStrategy:e=>Math.min(100+2*e,2e3),clusterNodeRetryStrategy:null,enableOfflineQueue:!0,enableReadyCheck:!0,scaleReads:"master",maxRedirections:16,retryDelayOnMoved:0,retryDelayOnFailover:100,retryDelayOnClusterDown:100,retryDelayOnTryAgain:100,slotsRefreshTimeout:1e3,useSRVRecords:!1,resolveSrv:r.resolveSrv,dnsLookup:r.lookup,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],shardedSubscribers:!1}},55925,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(78695),i=e.r(26898),n=e.r(66735),o=(0,i.Debug)("cluster:subscriber");s.default=class{constructor(e,t,s=!1){this.connectionPool=e,this.emitter=t,this.isSharded=s,this.started=!1,this.subscriber=null,this.slotRange=[],this.onSubscriberEnd=()=>{this.started?(o("subscriber has disconnected, selecting a new one..."),this.selectSubscriber()):o("subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting.")},this.connectionPool.on("-node",(e,t)=>{this.started&&this.subscriber&&(0,r.getNodeKey)(this.subscriber.options)===t&&(o("subscriber has left, selecting a new one..."),this.selectSubscriber())}),this.connectionPool.on("+node",()=>{this.started&&!this.subscriber&&(o("a new node is discovered and there is no subscriber, selecting a new one..."),this.selectSubscriber())})}getInstance(){return this.subscriber}associateSlotRange(e){return this.isSharded&&(this.slotRange=e),this.slotRange}start(){this.started=!0,this.selectSubscriber(),o("started")}stop(){this.started=!1,this.subscriber&&(this.subscriber.disconnect(),this.subscriber=null)}isStarted(){return this.started}selectSubscriber(){let e=this.lastActiveSubscriber;e&&(e.off("end",this.onSubscriberEnd),e.disconnect()),this.subscriber&&(this.subscriber.off("end",this.onSubscriberEnd),this.subscriber.disconnect());let t=(0,i.sample)(this.connectionPool.getNodes());if(!t){o("selecting subscriber failed since there is no node discovered in the cluster yet"),this.subscriber=null;return}let{options:s}=t;o("selected a subscriber %s:%s",s.host,s.port);let a="subscriber";this.isSharded&&(a="ssubscriber"),this.subscriber=new n.default({port:s.port,host:s.host,username:s.username,password:s.password,enableReadyCheck:!0,connectionName:(0,r.getConnectionName)(a,s.connectionName),lazyConnect:!0,tls:s.tls,protocol:s.protocol,replyMapping:s.replyMapping,retryStrategy:null}),this.subscriber.on("error",i.noop),this.subscriber.on("moved",()=>{this.emitter.emit("forceRefresh")}),this.subscriber.once("end",this.onSubscriberEnd);let l={subscribe:[],psubscribe:[],ssubscribe:[]};if(e){let t=e.condition||e.prevCondition;t&&t.subscriber&&(l.subscribe=t.subscriber.channels("subscribe"),l.psubscribe=t.subscriber.channels("psubscribe"),l.ssubscribe=t.subscriber.channels("ssubscribe"))}if(l.subscribe.length||l.psubscribe.length||l.ssubscribe.length){let e=0;for(let t of["subscribe","psubscribe","ssubscribe"]){let s=l[t];if(0!=s.length)if(o("%s %d channels",t,s.length),"ssubscribe"===t)for(let r of s)e+=1,this.subscriber[t](r).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{o("failed to ssubscribe to channel: %s",r)});else e+=1,this.subscriber[t](s).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{o("failed to %s %d channels",t,s.length)})}}else this.lastActiveSubscriber=this.subscriber;for(let e of["message","messageBuffer"])this.subscriber.on(e,(t,s)=>{this.emitter.emit(e,t,s)});for(let e of["pmessage","pmessageBuffer"])this.subscriber.on(e,(t,s,r)=>{this.emitter.emit(e,t,s,r)});if(!0==this.isSharded)for(let e of["smessage","smessageBuffer"])this.subscriber.on(e,(t,s)=>{this.emitter.emit(e,t,s)})}}},58432,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(26898),i=e.r(78695),n=e.r(9068),o=e.r(93148),a=(0,r.Debug)("cluster:subscriberGroup");class l{constructor(e,t){this.subscriberGroupEmitter=e,this.options=t,this.shardedSubscribers=new Map,this.clusterSlots=[],this.subscriberToSlotsIndex=new Map,this.channels=new Map,this.failedAttemptsByNode=new Map,this.isResetting=!1,this.pendingReset=null,this.handleSubscriberConnectFailed=(e,t)=>{let s=(this.failedAttemptsByNode.get(t)||0)+1;this.failedAttemptsByNode.set(t,s);let r=Math.min(s,l.MAX_RETRY_ATTEMPTS),i=Math.min(l.BASE_BACKOFF_MS*2**r,l.MAX_BACKOFF_MS),n=Math.floor(.5*i*(Math.random()-.5)),o=Math.max(0,i+n);a("Failed to connect subscriber for %s. Refreshing slots in %dms",t,o),this.subscriberGroupEmitter.emit("subscriberConnectFailed",{delay:o,error:e})},this.handleSubscriberConnectSucceeded=e=>{this.failedAttemptsByNode.delete(e)}}getResponsibleSubscriber(e){let t=this.clusterSlots[e][0],s=this.shardedSubscribers.get(t);return s&&"idle"===s.subscriberStatus&&s.start().then(()=>{this.handleSubscriberConnectSucceeded(s.getNodeKey())}).catch(e=>{this.handleSubscriberConnectFailed(e,s.getNodeKey())}),s}addChannels(e){let t=n(e[0]);for(let s of e)if(n(s)!==t)return -1;let s=this.channels.get(t);return s?this.channels.set(t,s.concat(e)):this.channels.set(t,e),Array.from(this.channels.values()).reduce((e,t)=>e+t.length,0)}removeChannels(e){let t=n(e[0]);for(let s of e)if(n(s)!==t)return -1;let s=this.channels.get(t);if(s){let r=s.filter(t=>!e.includes(t));this.channels.set(t,r)}return Array.from(this.channels.values()).reduce((e,t)=>e+t.length,0)}stop(){for(let e of this.shardedSubscribers.values())e.stop();this.pendingReset=null,this.shardedSubscribers.clear(),this.subscriberToSlotsIndex.clear()}start(){let e=[];for(let t of this.shardedSubscribers.values())this.shouldStartSubscriber(t)&&(e.push(t.start().then(()=>{this.handleSubscriberConnectSucceeded(t.getNodeKey())}).catch(e=>{this.handleSubscriberConnectFailed(e,t.getNodeKey())})),this.subscriberGroupEmitter.emit("+subscriber"));return Promise.all(e)}async reset(e,t){if(this.isResetting){this.pendingReset={slots:e,nodes:t};return}this.isResetting=!0;try{let s=this._refreshSlots(e),r=this.hasUnhealthySubscribers();if(!s&&!r)return void a("No topology change detected or failed subscribers. Skipping reset.");for(let[e,t]of this.shardedSubscribers){if(this.subscriberToSlotsIndex.has(e)&&t.isHealthy()){a("Skipping deleting subscriber for %s",e);continue}a("Removing subscriber for %s",e),t.stop(),this.shardedSubscribers.delete(e),this.subscriberGroupEmitter.emit("-subscriber")}let n=[];for(let[e,s]of this.subscriberToSlotsIndex){let s=this.shardedSubscribers.get(e);if(s&&s.isHealthy()){a("Skipping creating new subscriber for %s",e),!s.isStarted()&&this.shouldStartSubscriber(s)&&n.push(s.start().then(()=>{this.handleSubscriberConnectSucceeded(e)}).catch(t=>{this.handleSubscriberConnectFailed(t,e)}));continue}s&&!s.isHealthy()&&(a("Replacing subscriber for %s",e),s.stop(),this.shardedSubscribers.delete(e),this.subscriberGroupEmitter.emit("-subscriber")),a("Creating new subscriber for %s",e);let r=t.find(t=>(0,i.getNodeKey)(t.options)===e);if(!r){a("Failed to find node for key %s",e);continue}let l=new o.default(this.subscriberGroupEmitter,r.options,this.options.redisOptions);this.shardedSubscribers.set(e,l),this.shouldStartSubscriber(l)&&n.push(l.start().then(()=>{this.handleSubscriberConnectSucceeded(e)}).catch(t=>{this.handleSubscriberConnectFailed(t,e)})),this.subscriberGroupEmitter.emit("+subscriber")}await Promise.all(n),this._resubscribe(),this.subscriberGroupEmitter.emit("subscribersReady")}finally{if(this.isResetting=!1,this.pendingReset){let{slots:e,nodes:t}=this.pendingReset;this.pendingReset=null,await this.reset(e,t)}}}_refreshSlots(e){if(this._slotsAreEqual(e)&&this.subscriberToSlotsIndex.size>0)return a("Nothing to refresh because the new cluster map is equal to the previous one."),!1;a("Refreshing the slots of the subscriber group."),this.subscriberToSlotsIndex=new Map;for(let t=0;t<e.length;t++){let s=e[t][0];this.subscriberToSlotsIndex.has(s)||this.subscriberToSlotsIndex.set(s,[]),this.subscriberToSlotsIndex.get(s).push(Number(t))}return this.clusterSlots=JSON.parse(JSON.stringify(e)),!0}_resubscribe(){this.shardedSubscribers&&this.shardedSubscribers.forEach((e,t)=>{let s=this.subscriberToSlotsIndex.get(t);s&&s.forEach(s=>{let r=e.getInstance(),i=this.channels.get(s);if(i&&i.length>0){if(!r||"end"===r.status)return;"ready"===r.status?r.ssubscribe(...i).catch(e=>{a("Failed to ssubscribe on node %s: %s",t,e)}):r.once("ready",()=>{r.ssubscribe(...i).catch(e=>{a("Failed to ssubscribe on node %s: %s",t,e)})})}})})}_slotsAreEqual(e){return void 0!==this.clusterSlots&&JSON.stringify(this.clusterSlots)===JSON.stringify(e)}hasUnhealthySubscribers(){let e=Array.from(this.shardedSubscribers.values()).some(e=>!e.isHealthy()),t=Array.from(this.subscriberToSlotsIndex.keys()).some(e=>!this.shardedSubscribers.has(e));return e||t}shouldStartSubscriber(e){if(e.isStarted())return!1;if(!e.isLazyConnect())return!0;let t=this.subscriberToSlotsIndex.get(e.getNodeKey());return!!t&&t.some(e=>{let t=this.channels.get(e);return!!(t&&t.length>0)})}}l.MAX_RETRY_ATTEMPTS=10,l.MAX_BACKOFF_MS=2e3,l.BASE_BACKOFF_MS=100,s.default=l},77825,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(27699),i=e.r(26898),n=e.r(78695),o=e.r(66735),a=(0,i.Debug)("cluster:connectionPool");class l extends r.EventEmitter{constructor(e,t=null,s={}){super(),this.redisOptions=e,this.clusterNodeRetryStrategy=t,this.hooks=s,this.nodes={all:{},master:{},slave:{}},this.specifiedOptions={}}getNodes(e="all"){let t=this.nodes[e];return Object.keys(t).map(e=>t[e])}getInstanceByKey(e){return this.nodes.all[e]}getSampleInstance(e){let t=Object.keys(this.nodes[e]),s=(0,i.sample)(t);return this.nodes[e][s]}addMasterNode(e){let t=(0,n.getNodeKey)(e.options),s=this.createRedisFromOptions(e,e.options.readOnly);return!e.options.readOnly&&(this.nodes.all[t]=s,this.nodes.master[t]=s,!0)}createRedisFromOptions(e,t){let s=new o.default((0,i.defaults)({retryStrategy:"function"==typeof this.clusterNodeRetryStrategy?this.clusterNodeRetryStrategy:null,enableOfflineQueue:!0,readOnly:t},e,this.redisOptions,{lazyConnect:!0}));return this.hooks.onCreate?.(s,t),s}findOrCreate(e,t=!1){let s,r=(0,n.getNodeKey)(e);return t=!!t,this.specifiedOptions[r]?Object.assign(e,this.specifiedOptions[r]):this.specifiedOptions[r]=e,this.nodes.all[r]?(s=this.nodes.all[r]).options.readOnly!==t&&(s.options.readOnly=t,a("Change role of %s to %s",r,t?"slave":"master"),s[t?"readonly":"readwrite"]().catch(i.noop),t?(delete this.nodes.master[r],this.nodes.slave[r]=s):(delete this.nodes.slave[r],this.nodes.master[r]=s),this.hooks.onRoleChange?.(s,r,t)):(a("Connecting to %s as %s",r,t?"slave":"master"),s=this.createRedisFromOptions(e,t),this.nodes.all[r]=s,this.nodes[t?"slave":"master"][r]=s,s.once("end",()=>{(!this.nodes.all[r]||this.nodes.all[r]===s)&&(this.removeNode(r),this.emit("-node",s,r),Object.keys(this.nodes.all).length||this.emit("drain"))}),this.emit("+node",s,r),s.on("error",e=>{this.emit("nodeError",e,r)})),s}recreate(e,t=!1){let s=(0,n.getNodeKey)(e),r=this.nodes.all[s];r&&(a("Recreating connection to %s",s),this.removeNode(s),r.disconnect());let i=this.findOrCreate(e,t);return r&&this.emit("-node",r,s),i}reset(e){a("Reset with %O",e);let t={};e.forEach(e=>{let s=(0,n.getNodeKey)(e);e.readOnly&&t[s]||(t[s]=e)}),Object.keys(this.nodes.all).forEach(e=>{t[e]||(a("Disconnect %s because the node does not hold any slot",e),this.nodes.all[e].disconnect(),this.removeNode(e))}),Object.keys(t).forEach(e=>{let s=t[e];this.findOrCreate(s,s.readOnly)})}removeNode(e){let{nodes:t}=this;t.all[e]&&(a("Remove %s from the pool",e),this.hooks.onRemove?.(t.all[e]),delete t.all[e]),delete t.master[e],delete t.slave[e]}}s.default=l},66392,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(26898),i=e.r(89977),n=(0,r.Debug)("delayqueue");s.default=class{constructor(){this.queues={},this.timeouts={}}push(e,t,s){let r=s.callback||process.nextTick;this.queues[e]||(this.queues[e]=new i),this.queues[e].push(t),this.timeouts[e]||(this.timeouts[e]=setTimeout(()=>{r(()=>{this.timeouts[e]=null,this.execute(e)})},s.timeout))}execute(e){let t=this.queues[e];if(!t)return;let{length:s}=t;if(s)for(n("send %d commands in %s queue",s,e),this.queues[e]=null;t.length>0;)t.shift()()}}},93148,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(78695),i=e.r(26898),n=e.r(66735),o=(0,i.Debug)("cluster:subscriberGroup:shardedSubscriber"),a="idle",l="starting",c="connected",u="stopping",h="ended",p={[a]:[l,u,h],[l]:[c,u,h],[c]:[u,h],[u]:[h],[h]:[]};s.default=class{constructor(e,t,s){for(let o of(this.emitter=e,this.status=a,this.instance=null,this.connectPromise=null,this.messageListeners=new Map,this.onEnd=()=>{this.updateStatus(h),this.emitter.emit("-node",this.instance,this.nodeKey)},this.onError=e=>{this.emitter.emit("nodeError",e,this.nodeKey)},this.onMoved=()=>{this.emitter.emit("moved")},this.instance=new n.default((0,i.defaults)({enableReadyCheck:!1,enableOfflineQueue:!0,connectionName:(0,r.getConnectionName)("ssubscriber",t.connectionName),retryStrategy:null,lazyConnect:!0},t,s)),this.lazyConnect=s?.lazyConnect??!0,this.nodeKey=(0,r.getNodeKey)(t),this.instance.on("end",this.onEnd),this.instance.on("error",this.onError),this.instance.on("moved",this.onMoved),["smessage","smessageBuffer"])){let e=(...e)=>{this.emitter.emit(o,...e)};this.messageListeners.set(o,e),this.instance.on(o,e)}}async start(){if(this.connectPromise)return this.connectPromise;if(this.status!==l&&this.status!==c){if(this.status===h||!this.instance)throw Error(`Sharded subscriber ${this.nodeKey} cannot be restarted once ended.`);this.updateStatus(l),this.connectPromise=this.instance.connect();try{await this.connectPromise,this.updateStatus(c)}catch(e){throw this.updateStatus(h),e}finally{this.connectPromise=null}}}stop(){this.updateStatus(u),this.instance&&(this.instance.disconnect(),this.instance.removeAllListeners(),this.messageListeners.clear(),this.instance=null),this.updateStatus(h),o("stopped %s",this.nodeKey)}isStarted(){return[c,l].includes(this.status)}get subscriberStatus(){return this.status}isHealthy(){return(this.status===a||this.status===c||this.status===l)&&null!==this.instance}getInstance(){return this.instance}getNodeKey(){return this.nodeKey}isLazyConnect(){return this.lazyConnect}updateStatus(e){if(this.status!==e){if(!p[this.status].includes(e))return void o("Invalid status transition for %s: %s -> %s",this.nodeKey,this.status,e);this.status=e}}}},83252,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(12522),i=e.r(27699),n=e.r(63227),o=e.r(19335),a=e.r(30846),l=e.r(17798),c=e.r(66735),u=e.r(12749),h=e.r(3422),p=e.r(26898),d=e.r(57674),y=e.r(67061),f=e.r(23086),m=e.r(55925),g=e.r(77825),S=e.r(66392),b=e.r(78695),k=e.r(89977),_=e.r(58432),E=e.r(57355),A=(0,p.Debug)("cluster"),v=new WeakSet;class w extends y.default{constructor(e,t={}){super(),this.slots=[],this._groupsIds={},this._groupsBySlot=Array(16384),this.isCluster=!0,this.retryAttempts=0,this.delayQueue=new S.default,this.offlineQueue=new k,this.isRefreshing=!1,this._refreshSlotsCacheCallbacks=[],this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this._readyDelayedCallbacks=[],this.connectionEpoch=0,i.EventEmitter.call(this),this.startupNodes=e,this.options=(0,p.defaults)({},t,f.DEFAULT_CLUSTER_OPTIONS,this.options),this.options.himportFieldsets=(0,E.cloneHimportFieldsets)(this.options.himportFieldsets);let s=this.options.himportFieldsets?.length?new E.default(this.options.himportFieldsets):void 0;if(s&&(0,E.bindHimportCoordinator)(this,s,"cluster"),this.options.shardedSubscribers&&this.createShardedSubscriberGroup(),this.options.redisOptions&&this.options.redisOptions.keyPrefix&&!this.options.keyPrefix&&(this.options.keyPrefix=this.options.redisOptions.keyPrefix),"function"!=typeof this.options.scaleReads&&-1===["all","master","slave"].indexOf(this.options.scaleReads))throw Error('Invalid option scaleReads "'+this.options.scaleReads+'". Expected "all", "master", "slave" or a custom function');let r={...this.options.redisOptions??{}};delete r.himportFieldsets,this.connectionPool=new g.default(r,this.options.clusterNodeRetryStrategy,s?{onCreate:(e,t)=>{(0,E.bindHimportCoordinator)(e,s,t?"replica":"master")},onRoleChange:(e,t,r)=>{(0,E.setHimportRole)(e,r?"replica":"master"),s.invalidate(e),r||(0,b.waitForRedisReady)(e).then(()=>{for(let r of s.getDefinitions()){let i=s.ensurePrepared(e,r);i?.catch(e=>{this.emit("node error",e,t)})}},e=>{this.emit("node error",e,t)})},onRemove:e=>{(0,E.unbindHimportCoordinator)(e)}}:void 0),this.connectionPool.on("-node",(e,t)=>{this.emit("-node",e)}),this.connectionPool.on("+node",e=>{this.emit("+node",e)}),this.connectionPool.on("drain",()=>{this.setStatus("close")}),this.connectionPool.on("nodeError",(e,t)=>{this.emit("node error",e,t)}),this.subscriber=new m.default(this.connectionPool,this),this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(e=>{A("connecting failed: %s",e)})}connect(){return new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(Error("Redis is already connecting/connected"));let s=++this.connectionEpoch;this.setStatus("connecting"),this.resolveStartupNodeHostnames().then(r=>{let i;if(this.connectionEpoch!==s){A("discard connecting after resolving startup nodes because epoch not match: %d != %d",s,this.connectionEpoch),t(new n.RedisError("Connection is discarded because a new connection is made"));return}if("connecting"!==this.status){A("discard connecting after resolving startup nodes because the status changed to %s",this.status),t(new n.RedisError("Connection is aborted"));return}this.connectionPool.reset(r),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(e=>{A("Error while starting subscribers: %s",e)});let o=()=>{this.setStatus("ready"),this.retryAttempts=0,this.executeOfflineCommands(),this.resetNodesRefreshInterval(),e()},a=()=>{this.invokeReadyDelayedCallbacks(void 0),this.removeListener("close",i),this.manuallyClosing=!1,this.setStatus("connect"),this.options.enableReadyCheck?this.readyCheck((e,t)=>{e||t?(A("Ready check failed (%s). Reconnecting...",e||t),"connect"===this.status&&this.disconnect(!0)):o()}):o()};i=()=>{let e=Error("None of startup nodes is available");this.removeListener("refresh",a),this.invokeReadyDelayedCallbacks(e),t(e)},this.once("refresh",a),this.once("close",i),this.once("close",this.handleCloseEvent.bind(this)),this.refreshSlotsCache(e=>{e&&e.message===l.default.defaultMessage&&(c.default.prototype.silentEmit.call(this,"error",e),this.connectionPool.reset([]))}),this.subscriber.start(),this.options.shardedSubscribers&&this.shardedSubscribers.start().catch(e=>{A("Error while starting subscribers: %s",e)})}).catch(e=>{this.setStatus("close"),this.handleCloseEvent(e),this.invokeReadyDelayedCallbacks(e),t(e)})})}disconnect(e=!1){let t=this.status;this.setStatus("disconnecting"),e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null,A("Canceled reconnecting attempts")),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t?(this.setStatus("close"),this.handleCloseEvent()):this.connectionPool.reset([])}quit(e){let t=this.status;if(this.setStatus("disconnecting"),this.manuallyClosing=!0,this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t){let t=(0,o.default)(Promise.resolve("OK"),e);return setImmediate((function(){this.setStatus("close"),this.handleCloseEvent()}).bind(this)),t}return(0,o.default)(Promise.all(this.nodes().map(e=>e.quit().catch(e=>{if(e.message===p.CONNECTION_CLOSED_ERROR_MSG)return"OK";throw e}))).then(()=>"OK"),e)}duplicate(e=[],t){let s=e.length>0?e:this.startupNodes.slice(0),r=Object.assign({},this.options,t);return this.options.redisOptions&&t?.redisOptions&&(r.redisOptions=Object.assign({},this.options.redisOptions,t.redisOptions)),new w(s,r)}nodes(e="all"){if("all"!==e&&"master"!==e&&"slave"!==e)throw Error('Invalid role "'+e+'". Expected "all", "master" or "slave"');return this.connectionPool.getNodes(e)}delayUntilReady(e){this._readyDelayedCallbacks.push(e)}get autoPipelineQueueSize(){let e=0;for(let t of this._autoPipelines.values())e+=t.length;return e}refreshSlotsCache(e){if(e&&this._refreshSlotsCacheCallbacks.push(e),this.isRefreshing)return;this.isRefreshing=!0;let t=this,s=e=>{for(let t of(this.isRefreshing=!1,this._refreshSlotsCacheCallbacks))t(e);this._refreshSlotsCacheCallbacks=[]},r=(0,p.shuffle)(this.connectionPool.getNodes()),i=null;!function e(n){if(n===r.length)return s(new l.default(l.default.defaultMessage,i));let o=r[n],a=`${o.options.host}:${o.options.port}`;A("getting slot cache from %s",a),t.getInfoFromNode(o,function(r){switch(t.status){case"close":case"end":return s(Error("Cluster is disconnected."));case"disconnecting":return s(Error("Cluster is disconnecting."))}r?(t.emit("node error",r,a),i=r,e(n+1)):(t.emit("refresh"),s())})}(0)}sendCommand(e,t,s){if("wait"===this.status&&this.connect().catch(p.noop),"end"===this.status)return e.reject(Error(p.CONNECTION_CLOSED_ERROR_MSG)),e.promise;if(!t&&!s&&"ready"===this.status&&(0,E.isHimportControlCommand)(e)&&(0,E.interceptHimportControlCommand)(this.connectionPool.getNodes("master"),e))return e.promise;let i=this.options.scaleReads;"master"!==i&&(e.isReadOnly||(0,r.exists)(e.name)&&(0,r.hasFlag)(e.name,"readonly")||(i="master"));let o=s?s.slot:e.getSlot(),l={},c=this,u=null;if(!s&&!v.has(e)){v.add(e);let t=e.reject;e.reject=function(s){let r=h.bind(null,!0);c.handleError(s,l,{moved:function(t,s){A("command %s is moved to %s",e.name,s),o=Number(t),c.slots[t]?c.slots[t][0]=s:c.slots[t]=[s],c._groupsBySlot[t]=c._groupsIds[c.slots[t].join(";")];let r=c.natMapper(s),i=(0,b.getNodeKey)(r);u&&(0,b.getNodeKey)(u.options)===i&&c.connectionPool.getInstanceByKey(i)===u?(A("MOVED redirect points back at %s; recreating its connection",i),c.connectionPool.recreate(r)):c.connectionPool.findOrCreate(r),h(),A("refreshing slot caches... (triggered by MOVED error)"),c.refreshSlotsCache()},ask:function(t,s){A("command %s is required to ask %s:%s",e.name,s);let r=c.natMapper(s);c.connectionPool.findOrCreate(r),h(!1,`${r.host}:${r.port}`)},tryagain:r,clusterDown:r,connectionClosed:r,maxRedirections:function(s){t.call(e,s)},defaults:function(){t.call(e,s)}})}}function h(r,l){let h;if("end"===c.status)return void e.reject(new n.AbortError("Cluster is ended."));if("ready"===c.status||"cluster"===e.name){if(s&&s.redis)h=s.redis;else if(a.default.checkFlag("ENTER_SUBSCRIBER_MODE",e.name)||a.default.checkFlag("EXIT_SUBSCRIBER_MODE",e.name)){if(c.options.shardedSubscribers&&("ssubscribe"==e.name||"sunsubscribe"==e.name)){let t=c.shardedSubscribers.getResponsibleSubscriber(o);if(!t)return void e.reject(new n.AbortError(`No sharded subscriber for slot: ${o}`));let s=-1;"ssubscribe"==e.name&&(s=c.shardedSubscribers.addChannels(e.getKeys())),"sunsubscribe"==e.name&&(s=c.shardedSubscribers.removeChannels(e.getKeys())),-1!==s?h=t.getInstance():e.reject(new n.AbortError("Possible CROSSSLOT error: All channels must hash to the same slot"))}else h=c.subscriber.getInstance();if(!h)return void e.reject(new n.AbortError("No subscriber for the cluster"))}else{if(!r){if("number"==typeof o&&c.slots[o]){let t=c.slots[o];if("function"==typeof i){let s=t.map(function(e){return c.connectionPool.getInstanceByKey(e)});Array.isArray(h=i(s,e))&&(h=(0,p.sample)(h)),h||(h=s[0])}else{let e;e="all"===i?(0,p.sample)(t):"slave"===i&&t.length>1?(0,p.sample)(t,1):t[0],h=c.connectionPool.getInstanceByKey(e)}}l&&(h=c.connectionPool.getInstanceByKey(l))}if(h||(h=("function"==typeof i?null:c.connectionPool.getSampleInstance(i))||c.connectionPool.getSampleInstance("all")),h&&!c.options.enableOfflineQueue&&"ready"!==h.status&&"wait"!==h.status)return void e.reject(Error(p.CONNECTION_CLOSED_ERROR_MSG))}s&&!s.redis&&(s.redis=h)}if(!h&&c.options.enableOfflineQueue)return void c.offlineQueue.push({command:e,stream:t,node:s});if(!h)return void e.reject(Error("Cluster isn't ready and enableOfflineQueue options is false"));if(u=h,l){let s=(0,E.getHimportBinding)(h);if(t||s?.role!=="master"?void 0:s.coordinator.classify(e))return void(0,b.waitForRedisReady)(h).then(()=>{if(!e.isSettled)return s.coordinator.prepareCommand(h,e)??Promise.resolve()}).then(()=>{e.isSettled||(s.coordinator.allowNextSend(h,e),h.asking(),h.sendCommand(e,t))},t=>{e.isSettled||e.reject(t)});h.asking()}h.sendCommand(e,t)}return h(),e.promise}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}handleError(e,t,s){if(void 0===t.value?t.value=this.options.maxRedirections:t.value-=1,t.value<=0)return void s.maxRedirections(Error("Too many Cluster redirections. Last error: "+e));let r=e.message.split(" ");if("MOVED"===r[0]){let e=Number(r[1]);if(!Number.isInteger(e)||e<0||e>=16384)return void s.defaults();let t=this.options.retryDelayOnMoved;t&&"number"==typeof t?this.delayQueue.push("moved",s.moved.bind(null,e,r[2]),{timeout:t}):s.moved(e,r[2])}else"ASK"===r[0]?s.ask(r[1],r[2]):"TRYAGAIN"===r[0]?this.delayQueue.push("tryagain",s.tryagain,{timeout:this.options.retryDelayOnTryAgain}):"CLUSTERDOWN"===r[0]&&this.options.retryDelayOnClusterDown>0?this.delayQueue.push("clusterdown",s.connectionClosed,{timeout:this.options.retryDelayOnClusterDown,callback:this.refreshSlotsCache.bind(this)}):e.message===p.CONNECTION_CLOSED_ERROR_MSG&&this.options.retryDelayOnFailover>0&&"ready"===this.status?this.delayQueue.push("failover",s.connectionClosed,{timeout:this.options.retryDelayOnFailover,callback:this.refreshSlotsCache.bind(this)}):s.defaults()}resetOfflineQueue(){this.offlineQueue=new k}clearNodesRefreshInterval(){this.slotsTimer&&(clearTimeout(this.slotsTimer),this.slotsTimer=null)}resetNodesRefreshInterval(){if(this.slotsTimer||!this.options.slotsRefreshInterval)return;let e=()=>{this.slotsTimer=setTimeout(()=>{A('refreshing slot caches... (triggered by "slotsRefreshInterval" option)'),this.refreshSlotsCache(()=>{e()})},this.options.slotsRefreshInterval)};e()}setStatus(e){A("status: %s -> %s",this.status||"[empty]",e),this.status=e,process.nextTick(()=>{this.emit(e)})}handleCloseEvent(e){let t;e&&A("closed because %s",e),this.manuallyClosing||"function"!=typeof this.options.clusterRetryStrategy||(t=this.options.clusterRetryStrategy.call(this,++this.retryAttempts,e)),"number"==typeof t?(this.setStatus("reconnecting"),this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,A("Cluster is disconnected. Retrying after %dms",t),this.connect().catch(function(e){A("Got error %s when reconnecting. Ignoring...",e)})},t)):(this.options.shardedSubscribers&&this.subscriberGroupEmitter?.removeAllListeners(),this.setStatus("end"),this.flushQueue(Error("None of startup nodes is available")))}flushQueue(e){let t;for(;t=this.offlineQueue.shift();)t.command.reject(e)}executeOfflineCommands(){if(this.offlineQueue.length){let e;A("send %d commands in offline queue",this.offlineQueue.length);let t=this.offlineQueue;for(this.resetOfflineQueue();e=t.shift();)this.sendCommand(e.command,e.stream,e.node)}}natMapper(e){let t="string"==typeof e?e:`${e.host}:${e.port}`,s=null;return(this.options.natMap&&"function"==typeof this.options.natMap?s=this.options.natMap(t):this.options.natMap&&"object"==typeof this.options.natMap&&(s=this.options.natMap[t]),s)?(A("NAT mapping %s -> %O",t,s),Object.assign({},s)):"string"==typeof e?(0,b.nodeKeyToRedisOptions)(e):e}getInfoFromNode(e,t){if(!e)return t(Error("Node is disconnected"));let s=e.duplicate({enableOfflineQueue:!0,enableReadyCheck:!1,retryStrategy:null,protocol:2,replyMapping:"legacy",connectionName:(0,b.getConnectionName)("refresher",this.options.redisOptions&&this.options.redisOptions.connectionName)});s.on("error",p.noop),s.cluster("SLOTS",(0,p.timeout)((e,r)=>{if(s.disconnect(),e)return A("error encountered running CLUSTER.SLOTS: %s",e),t(e);if("disconnecting"===this.status||"close"===this.status||"end"===this.status){A("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s",r.length,this.status),t();return}let i=[];A("cluster slots result count: %d",r.length);for(let e=0;e<r.length;++e){let t=r[e],s=t[0],n=t[1],o=[];for(let e=2;e<t.length;e++){if(!t[e][0])continue;let s=this.natMapper({host:t[e][0],port:t[e][1]});s.readOnly=2!==e,i.push(s),o.push(s.host+":"+s.port)}A("cluster slots result [%d]: slots %d~%d served by %s",e,s,n,o);for(let e=s;e<=n;e++)this.slots[e]=o}this._groupsIds=Object.create(null);let n=0;for(let e=0;e<16384;e++){let t=(this.slots[e]||[]).join(";");if(!t.length){this._groupsBySlot[e]=void 0;continue}this._groupsIds[t]||(this._groupsIds[t]=++n),this._groupsBySlot[e]=this._groupsIds[t]}this.connectionPool.reset(i),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(e=>{A("Error while starting subscribers: %s",e)}),t()},this.options.slotsRefreshTimeout))}invokeReadyDelayedCallbacks(e){for(let t of this._readyDelayedCallbacks)process.nextTick(t,e);this._readyDelayedCallbacks=[]}readyCheck(e){this.cluster("INFO",(t,s)=>{let r;if(t)return e(t);if("string"!=typeof s)return e();let i=s.split("\r\n");for(let e=0;e<i.length;++e){let t=i[e].split(":");if("cluster_state"===t[0]){r=t[1];break}}"fail"===r?(A("cluster state not ok (%s)",r),e(null,r)):e()})}resolveSrv(e){return new Promise((t,s)=>{this.options.resolveSrv(e,(e,r)=>{if(e)return s(e);let i=this,n=(0,b.groupSrvRecords)(r),o=Object.keys(n).sort((e,t)=>parseInt(e)-parseInt(t));!function e(r){if(!o.length)return s(r);let a=n[o[0]],l=(0,b.weightSrvRecords)(a);a.records.length||o.shift(),i.dnsLookup(l.name).then(e=>t({host:e,port:l.port}),e)}()})})}dnsLookup(e){return new Promise((t,s)=>{this.options.dnsLookup(e,(r,i)=>{r?(A("failed to resolve hostname %s to IP: %s",e,r.message),s(r)):(A("resolved hostname %s to IP %s",e,i),t(i))})})}async resolveStartupNodeHostnames(){if(!Array.isArray(this.startupNodes)||0===this.startupNodes.length)throw Error("`startupNodes` should contain at least one node.");let e=(0,b.normalizeNodeOptions)(this.startupNodes),t=(0,b.getUniqueHostnamesFromOptions)(e);if(0===t.length)return e;let s=await Promise.all(t.map((this.options.useSRVRecords?this.resolveSrv:this.dnsLookup).bind(this))),r=(0,p.zipMap)(t,s);return e.map(e=>{let t=r.get(e.host);return t?this.options.useSRVRecords?Object.assign({},e,t):Object.assign({},e,{host:t}):e})}createScanStream(e,{key:t,options:s={}}){return new u.default({objectMode:!0,key:t,redis:this,command:e,...s})}createShardedSubscriberGroup(){this.subscriberGroupEmitter=new i.EventEmitter,this.shardedSubscribers=new _.default(this.subscriberGroupEmitter,this.options);let e=e=>{e instanceof l.default&&this.disconnect(!0)};for(let t of(this.subscriberGroupEmitter.on("-node",(t,s)=>{this.emit("-node",t,s),this.refreshSlotsCache(e)}),this.subscriberGroupEmitter.on("subscriberConnectFailed",({delay:t,error:s})=>{this.emit("error",s),setTimeout(()=>{this.refreshSlotsCache(e)},t)}),this.subscriberGroupEmitter.on("moved",()=>{this.refreshSlotsCache(e)}),this.subscriberGroupEmitter.on("-subscriber",()=>{this.emit("-subscriber")}),this.subscriberGroupEmitter.on("+subscriber",()=>{this.emit("+subscriber")}),this.subscriberGroupEmitter.on("nodeError",(e,t)=>{this.emit("nodeError",e,t)}),this.subscriberGroupEmitter.on("subscribersReady",()=>{this.emit("subscribersReady")}),["smessage","smessageBuffer"]))this.subscriberGroupEmitter.on(t,(e,s,r)=>{this.emit(t,e,s,r)})}}(0,d.default)(w,i.EventEmitter),(0,h.addTransactionSupport)(w.prototype),s.default=w},78695,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.getConnectionName=s.weightSrvRecords=s.groupSrvRecords=s.getUniqueHostnamesFromOptions=s.normalizeNodeOptions=s.nodeKeyToRedisOptions=s.getNodeKey=s.waitForRedisReady=void 0;let r=e.r(26898),i=e.r(4446);s.waitForRedisReady=function(e){return"ready"===e.status?Promise.resolve():"wait"===e.status?e.connect():"end"===e.status?Promise.reject(Error(r.CONNECTION_CLOSED_ERROR_MSG)):new Promise((t,s)=>{let i=()=>{e.removeListener("end",n),t()},n=()=>{e.removeListener("ready",i),s(Error(r.CONNECTION_CLOSED_ERROR_MSG))};e.once("ready",i),e.once("end",n)})},s.getNodeKey=function(e){return e.port=e.port||6379,e.host=e.host||"127.0.0.1",e.host+":"+e.port},s.nodeKeyToRedisOptions=function(e){let t=e.lastIndexOf(":");if(-1===t)throw Error(`Invalid node key ${e}`);return{host:e.slice(0,t),port:Number(e.slice(t+1))}},s.normalizeNodeOptions=function(e){return e.map(e=>{let t={};if("object"==typeof e)Object.assign(t,e);else if("string"==typeof e)Object.assign(t,(0,r.parseURL)(e));else if("number"==typeof e)t.port=e;else throw Error("Invalid argument "+e);return"string"==typeof t.port&&(t.port=parseInt(t.port,10)),delete t.db,t.port||(t.port=6379),t.host||(t.host="127.0.0.1"),(0,r.resolveTLSProfile)(t)})},s.getUniqueHostnamesFromOptions=function(e){let t={};return e.forEach(e=>{t[e.host]=!0}),Object.keys(t).filter(e=>!(0,i.isIP)(e))},s.groupSrvRecords=function(e){let t={};for(let s of e)t.hasOwnProperty(s.priority)?(t[s.priority].totalWeight+=s.weight,t[s.priority].records.push(s)):t[s.priority]={totalWeight:s.weight,records:[s]};return t},s.weightSrvRecords=function(e){if(1===e.records.length)return e.totalWeight=0,e.records.shift();let t=Math.floor(Math.random()*(e.totalWeight+e.records.length)),s=0;for(let[r,i]of e.records.entries())if((s+=1+i.weight)>t)return e.totalWeight-=i.weight,e.records.splice(r,1),i},s.getConnectionName=function(e,t){let s=`ioredis-cluster(${e})`;return t?`${s}:${t}`:s}},58451,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=(0,e.r(26898).Debug)("AbstractConnector");s.default=class{constructor(e){this.connecting=!1,this.disconnectTimeout=e}check(e){return!0}disconnect(){if(this.connecting=!1,this.stream){let e=this.stream,t=setTimeout(()=>{r("stream %s:%s still open, destroying it",e.remoteAddress,e.remotePort),e.destroy()},this.disconnectTimeout);e.on("close",()=>clearTimeout(t)),e.end()}}}},87575,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.FailoverDetector=void 0;let r=(0,e.r(26898).Debug)("FailoverDetector"),i="+switch-master";s.FailoverDetector=class{constructor(e,t){this.isDisconnected=!1,this.connector=e,this.sentinels=t}cleanup(){for(let e of(this.isDisconnected=!0,this.sentinels))e.client.disconnect()}async subscribe(){r("Starting FailoverDetector");let e=[];for(let t of this.sentinels){let s=t.client.subscribe(i).catch(e=>{r("Failed to subscribe to failover messages on sentinel %s:%s (%s)",t.address.host||"127.0.0.1",t.address.port||26739,e.message)});e.push(s),t.client.on("message",e=>{this.isDisconnected||e!==i||this.disconnect()})}await Promise.all(e)}disconnect(){this.isDisconnected=!0,r("Failover detected, disconnecting"),this.connector.disconnect()}}},85649,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.default=class{constructor(e){this.cursor=0,this.sentinels=e.slice(0)}next(){let e=this.cursor>=this.sentinels.length;return{done:e,value:e?void 0:this.sentinels[this.cursor++]}}reset(e){e&&this.sentinels.length>1&&1!==this.cursor&&this.sentinels.unshift(...this.sentinels.splice(this.cursor-1)),this.cursor=0}add(e){for(let s=0;s<this.sentinels.length;s++){var t;if(t=this.sentinels[s],(e.host||"127.0.0.1")===(t.host||"127.0.0.1")&&(e.port||26379)===(t.port||26379))return!1}return this.sentinels.push(e),!0}toString(){return`${JSON.stringify(this.sentinels)} @${this.cursor}`}}},77420,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SentinelIterator=void 0;let r=e.r(4446),i=e.r(26898),n=e.r(55004),o=e.r(85649);s.SentinelIterator=o.default;let a=e.r(58451),l=e.r(66735),c=e.r(87575),u=(0,i.Debug)("SentinelConnector");class h extends a.default{constructor(e){if(super(e.disconnectTimeout),this.options=e,this.emitter=null,this.failoverDetector=null,!this.options.sentinels.length)throw Error("Requires at least one sentinel to connect to.");if(!this.options.name)throw Error("Requires the name of master.");this.sentinelIterator=new o.default(this.options.sentinels)}check(e){let t=!e.role||this.options.role===e.role;return t||(u("role invalid, expected %s, but got %s",this.options.role,e.role),this.sentinelIterator.next(),this.sentinelIterator.next(),this.sentinelIterator.reset(!0)),t}disconnect(){super.disconnect(),this.failoverDetector&&this.failoverDetector.cleanup()}connect(e){let t;this.connecting=!0,this.retryAttempts=0;let s=async()=>{let o=this.sentinelIterator.next();if(o.done){this.sentinelIterator.reset(!1);let r="function"==typeof this.options.sentinelRetryStrategy?this.options.sentinelRetryStrategy(++this.retryAttempts):null,i="number"!=typeof r?"All sentinels are unreachable and retry is disabled.":`All sentinels are unreachable. Retrying from scratch after ${r}ms.`;t&&(i+=` Last error: ${t.message}`),u(i);let n=Error(i);if("number"==typeof r)return e("error",n),await new Promise(e=>setTimeout(e,r)),s();throw n}let a=null,l=null;try{a=await this.resolve(o.value)}catch(e){l=e}if(!this.connecting)throw Error(i.CONNECTION_CLOSED_ERROR_MSG);let c=o.value.host+":"+o.value.port;if(a)return u("resolved: %s:%s from sentinel %s",a.host,a.port,c),this.options.enableTLSForSentinelMode&&this.options.tls?(Object.assign(a,this.options.tls),this.stream=(0,n.connect)(a),this.stream.once("secureConnect",this.initFailoverDetector.bind(this))):(this.stream=(0,r.createConnection)(a),this.stream.once("connect",this.initFailoverDetector.bind(this))),this.stream.once("error",e=>{this.firstError=e}),this.stream;{let r=l?"failed to connect to sentinel "+c+" because "+l.message:"connected to sentinel "+c+" successfully, but got an invalid reply: "+a;return u(r),e("sentinelError",Error(r)),l&&(t=l),s()}};return s()}async updateSentinels(e){if(!this.options.updateSentinels)return;let t=await e.sentinel("sentinels",this.options.name);Array.isArray(t)&&(t.map(i.packObject).forEach(e=>{if(-1===(e.flags?e.flags.split(","):[]).indexOf("disconnected")&&e.ip&&e.port){let t=this.sentinelNatResolve(p(e));this.sentinelIterator.add(t)&&u("adding sentinel %s:%s",t.host,t.port)}}),u("Updated internal sentinels: %s",this.sentinelIterator))}async resolveMaster(e){let t=await e.sentinel("get-master-addr-by-name",this.options.name);return await this.updateSentinels(e),this.sentinelNatResolve(Array.isArray(t)?{host:t[0],port:Number(t[1])}:null)}async resolveSlave(e){let t=await e.sentinel("slaves",this.options.name);if(!Array.isArray(t))return null;let s=t.map(i.packObject).filter(e=>e.flags&&!e.flags.match(/(disconnected|s_down|o_down)/));return this.sentinelNatResolve(function(e,t){let s;if(0===e.length)return null;if("function"==typeof t)s=t(e);else if(null!==t&&"object"==typeof t){let r=Array.isArray(t)?[...t]:[t];r.sort((e,t)=>{let s=e.prio??1,r=t.prio??1;return s<r?-1:+(s>r)});for(let t=0;t<r.length;t++){for(let i=0;i<e.length;i++){let n=e[i];if(n.ip===r[t].ip&&n.port===r[t].port){s=n;break}}if(s)break}}return s||(s=(0,i.sample)(e)),p(s)}(s,this.options.preferredSlaves))}sentinelNatResolve(e){if(!e||!this.options.natMap)return e;let t=`${e.host}:${e.port}`,s=e;return"function"==typeof this.options.natMap?s=this.options.natMap(t)||e:"object"==typeof this.options.natMap&&(s=this.options.natMap[t]||e),s}connectToSentinel(e,t){return new l.default({port:e.port||26379,host:e.host,username:this.options.sentinelUsername||null,password:this.options.sentinelPassword||null,family:e.family||("path"in this.options&&this.options.path?void 0:this.options.family),tls:this.options.sentinelTLS,retryStrategy:null,enableReadyCheck:!1,protocol:this.options.protocol,replyMapping:"legacy",connectTimeout:this.options.connectTimeout,commandTimeout:this.options.sentinelCommandTimeout,...t})}async resolve(e){let t=this.connectToSentinel(e);t.on("error",d);try{if("slave"===this.options.role)return await this.resolveSlave(t);return await this.resolveMaster(t)}finally{t.disconnect()}}async initFailoverDetector(){if(!this.options.failoverDetector)return;this.sentinelIterator.reset(!0);let e=[];for(;e.length<this.options.sentinelMaxConnections;){let{done:t,value:s}=this.sentinelIterator.next();if(t)break;let r=this.connectToSentinel(s,{lazyConnect:!0,retryStrategy:this.options.sentinelReconnectStrategy,protocol:this.options.protocol,replyMapping:"legacy"});r.on("reconnecting",()=>{this.emitter?.emit("sentinelReconnecting")}),e.push({address:s,client:r})}this.sentinelIterator.reset(!1),this.failoverDetector&&this.failoverDetector.cleanup(),this.failoverDetector=new c.FailoverDetector(this,e),await this.failoverDetector.subscribe(),this.emitter?.emit("failoverSubscribed")}}function p(e){return{host:e.ip,port:Number(e.port)}}function d(){}s.default=h},90851,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(4446),i=e.r(55004),n=e.r(26898),o=e.r(58451);class a extends o.default{constructor(e){super(e.disconnectTimeout),this.options=e}connect(e){let t,{options:s}=this;return this.connecting=!0,"path"in s&&s.path?t={path:s.path}:(t={},"port"in s&&null!=s.port&&(t.port=s.port),"host"in s&&null!=s.host&&(t.host=s.host),"family"in s&&null!=s.family&&(t.family=s.family)),s.tls&&Object.assign(t,s.tls),new Promise((e,o)=>{process.nextTick(()=>{if(!this.connecting)return void o(Error(n.CONNECTION_CLOSED_ERROR_MSG));try{s.tls?this.stream=(0,i.connect)(t):this.stream=(0,r.createConnection)(t)}catch(e){o(e);return}this.stream.once("error",e=>{this.firstError=e}),e(this.stream)})})}}s.default=a},18652,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SentinelConnector=s.StandaloneConnector=void 0,s.StandaloneConnector=e.r(90851).default,s.SentinelConnector=e.r(77420).default},86961,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=`-----BEGIN CERTIFICATE-----
|
|
1
|
+
module.exports=[15958,e=>{"use strict";let t=(e={})=>({type:"string",...e}),s=(e={})=>({type:"url",...e}),r=(e={})=>({type:"path",...e}),i=(e={})=>({type:"integer",...e}),n=Object.freeze({CONTROL_API_URL:s({default:"https://localhost:4000",purpose:"Default Magnus Control API target."}),CONTROL_API_CA_PATH:r({optional:!0,purpose:"Private CA bundle used for verified Control API TLS."}),CONTROL_API_MAX_RESPONSE_BYTES:i({default:1048576,minimum:1024,purpose:"Maximum accepted Control API response size in bytes."}),DASHBOARD_PROXY_BODY_LIMIT_BYTES:i({default:1048576,minimum:1,purpose:"Maximum forwarded request body size in bytes, enforced while streaming."}),API_SECRET:t({required:!0,sensitive:!0,purpose:"Server-side secret injected into Control API proxy requests."}),CONTROL_NODE_CREDENTIAL_KEY:t({required:!0,sensitive:!0,minimumLength:32,purpose:"Dedicated key for encrypted control-node credentials at rest."}),SESSION_SECRET:t({required:!0,sensitive:!0,purpose:"Dedicated dashboard session signing secret."}),SESSION_ISSUER:t({default:"magnus-dashboard",purpose:"Required issuer claim for dashboard session tokens."}),SESSION_AUDIENCE:t({default:"magnus-dashboard-session",purpose:"Required audience claim for dashboard session tokens."}),HERMES_SSH_AUTHORIZATIONS_FILE:r({default:".magnus/hermes-ssh-authorizations.json",requirement:"Required (default path shown)",purpose:"Reviewed installation, node, address, and SSH host-key bindings."}),DASHBOARD_PUBLIC_ORIGIN:s({required:!0,purpose:"Canonical browser origin allowed to open the Hermes WebSocket bridge."}),HERMES_WEBSOCKET_ALLOWED_ORIGINS:t({optional:!0,purpose:"Comma-separated additional allowed Hermes WebSocket origins."}),DASHBOARD_ADMIN_USERNAME:t({optional:!0,requirement:"Required with DASHBOARD_ADMIN_PASSWORD_HASH; deployment may serialize it",purpose:"Dedicated dashboard administrator identity."}),DASHBOARD_ADMIN_USERNAME_B64:t({optional:!0,sensitive:!0,purpose:"Serializer-managed base64 form of the dashboard administrator identity."}),DASHBOARD_ADMIN_PASSWORD_HASH:t({optional:!0,requirement:"Required with DASHBOARD_ADMIN_USERNAME unless DASHBOARD_ADMIN_PASSWORD is set; Argon2id only",sensitive:!0,purpose:"Non-reusable Argon2id dashboard administrator password verifier."}),DASHBOARD_ADMIN_PASSWORD:t({optional:!0,sensitive:!0,requirement:"Optional; takes precedence over DASHBOARD_ADMIN_PASSWORD_HASH when set with DASHBOARD_ADMIN_USERNAME",purpose:"Plaintext dashboard administrator password. Prefer the Argon2id hash; a set value silently wins over it."}),DASHBOARD_ADMIN_PASSWORD_B64:t({optional:!0,sensitive:!0,purpose:"Serializer-managed base64 form of DASHBOARD_ADMIN_PASSWORD (same precedence)."}),LOCAL_SESSION_GENERATION:t({optional:!0,sensitive:!0,purpose:"Any value; changing it signs out every local console session (as changing the administrator credential does)."}),DASHBOARD_ADMIN_PASSWORD_HASH_B64:t({optional:!0,sensitive:!0,purpose:"Serializer-managed base64 form of the Argon2id verifier."}),DASHBOARD_ADMIN_CREDENTIAL_METADATA_B64:t({optional:!0,sensitive:!0,purpose:"Versioned non-secret credential purpose, rotation, fleet-password, and fingerprint-separation evidence."}),DASHBOARD_TRUSTED_PROXIES:t({optional:!0,purpose:"Comma-separated reverse-proxy addresses or CIDR ranges whose X-Forwarded-For names the client for login throttling and audit. Unset: the socket peer."}),REDIS_URL:s({default:"redis://127.0.0.1:6379",sensitive:!0,purpose:"Durable dashboard authentication throttling and concurrency store."}),REDIS_PREFIX:t({default:"magnus-",purpose:"Namespace prefix for durable Redis authentication limiter keys."}),AUTH_RATE_LIMIT_LABEL_KEY:t({optional:!0,sensitive:!0,purpose:"Optional dedicated HMAC key for de-identifying authentication limiter labels."}),DASHBOARD_SSH_USERNAME:t({optional:!0,requirement:"Required for the terminal and Hermes proxy",purpose:"Dedicated, unprivileged dashboard proxy account on managed nodes."}),DASHBOARD_SSH_PASSWORD:t({optional:!0,sensitive:!0,purpose:"Optional dedicated dashboard SSH password; restricted keys are preferred."}),SSH_HOST_KEY_PINNING:t({default:"enforce",purpose:"Terminal SSH host-key pinning: enforce refuses a host whose key differs from the pinned one; warn only logs the mismatch and connects anyway (never use warn in production). Any other value means enforce."}),SSH_HOST_KEYS_FILE:r({default:"terminal-audit/known-hosts.json",purpose:"Pinned terminal SSH host keys (trust on first use), relative to the working directory."}),TERMINAL_AUDIT_DIR:r({default:"terminal-audit",purpose:"Directory of the terminal host-key trust audit log, relative to the working directory."}),DASHBOARD_DEPENDENCY_TIMEOUT_MS:i({default:8e3,minimum:1,purpose:"Timeout of console requests to the Control API and the Emberpath admin plane, in milliseconds."}),MAGNUS_CONTROL_NODES_CONFIG_DIR:r({optional:!0,purpose:"Test-only override of the control-node registry directory; honoured only with NODE_ENV=test (otherwise .magnus/ in the working directory)."}),DASHBOARD_SSH_PRIVATE_KEY_PATH:r({optional:!0,requirement:"Required for the terminal and Hermes proxy (or DASHBOARD_SSH_PASSWORD)",purpose:"Restricted dashboard-proxy private key with no deployment privileges."}),NEXT_PUBLIC_API_URL:s({default:"https://localhost:4000",public:!0,purpose:"Legacy build-time Control API URL; must never contain a secret."}),HIVE_OAUTH_DISCOVERY_URL:s({optional:!0,purpose:"Hive OAuth discovery URL for optional named dashboard login; HTTPS required."}),HIVE_OAUTH_CLIENT_ID:t({optional:!0,purpose:"Registered Magnus dashboard OAuth client ID."}),HIVE_OAUTH_CLIENT_SECRET:t({optional:!0,sensitive:!0,purpose:"OAuth client secret, kept server-side. Required when the client is registered as confidential; leave unset for a public PKCE client."}),HIVE_OAUTH_ISSUER:s({optional:!0,purpose:"Exact trusted Hive access-token issuer."}),HIVE_OAUTH_API_AUDIENCE:t({optional:!0,purpose:"Exact access-token audience accepted by the Control API."}),HIVE_OAUTH_SCOPE:t({default:"openid profile email",purpose:"Registered named-user OAuth scopes."}),HIVE_ROUTER_ADMIN_URL:s({optional:!0,purpose:"Deprecated: admin plane of an Emberpath (formerly Hive Router) release that still bundles an admin UI; enables the embedded router dashboard proxy."}),HIVE_ROUTER_CA_PATH:r({optional:!0,purpose:"Optional private CA bundle for hostname-verified TLS to HIVE_ROUTER_ADMIN_URL."}),MAGNUS_SECURITY_CONSOLE_URL:s({optional:!0,purpose:"Optional external security console; enables the Security pages and nav entry."}),MAGNUS_HERMES_ENABLED:t({default:"false",enum:["true","false"],purpose:"Enables the optional Hermes Agent pages, dashboard proxy and WebSocket bridge."}),PORT:i({default:3e3,minimum:1,purpose:"Listen port for magnus-ui start."}),HOST:t({default:"0.0.0.0",purpose:"Listen address for magnus-ui start."}),TLS_CERT_PATH:r({optional:!0,requirement:"Required unless MAGNUS_UI_ALLOW_HTTP=true",purpose:"PEM certificate served by magnus-ui start."}),TLS_KEY_PATH:r({optional:!0,requirement:"Required unless MAGNUS_UI_ALLOW_HTTP=true",purpose:"PEM private key for TLS_CERT_PATH."}),MAGNUS_UI_DATA_DIR:r({optional:!0,purpose:"Working directory for runtime state (.magnus/, terminal-audit/); magnus-ui start defaults it to the current directory."}),UI_SECURITY_LOG_PATH:r({default:".magnus/security-events.jsonl",purpose:"Append-only authentication audit log; login fails closed when it cannot be written."}),MAGNUS_UI_ALLOW_HTTP:t({default:"false",enum:["true","false"],purpose:"Serve plain HTTP when no TLS certificate is configured (local development or behind a TLS proxy only)."})});function o(e,t){throw Error(`${e} ${t}`)}e.s(["f",0,function(e,t=process.env){let s=n[e];s||o(e,"is not declared in the dashboard environment schema");let r=t[e]?.trim()||s.default;if(null==r||""===r){s.required&&o(e,"is required");return}if(s.enum&&!s.enum.includes(String(r))&&o(e,`must be one of: ${s.enum.join(", ")}`),"integer"===s.type){let t=Number(r);return(!Number.isSafeInteger(t)||t<(s.minimum??Number.MIN_SAFE_INTEGER))&&o(e,`must be an integer of at least ${s.minimum}`),t}if("url"===s.type)try{return new URL(String(r)).toString().replace(/\/$/,"")}catch{o(e,"must be an absolute URL")}return"path"===s.type&&String(r).includes("\0")&&o(e,"must not contain NUL bytes"),"string"===s.type&&s.minimumLength&&String(r).length<s.minimumLength&&o(e,`must contain at least ${s.minimumLength} characters`),String(r)}])},54213,e=>{"use strict";var t=e.i(15958);let s=(0,t.f)("SESSION_ISSUER"),r=(0,t.f)("SESSION_AUDIENCE");e.s(["B",0,"magnus_session","m",0,r,"E",0,86400,"W",0,s,"_",0,function(){let e=process.env.SESSION_SECRET;if(!e)throw Error(process.env.JWT_SECRET?"SESSION_SECRET is required; the JWT_SECRET session fallback was removed after it expired on 2026-10-01.":"SESSION_SECRET is required.");return new TextEncoder().encode(e)},"n",0,function(){let e=!!process.env.SESSION_SECRET;return{configured:e,source:e?"dedicated":"missing"}},"c",0,function(){return{algorithms:["HS256"],issuer:s,audience:r}}])},66990,(e,t,s)=>{t.exports=JSON.parse('{"acl":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"cat":{"arity":-2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"deluser":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"dryrun":{"arity":-4,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"genpass":{"arity":-2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"getuser":{"arity":3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"list":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"load":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"log":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"save":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"setuser":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"users":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"whoami":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0}}},"append":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arcount":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"ardel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"ardelrange":{"arity":-4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"arget":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"argetrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"argrep":{"arity":-6,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arinfo":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arinsert":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arlastitems":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"armget":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"armset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"arnext":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"arop":{"arity":-5,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arring":{"arity":-4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"arscan":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"arseek":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"arset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"asking":{"arity":1,"flags":["fast"],"keyStart":0,"keyStop":0,"step":0},"auth":{"arity":-2,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"backup":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"abort":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"cleanup":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"list":{"arity":2,"flags":["admin","stale"],"keyStart":0,"keyStop":0,"step":0},"seal":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"start":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"status":{"arity":2,"flags":["admin","stale"],"keyStart":0,"keyStop":0,"step":0}}},"bgrewriteaof":{"arity":1,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bgsave":{"arity":-1,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bitcount":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"bitfield":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"bitfield_ro":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"bitop":{"arity":-4,"flags":["write","denyoom"],"keyStart":2,"keyStop":-1,"step":1},"bitpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"blmove":{"arity":6,"flags":["write","denyoom","blocking"],"keyStart":1,"keyStop":2,"step":1},"blmovem":{"arity":-6,"flags":["write","denyoom","blocking"],"keyStart":1,"keyStop":2,"step":1},"blmpop":{"arity":-5,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"blpop":{"arity":-3,"flags":["write","blocking"],"keyStart":1,"keyStop":-2,"step":1},"brpop":{"arity":-3,"flags":["write","blocking"],"keyStart":1,"keyStop":-2,"step":1},"brpoplpush":{"arity":4,"flags":["write","denyoom","blocking"],"keyStart":1,"keyStop":2,"step":1},"bzmpop":{"arity":-5,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"bzpopmax":{"arity":-3,"flags":["write","blocking","fast"],"keyStart":1,"keyStop":-2,"step":1},"bzpopmin":{"arity":-3,"flags":["write","blocking","fast"],"keyStart":1,"keyStop":-2,"step":1},"client":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"caching":{"arity":3,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"getname":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"getredir":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"id":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"info":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"kill":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"list":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"no-evict":{"arity":3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"no-touch":{"arity":3,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"pause":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"reply":{"arity":3,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"setinfo":{"arity":4,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"setname":{"arity":3,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"tracking":{"arity":-3,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"trackinginfo":{"arity":2,"flags":["noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"unblock":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"unpause":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0}}},"cluster":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"addslots":{"arity":-3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"addslotsrange":{"arity":-4,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"bumpepoch":{"arity":2,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"count-failure-reports":{"arity":3,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"countkeysinslot":{"arity":3,"flags":["stale"],"keyStart":0,"keyStop":0,"step":0},"delslots":{"arity":-3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"delslotsrange":{"arity":-4,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"failover":{"arity":-2,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"flushslots":{"arity":2,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"forget":{"arity":3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"getkeysinslot":{"arity":4,"flags":["stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"info":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"keyslot":{"arity":3,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"links":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"meet":{"arity":-4,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"migration":{"arity":-4,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"myid":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"myshardid":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"nodes":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"replicas":{"arity":3,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"replicate":{"arity":3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"reset":{"arity":-2,"flags":["admin","noscript","stale"],"keyStart":0,"keyStop":0,"step":0},"saveconfig":{"arity":2,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"set-config-epoch":{"arity":3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"setslot":{"arity":-4,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"shards":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"slaves":{"arity":3,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"slot-stats":{"arity":-4,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","step":0},"slots":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"syncslots":{"arity":-3,"flags":["admin","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0}}},"command":{"arity":-1,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"count":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"docs":{"arity":-2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"getkeys":{"arity":-3,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"getkeysandflags":{"arity":-3,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"info":{"arity":-2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"list":{"arity":-2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0}}},"config":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"get":{"arity":-3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"resetstat":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"rewrite":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"set":{"arity":-4,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0}}},"copy":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"dbsize":{"arity":1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"agg_sum","step":0},"debug":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"decr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"decrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"del":{"arity":-2,"flags":["write"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","responsePolicy":"agg_sum","step":1},"delex":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"digest":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"discard":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"dump":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"echo":{"arity":2,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"eval":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"eval_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"evalsha":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"evalsha_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"exec":{"arity":1,"flags":["noscript","loading","stale","skip_slowlog"],"keyStart":0,"keyStop":0,"step":0},"exists":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","responsePolicy":"agg_sum","step":1},"expire":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"expireat":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"expiretime":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"failover":{"arity":-1,"flags":["admin","noscript","stale"],"keyStart":0,"keyStop":0,"step":0},"fcall":{"arity":-3,"flags":["noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"fcall_ro":{"arity":-3,"flags":["readonly","noscript","stale","skip_monitor","no_mandatory_keys","movablekeys","script_runner"],"keyStart":0,"keyStop":0,"step":0},"flushall":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"flushdb":{"arity":-1,"flags":["write"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"function":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"delete":{"arity":3,"flags":["write","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"dump":{"arity":2,"flags":["noscript"],"keyStart":0,"keyStop":0,"step":0},"flush":{"arity":-2,"flags":["write","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"kill":{"arity":2,"flags":["noscript","allow_busy"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"one_succeeded","step":0},"list":{"arity":-2,"flags":["noscript"],"keyStart":0,"keyStop":0,"step":0},"load":{"arity":-3,"flags":["write","denyoom","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"restore":{"arity":-3,"flags":["write","denyoom","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"stats":{"arity":2,"flags":["noscript","allow_busy"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0}}},"geoadd":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"geodist":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geohash":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geopos":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadius":{"arity":-6,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadius_ro":{"arity":-6,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember":{"arity":-5,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"georadiusbymember_ro":{"arity":-5,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearch":{"arity":-7,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"geosearchstore":{"arity":-8,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"get":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getbit":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"getdel":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getex":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"getrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"getset":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hello":{"arity":-1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"hexists":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpire":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpireat":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hexpiretime":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hget":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hgetall":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hgetdel":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hgetex":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"himport":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"discard":{"arity":3,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","step":0},"discardall":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","step":0},"prepare":{"arity":-4,"flags":["denyoom"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","step":0},"set":{"arity":-5,"flags":["write","denyoom"],"keyStart":2,"keyStop":2,"step":1}}},"hincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hincrbyfloat":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hkeys":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmget":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hmset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hotkeys":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"get":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"special","responsePolicy":"special","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"reset":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"special","step":0},"start":{"arity":-2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"special","step":0},"stop":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"special","step":0}}},"hpersist":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpire":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpireat":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"hpexpiretime":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hpttl":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hrandfield":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"hset":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hsetex":{"arity":-6,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hsetnx":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"hstrlen":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"httl":{"arity":-5,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"hvals":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"incr":{"arity":2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrby":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"incrbyfloat":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"increx":{"arity":-2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"info":{"arity":-1,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0},"keys":{"arity":2,"flags":["readonly"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","step":0},"lastsave":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"latency":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"doctor":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"special","step":0},"graph":{"arity":3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"special","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"histogram":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"special","step":0},"history":{"arity":3,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"special","step":0},"latest":{"arity":2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"special","step":0},"reset":{"arity":-2,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"agg_sum","step":0}}},"lcs":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":2,"step":1},"lindex":{"arity":3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"linsert":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"llen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"lmove":{"arity":5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"lmovem":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"lmpop":{"arity":-4,"flags":["write","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"lolwut":{"arity":-1,"flags":["readonly","fast"],"keyStart":0,"keyStop":0,"step":0},"lpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"lpos":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"lrange":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"lrem":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"lset":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"ltrim":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"memory":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"doctor":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"malloc-stats":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0},"purge":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"stats":{"arity":2,"flags":[],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0},"usage":{"arity":-3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1}}},"mget":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","step":1},"migrate":{"arity":-6,"flags":["write","movablekeys"],"keyStart":3,"keyStop":3,"step":1},"module":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"list":{"arity":2,"flags":["admin","noscript"],"keyStart":0,"keyStop":0,"step":0},"load":{"arity":-3,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"loadex":{"arity":-3,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"unload":{"arity":3,"flags":["admin","noscript","no_async_loading"],"keyStart":0,"keyStop":0,"step":0}}},"monitor":{"arity":1,"flags":["admin","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"move":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"mset":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","responsePolicy":"all_succeeded","step":2},"msetex":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":0,"keyStop":0,"requestPolicy":"multi_shard","responsePolicy":"all_succeeded","step":0},"msetnx":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":2},"multi":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"object":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"encoding":{"arity":3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1},"freq":{"arity":3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"idletime":{"arity":3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1},"refcount":{"arity":3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1}}},"persist":{"arity":2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpire":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpireat":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"pexpiretime":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"pfadd":{"arity":-2,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"pfcount":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"pfdebug":{"arity":3,"flags":["write","denyoom","admin"],"keyStart":2,"keyStop":2,"step":1},"pfmerge":{"arity":-2,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"pfselftest":{"arity":1,"flags":["admin"],"keyStart":0,"keyStop":0,"step":0},"ping":{"arity":-1,"flags":["fast"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"all_succeeded","step":0},"psetex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"psubscribe":{"arity":-2,"flags":["denyoom","pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"psync":{"arity":-3,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"pttl":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"publish":{"arity":3,"flags":["pubsub","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"pubsub":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"channels":{"arity":-2,"flags":["pubsub","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"numpat":{"arity":2,"flags":["pubsub","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"numsub":{"arity":-2,"flags":["pubsub","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"shardchannels":{"arity":-2,"flags":["pubsub","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"shardnumsub":{"arity":-2,"flags":["pubsub","loading","stale"],"keyStart":0,"keyStop":0,"step":0}}},"punsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"quit":{"arity":-1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"randomkey":{"arity":1,"flags":["readonly"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"special","step":0},"readonly":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"readwrite":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"rename":{"arity":3,"flags":["write"],"keyStart":1,"keyStop":2,"step":1},"renamenx":{"arity":3,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"replconf":{"arity":-1,"flags":["admin","noscript","loading","stale","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"replicaof":{"arity":3,"flags":["admin","noscript","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"reset":{"arity":1,"flags":["noscript","loading","stale","fast","no_auth","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"restore":{"arity":-4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"restore-asking":{"arity":-4,"flags":["write","denyoom","asking"],"keyStart":1,"keyStop":1,"step":1},"role":{"arity":1,"flags":["noscript","loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"rpop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"rpoplpush":{"arity":3,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"rpush":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"rpushx":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"sadd":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"save":{"arity":1,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"scan":{"arity":-2,"flags":["readonly"],"keyStart":0,"keyStop":0,"requestPolicy":"special","responsePolicy":"special","step":0},"scard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"script":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"debug":{"arity":3,"flags":["noscript"],"keyStart":0,"keyStop":0,"step":0},"exists":{"arity":-3,"flags":["noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"agg_logical_and","step":0},"flush":{"arity":-2,"flags":["noscript"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"kill":{"arity":2,"flags":["noscript","allow_busy"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"one_succeeded","step":0},"load":{"arity":3,"flags":["noscript","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0}}},"sdiff":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sdiffcard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"sdiffstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"select":{"arity":2,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"set":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setbit":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setex":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"setnx":{"arity":3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"setrange":{"arity":4,"flags":["write","denyoom"],"keyStart":1,"keyStop":1,"step":1},"shutdown":{"arity":-1,"flags":["admin","noscript","loading","stale","no_multi","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"sinter":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sintercard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"sinterstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"sismember":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"slaveof":{"arity":3,"flags":["admin","noscript","stale","no_async_loading"],"keyStart":0,"keyStop":0,"step":0},"slowlog":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"get":{"arity":-2,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","step":0},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"len":{"arity":2,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"agg_sum","step":0},"reset":{"arity":2,"flags":["admin","loading","stale"],"keyStart":0,"keyStop":0,"requestPolicy":"all_nodes","responsePolicy":"all_succeeded","step":0}}},"smembers":{"arity":2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"smismember":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"smove":{"arity":4,"flags":["write","fast"],"keyStart":1,"keyStop":2,"step":1},"sort":{"arity":-2,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"sort_ro":{"arity":-2,"flags":["readonly","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"spop":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"spublish":{"arity":3,"flags":["pubsub","loading","stale","fast"],"keyStart":1,"keyStop":1,"step":1},"srandmember":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"srem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"sscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"ssubscribe":{"arity":-2,"flags":["denyoom","pubsub","noscript","loading","stale"],"keyStart":1,"keyStop":-1,"step":1},"strlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"subscribe":{"arity":-2,"flags":["denyoom","pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"substr":{"arity":4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"sunion":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":-1,"step":1},"sunioncard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"sunionstore":{"arity":-3,"flags":["write","denyoom"],"keyStart":1,"keyStop":-1,"step":1},"sunsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":1,"keyStop":-1,"step":1},"swapdb":{"arity":3,"flags":["write","fast"],"keyStart":0,"keyStop":0,"step":0},"sync":{"arity":1,"flags":["admin","noscript","no_async_loading","no_multi"],"keyStart":0,"keyStop":0,"step":0},"time":{"arity":1,"flags":["loading","stale","fast"],"keyStart":0,"keyStop":0,"step":0},"touch":{"arity":-2,"flags":["readonly","fast"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","responsePolicy":"agg_sum","step":1},"trimslots":{"arity":-5,"flags":["write"],"keyStart":0,"keyStop":0,"step":0},"ttl":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"type":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"unlink":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":-1,"requestPolicy":"multi_shard","responsePolicy":"agg_sum","step":1},"unsubscribe":{"arity":-1,"flags":["pubsub","noscript","loading","stale"],"keyStart":0,"keyStop":0,"step":0},"unwatch":{"arity":1,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":0,"keyStop":0,"step":0},"vadd":{"arity":-5,"flags":["write","denyoom","module"],"keyStart":1,"keyStop":1,"step":1},"vcard":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vdim":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vemb":{"arity":-3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vgetattr":{"arity":3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vinfo":{"arity":2,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vismember":{"arity":3,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vlinks":{"arity":-3,"flags":["readonly","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vrandmember":{"arity":-2,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vrange":{"arity":-4,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"vrem":{"arity":3,"flags":["write","module"],"keyStart":1,"keyStop":1,"step":1},"vsetattr":{"arity":4,"flags":["write","module","fast"],"keyStart":1,"keyStop":1,"step":1},"vsim":{"arity":-4,"flags":["readonly","module"],"keyStart":1,"keyStop":1,"step":1},"wait":{"arity":3,"flags":["blocking"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"agg_min","step":0},"waitaof":{"arity":4,"flags":["blocking"],"keyStart":0,"keyStop":0,"requestPolicy":"all_shards","responsePolicy":"agg_min","step":0},"watch":{"arity":-2,"flags":["noscript","loading","stale","fast","allow_busy"],"keyStart":1,"keyStop":-1,"step":1},"xack":{"arity":-4,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xackdel":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xadd":{"arity":-5,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xautoclaim":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xcfgset":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xclaim":{"arity":-6,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xdel":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xdelex":{"arity":-5,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xgroup":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"create":{"arity":-5,"flags":["write","denyoom"],"keyStart":2,"keyStop":2,"step":1},"createconsumer":{"arity":5,"flags":["write","denyoom"],"keyStart":2,"keyStop":2,"step":1},"delconsumer":{"arity":5,"flags":["write"],"keyStart":2,"keyStop":2,"step":1},"destroy":{"arity":4,"flags":["write"],"keyStart":2,"keyStop":2,"step":1},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"setid":{"arity":-5,"flags":["write"],"keyStart":2,"keyStop":2,"step":1}}},"xidmprecord":{"arity":5,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xinfo":{"arity":-2,"flags":[],"keyStart":0,"keyStop":0,"step":0,"subcommands":{"consumers":{"arity":4,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1},"groups":{"arity":3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1},"help":{"arity":2,"flags":["loading","stale"],"keyStart":0,"keyStop":0,"step":0},"stream":{"arity":-3,"flags":["readonly"],"keyStart":2,"keyStop":2,"step":1}}},"xlen":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"xnack":{"arity":-7,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"xpending":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xread":{"arity":-4,"flags":["readonly","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xreadgroup":{"arity":-7,"flags":["write","blocking","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"xrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"xsetid":{"arity":-3,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"xtrim":{"arity":-4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zadd":{"arity":-4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zcard":{"arity":2,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zdiff":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zdiffstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zincrby":{"arity":4,"flags":["write","denyoom","fast"],"keyStart":1,"keyStop":1,"step":1},"zinter":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zintercard":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zinterstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1},"zlexcount":{"arity":4,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zmpop":{"arity":-4,"flags":["write","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zmscore":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmax":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zpopmin":{"arity":-2,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zrandmember":{"arity":-2,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrangestore":{"arity":-5,"flags":["write","denyoom"],"keyStart":1,"keyStop":2,"step":1},"zrank":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zrem":{"arity":-3,"flags":["write","fast"],"keyStart":1,"keyStop":1,"step":1},"zremrangebylex":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyrank":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zremrangebyscore":{"arity":4,"flags":["write"],"keyStart":1,"keyStop":1,"step":1},"zrevrange":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebylex":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrangebyscore":{"arity":-4,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zrevrank":{"arity":-3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zscan":{"arity":-3,"flags":["readonly"],"keyStart":1,"keyStop":1,"step":1},"zscore":{"arity":3,"flags":["readonly","fast"],"keyStart":1,"keyStop":1,"step":1},"zunion":{"arity":-3,"flags":["readonly","movablekeys"],"keyStart":0,"keyStop":0,"step":0},"zunionstore":{"arity":-4,"flags":["write","denyoom","movablekeys"],"keyStart":1,"keyStop":1,"step":1}}')},12522,(e,t,s)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(s,"__esModule",{value:!0}),s.getKeyIndexes=s.hasFlag=s.exists=s.list=void 0;let i=r(e.r(66990)).default;s.list=Object.keys(i);let n={};function o(e){"string"!=typeof e&&(e=String(e));let t=e.indexOf("->");return -1===t?e.length:t}s.list.forEach(e=>{n[e]=i[e].flags.reduce(function(e,t){return e[t]=!0,e},{})}),s.exists=function(e,t){return!!i[e=(null==t?void 0:t.caseInsensitive)?String(e).toLowerCase():e]},s.hasFlag=function(e,t,s){if(!n[e=(null==s?void 0:s.nameCaseInsensitive)?String(e).toLowerCase():e])throw Error("Unknown command "+e);return!!n[e][t]},s.getKeyIndexes=function(e,t,s){let r=i[e=(null==s?void 0:s.nameCaseInsensitive)?String(e).toLowerCase():e];if(!r)throw Error("Unknown command "+e);if(!Array.isArray(t))throw Error("Expect args to be an array");let n=r;for(let e=0;e<t.length&&n.subcommands;e++){let s=n.subcommands[String(t[e]).toLowerCase()];if(!s)break;n=s}let a=[],l=!!(s&&s.parseExternalKey),c=(e,t)=>{let s=[],r=Number(e[t]);for(let e=0;e<r;e++)s.push(e+t+1);return s},u=(e,t,s)=>{for(let r=t;r<e.length-1;r+=1)if(String(e[r]).toLowerCase()===s.toLowerCase())return r+1;return null};switch(e){case"zunionstore":case"zinterstore":case"zdiffstore":a.push(0,...c(t,1));break;case"eval":case"evalsha":case"eval_ro":case"evalsha_ro":case"fcall":case"fcall_ro":case"blmpop":case"bzmpop":a.push(...c(t,1));break;case"sdiffcard":case"sintercard":case"sunioncard":case"lmpop":case"zunion":case"zinter":case"zmpop":case"zintercard":case"zdiff":a.push(...c(t,0));break;case"msetex":{let e=Number(t[0]);for(let t=0;t<e;t++)a.push(1+2*t);break}case"georadius":{a.push(0);let e=u(t,5,"STORE");e&&a.push(e);let s=u(t,5,"STOREDIST");s&&a.push(s);break}case"georadiusbymember":{a.push(0);let e=u(t,4,"STORE");e&&a.push(e);let s=u(t,4,"STOREDIST");s&&a.push(s);break}case"sort":case"sort_ro":a.push(0);for(let e=1;e<t.length-1;e++){let s=t[e];if("string"!=typeof s)continue;let r=s.toUpperCase();"GET"===r?(e+=1,"#"!==(s=t[e])&&(l?a.push([e,o(s)]):a.push(e))):"BY"===r?(e+=1,l?a.push([e,o(t[e])]):a.push(e)):"STORE"===r&&(e+=1,a.push(e))}break;case"migrate":if(""===t[2])for(let e=5;e<t.length-1;e++){let s=t[e];if("string"==typeof s&&"KEYS"===s.toUpperCase()){for(let s=e+1;s<t.length;s++)a.push(s);break}}else a.push(2);break;case"xreadgroup":case"xread":for(let s=3*("xread"!==e);s<t.length-1;s++)if("STREAMS"===String(t[s]).toUpperCase()){for(let e=s+1;e<=s+(t.length-1-s)/2;e++)a.push(e);break}break;default:if(n.step>0){let e=n.keyStart-1,s=n.keyStop>0?n.keyStop:t.length+n.keyStop+1;for(let t=e;t<s;t+=n.step)a.push(t)}}return a}},9068,(e,t,s)=>{var r=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],i=function(e){for(var t,s=0,r=0,i=[],n=e.length;s<n;s++)(t=e.charCodeAt(s))<128?i[r++]=t:(t<2048?i[r++]=t>>6|192:((64512&t)==55296&&s+1<e.length&&(64512&e.charCodeAt(s+1))==56320?(t=65536+((1023&t)<<10)+(1023&e.charCodeAt(++s)),i[r++]=t>>18|240,i[r++]=t>>12&63|128):i[r++]=t>>12|224,i[r++]=t>>6&63|128),i[r++]=63&t|128);return i},n=t.exports=function(e){for(var t,s=0,n=-1,o=0,a=0,l="string"==typeof e?i(e):e,c=l.length;s<c;){if(t=l[s++],-1===n)123===t&&(n=s);else if(125!==t)a=r[(t^a>>8)&255]^a<<8;else if(s-1!==n)return 16383&a;o=r[(t^o>>8)&255]^o<<8}return 16383&o};t.exports.generateMulti=function(e){for(var t=1,s=e.length,r=n(e[0]);t<s;)if(n(e[t++])!==r)return -1;return r}},28452,(e,t,s)=>{let r;s.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let s="color: "+this.color;e.splice(1,0,s,"color: inherit");let r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))}),e.splice(i,0,s)},s.save=function(e){try{e?s.storage.setItem("debug",e):s.storage.removeItem("debug")}catch(e){}},s.load=function(){let e;try{e=s.storage.getItem("debug")||s.storage.getItem("DEBUG")}catch(e){}return!e&&"u">typeof process&&"env"in process&&(e=process.env.DEBUG),e},s.useColors=function(){let e;return!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},s.storage=function(){try{return localStorage}catch(e){}}(),r=!1,s.destroy=()=>{r||(r=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))},s.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],s.log=console.debug||console.log||(()=>{}),t.exports=e.r(16525)(s);let{formatters:i}=t.exports;i.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},16525,(e,t,s)=>{t.exports=function(t){function s(e){let t,i,n,o=null;function a(...e){if(!a.enabled)return;let r=Number(new Date);a.diff=r-(t||r),a.prev=t,a.curr=r,t=r,e[0]=s.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,r)=>{if("%%"===t)return"%";i++;let n=s.formatters[r];if("function"==typeof n){let s=e[i];t=n.call(a,s),e.splice(i,1),i--}return t}),s.formatArgs.call(a,e),(a.log||s.log).apply(a,e)}return a.namespace=e,a.useColors=s.useColors(),a.color=s.selectColor(e),a.extend=r,a.destroy=s.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(i!==s.namespaces&&(i=s.namespaces,n=s.enabled(e)),n),set:e=>{o=e}}),"function"==typeof s.init&&s.init(a),a}function r(e,t){let r=s(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function i(e,t){let s=0,r=0,i=-1,n=0;for(;s<e.length;)if(r<t.length&&(t[r]===e[s]||"*"===t[r]))"*"===t[r]?(i=r,n=s):s++,r++;else{if(-1===i)return!1;r=i+1,s=++n}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}return s.debug=s,s.default=s,s.coerce=function(e){return e instanceof Error?e.stack||e.message:e},s.disable=function(){let e=[...s.names,...s.skips.map(e=>"-"+e)].join(",");return s.enable(""),e},s.enable=function(e){for(let t of(s.save(e),s.namespaces=e,s.names=[],s.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===t[0]?s.skips.push(t.slice(1)):s.names.push(t)},s.enabled=function(e){for(let t of s.skips)if(i(e,t))return!1;for(let t of s.names)if(i(e,t))return!0;return!1},s.humanize=e.r(41528),s.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(t).forEach(e=>{s[e]=t[e]}),s.names=[],s.skips=[],s.formatters={},s.selectColor=function(e){let t=0;for(let s=0;s<e.length;s++)t=(t<<5)-t+e.charCodeAt(s)|0;return s.colors[Math.abs(t)%s.colors.length]},s.enable(s.load()),s}},17293,(e,t,s)=>{"u"<typeof process||"renderer"===process.type||process.__nwjs?t.exports=e.r(28452):t.exports=e.r(23440)},23440,(e,t,s)=>{let r=e.r(70722),i=e.r(24361);s.init=function(e){e.inspectOpts={};let t=Object.keys(s.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=s.inspectOpts[t[r]]},s.log=function(...e){return process.stderr.write(i.formatWithOptions(s.inspectOpts,...e)+"\n")},s.formatArgs=function(e){let{namespace:r,useColors:i}=this;if(i){let s=this.color,i="\x1b[3"+(s<8?s:"8;5;"+s),n=` ${i};1m${r} \x1b[0m`;e[0]=n+e[0].split("\n").join("\n"+n),e.push(i+"m+"+t.exports.humanize(this.diff)+"\x1b[0m")}else e[0]=(s.inspectOpts.hideDate?"":new Date().toISOString()+" ")+r+" "+e[0]},s.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},s.load=function(){return process.env.DEBUG},s.useColors=function(){return"colors"in s.inspectOpts?!!s.inspectOpts.colors:r.isatty(process.stderr.fd)},s.destroy=i.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),s.colors=[6,2,3,4,5,1];try{let t=e.r(81042);t&&(t.stderr||t).level>=2&&(s.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}s.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let s=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[s]=r,e},{}),t.exports=e.r(16525)(s);let{formatters:n}=t.exports;n.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},n.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},89977,(e,t,s)=>{"use strict";function r(e,t){var t=t||{};this._capacity=t.capacity,this._head=0,this._tail=0,Array.isArray(e)?this._fromArray(e):(this._capacityMask=3,this._list=[,,,,])}r.prototype.peekAt=function(e){var t=e;if(t===(0|t)){var s=this.size();if(!(t>=s)&&!(t<-s))return t<0&&(t+=s),t=this._head+t&this._capacityMask,this._list[t]}},r.prototype.get=function(e){return this.peekAt(e)},r.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},r.prototype.peekFront=function(){return this.peek()},r.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(r.prototype,"length",{get:function(){return this.size()}}),r.prototype.size=function(){return this._head===this._tail?0:this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},r.prototype.unshift=function(e){if(0==arguments.length)return this.size();var t=this._list.length;return(this._head=this._head-1+t&this._capacityMask,this._list[this._head]=e,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.pop(),this._head<this._tail)?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},r.prototype.shift=function(){var e=this._head;if(e!==this._tail){var t=this._list[e];return this._list[e]=void 0,this._head=e+1&this._capacityMask,e<2&&this._tail>1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),t}},r.prototype.push=function(e){if(0==arguments.length)return this.size();var t=this._tail;return(this._list[t]=e,this._tail=t+1&this._capacityMask,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.shift(),this._head<this._tail)?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},r.prototype.pop=function(){var e=this._tail;if(e!==this._head){var t=this._list.length;this._tail=e-1+t&this._capacityMask;var s=this._list[this._tail];return this._list[this._tail]=void 0,this._head<2&&e>1e4&&e<=t>>>2&&this._shrinkArray(),s}},r.prototype.removeOne=function(e){var t,s=e;if(s===(0|s)&&this._head!==this._tail){var r=this.size(),i=this._list.length;if(!(s>=r)&&!(s<-r)){s<0&&(s+=r),s=this._head+s&this._capacityMask;var n=this._list[s];if(e<r/2){for(t=e;t>0;t--)this._list[s]=this._list[s=s-1+i&this._capacityMask];this._list[s]=void 0,this._head=this._head+1+i&this._capacityMask}else{for(t=r-1-e;t>0;t--)this._list[s]=this._list[s=s+1+i&this._capacityMask];this._list[s]=void 0,this._tail=this._tail-1+i&this._capacityMask}return n}}},r.prototype.remove=function(e,t){var s,r,i=e,n=t;if(i===(0|i)&&this._head!==this._tail){var o=this.size(),a=this._list.length;if(!(i>=o)&&!(i<-o)&&!(t<1)){if(i<0&&(i+=o),1===t||!t)return(s=[,])[0]=this.removeOne(i),s;if(0===i&&i+t>=o)return s=this.toArray(),this.clear(),s;for(i+t>o&&(t=o-i),s=Array(t),r=0;r<t;r++)s[r]=this._list[this._head+i+r&this._capacityMask];if(i=this._head+i&this._capacityMask,e+t===o){for(this._tail=this._tail-t+a&this._capacityMask,r=t;r>0;r--)this._list[i=i+1+a&this._capacityMask]=void 0;return s}if(0===e){for(this._head=this._head+t+a&this._capacityMask,r=t-1;r>0;r--)this._list[i=i+1+a&this._capacityMask]=void 0;return s}if(i<o/2){for(this._head=this._head+e+t+a&this._capacityMask,r=e;r>0;r--)this.unshift(this._list[i=i-1+a&this._capacityMask]);for(i=this._head-1+a&this._capacityMask;n>0;)this._list[i=i-1+a&this._capacityMask]=void 0,n--;e<0&&(this._tail=i)}else{for(this._tail=i,i=i+t+a&this._capacityMask,r=o-(t+e);r>0;r--)this.push(this._list[i++]);for(i=this._tail;n>0;)this._list[i=i+1+a&this._capacityMask]=void 0,n--}return this._head<2&&this._tail>1e4&&this._tail<=a>>>2&&this._shrinkArray(),s}}},r.prototype.splice=function(e,t){var s=e;if(s===(0|s)){var r=this.size();if(s<0&&(s+=r),!(s>r))if(!(arguments.length>2))return this.remove(s,t);else{var i,n,o,a=arguments.length,l=this._list.length,c=2;if(!r||s<r/2){for(n=Array(s),i=0;i<s;i++)n[i]=this._list[this._head+i&this._capacityMask];for(0===t?(o=[],s>0&&(this._head=this._head+s+l&this._capacityMask)):(o=this.remove(s,t),this._head=this._head+s+l&this._capacityMask);a>c;)this.unshift(arguments[--a]);for(i=s;i>0;i--)this.unshift(n[i-1])}else{var u=(n=Array(r-(s+t))).length;for(i=0;i<u;i++)n[i]=this._list[this._head+s+t+i&this._capacityMask];for(0===t?(o=[],s!=r&&(this._tail=this._head+s+l&this._capacityMask)):(o=this.remove(s,t),this._tail=this._tail-u+l&this._capacityMask);c<a;)this.push(arguments[c++]);for(i=0;i<u;i++)this.push(n[i])}return o}}},r.prototype.clear=function(){this._list=Array(this._list.length),this._head=0,this._tail=0},r.prototype.isEmpty=function(){return this._head===this._tail},r.prototype.toArray=function(){return this._copyArray(!1)},r.prototype._fromArray=function(e){var t=e.length,s=this._nextPowerOf2(t);this._list=Array(s),this._capacityMask=s-1,this._tail=t;for(var r=0;r<t;r++)this._list[r]=e[r]},r.prototype._copyArray=function(e,t){var s,r=this._list,i=r.length,n=this.length;if((t|=n)==n&&this._head<this._tail)return this._list.slice(this._head,this._tail);var o=Array(t),a=0;if(e||this._head>this._tail){for(s=this._head;s<i;s++)o[a++]=r[s];for(s=0;s<this._tail;s++)o[a++]=r[s]}else for(s=this._head;s<this._tail;s++)o[a++]=r[s];return o},r.prototype._growArray=function(){if(0!=this._head){var e=this._copyArray(!0,this._list.length<<1);this._tail=this._list.length,this._head=0,this._list=e}else this._tail=this._list.length,this._list.length<<=1;this._capacityMask=this._capacityMask<<1|1},r.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1},r.prototype._nextPowerOf2=function(e){return Math.max(1<<Math.log(e)/Math.log(2)+1,4)},t.exports=r},30846,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(12522),i=e.r(9068),n=e.r(19335),o=e.r(26898),a=e.r(96686),l=e.r(58491);class c{static checkFlag(e,t){return t=t.toLowerCase(),!!this.getFlagMap()[e][t]}static setArgumentTransformer(e,t){this._transformer.argument[e]=t}static setReplyTransformer(e,t){this._transformer.reply[e]=t}static getFlagMap(){return this.flagMap||(this.flagMap=Object.keys(c.FLAGS).reduce((e,t)=>(e[t]={},c.FLAGS[t].forEach(s=>{e[t][s]=!0}),e),{})),this.flagMap}constructor(e,t=[],s={},r){if(this.name=e,this.inTransaction=!1,this.isTraced=!1,this.isResolved=!1,this.isSettled=!1,this.transformed=!1,this.replyEncoding=s.replyEncoding,this.protocol=2,this.replyMapping="legacy",this.errorStack=s.errorStack,this.args=t.flat(),this.callback=r,this.initPromise(),s.keyPrefix){let e=s.keyPrefix instanceof Buffer,t=e?s.keyPrefix:null;this._iterateKeys(r=>r instanceof Buffer?(null===t&&(t=Buffer.from(s.keyPrefix)),Buffer.concat([t,r])):e?Buffer.concat([s.keyPrefix,Buffer.from(String(r))]):s.keyPrefix+r)}s.readOnly&&(this.isReadOnly=!0)}getSlot(){if(void 0===this.slot){let e=this.getKeys()[0];this.slot=null==e?null:i(e)}return this.slot}getKeys(){return this._iterateKeys()}setReplyContext(e){this.protocol=e?.protocol??2,this.replyMapping=e?.replyMapping??"legacy"}toWritable(e){let t,s="*"+(this.args.length+1)+"\r\n$"+Buffer.byteLength(this.name)+"\r\n"+this.name+"\r\n";if(this.bufferMode){let e=new p;e.push(s);for(let t=0;t<this.args.length;++t){let s=this.args[t];s instanceof Buffer?0===s.length?e.push("$0\r\n\r\n"):(e.push("$"+s.length+"\r\n"),e.push(s),e.push("\r\n")):e.push("$"+Buffer.byteLength(s)+"\r\n"+s+"\r\n")}t=e.toBuffer()}else{t=s;for(let e=0;e<this.args.length;++e){let s=this.args[e];t+="$"+Buffer.byteLength(s)+"\r\n"+s+"\r\n"}}return t}stringifyArguments(){for(let e=0;e<this.args.length;++e){let t=this.args[e];"string"==typeof t||(t instanceof Buffer?this.bufferMode=!0:this.args[e]=(0,o.toArg)(t))}}transformReply(e){this.replyEncoding&&(e=(0,o.convertBufferToString)(e,this.replyEncoding));let t=c._transformer.reply[this.name];return t&&(e=t(e,{commandName:this.name,protocol:this.protocol,replyMapping:this.replyMapping})),e}setTimeout(e){this._commandTimeoutTimer||(this._commandTimeoutTimer=setTimeout(()=>{this.isSettled||this.reject(Error("Command timed out"))},e))}setBlockingTimeout(e){if(e<=0)return;this._blockingTimeoutTimer&&(clearTimeout(this._blockingTimeoutTimer),this._blockingTimeoutTimer=void 0);let t=Date.now();void 0===this._blockingDeadline&&(this._blockingDeadline=t+e);let s=this._blockingDeadline-t;s<=0?this.resolve(null):this._blockingTimeoutTimer=setTimeout(()=>{if(this.isSettled){this._blockingTimeoutTimer=void 0;return}this._blockingTimeoutTimer=void 0,this.resolve(null)},s)}extractBlockingTimeout(){let e=this.args;if(!e||0===e.length)return;let t=this.name.toLowerCase();return"blmovem"===t?(0,a.parseSecondsArgument)(e[4]):c.checkFlag("LAST_ARG_TIMEOUT_COMMANDS",t)?(0,a.parseSecondsArgument)(e[e.length-1]):c.checkFlag("FIRST_ARG_TIMEOUT_COMMANDS",t)?(0,a.parseSecondsArgument)(e[0]):c.checkFlag("BLOCK_OPTION_COMMANDS",t)?(0,a.parseBlockOption)(e):void 0}_clearTimers(){let e=this._commandTimeoutTimer;e&&(clearTimeout(e),delete this._commandTimeoutTimer);let t=this._blockingTimeoutTimer;t&&(clearTimeout(t),delete this._blockingTimeoutTimer)}initPromise(){this.isResolved=!1,this.isSettled=!1;let e=new Promise((e,t)=>{if(!this.transformed){this.transformed=!0;let e=c._transformer.argument[this.name];e&&(this.args=e(this.args)),this.stringifyArguments()}this.resolve=this._convertValue(e),this.reject=e=>{this._clearTimers(),this.isSettled=!0,this.errorStack?t((0,o.optimizeErrorStack)(e,this.errorStack.stack,"/ROOT/node_modules/ioredis/built")):t(e)}});this.promise=(0,n.default)(e,this.callback)}_iterateKeys(e=e=>e){if(void 0===this.keys&&(this.keys=[],(0,r.exists)(this.name,{caseInsensitive:!0})))for(let t of(0,r.getKeyIndexes)(this.name,this.args,{nameCaseInsensitive:!0}))this.args[t]=e(this.args[t]),this.keys.push(this.args[t]);return this.keys}_convertValue(e){return t=>{try{this._clearTimers(),e(this.transformReply(t)),this.isResolved=!0,this.isSettled=!0}catch(e){this.reject(e)}return this.promise}}}c.FLAGS={VALID_IN_SUBSCRIBER_MODE:["subscribe","psubscribe","unsubscribe","punsubscribe","ssubscribe","sunsubscribe","ping","quit"],VALID_IN_MONITOR_MODE:["monitor","auth"],ENTER_SUBSCRIBER_MODE:["subscribe","psubscribe","ssubscribe"],EXIT_SUBSCRIBER_MODE:["unsubscribe","punsubscribe","sunsubscribe"],WILL_DISCONNECT:["quit"],HANDSHAKE_COMMANDS:["auth","hello","select","client","readonly","info"],IGNORE_RECONNECT_ON_ERROR:["client"],BLOCKING_COMMANDS:["blpop","brpop","brpoplpush","blmove","blmovem","bzpopmin","bzpopmax","bzmpop","blmpop","xread","xreadgroup"],LAST_ARG_TIMEOUT_COMMANDS:["blpop","brpop","brpoplpush","blmove","bzpopmin","bzpopmax"],FIRST_ARG_TIMEOUT_COMMANDS:["bzmpop","blmpop"],BLOCK_OPTION_COMMANDS:["xread","xreadgroup"]},c._transformer={argument:{},reply:{}},s.default=c;let u=function(e){if(1===e.length){if(e[0]instanceof Map)return(0,o.convertMapToArray)(e[0]);if("object"==typeof e[0]&&null!==e[0])return(0,o.convertObjectToArray)(e[0])}return e},h=function(e){if(2===e.length){if(e[1]instanceof Map)return[e[0]].concat((0,o.convertMapToArray)(e[1]));if("object"==typeof e[1]&&null!==e[1])return[e[0]].concat((0,o.convertObjectToArray)(e[1]))}return e};for(let e of(c.setArgumentTransformer("mset",u),c.setArgumentTransformer("msetnx",u),c.setArgumentTransformer("hset",h),c.setArgumentTransformer("hmset",h),c.setReplyTransformer("hgetall",function(e){if(Array.isArray(e)){let t={};for(let s=0;s<e.length;s+=2){let r=e[s],i=e[s+1];r in t?Object.defineProperty(t,r,{value:i,configurable:!0,enumerable:!0,writable:!0}):t[r]=i}return t}return e}),c.setReplyTransformer("vsim",l.transformVsimReply),c.setReplyTransformer("hrandfield",l.transformPairReply),c.setReplyTransformer("xread",l.transformStreamReadReply),c.setReplyTransformer("xreadgroup",l.transformStreamReadReply),l.sortedSetWithScorePairCommands))c.setReplyTransformer(e,l.transformPairReply);class p{constructor(){this.length=0,this.items=[]}push(e){this.length+=Buffer.byteLength(e),this.items.push(e)}toBuffer(){let e=Buffer.allocUnsafe(this.length),t=0;for(let s of this.items){let r=Buffer.byteLength(s);Buffer.isBuffer(s)?s.copy(e,t):e.write(s,t,r),t+=r}return e}}},73052,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(30846),i=e.r(26898),n=e.r(89611),o=e.r(5318),a=(0,i.Debug)("dataHandler");s.default=class{constructor(e,t){var s;let r;this.redis=e;let i=(r="resp3"===(s=t).replyMapping?c:l,s.stringNumbers?{...r,[o.RESP_TYPES.NUMBER]:String,[o.RESP_TYPES.DOUBLE]:String}:r),n=new o.Decoder({getTypeMapping:()=>i,onReply:e=>{this.dispatch(()=>this.returnReply(e))},onErrorReply:e=>{this.dispatch(()=>this.returnError(e))},onPush:e=>{this.dispatch(()=>this.returnPush(e))}});e.stream.prependListener("data",e=>{try{n.write(e)}catch(e){this.returnFatalError(e)}}),e.stream.resume()}dispatch(e){try{e()}catch(e){process.nextTick(()=>{throw e})}}returnFatalError(e){e.message+=". Please report this.",this.redis.recoverFromFatalError(e,e,{offlineQueue:!1})}returnError(e){let t=this.shiftCommand(e);t&&(e.command={name:t.command.name,args:t.command.args},"ssubscribe"===t.command.name&&e.message.startsWith("MOVED ")&&this.redis.emit("moved"),this.redis.handleReconnection(e,t))}returnReply(e){if(this.handleMonitorReply(e)||3!==this.redis.condition.protocol&&this.handleSubscriberReply(e))return;let t=this.shiftCommand(e);t&&(r.default.checkFlag("ENTER_SUBSCRIBER_MODE",t.command.name)?(this.redis.condition.subscriber=new n.default,this.redis.condition.subscriber.add(t.command.name,e[1].toString()),h(t.command,e[2])||this.redis.commandQueue.unshift(t)):r.default.checkFlag("EXIT_SUBSCRIBER_MODE",t.command.name)?p(t.command,e[2])||this.redis.commandQueue.unshift(t):t.command.resolve(e))}returnPush(e){if(!Array.isArray(e)||0===e.length)return;let t=e[0].toString();switch(a('receive push "%s"',t),t){case"message":case"pmessage":case"smessage":this.handleSubscriberReply(e);break;case"ssubscribe":case"subscribe":case"psubscribe":{this.redis.condition.subscriber||(this.redis.condition.subscriber=new n.default);let s=e[1].toString();this.redis.condition.subscriber.add(t,s);let r=this.shiftCommand(e);if(!r)return;h(r.command,e[2])||this.redis.commandQueue.unshift(r);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{if(this.redis.condition.subscriber){let s=e[1]?e[1].toString():null;s&&this.redis.condition.subscriber.del(t,s)}let s=e[2];if(0===Number(s)&&(this.redis.condition.subscriber=!1),this.handleUnsolicitedUnsubscribe(t))return;let r=this.shiftCommand(e);if(!r)return;p(r.command,s)||this.redis.commandQueue.unshift(r)}}}handleUnsolicitedUnsubscribe(e){let t=this.redis.commandQueue.peekFront();return(!t||t.command.name.toLowerCase()!==e)&&("sunsubscribe"===e&&this.redis.emit("moved"),!0)}handleSubscriberReply(e){if(!this.redis.condition.subscriber)return!1;let t=Array.isArray(e)?e[0].toString():null;switch(a('receive reply "%s" in subscriber mode',t),t){case"message":this.redis.listeners("message").length>0&&this.redis.emit("message",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("messageBuffer",e[1],e[2]);break;case"pmessage":{let t=e[1].toString();this.redis.listeners("pmessage").length>0&&this.redis.emit("pmessage",t,e[2].toString(),e[3].toString()),this.redis.emit("pmessageBuffer",t,e[2],e[3]);break}case"smessage":this.redis.listeners("smessage").length>0&&this.redis.emit("smessage",e[1].toString(),e[2]?e[2].toString():""),this.redis.emit("smessageBuffer",e[1],e[2]);break;case"ssubscribe":case"subscribe":case"psubscribe":{let s=e[1].toString();this.redis.condition.subscriber.add(t,s);let r=this.shiftCommand(e);if(!r)return;h(r.command,e[2])||this.redis.commandQueue.unshift(r);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{let s=e[1]?e[1].toString():null;s&&this.redis.condition.subscriber.del(t,s);let r=e[2];if(0===Number(r)&&(this.redis.condition.subscriber=!1),this.handleUnsolicitedUnsubscribe(t))break;let i=this.shiftCommand(e);if(!i)return;p(i.command,r)||this.redis.commandQueue.unshift(i);break}default:{let t=this.shiftCommand(e);if(!t)return;t.command.resolve(e)}}return!0}handleMonitorReply(e){if("monitoring"!==this.redis.status)return!1;let t=e.toString();if("OK"===t)return!1;let s=t.indexOf(" "),r=t.slice(0,s),i=t.indexOf('"'),n=t.slice(i+1,-1).split('" "').map(e=>e.replace(/\\"/g,'"')),o=t.slice(s+2,i-2).split(" ");return this.redis.emit("monitor",r,n,o[1],o[0]),!0}shiftCommand(e){let t=this.redis.commandQueue.shift();if(!t){let t=Error("Command queue state error. If you can reproduce this, please report it."+(e instanceof Error?` Last error: ${e.message}`:` Last reply: ${e.toString()}`));return this.redis.emit("error",t),null}return t}};let l={[o.RESP_TYPES.SIMPLE_STRING]:Buffer,[o.RESP_TYPES.BLOB_STRING]:Buffer,[o.RESP_TYPES.VERBATIM_STRING]:Buffer,[o.RESP_TYPES.BIG_NUMBER]:String,[o.RESP_TYPES.DOUBLE]:Buffer,[o.RESP_TYPES.BOOLEAN]:Number,[o.RESP_TYPES.MAP]:Array,[o.RESP_TYPES.SET]:Array},c={[o.RESP_TYPES.SIMPLE_STRING]:Buffer,[o.RESP_TYPES.BLOB_STRING]:Buffer,[o.RESP_TYPES.VERBATIM_STRING]:Buffer,[o.RESP_TYPES.BIG_NUMBER]:String,[o.RESP_TYPES.SET]:Array},u=new WeakMap;function h(e,t){let s=u.has(e)?u.get(e):e.args.length;return(s-=1)<=0?(e.resolve(t),u.delete(e),!0):(u.set(e,s),!1)}function p(e,t){let s=u.has(e)?u.get(e):e.args.length;return 0===s?0===Number(t)&&(u.delete(e),e.resolve(t),!0):(s-=1)<=0?(e.resolve(t),!0):(u.set(e,s),!1)}},6135,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(9068),i=e.r(12522),n=e.r(19335),o=e.r(24361),a=e.r(30846),l=e.r(874),c=e.r(26898),u=e.r(67061),h=e.r(57355);class p extends u.default{constructor(e){super(),this.redis=e,this.isPipeline=!0,this.replyPending=0,this._queue=[],this._result=[],this._transactions=0,this._shaToScript={},this.isCluster="Cluster"===this.redis.constructor.name||this.redis.isCluster,this.options=e.options,Object.keys(e.scriptsSet).forEach(t=>{let s=e.scriptsSet[t];this._shaToScript[s.sha]=s,this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),e.addedBuiltinSet.forEach(t=>{this[t]=e[t],this[t+"Buffer"]=e[t+"Buffer"]}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t});let t=this;Object.defineProperty(this,"length",{get:function(){return t._queue.length}})}fillResult(e,t){if("exec"===this._queue[t].name&&Array.isArray(e[1])){let s=e[1].length;for(let r=0;r<s;r++){if(e[1][r]instanceof Error)continue;let i=this._queue[t-(s-r)];try{e[1][r]=i.transformReply(e[1][r])}catch(t){e[1][r]=t}}}if(this._result[t]=e,--this.replyPending)return;if(this.isCluster){let e,t=!0;for(let s=0;s<this._result.length;++s){let r=this._result[s][0],n=this._queue[s];if(r){if("exec"===n.name&&"EXECABORT Transaction discarded because of previous errors."===r.message)continue;if(e){if(e.name!==r.name||e.message!==r.message){t=!1;break}}else e={name:r.name,message:r.message}}else if(!n.inTransaction&&!((0,i.exists)(n.name,{caseInsensitive:!0})&&(0,i.hasFlag)(n.name,"readonly",{nameCaseInsensitive:!0}))){t=!1;break}}if(e&&t){let t=this,s=e.message.split(" "),r=this._queue,i=!1;this._queue=[];for(let e=0;e<r.length;++e){if("ASK"===s[0]&&!i&&"asking"!==r[e].name&&(!r[e-1]||"asking"!==r[e-1].name)){let e=new a.default("asking");e.ignore=!0,this.sendCommand(e)}r[e].initPromise(),this.sendCommand(r[e]),i=r[e].inTransaction}let n=!0;void 0===this.leftRedirections&&(this.leftRedirections={});let o=function(){t.exec()},l=this.redis;if(l.handleError(e,this.leftRedirections,{moved:function(e,s){t.preferKey=s,l.slots[e]?l.slots[e][0]!==s&&(l.slots[e]=[s]):l.slots[e]=[s],l._groupsBySlot[e]=l._groupsIds[l.slots[e].join(";")],l.refreshSlotsCache(),t.exec()},ask:function(e,s){t.preferKey=s,t.exec()},tryagain:o,clusterDown:o,connectionClosed:o,maxRedirections:()=>{n=!1},defaults:()=>{n=!1}}),n)return}}let s=0;for(let e=0;e<this._queue.length-s;++e)this._queue[e+s].ignore&&(s+=1),this._result[e]=this._result[e+s];this.resolve(this._result.slice(0,this._result.length-s))}sendCommand(e){this._transactions>0&&(e.inTransaction=!0);let t=this._queue.length;return e.pipelineIndex=t,e.promise.then(e=>{this.fillResult([null,e],t)}).catch(e=>{this.fillResult([e],t)}),this._queue.push(e),this}addBatch(e){let t,s,r;for(let i=0;i<e.length;++i)s=(t=e[i])[0],r=t.slice(1),this[s].apply(this,r);return this}}s.default=p;let d=p.prototype.multi;p.prototype.multi=function(){return this._transactions+=1,d.apply(this,arguments)};let y=p.prototype.execBuffer;p.prototype.execBuffer=(0,o.deprecate)(function(){return this._transactions>0&&(this._transactions-=1),y.apply(this,arguments)},"Pipeline#execBuffer: Use Pipeline#exec instead"),p.prototype.exec=function(e){let t,s;if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(c.noop),e&&!this.nodeifiedPromise&&(this.nodeifiedPromise=!0,(0,n.default)(this.promise,e)),this.redis.delayUntilReady(t=>{t?this.reject(t):this.exec(e)}),this.promise;if(this._transactions>0)return this._transactions-=1,y.apply(this,arguments);if(this.nodeifiedPromise||(this.nodeifiedPromise=!0,(0,n.default)(this.promise,e)),this._queue.length||this.resolve([]),this.isCluster){let e=[];for(let t=0;t<this._queue.length;t++){let s=this._queue[t].getKeys();if(s.length&&e.push(s[0]),s.length&&0>r.generateMulti(s))return this.reject(Error("All the keys in a pipeline command should belong to the same slot")),this.promise}if(e.length){if((t=function(e,t){let s=r(t[0]),i=e._groupsBySlot[s];for(let s=1;s<t.length;s++)if(e._groupsBySlot[r(t[s])]!==i)return -1;return s}(this.redis,e))<0)return this.reject(Error("All keys in the pipeline should belong to the same slots allocation group")),this.promise}else t=16384*Math.random()|0}let i=this;return(0,h.interceptHimportPipeline)({owner:i.redis,commands:i._queue,slot:t,preferredNodeKey:i.preferKey,setDestination(e){s={slot:t,redis:e}},resume:o,reject(e){i.reject(e)}})||o(),this.promise;function o(){let e,r=i.replyPending=i._queue.length;i.isCluster&&!s&&(s={slot:t,redis:i.redis.connectionPool.nodes.all[i.preferKey]});let n="",o={isPipeline:!0,destination:i.isCluster?s:{redis:i.redis},write(t){"string"!=typeof t?(e||(e=[]),n&&(e.push(Buffer.from(n,"utf8")),n=""),e.push(t)):(n.length+t.length>=l.constants.MAX_STRING_LENGTH&&(e||(e=[]),n&&(e.push(Buffer.from(n,"utf8")),n="")),n+=t),--r||(e?(n&&e.push(Buffer.from(n,"utf8")),o.destination.redis.stream.write(Buffer.concat(e))):o.destination.redis.stream.write(n),r=i._queue.length,n="",e=void 0)}};for(let e=0;e<i._queue.length;++e)i.redis.sendCommand(i._queue[e],o,s);return i.promise}}},66735,(e,t,s)=>{"use strict";var r;Object.defineProperty(s,"__esModule",{value:!0});let i=e.r(12522),n=e.r(27699),o=e.r(19335),a=e.r(83252),l=e.r(30846),c=e.r(18652),u=e.r(77420),h=e.r(45247),p=e.r(77143),d=e.r(12749),y=e.r(3422),f=e.r(26898),m=e.r(62819),g=e.r(57674),S=e.r(67061),b=e.r(57517),k=e.r(57355),_=e.r(57355),E=e.r(89977),A=(0,f.Debug)("redis");class v extends S.default{static createClient(...e){return new v(...e)}constructor(e,t,s){if(super(),this.status="wait",this.isCluster=!1,this.reconnectTimeout=null,this.connectionEpoch=0,this.retryAttempts=0,this.manuallyClosing=!1,this[r]=!1,this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this.parseOptions(e,t,s),n.EventEmitter.call(this),this.options.himportFieldsets=(0,_.cloneHimportFieldsets)(this.options.himportFieldsets),this.options.himportFieldsets?.length&&(0,k.bindHimportCoordinator)(this,new k.default(this.options.himportFieldsets),"standalone"),this.resetCommandQueue(),this.resetOfflineQueue(),this.options.Connector)this.connector=new this.options.Connector(this.options);else if(this.options.sentinels){let e=new u.default(this.options);e.emitter=this,this.connector=e}else this.connector=new c.StandaloneConnector(this.options);this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(b.noop)}get autoPipelineQueueSize(){let e=0;for(let t of this._autoPipelines.values())e+=t.length;return e}connect(e){let t=(0,m.traceConnect)(()=>this._connect(),()=>{let{address:e,port:t}=this._getServerAddress();return{serverAddress:e,serverPort:t,connectionEpoch:this.connectionEpoch}});return(0,o.default)(t,e)}_connect(){return new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(Error("Redis is already connecting/connected"));this.connectionEpoch+=1,this.setStatus("connecting");let{options:s}=this;this.condition={select:s.db,auth:s.username?[s.username,s.password]:s.password,subscriber:!1,protocol:s.protocol,replyMapping:3===s.protocol&&"resp3"===s.replyMapping?"resp3":"legacy",handshake:!1};let r=this;(0,o.default)(this.connector.connect(function(e,t){r.silentEmit(e,t)}),function(i,n){if(i){r.flushQueue(i),r.silentEmit("error",i),t(i),r.setStatus("end");return}let o=s.tls?"secureConnect":"connect";if("sentinels"in s&&s.sentinels&&!s.enableTLSForSentinelMode&&(o="connect"),r.stream=n,s.noDelay&&n.setNoDelay(!0),"number"==typeof s.keepAlive&&(n.connecting?n.once(o,()=>{n.setKeepAlive(!0,s.keepAlive)}):n.setKeepAlive(!0,s.keepAlive)),n.connecting){if(n.once(o,h.connectHandler(r)),s.connectTimeout){let e=!1;n.setTimeout(s.connectTimeout,function(){if(e)return;n.setTimeout(0),n.destroy();let t=Error("connect ETIMEDOUT");t.errorno="ETIMEDOUT",t.code="ETIMEDOUT",t.syscall="connect",h.errorHandler(r)(t)}),n.once(o,function(){e=!0,n.setTimeout(0)})}}else if(n.destroyed){let e=r.connector.firstError;e&&process.nextTick(()=>{h.errorHandler(r)(e)}),process.nextTick(h.closeHandler(r))}else process.nextTick(h.connectHandler(r));n.destroyed||(n.once("error",h.errorHandler(r)),n.once("close",h.closeHandler(r)));let a=function(){r.removeListener("close",l),e()};var l=function(){r.removeListener("ready",a),t(Error(f.CONNECTION_CLOSED_ERROR_MSG))};r.once("ready",a),r.once("close",l)})})}disconnect(e=!1){e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),"wait"===this.status?h.closeHandler(this)():this.connector.disconnect()}end(){this.disconnect()}duplicate(e){return new v({...this.options,...e??{}})}get mode(){return this.options.monitor?"monitor":(0,f.isResp2SubscriberMode)(this.condition)?"subscriber":"normal"}monitor(e){let t=this.duplicate({monitor:!0,lazyConnect:!1,himportFieldsets:void 0});return(0,o.default)(new Promise(function(e,s){t.once("error",s),t.once("monitoring",function(){e(t)})}),e)}sendCommand(e,t){if(e.setReplyContext(this.condition??this.options),"wait"===this.status&&this.connect().catch(b.noop),"end"===this.status)return e.reject(Error(f.CONNECTION_CLOSED_ERROR_MSG)),e.promise;if((0,f.isResp2SubscriberMode)(this.condition)&&!l.default.checkFlag("VALID_IN_SUBSCRIBER_MODE",e.name))return e.reject(Error("Connection in subscriber mode, only subscriber commands may be used")),e.promise;if("number"==typeof this.options.commandTimeout&&e.setTimeout(this.options.commandTimeout),!t&&this[k.hasHimportCoordinator]&&(0,k.interceptHimportCommand)(this,e,"ready"===this.status,()=>{this.sendCommand(e)}))return e.promise;let s=this.getBlockingTimeoutInMs(e),r="ready"===this.status||!t&&"connect"===this.status&&this.condition?.handshake&&(l.default.checkFlag("HANDSHAKE_COMMANDS",e.name)||(0,k.isInternalHimportCommand)(e))||!t&&"connect"===this.status&&!this.condition?.handshake&&(0,i.exists)(e.name,{caseInsensitive:!0})&&(0,i.hasFlag)(e.name,"loading",{nameCaseInsensitive:!0});if(this.stream&&this.stream.writable?this.stream._writableState&&this.stream._writableState.ended&&(r=!1):r=!1,r)A.enabled&&A("write command[%s]: %d -> %s(%o)",this._getDescription(),this.condition?.select,e.name,e.args),t?"isPipeline"in t&&t.isPipeline?t.write(e.toWritable(t.destination.redis.stream)):t.write(e.toWritable(t)):this.stream.write(e.toWritable(this.stream)),this.commandQueue.push({command:e,stream:t,select:this.condition.select}),void 0!==s&&e.setBlockingTimeout(s),l.default.checkFlag("WILL_DISCONNECT",e.name)&&(this.manuallyClosing=!0),void 0!==this.options.socketTimeout&&void 0===this.socketTimeoutTimer&&this.setSocketTimeout();else{if(!this.options.enableOfflineQueue)return e.reject(Error("Stream isn't writeable and enableOfflineQueue options is false")),e.promise;if("quit"===e.name&&0===this.offlineQueue.length)return this.disconnect(),e.resolve(Buffer.from("OK")),e.promise;if(A.enabled&&A("queue command[%s]: %d -> %s(%o)",this._getDescription(),this.condition.select,e.name,e.args),this.offlineQueue.push({command:e,stream:t,select:this.condition.select}),l.default.checkFlag("BLOCKING_COMMANDS",e.name)){let t=this.getConfiguredBlockingTimeout();void 0!==t&&e.setBlockingTimeout(t)}}if("select"===e.name&&(0,f.isInt)(e.args[0])){let t=parseInt(e.args[0],10);this.condition.select!==t&&(this.condition.select=t,this.emit("select",t),A("switch to db [%d]",this.condition.select))}return!r||e.isTraced?e.promise:(e.isTraced=!0,(0,m.traceCommand)(()=>e.promise,()=>this._buildCommandContext(e)))}getBlockingTimeoutInMs(e){if(!l.default.checkFlag("BLOCKING_COMMANDS",e.name))return;let t=this.getConfiguredBlockingTimeout();if(void 0===t)return;let s=e.extractBlockingTimeout();return"number"==typeof s?s>0?s+(this.options.blockingTimeoutGrace??p.DEFAULT_REDIS_OPTIONS.blockingTimeoutGrace):t:null===s?t:void 0}getConfiguredBlockingTimeout(){if("number"==typeof this.options.blockingTimeout&&this.options.blockingTimeout>0)return this.options.blockingTimeout}setSocketTimeout(){let e=this.stream;this.socketTimeoutTimer=setTimeout(()=>{e.destroy(Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`)),this.socketTimeoutTimer=void 0},this.options.socketTimeout),e.once("data",()=>{clearTimeout(this.socketTimeoutTimer),this.socketTimeoutTimer=void 0,0!==this.commandQueue.length&&this.setSocketTimeout()})}scanStream(e){return this.createScanStream("scan",{options:e})}scanBufferStream(e){return this.createScanStream("scanBuffer",{options:e})}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}silentEmit(e,t){let s;if("error"!==e||(s=t,"end"!==this.status&&(!this.manuallyClosing||!(s instanceof Error)||s.message!==f.CONNECTION_CLOSED_ERROR_MSG&&"connect"!==s.syscall&&"read"!==s.syscall)))return this.listeners(e).length>0?this.emit.apply(this,arguments):(s&&s instanceof Error&&console.error("[ioredis] Unhandled error event:",s.stack),!1)}recoverFromFatalError(e,t,s){this.flushQueue(t,s),this.silentEmit("error",t),this.disconnect(!0)}handleReconnection(e,t){let s=!1,r=l.default.checkFlag("IGNORE_RECONNECT_ON_ERROR",t.command.name)||this.condition?.handshake&&l.default.checkFlag("HANDSHAKE_COMMANDS",t.command.name);switch(this.options.reconnectOnError&&!r&&(s=this.options.reconnectOnError(e)),s){case 1:case!0:"reconnecting"!==this.status&&this.disconnect(!0),t.command.reject(e);break;case 2:"reconnecting"!==this.status&&this.disconnect(!0),this.condition?.select!==t.select&&"select"!==t.command.name&&this.select(t.select),this.sendCommand(t.command);break;default:t.command.reject(e)}}_getServerAddress(){return"path"in this.options&&this.options.path?{address:this.options.path,port:void 0}:{address:"host"in this.options&&this.options.host||"localhost",port:"port"in this.options&&this.options.port||6379}}_buildCommandContext(e){let{address:t,port:s}=this._getServerAddress();return{command:e.name,args:(0,m.sanitizeArgs)(e.name,e.args),database:this.condition?.select??this.options.db??0,serverAddress:t,serverPort:s}}_buildBatchContext(e){let{address:t,port:s}=this._getServerAddress();return{batchMode:"MULTI",batchSize:e,database:this.condition?.select??this.options.db??0,serverAddress:t,serverPort:s}}_getDescription(){let e;return e="path"in this.options&&this.options.path?this.options.path:this.stream&&this.stream.remoteAddress&&this.stream.remotePort?this.stream.remoteAddress+":"+this.stream.remotePort:"host"in this.options&&this.options.host?this.options.host+":"+this.options.port:"",this.options.connectionName&&(e+=` (${this.options.connectionName})`),e}resetCommandQueue(){this.commandQueue=new E}resetOfflineQueue(){this.offlineQueue=new E}parseOptions(...e){let t={},s=!1;for(let r=0;r<e.length;++r){let i=e[r];if(null!=i)if("object"==typeof i)(0,b.defaults)(t,i);else if("string"==typeof i)(0,b.defaults)(t,(0,f.parseURL)(i)),i.startsWith("rediss://")&&(s=!0);else if("number"==typeof i)t.port=i;else throw Error("Invalid argument "+i)}if(s&&(0,b.defaults)(t,{tls:!0}),(0,b.defaults)(t,v.defaultOptions),"string"==typeof t.port&&(t.port=parseInt(t.port,10)),"string"==typeof t.db&&(t.db=parseInt(t.db,10)),"resp3"===t.replyMapping&&3!==t.protocol)throw Error('The "resp3" replyMapping is only supported with protocol 3');this.options=(0,f.resolveTLSProfile)(t)}setStatus(e,t){A.enabled&&A("status[%s]: %s -> %s",this._getDescription(),this.status||"[empty]",e),this.status=e,process.nextTick(this.emit.bind(this,e,t))}createScanStream(e,{key:t,options:s={}}){return new d.default({objectMode:!0,key:t,redis:this,command:e,...s})}flushQueue(e,t){let s;if((t=(0,b.defaults)({},t,{offlineQueue:!0,commandQueue:!0})).offlineQueue)for(;s=this.offlineQueue.shift();)s.command.reject(e);if(t.commandQueue&&this.commandQueue.length>0)for(this.stream&&this.stream.removeAllListeners("data");s=this.commandQueue.shift();)s.command.reject(e)}_readyCheck(e){let t=this;this.info(function(s,r){if(s)return s.message&&s.message.includes("NOPERM")?(console.warn(`Skipping the ready check because INFO command fails: "${s.message}". You can disable ready check with "enableReadyCheck". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`),e(null,{})):e(s);if("string"!=typeof r)return e(null,r);let i={},n=r.split("\r\n");for(let e=0;e<n.length;++e){let[t,...s]=n[e].split(":"),r=s.join(":");r&&(i[t]=r)}if(i.loading&&"0"!==i.loading){let s=1e3*(i.loading_eta_seconds||1),r=t.options.maxLoadingRetryTime&&t.options.maxLoadingRetryTime<s?t.options.maxLoadingRetryTime:s;A("Redis server still loading, trying again in "+r+"ms"),setTimeout(function(){t._readyCheck(e)},r)}else e(null,i)}).catch(b.noop)}}r=k.hasHimportCoordinator,v.Cluster=a.default,v.Command=l.default,v.defaultOptions=p.DEFAULT_REDIS_OPTIONS,(0,g.default)(v,n.EventEmitter),(0,y.addTransactionSupport)(v.prototype),s.default=v},12749,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(88947);class i extends r.Readable{constructor(e){super(e),this.opt=e,this._redisCursor="0",this._redisDrained=!1}_read(){if(this._redisDrained)return void this.push(null);let e=[this._redisCursor];this.opt.key&&e.unshift(this.opt.key),this.opt.match&&e.push("MATCH",this.opt.match),this.opt.type&&e.push("TYPE",this.opt.type),this.opt.count&&e.push("COUNT",String(this.opt.count)),this.opt.noValues&&e.push("NOVALUES"),this.opt.redis[this.opt.command](e,(e,t)=>{e?this.emit("error",e):(this._redisCursor=t[0]instanceof Buffer?t[0].toString():t[0],"0"===this._redisCursor&&(this._redisDrained=!0),this.push(t[1]))})}close(){this._redisDrained=!0}}s.default=i},40162,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(54799),i=e.r(30846),n=e.r(19335);s.default=class{constructor(e,t=null,s="",n=!1){this.lua=e,this.numberOfKeys=t,this.keyPrefix=s,this.readOnly=n,this.sha=(0,r.createHash)("sha1").update(e).digest("hex");let o=this.sha,a=new WeakSet;this.Command=class extends i.default{toWritable(t){let s=this.reject;return this.reject=e=>{-1!==e.message.indexOf("NOSCRIPT")&&a.delete(t),s.call(this,e)},a.has(t)?"eval"===this.name&&(this.name="evalsha",this.args[0]=o):(a.add(t),this.name="eval",this.args[0]=e),super.toWritable(t)}}}execute(e,t,s,r){"number"==typeof this.numberOfKeys&&t.unshift(this.numberOfKeys),this.keyPrefix&&(s.keyPrefix=this.keyPrefix),this.readOnly&&(s.readOnly=!0);let i=new this.Command("evalsha",[this.sha,...t],s);return i.promise=i.promise.catch(r=>{if(-1===r.message.indexOf("NOSCRIPT"))throw r;let i=new this.Command("evalsha",[this.sha,...t],s);return(e.isPipeline?e.redis:e).sendCommand(i)}),(0,n.default)(i.promise,r),e.sendCommand(i)}}},89611,(e,t,s)=>{"use strict";function r(e){return"unsubscribe"===e?"subscribe":"punsubscribe"===e?"psubscribe":"sunsubscribe"===e?"ssubscribe":e}Object.defineProperty(s,"__esModule",{value:!0}),s.default=class{constructor(){this.set={subscribe:{},psubscribe:{},ssubscribe:{}}}add(e,t){this.set[r(e)][t]=!0}del(e,t){delete this.set[r(e)][t]}channels(e){return Object.keys(this.set[r(e)])}isEmpty(){return 0===this.channels("subscribe").length&&0===this.channels("psubscribe").length&&0===this.channels("ssubscribe").length}}},33700,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.executeWithAutoPipelining=s.getFirstValueInFlattenedArray=s.shouldUseAutoPipelining=s.notAllowedAutoPipelineCommands=s.kCallbacks=s.kExec=void 0;let r=e.r(57517),i=e.r(9068),n=e.r(19335),o=e.r(12522);function a(e){for(let t=0;t<e.length;t++){let s=e[t];if("string"==typeof s)return s;if(Array.isArray(s)||(0,r.isArguments)(s)){if(0===s.length)continue;return s[0]}let i=[s].flat();if(i.length>0)return i[0]}}s.kExec=Symbol("exec"),s.kCallbacks=Symbol("callbacks"),s.notAllowedAutoPipelineCommands=["auth","info","script","quit","cluster","pipeline","multi","subscribe","psubscribe","unsubscribe","unpsubscribe","select","client","hello","readonly","himport"],s.shouldUseAutoPipelining=function(e,t,r){return t&&e.options.enableAutoPipelining&&!e.isPipeline&&!s.notAllowedAutoPipelineCommands.includes(r)&&!e.options.autoPipeliningIgnoredCommands.includes(r)},s.getFirstValueInFlattenedArray=a,s.executeWithAutoPipelining=function e(t,l,c,u,h){if(t.isCluster&&!t.slots.length)return"wait"===t.status&&t.connect().catch(r.noop),(0,n.default)(new Promise(function(s,r){t.delayUntilReady(i=>{i?r(i):e(t,l,c,u,null).then(s,r)})}),h);let p=t.options.keyPrefix||"",d=t.isCluster?t.slots[i(`${p}${function(e,t){if((0,o.exists)(e,{caseInsensitive:!0})){let s=t.flat(),r=(0,o.getKeyIndexes)(e,s,{nameCaseInsensitive:!0});if(r.length)return s[r[0]]}return a(t)}(c,u)}`)].join(","):"main";if(t.isCluster&&"master"!==t.options.scaleReads&&(d+=(0,o.exists)(c)&&(0,o.hasFlag)(c,"readonly")?":read":":write"),!t._autoPipelines.has(d)){let e=t.pipeline();e[s.kExec]=!1,e[s.kCallbacks]=[],t._autoPipelines.set(d,e)}let y=t._autoPipelines.get(d);y[s.kExec]||(y[s.kExec]=!0,setImmediate(function e(t,r){if(t._runningAutoPipelines.has(r)||!t._autoPipelines.has(r))return;t._runningAutoPipelines.add(r);let i=t._autoPipelines.get(r);t._autoPipelines.delete(r);let n=i[s.kCallbacks];i[s.kCallbacks]=null,i.exec(function(s,i){if(t._runningAutoPipelines.delete(r),s)for(let e=0;e<n.length;e++)process.nextTick(n[e],s);else for(let e=0;e<n.length;e++)process.nextTick(n[e],...i[e]);t._autoPipelines.has(r)&&e(t,r)})},t,d));let f=new Promise(function(e,t){y[s.kCallbacks].push(function(s,r){s?t(s):e(r)}),"call"===l&&u.unshift(c),y[l](...u)});return(0,n.default)(f,h)}},23086,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.DEFAULT_CLUSTER_OPTIONS=void 0;let r=e.r(79594);s.DEFAULT_CLUSTER_OPTIONS={clusterRetryStrategy:e=>Math.min(100+2*e,2e3),clusterNodeRetryStrategy:null,enableOfflineQueue:!0,enableReadyCheck:!0,scaleReads:"master",maxRedirections:16,retryDelayOnMoved:0,retryDelayOnFailover:100,retryDelayOnClusterDown:100,retryDelayOnTryAgain:100,slotsRefreshTimeout:1e3,useSRVRecords:!1,resolveSrv:r.resolveSrv,dnsLookup:r.lookup,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],shardedSubscribers:!1}},55925,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(78695),i=e.r(26898),n=e.r(66735),o=(0,i.Debug)("cluster:subscriber");s.default=class{constructor(e,t,s=!1){this.connectionPool=e,this.emitter=t,this.isSharded=s,this.started=!1,this.subscriber=null,this.slotRange=[],this.onSubscriberEnd=()=>{this.started?(o("subscriber has disconnected, selecting a new one..."),this.selectSubscriber()):o("subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting.")},this.connectionPool.on("-node",(e,t)=>{this.started&&this.subscriber&&(0,r.getNodeKey)(this.subscriber.options)===t&&(o("subscriber has left, selecting a new one..."),this.selectSubscriber())}),this.connectionPool.on("+node",()=>{this.started&&!this.subscriber&&(o("a new node is discovered and there is no subscriber, selecting a new one..."),this.selectSubscriber())})}getInstance(){return this.subscriber}associateSlotRange(e){return this.isSharded&&(this.slotRange=e),this.slotRange}start(){this.started=!0,this.selectSubscriber(),o("started")}stop(){this.started=!1,this.subscriber&&(this.subscriber.disconnect(),this.subscriber=null)}isStarted(){return this.started}selectSubscriber(){let e=this.lastActiveSubscriber;e&&(e.off("end",this.onSubscriberEnd),e.disconnect()),this.subscriber&&(this.subscriber.off("end",this.onSubscriberEnd),this.subscriber.disconnect());let t=(0,i.sample)(this.connectionPool.getNodes());if(!t){o("selecting subscriber failed since there is no node discovered in the cluster yet"),this.subscriber=null;return}let{options:s}=t;o("selected a subscriber %s:%s",s.host,s.port);let a="subscriber";this.isSharded&&(a="ssubscriber"),this.subscriber=new n.default({port:s.port,host:s.host,username:s.username,password:s.password,enableReadyCheck:!0,connectionName:(0,r.getConnectionName)(a,s.connectionName),lazyConnect:!0,tls:s.tls,protocol:s.protocol,replyMapping:s.replyMapping,retryStrategy:null}),this.subscriber.on("error",i.noop),this.subscriber.on("moved",()=>{this.emitter.emit("forceRefresh")}),this.subscriber.once("end",this.onSubscriberEnd);let l={subscribe:[],psubscribe:[],ssubscribe:[]};if(e){let t=e.condition||e.prevCondition;t&&t.subscriber&&(l.subscribe=t.subscriber.channels("subscribe"),l.psubscribe=t.subscriber.channels("psubscribe"),l.ssubscribe=t.subscriber.channels("ssubscribe"))}if(l.subscribe.length||l.psubscribe.length||l.ssubscribe.length){let e=0;for(let t of["subscribe","psubscribe","ssubscribe"]){let s=l[t];if(0!=s.length)if(o("%s %d channels",t,s.length),"ssubscribe"===t)for(let r of s)e+=1,this.subscriber[t](r).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{o("failed to ssubscribe to channel: %s",r)});else e+=1,this.subscriber[t](s).then(()=>{--e||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{o("failed to %s %d channels",t,s.length)})}}else this.lastActiveSubscriber=this.subscriber;for(let e of["message","messageBuffer"])this.subscriber.on(e,(t,s)=>{this.emitter.emit(e,t,s)});for(let e of["pmessage","pmessageBuffer"])this.subscriber.on(e,(t,s,r)=>{this.emitter.emit(e,t,s,r)});if(!0==this.isSharded)for(let e of["smessage","smessageBuffer"])this.subscriber.on(e,(t,s)=>{this.emitter.emit(e,t,s)})}}},58432,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(26898),i=e.r(78695),n=e.r(9068),o=e.r(93148),a=(0,r.Debug)("cluster:subscriberGroup");class l{constructor(e,t){this.subscriberGroupEmitter=e,this.options=t,this.shardedSubscribers=new Map,this.clusterSlots=[],this.subscriberToSlotsIndex=new Map,this.channels=new Map,this.failedAttemptsByNode=new Map,this.isResetting=!1,this.pendingReset=null,this.handleSubscriberConnectFailed=(e,t)=>{let s=(this.failedAttemptsByNode.get(t)||0)+1;this.failedAttemptsByNode.set(t,s);let r=Math.min(s,l.MAX_RETRY_ATTEMPTS),i=Math.min(l.BASE_BACKOFF_MS*2**r,l.MAX_BACKOFF_MS),n=Math.floor(.5*i*(Math.random()-.5)),o=Math.max(0,i+n);a("Failed to connect subscriber for %s. Refreshing slots in %dms",t,o),this.subscriberGroupEmitter.emit("subscriberConnectFailed",{delay:o,error:e})},this.handleSubscriberConnectSucceeded=e=>{this.failedAttemptsByNode.delete(e)}}getResponsibleSubscriber(e){let t=this.clusterSlots[e][0],s=this.shardedSubscribers.get(t);return s&&"idle"===s.subscriberStatus&&s.start().then(()=>{this.handleSubscriberConnectSucceeded(s.getNodeKey())}).catch(e=>{this.handleSubscriberConnectFailed(e,s.getNodeKey())}),s}addChannels(e){let t=n(e[0]);for(let s of e)if(n(s)!==t)return -1;let s=this.channels.get(t);return s?this.channels.set(t,s.concat(e)):this.channels.set(t,e),Array.from(this.channels.values()).reduce((e,t)=>e+t.length,0)}removeChannels(e){let t=n(e[0]);for(let s of e)if(n(s)!==t)return -1;let s=this.channels.get(t);if(s){let r=s.filter(t=>!e.includes(t));this.channels.set(t,r)}return Array.from(this.channels.values()).reduce((e,t)=>e+t.length,0)}stop(){for(let e of this.shardedSubscribers.values())e.stop();this.pendingReset=null,this.shardedSubscribers.clear(),this.subscriberToSlotsIndex.clear()}start(){let e=[];for(let t of this.shardedSubscribers.values())this.shouldStartSubscriber(t)&&(e.push(t.start().then(()=>{this.handleSubscriberConnectSucceeded(t.getNodeKey())}).catch(e=>{this.handleSubscriberConnectFailed(e,t.getNodeKey())})),this.subscriberGroupEmitter.emit("+subscriber"));return Promise.all(e)}async reset(e,t){if(this.isResetting){this.pendingReset={slots:e,nodes:t};return}this.isResetting=!0;try{let s=this._refreshSlots(e),r=this.hasUnhealthySubscribers();if(!s&&!r)return void a("No topology change detected or failed subscribers. Skipping reset.");for(let[e,t]of this.shardedSubscribers){if(this.subscriberToSlotsIndex.has(e)&&t.isHealthy()){a("Skipping deleting subscriber for %s",e);continue}a("Removing subscriber for %s",e),t.stop(),this.shardedSubscribers.delete(e),this.subscriberGroupEmitter.emit("-subscriber")}let n=[];for(let[e,s]of this.subscriberToSlotsIndex){let s=this.shardedSubscribers.get(e);if(s&&s.isHealthy()){a("Skipping creating new subscriber for %s",e),!s.isStarted()&&this.shouldStartSubscriber(s)&&n.push(s.start().then(()=>{this.handleSubscriberConnectSucceeded(e)}).catch(t=>{this.handleSubscriberConnectFailed(t,e)}));continue}s&&!s.isHealthy()&&(a("Replacing subscriber for %s",e),s.stop(),this.shardedSubscribers.delete(e),this.subscriberGroupEmitter.emit("-subscriber")),a("Creating new subscriber for %s",e);let r=t.find(t=>(0,i.getNodeKey)(t.options)===e);if(!r){a("Failed to find node for key %s",e);continue}let l=new o.default(this.subscriberGroupEmitter,r.options,this.options.redisOptions);this.shardedSubscribers.set(e,l),this.shouldStartSubscriber(l)&&n.push(l.start().then(()=>{this.handleSubscriberConnectSucceeded(e)}).catch(t=>{this.handleSubscriberConnectFailed(t,e)})),this.subscriberGroupEmitter.emit("+subscriber")}await Promise.all(n),this._resubscribe(),this.subscriberGroupEmitter.emit("subscribersReady")}finally{if(this.isResetting=!1,this.pendingReset){let{slots:e,nodes:t}=this.pendingReset;this.pendingReset=null,await this.reset(e,t)}}}_refreshSlots(e){if(this._slotsAreEqual(e)&&this.subscriberToSlotsIndex.size>0)return a("Nothing to refresh because the new cluster map is equal to the previous one."),!1;a("Refreshing the slots of the subscriber group."),this.subscriberToSlotsIndex=new Map;for(let t=0;t<e.length;t++){let s=e[t][0];this.subscriberToSlotsIndex.has(s)||this.subscriberToSlotsIndex.set(s,[]),this.subscriberToSlotsIndex.get(s).push(Number(t))}return this.clusterSlots=JSON.parse(JSON.stringify(e)),!0}_resubscribe(){this.shardedSubscribers&&this.shardedSubscribers.forEach((e,t)=>{let s=this.subscriberToSlotsIndex.get(t);s&&s.forEach(s=>{let r=e.getInstance(),i=this.channels.get(s);if(i&&i.length>0){if(!r||"end"===r.status)return;"ready"===r.status?r.ssubscribe(...i).catch(e=>{a("Failed to ssubscribe on node %s: %s",t,e)}):r.once("ready",()=>{r.ssubscribe(...i).catch(e=>{a("Failed to ssubscribe on node %s: %s",t,e)})})}})})}_slotsAreEqual(e){return void 0!==this.clusterSlots&&JSON.stringify(this.clusterSlots)===JSON.stringify(e)}hasUnhealthySubscribers(){let e=Array.from(this.shardedSubscribers.values()).some(e=>!e.isHealthy()),t=Array.from(this.subscriberToSlotsIndex.keys()).some(e=>!this.shardedSubscribers.has(e));return e||t}shouldStartSubscriber(e){if(e.isStarted())return!1;if(!e.isLazyConnect())return!0;let t=this.subscriberToSlotsIndex.get(e.getNodeKey());return!!t&&t.some(e=>{let t=this.channels.get(e);return!!(t&&t.length>0)})}}l.MAX_RETRY_ATTEMPTS=10,l.MAX_BACKOFF_MS=2e3,l.BASE_BACKOFF_MS=100,s.default=l},77825,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(27699),i=e.r(26898),n=e.r(78695),o=e.r(66735),a=(0,i.Debug)("cluster:connectionPool");class l extends r.EventEmitter{constructor(e,t=null,s={}){super(),this.redisOptions=e,this.clusterNodeRetryStrategy=t,this.hooks=s,this.nodes={all:{},master:{},slave:{}},this.specifiedOptions={}}getNodes(e="all"){let t=this.nodes[e];return Object.keys(t).map(e=>t[e])}getInstanceByKey(e){return this.nodes.all[e]}getSampleInstance(e){let t=Object.keys(this.nodes[e]),s=(0,i.sample)(t);return this.nodes[e][s]}addMasterNode(e){let t=(0,n.getNodeKey)(e.options),s=this.createRedisFromOptions(e,e.options.readOnly);return!e.options.readOnly&&(this.nodes.all[t]=s,this.nodes.master[t]=s,!0)}createRedisFromOptions(e,t){let s=new o.default((0,i.defaults)({retryStrategy:"function"==typeof this.clusterNodeRetryStrategy?this.clusterNodeRetryStrategy:null,enableOfflineQueue:!0,readOnly:t},e,this.redisOptions,{lazyConnect:!0}));return this.hooks.onCreate?.(s,t),s}findOrCreate(e,t=!1){let s,r=(0,n.getNodeKey)(e);return t=!!t,this.specifiedOptions[r]?Object.assign(e,this.specifiedOptions[r]):this.specifiedOptions[r]=e,this.nodes.all[r]?(s=this.nodes.all[r]).options.readOnly!==t&&(s.options.readOnly=t,a("Change role of %s to %s",r,t?"slave":"master"),s[t?"readonly":"readwrite"]().catch(i.noop),t?(delete this.nodes.master[r],this.nodes.slave[r]=s):(delete this.nodes.slave[r],this.nodes.master[r]=s),this.hooks.onRoleChange?.(s,r,t)):(a("Connecting to %s as %s",r,t?"slave":"master"),s=this.createRedisFromOptions(e,t),this.nodes.all[r]=s,this.nodes[t?"slave":"master"][r]=s,s.once("end",()=>{(!this.nodes.all[r]||this.nodes.all[r]===s)&&(this.removeNode(r),this.emit("-node",s,r),Object.keys(this.nodes.all).length||this.emit("drain"))}),this.emit("+node",s,r),s.on("error",e=>{this.emit("nodeError",e,r)})),s}recreate(e,t=!1){let s=(0,n.getNodeKey)(e),r=this.nodes.all[s];r&&(a("Recreating connection to %s",s),this.removeNode(s),r.disconnect());let i=this.findOrCreate(e,t);return r&&this.emit("-node",r,s),i}reset(e){a("Reset with %O",e);let t={};e.forEach(e=>{let s=(0,n.getNodeKey)(e);e.readOnly&&t[s]||(t[s]=e)}),Object.keys(this.nodes.all).forEach(e=>{t[e]||(a("Disconnect %s because the node does not hold any slot",e),this.nodes.all[e].disconnect(),this.removeNode(e))}),Object.keys(t).forEach(e=>{let s=t[e];this.findOrCreate(s,s.readOnly)})}removeNode(e){let{nodes:t}=this;t.all[e]&&(a("Remove %s from the pool",e),this.hooks.onRemove?.(t.all[e]),delete t.all[e]),delete t.master[e],delete t.slave[e]}}s.default=l},66392,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(26898),i=e.r(89977),n=(0,r.Debug)("delayqueue");s.default=class{constructor(){this.queues={},this.timeouts={}}push(e,t,s){let r=s.callback||process.nextTick;this.queues[e]||(this.queues[e]=new i),this.queues[e].push(t),this.timeouts[e]||(this.timeouts[e]=setTimeout(()=>{r(()=>{this.timeouts[e]=null,this.execute(e)})},s.timeout))}execute(e){let t=this.queues[e];if(!t)return;let{length:s}=t;if(s)for(n("send %d commands in %s queue",s,e),this.queues[e]=null;t.length>0;)t.shift()()}}},93148,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(78695),i=e.r(26898),n=e.r(66735),o=(0,i.Debug)("cluster:subscriberGroup:shardedSubscriber"),a="idle",l="starting",c="connected",u="stopping",h="ended",p={[a]:[l,u,h],[l]:[c,u,h],[c]:[u,h],[u]:[h],[h]:[]};s.default=class{constructor(e,t,s){for(let o of(this.emitter=e,this.status=a,this.instance=null,this.connectPromise=null,this.messageListeners=new Map,this.onEnd=()=>{this.updateStatus(h),this.emitter.emit("-node",this.instance,this.nodeKey)},this.onError=e=>{this.emitter.emit("nodeError",e,this.nodeKey)},this.onMoved=()=>{this.emitter.emit("moved")},this.instance=new n.default((0,i.defaults)({enableReadyCheck:!1,enableOfflineQueue:!0,connectionName:(0,r.getConnectionName)("ssubscriber",t.connectionName),retryStrategy:null,lazyConnect:!0},t,s)),this.lazyConnect=s?.lazyConnect??!0,this.nodeKey=(0,r.getNodeKey)(t),this.instance.on("end",this.onEnd),this.instance.on("error",this.onError),this.instance.on("moved",this.onMoved),["smessage","smessageBuffer"])){let e=(...e)=>{this.emitter.emit(o,...e)};this.messageListeners.set(o,e),this.instance.on(o,e)}}async start(){if(this.connectPromise)return this.connectPromise;if(this.status!==l&&this.status!==c){if(this.status===h||!this.instance)throw Error(`Sharded subscriber ${this.nodeKey} cannot be restarted once ended.`);this.updateStatus(l),this.connectPromise=this.instance.connect();try{await this.connectPromise,this.updateStatus(c)}catch(e){throw this.updateStatus(h),e}finally{this.connectPromise=null}}}stop(){this.updateStatus(u),this.instance&&(this.instance.disconnect(),this.instance.removeAllListeners(),this.messageListeners.clear(),this.instance=null),this.updateStatus(h),o("stopped %s",this.nodeKey)}isStarted(){return[c,l].includes(this.status)}get subscriberStatus(){return this.status}isHealthy(){return(this.status===a||this.status===c||this.status===l)&&null!==this.instance}getInstance(){return this.instance}getNodeKey(){return this.nodeKey}isLazyConnect(){return this.lazyConnect}updateStatus(e){if(this.status!==e){if(!p[this.status].includes(e))return void o("Invalid status transition for %s: %s -> %s",this.nodeKey,this.status,e);this.status=e}}}},83252,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(12522),i=e.r(27699),n=e.r(63227),o=e.r(19335),a=e.r(30846),l=e.r(17798),c=e.r(66735),u=e.r(12749),h=e.r(3422),p=e.r(26898),d=e.r(57674),y=e.r(67061),f=e.r(23086),m=e.r(55925),g=e.r(77825),S=e.r(66392),b=e.r(78695),k=e.r(89977),_=e.r(58432),E=e.r(57355),A=(0,p.Debug)("cluster"),v=new WeakSet;class w extends y.default{constructor(e,t={}){super(),this.slots=[],this._groupsIds={},this._groupsBySlot=Array(16384),this.isCluster=!0,this.retryAttempts=0,this.delayQueue=new S.default,this.offlineQueue=new k,this.isRefreshing=!1,this._refreshSlotsCacheCallbacks=[],this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this._readyDelayedCallbacks=[],this.connectionEpoch=0,i.EventEmitter.call(this),this.startupNodes=e,this.options=(0,p.defaults)({},t,f.DEFAULT_CLUSTER_OPTIONS,this.options),this.options.himportFieldsets=(0,E.cloneHimportFieldsets)(this.options.himportFieldsets);let s=this.options.himportFieldsets?.length?new E.default(this.options.himportFieldsets):void 0;if(s&&(0,E.bindHimportCoordinator)(this,s,"cluster"),this.options.shardedSubscribers&&this.createShardedSubscriberGroup(),this.options.redisOptions&&this.options.redisOptions.keyPrefix&&!this.options.keyPrefix&&(this.options.keyPrefix=this.options.redisOptions.keyPrefix),"function"!=typeof this.options.scaleReads&&-1===["all","master","slave"].indexOf(this.options.scaleReads))throw Error('Invalid option scaleReads "'+this.options.scaleReads+'". Expected "all", "master", "slave" or a custom function');let r={...this.options.redisOptions??{}};delete r.himportFieldsets,this.connectionPool=new g.default(r,this.options.clusterNodeRetryStrategy,s?{onCreate:(e,t)=>{(0,E.bindHimportCoordinator)(e,s,t?"replica":"master")},onRoleChange:(e,t,r)=>{(0,E.setHimportRole)(e,r?"replica":"master"),s.invalidate(e),r||(0,b.waitForRedisReady)(e).then(()=>{for(let r of s.getDefinitions()){let i=s.ensurePrepared(e,r);i?.catch(e=>{this.emit("node error",e,t)})}},e=>{this.emit("node error",e,t)})},onRemove:e=>{(0,E.unbindHimportCoordinator)(e)}}:void 0),this.connectionPool.on("-node",(e,t)=>{this.emit("-node",e)}),this.connectionPool.on("+node",e=>{this.emit("+node",e)}),this.connectionPool.on("drain",()=>{this.setStatus("close")}),this.connectionPool.on("nodeError",(e,t)=>{this.emit("node error",e,t)}),this.subscriber=new m.default(this.connectionPool,this),this.options.scripts&&Object.entries(this.options.scripts).forEach(([e,t])=>{this.defineCommand(e,t)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(e=>{A("connecting failed: %s",e)})}connect(){return new Promise((e,t)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void t(Error("Redis is already connecting/connected"));let s=++this.connectionEpoch;this.setStatus("connecting"),this.resolveStartupNodeHostnames().then(r=>{let i;if(this.connectionEpoch!==s){A("discard connecting after resolving startup nodes because epoch not match: %d != %d",s,this.connectionEpoch),t(new n.RedisError("Connection is discarded because a new connection is made"));return}if("connecting"!==this.status){A("discard connecting after resolving startup nodes because the status changed to %s",this.status),t(new n.RedisError("Connection is aborted"));return}this.connectionPool.reset(r),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(e=>{A("Error while starting subscribers: %s",e)});let o=()=>{this.setStatus("ready"),this.retryAttempts=0,this.executeOfflineCommands(),this.resetNodesRefreshInterval(),e()},a=()=>{this.invokeReadyDelayedCallbacks(void 0),this.removeListener("close",i),this.manuallyClosing=!1,this.setStatus("connect"),this.options.enableReadyCheck?this.readyCheck((e,t)=>{e||t?(A("Ready check failed (%s). Reconnecting...",e||t),"connect"===this.status&&this.disconnect(!0)):o()}):o()};i=()=>{let e=Error("None of startup nodes is available");this.removeListener("refresh",a),this.invokeReadyDelayedCallbacks(e),t(e)},this.once("refresh",a),this.once("close",i),this.once("close",this.handleCloseEvent.bind(this)),this.refreshSlotsCache(e=>{e&&e.message===l.default.defaultMessage&&(c.default.prototype.silentEmit.call(this,"error",e),this.connectionPool.reset([]))}),this.subscriber.start(),this.options.shardedSubscribers&&this.shardedSubscribers.start().catch(e=>{A("Error while starting subscribers: %s",e)})}).catch(e=>{this.setStatus("close"),this.handleCloseEvent(e),this.invokeReadyDelayedCallbacks(e),t(e)})})}disconnect(e=!1){let t=this.status;this.setStatus("disconnecting"),e||(this.manuallyClosing=!0),this.reconnectTimeout&&!e&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null,A("Canceled reconnecting attempts")),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t?(this.setStatus("close"),this.handleCloseEvent()):this.connectionPool.reset([])}quit(e){let t=this.status;if(this.setStatus("disconnecting"),this.manuallyClosing=!0,this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===t){let t=(0,o.default)(Promise.resolve("OK"),e);return setImmediate((function(){this.setStatus("close"),this.handleCloseEvent()}).bind(this)),t}return(0,o.default)(Promise.all(this.nodes().map(e=>e.quit().catch(e=>{if(e.message===p.CONNECTION_CLOSED_ERROR_MSG)return"OK";throw e}))).then(()=>"OK"),e)}duplicate(e=[],t){let s=e.length>0?e:this.startupNodes.slice(0),r=Object.assign({},this.options,t);return this.options.redisOptions&&t?.redisOptions&&(r.redisOptions=Object.assign({},this.options.redisOptions,t.redisOptions)),new w(s,r)}nodes(e="all"){if("all"!==e&&"master"!==e&&"slave"!==e)throw Error('Invalid role "'+e+'". Expected "all", "master" or "slave"');return this.connectionPool.getNodes(e)}delayUntilReady(e){this._readyDelayedCallbacks.push(e)}get autoPipelineQueueSize(){let e=0;for(let t of this._autoPipelines.values())e+=t.length;return e}refreshSlotsCache(e){if(e&&this._refreshSlotsCacheCallbacks.push(e),this.isRefreshing)return;this.isRefreshing=!0;let t=this,s=e=>{for(let t of(this.isRefreshing=!1,this._refreshSlotsCacheCallbacks))t(e);this._refreshSlotsCacheCallbacks=[]},r=(0,p.shuffle)(this.connectionPool.getNodes()),i=null;!function e(n){if(n===r.length)return s(new l.default(l.default.defaultMessage,i));let o=r[n],a=`${o.options.host}:${o.options.port}`;A("getting slot cache from %s",a),t.getInfoFromNode(o,function(r){switch(t.status){case"close":case"end":return s(Error("Cluster is disconnected."));case"disconnecting":return s(Error("Cluster is disconnecting."))}r?(t.emit("node error",r,a),i=r,e(n+1)):(t.emit("refresh"),s())})}(0)}sendCommand(e,t,s){if("wait"===this.status&&this.connect().catch(p.noop),"end"===this.status)return e.reject(Error(p.CONNECTION_CLOSED_ERROR_MSG)),e.promise;if(!t&&!s&&"ready"===this.status&&(0,E.isHimportControlCommand)(e)&&(0,E.interceptHimportControlCommand)(this.connectionPool.getNodes("master"),e))return e.promise;let i=this.options.scaleReads;"master"!==i&&(e.isReadOnly||(0,r.exists)(e.name)&&(0,r.hasFlag)(e.name,"readonly")||(i="master"));let o=s?s.slot:e.getSlot(),l={},c=this,u=null;if(!s&&!v.has(e)){v.add(e);let t=e.reject;e.reject=function(s){let r=h.bind(null,!0);c.handleError(s,l,{moved:function(t,s){A("command %s is moved to %s",e.name,s),o=Number(t),c.slots[t]?c.slots[t][0]=s:c.slots[t]=[s],c._groupsBySlot[t]=c._groupsIds[c.slots[t].join(";")];let r=c.natMapper(s),i=(0,b.getNodeKey)(r);u&&(0,b.getNodeKey)(u.options)===i&&c.connectionPool.getInstanceByKey(i)===u?(A("MOVED redirect points back at %s; recreating its connection",i),c.connectionPool.recreate(r)):c.connectionPool.findOrCreate(r),h(),A("refreshing slot caches... (triggered by MOVED error)"),c.refreshSlotsCache()},ask:function(t,s){A("command %s is required to ask %s:%s",e.name,s);let r=c.natMapper(s);c.connectionPool.findOrCreate(r),h(!1,`${r.host}:${r.port}`)},tryagain:r,clusterDown:r,connectionClosed:r,maxRedirections:function(s){t.call(e,s)},defaults:function(){t.call(e,s)}})}}function h(r,l){let h;if("end"===c.status)return void e.reject(new n.AbortError("Cluster is ended."));if("ready"===c.status||"cluster"===e.name){if(s&&s.redis)h=s.redis;else if(a.default.checkFlag("ENTER_SUBSCRIBER_MODE",e.name)||a.default.checkFlag("EXIT_SUBSCRIBER_MODE",e.name)){if(c.options.shardedSubscribers&&("ssubscribe"==e.name||"sunsubscribe"==e.name)){let t=c.shardedSubscribers.getResponsibleSubscriber(o);if(!t)return void e.reject(new n.AbortError(`No sharded subscriber for slot: ${o}`));let s=-1;"ssubscribe"==e.name&&(s=c.shardedSubscribers.addChannels(e.getKeys())),"sunsubscribe"==e.name&&(s=c.shardedSubscribers.removeChannels(e.getKeys())),-1!==s?h=t.getInstance():e.reject(new n.AbortError("Possible CROSSSLOT error: All channels must hash to the same slot"))}else h=c.subscriber.getInstance();if(!h)return void e.reject(new n.AbortError("No subscriber for the cluster"))}else{if(!r){if("number"==typeof o&&c.slots[o]){let t=c.slots[o];if("function"==typeof i){let s=t.map(function(e){return c.connectionPool.getInstanceByKey(e)});Array.isArray(h=i(s,e))&&(h=(0,p.sample)(h)),h||(h=s[0])}else{let e;e="all"===i?(0,p.sample)(t):"slave"===i&&t.length>1?(0,p.sample)(t,1):t[0],h=c.connectionPool.getInstanceByKey(e)}}l&&(h=c.connectionPool.getInstanceByKey(l))}if(h||(h=("function"==typeof i?null:c.connectionPool.getSampleInstance(i))||c.connectionPool.getSampleInstance("all")),h&&!c.options.enableOfflineQueue&&"ready"!==h.status&&"wait"!==h.status)return void e.reject(Error(p.CONNECTION_CLOSED_ERROR_MSG))}s&&!s.redis&&(s.redis=h)}if(!h&&c.options.enableOfflineQueue)return void c.offlineQueue.push({command:e,stream:t,node:s});if(!h)return void e.reject(Error("Cluster isn't ready and enableOfflineQueue options is false"));if(u=h,l){let s=(0,E.getHimportBinding)(h);if(t||s?.role!=="master"?void 0:s.coordinator.classify(e))return void(0,b.waitForRedisReady)(h).then(()=>{if(!e.isSettled)return s.coordinator.prepareCommand(h,e)??Promise.resolve()}).then(()=>{e.isSettled||(s.coordinator.allowNextSend(h,e),h.asking(),h.sendCommand(e,t))},t=>{e.isSettled||e.reject(t)});h.asking()}h.sendCommand(e,t)}return h(),e.promise}sscanStream(e,t){return this.createScanStream("sscan",{key:e,options:t})}sscanBufferStream(e,t){return this.createScanStream("sscanBuffer",{key:e,options:t})}hscanStream(e,t){return this.createScanStream("hscan",{key:e,options:t})}hscanBufferStream(e,t){return this.createScanStream("hscanBuffer",{key:e,options:t})}zscanStream(e,t){return this.createScanStream("zscan",{key:e,options:t})}zscanBufferStream(e,t){return this.createScanStream("zscanBuffer",{key:e,options:t})}handleError(e,t,s){if(void 0===t.value?t.value=this.options.maxRedirections:t.value-=1,t.value<=0)return void s.maxRedirections(Error("Too many Cluster redirections. Last error: "+e));let r=e.message.split(" ");if("MOVED"===r[0]){let e=Number(r[1]);if(!Number.isInteger(e)||e<0||e>=16384)return void s.defaults();let t=this.options.retryDelayOnMoved;t&&"number"==typeof t?this.delayQueue.push("moved",s.moved.bind(null,e,r[2]),{timeout:t}):s.moved(e,r[2])}else"ASK"===r[0]?s.ask(r[1],r[2]):"TRYAGAIN"===r[0]?this.delayQueue.push("tryagain",s.tryagain,{timeout:this.options.retryDelayOnTryAgain}):"CLUSTERDOWN"===r[0]&&this.options.retryDelayOnClusterDown>0?this.delayQueue.push("clusterdown",s.connectionClosed,{timeout:this.options.retryDelayOnClusterDown,callback:this.refreshSlotsCache.bind(this)}):e.message===p.CONNECTION_CLOSED_ERROR_MSG&&this.options.retryDelayOnFailover>0&&"ready"===this.status?this.delayQueue.push("failover",s.connectionClosed,{timeout:this.options.retryDelayOnFailover,callback:this.refreshSlotsCache.bind(this)}):s.defaults()}resetOfflineQueue(){this.offlineQueue=new k}clearNodesRefreshInterval(){this.slotsTimer&&(clearTimeout(this.slotsTimer),this.slotsTimer=null)}resetNodesRefreshInterval(){if(this.slotsTimer||!this.options.slotsRefreshInterval)return;let e=()=>{this.slotsTimer=setTimeout(()=>{A('refreshing slot caches... (triggered by "slotsRefreshInterval" option)'),this.refreshSlotsCache(()=>{e()})},this.options.slotsRefreshInterval)};e()}setStatus(e){A("status: %s -> %s",this.status||"[empty]",e),this.status=e,process.nextTick(()=>{this.emit(e)})}handleCloseEvent(e){let t;e&&A("closed because %s",e),this.manuallyClosing||"function"!=typeof this.options.clusterRetryStrategy||(t=this.options.clusterRetryStrategy.call(this,++this.retryAttempts,e)),"number"==typeof t?(this.setStatus("reconnecting"),this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,A("Cluster is disconnected. Retrying after %dms",t),this.connect().catch(function(e){A("Got error %s when reconnecting. Ignoring...",e)})},t)):(this.options.shardedSubscribers&&this.subscriberGroupEmitter?.removeAllListeners(),this.setStatus("end"),this.flushQueue(Error("None of startup nodes is available")))}flushQueue(e){let t;for(;t=this.offlineQueue.shift();)t.command.reject(e)}executeOfflineCommands(){if(this.offlineQueue.length){let e;A("send %d commands in offline queue",this.offlineQueue.length);let t=this.offlineQueue;for(this.resetOfflineQueue();e=t.shift();)this.sendCommand(e.command,e.stream,e.node)}}natMapper(e){let t="string"==typeof e?e:`${e.host}:${e.port}`,s=null;return(this.options.natMap&&"function"==typeof this.options.natMap?s=this.options.natMap(t):this.options.natMap&&"object"==typeof this.options.natMap&&(s=this.options.natMap[t]),s)?(A("NAT mapping %s -> %O",t,s),Object.assign({},s)):"string"==typeof e?(0,b.nodeKeyToRedisOptions)(e):e}getInfoFromNode(e,t){if(!e)return t(Error("Node is disconnected"));let s=e.duplicate({enableOfflineQueue:!0,enableReadyCheck:!1,retryStrategy:null,protocol:2,replyMapping:"legacy",connectionName:(0,b.getConnectionName)("refresher",this.options.redisOptions&&this.options.redisOptions.connectionName)});s.on("error",p.noop),s.cluster("SLOTS",(0,p.timeout)((e,r)=>{if(s.disconnect(),e)return A("error encountered running CLUSTER.SLOTS: %s",e),t(e);if("disconnecting"===this.status||"close"===this.status||"end"===this.status){A("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s",r.length,this.status),t();return}let i=[];A("cluster slots result count: %d",r.length);for(let e=0;e<r.length;++e){let t=r[e],s=t[0],n=t[1],o=[];for(let e=2;e<t.length;e++){if(!t[e][0])continue;let s=this.natMapper({host:t[e][0],port:t[e][1]});s.readOnly=2!==e,i.push(s),o.push(s.host+":"+s.port)}A("cluster slots result [%d]: slots %d~%d served by %s",e,s,n,o);for(let e=s;e<=n;e++)this.slots[e]=o}this._groupsIds=Object.create(null);let n=0;for(let e=0;e<16384;e++){let t=(this.slots[e]||[]).join(";");if(!t.length){this._groupsBySlot[e]=void 0;continue}this._groupsIds[t]||(this._groupsIds[t]=++n),this._groupsBySlot[e]=this._groupsIds[t]}this.connectionPool.reset(i),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(e=>{A("Error while starting subscribers: %s",e)}),t()},this.options.slotsRefreshTimeout))}invokeReadyDelayedCallbacks(e){for(let t of this._readyDelayedCallbacks)process.nextTick(t,e);this._readyDelayedCallbacks=[]}readyCheck(e){this.cluster("INFO",(t,s)=>{let r;if(t)return e(t);if("string"!=typeof s)return e();let i=s.split("\r\n");for(let e=0;e<i.length;++e){let t=i[e].split(":");if("cluster_state"===t[0]){r=t[1];break}}"fail"===r?(A("cluster state not ok (%s)",r),e(null,r)):e()})}resolveSrv(e){return new Promise((t,s)=>{this.options.resolveSrv(e,(e,r)=>{if(e)return s(e);let i=this,n=(0,b.groupSrvRecords)(r),o=Object.keys(n).sort((e,t)=>parseInt(e)-parseInt(t));!function e(r){if(!o.length)return s(r);let a=n[o[0]],l=(0,b.weightSrvRecords)(a);a.records.length||o.shift(),i.dnsLookup(l.name).then(e=>t({host:e,port:l.port}),e)}()})})}dnsLookup(e){return new Promise((t,s)=>{this.options.dnsLookup(e,(r,i)=>{r?(A("failed to resolve hostname %s to IP: %s",e,r.message),s(r)):(A("resolved hostname %s to IP %s",e,i),t(i))})})}async resolveStartupNodeHostnames(){if(!Array.isArray(this.startupNodes)||0===this.startupNodes.length)throw Error("`startupNodes` should contain at least one node.");let e=(0,b.normalizeNodeOptions)(this.startupNodes),t=(0,b.getUniqueHostnamesFromOptions)(e);if(0===t.length)return e;let s=await Promise.all(t.map((this.options.useSRVRecords?this.resolveSrv:this.dnsLookup).bind(this))),r=(0,p.zipMap)(t,s);return e.map(e=>{let t=r.get(e.host);return t?this.options.useSRVRecords?Object.assign({},e,t):Object.assign({},e,{host:t}):e})}createScanStream(e,{key:t,options:s={}}){return new u.default({objectMode:!0,key:t,redis:this,command:e,...s})}createShardedSubscriberGroup(){this.subscriberGroupEmitter=new i.EventEmitter,this.shardedSubscribers=new _.default(this.subscriberGroupEmitter,this.options);let e=e=>{e instanceof l.default&&this.disconnect(!0)};for(let t of(this.subscriberGroupEmitter.on("-node",(t,s)=>{this.emit("-node",t,s),this.refreshSlotsCache(e)}),this.subscriberGroupEmitter.on("subscriberConnectFailed",({delay:t,error:s})=>{this.emit("error",s),setTimeout(()=>{this.refreshSlotsCache(e)},t)}),this.subscriberGroupEmitter.on("moved",()=>{this.refreshSlotsCache(e)}),this.subscriberGroupEmitter.on("-subscriber",()=>{this.emit("-subscriber")}),this.subscriberGroupEmitter.on("+subscriber",()=>{this.emit("+subscriber")}),this.subscriberGroupEmitter.on("nodeError",(e,t)=>{this.emit("nodeError",e,t)}),this.subscriberGroupEmitter.on("subscribersReady",()=>{this.emit("subscribersReady")}),["smessage","smessageBuffer"]))this.subscriberGroupEmitter.on(t,(e,s,r)=>{this.emit(t,e,s,r)})}}(0,d.default)(w,i.EventEmitter),(0,h.addTransactionSupport)(w.prototype),s.default=w},78695,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.getConnectionName=s.weightSrvRecords=s.groupSrvRecords=s.getUniqueHostnamesFromOptions=s.normalizeNodeOptions=s.nodeKeyToRedisOptions=s.getNodeKey=s.waitForRedisReady=void 0;let r=e.r(26898),i=e.r(4446);s.waitForRedisReady=function(e){return"ready"===e.status?Promise.resolve():"wait"===e.status?e.connect():"end"===e.status?Promise.reject(Error(r.CONNECTION_CLOSED_ERROR_MSG)):new Promise((t,s)=>{let i=()=>{e.removeListener("end",n),t()},n=()=>{e.removeListener("ready",i),s(Error(r.CONNECTION_CLOSED_ERROR_MSG))};e.once("ready",i),e.once("end",n)})},s.getNodeKey=function(e){return e.port=e.port||6379,e.host=e.host||"127.0.0.1",e.host+":"+e.port},s.nodeKeyToRedisOptions=function(e){let t=e.lastIndexOf(":");if(-1===t)throw Error(`Invalid node key ${e}`);return{host:e.slice(0,t),port:Number(e.slice(t+1))}},s.normalizeNodeOptions=function(e){return e.map(e=>{let t={};if("object"==typeof e)Object.assign(t,e);else if("string"==typeof e)Object.assign(t,(0,r.parseURL)(e));else if("number"==typeof e)t.port=e;else throw Error("Invalid argument "+e);return"string"==typeof t.port&&(t.port=parseInt(t.port,10)),delete t.db,t.port||(t.port=6379),t.host||(t.host="127.0.0.1"),(0,r.resolveTLSProfile)(t)})},s.getUniqueHostnamesFromOptions=function(e){let t={};return e.forEach(e=>{t[e.host]=!0}),Object.keys(t).filter(e=>!(0,i.isIP)(e))},s.groupSrvRecords=function(e){let t={};for(let s of e)t.hasOwnProperty(s.priority)?(t[s.priority].totalWeight+=s.weight,t[s.priority].records.push(s)):t[s.priority]={totalWeight:s.weight,records:[s]};return t},s.weightSrvRecords=function(e){if(1===e.records.length)return e.totalWeight=0,e.records.shift();let t=Math.floor(Math.random()*(e.totalWeight+e.records.length)),s=0;for(let[r,i]of e.records.entries())if((s+=1+i.weight)>t)return e.totalWeight-=i.weight,e.records.splice(r,1),i},s.getConnectionName=function(e,t){let s=`ioredis-cluster(${e})`;return t?`${s}:${t}`:s}},58451,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=(0,e.r(26898).Debug)("AbstractConnector");s.default=class{constructor(e){this.connecting=!1,this.disconnectTimeout=e}check(e){return!0}disconnect(){if(this.connecting=!1,this.stream){let e=this.stream,t=setTimeout(()=>{r("stream %s:%s still open, destroying it",e.remoteAddress,e.remotePort),e.destroy()},this.disconnectTimeout);e.on("close",()=>clearTimeout(t)),e.end()}}}},87575,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.FailoverDetector=void 0;let r=(0,e.r(26898).Debug)("FailoverDetector"),i="+switch-master";s.FailoverDetector=class{constructor(e,t){this.isDisconnected=!1,this.connector=e,this.sentinels=t}cleanup(){for(let e of(this.isDisconnected=!0,this.sentinels))e.client.disconnect()}async subscribe(){r("Starting FailoverDetector");let e=[];for(let t of this.sentinels){let s=t.client.subscribe(i).catch(e=>{r("Failed to subscribe to failover messages on sentinel %s:%s (%s)",t.address.host||"127.0.0.1",t.address.port||26739,e.message)});e.push(s),t.client.on("message",e=>{this.isDisconnected||e!==i||this.disconnect()})}await Promise.all(e)}disconnect(){this.isDisconnected=!0,r("Failover detected, disconnecting"),this.connector.disconnect()}}},85649,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.default=class{constructor(e){this.cursor=0,this.sentinels=e.slice(0)}next(){let e=this.cursor>=this.sentinels.length;return{done:e,value:e?void 0:this.sentinels[this.cursor++]}}reset(e){e&&this.sentinels.length>1&&1!==this.cursor&&this.sentinels.unshift(...this.sentinels.splice(this.cursor-1)),this.cursor=0}add(e){for(let s=0;s<this.sentinels.length;s++){var t;if(t=this.sentinels[s],(e.host||"127.0.0.1")===(t.host||"127.0.0.1")&&(e.port||26379)===(t.port||26379))return!1}return this.sentinels.push(e),!0}toString(){return`${JSON.stringify(this.sentinels)} @${this.cursor}`}}},77420,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SentinelIterator=void 0;let r=e.r(4446),i=e.r(26898),n=e.r(55004),o=e.r(85649);s.SentinelIterator=o.default;let a=e.r(58451),l=e.r(66735),c=e.r(87575),u=(0,i.Debug)("SentinelConnector");class h extends a.default{constructor(e){if(super(e.disconnectTimeout),this.options=e,this.emitter=null,this.failoverDetector=null,!this.options.sentinels.length)throw Error("Requires at least one sentinel to connect to.");if(!this.options.name)throw Error("Requires the name of master.");this.sentinelIterator=new o.default(this.options.sentinels)}check(e){let t=!e.role||this.options.role===e.role;return t||(u("role invalid, expected %s, but got %s",this.options.role,e.role),this.sentinelIterator.next(),this.sentinelIterator.next(),this.sentinelIterator.reset(!0)),t}disconnect(){super.disconnect(),this.failoverDetector&&this.failoverDetector.cleanup()}connect(e){let t;this.connecting=!0,this.retryAttempts=0;let s=async()=>{let o=this.sentinelIterator.next();if(o.done){this.sentinelIterator.reset(!1);let r="function"==typeof this.options.sentinelRetryStrategy?this.options.sentinelRetryStrategy(++this.retryAttempts):null,i="number"!=typeof r?"All sentinels are unreachable and retry is disabled.":`All sentinels are unreachable. Retrying from scratch after ${r}ms.`;t&&(i+=` Last error: ${t.message}`),u(i);let n=Error(i);if("number"==typeof r)return e("error",n),await new Promise(e=>setTimeout(e,r)),s();throw n}let a=null,l=null;try{a=await this.resolve(o.value)}catch(e){l=e}if(!this.connecting)throw Error(i.CONNECTION_CLOSED_ERROR_MSG);let c=o.value.host+":"+o.value.port;if(a)return u("resolved: %s:%s from sentinel %s",a.host,a.port,c),this.options.enableTLSForSentinelMode&&this.options.tls?(Object.assign(a,this.options.tls),this.stream=(0,n.connect)(a),this.stream.once("secureConnect",this.initFailoverDetector.bind(this))):(this.stream=(0,r.createConnection)(a),this.stream.once("connect",this.initFailoverDetector.bind(this))),this.stream.once("error",e=>{this.firstError=e}),this.stream;{let r=l?"failed to connect to sentinel "+c+" because "+l.message:"connected to sentinel "+c+" successfully, but got an invalid reply: "+a;return u(r),e("sentinelError",Error(r)),l&&(t=l),s()}};return s()}async updateSentinels(e){if(!this.options.updateSentinels)return;let t=await e.sentinel("sentinels",this.options.name);Array.isArray(t)&&(t.map(i.packObject).forEach(e=>{if(-1===(e.flags?e.flags.split(","):[]).indexOf("disconnected")&&e.ip&&e.port){let t=this.sentinelNatResolve(p(e));this.sentinelIterator.add(t)&&u("adding sentinel %s:%s",t.host,t.port)}}),u("Updated internal sentinels: %s",this.sentinelIterator))}async resolveMaster(e){let t=await e.sentinel("get-master-addr-by-name",this.options.name);return await this.updateSentinels(e),this.sentinelNatResolve(Array.isArray(t)?{host:t[0],port:Number(t[1])}:null)}async resolveSlave(e){let t=await e.sentinel("slaves",this.options.name);if(!Array.isArray(t))return null;let s=t.map(i.packObject).filter(e=>e.flags&&!e.flags.match(/(disconnected|s_down|o_down)/));return this.sentinelNatResolve(function(e,t){let s;if(0===e.length)return null;if("function"==typeof t)s=t(e);else if(null!==t&&"object"==typeof t){let r=Array.isArray(t)?[...t]:[t];r.sort((e,t)=>{let s=e.prio??1,r=t.prio??1;return s<r?-1:+(s>r)});for(let t=0;t<r.length;t++){for(let i=0;i<e.length;i++){let n=e[i];if(n.ip===r[t].ip&&n.port===r[t].port){s=n;break}}if(s)break}}return s||(s=(0,i.sample)(e)),p(s)}(s,this.options.preferredSlaves))}sentinelNatResolve(e){if(!e||!this.options.natMap)return e;let t=`${e.host}:${e.port}`,s=e;return"function"==typeof this.options.natMap?s=this.options.natMap(t)||e:"object"==typeof this.options.natMap&&(s=this.options.natMap[t]||e),s}connectToSentinel(e,t){return new l.default({port:e.port||26379,host:e.host,username:this.options.sentinelUsername||null,password:this.options.sentinelPassword||null,family:e.family||("path"in this.options&&this.options.path?void 0:this.options.family),tls:this.options.sentinelTLS,retryStrategy:null,enableReadyCheck:!1,protocol:this.options.protocol,replyMapping:"legacy",connectTimeout:this.options.connectTimeout,commandTimeout:this.options.sentinelCommandTimeout,...t})}async resolve(e){let t=this.connectToSentinel(e);t.on("error",d);try{if("slave"===this.options.role)return await this.resolveSlave(t);return await this.resolveMaster(t)}finally{t.disconnect()}}async initFailoverDetector(){if(!this.options.failoverDetector)return;this.sentinelIterator.reset(!0);let e=[];for(;e.length<this.options.sentinelMaxConnections;){let{done:t,value:s}=this.sentinelIterator.next();if(t)break;let r=this.connectToSentinel(s,{lazyConnect:!0,retryStrategy:this.options.sentinelReconnectStrategy,protocol:this.options.protocol,replyMapping:"legacy"});r.on("reconnecting",()=>{this.emitter?.emit("sentinelReconnecting")}),e.push({address:s,client:r})}this.sentinelIterator.reset(!1),this.failoverDetector&&this.failoverDetector.cleanup(),this.failoverDetector=new c.FailoverDetector(this,e),await this.failoverDetector.subscribe(),this.emitter?.emit("failoverSubscribed")}}function p(e){return{host:e.ip,port:Number(e.port)}}function d(){}s.default=h},90851,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=e.r(4446),i=e.r(55004),n=e.r(26898),o=e.r(58451);class a extends o.default{constructor(e){super(e.disconnectTimeout),this.options=e}connect(e){let t,{options:s}=this;return this.connecting=!0,"path"in s&&s.path?t={path:s.path}:(t={},"port"in s&&null!=s.port&&(t.port=s.port),"host"in s&&null!=s.host&&(t.host=s.host),"family"in s&&null!=s.family&&(t.family=s.family)),s.tls&&Object.assign(t,s.tls),new Promise((e,o)=>{process.nextTick(()=>{if(!this.connecting)return void o(Error(n.CONNECTION_CLOSED_ERROR_MSG));try{s.tls?this.stream=(0,i.connect)(t):this.stream=(0,r.createConnection)(t)}catch(e){o(e);return}this.stream.once("error",e=>{this.firstError=e}),e(this.stream)})})}}s.default=a},18652,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),s.SentinelConnector=s.StandaloneConnector=void 0,s.StandaloneConnector=e.r(90851).default,s.SentinelConnector=e.r(77420).default},86961,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});let r=`-----BEGIN CERTIFICATE-----
|
|
2
2
|
MIIDTzCCAjegAwIBAgIJAKSVpiDswLcwMA0GCSqGSIb3DQEBBQUAMD4xFjAUBgNV
|
|
3
3
|
BAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1
|
|
4
4
|
dGhvcml0eTAeFw0xMzEwMDExMjE0NTVaFw0yMzA5MjkxMjE0NTVaMD4xFjAUBgNV
|