@wascartech/devbot 0.0.0-stage → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +638 -2
- package/dist/access-grant-store.js +99 -0
- package/dist/access-grant-store.js.map +1 -0
- package/dist/access-resolve.js +11 -0
- package/dist/access-resolve.js.map +1 -0
- package/dist/access-rule-store.js +99 -0
- package/dist/access-rule-store.js.map +1 -0
- package/dist/admin/access-routes.js +73 -0
- package/dist/admin/access-routes.js.map +1 -0
- package/dist/admin/access-rule-routes.js +107 -0
- package/dist/admin/access-rule-routes.js.map +1 -0
- package/dist/admin/custom-repos-routes.js +93 -0
- package/dist/admin/custom-repos-routes.js.map +1 -0
- package/dist/admin/env-routes.js +74 -0
- package/dist/admin/env-routes.js.map +1 -0
- package/dist/admin/global-settings-routes.js +254 -0
- package/dist/admin/global-settings-routes.js.map +1 -0
- package/dist/admin/mcp-cleanup.js +12 -0
- package/dist/admin/mcp-cleanup.js.map +1 -0
- package/dist/admin/mcp-routes.js +169 -0
- package/dist/admin/mcp-routes.js.map +1 -0
- package/dist/admin/query-params.js +80 -0
- package/dist/admin/query-params.js.map +1 -0
- package/dist/admin/routes.js +150 -0
- package/dist/admin/routes.js.map +1 -0
- package/dist/admin/run-history-routes.js +44 -0
- package/dist/admin/run-history-routes.js.map +1 -0
- package/dist/admin/run-routes.js +99 -0
- package/dist/admin/run-routes.js.map +1 -0
- package/dist/admin/settings-routes.js +119 -0
- package/dist/admin/settings-routes.js.map +1 -0
- package/dist/admin/stats-routes.js +51 -0
- package/dist/admin/stats-routes.js.map +1 -0
- package/dist/admin/task-routes.js +213 -0
- package/dist/admin/task-routes.js.map +1 -0
- package/dist/admin/test-routes.js +38 -0
- package/dist/admin/test-routes.js.map +1 -0
- package/dist/admin/volume-routes.js +82 -0
- package/dist/admin/volume-routes.js.map +1 -0
- package/dist/admin/webhook-routes.js +174 -0
- package/dist/admin/webhook-routes.js.map +1 -0
- package/dist/agents.js +48 -0
- package/dist/agents.js.map +1 -0
- package/dist/assignee-value.js +6 -0
- package/dist/assignee-value.js.map +1 -0
- package/dist/attachments.js +76 -0
- package/dist/attachments.js.map +1 -0
- package/dist/auto-commands.js +88 -0
- package/dist/auto-commands.js.map +1 -0
- package/dist/auto-features.js +32 -0
- package/dist/auto-features.js.map +1 -0
- package/dist/base-branch-store.js +40 -0
- package/dist/base-branch-store.js.map +1 -0
- package/dist/base-branches.js +9 -0
- package/dist/base-branches.js.map +1 -0
- package/dist/build-workflow.js +116 -0
- package/dist/build-workflow.js.map +1 -0
- package/dist/change-request-lifecycle.js +16 -0
- package/dist/change-request-lifecycle.js.map +1 -0
- package/dist/change-request-store.js +72 -0
- package/dist/change-request-store.js.map +1 -0
- package/dist/ci-failure.js +80 -0
- package/dist/ci-failure.js.map +1 -0
- package/dist/cli.js +3 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.js +17 -0
- package/dist/config.js.map +1 -0
- package/dist/conflict-fix.js +178 -0
- package/dist/conflict-fix.js.map +1 -0
- package/dist/cookie.js +70 -0
- package/dist/cookie.js.map +1 -0
- package/dist/crypto-util.js +40 -0
- package/dist/crypto-util.js.map +1 -0
- package/dist/custom-repos-store.js +90 -0
- package/dist/custom-repos-store.js.map +1 -0
- package/dist/custom-repos-sync.js +118 -0
- package/dist/custom-repos-sync.js.map +1 -0
- package/dist/db.js +12 -0
- package/dist/db.js.map +1 -0
- package/dist/devbot-scripts.js +18 -0
- package/dist/devbot-scripts.js.map +1 -0
- package/dist/devcontainer.js +141 -0
- package/dist/devcontainer.js.map +1 -0
- package/dist/env-config-store.js +132 -0
- package/dist/env-config-store.js.map +1 -0
- package/dist/error-log-store.js +193 -0
- package/dist/error-log-store.js.map +1 -0
- package/dist/git.js +605 -0
- package/dist/git.js.map +1 -0
- package/dist/global-queue.js +127 -0
- package/dist/global-queue.js.map +1 -0
- package/dist/global-settings-store.js +307 -0
- package/dist/global-settings-store.js.map +1 -0
- package/dist/help.js +41 -0
- package/dist/help.js.map +1 -0
- package/dist/http-csp.js +15 -0
- package/dist/http-csp.js.map +1 -0
- package/dist/http-util.js +40 -0
- package/dist/http-util.js.map +1 -0
- package/dist/idempotency.js +50 -0
- package/dist/idempotency.js.map +1 -0
- package/dist/lifecycle.js +234 -0
- package/dist/lifecycle.js.map +1 -0
- package/dist/logger.js +33 -0
- package/dist/logger.js.map +1 -0
- package/dist/lsp-servers.js +81 -0
- package/dist/lsp-servers.js.map +1 -0
- package/dist/mcp/auth.js +62 -0
- package/dist/mcp/auth.js.map +1 -0
- package/dist/mcp/effective-mcp.js +42 -0
- package/dist/mcp/effective-mcp.js.map +1 -0
- package/dist/mcp/oauth-refresh.js +138 -0
- package/dist/mcp/oauth-refresh.js.map +1 -0
- package/dist/mcp/peer-sync.js +109 -0
- package/dist/mcp/peer-sync.js.map +1 -0
- package/dist/mcp/registry.js +54 -0
- package/dist/mcp/registry.js.map +1 -0
- package/dist/mcp/runner-bridge.js +93 -0
- package/dist/mcp/runner-bridge.js.map +1 -0
- package/dist/mcp/server.js +173 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/_helpers.js +88 -0
- package/dist/mcp/tools/_helpers.js.map +1 -0
- package/dist/mcp/tools/attachments.js +117 -0
- package/dist/mcp/tools/attachments.js.map +1 -0
- package/dist/mcp/tools/cicd.js +105 -0
- package/dist/mcp/tools/cicd.js.map +1 -0
- package/dist/mcp/tools/discovery.js +34 -0
- package/dist/mcp/tools/discovery.js.map +1 -0
- package/dist/mcp/tools/issues.js +56 -0
- package/dist/mcp/tools/issues.js.map +1 -0
- package/dist/mcp/tools/merge_requests.js +67 -0
- package/dist/mcp/tools/merge_requests.js.map +1 -0
- package/dist/mcp/tools/metadata.js +127 -0
- package/dist/mcp/tools/metadata.js.map +1 -0
- package/dist/mcp/tools/peer_sync.js +43 -0
- package/dist/mcp/tools/peer_sync.js.map +1 -0
- package/dist/mcp/tools/repository.js +178 -0
- package/dist/mcp/tools/repository.js.map +1 -0
- package/dist/mcp/tools/work_tracking.js +125 -0
- package/dist/mcp/tools/work_tracking.js.map +1 -0
- package/dist/mcp/tools/workitems.js +30 -0
- package/dist/mcp/tools/workitems.js.map +1 -0
- package/dist/mcp/volume-files.js +187 -0
- package/dist/mcp/volume-files.js.map +1 -0
- package/dist/mcp-auth-store.js +134 -0
- package/dist/mcp-auth-store.js.map +1 -0
- package/dist/mcp-config-store.js +83 -0
- package/dist/mcp-config-store.js.map +1 -0
- package/dist/mention.js +512 -0
- package/dist/mention.js.map +1 -0
- package/dist/migrate.js +73 -0
- package/dist/migrate.js.map +1 -0
- package/dist/mr-assignee.js +71 -0
- package/dist/mr-assignee.js.map +1 -0
- package/dist/mr-content.js +90 -0
- package/dist/mr-content.js.map +1 -0
- package/dist/oauth-routes.js +54 -0
- package/dist/oauth-routes.js.map +1 -0
- package/dist/onboarding-allowlist.js +32 -0
- package/dist/onboarding-allowlist.js.map +1 -0
- package/dist/opencode.js +291 -0
- package/dist/opencode.js.map +1 -0
- package/dist/outbound-webhook-store.js +229 -0
- package/dist/outbound-webhook-store.js.map +1 -0
- package/dist/outbound-webhook.js +314 -0
- package/dist/outbound-webhook.js.map +1 -0
- package/dist/path-sandbox.js +200 -0
- package/dist/path-sandbox.js.map +1 -0
- package/dist/platform/git-auth.js +34 -0
- package/dist/platform/git-auth.js.map +1 -0
- package/dist/platform/gitealike/attachments.js +62 -0
- package/dist/platform/gitealike/attachments.js.map +1 -0
- package/dist/platform/gitealike/base.js +935 -0
- package/dist/platform/gitealike/base.js.map +1 -0
- package/dist/platform/gitealike/forgejo.js +16 -0
- package/dist/platform/gitealike/forgejo.js.map +1 -0
- package/dist/platform/gitealike/gitea.js +16 -0
- package/dist/platform/gitealike/gitea.js.map +1 -0
- package/dist/platform/gitealike/http.js +152 -0
- package/dist/platform/gitealike/http.js.map +1 -0
- package/dist/platform/gitealike/schemas.js +284 -0
- package/dist/platform/gitealike/schemas.js.map +1 -0
- package/dist/platform/github/attachments.js +52 -0
- package/dist/platform/github/attachments.js.map +1 -0
- package/dist/platform/github/http.js +153 -0
- package/dist/platform/github/http.js.map +1 -0
- package/dist/platform/github/index.js +936 -0
- package/dist/platform/github/index.js.map +1 -0
- package/dist/platform/github/schemas.js +308 -0
- package/dist/platform/github/schemas.js.map +1 -0
- package/dist/platform/github/zip.js +85 -0
- package/dist/platform/github/zip.js.map +1 -0
- package/dist/platform/gitlab/admin.js +105 -0
- package/dist/platform/gitlab/admin.js.map +1 -0
- package/dist/platform/gitlab/api.js +229 -0
- package/dist/platform/gitlab/api.js.map +1 -0
- package/dist/platform/gitlab/attachments.js +79 -0
- package/dist/platform/gitlab/attachments.js.map +1 -0
- package/dist/platform/gitlab/http.js +165 -0
- package/dist/platform/gitlab/http.js.map +1 -0
- package/dist/platform/gitlab/index.js +630 -0
- package/dist/platform/gitlab/index.js.map +1 -0
- package/dist/platform/gitlab/oauth.js +58 -0
- package/dist/platform/gitlab/oauth.js.map +1 -0
- package/dist/platform/gitlab/read.js +182 -0
- package/dist/platform/gitlab/read.js.map +1 -0
- package/dist/platform/gitlab/schemas-read.js +274 -0
- package/dist/platform/gitlab/schemas-read.js.map +1 -0
- package/dist/platform/gitlab/schemas.js +251 -0
- package/dist/platform/gitlab/schemas.js.map +1 -0
- package/dist/platform/gitlab/signature.js +52 -0
- package/dist/platform/gitlab/signature.js.map +1 -0
- package/dist/platform/index.js +38 -0
- package/dist/platform/index.js.map +1 -0
- package/dist/platform/port.js +26 -0
- package/dist/platform/port.js.map +1 -0
- package/dist/platform/types.js +80 -0
- package/dist/platform/types.js.map +1 -0
- package/dist/podman.js +119 -0
- package/dist/podman.js.map +1 -0
- package/dist/project-sync.js +69 -0
- package/dist/project-sync.js.map +1 -0
- package/dist/prompt.js +47 -0
- package/dist/prompt.js.map +1 -0
- package/dist/queue-store.js +236 -0
- package/dist/queue-store.js.map +1 -0
- package/dist/queue.js +129 -0
- package/dist/queue.js.map +1 -0
- package/dist/redact.js +23 -0
- package/dist/redact.js.map +1 -0
- package/dist/run-files.js +297 -0
- package/dist/run-files.js.map +1 -0
- package/dist/run-filters.js +54 -0
- package/dist/run-filters.js.map +1 -0
- package/dist/run-history-store.js +229 -0
- package/dist/run-history-store.js.map +1 -0
- package/dist/run-log-sink.js +270 -0
- package/dist/run-log-sink.js.map +1 -0
- package/dist/run-log.js +97 -0
- package/dist/run-log.js.map +1 -0
- package/dist/run-usage.js +29 -0
- package/dist/run-usage.js.map +1 -0
- package/dist/run-view.js +112 -0
- package/dist/run-view.js.map +1 -0
- package/dist/runner.js +1094 -0
- package/dist/runner.js.map +1 -0
- package/dist/runtime-apply.js +26 -0
- package/dist/runtime-apply.js.map +1 -0
- package/dist/runtime-settings.js +71 -0
- package/dist/runtime-settings.js.map +1 -0
- package/dist/runtime-state.js +19 -0
- package/dist/runtime-state.js.map +1 -0
- package/dist/server.js +119 -0
- package/dist/server.js.map +1 -0
- package/dist/settings-store.js +320 -0
- package/dist/settings-store.js.map +1 -0
- package/dist/status.js +121 -0
- package/dist/status.js.map +1 -0
- package/dist/stop.js +56 -0
- package/dist/stop.js.map +1 -0
- package/dist/sweeps.js +87 -0
- package/dist/sweeps.js.map +1 -0
- package/dist/task-log.js +279 -0
- package/dist/task-log.js.map +1 -0
- package/dist/task-view.js +62 -0
- package/dist/task-view.js.map +1 -0
- package/dist/token-store.js +68 -0
- package/dist/token-store.js.map +1 -0
- package/dist/types/access.js +74 -0
- package/dist/types/access.js.map +1 -0
- package/dist/types/custom-repos.js +28 -0
- package/dist/types/custom-repos.js.map +1 -0
- package/dist/types/env-config.js +25 -0
- package/dist/types/env-config.js.map +1 -0
- package/dist/types/env.js +190 -0
- package/dist/types/env.js.map +1 -0
- package/dist/types/global-settings.js +178 -0
- package/dist/types/global-settings.js.map +1 -0
- package/dist/types/lsp-servers.js +145 -0
- package/dist/types/lsp-servers.js.map +1 -0
- package/dist/types/mcp-config.js +77 -0
- package/dist/types/mcp-config.js.map +1 -0
- package/dist/types/opencode.js +59 -0
- package/dist/types/opencode.js.map +1 -0
- package/dist/types/outbound-webhook.js +56 -0
- package/dist/types/outbound-webhook.js.map +1 -0
- package/dist/types/project-settings.js +114 -0
- package/dist/types/project-settings.js.map +1 -0
- package/dist/types/provider-registry.js +37 -0
- package/dist/types/provider-registry.js.map +1 -0
- package/dist/types/runtime-settings.js +78 -0
- package/dist/types/runtime-settings.js.map +1 -0
- package/dist/usage-stats.js +159 -0
- package/dist/usage-stats.js.map +1 -0
- package/dist/version.js +19 -0
- package/dist/version.js.map +1 -0
- package/dist/volume-gc.js +193 -0
- package/dist/volume-gc.js.map +1 -0
- package/dist/volume-manage.js +191 -0
- package/dist/volume-manage.js.map +1 -0
- package/dist/volume-store.js +122 -0
- package/dist/volume-store.js.map +1 -0
- package/dist/webhook.js +1106 -0
- package/dist/webhook.js.map +1 -0
- package/dist/work-item-auto-store.js +75 -0
- package/dist/work-item-auto-store.js.map +1 -0
- package/dist/work-item-branch-store.js +37 -0
- package/dist/work-item-branch-store.js.map +1 -0
- package/migrations/0001_initial.sql +59 -0
- package/migrations/0002_queue_status.sql +15 -0
- package/migrations/0003_work_item_base_branch.sql +14 -0
- package/migrations/0004_project_settings.sql +15 -0
- package/migrations/0005_global_settings.sql +34 -0
- package/migrations/0006_model_variants.sql +8 -0
- package/migrations/0007_container_error_logs.sql +21 -0
- package/migrations/0008_project_access_grants.sql +16 -0
- package/migrations/0009_drop_imported_legacy.sql +4 -0
- package/migrations/0010_container_error_log_model.sql +6 -0
- package/migrations/0011_container_error_log_title.sql +5 -0
- package/migrations/0012_pending_task_cancel.sql +6 -0
- package/migrations/0013_builder_image.sql +6 -0
- package/migrations/0014_build_workflow.sql +7 -0
- package/migrations/0015_access_rules.sql +24 -0
- package/migrations/0016_trigger_policy.sql +17 -0
- package/migrations/0017_attachment_upload.sql +8 -0
- package/migrations/0018_work_item_branch.sql +11 -0
- package/migrations/0019_auto_push_mr.sql +18 -0
- package/migrations/0020_outbound_webhooks.sql +47 -0
- package/migrations/0021_runtime_settings.sql +12 -0
- package/migrations/0022_auto_resolve_conflicts.sql +17 -0
- package/migrations/0023_ci_fail_auto_report.sql +27 -0
- package/migrations/0024_work_item_auto_override.sql +22 -0
- package/migrations/0025_run_history.sql +37 -0
- package/migrations/0026_run_history_task_seq.sql +6 -0
- package/migrations/0027_custom_repos.sql +11 -0
- package/migrations/0028_run_usage.sql +14 -0
- package/migrations/0029_drop_ocr_langs.sql +6 -0
- package/migrations/0030_mr_assignee.sql +9 -0
- package/migrations/0031_lsp_servers.sql +14 -0
- package/opencode-config/managed/devbot-agent-policy.md +61 -0
- package/opencode-config/managed/opencode.json +77 -0
- package/opencode-config/opencode.json +211 -0
- package/opencode-config/plugins/devbot-path-guard.js +224 -0
- package/package.json +157 -4
- package/public/assets/DashboardSidebarCollapse-rIuzCmVm.js +1 -0
- package/public/assets/DashboardToolbar-DFCUqZ4Z.js +1 -0
- package/public/assets/ErrorLogModal.vue_vue_type_script_setup_true_lang-BCyNIf1E.js +1 -0
- package/public/assets/ErrorLogsPage-DyYK2Rop.js +1 -0
- package/public/assets/LogSlideover.vue_vue_type_script_setup_true_lang-33xie7TE.js +1 -0
- package/public/assets/OverviewPage-CFfa0uwg.js +1 -0
- package/public/assets/PageGrid-CBROIU87.js +1 -0
- package/public/assets/PeriodRangePicker.vue_vue_type_script_setup_true_lang-DiFUNem7.js +1 -0
- package/public/assets/ProjectDetailPage-CreyvUit.js +1 -0
- package/public/assets/ProjectsPage-CFx8-elJ.js +1 -0
- package/public/assets/RunDetailSlideover.vue_vue_type_script_setup_true_lang-DopYYmCT.js +1 -0
- package/public/assets/RunsPage-CRnnXU4P.js +1 -0
- package/public/assets/Select-Bvx32Diz.js +1 -0
- package/public/assets/SelectMenu-BjMxc4VB.js +1 -0
- package/public/assets/SettingsPage-Bb6LM3wO.js +60 -0
- package/public/assets/TimeCell.vue_vue_type_script_setup_true_lang-DW_UB0Fu.js +1 -0
- package/public/assets/UsagePage-BLMDEsv-.js +332 -0
- package/public/assets/UsagePage-DodEeAjB.css +1 -0
- package/public/assets/VolumesPage-CxcLc3L2.js +1 -0
- package/public/assets/WebhookConfigPanel.vue_vue_type_script_setup_true_lang-B2V2GF6b.js +1 -0
- package/public/assets/WorkItemCell.vue_vue_type_script_setup_true_lang-BQn6vTjd.js +1 -0
- package/public/assets/index-BMbMibyb.js +4 -0
- package/public/assets/index-C5RBBrPj.js +30 -0
- package/public/assets/index-CgX29UgC.css +1 -0
- package/public/assets/usage-format-jsb31_O8.js +1 -0
- package/public/assets/useManagedProjects-8rtjRqVJ.js +1 -0
- package/public/assets/useRouteTab-DfwrcMic.js +1 -0
- package/public/favicon.ico +0 -0
- package/public/favicon.png +0 -0
- package/public/index.html +15 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import{_ as uu,a as hu,b as fu,c as du}from"./DashboardSidebarCollapse-rIuzCmVm.js";import{_ as xa,a as pu}from"./DashboardToolbar-DFCUqZ4Z.js";import{_ as gu}from"./SelectMenu-BjMxc4VB.js";import{d as St,e as U,h as Ut,w as z,c as J,g as Oi,_ as mu,f as X,t as K,a1 as ba,l as wa,j as An,F as Fe,x as ut,a8 as _u,a9 as jo,aa as yu,O as Ve,o as de,ab as Ye,p as pe,q as ht,r as Q,B as vu,ac as xu,ad as tr,D as bu,N as wu,Q as Je,ae as ku,u as nt,a as Y,af as Su,m as yr,s as ka,a4 as Tu,a5 as Cu,a6 as Mu,n as Au,b as $u,i as Du}from"./index-C5RBBrPj.js";import{b as Eu,_ as Nu}from"./PeriodRangePicker.vue_vue_type_script_setup_true_lang-DiFUNem7.js";import{_ as Pu,a as eo}from"./PageGrid-CBROIU87.js";import{a as gt,t as er,f as Ri,b as Fu}from"./usage-format-jsb31_O8.js";import{_ as Ou}from"./Select-Bvx32Diz.js";import{_ as Sa}from"./index-BMbMibyb.js";const Ru={class:"flex items-center gap-2"},Iu={class:"text-2xl font-semibold text-highlighted"},Lu=St({__name:"UsageStats",props:{totals:{},previous:{}},setup(t){const e=t;function n(r,o){return o?Math.round((r-o)/o*100):null}const i=ut(()=>{const r=e.totals,o=e.previous;return[{title:"Runs",icon:"i-lucide-activity",value:String(r.runs),variation:n(r.runs,o.runs)},{title:"Tokens in",icon:"i-lucide-arrow-down-to-line",value:gt(r.input),variation:n(r.input,o.input)},{title:"Tokens out",icon:"i-lucide-arrow-up-from-line",value:gt(r.output),variation:n(r.output,o.output)},{title:"Cache",icon:"i-lucide-database",value:gt(r.cacheRead+r.cacheWrite),variation:n(r.cacheRead+r.cacheWrite,o.cacheRead+o.cacheWrite)},{title:"Total tokens",icon:"i-lucide-sigma",value:gt(er(r)),variation:n(er(r),er(o))},{title:"Cost",icon:"i-lucide-circle-dollar-sign",value:Ri(r.costUsd),variation:n(r.costUsd,o.costUsd)}]});return(r,o)=>{const s=ba,a=mu,l=Pu;return U(),Ut(l,{class:"lg:grid-cols-6 gap-4"},{default:z(()=>[(U(!0),J(Fe,null,Oi(i.value,c=>(U(),Ut(a,{key:c.title,icon:c.icon,title:c.title,variant:"subtle",ui:{container:"gap-y-1.5",title:"font-normal text-muted text-xs uppercase"}},{default:z(()=>[X("div",Ru,[X("span",Iu,K(c.value),1),c.variation!==null?(U(),Ut(s,{key:0,color:c.variation>0?"success":c.variation<0?"error":"neutral",variant:"subtle",class:"text-xs"},{default:z(()=>[wa(K(c.variation>0?"+":"")+K(c.variation)+"% ",1)]),_:2},1032,["color"])):An("",!0)])]),_:2},1032,["icon","title"]))),128))]),_:1})}}});var vr="http://www.w3.org/1999/xhtml";const qo={svg:"http://www.w3.org/2000/svg",xhtml:vr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ii(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),qo.hasOwnProperty(e)?{space:qo[e],local:t}:t}function zu(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===vr&&e.documentElement.namespaceURI===vr?e.createElement(t):e.createElementNS(n,t)}}function Bu(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ta(t){var e=Ii(t);return(e.local?Bu:zu)(e)}function Uu(){}function no(t){return t==null?Uu:function(){return this.querySelector(t)}}function Wu(t){typeof t!="function"&&(t=no(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=new Array(s),l,c,h=0;h<s;++h)(l=o[h])&&(c=t.call(l,l.__data__,h,o))&&("__data__"in l&&(c.__data__=l.__data__),a[h]=c);return new yt(i,this._parents)}function Hu(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Vu(){return[]}function Ca(t){return t==null?Vu:function(){return this.querySelectorAll(t)}}function Yu(t){return function(){return Hu(t.apply(this,arguments))}}function Xu(t){typeof t=="function"?t=Yu(t):t=Ca(t);for(var e=this._groups,n=e.length,i=[],r=[],o=0;o<n;++o)for(var s=e[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&(i.push(t.call(l,l.__data__,c,s)),r.push(l));return new yt(i,r)}function Ma(t){return function(){return this.matches(t)}}function Aa(t){return function(e){return e.matches(t)}}var Gu=Array.prototype.find;function ju(t){return function(){return Gu.call(this.children,t)}}function qu(){return this.firstElementChild}function Ku(t){return this.select(t==null?qu:ju(typeof t=="function"?t:Aa(t)))}var Zu=Array.prototype.filter;function Qu(){return Array.from(this.children)}function Ju(t){return function(){return Zu.call(this.children,t)}}function th(t){return this.selectAll(t==null?Qu:Ju(typeof t=="function"?t:Aa(t)))}function eh(t){typeof t!="function"&&(t=Ma(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new yt(i,this._parents)}function $a(t){return new Array(t.length)}function nh(){return new yt(this._enter||this._groups.map($a),this._parents)}function li(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}li.prototype={constructor:li,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ih(t){return function(){return t}}function rh(t,e,n,i,r,o){for(var s=0,a,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],i[s]=a):n[s]=new li(t,o[s]);for(;s<l;++s)(a=e[s])&&(r[s]=a)}function oh(t,e,n,i,r,o,s){var a,l,c=new Map,h=e.length,u=o.length,f=new Array(h),d;for(a=0;a<h;++a)(l=e[a])&&(f[a]=d=s.call(l,l.__data__,a,e)+"",c.has(d)?r[a]=l:c.set(d,l));for(a=0;a<u;++a)d=s.call(t,o[a],a,o)+"",(l=c.get(d))?(i[a]=l,l.__data__=o[a],c.delete(d)):n[a]=new li(t,o[a]);for(a=0;a<h;++a)(l=e[a])&&c.get(f[a])===l&&(r[a]=l)}function sh(t){return t.__data__}function ah(t,e){if(!arguments.length)return Array.from(this,sh);var n=e?oh:rh,i=this._parents,r=this._groups;typeof t!="function"&&(t=ih(t));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var h=i[c],u=r[c],f=u.length,d=ch(t.call(h,h&&h.__data__,c,i)),p=d.length,g=a[c]=new Array(p),m=s[c]=new Array(p),v=l[c]=new Array(f);n(h,u,g,m,v,d,e);for(var y=0,x=0,_,b;y<p;++y)if(_=g[y]){for(y>=x&&(x=y+1);!(b=m[x])&&++x<p;);_._next=b||null}}return s=new yt(s,i),s._enter=a,s._exit=l,s}function ch(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function lh(){return new yt(this._exit||this._groups.map($a),this._parents)}function uh(t,e,n){var i=this.enter(),r=this,o=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(r=e(r),r&&(r=r.selection())),n==null?o.remove():n(o),i&&r?i.merge(r).order():r}function hh(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,s=Math.min(r,o),a=new Array(r),l=0;l<s;++l)for(var c=n[l],h=i[l],u=c.length,f=a[l]=new Array(u),d,p=0;p<u;++p)(d=c[p]||h[p])&&(f[p]=d);for(;l<r;++l)a[l]=n[l];return new yt(a,this._parents)}function fh(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i=t[e],r=i.length-1,o=i[r],s;--r>=0;)(s=i[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function dh(t){t||(t=ph);function e(u,f){return u&&f?t(u.__data__,f.__data__):!u-!f}for(var n=this._groups,i=n.length,r=new Array(i),o=0;o<i;++o){for(var s=n[o],a=s.length,l=r[o]=new Array(a),c,h=0;h<a;++h)(c=s[h])&&(l[h]=c);l.sort(e)}return new yt(r,this._parents).order()}function ph(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function gh(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function mh(){return Array.from(this)}function _h(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null}function yh(){let t=0;for(const e of this)++t;return t}function vh(){return!this.node()}function xh(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r=e[n],o=0,s=r.length,a;o<s;++o)(a=r[o])&&t.call(a,a.__data__,o,r);return this}function bh(t){return function(){this.removeAttribute(t)}}function wh(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kh(t,e){return function(){this.setAttribute(t,e)}}function Sh(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Th(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Ch(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Mh(t,e){var n=Ii(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((e==null?n.local?wh:bh:typeof e=="function"?n.local?Ch:Th:n.local?Sh:kh)(n,e))}function Da(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ah(t){return function(){this.style.removeProperty(t)}}function $h(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dh(t,e,n){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function Eh(t,e,n){return arguments.length>1?this.each((e==null?Ah:typeof e=="function"?Dh:$h)(t,e,n??"")):Oe(this.node(),t)}function Oe(t,e){return t.style.getPropertyValue(e)||Da(t).getComputedStyle(t,null).getPropertyValue(e)}function Nh(t){return function(){delete this[t]}}function Ph(t,e){return function(){this[t]=e}}function Fh(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Oh(t,e){return arguments.length>1?this.each((e==null?Nh:typeof e=="function"?Fh:Ph)(t,e)):this.node()[t]}function Ea(t){return t.trim().split(/^|\s+/)}function io(t){return t.classList||new Na(t)}function Na(t){this._node=t,this._names=Ea(t.getAttribute("class")||"")}Na.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Pa(t,e){for(var n=io(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function Fa(t,e){for(var n=io(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function Rh(t){return function(){Pa(this,t)}}function Ih(t){return function(){Fa(this,t)}}function Lh(t,e){return function(){(e.apply(this,arguments)?Pa:Fa)(this,t)}}function zh(t,e){var n=Ea(t+"");if(arguments.length<2){for(var i=io(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each((typeof e=="function"?Lh:e?Rh:Ih)(n,e))}function Bh(){this.textContent=""}function Uh(t){return function(){this.textContent=t}}function Wh(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Hh(t){return arguments.length?this.each(t==null?Bh:(typeof t=="function"?Wh:Uh)(t)):this.node().textContent}function Vh(){this.innerHTML=""}function Yh(t){return function(){this.innerHTML=t}}function Xh(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Gh(t){return arguments.length?this.each(t==null?Vh:(typeof t=="function"?Xh:Yh)(t)):this.node().innerHTML}function jh(){this.nextSibling&&this.parentNode.appendChild(this)}function qh(){return this.each(jh)}function Kh(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Zh(){return this.each(Kh)}function Qh(t){var e=typeof t=="function"?t:Ta(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Jh(){return null}function tf(t,e){var n=typeof t=="function"?t:Ta(t),i=e==null?Jh:typeof e=="function"?e:no(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function ef(){var t=this.parentNode;t&&t.removeChild(this)}function nf(){return this.each(ef)}function rf(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function of(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function sf(t){return this.select(t?of:rf)}function af(t){return arguments.length?this.property("__data__",t):this.node().__data__}function cf(t){return function(e){t.call(this,e,this.__data__)}}function lf(t){return t.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");return i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),{type:e,name:n}})}function uf(t){return function(){var e=this.__on;if(e){for(var n=0,i=-1,r=e.length,o;n<r;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++i]=o;++i?e.length=i:delete this.__on}}}function hf(t,e,n){return function(){var i=this.__on,r,o=cf(e);if(i){for(var s=0,a=i.length;s<a;++s)if((r=i[s]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function ff(t,e,n){var i=lf(t+""),r,o=i.length,s;if(arguments.length<2){var a=this.node().__on;if(a){for(var l=0,c=a.length,h;l<c;++l)for(r=0,h=a[l];r<o;++r)if((s=i[r]).type===h.type&&s.name===h.name)return h.value}return}for(a=e?hf:uf,r=0;r<o;++r)this.each(a(i[r],e,n));return this}function Oa(t,e,n){var i=Da(t),r=i.CustomEvent;typeof r=="function"?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}function df(t,e){return function(){return Oa(this,t,e)}}function pf(t,e){return function(){return Oa(this,t,e.apply(this,arguments))}}function gf(t,e){return this.each((typeof e=="function"?pf:df)(t,e))}function*mf(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length,s;r<o;++r)(s=i[r])&&(yield s)}var Ra=[null];function yt(t,e){this._groups=t,this._parents=e}function $n(){return new yt([[document.documentElement]],Ra)}function _f(){return this}yt.prototype=$n.prototype={constructor:yt,select:Wu,selectAll:Xu,selectChild:Ku,selectChildren:th,filter:eh,data:ah,enter:nh,exit:lh,join:uh,merge:hh,selection:_f,order:fh,sort:dh,call:gh,nodes:mh,node:_h,size:yh,empty:vh,each:xh,attr:Mh,style:Eh,property:Oh,classed:zh,text:Hh,html:Gh,raise:qh,lower:Zh,append:Qh,insert:tf,remove:nf,clone:sf,datum:af,on:ff,dispatch:gf,[Symbol.iterator]:mf};function mt(t){return typeof t=="string"?new yt([[document.querySelector(t)]],[document.documentElement]):new yt([[t]],Ra)}function yf(t){let e;for(;e=t.sourceEvent;)t=e;return t}function ui(t,e){if(t=yf(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,i=i.matrixTransform(e.getScreenCTM().inverse()),[i.x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}var Gn=(t=>(t[t.SVG=0]="SVG",t[t.HTML=1]="HTML",t))(Gn||{}),_n=(t=>(t.Fit="fit",t.Extend="extend",t.FitWidth="fit_width",t))(_n||{});function Zt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function vf(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function ro(t){let e,n,i;t.length!==2?(e=Zt,n=(a,l)=>Zt(t(a),l),i=(a,l)=>t(a)-l):(e=t===Zt||t===vf?t:xf,n=t,i=t);function r(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<0?c=u+1:h=u}while(c<h)}return c}function o(a,l,c=0,h=a.length){if(c<h){if(e(l,l)!==0)return h;do{const u=c+h>>>1;n(a[u],l)<=0?c=u+1:h=u}while(c<h)}return c}function s(a,l,c=0,h=a.length){const u=r(a,l,c,h-1);return u>c&&i(a[u-1],l)>-i(a[u],l)?u-1:u}return{left:r,center:s,right:o}}function xf(){return 0}function Ia(t){return t===null?NaN:+t}const La=ro(Zt),Dn=La.right,bf=La.left;ro(Ia).center;function wf(t,e){let n,i;for(const r of t)r!=null&&(n===void 0?r>=r&&(n=i=r):(n>r&&(n=r),i<r&&(i=r)));return[n,i]}class Ko extends Map{constructor(e,n=Tf){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[i,r]of e)this.set(i,r)}get(e){return super.get(Zo(this,e))}has(e){return super.has(Zo(this,e))}set(e,n){return super.set(kf(this,e),n)}delete(e){return super.delete(Sf(this,e))}}function Zo({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):n}function kf({_intern:t,_key:e},n){const i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}function Sf({_intern:t,_key:e},n){const i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}function Tf(t){return t!==null&&typeof t=="object"?t.valueOf():t}const Cf=Math.sqrt(50),Mf=Math.sqrt(10),Af=Math.sqrt(2);function hi(t,e,n){const i=(e-t)/Math.max(0,n),r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r),s=o>=Cf?10:o>=Mf?5:o>=Af?2:1;let a,l,c;return r<0?(c=Math.pow(10,-r)/s,a=Math.round(t*c),l=Math.round(e*c),a/c<t&&++a,l/c>e&&--l,c=-c):(c=Math.pow(10,r)*s,a=Math.round(t/c),l=Math.round(e/c),a*c<t&&++a,l*c>e&&--l),l<a&&.5<=n&&n<2?hi(t,e,n*2):[a,l,c]}function xr(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const i=e<t,[r,o,s]=i?hi(e,t,n):hi(t,e,n);if(!(o>=r))return[];const a=o-r+1,l=new Array(a);if(i)if(s<0)for(let c=0;c<a;++c)l[c]=(o-c)/-s;else for(let c=0;c<a;++c)l[c]=(o-c)*s;else if(s<0)for(let c=0;c<a;++c)l[c]=(r+c)/-s;else for(let c=0;c<a;++c)l[c]=(r+c)*s;return l}function br(t,e,n){return e=+e,t=+t,n=+n,hi(t,e,n)[2]}function wr(t,e,n){e=+e,t=+t,n=+n;const i=e<t,r=i?br(e,t,n):br(t,e,n);return(i?-1:1)*(r<0?1/-r:r)}function kr(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n<i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n<r||n===void 0&&r>=r)&&(n=r)}return n}function fn(t,e){let n;if(e===void 0)for(const i of t)i!=null&&(n>i||n===void 0&&i>=i)&&(n=i);else{let i=-1;for(let r of t)(r=e(r,++i,t))!=null&&(n>r||n===void 0&&r>=r)&&(n=r)}return n}function $f(t,e,n=Ia){if(!(!(i=t.length)||isNaN(e=+e))){if(e<=0||i<2)return+n(t[0],0,t);if(e>=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,o=Math.floor(r),s=+n(t[o],o,t),a=+n(t[o+1],o+1,t);return s+(a-s)*(r-o)}}function Df(t,e){let n=0,i=0;if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(++n,i+=r);else{let r=-1;for(let o of t)(o=e(o,++r,t))!=null&&(o=+o)>=o&&(++n,i+=o)}if(n)return i/n}function*Ef(t){for(const e of t)yield*e}function Nf(t){return Array.from(Ef(t))}function Pf(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(r);++i<r;)o[i]=t+i*n;return o}function Ff(t,e=Zt){let n,i=!1;if(e.length===1){let r;for(const o of t){const s=e(o);(i?Zt(s,r)<0:Zt(s,s)===0)&&(n=o,r=s,i=!0)}}else for(const r of t)(i?e(r,n)<0:e(r,r)===0)&&(n=r,i=!0);return n}function Of(t,e){let n=0;if(e===void 0)for(let i of t)(i=+i)&&(n+=i);else{let i=-1;for(let r of t)(r=+e(r,++i,t))&&(n+=r)}return n}function Rf(t,e,n){var i={},r=i.noTrailing,o=r===void 0?!1:r,s=i.noLeading,a=s===void 0?!1:s,l=i.debounceMode,c=l===void 0?void 0:l,h,u=!1,f=0;function d(){h&&clearTimeout(h)}function p(m){var v=m||{},y=v.upcomingOnly,x=y===void 0?!1:y;d(),u=!x}function g(){for(var m=arguments.length,v=new Array(m),y=0;y<m;y++)v[y]=arguments[y];var x=this,_=Date.now()-f;if(u)return;function b(){f=Date.now(),e.apply(x,v)}function w(){h=void 0}!a&&c&&!h&&b(),d(),c===void 0&&_>t?a?(f=Date.now(),o||(h=setTimeout(c?w:b,t))):b():o!==!0&&(h=setTimeout(c?w:b,c===void 0?t-_:t))}return g.cancel=p,g}var jt=(t=>(t.Left="left",t.Right="right",t.Auto="auto",t))(jt||{});const st=t=>typeof t=="number",ue=t=>typeof t=="function",za=t=>typeof t=="string",Ht=t=>Array.isArray(t),If=t=>t instanceof Object,oo=t=>t.constructor.name!=="Function"&&t.constructor.name!=="Object",Qo=t=>If(t)&&!Ht(t)&&!ue(t)&&!oo(t),Lf=t=>[Object,Array].includes((t||{}).constructor)&&!Object.entries(t||{}).length,he=(t,e,n=[],i=new Set)=>{if(t===e)return!0;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;if(i.has(t))return!0;i.add(t);for(let r=0;r<t.length;r++)if(!he(t[r],e[r],n,i))return!1;return i.delete(t),!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(typeof t=="object"&&t!==null&&e!==null){if(typeof e!="object")return!1;const r=Object.keys(t).filter(s=>!n.includes(s)),o=Object.keys(e).filter(s=>!n.includes(s));if(r.length!==o.length)return!1;if(i.has(t))return!0;i.add(t);for(const s of r)if(!he(t[s],e[s],n,i))return!1;return i.delete(t),!0}return t===e},Sr=t=>t.flat(),dn=(t,e=new Map)=>{if(typeof t!="object"||t===null)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array){const n=[];e.set(t,n);for(const i of t)n.push(e.has(i)?e.get(i):dn(i,e));return n}if(oo(t))return t;if(t instanceof Object){const n={};e.set(t,n);const i=t;return Object.keys(t).reduce((r,o)=>(r[o]=e.has(i[o])?e.get(i[o]):dn(i[o],e),r),n),n}return t},Re=(t,e,n=new Map)=>{if(!t||!e)return t&&dn(t);if(t===e)return t;const i=oo(t)?t:dn(t);return n.has(e)?n.get(e):(n.set(e,i),Object.keys(e).forEach(r=>{r==="__proto__"||r==="constructor"||(Qo(t[r])&&Qo(e[r])?i[r]=Re(t[r],e[r],n):i[r]=dn(e[r]))}),i)},fi=(t,e,n)=>Rf(e,t);function Xe(t,e,n){return ue(e)?e(t,n):e}function yn(t,e,n){return Xe(t,e,n)}function F(t,e,n){return Xe(t,e,n)}function tn(t){return t.filter(e=>e&&!st(e))}function xt(t,e,n){return Math.min(Math.max(t,e),n)}function Ba(t,e,...n){if(!t)return[void 0,void 0];if(Ht(n)){let i,r;return t.forEach((o,s)=>{const a=F(o,e,s)||0;let l=a,c=a;for(const h of n){const u=F(o,h,s)||0;u>=0?l+=u:c+=u}(r===void 0||l>r)&&(r=l),(i===void 0||c<i)&&(i=c)}),[i??0,r??0]}}function Ua(t,e,...n){const i=[];let r=0,o=0;for(const s of n){const a=F(t,s,e)||0;a>=0?i.push(r+=a):i.push(o+=a)}return i}function Wa(t,e,n,i){const r=t.map((a,l)=>F(a,e,l)||0),o=n.map((a,l)=>{const c=Df(t,(h,u)=>F(h,a,u)||0);return c===0&&Array.isArray(i)?i[l]:c<0}),s=n.map(()=>[]);return t.forEach((a,l)=>{let c=r[l],h=r[l];n.forEach((u,f)=>{const d=F(a,u,l)||0;d>=0?s[f].push([c,c+=d]):s[f].push([h,h+=d])})}),s.forEach((a,l)=>{a.isMostlyNegative=o[l]}),s}function zf(t,...e){return t?fn(t,(i,r)=>fn(e,o=>F(i,o,r))):void 0}function Bf(t,...e){return t?kr(t,(i,r)=>kr(e,o=>F(i,o,r))):void 0}function jn(t,...e){return[zf(t,...e),Bf(t,...e)]}function di(t,e,n,i=jt.Auto){if(t.length<=1)return t[0];const o=t.map((l,c)=>[l,c]).sort(([l,c],[h,u])=>F(l,n,c)-F(h,n,u)),s=o.map(([l,c])=>F(l,n,c)),a=i===jt.Right?bf(s,e,0,t.length-1):Dn(s,e,1,t.length);return i===jt.Right?o[a][0]:i===jt.Left?o[a-1][0]:e-s[a-1]>s[a]-e?o[a][0]:o[a-1][0]}function Uf(t,e,n,i,r,o=[],s=[],a){if(!t?.length||!r)return;const[l,c]=e;let h,u=-1,f=1/0;for(let d=0;d<t.length;d++){const p=t[d],g=n(F(p,r,d));if(!isFinite(g))continue;const m=(g-l)**2;if(s.length){const v=F(p,a,d)||0,y=Ua(p,d,...s);for(let x=0;x<y.length;x++){if(!st(F(p,s[x],x)))continue;const _=i(y[x]+v),b=m+(_-c)**2;b<f&&(f=b,h=p,u=d)}}for(let v=0;v<o.length;v++){const y=F(p,o[v],d);if(!st(y))continue;const x=i(y),_=m+(x-c)**2;_<f&&(f=_,h=p,u=d)}}if(u!==-1)return{datum:h,index:u,distanceSq:f}}function Ha(t,e,n,i=!1){if(!n)return[];const r=t.filter((o,s)=>{const a=F(o,n,s);return a>=e[0]&&a<=e[1]});if(i){if(r.length===0){const u=di(t,e[0],n,jt.Left),f=di(t,e[1],n,jt.Right);return[u,f].filter(Boolean)}const o=r[0],s=r[r.length-1],a=t.findIndex(u=>u===o),l=t.findIndex(u=>u===s),c=Math.max(0,a-1),h=Math.min(t.length-1,l+1);return t.slice(c,h+1)}return r}function Tr(t){t=String(t);const e=parseFloat(t),n=t.match(/[\d.\-+]*\s*(.*)/)?.[1]||"";return[e,n]}function Va(){return typeof window<"u"&&typeof document<"u"}function Cr(t,e){const n=Tr(getComputedStyle(t).getPropertyValue(e));return n[0]*(Ge(n[1],t)??1)}function Ya(t,e){const n=document.createElement("div");n.style.height=`128${t}`,e.appendChild(n);const i=Cr(n,"height")/128;return e.removeChild(n),i}let In=null;function en(){return Va()?(In===null&&(In=96,In=Ya("in",document.body)),In):96}function Ge(t,e){if(!t&&t!==0)return null;if(!Va()){const o=Tr(String(t));if(!isNaN(o[0])){const s=o[1]?.toLowerCase()||"px";if(s==="px"||s==="")return o[0];if(s==="em"||s==="rem")return o[0]*16;if(s==="in")return o[0]*96;if(s==="cm")return o[0]*(96/2.54);if(s==="mm")return o[0]*(96/25.4);if(s==="pt")return o[0]*(96/72);if(s==="pc")return o[0]*(96/6)}return null}let n=document.body;e&&e!==window&&e!==document&&(n=e);const i=(String(t)||"px").trim().toLowerCase();switch(i){case"%":return n.clientHeight/100;case"ch":case"ex":return Ya(i,n);case"em":return Cr(n,"font-size");case"rem":return Cr(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return en();case"cm":return en()/2.54;case"mm":return en()/25.4;case"pt":return en()/72;case"pc":return en()/6;case"px":return 1}const r=Tr(i);if(!isNaN(r[0])){if(r[1]){const o=Ge(r[1],n);return typeof o=="number"?r[0]*o:null}return r[0]}return null}function Xa(){const t=()=>Math.floor((1+crypto.getRandomValues(new Uint32Array(1))[0])*65536).toString(16).substring(1);return`${t()+t()}-${t()}-${t()}-${t()}-${t()}${t()}${t()}`}function Wf(t){return(t||"").replace(/\W/g,"_")}function Hf(t){return za(t)?t.substring(0,6)==="var(--":!1}const Jo=new WeakMap;function Ga(t,e){if(!za(t))return"";const n=t.substr(4,t.length-5);let i=Jo.get(e);if(i||(i=new Map,Jo.set(e,i)),i.has(n))return i.get(n);const r=getComputedStyle(e).getPropertyValue(n);return i.set(n,r),r}function ts(t){return typeof t=="number"?t:Ge(t)}function Vf(t,e){const n=Math.sin(e),i=Math.cos(e),r=[[t.x,t.y],[t.x+t.width,t.y],[t.x,t.y+t.height],[t.x+t.width,t.y+t.height]],o=r.map(([c,h])=>c*i-h*n),s=r.map(([c,h])=>c*n+h*i),a=Math.min(...o),l=Math.min(...s);return{x:a,y:l,width:Math.max(...o)-a,height:Math.max(...s)-l}}function ja(t,e,n=0){const[i,r,o,s]=[t.x+n,t.y+t.height-2*n,t.x+t.width-2*n,t.y+n],[a,l,c,h]=[e.x+n,e.y+e.height-2*n,e.x+e.width-2*n,e.y+n];return!(r<h||l<s||o<a||c<i)}var oe=[],Yf=function(){return oe.some(function(t){return t.activeTargets.length>0})},Xf=function(){return oe.some(function(t){return t.skippedTargets.length>0})},es="ResizeObserver loop completed with undelivered notifications.",Gf=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:es}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=es),window.dispatchEvent(t)},vn;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(vn||(vn={}));var se=function(t){return Object.freeze(t)},jf=(function(){function t(e,n){this.inlineSize=e,this.blockSize=n,se(this)}return t})(),qa=(function(){function t(e,n,i,r){return this.x=e,this.y=n,this.width=i,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,se(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,i=e.y,r=e.top,o=e.right,s=e.bottom,a=e.left,l=e.width,c=e.height;return{x:n,y:i,top:r,right:o,bottom:s,left:a,width:l,height:c}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t})(),so=function(t){return t instanceof SVGElement&&"getBBox"in t},Ka=function(t){if(so(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var r=t,o=r.offsetWidth,s=r.offsetHeight;return!(o||s||t.getClientRects().length)},ns=function(t){var e;if(t instanceof Element)return!0;var n=(e=t?.ownerDocument)===null||e===void 0?void 0:e.defaultView;return!!(n&&t instanceof n.Element)},qf=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1},pn=typeof window<"u"?window:{},Ln=new WeakMap,is=/auto|scroll/,Kf=/^tb|vertical/,Zf=/msie|trident/i.test(pn.navigator&&pn.navigator.userAgent),Et=function(t){return parseFloat(t||"0")},Ce=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new jf((n?e:t)||0,(n?t:e)||0)},rs=se({devicePixelContentBoxSize:Ce(),borderBoxSize:Ce(),contentBoxSize:Ce(),contentRect:new qa(0,0,0,0)}),Za=function(t,e){if(e===void 0&&(e=!1),Ln.has(t)&&!e)return Ln.get(t);if(Ka(t))return Ln.set(t,rs),rs;var n=getComputedStyle(t),i=so(t)&&t.ownerSVGElement&&t.getBBox(),r=!Zf&&n.boxSizing==="border-box",o=Kf.test(n.writingMode||""),s=!i&&is.test(n.overflowY||""),a=!i&&is.test(n.overflowX||""),l=i?0:Et(n.paddingTop),c=i?0:Et(n.paddingRight),h=i?0:Et(n.paddingBottom),u=i?0:Et(n.paddingLeft),f=i?0:Et(n.borderTopWidth),d=i?0:Et(n.borderRightWidth),p=i?0:Et(n.borderBottomWidth),g=i?0:Et(n.borderLeftWidth),m=u+c,v=l+h,y=g+d,x=f+p,_=a?t.offsetHeight-x-t.clientHeight:0,b=s?t.offsetWidth-y-t.clientWidth:0,w=r?m+y:0,S=r?v+x:0,A=i?i.width:Et(n.width)-w-b,$=i?i.height:Et(n.height)-S-_,V=A+m+b+y,B=$+v+_+x,M=se({devicePixelContentBoxSize:Ce(Math.round(A*devicePixelRatio),Math.round($*devicePixelRatio),o),borderBoxSize:Ce(V,B,o),contentBoxSize:Ce(A,$,o),contentRect:new qa(u,l,A,$)});return Ln.set(t,M),M},Qa=function(t,e,n){var i=Za(t,n),r=i.borderBoxSize,o=i.contentBoxSize,s=i.devicePixelContentBoxSize;switch(e){case vn.DEVICE_PIXEL_CONTENT_BOX:return s;case vn.BORDER_BOX:return r;default:return o}},Qf=(function(){function t(e){var n=Za(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=se([n.borderBoxSize]),this.contentBoxSize=se([n.contentBoxSize]),this.devicePixelContentBoxSize=se([n.devicePixelContentBoxSize])}return t})(),Ja=function(t){if(Ka(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e},Jf=function(){var t=1/0,e=[];oe.forEach(function(s){if(s.activeTargets.length!==0){var a=[];s.activeTargets.forEach(function(c){var h=new Qf(c.target),u=Ja(c.target);a.push(h),c.lastReportedSize=Qa(c.target,c.observedBox),u<t&&(t=u)}),e.push(function(){s.callback.call(s.observer,a,s.observer)}),s.activeTargets.splice(0,s.activeTargets.length)}});for(var n=0,i=e;n<i.length;n++){var r=i[n];r()}return t},os=function(t){oe.forEach(function(n){n.activeTargets.splice(0,n.activeTargets.length),n.skippedTargets.splice(0,n.skippedTargets.length),n.observationTargets.forEach(function(r){r.isActive()&&(Ja(r.target)>t?n.activeTargets.push(r):n.skippedTargets.push(r))})})},td=function(){var t=0;for(os(t);Yf();)t=Jf(),os(t);return Xf()&&Gf(),t>0},nr,tc=[],ed=function(){return tc.splice(0).forEach(function(t){return t()})},nd=function(t){if(!nr){var e=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return ed()}).observe(n,i),nr=function(){n.textContent="".concat(e?e--:e++)}}tc.push(t),nr()},id=function(t){nd(function(){requestAnimationFrame(t)})},qn=0,rd=function(){return!!qn},od=250,sd={attributes:!0,characterData:!0,childList:!0,subtree:!0},ss=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],as=function(t){return t===void 0&&(t=0),Date.now()+t},ir=!1,ad=(function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=od),!ir){ir=!0;var i=as(e);id(function(){var r=!1;try{r=td()}finally{if(ir=!1,e=i-as(),!rd())return;r?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,sd)};document.body?n():pn.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),ss.forEach(function(n){return pn.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),ss.forEach(function(n){return pn.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t})(),Mr=new ad,cs=function(t){!qn&&t>0&&Mr.start(),qn+=t,!qn&&Mr.stop()},cd=function(t){return!so(t)&&!qf(t)&&getComputedStyle(t).display==="inline"},ld=(function(){function t(e,n){this.target=e,this.observedBox=n||vn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=Qa(this.target,this.observedBox,!0);return cd(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t})(),ud=(function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t})(),zn=new WeakMap,ls=function(t,e){for(var n=0;n<t.length;n+=1)if(t[n].target===e)return n;return-1},Bn=(function(){function t(){}return t.connect=function(e,n){var i=new ud(e,n);zn.set(e,i)},t.observe=function(e,n,i){var r=zn.get(e),o=r.observationTargets.length===0;ls(r.observationTargets,n)<0&&(o&&oe.push(r),r.observationTargets.push(new ld(n,i&&i.box)),cs(1),Mr.schedule())},t.unobserve=function(e,n){var i=zn.get(e),r=ls(i.observationTargets,n),o=i.observationTargets.length===1;r>=0&&(o&&oe.splice(oe.indexOf(i),1),i.observationTargets.splice(r,1),cs(-1))},t.disconnect=function(e){var n=this,i=zn.get(e);i.observationTargets.slice().forEach(function(r){return n.unobserve(e,r.target)}),i.activeTargets.splice(0,i.activeTargets.length)},t})(),hd=(function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Bn.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ns(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Bn.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!ns(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Bn.unobserve(this,e)},t.prototype.disconnect=function(){Bn.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t})();const fd=globalThis.ResizeObserver||hd,ec={duration:void 0,margin:{top:0,bottom:0,left:0,right:0},padding:{top:0,bottom:0,left:0,right:0},sizing:_n.Fit,width:void 0,height:void 0,svgDefs:void 0,ariaLabel:void 0,colorFunction:void 0},nc=class Ar{constructor(e){this._defaultConfig=ec,this._isFirstRender=!0,this._renderAnimationFrameId=null,this._container=e;const n=mt(this._container);n.attr("role","figure"),this.svg=n.append("svg").style("display","block").attr("xmlns","http://www.w3.org/2000/svg").attr("height",Ar.DEFAULT_CONTAINER_HEIGHT).attr("aria-hidden",!0),this._svgDefs=this.svg.append("defs"),this._svgDefsExternal=this.svg.append("defs"),this.element=this.svg.node()}updateContainer(e){this.prevConfig=this.config,this.config=Re(this._defaultConfig,e),e?.svgDefs!==this.prevConfig?.svgDefs&&(this._svgDefsExternal.selectAll("*").remove(),this._svgDefsExternal.html(e.svgDefs))}_preRender(){}_propagateSizeAndStyleToComponents(e,n){for(const i of e)i&&(i.setSize(this.width,this.height,this.containerWidth,this.containerHeight),i.setContainerMargin(n),i.setColorFunction(this.config.colorFunction))}_render(e){const{config:n}=this;mt(this._container).attr("aria-label",n.ariaLabel),this._isFirstRender=!1}render(e=this.config.duration){const n=this.config.width||this.containerWidth,i=this.config.height||this.containerHeight;this.svg.attr("width",n).attr("height",i),this._resizeObserver||this._setUpResizeObserver(),cancelAnimationFrame(this._renderAnimationFrameId),this._renderAnimationFrameId=requestAnimationFrame(()=>{this._preRender(),this._render(e)})}get containerWidth(){return this.config.width?this.element.clientWidth||ts(this.config.width)||0:this._container.clientWidth||this._container.getBoundingClientRect().width}get containerHeight(){return this.config.height?this.element.clientHeight||ts(this.config.height)||0:this._container.clientHeight||this._container.getBoundingClientRect().height||Ar.DEFAULT_CONTAINER_HEIGHT}get width(){return xt(this.containerWidth-this.config.margin.left-this.config.margin.right,0,Number.POSITIVE_INFINITY)}get height(){return xt(this.containerHeight-this.config.margin.top-this.config.margin.bottom,0,Number.POSITIVE_INFINITY)}_removeAllChildren(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild)}_reconcileChildren(e){const n=e.filter(Boolean),i=new Set(n);let r=this.element.firstChild;for(;r;){const s=r.nextSibling;i.has(r)||this.element.removeChild(r),r=s}let o=this.element.firstChild;for(const s of n)s===o?o=o.nextSibling:this.element.insertBefore(s,o)}_onResize(){const{config:e}=this;(e.sizing===_n.Fit||e.sizing===_n.FitWidth)&&this.render(0)}_setUpResizeObserver(){if(this._resizeObserver)return;const e=this._container.getBoundingClientRect();this._containerSize={width:e.width,height:e.height},this._resizeObserver=new fd((n,i)=>{cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserverAnimationFrameId=requestAnimationFrame(()=>{const r=this._container.getBoundingClientRect(),o={width:r.width,height:r.height};!he(this._containerSize,o)&&o.width&&o.height&&(this._containerSize=o,this._onResize())})}),this._resizeObserver.observe(this._container)}destroy(){cancelAnimationFrame(this._renderAnimationFrameId),cancelAnimationFrame(this._resizeObserverAnimationFrameId),this._resizeObserver?.disconnect(),this.svg.remove()}};nc.DEFAULT_CONTAINER_HEIGHT=300;let dd=nc;function pd(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]}function gd(t){var e=document.createElement("style");return e.setAttribute("data-emotion",t.key),t.nonce!==void 0&&e.setAttribute("nonce",t.nonce),e.appendChild(document.createTextNode("")),e.setAttribute("data-s",""),e}var md=(function(){function t(n){var i=this;this._insertTag=function(r){var o;i.tags.length===0?i.insertionPoint?o=i.insertionPoint.nextSibling:i.prepend?o=i.container.firstChild:o=i.before:o=i.tags[i.tags.length-1].nextSibling,i.container.insertBefore(r,o),i.tags.push(r)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var e=t.prototype;return e.hydrate=function(i){i.forEach(this._insertTag)},e.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(gd(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var o=pd(r);try{o.insertRule(i,o.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},e.flush=function(){this.tags.forEach(function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)}),this.tags=[],this.ctr=0},t})(),ot="-ms-",pi="-moz-",I="-webkit-",ic="comm",ao="rule",co="decl",_d="@import",rc="@keyframes",yd="@layer",vd=Math.abs,Li=String.fromCharCode,xd=Object.assign;function bd(t,e){return rt(t,0)^45?(((e<<2^rt(t,0))<<2^rt(t,1))<<2^rt(t,2))<<2^rt(t,3):0}function oc(t){return t.trim()}function wd(t,e){return(t=e.exec(t))?t[0]:t}function L(t,e,n){return t.replace(e,n)}function $r(t,e){return t.indexOf(e)}function rt(t,e){return t.charCodeAt(e)|0}function xn(t,e,n){return t.slice(e,n)}function Nt(t){return t.length}function lo(t){return t.length}function Un(t,e){return e.push(t),t}function kd(t,e){return t.map(e).join("")}var zi=1,Ie=1,sc=0,ft=0,Z=0,je="";function Bi(t,e,n,i,r,o,s){return{value:t,root:e,parent:n,type:i,props:r,children:o,line:zi,column:Ie,length:s,return:""}}function nn(t,e){return xd(Bi("",null,null,"",null,null,0),t,{length:-t.length},e)}function Sd(){return Z}function Td(){return Z=ft>0?rt(je,--ft):0,Ie--,Z===10&&(Ie=1,zi--),Z}function _t(){return Z=ft<sc?rt(je,ft++):0,Ie++,Z===10&&(Ie=1,zi++),Z}function Pt(){return rt(je,ft)}function Kn(){return ft}function En(t,e){return xn(je,t,e)}function bn(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function ac(t){return zi=Ie=1,sc=Nt(je=t),ft=0,[]}function cc(t){return je="",t}function Zn(t){return oc(En(ft-1,Dr(t===91?t+2:t===40?t+1:t)))}function Cd(t){for(;(Z=Pt())&&Z<33;)_t();return bn(t)>2||bn(Z)>3?"":" "}function Md(t,e){for(;--e&&_t()&&!(Z<48||Z>102||Z>57&&Z<65||Z>70&&Z<97););return En(t,Kn()+(e<6&&Pt()==32&&_t()==32))}function Dr(t){for(;_t();)switch(Z){case t:return ft;case 34:case 39:t!==34&&t!==39&&Dr(Z);break;case 40:t===41&&Dr(t);break;case 92:_t();break}return ft}function Ad(t,e){for(;_t()&&t+Z!==57;)if(t+Z===84&&Pt()===47)break;return"/*"+En(e,ft-1)+"*"+Li(t===47?t:_t())}function $d(t){for(;!bn(Pt());)_t();return En(t,ft)}function Dd(t){return cc(Qn("",null,null,null,[""],t=ac(t),0,[0],t))}function Qn(t,e,n,i,r,o,s,a,l){for(var c=0,h=0,u=s,f=0,d=0,p=0,g=1,m=1,v=1,y=0,x="",_=r,b=o,w=i,S=x;m;)switch(p=y,y=_t()){case 40:if(p!=108&&rt(S,u-1)==58){$r(S+=L(Zn(y),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:S+=Zn(y);break;case 9:case 10:case 13:case 32:S+=Cd(p);break;case 92:S+=Md(Kn()-1,7);continue;case 47:switch(Pt()){case 42:case 47:Un(Ed(Ad(_t(),Kn()),e,n),l);break;default:S+="/"}break;case 123*g:a[c++]=Nt(S)*v;case 125*g:case 59:case 0:switch(y){case 0:case 125:m=0;case 59+h:v==-1&&(S=L(S,/\f/g,"")),d>0&&Nt(S)-u&&Un(d>32?hs(S+";",i,n,u-1):hs(L(S," ","")+";",i,n,u-2),l);break;case 59:S+=";";default:if(Un(w=us(S,e,n,c,h,r,a,x,_=[],b=[],u),o),y===123)if(h===0)Qn(S,e,w,w,_,o,u,a,b);else switch(f===99&&rt(S,3)===110?100:f){case 100:case 108:case 109:case 115:Qn(t,w,w,i&&Un(us(t,w,w,0,0,r,a,x,r,_=[],u),b),r,b,u,a,i?_:b);break;default:Qn(S,w,w,w,[""],b,0,a,b)}}c=h=d=0,g=v=1,x=S="",u=s;break;case 58:u=1+Nt(S),d=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&Td()==125)continue}switch(S+=Li(y),y*g){case 38:v=h>0?1:(S+="\f",-1);break;case 44:a[c++]=(Nt(S)-1)*v,v=1;break;case 64:Pt()===45&&(S+=Zn(_t())),f=Pt(),h=u=Nt(x=S+=$d(Kn())),y++;break;case 45:p===45&&Nt(S)==2&&(g=0)}}return o}function us(t,e,n,i,r,o,s,a,l,c,h){for(var u=r-1,f=r===0?o:[""],d=lo(f),p=0,g=0,m=0;p<i;++p)for(var v=0,y=xn(t,u+1,u=vd(g=s[p])),x=t;v<d;++v)(x=oc(g>0?f[v]+" "+y:L(y,/&\f/g,f[v])))&&(l[m++]=x);return Bi(t,e,n,r===0?ao:a,l,c,h)}function Ed(t,e,n){return Bi(t,e,n,ic,Li(Sd()),xn(t,2,-2),0)}function hs(t,e,n,i){return Bi(t,e,n,co,xn(t,0,i),xn(t,i+1,-1),i)}function Me(t,e){for(var n="",i=lo(t),r=0;r<i;r++)n+=e(t[r],r,t,e)||"";return n}function Nd(t,e,n,i){switch(t.type){case yd:if(t.children.length)break;case _d:case co:return t.return=t.return||t.value;case ic:return"";case rc:return t.return=t.value+"{"+Me(t.children,i)+"}";case ao:t.value=t.props.join(",")}return Nt(n=Me(t.children,i))?t.return=t.value+"{"+n+"}":""}function Pd(t){var e=lo(t);return function(n,i,r,o){for(var s="",a=0;a<e;a++)s+=t[a](n,i,r,o)||"";return s}}function Fd(t){return function(e){e.root||(e=e.return)&&t(e)}}function Od(t){var e=Object.create(null);return function(n){return e[n]===void 0&&(e[n]=t(n)),e[n]}}var Rd=function(e,n,i){for(var r=0,o=0;r=o,o=Pt(),r===38&&o===12&&(n[i]=1),!bn(o);)_t();return En(e,ft)},Id=function(e,n){var i=-1,r=44;do switch(bn(r)){case 0:r===38&&Pt()===12&&(n[i]=1),e[i]+=Rd(ft-1,n,i);break;case 2:e[i]+=Zn(r);break;case 4:if(r===44){e[++i]=Pt()===58?"&\f":"",n[i]=e[i].length;break}default:e[i]+=Li(r)}while(r=_t());return e},Ld=function(e,n){return cc(Id(ac(e),n))},fs=new WeakMap,zd=function(e){if(!(e.type!=="rule"||!e.parent||e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(i=i.parent,!i)return;if(!(e.props.length===1&&n.charCodeAt(0)!==58&&!fs.get(i))&&!r){fs.set(e,!0);for(var o=[],s=Ld(n,o),a=i.props,l=0,c=0;l<s.length;l++)for(var h=0;h<a.length;h++,c++)e.props[c]=o[l]?s[l].replace(/&\f/g,a[h]):a[h]+" "+s[l]}}},Bd=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function lc(t,e){switch(bd(t,e)){case 5103:return I+"print-"+t+t;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return I+t+t;case 5349:case 4246:case 4810:case 6968:case 2756:return I+t+pi+t+ot+t+t;case 6828:case 4268:return I+t+ot+t+t;case 6165:return I+t+ot+"flex-"+t+t;case 5187:return I+t+L(t,/(\w+).+(:[^]+)/,I+"box-$1$2"+ot+"flex-$1$2")+t;case 5443:return I+t+ot+"flex-item-"+L(t,/flex-|-self/,"")+t;case 4675:return I+t+ot+"flex-line-pack"+L(t,/align-content|flex-|-self/,"")+t;case 5548:return I+t+ot+L(t,"shrink","negative")+t;case 5292:return I+t+ot+L(t,"basis","preferred-size")+t;case 6060:return I+"box-"+L(t,"-grow","")+I+t+ot+L(t,"grow","positive")+t;case 4554:return I+L(t,/([^-])(transform)/g,"$1"+I+"$2")+t;case 6187:return L(L(L(t,/(zoom-|grab)/,I+"$1"),/(image-set)/,I+"$1"),t,"")+t;case 5495:case 3959:return L(t,/(image-set\([^]*)/,I+"$1$`$1");case 4968:return L(L(t,/(.+:)(flex-)?(.*)/,I+"box-pack:$3"+ot+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+I+t+t;case 4095:case 3583:case 4068:case 2532:return L(t,/(.+)-inline(.+)/,I+"$1$2")+t;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Nt(t)-1-e>6)switch(rt(t,e+1)){case 109:if(rt(t,e+4)!==45)break;case 102:return L(t,/(.+:)(.+)-([^]+)/,"$1"+I+"$2-$3$1"+pi+(rt(t,e+3)==108?"$3":"$2-$3"))+t;case 115:return~$r(t,"stretch")?lc(L(t,"stretch","fill-available"),e)+t:t}break;case 4949:if(rt(t,e+1)!==115)break;case 6444:switch(rt(t,Nt(t)-3-(~$r(t,"!important")&&10))){case 107:return L(t,":",":"+I)+t;case 101:return L(t,/(.+:)([^;!]+)(;|!.+)?/,"$1"+I+(rt(t,14)===45?"inline-":"")+"box$3$1"+I+"$2$3$1"+ot+"$2box$3")+t}break;case 5936:switch(rt(t,e+11)){case 114:return I+t+ot+L(t,/[svh]\w+-[tblr]{2}/,"tb")+t;case 108:return I+t+ot+L(t,/[svh]\w+-[tblr]{2}/,"tb-rl")+t;case 45:return I+t+ot+L(t,/[svh]\w+-[tblr]{2}/,"lr")+t}return I+t+ot+t+t}return t}var Ud=function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case co:e.return=lc(e.value,e.length);break;case rc:return Me([nn(e,{value:L(e.value,"@","@"+I)})],r);case ao:if(e.length)return kd(e.props,function(o){switch(wd(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Me([nn(e,{props:[L(o,/:(read-\w+)/,":"+pi+"$1")]})],r);case"::placeholder":return Me([nn(e,{props:[L(o,/:(plac\w+)/,":"+I+"input-$1")]}),nn(e,{props:[L(o,/:(plac\w+)/,":"+pi+"$1")]}),nn(e,{props:[L(o,/:(plac\w+)/,ot+"input-$1")]})],r)}return""})}},Wd=[Ud],Hd=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,function(g){var m=g.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var r=e.stylisPlugins||Wd,o={},s,a=[];s=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var m=g.getAttribute("data-emotion").split(" "),v=1;v<m.length;v++)o[m[v]]=!0;a.push(g)});var l,c=[zd,Bd];{var h,u=[Nd,Fd(function(g){h.insert(g)})],f=Pd(c.concat(r,u)),d=function(m){return Me(Dd(m),f)};l=function(m,v,y,x){h=y,d(m?m+"{"+v.styles+"}":v.styles),x&&(p.inserted[v.name]=!0)}}var p={key:n,sheet:new md({key:n,container:s,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:l};return p.sheet.hydrate(a),p};function Vd(t){for(var e=0,n,i=0,r=t.length;r>=4;++i,r-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(r){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var Yd={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Xd=/[A-Z]|^ms/g,Gd=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uc=function(e){return e.charCodeAt(1)===45},ds=function(e){return e!=null&&typeof e!="boolean"},rr=Od(function(t){return uc(t)?t:t.replace(Xd,"-$&").toLowerCase()}),ps=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(Gd,function(i,r,o){return qt={name:r,styles:o,next:qt},r})}return Yd[e]!==1&&!uc(e)&&typeof n=="number"&&n!==0?n+"px":n};function gi(t,e,n){if(n==null)return"";var i=n;if(i.__emotion_styles!==void 0)return i;switch(typeof n){case"boolean":return"";case"object":{var r=n;if(r.anim===1)return qt={name:r.name,styles:r.styles,next:qt},r.name;var o=n;if(o.styles!==void 0){var s=o.next;if(s!==void 0)for(;s!==void 0;)qt={name:s.name,styles:s.styles,next:qt},s=s.next;var a=o.styles+";";return a}return jd(t,e,n)}}var l=n;if(e==null)return l;var c=e[l];return c!==void 0?c:l}function jd(t,e,n){var i="";if(Array.isArray(n))for(var r=0;r<n.length;r++)i+=gi(t,e,n[r])+";";else for(var o in n){var s=n[o];if(typeof s!="object"){var a=s;e!=null&&e[a]!==void 0?i+=o+"{"+e[a]+"}":ds(a)&&(i+=rr(o)+":"+ps(o,a)+";")}else if(Array.isArray(s)&&typeof s[0]=="string"&&(e==null||e[s[0]]===void 0))for(var l=0;l<s.length;l++)ds(s[l])&&(i+=rr(o)+":"+ps(o,s[l])+";");else{var c=gi(t,e,s);switch(o){case"animation":case"animationName":{i+=rr(o)+":"+c+";";break}default:i+=o+"{"+c+"}"}}}return i}var gs=/label:\s*([^\s;{]+)\s*(;|$)/g,qt;function or(t,e,n){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,r="";qt=void 0;var o=t[0];if(o==null||o.raw===void 0)i=!1,r+=gi(n,e,o);else{var s=o;r+=s[0]}for(var a=1;a<t.length;a++)if(r+=gi(n,e,t[a]),i){var l=o;r+=l[a]}gs.lastIndex=0;for(var c="",h;(h=gs.exec(r))!==null;)c+="-"+h[1];var u=Vd(r)+c;return{name:u,styles:r,next:qt}}function hc(t,e,n){var i="";return n.split(" ").forEach(function(r){t[r]!==void 0?e.push(t[r]+";"):r&&(i+=r+" ")}),i}var qd=function(e,n,i){var r=e.key+"-"+n.name;e.registered[r]===void 0&&(e.registered[r]=n.styles)},Kd=function(e,n,i){qd(e,n);var r=e.key+"-"+n.name;if(e.inserted[n.name]===void 0){var o=n;do e.insert(n===o?"."+r:"",o,e.sheet,!0),o=o.next;while(o!==void 0)}};function ms(t,e){if(t.inserted[e.name]===void 0)return t.insert("",e,t.sheet,!0)}function _s(t,e,n){var i=[],r=hc(t,i,n);return i.length<2?n:r+e(i)}var fc=function(e){var n=Hd(e);n.sheet.speedy=function(a){this.isSpeedy=a},n.compat=!0;var i=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=or(c,n.registered,void 0);return Kd(n,u),n.key+"-"+u.name},r=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=or(c,n.registered),f="animation-"+u.name;return ms(n,{name:u.name,styles:"@keyframes "+f+"{"+u.styles+"}"}),f},o=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];var u=or(c,n.registered);ms(n,u)},s=function(){for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];return _s(n.registered,i,Zd(c))};return{css:i,cx:s,injectGlobal:o,keyframes:r,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:hc.bind(null,n.registered),merge:_s.bind(null,n.registered,i)}},Zd=function t(e){for(var n="",i=0;i<e.length;i++){var r=e[i];if(r!=null){var o=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))o=t(r);else{o="";for(var s in r)r[s]&&s&&(o&&(o+=" "),o+=s)}break}default:o=r}o&&(n&&(n+=" "),n+=o)}}return n},dc=fc({key:"css"}),Qd=dc.injectGlobal,Jd=dc.css;const tp=Object.freeze(Object.defineProperty({__proto__:null,css:Jd,injectGlobal:Qd},Symbol.toStringTag,{value:"Module"})),ys=globalThis?.UNOVIS_NONCE,ep=ys?fc({key:"unovis",nonce:ys}):tp,{css:P,injectGlobal:qe}=ep,Le='html[data-theme="dark"],html.dark-theme,body.dark-theme,html.theme-dark,body.theme-dark';function uo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function pc(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function Nn(){}var wn=.7,mi=1/wn,Ae="\\s*([+-]?\\d+)\\s*",kn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ft="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",np=/^#([0-9a-f]{3,8})$/,ip=new RegExp(`^rgb\\(${Ae},${Ae},${Ae}\\)$`),rp=new RegExp(`^rgb\\(${Ft},${Ft},${Ft}\\)$`),op=new RegExp(`^rgba\\(${Ae},${Ae},${Ae},${kn}\\)$`),sp=new RegExp(`^rgba\\(${Ft},${Ft},${Ft},${kn}\\)$`),ap=new RegExp(`^hsl\\(${kn},${Ft},${Ft}\\)$`),cp=new RegExp(`^hsla\\(${kn},${Ft},${Ft},${kn}\\)$`),vs={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};uo(Nn,Qt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:xs,formatHex:xs,formatHex8:lp,formatHsl:up,formatRgb:bs,toString:bs});function xs(){return this.rgb().formatHex()}function lp(){return this.rgb().formatHex8()}function up(){return gc(this).formatHsl()}function bs(){return this.rgb().formatRgb()}function Qt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=np.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?ws(e):n===3?new ct(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Wn(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Wn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=ip.exec(t))?new ct(e[1],e[2],e[3],1):(e=rp.exec(t))?new ct(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=op.exec(t))?Wn(e[1],e[2],e[3],e[4]):(e=sp.exec(t))?Wn(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=ap.exec(t))?Ts(e[1],e[2]/100,e[3]/100,1):(e=cp.exec(t))?Ts(e[1],e[2]/100,e[3]/100,e[4]):vs.hasOwnProperty(t)?ws(vs[t]):t==="transparent"?new ct(NaN,NaN,NaN,0):null}function ws(t){return new ct(t>>16&255,t>>8&255,t&255,1)}function Wn(t,e,n,i){return i<=0&&(t=e=n=NaN),new ct(t,e,n,i)}function hp(t){return t instanceof Nn||(t=Qt(t)),t?(t=t.rgb(),new ct(t.r,t.g,t.b,t.opacity)):new ct}function Er(t,e,n,i){return arguments.length===1?hp(t):new ct(t,e,n,i??1)}function ct(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}uo(ct,Er,pc(Nn,{brighter(t){return t=t==null?mi:Math.pow(mi,t),new ct(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?wn:Math.pow(wn,t),new ct(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ct(ae(this.r),ae(this.g),ae(this.b),_i(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ks,formatHex:ks,formatHex8:fp,formatRgb:Ss,toString:Ss}));function ks(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}`}function fp(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}${ie((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ss(){const t=_i(this.opacity);return`${t===1?"rgb(":"rgba("}${ae(this.r)}, ${ae(this.g)}, ${ae(this.b)}${t===1?")":`, ${t})`}`}function _i(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ae(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ie(t){return t=ae(t),(t<16?"0":"")+t.toString(16)}function Ts(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Mt(t,e,n,i)}function gc(t){if(t instanceof Mt)return new Mt(t.h,t.s,t.l,t.opacity);if(t instanceof Nn||(t=Qt(t)),!t)return new Mt;if(t instanceof Mt)return t;t=t.rgb();var e=t.r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),s=NaN,a=o-r,l=(o+r)/2;return a?(e===o?s=(n-i)/a+(n<i)*6:n===o?s=(i-e)/a+2:s=(e-n)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new Mt(s,a,l,t.opacity)}function ho(t,e,n,i){return arguments.length===1?gc(t):new Mt(t,e,n,i??1)}function Mt(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}uo(Mt,ho,pc(Nn,{brighter(t){return t=t==null?mi:Math.pow(mi,t),new Mt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?wn:Math.pow(wn,t),new Mt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new ct(sr(t>=240?t-240:t+120,r,i),sr(t,r,i),sr(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new Mt(Cs(this.h),Hn(this.s),Hn(this.l),_i(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=_i(this.opacity);return`${t===1?"hsl(":"hsla("}${Cs(this.h)}, ${Hn(this.s)*100}%, ${Hn(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Cs(t){return t=(t||0)%360,t<0?t+360:t}function Hn(t){return Math.max(0,Math.min(1,t||0))}function sr(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Kt=globalThis?.UNOVIS_COLORS||["#4D8CFD","#FF6B7E","#F4B83E","#A6CC74","#00C19A","#6859BE"],dp=globalThis?.UNOVIS_COLORS_DARK||["#4D8CFD","#FF6B7E","#FFC16D","#A6CC74","#00C19A","#7887E0"],gn=t=>`--vis-${st(t)?`color${t%Kt.length}`:t}`;function pp(t,e=.4){const n=ho(t);return n.l=n.l*(1+e),n.formatHex()}function gp(t,e=.4,n=.6){const i=ho(t);return i.s=i.s*(1-n),i.l=i.l*(1-e),i.formatHex()}const Jt=10,yi=[{id:"stripes-diagonal",svg:'<path d="M-1,1 l2,-2 M0,10 l10,-10 M9,11 l2,-2" stroke="#000"/>'},{id:"dots",svg:'<path d="m0-1.5a1 1 0 010 3m10-3a1 1 0 000 3M5 3.5a1 1 0 010 3 1 1 0 010-3M0 8.5 a1 1 0 010 3m10-3a1 1 0 000 3" fill"#000"/>'},{id:"stripes-vertical",svg:'<path d="M 5,-1 L5,11" stroke="#000"/>'},{id:"crosshatch",svg:'<path d="M0 0L10 10ZM10 0L0 10Z" stroke="#000"/>'},{id:"waves",svg:'<path d="M0 4Q2.5 1 5 4 7.5 7 10 4v2Q7.5 9 5 6 2.5 3 0 6Z" fill="#000"/>'},{id:"circles",svg:'<circle cx="5" cy="5" r="3" stroke="#000" fill="#fff"/>'}],Sn=[{id:"circle",marker:'<circle cx="5" cy="5" r="5"/>',dashArray:[]},{id:"triangle",marker:'<path d="M5,0 L10,9 L0,9Z">',dashArray:[9,1]},{id:"diamond",marker:'<path d="M 0 5 L5 0 L 10 5 L 5 10 L 0 5Z">',dashArray:[2]},{id:"arrow",marker:'<path d="M4 0 0 0 6 5 0 10 4 10 10 5Z">',dashArray:[2,3,8,3]},{id:"square",marker:'<rect x="1" y="1" width="8" height="8"/>',dashArray:[6]},{id:"star",marker:'<path d="m2 9 3-9 3 9L0 3h10Z"/>',dashArray:[1,6]}],mp=new Map(yi.map(t=>[t.id,t])),_p=new Map(Sn.map(t=>[t.id,t]));function we(t){return`vis-${`pattern-${t.svg?"fill":"marker"}`}-${t.id}`}function mc(t){return`vis-pattern-fill-${t}`}function _c(t){return`vis-pattern-marker-${t}`}function yc(t){return`vis-pattern-marker-ctx-${t}`}function yp(t){return mp.get(t)??_p.get(t)??null}const vp=t=>`<mask id="${mc(t.id)}">
|
|
2
|
+
<pattern id="vis-pattern-tile-${t.id}" viewBox="0 0 10 10" width="${Jt}" height="${Jt}" patternUnits="userSpaceOnUse">
|
|
3
|
+
<rect width="10" height="10" fill="#fff"/>
|
|
4
|
+
${t.svg}
|
|
5
|
+
</pattern>
|
|
6
|
+
<rect x="-100000" y="-100000" width="200000" height="200000" fill="url(#vis-pattern-tile-${t.id})"/>
|
|
7
|
+
</mask>`,xp=(t,e)=>`<marker id="${_c(t.id)}"
|
|
8
|
+
fill="var(${gn(e)})"
|
|
9
|
+
markerUnits="userSpaceOnUse"
|
|
10
|
+
refX="5"
|
|
11
|
+
refY="5"
|
|
12
|
+
markerWidth="${Jt}"
|
|
13
|
+
markerHeight="${Jt}">
|
|
14
|
+
${t.marker}
|
|
15
|
+
</marker>`,bp=t=>`<marker id="${yc(t.id)}"
|
|
16
|
+
fill="context-stroke"
|
|
17
|
+
markerUnits="userSpaceOnUse"
|
|
18
|
+
refX="5"
|
|
19
|
+
refY="5"
|
|
20
|
+
markerWidth="${Jt}"
|
|
21
|
+
markerHeight="${Jt}">
|
|
22
|
+
${t.marker}
|
|
23
|
+
</marker>`;function wp(t,e,n){const i=document.createElementNS("http://www.w3.org/2000/svg","marker");return i.setAttribute("id",e),i.setAttribute("fill",n),i.setAttribute("markerUnits","userSpaceOnUse"),i.setAttribute("refX","5"),i.setAttribute("refY","5"),i.setAttribute("markerWidth",String(Jt)),i.setAttribute("markerHeight",String(Jt)),i.innerHTML=t.marker,i}function kp(){const t=Sn.map((i,r)=>xp(i,r)).concat(Sn.map(bp)),e=yi.map(vp).concat(t).join(""),n=document.createElementNS("http://www.w3.org/2000/svg","svg");n.setAttribute("height","0"),n.setAttribute("width","0"),n.style.position="fixed",n.style.zIndex="-99999999",n.innerHTML=`<defs>${e}</defs>`,document.body.appendChild(n)}typeof window<"u"&&kp();function At(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function vc(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Ms=Symbol("implicit");function Ui(){var t=new Ko,e=[],n=[],i=Ms;function r(o){let s=t.get(o);if(s===void 0){if(i!==Ms)return i;t.set(o,s=e.push(o)-1)}return n[s%n.length]}return r.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Ko;for(const s of o)t.has(s)||t.set(s,e.push(s)-1);return r},r.range=function(o){return arguments.length?(n=Array.from(o),r):n.slice()},r.unknown=function(o){return arguments.length?(i=o,r):i},r.copy=function(){return Ui(e,n).unknown(i)},At.apply(r,arguments),r}function fo(){var t=Ui().unknown(void 0),e=t.domain,n=t.range,i=0,r=1,o,s,a=!1,l=0,c=0,h=.5;delete t.unknown;function u(){var f=e().length,d=r<i,p=d?r:i,g=d?i:r;o=(g-p)/Math.max(1,f-l+c*2),a&&(o=Math.floor(o)),p+=(g-p-o*(f-l))*h,s=o*(1-l),a&&(p=Math.round(p),s=Math.round(s));var m=Pf(f).map(function(v){return p+o*v});return n(d?m.reverse():m)}return t.domain=function(f){return arguments.length?(e(f),u()):e()},t.range=function(f){return arguments.length?([i,r]=f,i=+i,r=+r,u()):[i,r]},t.rangeRound=function(f){return[i,r]=f,i=+i,r=+r,a=!0,u()},t.bandwidth=function(){return s},t.step=function(){return o},t.round=function(f){return arguments.length?(a=!!f,u()):a},t.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),u()):l},t.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),u()):l},t.paddingOuter=function(f){return arguments.length?(c=+f,u()):c},t.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),u()):h},t.copy=function(){return fo(e(),[i,r]).round(a).paddingInner(l).paddingOuter(c).align(h)},At.apply(u(),arguments)}function xc(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return xc(e())},t}function Sp(){return xc(fo.apply(null,arguments).paddingInner(1))}const po=t=>()=>t;function Tp(t,e){return function(n){return t+n*e}}function Cp(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}function Mp(t){return(t=+t)==1?bc:function(e,n){return n-e?Cp(e,n,t):po(isNaN(e)?n:e)}}function bc(t,e){var n=e-t;return n?Tp(t,n):po(isNaN(t)?e:t)}const vi=(function t(e){var n=Mp(e);function i(r,o){var s=n((r=Er(r)).r,(o=Er(o)).r),a=n(r.g,o.g),l=n(r.b,o.b),c=bc(r.opacity,o.opacity);return function(h){return r.r=s(h),r.g=a(h),r.b=l(h),r.opacity=c(h),r+""}}return i.gamma=t,i})(1);function Ap(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,i=e.slice(),r;return function(o){for(r=0;r<n;++r)i[r]=t[r]*(1-o)+e[r]*o;return i}}function $p(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Dp(t,e){var n=e?e.length:0,i=t?Math.min(n,t.length):0,r=new Array(i),o=new Array(n),s;for(s=0;s<i;++s)r[s]=Ke(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(a){for(s=0;s<i;++s)o[s]=r[s](a);return o}}function Ep(t,e){var n=new Date;return t=+t,e=+e,function(i){return n.setTime(t*(1-i)+e*i),n}}function Ct(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Np(t,e){var n={},i={},r;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(r in e)r in t?n[r]=Ke(t[r],e[r]):i[r]=e[r];return function(o){for(r in n)i[r]=n[r](o);return i}}var Nr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ar=new RegExp(Nr.source,"g");function Pp(t){return function(){return t}}function Fp(t){return function(e){return t(e)+""}}function wc(t,e){var n=Nr.lastIndex=ar.lastIndex=0,i,r,o,s=-1,a=[],l=[];for(t=t+"",e=e+"";(i=Nr.exec(t))&&(r=ar.exec(e));)(o=r.index)>n&&(o=e.slice(n,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Ct(i,r)})),n=ar.lastIndex;return n<e.length&&(o=e.slice(n),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?Fp(l[0].x):Pp(e):(e=l.length,function(c){for(var h=0,u;h<e;++h)a[(u=l[h]).i]=u.x(c);return a.join("")})}function Ke(t,e){var n=typeof e,i;return e==null||n==="boolean"?po(e):(n==="number"?Ct:n==="string"?(i=Qt(e))?(e=i,vi):wc:e instanceof Qt?vi:e instanceof Date?Ep:$p(e)?Ap:Array.isArray(e)?Dp:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Np:Ct)(t,e)}function go(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var As=180/Math.PI,Pr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function kc(t,e,n,i,r,o){var s,a,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i<e*n&&(t=-t,e=-e,l=-l,s=-s),{translateX:r,translateY:o,rotate:Math.atan2(e,t)*As,skewX:Math.atan(l)*As,scaleX:s,scaleY:a}}var Vn;function Op(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Pr:kc(e.a,e.b,e.c,e.d,e.e,e.f)}function Rp(t){return t==null||(Vn||(Vn=document.createElementNS("http://www.w3.org/2000/svg","g")),Vn.setAttribute("transform",t),!(t=Vn.transform.baseVal.consolidate()))?Pr:(t=t.matrix,kc(t.a,t.b,t.c,t.d,t.e,t.f))}function Sc(t,e,n,i){function r(c){return c.length?c.pop()+" ":""}function o(c,h,u,f,d,p){if(c!==u||h!==f){var g=d.push("translate(",null,e,null,n);p.push({i:g-4,x:Ct(c,u)},{i:g-2,x:Ct(h,f)})}else(u||f)&&d.push("translate("+u+e+f+n)}function s(c,h,u,f){c!==h?(c-h>180?h+=360:h-c>180&&(c+=360),f.push({i:u.push(r(u)+"rotate(",null,i)-2,x:Ct(c,h)})):h&&u.push(r(u)+"rotate("+h+i)}function a(c,h,u,f){c!==h?f.push({i:u.push(r(u)+"skewX(",null,i)-2,x:Ct(c,h)}):h&&u.push(r(u)+"skewX("+h+i)}function l(c,h,u,f,d,p){if(c!==u||h!==f){var g=d.push(r(d)+"scale(",null,",",null,")");p.push({i:g-4,x:Ct(c,u)},{i:g-2,x:Ct(h,f)})}else(u!==1||f!==1)&&d.push(r(d)+"scale("+u+","+f+")")}return function(c,h){var u=[],f=[];return c=t(c),h=t(h),o(c.translateX,c.translateY,h.translateX,h.translateY,u,f),s(c.rotate,h.rotate,u,f),a(c.skewX,h.skewX,u,f),l(c.scaleX,c.scaleY,h.scaleX,h.scaleY,u,f),c=h=null,function(d){for(var p=-1,g=f.length,m;++p<g;)u[(m=f[p]).i]=m.x(d);return u.join("")}}}var Ip=Sc(Op,"px, ","px)","deg)"),Lp=Sc(Rp,", ",")",")");function zp(t,e){e===void 0&&(e=t,t=Ke);for(var n=0,i=e.length-1,r=e[0],o=new Array(i<0?0:i);n<i;)o[n]=t(r,r=e[++n]);return function(s){var a=Math.max(0,Math.min(i-1,Math.floor(s*=i)));return o[a](s-a)}}function Bp(t){return function(){return t}}function Fr(t){return+t}var $s=[0,1];function lt(t){return t}function Or(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Bp(isNaN(e)?NaN:.5)}function Up(t,e){var n;return t>e&&(n=t,t=e,e=n),function(i){return Math.max(t,Math.min(e,i))}}function Wp(t,e,n){var i=t[0],r=t[1],o=e[0],s=e[1];return r<i?(i=Or(r,i),o=n(s,o)):(i=Or(i,r),o=n(o,s)),function(a){return o(i(a))}}function Hp(t,e,n){var i=Math.min(t.length,e.length)-1,r=new Array(i),o=new Array(i),s=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<i;)r[s]=Or(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(a){var l=Dn(t,a,1,i)-1;return o[l](r[l](a))}}function Pn(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Wi(){var t=$s,e=$s,n=Ke,i,r,o,s=lt,a,l,c;function h(){var f=Math.min(t.length,e.length);return s!==lt&&(s=Up(t[0],t[f-1])),a=f>2?Hp:Wp,l=c=null,u}function u(f){return f==null||isNaN(f=+f)?o:(l||(l=a(t.map(i),e,n)))(i(s(f)))}return u.invert=function(f){return s(r((c||(c=a(e,t.map(i),Ct)))(f)))},u.domain=function(f){return arguments.length?(t=Array.from(f,Fr),h()):t.slice()},u.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},u.rangeRound=function(f){return e=Array.from(f),n=go,h()},u.clamp=function(f){return arguments.length?(s=f?!0:lt,h()):s!==lt},u.interpolate=function(f){return arguments.length?(n=f,h()):n},u.unknown=function(f){return arguments.length?(o=f,u):o},function(f,d){return i=f,r=d,h()}}function Tc(){return Wi()(lt,lt)}function Vp(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function xi(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function ze(t){return t=xi(Math.abs(t)),t?t[1]:NaN}function Yp(t,e){return function(n,i){for(var r=n.length,o=[],s=0,a=t[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(n.substring(r-=a,r+a)),!((l+=a+1)>i));)a=t[s=(s+1)%t.length];return o.reverse().join(e)}}function Xp(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var Gp=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Tn(t){if(!(e=Gp.exec(t)))throw new Error("invalid format: "+t);var e;return new mo({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}Tn.prototype=mo.prototype;function mo(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}mo.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function jp(t){t:for(var e=t.length,n=1,i=-1,r;n<e;++n)switch(t[n]){case".":i=r=n;break;case"0":i===0&&(i=n),r=n;break;default:if(!+t[n])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(r+1):t}var bi;function qp(t,e){var n=xi(t,e);if(!n)return bi=void 0,t.toPrecision(e);var i=n[0],r=n[1],o=r-(bi=Math.max(-8,Math.min(8,Math.floor(r/3)))*3)+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+xi(t,Math.max(0,e+o-1))[0]}function Ds(t,e){var n=xi(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}const Es={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Vp,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Ds(t*100,e),r:Ds,s:qp,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Ns(t){return t}var Ps=Array.prototype.map,Fs=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Kp(t){var e=t.grouping===void 0||t.thousands===void 0?Ns:Yp(Ps.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",r=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Ns:Xp(Ps.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",a=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function c(u,f){u=Tn(u);var d=u.fill,p=u.align,g=u.sign,m=u.symbol,v=u.zero,y=u.width,x=u.comma,_=u.precision,b=u.trim,w=u.type;w==="n"?(x=!0,w="g"):Es[w]||(_===void 0&&(_=12),b=!0,w="g"),(v||d==="0"&&p==="=")&&(v=!0,d="0",p="=");var S=(f&&f.prefix!==void 0?f.prefix:"")+(m==="$"?n:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():""),A=(m==="$"?i:/[%p]/.test(w)?s:"")+(f&&f.suffix!==void 0?f.suffix:""),$=Es[w],V=/[defgprs%]/.test(w);_=_===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function B(M){var D=S,G=A,Dt,Rn,ve;if(w==="c")G=$(M)+G,M="";else{M=+M;var xe=M<0||1/M<0;if(M=isNaN(M)?l:$(Math.abs(M),_),b&&(M=jp(M)),xe&&+M==0&&g!=="+"&&(xe=!1),D=(xe?g==="("?g:a:g==="-"||g==="("?"":g)+D,G=(w==="s"&&!isNaN(M)&&bi!==void 0?Fs[8+bi/3]:"")+G+(xe&&g==="("?")":""),V){for(Dt=-1,Rn=M.length;++Dt<Rn;)if(ve=M.charCodeAt(Dt),48>ve||ve>57){G=(ve===46?r+M.slice(Dt+1):M.slice(Dt))+G,M=M.slice(0,Dt);break}}}x&&!v&&(M=e(M,1/0));var be=D.length+M.length+G.length,Tt=be<y?new Array(y-be+1).join(d):"";switch(x&&v&&(M=e(Tt+M,Tt.length?y-G.length:1/0),Tt=""),p){case"<":M=D+M+G+Tt;break;case"=":M=D+Tt+M+G;break;case"^":M=Tt.slice(0,be=Tt.length>>1)+D+M+G+Tt.slice(be);break;default:M=Tt+D+M+G;break}return o(M)}return B.toString=function(){return u+""},B}function h(u,f){var d=Math.max(-8,Math.min(8,Math.floor(ze(f)/3)))*3,p=Math.pow(10,-d),g=c((u=Tn(u),u.type="f",u),{suffix:Fs[8+d/3]});return function(m){return g(p*m)}}return{format:c,formatPrefix:h}}var Yn,_o,Cc;Zp({thousands:",",grouping:[3],currency:["$",""]});function Zp(t){return Yn=Kp(t),_o=Yn.format,Cc=Yn.formatPrefix,Yn}function Qp(t){return Math.max(0,-ze(Math.abs(t)))}function Jp(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ze(e)/3)))*3-ze(Math.abs(t)))}function tg(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ze(e)-ze(t))+1}function eg(t,e,n,i){var r=wr(t,e,n),o;switch(i=Tn(i??",f"),i.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(o=Jp(r,s))&&(i.precision=o),Cc(i,s)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(o=tg(r,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=o-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(o=Qp(r))&&(i.precision=o-(i.type==="%")*2);break}}return _o(i)}function ge(t){var e=t.domain;return t.ticks=function(n){var i=e();return xr(i[0],i[i.length-1],n??10)},t.tickFormat=function(n,i){var r=e();return eg(r[0],r[r.length-1],n??10,i)},t.nice=function(n){n==null&&(n=10);var i=e(),r=0,o=i.length-1,s=i[r],a=i[o],l,c,h=10;for(a<s&&(c=s,s=a,a=c,c=r,r=o,o=c);h-- >0;){if(c=br(s,a,n),c===l)return i[r]=s,i[o]=a,e(i);if(c>0)s=Math.floor(s/c)*c,a=Math.ceil(a/c)*c;else if(c<0)s=Math.ceil(s*c)/c,a=Math.floor(a*c)/c;else break;l=c}return t},t}function Mc(){var t=Tc();return t.copy=function(){return Pn(t,Mc())},At.apply(t,arguments),ge(t)}function Ac(t){var e;function n(i){return i==null||isNaN(i=+i)?e:i}return n.invert=n,n.domain=n.range=function(i){return arguments.length?(t=Array.from(i,Fr),n):t.slice()},n.unknown=function(i){return arguments.length?(e=i,n):e},n.copy=function(){return Ac(t).unknown(e)},t=arguments.length?Array.from(t,Fr):[0,1],ge(n)}function $c(t,e){t=t.slice();var n=0,i=t.length-1,r=t[n],o=t[i],s;return o<r&&(s=n,n=i,i=s,s=r,r=o,o=s),t[n]=e.floor(r),t[i]=e.ceil(o),t}function Os(t){return Math.log(t)}function Rs(t){return Math.exp(t)}function ng(t){return-Math.log(-t)}function ig(t){return-Math.exp(-t)}function rg(t){return isFinite(t)?+("1e"+t):t<0?0:t}function og(t){return t===10?rg:t===Math.E?Math.exp:e=>Math.pow(t,e)}function sg(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Is(t){return(e,n)=>-t(-e,n)}function ag(t){const e=t(Os,Rs),n=e.domain;let i=10,r,o;function s(){return r=sg(i),o=og(i),n()[0]<0?(r=Is(r),o=Is(o),t(ng,ig)):t(Os,Rs),e}return e.base=function(a){return arguments.length?(i=+a,s()):i},e.domain=function(a){return arguments.length?(n(a),s()):n()},e.ticks=a=>{const l=n();let c=l[0],h=l[l.length-1];const u=h<c;u&&([c,h]=[h,c]);let f=r(c),d=r(h),p,g;const m=a==null?10:+a;let v=[];if(!(i%1)&&d-f<m){if(f=Math.floor(f),d=Math.ceil(d),c>0){for(;f<=d;++f)for(p=1;p<i;++p)if(g=f<0?p/o(-f):p*o(f),!(g<c)){if(g>h)break;v.push(g)}}else for(;f<=d;++f)for(p=i-1;p>=1;--p)if(g=f>0?p/o(-f):p*o(f),!(g<c)){if(g>h)break;v.push(g)}v.length*2<m&&(v=xr(c,h,m))}else v=xr(f,d,Math.min(d-f,m)).map(o);return u?v.reverse():v},e.tickFormat=(a,l)=>{if(a==null&&(a=10),l==null&&(l=i===10?"s":","),typeof l!="function"&&(!(i%1)&&(l=Tn(l)).precision==null&&(l.trim=!0),l=_o(l)),a===1/0)return l;const c=Math.max(1,i*a/e.ticks().length);return h=>{let u=h/o(Math.round(r(h)));return u*i<i-.5&&(u*=i),u<=c?l(h):""}},e.nice=()=>n($c(n(),{floor:a=>o(Math.floor(r(a))),ceil:a=>o(Math.ceil(r(a)))})),e}function Dc(){const t=ag(Wi()).domain([1,10]);return t.copy=()=>Pn(t,Dc()).base(t.base()),At.apply(t,arguments),t}function Ls(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function zs(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function cg(t){var e=1,n=t(Ls(e),zs(e));return n.constant=function(i){return arguments.length?t(Ls(e=+i),zs(e)):e},ge(n)}function Ec(){var t=cg(Wi());return t.copy=function(){return Pn(t,Ec()).constant(t.constant())},At.apply(t,arguments)}function Bs(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function lg(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function ug(t){return t<0?-t*t:t*t}function hg(t){var e=t(lt,lt),n=1;function i(){return n===1?t(lt,lt):n===.5?t(lg,ug):t(Bs(n),Bs(1/n))}return e.exponent=function(r){return arguments.length?(n=+r,i()):n},ge(e)}function yo(){var t=hg(Wi());return t.copy=function(){return Pn(t,yo()).exponent(t.exponent())},At.apply(t,arguments),t}function fg(){return yo.apply(null,arguments).exponent(.5)}function Nc(){var t=[],e=[],n=[],i;function r(){var s=0,a=Math.max(1,e.length);for(n=new Array(a-1);++s<a;)n[s-1]=$f(t,s/a);return o}function o(s){return s==null||isNaN(s=+s)?i:e[Dn(n,s)]}return o.invertExtent=function(s){var a=e.indexOf(s);return a<0?[NaN,NaN]:[a>0?n[a-1]:t[0],a<n.length?n[a]:t[t.length-1]]},o.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let a of s)a!=null&&!isNaN(a=+a)&&t.push(a);return t.sort(Zt),r()},o.range=function(s){return arguments.length?(e=Array.from(s),r()):e.slice()},o.unknown=function(s){return arguments.length?(i=s,o):i},o.quantiles=function(){return n.slice()},o.copy=function(){return Nc().domain(t).range(e).unknown(i)},At.apply(o,arguments)}function Pc(){var t=0,e=1,n=1,i=[.5],r=[0,1],o;function s(l){return l!=null&&l<=l?r[Dn(i,l,0,n)]:o}function a(){var l=-1;for(i=new Array(n);++l<n;)i[l]=((l+1)*e-(l-n)*t)/(n+1);return s}return s.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,a()):[t,e]},s.range=function(l){return arguments.length?(n=(r=Array.from(l)).length-1,a()):r.slice()},s.invertExtent=function(l){var c=r.indexOf(l);return c<0?[NaN,NaN]:c<1?[t,i[0]]:c>=n?[i[n-1],e]:[i[c-1],i[c]]},s.unknown=function(l){return arguments.length&&(o=l),s},s.thresholds=function(){return i.slice()},s.copy=function(){return Pc().domain([t,e]).range(r).unknown(o)},At.apply(ge(s),arguments)}function Fc(){var t=[.5],e=[0,1],n,i=1;function r(o){return o!=null&&o<=o?e[Dn(t,o,0,i)]:n}return r.domain=function(o){return arguments.length?(t=Array.from(o),i=Math.min(t.length,e.length-1),r):t.slice()},r.range=function(o){return arguments.length?(e=Array.from(o),i=Math.min(t.length,e.length-1),r):e.slice()},r.invertExtent=function(o){var s=e.indexOf(o);return[t[s-1],t[s]]},r.unknown=function(o){return arguments.length?(n=o,r):n},r.copy=function(){return Fc().domain(t).range(e).unknown(n)},At.apply(r,arguments)}const cr=new Date,lr=new Date;function tt(t,e,n,i){function r(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return r.floor=o=>(t(o=new Date(+o)),o),r.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),r.round=o=>{const s=r(o),a=r.ceil(o);return o-s<a-o?s:a},r.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),r.range=(o,s,a)=>{const l=[];if(o=r.ceil(o),a=a==null?1:Math.floor(a),!(o<s)||!(a>0))return l;let c;do l.push(c=new Date(+o)),e(o,a),t(o);while(c<o&&o<s);return l},r.filter=o=>tt(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,a)=>{if(s>=s)if(a<0)for(;++a<=0;)for(;e(s,-1),!o(s););else for(;--a>=0;)for(;e(s,1),!o(s););}),n&&(r.count=(o,s)=>(cr.setTime(+o),lr.setTime(+s),t(cr),t(lr),Math.floor(n(cr,lr))),r.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?r.filter(i?s=>i(s)%o===0:s=>r.count(0,s)%o===0):r)),r}const wi=tt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);wi.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?tt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):wi);wi.range;const zt=1e3,bt=zt*60,Bt=bt*60,Vt=Bt*24,vo=Vt*7,Us=Vt*30,ur=Vt*365,re=tt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*zt)},(t,e)=>(e-t)/zt,t=>t.getUTCSeconds());re.range;const xo=tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*zt)},(t,e)=>{t.setTime(+t+e*bt)},(t,e)=>(e-t)/bt,t=>t.getMinutes());xo.range;const bo=tt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*bt)},(t,e)=>(e-t)/bt,t=>t.getUTCMinutes());bo.range;const wo=tt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*zt-t.getMinutes()*bt)},(t,e)=>{t.setTime(+t+e*Bt)},(t,e)=>(e-t)/Bt,t=>t.getHours());wo.range;const ko=tt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Bt)},(t,e)=>(e-t)/Bt,t=>t.getUTCHours());ko.range;const Fn=tt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*bt)/Vt,t=>t.getDate()-1);Fn.range;const Hi=tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Vt,t=>t.getUTCDate()-1);Hi.range;const Oc=tt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Vt,t=>Math.floor(t/Vt));Oc.range;function me(t){return tt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*bt)/vo)}const Vi=me(0),ki=me(1),dg=me(2),pg=me(3),Be=me(4),gg=me(5),mg=me(6);Vi.range;ki.range;dg.range;pg.range;Be.range;gg.range;mg.range;function _e(t){return tt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/vo)}const Yi=_e(0),Si=_e(1),_g=_e(2),yg=_e(3),Ue=_e(4),vg=_e(5),xg=_e(6);Yi.range;Si.range;_g.range;yg.range;Ue.range;vg.range;xg.range;const So=tt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());So.range;const To=tt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());To.range;const Yt=tt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Yt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:tt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});Yt.range;const Xt=tt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Xt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:tt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});Xt.range;function Rc(t,e,n,i,r,o){const s=[[re,1,zt],[re,5,5*zt],[re,15,15*zt],[re,30,30*zt],[o,1,bt],[o,5,5*bt],[o,15,15*bt],[o,30,30*bt],[r,1,Bt],[r,3,3*Bt],[r,6,6*Bt],[r,12,12*Bt],[i,1,Vt],[i,2,2*Vt],[n,1,vo],[e,1,Us],[e,3,3*Us],[t,1,ur]];function a(c,h,u){const f=h<c;f&&([c,h]=[h,c]);const d=u&&typeof u.range=="function"?u:l(c,h,u),p=d?d.range(c,+h+1):[];return f?p.reverse():p}function l(c,h,u){const f=Math.abs(h-c)/u,d=ro(([,,m])=>m).right(s,f);if(d===s.length)return t.every(wr(c/ur,h/ur,u));if(d===0)return wi.every(Math.max(wr(c,h,u),1));const[p,g]=s[f/s[d-1][2]<s[d][2]/f?d-1:d];return p.every(g)}return[a,l]}const[bg,wg]=Rc(Xt,To,Yi,Oc,ko,bo),[kg,Sg]=Rc(Yt,So,Vi,Fn,wo,xo);function hr(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function fr(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function rn(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Tg(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,s=t.shortDays,a=t.months,l=t.shortMonths,c=on(r),h=sn(r),u=on(o),f=sn(o),d=on(s),p=sn(s),g=on(a),m=sn(a),v=on(l),y=sn(l),x={a:ve,A:xe,b:be,B:Tt,c:null,d:Gs,e:Gs,f:jg,g:r0,G:s0,H:Yg,I:Xg,j:Gg,L:Ic,m:qg,M:Kg,p:nu,q:iu,Q:Ks,s:Zs,S:Zg,u:Qg,U:Jg,V:t0,w:e0,W:n0,x:null,X:null,y:i0,Y:o0,Z:a0,"%":qs},_={a:ru,A:ou,b:su,B:au,c:null,d:js,e:js,f:h0,g:b0,G:k0,H:c0,I:l0,j:u0,L:zc,m:f0,M:d0,p:cu,q:lu,Q:Ks,s:Zs,S:p0,u:g0,U:m0,V:_0,w:y0,W:v0,x:null,X:null,y:x0,Y:w0,Z:S0,"%":qs},b={a:V,A:B,b:M,B:D,c:G,d:Ys,e:Ys,f:Ug,g:Vs,G:Hs,H:Xs,I:Xs,j:Ig,L:Bg,m:Rg,M:Lg,p:$,q:Og,Q:Hg,s:Vg,S:zg,u:Dg,U:Eg,V:Ng,w:$g,W:Pg,x:Dt,X:Rn,y:Vs,Y:Hs,Z:Fg,"%":Wg};x.x=w(n,x),x.X=w(i,x),x.c=w(e,x),_.x=w(n,_),_.X=w(i,_),_.c=w(e,_);function w(T,E){return function(O){var k=[],at=-1,H=0,dt=T.length,pt,ee,Go;for(O instanceof Date||(O=new Date(+O));++at<dt;)T.charCodeAt(at)===37&&(k.push(T.slice(H,at)),(ee=Ws[pt=T.charAt(++at)])!=null?pt=T.charAt(++at):ee=pt==="e"?" ":"0",(Go=E[pt])&&(pt=Go(O,ee)),k.push(pt),H=at+1);return k.push(T.slice(H,at)),k.join("")}}function S(T,E){return function(O){var k=rn(1900,void 0,1),at=A(k,T,O+="",0),H,dt;if(at!=O.length)return null;if("Q"in k)return new Date(k.Q);if("s"in k)return new Date(k.s*1e3+("L"in k?k.L:0));if(E&&!("Z"in k)&&(k.Z=0),"p"in k&&(k.H=k.H%12+k.p*12),k.m===void 0&&(k.m="q"in k?k.q:0),"V"in k){if(k.V<1||k.V>53)return null;"w"in k||(k.w=1),"Z"in k?(H=fr(rn(k.y,0,1)),dt=H.getUTCDay(),H=dt>4||dt===0?Si.ceil(H):Si(H),H=Hi.offset(H,(k.V-1)*7),k.y=H.getUTCFullYear(),k.m=H.getUTCMonth(),k.d=H.getUTCDate()+(k.w+6)%7):(H=hr(rn(k.y,0,1)),dt=H.getDay(),H=dt>4||dt===0?ki.ceil(H):ki(H),H=Fn.offset(H,(k.V-1)*7),k.y=H.getFullYear(),k.m=H.getMonth(),k.d=H.getDate()+(k.w+6)%7)}else("W"in k||"U"in k)&&("w"in k||(k.w="u"in k?k.u%7:"W"in k?1:0),dt="Z"in k?fr(rn(k.y,0,1)).getUTCDay():hr(rn(k.y,0,1)).getDay(),k.m=0,k.d="W"in k?(k.w+6)%7+k.W*7-(dt+5)%7:k.w+k.U*7-(dt+6)%7);return"Z"in k?(k.H+=k.Z/100|0,k.M+=k.Z%100,fr(k)):hr(k)}}function A(T,E,O,k){for(var at=0,H=E.length,dt=O.length,pt,ee;at<H;){if(k>=dt)return-1;if(pt=E.charCodeAt(at++),pt===37){if(pt=E.charAt(at++),ee=b[pt in Ws?E.charAt(at++):pt],!ee||(k=ee(T,O,k))<0)return-1}else if(pt!=O.charCodeAt(k++))return-1}return k}function $(T,E,O){var k=c.exec(E.slice(O));return k?(T.p=h.get(k[0].toLowerCase()),O+k[0].length):-1}function V(T,E,O){var k=d.exec(E.slice(O));return k?(T.w=p.get(k[0].toLowerCase()),O+k[0].length):-1}function B(T,E,O){var k=u.exec(E.slice(O));return k?(T.w=f.get(k[0].toLowerCase()),O+k[0].length):-1}function M(T,E,O){var k=v.exec(E.slice(O));return k?(T.m=y.get(k[0].toLowerCase()),O+k[0].length):-1}function D(T,E,O){var k=g.exec(E.slice(O));return k?(T.m=m.get(k[0].toLowerCase()),O+k[0].length):-1}function G(T,E,O){return A(T,e,E,O)}function Dt(T,E,O){return A(T,n,E,O)}function Rn(T,E,O){return A(T,i,E,O)}function ve(T){return s[T.getDay()]}function xe(T){return o[T.getDay()]}function be(T){return l[T.getMonth()]}function Tt(T){return a[T.getMonth()]}function nu(T){return r[+(T.getHours()>=12)]}function iu(T){return 1+~~(T.getMonth()/3)}function ru(T){return s[T.getUTCDay()]}function ou(T){return o[T.getUTCDay()]}function su(T){return l[T.getUTCMonth()]}function au(T){return a[T.getUTCMonth()]}function cu(T){return r[+(T.getUTCHours()>=12)]}function lu(T){return 1+~~(T.getUTCMonth()/3)}return{format:function(T){var E=w(T+="",x);return E.toString=function(){return T},E},parse:function(T){var E=S(T+="",!1);return E.toString=function(){return T},E},utcFormat:function(T){var E=w(T+="",_);return E.toString=function(){return T},E},utcParse:function(T){var E=S(T+="",!0);return E.toString=function(){return T},E}}}var Ws={"-":"",_:" ",0:"0"},it=/^\s*\d+/,Cg=/^%/,Mg=/[\\^$*+?|[\]().{}]/g;function R(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<n?new Array(n-o+1).join(e)+r:r)}function Ag(t){return t.replace(Mg,"\\$&")}function on(t){return new RegExp("^(?:"+t.map(Ag).join("|")+")","i")}function sn(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function $g(t,e,n){var i=it.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function Dg(t,e,n){var i=it.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function Eg(t,e,n){var i=it.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function Ng(t,e,n){var i=it.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function Pg(t,e,n){var i=it.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function Hs(t,e,n){var i=it.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function Vs(t,e,n){var i=it.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function Fg(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function Og(t,e,n){var i=it.exec(e.slice(n,n+1));return i?(t.q=i[0]*3-3,n+i[0].length):-1}function Rg(t,e,n){var i=it.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function Ys(t,e,n){var i=it.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function Ig(t,e,n){var i=it.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function Xs(t,e,n){var i=it.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function Lg(t,e,n){var i=it.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function zg(t,e,n){var i=it.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function Bg(t,e,n){var i=it.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function Ug(t,e,n){var i=it.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function Wg(t,e,n){var i=Cg.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function Hg(t,e,n){var i=it.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function Vg(t,e,n){var i=it.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function Gs(t,e){return R(t.getDate(),e,2)}function Yg(t,e){return R(t.getHours(),e,2)}function Xg(t,e){return R(t.getHours()%12||12,e,2)}function Gg(t,e){return R(1+Fn.count(Yt(t),t),e,3)}function Ic(t,e){return R(t.getMilliseconds(),e,3)}function jg(t,e){return Ic(t,e)+"000"}function qg(t,e){return R(t.getMonth()+1,e,2)}function Kg(t,e){return R(t.getMinutes(),e,2)}function Zg(t,e){return R(t.getSeconds(),e,2)}function Qg(t){var e=t.getDay();return e===0?7:e}function Jg(t,e){return R(Vi.count(Yt(t)-1,t),e,2)}function Lc(t){var e=t.getDay();return e>=4||e===0?Be(t):Be.ceil(t)}function t0(t,e){return t=Lc(t),R(Be.count(Yt(t),t)+(Yt(t).getDay()===4),e,2)}function e0(t){return t.getDay()}function n0(t,e){return R(ki.count(Yt(t)-1,t),e,2)}function i0(t,e){return R(t.getFullYear()%100,e,2)}function r0(t,e){return t=Lc(t),R(t.getFullYear()%100,e,2)}function o0(t,e){return R(t.getFullYear()%1e4,e,4)}function s0(t,e){var n=t.getDay();return t=n>=4||n===0?Be(t):Be.ceil(t),R(t.getFullYear()%1e4,e,4)}function a0(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+R(e/60|0,"0",2)+R(e%60,"0",2)}function js(t,e){return R(t.getUTCDate(),e,2)}function c0(t,e){return R(t.getUTCHours(),e,2)}function l0(t,e){return R(t.getUTCHours()%12||12,e,2)}function u0(t,e){return R(1+Hi.count(Xt(t),t),e,3)}function zc(t,e){return R(t.getUTCMilliseconds(),e,3)}function h0(t,e){return zc(t,e)+"000"}function f0(t,e){return R(t.getUTCMonth()+1,e,2)}function d0(t,e){return R(t.getUTCMinutes(),e,2)}function p0(t,e){return R(t.getUTCSeconds(),e,2)}function g0(t){var e=t.getUTCDay();return e===0?7:e}function m0(t,e){return R(Yi.count(Xt(t)-1,t),e,2)}function Bc(t){var e=t.getUTCDay();return e>=4||e===0?Ue(t):Ue.ceil(t)}function _0(t,e){return t=Bc(t),R(Ue.count(Xt(t),t)+(Xt(t).getUTCDay()===4),e,2)}function y0(t){return t.getUTCDay()}function v0(t,e){return R(Si.count(Xt(t)-1,t),e,2)}function x0(t,e){return R(t.getUTCFullYear()%100,e,2)}function b0(t,e){return t=Bc(t),R(t.getUTCFullYear()%100,e,2)}function w0(t,e){return R(t.getUTCFullYear()%1e4,e,4)}function k0(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ue(t):Ue.ceil(t),R(t.getUTCFullYear()%1e4,e,4)}function S0(){return"+0000"}function qs(){return"%"}function Ks(t){return+t}function Zs(t){return Math.floor(+t/1e3)}var ke,Uc,Wc;T0({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function T0(t){return ke=Tg(t),Uc=ke.format,ke.parse,Wc=ke.utcFormat,ke.utcParse,ke}function C0(t){return new Date(t)}function M0(t){return t instanceof Date?+t:+new Date(+t)}function Co(t,e,n,i,r,o,s,a,l,c){var h=Tc(),u=h.invert,f=h.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),y=c("%b %d"),x=c("%B"),_=c("%Y");function b(w){return(l(w)<w?d:a(w)<w?p:s(w)<w?g:o(w)<w?m:i(w)<w?r(w)<w?v:y:n(w)<w?x:_)(w)}return h.invert=function(w){return new Date(u(w))},h.domain=function(w){return arguments.length?f(Array.from(w,M0)):f().map(C0)},h.ticks=function(w){var S=f();return t(S[0],S[S.length-1],w??10)},h.tickFormat=function(w,S){return S==null?b:c(S)},h.nice=function(w){var S=f();return(!w||typeof w.range!="function")&&(w=e(S[0],S[S.length-1],w??10)),w?f($c(S,w)):h},h.copy=function(){return Pn(h,Co(t,e,n,i,r,o,s,a,l,c))},h}function A0(){return At.apply(Co(kg,Sg,Yt,So,Vi,Fn,wo,xo,re,Uc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function $0(){return At.apply(Co(bg,wg,Xt,To,Yi,Hi,ko,bo,re,Wc).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function D0(){var t=0,e=1,n,i,r,o,s=lt,a=!1,l;function c(u){return u==null||isNaN(u=+u)?l:s(r===0?.5:(u=(o(u)-n)*r,a?Math.max(0,Math.min(1,u)):u))}c.domain=function(u){return arguments.length?([t,e]=u,n=o(t=+t),i=o(e=+e),r=n===i?0:1/(i-n),c):[t,e]},c.clamp=function(u){return arguments.length?(a=!!u,c):a},c.interpolator=function(u){return arguments.length?(s=u,c):s};function h(u){return function(f){var d,p;return arguments.length?([d,p]=f,s=u(d,p),c):[s(0),s(1)]}}return c.range=h(Ke),c.rangeRound=h(go),c.unknown=function(u){return arguments.length?(l=u,c):l},function(u){return o=u,n=u(t),i=u(e),r=n===i?0:1/(i-n),c}}function Hc(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Vc(){var t=ge(D0()(lt));return t.copy=function(){return Hc(t,Vc())},vc.apply(t,arguments)}function E0(){var t=0,e=.5,n=1,i=1,r,o,s,a,l,c=lt,h,u=!1,f;function d(g){return isNaN(g=+g)?f:(g=.5+((g=+h(g))-o)*(i*g<i*o?a:l),c(u?Math.max(0,Math.min(1,g)):g))}d.domain=function(g){return arguments.length?([t,e,n]=g,r=h(t=+t),o=h(e=+e),s=h(n=+n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,d):[t,e,n]},d.clamp=function(g){return arguments.length?(u=!!g,d):u},d.interpolator=function(g){return arguments.length?(c=g,d):c};function p(g){return function(m){var v,y,x;return arguments.length?([v,y,x]=m,c=zp(g,[v,y,x]),d):[c(0),c(.5),c(1)]}}return d.range=p(Ke),d.rangeRound=p(go),d.unknown=function(g){return arguments.length?(f=g,d):f},function(g){return h=g,r=g(t),o=g(e),s=g(n),a=r===o?0:.5/(o-r),l=o===s?0:.5/(s-o),i=o<r?-1:1,d}}function Yc(){var t=ge(E0()(lt));return t.copy=function(){return Hc(t,Yc())},vc.apply(t,arguments)}const N0=Ui().range(Array.from({length:Kt.length},(t,e)=>`var(${gn(e)})`)).domain(Array.from({length:Kt.length},(t,e)=>e));function wt(t,e,n,i,r){if(Array.isArray(e)&&isFinite(n))return e[n%e.length];let o;if(ue(e)?o=e(t,n,i):o=e,o)return o;const s=r?.colorFn??N0;if(typeof i=="string"&&i)return s(i);const a=r?.dontFallbackToCssVar??i===!0;return st(n)&&!a?s(n%Kt.length):null}function P0(t,e){const n=Hf(t)?Ga(t,e):t;return Qt(n)?.formatHex()}const We="unovis-pattern-index",Qs="unovis-pattern-defs";function $e(t,e,n){const i=Xe(t,e,n);return i?yp(i):null}function Ti(t){return!t||!("svg"in t)?null:`url(#${mc(t.id)})`}let dr;function F0(){return dr===void 0&&(dr=typeof CSS<"u"&&!!CSS.supports?.("fill","context-stroke")),dr}function O0(t,e){return`${_c(t)}-${Wf(e.replace("#",""))}`}function R0(t){let e=t.querySelector(`defs.${Qs}`);return e||(e=document.createElementNS("http://www.w3.org/2000/svg","defs"),e.setAttribute("class",Qs),t.insertBefore(e,t.firstChild)),e}function Xc(t,e,n){if(!t||!("marker"in t))return null;const i=t.dashArray?.length?t.dashArray.join(" "):null;if(F0())return{marker:`url(#${yc(t.id)})`,dashArray:i};const r=(n instanceof SVGElement?n.ownerSVGElement:null)??n?.closest("svg");if(!r||!e)return{marker:null,dashArray:i};const o=P0(e,r)||e,s=O0(t.id,o),a=R0(r);return a.querySelector(`#${CSS.escape(s)}`)||a.appendChild(wp(t,s,o)),{marker:`url(#${s})`,dashArray:i}}const Gc=globalThis?.UNOVIS_FONT_W2H_RATIO_DEFAULT||.5,jc=globalThis?.UNOVIS_TEXT_SEPARATOR_DEFAULT||[" ","-",".",","],qc=globalThis?.UNOVIS_TEXT_HYPHEN_CHARACTER_DEFAULT||"-",Mo=globalThis?.UNOVIS_TEXT_DEFAULT_FONT_SIZE||12,ce=globalThis?.UNOVIS_TEXT_DEFAULT||{text:"",fontSize:Mo,fontFamily:"var(--vis-font-family)",lineHeight:1.25,marginTop:0,marginBottom:0};qe`
|
|
24
|
+
:root {
|
|
25
|
+
label: vis-root-styles;
|
|
26
|
+
--vis-font-family: Inter, Arial, "Helvetica Neue", Helvetica, sans-serif;
|
|
27
|
+
--vis-font-wh-ratio: ${Gc};
|
|
28
|
+
--vis-color-main: var(${gn(0)});
|
|
29
|
+
--vis-color-main-light: ${pp(Kt[0])};
|
|
30
|
+
--vis-color-main-dark: ${gp(Kt[0])};
|
|
31
|
+
--vis-color-grey: #2a2a2a;
|
|
32
|
+
${Kt.map((t,e)=>`${gn(e)}: ${t};`)}
|
|
33
|
+
${dp.map((t,e)=>`--vis-dark-color${e}: ${t};`)}
|
|
34
|
+
${yi.map((t,e)=>`
|
|
35
|
+
--${we(t)}: url(#${we(t)});
|
|
36
|
+
--vis-pattern-fill${e}: var(--${we(t)});
|
|
37
|
+
`)}
|
|
38
|
+
${Sn.map((t,e)=>`
|
|
39
|
+
--${we(t)}: url(#${we(t)});
|
|
40
|
+
--vis-pattern-marker${e}: var(--${we(t)});
|
|
41
|
+
--vis-pattern-dasharray${e}: ${t.dashArray?.join(" ")};
|
|
42
|
+
`)}
|
|
43
|
+
|
|
44
|
+
${Le} {
|
|
45
|
+
${Kt.map((t,e)=>`${gn(e)}: var(--vis-dark-color${e});`)}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
body.theme-patterns {
|
|
49
|
+
${yi.map((t,e)=>`path[${We}="${e}"][style*="fill"]:not([style*="mask"]) {
|
|
50
|
+
mask: var(--vis-pattern-fill${e});
|
|
51
|
+
}`)}
|
|
52
|
+
${Sn.map((t,e)=>`
|
|
53
|
+
path[${We}="${e}"]:not([style*="fill"]):not([style*="marker"]) {
|
|
54
|
+
marker: var(--vis-pattern-marker${e});
|
|
55
|
+
stroke-dasharray: var(--vis-pattern-dasharray${e});
|
|
56
|
+
}
|
|
57
|
+
`)}
|
|
58
|
+
}
|
|
59
|
+
`;function Ao(t=window?.document.body){return t?+Ga("var(--vis-font-wh-ratio)",t):Gc}var I0={value:()=>{}};function Kc(){for(var t=0,e=arguments.length,n={},i;t<e;++t){if(!(i=arguments[t]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Jn(n)}function Jn(t){this._=t}function L0(t,e){return t.trim().split(/^|\s+/).map(function(n){var i="",r=n.indexOf(".");if(r>=0&&(i=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Jn.prototype=Kc.prototype={constructor:Jn,on:function(t,e){var n=this._,i=L0(t+"",n),r,o=-1,s=i.length;if(arguments.length<2){for(;++o<s;)if((r=(t=i[o]).type)&&(r=z0(n[r],t.name)))return r;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(r=(t=i[o]).type)n[r]=Js(n[r],t.name,e);else if(e==null)for(r in n)n[r]=Js(n[r],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Jn(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var n=new Array(r),i=0,r,o;i<r;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],i=0,r=o.length;i<r;++i)o[i].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};function z0(t,e){for(var n=0,i=t.length,r;n<i;++n)if((r=t[n]).name===e)return r.value}function Js(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=I0,t=t.slice(0,i).concat(t.slice(i+1));break}return n!=null&&t.push({name:e,value:n}),t}var He=0,cn=0,an=0,Zc=1e3,Ci,ln,Mi=0,fe=0,Xi=0,Cn=typeof performance=="object"&&performance.now?performance:Date,Qc=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function $o(){return fe||(Qc(B0),fe=Cn.now()+Xi)}function B0(){fe=0}function Ai(){this._call=this._time=this._next=null}Ai.prototype=Jc.prototype={constructor:Ai,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?$o():+n)+(e==null?0:+e),!this._next&&ln!==this&&(ln?ln._next=this:Ci=this,ln=this),this._call=t,this._time=n,Rr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rr())}};function Jc(t,e,n){var i=new Ai;return i.restart(t,e,n),i}function U0(){$o(),++He;for(var t=Ci,e;t;)(e=fe-t._time)>=0&&t._call.call(void 0,e),t=t._next;--He}function ta(){fe=(Mi=Cn.now())+Xi,He=cn=0;try{U0()}finally{He=0,H0(),fe=0}}function W0(){var t=Cn.now(),e=t-Mi;e>Zc&&(Xi-=e,Mi=t)}function H0(){for(var t,e=Ci,n,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ci=n);ln=t,Rr(i)}function Rr(t){if(!He){cn&&(cn=clearTimeout(cn));var e=t-fe;e>24?(t<1/0&&(cn=setTimeout(ta,t-Cn.now()-Xi)),an&&(an=clearInterval(an))):(an||(Mi=Cn.now(),an=setInterval(W0,Zc)),He=1,Qc(ta))}}function ea(t,e,n){var i=new Ai;return e=e==null?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,n),i}var V0=Kc("start","end","cancel","interrupt"),Y0=[],tl=0,na=1,Ir=2,ti=3,ia=4,Lr=5,ei=6;function Gi(t,e,n,i,r,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;X0(t,n,{name:e,index:i,group:r,on:V0,tween:Y0,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:tl})}function Do(t,e){var n=$t(t,e);if(n.state>tl)throw new Error("too late; already scheduled");return n}function Ot(t,e){var n=$t(t,e);if(n.state>ti)throw new Error("too late; already running");return n}function $t(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function X0(t,e,n){var i=t.__transition,r;i[e]=n,n.timer=Jc(o,0,n.time);function o(c){n.state=na,n.timer.restart(s,n.delay,n.time),n.delay<=c&&s(c-n.delay)}function s(c){var h,u,f,d;if(n.state!==na)return l();for(h in i)if(d=i[h],d.name===n.name){if(d.state===ti)return ea(s);d.state===ia?(d.state=ei,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[h]):+h<e&&(d.state=ei,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[h])}if(ea(function(){n.state===ti&&(n.state=ia,n.timer.restart(a,n.delay,n.time),a(c))}),n.state=Ir,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Ir){for(n.state=ti,r=new Array(f=n.tween.length),h=0,u=-1;h<f;++h)(d=n.tween[h].value.call(t,t.__data__,n.index,n.group))&&(r[++u]=d);r.length=u+1}}function a(c){for(var h=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=Lr,1),u=-1,f=r.length;++u<f;)r[u].call(t,h);n.state===Lr&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){n.state=ei,n.timer.stop(),delete i[e];for(var c in i)return;delete t.__transition}}function Eo(t,e){var n=t.__transition,i,r,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((i=n[s]).name!==e){o=!1;continue}r=i.state>Ir&&i.state<Lr,i.state=ei,i.timer.stop(),i.on.call(r?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete n[s]}o&&delete t.__transition}}function G0(t){return this.each(function(){Eo(this,t)})}function j0(t,e){var n,i;return function(){var r=Ot(this,t),o=r.tween;if(o!==n){i=n=o;for(var s=0,a=i.length;s<a;++s)if(i[s].name===e){i=i.slice(),i.splice(s,1);break}}r.tween=i}}function q0(t,e,n){var i,r;if(typeof n!="function")throw new Error;return function(){var o=Ot(this,t),s=o.tween;if(s!==i){r=(i=s).slice();for(var a={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=a;break}l===c&&r.push(a)}o.tween=r}}function K0(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i=$t(this.node(),n).tween,r=0,o=i.length,s;r<o;++r)if((s=i[r]).name===t)return s.value;return null}return this.each((e==null?j0:q0)(n,t,e))}function No(t,e,n){var i=t._id;return t.each(function(){var r=Ot(this,i);(r.value||(r.value={}))[e]=n.apply(this,arguments)}),function(r){return $t(r,i).value[e]}}function el(t,e){var n;return(typeof e=="number"?Ct:e instanceof Qt?vi:(n=Qt(e))?(e=n,vi):wc)(t,e)}function Z0(t){return function(){this.removeAttribute(t)}}function Q0(t){return function(){this.removeAttributeNS(t.space,t.local)}}function J0(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttribute(t);return s===r?null:s===i?o:o=e(i=s,n)}}function tm(t,e,n){var i,r=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===r?null:s===i?o:o=e(i=s,n)}}function em(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function nm(t,e,n){var i,r,o;return function(){var s,a=n(this),l;return a==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=a+"",s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a)))}}function im(t,e){var n=Ii(t),i=n==="transform"?Lp:el;return this.attrTween(t,typeof e=="function"?(n.local?nm:em)(n,i,No(this,"attr."+t,e)):e==null?(n.local?Q0:Z0)(n):(n.local?tm:J0)(n,i,e))}function rm(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function om(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function sm(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&om(t,o)),n}return r._value=e,r}function am(t,e){var n,i;function r(){var o=e.apply(this,arguments);return o!==i&&(n=(i=o)&&rm(t,o)),n}return r._value=e,r}function cm(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var i=Ii(t);return this.tween(n,(i.local?sm:am)(i,e))}function lm(t,e){return function(){Do(this,t).delay=+e.apply(this,arguments)}}function um(t,e){return e=+e,function(){Do(this,t).delay=e}}function hm(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?lm:um)(e,t)):$t(this.node(),e).delay}function fm(t,e){return function(){Ot(this,t).duration=+e.apply(this,arguments)}}function dm(t,e){return e=+e,function(){Ot(this,t).duration=e}}function pm(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?fm:dm)(e,t)):$t(this.node(),e).duration}function gm(t,e){if(typeof e!="function")throw new Error;return function(){Ot(this,t).ease=e}}function mm(t){var e=this._id;return arguments.length?this.each(gm(e,t)):$t(this.node(),e).ease}function _m(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Ot(this,t).ease=n}}function ym(t){if(typeof t!="function")throw new Error;return this.each(_m(this._id,t))}function vm(t){typeof t!="function"&&(t=Ma(t));for(var e=this._groups,n=e.length,i=new Array(n),r=0;r<n;++r)for(var o=e[r],s=o.length,a=i[r]=[],l,c=0;c<s;++c)(l=o[c])&&t.call(l,l.__data__,c,o)&&a.push(l);return new Gt(i,this._parents,this._name,this._id)}function xm(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,i=e.length,r=n.length,o=Math.min(i,r),s=new Array(i),a=0;a<o;++a)for(var l=e[a],c=n[a],h=l.length,u=s[a]=new Array(h),f,d=0;d<h;++d)(f=l[d]||c[d])&&(u[d]=f);for(;a<i;++a)s[a]=e[a];return new Gt(s,this._parents,this._name,this._id)}function bm(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function wm(t,e,n){var i,r,o=bm(e)?Do:Ot;return function(){var s=o(this,t),a=s.on;a!==i&&(r=(i=a).copy()).on(e,n),s.on=r}}function km(t,e){var n=this._id;return arguments.length<2?$t(this.node(),n).on.on(t):this.each(wm(n,t,e))}function Sm(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Tm(){return this.on("end.remove",Sm(this._id))}function Cm(t){var e=this._name,n=this._id;typeof t!="function"&&(t=no(t));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s<r;++s)for(var a=i[s],l=a.length,c=o[s]=new Array(l),h,u,f=0;f<l;++f)(h=a[f])&&(u=t.call(h,h.__data__,f,a))&&("__data__"in h&&(u.__data__=h.__data__),c[f]=u,Gi(c[f],e,n,f,c,$t(h,n)));return new Gt(o,this._parents,e,n)}function Mm(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ca(t));for(var i=this._groups,r=i.length,o=[],s=[],a=0;a<r;++a)for(var l=i[a],c=l.length,h,u=0;u<c;++u)if(h=l[u]){for(var f=t.call(h,h.__data__,u,l),d,p=$t(h,n),g=0,m=f.length;g<m;++g)(d=f[g])&&Gi(d,e,n,g,f,p);o.push(f),s.push(h)}return new Gt(o,s,e,n)}var Am=$n.prototype.constructor;function $m(){return new Am(this._groups,this._parents)}function Dm(t,e){var n,i,r;return function(){var o=Oe(this,t),s=(this.style.removeProperty(t),Oe(this,t));return o===s?null:o===n&&s===i?r:r=e(n=o,i=s)}}function nl(t){return function(){this.style.removeProperty(t)}}function Em(t,e,n){var i,r=n+"",o;return function(){var s=Oe(this,t);return s===r?null:s===i?o:o=e(i=s,n)}}function Nm(t,e,n){var i,r,o;return function(){var s=Oe(this,t),a=n(this),l=a+"";return a==null&&(l=a=(this.style.removeProperty(t),Oe(this,t))),s===l?null:s===i&&l===r?o:(r=l,o=e(i=s,a))}}function Pm(t,e){var n,i,r,o="style."+e,s="end."+o,a;return function(){var l=Ot(this,t),c=l.on,h=l.value[o]==null?a||(a=nl(e)):void 0;(c!==n||r!==h)&&(i=(n=c).copy()).on(s,r=h),l.on=i}}function Fm(t,e,n){var i=(t+="")=="transform"?Ip:el;return e==null?this.styleTween(t,Dm(t,i)).on("end.style."+t,nl(t)):typeof e=="function"?this.styleTween(t,Nm(t,i,No(this,"style."+t,e))).each(Pm(this._id,t)):this.styleTween(t,Em(t,i,e),n).on("end.style."+t,null)}function Om(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function Rm(t,e,n){var i,r;function o(){var s=e.apply(this,arguments);return s!==r&&(i=(r=s)&&Om(t,s,n)),i}return o._value=e,o}function Im(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,Rm(t,e,n??""))}function Lm(t){return function(){this.textContent=t}}function zm(t){return function(){var e=t(this);this.textContent=e??""}}function Bm(t){return this.tween("text",typeof t=="function"?zm(No(this,"text",t)):Lm(t==null?"":t+""))}function Um(t){return function(e){this.textContent=t.call(this,e)}}function Wm(t){var e,n;function i(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Um(r)),e}return i._value=t,i}function Hm(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Wm(t))}function Vm(){for(var t=this._name,e=this._id,n=il(),i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)if(l=s[c]){var h=$t(l,e);Gi(l,t,n,c,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Gt(i,this._parents,t,n)}function Ym(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(o,s){var a={value:s},l={value:function(){--r===0&&o()}};n.each(function(){var c=Ot(this,i),h=c.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(a),e._.interrupt.push(a),e._.end.push(l)),c.on=e}),r===0&&o()})}var Xm=0;function Gt(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function il(){return++Xm}var Rt=$n.prototype;Gt.prototype={constructor:Gt,select:Cm,selectAll:Mm,selectChild:Rt.selectChild,selectChildren:Rt.selectChildren,filter:vm,merge:xm,selection:$m,transition:Vm,call:Rt.call,nodes:Rt.nodes,node:Rt.node,size:Rt.size,empty:Rt.empty,each:Rt.each,on:km,attr:im,attrTween:cm,style:Fm,styleTween:Im,text:Bm,textTween:Hm,remove:Tm,tween:K0,delay:hm,duration:pm,ease:mm,easeVarying:ym,end:Ym,[Symbol.iterator]:Rt[Symbol.iterator]};const Xn=t=>+t;function Gm(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var jm={time:null,delay:0,duration:250,ease:Gm};function qm(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Km(t){var e,n;t instanceof Gt?(e=t._id,t=t._name):(e=il(),(n=jm).time=$o(),t=t==null?null:t+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var s=i[o],a=s.length,l,c=0;c<a;++c)(l=s[c])&&Gi(l,t,e,c,s,n||qm(l,e));return new Gt(i,this._parents,t,e)}$n.prototype.interrupt=G0;$n.prototype.transition=Km;var le=(t=>(t.Start="start",t.Middle="middle",t.End="end",t))(le||{}),De=(t=>(t.Top="top",t.Middle="middle",t.Bottom="bottom",t))(De||{}),Lt=(t=>(t.Wrap="wrap",t.Trim="trim",t))(Lt||{}),vt=(t=>(t.Left="left",t.Center="center",t.Right="right",t))(vt||{});function Zm(t){switch(t){case vt.Center:return"middle";case vt.Right:return"end";case vt.Left:default:return"start"}}const Qm=5e3;function Po(t,e,n){if(t.size>=Qm&&!t.has(e)){const i=t.keys().next().value;i!==void 0&&t.delete(i)}t.set(e,n)}const rl="",Mn=new Map,pr=new WeakMap,zr=new Map,Se=globalThis?.document?.createElement("canvas").getContext("2d")??null,ol=(t,e)=>`${e}${rl}${t}`;function Jm(){Mn.clear(),zr.clear()}globalThis?.document?.fonts?.ready?.then(Jm);function Ee(t,e,n=Ao()){return t.length*e*n||0}function sl(t,e){if(Se)return Se.font!==e&&(Se.font=e),Se.measureText(t).width;const n=/(\d*\.?\d+)(px|pt|pc|rem|em|ex|ch|cm|mm|in|vmin|vmax|vw|vh|%)/.exec(e)?.[0],i=Ge(n)??Mo;return Ee(t,i,Ao())}function t_(t){let e="",n=t;for(;n&&(e+=`${rl}${n.getAttribute("class")||""};${n.getAttribute("style")||""}`,n.localName!=="svg");)n=n.parentElement;return e}function e_(t){let e=pr.get(t);if(e)return e;const n=t_(t);if(e=zr.get(n),e)return pr.set(t,e),e;const i=window.getComputedStyle(t),r=i.fontSize||`${Mo}px`,o=i.fontFamily||"sans-serif";return e={font:`${i.fontStyle||"normal"} ${i.fontWeight||"normal"} ${r} ${o}`,fontFamily:o,fontSizePx:Ge(r)},Po(zr,n,e),pr.set(t,e),e}function $i(t){const e=t.textContent||"",{font:n}=e_(t),i=ol(e,n),r=Mn.get(i);if(r!==void 0)return r;const o=Se?sl(e,n):t.getComputedTextLength();return Po(Mn,i,o),o}function Ne(t,e,n,i){const r=typeof n=="number"?`${n}px`:n,o=`${i??""} ${r} ${e}`.trimStart(),s=ol(t,o),a=Mn.get(s);if(a!==void 0)return a;let l;if(!Se&&globalThis.document){const c="http://www.w3.org/2000/svg",h=document.createElementNS(c,"svg"),u=document.createElementNS(c,"text");u.textContent=t,u.setAttribute("font-size",r),u.setAttribute("font-family",e),i!==void 0&&u.setAttribute("font-weight",`${i}`),h.appendChild(u),document.body.appendChild(h),l=u.getComputedTextLength(),document.body.removeChild(h)}else l=sl(t,o);return Po(Mn,s,l),l}const n_=t=>{switch(t){case vt.Left:return"start";case vt.Right:return"end";case vt.Center:return"middle";default:return null}};function i_(t){return t.replace(/-([a-z])/g,(e,n)=>n.toUpperCase())}function r_(t){return t.match(/[A-Z]{2,}(?=[A-Z][a-z0-9]*|\b)|[A-Z]?[a-z0-9]*|[A-Z]|[0-9]+/g)?.filter(Boolean).map(e=>e.toLowerCase()).join("-")}function o_(t,e=15){return t?t.length>e?`…${t.substr(t.length-e,e)}`:t:""}function s_(t,e=15){if(!t)return"";const n=Math.floor((e-3)/2);return t.length>e?`${t.substr(0,n)}…${t.substr(-n,n)}`:t}function a_(t,e=15){return t?t.length>e?`${t.substr(0,e)}…`:t:""}function gr(t,e=15,n=le.Middle){if(!t)return"";let i=a_(t,e);return n===le.Start?i=o_(t,e):n===le.Middle&&(i=s_(t,e)),i}function al(t,e=[" "]){let n=[t];for(let i=0;i<e.length;i++){const r=e[i];n.forEach((o,s)=>{const a=o.split(r),l=a.map((c,h)=>`${c}${h===a.length-1?"":r}`);n[s]=l}),n=Sr(n)}return n}function c_(t,e,n=[" ","-",".",","]){const i=t.text();if(!i)return;const r=Ht(n)?n:[n],o=al(i,r),s=parseFloat(t.attr("x"))||0;t.text("");let a=t.append("tspan").attr("x",s),l=`${o[0]}`;a.text(l),o.forEach((c,h)=>{if(h===0)return;const u=`${l}${c}`;a.text(u),$i(a.node())>e?(a.text(l.trim()),a=t.append("tspan").attr("x",s).attr("dy","1.2em").text(c),l=c):l+=c})}function ra(t,e=50,n=le.Middle,i=!1,r=Ge(window.getComputedStyle(t.node())?.fontSize||ce.fontSize),o=Ao()){const s=t.text()||"",a=s.length;if(!a)return!1;if(i){const f=Ee(s,r,o),p=Math.ceil(a*e/(1.1*f));return p<a?(t.text(gr(s,p,n)),!0):!1}const l=t.node();if($i(l)<=e)return!1;let c=0,h=a,u=0;for(;c<=h;){const f=c+h>>1;t.text(gr(s,f,n)),$i(l)<=e?(u=f,c=f+1):h=f-1}return t.text(gr(s,u,n)),!0}function l_(t,e=void 0,n=!0,i=jc,r=!1){const o=`${t.text}`;if(!o)return[];const s=t.fontSize??ce.fontSize,a=t.fontFamily??ce.fontFamily,l=t.fontWeight,c=t.fontWidthToHeightRatio??ce.fontWidthToHeightRatio,h=Array.isArray(i)?i:[i];return o.split(`
|
|
60
|
+
`).map(f=>{const d=[];if(!e)return[f];const p=al(f,h);let g="";for(let m=0;m<p.length;m+=1){(n?Ee(g+p[m],s,c):Ne(g+p[m],a,s,l))<e||m===0?g+=p[m]:(d.push(g.trim()),g=p[m]);const y=2;if(r)for(;g.trim().length>y&&(n?Ee(g,s,c):Ne(g,a,s,l))>e;){let _=g.trim().length-y;for(;_>0;){const b=`${g.substring(0,_)}${qc}`;if((n?Ee(b,s,c):Ne(b,a,s,l))<=e||_===1){d.push(b.trim()),g=g.substring(_);break}_--}}}return g&&d.push(g.trim()),d}).flat()}function cl(t,e=void 0,n=void 0,i=!0,r=jc,o=!1){const s=Array.isArray(t)?t.map(u=>Re(ce,u)):[Re(ce,t)],a=s.map(u=>l_(u,u.width??e,i,u.separator??r,u.wordBreak??o));let l=0,c;const h=[];return s.forEach((u,f)=>{let d=a[f];const p=l,g=u.fontSize*u.lineHeight;let m=0;const v=y=>i?Ee(y,u.fontSize,u.fontWidthToHeightRatio):Ne(y,u.fontFamily,u.fontSize);for(let y=0;y<d.length;y+=1){let x=d[y];if(y===0&&!c?l+=u.marginTop+u.fontSize:y===0?l+=Math.max(c.marginBottom,u.marginTop)+c.fontSize*(c.lineHeight-1)+u.fontSize:l+=g,n&&l+g>n&&y!==d.length-1){x.charAt(x.length-1)===qc&&(x=x.substr(0,x.length-1));const b=`${x} …`;v(b)<(u.width??e)?d[y]=b:d[y]=`${x.substr(0,x.length-2)}…`,m=Math.max(v(d[y]),m),d=d.slice(0,y+1);break}m=Math.max(v(x),m)}h.push({...u,_lines:d,_estimatedHeight:l-p,_maxWidth:m}),d.length&&(c=h[h.length-1])}),h}const oa="http://www.w3.org/2000/svg";function u_(t,e=0,n,i){let r;return t.map((o,s)=>{const a=Math.max(r?.marginBottom??0,o.marginTop),l=r?a+r.fontSize*r.lineHeight:o.marginTop,c=document.createElementNS(oa,"tspan");return o.className&&c.setAttribute("class",o.className),o.fontSize&&c.setAttribute("font-size",`${o.fontSize}`),o.fontFamily&&c.setAttribute("font-family",`${o.fontFamily}`),o.fontWeight&&c.setAttribute("font-weight",`${o.fontWeight}`),o.color&&c.setAttribute("fill",`${o.color}`),s===0&&n&&c.setAttribute("y",`${n}`),o._lines.forEach((h,u)=>{const f=u===0?l/o.fontSize:o.lineHeight,d=document.createElementNS(oa,"tspan");d.setAttribute("x",`${e}`),d.setAttribute("dy",`${f}em`),d.setAttribute("dominant-baseline",i??"auto"),d.textContent=h.length?h:" ",c.appendChild(d)}),o._lines.length&&(r=o),c})}function ll(t){return Of(t,e=>e._estimatedHeight)}function h_(t,e,n,i){const r=cl(e,n.width,void 0,n.fastMode,n.separator,n.wordBreak),o=n.x??+t.getAttribute("x"),s=n.y??+t.getAttribute("y"),a=o??0;let l=s??0;if(n.textAlign&&t.setAttribute("text-anchor",Zm(n.textAlign)),n.verticalAlign&&n.verticalAlign!==De.Top){const c=ll(r),h=n.verticalAlign===De.Middle?-c/2:n.verticalAlign===De.Bottom?-c:0;l+=h}n.textRotationAngle?t.setAttribute("transform",`rotate(${n.textRotationAngle===0||n.textRotationAngle?n.textRotationAngle:0} ${a} ${l})`):t.removeAttribute("transform"),t.textContent="";for(const c of u_(r,a,l,i))t.appendChild(c);return r}function j(t,e,n){if(t.nodes().forEach(i=>Eo(i)),e){const i=t.transition().duration(e);return n&&i.ease(n),i}else return t}const mr=new WeakMap;function f_(t,e,n){t.each((i,r,o)=>{const s=o[r],a=e(i,r)??{},l=[];for(const h of Object.keys(a)){if(n?.has(h))continue;const u=a[h];if(u==null)continue;const f=h.startsWith("--")?h:r_(h);s.style.setProperty(f,`${u}`),l.push(f)}const c=mr.get(s);if(c)for(const h of c)l.includes(h)||s.style.removeProperty(h);l.length?mr.set(s,l):mr.delete(s)})}class Fo{get data(){return this._data}set data(e){this._data=e}constructor(e){this.data=e}}var N=(t=>(t.X="x",t.Y="y",t))(N||{});const sa={scaleLinear:Mc,scalePow:yo,scaleSqrt:fg,scaleLog:Dc,scaleSymlog:Ec,scaleIdentity:Ac,scaleTime:A0,scaleUtc:$0,scaleSequential:Vc,scaleDiverging:Yc,scaleQuantize:Pc,scaleQuantile:Nc,scaleThreshold:Fc,scaleOrdinal:Ui,scaleBand:fo,scalePoint:Sp};var q=(t=>(t.X="x",t.Y="y",t))(q||{}),Wt=(t=>(t.West="west",t.East="east",t.North="north",t.South="south",t))(Wt||{});const d_={...ec,components:[],tooltip:void 0,crosshair:void 0,annotations:void 0,xAxis:void 0,yAxis:void 0,autoMargin:!0,xScale:void 0,xDomain:void 0,xDomainMinConstraint:void 0,xDomainMaxConstraint:void 0,xRange:void 0,yScale:void 0,yDomain:void 0,yDomainMinConstraint:void 0,yDomainMaxConstraint:void 0,yRange:void 0,yDirection:Wt.North,preventEmptyDomain:null,scaleByDomain:!1,clipPathExtend:2,bleed:void 0};class p_ extends dd{constructor(e,n,i){super(e),this._defaultConfig=d_,this.datamodel=new Fo,this.config=this._defaultConfig,this._clipPathId=Xa(),this._axisMargin={top:0,bottom:0,left:0,right:0},this._firstRender=!0,this._clipPath=this.svg.append("clipPath").attr("id",this._clipPathId),this._clipPath.append("rect");const r="saturate",o=window.location.href.replace(window.location.hash,"");this.svg.attr("class",P`
|
|
61
|
+
--highlight-filter-id: url(${o}#${r}); // defining a css variable
|
|
62
|
+
`),this._svgDefs.append("filter").attr("id",r).attr("filterUnits","objectBoundingBox").html('<feColorMatrix type="saturate" in="SourceGraphic" values="1.35"/>'),n&&this.updateContainer(n,!0),i&&this.setData(i,!0),(this.config.xAxis||this.config.yAxis||this.components?.some(s=>s.datamodel.data))&&this.render(),document.fonts?.ready.then(()=>{this._firstRender||this._renderAxes(0)})}get components(){return this.config.components}get width(){const e=this._getMargin();return xt(this.containerWidth-e.left-e.right,0,Number.POSITIVE_INFINITY)}get height(){const e=this._getMargin();return xt(this.containerHeight-e.top-e.bottom,0,Number.POSITIVE_INFINITY)}setData(e,n){const{components:i,config:r}=this;if(!e)return;const o=this.datamodel.data!==e;this.datamodel.data=e,i.forEach(s=>{s.datamodel.data!==e&&s.setData(e)}),r.crosshair&&r.crosshair.datamodel.data!==e&&r.crosshair.setData(e),r.xAxis&&r.xAxis.datamodel.data!==e&&r.xAxis.setData(e),r.yAxis&&r.yAxis.datamodel.data!==e&&r.yAxis.setData(e),o&&(r.tooltip?.hide(),r.crosshair?.hide()),n||this.render()}updateContainer(e,n){super.updateContainer(e),this.setData(this.datamodel.data,!0),e.xAxis&&(this.config.xAxis.config.type=N.X),e.yAxis&&(this.config.yAxis.config.type=N.Y);const i=e.tooltip;i&&(i.hasContainer()||i.setContainer(this._container),i.setComponents(this.components));const r=e.crosshair;r&&(r.setContainer(this.svg),r.tooltip=i),this._reconcileChildren([e.xAxis?.element,e.yAxis?.element,...this.components.map(o=>o.element),r?.element,e.annotations?.element,this._clipPath.node(),this._svgDefs.node(),this._svgDefsExternal.node()]),n||this.render()}updateComponents(e,n){const{config:i}=this;e&&e.length!==this.components.length&&console.warn("Unovis | XY Container: The number of provided component configs doesn't match the number of components. Configs are matched to components by index, so some components won't be updated"),this.components.forEach((r,o)=>{e[o]&&r.setConfig(e[o])}),this._updateScales(...this.components,i.xAxis,i.yAxis,i.crosshair),n||this.render()}update(e,n,i){i&&(this.datamodel.data=i),e&&this.updateContainer(e,!0),n&&this.updateComponents(n,!0),this.render()}_preRender(){const{config:e}=this;super._preRender(),e.autoMargin&&this._setAutoMargin();const n=tn([...this.components,e.xAxis,e.yAxis,e.crosshair,e.annotations]);this._propagateSizeAndStyleToComponents(n,this._getMargin()),this._updateScales(...this.components,e.xAxis,e.yAxis,e.crosshair)}_render(e){const{config:n}=this;super._render();const i=this._getMargin();for(const s of this.components)s.g.attr("transform",`translate(${i.left},${i.top})`).style("clip-path",s.clippable?`url(#${this._clipPathId})`:null).style("-webkit-clip-path",s.clippable?`url(#${this._clipPathId})`:null),s.render(e);this._renderAxes(this._firstRender?0:e);const r=n.clipPathExtend;this._clipPath.select("rect").attr("x",-r).attr("y",-r).attr("width",this.width+2*r).attr("height",this.height+2*r),n.tooltip?.update();const o=n.crosshair;if(o){const s=this.components.filter(d=>!d.stacked),a=this.components.filter(d=>d.stacked),l=s.map(d=>d.config.y),c=a.map(d=>d.config.y),u=this.components.find(d=>d.config.baseline)?.config?.baseline;o.accessors={x:this.components[0]?.config.x,y:Sr(l),yStacked:Sr(c),baseline:u};const f=[s.map(d=>d.config.colorKeys),a.map(d=>d.config.colorKeys)].flat(2);o.colorKeys=f,o.g.attr("transform",`translate(${i.left},${i.top})`).style("clip-path",`url(#${this._clipPathId})`).style("-webkit-clip-path",`url(#${this._clipPathId})`),o.render()}n.annotations?.g.attr("transform",`translate(${i.left},${i.top})`),n.annotations?.render(),this._firstRender=!1,n.onRenderComplete?.(this.svg.node(),i,this._getBleed(this.components),this.containerWidth,this.containerHeight,this.width,this.height)}_updateScales(...e){const n=tn(e||this.components);this._setScales(...n),this._updateScalesDomain(...n),this._updateScalesRange(...n)}_setScales(...e){const{config:n}=this;e&&(n.xScale&&e.forEach(i=>i.setScale(q.X,n.xScale)),n.yScale&&e.forEach(i=>i.setScale(q.Y,n.yScale)))}_updateScalesDomain(...e){const{config:n}=this;if(!e)return;const i=e.filter(r=>!r.config.excludeFromDomainCalculation);Object.values(q).forEach(r=>{const[o,s]=wf(Nf(i.map(d=>d.getDataExtent(r,n.scaleByDomain)))),a=r===q.Y?n.yDomain:n.xDomain,l=r===q.Y?n.yDomainMinConstraint:n.xDomainMinConstraint,c=r===q.Y?n.yDomainMaxConstraint:n.xDomainMaxConstraint,h=a?.[0]??o??0,u=a?.[1]??s??1,f=[xt(h,l?.[0]??Number.NEGATIVE_INFINITY,l?.[1]??Number.POSITIVE_INFINITY),xt(u,c?.[0]??Number.NEGATIVE_INFINITY,c?.[1]??Number.POSITIVE_INFINITY)];if(f[0]===f[1]){const d=i.some(p=>p.datamodel.data?.length>0);(n.preventEmptyDomain||n.preventEmptyDomain===null&&(!d||r===q.Y))&&(f[1]=f[0]+1)}e.forEach(d=>d.setScaleDomain(r,f))})}_updateScalesRange(...e){const{config:n}=this;if(!e)return;const i=n.yDirection===Wt.South,r=[n.padding.left??0,this.width-(n.padding.right??0)],o=[this.height-(n.padding.bottom??0),n.padding.top??0];i&&o.reverse();for(const a of e)a.setSize(this.width,this.height,this.containerWidth,this.containerHeight),a.setScaleRange(q.X,n.xRange??r),a.setScaleRange(q.Y,n.yRange??o);const s=this._getBleed(e);for(const a of e)a.setScaleRange(q.X,[r[0]+s.left,r[1]-s.right]),a.setScaleRange(q.Y,i?[o[0]+s.top,o[1]-s.bottom]:[o[0]-s.bottom,o[1]+s.top])}_renderAxes(e){const{config:{xAxis:n,yAxis:i}}=this,r=this._getMargin();tn([n,i]).forEach(s=>{const a=s.getOffset(r);s.g.attr("transform",`translate(${a.left},${a.top})`),s.render(e)})}_setAutoMargin(){const{config:{xAxis:e,yAxis:n}}=this,i=tn([...this.components,e,n]);this._setScales(...i),this._updateScalesDomain(...i);const r=this._firstRender?2:1;for(let o=0;o<r;o+=1){const s={top:0,bottom:0,left:0,right:0};this._updateScalesRange(...i),tn([e,n]).forEach(l=>{l.preRender();const c=l.getRequiredMargin();s.top<c.top&&(s.top=c.top),s.bottom<c.bottom&&(s.bottom=c.bottom),s.left<c.left&&(s.left=c.left),s.right<c.right&&(s.right=c.right)}),this._axisMargin=s}}_getMargin(){const{config:{margin:e}}=this,i=e||{top:0,bottom:0,left:0,right:0};return{top:(i.top||0)+this._axisMargin.top,bottom:(i.bottom||0)+this._axisMargin.bottom,left:(i.left||0)+this._axisMargin.left,right:(i.right||0)+this._axisMargin.right}}_onResize(){const{config:e}=this;super._onResize(),e.tooltip?.hide(),e.crosshair?.hide()}_getBleed(e){const n=e.map(r=>r.bleed).reduce((r,o)=>{for(const s of Object.keys(r)){const a=s;r[a]<o[a]&&(r[a]=o[a])}return r},{top:0,bottom:0,left:0,right:0}),i=ue(this.config.bleed)?this.config.bleed(e):this.config.bleed;return i?{top:i.top??n.top,bottom:i.bottom??n.bottom,left:i.left??n.left,right:i.right??n.right}:n}destroy(){const{components:e,config:{tooltip:n,crosshair:i,annotations:r,xAxis:o,yAxis:s}}=this;super.destroy();for(const a of e)a?.destroy();n?.destroy(),i?.destroy(),r?.destroy(),o?.destroy(),s?.destroy()}}const ul={duration:600,events:{},attributes:{}};class g_{constructor(e=Gn.SVG){this.type=Gn.SVG,this.datamodel=new Fo,this.sizing=_n.Fit,this.events={},this._defaultConfig=ul,this._width=400,this._height=200,this._containerWidth=void 0,this._containerHeight=void 0,this._containerMargin={top:0,bottom:0,left:0,right:0},this._colorFunction=void 0,this._setUpComponentEventsThrottled=fi(this._setUpComponentEvents,500),this._setCustomAttributesThrottled=fi(this._setCustomAttributes,500),e===Gn.SVG?this.element=document.createElementNS("http://www.w3.org/2000/svg","g"):this.element=document.createElement("div"),this.uid=Xa(),this.g=mt(this.element);const n=this.constructor?.selectors?.root;n&&this.g.attr("class",n)}setContainerMargin(e){this._containerMargin=e}setColorFunction(e){this._colorFunction=e}setConfig(e){this.prevConfig=this.config,this.config=Re(this._defaultConfig,e)}setData(e){this.datamodel.data=e}setSize(e,n,i,r){isFinite(e)&&(this._width=e),isFinite(n)&&(this._height=n),isFinite(i)&&(this._containerWidth=i),isFinite(r)&&(this._containerHeight=r)}render(e=this.config.duration){this._render(e);const n="animating";e&&(this.g.attr(n,""),this.g.transition(n).duration(e).on("end interrupt",()=>{this.g.attr(n,null)})),this._setUpComponentEventsThrottled(),this._setCustomAttributesThrottled()}get bleed(){return{top:0,bottom:0,left:0,right:0}}_render(e=this.config.duration){}_setCustomAttributes(){const e=this.config.attributes;Object.keys(e).forEach(n=>{Object.keys(e[n]).forEach(i=>{this.g.selectAll(`.${n}`).attr(i,e[n][i])})})}_setUpComponentEvents(){this._bindEvents(()=>this.events),this._bindEvents(()=>this.config.events,".user")}_mapEventDatum(e,n){return{datum:e,index:n}}_bindEvents(e,n=""){const i=e()??{};Object.keys(i).forEach(r=>{Object.keys(i[r]).forEach(o=>{const s=this.g.selectAll(`.${r}`),a=s.nodes();s.on(o+n,(l,c)=>{const h=e()?.[r]?.[o];if(!h)return;const u=a.indexOf(l.currentTarget),{datum:f,index:d}=this._mapEventDatum(c,u);return h(f,l,d,a)})})})}_onDestroy(){}destroy(){this.isDestroyed()||(this._onDestroy(),this.g?.remove(),this.element=void 0)}isDestroyed(){return!this.element}}class m_ extends Fo{constructor(e){super(e)}get data(){return this._data??[]}set data(e){Array.isArray(e)&&(this._data=e)}}const Ze={...ul,x:void 0,y:void 0,id:(t,e)=>t.id??`${e}`,color:t=>t.color,xScale:void 0,yScale:void 0,excludeFromDomainCalculation:!1};class On extends g_{constructor(){super(...arguments),this.datamodel=new m_,this.clippable=!0,this.stacked=!1,this._defaultConfig=Ze,this._xScale=sa.scaleLinear(),this._yScale=sa.scaleLinear()}get xScale(){return this.config.xScale||this._xScale}get yScale(){return this.config.yScale||this._yScale}setConfig(e){e&&(this.config?.xScale&&(e.xScale=this.config.xScale),this.config?.yScale&&(e.yScale=this.config.yScale)),super.setConfig(e)}setScaleDomain(e,n){e===q.X&&this._xScale?.domain(n),e===q.Y&&this._yScale?.domain(n)}setScaleRange(e,n){e===q.X&&this._xScale?.range(n),e===q.Y&&this._yScale?.range(n)}setScale(e,n){n&&e===q.X&&(this._xScale=n),n&&e===q.Y&&(this._yScale=n)}getDataExtent(e,n){const{config:i,datamodel:r}=this;switch(e){case q.X:return this.getXDataExtent();case q.Y:return this.getYDataExtent(n);default:return jn(r.data,i[e])}}getXDataExtent(){const{config:e,datamodel:n}=this;return jn(n.data,e.x)}getYDataExtent(e){const{config:n,datamodel:i}=this,r=this.xScale.domain(),o=e?Ha(i.data,r,n.x,!0):i.data,s=Ht(n.y)?n.y:[n.y];return jn(o,...s)}}var C=(t=>(t.Top="top",t.Bottom="bottom",t.Left="left",t.Right="right",t.Center="center",t.Auto="auto",t))(C||{}),Oo=(t=>(t.Horizontal="horizontal",t.Vertical="vertical",t))(Oo||{});const __={components:[],container:void 0,followCursor:!0,allowHover:!1,horizontalPlacement:C.Auto,horizontalShift:0,verticalPlacement:C.Top,verticalShift:0,attributes:{},triggers:{},className:void 0,showDelay:void 0,hideDelay:void 0},ji=P`
|
|
63
|
+
label: tooltip;
|
|
64
|
+
display: inline-block;
|
|
65
|
+
left: 0;
|
|
66
|
+
bottom: 0;
|
|
67
|
+
min-width: max-content;
|
|
68
|
+
position: absolute;
|
|
69
|
+
opacity: 0;
|
|
70
|
+
transition: opacity;
|
|
71
|
+
transition-duration: var(--vis-tooltip-transition-duration);
|
|
72
|
+
z-index: 999999;
|
|
73
|
+
padding: var(--vis-tooltip-padding);
|
|
74
|
+
color: var(--vis-tooltip-text-color);
|
|
75
|
+
border-radius: var(--vis-tooltip-border-radius);
|
|
76
|
+
box-shadow: var(--vis-tooltip-box-shadow);
|
|
77
|
+
border: solid 1px var(--vis-tooltip-border-color);
|
|
78
|
+
background-color: var(--vis-tooltip-background-color);
|
|
79
|
+
backdrop-filter: var(--vis-tooltip-backdrop-filter);
|
|
80
|
+
`,y_=ji,v_=qe`
|
|
81
|
+
:root {
|
|
82
|
+
--vis-tooltip-background-color: rgba(255, 255, 255, 0.95);
|
|
83
|
+
--vis-tooltip-border-color: #e5e9f7;
|
|
84
|
+
--vis-tooltip-text-color: #000;
|
|
85
|
+
--vis-tooltip-shadow-color: rgba(172, 179, 184, 0.35);
|
|
86
|
+
--vis-tooltip-backdrop-filter: none;
|
|
87
|
+
--vis-tooltip-padding: 10px 15px;
|
|
88
|
+
--vis-tooltip-border-radius: 5px;
|
|
89
|
+
--vis-tooltip-transition-duration: 300ms;
|
|
90
|
+
--vis-tooltip-box-shadow: none;
|
|
91
|
+
|
|
92
|
+
--vis-dark-tooltip-background-color: rgba(30,30,30, 0.95);
|
|
93
|
+
--vis-dark-tooltip-text-color: #e5e9f7;
|
|
94
|
+
--vis-dark-tooltip-border-color: var(--vis-color-grey);
|
|
95
|
+
--vis-dark-tooltip-shadow-color: rgba(0,0,0, 0.95);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
${Le} ${`.${ji}`} {
|
|
99
|
+
--vis-tooltip-background-color: var(--vis-dark-tooltip-background-color);
|
|
100
|
+
--vis-tooltip-text-color: var(--vis-dark-tooltip-text-color);
|
|
101
|
+
--vis-tooltip-border-color: var(--vis-dark-tooltip-border-color);
|
|
102
|
+
--vis-tooltip-shadow-color: var(--vis-dark-tooltip-shadow-color);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
${Le} {
|
|
106
|
+
--vis-tooltip-background-color: rgba(30,30,30, 0.95);
|
|
107
|
+
--vis-tooltip-text-color: #e5e9f7;
|
|
108
|
+
--vis-tooltip-border-color: var(--vis-color-grey);
|
|
109
|
+
--vis-tooltip-shadow-color: rgba(0,0,0, 0.95);
|
|
110
|
+
}
|
|
111
|
+
`,hl=P`
|
|
112
|
+
bottom: unset;
|
|
113
|
+
position: fixed;
|
|
114
|
+
`,ni=P`
|
|
115
|
+
opacity: 1;
|
|
116
|
+
`,ii=P`
|
|
117
|
+
display: none;
|
|
118
|
+
`,fl=P`
|
|
119
|
+
label: non-interactive;
|
|
120
|
+
pointer-events: none;
|
|
121
|
+
user-select: none;
|
|
122
|
+
`,x_=Object.freeze(Object.defineProperty({__proto__:null,hidden:ii,nonInteractive:fl,positionFixed:hl,root:ji,show:ni,tooltip:y_,variables:v_},Symbol.toStringTag,{value:"Module"})),dl=class{constructor(e={}){this._defaultConfig=__,this.config=this._defaultConfig,this._setUpEventsThrottled=fi(this._setUpEvents,500),this._setContainerPositionThrottled=fi(this._setContainerPosition,500),this._isShown=!1,this.element=document.createElement("div"),this.div=mt(this.element).attr("class",ji).classed(ni,!1).classed(ii,!0),this.setConfig(e),this.components=this.config.components,this._mutationObserver=new MutationObserver(()=>{this._isShown&&(!this.config.followCursor&&this._hoveredElement?this.placeByElement(this._hoveredElement):this._position&&this.place({x:this._position[0],y:this._position[1]}))}),this._mutationObserver.observe(this.div.node(),{childList:!0,subtree:!0})}setConfig(e){this.prevConfig=this.config,this.config=Re(this._defaultConfig,e),this.prevConfig.horizontalPlacement!==this.config.horizontalPlacement&&this.overrideHorizontalPlacement(void 0),this.config.container&&this.config.container!==this.prevConfig?.container&&this.setContainer(this.config.container),this._setUpAttributes()}setContainer(e){this.element.parentNode?.removeChild(this.element),this._container=e,this._container.appendChild(this.element),this._setContainerPositionThrottled()}getContainer(){return this._container}hasContainer(){return!!this._container&&this._container.isConnected}setComponents(e){this.components=e}update(){this._container&&this._setUpEventsThrottled()}show(e,n){this.render(e),this.place(n)}_hide(){this.div.classed(ni,!1).on("transitionend",()=>{this.div.classed(ii,!this._isShown)}),this._isShown=!1}hide(){window.clearTimeout(this._showDelayTimeoutId),this.config.hideDelay?(window.clearTimeout(this._hideDelayTimeoutId),this._hideDelayTimeoutId=setTimeout(()=>this._hide(),this.config.hideDelay)):this._hide()}_display(){window.clearTimeout(this._hideDelayTimeoutId),this.div.classed(ii,!1).classed(ni,!0),this._isShown=!0}display(){this._isShown||(this.config.showDelay?(window.clearTimeout(this._showDelayTimeoutId),this._showDelayTimeoutId=setTimeout(()=>{this._display(),this.place({x:this._position[0],y:this._position[1]})},this.config.showDelay)):this._display())}place(e){if(this._position=[e.x,e.y],!this.hasContainer()){console.warn("Unovis | Tooltip: Container was not set or is not initialized yet");return}const{config:n}=this,i=this.element.offsetWidth,r=this.element.offsetHeight,o=this._overriddenHorizontalPlacement||(n.horizontalPlacement===C.Auto?C.Center:n.horizontalPlacement),s=n.verticalPlacement===C.Auto?e.y-r<0?C.Bottom:C.Top:n.verticalPlacement,a=5,l=o===C.Left?-i-a-n.horizontalShift:o===C.Center?-i/2:a+n.horizontalShift,c=s===C.Bottom?a+n.verticalShift:s===C.Center?-r/2:-a-n.verticalShift-r,[h,u]=this._constraintPosToContainer(e.x+l,e.y+c,i,r);this._applyPosition(h,u,r)}placeByElement(e){const{config:n}=this;this._hoveredElement=e;const i=5,r=this.element.offsetWidth,o=this.element.offsetHeight,s=this.isContainerBody(),a=s?window.innerWidth:this._container.scrollWidth,l=e.getBoundingClientRect(),c=s?[l.x,l.y]:ui({clientX:l.x,clientY:l.y,pageX:l.x,pageY:l.y},this._container),h=this._overriddenHorizontalPlacement||(n.horizontalPlacement===C.Auto?c[0]-r<0?C.Right:c[0]+r>a?C.Left:C.Center:n.horizontalPlacement);let u=0;switch(h){case C.Left:u=-r-i-n.horizontalShift;break;case C.Right:u=l.width+i+n.horizontalShift;break;case C.Center:default:u=(-r+l.width)/2;break}const f=n.verticalPlacement===C.Auto?h!==C.Center?C.Center:c[1]-o<0?C.Bottom:C.Top:n.verticalPlacement;let d=-o;switch(f){case C.Center:d+=(o+l.height)/2;break;case C.Bottom:d+=o+l.height+i+n.verticalShift;break;case C.Top:default:d+=-i-n.verticalShift;break}const[p,g]=this._constraintPosToContainer(c[0]+u,c[1]+d,r,o);this._applyPosition(p,g,o)}isContainerBody(){return this._container===document.body}overrideHorizontalPlacement(e){this._overriddenHorizontalPlacement=e}render(e){const{config:n,prevConfig:i}=this;e instanceof HTMLElement?this.div.select(":first-child").node()!==e&&this.div.html("").append(()=>e):e!=null&&e!==""&&this.div.html(e),this.div.classed(n.className??"",!!n.className).classed(fl,!n.allowHover),i?.className&&i.className!==n.className&&this.div.classed(i.className,!1),this.display()}_applyPosition(e,n,i){const r=this.isContainerBody(),o=r?window.innerHeight:this._container.scrollHeight;this.div.classed(hl,r).style("top",r?`${n}px`:"unset").style("bottom",r?"unset":`${o-n-i}px`).style("left",`${e}px`)}_constraintPosToContainer(e,n,i,r){const o=this.isContainerBody(),s=o?window.innerHeight:this._container.scrollHeight,a=o?window.innerWidth:this._container.scrollWidth,l=10,c=e>a-i-l,h=e<l,u=c?a-i-l:h?l:e,f=10,d=n>s-r-f,p=n<f,g=d?s-r-f:p?f:n;return[a<i?0:u,s<r?0:g]}_setContainerPosition(){this._container!==document.body&&getComputedStyle(this._container)?.position==="static"&&(this._container.style.position="relative")}_setUpEvents(){const{config:e}=this;this.components.forEach(n=>{const i=mt(n.element);i.on("mousemove.tooltip",r=>{const{config:o}=this,s=r.composedPath&&r.composedPath()||r.path||[r.target];for(const a of Object.keys(o.triggers)){const l=o.triggers[a];if(l)for(const c of s){if(c===i.node())break;if(c.classList.contains(a)){const h=i.selectAll(`.${a}`).nodes(),u=h.indexOf(c),f=mt(c).datum(),d=l(f,u,h),[p,g]=this.isContainerBody()?[r.clientX,r.clientY]:ui(r,this._container);d===null?this.hide():(this.render(d),o.followCursor?this.place({x:p,y:g}):this.placeByElement(c)),r.stopPropagation();return}}}this._isShown&&this.hide()}).on("mouseleave.tooltip",r=>{r.stopPropagation(),this.hide()})}),e.allowHover?this.div.on("mouseenter.tooltip",this._display.bind(this)).on("mouseleave.tooltip",this.hide.bind(this)):this.div.on("mouseenter.tooltip",null).on("mouseleave.tooltip",null)}_setUpAttributes(){const e=this.config.attributes;e&&Object.keys(e).forEach(n=>{this.div.attr(n,e[n])})}destroy(){this._mutationObserver.disconnect(),window.clearTimeout(this._hideDelayTimeoutId),window.clearTimeout(this._showDelayTimeoutId),this.div?.remove()}};dl.selectors=x_;let b_=dl;function et(t){return function(){return t}}const aa=1e-12,Br=Math.PI,Ur=2*Br,ne=1e-6,w_=Ur-ne;function pl(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function k_(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return pl;const n=10**e;return function(i){this._+=i[0];for(let r=1,o=i.length;r<o;++r)this._+=Math.round(arguments[r]*n)/n+i[r]}}class S_{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?pl:k_(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,i,r){this._append`Q${+e},${+n},${this._x1=+i},${this._y1=+r}`}bezierCurveTo(e,n,i,r,o,s){this._append`C${+e},${+n},${+i},${+r},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,i,r,o){if(e=+e,n=+n,i=+i,r=+r,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=i-e,c=r-n,h=s-e,u=a-n,f=h*h+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(f>ne)if(!(Math.abs(u*l-c*h)>ne)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let d=i-s,p=r-a,g=l*l+c*c,m=d*d+p*p,v=Math.sqrt(g),y=Math.sqrt(f),x=o*Math.tan((Br-Math.acos((g+f-m)/(2*v*y)))/2),_=x/y,b=x/v;Math.abs(_-1)>ne&&this._append`L${e+_*h},${n+_*u}`,this._append`A${o},${o},0,0,${+(u*d>h*p)},${this._x1=e+b*l},${this._y1=n+b*c}`}}arc(e,n,i,r,o,s){if(e=+e,n=+n,i=+i,s=!!s,i<0)throw new Error(`negative radius: ${i}`);let a=i*Math.cos(r),l=i*Math.sin(r),c=e+a,h=n+l,u=1^s,f=s?r-o:o-r;this._x1===null?this._append`M${c},${h}`:(Math.abs(this._x1-c)>ne||Math.abs(this._y1-h)>ne)&&this._append`L${c},${h}`,i&&(f<0&&(f=f%Ur+Ur),f>w_?this._append`A${i},${i},0,1,${u},${e-a},${n-l}A${i},${i},0,1,${u},${this._x1=c},${this._y1=h}`:f>ne&&this._append`A${i},${i},0,${+(f>=Br)},${u},${this._x1=e+i*Math.cos(o)},${this._y1=n+i*Math.sin(o)}`)}rect(e,n,i,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${i=+i}v${+r}h${-i}Z`}toString(){return this._}}function gl(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const i=Math.floor(n);if(!(i>=0))throw new RangeError(`invalid digits: ${n}`);e=i}return t},()=>new S_(e)}function ml(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function _l(t){this._context=t}_l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Ro(t){return new _l(t)}function yl(t){return t[0]}function vl(t){return t[1]}function Io(t,e){var n=et(!0),i=null,r=Ro,o=null,s=gl(a);t=typeof t=="function"?t:t===void 0?yl:et(t),e=typeof e=="function"?e:e===void 0?vl:et(e);function a(l){var c,h=(l=ml(l)).length,u,f=!1,d;for(i==null&&(o=r(d=s())),c=0;c<=h;++c)!(c<h&&n(u=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+t(u,c,l),+e(u,c,l));if(d)return o=null,d+""||null}return a.x=function(l){return arguments.length?(t=typeof l=="function"?l:et(+l),a):t},a.y=function(l){return arguments.length?(e=typeof l=="function"?l:et(+l),a):e},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:et(!!l),a):n},a.curve=function(l){return arguments.length?(r=l,i!=null&&(o=r(i)),a):r},a.context=function(l){return arguments.length?(l==null?i=o=null:o=r(i=l),a):i},a}function T_(t,e,n){var i=null,r=et(!0),o=null,s=Ro,a=null,l=gl(c);t=typeof t=="function"?t:t===void 0?yl:et(+t),e=typeof e=="function"?e:et(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?vl:et(+n);function c(u){var f,d,p,g=(u=ml(u)).length,m,v=!1,y,x=new Array(g),_=new Array(g);for(o==null&&(a=s(y=l())),f=0;f<=g;++f){if(!(f<g&&r(m=u[f],f,u))===v)if(v=!v)d=f,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),p=f-1;p>=d;--p)a.point(x[p],_[p]);a.lineEnd(),a.areaEnd()}v&&(x[f]=+t(m,f,u),_[f]=+e(m,f,u),a.point(i?+i(m,f,u):x[f],n?+n(m,f,u):_[f]))}if(y)return a=null,y+""||null}function h(){return Io().defined(r).curve(s).context(o)}return c.x=function(u){return arguments.length?(t=typeof u=="function"?u:et(+u),i=null,c):t},c.x0=function(u){return arguments.length?(t=typeof u=="function"?u:et(+u),c):t},c.x1=function(u){return arguments.length?(i=u==null?null:typeof u=="function"?u:et(+u),c):i},c.y=function(u){return arguments.length?(e=typeof u=="function"?u:et(+u),n=null,c):e},c.y0=function(u){return arguments.length?(e=typeof u=="function"?u:et(+u),c):e},c.y1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:et(+u),c):n},c.lineX0=c.lineY0=function(){return h().x(t).y(e)},c.lineY1=function(){return h().x(t).y(n)},c.lineX1=function(){return h().x(i).y(e)},c.defined=function(u){return arguments.length?(r=typeof u=="function"?u:et(!!u),c):r},c.curve=function(u){return arguments.length?(s=u,o!=null&&(a=s(o)),c):s},c.context=function(u){return arguments.length?(u==null?o=a=null:a=s(o=u),c):o},c}function te(){}function Di(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function qi(t){this._context=t}qi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Di(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Di(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function C_(t){return new qi(t)}function xl(t){this._context=t}xl.prototype={areaStart:te,areaEnd:te,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Di(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function M_(t){return new xl(t)}function bl(t){this._context=t}bl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:Di(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function A_(t){return new bl(t)}function wl(t,e){this._basis=new qi(t),this._beta=e}wl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i=t[0],r=e[0],o=t[n]-i,s=e[n]-r,a=-1,l;++a<=n;)l=a/n,this._basis.point(this._beta*t[a]+(1-this._beta)*(i+l*o),this._beta*e[a]+(1-this._beta)*(r+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const $_=(function t(e){function n(i){return e===1?new qi(i):new wl(i,e)}return n.beta=function(i){return t(+i)},n})(.85);function Ei(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Lo(t,e){this._context=t,this._k=(1-e)/6}Lo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ei(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Ei(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const D_=(function t(e){function n(i){return new Lo(i,e)}return n.tension=function(i){return t(+i)},n})(0);function zo(t,e){this._context=t,this._k=(1-e)/6}zo.prototype={areaStart:te,areaEnd:te,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ei(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const E_=(function t(e){function n(i){return new zo(i,e)}return n.tension=function(i){return t(+i)},n})(0);function Bo(t,e){this._context=t,this._k=(1-e)/6}Bo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ei(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const N_=(function t(e){function n(i){return new Bo(i,e)}return n.tension=function(i){return t(+i)},n})(0);function Uo(t,e,n){var i=t._x1,r=t._y1,o=t._x2,s=t._y2;if(t._l01_a>aa){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>aa){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*c+t._y1*t._l23_2a-n*t._l12_2a)/h}t._context.bezierCurveTo(i,r,o,s,t._x2,t._y2)}function kl(t,e){this._context=t,this._alpha=e}kl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Uo(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const P_=(function t(e){function n(i){return e?new kl(i,e):new Lo(i,0)}return n.alpha=function(i){return t(+i)},n})(.5);function Sl(t,e){this._context=t,this._alpha=e}Sl.prototype={areaStart:te,areaEnd:te,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Uo(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const F_=(function t(e){function n(i){return e?new Sl(i,e):new zo(i,0)}return n.alpha=function(i){return t(+i)},n})(.5);function Tl(t,e){this._context=t,this._alpha=e}Tl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Uo(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const O_=(function t(e){function n(i){return e?new Tl(i,e):new Bo(i,0)}return n.alpha=function(i){return t(+i)},n})(.5);function Cl(t){this._context=t}Cl.prototype={areaStart:te,areaEnd:te,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function R_(t){return new Cl(t)}function ca(t){return t<0?-1:1}function la(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),s=(n-t._y1)/(r||i<0&&-0),a=(o*r+s*i)/(i+r);return(ca(o)+ca(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(a))||0}function ua(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function _r(t,e,n){var i=t._x0,r=t._y0,o=t._x1,s=t._y1,a=(o-i)/3;t._context.bezierCurveTo(i+a,r+a*e,o-a,s-a*n,o,s)}function Ni(t){this._context=t}Ni.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_r(this,this._t0,ua(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,_r(this,ua(this,n=la(this,t,e)),n);break;default:_r(this,this._t0,n=la(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Ml(t){this._context=new Al(t)}(Ml.prototype=Object.create(Ni.prototype)).point=function(t,e){Ni.prototype.point.call(this,e,t)};function Al(t){this._context=t}Al.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}};function I_(t){return new Ni(t)}function L_(t){return new Ml(t)}function $l(t){this._context=t}$l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var i=ha(t),r=ha(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[s],e[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function ha(t){var e,n=t.length-1,i,r=new Array(n),o=new Array(n),s=new Array(n);for(r[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)r[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(r[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)i=r[e]/o[e-1],o[e]-=i,s[e]-=i*s[e-1];for(r[n-1]=s[n-1]/o[n-1],e=n-2;e>=0;--e)r[e]=(s[e]-r[e+1])/o[e];for(o[n-1]=(t[n]+r[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function z_(t){return new $l(t)}function Ki(t,e){this._context=t,this._t=e}Ki.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function B_(t){return new Ki(t,.5)}function U_(t){return new Ki(t,0)}function W_(t){return new Ki(t,1)}function fa(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function H_(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?fa(Object(n),!0).forEach(function(i){V_(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fa(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function mn(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?mn=function(e){return typeof e}:mn=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mn(t)}function V_(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Pi(){return Pi=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Pi.apply(this,arguments)}function Y_(t,e){if(t){if(typeof t=="string")return da(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return da(t,e)}}function da(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Dl(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Y_(t))||e){n&&(t=n);var i=0,r=function(){};return{s:r,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:r}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
123
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,s=!1,a;return{s:function(){n=n.call(t)},n:function(){var l=n.next();return o=l.done,l},e:function(l){s=!0,a=l},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(s)throw a}}}}function X_(t,e){var n=[],i=[];function r(o,s){if(o.length===1)n.push(o[0]),i.push(o[0]);else{for(var a=Array(o.length-1),l=0;l<a.length;l++)l===0&&n.push(o[0]),l===a.length-1&&i.push(o[l+1]),a[l]=[(1-s)*o[l][0]+s*o[l+1][0],(1-s)*o[l][1]+s*o[l+1][1]];r(a,s)}}return t.length&&r(t,e),{left:n,right:i.reverse()}}function G_(t){var e={};return t.length===4&&(e.x2=t[2][0],e.y2=t[2][1]),t.length>=3&&(e.x1=t[1][0],e.y1=t[1][1]),e.x=t[t.length-1][0],e.y=t[t.length-1][1],t.length===4?e.type="C":t.length===3?e.type="Q":e.type="L",e}function j_(t,e){e=e||2;for(var n=[],i=t,r=1/e,o=0;o<e-1;o++){var s=r/(1-r*o),a=X_(i,s);n.push(a.left),i=a.right}return n.push(i),n}function q_(t,e,n){var i=[[t.x,t.y]];return e.x1!=null&&i.push([e.x1,e.y1]),e.x2!=null&&i.push([e.x2,e.y2]),i.push([e.x,e.y]),j_(i,n).map(G_)}var K_=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,Pe={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(Pe).forEach(function(t){Pe[t.toLowerCase()]=Pe[t]});function Wr(t,e){for(var n=Array(t),i=0;i<t;i++)n[i]=e;return n}function Z_(t){return"".concat(t.type).concat(Pe[t.type].map(function(e){return t[e]}).join(","))}function Q_(t,e){var n={x1:"x",y1:"y",x2:"x",y2:"y"},i=["xAxisRotation","largeArcFlag","sweepFlag"];if(t.type!==e.type&&e.type.toUpperCase()!=="M"){var r={};Object.keys(e).forEach(function(o){var s=e[o],a=t[o];a===void 0&&(i.includes(o)?a=s:(a===void 0&&n[o]&&(a=t[n[o]]),a===void 0&&(a=0))),r[o]=a}),r.type=e.type,t=r}return t}function J_(t,e,n){var i=[];if(e.type==="L"||e.type==="Q"||e.type==="C")i=i.concat(q_(t,e,n));else{var r=Pi({},t);r.type==="M"&&(r.type="L"),i=i.concat(Wr(n-1).map(function(){return r})),i.push(e)}return i}function pa(t,e,n){var i=t.length-1,r=e.length-1,o=i/r,s=Wr(r).reduce(function(l,c,h){var u=Math.floor(o*h);if(n&&u<t.length-1&&n(t[u],t[u+1])){var f=o*h%1<.5;l[u]&&(f?u>0?u-=1:u<t.length-1&&(u+=1):u<t.length-1?u+=1:u>0&&(u-=1))}return l[u]=(l[u]||0)+1,l},[]),a=s.reduce(function(l,c,h){if(h===t.length-1){var u=Wr(c,Pi({},t[t.length-1]));return u[0].type==="M"&&u.forEach(function(f){f.type="L"}),l.concat(u)}return l.concat(J_(t[h],t[h+1],c))},[]);return a.unshift(t[0]),a}function ga(t){for(var e=(t||"").match(K_)||[],n=[],i,r,o=0;o<e.length;++o)if(i=Pe[e[o]],i){r={type:e[o]};for(var s=0;s<i.length;++s)r[i[s]]=+e[o+s+1];o+=i.length,n.push(r)}return n}function ty(t,e,n){var i=t==null?[]:t.slice(),r=e==null?[]:e.slice(),o=mn(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},s=o.excludeSegment,a=o.snapEndsToInput;if(!i.length&&!r.length)return function(){return[]};var l=(i.length===0||i[i.length-1].type==="Z")&&(r.length===0||r[r.length-1].type==="Z");i.length>0&&i[i.length-1].type==="Z"&&i.pop(),r.length>0&&r[r.length-1].type==="Z"&&r.pop(),i.length?r.length||r.push(i[0]):i.push(r[0]);var c=Math.abs(r.length-i.length);c!==0&&(r.length>i.length?i=pa(i,r,s):r.length<i.length&&(r=pa(r,i,s))),i=i.map(function(u,f){return Q_(u,r[f])});var h=i.map(function(u){return H_({},u)});return l&&(h.push({type:"Z"}),i.push({type:"Z"})),function(f){if(f===1&&a)return e??[];if(f===0)return i;for(var d=0;d<h.length;++d){var p=i[d],g=r[d],m=h[d],v=Dl(Pe[m.type]),y;try{for(v.s();!(y=v.n()).done;){var x=y.value;m[x]=(1-f)*p[x]+f*g[x],(x==="largeArcFlag"||x==="sweepFlag")&&(m[x]=Math.round(m[x]))}}catch(_){v.e(_)}finally{v.f()}}return h}}function Hr(t,e,n){var i=ga(t),r=ga(e),o=mn(n)==="object"?n:{excludeSegment:n,snapEndsToInput:!0},s=o.excludeSegment,a=o.snapEndsToInput;if(!i.length&&!r.length)return function(){return""};var l=ty(i,r,{excludeSegment:s,snapEndsToInput:a});return function(h){if(h===1&&a)return e??"";var u=l(h),f="",d=Dl(u),p;try{for(d.s();!(p=d.n()).done;){var g=p.value;f+=Z_(g)}}catch(m){d.e(m)}finally{d.f()}return f}}var Zi=(t=>(t.Basis="basis",t.BasisClosed="basisClosed",t.BasisOpen="basisOpen",t.Bundle="bundle",t.Cardinal="cardinal",t.CardinalClosed="cardinalClosed",t.CardinalOpen="cardinalOpen",t.CatmullRom="catmullRom",t.CatmullRomClosed="catmullRomClosed",t.CatmullRomOpen="catmullRomOpen",t.Linear="linear",t.LinearClosed="linearClosed",t.MonotoneX="monotoneX",t.MonotoneY="monotoneY",t.Natural="natural",t.Step="step",t.StepAfter="stepAfter",t.StepBefore="stepBefore",t))(Zi||{});const Fi={basis:C_,basisClosed:M_,basisOpen:A_,bundle:$_,cardinal:D_,cardinalClosed:E_,cardinalOpen:N_,catmullRom:P_,catmullRomClosed:F_,catmullRomOpen:O_,linear:Ro,linearClosed:R_,monotoneX:I_,monotoneY:L_,natural:z_,step:B_,stepAfter:W_,stepBefore:U_},ey={...Ze,curveType:Zi.MonotoneX,lineWidth:2,lineDashArray:void 0,fallbackValue:void 0,highlightOnHover:!1,cursor:null,interpolateMissingData:!1},ny=qe`
|
|
124
|
+
:root {
|
|
125
|
+
--vis-line-cursor: default;
|
|
126
|
+
--vis-line-stroke-dasharray: none;
|
|
127
|
+
--vis-line-stroke-dashoffset: 0;
|
|
128
|
+
|
|
129
|
+
--vis-line-gapfill-stroke-dasharray: 2 3;
|
|
130
|
+
--vis-line-gapfill-stroke-opacity: 0.8;
|
|
131
|
+
--vis-line-gapfill-stroke-dashoffset: 0;
|
|
132
|
+
}
|
|
133
|
+
`,iy=P`
|
|
134
|
+
label: line-component;
|
|
135
|
+
`,un=P`
|
|
136
|
+
label: line;
|
|
137
|
+
transition: opacity 200ms;
|
|
138
|
+
cursor: var(--vis-line-cursor);
|
|
139
|
+
`,Vr=P`
|
|
140
|
+
label: linePath;
|
|
141
|
+
fill: none;
|
|
142
|
+
stroke-dasharray: var(--vis-line-stroke-dasharray);
|
|
143
|
+
stroke-dashoffset: var(--vis-line-stroke-dashoffset);
|
|
144
|
+
`,Yr=P`
|
|
145
|
+
label: lineSelectionHelper;
|
|
146
|
+
fill: none;
|
|
147
|
+
stroke: rgba(0, 0, 0, 0);
|
|
148
|
+
stroke-width: 8px;
|
|
149
|
+
`,Xr=P`
|
|
150
|
+
opacity: 0.2;
|
|
151
|
+
`,Gr=P`
|
|
152
|
+
label: interpolated-path;
|
|
153
|
+
fill: none;
|
|
154
|
+
stroke-dasharray: var(--vis-line-gapfill-stroke-dasharray);
|
|
155
|
+
stroke-dashoffset: var(--vis-line-gapfill-stroke-dashoffset);
|
|
156
|
+
stroke-opacity: var(--vis-line-gapfill-stroke-opacity);
|
|
157
|
+
`,ry=Object.freeze(Object.defineProperty({__proto__:null,dim:Xr,globalStyles:ny,interpolatedPath:Gr,line:un,linePath:Vr,lineSelectionHelper:Yr,root:iy},Symbol.toStringTag,{value:"Module"})),El=class Nl extends On{constructor(e){super(),this._defaultConfig=ey,this.config=this._defaultConfig,this.curve=Fi[Zi.MonotoneX],this.events={[Nl.selectors.line]:{mouseover:this._highlight.bind(this),mouseleave:this._resetHighlight.bind(this)}},this.setConfig(e)}get bleed(){const{config:{lineWidth:e}}=this,n=this.yScale.domain(),r=(this.yScale.range()[0]>this.yScale.range()[1]?Wt.North:Wt.South)===Wt.South,o=e>3,s=e>=10;return{top:!s&&(!r&&n[1]===0||r&&n[0]===0)?0:e/2,bottom:!s&&(!r&&n[0]===0||r&&n[1]===0)?0:e/2,left:o?e/2:0,right:o?e/2:0}}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=st(e)?e:n.duration,o={colorFn:this._colorFunction};this.curve=Fi[n.curveType],this.lineGen=Io().x(f=>f.x).y(f=>f.y).defined(f=>f.defined).curve(this.curve);const s=Ht(n.y)?n.y:[n.y],a=i.map((f,d)=>this.xScale(F(f,n.x,d))),l=s.map(f=>{const d=i.map((y,x)=>{const _=F(y,f,x),b=(st(_)||_===null)&&isFinite(_)?_:n.fallbackValue,w=n.interpolateMissingData?(st(_)||_===null)&&isFinite(_):isFinite(b);return{x:a[x],y:this.yScale(b??0),defined:w,value:b}}),p=d.reduce((y,x)=>x.defined||y,!1);let g=!1;const m=d.reduce((y,x,_)=>{!x.defined&&isFinite(n.fallbackValue)&&y.push({...x,defined:!0}),!x.defined&&!g&&(g=!0);const b=_>0&&!d[_-1].defined||_<d.length-1&&!d[_+1].defined;return x.defined&&b&&(g||y.push({...x,defined:!1}),y.push(x),g=!1),y},[]),v=p&&d.some(y=>y.value!==null);return{values:d,defined:p,gaps:m,visible:v}}),c=this.g.selectAll(`.${un}`).data(l),h=c.enter().append("g").attr("class",un);h.append("path").attr("class",Vr).attr(We,(f,d)=>d).attr("stroke",(f,d)=>wt(i,n.color,d,n.colorKeys?.[d],o)).attr("stroke-opacity",0).attr("stroke-width",n.lineWidth),h.append("path").attr("class",Yr).attr("d",this._emptyPath()),h.append("path").attr("class",Gr).attr("d",this._emptyPath()).style("opacity",0);const u=h.merge(c);u.style("cursor",(f,d)=>yn(i,n.cursor,d)),u.each((f,d,p)=>{const g=mt(p[d]),m=g.select(`.${Vr}`),v=g.select(`.${Yr}`),y=g.select(`.${Gr}`),x=f.visible,_=wt(i,n.color,d,n.colorKeys?.[d],o),b=Xc($e(i,n.pattern,d),_,m.node()),S=Xe(i,n.lineDashArray,d)?.join(" ")??b?.dashArray??null;m.style("marker",b?.marker??null);const A=j(m,r).attr("stroke",_).attr("stroke-width",n.lineWidth).attr("stroke-opacity",x?1:0).style("stroke-dasharray",S),$=f.values.some(B=>!B.defined),V=this.lineGen(f.values);if(r&&!$){const B=m.attr("d")||this._emptyPath(),M=V||this._emptyPath();A.attrTween("d",()=>Hr(B,M))}else f.visible&&A.attr("d",V);v.attr("d",V).attr("visibility",x?null:"hidden"),$&&n.interpolateMissingData?j(y,r).attr("d",this.lineGen(f.gaps)).attr("stroke",wt(i,n.color,d,n.colorKeys?.[d],o)).attr("stroke-width",n.lineWidth-1).style("opacity",1):y.transition().duration(r).style("opacity",0)}),j(c.exit(),r).style("opacity",0).remove()}_emptyPath(){const e=this.xScale.range(),n=this.yScale.range();return`M${e[0]},${n[0]} L${e[1]},${n[0]}`}_highlight(e){const{config:n}=this;n.highlightOnHover&&this.g.selectAll(`.${un}`).classed(Xr,i=>i!==e)}_resetHighlight(){const{config:e}=this;e.highlightOnHover&&this.g.selectAll(`.${un}`).classed(Xr,!1)}};El.selectors=ry;let oy=El;function sy({x:t,y:e,w:n,h:i,tl:r=!1,tr:o=!1,bl:s=!1,br:a=!1,r:l=0}){let c;c=`M${t+l},${e}h${n-2*l}`;let h=o?l:0,u=o?0:l;return c+=`a${h},${h} 0 0 1 ${h},${h}`,c+=`h${u}v${u}`,c+=`v${i-2*l}`,h=a?l:0,u=a?0:l,c+=`a${h},${h} 0 0 1 ${-h},${h}`,c+=`v${u}h${-u}`,c+=`h${2*l-n}`,h=s?l:0,u=s?0:l,c+=`a${h},${h} 0 0 1 ${-h},${-h}`,c+=`h${-u}v${-u}`,c+=`v${2*l-i}`,h=r?l:0,u=r?0:l,c+=`a${h},${h} 0 0 1 ${h},${-h}`,c+=`v${-u}h${u}`,c+="z",c}const ay={...Ze,color:void 0,pattern:void 0,barStyle:void 0,baseline:void 0,barMaxWidth:void 0,barWidth:void 0,dataStep:void 0,barPadding:0,roundedCorners:2,cursor:null,barMinHeight1Px:!1,barMinHeightZeroValue:null,orientation:Oo.Vertical},cy=new Set(["fill","opacity","cursor","mask"]),Pl=P`
|
|
158
|
+
label: stacked-bar-component;
|
|
159
|
+
`,ly=qe`
|
|
160
|
+
:root {
|
|
161
|
+
--vis-stacked-bar-cursor: default;
|
|
162
|
+
--vis-stacked-bar-fill-color: var(--vis-color-main);
|
|
163
|
+
--vis-stacked-bar-stroke-color: none;
|
|
164
|
+
--vis-stacked-bar-stroke-width: 0px;
|
|
165
|
+
--vis-stacked-bar-hover-stroke-width: none;
|
|
166
|
+
--vis-stacked-bar-hover-stroke-color: none;
|
|
167
|
+
|
|
168
|
+
/* Dark Theme */
|
|
169
|
+
--vis-dark-stacked-bar-stroke-color: none;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
${Le} ${`.${Pl}`} {
|
|
173
|
+
--vis-stacked-bar-stroke-color: var(--vis-dark-stacked-bar-stroke-color);
|
|
174
|
+
}
|
|
175
|
+
`,ri=P`
|
|
176
|
+
label: bar;
|
|
177
|
+
fill: var(--vis-stacked-bar-fill-color);
|
|
178
|
+
stroke: var(--vis-stacked-bar-stroke-color);
|
|
179
|
+
stroke-width: var(--vis-stacked-bar-stroke-width);
|
|
180
|
+
cursor: var(--vis-stacked-bar-cursor);
|
|
181
|
+
|
|
182
|
+
&:hover {
|
|
183
|
+
stroke-width: var(--vis-stacked-bar-hover-stroke-width);
|
|
184
|
+
stroke: var(--vis-stacked-bar-hover-stroke-color);
|
|
185
|
+
}
|
|
186
|
+
`,jr=P`
|
|
187
|
+
label: barGroup;
|
|
188
|
+
`,Fl=P`
|
|
189
|
+
label: barGroupExit;
|
|
190
|
+
`,uy=Object.freeze(Object.defineProperty({__proto__:null,bar:ri,barGroup:jr,barGroupExit:Fl,globalStyles:ly,root:Pl},Symbol.toStringTag,{value:"Module"})),Ol=class extends On{constructor(e){super(),this._defaultConfig=ay,this.config=this._defaultConfig,this.getAccessors=()=>Ht(this.config.y)?this.config.y:[this.config.y],this.stacked=!0,this.events={},this._barData=[],this.setConfig(e)}get bleed(){if(this._barData=this._getVisibleData(),this._barData.length===0)return{top:0,bottom:0,left:0,right:0};const e=!this.isVertical()&&this.dataScale.range()[0]>this.dataScale.range()[1],n=this.dataScale.domain(),i=this._getBarWidth()/2,r=this._barData.map((d,p)=>F(d,this.config.x,p)),o=fn(r),s=kr(r),a=this.dataScale(o),l=this.dataScale(s),c=this.dataScale.invert(a+(e?i:-i)),h=this.dataScale.invert(l+(e?-i:i)),u=c<=n[0]?this.dataScale(n[0])-this.dataScale(c):0,f=h>n[1]?this.dataScale(h)-this.dataScale(n[1]):0;return{top:this.isVertical()?0:e?-f:u,bottom:this.isVertical()?0:e?-u:f,left:this.isVertical()?u:0,right:this.isVertical()?f:0}}get dataScale(){return this.isVertical()?this.xScale:this.yScale}get valueScale(){return this.isVertical()?this.yScale:this.xScale}isVertical(){return this.config.orientation===Oo.Vertical}_render(e){const{config:n}=this,i=st(e)?e:n.duration,r={colorFn:this._colorFunction},o=this.getAccessors(),s=Wa(this._barData,n.baseline,o,this._prevNegative);this._prevNegative=s.map(m=>!!m.isMostlyNegative);const a=this.g.selectAll(`.${jr}`).data(this._barData,(m,v)=>`${yn(m,n.id,v)??v}`),l=(m,v)=>{const y=this.dataScale(F(m,n.x,v)),x=this.isVertical()?y:0,_=this.isVertical()?0:y;return`translate(${x},${_})`},c=a.enter().append("g").attr("class",jr).attr("transform",l).style("opacity",1),h=c.merge(a);j(h,i).attr("transform",l).style("opacity",1);const u=a.exit().attr("class",Fl);j(u,i).style("opacity",0).remove().on("interrupt",function(){this.remove()}),j(u.selectAll(`.${ri}`),i).attr("transform",this.isVertical()?`translate(0,${this._height/3})`:`translate(${this._width/6},0)`);const f=h.selectAll(`.${ri}`).data((m,v)=>{const y=s.map((x,_)=>({datum:m,index:v,stacked:x[v],stackIndex:_})).filter(x=>{if(x.stacked[0]!==x.stacked[1])return!0;if(!n.barMinHeight1Px)return!1;const _=F(x.datum,o[x.stackIndex],x.index);return isFinite(_)&&_!==n.barMinHeightZeroValue});return y.forEach((x,_)=>{x.isEnding=_===y.length-1||_<=y.length-1&&y[_+1].stacked[0]!==x.stacked[1],x.isStarting=!y.some(b=>b!==x&&b.stacked[1]===x.stacked[0])}),y},m=>m.stackIndex),d=new Set(c.nodes()),g=f.enter().append("path").attr("class",ri).attr("d",(m,v,y)=>this._getBarPath(m,!0,d.has(y[v].parentNode))).attr(We,m=>m.stackIndex).style("fill",m=>this._getBarStyle(m)?.fill??wt(m.datum,n.color,m.stackIndex,n.colorKeys?.[m.stackIndex],r)).style("mask",m=>this._getBarStyle(m)?.mask??Ti($e(m.datum,n.pattern,m.stackIndex))).merge(f);g.style("mask",m=>this._getBarStyle(m)?.mask??Ti($e(m.datum,n.pattern,m.stackIndex))),f_(g,m=>this._getBarStyle(m),cy),j(g,i).attr("d",m=>this._getBarPath(m)).style("opacity",m=>this._getBarStyle(m)?.opacity??1).style("fill",m=>this._getBarStyle(m)?.fill??wt(m.datum,n.color,m.stackIndex,n.colorKeys?.[m.stackIndex],r)).style("cursor",m=>this._getBarStyle(m)?.cursor??yn(m.datum,n.cursor,m.stackIndex)),j(f.exit(),i).style("opacity",0).remove()}_getBarWidth(){const{config:e,datamodel:{data:n}}=this;if(Lf(n))return 0;if(e.barWidth)return fn([e.barWidth,e.barMaxWidth]);const i=this.dataScale.bandwidth,r=this.dataScale.domain?this.dataScale.domain():[];let s=1+(i?r.length:r[1]-r[0])/e.dataStep||!i&&n.filter((c,h)=>{const u=F(c,e.x,h);return u>=r[0]&&u<=r[1]}).length||n.length;!i&&s>=2&&(s+=1);const l=(s<2?1:1-e.barPadding)*(this.isVertical()?this._width:this._height)/s;return fn([l,e.barMaxWidth])}_getVisibleData(){const{config:e,datamodel:{data:n}}=this,i=this._getBarWidth(),r=n.length<2?0:i/2,o=this.dataScale,s=Math.abs(o.invert(r)-o.invert(0));return n?.filter((l,c)=>{const h=F(l,e.x,c),u=o.domain(),f=+u[0],d=+u[1];return h>=f-s&&h<=d+s})}_getBarStyle(e){return Xe(e.datum,this.config.barStyle,e.stackIndex)}_getBarPath(e,n=!1,i=!0){const{config:r}=this,o=this.getAccessors(),s=this._getBarWidth(),a=e.stacked[1]<e.stacked[0],l=e.isEnding,c=F(e.datum,o[e.stackIndex],e.index),h=n?0:Math.abs(this.valueScale(e.stacked[0])-this.valueScale(e.stacked[1])),u=!n&&r.barMinHeight1Px&&h<1&&isFinite(c)&&c!==r.barMinHeightZeroValue?1:h,f=r.baseline&&F(e.datum,r.baseline,e.index)||0,d=n?this.valueScale(i?f:e.stacked[0]):this.valueScale(a?e.stacked[0]:e.stacked[1])-(h<1&&r.barMinHeight1Px?1:0),p=-s/2,g=s,m=r.roundedCorners?st(r.roundedCorners)?+r.roundedCorners:g/2:0,v=xt(m,0,Math.min(h,g)/2),y=this.yScale.range()[0]>this.yScale.range()[1],x=l,_=e.isStarting&&e.stacked[0]!==0,b=!a&&y||a&&!y,w=a;return sy({x:this.isVertical()?p:d-u,y:this.isVertical()?d+(y?0:-u):p,w:this.isVertical()?g:u,h:this.isVertical()?u:g,tl:this.isVertical()?b?x:_:w?x:_,tr:this.isVertical()?b?x:_:w?_:x,br:this.isVertical()?b?_:x:w?_:x,bl:this.isVertical()?b?_:x:w?x:_,r:v})}_mapEventDatum(e){return{datum:{...e,...e.datum},index:e.index}}getValueScaleExtent(e){const{config:n,datamodel:i}=this,r=this.getAccessors(),o=e?this._getVisibleData():i.data;return Ba(o,n.baseline,...r)}getDataScaleExtent(){const{config:e,datamodel:n}=this;return jn(n.data,e.x)}getYDataExtent(e){return this.isVertical()?this.getValueScaleExtent(e):this.getDataScaleExtent()}getXDataExtent(){return this.isVertical()?this.getDataScaleExtent():this.getValueScaleExtent(!1)}};Ol.selectors=uy;let hy=Ol;function Rl(t,e){const n="--vis-",i=Object.entries(t);return Object.fromEntries(i.map(([r])=>[i_(r.replace(n,"")),r]))}function Il(t,e){qe({":root":t,[`${Le} .${e}`]:Object.keys(t).filter(n=>n.includes("--vis-dark")).map(n=>({[n.replace("--vis-dark","--vis")]:`var(${n})`}))})}function fy(t){return t}var oi=1,si=2,qr=3,hn=4,ma=1e-6;function dy(t){return"translate("+t+",0)"}function py(t){return"translate(0,"+t+")"}function gy(t){return e=>+t(e)}function my(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function _y(){return!this.__axis}function Qi(t,e){var n=[],i=null,r=null,o=6,s=6,a=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===oi||t===hn?-1:1,h=t===hn||t===si?"x":"y",u=t===oi||t===qr?dy:py;function f(d){var p=i??(e.ticks?e.ticks.apply(e,n):e.domain()),g=r??(e.tickFormat?e.tickFormat.apply(e,n):fy),m=Math.max(o,0)+a,v=e.range(),y=+v[0]+l,x=+v[v.length-1]+l,_=(e.bandwidth?my:gy)(e.copy(),l),b=d.selection?d.selection():d,w=b.selectAll(".domain").data([null]),S=b.selectAll(".tick").data(p,e).order(),A=S.exit(),$=S.enter().append("g").attr("class","tick"),V=S.select("line"),B=S.select("text");w=w.merge(w.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge($),V=V.merge($.append("line").attr("stroke","currentColor").attr(h+"2",c*o)),B=B.merge($.append("text").attr("fill","currentColor").attr(h,c*m).attr("dy",t===oi?"0em":t===qr?"0.71em":"0.32em")),d!==b&&(w=w.transition(d),S=S.transition(d),V=V.transition(d),B=B.transition(d),A=A.transition(d).attr("opacity",ma).attr("transform",function(M){return isFinite(M=_(M))?u(M+l):this.getAttribute("transform")}),$.attr("opacity",ma).attr("transform",function(M){var D=this.parentNode.__axis;return u((D&&isFinite(D=D(M))?D:_(M))+l)})),A.remove(),w.attr("d",t===hn||t===si?s?"M"+c*s+","+y+"H"+l+"V"+x+"H"+c*s:"M"+l+","+y+"V"+x:s?"M"+y+","+c*s+"V"+l+"H"+x+"V"+c*s:"M"+y+","+l+"H"+x),S.attr("opacity",1).attr("transform",function(M){return u(_(M)+l)}),V.attr(h+"2",c*o),B.attr(h,c*m).text(g),b.filter(_y).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===si?"start":t===hn?"end":"middle"),b.each(function(){this.__axis=_})}return f.scale=function(d){return arguments.length?(e=d,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(d){return arguments.length?(n=d==null?[]:Array.from(d),f):n.slice()},f.tickValues=function(d){return arguments.length?(i=d==null?null:Array.from(d),f):i&&i.slice()},f.tickFormat=function(d){return arguments.length?(r=d,f):r},f.tickSize=function(d){return arguments.length?(o=s=+d,f):o},f.tickSizeInner=function(d){return arguments.length?(o=+d,f):o},f.tickSizeOuter=function(d){return arguments.length?(s=+d,f):s},f.tickPadding=function(d){return arguments.length?(a=+d,f):a},f.offset=function(d){return arguments.length?(l=+d,f):l},f}function yy(t){return Qi(oi,t)}function vy(t){return Qi(si,t)}function xy(t){return Qi(qr,t)}function by(t){return Qi(hn,t)}function Ll(t,e={}){const{tolerance:n=0,priorities:i}=e,r=t.length,o=new Array(r).fill(!0);if(r<2)return o;let s=1/0,a=-1/0,l=1/0,c=-1/0;for(const m of t){const v=m.x+m.width/2,y=m.y+m.height/2;v<s&&(s=v),v>a&&(a=v),y<l&&(l=y),y>c&&(c=y)}const h=a-s>=c-l,u=m=>h?m.x:m.y,f=m=>h?m.x+m.width:m.y+m.height,d=m=>i?.[m]??0,p=t.map((m,v)=>v).sort((m,v)=>u(t[m])-u(t[v])),g=[];for(const m of p){const v=u(t[m]);for(let _=g.length-1;_>=0;_-=1)f(t[g[_]])-3*n<v&&g.splice(_,1);const y=[];let x=!1;for(const _ of g)if(ja(t[m],t[_],n)){if(d(_)>=d(m)){x=!0;break}y.push(_)}if(x)o[m]=!1;else{for(const _ of y)o[_]=!1,g.splice(g.indexOf(_),1);g.push(m)}}return o}function wy(t,e={}){const n=t.nodes();if(n.length<2){t.style("opacity",1);return}const i=n.map(o=>{const{x:s,y:a,width:l,height:c}=o.getBoundingClientRect();return{x:s,y:a,width:l,height:c}}),r=Ll(i,e);n.forEach((o,s)=>mt(o).style("opacity",r[s]?1:0))}const Te=t=>String(+t),ky=(t,e)=>{const n=new Set(t.map(Te)),i=e.filter(r=>!n.has(Te(r)));return i.length?[...t,...i].sort((r,o)=>+r-+o):t};function Sy(t,e,n=t.ticks(e)){if(n.length<2||n[0]instanceof Date)return n;const i=n[1]-n[0],r=Math.floor(Math.log10(i)),o=i/Math.pow(10,r);return Math.round(o)!==2?n:t.ticks(e*2)}function Ty(t,e){const n=[];for(let i=e;i>=1;i-=1){const r=t.ticks(i),o=n[n.length-1];(!o||!he(r,o))&&n.push(r)}return n}function Cy(t){const e=[];for(let n=1;n<=t.length;n+=1){const i=t.filter((o,s)=>s%n===0),r=e[e.length-1];(!r||i.length<r.length)&&e.push(i)}return e}function My(t,e){const n=[];for(let i=0;i<t.length-1;i+=1)ja(t[i],t[i+1],e)&&n.push(i);return n}function Ay(t,e,n=0){const i=o=>Ll(o,{tolerance:n}).every(s=>s);for(const o of t){const s=e(o);if(i(s))return{fittedTicks:o,labeledTicks:o};const a=My(s,n),l=0,c=s.length-2;if(!(a.length>0&&a.every(f=>f===l||f===c)))continue;const u=[...o];if(a.includes(c)&&u.pop(),a.includes(l)&&u.shift(),u.length||u.push(o[0]),i(e(u)))return{fittedTicks:o,labeledTicks:u}}const r=t[t.length-1];return r&&{fittedTicks:r,labeledTicks:r}}const $y={...Ze,position:void 0,type:void 0,label:void 0,labelFontSize:null,labelTextFitMode:Lt.Wrap,labelTextTrimType:le.Middle,labelTextSeparator:void 0,gridLine:!0,tickLine:!0,domainLine:!0,numTicks:void 0,tickSpacing:175,minMaxTicksOnly:!1,minMaxTicksOnlyWhenWidthIsLess:250,minMaxTicksOnlyShowGridLines:!1,tickTextWidth:void 0,tickTextSeparator:void 0,tickTextForceWordBreak:!1,tickTextTrimType:le.Middle,tickTextFitMode:Lt.Wrap,tickTextFontSize:null,tickTextAlign:void 0,tickTextColor:null,tickTextAngle:void 0,labelMargin:8,labelColor:null,tickFormat:void 0,tickValues:void 0,fullSize:!0,tickPadding:8,tickSize:6,tickTextAdaptiveSets:void 0,tickTextHideOverlapping:void 0},zl=P`
|
|
191
|
+
label: axis-component;
|
|
192
|
+
`,Wo={"--vis-axis-font-family":void 0,"--vis-axis-tick-color":"#e8e9ef","--vis-axis-domain-color":void 0,"--vis-axis-domain-line-dasharray":void 0,"--vis-axis-grid-color":"#e8e9ef","--vis-axis-grid-line-width":"1px","--vis-axis-grid-line-dasharray":"none","--vis-axis-grid-opacity":"1","--vis-axis-grid-transition":"none","--vis-axis-label-font-size":"14px","--vis-axis-label-color":"#6c778c","--vis-axis-label-weight":"500","--vis-axis-tick-label-color":"#6c778c","--vis-axis-tick-label-font-size":"12px","--vis-axis-tick-label-weight":"500","--vis-axis-tick-label-cursor":"default","--vis-axis-tick-label-text-decoration":"none","--vis-axis-tick-line-width":"1px","--vis-axis-tick-label-hide-transition":"opacity 400ms ease-in-out","--vis-axis-domain-line-width":void 0,"--vis-dark-axis-tick-color":"#6c778c","--vis-dark-axis-domain-color":void 0,"--vis-dark-axis-tick-label-color":"#e8e9ef","--vis-dark-axis-grid-color":"#6c778c","--vis-dark-axis-label-color":"#fefefe"},W=Rl(Wo);Il(Wo,zl);const Ho=P`
|
|
193
|
+
label: hide-tick-line;
|
|
194
|
+
`,Vo=P`
|
|
195
|
+
label: hide-domain;
|
|
196
|
+
`,Bl=P`
|
|
197
|
+
label: axis;
|
|
198
|
+
|
|
199
|
+
user-select: none;
|
|
200
|
+
|
|
201
|
+
.domain {
|
|
202
|
+
stroke: var(${W.axisDomainColor}, var(${W.axisTickColor}));
|
|
203
|
+
stroke-width: var(${W.axisDomainLineWidth}, var(${W.axisGridLineWidth}));
|
|
204
|
+
stroke-dasharray: var(${W.axisDomainLineDasharray}, var(${W.axisGridLineDasharray}));
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
&${`.${Ho}`} {
|
|
208
|
+
.tick > line {
|
|
209
|
+
opacity: 0;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&${`.${Vo}`} {
|
|
214
|
+
.domain {
|
|
215
|
+
opacity: 0;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
`,Ul=P`
|
|
219
|
+
label: grid;
|
|
220
|
+
|
|
221
|
+
.domain {
|
|
222
|
+
opacity: 0;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
line {
|
|
226
|
+
stroke: var(${W.axisGridColor});
|
|
227
|
+
stroke-width: var(${W.axisGridLineWidth});
|
|
228
|
+
stroke-dasharray: var(${W.axisGridLineDasharray});
|
|
229
|
+
opacity: var(${W.axisGridOpacity});
|
|
230
|
+
transition: var(${W.axisGridTransition});
|
|
231
|
+
}
|
|
232
|
+
`,Kr=P`
|
|
233
|
+
label: tick;
|
|
234
|
+
|
|
235
|
+
stroke: none;
|
|
236
|
+
font-size: var(${W.axisTickLabelFontSize});
|
|
237
|
+
font-weight: var(${W.axisTickLabelWeight});
|
|
238
|
+
|
|
239
|
+
line {
|
|
240
|
+
stroke: var(${W.axisTickColor});
|
|
241
|
+
stroke-width: var(${W.axisTickLineWidth});
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
text {
|
|
245
|
+
fill: var(${W.axisTickLabelColor});
|
|
246
|
+
cursor: var(${W.axisTickLabelCursor});
|
|
247
|
+
font-family: var(${W.axisFontFamily}, var(--vis-font-family));
|
|
248
|
+
text-decoration: var(${W.axisTickLabelTextDecoration});
|
|
249
|
+
stroke: none;
|
|
250
|
+
}
|
|
251
|
+
`,ai=P`
|
|
252
|
+
label: tick-text-exiting;
|
|
253
|
+
`,Wl=P`
|
|
254
|
+
label: grid-tick-hidden;
|
|
255
|
+
opacity: 0;
|
|
256
|
+
transition: var(${W.axisTickLabelHideTransition});
|
|
257
|
+
`,Zr=P`
|
|
258
|
+
label: tick-text-hidden;
|
|
259
|
+
opacity: 0;
|
|
260
|
+
transition: var(${W.axisTickLabelHideTransition});
|
|
261
|
+
`,Qr=P`
|
|
262
|
+
label: label;
|
|
263
|
+
fill: var(${W.axisLabelColor});
|
|
264
|
+
font-size: var(${W.axisLabelFontSize});
|
|
265
|
+
font-weight: var(${W.axisLabelWeight});
|
|
266
|
+
font-family: var(${W.axisFontFamily}, var(--vis-font-family));
|
|
267
|
+
text-anchor: middle;
|
|
268
|
+
`,Jr=P`
|
|
269
|
+
label: tick-label;
|
|
270
|
+
`,Hl=P`
|
|
271
|
+
label: tick-label-hideable;
|
|
272
|
+
opacity: 0;
|
|
273
|
+
transition: var(${W.axisTickLabelHideTransition});
|
|
274
|
+
`,Dy=Object.freeze(Object.defineProperty({__proto__:null,axis:Bl,cssVarDefaults:Wo,grid:Ul,gridTickHidden:Wl,hideDomain:Vo,hideTickLine:Ho,label:Qr,root:zl,tick:Kr,tickLabel:Jr,tickLabelHideable:Hl,tickTextExiting:ai,tickTextHidden:Zr,variables:W},Symbol.toStringTag,{value:"Module"})),_a=-5,Vl=class extends On{constructor(e){super(),this._defaultConfig=$y,this.config=this._defaultConfig,this._defaultNumTicks=3,this.events={},this.setConfig(e),this.g.attr("axis-type",this.config.type),this.axisGroup=this.g.append("g"),this.gridGroup=this.g.append("g").attr("class",Ul)}setConfig(e){e?.tickTextFontSize!==this.config.tickTextFontSize&&(this._tickTextStyleCached=void 0),super.setConfig(e)}preRender(){const{config:e}=this,n=this.g.append("g").attr("opacity",0);this._renderAxis(n,0,this._getFittingTickValues()?.fittedTicks),e.tickTextAlign&&this._alignTickLabels(n),this._axisRawBBox=n.node().getBBox(),this._renderAxisLabel(n),this._axisSizeBBox=this._getAxisSize(n),this._requiredMargin=this._getRequiredMargin(this._axisSizeBBox),n.remove()}getPosition(){const{config:{type:e,position:n}}=this;return n??(e===N.X?C.Bottom:C.Left)}_getAxisSize(e){return e.node().getBBox()}_getRequiredMargin(e=this._axisSizeBBox){const{config:{type:n,position:i}}=this;switch(n){case N.X:{const o=this._axisSizeBBox.x+this._axisSizeBBox.width,s=this._axisSizeBBox.x<0?Math.abs(this._axisSizeBBox.x):0,a=o-this._width>1?o-this._width:0;switch(i){case C.Top:return{top:e.height,left:s,right:a};case C.Bottom:default:return{bottom:e.height,left:s,right:a}}}case N.Y:{const r=e.height>this._height?(e.height-this._height)/2:0,o=r,s=r;switch(i){case C.Right:return{right:e.width,top:o,bottom:s};case C.Left:default:return{left:e.width,top:o,bottom:s}}}}}getRequiredMargin(){return this._requiredMargin}getOffset(e){const{config:{type:n,position:i}}=this;switch(n){case N.X:switch(i){case C.Top:return{top:e.top,left:e.left};case C.Bottom:default:return{top:e.top+this._height,left:e.left}}case N.Y:switch(i){case C.Right:return{top:e.top,left:e.left+this._width};case C.Left:default:return{top:e.top,left:e.left}}}}_render(e=this.config.duration,n=this.axisGroup){const{config:i}=this,r=this._getFittingTickValues(),o=r&&ky(r.originalTicks,r.fittedTicks),s=r&&new Set(r.labeledTicks.map(Te));if(this._renderAxis(n,e,o,s),this._renderAxisLabel(n),i.gridLine){const a=this._buildGrid(o);this.gridGroup.selectAll("*").interrupt(),j(this.gridGroup,e).call(a).style("opacity",1),this.gridGroup.selectAll("g.tick").classed(Wl,l=>s?!s.has(Te(l)):!1)}else j(this.gridGroup,e).style("opacity",0);i.tickTextAlign&&this._alignTickLabels(),this._resolveTickLabelOverlap(n)}_getAxisGen(){const{config:e}=this;switch(e.type){case N.X:switch(e.position){case C.Top:return yy(this.xScale);case C.Bottom:default:return xy(this.xScale)}case N.Y:switch(e.position){case C.Right:return vy(this.yScale);case C.Left:default:return by(this.yScale)}}}_buildAxis(){const{config:{tickPadding:e,tickSize:n}}=this,i=Array.isArray(n)?n[0]:n,r=Array.isArray(n)?n[1]:n,o=this._getNumTicks(),s=this._getAxisGen();return s.ticks(o).tickPadding(e).tickSizeInner(i).tickSizeOuter(r),s}_buildGrid(e){const{config:n}=this,i=this._getAxisGen();i.tickSize(n.type===N.X?-this._height:-this._width).tickSizeOuter(0).tickFormat(()=>"");const r=this._getNumTicks()*2,o=i.scale(),s=o.domain(),a=()=>{if(!n.minMaxTicksOnlyShowGridLines)return s;const c=o.ticks(r);if(c.length<2)return s;const h=+c[1]-+c[0],u=s[1];return+u-+c[c.length-1]>h/2?[...c,u]:c},l=e??(n.tickValues?this._getConfiguredTickValues():this._shouldRenderMinMaxTicksOnly()?a():o.ticks(r));return i.tickValues(l),i}_renderAxis(e=this.axisGroup,n=this.config.duration,i,r){const{config:o}=this,s=this._buildAxis(),a=s.scale(),l=i??(o.tickValues?this._getConfiguredTickValues():this._shouldRenderMinMaxTicksOnly()?a.domain():a.ticks(this._getNumTicks())),c=l.length;s.tickValues(l),e.selectAll("*").interrupt();const h=j(e,n).call(s);e.selectAll("text").attr("dy",null).attr("y",null),h.on("end",()=>{this._resolveTickLabelOverlap(e)}),e.selectAll("g.tick").classed(Kr,!0).style("font-size",o.tickTextFontSize);const f=e.selectAll("g.tick > text").filter(m=>l.some(v=>he(m,v))).classed(Jr,!0).classed(Hl,!!o.tickTextHideOverlapping).classed(Zr,m=>r?!r.has(Te(m)):!1).style("fill",o.tickTextColor);r&&f.filter(m=>!r.has(Te(m))).style("opacity",null),e.selectAll("g.tick > text").filter(m=>!l.some(v=>he(m,v))).classed(ai,!0),f.nodes().forEach(m=>Eo(m));const d=s.tickSize(),p=this.getPosition(),g=this._getTickTextMaxWidth(r?.size??c);if(f.each((m,v,y)=>{let x=o.tickFormat?.(m,v,l)??`${m}`;const _=y[v],b=this._getTickTextStyle(_),[w,S]=this._getTickTextOffset(p,d,b.fontSize),A={...this._getTickTextOptions(g),x:w,y:S};if(o.tickTextFitMode===Lt.Trim){const B=mt(_).text(x);ra(B,g,o.tickTextTrimType),x=mt(_).text()}const $={text:x,...b},V=o.type===N.X?"central":"hanging";h_(_,$,A,V)}),e.classed(Bl,!0).classed(Ho,!o.tickLine).classed(Vo,!o.domainLine),o.fullSize){const m=this._getFullDomainPath(0);j(e.select(".domain"),n).attr("d",m)}}_resolveTickLabelOverlap(e=this.axisGroup){const{config:n}=this,i=e.selectAll(`g.tick > text:not(.${ai}):not(.${Zr})`);if(!n.tickTextHideOverlapping){i.style("opacity",null);return}cancelAnimationFrame(this._collideTickLabelsAnimFrameId),this._collideTickLabelsAnimFrameId=requestAnimationFrame(()=>{wy(i,{tolerance:_a})})}_getFittingTickValues(){const{config:e}=this;if(!e.tickTextAdaptiveSets||this._shouldRenderMinMaxTicksOnly())return;const n=e.type===N.X?this.xScale:this.yScale,i=Math.ceil(this._getNumTicks()),r=this._getConfiguredTickValues(),o=r?Cy(r):Ty(n,i),s=Ay(o,l=>this._getTickLabelRects(l),_a);if(!s)return;const a=r??Sy(n,i,o[0]);return{...s,originalTicks:a}}_getTickTextMaxWidth(e){const{config:n}=this;return n.tickTextWidth||(n.type===N.X?this._containerWidth/(e+1):this._containerWidth/5)}_getTickTextOptions(e){const{config:n}=this;return{verticalAlign:n.type===N.X?De.Top:De.Middle,width:e,textRotationAngle:n.tickTextAngle,separator:n.tickTextSeparator,wordBreak:n.tickTextForceWordBreak,fastMode:!1}}_getTickLabelRects(e){const{config:n}=this,i=n.type===N.X,r=i?this.xScale:this.yScale,o=this._getTickTextStyle(),s=this._getTickTextOptions(this._getTickTextMaxWidth(e.length)),a=o.fontSize*ce.lineHeight,l=(n.tickTextAngle??0)/180*Math.PI;return e.map((c,h)=>{const u=n.tickFormat?.(c,h,e)??`${c}`;let f,d;if(n.tickTextFitMode===Lt.Trim){const b=Ne(u,o.fontFamily,o.fontSize,o.fontWeight);f=Math.min(b,s.width),d=a}else{const b=cl({text:u,...o},s.width,void 0,s.fastMode,s.separator,s.wordBreak),S=b.flatMap(A=>A._lines).map(A=>Ne(A,o.fontFamily,o.fontSize,o.fontWeight));f=Math.max(0,...S),d=ll(b)}const p=r(c),g=i?[p,0]:[0,p],m=ue(n.tickTextAlign)?n.tickTextAlign(c,h,e,g,this._width,this._height):n.tickTextAlign;let v;i?m===vt.Left?v=0:m===vt.Right?v=-f:v=-f/2:v=this.getPosition()===C.Left?-f:0;const y=i?-a/2:-d/2,x={x:v,y,width:f,height:d},_=l?Vf(x,l):x;return{..._,x:g[0]+_.x,y:g[1]+_.y}})}_getTickTextStyle(e){if(this._tickTextStyleCached)return this._tickTextStyleCached;const n=e?void 0:this.g.append("g").attr("class",Kr).style("font-size",this.config.tickTextFontSize),i=e??n.append("text").attr("class",Jr).node(),r=getComputedStyle(i);return this._tickTextStyleCached={fontSize:Number.parseFloat(r.fontSize),fontFamily:r.fontFamily,fontWeight:Number.parseFloat(r.fontWeight)||void 0},n?.remove(),this._tickTextStyleCached}_getNumTicks(){const{config:{type:e,numTicks:n,tickSpacing:i}}=this;if(n)return n;if(e===N.X){const r=this.xScale.range(),o=r[1]-r[0];return Math.max(1,Math.floor(o/i))}if(e===N.Y){const r=this.yScale.range(),o=Math.abs(r[0]-r[1]);return Math.max(1,Math.pow(o,.85)/25)}return this._defaultNumTicks}_getConfiguredTickValues(){const{config:e}=this,i=(e.type===N.X?this.xScale:this.yScale)?.domain();return e.tickValues?e.tickValues.filter(r=>r>=i[0]&&r<=i[1]):null}_shouldRenderMinMaxTicksOnly(){const{config:e}=this;return e.minMaxTicksOnly?!0:e.tickTextAdaptiveSets?!1:e.type===N.X&&this._width<e.minMaxTicksOnlyWhenWidthIsLess}_getFullDomainPath(e=0){const{config:{type:n}}=this;switch(n){case N.X:return`M0.5, ${e} V0.5 H${this._width+.5} V${e}`;case N.Y:return`M${-e}, ${this._height+.5} H0.5 V0.5 H${-e}`}}_renderAxisLabel(e=this.axisGroup){const{type:n,label:i,labelMargin:r,labelFontSize:o,labelTextFitMode:s,labelTextSeparator:a}=this.config;if(e.selectAll(`.${Qr}`).remove(),!i)return;const l=this.getPosition(),{width:c,height:h}=this._axisRawBBox??e.node().getBBox(),u=n===N.Y?-90:0,f=e.append("text").attr("class",Qr).attr("dy",`${this._getLabelDY()}em`).style("font-size",o).style("fill",this.config.labelColor);f.text(i);let d=!1;if(s===Lt.Wrap){const _=n===N.Y?this._height:this._width;$i(f.node())>_&&(c_(f,_,a),d=!0)}let p=c,g=h;if(s===Lt.Wrap){const _=f.node().getBBox();p=_.width,g=_.height}else{const _=n===N.X?p:g;ra(f,_,this.config.labelTextTrimType);const b=f.node().getBBox();p=b.width,g=b.height}const m=n===N.X?this._width/2:n===N.Y&&s===Lt.Wrap&&d?l===C.Left?-c-g/2-10:c:(-1)**+(l===C.Left)*c,v=n===N.Y?this._height/2:n===N.X&&s===Lt.Wrap?l===C.Top?-h-g/2:h:(-1)**+(l===C.Top)*h,y=n===N.X?0:(-1)**+(l===C.Left)*r,x=n===N.X?(-1)**+(l===C.Top)*r:0;f.attr("transform",`translate(${m+y},${v+x}) rotate(${u})`)}_getLabelDY(){const{type:e,position:n}=this.config;switch(e){case N.X:switch(n){case C.Top:return 0;case C.Bottom:default:return .75}case N.Y:switch(n){case C.Right:return .75;case C.Left:default:return-.25}}}_getTickTextOffset(e,n,i){const{config:r}=this,o=(r.tickTextAngle??0)/180*Math.PI,s=n+r.tickPadding;if(r.type===N.X){const a=e===C.Bottom?1:-1;return[a*s*Math.sin(o),a*(s+i/2)*Math.cos(o)]}else{const a=e===C.Right?1:-1;return[a*s*Math.cos(o),a*s*Math.sin(o)]}}_alignTickLabels(e=this.axisGroup){const{config:{type:n,tickTextAlign:i,tickTextAngle:r,position:o}}=this,s=e.selectAll(`g.tick > text:not(.${ai})`),a=s.data();s.each((l,c,h)=>{const u=h[c],f=a[c],d=n===N.X?[this.xScale(f),0]:[0,this.yScale(f)],p=ue(i)?i(f,c,a,d,this._width,this._height):i,g=n_(p),m=n===N.X?0:this._getYTickTextTranslate(p,o),v=r?`translate(${m},0) rotate(${r})`:`translate(${m},0)`;mt(u).attr("transform",v).attr("text-anchor",g)})}_getYTickTextTranslate(e,n=C.Left){const i=this.config.tickPadding+1,r=(this._axisRawBBox?.width??this.axisGroup.node()?.getBBox().width??0)-i;switch(e){case vt.Left:return n===C.Left?r*-1:0;case vt.Right:return n===C.Left?0:r;case vt.Center:return n===C.Left?r*-.5:r*.5;default:return 0}}_onDestroy(){cancelAnimationFrame(this._collideTickLabelsAnimFrameId)}};Vl.selectors=Dy;let Ey=Vl;var Yo=(t=>(t.X="x",t.XY="xy",t))(Yo||{});const Ny={...Ze,yStacked:void 0,baseline:null,duration:100,tooltip:void 0,template:(t,e,n,i)=>"",hideWhenFarFromPointer:!0,hideWhenFarFromPointerDistance:100,snapToData:!0,snapMode:Yo.X,getCircles:void 0,color:void 0,strokeColor:void 0,strokeWidth:void 0,circleRadius:4,showHorizontalLine:!1,onCrosshairMove:void 0,forceShowAt:void 0,skipRangeCheck:!1,visibilityThreshold:.35},Yl=P`
|
|
275
|
+
label: crosshair-component;
|
|
276
|
+
`,Xo={"--vis-crosshair-line-stroke-color":"#888","--vis-crosshair-line-stroke-width":"1px","--vis-crosshair-line-stroke-opacity":"1","--vis-crosshair-line-stroke-dasharray":"none","--vis-crosshair-circle-stroke-color":"#fff","--vis-crosshair-circle-stroke-width":"1px","--vis-crosshair-circle-stroke-opacity":"0.75"},kt=Rl(Xo);Il(Xo,Yl);const Xl=P`
|
|
277
|
+
stroke: var(${kt.crosshairLineStrokeColor});
|
|
278
|
+
stroke-width: var(${kt.crosshairLineStrokeWidth});
|
|
279
|
+
stroke-opacity: var(${kt.crosshairLineStrokeOpacity});
|
|
280
|
+
stroke-dasharray: var(${kt.crosshairLineStrokeDasharray});
|
|
281
|
+
pointer-events: none;
|
|
282
|
+
`,Gl=P`
|
|
283
|
+
stroke: var(${kt.crosshairLineStrokeColor});
|
|
284
|
+
stroke-width: var(${kt.crosshairLineStrokeWidth});
|
|
285
|
+
stroke-opacity: var(${kt.crosshairLineStrokeOpacity});
|
|
286
|
+
stroke-dasharray: var(${kt.crosshairLineStrokeDasharray});
|
|
287
|
+
pointer-events: none;
|
|
288
|
+
`,jl=P`
|
|
289
|
+
stroke: var(${kt.crosshairCircleStrokeColor});
|
|
290
|
+
stroke-width: var(${kt.crosshairCircleStrokeWidth});
|
|
291
|
+
stroke-opacity: var(${kt.crosshairCircleStrokeOpacity});
|
|
292
|
+
pointer-events: none;
|
|
293
|
+
`,Py=Object.freeze(Object.defineProperty({__proto__:null,circle:jl,cssVarDefaults:Xo,line:Xl,lineHorizontal:Gl,root:Yl,variables:kt},Symbol.toStringTag,{value:"Module"})),ql=class extends On{constructor(e){super(),this.clippable=!0,this._defaultConfig=Ny,this.config=this._defaultConfig,this._xPx=void 0,this._yPx=void 0,this._mouseEvent=void 0,this._animFrameId=null,this._accessors={x:void 0,y:void 0,yStacked:void 0,baseline:void 0},this._colorKeys=[],this.setConfig(e),this.g.style("opacity",0),this.line=this.g.append("line").attr("class",Xl),this.lineHorizontal=this.g.append("line").attr("class",Gl).style("display","none")}set colorKeys(e){this._colorKeys=e}get colorKeys(){return this.config.colorKeys??this._colorKeys}set accessors(e){this._accessors=e}get accessors(){const{config:e}=this,n=!!(e.x||e.y||e.yStacked),i=n?e.x:this._accessors.x,r=n?e.y:this._accessors.y,o=r?Ht(r)?r:[r]:void 0,s=n?e.yStacked:this._accessors.yStacked,a=e.baseline??this._accessors.baseline;return{x:i,y:o,yStacked:s,baseline:a}}_isContainerInViewport(){if(!this.container?.node())return!1;const e=this.container.node().getBoundingClientRect(),n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=Math.max(0,Math.min(e.right,n)-Math.max(e.left,0)),o=Math.max(0,Math.min(e.bottom,i)-Math.max(e.top,0)),s=e.width*e.height,a=r*o;return s>0&&a/s>=this.config.visibilityThreshold}get bleed(){const{config:{circleRadius:e}}=this;return{top:e,left:e,right:e}}setContainer(e){this.container!==e&&(this.container=e,this.container.on("mousemove.crosshair",this._onMouseMove.bind(this)),this.container.on("mouseout.crosshair",this._onMouseOut.bind(this)),this.container.on("wheel.crosshair",this._onWheel.bind(this)))}_render(e){const{config:n,datamodel:i}=this,r=st(e)?e:n.duration,o=n.forceShowAt!==void 0,s=o?this.xScale(n.forceShowAt):this._xPx,a=this.xScale.invert(s),l=i.data?.length&&this.accessors.x?i.data.indexOf(di(i.data,a,this.accessors.x,jt.Left)):void 0;let c,h,u;if(n.snapToData)if(!this.accessors.y&&!this.accessors.yStacked&&i.data?.length&&console.warn("Unovis | Crosshair: Y accessors have not been configured. Please check if they're present in the configuration object"),!i.data?.length&&this._mouseEvent&&console.warn("Unovis | Crosshair: No data to snap to. Make sure the data has been passed to the container or to the crosshair itself"),n.snapMode===Yo.XY&&!o&&this._yPx!==void 0){const $=Uf(i.data,[this._xPx,this._yPx],this.xScale,this.yScale,this.accessors.x,this.accessors.y,this.accessors.yStacked,this.accessors.baseline);$&&(c=$.datum,h=$.index,u=$.distanceSq)}else c=di(i.data,a,this.accessors.x),h=i.data.indexOf(c);const f=this.xScale.range(),d=this.yScale.range(),p=n.snapToData&&c?xt(Math.round(this.xScale(F(c,this.accessors.x,h))),0,this._width):xt(s,f[0],f[1]),g=s>=f[0]&&s<=f[1],m=this._yPx>=Math.min(d[0],d[1])&&this._yPx<=Math.max(d[0],d[1]);let v=n.skipRangeCheck?!!this._xPx:this._xPx?g&&m:g;const y=u!==void 0?Math.sqrt(u):Math.abs(p-+s);n.hideWhenFarFromPointer&&y>=n.hideWhenFarFromPointerDistance&&(v=!1);const x=n.tooltip??this.tooltip;if(v&&x&&this._isContainerInViewport()){const A=x.getContainer()||this.container.node(),$=x.isContainerBody(),B=(this.accessors.x&&c!==void 0?F(c,this.accessors.x,h):void 0)??a;if(o){const M=this.container.node().getBoundingClientRect(),D=($?s+M.left:s)+this._containerMargin.left,G=this._height/2+($?M.top:0),Dt=[D,G];this._showTooltip(c,B,Dt,l)}else if(this._mouseEvent){const M=$?[this._mouseEvent.clientX,this._mouseEvent.clientY]:ui(this._mouseEvent,A);this._showTooltip(c,B,M,l)}}else this._hideTooltip();if(this._mouseEvent&&(n.onCrosshairMove?.(v?this.xScale.invert(this._xPx):void 0,c,h,this._mouseEvent),this._mouseEvent=void 0),j(this.g,r).style("opacity",v?1:0),!isFinite(s))return;const _=ue(n.getCircles)?n.getCircles(a,i.data,this.yScale,l):this.getCircleData(c,h);this.line.attr("y1",0).attr("y2",this._height),j(this.line,r,Xn).attr("x1",p).attr("x2",p);const b=n.showHorizontalLine?this.getLineHorizontalY(_):void 0;this.lineHorizontal.style("display",b===void 0?"none":null).attr("x1",0).attr("x2",this._width),b!==void 0&&j(this.lineHorizontal,r,Xn).attr("y1",b).attr("y2",b);const w=this.g.selectAll("circle").data(_,(A,$)=>A.id??$),S=w.enter().append("circle").attr("class",jl).attr("r",0).attr("cx",p).attr("cy",A=>A.y).style("fill",A=>A.color).style("stroke",A=>A.strokeColor).style("stroke-width",A=>A.strokeWidth);j(S.merge(w),r,Xn).attr("cx",p).attr("cy",A=>A.y).attr("r",n.circleRadius).style("opacity",A=>A.opacity).style("fill",A=>A.color).style("stroke",A=>A.strokeColor).style("stroke-width",A=>A.strokeWidth),j(w.exit(),r,Xn).attr("r",0).style("opacity",0).remove().on("interrupt",function(){this.remove()})}hide(e){window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{this._xPx=void 0,this._yPx=void 0,this._mouseEvent=void 0,this.config.onCrosshairMove?.(void 0,void 0,void 0,e),this._render()})}_onMouseMove(e){const{datamodel:n,element:i}=this;!this.accessors.x&&n.data?.length&&console.warn("Unovis | Crosshair: X accessor function has not been configured. Please check if it's present in the configuration object");const[r,o]=ui(e,i);this._xPx=r,this._yPx=o,this._mouseEvent=e,window.cancelAnimationFrame(this._animFrameId),this._animFrameId=window.requestAnimationFrame(()=>{this._render()})}_onMouseOut(e){(!e||!this.container?.node().contains(e.relatedTarget))&&this.hide(e)}_onWheel(e){this.hide(e)}_onDestroy(){window.cancelAnimationFrame(this._animFrameId),this.container?.on(".crosshair",null)}_showTooltip(e,n,i,r){const{config:o,datamodel:s}=this,a=o.tooltip??this.tooltip;if(!a||!i)return;const[l,c]=i,h=o.template(e,n,s.data,r);if(a.config.followCursor=!0,!a.config.horizontalPlacement||a.config.horizontalPlacement===C.Auto){const u=a.isContainerBody()?l-this.container.node().getBoundingClientRect().left:l;a.overrideHorizontalPlacement(u>this._containerWidth/2?C.Left:C.Right)}h&&a.show(h,{x:l,y:c})}_hideTooltip(){const{config:e}=this;(e.tooltip??this.tooltip)?.hide()}getYDataExtent(){return[void 0,void 0]}getLineHorizontalY(e){const n=this._yPx,i=e.filter(o=>o.opacity!==0&&isFinite(o.y)).map(o=>o.y),r=(n===void 0?i[0]:Ff(i,o=>Math.abs(o-n)))??n;return isFinite(r)?xt(Math.round(r),0,this._height):void 0}getCircleData(e,n){const{config:i}=this,r={colorFn:this._colorFunction},o=this.colorKeys;if(i.snapToData&&e){const s=this.accessors.y??[],a=this.accessors.yStacked??[],l=F(e,this.accessors.baseline,n)||0,c=Ua(e,n,...a).map((u,f)=>({id:`stacked-${f}`,y:this.yScale(u+l),opacity:st(F(e,a[f],f))?1:0,color:wt(e,i.color,f,o?.[f],r),strokeColor:i.strokeColor?wt(e,i.strokeColor,f,o?.[f],r):void 0,strokeWidth:i.strokeWidth?F(e,i.strokeWidth,f):void 0})),h=s.map((u,f)=>{const d=F(e,u,n);return{id:`regular-${f}`,y:this.yScale(d),opacity:st(d)?1:0,color:wt(e,i.color,c.length+f,o?.[c.length+f],r),strokeColor:i.strokeColor?wt(e,i.strokeColor,f,o?.[f],r):void 0,strokeWidth:i.strokeWidth?F(e,i.strokeWidth,f):void 0}});return c.concat(h).filter(u=>st(u.y))}return[]}};ql.selectors=Py;let Fy=ql;const Oy={...Ze,color:void 0,curveType:Zi.MonotoneX,baseline:()=>0,opacity:1,cursor:null,line:!1,lineColor:void 0,lineWidth:2,lineDashArray:void 0,minHeight1Px:!1,minHeight:void 0,stackMinHeight:!1},Kl=P`
|
|
294
|
+
label: area-component;
|
|
295
|
+
`,Ry=qe`
|
|
296
|
+
:root {
|
|
297
|
+
--vis-area-cursor: default;
|
|
298
|
+
--vis-area-fill-opacity: 1;
|
|
299
|
+
--vis-area-stroke-color: none;
|
|
300
|
+
--vis-area-stroke-width: 0px;
|
|
301
|
+
--vis-area-stroke-dasharray: none;
|
|
302
|
+
--vis-area-stroke-opacity: 1;
|
|
303
|
+
--vis-area-hover-fill-opacity: none;
|
|
304
|
+
--vis-area-hover-stroke-width: none;
|
|
305
|
+
|
|
306
|
+
/* Dark Theme */
|
|
307
|
+
--vis-dark-area-stroke-color: none;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
${Le} ${`.${Kl}`} {
|
|
311
|
+
--vis-area-stroke-color: var(--vis-dark-area-stroke-color);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
`,ci=P`
|
|
315
|
+
label: area;
|
|
316
|
+
cursor: var(--vis-area-cursor);
|
|
317
|
+
fill-opacity: var(--vis-area-fill-opacity);
|
|
318
|
+
stroke-width: var(--vis-area-stroke-width);
|
|
319
|
+
stroke-dasharray: var(--vis-area-stroke-dasharray);
|
|
320
|
+
stroke: var(--vis-area-stroke-color);
|
|
321
|
+
stroke-opacity: var(--vis-area-stroke-opacity);
|
|
322
|
+
|
|
323
|
+
&:hover {
|
|
324
|
+
fill-opacity: var(--vis-area-hover-fill-opacity);
|
|
325
|
+
stroke-width: var(--vis-area-hover-stroke-width);
|
|
326
|
+
}
|
|
327
|
+
`,to=P`
|
|
328
|
+
label: areaLinePath;
|
|
329
|
+
fill: none;
|
|
330
|
+
stroke-dasharray: var(--vis-line-stroke-dasharray);
|
|
331
|
+
stroke-dashoffset: var(--vis-line-stroke-dashoffset);
|
|
332
|
+
`,Iy=Object.freeze(Object.defineProperty({__proto__:null,area:ci,areaLinePath:to,globalStyles:Ry,root:Kl},Symbol.toStringTag,{value:"Module"})),Zl=class Ql extends On{constructor(e){super(),this._defaultConfig=Oy,this.config=this._defaultConfig,this.stacked=!0,this.events={[Ql.selectors.area]:{}},this.setConfig(e),this.stacked=Array.isArray(this.config.y)}get bleed(){const{config:{line:e,lineWidth:n}}=this;if(!e)return{top:0,bottom:0,left:0,right:0};const i=this.yScale.domain(),o=(this.yScale.range()[0]>this.yScale.range()[1]?Wt.North:Wt.South)===Wt.South,s=n>3,a=n>=10;return{top:!a&&(!o&&i[1]===0||o&&i[0]===0)?0:n/2,bottom:!a&&(!o&&i[0]===0||o&&i[1]===0)?0:n/2,left:s?n/2:0,right:s?n/2:0}}_render(e){super._render(e);const{config:n,datamodel:{data:i}}=this,r=st(e)?e:n.duration,o={colorFn:this._colorFunction},s=Fi[n.curveType];this._areaGen=T_().x(_=>_.x).y0(_=>_.y0).y1(_=>_.y1).curve(s);const a=Ht(n.y)?n.y:[n.y],l=i.map((_,b)=>this.xScale(F(_,n.x,b))),c=Wa(i,n.baseline,a,this._prevNegative);this._prevNegative=c.map(_=>!!_.isMostlyNegative);const h=this.yScale.range(),u=Math.min(h[0],h[1]),f=Math.max(h[0],h[1]),d=[],p=c.map(_=>_.map((b,w)=>{const S=l[w],A=xt(this.yScale(b[0]),u,f),$=xt(this.yScale(b[1]),u,f),V=$>A,B=n.stackMinHeight&&d[w]||0,M=V?A+B:A-B,D=V?$+B:$-B;let G=0;return(n.minHeight||n.minHeight1Px)&&Math.abs(D-M)<(n.minHeight??1)&&(G=(n.minHeight??1)-Math.abs(D-M),n.stackMinHeight&&(d[w]=B+G)),{x:S,y0:M,y1:V?D+G:D-G}})),g=p.length-1,m=[...p].reverse(),v=this.g.selectAll(`.${ci}`).data(m),y=v.enter().append("path").attr("class",ci).attr("d",_=>this._areaGen(_)||this._emptyPath()).attr(We,(_,b)=>g-b).style("opacity",0).style("fill",(_,b)=>wt(i,n.color,g-b,n.colorKeys?.[g-b],o)).style("mask",(_,b)=>Ti($e(i,n.pattern,g-b))),x=j(y.merge(v),r).style("opacity",(_,b)=>_.some(S=>S.y0-S.y1!==0)?F(i,n.opacity,g-b):0).style("fill",(_,b)=>wt(i,n.color,g-b,n.colorKeys?.[g-b],o)).style("mask",(_,b)=>Ti($e(i,n.pattern,g-b))).style("cursor",(_,b)=>yn(i,n.cursor,g-b));r?x.attrTween("d",(b,w,S)=>{const A=mt(S[w]).attr("d"),$=this._areaGen(b)||this._emptyPath();return Hr(A,$)}):x.attr("d",_=>this._areaGen(_)||this._emptyPath()),j(v.exit(),r).style("opacity",0).remove(),this._renderLines(r,n.line?p:[])}_renderLines(e,n){const{config:i,datamodel:{data:r}}=this,o={colorFn:this._colorFunction},s=n.length-1,a=[...n].reverse(),l=i.lineColor??i.color,c=this.g.selectAll(`.${to}`).data(a),h=this.g.selectAll(`.${ci}`).nodes(),u=v=>wt(r,l,s-v,i.colorKeys?.[s-v],o),f=(v,y)=>Xc($e(r,i.linePattern,s-v),u(v),y),d=v=>Xe(r,i.lineDashArray,v)?.join(" ")??f(v)?.dashArray??null,p=c.enter().insert("path",(v,y)=>h[y+1]).attr("class",to).attr(We,(v,y)=>s-y).attr("stroke",(v,y)=>u(y)).attr("stroke-width",i.lineWidth).attr("stroke-opacity",0).style("marker",function(v,y){return f(y,this)?.marker??null}),g=j(p.merge(c),e).attr("stroke",(v,y)=>u(y)).attr("stroke-width",i.lineWidth).attr("stroke-opacity",1).attr("cursor",(v,y)=>yn(r,i.cursor,s-y)).style("marker",(v,y,x)=>f(y,x[y])?.marker??null).style("stroke-dasharray",(v,y)=>d(y)),m=Fi[i.curveType];this._lineGen=Io().x(v=>v.x).y(v=>v.y1).curve(m),e?g.attrTween("d",(y,x,_)=>{const b=mt(_[x]).attr("d")||this._emptyLinePath(),w=this._lineGen(y)||this._emptyLinePath();return Hr(b,w)}):g.attr("d",v=>this._lineGen(v)||this._emptyLinePath()),j(c.exit(),e).style("opacity",0).remove()}getYDataExtent(e){const{config:n,datamodel:i}=this,r=Ht(n.y)?n.y:[n.y],o=this.xScale.domain(),s=e?Ha(i.data,o,n.x,!0):i.data;return Ba(s,n.baseline,...r)}_emptyPath(){const e=this.xScale.range(),n=this.yScale.domain(),i=this.yScale((n[0]+n[1])/2),r=i;return this._areaGen([{y0:i,y1:r,x:e[0]},{y0:i,y1:r,x:e[1]}])}_emptyLinePath(){const e=this.xScale.range(),n=this.yScale.range();return`M${e[0]},${n[0]} L${e[1]},${n[0]}`}};Zl.selectors=Iy;let Ly=Zl;const Ji=Symbol("componentAccessorKey"),Jl=Symbol("tooltipAccessorKey"),tu=Symbol("crosshairAccessorKey"),eu=Symbol("axisAccessorKey"),zy=Symbol("annotationsAccessorKey");function Qe(t,e){return he(t,e)}function ye(t){const e=yu(),n=_u();return ut(()=>{const i={},r=e?.vnode.props??{};return Object.keys(r).forEach(o=>{i[jo(o)]=t[jo(o)]}),{...i,...n}})}const By={"data-vis-component":""},Uy=St({__name:"index",props:{color:{type:[Function,String,Array,null]},pattern:{type:[Function,null]},curveType:{},baseline:{type:[Function,Number,null]},opacity:{type:[Function,Number,null]},cursor:{type:[Function,String,null]},line:{type:Boolean},lineColor:{type:[Function,String,Array,null]},lineWidth:{},lineDashArray:{type:[Function,Array,null]},linePattern:{type:[Function,null]},minHeight1Px:{type:Boolean},minHeight:{},stackMinHeight:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=t,i=Ve(Ji),r=ut(()=>i.data.value??n.data),o=ye(n),s=Q();return de(()=>{Ye(()=>{s.value=new Ly(o.value),s.value?.setData(r.value),i.update(s.value)})}),pe(()=>{s.value?.destroy(),i.destroy()}),ht(o,(a,l)=>{Qe(a,l)||(s.value?.setConfig(o.value),s.value?.render())}),ht(r,()=>{s.value?.setData(r.value)}),e({component:s}),(a,l)=>(U(),J("div",By))}}),Wy={"data-vis-axis":""},Hy=St({__name:"index",props:{position:{},type:{},fullSize:{type:Boolean},label:{},labelFontSize:{},labelMargin:{},labelTextFitMode:{},labelTextTrimType:{},labelTextSeparator:{},labelColor:{},gridLine:{type:Boolean},tickLine:{type:Boolean},domainLine:{type:Boolean},minMaxTicksOnly:{type:Boolean},minMaxTicksOnlyShowGridLines:{type:Boolean},minMaxTicksOnlyWhenWidthIsLess:{},tickFormat:{type:Function},tickValues:{},numTicks:{},tickSpacing:{},tickTextFitMode:{},tickTextWidth:{},tickTextSeparator:{},tickTextForceWordBreak:{type:Boolean},tickTextTrimType:{},tickTextFontSize:{},tickTextAlign:{type:[String,Function]},tickTextColor:{},tickTextAngle:{},tickTextAdaptiveSets:{type:Boolean},tickTextHideOverlapping:{type:Boolean},tickPadding:{},tickSize:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},color:{type:[Function,String,Array,null]},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=t,i=Ve(eu),r=ut(()=>i.data.value??n.data),o=ye(n),s=Q();return de(()=>{Ye(()=>{s.value=new Ey(o.value),s.value?.setData(r.value),i.update(s.value)})}),pe(()=>{s.value?.destroy(),i.destroy(n.type)}),ht(o,(a,l)=>{Qe(a,l)||(s.value?.setConfig(o.value),s.value?.render())}),ht(r,()=>{s.value?.setData(r.value)}),e({component:s}),(a,l)=>(U(),J("div",Wy))}}),Vy={"data-vis-crosshair":""},Yy=St({__name:"index",props:{data:{}},setup(t,{expose:e}){const n=t,i=Ve(tu),r=ut(()=>i.data.value??n.data),o=ye(n),s=Q();return de(()=>{Ye(()=>{s.value=new Fy(o.value),s.value?.setData(r.value),i.update(s.value)})}),pe(()=>{s.value?.destroy(),i.destroy()}),ht(o,(a,l)=>{Qe(a,l)||(s.value?.setConfig(o.value),s.value?.render())}),ht(r,()=>{s.value?.setData(r.value)}),e({component:s}),(a,l)=>(U(),J("div",Vy))}}),Xy={"data-vis-component":""},Gy=St({__name:"index",props:{color:{type:[Function,String,Array,null]},pattern:{type:[Function,null]},curveType:{},lineWidth:{},lineDashArray:{type:[Function,Array,null]},fallbackValue:{},highlightOnHover:{type:Boolean},cursor:{type:[Function,String,null]},interpolateMissingData:{type:Boolean},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=t,i=Ve(Ji),r=ut(()=>i.data.value??n.data),o=ye(n),s=Q();return de(()=>{Ye(()=>{s.value=new oy(o.value),s.value?.setData(r.value),i.update(s.value)})}),pe(()=>{s.value?.destroy(),i.destroy()}),ht(o,(a,l)=>{Qe(a,l)||(s.value?.setConfig(o.value),s.value?.render())}),ht(r,()=>{s.value?.setData(r.value)}),e({component:s}),(a,l)=>(U(),J("div",Xy))}}),jy={"data-vis-component":""},qy=St({__name:"index",props:{color:{type:[Function,String,Array,null]},pattern:{type:[Function,null]},barStyle:{type:[Function,null]},baseline:{type:[Function,Number,null]},barWidth:{},barMaxWidth:{},dataStep:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},cursor:{type:[Function,String,null]},barMinHeight1Px:{type:Boolean},barMinHeightZeroValue:{},orientation:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},colorKeys:{},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(t,{expose:e}){const n=t,i=Ve(Ji),r=ut(()=>i.data.value??n.data),o=ye(n),s=Q();return de(()=>{Ye(()=>{s.value=new hy(o.value),s.value?.setData(r.value),i.update(s.value)})}),pe(()=>{s.value?.destroy(),i.destroy()}),ht(o,(a,l)=>{Qe(a,l)||(s.value?.setConfig(o.value),s.value?.render())}),ht(r,()=>{s.value?.setData(r.value)}),e({component:s}),(a,l)=>(U(),J("div",jy))}}),Ky={"data-vis-tooltip":""},Zy=St({__name:"index",props:{components:{},container:{},followCursor:{type:Boolean},allowHover:{type:Boolean},horizontalPlacement:{},horizontalShift:{},verticalPlacement:{},verticalShift:{},triggers:{},attributes:{},className:{},hideDelay:{},showDelay:{},data:{}},setup(t,{expose:e}){const n=t,i=Ve(Jl),r=ye(n),o=Q();return de(()=>{Ye(()=>{o.value=new b_(r.value),i.update(o.value)})}),pe(()=>{o.value?.destroy(),i.destroy()}),ht(r,(s,a)=>{Qe(s,a)||(o.value?.setConfig(r.value),o.value?.render())}),e({component:o}),(s,a)=>(U(),J("div",Ky))}}),Qy=St({__name:"index",props:{components:{},xScale:{type:[Object,Function]},xDomain:{},xDomainMinConstraint:{},xDomainMaxConstraint:{},xRange:{},yScale:{type:[Object,Function]},yDomain:{},yDomainMinConstraint:{},yDomainMaxConstraint:{},yRange:{},yDirection:{},xAxis:{},yAxis:{},autoMargin:{type:Boolean},tooltip:{},crosshair:{},preventEmptyDomain:{type:[Boolean,null]},scaleByDomain:{type:Boolean},annotations:{},clipPathExtend:{},bleed:{type:[Object,Function]},onRenderComplete:{type:Function},duration:{},margin:{},padding:{},sizing:{},width:{},height:{},svgDefs:{},ariaLabel:{},colorFunction:{type:Function},data:{}},setup(t,{expose:e}){const n=t,{data:i}=vu(n),r=ye(n),o=Q(),s=wu({components:[],annotations:void 0,crosshair:void 0,tooltip:void 0,xAxis:void 0,yAxis:void 0}),a=Q(),l=()=>{o.value||!a.value||!Object.values(s).some(c=>Array.isArray(c)?c.length:c)||(o.value=new p_(a.value,{...tr(s)},i.value))};return xu(()=>{l(),s.components.map(c=>c.config),o.value?.updateContainer({...tr(r.value),...tr(s)})}),ht(i,()=>{o.value?o.value.setData(i.value,!0):l()}),pe(()=>o.value?.destroy()),Je(Ji,{data:i,update:c=>s.components=[...s.components,c],destroy:()=>s.components=s.components?.filter(c=>!c.isDestroyed())}),Je(eu,{data:i,update:c=>s[`${c.config.type}Axis`]=c,destroy:c=>{s[`${c}Axis`]=void 0}}),Je(tu,{data:i,update:c=>s.crosshair=c,destroy:()=>{s.crosshair=void 0}}),Je(Jl,{data:i,update:c=>s.tooltip=c,destroy:()=>{s.tooltip=void 0}}),Je(zy,{data:i,update:c=>s.annotations=c,destroy:()=>{s.annotations=void 0}}),e({component:o}),(c,h)=>(U(),J("div",{"data-vis-xy-container":"",ref_key:"elRef",ref:a,class:"unovis-xy-container"},[bu(c.$slots,"default")],512))}});(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode("[data-vis-bullet-legend],[data-vis-flow-legend]{display:block}[data-vis-leaflet-flow-map],[data-vis-leaflet-map]{display:block;position:relative}[data-vis-rolling-pin-legend]{display:block}.unovis-single-container,.unovis-xy-container{display:block;position:relative;width:100%}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const Jy={class:"flex items-center justify-between gap-3"},tv={key:0,class:"py-16 text-center text-sm text-muted"},ev={key:2,class:"flex flex-wrap items-center gap-x-4 gap-y-1 px-4 pt-2","aria-label":"Token chart legend"},nv=St({__name:"UsageChart",props:{series:{}},setup(t){const e=t,n=Q("tokens"),i=ku("cardRef"),{width:r}=Fu(i),o=(p,g)=>g,s=[{key:"input",label:"Input",color:"var(--ui-primary)",accessor:p=>p.input},{key:"output",label:"Output",color:"#22c55e",accessor:p=>p.output},{key:"cacheRead",label:"Cache read",color:"#94a3b8",accessor:p=>p.cacheRead},{key:"cacheWrite",label:"Cache write",color:"#f59e0b",accessor:p=>p.cacheWrite}],a=s.map(p=>p.accessor),l=s.map(p=>p.color),c=p=>p.costUsd,h=ut(()=>e.series.some(p=>p.input||p.output||p.cacheRead||p.cacheWrite||p.costUsd)),u=p=>{const[,g,m]=p.split("-");return`${m}/${g}`},f=p=>{const g=e.series[p];if(!g)return"";if(p===0||p===e.series.length-1)return u(g.date);const m=Math.ceil(e.series.length/6);return p%m===0?u(g.date):""},d=p=>`${u(p.date)} · in ${gt(p.input)} · out ${gt(p.output)} · cache ${gt(p.cacheRead+p.cacheWrite)} · ${Ri(p.costUsd)}`;return(p,g)=>{const m=Ou,v=eo;return U(),Ut(v,{ref_key:"cardRef",ref:i,ui:{root:"overflow-visible",body:"px-0! pt-0! pb-3!"}},{header:z(()=>[X("div",Jy,[g[1]||(g[1]=X("h3",{class:"text-sm font-semibold text-highlighted"},"Usage over time",-1)),Y(m,{modelValue:n.value,"onUpdate:modelValue":g[0]||(g[0]=y=>n.value=y),items:[{label:"Tokens",value:"tokens"},{label:"Cost",value:"cost"}],"value-key":"value",size:"xs",class:"w-28","aria-label":"Chart metric"},null,8,["modelValue"])])]),default:z(()=>[h.value?(U(),Ut(nt(Qy),{key:1,data:t.series,padding:{top:40},margin:{left:-5,right:-5},class:"h-80",width:nt(r)},{default:z(()=>[n.value==="tokens"?(U(),Ut(nt(qy),{key:0,x:o,y:nt(a),color:nt(l)},null,8,["y","color"])):(U(),J(Fe,{key:1},[Y(nt(Gy),{x:o,y:c,color:"var(--ui-primary)"}),Y(nt(Uy),{x:o,y:c,color:"var(--ui-primary)",opacity:.1})],64)),Y(nt(Hy),{type:"x",x:o,"tick-format":f}),Y(nt(Yy),{color:"var(--ui-primary)",template:d}),Y(nt(Zy))]),_:1},8,["data","width"])):(U(),J("div",tv,"No usage in this period.")),n.value==="tokens"&&h.value?(U(),J("div",ev,[(U(),J(Fe,null,Oi(s,y=>X("span",{key:y.key,class:"flex items-center gap-1.5 text-xs text-muted"},[X("span",{class:"inline-block size-2.5 rounded-sm",style:Su({backgroundColor:y.color}),"aria-hidden":"true"},null,4),wa(" "+K(y.label),1)])),64))])):An("",!0)]),_:1},512)}}}),iv=(t,e)=>{const n=t.__vccOpts||t;for(const[i,r]of e)n[i]=r;return n},rv=iv(nv,[["__scopeId","data-v-aa4df1f5"]]),ov={class:"space-y-4"},sv={class:"text-sm font-semibold text-highlighted"},av=["title"],cv={class:"text-sm text-muted"},lv={class:"text-sm text-muted whitespace-nowrap"},uv={class:"text-sm text-muted whitespace-nowrap"},hv={class:"text-sm text-muted whitespace-nowrap"},fv={class:"text-sm text-muted whitespace-nowrap"},dv={key:0,class:"flex justify-center pt-3"},ya=15,pv=St({__name:"UsageBreakdown",props:ka({byModel:{},byProject:{},byMode:{},projectPaths:{},byModelTotal:{},byProjectTotal:{}},{modelPage:{default:1},modelPageModifiers:{},projectPage:{default:1},projectPageModifiers:{}}),emits:["update:modelPage","update:projectPage"],setup(t){const e=t,n=yr(t,"modelPage"),i=yr(t,"projectPage"),r=[{accessorKey:"key",header:"Key"},{accessorKey:"runs",header:"Runs"},{accessorKey:"tokensIn",header:"In"},{accessorKey:"tokensOut",header:"Out"},{accessorKey:"cacheTokens",header:"Cache"},{accessorKey:"costUsd",header:"Cost"}];function o(l){return l.map(c=>({...c,tokensIn:c.input,tokensOut:c.output+c.reasoning,cacheTokens:c.cacheRead+c.cacheWrite}))}const s=ut(()=>o(e.byProject).map(l=>({...l,key:e.projectPaths[l.key]??`#${l.key}`}))),a=ut(()=>[{title:"By model",rows:o(e.byModel),total:e.byModelTotal,page:n.value,setPage:l=>{n.value=l}},{title:"By project",rows:s.value,total:e.byProjectTotal,page:i.value,setPage:l=>{i.value=l}},{title:"By mode",rows:o(e.byMode),total:0,page:1,setPage:l=>{}}]);return(l,c)=>{const h=Sa,u=xa,f=eo;return U(),J("div",ov,[(U(!0),J(Fe,null,Oi(a.value,d=>(U(),Ut(f,{key:d.title},{header:z(()=>[X("h3",sv,K(d.title),1)]),default:z(()=>[Y(h,{data:d.rows,columns:r,"empty-state":{label:"No data"},ui:{td:"py-1"}},{"key-cell":z(({row:p})=>[X("span",{class:"text-sm text-default truncate",title:p.original.key},K(p.original.key),9,av)]),"runs-cell":z(({row:p})=>[X("span",cv,K(p.original.runs),1)]),"tokensIn-cell":z(({row:p})=>[X("span",lv,K(nt(gt)(p.original.tokensIn)),1)]),"tokensOut-cell":z(({row:p})=>[X("span",uv,K(nt(gt)(p.original.tokensOut)),1)]),"cacheTokens-cell":z(({row:p})=>[X("span",hv,K(nt(gt)(p.original.cacheTokens)),1)]),"costUsd-cell":z(({row:p})=>[X("span",fv,K(nt(Ri)(p.original.costUsd)),1)]),_:1},8,["data"]),d.total>ya?(U(),J("div",dv,[Y(u,{page:d.page,total:d.total,"items-per-page":ya,"onUpdate:page":d.setPage},null,8,["page","total","onUpdate:page"])])):An("",!0)]),_:2},1024))),128))])}}}),gv=["title"],mv={class:"text-sm text-muted truncate"},_v={class:"text-sm text-muted truncate"},yv={class:"text-sm text-muted whitespace-nowrap"},vv={class:"text-sm text-muted whitespace-nowrap"},xv={class:"text-sm text-muted whitespace-nowrap"},bv={class:"text-sm text-muted whitespace-nowrap"},wv={class:"text-sm text-muted whitespace-nowrap"},kv={key:0,class:"flex justify-center pt-3"},va=15,Sv=St({__name:"UsageRecentRuns",props:ka({recent:{},projectPaths:{},total:{}},{page:{default:1},pageModifiers:{}}),emits:["update:page"],setup(t){const e=t,n=yr(t,"page"),i=[{accessorKey:"workItemTitle",header:"Work item"},{accessorKey:"projectId",header:"Project"},{accessorKey:"mode",header:"Mode"},{accessorKey:"model",header:"Model"},{accessorKey:"tokensIn",header:"In"},{accessorKey:"tokensOut",header:"Out"},{accessorKey:"cacheTokens",header:"Cache"},{accessorKey:"costUsd",header:"Cost"},{accessorKey:"finishedAt",header:"Finished"}],r=ut(()=>e.recent.map(s=>({...s,tokensIn:s.inputTokens,tokensOut:s.outputTokens+s.reasoningTokens,cacheTokens:s.cacheReadTokens+s.cacheWriteTokens})));function o(s){return new Date(s).toLocaleString("en-US",{day:"numeric",month:"short",hour:"2-digit",minute:"2-digit",hour12:!1})}return(s,a)=>{const l=ba,c=Sa,h=xa,u=eo;return U(),Ut(u,null,{header:z(()=>[...a[1]||(a[1]=[X("h3",{class:"text-sm font-semibold text-highlighted"},"Recent runs",-1)])]),default:z(()=>[Y(c,{data:r.value,columns:i,"empty-state":{label:"No runs in this period"},ui:{td:"py-1"}},{"workItemTitle-cell":z(({row:f})=>[X("span",{class:"text-sm text-default truncate",title:f.original.workItemTitle}," #"+K(f.original.workItemIid)+" "+K(f.original.workItemTitle),9,gv)]),"projectId-cell":z(({row:f})=>[X("span",mv,K(t.projectPaths[String(f.original.projectId)]??`#${f.original.projectId}`),1)]),"mode-cell":z(({row:f})=>[Y(l,{label:f.original.mode,color:"neutral",variant:"subtle"},null,8,["label"])]),"model-cell":z(({row:f})=>[X("span",_v,K(f.original.model||"—"),1)]),"tokensIn-cell":z(({row:f})=>[X("span",yv,K(nt(gt)(f.original.tokensIn)),1)]),"tokensOut-cell":z(({row:f})=>[X("span",vv,K(nt(gt)(f.original.tokensOut)),1)]),"cacheTokens-cell":z(({row:f})=>[X("span",xv,K(nt(gt)(f.original.cacheTokens)),1)]),"costUsd-cell":z(({row:f})=>[X("span",bv,K(nt(Ri)(f.original.costUsd)),1)]),"finishedAt-cell":z(({row:f})=>[X("span",wv,K(o(f.original.finishedAt)),1)]),_:1},8,["data"]),t.total>va?(U(),J("div",kv,[Y(h,{page:n.value,"onUpdate:page":a[0]||(a[0]=f=>n.value=f),total:t.total,"items-per-page":va},null,8,["page","total"])])):An("",!0)]),_:1})}}}),Tv={class:"space-y-4"},Cv={key:0,class:"space-y-3"},It=15,Bv=St({__name:"UsagePage",setup(t){const e=Q(30),n=Q(null),i=Q(null),r=Q(null),o=Tu(),s=Cu(o),a=Mu({start:s.subtract({days:29}),end:s}),l=Q(null),c=Q({}),h=Q(!0),u=Au(),f=Q(1),d=Q(1),p=Q(1),g=ut(()=>[{label:"All projects",value:null},...(l.value?.filterOptions.projects??[]).map(_=>({label:c.value[String(_)]??`#${_}`,value:_}))]),m=ut(()=>[{label:"All models",value:null},...(l.value?.filterOptions.models??[]).map(_=>({label:_||"—",value:_}))]),v=ut(()=>[{label:"All modes",value:null},...(l.value?.filterOptions.modes??[]).map(_=>({label:_||"—",value:_}))]);async function y(){h.value=!0;const _=new URLSearchParams(Eu(e.value,a.value,{projectId:n.value,model:i.value,mode:r.value}));_.set("recentLimit",String(It)),_.set("recentOffset",String((f.value-1)*It)),_.set("byModelLimit",String(It)),_.set("byModelOffset",String((d.value-1)*It)),_.set("byProjectLimit",String(It)),_.set("byProjectOffset",String((p.value-1)*It));const{data:b,error:w,status:S}=await $u(`/api/stats/usage?${_.toString()}`);if(h.value=!1,w){S!==401&&u.add({title:"Failed to load usage",description:w,color:"error",icon:"i-lucide-alert-circle"});return}l.value=b?.stats??null,c.value=b?.projectPaths??{},x()}function x(){const _=l.value;if(!_)return;const b=Math.max(1,Math.ceil(_.recentTotal/It));f.value>b&&(f.value=b);const w=Math.max(1,Math.ceil(_.byModelTotal/It));d.value>w&&(d.value=w);const S=Math.max(1,Math.ceil(_.byProjectTotal/It));p.value>S&&(p.value=S)}return ht([e,a,n,i,r],()=>{const _=f.value===1&&d.value===1&&p.value===1;f.value=1,d.value=1,p.value=1,_&&y()},{deep:!0}),ht([f,d,p],()=>{y()}),de(y),(_,b)=>{const w=du,S=Du,A=fu,$=gu,V=pu,B=hu,M=uu;return U(),Ut(M,{id:"usage"},{header:z(()=>[Y(A,{title:"Usage",icon:"i-lucide-chart-column"},{leading:z(()=>[Y(w)]),right:z(()=>[Y(S,{label:"Reload",icon:"i-lucide-refresh-cw",color:"neutral",variant:"soft",loading:h.value,onClick:y},null,8,["loading"])]),_:1}),Y(V,null,{left:z(()=>[Y(Nu,{period:e.value,"onUpdate:period":b[0]||(b[0]=D=>e.value=D),range:a.value,"onUpdate:range":b[1]||(b[1]=D=>a.value=D)},null,8,["period","range"]),Y($,{modelValue:n.value,"onUpdate:modelValue":b[2]||(b[2]=D=>n.value=D),items:g.value,"value-key":"value",class:"w-48","aria-label":"Project filter"},null,8,["modelValue","items"]),Y($,{modelValue:i.value,"onUpdate:modelValue":b[3]||(b[3]=D=>i.value=D),items:m.value,"value-key":"value",class:"w-56","aria-label":"Model filter"},null,8,["modelValue","items"]),Y($,{modelValue:r.value,"onUpdate:modelValue":b[4]||(b[4]=D=>r.value=D),items:v.value,"value-key":"value",class:"w-40","aria-label":"Mode filter"},null,8,["modelValue","items"])]),_:1})]),body:z(()=>[X("div",Tv,[h.value&&!l.value?(U(),J("div",Cv,[(U(),J(Fe,null,Oi(4,D=>Y(B,{key:D,class:"h-16 w-full"})),64))])):l.value?(U(),J(Fe,{key:1},[Y(Lu,{totals:l.value.totals,previous:l.value.previous},null,8,["totals","previous"]),Y(rv,{series:l.value.series},null,8,["series"]),Y(pv,{"model-page":d.value,"onUpdate:modelPage":b[5]||(b[5]=D=>d.value=D),"project-page":p.value,"onUpdate:projectPage":b[6]||(b[6]=D=>p.value=D),"by-model":l.value.byModel,"by-project":l.value.byProject,"by-mode":l.value.byMode,"project-paths":c.value,"by-model-total":l.value.byModelTotal,"by-project-total":l.value.byProjectTotal},null,8,["model-page","project-page","by-model","by-project","by-mode","project-paths","by-model-total","by-project-total"]),Y(Sv,{page:f.value,"onUpdate:page":b[7]||(b[7]=D=>f.value=D),recent:l.value.recent,"project-paths":c.value,total:l.value.recentTotal},null,8,["page","recent","project-paths","total"])],64)):An("",!0)])]),_:1})}}});export{Bv as default};
|