@hivemagnus/magnus-ui 3.6.0 → 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/{1bn40ef0zair9.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/{0d6kculhmue59.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/IOi-LmbFghqZcllGm0tny/_buildManifest.js +0 -20
- package/dist/app/apps/dashboard/.next/static/chunks/015s19fe5dtkp.css +0 -2
- package/dist/app/apps/dashboard/.next/static/chunks/06xzeulnw897e.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/07tx3h4lr-lxl.js +0 -6
- package/dist/app/apps/dashboard/.next/static/chunks/0j0dzrd0ev-gx.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1-pj3rx01kcq0.js +0 -4
- 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/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/{IOi-LmbFghqZcllGm0tny → rWpgppq64sqgeZO3-MlD1}/_clientMiddlewareManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{IOi-LmbFghqZcllGm0tny → rWpgppq64sqgeZO3-MlD1}/_ssgManifest.js +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
module.exports=[60985,18682,a=>{"use strict";let b,c,d;var e=a.i(5246),f=a.i(66680),g=a.i(51403),h=a.i(2157);function i(a,b){let c=a[`${b}_B64`];if(null!=c){if(!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(c))throw Error(`${b}_B64 is not valid base64`);return Buffer.from(c,"base64").toString("utf8")}return a[b]}let j=()=>new TextEncoder().encode(function(a=process.env){if(a.SESSION_SECRET)return a.SESSION_SECRET;throw Error(a.JWT_SECRET?"SESSION_SECRET is required; the JWT_SECRET session fallback was removed after it expired on 2026-10-01":"SESSION_SECRET is required")}());async function k(){return b||(b=new g.Redis(process.env.REDIS_URL??"redis://127.0.0.1:6379",{maxRetriesPerRequest:1,connectTimeout:2e3,commandTimeout:2500,enableOfflineQueue:!1})).on("error",()=>void 0),("connecting"===b.status||"connect"===b.status)&&await new Promise((a,c)=>{let d=()=>{b.off("error",e),a()},e=a=>{b.off("ready",d),c(a)};b.once("ready",d),b.once("error",e)}),b}async function l(a){var b;let c;if("hive"===a.provider)return!0;if("string"!=typeof a.username||!a.sessionId||!/^[a-f0-9-]{36}$/.test(a.sessionId))return!1;let d=(b=a.username,`magnus_session:local:${(0,f.createHmac)("sha256",j()).update(b).digest("hex")}`),[e,g]=await (await k()).mget(`${d}:generation`,`${d}:session:${a.sessionId}`);return!!(e&&g===`${e}:${c=function(a=process.env){let b=i(a,"DASHBOARD_ADMIN_USERNAME"),c=i(a,"DASHBOARD_ADMIN_PASSWORD");if(b&&c)return{username:b,password:c,source:"dashboard-admin-password",version:2};let d=i(a,"DASHBOARD_ADMIN_PASSWORD_HASH");if(!!b!=!!d)throw Error("DASHBOARD_ADMIN_USERNAME and DASHBOARD_ADMIN_PASSWORD (or _HASH) must be configured together");if(b&&d){if(!d.startsWith("$argon2id$"))throw Error("DASHBOARD_ADMIN_PASSWORD_HASH must be an Argon2id hash");return{username:b,passwordHash:d,source:"dashboard-admin-hash",version:2}}throw Error("Dedicated dashboard administrator credentials are required (DASHBOARD_ADMIN_USERNAME with DASHBOARD_ADMIN_PASSWORD_HASH)")}(),(0,f.createHmac)("sha256",j()).update(JSON.stringify([c.username,c.passwordHash??c.password,process.env.LOCAL_SESSION_GENERATION??""])).digest("hex")}`)}class m extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(a,b){super(a,b),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class n extends m{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(a,b,c="unspecified",d="unspecified"){super(a,{cause:{claim:c,reason:d,payload:b}}),this.claim=c,this.reason=d,this.payload=b}}class o extends m{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(a,b,c="unspecified",d="unspecified"){super(a,{cause:{claim:c,reason:d,payload:b}}),this.claim=c,this.reason=d,this.payload=b}}class p extends m{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"}class q extends m{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"}class r extends m{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"}class s extends m{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}class t extends m{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(a="signature verification failed",b){super(a,b)}}let u=[["verify"],["sign"]];function v(a){let b={name:"HMAC",hash:`SHA-${a}`};return{kty:["oct"],secret:!0,subtle:b,signing:b,usages:u}}function w(a,b){let c={name:b?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:`SHA-${a}`};return{kty:["RSA"],subtle:c,signing:b?{...c,saltLength:b}:c,usages:u,minRsaBits:2048}}function x(a,b){return{kty:["EC"],crv:a,subtle:{name:"ECDSA",namedCurve:a},signing:{name:"ECDSA",hash:`SHA-${b}`},usages:u}}function y(){let a={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:a,signing:a,usages:u}}function z(a){let b={name:`ML-DSA-${a}`};return{kty:["AKP"],subtle:b,signing:b,usages:u}}let A=function(a){let b={__proto__:null};for(let c in a)b[c]={...a[c],alg:c};return b}({HS256:v(256),HS384:v(384),HS512:v(512),RS256:w(256),RS384:w(384),RS512:w(512),PS256:w(256,32),PS384:w(384,48),PS512:w(512,64),ES256:x("P-256",256),ES384:x("P-384",384),ES512:x("P-521",512),EdDSA:y(),Ed25519:y(),"ML-DSA-44":z(44),"ML-DSA-65":z(65),"ML-DSA-87":z(87)}),B=new TextEncoder,C=new TextDecoder,D=new TextDecoder("utf-8",{fatal:!0}),E=/[^\x00-\x7f]/;function F(a){if("string"==typeof a&&a.length>=128){if(E.test(a))throw TypeError("non-ASCII string encountered in encode()");return B.encode(a)}let b=new Uint8Array(a.length);for(let c=0;c<a.length;c++){let d=a.charCodeAt(c);if(d>127)throw TypeError("non-ASCII string encountered in encode()");b[c]=d}return b}function G(a){try{return function(a,b=!1){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(a,{alphabet:b?"base64url":"base64"});if(b){if(a.includes("+")||a.includes("/"))throw TypeError("Invalid base64url");a=a.replace(/-/g,"+").replace(/_/g,"/")}let c=atob(a),d=new Uint8Array(c.length);for(let a=0;a<c.length;a++)d[a]=c.charCodeAt(a);return d}("string"==typeof a?a:C.decode(a),!0)}catch(a){throw TypeError("The input to be decoded is not correctly encoded.",{cause:a})}}function H(a){if("object"!=typeof a||null===a||"[object Object]"!==Object.prototype.toString.call(a))return!1;let b=Object.getPrototypeOf(a);return null===b||null===Object.getPrototypeOf(b)}function I(a,b,c){try{return G(a)}catch(a){throw new c(`Failed to base64url decode the ${b}`,{cause:a})}}let J={__proto__:null,b64:!0};async function K(a,b,d){let e,f,{alg:g,secret:h}=a,i="decrypt"===d||"sign"===d;if(h&&b instanceof Uint8Array)return b;if(H(b)){if("string"!=typeof(e=function(a){let b={__proto__:null,...a};if(void 0!==b.ext&&"boolean"!=typeof b.ext)throw TypeError('"ext" (Extractable) Parameter must be a boolean');if(void 0!==b.key_ops){let a=b.key_ops,c=Array.isArray(a)?[...a]:void 0;if(!c||c.some(a=>"string"!=typeof a)||new Set(c).size!==c.length)throw TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');b.key_ops=c}return b}(b)).kty)throw O(g,b,h);if(!(h?"oct"===e.kty&&"string"==typeof e.k:"oct"!==e.kty&&(i?"AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d:void 0===e.d&&void 0===e.priv)))throw TypeError(h?'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present':`JSON Web Key for this operation must be a ${i?"private":"public"} JWK`);if(((a,b,c)=>{let{alg:d}=a;if(void 0!==b.use){let a="sign"===c||"verify"===c?"sig":"enc";if(b.use!==a)throw TypeError(`Invalid key for this operation, its "use" must be "${a}" when present`)}if("AKP"===b.kty&&void 0===b.alg)throw TypeError('missing "alg" (Algorithm) Parameter value');if(void 0!==b.alg&&b.alg!==d)throw TypeError(`Invalid key for this operation, its "alg" must be "${d}" when present`);if(Array.isArray(b.key_ops)){let d="encrypt"===c||"decrypt"===c?a.ops?.[+("encrypt"!==c)]:c;if(d&&!b.key_ops.includes(d))throw TypeError(`Invalid key for this operation, its "key_ops" must include "${d}" when present`)}})(a,e,d),"oct"===e.kty)return G(e.k);if(!Object.isFrozen(b)){let{key_ops:a}=b;Array.isArray(a)&&Object.freeze(a),Object.freeze(b)}}else{if(!N(b))throw O(g,b,h);let a=h?"secret":i?"private":"public";if(b.type!==a&&(h||["secret","public","private"].includes(b.type)))throw TypeError(`${b[Symbol.toStringTag]} instances must be of type "${a}" for the ${g} algorithm`);if(M(b))return b;if("secret"===(f=b).type)return f.export()}let j=(c||=new WeakMap).get(b);if(j?.[g])return j[g];if(j||c.set(b,j={}),f&&"function"==typeof f.toCryptoKey){let b="public"===f.type,c=L[f.asymmetricKeyDetails?.namedCurve],d=a.resolve?.({crv:c,asymmetricKeyType:f.asymmetricKeyType})??a.subtle;return j[g]=f.toCryptoKey(d,b,a.usages[+!b])}return(e??=f.export({format:"jwk"})).alg=g,j[g]=await Q(a,e)}let L={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"},M=a=>{if(a?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return a instanceof CryptoKey}catch{return!1}},N=a=>M(a)||a?.[Symbol.toStringTag]==="KeyObject";function O(a,b,c){let d=["CryptoKey","KeyObject","JSON Web Key"];return c&&d.push("Uint8Array"),TypeError(function(a,b,...c){if(c.length>2){let b=c.pop();a+=`one of type ${c.join(", ")}, or ${b}.`}else 2===c.length?a+=`one of type ${c[0]} or ${c[1]}.`:a+=`of type ${c[0]}.`;return null==b?a+=` Received ${b}`:"function"==typeof b&&b.name?a+=` Received function ${b.name}`:"object"==typeof b&&null!=b&&b.constructor?.name&&(a+=` Received an instance of ${b.constructor.name}`),a}(`Key for the ${a} algorithm must be `,b,...d))}let P=(a,b="algorithm.name")=>TypeError(`CryptoKey does not support this operation, its ${b} must be ${a}`);async function Q(a,b,c){if(!a.kty.includes(b.kty))throw new q('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');let d=a.resolve?.({kty:b.kty,crv:b.crv})??a.subtle,e=!!(b.d||b.priv),f={...b,ext:c??b.ext};return"AKP"!==f.kty&&delete f.alg,delete f.use,crypto.subtle.importKey("jwk",f,d,f.ext??!e,b.key_ops??a.usages[+!!e])}async function R(a,b,c,d=!1){return a instanceof Uint8Array&&(a=await crypto.subtle.importKey("raw",a,b,d,[c])),function(a,b,c){let d=a.algorithm;if(d.name!==b.name)throw P(b.name);if(b.hash&&d.hash?.name!==b.hash)throw P(b.hash,"algorithm.hash");if(b.namedCurve&&d.namedCurve!==b.namedCurve)throw P(b.namedCurve,"algorithm.namedCurve");if(void 0!==b.length&&d.length!==b.length)throw P(b.length,"algorithm.length");if(c&&!a.usages.includes(c))throw TypeError(`CryptoKey does not support this operation, its usages must include ${c}.`)}(a,b,c),a}function S(a){try{return F(a)}catch(a){throw new r("JWS Compact Serialization payload must use only ASCII characters",{cause:a})}}async function T(a,b,c,d,e){let{protected:f,header:g,payload:h}=a,i=e??(void 0===f?{}:function(a,b,c){let d;try{d=JSON.parse(D.decode(G(a)))}catch(a){throw new b(c,{cause:a})}if(!H(d))throw new b(c);return d}(f,r,"JWS Protected Header is invalid"));if(!function(...a){let b=new Set;for(let c of a)if(c)for(let a of Object.keys(c)){if(b.has(a))return!1;b.add(a)}return!0}(i,g))throw new r("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let j={...i,...g},k=function(a,b){if(b.includes("b64")){let b=a.b64;if("boolean"!=typeof b)throw new r('The "b64" (base64url-encode payload) Header Parameter must be a boolean');return b}return!0}(i,function(a,b,c,d,e){if(void 0!==e.crit&&d?.crit===void 0)throw new a('"crit" (Critical) Header Parameter MUST be integrity protected');if(!d||void 0===d.crit)return[];if(!Array.isArray(d.crit)||0===d.crit.length||d.crit.some(a=>"string"!=typeof a||0===a.length))throw new a('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let f=void 0===c?b:{__proto__:null,...c,...b};for(let b of d.crit){if(!(b in f))throw new q(`Extension Header Parameter "${b}" is not recognized`);if(!Object.hasOwn(e,b)||void 0===e[b])throw new a(`Extension Header Parameter "${b}" is missing`);if(f[b]&&(!Object.hasOwn(d,b)||void 0===d[b]))throw new a(`Extension Header Parameter "${b}" MUST be integrity protected`)}return d.crit}(r,J,b[1],i,j)),{alg:l}=j;if("string"!=typeof l||!l)throw new r('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(b[0]&&!b[0].has(l))throw new p('"alg" (Algorithm) Header Parameter value not allowed');if(k){if("string"!=typeof h)throw new r("JWS Payload must be a string")}else if("string"!=typeof h&&!(h instanceof Uint8Array))throw new r("JWS Payload must be a string or an Uint8Array instance");let m=k||"string"!=typeof h?h:d(h),n=!1;"function"==typeof c&&(c=await c(i,a),n=!0);let o=function(a){let b="string"==typeof a?A[a]:void 0;if(!b)throw new q(`alg ${a} is not supported either by JOSE or your javascript runtime`);return b}(l),s=function(...a){let b=new Uint8Array(a.reduce((a,{length:b})=>a+b,0)),c=0;for(let d of a)b.set(d,c),c+=d.length;return b}(void 0!==f?F(f):new Uint8Array,F("."),"string"==typeof m?b[2]??=function(a,b,c){try{return F(a)}catch(a){throw new c(`The ${b} is not a valid base64url string`,{cause:a})}}(m,"payload",r):m),u=I(a.signature,"signature",r),v=await K(o,c,"verify"),w=await R(v,o.subtle,"verify");o.minRsaBits&&function(a,b){let{modulusLength:c}=b.algorithm;if("number"!=typeof c||c<2048)throw TypeError(`${a} requires key modulusLength to be 2048 bits or larger`)}(o.alg,w);let x=!1;try{x=await crypto.subtle.verify(o.signing,w,u,s)}catch(a){throw new t(void 0,{cause:a})}if(!x)throw new t;let y={payload:"string"==typeof m?I(m,"payload",r):m};return void 0!==f&&(y.protectedHeader=i),void 0!==g&&(y.unprotectedHeader=g),n?[{...y,key:v},k]:[y,k]}async function U(a,b,c){if(a instanceof Uint8Array&&(a=C.decode(a)),"string"!=typeof a)throw new r("Compact JWS must be a string or Uint8Array");let{0:d,1:e,2:f,length:g}=a.split(".");if(3!==g)throw new r("Invalid Compact JWS");return T({payload:e,protected:d,signature:f},b,c,S)}let V={s:1,m:60,h:3600,d:86400,w:604800,y:0x1e187e0},W=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,X="check_failed";function Y(){throw TypeError("Invalid time period format")}function Z(a){"string"!=typeof a&&Y();let b=W.exec(a);(!b||b[4]&&b[1])&&Y();let c=Math.round(parseFloat(b[2])*V[b[3][0].toLowerCase()]);return Number.isFinite(c)||Y(),"-"===b[1]||b[4]?.toLowerCase()==="ago"?-c:c}function $(a,b){if(!Number.isFinite(b))throw TypeError(`Invalid ${a} input`);return b}let _=a=>{let b=a.toLowerCase();return a.includes("/")?b:`application/${b}`};function aa(a,b,c=!1){let d=a[b];if(!(void 0===d&&!c)){if("number"!=typeof d)throw new n(`"${b}" claim must be a number`,a,b,"invalid");return d}}function ab(a,b){throw new n(`unexpected "${b}" claim value`,a,b,X)}async function ac(a,b,c){let[d,e]=await U(a,[c&&function(a,b){if(void 0!==b&&(!Array.isArray(b)||b.some(a=>"string"!=typeof a)))throw TypeError(`"${a}" option must be an array of strings`);return void 0===b?void 0:new Set(b)}("algorithms",c.algorithms),c?.crit],b);if(!e)throw new s("JWTs MUST NOT use unencoded payload");let f=function(a,b,c={}){let d,e,f;try{d=JSON.parse(D.decode(b))}catch(a){throw new s("JWT Claims Set must be a top-level JSON object",{cause:a})}if(!H(d))throw new s("JWT Claims Set must be a top-level JSON object");let{typ:g}=c;if(void 0!==g&&("string"!=typeof a.typ||_(a.typ)!==_(g)))throw new n('unexpected "typ" JWT header value',d,"typ",X);let{requiredClaims:h=[],issuer:i,subject:j,audience:k,maxTokenAge:l}=c,m=[...h];for(let a of(void 0!==l&&m.push("iat"),void 0!==k&&m.push("aud"),void 0!==j&&m.push("sub"),void 0!==i&&m.push("iss"),new Set(m.reverse())))if(!Object.hasOwn(d,a))throw new n(`missing required "${a}" claim`,d,a,"missing");void 0===i||(Array.isArray(i)?i:[i]).includes(d.iss)||ab(d,"iss"),void 0!==j&&d.sub!==j&&ab(d,"sub"),void 0===k||(e=d.aud,f="string"==typeof k?[k]:k,"string"==typeof e?f.includes(e):!!Array.isArray(e)&&f.some(a=>e.includes(a)))||ab(d,"aud");let{clockTolerance:p}=c,q=0;if("string"==typeof p)q=Z(p);else if(void 0!==p){if("number"!=typeof p)throw TypeError("Invalid clockTolerance option type");q=p}if($("clockTolerance option",q),q<0)throw TypeError("Invalid clockTolerance option input");let{currentDate:r}=c,t=$("currentDate option",Math.floor((void 0===r?new Date:r).getTime()/1e3)),u=aa(d,"iat",void 0!==l),v=aa(d,"nbf");if(void 0!==v&&v>t+q)throw new n('"nbf" claim timestamp check failed',d,"nbf",X);let w=aa(d,"exp");if(void 0!==w&&w<=t-q)throw new o('"exp" claim timestamp check failed',d,"exp",X);if(void 0!==l){let a=t-u,b=$("maxTokenAge option","number"==typeof l?l:Z(l));if(b<0)throw TypeError("Invalid maxTokenAge option input");if(a-q>b)throw new o('"iat" claim timestamp check failed (too far in the past)',d,"iat",X);if(a<-q)throw new n('"iat" claim timestamp check failed (it should be in the past)',d,"iat",X)}return d}(d.protectedHeader,d.payload,c);return{...d,payload:f}}var ad=a.i(79952);let ae=(0,ad.f)("SESSION_ISSUER"),af=(0,ad.f)("SESSION_AUDIENCE");function ag(){let a=process.env.SESSION_SECRET;if(!a)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(a)}async function ah(a,b=!1){let c;try{let{payload:b}=await ac(a,ag(),{algorithms:["HS256"],issuer:ae,audience:af});c=b}catch{return null}try{return await l(c)?c:null}catch(a){if(b)throw a;return null}}async function ai(){let a=(d||(d=new g.Redis(process.env.REDIS_URL??"redis://127.0.0.1:6379",{maxRetriesPerRequest:1,enableOfflineQueue:!1,lazyConnect:!0})).on("error",()=>void 0),d);return"wait"===a.status&&await a.connect(),a}async function aj(a,b){var c;let d,e;if("hive"!==a.provider)return null;if(!a.sessionId||!/^[A-Za-z0-9_-]{43}$/.test(a.sessionId))throw Error("Invalid Hive session");let g=new URL(process.env.CONTROL_API_URL);if(new URL(b).origin!==g.origin)throw Error("Hive delegation is limited to the canonical Control API");let h=await (await ai()).get(`magnus:hive:session:${a.sessionId}`);if(!h)throw Error("Hive session expired");let i=(c=a.sessionId,d=Buffer.from(h,"base64url"),(e=(0,f.createDecipheriv)("aes-256-gcm",(0,f.createHash)("sha256").update("magnus:hive-session:v1\0").update(ag()).digest(),d.subarray(0,12))).setAAD(Buffer.from(c)),e.setAuthTag(d.subarray(12,28)),JSON.parse(Buffer.concat([e.update(d.subarray(28)),e.final()]).toString("utf8")));if(i.userId!==a.userId||i.expiresAt<=Date.now()/1e3)throw Error("Hive session identity expired");return i.accessToken}var ak=a.i(26294);let al=process.env.CONTROL_API_CA_PATH?.trim();if(al&&!(0,h.existsSync)(al))throw Error(`CONTROL_API_CA_PATH does not exist: ${al}`);let am=new ak.Agent({connect:{rejectUnauthorized:!0,...al?{ca:(0,h.readFileSync)(al)}:{}}});async function an(a,b,c){let d=c?.timeoutMs??Number(process.env.DASHBOARD_DEPENDENCY_TIMEOUT_MS??8e3),e=b?.signal,f=new Headers(b?.headers).get("accept")?.includes("text/event-stream")?null:AbortSignal.timeout(d),g=e&&f?AbortSignal.any([e,f]):e??f??void 0;return await (0,ak.fetch)(a,{...b,signal:g,dispatcher:am})}var ao=a.i(12714),ap=a.i(50227);let aq="enc2:",ar="enc:";function as(a){return(0,f.createHash)("sha256").update(a).digest()}function at(){let a=process.env.CONTROL_NODE_CREDENTIAL_KEY??"";if(a.length<32)throw Error("CONTROL_NODE_CREDENTIAL_KEY must contain at least 32 characters");for(let b of["API_SECRET","SESSION_SECRET","JWT_SECRET"])if(process.env[b]&&process.env[b]===a)throw Error(`CONTROL_NODE_CREDENTIAL_KEY must be distinct from ${b}`);return as(a)}function au(a){if(!a||a.startsWith(aq))return a;let b=at(),c=(0,f.randomBytes)(12),d=(0,f.createCipheriv)("aes-256-gcm",b,c),e=Buffer.concat([d.update(a,"utf-8"),d.final()]),g=d.getAuthTag();return`${aq}${c.toString("base64")}:${g.toString("base64")}:${e.toString("base64")}`}function av(a){return!!(a&&!a.startsWith(aq))}let aw=ap.default.resolve(process.cwd(),".magnus"),ax=ap.default.join(aw,"control-nodes.json");function ay(a){return!!(a&&"object"==typeof a&&"code"in a&&"ENOENT"===a.code)}function az(a){if(!a.isFile()||a.isSymbolicLink()||(511&Number(a.mode))!=384)throw Error("Control-node state must be a regular non-symlink file with mode 0600")}async function aA(a){let b;try{b=await (0,ao.lstat)(aw)}catch(c){if(!ay(c))throw c;if(!a)return!1;await (0,ao.mkdir)(aw,{recursive:!0,mode:448}),await (0,ao.chmod)(aw,448),b=await (0,ao.lstat)(aw)}var c=b;if(!c.isDirectory()||c.isSymbolicLink()||(511&Number(c.mode))!=448)throw Error("Control-node state directory must be a non-symlink directory with mode 0700");return!0}function aB(a,b){if(!a)return;let c=function(a){if(!a||!a.startsWith(aq)&&!a.startsWith(ar))return a;let b=a.startsWith(ar)&&!a.startsWith(aq),c=b?ar:aq,d=a.slice(c.length).split(":");if(3!==d.length)throw Error("Stored control-node credential ciphertext is malformed");let[e,g,h]=d;try{let a=b?function(){let a=process.env.JWT_SECRET??process.env.SESSION_SECRET??"";if(!a)throw Error("Legacy control-node credential key is unavailable");return as(a)}():at(),c=Buffer.from(e,"base64"),d=Buffer.from(g,"base64"),i=Buffer.from(h,"base64"),j=(0,f.createDecipheriv)("aes-256-gcm",a,c);return j.setAuthTag(d),j.update(i).toString("utf-8")+j.final("utf-8")}catch(a){throw Error("Stored control-node credential failed authenticated decryption",{cause:a})}}(a);if(!c||a.startsWith("enc:")&&c.startsWith("enc:"))throw Error(`Stored control-node ${b} could not be decrypted`);return c}async function aC(){let a,b;if(!await aA(!1))return[];try{a=await (0,ao.lstat)(ax)}catch(a){if(!ay(a))throw a;return[]}az(a);let c=await (0,ao.open)(ax,h.constants.O_RDONLY|h.constants.O_NOFOLLOW);try{let d=await c.stat();if(az(d),d.dev!==a.dev||d.ino!==a.ino)throw Error("Control-node state changed while it was being opened");b=await c.readFile({encoding:"utf-8"})}finally{await c.close()}let d=function(a){let b=JSON.parse(a);if(!Array.isArray(b))throw Error("Control-node state must contain an array");return b.map((a,b)=>{if(!a||"object"!=typeof a||Array.isArray(a))throw Error(`Control-node state entry ${b} is not an object`);for(let c of["id","name","url","createdAt"])if("string"!=typeof a[c]||!a[c])throw Error(`Control-node state entry ${b} has an invalid ${c}`);for(let c of["apiSecret","token"])if(void 0!==a[c]&&"string"!=typeof a[c])throw Error(`Control-node state entry ${b} has an invalid ${c}`);return{id:a.id,name:a.name,url:a.url,apiSecret:a.apiSecret,token:a.token,createdAt:a.createdAt}})}(b),e=b.includes('"nodeManagerSecret"')||d.some(a=>av(a.apiSecret)||av(a.token)),f=d.map(a=>({...a,apiSecret:aB(a.apiSecret,"apiSecret"),token:aB(a.token,"token")}));return e&&await aD(f),f.map(a=>({...a}))}async function aD(a){await aA(!0);try{let a=await (0,ao.lstat)(ax);az(a)}catch(a){if(!ay(a))throw a}let b=a.map(a=>({...a,apiSecret:a.apiSecret?au(a.apiSecret):a.apiSecret,token:a.token?au(a.token):a.token})),c=ap.default.join(aw,`.control-nodes.${process.pid}.${(0,f.randomBytes)(12).toString("hex")}.tmp`),d=!1;try{let a=await (0,ao.open)(c,h.constants.O_WRONLY|h.constants.O_CREAT|h.constants.O_EXCL|h.constants.O_NOFOLLOW,384);d=!0;try{await a.writeFile(`${JSON.stringify(b,null,2)}
|
|
2
|
-
`,{encoding:"utf-8"}),await a.chmod(384),await a.sync()}finally{await a.close()}await (0,ao.rename)(c,ax),d=!1,az(await (0,ao.lstat)(ax));let e=await (0,ao.open)(aw,h.constants.O_RDONLY|h.constants.O_NOFOLLOW);try{await e.sync()}finally{await e.close()}}finally{d&&await (0,ao.unlink)(c).catch(()=>void 0)}}function aE(a,b){let c;try{c=new URL(a)}catch{throw Error(`${b} is not a valid URL`)}let d="http:"===c.protocol&&"localhost"===c.hostname;if("https:"!==c.protocol&&!d)throw Error(`${b} must use HTTPS`);return c}function aF(){let a=process.env.CONTROL_API_URL?.trim();return a?aE(a,"CONTROL_API_URL"):null}function aG(){let a=process.env.API_SECRET?.trim()??"";if(!a)throw Error("Canonical Control API credential is unavailable");return{credentialHeaders:{"x-api-secret":a},credentialSource:"canonical-api-secret"}}async function aH(a){let b,c,d,e=aF();if("local"===a){if(!e)throw Error("CONTROL_API_URL is required for the local control node");return{id:"local",name:"Local",baseUrl:e.origin,...aG()}}let f=(await aC()).find(b=>b.id===a);if(!f)throw Error(`Unknown control node '${a}'`);return b=aE(f.url,`Control node '${f.id}' URL`),d=(c=aF())&&b.origin===c.origin?aG():function(a){if(a.token)return{credentialHeaders:{Authorization:`Bearer ${a.token}`},credentialSource:"stored-iam-token"};if(a.apiSecret)return{credentialHeaders:{"x-api-secret":a.apiSecret},credentialSource:"stored-api-secret"};throw Error(`Control node '${a.id}' has no server-side credential`)}(f),{id:f.id,name:f.name,baseUrl:b.origin,...d}}async function aI(a,b,c){let d=await aH(a),f=new Headers(c?.headers);for(let a of["authorization","x-api-secret","proxy-authorization","cookie"])f.delete(a);let g=(await (0,e.cookies)()).get("magnus_session")?.value,h=g?await ah(g):null,i=h?await aj(h,d.baseUrl):null;for(let[a,b]of Object.entries(i?{Authorization:`Bearer ${i}`}:d.credentialHeaders))f.set(a,b);let j=await an(`${d.baseUrl}/api/v1/${b.replace(/^\/+/,"")}`,{...c,headers:f,cache:"no-store",redirect:"manual"});if(j.status>=300&&j.status<400)throw Error("Credentialed Control API redirects are forbidden");return j}Promise.resolve(),a.s(["f",0,aC],18682),a.s(["f",0,aI],60985)},84368,(a,b,c)=>{b.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}}')},53373,(a,b,c)=>{"use strict";var d=a.e&&a.e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(c,"__esModule",{value:!0}),c.getKeyIndexes=c.hasFlag=c.exists=c.list=void 0;let e=d(a.r(84368)).default;c.list=Object.keys(e);let f={};function g(a){"string"!=typeof a&&(a=String(a));let b=a.indexOf("->");return -1===b?a.length:b}c.list.forEach(a=>{f[a]=e[a].flags.reduce(function(a,b){return a[b]=!0,a},{})}),c.exists=function(a,b){return!!e[a=(null==b?void 0:b.caseInsensitive)?String(a).toLowerCase():a]},c.hasFlag=function(a,b,c){if(!f[a=(null==c?void 0:c.nameCaseInsensitive)?String(a).toLowerCase():a])throw Error("Unknown command "+a);return!!f[a][b]},c.getKeyIndexes=function(a,b,c){let d=e[a=(null==c?void 0:c.nameCaseInsensitive)?String(a).toLowerCase():a];if(!d)throw Error("Unknown command "+a);if(!Array.isArray(b))throw Error("Expect args to be an array");let f=d;for(let a=0;a<b.length&&f.subcommands;a++){let c=f.subcommands[String(b[a]).toLowerCase()];if(!c)break;f=c}let h=[],i=!!(c&&c.parseExternalKey),j=(a,b)=>{let c=[],d=Number(a[b]);for(let a=0;a<d;a++)c.push(a+b+1);return c},k=(a,b,c)=>{for(let d=b;d<a.length-1;d+=1)if(String(a[d]).toLowerCase()===c.toLowerCase())return d+1;return null};switch(a){case"zunionstore":case"zinterstore":case"zdiffstore":h.push(0,...j(b,1));break;case"eval":case"evalsha":case"eval_ro":case"evalsha_ro":case"fcall":case"fcall_ro":case"blmpop":case"bzmpop":h.push(...j(b,1));break;case"sdiffcard":case"sintercard":case"sunioncard":case"lmpop":case"zunion":case"zinter":case"zmpop":case"zintercard":case"zdiff":h.push(...j(b,0));break;case"msetex":{let a=Number(b[0]);for(let b=0;b<a;b++)h.push(1+2*b);break}case"georadius":{h.push(0);let a=k(b,5,"STORE");a&&h.push(a);let c=k(b,5,"STOREDIST");c&&h.push(c);break}case"georadiusbymember":{h.push(0);let a=k(b,4,"STORE");a&&h.push(a);let c=k(b,4,"STOREDIST");c&&h.push(c);break}case"sort":case"sort_ro":h.push(0);for(let a=1;a<b.length-1;a++){let c=b[a];if("string"!=typeof c)continue;let d=c.toUpperCase();"GET"===d?(a+=1,"#"!==(c=b[a])&&(i?h.push([a,g(c)]):h.push(a))):"BY"===d?(a+=1,i?h.push([a,g(b[a])]):h.push(a)):"STORE"===d&&(a+=1,h.push(a))}break;case"migrate":if(""===b[2])for(let a=5;a<b.length-1;a++){let c=b[a];if("string"==typeof c&&"KEYS"===c.toUpperCase()){for(let c=a+1;c<b.length;c++)h.push(c);break}}else h.push(2);break;case"xreadgroup":case"xread":for(let c=3*("xread"!==a);c<b.length-1;c++)if("STREAMS"===String(b[c]).toUpperCase()){for(let a=c+1;a<=c+(b.length-1-c)/2;a++)h.push(a);break}break;default:if(f.step>0){let a=f.keyStart-1,c=f.keyStop>0?f.keyStop:b.length+f.keyStop+1;for(let b=a;b<c;b+=f.step)h.push(b)}}return h}},69638,(a,b,c)=>{var d=[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],e=function(a){for(var b,c=0,d=0,e=[],f=a.length;c<f;c++)(b=a.charCodeAt(c))<128?e[d++]=b:(b<2048?e[d++]=b>>6|192:((64512&b)==55296&&c+1<a.length&&(64512&a.charCodeAt(c+1))==56320?(b=65536+((1023&b)<<10)+(1023&a.charCodeAt(++c)),e[d++]=b>>18|240,e[d++]=b>>12&63|128):e[d++]=b>>12|224,e[d++]=b>>6&63|128),e[d++]=63&b|128);return e},f=b.exports=function(a){for(var b,c=0,f=-1,g=0,h=0,i="string"==typeof a?e(a):a,j=i.length;c<j;){if(b=i[c++],-1===f)123===b&&(f=c);else if(125!==b)h=d[(b^h>>8)&255]^h<<8;else if(c-1!==f)return 16383&h;g=d[(b^g>>8)&255]^g<<8}return 16383&g};b.exports.generateMulti=function(a){for(var b=1,c=a.length,d=f(a[0]);b<c;)if(f(a[b++])!==d)return -1;return d}},58077,(a,b,c)=>{let d;c.formatArgs=function(a){if(a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+b.exports.humanize(this.diff),!this.useColors)return;let c="color: "+this.color;a.splice(1,0,c,"color: inherit");let d=0,e=0;a[0].replace(/%[a-zA-Z%]/g,a=>{"%%"!==a&&(d++,"%c"===a&&(e=d))}),a.splice(e,0,c)},c.save=function(a){try{a?c.storage.setItem("debug",a):c.storage.removeItem("debug")}catch(a){}},c.load=function(){let a;try{a=c.storage.getItem("debug")||c.storage.getItem("DEBUG")}catch(a){}return!a&&"u">typeof process&&"env"in process&&(a=process.env.DEBUG),a},c.useColors=function(){let a;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&&(a=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(a[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},c.storage=function(){try{return localStorage}catch(a){}}(),d=!1,c.destroy=()=>{d||(d=!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`."))},c.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"],c.log=console.debug||console.log||(()=>{}),b.exports=a.r(93830)(c);let{formatters:e}=b.exports;e.j=function(a){try{return JSON.stringify(a)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}}},93830,(a,b,c)=>{b.exports=function(b){function c(a){let b,e,f,g=null;function h(...a){if(!h.enabled)return;let d=Number(new Date);h.diff=d-(b||d),h.prev=b,h.curr=d,b=d,a[0]=c.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");let e=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(b,d)=>{if("%%"===b)return"%";e++;let f=c.formatters[d];if("function"==typeof f){let c=a[e];b=f.call(h,c),a.splice(e,1),e--}return b}),c.formatArgs.call(h,a),(h.log||c.log).apply(h,a)}return h.namespace=a,h.useColors=c.useColors(),h.color=c.selectColor(a),h.extend=d,h.destroy=c.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==g?g:(e!==c.namespaces&&(e=c.namespaces,f=c.enabled(a)),f),set:a=>{g=a}}),"function"==typeof c.init&&c.init(h),h}function d(a,b){let d=c(this.namespace+(void 0===b?":":b)+a);return d.log=this.log,d}function e(a,b){let c=0,d=0,e=-1,f=0;for(;c<a.length;)if(d<b.length&&(b[d]===a[c]||"*"===b[d]))"*"===b[d]?(e=d,f=c):c++,d++;else{if(-1===e)return!1;d=e+1,c=++f}for(;d<b.length&&"*"===b[d];)d++;return d===b.length}return c.debug=c,c.default=c,c.coerce=function(a){return a instanceof Error?a.stack||a.message:a},c.disable=function(){let a=[...c.names,...c.skips.map(a=>"-"+a)].join(",");return c.enable(""),a},c.enable=function(a){for(let b of(c.save(a),c.namespaces=a,c.names=[],c.skips=[],("string"==typeof a?a:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===b[0]?c.skips.push(b.slice(1)):c.names.push(b)},c.enabled=function(a){for(let b of c.skips)if(e(a,b))return!1;for(let b of c.names)if(e(a,b))return!0;return!1},c.humanize=a.r(48256),c.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(b).forEach(a=>{c[a]=b[a]}),c.names=[],c.skips=[],c.formatters={},c.selectColor=function(a){let b=0;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c)|0;return c.colors[Math.abs(b)%c.colors.length]},c.enable(c.load()),c}},61998,(a,b,c)=>{"u"<typeof process||"renderer"===process.type||process.__nwjs?b.exports=a.r(58077):b.exports=a.r(16956)},16956,(a,b,c)=>{let d=a.r(70722),e=a.r(24361);c.init=function(a){a.inspectOpts={};let b=Object.keys(c.inspectOpts);for(let d=0;d<b.length;d++)a.inspectOpts[b[d]]=c.inspectOpts[b[d]]},c.log=function(...a){return process.stderr.write(e.formatWithOptions(c.inspectOpts,...a)+"\n")},c.formatArgs=function(a){let{namespace:d,useColors:e}=this;if(e){let c=this.color,e="\x1b[3"+(c<8?c:"8;5;"+c),f=` ${e};1m${d} \x1b[0m`;a[0]=f+a[0].split("\n").join("\n"+f),a.push(e+"m+"+b.exports.humanize(this.diff)+"\x1b[0m")}else a[0]=(c.inspectOpts.hideDate?"":new Date().toISOString()+" ")+d+" "+a[0]},c.save=function(a){a?process.env.DEBUG=a:delete process.env.DEBUG},c.load=function(){return process.env.DEBUG},c.useColors=function(){return"colors"in c.inspectOpts?!!c.inspectOpts.colors:d.isatty(process.stderr.fd)},c.destroy=e.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),c.colors=[6,2,3,4,5,1];try{let b=a.r(45681);b&&(b.stderr||b).level>=2&&(c.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(a){}c.inspectOpts=Object.keys(process.env).filter(a=>/^debug_/i.test(a)).reduce((a,b)=>{let c=b.substring(6).toLowerCase().replace(/_([a-z])/g,(a,b)=>b.toUpperCase()),d=process.env[b];return d=!!/^(yes|on|true|enabled)$/i.test(d)||!/^(no|off|false|disabled)$/i.test(d)&&("null"===d?null:Number(d)),a[c]=d,a},{}),b.exports=a.r(93830)(c);let{formatters:f}=b.exports;f.o=function(a){return this.inspectOpts.colors=this.useColors,e.inspect(a,this.inspectOpts).split("\n").map(a=>a.trim()).join(" ")},f.O=function(a){return this.inspectOpts.colors=this.useColors,e.inspect(a,this.inspectOpts)}},5583,(a,b,c)=>{"use strict";function d(a,b){var b=b||{};this._capacity=b.capacity,this._head=0,this._tail=0,Array.isArray(a)?this._fromArray(a):(this._capacityMask=3,this._list=[,,,,])}d.prototype.peekAt=function(a){var b=a;if(b===(0|b)){var c=this.size();if(!(b>=c)&&!(b<-c))return b<0&&(b+=c),b=this._head+b&this._capacityMask,this._list[b]}},d.prototype.get=function(a){return this.peekAt(a)},d.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},d.prototype.peekFront=function(){return this.peek()},d.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(d.prototype,"length",{get:function(){return this.size()}}),d.prototype.size=function(){return this._head===this._tail?0:this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},d.prototype.unshift=function(a){if(0==arguments.length)return this.size();var b=this._list.length;return(this._head=this._head-1+b&this._capacityMask,this._list[this._head]=a,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)},d.prototype.shift=function(){var a=this._head;if(a!==this._tail){var b=this._list[a];return this._list[a]=void 0,this._head=a+1&this._capacityMask,a<2&&this._tail>1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),b}},d.prototype.push=function(a){if(0==arguments.length)return this.size();var b=this._tail;return(this._list[b]=a,this._tail=b+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)},d.prototype.pop=function(){var a=this._tail;if(a!==this._head){var b=this._list.length;this._tail=a-1+b&this._capacityMask;var c=this._list[this._tail];return this._list[this._tail]=void 0,this._head<2&&a>1e4&&a<=b>>>2&&this._shrinkArray(),c}},d.prototype.removeOne=function(a){var b,c=a;if(c===(0|c)&&this._head!==this._tail){var d=this.size(),e=this._list.length;if(!(c>=d)&&!(c<-d)){c<0&&(c+=d),c=this._head+c&this._capacityMask;var f=this._list[c];if(a<d/2){for(b=a;b>0;b--)this._list[c]=this._list[c=c-1+e&this._capacityMask];this._list[c]=void 0,this._head=this._head+1+e&this._capacityMask}else{for(b=d-1-a;b>0;b--)this._list[c]=this._list[c=c+1+e&this._capacityMask];this._list[c]=void 0,this._tail=this._tail-1+e&this._capacityMask}return f}}},d.prototype.remove=function(a,b){var c,d,e=a,f=b;if(e===(0|e)&&this._head!==this._tail){var g=this.size(),h=this._list.length;if(!(e>=g)&&!(e<-g)&&!(b<1)){if(e<0&&(e+=g),1===b||!b)return(c=[,])[0]=this.removeOne(e),c;if(0===e&&e+b>=g)return c=this.toArray(),this.clear(),c;for(e+b>g&&(b=g-e),c=Array(b),d=0;d<b;d++)c[d]=this._list[this._head+e+d&this._capacityMask];if(e=this._head+e&this._capacityMask,a+b===g){for(this._tail=this._tail-b+h&this._capacityMask,d=b;d>0;d--)this._list[e=e+1+h&this._capacityMask]=void 0;return c}if(0===a){for(this._head=this._head+b+h&this._capacityMask,d=b-1;d>0;d--)this._list[e=e+1+h&this._capacityMask]=void 0;return c}if(e<g/2){for(this._head=this._head+a+b+h&this._capacityMask,d=a;d>0;d--)this.unshift(this._list[e=e-1+h&this._capacityMask]);for(e=this._head-1+h&this._capacityMask;f>0;)this._list[e=e-1+h&this._capacityMask]=void 0,f--;a<0&&(this._tail=e)}else{for(this._tail=e,e=e+b+h&this._capacityMask,d=g-(b+a);d>0;d--)this.push(this._list[e++]);for(e=this._tail;f>0;)this._list[e=e+1+h&this._capacityMask]=void 0,f--}return this._head<2&&this._tail>1e4&&this._tail<=h>>>2&&this._shrinkArray(),c}}},d.prototype.splice=function(a,b){var c=a;if(c===(0|c)){var d=this.size();if(c<0&&(c+=d),!(c>d))if(!(arguments.length>2))return this.remove(c,b);else{var e,f,g,h=arguments.length,i=this._list.length,j=2;if(!d||c<d/2){for(f=Array(c),e=0;e<c;e++)f[e]=this._list[this._head+e&this._capacityMask];for(0===b?(g=[],c>0&&(this._head=this._head+c+i&this._capacityMask)):(g=this.remove(c,b),this._head=this._head+c+i&this._capacityMask);h>j;)this.unshift(arguments[--h]);for(e=c;e>0;e--)this.unshift(f[e-1])}else{var k=(f=Array(d-(c+b))).length;for(e=0;e<k;e++)f[e]=this._list[this._head+c+b+e&this._capacityMask];for(0===b?(g=[],c!=d&&(this._tail=this._head+c+i&this._capacityMask)):(g=this.remove(c,b),this._tail=this._tail-k+i&this._capacityMask);j<h;)this.push(arguments[j++]);for(e=0;e<k;e++)this.push(f[e])}return g}}},d.prototype.clear=function(){this._list=Array(this._list.length),this._head=0,this._tail=0},d.prototype.isEmpty=function(){return this._head===this._tail},d.prototype.toArray=function(){return this._copyArray(!1)},d.prototype._fromArray=function(a){var b=a.length,c=this._nextPowerOf2(b);this._list=Array(c),this._capacityMask=c-1,this._tail=b;for(var d=0;d<b;d++)this._list[d]=a[d]},d.prototype._copyArray=function(a,b){var c,d=this._list,e=d.length,f=this.length;if((b|=f)==f&&this._head<this._tail)return this._list.slice(this._head,this._tail);var g=Array(b),h=0;if(a||this._head>this._tail){for(c=this._head;c<e;c++)g[h++]=d[c];for(c=0;c<this._tail;c++)g[h++]=d[c]}else for(c=this._head;c<this._tail;c++)g[h++]=d[c];return g},d.prototype._growArray=function(){if(0!=this._head){var a=this._copyArray(!0,this._list.length<<1);this._tail=this._list.length,this._head=0,this._list=a}else this._tail=this._list.length,this._list.length<<=1;this._capacityMask=this._capacityMask<<1|1},d.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1},d.prototype._nextPowerOf2=function(a){return Math.max(1<<Math.log(a)/Math.log(2)+1,4)},b.exports=d},34994,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(53373),e=a.r(69638),f=a.r(26986),g=a.r(44999),h=a.r(89308),i=a.r(58857);class j{static checkFlag(a,b){return b=b.toLowerCase(),!!this.getFlagMap()[a][b]}static setArgumentTransformer(a,b){this._transformer.argument[a]=b}static setReplyTransformer(a,b){this._transformer.reply[a]=b}static getFlagMap(){return this.flagMap||(this.flagMap=Object.keys(j.FLAGS).reduce((a,b)=>(a[b]={},j.FLAGS[b].forEach(c=>{a[b][c]=!0}),a),{})),this.flagMap}constructor(a,b=[],c={},d){if(this.name=a,this.inTransaction=!1,this.isTraced=!1,this.isResolved=!1,this.isSettled=!1,this.transformed=!1,this.replyEncoding=c.replyEncoding,this.protocol=2,this.replyMapping="legacy",this.errorStack=c.errorStack,this.args=b.flat(),this.callback=d,this.initPromise(),c.keyPrefix){let a=c.keyPrefix instanceof Buffer,b=a?c.keyPrefix:null;this._iterateKeys(d=>d instanceof Buffer?(null===b&&(b=Buffer.from(c.keyPrefix)),Buffer.concat([b,d])):a?Buffer.concat([c.keyPrefix,Buffer.from(String(d))]):c.keyPrefix+d)}c.readOnly&&(this.isReadOnly=!0)}getSlot(){if(void 0===this.slot){let a=this.getKeys()[0];this.slot=null==a?null:e(a)}return this.slot}getKeys(){return this._iterateKeys()}setReplyContext(a){this.protocol=a?.protocol??2,this.replyMapping=a?.replyMapping??"legacy"}toWritable(a){let b,c="*"+(this.args.length+1)+"\r\n$"+Buffer.byteLength(this.name)+"\r\n"+this.name+"\r\n";if(this.bufferMode){let a=new m;a.push(c);for(let b=0;b<this.args.length;++b){let c=this.args[b];c instanceof Buffer?0===c.length?a.push("$0\r\n\r\n"):(a.push("$"+c.length+"\r\n"),a.push(c),a.push("\r\n")):a.push("$"+Buffer.byteLength(c)+"\r\n"+c+"\r\n")}b=a.toBuffer()}else{b=c;for(let a=0;a<this.args.length;++a){let c=this.args[a];b+="$"+Buffer.byteLength(c)+"\r\n"+c+"\r\n"}}return b}stringifyArguments(){for(let a=0;a<this.args.length;++a){let b=this.args[a];"string"==typeof b||(b instanceof Buffer?this.bufferMode=!0:this.args[a]=(0,g.toArg)(b))}}transformReply(a){this.replyEncoding&&(a=(0,g.convertBufferToString)(a,this.replyEncoding));let b=j._transformer.reply[this.name];return b&&(a=b(a,{commandName:this.name,protocol:this.protocol,replyMapping:this.replyMapping})),a}setTimeout(a){this._commandTimeoutTimer||(this._commandTimeoutTimer=setTimeout(()=>{this.isSettled||this.reject(Error("Command timed out"))},a))}setBlockingTimeout(a){if(a<=0)return;this._blockingTimeoutTimer&&(clearTimeout(this._blockingTimeoutTimer),this._blockingTimeoutTimer=void 0);let b=Date.now();void 0===this._blockingDeadline&&(this._blockingDeadline=b+a);let c=this._blockingDeadline-b;c<=0?this.resolve(null):this._blockingTimeoutTimer=setTimeout(()=>{if(this.isSettled){this._blockingTimeoutTimer=void 0;return}this._blockingTimeoutTimer=void 0,this.resolve(null)},c)}extractBlockingTimeout(){let a=this.args;if(!a||0===a.length)return;let b=this.name.toLowerCase();return"blmovem"===b?(0,h.parseSecondsArgument)(a[4]):j.checkFlag("LAST_ARG_TIMEOUT_COMMANDS",b)?(0,h.parseSecondsArgument)(a[a.length-1]):j.checkFlag("FIRST_ARG_TIMEOUT_COMMANDS",b)?(0,h.parseSecondsArgument)(a[0]):j.checkFlag("BLOCK_OPTION_COMMANDS",b)?(0,h.parseBlockOption)(a):void 0}_clearTimers(){let a=this._commandTimeoutTimer;a&&(clearTimeout(a),delete this._commandTimeoutTimer);let b=this._blockingTimeoutTimer;b&&(clearTimeout(b),delete this._blockingTimeoutTimer)}initPromise(){this.isResolved=!1,this.isSettled=!1;let a=new Promise((a,b)=>{if(!this.transformed){this.transformed=!0;let a=j._transformer.argument[this.name];a&&(this.args=a(this.args)),this.stringifyArguments()}this.resolve=this._convertValue(a),this.reject=a=>{this._clearTimers(),this.isSettled=!0,this.errorStack?b((0,g.optimizeErrorStack)(a,this.errorStack.stack,"/ROOT/node_modules/ioredis/built")):b(a)}});this.promise=(0,f.default)(a,this.callback)}_iterateKeys(a=a=>a){if(void 0===this.keys&&(this.keys=[],(0,d.exists)(this.name,{caseInsensitive:!0})))for(let b of(0,d.getKeyIndexes)(this.name,this.args,{nameCaseInsensitive:!0}))this.args[b]=a(this.args[b]),this.keys.push(this.args[b]);return this.keys}_convertValue(a){return b=>{try{this._clearTimers(),a(this.transformReply(b)),this.isResolved=!0,this.isSettled=!0}catch(a){this.reject(a)}return this.promise}}}j.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"]},j._transformer={argument:{},reply:{}},c.default=j;let k=function(a){if(1===a.length){if(a[0]instanceof Map)return(0,g.convertMapToArray)(a[0]);if("object"==typeof a[0]&&null!==a[0])return(0,g.convertObjectToArray)(a[0])}return a},l=function(a){if(2===a.length){if(a[1]instanceof Map)return[a[0]].concat((0,g.convertMapToArray)(a[1]));if("object"==typeof a[1]&&null!==a[1])return[a[0]].concat((0,g.convertObjectToArray)(a[1]))}return a};for(let a of(j.setArgumentTransformer("mset",k),j.setArgumentTransformer("msetnx",k),j.setArgumentTransformer("hset",l),j.setArgumentTransformer("hmset",l),j.setReplyTransformer("hgetall",function(a){if(Array.isArray(a)){let b={};for(let c=0;c<a.length;c+=2){let d=a[c],e=a[c+1];d in b?Object.defineProperty(b,d,{value:e,configurable:!0,enumerable:!0,writable:!0}):b[d]=e}return b}return a}),j.setReplyTransformer("vsim",i.transformVsimReply),j.setReplyTransformer("hrandfield",i.transformPairReply),j.setReplyTransformer("xread",i.transformStreamReadReply),j.setReplyTransformer("xreadgroup",i.transformStreamReadReply),i.sortedSetWithScorePairCommands))j.setReplyTransformer(a,i.transformPairReply);class m{constructor(){this.length=0,this.items=[]}push(a){this.length+=Buffer.byteLength(a),this.items.push(a)}toBuffer(){let a=Buffer.allocUnsafe(this.length),b=0;for(let c of this.items){let d=Buffer.byteLength(c);Buffer.isBuffer(c)?c.copy(a,b):a.write(c,b,d),b+=d}return a}}},48194,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(34994),e=a.r(44999),f=a.r(30863),g=a.r(88846),h=(0,e.Debug)("dataHandler");c.default=class{constructor(a,b){var c;let d;this.redis=a;let e=(d="resp3"===(c=b).replyMapping?j:i,c.stringNumbers?{...d,[g.RESP_TYPES.NUMBER]:String,[g.RESP_TYPES.DOUBLE]:String}:d),f=new g.Decoder({getTypeMapping:()=>e,onReply:a=>{this.dispatch(()=>this.returnReply(a))},onErrorReply:a=>{this.dispatch(()=>this.returnError(a))},onPush:a=>{this.dispatch(()=>this.returnPush(a))}});a.stream.prependListener("data",a=>{try{f.write(a)}catch(a){this.returnFatalError(a)}}),a.stream.resume()}dispatch(a){try{a()}catch(a){process.nextTick(()=>{throw a})}}returnFatalError(a){a.message+=". Please report this.",this.redis.recoverFromFatalError(a,a,{offlineQueue:!1})}returnError(a){let b=this.shiftCommand(a);b&&(a.command={name:b.command.name,args:b.command.args},"ssubscribe"===b.command.name&&a.message.startsWith("MOVED ")&&this.redis.emit("moved"),this.redis.handleReconnection(a,b))}returnReply(a){if(this.handleMonitorReply(a)||3!==this.redis.condition.protocol&&this.handleSubscriberReply(a))return;let b=this.shiftCommand(a);b&&(d.default.checkFlag("ENTER_SUBSCRIBER_MODE",b.command.name)?(this.redis.condition.subscriber=new f.default,this.redis.condition.subscriber.add(b.command.name,a[1].toString()),l(b.command,a[2])||this.redis.commandQueue.unshift(b)):d.default.checkFlag("EXIT_SUBSCRIBER_MODE",b.command.name)?m(b.command,a[2])||this.redis.commandQueue.unshift(b):b.command.resolve(a))}returnPush(a){if(!Array.isArray(a)||0===a.length)return;let b=a[0].toString();switch(h('receive push "%s"',b),b){case"message":case"pmessage":case"smessage":this.handleSubscriberReply(a);break;case"ssubscribe":case"subscribe":case"psubscribe":{this.redis.condition.subscriber||(this.redis.condition.subscriber=new f.default);let c=a[1].toString();this.redis.condition.subscriber.add(b,c);let d=this.shiftCommand(a);if(!d)return;l(d.command,a[2])||this.redis.commandQueue.unshift(d);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{if(this.redis.condition.subscriber){let c=a[1]?a[1].toString():null;c&&this.redis.condition.subscriber.del(b,c)}let c=a[2];if(0===Number(c)&&(this.redis.condition.subscriber=!1),this.handleUnsolicitedUnsubscribe(b))return;let d=this.shiftCommand(a);if(!d)return;m(d.command,c)||this.redis.commandQueue.unshift(d)}}}handleUnsolicitedUnsubscribe(a){let b=this.redis.commandQueue.peekFront();return(!b||b.command.name.toLowerCase()!==a)&&("sunsubscribe"===a&&this.redis.emit("moved"),!0)}handleSubscriberReply(a){if(!this.redis.condition.subscriber)return!1;let b=Array.isArray(a)?a[0].toString():null;switch(h('receive reply "%s" in subscriber mode',b),b){case"message":this.redis.listeners("message").length>0&&this.redis.emit("message",a[1].toString(),a[2]?a[2].toString():""),this.redis.emit("messageBuffer",a[1],a[2]);break;case"pmessage":{let b=a[1].toString();this.redis.listeners("pmessage").length>0&&this.redis.emit("pmessage",b,a[2].toString(),a[3].toString()),this.redis.emit("pmessageBuffer",b,a[2],a[3]);break}case"smessage":this.redis.listeners("smessage").length>0&&this.redis.emit("smessage",a[1].toString(),a[2]?a[2].toString():""),this.redis.emit("smessageBuffer",a[1],a[2]);break;case"ssubscribe":case"subscribe":case"psubscribe":{let c=a[1].toString();this.redis.condition.subscriber.add(b,c);let d=this.shiftCommand(a);if(!d)return;l(d.command,a[2])||this.redis.commandQueue.unshift(d);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{let c=a[1]?a[1].toString():null;c&&this.redis.condition.subscriber.del(b,c);let d=a[2];if(0===Number(d)&&(this.redis.condition.subscriber=!1),this.handleUnsolicitedUnsubscribe(b))break;let e=this.shiftCommand(a);if(!e)return;m(e.command,d)||this.redis.commandQueue.unshift(e);break}default:{let b=this.shiftCommand(a);if(!b)return;b.command.resolve(a)}}return!0}handleMonitorReply(a){if("monitoring"!==this.redis.status)return!1;let b=a.toString();if("OK"===b)return!1;let c=b.indexOf(" "),d=b.slice(0,c),e=b.indexOf('"'),f=b.slice(e+1,-1).split('" "').map(a=>a.replace(/\\"/g,'"')),g=b.slice(c+2,e-2).split(" ");return this.redis.emit("monitor",d,f,g[1],g[0]),!0}shiftCommand(a){let b=this.redis.commandQueue.shift();if(!b){let b=Error("Command queue state error. If you can reproduce this, please report it."+(a instanceof Error?` Last error: ${a.message}`:` Last reply: ${a.toString()}`));return this.redis.emit("error",b),null}return b}};let i={[g.RESP_TYPES.SIMPLE_STRING]:Buffer,[g.RESP_TYPES.BLOB_STRING]:Buffer,[g.RESP_TYPES.VERBATIM_STRING]:Buffer,[g.RESP_TYPES.BIG_NUMBER]:String,[g.RESP_TYPES.DOUBLE]:Buffer,[g.RESP_TYPES.BOOLEAN]:Number,[g.RESP_TYPES.MAP]:Array,[g.RESP_TYPES.SET]:Array},j={[g.RESP_TYPES.SIMPLE_STRING]:Buffer,[g.RESP_TYPES.BLOB_STRING]:Buffer,[g.RESP_TYPES.VERBATIM_STRING]:Buffer,[g.RESP_TYPES.BIG_NUMBER]:String,[g.RESP_TYPES.SET]:Array},k=new WeakMap;function l(a,b){let c=k.has(a)?k.get(a):a.args.length;return(c-=1)<=0?(a.resolve(b),k.delete(a),!0):(k.set(a,c),!1)}function m(a,b){let c=k.has(a)?k.get(a):a.args.length;return 0===c?0===Number(b)&&(k.delete(a),a.resolve(b),!0):(c-=1)<=0?(a.resolve(b),!0):(k.set(a,c),!1)}},90197,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(69638),e=a.r(53373),f=a.r(26986),g=a.r(24361),h=a.r(34994),i=a.r(874),j=a.r(44999),k=a.r(14892),l=a.r(64409);class m extends k.default{constructor(a){super(),this.redis=a,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=a.options,Object.keys(a.scriptsSet).forEach(b=>{let c=a.scriptsSet[b];this._shaToScript[c.sha]=c,this[b]=a[b],this[b+"Buffer"]=a[b+"Buffer"]}),a.addedBuiltinSet.forEach(b=>{this[b]=a[b],this[b+"Buffer"]=a[b+"Buffer"]}),this.promise=new Promise((a,b)=>{this.resolve=a,this.reject=b});let b=this;Object.defineProperty(this,"length",{get:function(){return b._queue.length}})}fillResult(a,b){if("exec"===this._queue[b].name&&Array.isArray(a[1])){let c=a[1].length;for(let d=0;d<c;d++){if(a[1][d]instanceof Error)continue;let e=this._queue[b-(c-d)];try{a[1][d]=e.transformReply(a[1][d])}catch(b){a[1][d]=b}}}if(this._result[b]=a,--this.replyPending)return;if(this.isCluster){let a,b=!0;for(let c=0;c<this._result.length;++c){let d=this._result[c][0],f=this._queue[c];if(d){if("exec"===f.name&&"EXECABORT Transaction discarded because of previous errors."===d.message)continue;if(a){if(a.name!==d.name||a.message!==d.message){b=!1;break}}else a={name:d.name,message:d.message}}else if(!f.inTransaction&&!((0,e.exists)(f.name,{caseInsensitive:!0})&&(0,e.hasFlag)(f.name,"readonly",{nameCaseInsensitive:!0}))){b=!1;break}}if(a&&b){let b=this,c=a.message.split(" "),d=this._queue,e=!1;this._queue=[];for(let a=0;a<d.length;++a){if("ASK"===c[0]&&!e&&"asking"!==d[a].name&&(!d[a-1]||"asking"!==d[a-1].name)){let a=new h.default("asking");a.ignore=!0,this.sendCommand(a)}d[a].initPromise(),this.sendCommand(d[a]),e=d[a].inTransaction}let f=!0;void 0===this.leftRedirections&&(this.leftRedirections={});let g=function(){b.exec()},i=this.redis;if(i.handleError(a,this.leftRedirections,{moved:function(a,c){b.preferKey=c,i.slots[a]?i.slots[a][0]!==c&&(i.slots[a]=[c]):i.slots[a]=[c],i._groupsBySlot[a]=i._groupsIds[i.slots[a].join(";")],i.refreshSlotsCache(),b.exec()},ask:function(a,c){b.preferKey=c,b.exec()},tryagain:g,clusterDown:g,connectionClosed:g,maxRedirections:()=>{f=!1},defaults:()=>{f=!1}}),f)return}}let c=0;for(let a=0;a<this._queue.length-c;++a)this._queue[a+c].ignore&&(c+=1),this._result[a]=this._result[a+c];this.resolve(this._result.slice(0,this._result.length-c))}sendCommand(a){this._transactions>0&&(a.inTransaction=!0);let b=this._queue.length;return a.pipelineIndex=b,a.promise.then(a=>{this.fillResult([null,a],b)}).catch(a=>{this.fillResult([a],b)}),this._queue.push(a),this}addBatch(a){let b,c,d;for(let e=0;e<a.length;++e)c=(b=a[e])[0],d=b.slice(1),this[c].apply(this,d);return this}}c.default=m;let n=m.prototype.multi;m.prototype.multi=function(){return this._transactions+=1,n.apply(this,arguments)};let o=m.prototype.execBuffer;m.prototype.execBuffer=(0,g.deprecate)(function(){return this._transactions>0&&(this._transactions-=1),o.apply(this,arguments)},"Pipeline#execBuffer: Use Pipeline#exec instead"),m.prototype.exec=function(a){let b,c;if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(j.noop),a&&!this.nodeifiedPromise&&(this.nodeifiedPromise=!0,(0,f.default)(this.promise,a)),this.redis.delayUntilReady(b=>{b?this.reject(b):this.exec(a)}),this.promise;if(this._transactions>0)return this._transactions-=1,o.apply(this,arguments);if(this.nodeifiedPromise||(this.nodeifiedPromise=!0,(0,f.default)(this.promise,a)),this._queue.length||this.resolve([]),this.isCluster){let a=[];for(let b=0;b<this._queue.length;b++){let c=this._queue[b].getKeys();if(c.length&&a.push(c[0]),c.length&&0>d.generateMulti(c))return this.reject(Error("All the keys in a pipeline command should belong to the same slot")),this.promise}if(a.length){if((b=function(a,b){let c=d(b[0]),e=a._groupsBySlot[c];for(let c=1;c<b.length;c++)if(a._groupsBySlot[d(b[c])]!==e)return -1;return c}(this.redis,a))<0)return this.reject(Error("All keys in the pipeline should belong to the same slots allocation group")),this.promise}else b=16384*Math.random()|0}let e=this;return(0,l.interceptHimportPipeline)({owner:e.redis,commands:e._queue,slot:b,preferredNodeKey:e.preferKey,setDestination(a){c={slot:b,redis:a}},resume:g,reject(a){e.reject(a)}})||g(),this.promise;function g(){let a,d=e.replyPending=e._queue.length;e.isCluster&&!c&&(c={slot:b,redis:e.redis.connectionPool.nodes.all[e.preferKey]});let f="",g={isPipeline:!0,destination:e.isCluster?c:{redis:e.redis},write(b){"string"!=typeof b?(a||(a=[]),f&&(a.push(Buffer.from(f,"utf8")),f=""),a.push(b)):(f.length+b.length>=i.constants.MAX_STRING_LENGTH&&(a||(a=[]),f&&(a.push(Buffer.from(f,"utf8")),f="")),f+=b),--d||(a?(f&&a.push(Buffer.from(f,"utf8")),g.destination.redis.stream.write(Buffer.concat(a))):g.destination.redis.stream.write(f),d=e._queue.length,f="",a=void 0)}};for(let a=0;a<e._queue.length;++a)e.redis.sendCommand(e._queue[a],g,c);return e.promise}}},94367,(a,b,c)=>{"use strict";var d;Object.defineProperty(c,"__esModule",{value:!0});let e=a.r(53373),f=a.r(27699),g=a.r(26986),h=a.r(38834),i=a.r(34994),j=a.r(63834),k=a.r(84928),l=a.r(39200),m=a.r(25870),n=a.r(99272),o=a.r(44194),p=a.r(44999),q=a.r(38702),r=a.r(68028),s=a.r(14892),t=a.r(23355),u=a.r(64409),v=a.r(64409),w=a.r(5583),x=(0,p.Debug)("redis");class y extends s.default{static createClient(...a){return new y(...a)}constructor(a,b,c){if(super(),this.status="wait",this.isCluster=!1,this.reconnectTimeout=null,this.connectionEpoch=0,this.retryAttempts=0,this.manuallyClosing=!1,this[d]=!1,this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this.parseOptions(a,b,c),f.EventEmitter.call(this),this.options.himportFieldsets=(0,v.cloneHimportFieldsets)(this.options.himportFieldsets),this.options.himportFieldsets?.length&&(0,u.bindHimportCoordinator)(this,new u.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 a=new k.default(this.options);a.emitter=this,this.connector=a}else this.connector=new j.StandaloneConnector(this.options);this.options.scripts&&Object.entries(this.options.scripts).forEach(([a,b])=>{this.defineCommand(a,b)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(t.noop)}get autoPipelineQueueSize(){let a=0;for(let b of this._autoPipelines.values())a+=b.length;return a}connect(a){let b=(0,q.traceConnect)(()=>this._connect(),()=>{let{address:a,port:b}=this._getServerAddress();return{serverAddress:a,serverPort:b,connectionEpoch:this.connectionEpoch}});return(0,g.default)(b,a)}_connect(){return new Promise((a,b)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void b(Error("Redis is already connecting/connected"));this.connectionEpoch+=1,this.setStatus("connecting");let{options:c}=this;this.condition={select:c.db,auth:c.username?[c.username,c.password]:c.password,subscriber:!1,protocol:c.protocol,replyMapping:3===c.protocol&&"resp3"===c.replyMapping?"resp3":"legacy",handshake:!1};let d=this;(0,g.default)(this.connector.connect(function(a,b){d.silentEmit(a,b)}),function(e,f){if(e){d.flushQueue(e),d.silentEmit("error",e),b(e),d.setStatus("end");return}let g=c.tls?"secureConnect":"connect";if("sentinels"in c&&c.sentinels&&!c.enableTLSForSentinelMode&&(g="connect"),d.stream=f,c.noDelay&&f.setNoDelay(!0),"number"==typeof c.keepAlive&&(f.connecting?f.once(g,()=>{f.setKeepAlive(!0,c.keepAlive)}):f.setKeepAlive(!0,c.keepAlive)),f.connecting){if(f.once(g,l.connectHandler(d)),c.connectTimeout){let a=!1;f.setTimeout(c.connectTimeout,function(){if(a)return;f.setTimeout(0),f.destroy();let b=Error("connect ETIMEDOUT");b.errorno="ETIMEDOUT",b.code="ETIMEDOUT",b.syscall="connect",l.errorHandler(d)(b)}),f.once(g,function(){a=!0,f.setTimeout(0)})}}else if(f.destroyed){let a=d.connector.firstError;a&&process.nextTick(()=>{l.errorHandler(d)(a)}),process.nextTick(l.closeHandler(d))}else process.nextTick(l.connectHandler(d));f.destroyed||(f.once("error",l.errorHandler(d)),f.once("close",l.closeHandler(d)));let h=function(){d.removeListener("close",i),a()};var i=function(){d.removeListener("ready",h),b(Error(p.CONNECTION_CLOSED_ERROR_MSG))};d.once("ready",h),d.once("close",i)})})}disconnect(a=!1){a||(this.manuallyClosing=!0),this.reconnectTimeout&&!a&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),"wait"===this.status?l.closeHandler(this)():this.connector.disconnect()}end(){this.disconnect()}duplicate(a){return new y({...this.options,...a??{}})}get mode(){return this.options.monitor?"monitor":(0,p.isResp2SubscriberMode)(this.condition)?"subscriber":"normal"}monitor(a){let b=this.duplicate({monitor:!0,lazyConnect:!1,himportFieldsets:void 0});return(0,g.default)(new Promise(function(a,c){b.once("error",c),b.once("monitoring",function(){a(b)})}),a)}sendCommand(a,b){if(a.setReplyContext(this.condition??this.options),"wait"===this.status&&this.connect().catch(t.noop),"end"===this.status)return a.reject(Error(p.CONNECTION_CLOSED_ERROR_MSG)),a.promise;if((0,p.isResp2SubscriberMode)(this.condition)&&!i.default.checkFlag("VALID_IN_SUBSCRIBER_MODE",a.name))return a.reject(Error("Connection in subscriber mode, only subscriber commands may be used")),a.promise;if("number"==typeof this.options.commandTimeout&&a.setTimeout(this.options.commandTimeout),!b&&this[u.hasHimportCoordinator]&&(0,u.interceptHimportCommand)(this,a,"ready"===this.status,()=>{this.sendCommand(a)}))return a.promise;let c=this.getBlockingTimeoutInMs(a),d="ready"===this.status||!b&&"connect"===this.status&&this.condition?.handshake&&(i.default.checkFlag("HANDSHAKE_COMMANDS",a.name)||(0,u.isInternalHimportCommand)(a))||!b&&"connect"===this.status&&!this.condition?.handshake&&(0,e.exists)(a.name,{caseInsensitive:!0})&&(0,e.hasFlag)(a.name,"loading",{nameCaseInsensitive:!0});if(this.stream&&this.stream.writable?this.stream._writableState&&this.stream._writableState.ended&&(d=!1):d=!1,d)x.enabled&&x("write command[%s]: %d -> %s(%o)",this._getDescription(),this.condition?.select,a.name,a.args),b?"isPipeline"in b&&b.isPipeline?b.write(a.toWritable(b.destination.redis.stream)):b.write(a.toWritable(b)):this.stream.write(a.toWritable(this.stream)),this.commandQueue.push({command:a,stream:b,select:this.condition.select}),void 0!==c&&a.setBlockingTimeout(c),i.default.checkFlag("WILL_DISCONNECT",a.name)&&(this.manuallyClosing=!0),void 0!==this.options.socketTimeout&&void 0===this.socketTimeoutTimer&&this.setSocketTimeout();else{if(!this.options.enableOfflineQueue)return a.reject(Error("Stream isn't writeable and enableOfflineQueue options is false")),a.promise;if("quit"===a.name&&0===this.offlineQueue.length)return this.disconnect(),a.resolve(Buffer.from("OK")),a.promise;if(x.enabled&&x("queue command[%s]: %d -> %s(%o)",this._getDescription(),this.condition.select,a.name,a.args),this.offlineQueue.push({command:a,stream:b,select:this.condition.select}),i.default.checkFlag("BLOCKING_COMMANDS",a.name)){let b=this.getConfiguredBlockingTimeout();void 0!==b&&a.setBlockingTimeout(b)}}if("select"===a.name&&(0,p.isInt)(a.args[0])){let b=parseInt(a.args[0],10);this.condition.select!==b&&(this.condition.select=b,this.emit("select",b),x("switch to db [%d]",this.condition.select))}return!d||a.isTraced?a.promise:(a.isTraced=!0,(0,q.traceCommand)(()=>a.promise,()=>this._buildCommandContext(a)))}getBlockingTimeoutInMs(a){if(!i.default.checkFlag("BLOCKING_COMMANDS",a.name))return;let b=this.getConfiguredBlockingTimeout();if(void 0===b)return;let c=a.extractBlockingTimeout();return"number"==typeof c?c>0?c+(this.options.blockingTimeoutGrace??m.DEFAULT_REDIS_OPTIONS.blockingTimeoutGrace):b:null===c?b:void 0}getConfiguredBlockingTimeout(){if("number"==typeof this.options.blockingTimeout&&this.options.blockingTimeout>0)return this.options.blockingTimeout}setSocketTimeout(){let a=this.stream;this.socketTimeoutTimer=setTimeout(()=>{a.destroy(Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`)),this.socketTimeoutTimer=void 0},this.options.socketTimeout),a.once("data",()=>{clearTimeout(this.socketTimeoutTimer),this.socketTimeoutTimer=void 0,0!==this.commandQueue.length&&this.setSocketTimeout()})}scanStream(a){return this.createScanStream("scan",{options:a})}scanBufferStream(a){return this.createScanStream("scanBuffer",{options:a})}sscanStream(a,b){return this.createScanStream("sscan",{key:a,options:b})}sscanBufferStream(a,b){return this.createScanStream("sscanBuffer",{key:a,options:b})}hscanStream(a,b){return this.createScanStream("hscan",{key:a,options:b})}hscanBufferStream(a,b){return this.createScanStream("hscanBuffer",{key:a,options:b})}zscanStream(a,b){return this.createScanStream("zscan",{key:a,options:b})}zscanBufferStream(a,b){return this.createScanStream("zscanBuffer",{key:a,options:b})}silentEmit(a,b){let c;if("error"!==a||(c=b,"end"!==this.status&&(!this.manuallyClosing||!(c instanceof Error)||c.message!==p.CONNECTION_CLOSED_ERROR_MSG&&"connect"!==c.syscall&&"read"!==c.syscall)))return this.listeners(a).length>0?this.emit.apply(this,arguments):(c&&c instanceof Error&&console.error("[ioredis] Unhandled error event:",c.stack),!1)}recoverFromFatalError(a,b,c){this.flushQueue(b,c),this.silentEmit("error",b),this.disconnect(!0)}handleReconnection(a,b){let c=!1,d=i.default.checkFlag("IGNORE_RECONNECT_ON_ERROR",b.command.name)||this.condition?.handshake&&i.default.checkFlag("HANDSHAKE_COMMANDS",b.command.name);switch(this.options.reconnectOnError&&!d&&(c=this.options.reconnectOnError(a)),c){case 1:case!0:"reconnecting"!==this.status&&this.disconnect(!0),b.command.reject(a);break;case 2:"reconnecting"!==this.status&&this.disconnect(!0),this.condition?.select!==b.select&&"select"!==b.command.name&&this.select(b.select),this.sendCommand(b.command);break;default:b.command.reject(a)}}_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(a){let{address:b,port:c}=this._getServerAddress();return{command:a.name,args:(0,q.sanitizeArgs)(a.name,a.args),database:this.condition?.select??this.options.db??0,serverAddress:b,serverPort:c}}_buildBatchContext(a){let{address:b,port:c}=this._getServerAddress();return{batchMode:"MULTI",batchSize:a,database:this.condition?.select??this.options.db??0,serverAddress:b,serverPort:c}}_getDescription(){let a;return a="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&&(a+=` (${this.options.connectionName})`),a}resetCommandQueue(){this.commandQueue=new w}resetOfflineQueue(){this.offlineQueue=new w}parseOptions(...a){let b={},c=!1;for(let d=0;d<a.length;++d){let e=a[d];if(null!=e)if("object"==typeof e)(0,t.defaults)(b,e);else if("string"==typeof e)(0,t.defaults)(b,(0,p.parseURL)(e)),e.startsWith("rediss://")&&(c=!0);else if("number"==typeof e)b.port=e;else throw Error("Invalid argument "+e)}if(c&&(0,t.defaults)(b,{tls:!0}),(0,t.defaults)(b,y.defaultOptions),"string"==typeof b.port&&(b.port=parseInt(b.port,10)),"string"==typeof b.db&&(b.db=parseInt(b.db,10)),"resp3"===b.replyMapping&&3!==b.protocol)throw Error('The "resp3" replyMapping is only supported with protocol 3');this.options=(0,p.resolveTLSProfile)(b)}setStatus(a,b){x.enabled&&x("status[%s]: %s -> %s",this._getDescription(),this.status||"[empty]",a),this.status=a,process.nextTick(this.emit.bind(this,a,b))}createScanStream(a,{key:b,options:c={}}){return new n.default({objectMode:!0,key:b,redis:this,command:a,...c})}flushQueue(a,b){let c;if((b=(0,t.defaults)({},b,{offlineQueue:!0,commandQueue:!0})).offlineQueue)for(;c=this.offlineQueue.shift();)c.command.reject(a);if(b.commandQueue&&this.commandQueue.length>0)for(this.stream&&this.stream.removeAllListeners("data");c=this.commandQueue.shift();)c.command.reject(a)}_readyCheck(a){let b=this;this.info(function(c,d){if(c)return c.message&&c.message.includes("NOPERM")?(console.warn(`Skipping the ready check because INFO command fails: "${c.message}". You can disable ready check with "enableReadyCheck". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`),a(null,{})):a(c);if("string"!=typeof d)return a(null,d);let e={},f=d.split("\r\n");for(let a=0;a<f.length;++a){let[b,...c]=f[a].split(":"),d=c.join(":");d&&(e[b]=d)}if(e.loading&&"0"!==e.loading){let c=1e3*(e.loading_eta_seconds||1),d=b.options.maxLoadingRetryTime&&b.options.maxLoadingRetryTime<c?b.options.maxLoadingRetryTime:c;x("Redis server still loading, trying again in "+d+"ms"),setTimeout(function(){b._readyCheck(a)},d)}else a(null,e)}).catch(t.noop)}}d=u.hasHimportCoordinator,y.Cluster=h.default,y.Command=i.default,y.defaultOptions=m.DEFAULT_REDIS_OPTIONS,(0,r.default)(y,f.EventEmitter),(0,o.addTransactionSupport)(y.prototype),c.default=y},99272,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(88947);class e extends d.Readable{constructor(a){super(a),this.opt=a,this._redisCursor="0",this._redisDrained=!1}_read(){if(this._redisDrained)return void this.push(null);let a=[this._redisCursor];this.opt.key&&a.unshift(this.opt.key),this.opt.match&&a.push("MATCH",this.opt.match),this.opt.type&&a.push("TYPE",this.opt.type),this.opt.count&&a.push("COUNT",String(this.opt.count)),this.opt.noValues&&a.push("NOVALUES"),this.opt.redis[this.opt.command](a,(a,b)=>{a?this.emit("error",a):(this._redisCursor=b[0]instanceof Buffer?b[0].toString():b[0],"0"===this._redisCursor&&(this._redisDrained=!0),this.push(b[1]))})}close(){this._redisDrained=!0}}c.default=e},19318,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(54799),e=a.r(34994),f=a.r(26986);c.default=class{constructor(a,b=null,c="",f=!1){this.lua=a,this.numberOfKeys=b,this.keyPrefix=c,this.readOnly=f,this.sha=(0,d.createHash)("sha1").update(a).digest("hex");let g=this.sha,h=new WeakSet;this.Command=class extends e.default{toWritable(b){let c=this.reject;return this.reject=a=>{-1!==a.message.indexOf("NOSCRIPT")&&h.delete(b),c.call(this,a)},h.has(b)?"eval"===this.name&&(this.name="evalsha",this.args[0]=g):(h.add(b),this.name="eval",this.args[0]=a),super.toWritable(b)}}}execute(a,b,c,d){"number"==typeof this.numberOfKeys&&b.unshift(this.numberOfKeys),this.keyPrefix&&(c.keyPrefix=this.keyPrefix),this.readOnly&&(c.readOnly=!0);let e=new this.Command("evalsha",[this.sha,...b],c);return e.promise=e.promise.catch(d=>{if(-1===d.message.indexOf("NOSCRIPT"))throw d;let e=new this.Command("evalsha",[this.sha,...b],c);return(a.isPipeline?a.redis:a).sendCommand(e)}),(0,f.default)(e.promise,d),a.sendCommand(e)}}},30863,(a,b,c)=>{"use strict";function d(a){return"unsubscribe"===a?"subscribe":"punsubscribe"===a?"psubscribe":"sunsubscribe"===a?"ssubscribe":a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=class{constructor(){this.set={subscribe:{},psubscribe:{},ssubscribe:{}}}add(a,b){this.set[d(a)][b]=!0}del(a,b){delete this.set[d(a)][b]}channels(a){return Object.keys(this.set[d(a)])}isEmpty(){return 0===this.channels("subscribe").length&&0===this.channels("psubscribe").length&&0===this.channels("ssubscribe").length}}},94700,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.executeWithAutoPipelining=c.getFirstValueInFlattenedArray=c.shouldUseAutoPipelining=c.notAllowedAutoPipelineCommands=c.kCallbacks=c.kExec=void 0;let d=a.r(23355),e=a.r(69638),f=a.r(26986),g=a.r(53373);function h(a){for(let b=0;b<a.length;b++){let c=a[b];if("string"==typeof c)return c;if(Array.isArray(c)||(0,d.isArguments)(c)){if(0===c.length)continue;return c[0]}let e=[c].flat();if(e.length>0)return e[0]}}c.kExec=Symbol("exec"),c.kCallbacks=Symbol("callbacks"),c.notAllowedAutoPipelineCommands=["auth","info","script","quit","cluster","pipeline","multi","subscribe","psubscribe","unsubscribe","unpsubscribe","select","client","hello","readonly","himport"],c.shouldUseAutoPipelining=function(a,b,d){return b&&a.options.enableAutoPipelining&&!a.isPipeline&&!c.notAllowedAutoPipelineCommands.includes(d)&&!a.options.autoPipeliningIgnoredCommands.includes(d)},c.getFirstValueInFlattenedArray=h,c.executeWithAutoPipelining=function a(b,i,j,k,l){if(b.isCluster&&!b.slots.length)return"wait"===b.status&&b.connect().catch(d.noop),(0,f.default)(new Promise(function(c,d){b.delayUntilReady(e=>{e?d(e):a(b,i,j,k,null).then(c,d)})}),l);let m=b.options.keyPrefix||"",n=b.isCluster?b.slots[e(`${m}${function(a,b){if((0,g.exists)(a,{caseInsensitive:!0})){let c=b.flat(),d=(0,g.getKeyIndexes)(a,c,{nameCaseInsensitive:!0});if(d.length)return c[d[0]]}return h(b)}(j,k)}`)].join(","):"main";if(b.isCluster&&"master"!==b.options.scaleReads&&(n+=(0,g.exists)(j)&&(0,g.hasFlag)(j,"readonly")?":read":":write"),!b._autoPipelines.has(n)){let a=b.pipeline();a[c.kExec]=!1,a[c.kCallbacks]=[],b._autoPipelines.set(n,a)}let o=b._autoPipelines.get(n);o[c.kExec]||(o[c.kExec]=!0,setImmediate(function a(b,d){if(b._runningAutoPipelines.has(d)||!b._autoPipelines.has(d))return;b._runningAutoPipelines.add(d);let e=b._autoPipelines.get(d);b._autoPipelines.delete(d);let f=e[c.kCallbacks];e[c.kCallbacks]=null,e.exec(function(c,e){if(b._runningAutoPipelines.delete(d),c)for(let a=0;a<f.length;a++)process.nextTick(f[a],c);else for(let a=0;a<f.length;a++)process.nextTick(f[a],...e[a]);b._autoPipelines.has(d)&&a(b,d)})},b,n));let p=new Promise(function(a,b){o[c.kCallbacks].push(function(c,d){c?b(c):a(d)}),"call"===i&&k.unshift(j),o[i](...k)});return(0,f.default)(p,l)}},6341,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CLUSTER_OPTIONS=void 0;let d=a.r(79594);c.DEFAULT_CLUSTER_OPTIONS={clusterRetryStrategy:a=>Math.min(100+2*a,2e3),clusterNodeRetryStrategy:null,enableOfflineQueue:!0,enableReadyCheck:!0,scaleReads:"master",maxRedirections:16,retryDelayOnMoved:0,retryDelayOnFailover:100,retryDelayOnClusterDown:100,retryDelayOnTryAgain:100,slotsRefreshTimeout:1e3,useSRVRecords:!1,resolveSrv:d.resolveSrv,dnsLookup:d.lookup,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],shardedSubscribers:!1}},35844,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(29387),e=a.r(44999),f=a.r(94367),g=(0,e.Debug)("cluster:subscriber");c.default=class{constructor(a,b,c=!1){this.connectionPool=a,this.emitter=b,this.isSharded=c,this.started=!1,this.subscriber=null,this.slotRange=[],this.onSubscriberEnd=()=>{this.started?(g("subscriber has disconnected, selecting a new one..."),this.selectSubscriber()):g("subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting.")},this.connectionPool.on("-node",(a,b)=>{this.started&&this.subscriber&&(0,d.getNodeKey)(this.subscriber.options)===b&&(g("subscriber has left, selecting a new one..."),this.selectSubscriber())}),this.connectionPool.on("+node",()=>{this.started&&!this.subscriber&&(g("a new node is discovered and there is no subscriber, selecting a new one..."),this.selectSubscriber())})}getInstance(){return this.subscriber}associateSlotRange(a){return this.isSharded&&(this.slotRange=a),this.slotRange}start(){this.started=!0,this.selectSubscriber(),g("started")}stop(){this.started=!1,this.subscriber&&(this.subscriber.disconnect(),this.subscriber=null)}isStarted(){return this.started}selectSubscriber(){let a=this.lastActiveSubscriber;a&&(a.off("end",this.onSubscriberEnd),a.disconnect()),this.subscriber&&(this.subscriber.off("end",this.onSubscriberEnd),this.subscriber.disconnect());let b=(0,e.sample)(this.connectionPool.getNodes());if(!b){g("selecting subscriber failed since there is no node discovered in the cluster yet"),this.subscriber=null;return}let{options:c}=b;g("selected a subscriber %s:%s",c.host,c.port);let h="subscriber";this.isSharded&&(h="ssubscriber"),this.subscriber=new f.default({port:c.port,host:c.host,username:c.username,password:c.password,enableReadyCheck:!0,connectionName:(0,d.getConnectionName)(h,c.connectionName),lazyConnect:!0,tls:c.tls,protocol:c.protocol,replyMapping:c.replyMapping,retryStrategy:null}),this.subscriber.on("error",e.noop),this.subscriber.on("moved",()=>{this.emitter.emit("forceRefresh")}),this.subscriber.once("end",this.onSubscriberEnd);let i={subscribe:[],psubscribe:[],ssubscribe:[]};if(a){let b=a.condition||a.prevCondition;b&&b.subscriber&&(i.subscribe=b.subscriber.channels("subscribe"),i.psubscribe=b.subscriber.channels("psubscribe"),i.ssubscribe=b.subscriber.channels("ssubscribe"))}if(i.subscribe.length||i.psubscribe.length||i.ssubscribe.length){let a=0;for(let b of["subscribe","psubscribe","ssubscribe"]){let c=i[b];if(0!=c.length)if(g("%s %d channels",b,c.length),"ssubscribe"===b)for(let d of c)a+=1,this.subscriber[b](d).then(()=>{--a||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{g("failed to ssubscribe to channel: %s",d)});else a+=1,this.subscriber[b](c).then(()=>{--a||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{g("failed to %s %d channels",b,c.length)})}}else this.lastActiveSubscriber=this.subscriber;for(let a of["message","messageBuffer"])this.subscriber.on(a,(b,c)=>{this.emitter.emit(a,b,c)});for(let a of["pmessage","pmessageBuffer"])this.subscriber.on(a,(b,c,d)=>{this.emitter.emit(a,b,c,d)});if(!0==this.isSharded)for(let a of["smessage","smessageBuffer"])this.subscriber.on(a,(b,c)=>{this.emitter.emit(a,b,c)})}}},85875,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(44999),e=a.r(29387),f=a.r(69638),g=a.r(79479),h=(0,d.Debug)("cluster:subscriberGroup");class i{constructor(a,b){this.subscriberGroupEmitter=a,this.options=b,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=(a,b)=>{let c=(this.failedAttemptsByNode.get(b)||0)+1;this.failedAttemptsByNode.set(b,c);let d=Math.min(c,i.MAX_RETRY_ATTEMPTS),e=Math.min(i.BASE_BACKOFF_MS*2**d,i.MAX_BACKOFF_MS),f=Math.floor(.5*e*(Math.random()-.5)),g=Math.max(0,e+f);h("Failed to connect subscriber for %s. Refreshing slots in %dms",b,g),this.subscriberGroupEmitter.emit("subscriberConnectFailed",{delay:g,error:a})},this.handleSubscriberConnectSucceeded=a=>{this.failedAttemptsByNode.delete(a)}}getResponsibleSubscriber(a){let b=this.clusterSlots[a][0],c=this.shardedSubscribers.get(b);return c&&"idle"===c.subscriberStatus&&c.start().then(()=>{this.handleSubscriberConnectSucceeded(c.getNodeKey())}).catch(a=>{this.handleSubscriberConnectFailed(a,c.getNodeKey())}),c}addChannels(a){let b=f(a[0]);for(let c of a)if(f(c)!==b)return -1;let c=this.channels.get(b);return c?this.channels.set(b,c.concat(a)):this.channels.set(b,a),Array.from(this.channels.values()).reduce((a,b)=>a+b.length,0)}removeChannels(a){let b=f(a[0]);for(let c of a)if(f(c)!==b)return -1;let c=this.channels.get(b);if(c){let d=c.filter(b=>!a.includes(b));this.channels.set(b,d)}return Array.from(this.channels.values()).reduce((a,b)=>a+b.length,0)}stop(){for(let a of this.shardedSubscribers.values())a.stop();this.pendingReset=null,this.shardedSubscribers.clear(),this.subscriberToSlotsIndex.clear()}start(){let a=[];for(let b of this.shardedSubscribers.values())this.shouldStartSubscriber(b)&&(a.push(b.start().then(()=>{this.handleSubscriberConnectSucceeded(b.getNodeKey())}).catch(a=>{this.handleSubscriberConnectFailed(a,b.getNodeKey())})),this.subscriberGroupEmitter.emit("+subscriber"));return Promise.all(a)}async reset(a,b){if(this.isResetting){this.pendingReset={slots:a,nodes:b};return}this.isResetting=!0;try{let c=this._refreshSlots(a),d=this.hasUnhealthySubscribers();if(!c&&!d)return void h("No topology change detected or failed subscribers. Skipping reset.");for(let[a,b]of this.shardedSubscribers){if(this.subscriberToSlotsIndex.has(a)&&b.isHealthy()){h("Skipping deleting subscriber for %s",a);continue}h("Removing subscriber for %s",a),b.stop(),this.shardedSubscribers.delete(a),this.subscriberGroupEmitter.emit("-subscriber")}let f=[];for(let[a,c]of this.subscriberToSlotsIndex){let c=this.shardedSubscribers.get(a);if(c&&c.isHealthy()){h("Skipping creating new subscriber for %s",a),!c.isStarted()&&this.shouldStartSubscriber(c)&&f.push(c.start().then(()=>{this.handleSubscriberConnectSucceeded(a)}).catch(b=>{this.handleSubscriberConnectFailed(b,a)}));continue}c&&!c.isHealthy()&&(h("Replacing subscriber for %s",a),c.stop(),this.shardedSubscribers.delete(a),this.subscriberGroupEmitter.emit("-subscriber")),h("Creating new subscriber for %s",a);let d=b.find(b=>(0,e.getNodeKey)(b.options)===a);if(!d){h("Failed to find node for key %s",a);continue}let i=new g.default(this.subscriberGroupEmitter,d.options,this.options.redisOptions);this.shardedSubscribers.set(a,i),this.shouldStartSubscriber(i)&&f.push(i.start().then(()=>{this.handleSubscriberConnectSucceeded(a)}).catch(b=>{this.handleSubscriberConnectFailed(b,a)})),this.subscriberGroupEmitter.emit("+subscriber")}await Promise.all(f),this._resubscribe(),this.subscriberGroupEmitter.emit("subscribersReady")}finally{if(this.isResetting=!1,this.pendingReset){let{slots:a,nodes:b}=this.pendingReset;this.pendingReset=null,await this.reset(a,b)}}}_refreshSlots(a){if(this._slotsAreEqual(a)&&this.subscriberToSlotsIndex.size>0)return h("Nothing to refresh because the new cluster map is equal to the previous one."),!1;h("Refreshing the slots of the subscriber group."),this.subscriberToSlotsIndex=new Map;for(let b=0;b<a.length;b++){let c=a[b][0];this.subscriberToSlotsIndex.has(c)||this.subscriberToSlotsIndex.set(c,[]),this.subscriberToSlotsIndex.get(c).push(Number(b))}return this.clusterSlots=JSON.parse(JSON.stringify(a)),!0}_resubscribe(){this.shardedSubscribers&&this.shardedSubscribers.forEach((a,b)=>{let c=this.subscriberToSlotsIndex.get(b);c&&c.forEach(c=>{let d=a.getInstance(),e=this.channels.get(c);if(e&&e.length>0){if(!d||"end"===d.status)return;"ready"===d.status?d.ssubscribe(...e).catch(a=>{h("Failed to ssubscribe on node %s: %s",b,a)}):d.once("ready",()=>{d.ssubscribe(...e).catch(a=>{h("Failed to ssubscribe on node %s: %s",b,a)})})}})})}_slotsAreEqual(a){return void 0!==this.clusterSlots&&JSON.stringify(this.clusterSlots)===JSON.stringify(a)}hasUnhealthySubscribers(){let a=Array.from(this.shardedSubscribers.values()).some(a=>!a.isHealthy()),b=Array.from(this.subscriberToSlotsIndex.keys()).some(a=>!this.shardedSubscribers.has(a));return a||b}shouldStartSubscriber(a){if(a.isStarted())return!1;if(!a.isLazyConnect())return!0;let b=this.subscriberToSlotsIndex.get(a.getNodeKey());return!!b&&b.some(a=>{let b=this.channels.get(a);return!!(b&&b.length>0)})}}i.MAX_RETRY_ATTEMPTS=10,i.MAX_BACKOFF_MS=2e3,i.BASE_BACKOFF_MS=100,c.default=i},38236,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(27699),e=a.r(44999),f=a.r(29387),g=a.r(94367),h=(0,e.Debug)("cluster:connectionPool");class i extends d.EventEmitter{constructor(a,b=null,c={}){super(),this.redisOptions=a,this.clusterNodeRetryStrategy=b,this.hooks=c,this.nodes={all:{},master:{},slave:{}},this.specifiedOptions={}}getNodes(a="all"){let b=this.nodes[a];return Object.keys(b).map(a=>b[a])}getInstanceByKey(a){return this.nodes.all[a]}getSampleInstance(a){let b=Object.keys(this.nodes[a]),c=(0,e.sample)(b);return this.nodes[a][c]}addMasterNode(a){let b=(0,f.getNodeKey)(a.options),c=this.createRedisFromOptions(a,a.options.readOnly);return!a.options.readOnly&&(this.nodes.all[b]=c,this.nodes.master[b]=c,!0)}createRedisFromOptions(a,b){let c=new g.default((0,e.defaults)({retryStrategy:"function"==typeof this.clusterNodeRetryStrategy?this.clusterNodeRetryStrategy:null,enableOfflineQueue:!0,readOnly:b},a,this.redisOptions,{lazyConnect:!0}));return this.hooks.onCreate?.(c,b),c}findOrCreate(a,b=!1){let c,d=(0,f.getNodeKey)(a);return b=!!b,this.specifiedOptions[d]?Object.assign(a,this.specifiedOptions[d]):this.specifiedOptions[d]=a,this.nodes.all[d]?(c=this.nodes.all[d]).options.readOnly!==b&&(c.options.readOnly=b,h("Change role of %s to %s",d,b?"slave":"master"),c[b?"readonly":"readwrite"]().catch(e.noop),b?(delete this.nodes.master[d],this.nodes.slave[d]=c):(delete this.nodes.slave[d],this.nodes.master[d]=c),this.hooks.onRoleChange?.(c,d,b)):(h("Connecting to %s as %s",d,b?"slave":"master"),c=this.createRedisFromOptions(a,b),this.nodes.all[d]=c,this.nodes[b?"slave":"master"][d]=c,c.once("end",()=>{(!this.nodes.all[d]||this.nodes.all[d]===c)&&(this.removeNode(d),this.emit("-node",c,d),Object.keys(this.nodes.all).length||this.emit("drain"))}),this.emit("+node",c,d),c.on("error",a=>{this.emit("nodeError",a,d)})),c}recreate(a,b=!1){let c=(0,f.getNodeKey)(a),d=this.nodes.all[c];d&&(h("Recreating connection to %s",c),this.removeNode(c),d.disconnect());let e=this.findOrCreate(a,b);return d&&this.emit("-node",d,c),e}reset(a){h("Reset with %O",a);let b={};a.forEach(a=>{let c=(0,f.getNodeKey)(a);a.readOnly&&b[c]||(b[c]=a)}),Object.keys(this.nodes.all).forEach(a=>{b[a]||(h("Disconnect %s because the node does not hold any slot",a),this.nodes.all[a].disconnect(),this.removeNode(a))}),Object.keys(b).forEach(a=>{let c=b[a];this.findOrCreate(c,c.readOnly)})}removeNode(a){let{nodes:b}=this;b.all[a]&&(h("Remove %s from the pool",a),this.hooks.onRemove?.(b.all[a]),delete b.all[a]),delete b.master[a],delete b.slave[a]}}c.default=i},13900,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(44999),e=a.r(5583),f=(0,d.Debug)("delayqueue");c.default=class{constructor(){this.queues={},this.timeouts={}}push(a,b,c){let d=c.callback||process.nextTick;this.queues[a]||(this.queues[a]=new e),this.queues[a].push(b),this.timeouts[a]||(this.timeouts[a]=setTimeout(()=>{d(()=>{this.timeouts[a]=null,this.execute(a)})},c.timeout))}execute(a){let b=this.queues[a];if(!b)return;let{length:c}=b;if(c)for(f("send %d commands in %s queue",c,a),this.queues[a]=null;b.length>0;)b.shift()()}}},79479,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(29387),e=a.r(44999),f=a.r(94367),g=(0,e.Debug)("cluster:subscriberGroup:shardedSubscriber"),h="idle",i="starting",j="connected",k="stopping",l="ended",m={[h]:[i,k,l],[i]:[j,k,l],[j]:[k,l],[k]:[l],[l]:[]};c.default=class{constructor(a,b,c){for(let g of(this.emitter=a,this.status=h,this.instance=null,this.connectPromise=null,this.messageListeners=new Map,this.onEnd=()=>{this.updateStatus(l),this.emitter.emit("-node",this.instance,this.nodeKey)},this.onError=a=>{this.emitter.emit("nodeError",a,this.nodeKey)},this.onMoved=()=>{this.emitter.emit("moved")},this.instance=new f.default((0,e.defaults)({enableReadyCheck:!1,enableOfflineQueue:!0,connectionName:(0,d.getConnectionName)("ssubscriber",b.connectionName),retryStrategy:null,lazyConnect:!0},b,c)),this.lazyConnect=c?.lazyConnect??!0,this.nodeKey=(0,d.getNodeKey)(b),this.instance.on("end",this.onEnd),this.instance.on("error",this.onError),this.instance.on("moved",this.onMoved),["smessage","smessageBuffer"])){let a=(...a)=>{this.emitter.emit(g,...a)};this.messageListeners.set(g,a),this.instance.on(g,a)}}async start(){if(this.connectPromise)return this.connectPromise;if(this.status!==i&&this.status!==j){if(this.status===l||!this.instance)throw Error(`Sharded subscriber ${this.nodeKey} cannot be restarted once ended.`);this.updateStatus(i),this.connectPromise=this.instance.connect();try{await this.connectPromise,this.updateStatus(j)}catch(a){throw this.updateStatus(l),a}finally{this.connectPromise=null}}}stop(){this.updateStatus(k),this.instance&&(this.instance.disconnect(),this.instance.removeAllListeners(),this.messageListeners.clear(),this.instance=null),this.updateStatus(l),g("stopped %s",this.nodeKey)}isStarted(){return[j,i].includes(this.status)}get subscriberStatus(){return this.status}isHealthy(){return(this.status===h||this.status===j||this.status===i)&&null!==this.instance}getInstance(){return this.instance}getNodeKey(){return this.nodeKey}isLazyConnect(){return this.lazyConnect}updateStatus(a){if(this.status!==a){if(!m[this.status].includes(a))return void g("Invalid status transition for %s: %s -> %s",this.nodeKey,this.status,a);this.status=a}}}},38834,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(53373),e=a.r(27699),f=a.r(2414),g=a.r(26986),h=a.r(34994),i=a.r(60004),j=a.r(94367),k=a.r(99272),l=a.r(44194),m=a.r(44999),n=a.r(68028),o=a.r(14892),p=a.r(6341),q=a.r(35844),r=a.r(38236),s=a.r(13900),t=a.r(29387),u=a.r(5583),v=a.r(85875),w=a.r(64409),x=(0,m.Debug)("cluster"),y=new WeakSet;class z extends o.default{constructor(a,b={}){super(),this.slots=[],this._groupsIds={},this._groupsBySlot=Array(16384),this.isCluster=!0,this.retryAttempts=0,this.delayQueue=new s.default,this.offlineQueue=new u,this.isRefreshing=!1,this._refreshSlotsCacheCallbacks=[],this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this._readyDelayedCallbacks=[],this.connectionEpoch=0,e.EventEmitter.call(this),this.startupNodes=a,this.options=(0,m.defaults)({},b,p.DEFAULT_CLUSTER_OPTIONS,this.options),this.options.himportFieldsets=(0,w.cloneHimportFieldsets)(this.options.himportFieldsets);let c=this.options.himportFieldsets?.length?new w.default(this.options.himportFieldsets):void 0;if(c&&(0,w.bindHimportCoordinator)(this,c,"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 d={...this.options.redisOptions??{}};delete d.himportFieldsets,this.connectionPool=new r.default(d,this.options.clusterNodeRetryStrategy,c?{onCreate:(a,b)=>{(0,w.bindHimportCoordinator)(a,c,b?"replica":"master")},onRoleChange:(a,b,d)=>{(0,w.setHimportRole)(a,d?"replica":"master"),c.invalidate(a),d||(0,t.waitForRedisReady)(a).then(()=>{for(let d of c.getDefinitions()){let e=c.ensurePrepared(a,d);e?.catch(a=>{this.emit("node error",a,b)})}},a=>{this.emit("node error",a,b)})},onRemove:a=>{(0,w.unbindHimportCoordinator)(a)}}:void 0),this.connectionPool.on("-node",(a,b)=>{this.emit("-node",a)}),this.connectionPool.on("+node",a=>{this.emit("+node",a)}),this.connectionPool.on("drain",()=>{this.setStatus("close")}),this.connectionPool.on("nodeError",(a,b)=>{this.emit("node error",a,b)}),this.subscriber=new q.default(this.connectionPool,this),this.options.scripts&&Object.entries(this.options.scripts).forEach(([a,b])=>{this.defineCommand(a,b)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(a=>{x("connecting failed: %s",a)})}connect(){return new Promise((a,b)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void b(Error("Redis is already connecting/connected"));let c=++this.connectionEpoch;this.setStatus("connecting"),this.resolveStartupNodeHostnames().then(d=>{let e;if(this.connectionEpoch!==c){x("discard connecting after resolving startup nodes because epoch not match: %d != %d",c,this.connectionEpoch),b(new f.RedisError("Connection is discarded because a new connection is made"));return}if("connecting"!==this.status){x("discard connecting after resolving startup nodes because the status changed to %s",this.status),b(new f.RedisError("Connection is aborted"));return}this.connectionPool.reset(d),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(a=>{x("Error while starting subscribers: %s",a)});let g=()=>{this.setStatus("ready"),this.retryAttempts=0,this.executeOfflineCommands(),this.resetNodesRefreshInterval(),a()},h=()=>{this.invokeReadyDelayedCallbacks(void 0),this.removeListener("close",e),this.manuallyClosing=!1,this.setStatus("connect"),this.options.enableReadyCheck?this.readyCheck((a,b)=>{a||b?(x("Ready check failed (%s). Reconnecting...",a||b),"connect"===this.status&&this.disconnect(!0)):g()}):g()};e=()=>{let a=Error("None of startup nodes is available");this.removeListener("refresh",h),this.invokeReadyDelayedCallbacks(a),b(a)},this.once("refresh",h),this.once("close",e),this.once("close",this.handleCloseEvent.bind(this)),this.refreshSlotsCache(a=>{a&&a.message===i.default.defaultMessage&&(j.default.prototype.silentEmit.call(this,"error",a),this.connectionPool.reset([]))}),this.subscriber.start(),this.options.shardedSubscribers&&this.shardedSubscribers.start().catch(a=>{x("Error while starting subscribers: %s",a)})}).catch(a=>{this.setStatus("close"),this.handleCloseEvent(a),this.invokeReadyDelayedCallbacks(a),b(a)})})}disconnect(a=!1){let b=this.status;this.setStatus("disconnecting"),a||(this.manuallyClosing=!0),this.reconnectTimeout&&!a&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null,x("Canceled reconnecting attempts")),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===b?(this.setStatus("close"),this.handleCloseEvent()):this.connectionPool.reset([])}quit(a){let b=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"===b){let b=(0,g.default)(Promise.resolve("OK"),a);return setImmediate((function(){this.setStatus("close"),this.handleCloseEvent()}).bind(this)),b}return(0,g.default)(Promise.all(this.nodes().map(a=>a.quit().catch(a=>{if(a.message===m.CONNECTION_CLOSED_ERROR_MSG)return"OK";throw a}))).then(()=>"OK"),a)}duplicate(a=[],b){let c=a.length>0?a:this.startupNodes.slice(0),d=Object.assign({},this.options,b);return this.options.redisOptions&&b?.redisOptions&&(d.redisOptions=Object.assign({},this.options.redisOptions,b.redisOptions)),new z(c,d)}nodes(a="all"){if("all"!==a&&"master"!==a&&"slave"!==a)throw Error('Invalid role "'+a+'". Expected "all", "master" or "slave"');return this.connectionPool.getNodes(a)}delayUntilReady(a){this._readyDelayedCallbacks.push(a)}get autoPipelineQueueSize(){let a=0;for(let b of this._autoPipelines.values())a+=b.length;return a}refreshSlotsCache(a){if(a&&this._refreshSlotsCacheCallbacks.push(a),this.isRefreshing)return;this.isRefreshing=!0;let b=this,c=a=>{for(let b of(this.isRefreshing=!1,this._refreshSlotsCacheCallbacks))b(a);this._refreshSlotsCacheCallbacks=[]},d=(0,m.shuffle)(this.connectionPool.getNodes()),e=null;!function a(f){if(f===d.length)return c(new i.default(i.default.defaultMessage,e));let g=d[f],h=`${g.options.host}:${g.options.port}`;x("getting slot cache from %s",h),b.getInfoFromNode(g,function(d){switch(b.status){case"close":case"end":return c(Error("Cluster is disconnected."));case"disconnecting":return c(Error("Cluster is disconnecting."))}d?(b.emit("node error",d,h),e=d,a(f+1)):(b.emit("refresh"),c())})}(0)}sendCommand(a,b,c){if("wait"===this.status&&this.connect().catch(m.noop),"end"===this.status)return a.reject(Error(m.CONNECTION_CLOSED_ERROR_MSG)),a.promise;if(!b&&!c&&"ready"===this.status&&(0,w.isHimportControlCommand)(a)&&(0,w.interceptHimportControlCommand)(this.connectionPool.getNodes("master"),a))return a.promise;let e=this.options.scaleReads;"master"!==e&&(a.isReadOnly||(0,d.exists)(a.name)&&(0,d.hasFlag)(a.name,"readonly")||(e="master"));let g=c?c.slot:a.getSlot(),i={},j=this,k=null;if(!c&&!y.has(a)){y.add(a);let b=a.reject;a.reject=function(c){let d=l.bind(null,!0);j.handleError(c,i,{moved:function(b,c){x("command %s is moved to %s",a.name,c),g=Number(b),j.slots[b]?j.slots[b][0]=c:j.slots[b]=[c],j._groupsBySlot[b]=j._groupsIds[j.slots[b].join(";")];let d=j.natMapper(c),e=(0,t.getNodeKey)(d);k&&(0,t.getNodeKey)(k.options)===e&&j.connectionPool.getInstanceByKey(e)===k?(x("MOVED redirect points back at %s; recreating its connection",e),j.connectionPool.recreate(d)):j.connectionPool.findOrCreate(d),l(),x("refreshing slot caches... (triggered by MOVED error)"),j.refreshSlotsCache()},ask:function(b,c){x("command %s is required to ask %s:%s",a.name,c);let d=j.natMapper(c);j.connectionPool.findOrCreate(d),l(!1,`${d.host}:${d.port}`)},tryagain:d,clusterDown:d,connectionClosed:d,maxRedirections:function(c){b.call(a,c)},defaults:function(){b.call(a,c)}})}}function l(d,i){let l;if("end"===j.status)return void a.reject(new f.AbortError("Cluster is ended."));if("ready"===j.status||"cluster"===a.name){if(c&&c.redis)l=c.redis;else if(h.default.checkFlag("ENTER_SUBSCRIBER_MODE",a.name)||h.default.checkFlag("EXIT_SUBSCRIBER_MODE",a.name)){if(j.options.shardedSubscribers&&("ssubscribe"==a.name||"sunsubscribe"==a.name)){let b=j.shardedSubscribers.getResponsibleSubscriber(g);if(!b)return void a.reject(new f.AbortError(`No sharded subscriber for slot: ${g}`));let c=-1;"ssubscribe"==a.name&&(c=j.shardedSubscribers.addChannels(a.getKeys())),"sunsubscribe"==a.name&&(c=j.shardedSubscribers.removeChannels(a.getKeys())),-1!==c?l=b.getInstance():a.reject(new f.AbortError("Possible CROSSSLOT error: All channels must hash to the same slot"))}else l=j.subscriber.getInstance();if(!l)return void a.reject(new f.AbortError("No subscriber for the cluster"))}else{if(!d){if("number"==typeof g&&j.slots[g]){let b=j.slots[g];if("function"==typeof e){let c=b.map(function(a){return j.connectionPool.getInstanceByKey(a)});Array.isArray(l=e(c,a))&&(l=(0,m.sample)(l)),l||(l=c[0])}else{let a;a="all"===e?(0,m.sample)(b):"slave"===e&&b.length>1?(0,m.sample)(b,1):b[0],l=j.connectionPool.getInstanceByKey(a)}}i&&(l=j.connectionPool.getInstanceByKey(i))}if(l||(l=("function"==typeof e?null:j.connectionPool.getSampleInstance(e))||j.connectionPool.getSampleInstance("all")),l&&!j.options.enableOfflineQueue&&"ready"!==l.status&&"wait"!==l.status)return void a.reject(Error(m.CONNECTION_CLOSED_ERROR_MSG))}c&&!c.redis&&(c.redis=l)}if(!l&&j.options.enableOfflineQueue)return void j.offlineQueue.push({command:a,stream:b,node:c});if(!l)return void a.reject(Error("Cluster isn't ready and enableOfflineQueue options is false"));if(k=l,i){let c=(0,w.getHimportBinding)(l);if(b||c?.role!=="master"?void 0:c.coordinator.classify(a))return void(0,t.waitForRedisReady)(l).then(()=>{if(!a.isSettled)return c.coordinator.prepareCommand(l,a)??Promise.resolve()}).then(()=>{a.isSettled||(c.coordinator.allowNextSend(l,a),l.asking(),l.sendCommand(a,b))},b=>{a.isSettled||a.reject(b)});l.asking()}l.sendCommand(a,b)}return l(),a.promise}sscanStream(a,b){return this.createScanStream("sscan",{key:a,options:b})}sscanBufferStream(a,b){return this.createScanStream("sscanBuffer",{key:a,options:b})}hscanStream(a,b){return this.createScanStream("hscan",{key:a,options:b})}hscanBufferStream(a,b){return this.createScanStream("hscanBuffer",{key:a,options:b})}zscanStream(a,b){return this.createScanStream("zscan",{key:a,options:b})}zscanBufferStream(a,b){return this.createScanStream("zscanBuffer",{key:a,options:b})}handleError(a,b,c){if(void 0===b.value?b.value=this.options.maxRedirections:b.value-=1,b.value<=0)return void c.maxRedirections(Error("Too many Cluster redirections. Last error: "+a));let d=a.message.split(" ");if("MOVED"===d[0]){let a=Number(d[1]);if(!Number.isInteger(a)||a<0||a>=16384)return void c.defaults();let b=this.options.retryDelayOnMoved;b&&"number"==typeof b?this.delayQueue.push("moved",c.moved.bind(null,a,d[2]),{timeout:b}):c.moved(a,d[2])}else"ASK"===d[0]?c.ask(d[1],d[2]):"TRYAGAIN"===d[0]?this.delayQueue.push("tryagain",c.tryagain,{timeout:this.options.retryDelayOnTryAgain}):"CLUSTERDOWN"===d[0]&&this.options.retryDelayOnClusterDown>0?this.delayQueue.push("clusterdown",c.connectionClosed,{timeout:this.options.retryDelayOnClusterDown,callback:this.refreshSlotsCache.bind(this)}):a.message===m.CONNECTION_CLOSED_ERROR_MSG&&this.options.retryDelayOnFailover>0&&"ready"===this.status?this.delayQueue.push("failover",c.connectionClosed,{timeout:this.options.retryDelayOnFailover,callback:this.refreshSlotsCache.bind(this)}):c.defaults()}resetOfflineQueue(){this.offlineQueue=new u}clearNodesRefreshInterval(){this.slotsTimer&&(clearTimeout(this.slotsTimer),this.slotsTimer=null)}resetNodesRefreshInterval(){if(this.slotsTimer||!this.options.slotsRefreshInterval)return;let a=()=>{this.slotsTimer=setTimeout(()=>{x('refreshing slot caches... (triggered by "slotsRefreshInterval" option)'),this.refreshSlotsCache(()=>{a()})},this.options.slotsRefreshInterval)};a()}setStatus(a){x("status: %s -> %s",this.status||"[empty]",a),this.status=a,process.nextTick(()=>{this.emit(a)})}handleCloseEvent(a){let b;a&&x("closed because %s",a),this.manuallyClosing||"function"!=typeof this.options.clusterRetryStrategy||(b=this.options.clusterRetryStrategy.call(this,++this.retryAttempts,a)),"number"==typeof b?(this.setStatus("reconnecting"),this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,x("Cluster is disconnected. Retrying after %dms",b),this.connect().catch(function(a){x("Got error %s when reconnecting. Ignoring...",a)})},b)):(this.options.shardedSubscribers&&this.subscriberGroupEmitter?.removeAllListeners(),this.setStatus("end"),this.flushQueue(Error("None of startup nodes is available")))}flushQueue(a){let b;for(;b=this.offlineQueue.shift();)b.command.reject(a)}executeOfflineCommands(){if(this.offlineQueue.length){let a;x("send %d commands in offline queue",this.offlineQueue.length);let b=this.offlineQueue;for(this.resetOfflineQueue();a=b.shift();)this.sendCommand(a.command,a.stream,a.node)}}natMapper(a){let b="string"==typeof a?a:`${a.host}:${a.port}`,c=null;return(this.options.natMap&&"function"==typeof this.options.natMap?c=this.options.natMap(b):this.options.natMap&&"object"==typeof this.options.natMap&&(c=this.options.natMap[b]),c)?(x("NAT mapping %s -> %O",b,c),Object.assign({},c)):"string"==typeof a?(0,t.nodeKeyToRedisOptions)(a):a}getInfoFromNode(a,b){if(!a)return b(Error("Node is disconnected"));let c=a.duplicate({enableOfflineQueue:!0,enableReadyCheck:!1,retryStrategy:null,protocol:2,replyMapping:"legacy",connectionName:(0,t.getConnectionName)("refresher",this.options.redisOptions&&this.options.redisOptions.connectionName)});c.on("error",m.noop),c.cluster("SLOTS",(0,m.timeout)((a,d)=>{if(c.disconnect(),a)return x("error encountered running CLUSTER.SLOTS: %s",a),b(a);if("disconnecting"===this.status||"close"===this.status||"end"===this.status){x("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s",d.length,this.status),b();return}let e=[];x("cluster slots result count: %d",d.length);for(let a=0;a<d.length;++a){let b=d[a],c=b[0],f=b[1],g=[];for(let a=2;a<b.length;a++){if(!b[a][0])continue;let c=this.natMapper({host:b[a][0],port:b[a][1]});c.readOnly=2!==a,e.push(c),g.push(c.host+":"+c.port)}x("cluster slots result [%d]: slots %d~%d served by %s",a,c,f,g);for(let a=c;a<=f;a++)this.slots[a]=g}this._groupsIds=Object.create(null);let f=0;for(let a=0;a<16384;a++){let b=(this.slots[a]||[]).join(";");if(!b.length){this._groupsBySlot[a]=void 0;continue}this._groupsIds[b]||(this._groupsIds[b]=++f),this._groupsBySlot[a]=this._groupsIds[b]}this.connectionPool.reset(e),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(a=>{x("Error while starting subscribers: %s",a)}),b()},this.options.slotsRefreshTimeout))}invokeReadyDelayedCallbacks(a){for(let b of this._readyDelayedCallbacks)process.nextTick(b,a);this._readyDelayedCallbacks=[]}readyCheck(a){this.cluster("INFO",(b,c)=>{let d;if(b)return a(b);if("string"!=typeof c)return a();let e=c.split("\r\n");for(let a=0;a<e.length;++a){let b=e[a].split(":");if("cluster_state"===b[0]){d=b[1];break}}"fail"===d?(x("cluster state not ok (%s)",d),a(null,d)):a()})}resolveSrv(a){return new Promise((b,c)=>{this.options.resolveSrv(a,(a,d)=>{if(a)return c(a);let e=this,f=(0,t.groupSrvRecords)(d),g=Object.keys(f).sort((a,b)=>parseInt(a)-parseInt(b));!function a(d){if(!g.length)return c(d);let h=f[g[0]],i=(0,t.weightSrvRecords)(h);h.records.length||g.shift(),e.dnsLookup(i.name).then(a=>b({host:a,port:i.port}),a)}()})})}dnsLookup(a){return new Promise((b,c)=>{this.options.dnsLookup(a,(d,e)=>{d?(x("failed to resolve hostname %s to IP: %s",a,d.message),c(d)):(x("resolved hostname %s to IP %s",a,e),b(e))})})}async resolveStartupNodeHostnames(){if(!Array.isArray(this.startupNodes)||0===this.startupNodes.length)throw Error("`startupNodes` should contain at least one node.");let a=(0,t.normalizeNodeOptions)(this.startupNodes),b=(0,t.getUniqueHostnamesFromOptions)(a);if(0===b.length)return a;let c=await Promise.all(b.map((this.options.useSRVRecords?this.resolveSrv:this.dnsLookup).bind(this))),d=(0,m.zipMap)(b,c);return a.map(a=>{let b=d.get(a.host);return b?this.options.useSRVRecords?Object.assign({},a,b):Object.assign({},a,{host:b}):a})}createScanStream(a,{key:b,options:c={}}){return new k.default({objectMode:!0,key:b,redis:this,command:a,...c})}createShardedSubscriberGroup(){this.subscriberGroupEmitter=new e.EventEmitter,this.shardedSubscribers=new v.default(this.subscriberGroupEmitter,this.options);let a=a=>{a instanceof i.default&&this.disconnect(!0)};for(let b of(this.subscriberGroupEmitter.on("-node",(b,c)=>{this.emit("-node",b,c),this.refreshSlotsCache(a)}),this.subscriberGroupEmitter.on("subscriberConnectFailed",({delay:b,error:c})=>{this.emit("error",c),setTimeout(()=>{this.refreshSlotsCache(a)},b)}),this.subscriberGroupEmitter.on("moved",()=>{this.refreshSlotsCache(a)}),this.subscriberGroupEmitter.on("-subscriber",()=>{this.emit("-subscriber")}),this.subscriberGroupEmitter.on("+subscriber",()=>{this.emit("+subscriber")}),this.subscriberGroupEmitter.on("nodeError",(a,b)=>{this.emit("nodeError",a,b)}),this.subscriberGroupEmitter.on("subscribersReady",()=>{this.emit("subscribersReady")}),["smessage","smessageBuffer"]))this.subscriberGroupEmitter.on(b,(a,c,d)=>{this.emit(b,a,c,d)})}}(0,n.default)(z,e.EventEmitter),(0,l.addTransactionSupport)(z.prototype),c.default=z},29387,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.getConnectionName=c.weightSrvRecords=c.groupSrvRecords=c.getUniqueHostnamesFromOptions=c.normalizeNodeOptions=c.nodeKeyToRedisOptions=c.getNodeKey=c.waitForRedisReady=void 0;let d=a.r(44999),e=a.r(4446);c.waitForRedisReady=function(a){return"ready"===a.status?Promise.resolve():"wait"===a.status?a.connect():"end"===a.status?Promise.reject(Error(d.CONNECTION_CLOSED_ERROR_MSG)):new Promise((b,c)=>{let e=()=>{a.removeListener("end",f),b()},f=()=>{a.removeListener("ready",e),c(Error(d.CONNECTION_CLOSED_ERROR_MSG))};a.once("ready",e),a.once("end",f)})},c.getNodeKey=function(a){return a.port=a.port||6379,a.host=a.host||"127.0.0.1",a.host+":"+a.port},c.nodeKeyToRedisOptions=function(a){let b=a.lastIndexOf(":");if(-1===b)throw Error(`Invalid node key ${a}`);return{host:a.slice(0,b),port:Number(a.slice(b+1))}},c.normalizeNodeOptions=function(a){return a.map(a=>{let b={};if("object"==typeof a)Object.assign(b,a);else if("string"==typeof a)Object.assign(b,(0,d.parseURL)(a));else if("number"==typeof a)b.port=a;else throw Error("Invalid argument "+a);return"string"==typeof b.port&&(b.port=parseInt(b.port,10)),delete b.db,b.port||(b.port=6379),b.host||(b.host="127.0.0.1"),(0,d.resolveTLSProfile)(b)})},c.getUniqueHostnamesFromOptions=function(a){let b={};return a.forEach(a=>{b[a.host]=!0}),Object.keys(b).filter(a=>!(0,e.isIP)(a))},c.groupSrvRecords=function(a){let b={};for(let c of a)b.hasOwnProperty(c.priority)?(b[c.priority].totalWeight+=c.weight,b[c.priority].records.push(c)):b[c.priority]={totalWeight:c.weight,records:[c]};return b},c.weightSrvRecords=function(a){if(1===a.records.length)return a.totalWeight=0,a.records.shift();let b=Math.floor(Math.random()*(a.totalWeight+a.records.length)),c=0;for(let[d,e]of a.records.entries())if((c+=1+e.weight)>b)return a.totalWeight-=e.weight,a.records.splice(d,1),e},c.getConnectionName=function(a,b){let c=`ioredis-cluster(${a})`;return b?`${c}:${b}`:c}},39004,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=(0,a.r(44999).Debug)("AbstractConnector");c.default=class{constructor(a){this.connecting=!1,this.disconnectTimeout=a}check(a){return!0}disconnect(){if(this.connecting=!1,this.stream){let a=this.stream,b=setTimeout(()=>{d("stream %s:%s still open, destroying it",a.remoteAddress,a.remotePort),a.destroy()},this.disconnectTimeout);a.on("close",()=>clearTimeout(b)),a.end()}}}},3197,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.FailoverDetector=void 0;let d=(0,a.r(44999).Debug)("FailoverDetector"),e="+switch-master";c.FailoverDetector=class{constructor(a,b){this.isDisconnected=!1,this.connector=a,this.sentinels=b}cleanup(){for(let a of(this.isDisconnected=!0,this.sentinels))a.client.disconnect()}async subscribe(){d("Starting FailoverDetector");let a=[];for(let b of this.sentinels){let c=b.client.subscribe(e).catch(a=>{d("Failed to subscribe to failover messages on sentinel %s:%s (%s)",b.address.host||"127.0.0.1",b.address.port||26739,a.message)});a.push(c),b.client.on("message",a=>{this.isDisconnected||a!==e||this.disconnect()})}await Promise.all(a)}disconnect(){this.isDisconnected=!0,d("Failover detected, disconnecting"),this.connector.disconnect()}}},67083,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default=class{constructor(a){this.cursor=0,this.sentinels=a.slice(0)}next(){let a=this.cursor>=this.sentinels.length;return{done:a,value:a?void 0:this.sentinels[this.cursor++]}}reset(a){a&&this.sentinels.length>1&&1!==this.cursor&&this.sentinels.unshift(...this.sentinels.splice(this.cursor-1)),this.cursor=0}add(a){for(let c=0;c<this.sentinels.length;c++){var b;if(b=this.sentinels[c],(a.host||"127.0.0.1")===(b.host||"127.0.0.1")&&(a.port||26379)===(b.port||26379))return!1}return this.sentinels.push(a),!0}toString(){return`${JSON.stringify(this.sentinels)} @${this.cursor}`}}},84928,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.SentinelIterator=void 0;let d=a.r(4446),e=a.r(44999),f=a.r(55004),g=a.r(67083);c.SentinelIterator=g.default;let h=a.r(39004),i=a.r(94367),j=a.r(3197),k=(0,e.Debug)("SentinelConnector");class l extends h.default{constructor(a){if(super(a.disconnectTimeout),this.options=a,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 g.default(this.options.sentinels)}check(a){let b=!a.role||this.options.role===a.role;return b||(k("role invalid, expected %s, but got %s",this.options.role,a.role),this.sentinelIterator.next(),this.sentinelIterator.next(),this.sentinelIterator.reset(!0)),b}disconnect(){super.disconnect(),this.failoverDetector&&this.failoverDetector.cleanup()}connect(a){let b;this.connecting=!0,this.retryAttempts=0;let c=async()=>{let g=this.sentinelIterator.next();if(g.done){this.sentinelIterator.reset(!1);let d="function"==typeof this.options.sentinelRetryStrategy?this.options.sentinelRetryStrategy(++this.retryAttempts):null,e="number"!=typeof d?"All sentinels are unreachable and retry is disabled.":`All sentinels are unreachable. Retrying from scratch after ${d}ms.`;b&&(e+=` Last error: ${b.message}`),k(e);let f=Error(e);if("number"==typeof d)return a("error",f),await new Promise(a=>setTimeout(a,d)),c();throw f}let h=null,i=null;try{h=await this.resolve(g.value)}catch(a){i=a}if(!this.connecting)throw Error(e.CONNECTION_CLOSED_ERROR_MSG);let j=g.value.host+":"+g.value.port;if(h)return k("resolved: %s:%s from sentinel %s",h.host,h.port,j),this.options.enableTLSForSentinelMode&&this.options.tls?(Object.assign(h,this.options.tls),this.stream=(0,f.connect)(h),this.stream.once("secureConnect",this.initFailoverDetector.bind(this))):(this.stream=(0,d.createConnection)(h),this.stream.once("connect",this.initFailoverDetector.bind(this))),this.stream.once("error",a=>{this.firstError=a}),this.stream;{let d=i?"failed to connect to sentinel "+j+" because "+i.message:"connected to sentinel "+j+" successfully, but got an invalid reply: "+h;return k(d),a("sentinelError",Error(d)),i&&(b=i),c()}};return c()}async updateSentinels(a){if(!this.options.updateSentinels)return;let b=await a.sentinel("sentinels",this.options.name);Array.isArray(b)&&(b.map(e.packObject).forEach(a=>{if(-1===(a.flags?a.flags.split(","):[]).indexOf("disconnected")&&a.ip&&a.port){let b=this.sentinelNatResolve(m(a));this.sentinelIterator.add(b)&&k("adding sentinel %s:%s",b.host,b.port)}}),k("Updated internal sentinels: %s",this.sentinelIterator))}async resolveMaster(a){let b=await a.sentinel("get-master-addr-by-name",this.options.name);return await this.updateSentinels(a),this.sentinelNatResolve(Array.isArray(b)?{host:b[0],port:Number(b[1])}:null)}async resolveSlave(a){let b=await a.sentinel("slaves",this.options.name);if(!Array.isArray(b))return null;let c=b.map(e.packObject).filter(a=>a.flags&&!a.flags.match(/(disconnected|s_down|o_down)/));return this.sentinelNatResolve(function(a,b){let c;if(0===a.length)return null;if("function"==typeof b)c=b(a);else if(null!==b&&"object"==typeof b){let d=Array.isArray(b)?[...b]:[b];d.sort((a,b)=>{let c=a.prio??1,d=b.prio??1;return c<d?-1:+(c>d)});for(let b=0;b<d.length;b++){for(let e=0;e<a.length;e++){let f=a[e];if(f.ip===d[b].ip&&f.port===d[b].port){c=f;break}}if(c)break}}return c||(c=(0,e.sample)(a)),m(c)}(c,this.options.preferredSlaves))}sentinelNatResolve(a){if(!a||!this.options.natMap)return a;let b=`${a.host}:${a.port}`,c=a;return"function"==typeof this.options.natMap?c=this.options.natMap(b)||a:"object"==typeof this.options.natMap&&(c=this.options.natMap[b]||a),c}connectToSentinel(a,b){return new i.default({port:a.port||26379,host:a.host,username:this.options.sentinelUsername||null,password:this.options.sentinelPassword||null,family:a.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,...b})}async resolve(a){let b=this.connectToSentinel(a);b.on("error",n);try{if("slave"===this.options.role)return await this.resolveSlave(b);return await this.resolveMaster(b)}finally{b.disconnect()}}async initFailoverDetector(){if(!this.options.failoverDetector)return;this.sentinelIterator.reset(!0);let a=[];for(;a.length<this.options.sentinelMaxConnections;){let{done:b,value:c}=this.sentinelIterator.next();if(b)break;let d=this.connectToSentinel(c,{lazyConnect:!0,retryStrategy:this.options.sentinelReconnectStrategy,protocol:this.options.protocol,replyMapping:"legacy"});d.on("reconnecting",()=>{this.emitter?.emit("sentinelReconnecting")}),a.push({address:c,client:d})}this.sentinelIterator.reset(!1),this.failoverDetector&&this.failoverDetector.cleanup(),this.failoverDetector=new j.FailoverDetector(this,a),await this.failoverDetector.subscribe(),this.emitter?.emit("failoverSubscribed")}}function m(a){return{host:a.ip,port:Number(a.port)}}function n(){}c.default=l},29747,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(4446),e=a.r(55004),f=a.r(44999),g=a.r(39004);class h extends g.default{constructor(a){super(a.disconnectTimeout),this.options=a}connect(a){let b,{options:c}=this;return this.connecting=!0,"path"in c&&c.path?b={path:c.path}:(b={},"port"in c&&null!=c.port&&(b.port=c.port),"host"in c&&null!=c.host&&(b.host=c.host),"family"in c&&null!=c.family&&(b.family=c.family)),c.tls&&Object.assign(b,c.tls),new Promise((a,g)=>{process.nextTick(()=>{if(!this.connecting)return void g(Error(f.CONNECTION_CLOSED_ERROR_MSG));try{c.tls?this.stream=(0,e.connect)(b):this.stream=(0,d.createConnection)(b)}catch(a){g(a);return}this.stream.once("error",a=>{this.firstError=a}),a(this.stream)})})}}c.default=h},63834,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.SentinelConnector=c.StandaloneConnector=void 0,c.StandaloneConnector=a.r(29747).default,c.SentinelConnector=a.r(84928).default},91177,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=`-----BEGIN CERTIFICATE-----
|
|
1
|
+
module.exports=[60985,18682,a=>{"use strict";let b,c,d;var e=a.i(5246),f=a.i(66680),g=a.i(51403),h=a.i(2157);function i(a,b){let c=a[`${b}_B64`];if(null!=c){if(!/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(c))throw Error(`${b}_B64 is not valid base64`);return Buffer.from(c,"base64").toString("utf8")}return a[b]}let j=()=>new TextEncoder().encode(function(a=process.env){if(a.SESSION_SECRET)return a.SESSION_SECRET;throw Error(a.JWT_SECRET?"SESSION_SECRET is required; the JWT_SECRET session fallback was removed after it expired on 2026-10-01":"SESSION_SECRET is required")}());async function k(){return b||(b=new g.Redis(process.env.REDIS_URL??"redis://127.0.0.1:6379",{maxRetriesPerRequest:1,connectTimeout:2e3,commandTimeout:2500,enableOfflineQueue:!1})).on("error",()=>void 0),("connecting"===b.status||"connect"===b.status)&&await new Promise((a,c)=>{let d=()=>{b.off("error",e),a()},e=a=>{b.off("ready",d),c(a)};b.once("ready",d),b.once("error",e)}),b}async function l(a){var b;let c;if("hive"===a.provider)return!0;if("string"!=typeof a.username||!a.sessionId||!/^[a-f0-9-]{36}$/.test(a.sessionId))return!1;let d=(b=a.username,`magnus_session:local:${(0,f.createHmac)("sha256",j()).update(b).digest("hex")}`),[e,g]=await (await k()).mget(`${d}:generation`,`${d}:session:${a.sessionId}`);return!!(e&&g===`${e}:${c=function(a=process.env){let b=i(a,"DASHBOARD_ADMIN_USERNAME"),c=i(a,"DASHBOARD_ADMIN_PASSWORD");if(b&&c)return{username:b,password:c,source:"dashboard-admin-password",version:2};let d=i(a,"DASHBOARD_ADMIN_PASSWORD_HASH");if(!!b!=!!d)throw Error("DASHBOARD_ADMIN_USERNAME and DASHBOARD_ADMIN_PASSWORD (or _HASH) must be configured together");if(b&&d){if(!d.startsWith("$argon2id$"))throw Error("DASHBOARD_ADMIN_PASSWORD_HASH must be an Argon2id hash");return{username:b,passwordHash:d,source:"dashboard-admin-hash",version:2}}throw Error("Dedicated dashboard administrator credentials are required (DASHBOARD_ADMIN_USERNAME with DASHBOARD_ADMIN_PASSWORD_HASH)")}(),(0,f.createHmac)("sha256",j()).update(JSON.stringify([c.username,c.passwordHash??c.password,process.env.LOCAL_SESSION_GENERATION??""])).digest("hex")}`)}class m extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(a,b){super(a,b),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class n extends m{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(a,b,c="unspecified",d="unspecified"){super(a,{cause:{claim:c,reason:d,payload:b}}),this.claim=c,this.reason=d,this.payload=b}}class o extends m{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(a,b,c="unspecified",d="unspecified"){super(a,{cause:{claim:c,reason:d,payload:b}}),this.claim=c,this.reason=d,this.payload=b}}class p extends m{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"}class q extends m{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"}class r extends m{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"}class s extends m{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}class t extends m{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(a="signature verification failed",b){super(a,b)}}let u=[["verify"],["sign"]];function v(a){let b={name:"HMAC",hash:`SHA-${a}`};return{kty:["oct"],secret:!0,subtle:b,signing:b,usages:u}}function w(a,b){let c={name:b?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:`SHA-${a}`};return{kty:["RSA"],subtle:c,signing:b?{...c,saltLength:b}:c,usages:u,minRsaBits:2048}}function x(a,b){return{kty:["EC"],crv:a,subtle:{name:"ECDSA",namedCurve:a},signing:{name:"ECDSA",hash:`SHA-${b}`},usages:u}}function y(){let a={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:a,signing:a,usages:u}}function z(a){let b={name:`ML-DSA-${a}`};return{kty:["AKP"],subtle:b,signing:b,usages:u}}let A=function(a){let b={__proto__:null};for(let c in a)b[c]={...a[c],alg:c};return b}({HS256:v(256),HS384:v(384),HS512:v(512),RS256:w(256),RS384:w(384),RS512:w(512),PS256:w(256,32),PS384:w(384,48),PS512:w(512,64),ES256:x("P-256",256),ES384:x("P-384",384),ES512:x("P-521",512),EdDSA:y(),Ed25519:y(),"ML-DSA-44":z(44),"ML-DSA-65":z(65),"ML-DSA-87":z(87)}),B=new TextEncoder,C=new TextDecoder,D=new TextDecoder("utf-8",{fatal:!0}),E=/[^\x00-\x7f]/;function F(a){if("string"==typeof a&&a.length>=128){if(E.test(a))throw TypeError("non-ASCII string encountered in encode()");return B.encode(a)}let b=new Uint8Array(a.length);for(let c=0;c<a.length;c++){let d=a.charCodeAt(c);if(d>127)throw TypeError("non-ASCII string encountered in encode()");b[c]=d}return b}function G(a){try{return function(a,b=!1){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(a,{alphabet:b?"base64url":"base64"});if(b){if(a.includes("+")||a.includes("/"))throw TypeError("Invalid base64url");a=a.replace(/-/g,"+").replace(/_/g,"/")}let c=atob(a),d=new Uint8Array(c.length);for(let a=0;a<c.length;a++)d[a]=c.charCodeAt(a);return d}("string"==typeof a?a:C.decode(a),!0)}catch(a){throw TypeError("The input to be decoded is not correctly encoded.",{cause:a})}}function H(a){if("object"!=typeof a||null===a||"[object Object]"!==Object.prototype.toString.call(a))return!1;let b=Object.getPrototypeOf(a);return null===b||null===Object.getPrototypeOf(b)}function I(a,b,c){try{return G(a)}catch(a){throw new c(`Failed to base64url decode the ${b}`,{cause:a})}}let J={__proto__:null,b64:!0};async function K(a,b,d){let e,f,{alg:g,secret:h}=a,i="decrypt"===d||"sign"===d;if(h&&b instanceof Uint8Array)return b;if(H(b)){if("string"!=typeof(e=function(a){let b={__proto__:null,...a};if(void 0!==b.ext&&"boolean"!=typeof b.ext)throw TypeError('"ext" (Extractable) Parameter must be a boolean');if(void 0!==b.key_ops){let a=b.key_ops,c=Array.isArray(a)?[...a]:void 0;if(!c||c.some(a=>"string"!=typeof a)||new Set(c).size!==c.length)throw TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');b.key_ops=c}return b}(b)).kty)throw O(g,b,h);if(!(h?"oct"===e.kty&&"string"==typeof e.k:"oct"!==e.kty&&(i?"AKP"===e.kty&&"string"==typeof e.priv||"string"==typeof e.d:void 0===e.d&&void 0===e.priv)))throw TypeError(h?'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present':`JSON Web Key for this operation must be a ${i?"private":"public"} JWK`);if(((a,b,c)=>{let{alg:d}=a;if(void 0!==b.use){let a="sign"===c||"verify"===c?"sig":"enc";if(b.use!==a)throw TypeError(`Invalid key for this operation, its "use" must be "${a}" when present`)}if("AKP"===b.kty&&void 0===b.alg)throw TypeError('missing "alg" (Algorithm) Parameter value');if(void 0!==b.alg&&b.alg!==d)throw TypeError(`Invalid key for this operation, its "alg" must be "${d}" when present`);if(Array.isArray(b.key_ops)){let d="encrypt"===c||"decrypt"===c?a.ops?.[+("encrypt"!==c)]:c;if(d&&!b.key_ops.includes(d))throw TypeError(`Invalid key for this operation, its "key_ops" must include "${d}" when present`)}})(a,e,d),"oct"===e.kty)return G(e.k);if(!Object.isFrozen(b)){let{key_ops:a}=b;Array.isArray(a)&&Object.freeze(a),Object.freeze(b)}}else{if(!N(b))throw O(g,b,h);let a=h?"secret":i?"private":"public";if(b.type!==a&&(h||["secret","public","private"].includes(b.type)))throw TypeError(`${b[Symbol.toStringTag]} instances must be of type "${a}" for the ${g} algorithm`);if(M(b))return b;if("secret"===(f=b).type)return f.export()}let j=(c||=new WeakMap).get(b);if(j?.[g])return j[g];if(j||c.set(b,j={}),f&&"function"==typeof f.toCryptoKey){let b="public"===f.type,c=L[f.asymmetricKeyDetails?.namedCurve],d=a.resolve?.({crv:c,asymmetricKeyType:f.asymmetricKeyType})??a.subtle;return j[g]=f.toCryptoKey(d,b,a.usages[+!b])}return(e??=f.export({format:"jwk"})).alg=g,j[g]=await Q(a,e)}let L={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"},M=a=>{if(a?.[Symbol.toStringTag]==="CryptoKey")return!0;try{return a instanceof CryptoKey}catch{return!1}},N=a=>M(a)||a?.[Symbol.toStringTag]==="KeyObject";function O(a,b,c){let d=["CryptoKey","KeyObject","JSON Web Key"];return c&&d.push("Uint8Array"),TypeError(function(a,b,...c){if(c.length>2){let b=c.pop();a+=`one of type ${c.join(", ")}, or ${b}.`}else 2===c.length?a+=`one of type ${c[0]} or ${c[1]}.`:a+=`of type ${c[0]}.`;return null==b?a+=` Received ${b}`:"function"==typeof b&&b.name?a+=` Received function ${b.name}`:"object"==typeof b&&null!=b&&b.constructor?.name&&(a+=` Received an instance of ${b.constructor.name}`),a}(`Key for the ${a} algorithm must be `,b,...d))}let P=(a,b="algorithm.name")=>TypeError(`CryptoKey does not support this operation, its ${b} must be ${a}`);async function Q(a,b,c){if(!a.kty.includes(b.kty))throw new q('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');let d=a.resolve?.({kty:b.kty,crv:b.crv})??a.subtle,e=!!(b.d||b.priv),f={...b,ext:c??b.ext};return"AKP"!==f.kty&&delete f.alg,delete f.use,crypto.subtle.importKey("jwk",f,d,f.ext??!e,b.key_ops??a.usages[+!!e])}async function R(a,b,c,d=!1){return a instanceof Uint8Array&&(a=await crypto.subtle.importKey("raw",a,b,d,[c])),function(a,b,c){let d=a.algorithm;if(d.name!==b.name)throw P(b.name);if(b.hash&&d.hash?.name!==b.hash)throw P(b.hash,"algorithm.hash");if(b.namedCurve&&d.namedCurve!==b.namedCurve)throw P(b.namedCurve,"algorithm.namedCurve");if(void 0!==b.length&&d.length!==b.length)throw P(b.length,"algorithm.length");if(c&&!a.usages.includes(c))throw TypeError(`CryptoKey does not support this operation, its usages must include ${c}.`)}(a,b,c),a}function S(a){try{return F(a)}catch(a){throw new r("JWS Compact Serialization payload must use only ASCII characters",{cause:a})}}async function T(a,b,c,d,e){let{protected:f,header:g,payload:h}=a,i=e??(void 0===f?{}:function(a,b,c){let d;try{d=JSON.parse(D.decode(G(a)))}catch(a){throw new b(c,{cause:a})}if(!H(d))throw new b(c);return d}(f,r,"JWS Protected Header is invalid"));if(!function(...a){let b=new Set;for(let c of a)if(c)for(let a of Object.keys(c)){if(b.has(a))return!1;b.add(a)}return!0}(i,g))throw new r("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let j={...i,...g},k=function(a,b){if(b.includes("b64")){let b=a.b64;if("boolean"!=typeof b)throw new r('The "b64" (base64url-encode payload) Header Parameter must be a boolean');return b}return!0}(i,function(a,b,c,d,e){if(void 0!==e.crit&&d?.crit===void 0)throw new a('"crit" (Critical) Header Parameter MUST be integrity protected');if(!d||void 0===d.crit)return[];if(!Array.isArray(d.crit)||0===d.crit.length||d.crit.some(a=>"string"!=typeof a||0===a.length))throw new a('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let f=void 0===c?b:{__proto__:null,...c,...b};for(let b of d.crit){if(!(b in f))throw new q(`Extension Header Parameter "${b}" is not recognized`);if(!Object.hasOwn(e,b)||void 0===e[b])throw new a(`Extension Header Parameter "${b}" is missing`);if(f[b]&&(!Object.hasOwn(d,b)||void 0===d[b]))throw new a(`Extension Header Parameter "${b}" MUST be integrity protected`)}return d.crit}(r,J,b[1],i,j)),{alg:l}=j;if("string"!=typeof l||!l)throw new r('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(b[0]&&!b[0].has(l))throw new p('"alg" (Algorithm) Header Parameter value not allowed');if(k){if("string"!=typeof h)throw new r("JWS Payload must be a string")}else if("string"!=typeof h&&!(h instanceof Uint8Array))throw new r("JWS Payload must be a string or an Uint8Array instance");let m=k||"string"!=typeof h?h:d(h),n=!1;"function"==typeof c&&(c=await c(i,a),n=!0);let o=function(a){let b="string"==typeof a?A[a]:void 0;if(!b)throw new q(`alg ${a} is not supported either by JOSE or your javascript runtime`);return b}(l),s=function(...a){let b=new Uint8Array(a.reduce((a,{length:b})=>a+b,0)),c=0;for(let d of a)b.set(d,c),c+=d.length;return b}(void 0!==f?F(f):new Uint8Array,F("."),"string"==typeof m?b[2]??=function(a,b,c){try{return F(a)}catch(a){throw new c(`The ${b} is not a valid base64url string`,{cause:a})}}(m,"payload",r):m),u=I(a.signature,"signature",r),v=await K(o,c,"verify"),w=await R(v,o.subtle,"verify");o.minRsaBits&&function(a,b){let{modulusLength:c}=b.algorithm;if("number"!=typeof c||c<2048)throw TypeError(`${a} requires key modulusLength to be 2048 bits or larger`)}(o.alg,w);let x=!1;try{x=await crypto.subtle.verify(o.signing,w,u,s)}catch(a){throw new t(void 0,{cause:a})}if(!x)throw new t;let y={payload:"string"==typeof m?I(m,"payload",r):m};return void 0!==f&&(y.protectedHeader=i),void 0!==g&&(y.unprotectedHeader=g),n?[{...y,key:v},k]:[y,k]}async function U(a,b,c){if(a instanceof Uint8Array&&(a=C.decode(a)),"string"!=typeof a)throw new r("Compact JWS must be a string or Uint8Array");let{0:d,1:e,2:f,length:g}=a.split(".");if(3!==g)throw new r("Invalid Compact JWS");return T({payload:e,protected:d,signature:f},b,c,S)}let V={s:1,m:60,h:3600,d:86400,w:604800,y:0x1e187e0},W=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,X="check_failed";function Y(){throw TypeError("Invalid time period format")}function Z(a){"string"!=typeof a&&Y();let b=W.exec(a);(!b||b[4]&&b[1])&&Y();let c=Math.round(parseFloat(b[2])*V[b[3][0].toLowerCase()]);return Number.isFinite(c)||Y(),"-"===b[1]||b[4]?.toLowerCase()==="ago"?-c:c}function $(a,b){if(!Number.isFinite(b))throw TypeError(`Invalid ${a} input`);return b}let _=a=>{let b=a.toLowerCase();return a.includes("/")?b:`application/${b}`};function aa(a,b,c=!1){let d=a[b];if(!(void 0===d&&!c)){if("number"!=typeof d)throw new n(`"${b}" claim must be a number`,a,b,"invalid");return d}}function ab(a,b){throw new n(`unexpected "${b}" claim value`,a,b,X)}async function ac(a,b,c){let[d,e]=await U(a,[c&&function(a,b){if(void 0!==b&&(!Array.isArray(b)||b.some(a=>"string"!=typeof a)))throw TypeError(`"${a}" option must be an array of strings`);return void 0===b?void 0:new Set(b)}("algorithms",c.algorithms),c?.crit],b);if(!e)throw new s("JWTs MUST NOT use unencoded payload");let f=function(a,b,c={}){let d,e,f;try{d=JSON.parse(D.decode(b))}catch(a){throw new s("JWT Claims Set must be a top-level JSON object",{cause:a})}if(!H(d))throw new s("JWT Claims Set must be a top-level JSON object");let{typ:g}=c;if(void 0!==g&&("string"!=typeof a.typ||_(a.typ)!==_(g)))throw new n('unexpected "typ" JWT header value',d,"typ",X);let{requiredClaims:h=[],issuer:i,subject:j,audience:k,maxTokenAge:l}=c,m=[...h];for(let a of(void 0!==l&&m.push("iat"),void 0!==k&&m.push("aud"),void 0!==j&&m.push("sub"),void 0!==i&&m.push("iss"),new Set(m.reverse())))if(!Object.hasOwn(d,a))throw new n(`missing required "${a}" claim`,d,a,"missing");void 0===i||(Array.isArray(i)?i:[i]).includes(d.iss)||ab(d,"iss"),void 0!==j&&d.sub!==j&&ab(d,"sub"),void 0===k||(e=d.aud,f="string"==typeof k?[k]:k,"string"==typeof e?f.includes(e):!!Array.isArray(e)&&f.some(a=>e.includes(a)))||ab(d,"aud");let{clockTolerance:p}=c,q=0;if("string"==typeof p)q=Z(p);else if(void 0!==p){if("number"!=typeof p)throw TypeError("Invalid clockTolerance option type");q=p}if($("clockTolerance option",q),q<0)throw TypeError("Invalid clockTolerance option input");let{currentDate:r}=c,t=$("currentDate option",Math.floor((void 0===r?new Date:r).getTime()/1e3)),u=aa(d,"iat",void 0!==l),v=aa(d,"nbf");if(void 0!==v&&v>t+q)throw new n('"nbf" claim timestamp check failed',d,"nbf",X);let w=aa(d,"exp");if(void 0!==w&&w<=t-q)throw new o('"exp" claim timestamp check failed',d,"exp",X);if(void 0!==l){let a=t-u,b=$("maxTokenAge option","number"==typeof l?l:Z(l));if(b<0)throw TypeError("Invalid maxTokenAge option input");if(a-q>b)throw new o('"iat" claim timestamp check failed (too far in the past)',d,"iat",X);if(a<-q)throw new n('"iat" claim timestamp check failed (it should be in the past)',d,"iat",X)}return d}(d.protectedHeader,d.payload,c);return{...d,payload:f}}var ad=a.i(79952);let ae=(0,ad.f)("SESSION_ISSUER"),af=(0,ad.f)("SESSION_AUDIENCE");function ag(){let a=process.env.SESSION_SECRET;if(!a)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(a)}async function ah(a,b=!1){let c;try{let{payload:b}=await ac(a,ag(),{algorithms:["HS256"],issuer:ae,audience:af});c=b}catch{return null}try{return await l(c)?c:null}catch(a){if(b)throw a;return null}}async function ai(){let a=(d||(d=new g.Redis(process.env.REDIS_URL??"redis://127.0.0.1:6379",{maxRetriesPerRequest:1,enableOfflineQueue:!1,lazyConnect:!0})).on("error",()=>void 0),d);return"wait"===a.status&&await a.connect(),a}async function aj(a,b){var c;let d,e;if("hive"!==a.provider)return null;if(!a.sessionId||!/^[A-Za-z0-9_-]{43}$/.test(a.sessionId))throw Error("Invalid Hive session");let g=new URL(process.env.CONTROL_API_URL);if(new URL(b).origin!==g.origin)throw Error("Hive delegation is limited to the canonical Control API");let h=await (await ai()).get(`magnus:hive:session:${a.sessionId}`);if(!h)throw Error("Hive session expired");let i=(c=a.sessionId,d=Buffer.from(h,"base64url"),(e=(0,f.createDecipheriv)("aes-256-gcm",(0,f.createHash)("sha256").update("magnus:hive-session:v1\0").update(ag()).digest(),d.subarray(0,12))).setAAD(Buffer.from(c)),e.setAuthTag(d.subarray(12,28)),JSON.parse(Buffer.concat([e.update(d.subarray(28)),e.final()]).toString("utf8")));if(i.userId!==a.userId||i.expiresAt<=Date.now()/1e3)throw Error("Hive session identity expired");return i.accessToken}var ak=a.i(26294);let al=process.env.CONTROL_API_CA_PATH?.trim();if(al&&!(0,h.existsSync)(al))throw Error(`CONTROL_API_CA_PATH does not exist: ${al}`);let am=new ak.Agent({connect:{rejectUnauthorized:!0,...al?{ca:(0,h.readFileSync)(al)}:{}}});async function an(a,b,c){let d=c?.timeoutMs??Number(process.env.DASHBOARD_DEPENDENCY_TIMEOUT_MS??8e3),e=b?.signal,f=new Headers(b?.headers).get("accept")?.includes("text/event-stream")?null:AbortSignal.timeout(d),g=e&&f?AbortSignal.any([e,f]):e??f??void 0;return await (0,ak.fetch)(a,{...b,signal:g,dispatcher:am})}var ao=a.i(12714),ap=a.i(50227);let aq="enc2:",ar="enc:";function as(a){return(0,f.createHash)("sha256").update(a).digest()}function at(){let a=process.env.CONTROL_NODE_CREDENTIAL_KEY??"";if(a.length<32)throw Error("CONTROL_NODE_CREDENTIAL_KEY must contain at least 32 characters");for(let b of["API_SECRET","SESSION_SECRET","JWT_SECRET"])if(process.env[b]&&process.env[b]===a)throw Error(`CONTROL_NODE_CREDENTIAL_KEY must be distinct from ${b}`);return as(a)}function au(a){if(!a||a.startsWith(aq))return a;let b=at(),c=(0,f.randomBytes)(12),d=(0,f.createCipheriv)("aes-256-gcm",b,c),e=Buffer.concat([d.update(a,"utf-8"),d.final()]),g=d.getAuthTag();return`${aq}${c.toString("base64")}:${g.toString("base64")}:${e.toString("base64")}`}function av(a){return!!(a&&!a.startsWith(aq))}function aw(a){return a&&"object"==typeof a&&"code"in a?a.code:void 0}function ax(a){return"ENOENT"===aw(a)}function ay(){let a=Symbol.for("magnus.controlNodeStateLocks"),b=globalThis;return b[a]??=new Map,b[a]}function az(a){let b;try{b=(0,h.lstatSync)(a)}catch(a){if(ax(a))return null;throw a}let c="",d=!0;try{c=(0,h.readFileSync)(a,"utf8")}catch(a){if(ax(a))return null;if("EACCES"!==aw(a))throw a;d=!1}let[e="",f=""]=c.trim().split(/\s+/),g=Number.parseInt(e,10);return{pid:Number.isInteger(g)&&g>0?g:null,nonce:f||null,readable:d,metadata:b}}let aA={writeLock(a,b){(0,h.writeFileSync)(a,b,"utf8"),(0,h.fsyncSync)(a)}};function aB(a){let b,c=(0,f.randomBytes)(16).toString("hex");try{b=(0,h.openSync)(a,h.constants.O_WRONLY|h.constants.O_CREAT|h.constants.O_EXCL|h.constants.O_NOFOLLOW,384)}catch(a){if("EEXIST"===aw(a))return null;throw a}try{aA.writeLock(b,`${process.pid} ${c}
|
|
2
|
+
`)}catch(c){try{(0,h.closeSync)(b)}catch{}b=void 0;try{(0,h.unlinkSync)(a)}catch{}throw c}finally{void 0!==b&&(0,h.closeSync)(b)}return c}async function aC(a,b){let c=`${a}.lock`,d=Date.now()+5e3;for(;!function(a){let b=ay(),c=b.get(a);if(c)return c.holders+=1,!0;let d=aB(a);if(null===d){let b=az(a);if(null!==b){var e;if(!function(a){if(null!==a.pid){if(a.pid===process.pid)return!ay().has(a.lockFile);try{return process.kill(a.pid,0),!1}catch(a){return"ESRCH"===aw(a)}}return Date.now()-a.metadata.mtimeMs>6e4}({...b,lockFile:a})||(e=az(a),!b||!e||(b.nonce&&e.nonce?b.nonce!==e.nonce:b.metadata.dev!==e.metadata.dev||b.metadata.ino!==e.metadata.ino||b.metadata.mtimeMs!==e.metadata.mtimeMs)))return!1;try{(0,h.unlinkSync)(a)}catch(a){if(!ax(a))throw a}}if(null===(d=aB(a)))return!1}return b.set(a,{nonce:d,holders:1}),!0}(c);){if(Date.now()>d)throw Error(`Control-node state is locked by another process (${ap.default.basename(c)}); nothing was changed, try again`);await new Promise(a=>setTimeout(a,50))}try{return await b()}finally{!function(a){let b=ay(),c=b.get(a);if(!c)return;if(c.holders>1){c.holders-=1;return}b.delete(a);let d=az(a);if(d?.readable&&d.nonce===c.nonce)try{(0,h.unlinkSync)(a)}catch(a){if(!ax(a))throw a}}(c)}}let aD=ap.default.resolve(process.cwd(),".magnus"),aE=ap.default.join(aD,"control-nodes.json"),aF=Promise.resolve();function aG(a){return!!(a&&"object"==typeof a&&"code"in a&&"ENOENT"===a.code)}function aH(a){if(!a.isFile()||a.isSymbolicLink()||(511&Number(a.mode))!=384)throw Error("Control-node state must be a regular non-symlink file with mode 0600")}async function aI(a){let b;try{b=await (0,ao.lstat)(aD)}catch(c){if(!aG(c))throw c;if(!a)return!1;await (0,ao.mkdir)(aD,{recursive:!0,mode:448}),await (0,ao.chmod)(aD,448),b=await (0,ao.lstat)(aD)}var c=b;if(!c.isDirectory()||c.isSymbolicLink()||(511&Number(c.mode))!=448)throw Error("Control-node state directory must be a non-symlink directory with mode 0700");return!0}function aJ(a,b){if(!a)return;let c=function(a){if(!a||!a.startsWith(aq)&&!a.startsWith(ar))return a;let b=a.startsWith(ar)&&!a.startsWith(aq),c=b?ar:aq,d=a.slice(c.length).split(":");if(3!==d.length)throw Error("Stored control-node credential ciphertext is malformed");let[e,g,h]=d;try{let a=b?function(){let a=process.env.JWT_SECRET??process.env.SESSION_SECRET??"";if(!a)throw Error("Legacy control-node credential key is unavailable");return as(a)}():at(),c=Buffer.from(e,"base64"),d=Buffer.from(g,"base64"),i=Buffer.from(h,"base64"),j=(0,f.createDecipheriv)("aes-256-gcm",a,c);return j.setAuthTag(d),j.update(i).toString("utf-8")+j.final("utf-8")}catch(a){throw Error("Stored control-node credential failed authenticated decryption",{cause:a})}}(a);if(!c||a.startsWith("enc:")&&c.startsWith("enc:"))throw Error(`Stored control-node ${b} could not be decrypted`);return c}async function aK(){var a;let b,c=await aL();return c.migrationRequired?(a=async()=>{let a=await aL();return a.migrationRequired&&await aM(a.nodes),a.nodes},aF=(b=aF.then(async()=>(await aI(!0),aC(aE,a)))).then(()=>void 0,()=>void 0),b):c.nodes}async function aL(){let a,b;if(!await aI(!1))return{nodes:[],migrationRequired:!1};try{a=await (0,ao.lstat)(aE)}catch(a){if(!aG(a))throw a;return{nodes:[],migrationRequired:!1}}aH(a);let c=await (0,ao.open)(aE,h.constants.O_RDONLY|h.constants.O_NOFOLLOW);try{let d=await c.stat();if(aH(d),d.dev!==a.dev||d.ino!==a.ino)throw Error("Control-node state changed while it was being opened");b=await c.readFile({encoding:"utf-8"})}finally{await c.close()}let d=function(a){let b=JSON.parse(a);if(!Array.isArray(b))throw Error("Control-node state must contain an array");return b.map((a,b)=>{if(!a||"object"!=typeof a||Array.isArray(a))throw Error(`Control-node state entry ${b} is not an object`);for(let c of["id","name","url","createdAt"])if("string"!=typeof a[c]||!a[c])throw Error(`Control-node state entry ${b} has an invalid ${c}`);for(let c of["apiSecret","token"])if(void 0!==a[c]&&"string"!=typeof a[c])throw Error(`Control-node state entry ${b} has an invalid ${c}`);return{id:a.id,name:a.name,url:a.url,apiSecret:a.apiSecret,token:a.token,createdAt:a.createdAt}})}(b),e=b.includes('"nodeManagerSecret"')||d.some(a=>av(a.apiSecret)||av(a.token));return{nodes:d.map(a=>({...a,apiSecret:aJ(a.apiSecret,"apiSecret"),token:aJ(a.token,"token")})).map(a=>({...a})),migrationRequired:e}}async function aM(a){await aI(!0);try{let a=await (0,ao.lstat)(aE);aH(a)}catch(a){if(!aG(a))throw a}let b=a.map(a=>({...a,apiSecret:a.apiSecret?au(a.apiSecret):a.apiSecret,token:a.token?au(a.token):a.token})),c=ap.default.join(aD,`.control-nodes.${process.pid}.${(0,f.randomBytes)(12).toString("hex")}.tmp`),d=!1;try{let a=await (0,ao.open)(c,h.constants.O_WRONLY|h.constants.O_CREAT|h.constants.O_EXCL|h.constants.O_NOFOLLOW,384);d=!0;try{await a.writeFile(`${JSON.stringify(b,null,2)}
|
|
3
|
+
`,{encoding:"utf-8"}),await a.chmod(384),await a.sync()}finally{await a.close()}await (0,ao.rename)(c,aE),d=!1,aH(await (0,ao.lstat)(aE));let e=await (0,ao.open)(aD,h.constants.O_RDONLY|h.constants.O_NOFOLLOW);try{await e.sync()}finally{await e.close()}}finally{d&&await (0,ao.unlink)(c).catch(()=>void 0)}}function aN(a,b){let c;try{c=new URL(a)}catch{throw Error(`${b} is not a valid URL`)}let d="http:"===c.protocol&&"localhost"===c.hostname;if("https:"!==c.protocol&&!d)throw Error(`${b} must use HTTPS`);return c}function aO(){let a=process.env.CONTROL_API_URL?.trim();return a?aN(a,"CONTROL_API_URL"):null}function aP(){let a=process.env.API_SECRET?.trim()??"";if(!a)throw Error("Canonical Control API credential is unavailable");return{credentialHeaders:{"x-api-secret":a},credentialSource:"canonical-api-secret"}}async function aQ(a){let b,c,d,e=aO();if("local"===a){if(!e)throw Error("CONTROL_API_URL is required for the local control node");return{id:"local",name:"Local",baseUrl:e.origin,...aP()}}let f=(await aK()).find(b=>b.id===a);if(!f)throw Error(`Unknown control node '${a}'`);return b=aN(f.url,`Control node '${f.id}' URL`),d=(c=aO())&&b.origin===c.origin?aP():function(a){if(a.token)return{credentialHeaders:{Authorization:`Bearer ${a.token}`},credentialSource:"stored-iam-token"};if(a.apiSecret)return{credentialHeaders:{"x-api-secret":a.apiSecret},credentialSource:"stored-api-secret"};throw Error(`Control node '${a.id}' has no server-side credential`)}(f),{id:f.id,name:f.name,baseUrl:b.origin,...d}}async function aR(a,b,c){let d=await aQ(a),f=new Headers(c?.headers);for(let a of["authorization","x-api-secret","proxy-authorization","cookie"])f.delete(a);let g=(await (0,e.cookies)()).get("magnus_session")?.value,h=g?await ah(g):null,i=h?await aj(h,d.baseUrl):null;for(let[a,b]of Object.entries(i?{Authorization:`Bearer ${i}`}:d.credentialHeaders))f.set(a,b);let j=await an(`${d.baseUrl}/api/v1/${b.replace(/^\/+/,"")}`,{...c,headers:f,cache:"no-store",redirect:"manual"});if(j.status>=300&&j.status<400)throw Error("Credentialed Control API redirects are forbidden");return j}a.s(["f",0,aK],18682),a.s(["f",0,aR],60985)},84368,(a,b,c)=>{b.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}}')},53373,(a,b,c)=>{"use strict";var d=a.e&&a.e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(c,"__esModule",{value:!0}),c.getKeyIndexes=c.hasFlag=c.exists=c.list=void 0;let e=d(a.r(84368)).default;c.list=Object.keys(e);let f={};function g(a){"string"!=typeof a&&(a=String(a));let b=a.indexOf("->");return -1===b?a.length:b}c.list.forEach(a=>{f[a]=e[a].flags.reduce(function(a,b){return a[b]=!0,a},{})}),c.exists=function(a,b){return!!e[a=(null==b?void 0:b.caseInsensitive)?String(a).toLowerCase():a]},c.hasFlag=function(a,b,c){if(!f[a=(null==c?void 0:c.nameCaseInsensitive)?String(a).toLowerCase():a])throw Error("Unknown command "+a);return!!f[a][b]},c.getKeyIndexes=function(a,b,c){let d=e[a=(null==c?void 0:c.nameCaseInsensitive)?String(a).toLowerCase():a];if(!d)throw Error("Unknown command "+a);if(!Array.isArray(b))throw Error("Expect args to be an array");let f=d;for(let a=0;a<b.length&&f.subcommands;a++){let c=f.subcommands[String(b[a]).toLowerCase()];if(!c)break;f=c}let h=[],i=!!(c&&c.parseExternalKey),j=(a,b)=>{let c=[],d=Number(a[b]);for(let a=0;a<d;a++)c.push(a+b+1);return c},k=(a,b,c)=>{for(let d=b;d<a.length-1;d+=1)if(String(a[d]).toLowerCase()===c.toLowerCase())return d+1;return null};switch(a){case"zunionstore":case"zinterstore":case"zdiffstore":h.push(0,...j(b,1));break;case"eval":case"evalsha":case"eval_ro":case"evalsha_ro":case"fcall":case"fcall_ro":case"blmpop":case"bzmpop":h.push(...j(b,1));break;case"sdiffcard":case"sintercard":case"sunioncard":case"lmpop":case"zunion":case"zinter":case"zmpop":case"zintercard":case"zdiff":h.push(...j(b,0));break;case"msetex":{let a=Number(b[0]);for(let b=0;b<a;b++)h.push(1+2*b);break}case"georadius":{h.push(0);let a=k(b,5,"STORE");a&&h.push(a);let c=k(b,5,"STOREDIST");c&&h.push(c);break}case"georadiusbymember":{h.push(0);let a=k(b,4,"STORE");a&&h.push(a);let c=k(b,4,"STOREDIST");c&&h.push(c);break}case"sort":case"sort_ro":h.push(0);for(let a=1;a<b.length-1;a++){let c=b[a];if("string"!=typeof c)continue;let d=c.toUpperCase();"GET"===d?(a+=1,"#"!==(c=b[a])&&(i?h.push([a,g(c)]):h.push(a))):"BY"===d?(a+=1,i?h.push([a,g(b[a])]):h.push(a)):"STORE"===d&&(a+=1,h.push(a))}break;case"migrate":if(""===b[2])for(let a=5;a<b.length-1;a++){let c=b[a];if("string"==typeof c&&"KEYS"===c.toUpperCase()){for(let c=a+1;c<b.length;c++)h.push(c);break}}else h.push(2);break;case"xreadgroup":case"xread":for(let c=3*("xread"!==a);c<b.length-1;c++)if("STREAMS"===String(b[c]).toUpperCase()){for(let a=c+1;a<=c+(b.length-1-c)/2;a++)h.push(a);break}break;default:if(f.step>0){let a=f.keyStart-1,c=f.keyStop>0?f.keyStop:b.length+f.keyStop+1;for(let b=a;b<c;b+=f.step)h.push(b)}}return h}},69638,(a,b,c)=>{var d=[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],e=function(a){for(var b,c=0,d=0,e=[],f=a.length;c<f;c++)(b=a.charCodeAt(c))<128?e[d++]=b:(b<2048?e[d++]=b>>6|192:((64512&b)==55296&&c+1<a.length&&(64512&a.charCodeAt(c+1))==56320?(b=65536+((1023&b)<<10)+(1023&a.charCodeAt(++c)),e[d++]=b>>18|240,e[d++]=b>>12&63|128):e[d++]=b>>12|224,e[d++]=b>>6&63|128),e[d++]=63&b|128);return e},f=b.exports=function(a){for(var b,c=0,f=-1,g=0,h=0,i="string"==typeof a?e(a):a,j=i.length;c<j;){if(b=i[c++],-1===f)123===b&&(f=c);else if(125!==b)h=d[(b^h>>8)&255]^h<<8;else if(c-1!==f)return 16383&h;g=d[(b^g>>8)&255]^g<<8}return 16383&g};b.exports.generateMulti=function(a){for(var b=1,c=a.length,d=f(a[0]);b<c;)if(f(a[b++])!==d)return -1;return d}},58077,(a,b,c)=>{let d;c.formatArgs=function(a){if(a[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+a[0]+(this.useColors?"%c ":" ")+"+"+b.exports.humanize(this.diff),!this.useColors)return;let c="color: "+this.color;a.splice(1,0,c,"color: inherit");let d=0,e=0;a[0].replace(/%[a-zA-Z%]/g,a=>{"%%"!==a&&(d++,"%c"===a&&(e=d))}),a.splice(e,0,c)},c.save=function(a){try{a?c.storage.setItem("debug",a):c.storage.removeItem("debug")}catch(a){}},c.load=function(){let a;try{a=c.storage.getItem("debug")||c.storage.getItem("DEBUG")}catch(a){}return!a&&"u">typeof process&&"env"in process&&(a=process.env.DEBUG),a},c.useColors=function(){let a;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&&(a=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(a[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},c.storage=function(){try{return localStorage}catch(a){}}(),d=!1,c.destroy=()=>{d||(d=!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`."))},c.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"],c.log=console.debug||console.log||(()=>{}),b.exports=a.r(93830)(c);let{formatters:e}=b.exports;e.j=function(a){try{return JSON.stringify(a)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}}},93830,(a,b,c)=>{b.exports=function(b){function c(a){let b,e,f,g=null;function h(...a){if(!h.enabled)return;let d=Number(new Date);h.diff=d-(b||d),h.prev=b,h.curr=d,b=d,a[0]=c.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");let e=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,(b,d)=>{if("%%"===b)return"%";e++;let f=c.formatters[d];if("function"==typeof f){let c=a[e];b=f.call(h,c),a.splice(e,1),e--}return b}),c.formatArgs.call(h,a),(h.log||c.log).apply(h,a)}return h.namespace=a,h.useColors=c.useColors(),h.color=c.selectColor(a),h.extend=d,h.destroy=c.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==g?g:(e!==c.namespaces&&(e=c.namespaces,f=c.enabled(a)),f),set:a=>{g=a}}),"function"==typeof c.init&&c.init(h),h}function d(a,b){let d=c(this.namespace+(void 0===b?":":b)+a);return d.log=this.log,d}function e(a,b){let c=0,d=0,e=-1,f=0;for(;c<a.length;)if(d<b.length&&(b[d]===a[c]||"*"===b[d]))"*"===b[d]?(e=d,f=c):c++,d++;else{if(-1===e)return!1;d=e+1,c=++f}for(;d<b.length&&"*"===b[d];)d++;return d===b.length}return c.debug=c,c.default=c,c.coerce=function(a){return a instanceof Error?a.stack||a.message:a},c.disable=function(){let a=[...c.names,...c.skips.map(a=>"-"+a)].join(",");return c.enable(""),a},c.enable=function(a){for(let b of(c.save(a),c.namespaces=a,c.names=[],c.skips=[],("string"==typeof a?a:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===b[0]?c.skips.push(b.slice(1)):c.names.push(b)},c.enabled=function(a){for(let b of c.skips)if(e(a,b))return!1;for(let b of c.names)if(e(a,b))return!0;return!1},c.humanize=a.r(48256),c.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(b).forEach(a=>{c[a]=b[a]}),c.names=[],c.skips=[],c.formatters={},c.selectColor=function(a){let b=0;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c)|0;return c.colors[Math.abs(b)%c.colors.length]},c.enable(c.load()),c}},61998,(a,b,c)=>{"u"<typeof process||"renderer"===process.type||process.__nwjs?b.exports=a.r(58077):b.exports=a.r(16956)},16956,(a,b,c)=>{let d=a.r(70722),e=a.r(24361);c.init=function(a){a.inspectOpts={};let b=Object.keys(c.inspectOpts);for(let d=0;d<b.length;d++)a.inspectOpts[b[d]]=c.inspectOpts[b[d]]},c.log=function(...a){return process.stderr.write(e.formatWithOptions(c.inspectOpts,...a)+"\n")},c.formatArgs=function(a){let{namespace:d,useColors:e}=this;if(e){let c=this.color,e="\x1b[3"+(c<8?c:"8;5;"+c),f=` ${e};1m${d} \x1b[0m`;a[0]=f+a[0].split("\n").join("\n"+f),a.push(e+"m+"+b.exports.humanize(this.diff)+"\x1b[0m")}else a[0]=(c.inspectOpts.hideDate?"":new Date().toISOString()+" ")+d+" "+a[0]},c.save=function(a){a?process.env.DEBUG=a:delete process.env.DEBUG},c.load=function(){return process.env.DEBUG},c.useColors=function(){return"colors"in c.inspectOpts?!!c.inspectOpts.colors:d.isatty(process.stderr.fd)},c.destroy=e.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),c.colors=[6,2,3,4,5,1];try{let b=a.r(45681);b&&(b.stderr||b).level>=2&&(c.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(a){}c.inspectOpts=Object.keys(process.env).filter(a=>/^debug_/i.test(a)).reduce((a,b)=>{let c=b.substring(6).toLowerCase().replace(/_([a-z])/g,(a,b)=>b.toUpperCase()),d=process.env[b];return d=!!/^(yes|on|true|enabled)$/i.test(d)||!/^(no|off|false|disabled)$/i.test(d)&&("null"===d?null:Number(d)),a[c]=d,a},{}),b.exports=a.r(93830)(c);let{formatters:f}=b.exports;f.o=function(a){return this.inspectOpts.colors=this.useColors,e.inspect(a,this.inspectOpts).split("\n").map(a=>a.trim()).join(" ")},f.O=function(a){return this.inspectOpts.colors=this.useColors,e.inspect(a,this.inspectOpts)}},5583,(a,b,c)=>{"use strict";function d(a,b){var b=b||{};this._capacity=b.capacity,this._head=0,this._tail=0,Array.isArray(a)?this._fromArray(a):(this._capacityMask=3,this._list=[,,,,])}d.prototype.peekAt=function(a){var b=a;if(b===(0|b)){var c=this.size();if(!(b>=c)&&!(b<-c))return b<0&&(b+=c),b=this._head+b&this._capacityMask,this._list[b]}},d.prototype.get=function(a){return this.peekAt(a)},d.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},d.prototype.peekFront=function(){return this.peek()},d.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(d.prototype,"length",{get:function(){return this.size()}}),d.prototype.size=function(){return this._head===this._tail?0:this._head<this._tail?this._tail-this._head:this._capacityMask+1-(this._head-this._tail)},d.prototype.unshift=function(a){if(0==arguments.length)return this.size();var b=this._list.length;return(this._head=this._head-1+b&this._capacityMask,this._list[this._head]=a,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)},d.prototype.shift=function(){var a=this._head;if(a!==this._tail){var b=this._list[a];return this._list[a]=void 0,this._head=a+1&this._capacityMask,a<2&&this._tail>1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),b}},d.prototype.push=function(a){if(0==arguments.length)return this.size();var b=this._tail;return(this._list[b]=a,this._tail=b+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)},d.prototype.pop=function(){var a=this._tail;if(a!==this._head){var b=this._list.length;this._tail=a-1+b&this._capacityMask;var c=this._list[this._tail];return this._list[this._tail]=void 0,this._head<2&&a>1e4&&a<=b>>>2&&this._shrinkArray(),c}},d.prototype.removeOne=function(a){var b,c=a;if(c===(0|c)&&this._head!==this._tail){var d=this.size(),e=this._list.length;if(!(c>=d)&&!(c<-d)){c<0&&(c+=d),c=this._head+c&this._capacityMask;var f=this._list[c];if(a<d/2){for(b=a;b>0;b--)this._list[c]=this._list[c=c-1+e&this._capacityMask];this._list[c]=void 0,this._head=this._head+1+e&this._capacityMask}else{for(b=d-1-a;b>0;b--)this._list[c]=this._list[c=c+1+e&this._capacityMask];this._list[c]=void 0,this._tail=this._tail-1+e&this._capacityMask}return f}}},d.prototype.remove=function(a,b){var c,d,e=a,f=b;if(e===(0|e)&&this._head!==this._tail){var g=this.size(),h=this._list.length;if(!(e>=g)&&!(e<-g)&&!(b<1)){if(e<0&&(e+=g),1===b||!b)return(c=[,])[0]=this.removeOne(e),c;if(0===e&&e+b>=g)return c=this.toArray(),this.clear(),c;for(e+b>g&&(b=g-e),c=Array(b),d=0;d<b;d++)c[d]=this._list[this._head+e+d&this._capacityMask];if(e=this._head+e&this._capacityMask,a+b===g){for(this._tail=this._tail-b+h&this._capacityMask,d=b;d>0;d--)this._list[e=e+1+h&this._capacityMask]=void 0;return c}if(0===a){for(this._head=this._head+b+h&this._capacityMask,d=b-1;d>0;d--)this._list[e=e+1+h&this._capacityMask]=void 0;return c}if(e<g/2){for(this._head=this._head+a+b+h&this._capacityMask,d=a;d>0;d--)this.unshift(this._list[e=e-1+h&this._capacityMask]);for(e=this._head-1+h&this._capacityMask;f>0;)this._list[e=e-1+h&this._capacityMask]=void 0,f--;a<0&&(this._tail=e)}else{for(this._tail=e,e=e+b+h&this._capacityMask,d=g-(b+a);d>0;d--)this.push(this._list[e++]);for(e=this._tail;f>0;)this._list[e=e+1+h&this._capacityMask]=void 0,f--}return this._head<2&&this._tail>1e4&&this._tail<=h>>>2&&this._shrinkArray(),c}}},d.prototype.splice=function(a,b){var c=a;if(c===(0|c)){var d=this.size();if(c<0&&(c+=d),!(c>d))if(!(arguments.length>2))return this.remove(c,b);else{var e,f,g,h=arguments.length,i=this._list.length,j=2;if(!d||c<d/2){for(f=Array(c),e=0;e<c;e++)f[e]=this._list[this._head+e&this._capacityMask];for(0===b?(g=[],c>0&&(this._head=this._head+c+i&this._capacityMask)):(g=this.remove(c,b),this._head=this._head+c+i&this._capacityMask);h>j;)this.unshift(arguments[--h]);for(e=c;e>0;e--)this.unshift(f[e-1])}else{var k=(f=Array(d-(c+b))).length;for(e=0;e<k;e++)f[e]=this._list[this._head+c+b+e&this._capacityMask];for(0===b?(g=[],c!=d&&(this._tail=this._head+c+i&this._capacityMask)):(g=this.remove(c,b),this._tail=this._tail-k+i&this._capacityMask);j<h;)this.push(arguments[j++]);for(e=0;e<k;e++)this.push(f[e])}return g}}},d.prototype.clear=function(){this._list=Array(this._list.length),this._head=0,this._tail=0},d.prototype.isEmpty=function(){return this._head===this._tail},d.prototype.toArray=function(){return this._copyArray(!1)},d.prototype._fromArray=function(a){var b=a.length,c=this._nextPowerOf2(b);this._list=Array(c),this._capacityMask=c-1,this._tail=b;for(var d=0;d<b;d++)this._list[d]=a[d]},d.prototype._copyArray=function(a,b){var c,d=this._list,e=d.length,f=this.length;if((b|=f)==f&&this._head<this._tail)return this._list.slice(this._head,this._tail);var g=Array(b),h=0;if(a||this._head>this._tail){for(c=this._head;c<e;c++)g[h++]=d[c];for(c=0;c<this._tail;c++)g[h++]=d[c]}else for(c=this._head;c<this._tail;c++)g[h++]=d[c];return g},d.prototype._growArray=function(){if(0!=this._head){var a=this._copyArray(!0,this._list.length<<1);this._tail=this._list.length,this._head=0,this._list=a}else this._tail=this._list.length,this._list.length<<=1;this._capacityMask=this._capacityMask<<1|1},d.prototype._shrinkArray=function(){this._list.length>>>=1,this._capacityMask>>>=1},d.prototype._nextPowerOf2=function(a){return Math.max(1<<Math.log(a)/Math.log(2)+1,4)},b.exports=d},34994,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(53373),e=a.r(69638),f=a.r(26986),g=a.r(44999),h=a.r(89308),i=a.r(58857);class j{static checkFlag(a,b){return b=b.toLowerCase(),!!this.getFlagMap()[a][b]}static setArgumentTransformer(a,b){this._transformer.argument[a]=b}static setReplyTransformer(a,b){this._transformer.reply[a]=b}static getFlagMap(){return this.flagMap||(this.flagMap=Object.keys(j.FLAGS).reduce((a,b)=>(a[b]={},j.FLAGS[b].forEach(c=>{a[b][c]=!0}),a),{})),this.flagMap}constructor(a,b=[],c={},d){if(this.name=a,this.inTransaction=!1,this.isTraced=!1,this.isResolved=!1,this.isSettled=!1,this.transformed=!1,this.replyEncoding=c.replyEncoding,this.protocol=2,this.replyMapping="legacy",this.errorStack=c.errorStack,this.args=b.flat(),this.callback=d,this.initPromise(),c.keyPrefix){let a=c.keyPrefix instanceof Buffer,b=a?c.keyPrefix:null;this._iterateKeys(d=>d instanceof Buffer?(null===b&&(b=Buffer.from(c.keyPrefix)),Buffer.concat([b,d])):a?Buffer.concat([c.keyPrefix,Buffer.from(String(d))]):c.keyPrefix+d)}c.readOnly&&(this.isReadOnly=!0)}getSlot(){if(void 0===this.slot){let a=this.getKeys()[0];this.slot=null==a?null:e(a)}return this.slot}getKeys(){return this._iterateKeys()}setReplyContext(a){this.protocol=a?.protocol??2,this.replyMapping=a?.replyMapping??"legacy"}toWritable(a){let b,c="*"+(this.args.length+1)+"\r\n$"+Buffer.byteLength(this.name)+"\r\n"+this.name+"\r\n";if(this.bufferMode){let a=new m;a.push(c);for(let b=0;b<this.args.length;++b){let c=this.args[b];c instanceof Buffer?0===c.length?a.push("$0\r\n\r\n"):(a.push("$"+c.length+"\r\n"),a.push(c),a.push("\r\n")):a.push("$"+Buffer.byteLength(c)+"\r\n"+c+"\r\n")}b=a.toBuffer()}else{b=c;for(let a=0;a<this.args.length;++a){let c=this.args[a];b+="$"+Buffer.byteLength(c)+"\r\n"+c+"\r\n"}}return b}stringifyArguments(){for(let a=0;a<this.args.length;++a){let b=this.args[a];"string"==typeof b||(b instanceof Buffer?this.bufferMode=!0:this.args[a]=(0,g.toArg)(b))}}transformReply(a){this.replyEncoding&&(a=(0,g.convertBufferToString)(a,this.replyEncoding));let b=j._transformer.reply[this.name];return b&&(a=b(a,{commandName:this.name,protocol:this.protocol,replyMapping:this.replyMapping})),a}setTimeout(a){this._commandTimeoutTimer||(this._commandTimeoutTimer=setTimeout(()=>{this.isSettled||this.reject(Error("Command timed out"))},a))}setBlockingTimeout(a){if(a<=0)return;this._blockingTimeoutTimer&&(clearTimeout(this._blockingTimeoutTimer),this._blockingTimeoutTimer=void 0);let b=Date.now();void 0===this._blockingDeadline&&(this._blockingDeadline=b+a);let c=this._blockingDeadline-b;c<=0?this.resolve(null):this._blockingTimeoutTimer=setTimeout(()=>{if(this.isSettled){this._blockingTimeoutTimer=void 0;return}this._blockingTimeoutTimer=void 0,this.resolve(null)},c)}extractBlockingTimeout(){let a=this.args;if(!a||0===a.length)return;let b=this.name.toLowerCase();return"blmovem"===b?(0,h.parseSecondsArgument)(a[4]):j.checkFlag("LAST_ARG_TIMEOUT_COMMANDS",b)?(0,h.parseSecondsArgument)(a[a.length-1]):j.checkFlag("FIRST_ARG_TIMEOUT_COMMANDS",b)?(0,h.parseSecondsArgument)(a[0]):j.checkFlag("BLOCK_OPTION_COMMANDS",b)?(0,h.parseBlockOption)(a):void 0}_clearTimers(){let a=this._commandTimeoutTimer;a&&(clearTimeout(a),delete this._commandTimeoutTimer);let b=this._blockingTimeoutTimer;b&&(clearTimeout(b),delete this._blockingTimeoutTimer)}initPromise(){this.isResolved=!1,this.isSettled=!1;let a=new Promise((a,b)=>{if(!this.transformed){this.transformed=!0;let a=j._transformer.argument[this.name];a&&(this.args=a(this.args)),this.stringifyArguments()}this.resolve=this._convertValue(a),this.reject=a=>{this._clearTimers(),this.isSettled=!0,this.errorStack?b((0,g.optimizeErrorStack)(a,this.errorStack.stack,"/ROOT/node_modules/ioredis/built")):b(a)}});this.promise=(0,f.default)(a,this.callback)}_iterateKeys(a=a=>a){if(void 0===this.keys&&(this.keys=[],(0,d.exists)(this.name,{caseInsensitive:!0})))for(let b of(0,d.getKeyIndexes)(this.name,this.args,{nameCaseInsensitive:!0}))this.args[b]=a(this.args[b]),this.keys.push(this.args[b]);return this.keys}_convertValue(a){return b=>{try{this._clearTimers(),a(this.transformReply(b)),this.isResolved=!0,this.isSettled=!0}catch(a){this.reject(a)}return this.promise}}}j.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"]},j._transformer={argument:{},reply:{}},c.default=j;let k=function(a){if(1===a.length){if(a[0]instanceof Map)return(0,g.convertMapToArray)(a[0]);if("object"==typeof a[0]&&null!==a[0])return(0,g.convertObjectToArray)(a[0])}return a},l=function(a){if(2===a.length){if(a[1]instanceof Map)return[a[0]].concat((0,g.convertMapToArray)(a[1]));if("object"==typeof a[1]&&null!==a[1])return[a[0]].concat((0,g.convertObjectToArray)(a[1]))}return a};for(let a of(j.setArgumentTransformer("mset",k),j.setArgumentTransformer("msetnx",k),j.setArgumentTransformer("hset",l),j.setArgumentTransformer("hmset",l),j.setReplyTransformer("hgetall",function(a){if(Array.isArray(a)){let b={};for(let c=0;c<a.length;c+=2){let d=a[c],e=a[c+1];d in b?Object.defineProperty(b,d,{value:e,configurable:!0,enumerable:!0,writable:!0}):b[d]=e}return b}return a}),j.setReplyTransformer("vsim",i.transformVsimReply),j.setReplyTransformer("hrandfield",i.transformPairReply),j.setReplyTransformer("xread",i.transformStreamReadReply),j.setReplyTransformer("xreadgroup",i.transformStreamReadReply),i.sortedSetWithScorePairCommands))j.setReplyTransformer(a,i.transformPairReply);class m{constructor(){this.length=0,this.items=[]}push(a){this.length+=Buffer.byteLength(a),this.items.push(a)}toBuffer(){let a=Buffer.allocUnsafe(this.length),b=0;for(let c of this.items){let d=Buffer.byteLength(c);Buffer.isBuffer(c)?c.copy(a,b):a.write(c,b,d),b+=d}return a}}},48194,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(34994),e=a.r(44999),f=a.r(30863),g=a.r(88846),h=(0,e.Debug)("dataHandler");c.default=class{constructor(a,b){var c;let d;this.redis=a;let e=(d="resp3"===(c=b).replyMapping?j:i,c.stringNumbers?{...d,[g.RESP_TYPES.NUMBER]:String,[g.RESP_TYPES.DOUBLE]:String}:d),f=new g.Decoder({getTypeMapping:()=>e,onReply:a=>{this.dispatch(()=>this.returnReply(a))},onErrorReply:a=>{this.dispatch(()=>this.returnError(a))},onPush:a=>{this.dispatch(()=>this.returnPush(a))}});a.stream.prependListener("data",a=>{try{f.write(a)}catch(a){this.returnFatalError(a)}}),a.stream.resume()}dispatch(a){try{a()}catch(a){process.nextTick(()=>{throw a})}}returnFatalError(a){a.message+=". Please report this.",this.redis.recoverFromFatalError(a,a,{offlineQueue:!1})}returnError(a){let b=this.shiftCommand(a);b&&(a.command={name:b.command.name,args:b.command.args},"ssubscribe"===b.command.name&&a.message.startsWith("MOVED ")&&this.redis.emit("moved"),this.redis.handleReconnection(a,b))}returnReply(a){if(this.handleMonitorReply(a)||3!==this.redis.condition.protocol&&this.handleSubscriberReply(a))return;let b=this.shiftCommand(a);b&&(d.default.checkFlag("ENTER_SUBSCRIBER_MODE",b.command.name)?(this.redis.condition.subscriber=new f.default,this.redis.condition.subscriber.add(b.command.name,a[1].toString()),l(b.command,a[2])||this.redis.commandQueue.unshift(b)):d.default.checkFlag("EXIT_SUBSCRIBER_MODE",b.command.name)?m(b.command,a[2])||this.redis.commandQueue.unshift(b):b.command.resolve(a))}returnPush(a){if(!Array.isArray(a)||0===a.length)return;let b=a[0].toString();switch(h('receive push "%s"',b),b){case"message":case"pmessage":case"smessage":this.handleSubscriberReply(a);break;case"ssubscribe":case"subscribe":case"psubscribe":{this.redis.condition.subscriber||(this.redis.condition.subscriber=new f.default);let c=a[1].toString();this.redis.condition.subscriber.add(b,c);let d=this.shiftCommand(a);if(!d)return;l(d.command,a[2])||this.redis.commandQueue.unshift(d);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{if(this.redis.condition.subscriber){let c=a[1]?a[1].toString():null;c&&this.redis.condition.subscriber.del(b,c)}let c=a[2];if(0===Number(c)&&(this.redis.condition.subscriber=!1),this.handleUnsolicitedUnsubscribe(b))return;let d=this.shiftCommand(a);if(!d)return;m(d.command,c)||this.redis.commandQueue.unshift(d)}}}handleUnsolicitedUnsubscribe(a){let b=this.redis.commandQueue.peekFront();return(!b||b.command.name.toLowerCase()!==a)&&("sunsubscribe"===a&&this.redis.emit("moved"),!0)}handleSubscriberReply(a){if(!this.redis.condition.subscriber)return!1;let b=Array.isArray(a)?a[0].toString():null;switch(h('receive reply "%s" in subscriber mode',b),b){case"message":this.redis.listeners("message").length>0&&this.redis.emit("message",a[1].toString(),a[2]?a[2].toString():""),this.redis.emit("messageBuffer",a[1],a[2]);break;case"pmessage":{let b=a[1].toString();this.redis.listeners("pmessage").length>0&&this.redis.emit("pmessage",b,a[2].toString(),a[3].toString()),this.redis.emit("pmessageBuffer",b,a[2],a[3]);break}case"smessage":this.redis.listeners("smessage").length>0&&this.redis.emit("smessage",a[1].toString(),a[2]?a[2].toString():""),this.redis.emit("smessageBuffer",a[1],a[2]);break;case"ssubscribe":case"subscribe":case"psubscribe":{let c=a[1].toString();this.redis.condition.subscriber.add(b,c);let d=this.shiftCommand(a);if(!d)return;l(d.command,a[2])||this.redis.commandQueue.unshift(d);break}case"sunsubscribe":case"unsubscribe":case"punsubscribe":{let c=a[1]?a[1].toString():null;c&&this.redis.condition.subscriber.del(b,c);let d=a[2];if(0===Number(d)&&(this.redis.condition.subscriber=!1),this.handleUnsolicitedUnsubscribe(b))break;let e=this.shiftCommand(a);if(!e)return;m(e.command,d)||this.redis.commandQueue.unshift(e);break}default:{let b=this.shiftCommand(a);if(!b)return;b.command.resolve(a)}}return!0}handleMonitorReply(a){if("monitoring"!==this.redis.status)return!1;let b=a.toString();if("OK"===b)return!1;let c=b.indexOf(" "),d=b.slice(0,c),e=b.indexOf('"'),f=b.slice(e+1,-1).split('" "').map(a=>a.replace(/\\"/g,'"')),g=b.slice(c+2,e-2).split(" ");return this.redis.emit("monitor",d,f,g[1],g[0]),!0}shiftCommand(a){let b=this.redis.commandQueue.shift();if(!b){let b=Error("Command queue state error. If you can reproduce this, please report it."+(a instanceof Error?` Last error: ${a.message}`:` Last reply: ${a.toString()}`));return this.redis.emit("error",b),null}return b}};let i={[g.RESP_TYPES.SIMPLE_STRING]:Buffer,[g.RESP_TYPES.BLOB_STRING]:Buffer,[g.RESP_TYPES.VERBATIM_STRING]:Buffer,[g.RESP_TYPES.BIG_NUMBER]:String,[g.RESP_TYPES.DOUBLE]:Buffer,[g.RESP_TYPES.BOOLEAN]:Number,[g.RESP_TYPES.MAP]:Array,[g.RESP_TYPES.SET]:Array},j={[g.RESP_TYPES.SIMPLE_STRING]:Buffer,[g.RESP_TYPES.BLOB_STRING]:Buffer,[g.RESP_TYPES.VERBATIM_STRING]:Buffer,[g.RESP_TYPES.BIG_NUMBER]:String,[g.RESP_TYPES.SET]:Array},k=new WeakMap;function l(a,b){let c=k.has(a)?k.get(a):a.args.length;return(c-=1)<=0?(a.resolve(b),k.delete(a),!0):(k.set(a,c),!1)}function m(a,b){let c=k.has(a)?k.get(a):a.args.length;return 0===c?0===Number(b)&&(k.delete(a),a.resolve(b),!0):(c-=1)<=0?(a.resolve(b),!0):(k.set(a,c),!1)}},90197,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(69638),e=a.r(53373),f=a.r(26986),g=a.r(24361),h=a.r(34994),i=a.r(874),j=a.r(44999),k=a.r(14892),l=a.r(64409);class m extends k.default{constructor(a){super(),this.redis=a,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=a.options,Object.keys(a.scriptsSet).forEach(b=>{let c=a.scriptsSet[b];this._shaToScript[c.sha]=c,this[b]=a[b],this[b+"Buffer"]=a[b+"Buffer"]}),a.addedBuiltinSet.forEach(b=>{this[b]=a[b],this[b+"Buffer"]=a[b+"Buffer"]}),this.promise=new Promise((a,b)=>{this.resolve=a,this.reject=b});let b=this;Object.defineProperty(this,"length",{get:function(){return b._queue.length}})}fillResult(a,b){if("exec"===this._queue[b].name&&Array.isArray(a[1])){let c=a[1].length;for(let d=0;d<c;d++){if(a[1][d]instanceof Error)continue;let e=this._queue[b-(c-d)];try{a[1][d]=e.transformReply(a[1][d])}catch(b){a[1][d]=b}}}if(this._result[b]=a,--this.replyPending)return;if(this.isCluster){let a,b=!0;for(let c=0;c<this._result.length;++c){let d=this._result[c][0],f=this._queue[c];if(d){if("exec"===f.name&&"EXECABORT Transaction discarded because of previous errors."===d.message)continue;if(a){if(a.name!==d.name||a.message!==d.message){b=!1;break}}else a={name:d.name,message:d.message}}else if(!f.inTransaction&&!((0,e.exists)(f.name,{caseInsensitive:!0})&&(0,e.hasFlag)(f.name,"readonly",{nameCaseInsensitive:!0}))){b=!1;break}}if(a&&b){let b=this,c=a.message.split(" "),d=this._queue,e=!1;this._queue=[];for(let a=0;a<d.length;++a){if("ASK"===c[0]&&!e&&"asking"!==d[a].name&&(!d[a-1]||"asking"!==d[a-1].name)){let a=new h.default("asking");a.ignore=!0,this.sendCommand(a)}d[a].initPromise(),this.sendCommand(d[a]),e=d[a].inTransaction}let f=!0;void 0===this.leftRedirections&&(this.leftRedirections={});let g=function(){b.exec()},i=this.redis;if(i.handleError(a,this.leftRedirections,{moved:function(a,c){b.preferKey=c,i.slots[a]?i.slots[a][0]!==c&&(i.slots[a]=[c]):i.slots[a]=[c],i._groupsBySlot[a]=i._groupsIds[i.slots[a].join(";")],i.refreshSlotsCache(),b.exec()},ask:function(a,c){b.preferKey=c,b.exec()},tryagain:g,clusterDown:g,connectionClosed:g,maxRedirections:()=>{f=!1},defaults:()=>{f=!1}}),f)return}}let c=0;for(let a=0;a<this._queue.length-c;++a)this._queue[a+c].ignore&&(c+=1),this._result[a]=this._result[a+c];this.resolve(this._result.slice(0,this._result.length-c))}sendCommand(a){this._transactions>0&&(a.inTransaction=!0);let b=this._queue.length;return a.pipelineIndex=b,a.promise.then(a=>{this.fillResult([null,a],b)}).catch(a=>{this.fillResult([a],b)}),this._queue.push(a),this}addBatch(a){let b,c,d;for(let e=0;e<a.length;++e)c=(b=a[e])[0],d=b.slice(1),this[c].apply(this,d);return this}}c.default=m;let n=m.prototype.multi;m.prototype.multi=function(){return this._transactions+=1,n.apply(this,arguments)};let o=m.prototype.execBuffer;m.prototype.execBuffer=(0,g.deprecate)(function(){return this._transactions>0&&(this._transactions-=1),o.apply(this,arguments)},"Pipeline#execBuffer: Use Pipeline#exec instead"),m.prototype.exec=function(a){let b,c;if(this.isCluster&&!this.redis.slots.length)return"wait"===this.redis.status&&this.redis.connect().catch(j.noop),a&&!this.nodeifiedPromise&&(this.nodeifiedPromise=!0,(0,f.default)(this.promise,a)),this.redis.delayUntilReady(b=>{b?this.reject(b):this.exec(a)}),this.promise;if(this._transactions>0)return this._transactions-=1,o.apply(this,arguments);if(this.nodeifiedPromise||(this.nodeifiedPromise=!0,(0,f.default)(this.promise,a)),this._queue.length||this.resolve([]),this.isCluster){let a=[];for(let b=0;b<this._queue.length;b++){let c=this._queue[b].getKeys();if(c.length&&a.push(c[0]),c.length&&0>d.generateMulti(c))return this.reject(Error("All the keys in a pipeline command should belong to the same slot")),this.promise}if(a.length){if((b=function(a,b){let c=d(b[0]),e=a._groupsBySlot[c];for(let c=1;c<b.length;c++)if(a._groupsBySlot[d(b[c])]!==e)return -1;return c}(this.redis,a))<0)return this.reject(Error("All keys in the pipeline should belong to the same slots allocation group")),this.promise}else b=16384*Math.random()|0}let e=this;return(0,l.interceptHimportPipeline)({owner:e.redis,commands:e._queue,slot:b,preferredNodeKey:e.preferKey,setDestination(a){c={slot:b,redis:a}},resume:g,reject(a){e.reject(a)}})||g(),this.promise;function g(){let a,d=e.replyPending=e._queue.length;e.isCluster&&!c&&(c={slot:b,redis:e.redis.connectionPool.nodes.all[e.preferKey]});let f="",g={isPipeline:!0,destination:e.isCluster?c:{redis:e.redis},write(b){"string"!=typeof b?(a||(a=[]),f&&(a.push(Buffer.from(f,"utf8")),f=""),a.push(b)):(f.length+b.length>=i.constants.MAX_STRING_LENGTH&&(a||(a=[]),f&&(a.push(Buffer.from(f,"utf8")),f="")),f+=b),--d||(a?(f&&a.push(Buffer.from(f,"utf8")),g.destination.redis.stream.write(Buffer.concat(a))):g.destination.redis.stream.write(f),d=e._queue.length,f="",a=void 0)}};for(let a=0;a<e._queue.length;++a)e.redis.sendCommand(e._queue[a],g,c);return e.promise}}},94367,(a,b,c)=>{"use strict";var d;Object.defineProperty(c,"__esModule",{value:!0});let e=a.r(53373),f=a.r(27699),g=a.r(26986),h=a.r(38834),i=a.r(34994),j=a.r(63834),k=a.r(84928),l=a.r(39200),m=a.r(25870),n=a.r(99272),o=a.r(44194),p=a.r(44999),q=a.r(38702),r=a.r(68028),s=a.r(14892),t=a.r(23355),u=a.r(64409),v=a.r(64409),w=a.r(5583),x=(0,p.Debug)("redis");class y extends s.default{static createClient(...a){return new y(...a)}constructor(a,b,c){if(super(),this.status="wait",this.isCluster=!1,this.reconnectTimeout=null,this.connectionEpoch=0,this.retryAttempts=0,this.manuallyClosing=!1,this[d]=!1,this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this.parseOptions(a,b,c),f.EventEmitter.call(this),this.options.himportFieldsets=(0,v.cloneHimportFieldsets)(this.options.himportFieldsets),this.options.himportFieldsets?.length&&(0,u.bindHimportCoordinator)(this,new u.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 a=new k.default(this.options);a.emitter=this,this.connector=a}else this.connector=new j.StandaloneConnector(this.options);this.options.scripts&&Object.entries(this.options.scripts).forEach(([a,b])=>{this.defineCommand(a,b)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(t.noop)}get autoPipelineQueueSize(){let a=0;for(let b of this._autoPipelines.values())a+=b.length;return a}connect(a){let b=(0,q.traceConnect)(()=>this._connect(),()=>{let{address:a,port:b}=this._getServerAddress();return{serverAddress:a,serverPort:b,connectionEpoch:this.connectionEpoch}});return(0,g.default)(b,a)}_connect(){return new Promise((a,b)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void b(Error("Redis is already connecting/connected"));this.connectionEpoch+=1,this.setStatus("connecting");let{options:c}=this;this.condition={select:c.db,auth:c.username?[c.username,c.password]:c.password,subscriber:!1,protocol:c.protocol,replyMapping:3===c.protocol&&"resp3"===c.replyMapping?"resp3":"legacy",handshake:!1};let d=this;(0,g.default)(this.connector.connect(function(a,b){d.silentEmit(a,b)}),function(e,f){if(e){d.flushQueue(e),d.silentEmit("error",e),b(e),d.setStatus("end");return}let g=c.tls?"secureConnect":"connect";if("sentinels"in c&&c.sentinels&&!c.enableTLSForSentinelMode&&(g="connect"),d.stream=f,c.noDelay&&f.setNoDelay(!0),"number"==typeof c.keepAlive&&(f.connecting?f.once(g,()=>{f.setKeepAlive(!0,c.keepAlive)}):f.setKeepAlive(!0,c.keepAlive)),f.connecting){if(f.once(g,l.connectHandler(d)),c.connectTimeout){let a=!1;f.setTimeout(c.connectTimeout,function(){if(a)return;f.setTimeout(0),f.destroy();let b=Error("connect ETIMEDOUT");b.errorno="ETIMEDOUT",b.code="ETIMEDOUT",b.syscall="connect",l.errorHandler(d)(b)}),f.once(g,function(){a=!0,f.setTimeout(0)})}}else if(f.destroyed){let a=d.connector.firstError;a&&process.nextTick(()=>{l.errorHandler(d)(a)}),process.nextTick(l.closeHandler(d))}else process.nextTick(l.connectHandler(d));f.destroyed||(f.once("error",l.errorHandler(d)),f.once("close",l.closeHandler(d)));let h=function(){d.removeListener("close",i),a()};var i=function(){d.removeListener("ready",h),b(Error(p.CONNECTION_CLOSED_ERROR_MSG))};d.once("ready",h),d.once("close",i)})})}disconnect(a=!1){a||(this.manuallyClosing=!0),this.reconnectTimeout&&!a&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null),"wait"===this.status?l.closeHandler(this)():this.connector.disconnect()}end(){this.disconnect()}duplicate(a){return new y({...this.options,...a??{}})}get mode(){return this.options.monitor?"monitor":(0,p.isResp2SubscriberMode)(this.condition)?"subscriber":"normal"}monitor(a){let b=this.duplicate({monitor:!0,lazyConnect:!1,himportFieldsets:void 0});return(0,g.default)(new Promise(function(a,c){b.once("error",c),b.once("monitoring",function(){a(b)})}),a)}sendCommand(a,b){if(a.setReplyContext(this.condition??this.options),"wait"===this.status&&this.connect().catch(t.noop),"end"===this.status)return a.reject(Error(p.CONNECTION_CLOSED_ERROR_MSG)),a.promise;if((0,p.isResp2SubscriberMode)(this.condition)&&!i.default.checkFlag("VALID_IN_SUBSCRIBER_MODE",a.name))return a.reject(Error("Connection in subscriber mode, only subscriber commands may be used")),a.promise;if("number"==typeof this.options.commandTimeout&&a.setTimeout(this.options.commandTimeout),!b&&this[u.hasHimportCoordinator]&&(0,u.interceptHimportCommand)(this,a,"ready"===this.status,()=>{this.sendCommand(a)}))return a.promise;let c=this.getBlockingTimeoutInMs(a),d="ready"===this.status||!b&&"connect"===this.status&&this.condition?.handshake&&(i.default.checkFlag("HANDSHAKE_COMMANDS",a.name)||(0,u.isInternalHimportCommand)(a))||!b&&"connect"===this.status&&!this.condition?.handshake&&(0,e.exists)(a.name,{caseInsensitive:!0})&&(0,e.hasFlag)(a.name,"loading",{nameCaseInsensitive:!0});if(this.stream&&this.stream.writable?this.stream._writableState&&this.stream._writableState.ended&&(d=!1):d=!1,d)x.enabled&&x("write command[%s]: %d -> %s(%o)",this._getDescription(),this.condition?.select,a.name,a.args),b?"isPipeline"in b&&b.isPipeline?b.write(a.toWritable(b.destination.redis.stream)):b.write(a.toWritable(b)):this.stream.write(a.toWritable(this.stream)),this.commandQueue.push({command:a,stream:b,select:this.condition.select}),void 0!==c&&a.setBlockingTimeout(c),i.default.checkFlag("WILL_DISCONNECT",a.name)&&(this.manuallyClosing=!0),void 0!==this.options.socketTimeout&&void 0===this.socketTimeoutTimer&&this.setSocketTimeout();else{if(!this.options.enableOfflineQueue)return a.reject(Error("Stream isn't writeable and enableOfflineQueue options is false")),a.promise;if("quit"===a.name&&0===this.offlineQueue.length)return this.disconnect(),a.resolve(Buffer.from("OK")),a.promise;if(x.enabled&&x("queue command[%s]: %d -> %s(%o)",this._getDescription(),this.condition.select,a.name,a.args),this.offlineQueue.push({command:a,stream:b,select:this.condition.select}),i.default.checkFlag("BLOCKING_COMMANDS",a.name)){let b=this.getConfiguredBlockingTimeout();void 0!==b&&a.setBlockingTimeout(b)}}if("select"===a.name&&(0,p.isInt)(a.args[0])){let b=parseInt(a.args[0],10);this.condition.select!==b&&(this.condition.select=b,this.emit("select",b),x("switch to db [%d]",this.condition.select))}return!d||a.isTraced?a.promise:(a.isTraced=!0,(0,q.traceCommand)(()=>a.promise,()=>this._buildCommandContext(a)))}getBlockingTimeoutInMs(a){if(!i.default.checkFlag("BLOCKING_COMMANDS",a.name))return;let b=this.getConfiguredBlockingTimeout();if(void 0===b)return;let c=a.extractBlockingTimeout();return"number"==typeof c?c>0?c+(this.options.blockingTimeoutGrace??m.DEFAULT_REDIS_OPTIONS.blockingTimeoutGrace):b:null===c?b:void 0}getConfiguredBlockingTimeout(){if("number"==typeof this.options.blockingTimeout&&this.options.blockingTimeout>0)return this.options.blockingTimeout}setSocketTimeout(){let a=this.stream;this.socketTimeoutTimer=setTimeout(()=>{a.destroy(Error(`Socket timeout. Expecting data, but didn't receive any in ${this.options.socketTimeout}ms.`)),this.socketTimeoutTimer=void 0},this.options.socketTimeout),a.once("data",()=>{clearTimeout(this.socketTimeoutTimer),this.socketTimeoutTimer=void 0,0!==this.commandQueue.length&&this.setSocketTimeout()})}scanStream(a){return this.createScanStream("scan",{options:a})}scanBufferStream(a){return this.createScanStream("scanBuffer",{options:a})}sscanStream(a,b){return this.createScanStream("sscan",{key:a,options:b})}sscanBufferStream(a,b){return this.createScanStream("sscanBuffer",{key:a,options:b})}hscanStream(a,b){return this.createScanStream("hscan",{key:a,options:b})}hscanBufferStream(a,b){return this.createScanStream("hscanBuffer",{key:a,options:b})}zscanStream(a,b){return this.createScanStream("zscan",{key:a,options:b})}zscanBufferStream(a,b){return this.createScanStream("zscanBuffer",{key:a,options:b})}silentEmit(a,b){let c;if("error"!==a||(c=b,"end"!==this.status&&(!this.manuallyClosing||!(c instanceof Error)||c.message!==p.CONNECTION_CLOSED_ERROR_MSG&&"connect"!==c.syscall&&"read"!==c.syscall)))return this.listeners(a).length>0?this.emit.apply(this,arguments):(c&&c instanceof Error&&console.error("[ioredis] Unhandled error event:",c.stack),!1)}recoverFromFatalError(a,b,c){this.flushQueue(b,c),this.silentEmit("error",b),this.disconnect(!0)}handleReconnection(a,b){let c=!1,d=i.default.checkFlag("IGNORE_RECONNECT_ON_ERROR",b.command.name)||this.condition?.handshake&&i.default.checkFlag("HANDSHAKE_COMMANDS",b.command.name);switch(this.options.reconnectOnError&&!d&&(c=this.options.reconnectOnError(a)),c){case 1:case!0:"reconnecting"!==this.status&&this.disconnect(!0),b.command.reject(a);break;case 2:"reconnecting"!==this.status&&this.disconnect(!0),this.condition?.select!==b.select&&"select"!==b.command.name&&this.select(b.select),this.sendCommand(b.command);break;default:b.command.reject(a)}}_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(a){let{address:b,port:c}=this._getServerAddress();return{command:a.name,args:(0,q.sanitizeArgs)(a.name,a.args),database:this.condition?.select??this.options.db??0,serverAddress:b,serverPort:c}}_buildBatchContext(a){let{address:b,port:c}=this._getServerAddress();return{batchMode:"MULTI",batchSize:a,database:this.condition?.select??this.options.db??0,serverAddress:b,serverPort:c}}_getDescription(){let a;return a="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&&(a+=` (${this.options.connectionName})`),a}resetCommandQueue(){this.commandQueue=new w}resetOfflineQueue(){this.offlineQueue=new w}parseOptions(...a){let b={},c=!1;for(let d=0;d<a.length;++d){let e=a[d];if(null!=e)if("object"==typeof e)(0,t.defaults)(b,e);else if("string"==typeof e)(0,t.defaults)(b,(0,p.parseURL)(e)),e.startsWith("rediss://")&&(c=!0);else if("number"==typeof e)b.port=e;else throw Error("Invalid argument "+e)}if(c&&(0,t.defaults)(b,{tls:!0}),(0,t.defaults)(b,y.defaultOptions),"string"==typeof b.port&&(b.port=parseInt(b.port,10)),"string"==typeof b.db&&(b.db=parseInt(b.db,10)),"resp3"===b.replyMapping&&3!==b.protocol)throw Error('The "resp3" replyMapping is only supported with protocol 3');this.options=(0,p.resolveTLSProfile)(b)}setStatus(a,b){x.enabled&&x("status[%s]: %s -> %s",this._getDescription(),this.status||"[empty]",a),this.status=a,process.nextTick(this.emit.bind(this,a,b))}createScanStream(a,{key:b,options:c={}}){return new n.default({objectMode:!0,key:b,redis:this,command:a,...c})}flushQueue(a,b){let c;if((b=(0,t.defaults)({},b,{offlineQueue:!0,commandQueue:!0})).offlineQueue)for(;c=this.offlineQueue.shift();)c.command.reject(a);if(b.commandQueue&&this.commandQueue.length>0)for(this.stream&&this.stream.removeAllListeners("data");c=this.commandQueue.shift();)c.command.reject(a)}_readyCheck(a){let b=this;this.info(function(c,d){if(c)return c.message&&c.message.includes("NOPERM")?(console.warn(`Skipping the ready check because INFO command fails: "${c.message}". You can disable ready check with "enableReadyCheck". More: https://github.com/luin/ioredis/wiki/Disable-ready-check.`),a(null,{})):a(c);if("string"!=typeof d)return a(null,d);let e={},f=d.split("\r\n");for(let a=0;a<f.length;++a){let[b,...c]=f[a].split(":"),d=c.join(":");d&&(e[b]=d)}if(e.loading&&"0"!==e.loading){let c=1e3*(e.loading_eta_seconds||1),d=b.options.maxLoadingRetryTime&&b.options.maxLoadingRetryTime<c?b.options.maxLoadingRetryTime:c;x("Redis server still loading, trying again in "+d+"ms"),setTimeout(function(){b._readyCheck(a)},d)}else a(null,e)}).catch(t.noop)}}d=u.hasHimportCoordinator,y.Cluster=h.default,y.Command=i.default,y.defaultOptions=m.DEFAULT_REDIS_OPTIONS,(0,r.default)(y,f.EventEmitter),(0,o.addTransactionSupport)(y.prototype),c.default=y},99272,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(88947);class e extends d.Readable{constructor(a){super(a),this.opt=a,this._redisCursor="0",this._redisDrained=!1}_read(){if(this._redisDrained)return void this.push(null);let a=[this._redisCursor];this.opt.key&&a.unshift(this.opt.key),this.opt.match&&a.push("MATCH",this.opt.match),this.opt.type&&a.push("TYPE",this.opt.type),this.opt.count&&a.push("COUNT",String(this.opt.count)),this.opt.noValues&&a.push("NOVALUES"),this.opt.redis[this.opt.command](a,(a,b)=>{a?this.emit("error",a):(this._redisCursor=b[0]instanceof Buffer?b[0].toString():b[0],"0"===this._redisCursor&&(this._redisDrained=!0),this.push(b[1]))})}close(){this._redisDrained=!0}}c.default=e},19318,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(54799),e=a.r(34994),f=a.r(26986);c.default=class{constructor(a,b=null,c="",f=!1){this.lua=a,this.numberOfKeys=b,this.keyPrefix=c,this.readOnly=f,this.sha=(0,d.createHash)("sha1").update(a).digest("hex");let g=this.sha,h=new WeakSet;this.Command=class extends e.default{toWritable(b){let c=this.reject;return this.reject=a=>{-1!==a.message.indexOf("NOSCRIPT")&&h.delete(b),c.call(this,a)},h.has(b)?"eval"===this.name&&(this.name="evalsha",this.args[0]=g):(h.add(b),this.name="eval",this.args[0]=a),super.toWritable(b)}}}execute(a,b,c,d){"number"==typeof this.numberOfKeys&&b.unshift(this.numberOfKeys),this.keyPrefix&&(c.keyPrefix=this.keyPrefix),this.readOnly&&(c.readOnly=!0);let e=new this.Command("evalsha",[this.sha,...b],c);return e.promise=e.promise.catch(d=>{if(-1===d.message.indexOf("NOSCRIPT"))throw d;let e=new this.Command("evalsha",[this.sha,...b],c);return(a.isPipeline?a.redis:a).sendCommand(e)}),(0,f.default)(e.promise,d),a.sendCommand(e)}}},30863,(a,b,c)=>{"use strict";function d(a){return"unsubscribe"===a?"subscribe":"punsubscribe"===a?"psubscribe":"sunsubscribe"===a?"ssubscribe":a}Object.defineProperty(c,"__esModule",{value:!0}),c.default=class{constructor(){this.set={subscribe:{},psubscribe:{},ssubscribe:{}}}add(a,b){this.set[d(a)][b]=!0}del(a,b){delete this.set[d(a)][b]}channels(a){return Object.keys(this.set[d(a)])}isEmpty(){return 0===this.channels("subscribe").length&&0===this.channels("psubscribe").length&&0===this.channels("ssubscribe").length}}},94700,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.executeWithAutoPipelining=c.getFirstValueInFlattenedArray=c.shouldUseAutoPipelining=c.notAllowedAutoPipelineCommands=c.kCallbacks=c.kExec=void 0;let d=a.r(23355),e=a.r(69638),f=a.r(26986),g=a.r(53373);function h(a){for(let b=0;b<a.length;b++){let c=a[b];if("string"==typeof c)return c;if(Array.isArray(c)||(0,d.isArguments)(c)){if(0===c.length)continue;return c[0]}let e=[c].flat();if(e.length>0)return e[0]}}c.kExec=Symbol("exec"),c.kCallbacks=Symbol("callbacks"),c.notAllowedAutoPipelineCommands=["auth","info","script","quit","cluster","pipeline","multi","subscribe","psubscribe","unsubscribe","unpsubscribe","select","client","hello","readonly","himport"],c.shouldUseAutoPipelining=function(a,b,d){return b&&a.options.enableAutoPipelining&&!a.isPipeline&&!c.notAllowedAutoPipelineCommands.includes(d)&&!a.options.autoPipeliningIgnoredCommands.includes(d)},c.getFirstValueInFlattenedArray=h,c.executeWithAutoPipelining=function a(b,i,j,k,l){if(b.isCluster&&!b.slots.length)return"wait"===b.status&&b.connect().catch(d.noop),(0,f.default)(new Promise(function(c,d){b.delayUntilReady(e=>{e?d(e):a(b,i,j,k,null).then(c,d)})}),l);let m=b.options.keyPrefix||"",n=b.isCluster?b.slots[e(`${m}${function(a,b){if((0,g.exists)(a,{caseInsensitive:!0})){let c=b.flat(),d=(0,g.getKeyIndexes)(a,c,{nameCaseInsensitive:!0});if(d.length)return c[d[0]]}return h(b)}(j,k)}`)].join(","):"main";if(b.isCluster&&"master"!==b.options.scaleReads&&(n+=(0,g.exists)(j)&&(0,g.hasFlag)(j,"readonly")?":read":":write"),!b._autoPipelines.has(n)){let a=b.pipeline();a[c.kExec]=!1,a[c.kCallbacks]=[],b._autoPipelines.set(n,a)}let o=b._autoPipelines.get(n);o[c.kExec]||(o[c.kExec]=!0,setImmediate(function a(b,d){if(b._runningAutoPipelines.has(d)||!b._autoPipelines.has(d))return;b._runningAutoPipelines.add(d);let e=b._autoPipelines.get(d);b._autoPipelines.delete(d);let f=e[c.kCallbacks];e[c.kCallbacks]=null,e.exec(function(c,e){if(b._runningAutoPipelines.delete(d),c)for(let a=0;a<f.length;a++)process.nextTick(f[a],c);else for(let a=0;a<f.length;a++)process.nextTick(f[a],...e[a]);b._autoPipelines.has(d)&&a(b,d)})},b,n));let p=new Promise(function(a,b){o[c.kCallbacks].push(function(c,d){c?b(c):a(d)}),"call"===i&&k.unshift(j),o[i](...k)});return(0,f.default)(p,l)}},6341,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.DEFAULT_CLUSTER_OPTIONS=void 0;let d=a.r(79594);c.DEFAULT_CLUSTER_OPTIONS={clusterRetryStrategy:a=>Math.min(100+2*a,2e3),clusterNodeRetryStrategy:null,enableOfflineQueue:!0,enableReadyCheck:!0,scaleReads:"master",maxRedirections:16,retryDelayOnMoved:0,retryDelayOnFailover:100,retryDelayOnClusterDown:100,retryDelayOnTryAgain:100,slotsRefreshTimeout:1e3,useSRVRecords:!1,resolveSrv:d.resolveSrv,dnsLookup:d.lookup,enableAutoPipelining:!1,autoPipeliningIgnoredCommands:[],shardedSubscribers:!1}},35844,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(29387),e=a.r(44999),f=a.r(94367),g=(0,e.Debug)("cluster:subscriber");c.default=class{constructor(a,b,c=!1){this.connectionPool=a,this.emitter=b,this.isSharded=c,this.started=!1,this.subscriber=null,this.slotRange=[],this.onSubscriberEnd=()=>{this.started?(g("subscriber has disconnected, selecting a new one..."),this.selectSubscriber()):g("subscriber has disconnected, but ClusterSubscriber is not started, so not reconnecting.")},this.connectionPool.on("-node",(a,b)=>{this.started&&this.subscriber&&(0,d.getNodeKey)(this.subscriber.options)===b&&(g("subscriber has left, selecting a new one..."),this.selectSubscriber())}),this.connectionPool.on("+node",()=>{this.started&&!this.subscriber&&(g("a new node is discovered and there is no subscriber, selecting a new one..."),this.selectSubscriber())})}getInstance(){return this.subscriber}associateSlotRange(a){return this.isSharded&&(this.slotRange=a),this.slotRange}start(){this.started=!0,this.selectSubscriber(),g("started")}stop(){this.started=!1,this.subscriber&&(this.subscriber.disconnect(),this.subscriber=null)}isStarted(){return this.started}selectSubscriber(){let a=this.lastActiveSubscriber;a&&(a.off("end",this.onSubscriberEnd),a.disconnect()),this.subscriber&&(this.subscriber.off("end",this.onSubscriberEnd),this.subscriber.disconnect());let b=(0,e.sample)(this.connectionPool.getNodes());if(!b){g("selecting subscriber failed since there is no node discovered in the cluster yet"),this.subscriber=null;return}let{options:c}=b;g("selected a subscriber %s:%s",c.host,c.port);let h="subscriber";this.isSharded&&(h="ssubscriber"),this.subscriber=new f.default({port:c.port,host:c.host,username:c.username,password:c.password,enableReadyCheck:!0,connectionName:(0,d.getConnectionName)(h,c.connectionName),lazyConnect:!0,tls:c.tls,protocol:c.protocol,replyMapping:c.replyMapping,retryStrategy:null}),this.subscriber.on("error",e.noop),this.subscriber.on("moved",()=>{this.emitter.emit("forceRefresh")}),this.subscriber.once("end",this.onSubscriberEnd);let i={subscribe:[],psubscribe:[],ssubscribe:[]};if(a){let b=a.condition||a.prevCondition;b&&b.subscriber&&(i.subscribe=b.subscriber.channels("subscribe"),i.psubscribe=b.subscriber.channels("psubscribe"),i.ssubscribe=b.subscriber.channels("ssubscribe"))}if(i.subscribe.length||i.psubscribe.length||i.ssubscribe.length){let a=0;for(let b of["subscribe","psubscribe","ssubscribe"]){let c=i[b];if(0!=c.length)if(g("%s %d channels",b,c.length),"ssubscribe"===b)for(let d of c)a+=1,this.subscriber[b](d).then(()=>{--a||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{g("failed to ssubscribe to channel: %s",d)});else a+=1,this.subscriber[b](c).then(()=>{--a||(this.lastActiveSubscriber=this.subscriber)}).catch(()=>{g("failed to %s %d channels",b,c.length)})}}else this.lastActiveSubscriber=this.subscriber;for(let a of["message","messageBuffer"])this.subscriber.on(a,(b,c)=>{this.emitter.emit(a,b,c)});for(let a of["pmessage","pmessageBuffer"])this.subscriber.on(a,(b,c,d)=>{this.emitter.emit(a,b,c,d)});if(!0==this.isSharded)for(let a of["smessage","smessageBuffer"])this.subscriber.on(a,(b,c)=>{this.emitter.emit(a,b,c)})}}},85875,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(44999),e=a.r(29387),f=a.r(69638),g=a.r(79479),h=(0,d.Debug)("cluster:subscriberGroup");class i{constructor(a,b){this.subscriberGroupEmitter=a,this.options=b,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=(a,b)=>{let c=(this.failedAttemptsByNode.get(b)||0)+1;this.failedAttemptsByNode.set(b,c);let d=Math.min(c,i.MAX_RETRY_ATTEMPTS),e=Math.min(i.BASE_BACKOFF_MS*2**d,i.MAX_BACKOFF_MS),f=Math.floor(.5*e*(Math.random()-.5)),g=Math.max(0,e+f);h("Failed to connect subscriber for %s. Refreshing slots in %dms",b,g),this.subscriberGroupEmitter.emit("subscriberConnectFailed",{delay:g,error:a})},this.handleSubscriberConnectSucceeded=a=>{this.failedAttemptsByNode.delete(a)}}getResponsibleSubscriber(a){let b=this.clusterSlots[a][0],c=this.shardedSubscribers.get(b);return c&&"idle"===c.subscriberStatus&&c.start().then(()=>{this.handleSubscriberConnectSucceeded(c.getNodeKey())}).catch(a=>{this.handleSubscriberConnectFailed(a,c.getNodeKey())}),c}addChannels(a){let b=f(a[0]);for(let c of a)if(f(c)!==b)return -1;let c=this.channels.get(b);return c?this.channels.set(b,c.concat(a)):this.channels.set(b,a),Array.from(this.channels.values()).reduce((a,b)=>a+b.length,0)}removeChannels(a){let b=f(a[0]);for(let c of a)if(f(c)!==b)return -1;let c=this.channels.get(b);if(c){let d=c.filter(b=>!a.includes(b));this.channels.set(b,d)}return Array.from(this.channels.values()).reduce((a,b)=>a+b.length,0)}stop(){for(let a of this.shardedSubscribers.values())a.stop();this.pendingReset=null,this.shardedSubscribers.clear(),this.subscriberToSlotsIndex.clear()}start(){let a=[];for(let b of this.shardedSubscribers.values())this.shouldStartSubscriber(b)&&(a.push(b.start().then(()=>{this.handleSubscriberConnectSucceeded(b.getNodeKey())}).catch(a=>{this.handleSubscriberConnectFailed(a,b.getNodeKey())})),this.subscriberGroupEmitter.emit("+subscriber"));return Promise.all(a)}async reset(a,b){if(this.isResetting){this.pendingReset={slots:a,nodes:b};return}this.isResetting=!0;try{let c=this._refreshSlots(a),d=this.hasUnhealthySubscribers();if(!c&&!d)return void h("No topology change detected or failed subscribers. Skipping reset.");for(let[a,b]of this.shardedSubscribers){if(this.subscriberToSlotsIndex.has(a)&&b.isHealthy()){h("Skipping deleting subscriber for %s",a);continue}h("Removing subscriber for %s",a),b.stop(),this.shardedSubscribers.delete(a),this.subscriberGroupEmitter.emit("-subscriber")}let f=[];for(let[a,c]of this.subscriberToSlotsIndex){let c=this.shardedSubscribers.get(a);if(c&&c.isHealthy()){h("Skipping creating new subscriber for %s",a),!c.isStarted()&&this.shouldStartSubscriber(c)&&f.push(c.start().then(()=>{this.handleSubscriberConnectSucceeded(a)}).catch(b=>{this.handleSubscriberConnectFailed(b,a)}));continue}c&&!c.isHealthy()&&(h("Replacing subscriber for %s",a),c.stop(),this.shardedSubscribers.delete(a),this.subscriberGroupEmitter.emit("-subscriber")),h("Creating new subscriber for %s",a);let d=b.find(b=>(0,e.getNodeKey)(b.options)===a);if(!d){h("Failed to find node for key %s",a);continue}let i=new g.default(this.subscriberGroupEmitter,d.options,this.options.redisOptions);this.shardedSubscribers.set(a,i),this.shouldStartSubscriber(i)&&f.push(i.start().then(()=>{this.handleSubscriberConnectSucceeded(a)}).catch(b=>{this.handleSubscriberConnectFailed(b,a)})),this.subscriberGroupEmitter.emit("+subscriber")}await Promise.all(f),this._resubscribe(),this.subscriberGroupEmitter.emit("subscribersReady")}finally{if(this.isResetting=!1,this.pendingReset){let{slots:a,nodes:b}=this.pendingReset;this.pendingReset=null,await this.reset(a,b)}}}_refreshSlots(a){if(this._slotsAreEqual(a)&&this.subscriberToSlotsIndex.size>0)return h("Nothing to refresh because the new cluster map is equal to the previous one."),!1;h("Refreshing the slots of the subscriber group."),this.subscriberToSlotsIndex=new Map;for(let b=0;b<a.length;b++){let c=a[b][0];this.subscriberToSlotsIndex.has(c)||this.subscriberToSlotsIndex.set(c,[]),this.subscriberToSlotsIndex.get(c).push(Number(b))}return this.clusterSlots=JSON.parse(JSON.stringify(a)),!0}_resubscribe(){this.shardedSubscribers&&this.shardedSubscribers.forEach((a,b)=>{let c=this.subscriberToSlotsIndex.get(b);c&&c.forEach(c=>{let d=a.getInstance(),e=this.channels.get(c);if(e&&e.length>0){if(!d||"end"===d.status)return;"ready"===d.status?d.ssubscribe(...e).catch(a=>{h("Failed to ssubscribe on node %s: %s",b,a)}):d.once("ready",()=>{d.ssubscribe(...e).catch(a=>{h("Failed to ssubscribe on node %s: %s",b,a)})})}})})}_slotsAreEqual(a){return void 0!==this.clusterSlots&&JSON.stringify(this.clusterSlots)===JSON.stringify(a)}hasUnhealthySubscribers(){let a=Array.from(this.shardedSubscribers.values()).some(a=>!a.isHealthy()),b=Array.from(this.subscriberToSlotsIndex.keys()).some(a=>!this.shardedSubscribers.has(a));return a||b}shouldStartSubscriber(a){if(a.isStarted())return!1;if(!a.isLazyConnect())return!0;let b=this.subscriberToSlotsIndex.get(a.getNodeKey());return!!b&&b.some(a=>{let b=this.channels.get(a);return!!(b&&b.length>0)})}}i.MAX_RETRY_ATTEMPTS=10,i.MAX_BACKOFF_MS=2e3,i.BASE_BACKOFF_MS=100,c.default=i},38236,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(27699),e=a.r(44999),f=a.r(29387),g=a.r(94367),h=(0,e.Debug)("cluster:connectionPool");class i extends d.EventEmitter{constructor(a,b=null,c={}){super(),this.redisOptions=a,this.clusterNodeRetryStrategy=b,this.hooks=c,this.nodes={all:{},master:{},slave:{}},this.specifiedOptions={}}getNodes(a="all"){let b=this.nodes[a];return Object.keys(b).map(a=>b[a])}getInstanceByKey(a){return this.nodes.all[a]}getSampleInstance(a){let b=Object.keys(this.nodes[a]),c=(0,e.sample)(b);return this.nodes[a][c]}addMasterNode(a){let b=(0,f.getNodeKey)(a.options),c=this.createRedisFromOptions(a,a.options.readOnly);return!a.options.readOnly&&(this.nodes.all[b]=c,this.nodes.master[b]=c,!0)}createRedisFromOptions(a,b){let c=new g.default((0,e.defaults)({retryStrategy:"function"==typeof this.clusterNodeRetryStrategy?this.clusterNodeRetryStrategy:null,enableOfflineQueue:!0,readOnly:b},a,this.redisOptions,{lazyConnect:!0}));return this.hooks.onCreate?.(c,b),c}findOrCreate(a,b=!1){let c,d=(0,f.getNodeKey)(a);return b=!!b,this.specifiedOptions[d]?Object.assign(a,this.specifiedOptions[d]):this.specifiedOptions[d]=a,this.nodes.all[d]?(c=this.nodes.all[d]).options.readOnly!==b&&(c.options.readOnly=b,h("Change role of %s to %s",d,b?"slave":"master"),c[b?"readonly":"readwrite"]().catch(e.noop),b?(delete this.nodes.master[d],this.nodes.slave[d]=c):(delete this.nodes.slave[d],this.nodes.master[d]=c),this.hooks.onRoleChange?.(c,d,b)):(h("Connecting to %s as %s",d,b?"slave":"master"),c=this.createRedisFromOptions(a,b),this.nodes.all[d]=c,this.nodes[b?"slave":"master"][d]=c,c.once("end",()=>{(!this.nodes.all[d]||this.nodes.all[d]===c)&&(this.removeNode(d),this.emit("-node",c,d),Object.keys(this.nodes.all).length||this.emit("drain"))}),this.emit("+node",c,d),c.on("error",a=>{this.emit("nodeError",a,d)})),c}recreate(a,b=!1){let c=(0,f.getNodeKey)(a),d=this.nodes.all[c];d&&(h("Recreating connection to %s",c),this.removeNode(c),d.disconnect());let e=this.findOrCreate(a,b);return d&&this.emit("-node",d,c),e}reset(a){h("Reset with %O",a);let b={};a.forEach(a=>{let c=(0,f.getNodeKey)(a);a.readOnly&&b[c]||(b[c]=a)}),Object.keys(this.nodes.all).forEach(a=>{b[a]||(h("Disconnect %s because the node does not hold any slot",a),this.nodes.all[a].disconnect(),this.removeNode(a))}),Object.keys(b).forEach(a=>{let c=b[a];this.findOrCreate(c,c.readOnly)})}removeNode(a){let{nodes:b}=this;b.all[a]&&(h("Remove %s from the pool",a),this.hooks.onRemove?.(b.all[a]),delete b.all[a]),delete b.master[a],delete b.slave[a]}}c.default=i},13900,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(44999),e=a.r(5583),f=(0,d.Debug)("delayqueue");c.default=class{constructor(){this.queues={},this.timeouts={}}push(a,b,c){let d=c.callback||process.nextTick;this.queues[a]||(this.queues[a]=new e),this.queues[a].push(b),this.timeouts[a]||(this.timeouts[a]=setTimeout(()=>{d(()=>{this.timeouts[a]=null,this.execute(a)})},c.timeout))}execute(a){let b=this.queues[a];if(!b)return;let{length:c}=b;if(c)for(f("send %d commands in %s queue",c,a),this.queues[a]=null;b.length>0;)b.shift()()}}},79479,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(29387),e=a.r(44999),f=a.r(94367),g=(0,e.Debug)("cluster:subscriberGroup:shardedSubscriber"),h="idle",i="starting",j="connected",k="stopping",l="ended",m={[h]:[i,k,l],[i]:[j,k,l],[j]:[k,l],[k]:[l],[l]:[]};c.default=class{constructor(a,b,c){for(let g of(this.emitter=a,this.status=h,this.instance=null,this.connectPromise=null,this.messageListeners=new Map,this.onEnd=()=>{this.updateStatus(l),this.emitter.emit("-node",this.instance,this.nodeKey)},this.onError=a=>{this.emitter.emit("nodeError",a,this.nodeKey)},this.onMoved=()=>{this.emitter.emit("moved")},this.instance=new f.default((0,e.defaults)({enableReadyCheck:!1,enableOfflineQueue:!0,connectionName:(0,d.getConnectionName)("ssubscriber",b.connectionName),retryStrategy:null,lazyConnect:!0},b,c)),this.lazyConnect=c?.lazyConnect??!0,this.nodeKey=(0,d.getNodeKey)(b),this.instance.on("end",this.onEnd),this.instance.on("error",this.onError),this.instance.on("moved",this.onMoved),["smessage","smessageBuffer"])){let a=(...a)=>{this.emitter.emit(g,...a)};this.messageListeners.set(g,a),this.instance.on(g,a)}}async start(){if(this.connectPromise)return this.connectPromise;if(this.status!==i&&this.status!==j){if(this.status===l||!this.instance)throw Error(`Sharded subscriber ${this.nodeKey} cannot be restarted once ended.`);this.updateStatus(i),this.connectPromise=this.instance.connect();try{await this.connectPromise,this.updateStatus(j)}catch(a){throw this.updateStatus(l),a}finally{this.connectPromise=null}}}stop(){this.updateStatus(k),this.instance&&(this.instance.disconnect(),this.instance.removeAllListeners(),this.messageListeners.clear(),this.instance=null),this.updateStatus(l),g("stopped %s",this.nodeKey)}isStarted(){return[j,i].includes(this.status)}get subscriberStatus(){return this.status}isHealthy(){return(this.status===h||this.status===j||this.status===i)&&null!==this.instance}getInstance(){return this.instance}getNodeKey(){return this.nodeKey}isLazyConnect(){return this.lazyConnect}updateStatus(a){if(this.status!==a){if(!m[this.status].includes(a))return void g("Invalid status transition for %s: %s -> %s",this.nodeKey,this.status,a);this.status=a}}}},38834,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(53373),e=a.r(27699),f=a.r(2414),g=a.r(26986),h=a.r(34994),i=a.r(60004),j=a.r(94367),k=a.r(99272),l=a.r(44194),m=a.r(44999),n=a.r(68028),o=a.r(14892),p=a.r(6341),q=a.r(35844),r=a.r(38236),s=a.r(13900),t=a.r(29387),u=a.r(5583),v=a.r(85875),w=a.r(64409),x=(0,m.Debug)("cluster"),y=new WeakSet;class z extends o.default{constructor(a,b={}){super(),this.slots=[],this._groupsIds={},this._groupsBySlot=Array(16384),this.isCluster=!0,this.retryAttempts=0,this.delayQueue=new s.default,this.offlineQueue=new u,this.isRefreshing=!1,this._refreshSlotsCacheCallbacks=[],this._autoPipelines=new Map,this._runningAutoPipelines=new Set,this._readyDelayedCallbacks=[],this.connectionEpoch=0,e.EventEmitter.call(this),this.startupNodes=a,this.options=(0,m.defaults)({},b,p.DEFAULT_CLUSTER_OPTIONS,this.options),this.options.himportFieldsets=(0,w.cloneHimportFieldsets)(this.options.himportFieldsets);let c=this.options.himportFieldsets?.length?new w.default(this.options.himportFieldsets):void 0;if(c&&(0,w.bindHimportCoordinator)(this,c,"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 d={...this.options.redisOptions??{}};delete d.himportFieldsets,this.connectionPool=new r.default(d,this.options.clusterNodeRetryStrategy,c?{onCreate:(a,b)=>{(0,w.bindHimportCoordinator)(a,c,b?"replica":"master")},onRoleChange:(a,b,d)=>{(0,w.setHimportRole)(a,d?"replica":"master"),c.invalidate(a),d||(0,t.waitForRedisReady)(a).then(()=>{for(let d of c.getDefinitions()){let e=c.ensurePrepared(a,d);e?.catch(a=>{this.emit("node error",a,b)})}},a=>{this.emit("node error",a,b)})},onRemove:a=>{(0,w.unbindHimportCoordinator)(a)}}:void 0),this.connectionPool.on("-node",(a,b)=>{this.emit("-node",a)}),this.connectionPool.on("+node",a=>{this.emit("+node",a)}),this.connectionPool.on("drain",()=>{this.setStatus("close")}),this.connectionPool.on("nodeError",(a,b)=>{this.emit("node error",a,b)}),this.subscriber=new q.default(this.connectionPool,this),this.options.scripts&&Object.entries(this.options.scripts).forEach(([a,b])=>{this.defineCommand(a,b)}),this.options.lazyConnect?this.setStatus("wait"):this.connect().catch(a=>{x("connecting failed: %s",a)})}connect(){return new Promise((a,b)=>{if("connecting"===this.status||"connect"===this.status||"ready"===this.status)return void b(Error("Redis is already connecting/connected"));let c=++this.connectionEpoch;this.setStatus("connecting"),this.resolveStartupNodeHostnames().then(d=>{let e;if(this.connectionEpoch!==c){x("discard connecting after resolving startup nodes because epoch not match: %d != %d",c,this.connectionEpoch),b(new f.RedisError("Connection is discarded because a new connection is made"));return}if("connecting"!==this.status){x("discard connecting after resolving startup nodes because the status changed to %s",this.status),b(new f.RedisError("Connection is aborted"));return}this.connectionPool.reset(d),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(a=>{x("Error while starting subscribers: %s",a)});let g=()=>{this.setStatus("ready"),this.retryAttempts=0,this.executeOfflineCommands(),this.resetNodesRefreshInterval(),a()},h=()=>{this.invokeReadyDelayedCallbacks(void 0),this.removeListener("close",e),this.manuallyClosing=!1,this.setStatus("connect"),this.options.enableReadyCheck?this.readyCheck((a,b)=>{a||b?(x("Ready check failed (%s). Reconnecting...",a||b),"connect"===this.status&&this.disconnect(!0)):g()}):g()};e=()=>{let a=Error("None of startup nodes is available");this.removeListener("refresh",h),this.invokeReadyDelayedCallbacks(a),b(a)},this.once("refresh",h),this.once("close",e),this.once("close",this.handleCloseEvent.bind(this)),this.refreshSlotsCache(a=>{a&&a.message===i.default.defaultMessage&&(j.default.prototype.silentEmit.call(this,"error",a),this.connectionPool.reset([]))}),this.subscriber.start(),this.options.shardedSubscribers&&this.shardedSubscribers.start().catch(a=>{x("Error while starting subscribers: %s",a)})}).catch(a=>{this.setStatus("close"),this.handleCloseEvent(a),this.invokeReadyDelayedCallbacks(a),b(a)})})}disconnect(a=!1){let b=this.status;this.setStatus("disconnecting"),a||(this.manuallyClosing=!0),this.reconnectTimeout&&!a&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=null,x("Canceled reconnecting attempts")),this.clearNodesRefreshInterval(),this.subscriber.stop(),this.options.shardedSubscribers&&this.shardedSubscribers.stop(),"wait"===b?(this.setStatus("close"),this.handleCloseEvent()):this.connectionPool.reset([])}quit(a){let b=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"===b){let b=(0,g.default)(Promise.resolve("OK"),a);return setImmediate((function(){this.setStatus("close"),this.handleCloseEvent()}).bind(this)),b}return(0,g.default)(Promise.all(this.nodes().map(a=>a.quit().catch(a=>{if(a.message===m.CONNECTION_CLOSED_ERROR_MSG)return"OK";throw a}))).then(()=>"OK"),a)}duplicate(a=[],b){let c=a.length>0?a:this.startupNodes.slice(0),d=Object.assign({},this.options,b);return this.options.redisOptions&&b?.redisOptions&&(d.redisOptions=Object.assign({},this.options.redisOptions,b.redisOptions)),new z(c,d)}nodes(a="all"){if("all"!==a&&"master"!==a&&"slave"!==a)throw Error('Invalid role "'+a+'". Expected "all", "master" or "slave"');return this.connectionPool.getNodes(a)}delayUntilReady(a){this._readyDelayedCallbacks.push(a)}get autoPipelineQueueSize(){let a=0;for(let b of this._autoPipelines.values())a+=b.length;return a}refreshSlotsCache(a){if(a&&this._refreshSlotsCacheCallbacks.push(a),this.isRefreshing)return;this.isRefreshing=!0;let b=this,c=a=>{for(let b of(this.isRefreshing=!1,this._refreshSlotsCacheCallbacks))b(a);this._refreshSlotsCacheCallbacks=[]},d=(0,m.shuffle)(this.connectionPool.getNodes()),e=null;!function a(f){if(f===d.length)return c(new i.default(i.default.defaultMessage,e));let g=d[f],h=`${g.options.host}:${g.options.port}`;x("getting slot cache from %s",h),b.getInfoFromNode(g,function(d){switch(b.status){case"close":case"end":return c(Error("Cluster is disconnected."));case"disconnecting":return c(Error("Cluster is disconnecting."))}d?(b.emit("node error",d,h),e=d,a(f+1)):(b.emit("refresh"),c())})}(0)}sendCommand(a,b,c){if("wait"===this.status&&this.connect().catch(m.noop),"end"===this.status)return a.reject(Error(m.CONNECTION_CLOSED_ERROR_MSG)),a.promise;if(!b&&!c&&"ready"===this.status&&(0,w.isHimportControlCommand)(a)&&(0,w.interceptHimportControlCommand)(this.connectionPool.getNodes("master"),a))return a.promise;let e=this.options.scaleReads;"master"!==e&&(a.isReadOnly||(0,d.exists)(a.name)&&(0,d.hasFlag)(a.name,"readonly")||(e="master"));let g=c?c.slot:a.getSlot(),i={},j=this,k=null;if(!c&&!y.has(a)){y.add(a);let b=a.reject;a.reject=function(c){let d=l.bind(null,!0);j.handleError(c,i,{moved:function(b,c){x("command %s is moved to %s",a.name,c),g=Number(b),j.slots[b]?j.slots[b][0]=c:j.slots[b]=[c],j._groupsBySlot[b]=j._groupsIds[j.slots[b].join(";")];let d=j.natMapper(c),e=(0,t.getNodeKey)(d);k&&(0,t.getNodeKey)(k.options)===e&&j.connectionPool.getInstanceByKey(e)===k?(x("MOVED redirect points back at %s; recreating its connection",e),j.connectionPool.recreate(d)):j.connectionPool.findOrCreate(d),l(),x("refreshing slot caches... (triggered by MOVED error)"),j.refreshSlotsCache()},ask:function(b,c){x("command %s is required to ask %s:%s",a.name,c);let d=j.natMapper(c);j.connectionPool.findOrCreate(d),l(!1,`${d.host}:${d.port}`)},tryagain:d,clusterDown:d,connectionClosed:d,maxRedirections:function(c){b.call(a,c)},defaults:function(){b.call(a,c)}})}}function l(d,i){let l;if("end"===j.status)return void a.reject(new f.AbortError("Cluster is ended."));if("ready"===j.status||"cluster"===a.name){if(c&&c.redis)l=c.redis;else if(h.default.checkFlag("ENTER_SUBSCRIBER_MODE",a.name)||h.default.checkFlag("EXIT_SUBSCRIBER_MODE",a.name)){if(j.options.shardedSubscribers&&("ssubscribe"==a.name||"sunsubscribe"==a.name)){let b=j.shardedSubscribers.getResponsibleSubscriber(g);if(!b)return void a.reject(new f.AbortError(`No sharded subscriber for slot: ${g}`));let c=-1;"ssubscribe"==a.name&&(c=j.shardedSubscribers.addChannels(a.getKeys())),"sunsubscribe"==a.name&&(c=j.shardedSubscribers.removeChannels(a.getKeys())),-1!==c?l=b.getInstance():a.reject(new f.AbortError("Possible CROSSSLOT error: All channels must hash to the same slot"))}else l=j.subscriber.getInstance();if(!l)return void a.reject(new f.AbortError("No subscriber for the cluster"))}else{if(!d){if("number"==typeof g&&j.slots[g]){let b=j.slots[g];if("function"==typeof e){let c=b.map(function(a){return j.connectionPool.getInstanceByKey(a)});Array.isArray(l=e(c,a))&&(l=(0,m.sample)(l)),l||(l=c[0])}else{let a;a="all"===e?(0,m.sample)(b):"slave"===e&&b.length>1?(0,m.sample)(b,1):b[0],l=j.connectionPool.getInstanceByKey(a)}}i&&(l=j.connectionPool.getInstanceByKey(i))}if(l||(l=("function"==typeof e?null:j.connectionPool.getSampleInstance(e))||j.connectionPool.getSampleInstance("all")),l&&!j.options.enableOfflineQueue&&"ready"!==l.status&&"wait"!==l.status)return void a.reject(Error(m.CONNECTION_CLOSED_ERROR_MSG))}c&&!c.redis&&(c.redis=l)}if(!l&&j.options.enableOfflineQueue)return void j.offlineQueue.push({command:a,stream:b,node:c});if(!l)return void a.reject(Error("Cluster isn't ready and enableOfflineQueue options is false"));if(k=l,i){let c=(0,w.getHimportBinding)(l);if(b||c?.role!=="master"?void 0:c.coordinator.classify(a))return void(0,t.waitForRedisReady)(l).then(()=>{if(!a.isSettled)return c.coordinator.prepareCommand(l,a)??Promise.resolve()}).then(()=>{a.isSettled||(c.coordinator.allowNextSend(l,a),l.asking(),l.sendCommand(a,b))},b=>{a.isSettled||a.reject(b)});l.asking()}l.sendCommand(a,b)}return l(),a.promise}sscanStream(a,b){return this.createScanStream("sscan",{key:a,options:b})}sscanBufferStream(a,b){return this.createScanStream("sscanBuffer",{key:a,options:b})}hscanStream(a,b){return this.createScanStream("hscan",{key:a,options:b})}hscanBufferStream(a,b){return this.createScanStream("hscanBuffer",{key:a,options:b})}zscanStream(a,b){return this.createScanStream("zscan",{key:a,options:b})}zscanBufferStream(a,b){return this.createScanStream("zscanBuffer",{key:a,options:b})}handleError(a,b,c){if(void 0===b.value?b.value=this.options.maxRedirections:b.value-=1,b.value<=0)return void c.maxRedirections(Error("Too many Cluster redirections. Last error: "+a));let d=a.message.split(" ");if("MOVED"===d[0]){let a=Number(d[1]);if(!Number.isInteger(a)||a<0||a>=16384)return void c.defaults();let b=this.options.retryDelayOnMoved;b&&"number"==typeof b?this.delayQueue.push("moved",c.moved.bind(null,a,d[2]),{timeout:b}):c.moved(a,d[2])}else"ASK"===d[0]?c.ask(d[1],d[2]):"TRYAGAIN"===d[0]?this.delayQueue.push("tryagain",c.tryagain,{timeout:this.options.retryDelayOnTryAgain}):"CLUSTERDOWN"===d[0]&&this.options.retryDelayOnClusterDown>0?this.delayQueue.push("clusterdown",c.connectionClosed,{timeout:this.options.retryDelayOnClusterDown,callback:this.refreshSlotsCache.bind(this)}):a.message===m.CONNECTION_CLOSED_ERROR_MSG&&this.options.retryDelayOnFailover>0&&"ready"===this.status?this.delayQueue.push("failover",c.connectionClosed,{timeout:this.options.retryDelayOnFailover,callback:this.refreshSlotsCache.bind(this)}):c.defaults()}resetOfflineQueue(){this.offlineQueue=new u}clearNodesRefreshInterval(){this.slotsTimer&&(clearTimeout(this.slotsTimer),this.slotsTimer=null)}resetNodesRefreshInterval(){if(this.slotsTimer||!this.options.slotsRefreshInterval)return;let a=()=>{this.slotsTimer=setTimeout(()=>{x('refreshing slot caches... (triggered by "slotsRefreshInterval" option)'),this.refreshSlotsCache(()=>{a()})},this.options.slotsRefreshInterval)};a()}setStatus(a){x("status: %s -> %s",this.status||"[empty]",a),this.status=a,process.nextTick(()=>{this.emit(a)})}handleCloseEvent(a){let b;a&&x("closed because %s",a),this.manuallyClosing||"function"!=typeof this.options.clusterRetryStrategy||(b=this.options.clusterRetryStrategy.call(this,++this.retryAttempts,a)),"number"==typeof b?(this.setStatus("reconnecting"),this.reconnectTimeout=setTimeout(()=>{this.reconnectTimeout=null,x("Cluster is disconnected. Retrying after %dms",b),this.connect().catch(function(a){x("Got error %s when reconnecting. Ignoring...",a)})},b)):(this.options.shardedSubscribers&&this.subscriberGroupEmitter?.removeAllListeners(),this.setStatus("end"),this.flushQueue(Error("None of startup nodes is available")))}flushQueue(a){let b;for(;b=this.offlineQueue.shift();)b.command.reject(a)}executeOfflineCommands(){if(this.offlineQueue.length){let a;x("send %d commands in offline queue",this.offlineQueue.length);let b=this.offlineQueue;for(this.resetOfflineQueue();a=b.shift();)this.sendCommand(a.command,a.stream,a.node)}}natMapper(a){let b="string"==typeof a?a:`${a.host}:${a.port}`,c=null;return(this.options.natMap&&"function"==typeof this.options.natMap?c=this.options.natMap(b):this.options.natMap&&"object"==typeof this.options.natMap&&(c=this.options.natMap[b]),c)?(x("NAT mapping %s -> %O",b,c),Object.assign({},c)):"string"==typeof a?(0,t.nodeKeyToRedisOptions)(a):a}getInfoFromNode(a,b){if(!a)return b(Error("Node is disconnected"));let c=a.duplicate({enableOfflineQueue:!0,enableReadyCheck:!1,retryStrategy:null,protocol:2,replyMapping:"legacy",connectionName:(0,t.getConnectionName)("refresher",this.options.redisOptions&&this.options.redisOptions.connectionName)});c.on("error",m.noop),c.cluster("SLOTS",(0,m.timeout)((a,d)=>{if(c.disconnect(),a)return x("error encountered running CLUSTER.SLOTS: %s",a),b(a);if("disconnecting"===this.status||"close"===this.status||"end"===this.status){x("ignore CLUSTER.SLOTS results (count: %d) since cluster status is %s",d.length,this.status),b();return}let e=[];x("cluster slots result count: %d",d.length);for(let a=0;a<d.length;++a){let b=d[a],c=b[0],f=b[1],g=[];for(let a=2;a<b.length;a++){if(!b[a][0])continue;let c=this.natMapper({host:b[a][0],port:b[a][1]});c.readOnly=2!==a,e.push(c),g.push(c.host+":"+c.port)}x("cluster slots result [%d]: slots %d~%d served by %s",a,c,f,g);for(let a=c;a<=f;a++)this.slots[a]=g}this._groupsIds=Object.create(null);let f=0;for(let a=0;a<16384;a++){let b=(this.slots[a]||[]).join(";");if(!b.length){this._groupsBySlot[a]=void 0;continue}this._groupsIds[b]||(this._groupsIds[b]=++f),this._groupsBySlot[a]=this._groupsIds[b]}this.connectionPool.reset(e),this.options.shardedSubscribers&&this.shardedSubscribers.reset(this.slots,this.connectionPool.getNodes("all")).catch(a=>{x("Error while starting subscribers: %s",a)}),b()},this.options.slotsRefreshTimeout))}invokeReadyDelayedCallbacks(a){for(let b of this._readyDelayedCallbacks)process.nextTick(b,a);this._readyDelayedCallbacks=[]}readyCheck(a){this.cluster("INFO",(b,c)=>{let d;if(b)return a(b);if("string"!=typeof c)return a();let e=c.split("\r\n");for(let a=0;a<e.length;++a){let b=e[a].split(":");if("cluster_state"===b[0]){d=b[1];break}}"fail"===d?(x("cluster state not ok (%s)",d),a(null,d)):a()})}resolveSrv(a){return new Promise((b,c)=>{this.options.resolveSrv(a,(a,d)=>{if(a)return c(a);let e=this,f=(0,t.groupSrvRecords)(d),g=Object.keys(f).sort((a,b)=>parseInt(a)-parseInt(b));!function a(d){if(!g.length)return c(d);let h=f[g[0]],i=(0,t.weightSrvRecords)(h);h.records.length||g.shift(),e.dnsLookup(i.name).then(a=>b({host:a,port:i.port}),a)}()})})}dnsLookup(a){return new Promise((b,c)=>{this.options.dnsLookup(a,(d,e)=>{d?(x("failed to resolve hostname %s to IP: %s",a,d.message),c(d)):(x("resolved hostname %s to IP %s",a,e),b(e))})})}async resolveStartupNodeHostnames(){if(!Array.isArray(this.startupNodes)||0===this.startupNodes.length)throw Error("`startupNodes` should contain at least one node.");let a=(0,t.normalizeNodeOptions)(this.startupNodes),b=(0,t.getUniqueHostnamesFromOptions)(a);if(0===b.length)return a;let c=await Promise.all(b.map((this.options.useSRVRecords?this.resolveSrv:this.dnsLookup).bind(this))),d=(0,m.zipMap)(b,c);return a.map(a=>{let b=d.get(a.host);return b?this.options.useSRVRecords?Object.assign({},a,b):Object.assign({},a,{host:b}):a})}createScanStream(a,{key:b,options:c={}}){return new k.default({objectMode:!0,key:b,redis:this,command:a,...c})}createShardedSubscriberGroup(){this.subscriberGroupEmitter=new e.EventEmitter,this.shardedSubscribers=new v.default(this.subscriberGroupEmitter,this.options);let a=a=>{a instanceof i.default&&this.disconnect(!0)};for(let b of(this.subscriberGroupEmitter.on("-node",(b,c)=>{this.emit("-node",b,c),this.refreshSlotsCache(a)}),this.subscriberGroupEmitter.on("subscriberConnectFailed",({delay:b,error:c})=>{this.emit("error",c),setTimeout(()=>{this.refreshSlotsCache(a)},b)}),this.subscriberGroupEmitter.on("moved",()=>{this.refreshSlotsCache(a)}),this.subscriberGroupEmitter.on("-subscriber",()=>{this.emit("-subscriber")}),this.subscriberGroupEmitter.on("+subscriber",()=>{this.emit("+subscriber")}),this.subscriberGroupEmitter.on("nodeError",(a,b)=>{this.emit("nodeError",a,b)}),this.subscriberGroupEmitter.on("subscribersReady",()=>{this.emit("subscribersReady")}),["smessage","smessageBuffer"]))this.subscriberGroupEmitter.on(b,(a,c,d)=>{this.emit(b,a,c,d)})}}(0,n.default)(z,e.EventEmitter),(0,l.addTransactionSupport)(z.prototype),c.default=z},29387,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.getConnectionName=c.weightSrvRecords=c.groupSrvRecords=c.getUniqueHostnamesFromOptions=c.normalizeNodeOptions=c.nodeKeyToRedisOptions=c.getNodeKey=c.waitForRedisReady=void 0;let d=a.r(44999),e=a.r(4446);c.waitForRedisReady=function(a){return"ready"===a.status?Promise.resolve():"wait"===a.status?a.connect():"end"===a.status?Promise.reject(Error(d.CONNECTION_CLOSED_ERROR_MSG)):new Promise((b,c)=>{let e=()=>{a.removeListener("end",f),b()},f=()=>{a.removeListener("ready",e),c(Error(d.CONNECTION_CLOSED_ERROR_MSG))};a.once("ready",e),a.once("end",f)})},c.getNodeKey=function(a){return a.port=a.port||6379,a.host=a.host||"127.0.0.1",a.host+":"+a.port},c.nodeKeyToRedisOptions=function(a){let b=a.lastIndexOf(":");if(-1===b)throw Error(`Invalid node key ${a}`);return{host:a.slice(0,b),port:Number(a.slice(b+1))}},c.normalizeNodeOptions=function(a){return a.map(a=>{let b={};if("object"==typeof a)Object.assign(b,a);else if("string"==typeof a)Object.assign(b,(0,d.parseURL)(a));else if("number"==typeof a)b.port=a;else throw Error("Invalid argument "+a);return"string"==typeof b.port&&(b.port=parseInt(b.port,10)),delete b.db,b.port||(b.port=6379),b.host||(b.host="127.0.0.1"),(0,d.resolveTLSProfile)(b)})},c.getUniqueHostnamesFromOptions=function(a){let b={};return a.forEach(a=>{b[a.host]=!0}),Object.keys(b).filter(a=>!(0,e.isIP)(a))},c.groupSrvRecords=function(a){let b={};for(let c of a)b.hasOwnProperty(c.priority)?(b[c.priority].totalWeight+=c.weight,b[c.priority].records.push(c)):b[c.priority]={totalWeight:c.weight,records:[c]};return b},c.weightSrvRecords=function(a){if(1===a.records.length)return a.totalWeight=0,a.records.shift();let b=Math.floor(Math.random()*(a.totalWeight+a.records.length)),c=0;for(let[d,e]of a.records.entries())if((c+=1+e.weight)>b)return a.totalWeight-=e.weight,a.records.splice(d,1),e},c.getConnectionName=function(a,b){let c=`ioredis-cluster(${a})`;return b?`${c}:${b}`:c}},39004,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=(0,a.r(44999).Debug)("AbstractConnector");c.default=class{constructor(a){this.connecting=!1,this.disconnectTimeout=a}check(a){return!0}disconnect(){if(this.connecting=!1,this.stream){let a=this.stream,b=setTimeout(()=>{d("stream %s:%s still open, destroying it",a.remoteAddress,a.remotePort),a.destroy()},this.disconnectTimeout);a.on("close",()=>clearTimeout(b)),a.end()}}}},3197,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.FailoverDetector=void 0;let d=(0,a.r(44999).Debug)("FailoverDetector"),e="+switch-master";c.FailoverDetector=class{constructor(a,b){this.isDisconnected=!1,this.connector=a,this.sentinels=b}cleanup(){for(let a of(this.isDisconnected=!0,this.sentinels))a.client.disconnect()}async subscribe(){d("Starting FailoverDetector");let a=[];for(let b of this.sentinels){let c=b.client.subscribe(e).catch(a=>{d("Failed to subscribe to failover messages on sentinel %s:%s (%s)",b.address.host||"127.0.0.1",b.address.port||26739,a.message)});a.push(c),b.client.on("message",a=>{this.isDisconnected||a!==e||this.disconnect()})}await Promise.all(a)}disconnect(){this.isDisconnected=!0,d("Failover detected, disconnecting"),this.connector.disconnect()}}},67083,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.default=class{constructor(a){this.cursor=0,this.sentinels=a.slice(0)}next(){let a=this.cursor>=this.sentinels.length;return{done:a,value:a?void 0:this.sentinels[this.cursor++]}}reset(a){a&&this.sentinels.length>1&&1!==this.cursor&&this.sentinels.unshift(...this.sentinels.splice(this.cursor-1)),this.cursor=0}add(a){for(let c=0;c<this.sentinels.length;c++){var b;if(b=this.sentinels[c],(a.host||"127.0.0.1")===(b.host||"127.0.0.1")&&(a.port||26379)===(b.port||26379))return!1}return this.sentinels.push(a),!0}toString(){return`${JSON.stringify(this.sentinels)} @${this.cursor}`}}},84928,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.SentinelIterator=void 0;let d=a.r(4446),e=a.r(44999),f=a.r(55004),g=a.r(67083);c.SentinelIterator=g.default;let h=a.r(39004),i=a.r(94367),j=a.r(3197),k=(0,e.Debug)("SentinelConnector");class l extends h.default{constructor(a){if(super(a.disconnectTimeout),this.options=a,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 g.default(this.options.sentinels)}check(a){let b=!a.role||this.options.role===a.role;return b||(k("role invalid, expected %s, but got %s",this.options.role,a.role),this.sentinelIterator.next(),this.sentinelIterator.next(),this.sentinelIterator.reset(!0)),b}disconnect(){super.disconnect(),this.failoverDetector&&this.failoverDetector.cleanup()}connect(a){let b;this.connecting=!0,this.retryAttempts=0;let c=async()=>{let g=this.sentinelIterator.next();if(g.done){this.sentinelIterator.reset(!1);let d="function"==typeof this.options.sentinelRetryStrategy?this.options.sentinelRetryStrategy(++this.retryAttempts):null,e="number"!=typeof d?"All sentinels are unreachable and retry is disabled.":`All sentinels are unreachable. Retrying from scratch after ${d}ms.`;b&&(e+=` Last error: ${b.message}`),k(e);let f=Error(e);if("number"==typeof d)return a("error",f),await new Promise(a=>setTimeout(a,d)),c();throw f}let h=null,i=null;try{h=await this.resolve(g.value)}catch(a){i=a}if(!this.connecting)throw Error(e.CONNECTION_CLOSED_ERROR_MSG);let j=g.value.host+":"+g.value.port;if(h)return k("resolved: %s:%s from sentinel %s",h.host,h.port,j),this.options.enableTLSForSentinelMode&&this.options.tls?(Object.assign(h,this.options.tls),this.stream=(0,f.connect)(h),this.stream.once("secureConnect",this.initFailoverDetector.bind(this))):(this.stream=(0,d.createConnection)(h),this.stream.once("connect",this.initFailoverDetector.bind(this))),this.stream.once("error",a=>{this.firstError=a}),this.stream;{let d=i?"failed to connect to sentinel "+j+" because "+i.message:"connected to sentinel "+j+" successfully, but got an invalid reply: "+h;return k(d),a("sentinelError",Error(d)),i&&(b=i),c()}};return c()}async updateSentinels(a){if(!this.options.updateSentinels)return;let b=await a.sentinel("sentinels",this.options.name);Array.isArray(b)&&(b.map(e.packObject).forEach(a=>{if(-1===(a.flags?a.flags.split(","):[]).indexOf("disconnected")&&a.ip&&a.port){let b=this.sentinelNatResolve(m(a));this.sentinelIterator.add(b)&&k("adding sentinel %s:%s",b.host,b.port)}}),k("Updated internal sentinels: %s",this.sentinelIterator))}async resolveMaster(a){let b=await a.sentinel("get-master-addr-by-name",this.options.name);return await this.updateSentinels(a),this.sentinelNatResolve(Array.isArray(b)?{host:b[0],port:Number(b[1])}:null)}async resolveSlave(a){let b=await a.sentinel("slaves",this.options.name);if(!Array.isArray(b))return null;let c=b.map(e.packObject).filter(a=>a.flags&&!a.flags.match(/(disconnected|s_down|o_down)/));return this.sentinelNatResolve(function(a,b){let c;if(0===a.length)return null;if("function"==typeof b)c=b(a);else if(null!==b&&"object"==typeof b){let d=Array.isArray(b)?[...b]:[b];d.sort((a,b)=>{let c=a.prio??1,d=b.prio??1;return c<d?-1:+(c>d)});for(let b=0;b<d.length;b++){for(let e=0;e<a.length;e++){let f=a[e];if(f.ip===d[b].ip&&f.port===d[b].port){c=f;break}}if(c)break}}return c||(c=(0,e.sample)(a)),m(c)}(c,this.options.preferredSlaves))}sentinelNatResolve(a){if(!a||!this.options.natMap)return a;let b=`${a.host}:${a.port}`,c=a;return"function"==typeof this.options.natMap?c=this.options.natMap(b)||a:"object"==typeof this.options.natMap&&(c=this.options.natMap[b]||a),c}connectToSentinel(a,b){return new i.default({port:a.port||26379,host:a.host,username:this.options.sentinelUsername||null,password:this.options.sentinelPassword||null,family:a.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,...b})}async resolve(a){let b=this.connectToSentinel(a);b.on("error",n);try{if("slave"===this.options.role)return await this.resolveSlave(b);return await this.resolveMaster(b)}finally{b.disconnect()}}async initFailoverDetector(){if(!this.options.failoverDetector)return;this.sentinelIterator.reset(!0);let a=[];for(;a.length<this.options.sentinelMaxConnections;){let{done:b,value:c}=this.sentinelIterator.next();if(b)break;let d=this.connectToSentinel(c,{lazyConnect:!0,retryStrategy:this.options.sentinelReconnectStrategy,protocol:this.options.protocol,replyMapping:"legacy"});d.on("reconnecting",()=>{this.emitter?.emit("sentinelReconnecting")}),a.push({address:c,client:d})}this.sentinelIterator.reset(!1),this.failoverDetector&&this.failoverDetector.cleanup(),this.failoverDetector=new j.FailoverDetector(this,a),await this.failoverDetector.subscribe(),this.emitter?.emit("failoverSubscribed")}}function m(a){return{host:a.ip,port:Number(a.port)}}function n(){}c.default=l},29747,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=a.r(4446),e=a.r(55004),f=a.r(44999),g=a.r(39004);class h extends g.default{constructor(a){super(a.disconnectTimeout),this.options=a}connect(a){let b,{options:c}=this;return this.connecting=!0,"path"in c&&c.path?b={path:c.path}:(b={},"port"in c&&null!=c.port&&(b.port=c.port),"host"in c&&null!=c.host&&(b.host=c.host),"family"in c&&null!=c.family&&(b.family=c.family)),c.tls&&Object.assign(b,c.tls),new Promise((a,g)=>{process.nextTick(()=>{if(!this.connecting)return void g(Error(f.CONNECTION_CLOSED_ERROR_MSG));try{c.tls?this.stream=(0,e.connect)(b):this.stream=(0,d.createConnection)(b)}catch(a){g(a);return}this.stream.once("error",a=>{this.firstError=a}),a(this.stream)})})}}c.default=h},63834,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0}),c.SentinelConnector=c.StandaloneConnector=void 0,c.StandaloneConnector=a.r(29747).default,c.SentinelConnector=a.r(84928).default},91177,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});let d=`-----BEGIN CERTIFICATE-----
|
|
3
4
|
MIIDTzCCAjegAwIBAgIJAKSVpiDswLcwMA0GCSqGSIb3DQEBBQUAMD4xFjAUBgNV
|
|
4
5
|
BAoMDUdhcmFudGlhIERhdGExJDAiBgNVBAMMG1NTTCBDZXJ0aWZpY2F0aW9uIEF1
|
|
5
6
|
dGhvcml0eTAeFw0xMzEwMDExMjE0NTVaFw0yMzA5MjkxMjE0NTVaMD4xFjAUBgNV
|