You are here

News Feeds

Data centers’ electricity use is soaring — especially in these states

Grist - Fri, 11/20/2026 - 01:45

It takes a lot of electricity to power the sprawling computing campuses undergirding the artificial intelligence boom: a lot for servers, a lot for cooling the chips, a lot for networking, and a bit for keeping the actual lights on. Yet translating “a lot” to real numbers pinned to individual facilities requires usage data, something that data-center operators are loath to disclose.

A Harvard-led study published this week in Nature Sustainability gets us closer to these numbers. Researchers extracted locations and building footprints for as many U.S. hyperscale data centers as possible, ultimately cataloguing 403 of the warehouse-sized facilities across the country. Translating power capacity to theoretical electricity usage, the authors estimated these facilities gobble up roughly 82 terawatt-hours of electricity annually, the equivalent of nearly 8 million homes. They suggest this electricity is associated with about 26 million metric tons of carbon dioxide emissions.

The 82-TWh estimate corresponds to about 2 percent of U.S. electricity. Though noteworthy in its own right, that figure shrouds high state-to-state variability, with many states boasting data-center electricity shares in the double digits. When viewed as a fraction of the retail electricity sales reported to the Energy Information Administration (EIA) in 2024, Oregon’s studied data centers used the equivalent of 18.6 percent of the electricity sold in the state. In Virginia and Iowa, data centers consumed 15.5 and 13.1 percent, respectively.

.gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj{--gv-text:#3C3830;--gv-text-2:#6B665E;--gv-grid:#E6E3DD;--gv-halo:#FFFFFF;--gv-axis:#3C3830;box-sizing:border-box;position:relative;width:100%;text-align:left;font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-weight:500;font-size:16px;line-height:1.3;color:var(--gv-text);margin-top:1.5rem!important;margin-bottom:1.5rem!important;padding:0;letter-spacing:normal;word-break:normal} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj *{box-sizing:border-box} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj div,.gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj span{margin:0;padding:0;font-size:inherit;line-height:inherit} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj.gv-dc-state-share-1fvphkj--dark{--gv-text:#F0EDE6;--gv-text-2:#B3ADA3;--gv-grid:#3A3732;--gv-halo:#1C1B19;--gv-axis:#B3ADA3} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__header{margin:0 0 16px} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__title{font-family:"PolySans", Arial, sans-serif;font-weight:500;font-size:25px;line-height:1.15;letter-spacing:-0.018em;margin:10px 0 8px;padding:0;color:var(--gv-text);text-transform:none} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__subtitle{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-weight:500;font-size:16px;line-height:1.4;margin:0;padding:0;color:var(--gv-text-2);text-wrap:pretty} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__hl{font-weight:700} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj.gv-dc-state-share-1fvphkj--dark .gv-dc-state-share-1fvphkj__hl[style*="--gv-hl-dk"]{color:var(--gv-hl-dk)!important} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj.gv-dc-state-share-1fvphkj--dark .gv-dc-state-share-1fvphkj__hl--dk-primary{color:#F0EDE6!important} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj.gv-dc-state-share-1fvphkj--dark .gv-dc-state-share-1fvphkj__hl--dk-muted{color:#6B665E!important} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 18px;margin:-4px 0 12px;padding:0;font-size:14px;line-height:1.2;color:var(--gv-text)} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__legend-item,.gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__legend-item:hover,.gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__legend-item:focus,.gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__legend-item:active{display:inline-flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:7px;font:inherit;color:inherit;background:none;border:0;padding:2px 0;margin:0;line-height:1.2;text-align:left;cursor:default;box-shadow:none;text-transform:none;letter-spacing:normal;border-radius:0;min-height:0;min-width:0;height:auto;width:auto;text-decoration:none} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj button.gv-dc-state-share-1fvphkj__legend-item,.gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj button.gv-dc-state-share-1fvphkj__legend-item:hover{cursor:pointer} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj button.gv-dc-state-share-1fvphkj__legend-item:hover{text-decoration:underline;text-underline-offset:3px} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj button.gv-dc-state-share-1fvphkj__legend-item:focus-visible{outline:2px solid #3977F3;outline-offset:2px} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__legend-item--off{opacity:0.35} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__map-label{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:11px;font-weight:500;letter-spacing:0.02em} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__legend-label{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:12px;fill:var(--gv-text-2)} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__legend-key{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:14px;fill:var(--gv-text)} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__place{cursor:default} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__legend-axis{font-size:11px;color:var(--gv-text-2);margin-left:2px} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__swatch{display:block;flex:none;overflow:visible} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__chart{position:relative;width:100%;margin:0;padding:0} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj svg.gv-dc-state-share-1fvphkj__svg{display:block;overflow:visible;max-width:none;height:auto} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj svg text{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-weight:500;font-size:14px;fill:var(--gv-text);letter-spacing:normal} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__ticks text{font-size:12px;fill:var(--gv-text-2);font-variant-numeric:tabular-nums} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__ticks--y text{paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:4px;stroke-linejoin:round;pointer-events:none} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__cat-labels text{fill:var(--gv-text)} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__grid line{stroke:var(--gv-grid);shape-rendering:crispEdges} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__baseline{stroke:var(--gv-axis);stroke-width:1.25;shape-rendering:crispEdges} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__zero{stroke:#888888;stroke-width:1;stroke-dasharray:4 4} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__line{fill:none;stroke-linecap:round;stroke-linejoin:round} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__line-halo{fill:none;stroke:var(--gv-halo);stroke-width:7;stroke-linecap:round;stroke-linejoin:round} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__segment{stroke:var(--gv-halo);stroke-width:1} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__point{fill-opacity:0.85;stroke:var(--gv-halo);stroke-width:1} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__ring{fill:none;stroke:var(--gv-text);stroke-width:1.5} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__dot{stroke:var(--gv-halo);stroke-width:1.7} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__dot--pulse{transform-box:fill-box;transform-origin:center;animation:gv-dc-state-share-1fvphkj-pulse 1.6s ease-in-out infinite} @keyframes gv-dc-state-share-1fvphkj-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.2)}} @media (prefers-reduced-motion:reduce){.gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__dot--pulse{animation:none}} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__value-label{font-size:12px;paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__axis-title{font-size:12px;fill:var(--gv-text-2)} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__direct-label{font-size:13px;font-weight:700;paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__donut-title{font-size:16px;font-weight:700;fill:var(--gv-text)} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__slice{stroke:var(--gv-halo);stroke-width:1.5} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__slice-label{font-size:14px;font-weight:700;fill:#FFFFFF;paint-order:stroke fill;stroke:rgba(0,0,0,0.25);stroke-width:2px;pointer-events:none} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__slope-head{font-size:14px;font-weight:700;fill:var(--gv-text)} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__slope-axis{stroke:var(--gv-grid);stroke-width:1} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__slope-line{stroke-linecap:round} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__slope-label{fill:var(--gv-text);paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__dumbbell{stroke:#C9C5BD;stroke-width:3;stroke-linecap:round} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj.gv-dc-state-share-1fvphkj--dark .gv-dc-state-share-1fvphkj__dumbbell{stroke:#6B665E} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__cat-label{fill:var(--gv-text)} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__overlay{fill:transparent;pointer-events:all} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__rule{stroke:var(--gv-text-2);stroke-width:1;stroke-dasharray:2 3} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__tooltip{position:absolute;display:none;pointer-events:none;z-index:5;min-width:150px;max-width:260px;padding:9px 12px 10px;background:#FFFFFF;border:1.5px solid #3C3830;border-radius:6px;box-shadow:3px 3px 0 #3C3830;font-size:13px;line-height:1.35;color:#3C3830} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj.gv-dc-state-share-1fvphkj--dark .gv-dc-state-share-1fvphkj__tooltip{background:#2A2824;border-color:#F0EDE6;box-shadow:3px 3px 0 #F0EDE6;color:#F0EDE6} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__tip-title{font-family:"PolySans", Arial, sans-serif;font-weight:500;font-size:14px;margin:0 0 5px} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__tip-row{display:flex;align-items:center;gap:8px;font-variant-numeric:tabular-nums} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__tip-row svg{display:block;flex:none;overflow:visible} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__tip-row i{display:block;flex:none;width:10px;height:10px;border-radius:2px} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__tip-row span{flex:1;color:var(--gv-text-2)} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__tip-row b{font-weight:700;white-space:nowrap} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__tip-more{color:var(--gv-text-2);font-size:12px;margin-top:2px} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__note{color:var(--gv-text-2);font-size:12px;font-style:italic;line-height:1.35;margin:8px 0 0;padding:0} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__footer{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:14px 0 0;padding:10px 0 0;border-top:1px solid var(--gv-grid)} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__credits{display:flex;flex-direction:column} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__source{color:var(--gv-text-2);font-size:12px;line-height:1.35;display:inline-block} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__credit{color:var(--gv-text-2);font-size:12px;font-style:italic;font-weight:700;line-height:1.35;margin-top:3px;display:inline-block} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__credit .gv-dc-state-share-1fvphkj__credit-link{color:inherit;font:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;border:0;box-shadow:none;background:none} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__logo{display:block;height:auto;max-width:46px;min-width:40px;width:46px;margin:0 0 0 auto;padding:0;transform:translateY(-2px);overflow:visible} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__logo path{fill:var(--gv-text)} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__logos{display:flex;align-items:center;gap:14px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__logos .gv-dc-state-share-1fvphkj__logo{margin:0} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__partner{display:block;margin:0;padding:0;border:0;line-height:0} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__partner img{display:block;height:22px;width:auto;max-width:110px;margin:0;padding:0;border:0;box-shadow:none;object-fit:contain} .gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj.gv-dc-state-share-1fvphkj--dark .gv-dc-state-share-1fvphkj__partner--invert img{filter:brightness(0) invert(1)} @media (max-width:600px){.gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__title{font-size:21px}.gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__subtitle{font-size:15px}.gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__legend{font-size:13px}.gv-dc-state-share-1fvphkj#gv-dc-state-share-1fvphkj .gv-dc-state-share-1fvphkj__logo{width:42px}} Hyperscale data centers used nearly one-fifth of Oregon’s electricity in 2024 Estimated electricity use of 403 hyperscale data centers as a share of each state’s 2024 retail electricity sales, top 10 states Guidi et al. (2026) model data-center electricity use from May 2024 to April 2025. We compare these data with metered sales from calendar year 2024. Source: Guidi et al. (2026) / EIA Clayton Aldern / Grist / İsmail Enes Ayhan / Unsplash (function(){ var K="__gv_dc_state_share_1fvphkj_initialized__";if(window[K])return;window[K]=true; var ID="gv-dc-state-share-1fvphkj"; var SPEC={"version":1,"slug":"dc-state-share-1fvphkj","type":"bar","data":{"xKind":"category","x":["Oregon","Virginia","Iowa","Nebraska","Wyoming","Ohio","Nevada","Oklahoma","New Mexico","Utah"],"series":[{"key":"Share","label":"Share","color":"#12A07F","values":[18.6,15.5,13.1,10,7.1,5.7,4.1,4,3.9,3.7]}]},"text":{"title":"Hyperscale data centers used nearly one-fifth of Oregon’s electricity in 2024","subtitle":"Estimated electricity use of 403 hyperscale data centers as a share of each state’s 2024 retail electricity sales, top 10 states","note":"Guidi et al. (2026) model data-center electricity use from May 2024 to April 2025. We compare these data with metered sales from calendar year 2024.","source":"Guidi et al. (2026) / EIA","credit":"Clayton Aldern","altText":"Bar chart of hyperscale data center electricity use as a share of state retail sales. Oregon is highest at 18.6 percent, followed by Virginia at 15.5 percent, Iowa at 13.1 percent, and Nebraska at 10 percent. The national share is about 2 percent."},"style":{"paletteId":"single-turquoise","political":false,"background":"white","yFormat":{"prefix":"","suffix":"%","decimals":1},"xFormat":{"prefix":"","suffix":"","decimals":null},"yFromZero":true,"yMin":null,"yMax":null,"valueLabels":true,"endDots":true,"imageFill":{"mode":"all","opacity":0,"photos":{"*":{"url":"https://images.unsplash.com/photo-1584169417032-d34e8d805e8b?ixid=M3wxMDg1MjEzfDB8MXxhbGx8fHx8fHx8fHwxNzk0ODczMDU5fA\u0026ixlib=rb-4.1.0\u0026w=1600\u0026q=80\u0026fm=jpg\u0026fit=max","photographer":"İsmail Enes Ayhan","via":"unsplash","page":"https://unsplash.com/photos/server-room-aisle-with-metal-equipment-racks-lVZjvw-u9V8?utm_source=gristviz\u0026utm_medium=referral","profile":"https://unsplash.com/@ismailenesayhan?utm_source=gristviz\u0026utm_medium=referral"}}},"width":"column","height":400,"yLabel":"","xLabel":"","highlight":null,"legend":"none","xFromZero":false,"xMin":null,"xMax":null,"rightAxis":[],"rightFormat":{"prefix":"","suffix":"","decimals":null},"rightLabel":"","rightFromZero":true,"donutHole":true,"partners":[],"titleFont":"sans","swatch":"pebble","map":{"method":"rounded","classes":5,"breaks":[],"palette":"seq-orange","reverse":false,"midpoint":null,"continuous":false,"labels":true,"symbolMax":18,"noDataLabel":"No data","thresholds":[],"stops":[],"colors":[],"domain":null,"categories":[],"sizeTicks":[],"projection":"equal-earth","sphere":false,"graticule":false,"center":[-30,20]}},"meta":{"toolVersion":"0.4.0","createdAt":"","updatedAt":"","fallbackPngUrl":"","review":null}}; var GEO=null; function __gvOr(a,b){return a?a:b()};function __gvAnd(a,b){return a?b():a};function __gvLe(a,b){return b>=a};function __gvLt(a,b){return b>a};var __gvRuntime=(()=>{var he=Object.defineProperty;var Bn=Object.getOwnPropertyDescriptor;var zn=Object.getOwnPropertyNames;var On=Object.prototype.hasOwnProperty;var Hn=(t,n)=>{for(var a in n)he(t,a,{get:n[a],enumerable:!0})},jn=(t,n,a,o)=>{if(((n?typeof n=="object":!1)?!0:typeof n=="function"))for(let e of zn(n))((!On.call(t,e)?e!==a:!1)?he(t,e,{get:()=>n[e],enumerable:(!(o=Bn(n,e))?!0:o.enumerable)}):!1);return t};var qn=t=>jn(he({},"__esModule",{value:!0}),t);var jr={};Hn(jr,{MOBILE_BREAKPOINT:()=>Rn,mount:()=>Hr,primaryAxis:()=>Le,visible:()=>Nn});var Xn=["map-states","map-counties","map-world","map-dots"];function Ae(t){return Xn.includes(t)}var De=["line","slope"];var Wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",Yn=new Map([...Wn].map((t,n)=>[t,n])),Zn=10;function fe(t){let n=[],a=0,o=1;for(let e of t){let r=Yn.get(e);if(r===void 0)throw new Error("Unreadable map geography");a+=r%32*o,r>=32?o*=32:(n.push(a%2?-(a+1)/2:a/2),a=0,o=1)}return n}function Kn(t,n){let a=fe(t),o=[],e=0,r=0,s=0;for(;(a.length)>(e);){let u=a[e++],c=[];for(let i=0;(u)>(i);i++)r+=a[e++],s+=a[e++],c.push([r/n,s/n]);o.push(c)}return o}function Pe(t,n){let a=[];return n.forEach((o,e)=>{let r=o>=0?t[o]:[...t[-o-1]].reverse();for(let s=e?1:0;(r.length)>(s);s++)a.push(r[s])}),a}var Ge=t=>String(Math.round(t*10)/10),Ve=(t,n)=>t.length?`M${t.map(([a,o])=>`${Ge(a)} ${Ge(o)}`).join("L")}${n?"Z":""}`:"";function Un(t){var e;let n=0,a=0,o=0;for(let r=0,s=t.length-1;(t.length)>(r);s=r++){let u=t[s][0]*t[r][1]-t[r][0]*t[s][1];n+=u,a+=(t[s][0]+t[r][0])*u,o+=(t[s][1]+t[r][1])*u}return n?{area:n/2,c:[a/(3*n),o/(3*n)]}:{area:0,c:(e=t[0])!=null?e:null}}function _e(t){var d;let n=Kn(t.arcs,(d=t.q)!=null?d:Zn),a=!!t.sphere,o=fe(t.geoms),e=0,r=0,s=t.ids.map((p,b)=>{var E,H,L;let y=o[e++],g="",w=null,B=-1,F=[];for(let A=0;(y)>(A);A++){let D=o[e++],C=[];F.push(C);for(let P=0;(D)>(P);P++){let $=o[e++],I=[];for(let K=0;($)>(K);K++)r+=o[e++],I.push(r);let O=Pe(n,I);if(a){C.push(O);continue}if(g+=Ve(O,!0),P===0){let{area:K,c:at}=Un(O);(Math.abs(K)>B?(B=Math.abs(K),w=at):!1)}}}return{id:p,name:(E=t.names[b])!=null?E:p,code:(L=(H=t.codes)==null?void 0:H[b])!=null?L:"",d:g,anchor:w,...a?{polygons:F}:{}}}),u=p=>{var F;let b=fe(p),y=0,g=0,w=[],B=(F=b[y++])!=null?F:0;for(let E=0;(B)>(E);E++){let H=b[y++],L=[];for(let A=0;(H)>(A);A++)g+=b[y++],L.push(g);w.push(Pe(n,L))}return w},[c,i,m]=[u(t.inner),u(t.outer),u(t.group)],l=p=>a?"":p.map(b=>Ve(b,!1)).join("");return{id:t.id,w:t.w,h:t.h,features:s,inner:l(c),outer:l(i),group:l(m),...a?{sphere:!0,lines:{inner:c,outer:i,group:m}}:{}}}var yt={orange:"#F79945",turquoise:"#12A07F",fuchsia:"#AC00E8",azure:"#3977F3",earth:"#3C3830",red:"#F5515B"},it={primary:"#3C3830",secondary:"#6B665E",grid:"#E6E3DD",muted:"#C9C5BD",darkPrimary:"#F0EDE6",darkSecondary:"#B3ADA3",darkGrid:"#3A3732",darkMuted:"#6B665E"},Ie={white:"#FFFFFF",smog:"#F0F0F0",lavender:"#D3C8FF",celery:"#E6FFA0",sky:"#C5E0F7",butter:"#FFF1C7",blush:"#FFD6DA"};function Re(t,n,a){let o=t.replace("#",""),e=n.replace("#","");return`#${[0,2,4].map(s=>{let u=parseInt(o.slice(s,s+2),16),c=parseInt(e.slice(s,s+2),16);return Math.round(u+(c-u)*a).toString(16).padStart(2,"0")}).join("")}`.toUpperCase()}var Ft=yt;var qt="#D9D7D2",Xt="#3A3733",Be="#EDEBE6",ze="#2E2B28",Ne="#F5EDDA",Qn="#EF6C4A",Kt=t=>[Re(t,"#FFFFFF",.8),t.toUpperCase(),Re(t,"#000000",.45)],Yr=[{id:"seq-orange",label:"Orange",kind:"sequential",stops:Kt(Ft.orange)},{id:"seq-turquoise",label:"Turquoise",kind:"sequential",stops:Kt(Ft.turquoise)},{id:"seq-azure",label:"Azure",kind:"sequential",stops:Kt(Ft.azure)},{id:"seq-fuchsia",label:"Fuchsia",kind:"sequential",stops:Kt(Ft.fuchsia)},{id:"div-turquoise-coral",label:"Turquoise to coral",kind:"diverging",stops:[Ft.turquoise,Ne,Qn]},{id:"div-azure-orange",label:"Azure to orange",kind:"diverging",stops:[Ft.azure,Ne,Ft.orange]}];function be(t){let n=t.parentElement;for(;n;){let o=getComputedStyle(n).backgroundColor.match(/rgba?\(([\d.]+),\s*([\d.]+),\s*([\d.]+)(?:,\s*([\d.]+))?\)/);if((o?((o[4]===void 0?!0:parseFloat(o[4])>.5)):!1)){let e=(.299*+o[1]+.587*+o[2]+.114*+o[3])/255;return{color:`rgb(${o[1]},${o[2]},${o[3]})`,dark:(.5)>(e)}}n=n.parentElement}return{color:null,dark:!1}}function Jn(t){return/^[A-Za-z]{2}/.test(t)?` ${t}`:t}function Rt(t,n,a,o,e=1){let r=Jn(a),s=(i,m)=>`${((0)>(i)?/[1-9]/.test(m):!1)?"\u2212":""}${n}${m}${r}`;return{axis:(i,m)=>{let l=i*e>=1e4,d=((m?m:1))*e,p=i*e,b=l?t.formatPrefix(`.${o!=null?o:t.precisionPrefix(d,p)}`,p):t.format(`,.${o!=null?o:t.precisionFixed(d)}f`);return y=>(l?y===0:!1)?s(0,"0"):s(y,b(Math.abs(y*e)).replace("G","B"))},value:i=>{let m=Math.abs(i*e),l=o===null?t.format(`,.${tr(m)}~f`):t.format(`,.${o}f`);return s(i,l(m))}}}function tr(t){return t>=100?0:t>=10?1:((t>=1?!0:t===0)?!0:!Number.isFinite(t))?2:Math.min(20,Math.max(2,Math.ceil(-Math.log10(t))+1))}function Lt(t,n,a,o){let[e,r]=a,s=t.tickStep(e,r,o);return Rt(t,n.prefix,n.suffix,n.decimals,n.multiply).axis(Math.max(Math.abs(e),Math.abs(r)),s)}function je(t){let n=1/0,a=-1/0;for(let o of t)((n)>(o)?(n=o):!1),(o>a?(a=o):!1);return n===1/0?null:[n,a]}function qe(t,n,a){let{xKind:o,x:e}=n.data,r=n.style.xFormat;if(o==="year")return s=>String(s);if(o==="number"){let s=Rt(t,r.prefix,r.suffix,r.decimals,r.multiply);return u=>s.value(Number(u))}if(o==="date"){let s=e.map(l=>String(l)),u=s.every(l=>l.endsWith("-01-01")),c=s.every(l=>l.endsWith("-01")),i=u?"%Y":c?a?"%b \u2019%y":"%b %Y":"%b %-d, %Y",m=t.utcFormat(i);return l=>m(l instanceof Date?l:new Date(String(l)+(String(l).length===10?"T00:00:00Z":"")))}return s=>String(s)}function Xe(t){return new Date(String(t)+"T00:00:00Z")}function er(t,n){var a;return n?"#1A1A1A":(a=Ie[t.style.background])!=null?a:"#FFFFFF"}function ge(t){let n=t.replace("#",""),a=n.length===3?n.split("").map(o=>o+o).join(""):n.slice(0,6);return[0,2,4].map(o=>__gvOr(parseInt(a.slice(o,o+2),16),()=>(0)))}function nr([t,n,a]){return`#${[t,n,a].map(o=>Math.round(Math.max(0,Math.min(255,o))).toString(16).padStart(2,"0")).join("")}`.toUpperCase()}function Qt(t,n,a){let o=ge(t),e=ge(n);return nr(o.map((r,s)=>r+(e[s]-r)*a))}function Jt(t){let[n,a,o]=ge(t).map(e=>{let r=e/255;return (.03928)>=(r)?r/12.92:((r+.055)/1.055)**2.4});return .2126*n+.7152*a+.0722*o}function _t(t,n){let[a,o]=[Jt(t),Jt(n)].sort((e,r)=>r-e);return(a+.05)/(o+.05)}function rr(t,n){if(!n)return t;let a=t.toUpperCase();return a===yt.earth?it.darkPrimary:a===it.muted.toUpperCase()?it.darkMuted:t}var Oe=.58,Ut=.45,ar=.7,He=new Map;function or(t,n){let a=`${t}|${n}`,o=He.get(a);if(o)return o;let e=Jt(t),r=0,s=1/0;for(let i=0;(206)>=(i);i++){let m=-Ut+i/206*(Ut+Oe),l=Math.abs(Jt((0)>(m)?Qt(n,"#FFFFFF",-m):Qt(n,"#000000",m))-e);((s)>(l)?([r,s]=[m,l]):!1)}let u=(r+Ut)/(Ut+Oe),c=Qt(n,"#FFFFFF",u*ar);return He.set(a,c),c}function Et(t,n,a){var e;if(!a)return n;let o=(e=t.style.paletteId)!=null?e:"";if(o.startsWith("tonal-")){let r=yt[o.slice(6)];if(r)return or(n,r)}return rr(n,a)}function ct(t,n,a){var o,e;return Et(t,(e=(o=t.data.series[n])==null?void 0:o.color)!=null?e:yt.orange,a)}function At(t,n,a,o=4.5){let e=er(t,a);if(_t(n,e)>=o)return n;let r=a?"#FFFFFF":"#000000";for(let s=.05;(1)>(s);s+=.05){let u=Qt(n,r,s);if(_t(u,e)>=o)return u}return r}function te(t){return _t("#FFFFFF",t)>=4.5?"#FFFFFF":_t(it.primary,t)>=4.5?it.primary:_t("#FFFFFF",t)>=_t("#000000",t)?"#FFFFFF":"#000000"}var ye={w:975,h:610,scale:1300,x:487.5,y:305},ee=ye.scale,We=ye.x,Ye=ye.y,Ze=[[We+.29*ee,Ye+.17*ee],[We+.41*ee,Ye+.234*ee]];var sr="M11.3,4.9Q12.4,6.0 12.5,7.7Q12.5,9.5 10.5,10.1Q8.4,10.7 6.7,10.3Q4.9,9.8 3.5,9.2Q2.1,8.6 1.3,7.3Q0.6,6.0 0.9,4.5Q1.3,3.0 2.9,1.9Q4.4,0.8 6.3,1.2Q8.2,1.7 9.2,2.8Q10.1,3.9 11.3,4.9Z",ir="M0.6,7.2C4,3.9 10.5,3.1 17.4,4.4C18.6,4.6 18.7,6.1 17.6,6.3C11.8,7 6.2,8.6 1.7,9.1C0.4,9.3 -0.1,7.9 0.6,7.2Z",Ke={pebble:[13,12],brush:[19,12],dot:[12,12]};function ne(t,n,a="",o=!1){var c;let[e,r]=(c=Ke[t])!=null?c:Ke.pebble,s=i=>`\x3csvg${a?` class="${a}"`:""} width="${i}" height="${r}" viewBox="0 0 ${i} ${r}" aria-hidden="true">`;if(n==="transparent")return`${s(e)}\x3c/svg>`;if(o)return`${s(22)}\x3cline x1="1.5" x2="20.5" y1="6" y2="6" stroke="${n}" stroke-width="3" stroke-linecap="round" stroke-dasharray="5 4"/>\x3c/svg>`;if(t==="dot")return`${s(e)}\x3ccircle cx="6" cy="6" r="5.5" fill="${n}" fill-opacity="0.85"/>\x3c/svg>`;let u=t==="brush"?`\x3cpath d="${ir}" transform="rotate(-6 9 6.5)"`:`\x3cpath d="${sr}"`;return`${s(e)}${u} fill="${n}"/>\x3c/svg>`}function Ue(t,n){let a=t.querySelector(`.${n}`);(a?!0:(a=t.ownerDocument.createElement("div"),a.className=n,a.setAttribute("role","presentation"),t.appendChild(a)));let o=a,e=null,r=null,s=()=>{o.style.display="none"},u=i=>{((i===r?!0:!e)?!0:(i.pointerType==="touch"?(e(),e=null):!1))},c=t.ownerDocument;return c.addEventListener("pointerdown",u),{show(i,m,l){o.innerHTML=i,o.style.display="block";let d=o.offsetWidth,p=o.offsetHeight,b=t.clientWidth,y=m+14;(y+d>b?(y=m-d-14):!1),((0)>(y)?(y=Math.max(0,Math.min(b-d,m-d/2))):!1),o.style.left=`${y}px`,o.style.top=`${Math.max(0,l-p-12)}px`},hide:s,bind(i,m,l){let d=()=>{(l==null?!0:l()),s()};i.on("pointermove.gvtip",(p,b)=>m(p,b)).on("pointerdown.gvtip",(p,b)=>{((p.pointerType!=="touch"?p.pointerType!=="pen":!1)?!0:(r=p,e=d,m(p,b)))}).on("pointerleave.gvtip",p=>{(p.pointerType!=="touch"?d():!1)})},destroy(){c.removeEventListener("pointerdown",u)}}}function wt(t){return t.replace(/[\x26\x3c>"]/g,n=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;",'"':"\x26quot;"})[n])}function Dt(t,n,a,o,e,r=!1){let s=c=>c.replace(/[\x26\x3c>]/g,i=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;"})[i]),u=e?ne(e,n,"",r):`\x3ci style="background:${n}">\x3c/i>`;return`\x3cdiv class="${t}">${u}\x3cspan>${s(a)}\x3c/span>\x3cb>${s(o)}\x3c/b>\x3c/div>`}function Wt(t,n,a,o,e=!1){var r,s;return((s=(r=t.spec.style.tooltip)==null?void 0:r.hideRows)!=null?s.includes(a):!1)?"":Dt(t.cls("tip-row"),n,a,o,t.spec.style.swatch,e)}function gt(t,n,a,o,e=!1){var u;let r=t.spec.style.tooltip;if(((u=r==null?void 0:r.hideRows)!=null?u.includes(a):!1))return"";let s=((r!=null?r.hideSeriesName:!1)?t.spec.data.series.length===1:!1)?"":a;return Dt(t.cls("tip-row"),n,s,o+Qe(r==null?void 0:r.valueSuffix),t.spec.style.swatch,e)}function bt(t,n){var a;return`\x3cdiv class="${t.cls("tip-title")}">${wt(n+Qe((a=t.spec.style.tooltip)==null?void 0:a.titleSuffix))}\x3c/div>`}function Qe(t=""){return(!t?!0:/^[\s,.;:!?)\]]/.test(t))?t:` ${t}`}var Je=["VT","NH","MA","RI","CT","NJ","DE","MD","DC"],lr={CA:[80,318],FL:[790,534],ID:[192,163],KY:[703,315],LA:[562,460],MI:[683,199],NC:[816,350]},cr=560;function ur(t,n,a){var c,i,m;let o=t.style.map,e=n?Xt:qt,r=(i=(c=t.data.series[0])==null?void 0:c.values)!=null?i:[],s=(m=t.data.map)==null?void 0:m.categories;if(s){let l=new Map(o.categories.map(d=>[d.name,d.color]));return d=>{var p;return (s[d]!==null?s[d]!==void 0:!1)?(p=l.get(s[d]))!=null?p:it.muted:e}}if((o.continuous?o.stops.length>=2:!1)){let l=a.scaleLinear().domain(o.stops).range(o.colors).interpolate(a.interpolateLab).clamp(!0);return d=>(r[d]===null?!0:r[d]===void 0)?e:l(r[d])}if(!o.colors.length)return()=>e;let u=a.scaleThreshold().domain(o.thresholds).range(o.colors);return l=>(r[l]===null?!0:r[l]===void 0)?e:u(r[l])}function Nt(t,n){for(let[a,o]of Object.entries(n))t.style.setProperty(a,o,"important")}var mr=t=>{var o,e;let n=["th","st","nd","rd"],a=t%100;return`${t}${(e=(o=n[(a-20)%10])!=null?o:n[a])!=null?e:n[0]}`},tn=new WeakMap;function pr(t,n){let a=t.width/n.w,o=n.features.map(e=>e.d).join("");return{height:Math.ceil(n.h*a),transform:`scale(${a})`,unit:1/a,d:e=>e.d,anchor:e=>e.anchor?[e.anchor[0]*a,e.anchor[1]*a]:null,land:()=>o,inner:()=>n.inner,outer:()=>n.outer,group:()=>n.group,sphere:()=>"",graticule:()=>""}}function nn(t,n){var c;if((t.sphere?!0:((c=n.data.map)!=null?c.pr:!1)))return t;let[[a,o],[e,r]]=Ze,s=i=>{let[m,l]=i.split("L")[0].split(" ").map(Number);return __gvAnd(__gvAnd((m>=a?(e)>=(m):!1),()=>(l>=o)),()=>((r)>=(l)))},u=i=>i.split("M").filter(m=>(m?!s(m):m)).map(m=>`M${m}`).join("");return{...t,features:t.features.filter(i=>!i.id.startsWith("72")),inner:u(t.inner),outer:u(t.outer),group:u(t.group)}}function dr(t){let n=0;for(let a=0,o=t.length-1;(t.length)>(a);o=a++)n+=t[o][0]*t[a][1]-t[a][0]*t[o][1];return n}function hr(t){let n=a=>(a.length>=4?Math.abs(dr(a))>1e-6:!1);return t.features.map(a=>{var o;return{type:"MultiPolygon",coordinates:((o=a.polygons)!=null?o:[]).filter(e=>__gvAnd(e.length,()=>(n(e[0])))).map(e=>[e[0],...e.slice(1).filter(n)])}})}function en(t,n,a,o=hr(n)){let{d3:e,spec:r}=t,s=r.style.map,u=s.projection==="globe",c={type:"GeometryCollection",geometries:o},i={type:"Sphere"},m,l;if(u)l=Math.min(t.width,cr),m=e.geoOrthographic().rotate([a[0],a[1]]).fitExtent([[4,4],[t.width-4,l-4]],i);else{let y=(s.sphere?!0:s.graticule)?i:c;m=e.geoEqualEarth().fitWidth(t.width,y),l=Math.ceil(e.geoPath(m).bounds(y)[1][1])+1}let d=e.geoPath(m),p=new Map(n.features.map((y,g)=>[y.id,o[g]])),b=y=>{var g;return(g=d({type:"MultiLineString",coordinates:y}))!=null?g:""};return{height:l,transform:null,unit:1,d:y=>{var g;return(g=d(p.get(y.id)))!=null?g:""},anchor:y=>{let g=d.centroid(p.get(y.id));return (Number.isFinite(g[0])?Number.isFinite(g[1]):!1)?g:null},land:()=>{var y;return(y=d(c))!=null?y:""},inner:()=>{var y,g;return b((g=(y=n.lines)==null?void 0:y.inner)!=null?g:[])},outer:()=>{var y,g;return b((g=(y=n.lines)==null?void 0:y.outer)!=null?g:[])},group:()=>{var y,g;return b((g=(y=n.lines)==null?void 0:y.group)!=null?g:[])},sphere:()=>{var y;return(((u?!0:s.sphere))?(y=d(i))!=null:!1)?y:""},graticule:()=>{var y;return (s.graticule?(y=d(e.geoGraticule10()))!=null:!1)?y:""}}}function rn(t,n){var U,Y,_,k;let{d3:a,spec:o,svg:e}=t,r=o.data.map,s=o.style.map,u=(!!n.sphere?s.projection==="globe":!1),c=(U=s.center)!=null?U:[0,20],i=tn.get(t.chartEl),m=((i?i.center[0]===c[0]:!1)?i.center[1]===c[1]:!1)?i:{center:c,rotate:[-c[0],-c[1]]};tn.set(t.chartEl,m);let l=n.sphere?en(t,n,m.rotate):pr(t,n),d=o.type==="map-dots",p=ur(o,t.dark,a),b=(_=(Y=o.data.series[0])==null?void 0:Y.values)!=null?_:[],y=new Map(r.ids.map((h,v)=>[h,v]).filter(([h])=>h!==null)),g=b.map((h,v)=>[h,v]).filter(([h])=>h!==null).sort((h,v)=>v[0]-h[0]),w=new Map;g.forEach(([h,v],G)=>w.set(v,(G>0?g[G-1][0]===h:!1)?w.get(g[G-1][1]):G+1));let B=(k=t.page)!=null?k:t.dark?"#1A1A1A":"#FFFFFF",F=(h,v,G)=>Nt(h,{fill:"none",stroke:v,"stroke-width":`${G}px`,"vector-effect":"non-scaling-stroke","stroke-linejoin":"round","pointer-events":"none"}),E=t.id("map-shadow"),H=l.unit;e.append("defs").append("filter").attr("id",E).attr("x","-5%").attr("y","-5%").attr("width","110%").attr("height","110%").append("feGaussianBlur").attr("stdDeviation",2.5*H);let L=e.append("g").attr("class",t.cls("map"));(l.transform?L.attr("transform",l.transform):!1);let A=L.append("path").attr("class",t.cls("shadow")).attr("filter",`url(#${E})`).attr("transform",`translate(${2*H},${2.5*H})`);Nt(A.node(),{fill:t.dark?"#000000":yt.earth,opacity:"0.25",stroke:"none","fill-rule":"evenodd","pointer-events":"none"});let D=L.append("path").attr("class",t.cls("sphere"));Nt(D.node(),{fill:u?t.dark?"#23282C":"#EEF3F6":"none",stroke:t.dark?it.darkMuted:it.muted,"stroke-width":"0.75px","pointer-events":"none"});let C=L.append("path").attr("class",t.cls("graticule"));F(C.node(),t.dark?it.darkGrid:it.grid,.5);let P=(h,v)=>{var z,Q;if(h===void 0)return`\x3cdiv class="${t.cls("tip-title")}">${wt(v)}\x3c/div>\x3cdiv class="${t.cls("tip-row")}">\x3cspan>No data\x3c/span>\x3c/div>`;let G=b[h],V=`\x3cdiv class="${t.cls("tip-title")}">${wt(o.data.x[h])}\x3c/div>`;(r.categories?(V+=Dt(t.cls("tip-row"),p(h),"Category",(z=r.categories[h])!=null?z:"None")):!1),(G!=null?(V+=Dt(t.cls("tip-row"),(r.categories?!0:d)?"transparent":p(h),o.data.series[0].label,t.fmtValue(G)),((!d?g.length>2:!1)?(V+=Dt(t.cls("tip-row"),"transparent","Rank",`${mr(w.get(h))} of ${g.length}`)):!1)):!1);for(let j of(Q=r.tips)!=null?Q:[])(j.values[h]?(V+=Dt(t.cls("tip-row"),"transparent",j.label,j.values[h])):!1);return V},$=L.append("g").selectAll("path").data(n.features).join("path").attr("class",t.cls("place")).each(function(h){let v=y.get(h.id);Nt(this,{fill:d?t.dark?ze:Be:v===void 0?t.dark?Xt:qt:p(v),stroke:"none","fill-rule":"evenodd"})}),I=L.append("path");F(I.node(),B,n.id==="us-counties"?.4:.75);let O=L.append("path");F(O.node(),B,1.2);let K=L.append("path").attr("class",t.cls("map-hover"));F(K.node(),t.dark?it.darkPrimary:yt.earth,1.5),K.style("display","none");let at=null;(d?!0:t.tooltip.bind(L,h=>{let v=h.target.__data__;if((!v?!0:!h.target.classList.contains(t.cls("place"))))return;let[G,V]=a.pointer(h,t.chartEl);at=v,K.attr("d",l.d(v)).style("display",null),t.tooltip.show(P(y.get(v.id),v.name),G,V)},()=>{at=null,K.style("display","none")}));let rt=()=>{};if(d){let h=s.domain?Math.max(Math.abs(s.domain[0]),Math.abs(s.domain[1])):0,v=s.symbolMax*Math.min(1,t.width/600)*(t.mobile?.8:1),G=R=>(R===null?!0:!h)?3.5:Math.max(1.5,v*Math.sqrt(Math.abs(R)/h)),V=new Map(n.features.map(R=>[R.id,R])),z=o.data.x.map((R,tt)=>({i:tt,r:G(b[tt])})).sort((R,tt)=>tt.r-R.r),Q=R=>r.categories?p(R):yt.turquoise,j=n.sphere?1:t.width/n.w,M=R=>{var T;let tt=(T=r.xy)==null?void 0:T[R];if(tt)return[tt[0]*j,tt[1]*j];let J=r.ids[R]?V.get(r.ids[R]):void 0;return J?l.anchor(J):null},X=e.append("g").selectAll("circle").data(z).join("circle").attr("class",t.cls("symbol")).attr("r",R=>R.r).each(function(R){Nt(this,{fill:Q(R.i),"fill-opacity":h?"0.78":"0.9",stroke:B,"stroke-width":"0.75px"})});rt=()=>X.each(function(R){var J,T;let tt=M(R.i);this.setAttribute("cx",String((J=tt==null?void 0:tt[0])!=null?J:0)),this.setAttribute("cy",String((T=tt==null?void 0:tt[1])!=null?T:0)),this.style.setProperty("display",tt?"":"none")}),t.tooltip.bind(X,(R,tt)=>{let[J,T]=a.pointer(R,t.chartEl);t.tooltip.show(P(tt.i,o.data.x[tt.i]),J,T)})}let st=()=>{A.attr("d",u?l.sphere():l.land()),D.attr("d",l.sphere()),C.attr("d",l.graticule()),$.attr("d",h=>l.d(h)),I.attr("d",l.inner()),O.attr("d",l.group()),(at?K.attr("d",l.d(at)):!1),rt()};if(st(),u){let h=Math.min(t.width,l.height)/2,v=a.drag().on("drag",G=>{let V=75/h;m.rotate=[m.rotate[0]+G.dx*V,Math.max(-85,Math.min(85,m.rotate[1]-G.dy*V))],l=en(t,n,m.rotate),st()});e.call(v).style("touch-action","none").style("cursor","grab")}if((o.type==="map-states"?s.labels:!1)){let h=e.append("g").attr("class",t.cls("map-labels")).style("pointer-events","none"),v=n.features.map(j=>({f:j,a:l.anchor(j)})).filter(j=>!!j.a),G=v.filter(j=>Je.includes(j.f.code)).sort((j,M)=>j.a[1]-M.a[1]),V=(520)>(t.width),z=(j,M,X,R,tt)=>h.append("text").attr("class",t.cls("map-label")).attr("x",j).attr("y",M).attr("dy","0.35em").attr("text-anchor",X).style("fill",R).style("fill-opacity","0.8").text(tt),Q=t.width/n.w;for(let{f:j,a:M}of v){if((!j.code?!0:Je.includes(j.code)))continue;let X=y.get(j.id),R=lr[j.code],[tt,J]=R?[R[0]*Q,R[1]*Q]:M;z(tt,J,"middle",X===void 0?t.dark?it.darkPrimary:it.primary:te(p(X)),j.code)}if(!V){let j=t.width-16*Q,M=-1/0;for(let{f:X,a:R}of G){M=Math.max(R[1],M+14);let tt=h.append("line").attr("x1",R[0]).attr("y1",R[1]).attr("x2",j-14).attr("y2",M);Nt(tt.node(),{stroke:t.dark?it.darkMuted:it.secondary,"stroke-width":"0.75px"}),z(j,M,"end",t.dark?it.darkPrimary:it.primary,X.code)}}}return l.height}var Pt=8,Yt=2,xe=Yt+Pt+13,an=xe+5;function on(t,n,a,o){var b,y,g,w,B,F,E,H;if(!n)return;let e=a.style.map,r=a.data.map,s=t.dark?it.darkSecondary:it.secondary,u=t.dark?Xt:qt,c=new Set(r.ids.filter(L=>L!==null)),i=(a.type!=="map-dots"?o.features.some(L=>!c.has(L.id)):!1),m=(L,A)=>`\x3cspan class="${t.cls("legend-item")}">\x3csvg class="${t.cls("swatch")}" width="12" height="12" aria-hidden="true">\x3crect width="12" height="12" rx="2" fill="${L}"/>\x3c/svg>${wt(A)}\x3c/span>`,l=i?m(u,__gvOr(e.noDataLabel,()=>("No data"))):"",d=L=>{if(!i)return{svg:"",width:0};let A=__gvOr(e.noDataLabel,()=>("No data")),D=Yt+Pt/2;return{svg:`\x3crect class="${t.cls("legend-nodata")}" x="${L}" y="${D-5}" width="10" height="10" rx="2" fill="${u}"/>\x3ctext x="${L+16}" y="${D}" dy="0.35em" class="${t.cls("legend-key")}">${wt(A)}\x3c/text>`,width:40+A.length*7.5}},p="";if(e.categories.length)p=e.categories.map(L=>m(L.color,L.name)).join("")+l;else if(a.type==="map-dots"){let L=e.domain?Math.max(Math.abs(e.domain[0]),Math.abs(e.domain[1])):0,A=e.symbolMax*Math.min(1,t.width/600)*(t.mobile?.8:1),D=C=>A*Math.sqrt(C/L);if((L?e.sizeTicks.length:!1)){let C=D(e.sizeTicks[e.sizeTicks.length-1]),P=C*2+7,$=[];[...e.sizeTicks].reverse().forEach((rt,st)=>$.push(Math.max(P-2*D(rt),st?$[st-1]+12:7)));let I=C*2+70,O=Math.max(P+3,$[$.length-1]+8),K=`stroke:${s} !important;fill:none !important`,at=[...e.sizeTicks].reverse().map((rt,st)=>{let U=P-2*D(rt);return`\x3ccircle cx="${C+1}" cy="${P-D(rt)}" r="${D(rt)}" style="${K};stroke-width:1px"/>\x3cpolyline points="${C+1},${U} ${C*2+4},${U} ${C*2+8},${$[st]}" style="${K};stroke-width:0.5px"/>\x3ctext x="${C*2+11}" y="${$[st]}" dy="0.35em" class="${t.cls("legend-label")}">${wt(t.fmtValue(rt))}\x3c/text>`}).join("");p=`\x3csvg width="${I}" height="${O}" aria-hidden="true">${at}\x3c/svg>`}}else if(((e.continuous?e.stops.length>=2:!1)?e.stops[0]!==e.stops[e.stops.length-1]:!1)){let L=Math.min(260,t.width-20),A=t.id("legend-grad"),D=e.colors.map(($,I)=>`\x3cstop offset="${I/(e.colors.length-1)*100}%" stop-color="${$}"/>`).join(""),C=[e.stops[0],e.stops.length===3?e.stops[1]:null,e.stops[e.stops.length-1]].map(($,I)=>$===null?"":`\x3ctext x="${I/2*L}" y="${xe}" text-anchor="${["start","middle","end"][I]}" class="${t.cls("legend-label")}">${wt(t.fmtValue($))}\x3c/text>`).join(""),P=d(L+24);p=`\x3csvg width="${L+P.width+4}" height="${an}" aria-hidden="true">\x3cdefs>\x3clinearGradient id="${A}">${D}\x3c/linearGradient>\x3c/defs>\x3crect class="${t.cls("legend-step")}" y="${Yt}" width="${L}" height="${Pt}" rx="${Pt/2}" fill="url(#${A})"/>${C}${P.svg}\x3c/svg>`}else if((e.colors.length===1?!0:((e.continuous?e.stops.length>=2:!1)?e.stops[0]===e.stops[e.stops.length-1]:!1))){let L=(y=(b=e.domain)==null?void 0:b[0])!=null?y:e.stops[0];p=(L===void 0?"":m(e.colors[0],t.fmtValue(L)))+l}else if(e.colors.length){let L=e.colors.length,A=(B=(w=(g=e.domain)==null?void 0:g[0])!=null?w:e.thresholds[0])!=null?B:0,D=(H=(E=(F=e.domain)==null?void 0:F[1])!=null?E:e.thresholds[e.thresholds.length-1])!=null?H:0,C=Lt(t.d3,a.style.yFormat,[A,D],Math.max(1,e.thresholds.length)),P=e.thresholds.map(U=>C(U)),$=Math.max(0,...P.map(U=>U.length))*7+6,I=Math.max($,Math.min(44,Math.floor((Math.min(320,t.width)-20)/L))),O=I*L,K=t.id("legend-clip"),at=e.colors.map((U,Y)=>`\x3crect class="${t.cls("legend-step")}" x="${Y*I}" y="${Yt}" width="${I}" height="${Pt}" fill="${U}"/>`).join(""),rt=P.map((U,Y)=>`\x3ctext x="${(Y+1)*I}" y="${xe}" text-anchor="middle" class="${t.cls("legend-label")}">${wt(U)}\x3c/text>`).join(""),st=d(O+24);p=`\x3csvg width="${O+st.width+4}" height="${an}" aria-hidden="true">\x3cdefs>\x3cclipPath id="${K}">\x3crect y="${Yt}" width="${O}" height="${Pt}" rx="${Pt/2}"/>\x3c/clipPath>\x3c/defs>\x3cg clip-path="url(#${K})">${at}\x3c/g>${rt}${st.svg}\x3c/svg>`}n.innerHTML=p,n.style.display=p?"":"none",n.removeAttribute("role"),n.removeAttribute("aria-label")}function Me(t){return t.replace(/[\x26\x3c>"]/g,n=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;",'"':"\x26quot;"})[n])}var fr=["line","area","column","bar","stacked","combo","dot","scatter"];function we(t){return (t.style.legend==="direct"?De.includes(t.type):!1)}function sn(t,n,a,o){var y,g,w,B;if(!n)return;let e=a,r=e.data.series,s=(y=e.style.legend)!=null?y:"top",u=()=>{n.innerHTML="",n.style.display="none",n.removeAttribute("role"),n.removeAttribute("aria-label")};if(((s==="none"?!0:s==="subtitle")?!0:we(e)))return u();let c=(F,E)=>ne(e.style.swatch,F,t.cls("swatch"),E),i=(F,E,H,L=!1)=>{let A=(H!==void 0?m:!1)?"button":"span",D=A==="button"?` type="button" data-key="${Me(H)}" aria-pressed="${!o.has(H)}" title="Show or hide ${Me(F)}"`:"",C=`${t.cls("legend-item")}${(H!==void 0?o.has(H):!1)?` ${t.cls("legend-item--off")}`:""}`;return`\x3c${A} class="${C}"${D}>${E}${Me(F)}${L?`\x3cspan class="${t.cls("legend-axis")}">right axis\x3c/span>`:""}\x3c/${A}>`},m=__gvAnd(__gvAnd(fr.includes(e.type),()=>(r.length>1)),()=>(!e.style.paletteId.startsWith("highlight"))),l=[];if(e.type==="donut"){let F=(g=e.data.categoryColors)!=null?g:[];l=e.data.x.map((E,H)=>i(String(E),c(re(e,F[H],t.dark))))}else if(e.type==="slope"){let F=e.style.paletteId;if(((F==="rise-fall"?!0:F==="rise-fall-azure")?!0:F==="political")){let E=(w=e.data.categoryColors)!=null?w:[],[H,L]=e.data.series,A=$=>E.find((I,O)=>__gvAnd(((H==null?void 0:H.values[O])!=null?(L==null?void 0:L.values[O])!=null:!1),()=>($(H.values[O],L.values[O])))),D=A(($,I)=>I>$),C=A(($,I)=>($)>(I)),P=A(($,I)=>I===$);l=[D?i("Rose",c(re(e,D,t.dark))):"",C?i("Fell",c(re(e,C,t.dark))):"",P?i("No change",c(re(e,P,t.dark))):""].filter(Boolean)}}else if((e.style.paletteId.startsWith("highlight")?r.length>1:!1)){let F=Math.max(0,r.findIndex(E=>E.key===e.style.highlight));l=[i(r[F].label,c(ct(e,F,t.dark))),i("All others",c(ct(e,F===0?1:0,t.dark)))]}else if(r.length>1){let F=__gvAnd(r.some(E=>E.axis==="right"),()=>(r.some(E=>E.axis!=="right")));l=r.map((E,H)=>i(E.label,c(ct(e,H,t.dark),E.dashed),E.key,(F?E.axis==="right":F)))}let d=l.join(""),p=n.ownerDocument.activeElement,b=(p?n.contains(p):!1)?(B=p.dataset)==null?void 0:B.key:void 0;if(n.innerHTML=d,n.style.display=l.length?"":"none",(m?l.length:!1)?(n.setAttribute("role","group"),n.setAttribute("aria-label","Series. Select to show or hide.")):(n.removeAttribute("role"),n.removeAttribute("aria-label")),b!==void 0){let F=[...n.querySelectorAll("[data-key]")].find(E=>E.dataset.key===b);((F?n.ownerDocument.activeElement!==F:!1)?F.focus():!1)}}function re(t,n,a){return Et(t,n!=null?n:it.muted,a)}function Zt(t,n,a,o={}){let e=t.svg.append("g").attr("class",t.cls("tick-probe")).attr("opacity",0),r=n.map(s=>{var c;let u=e.append("text").attr("class",(c=o.cls)!=null?c:null).style("font-size",`${a}px`).style("font-variant-numeric","tabular-nums").text(s);return (o.weight?u.style("font-weight",String(o.weight)):!1),Math.ceil(u.node().getComputedTextLength())});return e.remove(),r}function ft(t,n,a,o={}){return Math.max(0,...Zt(t,n,a,o))}function cn(t,n){return n.ticks(t.mobile?4:5)}var It=12;function un(t){let n=-1;for(let a=0;(t.length)>(a);a++){let o=(0)>(n)?1:Math.abs(t[a])-Math.abs(t[n]);(((o>0?!0:(o===0?t[a]>t[n]:!1)))?(n=a):!1)}return n}function mn(t,n){let a=un(n);return n.map((o,e)=>e===a?t.fmtAxis(o):t.fmtAxisBare(o))}function $t(t,n){return t?n?[Math.min(t[0],n[0]),Math.max(t[1],n[1])]:t:n}function Gt(t,n,a){let o=cn(t,n);if(!o.length)return 10;let e=Zt(t,mn(t,o),It),r=un(o),s=e[r],u=Math.max(0,...e.filter((b,y)=>y!==r)),c=Math.max(s,u)+10;if((u)>=(s))return c;let i=u+10,m=Math.max(40,t.width-i-t.margin.right),l=s-i+6,d=Math.round(n(o[r])),p=a(l/m,n);return ((p?(d+2)>=(p[0]):!1)?p[1]>=d-16:!1)?c:i}function Bt(t,n,a,o){let e=null,r=s=>e=$t(e,[s,s]);for(let s=0;(n.length)>(s);s++){let u=n[s];if((u===null?!0:t[s]>a))continue;r(o(u));let c=n[s+1];if(((c!=null?t[s+1]>a:!1)?t[s+1]>t[s]:!1)){let i=(a-t[s])/(t[s+1]-t[s]);r(o(u+(c-u)*i))}}return e}function oe(t,n){return t?[t[0]-n,t[1]+n]:null}function zt(t,n,a,o){let e=cn(t,a),r=mn(t,e),s=-t.margin.left;n.append("g").attr("class",t.cls("grid")).selectAll("line").data(e).join("line").attr("x1",s).attr("x2",o).attr("y1",c=>Math.round(a(c))+.5).attr("y2",c=>Math.round(a(c))+.5),n.append("g").attr("class",`${t.cls("ticks")} ${t.cls("ticks--y")}`).selectAll("text").data(e).join("text").attr("x",s).attr("y",c=>Math.round(a(c))-4).text((c,i)=>r[i])}function pn(t){t.svg.selectAll(`.${t.cls("ticks--y")}`).raise()}function Ot(t,n,a,o){let[e,r]=a.domain();if((e>0?!0:(0)>(r)))return;let s=((0)>(e)?r>0:!1);n.append("line").attr("class",t.cls(s?"zero":"baseline")).attr("x1",-t.margin.left).attr("x2",o).attr("y1",Math.round(a(0))+.5).attr("y2",Math.round(a(0))+.5)}function se(t,n,a,o){n.append("line").attr("class",t.cls("baseline")).attr("x1",-t.margin.left).attr("x2",a).attr("y1",o+.5).attr("y2",o+.5)}function ie(t,n){return Math.max(2,Math.floor(t/(n?70:90)))}var gr=10;function br(t){return It}function yr(t,n,a,o){return (a)>(t-n/2)?{anchor:"start",start:t,end:t+n}:t+n/2>o?{anchor:"end",start:t-n,end:t}:{anchor:"middle",start:t-n/2,end:t+n/2}}function le(t,n,a,o){let e=-t.margin.left,r=t.width-t.margin.left,s=new Map,u=m=>{let l=[...new Set(m.filter(d=>!s.has(d)))];return Zt(t,l,br(t)).forEach((d,p)=>s.set(l[p],d)),m.map(d=>s.get(d))},c=null,i=-1;for(let m=Math.max(1,Math.floor(o));m>=1;m--){let l=a(m);if(l.ticks.length===i)continue;i=l.ticks.length;let d=l.ticks.map(l.label),p=u(d),b=l.ticks.map((w,B)=>yr(n(w),p[B],e,r));c={...l,anchor:w=>b[w].anchor};let y=b.every(w=>(w.start>=e-.5?(r+.5)>=(w.end):!1)),g=b.every((w,B)=>(B===0?!0:(w.start)>=(b[B-1].end+gr)));if((y?g:!1))return c}return c!=null?c:{...a(1),anchor:()=>"middle"}}function ce(t,n){let a=n.domain();return t.spec.data.xKind==="year"?o=>({ticks:n.ticks(o).filter(e=>Number.isInteger(e)),label:e=>String(e)}):o=>{let e=t.xAxis(a,o);return{ticks:n.ticks(o),label:r=>e(r)}}}function ue(t,n,a,o,e){n.append("g").attr("class",t.cls("ticks")).attr("transform",`translate(0,${a})`).selectAll("text").data(o.ticks).join("text").attr("x",r=>e(r)).attr("y",22).attr("text-anchor",(r,s)=>o.anchor(s)).text((r,s)=>o.label(r,s))}function ae(t,n,a,o){let e=[...t].sort((i,m)=>i.y-m.y),r=e.length;if(!r)return;let s=r>1?Math.min(n,Math.max(0,o-a)/(r-1)):n,u=i=>{i.top=Math.max(a,Math.min(o-(i.size-1)*s,i.sum/i.size))},c=[];e.forEach((i,m)=>{let l={start:m,size:1,sum:i.y,top:i.y};for(u(l),c.push(l);c.length>1;){let d=c[c.length-1],p=c[c.length-2];if((d.top+1e-9)>=(p.top+p.size*s))break;p.sum+=d.sum-d.size*p.size*s,p.size+=d.size,c.pop(),u(p)}});for(let i of c)for(let m=0;(i.size)>(m);m++)e[i.start+m].y=i.top+m*s}function dn(t,n,a,o,e){let r=[],s=[];for(let c of t){let i=[...r,{item:c,y:c.y}].map(l=>({own:l.y,y:l.y})),m=(o-a)>=((i.length-1)*n);(m?ae(i,n,a,o):!1),(m?i.every(l=>__gvLe(Math.abs(l.y-l.own),e)):!1)?r.push({item:c,y:c.y}):s.push(c)}let u=r.map(c=>({y:c.y}));return ae(u,n,a,o),r.forEach((c,i)=>c.item.y=u[i].y),{kept:r.map(c=>c.item),dropped:s}}function hn(t,n,a,o){let e=[...new Set(a.map(g=>g.getTime()))].sort((g,w)=>g-w),r=xr(a,e),s=[...[t.utcDay,t.utcDay.every(2),t.utcWeek,t.utcWeek.every(2)].map(g=>[g,"day"]),...[1,2,3,6].map(g=>[t.utcMonth.every(g),"month"]),...[1,2,5,10,20,25,50,100,200,250,500,1e3].map(g=>[t.utcYear.every(g),"year"])],u=s.slice(s.findIndex(([,g])=>g===r)),[c,i]=n.domain(),[m,l]=u[u.length-1],d=[];for(let[g,w]of u){let B=ln(g,e,c,i);if((o)>=(B.length)){[m,l,d]=[g,w,B];break}}(d.length?!0:(d=ln(m,e,c,i))),((!d.length?e.length:!1)?(d=e.length===1?[new Date(e[0])]:[new Date(e[0]),new Date(e[e.length-1])]):!1);let p=(g,w)=>(w===0?!0:d[w-1].getUTCFullYear()!==g.getUTCFullYear()),b={year:t.utcFormat("%Y"),month:t.utcFormat("%b"),monthYear:t.utcFormat("%b %Y"),day:t.utcFormat("%b %-d"),dayYear:t.utcFormat("%b %-d, %Y")};return{ticks:d,label:(g,w)=>l==="year"?b.year(g):l==="month"?p(g,w)?b.monthYear(g):b.month(g):p(g,w)?b.dayYear(g):b.day(g)}}function xr(t,n){if(t.every(r=>(r.getUTCMonth()===0?r.getUTCDate()===1:!1)))return"year";if((2)>(n.length))return t.every(r=>r.getUTCDate()===1)?"month":"day";let o=1/0;for(let r=1;(n.length)>(r);r++)o=Math.min(o,n[r]-n[r-1]);let e=o/864e5;return e>=360?"year":e>=28?"month":"day"}function ln(t,n,a,o){let e=t.range(t.floor(a),new Date(o.getTime()+1)),r=[];return e.forEach((s,u)=>{var m;let c=((m=e[u+1])!=null?m:t.offset(s,1)).getTime(),i=Mr(n,s.getTime());((n.length)>(i)?(c)>(n[i]):!1)?r.push(new Date(n[i])):((s>=a?(o)>=(s):!1)?r.push(s):!1)}),r}function Mr(t,n){let a=0,o=t.length;for(;(o)>(a);){let e=a+o>>1;(n)>(t[e])?a=e+1:o=e}return a}function xt(t,n){var o,e,r;let a=(o=t.spec.style.imageFill)==null?void 0:o.photos;if(!a)return null;for(let s of n)if((s!==void 0?(((e=a[s])!=null?e.url:!1)):!1))return a[s].url;return __gvOr(((r=a["*"])==null?void 0:r.url),()=>(null))}function Ht(t){var a;let n=(a=t.spec.style.imageFill)==null?void 0:a.photos;return(!!n?Object.values(n).some(o=>!!((o!=null?o.url:!1))):!1)}function fn(t,n,a){let o=(e,r)=>__gvOr(parseInt(e.replace("#","").slice(r,r+2),16),()=>(0));return[0,2,4].map(e=>(o(t,e)+(o(n,e)-o(t,e))*a)/255)}function Ct(t,n,a,o){let e=t.svg.select("defs").empty()?t.svg.append("defs"):t.svg.select("defs"),r=i=>{let m=t.id(`duo-${i.replace(/[^0-9a-z]/gi,"")}`);if(!e.select(`#${m}`).empty())return m;let l=e.append("filter").attr("id",m).attr("color-interpolation-filters","sRGB").attr("x",0).attr("y",0).attr("width",1).attr("height",1);l.append("feColorMatrix").attr("type","saturate").attr("values","0");let d=fn(i,"#000000",.6),p=fn(i,"#FFFFFF",.6),b=l.append("feComponentTransfer");return["feFuncR","feFuncG","feFuncB"].forEach((y,g)=>b.append(y).attr("type","table").attr("tableValues",`${d[g].toFixed(3)} ${p[g].toFixed(3)}`)),m},s=new Map;return{clip:(i,m,l)=>{let d=`${i}|${m}${l?`|${l.x},${l.y},${l.w},${l.h}`:""}`,p=s.get(d);if(!p){let b=t.id(`clip-${e.selectAll("clipPath").size()}`);p={id:b,url:i,color:m,box:l!=null?l:{x:0,y:0,w:a,h:o},sel:e.append("clipPath").attr("id",b)},s.set(d,p)}return p.sel},paint:()=>{for(let i of s.values())n.insert("image",":first-child").attr("class",t.cls("photo")).attr("href",i.url).attr("x",i.box.x).attr("y",i.box.y).attr("width",Math.max(1,i.box.w)).attr("height",Math.max(1,i.box.h)).attr("preserveAspectRatio","xMidYMid slice").attr("clip-path",`url(#${i.id})`).attr("filter",`url(#${r(i.color)})`),n.insert("rect",":first-child").attr("x",i.box.x).attr("y",i.box.y).attr("width",Math.max(1,i.box.w)).attr("height",Math.max(1,i.box.h)).attr("fill",i.color).attr("clip-path",`url(#${i.id})`)}}}function me(t,n){var o;let a=t.spec.style.imageFill;return __gvAnd((!!a?a.mode==="category":!1),()=>(!!(((o=a.photos[n])!=null?o.url:!1))))}function kt(t,n){return n?0:1}function pe(t,n,a,o,e,r){if(((0)>=(a)?!0:(0)>=(o)))return"";let s=Math.min(e,(r==="up"?!0:r==="down")?a/2:o/2,(r==="up"?!0:r==="down")?o:a),u=t+a,c=n+o;switch(r){case"up":return`M${t},${c}V${n+s}Q${t},${n} ${t+s},${n}H${u-s}Q${u},${n} ${u},${n+s}V${c}Z`;case"down":return`M${t},${n}V${c-s}Q${t},${c} ${t+s},${c}H${u-s}Q${u},${c} ${u},${c-s}V${n}Z`;case"right":return`M${t},${n}H${u-s}Q${u},${n} ${u},${n+s}V${c-s}Q${u},${c} ${u-s},${c}H${t}Z`;case"left":return`M${u},${n}H${t+s}Q${t},${n} ${t},${n+s}V${c-s}Q${t},${c} ${t+s},${c}H${u}Z`}}function Vt(t,n,a,o){let e=t.length?t[0]:0,r=e;for(let s of t)((e)>(s)?(e=s):!1),(s>r?(r=s):!1);return (t.length?!0:([e,r]=[0,1])),(n?(e=Math.min(0,e),r=Math.max(0,r)):!1),(a!==null?(e=a):!1),(o!==null?(r=o):!1),(e===r?(r=e+1):!1),(e>r?([e,r]=[r,e]):!1),[e,r]}function gn(t){var lt,dt,mt,ht,Mt;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=a.type==="area",u=(s?e.series.length>1:s),c=e.xKind==="category",i=e.x.map((N,S)=>e.xKind==="date"?Xe(N):c?S:Number(N)),m=i.length;if(m===0)return;let l=__gvAnd((!s?e.series.some(N=>N.axis==="right"):!1),()=>(e.series.some(N=>N.axis!=="right"))),d=N=>(l?e.series[N].axis==="right":l),p=N=>e.series.filter((S,f)=>d(f)===N).flatMap(S=>S.values).filter(S=>S!==null),b=[],y,g;if(u){let N=i.map((S,f)=>e.series.map(x=>{var et;return(et=x.values[f])!=null?et:0}));b=n.stack().keys(e.series.map((S,f)=>f)).value((S,f)=>S[f]).offset(n.stackOffsetDiverging)(N),[y,g]=Vt(b.flatMap(S=>S.flatMap(f=>[f[0],f[1]])),!0,r.yMin,r.yMax)}else[y,g]=Vt(p(!1),__gvOr(__gvOr(r.yFromZero,()=>(s)),()=>(ke(t))),r.yMin,r.yMax);let w=t.margin,B=t.height-w.top-w.bottom,F=t.mobile?4:5,E=n.scaleLinear().domain([y,g]).nice(F).range([B,0]);t.setAxis(E.domain(),F);let H=l?n.scaleLinear().domain(Vt(p(!0),r.rightFromZero,null,null)).nice(F).range([B,0]):E,L=l?t.rightAxis(H.domain(),F):t.fmtAxis,A=l?H.ticks(F):[],D=l?ft(t,A.map(L),It)+10:0,C=N=>d(N)?H:E,P=N=>t.fmtFor(e.series[N]),$=e.series.map(N=>{for(let S=N.values.length-1;S>=0;S--)if(N.values[S]!==null)return S;return-1}),I=__gvAnd(we(a),()=>(!u)),O=__gvAnd((__gvOr(r.valueLabels,()=>(I))),()=>(!u)),K=N=>{if((0)>($[N]))return["",""];let S=P(N)(e.series[N].values[$[N]]);return I?[e.series[N].label,r.valueLabels?S:""]:["",S]},at=N=>K(N).filter(Boolean).join(" "),rt=D?D+6:9,st=I?{cls:t.cls("direct-label"),size:13,weight:700}:{cls:t.cls("value-label"),size:12,weight:500};if(O){let N=ft(t,e.series.map((S,f)=>at(f)),st.size,st);w.right=Math.max(w.right,Math.min(N,t.width/3)+rt+6)}else l?w.right=Math.max(w.right,D+4):(r.endDots?(w.right=Math.max(w.right,10)):!1);let U=i.map(N=>+N),[Y,_]=(lt=je(U))!=null?lt:[0,0],k=U.map(N=>_>Y?(N-Y)/(_-Y):0),h=(s?s:ke(t));w.left=Gt(t,E,N=>{let S=u?b.flatMap(x=>[Bt(k,x.map(et=>et[1]),N,E),Bt(k,x.map(et=>et[0]),N,E)]):e.series.map((x,et)=>Bt(k,x.values,N,C(et))),f=oe(S.reduce($t,null),6);return ((f?h:!1)?(f=$t(f,[E(0),E(0)])):!1),f});let v=Math.max(40,t.width-w.left-w.right),G=e.xKind==="date"?n.scaleUtc().domain(n.extent(i)).range([0,v]):n.scaleLinear().domain(n.extent(i)).range([0,v]),V=o.append("g").attr("transform",`translate(${w.left},${w.top})`);if(zt(t,V,E,v),se(t,V,v,B),Ot(t,V,E,v),l){let N=At(a,ct(a,e.series.findIndex(S=>S.axis==="right"),t.dark),t.dark);V.append("g").attr("class",t.cls("ticks")).selectAll("text").data(A).join("text").attr("x",v+8).attr("y",S=>H(S)).attr("dy","0.32em").style("fill",N).text(S=>L(S)),(r.rightLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",t.width).attr("y",t.rightTitleY).attr("text-anchor","end").style("fill",N).text(r.rightLabel):!1)}let z=N=>G(N);ue(t,V,B,le(t,z,wr(t,G,i),c?m:ie(v,t.mobile)),z);let Q=N=>G(i[N]),j=t.id("plot");o.append("defs").append("clipPath").attr("id",j).append("rect").attr("x",-8).attr("y",-8).attr("width",v+16).attr("height",B+16);let M=V.append("g").attr("clip-path",(r.yMin!==null?!0:r.yMax!==null)?`url(#${j})`:null),X=V.append("g"),R=r.curve==="monotone"?n.curveMonotoneX:n.curveLinear;if(s){let N=Ht(t)?Ct(t,M,v,B):null;(u?b:[e.series[0].values.map(f=>[0,f!=null?f:0])]).forEach((f,x)=>{var Z;let nt=(Z=n.area().curve(R).x((q,ot)=>Q(ot)).y0(q=>E(q[0])).y1(q=>E(q[1]))(f))!=null?Z:"",W=N?xt(t,[e.series[x].key]):null;((N?W:!1)?N.clip(W,ct(a,x,t.dark)).append("path").attr("d",nt):!1),M.append("path").attr("class",t.cls("area")).attr("d",nt).attr("fill",ct(a,x,t.dark)).attr("fill-opacity",kt(t,W)),((m===1?e.series[x].values[0]!==null:!1)?M.append("circle").attr("cx",Q(0)).attr("cy",E(f[0][1])).attr("r",3.5).attr("fill",ct(a,x,t.dark)):!1)}),(N==null?!0:N.paint())}if(!s){let[N,S]=E.domain(),f=((ke(t)?(0)>=(N):!1)?S>=0:!1)?xt(t,[e.series[0].key]):null,x=f?Ct(t,M,v,B):null;if((x?f:!1)){let Z=(dt=n.area().curve(R).defined(q=>q!==null).x((q,ot)=>Q(ot)).y0(E(0)).y1(q=>E(q))(e.series[0].values))!=null?dt:"";x.clip(f,ct(a,0,t.dark)).append("path").attr("d",Z),M.append("path").attr("d",Z).attr("fill",ct(a,0,t.dark)).attr("fill-opacity",kt(t,f)),x.paint()}let et=W=>n.line().curve(R).defined(Z=>Z!==null).x((Z,q)=>Q(q)).y(Z=>C(W)(Z)),nt=e.series.map((W,Z)=>Z).sort((W,Z)=>Number(jt(a,W))-Number(jt(a,Z))).reverse();for(let W of nt){let Z=e.series[W],q=(mt=et(W)(Z.values))!=null?mt:"";((e.series.length>1?!jt(a,W):!1)?M.append("path").attr("class",t.cls("line-halo")).attr("d",q):!1),M.append("path").attr("class",t.cls("line")).attr("d",q).attr("stroke",ct(a,W,t.dark)).attr("stroke-width",jt(a,W)?2:t.mobile?3:3.5).attr("stroke-dasharray",Z.dashed?"6 4":null),Z.values.forEach((ot,pt)=>{(((ot===null?!0:Z.values[pt-1]!=null)?!0:Z.values[pt+1]!=null)?!0:M.append("circle").attr("cx",Q(pt)).attr("cy",C(W)(ot)).attr("r",3.5).attr("fill",ct(a,W,t.dark)))})}(r.endDots?e.series.forEach((W,Z)=>{if(((0)>($[Z])?!0:jt(a,Z)))return;let q=Q($[Z]),ot=C(Z)(e.series[Z].values[$[Z]]);M.append("circle").attr("class",`${t.cls("dot")} ${t.cls("dot--pulse")}`).attr("cx",q).attr("cy",ot).attr("r",5).attr("fill",ct(a,Z,t.dark))}):!1)}if(O){let N=e.series.map((f,x)=>({i:x,y:$[x]>=0?C(x)(f.values[$[x]]):NaN,x:$[x]>=0?Q($[x]):0})).filter(f=>(!Number.isNaN(f.y)?((!jt(a,f.i)?!0:I)):!1));ae(N,15,6,B);let S=t.width/3;for(let f of N){let x=e.series[f.i].values[$[f.i]],[et,nt]=C(f.i).domain(),W=x>nt?-1:(et)>(x)?1:0,Z=(l?v:f.x)+rt,q=At(a,ct(a,f.i,t.dark),t.dark);(W?X.append("path").attr("class",t.cls("off-scale")).attr("d",`M${Z+4},${f.y+W*5}l-4,${-W*8}h8z`).attr("fill",q).append("title").text((0)>(W)?"Above the axis range":"Below the axis range"):!1);let ot=X.append("text").attr("class",t.cls(I?"direct-label":"value-label")).attr("x",Z+(W?12:0)).attr("y",f.y).attr("dy","0.32em").style("fill",q).text(at(f.i)),pt=ot.node(),[ut,vt]=K(f.i),Tt=(ut?ut:vt),In=Ee=>ut?[`${Ee.trimEnd()}\u2026`,vt].filter(Boolean).join(" "):`${Ee.trimEnd()}\u2026`;for(;(pt.getComputedTextLength()>S?Tt.length>4:!1);)Tt=Tt.slice(0,-2),ot.text(In(Tt))}}let tt=V.append("g").attr("class",t.cls("hover")).style("display","none"),J=new Set((Mt=(ht=r.tooltip)==null?void 0:ht.hideRows)!=null?Mt:[]);tt.append("line").attr("class",t.cls("rule")).attr("y1",0).attr("y2",B);let T=V.append("rect").attr("class",t.cls("overlay")).attr("width",v).attr("height",B);t.tooltip.bind(T,N=>{var pt;let[S]=n.pointer(N),f=G.invert(S),x=Math.max(0,Math.min(m-1,n.bisectCenter(i,f))),et=Q(x);tt.style("display",null).select("line").attr("x1",et).attr("x2",et);let nt=e.series.map((ut,vt)=>({si:vt,v:ut.values[x]})).filter(ut=>(ut.v!==null?!J.has(e.series[ut.si].label):!1)).sort((ut,vt)=>vt.v-ut.v),W=nt.slice(0,8),Z=W.map(ut=>gt(t,ct(a,ut.si,t.dark),e.series[ut.si].label,P(ut.si)(ut.v),e.series[ut.si].dashed)).join(""),q=nt.length>W.length?`\x3cdiv class="${t.cls("tip-more")}">+${nt.length-W.length} more\x3c/div>`:"",ot=W.length?u?E((pt=n.max(b,ut=>ut[x][1]))!=null?pt:0):C(W[0].si)(W[0].v):B/2;t.tooltip.show(`${bt(t,c?String(e.x[x]):t.fmtX((e.xKind==="date",i[x])))}${Z}${q}`,et+w.left,ot+w.top)},()=>tt.style("display","none"))}function ke(t){let{spec:n}=t;return __gvAnd((n.type==="line"?n.data.series.length===1:!1),()=>(!!xt(t,[n.data.series[0].key])))}function jt(t,n){var a;return __gvAnd(t.style.paletteId.startsWith("highlight"),()=>(t.data.series[n].key!==((a=t.style.highlight)!=null?a:t.data.series[0].key)))}function wr(t,n,a){let{d3:o,spec:e}=t,r=e.data;if(r.xKind==="date")return s=>{let u=hn(o,n,a,s);return{ticks:u.ticks,label:(c,i)=>u.label(c,i)}};if(r.xKind==="category"){let s=r.x.map(String),u=s.length;return c=>({ticks:o.range(0,u,Math.max(1,Math.ceil(u/c))),label:i=>s[i]})}return ce(t,n)}var de="http://www.w3.org/2000/svg",bn=/[\p{Script=Latin}\p{Script=Greek}\p{Script=Cyrillic}]/u,yn=/[_\-/.]/;function kr(t,n,a){let o=[],e=Array.from(t);for(;(e.length>1?a(e.join(""))>n:!1);){let r=c=>{let i=e.slice(0,c).join("");return (bn.test(e[c-1])?bn.test(e[c]):!1)?`${i}-`:i},s=1;for(;((e.length-1)>(s)?__gvLe(a(r(s+1)),n):!1);)s++;let u=s;for(;(u>Math.ceil(s/2)?!yn.test(e[u-1]):!1);)u--;(yn.test(e[u-1])?(s=u):!1),o.push(r(s)),e=e.slice(s)}return{lines:o,rest:e.join("")}}function xn(t,n,a,o){let e=[],r="";for(let s of t.split(/\s+/).filter(Boolean)){let u=r?`${r} ${s}`:s;if(__gvLe(o(u),n)){r=u;continue}(r?e.push(r):!1);let c=kr(s,n,o);if(e.push(...c.lines),r=c.rest,e.length>a)break}if((r?e.push(r):!1),e.length>a){let s=Array.from(e[a-1].replace(/-$/,""));for(;(s.length>1?o(`${s.join("").trimEnd()}\u2026`)>n:!1);)s=s.slice(0,-1);e.length=a,e[a-1]=`${s.join("").trimEnd()}\u2026`}return e}function Mn(t){t.textContent="";let n=t.ownerDocument.createElementNS(de,"tspan");return t.appendChild(n),a=>(n.textContent=a,n.getComputedTextLength())}function wn(t,n,a){var r;let o=t.getAttribute("x"),e=t.ownerDocument;if(t.textContent="",(1)>=(n.length)){t.textContent=(r=n[0])!=null?r:"";return}n.forEach((s,u)=>{let c=e.createElementNS(de,"tspan");(o!==null?c.setAttribute("x",o):!1),(u?c.setAttribute("dy",`${a}em`):!1),c.textContent=s,t.appendChild(c)})}function $e(t,n,a,o,e){let r=xn(n,a,o,Mn(t));wn(t,r,e);let s=__gvAnd((r.length>0?r[r.length-1].endsWith("\u2026"):!1),()=>(!n.endsWith("\u2026")));return{lines:Math.max(1,r.length),cut:s}}function vr(t,n,a,o,e){let r=/\s/.test(t),s=p=>r?p.split(/\s+/).filter(Boolean):Array.from(p),u=p=>p.join(r?" ":""),c=s(t),i=n.filter(p=>p!==t).map(s),m=(p,b)=>(p.length>=b?u(p.slice(-b))===u(c.slice(-b)):!1),l=1;for(;((c.length)>(l)?i.some(p=>m(p,l)):!1);)l++;let d=u(c.slice(-l));for(let p=c.length-l-1;p>=0;p--){let b=u(c.slice(0,p)),y=r?`${b?`${b} `:""}\u2026 ${d}`:`${b}\u2026${d}`,g=xn(y,a,1/0,e);if((o)>=(g.length))return g}return null}function kn(t,n){var r;let a=t.ownerDocument,o=a.createElementNS(de,"g"),e=a.createElementNS(de,"title");e.textContent=n,((r=t.parentNode)==null?!0:r.insertBefore(o,t)),o.appendChild(e),o.appendChild(t)}function ve(t){var n;return __gvOr(Array.from(t.querySelectorAll("tspan")).map(a=>{var o;return(o=a.textContent)!=null?o:""}).join(" "),()=>(((n=t.textContent)!=null?n:"").trim()))}function Ce(t,n,a,o=1.15){var s;let e=((s=t.textContent)!=null?s:"").trim(),r=$e(t,e,n,a,o);return (r.cut?kn(t,e):!1),r.lines}function St(t,n,a,o=1.15){let e=t.map(s=>{var u;return((u=s.textContent)!=null?u:"").trim()}),r=t.map((s,u)=>s.getComputedTextLength()>n?$e(s,e[u],n,a,o):{lines:1,cut:!1});for(let s of $r(t,e)){let u=vr(e[s],e,n,a,Mn(t[s]));u?(wn(t[s],u,o),r[s]={lines:u.length,cut:!0}):r[s]=$e(t[s],e[s],n,a,o)}return r.forEach((s,u)=>__gvAnd(s.cut,()=>(kn(t[u],e[u])))),r.map(s=>s.lines)}function $r(t,n){let a=new Map;t.forEach((e,r)=>{var s;return a.set(ve(e),[...(s=a.get(ve(e)))!=null?s:[],r])});let o=[];for(let e of a.values())(new Set(e.map(r=>n[r])).size>1?o.push(...e.filter(r=>n[r]!==ve(t[r]))):!1);return o}var vn=110,Cr=3,Sn=19,Tn=10;function Se(t){return t.toUpperCase()===yt.orange?yt.azure:yt.orange}function Fn(t){var lt,dt,mt,ht,Mt,N;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=a.type==="stacked",u=a.type==="combo",c=S=>(!u?!0:S===0),i=S=>__gvAnd((u?S>0:u),()=>(e.series[S].axis==="right")),m=S=>t.fmtFor(e.series[S]),l=e.x.map(S=>t.fmtX(S)),d=l.length;if(d===0)return;let p=e.series.length,b=0,y=0,g=[];if(s){let S=e.x.map((f,x)=>e.series.map(et=>{var nt;return(nt=et.values[x])!=null?nt:0}));g=n.stack().keys(e.series.map((f,x)=>x)).value((f,x)=>f[x]).offset(n.stackOffsetDiverging)(S),b=Math.min(0,(lt=n.min(g,f=>n.min(f,x=>x[0])))!=null?lt:0),y=Math.max(0,(dt=n.max(g,f=>n.max(f,x=>x[1])))!=null?dt:0)}else{let S=e.series.filter((f,x)=>!i(x)).flatMap(f=>f.values).filter(f=>f!==null);b=Math.min(0,(mt=n.min(S))!=null?mt:0),y=Math.max(0,(ht=n.max(S))!=null?ht:0)}((r.yMax!==null?r.yMax>y:!1)?(y=r.yMax):!1),(b===y?(y=1):!1);let w=e.series.some((S,f)=>i(f)),B=t.mobile?4:5,F=null,E=t.fmtAxis,H=0;if(w){let S=e.series.filter((et,nt)=>i(nt)).flatMap(et=>et.values).filter(et=>et!==null),f=(Mt=n.min(S))!=null?Mt:0,x=(N=n.max(S))!=null?N:1;(r.rightFromZero?(f=Math.min(0,f),x=Math.max(0,x)):!1),(f===x?(x=f+1):!1),F=n.scaleLinear().domain([f,x]).nice(B),E=t.rightAxis(F.domain(),B),H=ft(t,F.ticks(B).map(E),It)+10,t.margin.right=Math.max(t.margin.right,H+4)}let L=n.scaleBand().domain(l.map((S,f)=>String(f))).range([0,1]).paddingInner(.25).paddingOuter(.1),A=l.map((S,f)=>{var x;return((x=L(String(f)))!=null?x:0)+L.bandwidth()/2}),D=(S,f)=>{let x=null;return l.forEach((et,nt)=>{var ot;if(((ot=L(String(nt)))!=null?ot:0)>S)return;let W=s?g.flatMap(pt=>[pt[nt][0],pt[nt][1]]):e.series.filter((pt,ut)=>__gvAnd(c(ut),()=>(!i(ut)))).map(pt=>{var ut;return(ut=pt.values[nt])!=null?ut:0}),Z=Math.max(0,...W),q=Math.min(0,...W);x=$t(x,[f(Z)-((r.valueLabels?Z>0:!1)?Sn:2),f(q)+((r.valueLabels?(0)>(q):!1)?Tn+6:2)])}),e.series.forEach((et,nt)=>{if(c(nt))return;let W=(i(nt)?F:!1)?F.copy().range(f.range()):f;x=$t(x,oe(Bt(A,et.values,S,W),6))}),x},C=t.margin,P=n.scaleLinear().domain([b,y]).nice(t.mobile?4:5).range([t.height-C.top-40,0]);t.setAxis(P.domain(),t.mobile?4:5);let $=P.copy();((r.valueLabels?(24)>=(d):!1)?Cn($,t.height-C.top-40,C.top,$n(t,g)):!1),C.left=Math.max(Gt(t,P,D),Gt(t,$,D));let I=Math.max(40,t.width-C.left-C.right),O=n.scaleBand().domain(l.map((S,f)=>String(f))).range([0,I]).paddingInner(.25).paddingOuter(.1),K=O.bandwidth(),at=t.mobile?12:13,rt=ft(t,l,at),st=e.xKind!=="category",U=1,Y="flat";(rt>K+O.step()*.25?(st?U=Math.ceil((rt+10)/O.step()):Y=((14)>=(d)?K>36:!1)?"wrap":"rotate"):!1),(Y==="rotate"?(U=Math.max(1,Math.ceil(14/Math.max(1,O.step())))):!1);let _=o.append("g").attr("class",t.cls("ticks")),k=0,h=[];l.forEach((S,f)=>{var W;if(f%U!==0)return;let x=((W=O(String(f)))!=null?W:0)+K/2,et=_.append("text").style("font-size",`${at}px`).text(S),nt=et.node();if(Y==="rotate"){et.attr("text-anchor","end").attr("transform",`translate(${x},12) rotate(-45)`);let Z=Math.min((vn-12)/.72,(x+C.left-at)/Math.SQRT1_2);(nt.getComputedTextLength()>Z?Ce(nt,Z,1):!1),k=Math.max(k,nt.getComputedTextLength())}else et.attr("x",x).attr("y",20).attr("text-anchor","middle"),(Y==="wrap"?h.push(nt):!1)});let v=Math.max(1,...St(h,O.step()-4,Cr)),G=Y==="rotate"?Math.min(vn,k*.72+12)+8:Y==="wrap"?Math.ceil(20+(v-1)*at*1.15+at*.35+8):30;C.bottom=G+(r.xLabel?20:0);let V=Math.max(60,t.height-C.top-C.bottom),z=n.scaleLinear().domain([b,y]).nice(B).range([V,0]);((r.valueLabels?(24)>=(d):!1)?Cn(z,V,C.top,$n(t,g)):!1),(F==null?!0:F.range([V,0])),_.attr("transform",`translate(${C.left},${C.top+V})`),(r.xLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",C.left+I/2).attr("y",C.top+V+G+12).attr("text-anchor","middle").text(r.xLabel):!1);let Q=o.append("g").attr("transform",`translate(${C.left},${C.top})`);if(zt(t,Q,z,I),F){let S=At(a,ct(a,e.series.findIndex((f,x)=>i(x)),t.dark),t.dark);Q.append("g").attr("class",t.cls("ticks")).selectAll("text").data(F.ticks(B)).join("text").attr("x",I+8).attr("y",f=>F(f)).attr("dy","0.32em").style("fill",S).text(f=>E(f)),(r.rightLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",t.width).attr("y",t.rightTitleY).attr("text-anchor","end").style("fill",S).text(r.rightLabel):!1)}let j=Q.append("g"),M=Ht(t)?Ct(t,j,I,V):null,X=u?1:p,R=(S,f)=>{let x=ct(a,S,t.dark);return ((((0)>(f)?X===1:!1)?!u:!1)?!s:!1)?Se(x):x},tt=n.scaleBand().domain(n.range(X)).range([0,K]).padding(X>1?.08:0),J=[];if(s?(g.forEach((S,f)=>{S.forEach((x,et)=>{var pt;let nt=z(x[0]),W=z(x[1]),Z=Math.abs(nt-W);if((0)>=(Z))return;let q=(pt=O(String(et)))!=null?pt:0,ot=M?xt(t,[e.series[f].key,String(e.x[et])]):null;((M?ot:!1)?M.clip(ot,ct(a,f,t.dark)).append("rect").attr("x",q).attr("y",Math.min(nt,W)).attr("width",K).attr("height",Z):!1),j.append("rect").attr("class",t.cls("segment")).attr("x",q).attr("y",Math.min(nt,W)).attr("width",K).attr("height",Z).attr("fill",ct(a,f,t.dark)).attr("fill-opacity",kt(t,ot))})}),(r.valueLabels?e.x.forEach((S,f)=>{var Z;let x=e.series.map(q=>{var ot;return(ot=q.values[f])!=null?ot:0}),et=x.filter(q=>q>0).reduce((q,ot)=>q+ot,0),nt=x.filter(q=>(0)>(q)).reduce((q,ot)=>q+ot,0),W=((Z=O(String(f)))!=null?Z:0)+K/2;(((et>0?!0:nt===0))?J.push({x:W,y:z(et)-6,text:t.fmtValue(et),below:!1}):!1),((0)>(nt)?J.push({x:W,y:z(nt)+14,text:t.fmtValue(nt),below:!0}):!1)}):!1)):e.series.forEach((S,f)=>{(c(f)?S.values.forEach((x,et)=>{var vt,Tt;if(x===null)return;let nt=((vt=O(String(et)))!=null?vt:0)+((Tt=tt(f))!=null?Tt:0),W=tt.bandwidth(),Z=z(Math.max(0,x)),q=Math.abs(z(x)-z(0)),ot=pe(nt,Z,W,q,4,x>=0?"up":"down"),pt=M?xt(t,[S.key,String(e.x[et])]):null,ut=R(f,x);((M?pt:!1)?M.clip(pt,ut,me(t,String(e.x[et]))?{x:nt,y:Z,w:W,h:q}:void 0).append("path").attr("d",ot):!1),j.append("path").attr("class",t.cls("bar")).attr("d",ot).attr("fill",ut).attr("fill-opacity",kt(t,pt)),(r.valueLabels?J.push({x:nt+W/2,y:x>=0?z(x)-6:z(x)+14,text:m(f)(x),below:(0)>(x)}):!1)}):!1)}),(M==null?!0:M.paint()),Ot(t,Q,z,I),(u?e.series.forEach((S,f)=>{var Z;if(f===0)return;let x=(i(f)?F:!1)?F:z,et=q=>{var ot;return((ot=O(String(q)))!=null?ot:0)+K/2},nt=(Z=n.line().defined(q=>q!==null).x((q,ot)=>et(ot)).y(q=>x(q))(S.values))!=null?Z:"",W=ct(a,f,t.dark);j.append("path").attr("class",t.cls("line-halo")).attr("d",nt),j.append("path").attr("class",t.cls("line")).attr("d",nt).attr("stroke",W).attr("stroke-width",t.mobile?3:3.5).attr("stroke-dasharray",S.dashed?"6 4":null),S.values.forEach((q,ot)=>{(q!==null?j.append("circle").attr("class",t.cls("dot")).attr("cx",et(ot)).attr("cy",x(q)).attr("r",d>24?2.5:4).attr("fill",W):!1)})}):!1),(J.length?(24)>=(d):!1)){let S=(X>1?!s:!1)?tt.bandwidth():K;(__gvLe(ft(t,J.map(x=>x.text),12),S+6)?Q.append("g").selectAll("text").data(J).join("text").attr("class",t.cls("value-label")).attr("x",x=>x.x).attr("y",x=>x.y).attr("text-anchor","middle").text(x=>x.text):!1)}let T=Q.append("g").selectAll("rect").data(l.map((S,f)=>f)).join("rect").attr("class",t.cls("overlay")).attr("x",S=>{var f;return((f=O(String(S)))!=null?f:0)-(O.step()-K)/2}).attr("width",O.step()).attr("y",0).attr("height",V);t.tooltip.bind(T,(S,f)=>{let x=l[f],et=e.series.map((q,ot)=>q.values[f]===null?"":gt(t,R(ot,q.values[f]),q.label,m(ot)(q.values[f]),q.dashed)).join(""),nt=(s?p>1:!1)?gt(t,"transparent","Total",t.fmtValue(e.series.reduce((q,ot)=>{var pt;return q+((pt=ot.values[f])!=null?pt:0)},0))):"",[W,Z]=n.pointer(S,t.chartEl);t.tooltip.show(`${bt(t,x)}${et}${nt}`,W,Z)})}function $n(t,n){var u,c,i,m;let{d3:a,spec:o}=t;if(o.type==="stacked"){let l=(u=a.min(n,d=>a.min(d,p=>p[0])))!=null?u:0;return{top:(c=a.max(n,d=>a.max(d,p=>p[1])))!=null?c:null,bottom:(0)>(l)?l:null}}let e=(o.type==="combo"?o.data.series.slice(0,1):o.data.series).flatMap(l=>l.values).filter(l=>l!==null),r=(i=a.max(e.filter(l=>l>=0)))!=null?i:null,s=(m=a.min(e.filter(l=>(0)>(l))))!=null?m:null;return{top:r,bottom:s}}function Cn(t,n,a,o){let e=Math.min(.4,Tn/n),r=Math.min(.4,Math.max(0,Sn-a)/n);for(let s=0;(3)>(s);s++){let[u,c]=t.domain();((o.bottom!==null?t(o.bottom)>n*(1-e):!1)?(u=c-(c-o.bottom)/(1-e)):!1),((o.top!==null?__gvLt(t(o.top),n*r):!1)?(c=(o.top-r*u)/(1-r)):!1),t.domain([u,c])}}var Sr=3;function Tr(t){return t>1?t*13+14:30}function Ln(t){var _,k;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=e.x.map(h=>t.fmtX(h)),u=s.length;if(u===0)return;let c=e.series.length,i=t.margin,m=e.series.flatMap(h=>h.values).filter(h=>h!==null),l=Math.min(0,(_=n.min(m))!=null?_:0),d=Math.max(0,(k=n.max(m))!=null?k:0);((r.yMax!==null?r.yMax>d:!1)?(d=r.yMax):!1),(l===d?(d=1):!1);let p=t.mobile?13:14,b=t.width*(t.mobile?.42:.34),y=Math.min(b,ft(t,s,p));i.left=y+10;let g=r.valueLabels,w=g?ft(t,m.map(t.fmtValue),12)+8:0;i.right=Math.max(i.right,w),(((0)>(l)?g:!1)?(i.left+=w):!1),i.bottom=g?8:28;let B=Math.max(40,t.width-i.left-i.right),F=o.append("g").attr("transform",`translate(${i.left},${i.top})`),E=F.append("g").attr("class",t.cls("cat-labels")),H=s.map(h=>E.append("text").attr("x",-10-(((0)>(l)?g:!1)?w:0)).attr("text-anchor","end").style("font-size",`${p}px`).text(h)),L=St(H.map(h=>h.node()),y,Sr),A=H.map((h,v)=>({t:h,lines:L[v]})),D=Tr(c),C=Math.max(D,Math.ceil(n.max(A,h=>h.lines)*p*1.15+10)),P=u*C,$=n.scaleLinear().domain([l,d]).nice(t.mobile?4:5).range([0,B]);t.setAxis($.domain(),t.mobile?4:5);let I=Math.max(.25,1-D*.75/C),O=n.scaleBand().domain(s.map((h,v)=>String(v))).range([0,P]).paddingInner(I).paddingOuter(I/2),K=n.scaleBand().domain(n.range(c)).range([0,O.bandwidth()]).padding(c>1?.1:0);if(A.forEach(({t:h,lines:v},G)=>{var V;h.attr("y",((V=O(String(G)))!=null?V:0)+O.bandwidth()/2).attr("dy",`${.32-(v-1)*.575}em`)}),!g){let h=$.ticks(t.mobile?4:5);F.append("g").attr("class",t.cls("grid")).selectAll("line").data(h).join("line").attr("x1",v=>Math.round($(v))+.5).attr("x2",v=>Math.round($(v))+.5).attr("y1",0).attr("y2",P),F.append("g").attr("class",t.cls("ticks")).selectAll("text").data(h).join("text").attr("x",v=>$(v)).attr("y",P+20).attr("text-anchor","middle").text(v=>t.fmtAxis(v))}let at=F.append("g"),rt=Ht(t)?Ct(t,at,B,P):null,st=[],U=(h,v)=>{let G=ct(a,h,t.dark);return ((0)>(v)?c===1:!1)?Se(G):G};e.series.forEach((h,v)=>{h.values.forEach((G,V)=>{var J,T;if(G===null)return;let z=((J=O(String(V)))!=null?J:0)+((T=K(v))!=null?T:0),Q=K.bandwidth(),j=$(Math.min(0,G)),M=Math.abs($(G)-$(0)),X=pe(j,z,M,Q,4,G>=0?"right":"left"),R=rt?xt(t,[h.key,String(e.x[V])]):null,tt=U(v,G);((rt?R:!1)?rt.clip(R,tt,me(t,String(e.x[V]))?{x:j,y:z,w:M,h:Q}:void 0).append("path").attr("d",X):!1),at.append("path").attr("class",t.cls("bar")).attr("d",X).attr("fill",tt).attr("fill-opacity",kt(t,R)),(g?st.push({x:G>=0?$(G)+6:$(G)-6,y:z+Q/2,text:t.fmtValue(G),anchor:G>=0?"start":"end"}):!1)})}),(rt==null?!0:rt.paint()),(0)>(l)?F.append("line").attr("class",t.cls("zero")).attr("x1",$(0)).attr("x2",$(0)).attr("y1",0).attr("y2",P):F.append("line").attr("class",t.cls("baseline")).attr("x1",$(0)+.5).attr("x2",$(0)+.5).attr("y1",0).attr("y2",P),F.append("g").selectAll("text").data(st).join("text").attr("class",t.cls("value-label")).attr("x",h=>h.x).attr("y",h=>h.y).attr("dy","0.32em").attr("text-anchor",h=>h.anchor).text(h=>h.text);let Y=F.append("g").selectAll("rect").data(s.map((h,v)=>v)).join("rect").attr("class",t.cls("overlay")).attr("x",-i.left).attr("width",t.width).attr("y",h=>{var v;return((v=O(String(h)))!=null?v:0)-(O.step()-O.bandwidth())/2}).attr("height",O.step());return t.tooltip.bind(Y,(h,v)=>{if((c===1?g:!1))return;let G=s[v],V=e.series.map((j,M)=>j.values[v]===null?"":gt(t,U(M,j.values[v]),j.label,t.fmtValue(j.values[v]))).join(""),[z,Q]=n.pointer(h,t.chartEl);t.tooltip.show(`${bt(t,G)}${V}`,z,Q)}),P+i.top+i.bottom}var En=40;function Fr(t,n){let a=n==="exponential"?t.filter(i=>i.y>0).map(i=>({x:i.x,y:Math.log(i.y)})):t;if((2)>(a.length))return null;let o=a.length,e=a.reduce((i,m)=>i+m.x,0)/o,r=a.reduce((i,m)=>i+m.y,0)/o,s=a.reduce((i,m)=>i+(m.x-e)**2,0);if(s===0)return null;let u=a.reduce((i,m)=>i+(m.x-e)*(m.y-r),0)/s,c=r-u*e;return n==="exponential"?i=>Math.exp(c+u*i):i=>c+u*i}function Lr(t,n){let a=t.map((r,s)=>({item:r,i:s,s:n(r)})).sort((r,s)=>r.s[0]-s.s[0]),o=[],e=-1/0;for(let r of a)(!o.length?!0:r.s[0]>e)?(o.push([r]),e=r.s[1]):(o[o.length-1].push(r),e=Math.max(e,r.s[1]));return o.map(r=>r.sort((s,u)=>s.i-u.i).map(s=>s.item))}function An(t,n){for(let a of[[1,2,5],[1,5],[1]]){let o=[0];for(let e=1;(t*10)>=(e);e*=10)for(let r of a)((t+1e-9)>=(e*r)?o.push(e*r):!1);if(((n)>=(o.length)?!0:a.length===1))return o}return[0]}function Te(t){var a;let n=1;for(;(t)>(n*10);)n*=10;return(a=[1,2,5,10].map(o=>o*n).find(o=>o>=t))!=null?a:n*10}function Dn(t){var G,V,z,Q,j;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=(G=e.points)!=null?G:[];if(!s.length)return;let u=new Map(e.series.map((M,X)=>[M.key,X])),c=M=>{var X,R;return ct(a,(R=u.get((X=M.group)!=null?X:e.series[0].key))!=null?R:0,t.dark)},i=([M,X])=>{let R=(__gvOr(__gvOr(X-M,()=>(Math.abs(M))),()=>(1)))*.04;return[M-R,X+R]},[m,l]=i(n.extent(s,M=>M.x));(r.xFromZero?(m=Math.min(0,m),l=Math.max(0,l)):!1),(r.xMin!==null?(m=r.xMin):!1),(r.xMax!==null?(l=r.xMax):!1);let[d,p]=i(n.extent(s,M=>M.y));(r.yFromZero?(d=Math.min(0,d),p=Math.max(0,p)):!1),(r.yMin!==null?(d=r.yMin):!1),(r.yMax!==null?(p=r.yMax):!1),(m>l?([m,l]=[l,m]):!1),(d>p?([d,p]=[p,d]):!1);let b=t.margin;b.bottom=r.xLabel?48:30;let y=t.height-b.top-b.bottom,w=r.yScale==="symlog"?Object.assign(n.scaleSymlog().domain([0,(V=r.yMax)!=null?V:Te(Math.max(p,1))]).range([y,0]),{ticks:()=>{var M;return An((M=r.yMax)!=null?M:Te(Math.max(p,1)),t.mobile?5:8)}}):n.scaleLinear().domain([d,p===d?d+1:p]).nice(5).range([y,0]);t.setAxis(w.domain(),t.mobile?4:5);let B=r.xScale==="symlog",F=(z=r.xMax)!=null?z:Te(Math.max(l,1)),E=M=>B?Object.assign(n.scaleSymlog().domain([0,F]).range(M),{ticks:X=>An(F,Math.max(2,X))}):n.scaleLinear().domain([m,l===m?m+1:l]).nice().range(M),H=E([0,1]),L=t.mobile?4:5.5;b.left=Gt(t,w,M=>{let X=null;for(let R of s)(__gvLe(H(R.x),M+.02)?(X=$t(X,[w(R.y)-L-2,w(R.y)+L+2])):!1);return X});let A=Math.max(40,t.width-b.left-b.right),D=E([0,A]),C=o.append("g").attr("transform",`translate(${b.left},${b.top})`);zt(t,C,w,A),se(t,C,A,y),Ot(t,C,w,A);let P=M=>D(M);ue(t,C,y,le(t,P,ce(t,D),ie(A,t.mobile)),P),(r.xLabel?C.append("text").attr("class",t.cls("axis-title")).attr("x",A).attr("y",y+42).attr("text-anchor","end").text(r.xLabel):!1);let $=t.id("plot");if(o.append("defs").append("clipPath").attr("id",$).append("rect").attr("x",-L).attr("y",-L).attr("width",A+2*L).attr("height",y+2*L),r.trend){let M=C.append("g").attr("clip-path",`url(#${$})`);for(let X of e.series){let R=s.filter(mt=>{var ht;return((ht=mt.group)!=null?ht:e.series[0].key)===X.key}),tt=Fr(R,r.trend);if(!tt)continue;let[J,T]=n.extent(R,mt=>mt.x),lt=n.range(0,41).map(mt=>J+(T-J)*mt/40),dt=n.line().x(mt=>D(mt)).y(mt=>w(tt(mt)));M.append("path").attr("class",t.cls("trend")).attr("d",dt(lt)).attr("fill","none").attr("stroke",c(R[0])).attr("stroke-width",t.mobile?2:2.5).attr("stroke-dasharray","6 4")}}if(r.refLine){let{slope:M,intercept:X=0,label:R}=r.refLine,[tt,J]=D.domain(),[T,lt]=w.domain(),dt=n.range(0,201).map(mt=>B?D.invert(A*mt/200):tt+(J-tt)*mt/200).filter(mt=>{let ht=M*mt+X;return (ht>=Math.min(T,lt)?__gvLe(ht,Math.max(T,lt)):!1)});if(dt.length>1){let mt=n.line().x(ht=>D(ht)).y(ht=>w(M*ht+X));if(C.append("path").attr("class",t.cls("ref-line")).attr("d",mt(dt)).attr("fill","none").style("stroke","var(--gv-text-2)").attr("stroke-width",1.5).attr("stroke-dasharray","5 4"),R){let ht=dt[dt.length-1],Mt=D(ht),N=w(M*ht+X);C.append("text").attr("class",t.cls("axis-title")).attr("x",Math.min(Mt,A)).attr("y",Math.max(N-8,12)).attr("text-anchor","end").text(R)}}}C.append("g").attr("clip-path",`url(#${$})`).selectAll("circle").data(s).join("circle").attr("class",t.cls("point")).attr("cx",M=>D(M.x)).attr("cy",M=>w(M.y)).attr("r",L).attr("fill",c);let[I,O]=D.domain(),[K,at]=w.domain(),rt=s.filter(M=>__gvAnd(__gvAnd(__gvAnd(__gvAnd(M.label,()=>(M.x>=I)),()=>((O)>=(M.x))),()=>(M.y>=K)),()=>((at)>=(M.y)))).slice(0,En);if((rt.length?(En)>=(rt.length):!1)){let M=T=>T>A*.85?"end":(A*.15)>(T)?"start":"middle",X=Zt(t,rt.map(T=>T.label),12),R=rt.map((T,lt)=>({p:T,y:w(T.y)-L-5,w:X[lt]+6})),J=Lr(R,T=>{let lt=D(T.p.x),dt=M(lt);return dt==="start"?[lt-3,lt+T.w]:dt==="end"?[lt-T.w,lt+3]:[lt-T.w/2,lt+T.w/2]}).flatMap(T=>dn(T,13,8,y,40).kept);C.append("g").selectAll("text").data(J).join("text").attr("class",t.cls("value-label")).attr("x",T=>D(T.p.x)).attr("y",T=>T.y).attr("text-anchor",T=>M(D(T.p.x))).text(T=>T.p.label)}let st=n.Delaunay.from(s,M=>D(M.x),M=>w(M.y)),U=C.append("circle").attr("class",t.cls("ring")).attr("r",L+3).style("display","none"),Y=s.some(M=>M.group!==void 0),_=__gvOr(__gvOr(__gvOr(((Q=r.tooltip)==null?void 0:Q.valueName),()=>(r.yLabel)),()=>((Y?"Vertical axis":(j=e.series[0])==null?void 0:j.label))),()=>("Vertical axis")),k=__gvOr(r.xLabel,()=>("Horizontal axis")),h=C.append("rect").attr("class",t.cls("overlay")).attr("width",A).attr("height",y),v=()=>U.style("display","none");t.tooltip.bind(h,M=>{var Mt,N;let[X,R]=n.pointer(M),tt=st.find(X,R),J=s[tt];if((!J?!0:Math.hypot(D(J.x)-X,w(J.y)-R)>40)){v(),t.tooltip.hide();return}U.style("display",null).attr("cx",D(J.x)).attr("cy",w(J.y));let T=__gvOr(__gvOr(J.label,()=>(J.group)),()=>("")),lt=__gvAnd(__gvAnd((Y?J.group:Y),()=>(J.label)),()=>(!(((N=(Mt=r.tooltip)==null?void 0:Mt.hideRows)!=null?N.includes(J.group):!1)))),dt=lt?Wt(t,c(J),J.group,""):"",mt=lt?"transparent":c(J),ht=dt+Wt(t,"transparent",k,t.fmtX(J.x))+gt(t,mt,_,t.fmtValue(J.y));t.tooltip.show(`${T?bt(t,T):""}${ht}`,D(J.x)+b.left,w(J.y)+b.top)},v)}var Er=.25,Ar=16,Dr=3;function Pn(t){let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=e.x.map(String),u=e.series.length;if((!s.length?!0:!u))return t.height;let c=Math.max(1,Math.min(u,Math.floor(t.width/(t.mobile?170:220)))),i=Math.ceil(u/c),m=t.width/c,l=D=>D%c*m+m/2,d=u>1?e.series.map((D,C)=>o.append("text").attr("class",t.cls("donut-title")).attr("x",l(C)).attr("text-anchor","middle").text(D.label)):[],p=St(d.map(D=>D.node()),m-12,Dr),b=d.map((D,C)=>({t:D,lines:p[C]})),y=Math.max(1,...b.map(D=>D.lines)),g=u>1?30+Math.ceil((y-1)*Ar*1.15):0,w=Math.max(50,Math.min(m/2-12,t.mobile?130:150)),B=r.donutHole?w*.56:0,F=g+w*2+18,E=D=>{var C,P;return Et(a,(P=(C=e.categoryColors)==null?void 0:C[D])!=null?P:it.muted,t.dark)},H=n.format(".0%"),L=n.arc().innerRadius(B).outerRadius(w).padAngle(r.donutHole?.012:.006).cornerRadius(r.donutHole?2:0),A=n.arc().innerRadius(B?(B+w)/2:w*.62).outerRadius(B?(B+w)/2:w*.62);return e.series.forEach((D,C)=>{var U;let P=Math.floor(C/c),$=l(C),I=P*F+g+w+6,O=D.values.map(Y=>(Y!==null?Y>0:!1)?Y:0),K=O.reduce((Y,_)=>Y+_,0),at=o.append("g").attr("transform",`translate(${$},${I})`);if(((U=b[C])==null?!0:U.t.attr("y",P*F+18)),!K)return;let rt=n.pie().sort(null).value(Y=>Y)(O),st=Ct(t,at,0,0);rt.forEach((Y,_)=>{var G;if((0)>=(Y.value))return;let k=(G=L(Y))!=null?G:"",h=xt(t,[s[_],D.key]);(h?st.clip(h,E(_),{x:-w,y:-w,w:w*2,h:w*2}).append("path").attr("d",k):!1);let v=at.append("path").attr("class",t.cls("slice")).attr("d",k).attr("fill",E(_)).attr("fill-opacity",kt(t,h));t.tooltip.bind(v,V=>{var M;let[z,Q]=n.pointer(V,t.chartEl),j=gt(t,E(_),u>1?D.label:"Value",t.fmtValue((M=D.values[_])!=null?M:0))+Wt(t,"transparent","Share",H(Y.value/K));t.tooltip.show(`${bt(t,s[_])}${j}`,z,Q)})}),st.paint(),rt.forEach((Y,_)=>{if(((Er)>(Y.endAngle-Y.startAngle)?!0:(0)>=(Y.value)))return;let[k,h]=A.centroid(Y),v=te(E(_)),G=at.append("text").attr("class",t.cls("slice-label")).attr("x",k).attr("y",h).attr("dy","0.35em").attr("text-anchor","middle").text(H(Y.value/K));(v!=="#FFFFFF"?G.style("fill",v).style("stroke","rgba(255,255,255,0.35)"):!1)})}),i*F+6}function Gn(t){let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,[s,u]=e.series;if(((!s?!0:!u)?!0:!e.x.length))return;let i=e.x.map(String).map((k,h)=>({i:h,name:k,a:s.values[h],b:u.values[h]})).filter(k=>(k.a!==null?k.b!==null:!1));if(!i.length)return;let m=t.margin;m.top=Math.max(m.top,34),m.bottom=14;let l=t.mobile?12:13,d=l+3,p=Math.max(t.height-m.top-m.bottom,i.length*d);o.attr("height",p+m.top+m.bottom);let[b,y]=Vt(i.flatMap(k=>[k.a,k.b]),r.yFromZero,r.yMin,r.yMax),g=n.scaleLinear().domain([b,y]).nice().range([p,0]),[w,B]=g.domain(),F=(k,h)=>h==="left"?{name:k.name,value:t.fmtValue(k.a),nameFirst:!0}:{name:t.mobile?"":k.name,value:t.fmtValue(k.b),nameFirst:!1},E=(k,h=k.name)=>h?k.nameFirst?`${h} ${k.value}`:`${k.value} ${h}`:k.value,H=k=>E(F(k,"left")),L=k=>E(F(k,"right")),A=t.width*(t.mobile?.4:.3),D=Math.min(A,ft(t,i.map(H),l))+12,C=Math.min(A,ft(t,i.map(L),l))+12,P=D,$=Math.max(P+60,t.width-C),I=k=>{var h,v;return Et(a,(v=(h=e.categoryColors)==null?void 0:h[k])!=null?v:it.muted,t.dark)},O=k=>(I(k).toUpperCase()===it.muted.toUpperCase()?!0:I(k).toUpperCase()===it.darkMuted.toUpperCase()),K=o.append("g").attr("transform",`translate(0,${m.top})`);o.append("text").attr("class",t.cls("slope-head")).attr("x",P).attr("y",18).attr("text-anchor","middle").text(s.label),o.append("text").attr("class",t.cls("slope-head")).attr("x",$).attr("y",18).attr("text-anchor","middle").text(u.label),K.append("line").attr("class",t.cls("slope-axis")).attr("x1",P).attr("x2",P).attr("y1",0).attr("y2",p),K.append("line").attr("class",t.cls("slope-axis")).attr("x1",$).attr("x2",$).attr("y1",0).attr("y2",p);let at=t.id("plot");o.append("defs").append("clipPath").attr("id",at).append("rect").attr("x",0).attr("y",-5).attr("width",t.width).attr("height",p+10);let rt=K.append("g").attr("clip-path",(r.yMin!==null?!0:r.yMax!==null)?`url(#${at})`:null),st=[...i].sort((k,h)=>+!O(k.i)-+!O(h.i));for(let k of st){let h=I(k.i);rt.append("line").attr("class",t.cls("slope-line")).attr("x1",P).attr("x2",$).attr("y1",g(k.a)).attr("y2",g(k.b)).attr("stroke",h).attr("stroke-width",O(k.i)?2:3),rt.append("circle").attr("cx",P).attr("cy",g(k.a)).attr("r",4).attr("fill",h),rt.append("circle").attr("cx",$).attr("cy",g(k.b)).attr("r",4).attr("fill",h)}let U=new Set,Y=k=>{let h=i.map(G=>({r:G,y:g(k==="left"?G.a:G.b)}));Pr(h,d,d/2,p);let v=k==="left"?P:$;for(let G of h){let V=k==="left"?G.r.a:G.r.b,z=V>B?-1:(w)>(V)?1:0;((z?!U.has(`${k}${z}`):!1)?(U.add(`${k}${z}`),K.append("path").attr("class",t.cls("off-scale")).attr("d",`M${v},${(0)>(z)?-8:p+8}l-5,${-z*8}h10z`).attr("fill",t.dark?it.darkSecondary:it.secondary).append("title").text((0)>(z)?"Above the axis range":"Below the axis range")):!1);let Q=F(G.r,k),j=K.append("text").attr("class",t.cls("slope-label")).attr("x",k==="left"?P-10:$+10).attr("y",G.y).attr("dy","0.32em").attr("text-anchor",k==="left"?"end":"start").style("font-size",`${l}px`).text(E(Q));(O(G.r.i)?!0:j.style("fill",At(a,I(G.r.i),t.dark)));let M=j.node(),X=Q.name;for(;(M.getComputedTextLength()>A?X.length>3:!1);)X=X.slice(0,-1),j.text(E(Q,`${X.trimEnd()}\u2026`))}};Y("left"),Y("right");let _=K.append("rect").attr("class",t.cls("overlay")).attr("x",P).attr("width",$-P).attr("height",p);t.tooltip.bind(_,k=>{let[h,v]=n.pointer(k),G=(h-P)/($-P),V=i[0],z=1/0;for(let M of i){let X=g(M.a)+(g(M.b)-g(M.a))*G;(__gvLt(Math.abs(X-v),z)?([V,z]=[M,Math.abs(X-v)]):!1)}let Q=V.b-V.a,j=gt(t,I(V.i),s.label,t.fmtValue(V.a))+gt(t,I(V.i),u.label,t.fmtValue(V.b))+gt(t,"transparent","Change",`${Q>=0?"+":""}${t.fmtValue(Q)}`);t.tooltip.show(`${bt(t,V.name)}${j}`,h,v+m.top)})}function Pr(t,n,a,o){let e=[...t].sort((r,s)=>r.y-s.y);e.forEach((r,s)=>r.y=Math.max(r.y,s?e[s-1].y+n:a));for(let r=e.length-1;r>=0;r--)e[r].y=Math.min(e[r].y,(e.length-1)>(r)?e[r+1].y-n:o)}var Gr=3;function Vn(t){let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=e.x.map(_=>t.fmtX(_)),u=s.length;if((!u?!0:!e.series.length))return t.height;let c=t.margin,i=t.mobile?30:32,m=t.mobile?13:14,l=t.width*(t.mobile?.38:.3),d=Math.min(l,ft(t,s,m));c.left=d+14,c.right=Math.max(c.right,16),c.bottom=30,c.top=Math.max(c.top,6);let p=Math.max(60,t.width-c.left-c.right),b=o.append("g").attr("transform",`translate(${c.left},${c.top})`),y=s.map(_=>b.append("text").attr("class",t.cls("cat-label")).attr("x",-12).attr("text-anchor","end").style("font-size",`${m}px`).text(_)),g=St(y.map(_=>_.node()),d,Gr),w=Math.max(i,Math.ceil(Math.max(1,...g)*m*1.15+10)),B=u*w,F=e.series.flatMap(_=>_.values).filter(_=>_!==null),[E,H]=Vt(F,r.yFromZero,r.yMin,r.yMax),L=t.mobile?4:5,A=n.scaleLinear().domain([E,H]).nice(L).range([0,p]);t.setAxis(A.domain(),L);let[D,C]=A.domain(),P=_=>(_>=D?(C)>=(_):!1),$=_=>_*w+w/2,I=_=>e.series.map(k=>k.values[_]).filter(k=>k!==null),O=s.map((_,k)=>r.valueLabels?Vr(I(k),P):[]);(r.valueLabels?Ir(t,A,p,O):!1);let K=_r(t,A,L),at=_=>ft(t,[t.fmtValue(_)],12),rt=O.map(_=>Rr(A,p,_,at)),st=t.id("plot");o.append("defs").append("clipPath").attr("id",st).append("rect").attr("x",A(D)-8).attr("y",0).attr("width",A(C)-A(D)+16).attr("height",B),b.append("g").attr("class",t.cls("grid")).selectAll("line").data(K).join("line").attr("x1",_=>Math.round(A(_))+.5).attr("x2",_=>Math.round(A(_))+.5).attr("y1",0).attr("y2",B),b.append("g").attr("class",t.cls("ticks")).selectAll("text").data(K).join("text").attr("x",_=>A(_)).attr("y",B+20).attr("text-anchor","middle").text(_=>t.fmtAxis(_)),(((0)>(E)?H>0:!1)?b.append("line").attr("class",t.cls("zero")).attr("x1",A(0)).attr("x2",A(0)).attr("y1",0).attr("y2",B):!1);let U=b.append("g").attr("clip-path",`url(#${st})`);s.forEach((_,k)=>{y[k].attr("y",$(k)).attr("dy",`${.32-(g[k]-1)*.575}em`);let h=I(k),v=Math.min(...h),G=Math.max(...h);(((h.length>1?G>=D:!1)?(C)>=(v):!1)?U.append("line").attr("class",t.cls("dumbbell")).attr("x1",A(Math.max(D,v))).attr("x2",A(Math.min(C,G))).attr("y1",$(k)).attr("y2",$(k)):!1),Nr(t,b,A,$(k),h),e.series.forEach((V,z)=>{let Q=V.values[k];(Q!==null?U.append("circle").attr("class",t.cls("dot")).attr("cx",A(Q)).attr("cy",$(k)).attr("r",t.mobile?6:7).attr("fill",ct(a,z,t.dark)):!1)});for(let V of rt[k])b.append("text").attr("class",t.cls("value-label")).attr("x",A(V.v)+V.dx).attr("y",$(k)).attr("dy","0.32em").attr("text-anchor",V.anchor).text(t.fmtValue(V.v))});let Y=b.append("g").selectAll("rect").data(s.map((_,k)=>k)).join("rect").attr("class",t.cls("overlay")).attr("x",-c.left).attr("width",t.width).attr("y",_=>_*w).attr("height",w);return t.tooltip.bind(Y,(_,k)=>{let h=e.series.map((V,z)=>V.values[k]===null?"":gt(t,ct(a,z,t.dark),V.label,t.fmtValue(V.values[k]))).join(""),[v,G]=n.pointer(_,t.chartEl);t.tooltip.show(`${bt(t,s[k])}${h}`,v,G)}),B+c.top+c.bottom}function Vr(t,n){if(!t.length)return[];let a=Math.min(...t),o=Math.max(...t),e=[];return (((o)>(a)?n(a):!1)?e.push({v:a,anchor:"end",dx:-11}):!1),(n(o)?e.push({v:o,anchor:"start",dx:11}):!1),e}function _r(t,n,a){for(let o=a;o>=1;o--){t.setAxis(n.domain(),o);let e=n.ticks(o),r=e.map(u=>ft(t,[t.fmtAxis(u)],12));if((e.every((u,c)=>(c===0?!0:n(u)-n(e[c-1])>=(r[c]+r[c-1])/2+8))?!0:o===1))return e}return[]}function Rr(t,n,a,o){let e=l=>{let d=l.anchor==="start"?t(l.v)+l.dx:t(l.v)+l.dx-o(l.v);return[d,d+o(l.v)]},r=l=>(e(l)[0]>=1?__gvLe(e(l)[1],n-1):!1),s=l=>({v:l.v,anchor:l.anchor==="end"?"start":"end",dx:-l.dx}),u=Math.min(...a.map(l=>l.v)),c=Math.max(...a.map(l=>l.v)),i=l=>((2)>(a.length)?!0:(e(l)[0]>=t(u)+7?__gvLe(e(l)[1],t(c)-7):!1)),m=[];for(let l of a){let d=r(l)?l:s(l);(((!r(d)?!0:(d!==l?!i(d):!1))?!0:m.some(p=>(__gvLt(e(p)[0],e(d)[1]+6)?__gvLt(e(d)[0],e(p)[1]+6):!1)))?!0:m.push(d))}return m}function Nr(t,n,a,o,e){let[r,s]=a.domain(),u=e.filter(l=>(r)>(l)),c=e.filter(l=>l>s),i=t.dark?it.darkSecondary:it.secondary,m=(l,d,p)=>{let b=`M${l},${o}l${-d*6},-5v10z`;n.append("path").attr("class",t.cls("off-scale")).attr("d",b).attr("fill",i).append("title").text(`${p} ${p===1?"value is":"values are"} ${(0)>(d)?"below":"above"} the axis range`)};(u.length?m(a(r)-2,-1,u.length):!1),(c.length?m(a(s)+2,1,c.length):!1)}function Ir(t,n,a,o){let e=new Map,r=c=>((e.has(c)?!0:e.set(c,ft(t,[t.fmtValue(c)],12))),e.get(c)),s=0,u=0;for(let c=0;(4)>(c);c++){let i=0,m=0;for(let l of o.flat()){let d=n(l.v)+l.dx;l.anchor==="end"?i=Math.max(i,r(l.v)-d+2):m=Math.max(m,d+r(l.v)-a+2)}if(((.5)>=(i)?(.5)>=(m):!1))return;s=Math.min(a*.3,s+Math.max(0,i)),u=Math.min(a*.3,u+Math.max(0,m)),n.range([s,a-u])}}var Fe={paletteId:"",political:!1,background:"white",yFormat:{prefix:"",suffix:"",decimals:null},xFormat:{prefix:"",suffix:"",decimals:null},yFromZero:!0,yMin:null,yMax:null,valueLabels:!1,endDots:!0,imageFill:null,width:"column",height:400,yLabel:"",xLabel:"",highlight:null,legend:"top",xFromZero:!1,xMin:null,xMax:null,rightAxis:[],rightFormat:{prefix:"",suffix:"",decimals:null},rightLabel:"",rightFromZero:!0,donutHole:!0,partners:[],titleFont:"sans",swatch:"pebble",map:{method:"rounded",classes:5,breaks:[],palette:"seq-orange",reverse:!1,midpoint:null,continuous:!1,labels:!0,symbolMax:18,noDataLabel:"No data",thresholds:[],stops:[],colors:[],domain:null,categories:[],sizeTicks:[],projection:"equal-earth",sphere:!1,graticule:!1,center:[-30,20]}};var Rn=600;function _n(t){var n;return{...t,style:{...Fe,...t.style,map:{...Fe.map,...(n=t.style)==null?void 0:n.map}}}}function Nn(t,n){var e;if(!n.size)return Le(t);let a=t.type==="combo"?t.data.series.flatMap((r,s)=>n.has(r.key)?s===0?[{...r,values:r.values.map(()=>null)}]:[]:[r]):t.data.series.filter(r=>!n.has(r.key)),o=(e=t.data.points)==null?void 0:e.filter(r=>{var s,u;return!n.has((u=r.group)!=null?u:(s=t.data.series[0])==null?void 0:s.key)});return Le({...t,data:{...t.data,series:a,points:o}})}function Le(t){if((t.type!=="line"?t.type!=="combo":!1))return t;let n=t.data.series.filter(s=>s.values.some(u=>u!==null));if((!n.length?!0:!n.every(s=>s.axis==="right")))return t;let a=t.data.series.map(s=>({...s,axis:"left"})),o=t.style,e=__gvOr(o.rightLabel,()=>((Or(o.yFormat,o.rightFormat)?o.yLabel:""))),r={...o,yFormat:o.rightFormat,yFromZero:o.rightFromZero,yMin:null,yMax:null,yLabel:e,rightLabel:""};return{...t,style:r,data:{...t.data,series:a}}}function Br(t){if((t.type!=="line"?t.type!=="combo":!1))return!1;let n=(a,o)=>(a.axis==="right"?((t.type==="line"?!0:o>0)):!1);return __gvAnd(t.data.series.some(n),()=>(t.data.series.some((a,o)=>!n(a,o))))}function zr(t,n){return["bar","donut","dot","slope"].includes(t)?10:n?34:18}function Or(t,n){var a,o;return __gvAnd(__gvAnd((t.prefix===n.prefix?t.suffix===n.suffix:!1),()=>(t.decimals===n.decimals)),()=>(((a=t.multiply)!=null?a:1)===((o=n.multiply)!=null?o:1)))}function Hr(t,n,a,o=null){var L,A,D,C;let e=_n(n),r=o?_e(o):null,s=new Set,u=`gv-${e.slug}`,c=P=>`${u}__${P}`,i=t.querySelector(`.${c("chart")}`),m=t.querySelector(`.${c("legend")}`),l=Ue(i,c("tooltip")),d=-1,p,b=0;(m==null?!0:m.addEventListener("click",P=>{let $=P.target.closest("[data-key]"),I=$==null?void 0:$.dataset.key;(I!==void 0?(s.has(I)?s.delete(I):((e.data.series.length-1)>(s.size)?s.add(I):!1),y()):!1)}));let y=()=>{var M,X,R,tt,J;b=0;let P=Math.floor(i.clientWidth);if((0)>=(P))return;let $=e.style.background==="white"?be(t):{color:null,dark:!1},I=$.dark;t.classList.toggle(`${u}--dark`,I),$.color?t.style.setProperty("--gv-halo",$.color):t.style.removeProperty("--gv-halo"),d=P,p=$.color;let O=(Rn)>(t.clientWidth);((M=i.querySelector("svg"))==null?!0:M.remove());let K=i.ownerDocument.createElementNS("http://www.w3.org/2000/svg","svg");i.insertBefore(K,i.firstChild);let at=a.select(K).attr("class",c("svg")).attr("width",P).attr("aria-hidden","true"),rt=Ae(e.type),st=rt?400:O?Math.min(e.style.height,360):e.style.height;at.attr("height",st);let U=Nn(e,s),Y=U.style.yFormat,_=U.style.rightFormat,k=Rt(a,Y.prefix,Y.suffix,Y.decimals,Y.multiply),h=Rt(a,_.prefix,_.suffix,_.decimals,_.multiply),v=Rt(a,"","",Y.decimals,Y.multiply),G=T=>k.value(T),V=T=>v.value(T),z={d3:a,spec:U,base:u,root:t,chartEl:i,svg:at,width:P,height:st,mobile:O,dark:I,page:$.color,margin:{top:zr(e.type,!!((U.style.yLabel?!0:U.style.rightLabel))),right:14,bottom:30,left:40},id:T=>`${u}-${T}`,cls:c,fmtAxis:T=>G(T),fmtAxisBare:T=>V(T),setAxis:(T,lt)=>{let dt=U.style.yScale==="symlog"?{...Y,decimals:0}:Y;G=Lt(a,dt,T,lt),V=Lt(a,{...dt,prefix:"",suffix:""},T,lt)},fmtValue:k.value,fmtRightValue:h.value,rightAxis:(T,lt)=>Lt(a,_,T,lt),fmtFor:T=>T.axis==="right"?h.value:k.value,fmtX:qe(a,e,O),xAxis:(T,lt)=>Lt(a,e.style.xScale==="symlog"?{...e.style.xFormat,decimals:0}:e.style.xFormat,T,lt),color:T=>ct(U,T,I),tooltip:l,rightTitleY:14},Q=(rt?r:!1)?nn(r,e):r;rt?(Q?on(z,m,e,Q):!1):sn(z,m,e,s);let j=__gvAnd(__gvAnd(__gvAnd((!rt?e.type!=="bar":!1),()=>(e.type!=="donut")),()=>(e.type!=="dot")),()=>(e.type!=="slope"));if((((j?U.style.yLabel:!1)?U.style.rightLabel:!1)?Br(U):!1)){let[T,lt]=[U.style.yLabel,U.style.rightLabel].map(dt=>ft(z,[dt],12));(T+lt+16>P?(z.rightTitleY=30,z.margin.top+=16):!1)}((U.style.yLabel?j:!1)?at.append("text").attr("class",c("axis-title")).attr("x",0).attr("y",14).text(U.style.yLabel):!1);try{let T=e.type;if(rt){if((!r?!0:r.id!==((X=e.data.map)==null?void 0:X.geo)))throw new Error("map geography missing");at.attr("height",rn(z,Q))}else (T==="line"?!0:T==="area")?gn(z):((T==="column"?!0:T==="stacked")?!0:T==="combo")?Fn(z):T==="bar"?at.attr("height",(R=Ln(z))!=null?R:st):T==="scatter"?Dn(z):T==="donut"?at.attr("height",(tt=Pn(z))!=null?tt:st):T==="slope"?Gn(z):(T==="dot"?at.attr("height",(J=Vn(z))!=null?J:st):!1);pn(z)}catch(T){at.selectAll("*").remove(),at.append("text").attr("class",c("ticks")).attr("x",0).attr("y",20).text("Chart could not be drawn."),console.error("[gristviz]",T)}},g=()=>{(b?!0:(b=requestAnimationFrame(y)))},w=new ResizeObserver(()=>{(Math.floor(i.clientWidth)!==d?g():!1)});w.observe(i);let B=()=>{((e.style.background==="white"?be(t).color!==p:!1)?g():!1)},F=new MutationObserver(B),E=t.ownerDocument;F.observe(E.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme"]}),(E.body?F.observe(E.body,{attributes:!0,attributeFilter:["class","style","data-theme"]}):!1);let H=(A=(L=E.defaultView)==null?void 0:L.matchMedia)==null?void 0:A.call(L,"(prefers-color-scheme: dark)");return((D=H==null?void 0:H.addEventListener)==null?!0:D.call(H,"change",B)),y(),((C=E.fonts)==null?!0:C.ready.then(()=>g())),{update(P){e=_n(P);for(let $ of[...s])(e.data.series.some(I=>I.key===$)?!0:s.delete($));y()},destroy(){var P;w.disconnect(),F.disconnect(),l.destroy(),((P=H==null?void 0:H.removeEventListener)==null?!0:P.call(H,"change",B)),(b?cancelAnimationFrame(b):!1)}}}return qn(jr);})(); function run(d3){var el=document.getElementById(ID);if(el)__gvRuntime.mount(el,SPEC,d3,GEO);} function fail(){var el=document.getElementById(ID);var c=el?el.querySelector("."+ID+"__chart"):null;if(c)c.textContent="This chart could not load. Try refreshing the page.";} function loadD3(){return new Promise(function(res,rej){ var s=document.createElement("script"),page=window.d3,mine,trap=false; try{Object.defineProperty(window,"d3",{configurable:true,enumerable:true, get:function(){return document.currentScript===s?mine:page;}, set:function(v){if(document.currentScript===s)mine=v;else page=v;}});trap=true;} catch(e){window.d3=undefined;} function settle(){if(trap){delete window.d3;if(page!==undefined)window.d3=page;}else{mine=window.d3;window.d3=page;}} s.src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.5/d3.min.js";s.integrity="sha384-su5kReKyYlIFrI62mbQRKXHzFobMa7BHp1cK6julLPbnYcCW9NIZKJiTODjLPeDh";s.crossOrigin="anonymous";s.async=true; s.onload=function(){settle();if(mine?mine.stack:!1)res(Object.assign({},mine));else rej(new Error("d3 did not load"));}; s.onerror=function(e){settle();rej(e);}; document.head.appendChild(s);});} var started=false; function go(){ if(started)return;started=true; if(window.d3?window.d3.stack?/^7\./.test(window.d3.version?window.d3.version:""):!1:!1){run(window.d3);return;} if(!window.__gvD3)window.__gvD3=loadD3(); window.__gvD3.then(run,fail); } if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",go);else go(); })();

While data-center electricity consumption remains a national issue, electricity prices and utility planning look very different from state to state. And the speed of hyperscale buildouts mean these figures can change quickly. 

In Oregon, for example, the state’s data-center share of electricity use grew from about 3 percent in 2015 to about 23 percent in 2025, according to analyses presented to the state by energy economics firm ECOnorthwest and the University of Virginia. The group estimated that data centers were associated with approximately 96 percent of the state’s electricity sales growth between 2020 and 2025. 

Data centers can “no longer be understood as a marginal component” of Oregon’s electricity demand, the authors wrote — and in the Wild West of hyperscaling, it’s a component poorly matched to current regulatory structures. In its most recent biennial energy report, the Oregon Department of Energy noted that the state “currently lacks a policy mechanism to address emissions from data center load growth.”

.gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94{--gv-text:#3C3830;--gv-text-2:#6B665E;--gv-grid:#E6E3DD;--gv-halo:#FFFFFF;--gv-axis:#3C3830;box-sizing:border-box;position:relative;width:100%;text-align:left;font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-weight:500;font-size:16px;line-height:1.3;color:var(--gv-text);margin-top:1.5rem!important;margin-bottom:1.5rem!important;padding:0;letter-spacing:normal;word-break:normal} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 *{box-sizing:border-box} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 div,.gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 span{margin:0;padding:0;font-size:inherit;line-height:inherit} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94.gv-dc-oregon-history-e2lu94--dark{--gv-text:#F0EDE6;--gv-text-2:#B3ADA3;--gv-grid:#3A3732;--gv-halo:#1C1B19;--gv-axis:#B3ADA3} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__header{margin:0 0 16px} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__title{font-family:"PolySans", Arial, sans-serif;font-weight:500;font-size:25px;line-height:1.15;letter-spacing:-0.018em;margin:10px 0 8px;padding:0;color:var(--gv-text);text-transform:none} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__subtitle{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-weight:500;font-size:16px;line-height:1.4;margin:0;padding:0;color:var(--gv-text-2);text-wrap:pretty} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__hl{font-weight:700} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94.gv-dc-oregon-history-e2lu94--dark .gv-dc-oregon-history-e2lu94__hl[style*="--gv-hl-dk"]{color:var(--gv-hl-dk)!important} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94.gv-dc-oregon-history-e2lu94--dark .gv-dc-oregon-history-e2lu94__hl--dk-primary{color:#F0EDE6!important} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94.gv-dc-oregon-history-e2lu94--dark .gv-dc-oregon-history-e2lu94__hl--dk-muted{color:#6B665E!important} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 18px;margin:-4px 0 12px;padding:0;font-size:14px;line-height:1.2;color:var(--gv-text)} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__legend-item,.gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__legend-item:hover,.gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__legend-item:focus,.gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__legend-item:active{display:inline-flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:7px;font:inherit;color:inherit;background:none;border:0;padding:2px 0;margin:0;line-height:1.2;text-align:left;cursor:default;box-shadow:none;text-transform:none;letter-spacing:normal;border-radius:0;min-height:0;min-width:0;height:auto;width:auto;text-decoration:none} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 button.gv-dc-oregon-history-e2lu94__legend-item,.gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 button.gv-dc-oregon-history-e2lu94__legend-item:hover{cursor:pointer} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 button.gv-dc-oregon-history-e2lu94__legend-item:hover{text-decoration:underline;text-underline-offset:3px} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 button.gv-dc-oregon-history-e2lu94__legend-item:focus-visible{outline:2px solid #3977F3;outline-offset:2px} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__legend-item--off{opacity:0.35} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__map-label{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:11px;font-weight:500;letter-spacing:0.02em} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__legend-label{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:12px;fill:var(--gv-text-2)} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__legend-key{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:14px;fill:var(--gv-text)} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__place{cursor:default} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__legend-axis{font-size:11px;color:var(--gv-text-2);margin-left:2px} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__swatch{display:block;flex:none;overflow:visible} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__chart{position:relative;width:100%;margin:0;padding:0} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 svg.gv-dc-oregon-history-e2lu94__svg{display:block;overflow:visible;max-width:none;height:auto} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 svg text{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-weight:500;font-size:14px;fill:var(--gv-text);letter-spacing:normal} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__ticks text{font-size:12px;fill:var(--gv-text-2);font-variant-numeric:tabular-nums} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__ticks--y text{paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:4px;stroke-linejoin:round;pointer-events:none} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__cat-labels text{fill:var(--gv-text)} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__grid line{stroke:var(--gv-grid);shape-rendering:crispEdges} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__baseline{stroke:var(--gv-axis);stroke-width:1.25;shape-rendering:crispEdges} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__zero{stroke:#888888;stroke-width:1;stroke-dasharray:4 4} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__line{fill:none;stroke-linecap:round;stroke-linejoin:round} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__line-halo{fill:none;stroke:var(--gv-halo);stroke-width:7;stroke-linecap:round;stroke-linejoin:round} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__segment{stroke:var(--gv-halo);stroke-width:1} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__point{fill-opacity:0.85;stroke:var(--gv-halo);stroke-width:1} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__ring{fill:none;stroke:var(--gv-text);stroke-width:1.5} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__dot{stroke:var(--gv-halo);stroke-width:1.7} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__dot--pulse{transform-box:fill-box;transform-origin:center;animation:gv-dc-oregon-history-e2lu94-pulse 1.6s ease-in-out infinite} @keyframes gv-dc-oregon-history-e2lu94-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.2)}} @media (prefers-reduced-motion:reduce){.gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__dot--pulse{animation:none}} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__value-label{font-size:12px;paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__axis-title{font-size:12px;fill:var(--gv-text-2)} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__direct-label{font-size:13px;font-weight:700;paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__donut-title{font-size:16px;font-weight:700;fill:var(--gv-text)} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__slice{stroke:var(--gv-halo);stroke-width:1.5} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__slice-label{font-size:14px;font-weight:700;fill:#FFFFFF;paint-order:stroke fill;stroke:rgba(0,0,0,0.25);stroke-width:2px;pointer-events:none} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__slope-head{font-size:14px;font-weight:700;fill:var(--gv-text)} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__slope-axis{stroke:var(--gv-grid);stroke-width:1} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__slope-line{stroke-linecap:round} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__slope-label{fill:var(--gv-text);paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__dumbbell{stroke:#C9C5BD;stroke-width:3;stroke-linecap:round} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94.gv-dc-oregon-history-e2lu94--dark .gv-dc-oregon-history-e2lu94__dumbbell{stroke:#6B665E} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__cat-label{fill:var(--gv-text)} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__overlay{fill:transparent;pointer-events:all} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__rule{stroke:var(--gv-text-2);stroke-width:1;stroke-dasharray:2 3} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__tooltip{position:absolute;display:none;pointer-events:none;z-index:5;min-width:150px;max-width:260px;padding:9px 12px 10px;background:#FFFFFF;border:1.5px solid #3C3830;border-radius:6px;box-shadow:3px 3px 0 #3C3830;font-size:13px;line-height:1.35;color:#3C3830} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94.gv-dc-oregon-history-e2lu94--dark .gv-dc-oregon-history-e2lu94__tooltip{background:#2A2824;border-color:#F0EDE6;box-shadow:3px 3px 0 #F0EDE6;color:#F0EDE6} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__tip-title{font-family:"PolySans", Arial, sans-serif;font-weight:500;font-size:14px;margin:0 0 5px} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__tip-row{display:flex;align-items:center;gap:8px;font-variant-numeric:tabular-nums} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__tip-row svg{display:block;flex:none;overflow:visible} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__tip-row i{display:block;flex:none;width:10px;height:10px;border-radius:2px} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__tip-row span{flex:1;color:var(--gv-text-2)} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__tip-row b{font-weight:700;white-space:nowrap} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__tip-more{color:var(--gv-text-2);font-size:12px;margin-top:2px} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__note{color:var(--gv-text-2);font-size:12px;font-style:italic;line-height:1.35;margin:8px 0 0;padding:0} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__footer{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:14px 0 0;padding:10px 0 0;border-top:1px solid var(--gv-grid)} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__credits{display:flex;flex-direction:column} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__source{color:var(--gv-text-2);font-size:12px;line-height:1.35;display:inline-block} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__credit{color:var(--gv-text-2);font-size:12px;font-style:italic;font-weight:700;line-height:1.35;margin-top:3px;display:inline-block} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__credit .gv-dc-oregon-history-e2lu94__credit-link{color:inherit;font:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;border:0;box-shadow:none;background:none} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__logo{display:block;height:auto;max-width:46px;min-width:40px;width:46px;margin:0 0 0 auto;padding:0;transform:translateY(-2px);overflow:visible} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__logo path{fill:var(--gv-text)} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__logos{display:flex;align-items:center;gap:14px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__logos .gv-dc-oregon-history-e2lu94__logo{margin:0} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__partner{display:block;margin:0;padding:0;border:0;line-height:0} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__partner img{display:block;height:22px;width:auto;max-width:110px;margin:0;padding:0;border:0;box-shadow:none;object-fit:contain} .gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94.gv-dc-oregon-history-e2lu94--dark .gv-dc-oregon-history-e2lu94__partner--invert img{filter:brightness(0) invert(1)} @media (max-width:600px){.gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__title{font-size:21px}.gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__subtitle{font-size:15px}.gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__legend{font-size:13px}.gv-dc-oregon-history-e2lu94#gv-dc-oregon-history-e2lu94 .gv-dc-oregon-history-e2lu94__logo{width:42px}} Data centers’ share of Oregon’s electricity rose from 3 percent in 2015 to 23 percent today Estimated electricity use of Oregon’s data centers as a share of retail electricity sales Source: ECOnorthwest / UVA Weldon Cooper Center / EIA Clayton Aldern / Grist / Kirill Sh / Unsplash (function(){ var K="__gv_dc_oregon_history_e2lu94_initialized__";if(window[K])return;window[K]=true; var ID="gv-dc-oregon-history-e2lu94"; var SPEC={"version":1,"slug":"dc-oregon-history-e2lu94","type":"area","data":{"xKind":"year","x":[2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025],"series":[{"key":"Share","label":"Share","color":"#12A07F","values":[3,3.9,4.7,5.5,6.5,7.6,9,11.6,14.8,18.7,22.8]}]},"text":{"title":"Data centers’ share of Oregon’s electricity rose from 3 percent in 2015 to 23 percent today","subtitle":"Estimated electricity use of Oregon’s data centers as a share of retail electricity sales","note":"","source":"ECOnorthwest / UVA Weldon Cooper Center / EIA","credit":"Clayton Aldern","altText":"Area chart of data centers’ share of Oregon’s retail electricity sales. It rises from 3 percent in 2015 to 8 percent in 2020, 15 percent in 2023, 19 percent in 2024, and 23 percent in 2025."},"style":{"paletteId":"single-orange","political":false,"background":"white","yFormat":{"prefix":"","suffix":"%","decimals":0},"xFormat":{"prefix":"","suffix":"","decimals":null},"yFromZero":true,"yMin":null,"yMax":null,"valueLabels":true,"endDots":true,"imageFill":{"mode":"all","opacity":0,"photos":{"*":{"url":"https://images.unsplash.com/photo-1594915440248-1e419eba6611?ixid=M3wxMDg1MjEzfDB8MXxzZWFyY2h8M3x8ZGF0YSUyMGNlbnRlciUyMGNhYmxlc3xlbnwwfDB8fHwxNzk0OTAxNTQ4fDA\u0026ixlib=rb-4.1.0\u0026w=1600\u0026q=80\u0026fm=jpg\u0026fit=max","photographer":"Kirill Sh","via":"unsplash","page":"https://unsplash.com/photos/fiber-optic-cables-in-network-switch-eVWWr6nmDf8?utm_source=gristviz\u0026utm_medium=referral","profile":"https://unsplash.com/@kirill2020?utm_source=gristviz\u0026utm_medium=referral"}}},"width":"column","height":400,"yLabel":"","xLabel":"","highlight":null,"legend":"none","xFromZero":false,"xMin":null,"xMax":null,"rightAxis":[],"rightFormat":{"prefix":"","suffix":"","decimals":null},"rightLabel":"","rightFromZero":true,"donutHole":true,"partners":[],"titleFont":"sans","swatch":"pebble","map":{"method":"rounded","classes":5,"breaks":[],"palette":"seq-orange","reverse":false,"midpoint":null,"continuous":false,"labels":true,"symbolMax":18,"noDataLabel":"No data","thresholds":[],"stops":[],"colors":[],"domain":null,"categories":[],"sizeTicks":[],"projection":"equal-earth","sphere":false,"graticule":false,"center":[-30,20]},"curve":"monotone","tooltip":{"valueName":"Share of electricity","hideKeys":true}},"meta":{"toolVersion":"0.4.0","createdAt":"","updatedAt":"","fallbackPngUrl":"","review":null}}; var GEO=null; function __gvOr(a,b){return a?a:b()};function __gvAnd(a,b){return a?b():a};function __gvLe(a,b){return b>=a};function __gvLt(a,b){return b>a};var __gvRuntime=(()=>{var he=Object.defineProperty;var zn=Object.getOwnPropertyDescriptor;var On=Object.getOwnPropertyNames;var Hn=Object.prototype.hasOwnProperty;var jn=(t,n)=>{for(var a in n)he(t,a,{get:n[a],enumerable:!0})},qn=(t,n,a,o)=>{if(((n?typeof n=="object":!1)?!0:typeof n=="function"))for(let e of On(n))((!Hn.call(t,e)?e!==a:!1)?he(t,e,{get:()=>n[e],enumerable:(!(o=zn(n,e))?!0:o.enumerable)}):!1);return t};var Xn=t=>qn(he({},"__esModule",{value:!0}),t);var qr={};jn(qr,{MOBILE_BREAKPOINT:()=>Nn,mount:()=>jr,primaryAxis:()=>Le,visible:()=>In});var Wn=["map-states","map-counties","map-world","map-dots"];function Ae(t){return Wn.includes(t)}var De=["line","slope"];var Yn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",Zn=new Map([...Yn].map((t,n)=>[t,n])),Kn=10;function fe(t){let n=[],a=0,o=1;for(let e of t){let r=Zn.get(e);if(r===void 0)throw new Error("Unreadable map geography");a+=r%32*o,r>=32?o*=32:(n.push(a%2?-(a+1)/2:a/2),a=0,o=1)}return n}function Un(t,n){let a=fe(t),o=[],e=0,r=0,s=0;for(;(a.length)>(e);){let u=a[e++],c=[];for(let i=0;(u)>(i);i++)r+=a[e++],s+=a[e++],c.push([r/n,s/n]);o.push(c)}return o}function Pe(t,n){let a=[];return n.forEach((o,e)=>{let r=o>=0?t[o]:[...t[-o-1]].reverse();for(let s=e?1:0;(r.length)>(s);s++)a.push(r[s])}),a}var Ge=t=>String(Math.round(t*10)/10),Ve=(t,n)=>t.length?`M${t.map(([a,o])=>`${Ge(a)} ${Ge(o)}`).join("L")}${n?"Z":""}`:"";function Qn(t){var e;let n=0,a=0,o=0;for(let r=0,s=t.length-1;(t.length)>(r);s=r++){let u=t[s][0]*t[r][1]-t[r][0]*t[s][1];n+=u,a+=(t[s][0]+t[r][0])*u,o+=(t[s][1]+t[r][1])*u}return n?{area:n/2,c:[a/(3*n),o/(3*n)]}:{area:0,c:(e=t[0])!=null?e:null}}function _e(t){var d;let n=Un(t.arcs,(d=t.q)!=null?d:Kn),a=!!t.sphere,o=fe(t.geoms),e=0,r=0,s=t.ids.map((p,b)=>{var E,H,L;let y=o[e++],g="",w=null,B=-1,F=[];for(let A=0;(y)>(A);A++){let D=o[e++],C=[];F.push(C);for(let P=0;(D)>(P);P++){let $=o[e++],I=[];for(let K=0;($)>(K);K++)r+=o[e++],I.push(r);let O=Pe(n,I);if(a){C.push(O);continue}if(g+=Ve(O,!0),P===0){let{area:K,c:at}=Qn(O);(Math.abs(K)>B?(B=Math.abs(K),w=at):!1)}}}return{id:p,name:(E=t.names[b])!=null?E:p,code:(L=(H=t.codes)==null?void 0:H[b])!=null?L:"",d:g,anchor:w,...a?{polygons:F}:{}}}),u=p=>{var F;let b=fe(p),y=0,g=0,w=[],B=(F=b[y++])!=null?F:0;for(let E=0;(B)>(E);E++){let H=b[y++],L=[];for(let A=0;(H)>(A);A++)g+=b[y++],L.push(g);w.push(Pe(n,L))}return w},[c,i,m]=[u(t.inner),u(t.outer),u(t.group)],l=p=>a?"":p.map(b=>Ve(b,!1)).join("");return{id:t.id,w:t.w,h:t.h,features:s,inner:l(c),outer:l(i),group:l(m),...a?{sphere:!0,lines:{inner:c,outer:i,group:m}}:{}}}var yt={orange:"#F79945",turquoise:"#12A07F",fuchsia:"#AC00E8",azure:"#3977F3",earth:"#3C3830",red:"#F5515B"},it={primary:"#3C3830",secondary:"#6B665E",grid:"#E6E3DD",muted:"#C9C5BD",darkPrimary:"#F0EDE6",darkSecondary:"#B3ADA3",darkGrid:"#3A3732",darkMuted:"#6B665E"},Ie={white:"#FFFFFF",smog:"#F0F0F0",lavender:"#D3C8FF",celery:"#E6FFA0",sky:"#C5E0F7",butter:"#FFF1C7",blush:"#FFD6DA"};function Re(t,n,a){let o=t.replace("#",""),e=n.replace("#","");return`#${[0,2,4].map(s=>{let u=parseInt(o.slice(s,s+2),16),c=parseInt(e.slice(s,s+2),16);return Math.round(u+(c-u)*a).toString(16).padStart(2,"0")}).join("")}`.toUpperCase()}var Ft=yt;var qt="#D9D7D2",Xt="#3A3733",Be="#EDEBE6",ze="#2E2B28",Ne="#F5EDDA",Jn="#EF6C4A",Kt=t=>[Re(t,"#FFFFFF",.8),t.toUpperCase(),Re(t,"#000000",.45)],Zr=[{id:"seq-orange",label:"Orange",kind:"sequential",stops:Kt(Ft.orange)},{id:"seq-turquoise",label:"Turquoise",kind:"sequential",stops:Kt(Ft.turquoise)},{id:"seq-azure",label:"Azure",kind:"sequential",stops:Kt(Ft.azure)},{id:"seq-fuchsia",label:"Fuchsia",kind:"sequential",stops:Kt(Ft.fuchsia)},{id:"div-turquoise-coral",label:"Turquoise to coral",kind:"diverging",stops:[Ft.turquoise,Ne,Jn]},{id:"div-azure-orange",label:"Azure to orange",kind:"diverging",stops:[Ft.azure,Ne,Ft.orange]}];function be(t){let n=t.parentElement;for(;n;){let o=getComputedStyle(n).backgroundColor.match(/rgba?\(([\d.]+),\s*([\d.]+),\s*([\d.]+)(?:,\s*([\d.]+))?\)/);if((o?((o[4]===void 0?!0:parseFloat(o[4])>.5)):!1)){let e=(.299*+o[1]+.587*+o[2]+.114*+o[3])/255;return{color:`rgb(${o[1]},${o[2]},${o[3]})`,dark:(.5)>(e)}}n=n.parentElement}return{color:null,dark:!1}}function tr(t){return/^[A-Za-z]{2}/.test(t)?` ${t}`:t}function _t(t,n,a,o,e=1){let r=tr(a),s=(i,m)=>`${((0)>(i)?/[1-9]/.test(m):!1)?"\u2212":""}${n}${m}${r}`;return{axis:(i,m)=>{let l=i*e>=1e4,d=((m?m:1))*e,p=i*e,b=l?t.formatPrefix(`.${o!=null?o:t.precisionPrefix(d,p)}`,p):t.format(`,.${o!=null?o:t.precisionFixed(d)}f`);return y=>(l?y===0:!1)?s(0,"0"):s(y,b(Math.abs(y*e)).replace("G","B"))},value:i=>{let m=Math.abs(i*e),l=o===null?t.format(`,.${er(m)}~f`):t.format(`,.${o}f`);return s(i,l(m))}}}function er(t){return t>=100?0:t>=10?1:((t>=1?!0:t===0)?!0:!Number.isFinite(t))?2:Math.min(20,Math.max(2,Math.ceil(-Math.log10(t))+1))}function Lt(t,n,a,o){let[e,r]=a,s=t.tickStep(e,r,o);return _t(t,n.prefix,n.suffix,n.decimals,n.multiply).axis(Math.max(Math.abs(e),Math.abs(r)),s)}function je(t){let n=1/0,a=-1/0;for(let o of t)((n)>(o)?(n=o):!1),(o>a?(a=o):!1);return n===1/0?null:[n,a]}function qe(t,n,a){let{xKind:o,x:e}=n.data,r=n.style.xFormat;if(o==="year")return s=>String(s);if(o==="number"){let s=_t(t,r.prefix,r.suffix,r.decimals,r.multiply);return u=>s.value(Number(u))}if(o==="date"){let s=e.map(l=>String(l)),u=s.every(l=>l.endsWith("-01-01")),c=s.every(l=>l.endsWith("-01")),i=u?"%Y":c?a?"%b \u2019%y":"%b %Y":"%b %-d, %Y",m=t.utcFormat(i);return l=>m(l instanceof Date?l:new Date(String(l)+(String(l).length===10?"T00:00:00Z":"")))}return s=>String(s)}function Xe(t){return new Date(String(t)+"T00:00:00Z")}function nr(t,n){var a;return n?"#1A1A1A":(a=Ie[t.style.background])!=null?a:"#FFFFFF"}function ge(t){let n=t.replace("#",""),a=n.length===3?n.split("").map(o=>o+o).join(""):n.slice(0,6);return[0,2,4].map(o=>__gvOr(parseInt(a.slice(o,o+2),16),()=>(0)))}function rr([t,n,a]){return`#${[t,n,a].map(o=>Math.round(Math.max(0,Math.min(255,o))).toString(16).padStart(2,"0")).join("")}`.toUpperCase()}function Qt(t,n,a){let o=ge(t),e=ge(n);return rr(o.map((r,s)=>r+(e[s]-r)*a))}function Jt(t){let[n,a,o]=ge(t).map(e=>{let r=e/255;return (.03928)>=(r)?r/12.92:((r+.055)/1.055)**2.4});return .2126*n+.7152*a+.0722*o}function Vt(t,n){let[a,o]=[Jt(t),Jt(n)].sort((e,r)=>r-e);return(a+.05)/(o+.05)}function ar(t,n){if(!n)return t;let a=t.toUpperCase();return a===yt.earth?it.darkPrimary:a===it.muted.toUpperCase()?it.darkMuted:t}var Oe=.58,Ut=.45,or=.7,He=new Map;function sr(t,n){let a=`${t}|${n}`,o=He.get(a);if(o)return o;let e=Jt(t),r=0,s=1/0;for(let i=0;(206)>=(i);i++){let m=-Ut+i/206*(Ut+Oe),l=Math.abs(Jt((0)>(m)?Qt(n,"#FFFFFF",-m):Qt(n,"#000000",m))-e);((s)>(l)?([r,s]=[m,l]):!1)}let u=(r+Ut)/(Ut+Oe),c=Qt(n,"#FFFFFF",u*or);return He.set(a,c),c}function Et(t,n,a){var e;if(!a)return n;let o=(e=t.style.paletteId)!=null?e:"";if(o.startsWith("tonal-")){let r=yt[o.slice(6)];if(r)return sr(n,r)}return ar(n,a)}function ct(t,n,a){var o,e;return Et(t,(e=(o=t.data.series[n])==null?void 0:o.color)!=null?e:yt.orange,a)}function At(t,n,a,o=4.5){let e=nr(t,a);if(Vt(n,e)>=o)return n;let r=a?"#FFFFFF":"#000000";for(let s=.05;(1)>(s);s+=.05){let u=Qt(n,r,s);if(Vt(u,e)>=o)return u}return r}function te(t){return Vt("#FFFFFF",t)>=4.5?"#FFFFFF":Vt(it.primary,t)>=4.5?it.primary:Vt("#FFFFFF",t)>=Vt("#000000",t)?"#FFFFFF":"#000000"}var ye={w:975,h:610,scale:1300,x:487.5,y:305},ee=ye.scale,We=ye.x,Ye=ye.y,Ze=[[We+.29*ee,Ye+.17*ee],[We+.41*ee,Ye+.234*ee]];var ir="M11.3,4.9Q12.4,6.0 12.5,7.7Q12.5,9.5 10.5,10.1Q8.4,10.7 6.7,10.3Q4.9,9.8 3.5,9.2Q2.1,8.6 1.3,7.3Q0.6,6.0 0.9,4.5Q1.3,3.0 2.9,1.9Q4.4,0.8 6.3,1.2Q8.2,1.7 9.2,2.8Q10.1,3.9 11.3,4.9Z",lr="M0.6,7.2C4,3.9 10.5,3.1 17.4,4.4C18.6,4.6 18.7,6.1 17.6,6.3C11.8,7 6.2,8.6 1.7,9.1C0.4,9.3 -0.1,7.9 0.6,7.2Z",Ke={pebble:[13,12],brush:[19,12],dot:[12,12]};function ne(t,n,a="",o=!1){var c;let[e,r]=(c=Ke[t])!=null?c:Ke.pebble,s=i=>`\x3csvg${a?` class="${a}"`:""} width="${i}" height="${r}" viewBox="0 0 ${i} ${r}" aria-hidden="true">`;if(n==="transparent")return`${s(e)}\x3c/svg>`;if(o)return`${s(22)}\x3cline x1="1.5" x2="20.5" y1="6" y2="6" stroke="${n}" stroke-width="3" stroke-linecap="round" stroke-dasharray="5 4"/>\x3c/svg>`;if(t==="dot")return`${s(e)}\x3ccircle cx="6" cy="6" r="5.5" fill="${n}" fill-opacity="0.85"/>\x3c/svg>`;let u=t==="brush"?`\x3cpath d="${lr}" transform="rotate(-6 9 6.5)"`:`\x3cpath d="${ir}"`;return`${s(e)}${u} fill="${n}"/>\x3c/svg>`}function Ue(t,n){let a=t.querySelector(`.${n}`);(a?!0:(a=t.ownerDocument.createElement("div"),a.className=n,a.setAttribute("role","presentation"),t.appendChild(a)));let o=a,e=null,r=null,s=()=>{o.style.display="none"},u=i=>{((i===r?!0:!e)?!0:(i.pointerType==="touch"?(e(),e=null):!1))},c=t.ownerDocument;return c.addEventListener("pointerdown",u),{show(i,m,l){o.innerHTML=i,o.style.display="block";let d=o.offsetWidth,p=o.offsetHeight,b=t.clientWidth,y=m+14;(y+d>b?(y=m-d-14):!1),((0)>(y)?(y=Math.max(0,Math.min(b-d,m-d/2))):!1),o.style.left=`${y}px`,o.style.top=`${Math.max(0,l-p-12)}px`},hide:s,bind(i,m,l){let d=()=>{(l==null?!0:l()),s()};i.on("pointermove.gvtip",(p,b)=>m(p,b)).on("pointerdown.gvtip",(p,b)=>{((p.pointerType!=="touch"?p.pointerType!=="pen":!1)?!0:(r=p,e=d,m(p,b)))}).on("pointerleave.gvtip",p=>{(p.pointerType!=="touch"?d():!1)})},destroy(){c.removeEventListener("pointerdown",u)}}}function wt(t){return t.replace(/[\x26\x3c>"]/g,n=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;",'"':"\x26quot;"})[n])}function Rt(t,n,a,o,e,r=!1){let s=c=>c.replace(/[\x26\x3c>]/g,i=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;"})[i]),u=e?ne(e,n,"",r):`\x3ci style="background:${n}">\x3c/i>`;return`\x3cdiv class="${t}">${u}\x3cspan>${s(a)}\x3c/span>\x3cb>${s(o)}\x3c/b>\x3c/div>`}function Wt(t,n,a,o,e=!1){var r,s;return((s=(r=t.spec.style.tooltip)==null?void 0:r.hideRows)!=null?s.includes(a):!1)?"":Qe(t,n,a,o,e)}function gt(t,n,a,o,e=!1){var c;let r=t.spec.style.tooltip;if(((c=r==null?void 0:r.hideRows)!=null?c.includes(a):!1))return"";let s=t.spec.data.series.length===1,u=((r!=null?r.hideSeriesName:!1)?s:!1)?"":(s?((r!=null?r.valueName:!1)):!1)?r.valueName:a;return Qe(t,n,u,o+Je(r==null?void 0:r.valueSuffix),e)}function Qe(t,n,a,o,e){var s;if(!(((s=t.spec.style.tooltip)!=null?s.hideKeys:!1)))return Rt(t.cls("tip-row"),n,a,o,t.spec.style.swatch,e);let r=u=>u.replace(/[\x26\x3c>]/g,c=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;"})[c]);return`\x3cdiv class="${t.cls("tip-row")}">\x3cspan>${r(a)}\x3c/span>\x3cb>${r(o)}\x3c/b>\x3c/div>`}function bt(t,n){var a;return`\x3cdiv class="${t.cls("tip-title")}">${wt(n+Je((a=t.spec.style.tooltip)==null?void 0:a.titleSuffix))}\x3c/div>`}function Je(t=""){return(!t?!0:/^[\s,.;:!?)\]]/.test(t))?t:` ${t}`}var tn=["VT","NH","MA","RI","CT","NJ","DE","MD","DC"],cr={CA:[80,318],FL:[790,534],ID:[192,163],KY:[703,315],LA:[562,460],MI:[683,199],NC:[816,350]},ur=560;function mr(t,n,a){var c,i,m;let o=t.style.map,e=n?Xt:qt,r=(i=(c=t.data.series[0])==null?void 0:c.values)!=null?i:[],s=(m=t.data.map)==null?void 0:m.categories;if(s){let l=new Map(o.categories.map(d=>[d.name,d.color]));return d=>{var p;return (s[d]!==null?s[d]!==void 0:!1)?(p=l.get(s[d]))!=null?p:it.muted:e}}if((o.continuous?o.stops.length>=2:!1)){let l=a.scaleLinear().domain(o.stops).range(o.colors).interpolate(a.interpolateLab).clamp(!0);return d=>(r[d]===null?!0:r[d]===void 0)?e:l(r[d])}if(!o.colors.length)return()=>e;let u=a.scaleThreshold().domain(o.thresholds).range(o.colors);return l=>(r[l]===null?!0:r[l]===void 0)?e:u(r[l])}function Nt(t,n){for(let[a,o]of Object.entries(n))t.style.setProperty(a,o,"important")}var pr=t=>{var o,e;let n=["th","st","nd","rd"],a=t%100;return`${t}${(e=(o=n[(a-20)%10])!=null?o:n[a])!=null?e:n[0]}`},en=new WeakMap;function dr(t,n){let a=t.width/n.w,o=n.features.map(e=>e.d).join("");return{height:Math.ceil(n.h*a),transform:`scale(${a})`,unit:1/a,d:e=>e.d,anchor:e=>e.anchor?[e.anchor[0]*a,e.anchor[1]*a]:null,land:()=>o,inner:()=>n.inner,outer:()=>n.outer,group:()=>n.group,sphere:()=>"",graticule:()=>""}}function rn(t,n){var c;if((t.sphere?!0:((c=n.data.map)!=null?c.pr:!1)))return t;let[[a,o],[e,r]]=Ze,s=i=>{let[m,l]=i.split("L")[0].split(" ").map(Number);return __gvAnd(__gvAnd((m>=a?(e)>=(m):!1),()=>(l>=o)),()=>((r)>=(l)))},u=i=>i.split("M").filter(m=>(m?!s(m):m)).map(m=>`M${m}`).join("");return{...t,features:t.features.filter(i=>!i.id.startsWith("72")),inner:u(t.inner),outer:u(t.outer),group:u(t.group)}}function hr(t){let n=0;for(let a=0,o=t.length-1;(t.length)>(a);o=a++)n+=t[o][0]*t[a][1]-t[a][0]*t[o][1];return n}function fr(t){let n=a=>(a.length>=4?Math.abs(hr(a))>1e-6:!1);return t.features.map(a=>{var o;return{type:"MultiPolygon",coordinates:((o=a.polygons)!=null?o:[]).filter(e=>__gvAnd(e.length,()=>(n(e[0])))).map(e=>[e[0],...e.slice(1).filter(n)])}})}function nn(t,n,a,o=fr(n)){let{d3:e,spec:r}=t,s=r.style.map,u=s.projection==="globe",c={type:"GeometryCollection",geometries:o},i={type:"Sphere"},m,l;if(u)l=Math.min(t.width,ur),m=e.geoOrthographic().rotate([a[0],a[1]]).fitExtent([[4,4],[t.width-4,l-4]],i);else{let y=(s.sphere?!0:s.graticule)?i:c;m=e.geoEqualEarth().fitWidth(t.width,y),l=Math.ceil(e.geoPath(m).bounds(y)[1][1])+1}let d=e.geoPath(m),p=new Map(n.features.map((y,g)=>[y.id,o[g]])),b=y=>{var g;return(g=d({type:"MultiLineString",coordinates:y}))!=null?g:""};return{height:l,transform:null,unit:1,d:y=>{var g;return(g=d(p.get(y.id)))!=null?g:""},anchor:y=>{let g=d.centroid(p.get(y.id));return (Number.isFinite(g[0])?Number.isFinite(g[1]):!1)?g:null},land:()=>{var y;return(y=d(c))!=null?y:""},inner:()=>{var y,g;return b((g=(y=n.lines)==null?void 0:y.inner)!=null?g:[])},outer:()=>{var y,g;return b((g=(y=n.lines)==null?void 0:y.outer)!=null?g:[])},group:()=>{var y,g;return b((g=(y=n.lines)==null?void 0:y.group)!=null?g:[])},sphere:()=>{var y;return(((u?!0:s.sphere))?(y=d(i))!=null:!1)?y:""},graticule:()=>{var y;return (s.graticule?(y=d(e.geoGraticule10()))!=null:!1)?y:""}}}function an(t,n){var U,Y,_,k;let{d3:a,spec:o,svg:e}=t,r=o.data.map,s=o.style.map,u=(!!n.sphere?s.projection==="globe":!1),c=(U=s.center)!=null?U:[0,20],i=en.get(t.chartEl),m=((i?i.center[0]===c[0]:!1)?i.center[1]===c[1]:!1)?i:{center:c,rotate:[-c[0],-c[1]]};en.set(t.chartEl,m);let l=n.sphere?nn(t,n,m.rotate):dr(t,n),d=o.type==="map-dots",p=mr(o,t.dark,a),b=(_=(Y=o.data.series[0])==null?void 0:Y.values)!=null?_:[],y=new Map(r.ids.map((h,v)=>[h,v]).filter(([h])=>h!==null)),g=b.map((h,v)=>[h,v]).filter(([h])=>h!==null).sort((h,v)=>v[0]-h[0]),w=new Map;g.forEach(([h,v],G)=>w.set(v,(G>0?g[G-1][0]===h:!1)?w.get(g[G-1][1]):G+1));let B=(k=t.page)!=null?k:t.dark?"#1A1A1A":"#FFFFFF",F=(h,v,G)=>Nt(h,{fill:"none",stroke:v,"stroke-width":`${G}px`,"vector-effect":"non-scaling-stroke","stroke-linejoin":"round","pointer-events":"none"}),E=t.id("map-shadow"),H=l.unit;e.append("defs").append("filter").attr("id",E).attr("x","-5%").attr("y","-5%").attr("width","110%").attr("height","110%").append("feGaussianBlur").attr("stdDeviation",2.5*H);let L=e.append("g").attr("class",t.cls("map"));(l.transform?L.attr("transform",l.transform):!1);let A=L.append("path").attr("class",t.cls("shadow")).attr("filter",`url(#${E})`).attr("transform",`translate(${2*H},${2.5*H})`);Nt(A.node(),{fill:t.dark?"#000000":yt.earth,opacity:"0.25",stroke:"none","fill-rule":"evenodd","pointer-events":"none"});let D=L.append("path").attr("class",t.cls("sphere"));Nt(D.node(),{fill:u?t.dark?"#23282C":"#EEF3F6":"none",stroke:t.dark?it.darkMuted:it.muted,"stroke-width":"0.75px","pointer-events":"none"});let C=L.append("path").attr("class",t.cls("graticule"));F(C.node(),t.dark?it.darkGrid:it.grid,.5);let P=(h,v)=>{var z,Q;if(h===void 0)return`\x3cdiv class="${t.cls("tip-title")}">${wt(v)}\x3c/div>\x3cdiv class="${t.cls("tip-row")}">\x3cspan>No data\x3c/span>\x3c/div>`;let G=b[h],V=`\x3cdiv class="${t.cls("tip-title")}">${wt(o.data.x[h])}\x3c/div>`;(r.categories?(V+=Rt(t.cls("tip-row"),p(h),"Category",(z=r.categories[h])!=null?z:"None")):!1),(G!=null?(V+=Rt(t.cls("tip-row"),(r.categories?!0:d)?"transparent":p(h),o.data.series[0].label,t.fmtValue(G)),((!d?g.length>2:!1)?(V+=Rt(t.cls("tip-row"),"transparent","Rank",`${pr(w.get(h))} of ${g.length}`)):!1)):!1);for(let j of(Q=r.tips)!=null?Q:[])(j.values[h]?(V+=Rt(t.cls("tip-row"),"transparent",j.label,j.values[h])):!1);return V},$=L.append("g").selectAll("path").data(n.features).join("path").attr("class",t.cls("place")).each(function(h){let v=y.get(h.id);Nt(this,{fill:d?t.dark?ze:Be:v===void 0?t.dark?Xt:qt:p(v),stroke:"none","fill-rule":"evenodd"})}),I=L.append("path");F(I.node(),B,n.id==="us-counties"?.4:.75);let O=L.append("path");F(O.node(),B,1.2);let K=L.append("path").attr("class",t.cls("map-hover"));F(K.node(),t.dark?it.darkPrimary:yt.earth,1.5),K.style("display","none");let at=null;(d?!0:t.tooltip.bind(L,h=>{let v=h.target.__data__;if((!v?!0:!h.target.classList.contains(t.cls("place"))))return;let[G,V]=a.pointer(h,t.chartEl);at=v,K.attr("d",l.d(v)).style("display",null),t.tooltip.show(P(y.get(v.id),v.name),G,V)},()=>{at=null,K.style("display","none")}));let rt=()=>{};if(d){let h=s.domain?Math.max(Math.abs(s.domain[0]),Math.abs(s.domain[1])):0,v=s.symbolMax*Math.min(1,t.width/600)*(t.mobile?.8:1),G=R=>(R===null?!0:!h)?3.5:Math.max(1.5,v*Math.sqrt(Math.abs(R)/h)),V=new Map(n.features.map(R=>[R.id,R])),z=o.data.x.map((R,tt)=>({i:tt,r:G(b[tt])})).sort((R,tt)=>tt.r-R.r),Q=R=>r.categories?p(R):yt.turquoise,j=n.sphere?1:t.width/n.w,M=R=>{var T;let tt=(T=r.xy)==null?void 0:T[R];if(tt)return[tt[0]*j,tt[1]*j];let J=r.ids[R]?V.get(r.ids[R]):void 0;return J?l.anchor(J):null},X=e.append("g").selectAll("circle").data(z).join("circle").attr("class",t.cls("symbol")).attr("r",R=>R.r).each(function(R){Nt(this,{fill:Q(R.i),"fill-opacity":h?"0.78":"0.9",stroke:B,"stroke-width":"0.75px"})});rt=()=>X.each(function(R){var J,T;let tt=M(R.i);this.setAttribute("cx",String((J=tt==null?void 0:tt[0])!=null?J:0)),this.setAttribute("cy",String((T=tt==null?void 0:tt[1])!=null?T:0)),this.style.setProperty("display",tt?"":"none")}),t.tooltip.bind(X,(R,tt)=>{let[J,T]=a.pointer(R,t.chartEl);t.tooltip.show(P(tt.i,o.data.x[tt.i]),J,T)})}let st=()=>{A.attr("d",u?l.sphere():l.land()),D.attr("d",l.sphere()),C.attr("d",l.graticule()),$.attr("d",h=>l.d(h)),I.attr("d",l.inner()),O.attr("d",l.group()),(at?K.attr("d",l.d(at)):!1),rt()};if(st(),u){let h=Math.min(t.width,l.height)/2,v=a.drag().on("drag",G=>{let V=75/h;m.rotate=[m.rotate[0]+G.dx*V,Math.max(-85,Math.min(85,m.rotate[1]-G.dy*V))],l=nn(t,n,m.rotate),st()});e.call(v).style("touch-action","none").style("cursor","grab")}if((o.type==="map-states"?s.labels:!1)){let h=e.append("g").attr("class",t.cls("map-labels")).style("pointer-events","none"),v=n.features.map(j=>({f:j,a:l.anchor(j)})).filter(j=>!!j.a),G=v.filter(j=>tn.includes(j.f.code)).sort((j,M)=>j.a[1]-M.a[1]),V=(520)>(t.width),z=(j,M,X,R,tt)=>h.append("text").attr("class",t.cls("map-label")).attr("x",j).attr("y",M).attr("dy","0.35em").attr("text-anchor",X).style("fill",R).style("fill-opacity","0.8").text(tt),Q=t.width/n.w;for(let{f:j,a:M}of v){if((!j.code?!0:tn.includes(j.code)))continue;let X=y.get(j.id),R=cr[j.code],[tt,J]=R?[R[0]*Q,R[1]*Q]:M;z(tt,J,"middle",X===void 0?t.dark?it.darkPrimary:it.primary:te(p(X)),j.code)}if(!V){let j=t.width-16*Q,M=-1/0;for(let{f:X,a:R}of G){M=Math.max(R[1],M+14);let tt=h.append("line").attr("x1",R[0]).attr("y1",R[1]).attr("x2",j-14).attr("y2",M);Nt(tt.node(),{stroke:t.dark?it.darkMuted:it.secondary,"stroke-width":"0.75px"}),z(j,M,"end",t.dark?it.darkPrimary:it.primary,X.code)}}}return l.height}var Dt=8,Yt=2,xe=Yt+Dt+13,on=xe+5;function sn(t,n,a,o){var b,y,g,w,B,F,E,H;if(!n)return;let e=a.style.map,r=a.data.map,s=t.dark?it.darkSecondary:it.secondary,u=t.dark?Xt:qt,c=new Set(r.ids.filter(L=>L!==null)),i=(a.type!=="map-dots"?o.features.some(L=>!c.has(L.id)):!1),m=(L,A)=>`\x3cspan class="${t.cls("legend-item")}">\x3csvg class="${t.cls("swatch")}" width="12" height="12" aria-hidden="true">\x3crect width="12" height="12" rx="2" fill="${L}"/>\x3c/svg>${wt(A)}\x3c/span>`,l=i?m(u,__gvOr(e.noDataLabel,()=>("No data"))):"",d=L=>{if(!i)return{svg:"",width:0};let A=__gvOr(e.noDataLabel,()=>("No data")),D=Yt+Dt/2;return{svg:`\x3crect class="${t.cls("legend-nodata")}" x="${L}" y="${D-5}" width="10" height="10" rx="2" fill="${u}"/>\x3ctext x="${L+16}" y="${D}" dy="0.35em" class="${t.cls("legend-key")}">${wt(A)}\x3c/text>`,width:40+A.length*7.5}},p="";if(e.categories.length)p=e.categories.map(L=>m(L.color,L.name)).join("")+l;else if(a.type==="map-dots"){let L=e.domain?Math.max(Math.abs(e.domain[0]),Math.abs(e.domain[1])):0,A=e.symbolMax*Math.min(1,t.width/600)*(t.mobile?.8:1),D=C=>A*Math.sqrt(C/L);if((L?e.sizeTicks.length:!1)){let C=D(e.sizeTicks[e.sizeTicks.length-1]),P=C*2+7,$=[];[...e.sizeTicks].reverse().forEach((rt,st)=>$.push(Math.max(P-2*D(rt),st?$[st-1]+12:7)));let I=C*2+70,O=Math.max(P+3,$[$.length-1]+8),K=`stroke:${s} !important;fill:none !important`,at=[...e.sizeTicks].reverse().map((rt,st)=>{let U=P-2*D(rt);return`\x3ccircle cx="${C+1}" cy="${P-D(rt)}" r="${D(rt)}" style="${K};stroke-width:1px"/>\x3cpolyline points="${C+1},${U} ${C*2+4},${U} ${C*2+8},${$[st]}" style="${K};stroke-width:0.5px"/>\x3ctext x="${C*2+11}" y="${$[st]}" dy="0.35em" class="${t.cls("legend-label")}">${wt(t.fmtValue(rt))}\x3c/text>`}).join("");p=`\x3csvg width="${I}" height="${O}" aria-hidden="true">${at}\x3c/svg>`}}else if(((e.continuous?e.stops.length>=2:!1)?e.stops[0]!==e.stops[e.stops.length-1]:!1)){let L=Math.min(260,t.width-20),A=t.id("legend-grad"),D=e.colors.map(($,I)=>`\x3cstop offset="${I/(e.colors.length-1)*100}%" stop-color="${$}"/>`).join(""),C=[e.stops[0],e.stops.length===3?e.stops[1]:null,e.stops[e.stops.length-1]].map(($,I)=>$===null?"":`\x3ctext x="${I/2*L}" y="${xe}" text-anchor="${["start","middle","end"][I]}" class="${t.cls("legend-label")}">${wt(t.fmtValue($))}\x3c/text>`).join(""),P=d(L+24);p=`\x3csvg width="${L+P.width+4}" height="${on}" aria-hidden="true">\x3cdefs>\x3clinearGradient id="${A}">${D}\x3c/linearGradient>\x3c/defs>\x3crect class="${t.cls("legend-step")}" y="${Yt}" width="${L}" height="${Dt}" rx="${Dt/2}" fill="url(#${A})"/>${C}${P.svg}\x3c/svg>`}else if((e.colors.length===1?!0:((e.continuous?e.stops.length>=2:!1)?e.stops[0]===e.stops[e.stops.length-1]:!1))){let L=(y=(b=e.domain)==null?void 0:b[0])!=null?y:e.stops[0];p=(L===void 0?"":m(e.colors[0],t.fmtValue(L)))+l}else if(e.colors.length){let L=e.colors.length,A=(B=(w=(g=e.domain)==null?void 0:g[0])!=null?w:e.thresholds[0])!=null?B:0,D=(H=(E=(F=e.domain)==null?void 0:F[1])!=null?E:e.thresholds[e.thresholds.length-1])!=null?H:0,C=Lt(t.d3,a.style.yFormat,[A,D],Math.max(1,e.thresholds.length)),P=e.thresholds.map(U=>C(U)),$=Math.max(0,...P.map(U=>U.length))*7+6,I=Math.max($,Math.min(44,Math.floor((Math.min(320,t.width)-20)/L))),O=I*L,K=t.id("legend-clip"),at=e.colors.map((U,Y)=>`\x3crect class="${t.cls("legend-step")}" x="${Y*I}" y="${Yt}" width="${I}" height="${Dt}" fill="${U}"/>`).join(""),rt=P.map((U,Y)=>`\x3ctext x="${(Y+1)*I}" y="${xe}" text-anchor="middle" class="${t.cls("legend-label")}">${wt(U)}\x3c/text>`).join(""),st=d(O+24);p=`\x3csvg width="${O+st.width+4}" height="${on}" aria-hidden="true">\x3cdefs>\x3cclipPath id="${K}">\x3crect y="${Yt}" width="${O}" height="${Dt}" rx="${Dt/2}"/>\x3c/clipPath>\x3c/defs>\x3cg clip-path="url(#${K})">${at}\x3c/g>${rt}${st.svg}\x3c/svg>`}n.innerHTML=p,n.style.display=p?"":"none",n.removeAttribute("role"),n.removeAttribute("aria-label")}function Me(t){return t.replace(/[\x26\x3c>"]/g,n=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;",'"':"\x26quot;"})[n])}var gr=["line","area","column","bar","stacked","combo","dot","scatter"];function we(t){return (t.style.legend==="direct"?De.includes(t.type):!1)}function ln(t,n,a,o){var y,g,w,B;if(!n)return;let e=a,r=e.data.series,s=(y=e.style.legend)!=null?y:"top",u=()=>{n.innerHTML="",n.style.display="none",n.removeAttribute("role"),n.removeAttribute("aria-label")};if(((s==="none"?!0:s==="subtitle")?!0:we(e)))return u();let c=(F,E)=>ne(e.style.swatch,F,t.cls("swatch"),E),i=(F,E,H,L=!1)=>{let A=(H!==void 0?m:!1)?"button":"span",D=A==="button"?` type="button" data-key="${Me(H)}" aria-pressed="${!o.has(H)}" title="Show or hide ${Me(F)}"`:"",C=`${t.cls("legend-item")}${(H!==void 0?o.has(H):!1)?` ${t.cls("legend-item--off")}`:""}`;return`\x3c${A} class="${C}"${D}>${E}${Me(F)}${L?`\x3cspan class="${t.cls("legend-axis")}">right axis\x3c/span>`:""}\x3c/${A}>`},m=__gvAnd(__gvAnd(gr.includes(e.type),()=>(r.length>1)),()=>(!e.style.paletteId.startsWith("highlight"))),l=[];if(e.type==="donut"){let F=(g=e.data.categoryColors)!=null?g:[];l=e.data.x.map((E,H)=>i(String(E),c(re(e,F[H],t.dark))))}else if(e.type==="slope"){let F=e.style.paletteId;if(((F==="rise-fall"?!0:F==="rise-fall-azure")?!0:F==="political")){let E=(w=e.data.categoryColors)!=null?w:[],[H,L]=e.data.series,A=$=>E.find((I,O)=>__gvAnd(((H==null?void 0:H.values[O])!=null?(L==null?void 0:L.values[O])!=null:!1),()=>($(H.values[O],L.values[O])))),D=A(($,I)=>I>$),C=A(($,I)=>($)>(I)),P=A(($,I)=>I===$);l=[D?i("Rose",c(re(e,D,t.dark))):"",C?i("Fell",c(re(e,C,t.dark))):"",P?i("No change",c(re(e,P,t.dark))):""].filter(Boolean)}}else if((e.style.paletteId.startsWith("highlight")?r.length>1:!1)){let F=Math.max(0,r.findIndex(E=>E.key===e.style.highlight));l=[i(r[F].label,c(ct(e,F,t.dark))),i("All others",c(ct(e,F===0?1:0,t.dark)))]}else if(r.length>1){let F=__gvAnd(r.some(E=>E.axis==="right"),()=>(r.some(E=>E.axis!=="right")));l=r.map((E,H)=>i(E.label,c(ct(e,H,t.dark),E.dashed),E.key,(F?E.axis==="right":F)))}let d=l.join(""),p=n.ownerDocument.activeElement,b=(p?n.contains(p):!1)?(B=p.dataset)==null?void 0:B.key:void 0;if(n.innerHTML=d,n.style.display=l.length?"":"none",(m?l.length:!1)?(n.setAttribute("role","group"),n.setAttribute("aria-label","Series. Select to show or hide.")):(n.removeAttribute("role"),n.removeAttribute("aria-label")),b!==void 0){let F=[...n.querySelectorAll("[data-key]")].find(E=>E.dataset.key===b);((F?n.ownerDocument.activeElement!==F:!1)?F.focus():!1)}}function re(t,n,a){return Et(t,n!=null?n:it.muted,a)}function Zt(t,n,a,o={}){let e=t.svg.append("g").attr("class",t.cls("tick-probe")).attr("opacity",0),r=n.map(s=>{var c;let u=e.append("text").attr("class",(c=o.cls)!=null?c:null).style("font-size",`${a}px`).style("font-variant-numeric","tabular-nums").text(s);return (o.weight?u.style("font-weight",String(o.weight)):!1),Math.ceil(u.node().getComputedTextLength())});return e.remove(),r}function ft(t,n,a,o={}){return Math.max(0,...Zt(t,n,a,o))}function un(t,n){return n.ticks(t.mobile?4:5)}var It=12;function mn(t){let n=-1;for(let a=0;(t.length)>(a);a++){let o=(0)>(n)?1:Math.abs(t[a])-Math.abs(t[n]);(((o>0?!0:(o===0?t[a]>t[n]:!1)))?(n=a):!1)}return n}function pn(t,n){let a=mn(n);return n.map((o,e)=>e===a?t.fmtAxis(o):t.fmtAxisBare(o))}function $t(t,n){return t?n?[Math.min(t[0],n[0]),Math.max(t[1],n[1])]:t:n}function Pt(t,n,a){let o=un(t,n);if(!o.length)return 10;let e=Zt(t,pn(t,o),It),r=mn(o),s=e[r],u=Math.max(0,...e.filter((b,y)=>y!==r)),c=Math.max(s,u)+10;if((u)>=(s))return c;let i=u+10,m=Math.max(40,t.width-i-t.margin.right),l=s-i+6,d=Math.round(n(o[r])),p=a(l/m,n);return ((p?(d+2)>=(p[0]):!1)?p[1]>=d-16:!1)?c:i}function Bt(t,n,a,o){let e=null,r=s=>e=$t(e,[s,s]);for(let s=0;(n.length)>(s);s++){let u=n[s];if((u===null?!0:t[s]>a))continue;r(o(u));let c=n[s+1];if(((c!=null?t[s+1]>a:!1)?t[s+1]>t[s]:!1)){let i=(a-t[s])/(t[s+1]-t[s]);r(o(u+(c-u)*i))}}return e}function oe(t,n){return t?[t[0]-n,t[1]+n]:null}function zt(t,n,a,o){let e=un(t,a),r=pn(t,e),s=-t.margin.left;n.append("g").attr("class",t.cls("grid")).selectAll("line").data(e).join("line").attr("x1",s).attr("x2",o).attr("y1",c=>Math.round(a(c))+.5).attr("y2",c=>Math.round(a(c))+.5),n.append("g").attr("class",`${t.cls("ticks")} ${t.cls("ticks--y")}`).selectAll("text").data(e).join("text").attr("x",s).attr("y",c=>Math.round(a(c))-4).text((c,i)=>r[i])}function dn(t){t.svg.selectAll(`.${t.cls("ticks--y")}`).raise()}function Ot(t,n,a,o){let[e,r]=a.domain();if((e>0?!0:(0)>(r)))return;let s=((0)>(e)?r>0:!1);n.append("line").attr("class",t.cls(s?"zero":"baseline")).attr("x1",-t.margin.left).attr("x2",o).attr("y1",Math.round(a(0))+.5).attr("y2",Math.round(a(0))+.5)}function se(t,n,a,o){n.append("line").attr("class",t.cls("baseline")).attr("x1",-t.margin.left).attr("x2",a).attr("y1",o+.5).attr("y2",o+.5)}function ie(t,n){return Math.max(2,Math.floor(t/(n?70:90)))}var br=10;function yr(t){return It}function xr(t,n,a,o){return (a)>(t-n/2)?{anchor:"start",start:t,end:t+n}:t+n/2>o?{anchor:"end",start:t-n,end:t}:{anchor:"middle",start:t-n/2,end:t+n/2}}function le(t,n,a,o){let e=-t.margin.left,r=t.width-t.margin.left,s=new Map,u=m=>{let l=[...new Set(m.filter(d=>!s.has(d)))];return Zt(t,l,yr(t)).forEach((d,p)=>s.set(l[p],d)),m.map(d=>s.get(d))},c=null,i=-1;for(let m=Math.max(1,Math.floor(o));m>=1;m--){let l=a(m);if(l.ticks.length===i)continue;i=l.ticks.length;let d=l.ticks.map(l.label),p=u(d),b=l.ticks.map((w,B)=>xr(n(w),p[B],e,r));c={...l,anchor:w=>b[w].anchor};let y=b.every(w=>(w.start>=e-.5?(r+.5)>=(w.end):!1)),g=b.every((w,B)=>(B===0?!0:(w.start)>=(b[B-1].end+br)));if((y?g:!1))return c}return c!=null?c:{...a(1),anchor:()=>"middle"}}function ce(t,n){let a=n.domain();return t.spec.data.xKind==="year"?o=>({ticks:n.ticks(o).filter(e=>Number.isInteger(e)),label:e=>String(e)}):o=>{let e=t.xAxis(a,o);return{ticks:n.ticks(o),label:r=>e(r)}}}function ue(t,n,a,o,e){n.append("g").attr("class",t.cls("ticks")).attr("transform",`translate(0,${a})`).selectAll("text").data(o.ticks).join("text").attr("x",r=>e(r)).attr("y",22).attr("text-anchor",(r,s)=>o.anchor(s)).text((r,s)=>o.label(r,s))}function ae(t,n,a,o){let e=[...t].sort((i,m)=>i.y-m.y),r=e.length;if(!r)return;let s=r>1?Math.min(n,Math.max(0,o-a)/(r-1)):n,u=i=>{i.top=Math.max(a,Math.min(o-(i.size-1)*s,i.sum/i.size))},c=[];e.forEach((i,m)=>{let l={start:m,size:1,sum:i.y,top:i.y};for(u(l),c.push(l);c.length>1;){let d=c[c.length-1],p=c[c.length-2];if((d.top+1e-9)>=(p.top+p.size*s))break;p.sum+=d.sum-d.size*p.size*s,p.size+=d.size,c.pop(),u(p)}});for(let i of c)for(let m=0;(i.size)>(m);m++)e[i.start+m].y=i.top+m*s}function hn(t,n,a,o,e){let r=[],s=[];for(let c of t){let i=[...r,{item:c,y:c.y}].map(l=>({own:l.y,y:l.y})),m=(o-a)>=((i.length-1)*n);(m?ae(i,n,a,o):!1),(m?i.every(l=>__gvLe(Math.abs(l.y-l.own),e)):!1)?r.push({item:c,y:c.y}):s.push(c)}let u=r.map(c=>({y:c.y}));return ae(u,n,a,o),r.forEach((c,i)=>c.item.y=u[i].y),{kept:r.map(c=>c.item),dropped:s}}function fn(t,n,a,o){let e=[...new Set(a.map(g=>g.getTime()))].sort((g,w)=>g-w),r=Mr(a,e),s=[...[t.utcDay,t.utcDay.every(2),t.utcWeek,t.utcWeek.every(2)].map(g=>[g,"day"]),...[1,2,3,6].map(g=>[t.utcMonth.every(g),"month"]),...[1,2,5,10,20,25,50,100,200,250,500,1e3].map(g=>[t.utcYear.every(g),"year"])],u=s.slice(s.findIndex(([,g])=>g===r)),[c,i]=n.domain(),[m,l]=u[u.length-1],d=[];for(let[g,w]of u){let B=cn(g,e,c,i);if((o)>=(B.length)){[m,l,d]=[g,w,B];break}}(d.length?!0:(d=cn(m,e,c,i))),((!d.length?e.length:!1)?(d=e.length===1?[new Date(e[0])]:[new Date(e[0]),new Date(e[e.length-1])]):!1);let p=(g,w)=>(w===0?!0:d[w-1].getUTCFullYear()!==g.getUTCFullYear()),b={year:t.utcFormat("%Y"),month:t.utcFormat("%b"),monthYear:t.utcFormat("%b %Y"),day:t.utcFormat("%b %-d"),dayYear:t.utcFormat("%b %-d, %Y")};return{ticks:d,label:(g,w)=>l==="year"?b.year(g):l==="month"?p(g,w)?b.monthYear(g):b.month(g):p(g,w)?b.dayYear(g):b.day(g)}}function Mr(t,n){if(t.every(r=>(r.getUTCMonth()===0?r.getUTCDate()===1:!1)))return"year";if((2)>(n.length))return t.every(r=>r.getUTCDate()===1)?"month":"day";let o=1/0;for(let r=1;(n.length)>(r);r++)o=Math.min(o,n[r]-n[r-1]);let e=o/864e5;return e>=360?"year":e>=28?"month":"day"}function cn(t,n,a,o){let e=t.range(t.floor(a),new Date(o.getTime()+1)),r=[];return e.forEach((s,u)=>{var m;let c=((m=e[u+1])!=null?m:t.offset(s,1)).getTime(),i=wr(n,s.getTime());((n.length)>(i)?(c)>(n[i]):!1)?r.push(new Date(n[i])):((s>=a?(o)>=(s):!1)?r.push(s):!1)}),r}function wr(t,n){let a=0,o=t.length;for(;(o)>(a);){let e=a+o>>1;(n)>(t[e])?a=e+1:o=e}return a}function xt(t,n){var o,e,r;let a=(o=t.spec.style.imageFill)==null?void 0:o.photos;if(!a)return null;for(let s of n)if((s!==void 0?(((e=a[s])!=null?e.url:!1)):!1))return a[s].url;return __gvOr(((r=a["*"])==null?void 0:r.url),()=>(null))}function Ht(t){var a;let n=(a=t.spec.style.imageFill)==null?void 0:a.photos;return(!!n?Object.values(n).some(o=>!!((o!=null?o.url:!1))):!1)}function gn(t,n,a){let o=(e,r)=>__gvOr(parseInt(e.replace("#","").slice(r,r+2),16),()=>(0));return[0,2,4].map(e=>(o(t,e)+(o(n,e)-o(t,e))*a)/255)}function Ct(t,n,a,o){let e=t.svg.select("defs").empty()?t.svg.append("defs"):t.svg.select("defs"),r=i=>{let m=t.id(`duo-${i.replace(/[^0-9a-z]/gi,"")}`);if(!e.select(`#${m}`).empty())return m;let l=e.append("filter").attr("id",m).attr("color-interpolation-filters","sRGB").attr("x",0).attr("y",0).attr("width",1).attr("height",1);l.append("feColorMatrix").attr("type","saturate").attr("values","0");let d=gn(i,"#000000",.6),p=gn(i,"#FFFFFF",.6),b=l.append("feComponentTransfer");return["feFuncR","feFuncG","feFuncB"].forEach((y,g)=>b.append(y).attr("type","table").attr("tableValues",`${d[g].toFixed(3)} ${p[g].toFixed(3)}`)),m},s=new Map;return{clip:(i,m,l)=>{let d=`${i}|${m}${l?`|${l.x},${l.y},${l.w},${l.h}`:""}`,p=s.get(d);if(!p){let b=t.id(`clip-${e.selectAll("clipPath").size()}`);p={id:b,url:i,color:m,box:l!=null?l:{x:0,y:0,w:a,h:o},sel:e.append("clipPath").attr("id",b)},s.set(d,p)}return p.sel},paint:()=>{for(let i of s.values())n.insert("image",":first-child").attr("class",t.cls("photo")).attr("href",i.url).attr("x",i.box.x).attr("y",i.box.y).attr("width",Math.max(1,i.box.w)).attr("height",Math.max(1,i.box.h)).attr("preserveAspectRatio","xMidYMid slice").attr("clip-path",`url(#${i.id})`).attr("filter",`url(#${r(i.color)})`),n.insert("rect",":first-child").attr("x",i.box.x).attr("y",i.box.y).attr("width",Math.max(1,i.box.w)).attr("height",Math.max(1,i.box.h)).attr("fill",i.color).attr("clip-path",`url(#${i.id})`)}}}function me(t,n){var o;let a=t.spec.style.imageFill;return __gvAnd((!!a?a.mode==="category":!1),()=>(!!(((o=a.photos[n])!=null?o.url:!1))))}function kt(t,n){return n?0:1}function pe(t,n,a,o,e,r){if(((0)>=(a)?!0:(0)>=(o)))return"";let s=Math.min(e,(r==="up"?!0:r==="down")?a/2:o/2,(r==="up"?!0:r==="down")?o:a),u=t+a,c=n+o;switch(r){case"up":return`M${t},${c}V${n+s}Q${t},${n} ${t+s},${n}H${u-s}Q${u},${n} ${u},${n+s}V${c}Z`;case"down":return`M${t},${n}V${c-s}Q${t},${c} ${t+s},${c}H${u-s}Q${u},${c} ${u},${c-s}V${n}Z`;case"right":return`M${t},${n}H${u-s}Q${u},${n} ${u},${n+s}V${c-s}Q${u},${c} ${u-s},${c}H${t}Z`;case"left":return`M${u},${n}H${t+s}Q${t},${n} ${t},${n+s}V${c-s}Q${t},${c} ${t+s},${c}H${u}Z`}}function Gt(t,n,a,o){let e=t.length?t[0]:0,r=e;for(let s of t)((e)>(s)?(e=s):!1),(s>r?(r=s):!1);return (t.length?!0:([e,r]=[0,1])),(n?(e=Math.min(0,e),r=Math.max(0,r)):!1),(a!==null?(e=a):!1),(o!==null?(r=o):!1),(e===r?(r=e+1):!1),(e>r?([e,r]=[r,e]):!1),[e,r]}function bn(t){var lt,dt,mt,ht,Mt;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=a.type==="area",u=(s?e.series.length>1:s),c=e.xKind==="category",i=e.x.map((N,S)=>e.xKind==="date"?Xe(N):c?S:Number(N)),m=i.length;if(m===0)return;let l=__gvAnd((!s?e.series.some(N=>N.axis==="right"):!1),()=>(e.series.some(N=>N.axis!=="right"))),d=N=>(l?e.series[N].axis==="right":l),p=N=>e.series.filter((S,f)=>d(f)===N).flatMap(S=>S.values).filter(S=>S!==null),b=[],y,g;if(u){let N=i.map((S,f)=>e.series.map(x=>{var et;return(et=x.values[f])!=null?et:0}));b=n.stack().keys(e.series.map((S,f)=>f)).value((S,f)=>S[f]).offset(n.stackOffsetDiverging)(N),[y,g]=Gt(b.flatMap(S=>S.flatMap(f=>[f[0],f[1]])),!0,r.yMin,r.yMax)}else[y,g]=Gt(p(!1),__gvOr(__gvOr(r.yFromZero,()=>(s)),()=>(ke(t))),r.yMin,r.yMax);let w=t.margin,B=t.height-w.top-w.bottom,F=t.mobile?4:5,E=n.scaleLinear().domain([y,g]).nice(F).range([B,0]);t.setAxis(E.domain(),F);let H=l?n.scaleLinear().domain(Gt(p(!0),r.rightFromZero,null,null)).nice(F).range([B,0]):E,L=l?t.rightAxis(H.domain(),F):t.fmtAxis,A=l?H.ticks(F):[],D=l?ft(t,A.map(L),It)+10:0,C=N=>d(N)?H:E,P=N=>t.fmtFor(e.series[N]),$=e.series.map(N=>{for(let S=N.values.length-1;S>=0;S--)if(N.values[S]!==null)return S;return-1}),I=__gvAnd(we(a),()=>(!u)),O=__gvAnd((__gvOr(r.valueLabels,()=>(I))),()=>(!u)),K=N=>{if((0)>($[N]))return["",""];let S=P(N)(e.series[N].values[$[N]]);return I?[e.series[N].label,r.valueLabels?S:""]:["",S]},at=N=>K(N).filter(Boolean).join(" "),rt=D?D+6:9,st=I?{cls:t.cls("direct-label"),size:13,weight:700}:{cls:t.cls("value-label"),size:12,weight:500};if(O){let N=ft(t,e.series.map((S,f)=>at(f)),st.size,st);w.right=Math.max(w.right,Math.min(N,t.width/3)+rt+6)}else l?w.right=Math.max(w.right,D+4):(r.endDots?(w.right=Math.max(w.right,10)):!1);let U=i.map(N=>+N),[Y,_]=(lt=je(U))!=null?lt:[0,0],k=U.map(N=>_>Y?(N-Y)/(_-Y):0),h=(s?s:ke(t));w.left=Pt(t,E,N=>{let S=u?b.flatMap(x=>[Bt(k,x.map(et=>et[1]),N,E),Bt(k,x.map(et=>et[0]),N,E)]):e.series.map((x,et)=>Bt(k,x.values,N,C(et))),f=oe(S.reduce($t,null),6);return ((f?h:!1)?(f=$t(f,[E(0),E(0)])):!1),f});let v=Math.max(40,t.width-w.left-w.right),G=e.xKind==="date"?n.scaleUtc().domain(n.extent(i)).range([0,v]):n.scaleLinear().domain(n.extent(i)).range([0,v]),V=o.append("g").attr("transform",`translate(${w.left},${w.top})`);if(zt(t,V,E,v),se(t,V,v,B),Ot(t,V,E,v),l){let N=At(a,ct(a,e.series.findIndex(S=>S.axis==="right"),t.dark),t.dark);V.append("g").attr("class",t.cls("ticks")).selectAll("text").data(A).join("text").attr("x",v+8).attr("y",S=>H(S)).attr("dy","0.32em").style("fill",N).text(S=>L(S)),(r.rightLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",t.width).attr("y",t.rightTitleY).attr("text-anchor","end").style("fill",N).text(r.rightLabel):!1)}let z=N=>G(N);ue(t,V,B,le(t,z,kr(t,G,i),c?m:ie(v,t.mobile)),z);let Q=N=>G(i[N]),j=t.id("plot");o.append("defs").append("clipPath").attr("id",j).append("rect").attr("x",-8).attr("y",-8).attr("width",v+16).attr("height",B+16);let M=V.append("g").attr("clip-path",(r.yMin!==null?!0:r.yMax!==null)?`url(#${j})`:null),X=V.append("g"),R=r.curve==="monotone"?n.curveMonotoneX:n.curveLinear;if(s){let N=Ht(t)?Ct(t,M,v,B):null;(u?b:[e.series[0].values.map(f=>[0,f!=null?f:0])]).forEach((f,x)=>{var Z;let nt=(Z=n.area().curve(R).x((q,ot)=>Q(ot)).y0(q=>E(q[0])).y1(q=>E(q[1]))(f))!=null?Z:"",W=N?xt(t,[e.series[x].key]):null;((N?W:!1)?N.clip(W,ct(a,x,t.dark)).append("path").attr("d",nt):!1),M.append("path").attr("class",t.cls("area")).attr("d",nt).attr("fill",ct(a,x,t.dark)).attr("fill-opacity",kt(t,W)),((m===1?e.series[x].values[0]!==null:!1)?M.append("circle").attr("cx",Q(0)).attr("cy",E(f[0][1])).attr("r",3.5).attr("fill",ct(a,x,t.dark)):!1)}),(N==null?!0:N.paint())}if(!s){let[N,S]=E.domain(),f=((ke(t)?(0)>=(N):!1)?S>=0:!1)?xt(t,[e.series[0].key]):null,x=f?Ct(t,M,v,B):null;if((x?f:!1)){let Z=(dt=n.area().curve(R).defined(q=>q!==null).x((q,ot)=>Q(ot)).y0(E(0)).y1(q=>E(q))(e.series[0].values))!=null?dt:"";x.clip(f,ct(a,0,t.dark)).append("path").attr("d",Z),M.append("path").attr("d",Z).attr("fill",ct(a,0,t.dark)).attr("fill-opacity",kt(t,f)),x.paint()}let et=W=>n.line().curve(R).defined(Z=>Z!==null).x((Z,q)=>Q(q)).y(Z=>C(W)(Z)),nt=e.series.map((W,Z)=>Z).sort((W,Z)=>Number(jt(a,W))-Number(jt(a,Z))).reverse();for(let W of nt){let Z=e.series[W],q=(mt=et(W)(Z.values))!=null?mt:"";((e.series.length>1?!jt(a,W):!1)?M.append("path").attr("class",t.cls("line-halo")).attr("d",q):!1),M.append("path").attr("class",t.cls("line")).attr("d",q).attr("stroke",ct(a,W,t.dark)).attr("stroke-width",jt(a,W)?2:t.mobile?3:3.5).attr("stroke-dasharray",Z.dashed?"6 4":null),Z.values.forEach((ot,pt)=>{(((ot===null?!0:Z.values[pt-1]!=null)?!0:Z.values[pt+1]!=null)?!0:M.append("circle").attr("cx",Q(pt)).attr("cy",C(W)(ot)).attr("r",3.5).attr("fill",ct(a,W,t.dark)))})}(r.endDots?e.series.forEach((W,Z)=>{if(((0)>($[Z])?!0:jt(a,Z)))return;let q=Q($[Z]),ot=C(Z)(e.series[Z].values[$[Z]]);M.append("circle").attr("class",`${t.cls("dot")} ${t.cls("dot--pulse")}`).attr("cx",q).attr("cy",ot).attr("r",5).attr("fill",ct(a,Z,t.dark))}):!1)}if(O){let N=e.series.map((f,x)=>({i:x,y:$[x]>=0?C(x)(f.values[$[x]]):NaN,x:$[x]>=0?Q($[x]):0})).filter(f=>(!Number.isNaN(f.y)?((!jt(a,f.i)?!0:I)):!1));ae(N,15,6,B);let S=t.width/3;for(let f of N){let x=e.series[f.i].values[$[f.i]],[et,nt]=C(f.i).domain(),W=x>nt?-1:(et)>(x)?1:0,Z=(l?v:f.x)+rt,q=At(a,ct(a,f.i,t.dark),t.dark);(W?X.append("path").attr("class",t.cls("off-scale")).attr("d",`M${Z+4},${f.y+W*5}l-4,${-W*8}h8z`).attr("fill",q).append("title").text((0)>(W)?"Above the axis range":"Below the axis range"):!1);let ot=X.append("text").attr("class",t.cls(I?"direct-label":"value-label")).attr("x",Z+(W?12:0)).attr("y",f.y).attr("dy","0.32em").style("fill",q).text(at(f.i)),pt=ot.node(),[ut,vt]=K(f.i),Tt=(ut?ut:vt),Bn=Ee=>ut?[`${Ee.trimEnd()}\u2026`,vt].filter(Boolean).join(" "):`${Ee.trimEnd()}\u2026`;for(;(pt.getComputedTextLength()>S?Tt.length>4:!1);)Tt=Tt.slice(0,-2),ot.text(Bn(Tt))}}let tt=V.append("g").attr("class",t.cls("hover")).style("display","none"),J=new Set((Mt=(ht=r.tooltip)==null?void 0:ht.hideRows)!=null?Mt:[]);tt.append("line").attr("class",t.cls("rule")).attr("y1",0).attr("y2",B);let T=V.append("rect").attr("class",t.cls("overlay")).attr("width",v).attr("height",B);t.tooltip.bind(T,N=>{var pt;let[S]=n.pointer(N),f=G.invert(S),x=Math.max(0,Math.min(m-1,n.bisectCenter(i,f))),et=Q(x);tt.style("display",null).select("line").attr("x1",et).attr("x2",et);let nt=e.series.map((ut,vt)=>({si:vt,v:ut.values[x]})).filter(ut=>(ut.v!==null?!J.has(e.series[ut.si].label):!1)).sort((ut,vt)=>vt.v-ut.v),W=nt.slice(0,8),Z=W.map(ut=>gt(t,ct(a,ut.si,t.dark),e.series[ut.si].label,P(ut.si)(ut.v),e.series[ut.si].dashed)).join(""),q=nt.length>W.length?`\x3cdiv class="${t.cls("tip-more")}">+${nt.length-W.length} more\x3c/div>`:"",ot=W.length?u?E((pt=n.max(b,ut=>ut[x][1]))!=null?pt:0):C(W[0].si)(W[0].v):B/2;t.tooltip.show(`${bt(t,c?String(e.x[x]):t.fmtX((e.xKind==="date",i[x])))}${Z}${q}`,et+w.left,ot+w.top)},()=>tt.style("display","none"))}function ke(t){let{spec:n}=t;return __gvAnd((n.type==="line"?n.data.series.length===1:!1),()=>(!!xt(t,[n.data.series[0].key])))}function jt(t,n){var a;return __gvAnd(t.style.paletteId.startsWith("highlight"),()=>(t.data.series[n].key!==((a=t.style.highlight)!=null?a:t.data.series[0].key)))}function kr(t,n,a){let{d3:o,spec:e}=t,r=e.data;if(r.xKind==="date")return s=>{let u=fn(o,n,a,s);return{ticks:u.ticks,label:(c,i)=>u.label(c,i)}};if(r.xKind==="category"){let s=r.x.map(String),u=s.length;return c=>({ticks:o.range(0,u,Math.max(1,Math.ceil(u/c))),label:i=>s[i]})}return ce(t,n)}var de="http://www.w3.org/2000/svg",yn=/[\p{Script=Latin}\p{Script=Greek}\p{Script=Cyrillic}]/u,xn=/[_\-/.]/;function vr(t,n,a){let o=[],e=Array.from(t);for(;(e.length>1?a(e.join(""))>n:!1);){let r=c=>{let i=e.slice(0,c).join("");return (yn.test(e[c-1])?yn.test(e[c]):!1)?`${i}-`:i},s=1;for(;((e.length-1)>(s)?__gvLe(a(r(s+1)),n):!1);)s++;let u=s;for(;(u>Math.ceil(s/2)?!xn.test(e[u-1]):!1);)u--;(xn.test(e[u-1])?(s=u):!1),o.push(r(s)),e=e.slice(s)}return{lines:o,rest:e.join("")}}function Mn(t,n,a,o){let e=[],r="";for(let s of t.split(/\s+/).filter(Boolean)){let u=r?`${r} ${s}`:s;if(__gvLe(o(u),n)){r=u;continue}(r?e.push(r):!1);let c=vr(s,n,o);if(e.push(...c.lines),r=c.rest,e.length>a)break}if((r?e.push(r):!1),e.length>a){let s=Array.from(e[a-1].replace(/-$/,""));for(;(s.length>1?o(`${s.join("").trimEnd()}\u2026`)>n:!1);)s=s.slice(0,-1);e.length=a,e[a-1]=`${s.join("").trimEnd()}\u2026`}return e}function wn(t){t.textContent="";let n=t.ownerDocument.createElementNS(de,"tspan");return t.appendChild(n),a=>(n.textContent=a,n.getComputedTextLength())}function kn(t,n,a){var r;let o=t.getAttribute("x"),e=t.ownerDocument;if(t.textContent="",(1)>=(n.length)){t.textContent=(r=n[0])!=null?r:"";return}n.forEach((s,u)=>{let c=e.createElementNS(de,"tspan");(o!==null?c.setAttribute("x",o):!1),(u?c.setAttribute("dy",`${a}em`):!1),c.textContent=s,t.appendChild(c)})}function $e(t,n,a,o,e){let r=Mn(n,a,o,wn(t));kn(t,r,e);let s=__gvAnd((r.length>0?r[r.length-1].endsWith("\u2026"):!1),()=>(!n.endsWith("\u2026")));return{lines:Math.max(1,r.length),cut:s}}function $r(t,n,a,o,e){let r=/\s/.test(t),s=p=>r?p.split(/\s+/).filter(Boolean):Array.from(p),u=p=>p.join(r?" ":""),c=s(t),i=n.filter(p=>p!==t).map(s),m=(p,b)=>(p.length>=b?u(p.slice(-b))===u(c.slice(-b)):!1),l=1;for(;((c.length)>(l)?i.some(p=>m(p,l)):!1);)l++;let d=u(c.slice(-l));for(let p=c.length-l-1;p>=0;p--){let b=u(c.slice(0,p)),y=r?`${b?`${b} `:""}\u2026 ${d}`:`${b}\u2026${d}`,g=Mn(y,a,1/0,e);if((o)>=(g.length))return g}return null}function vn(t,n){var r;let a=t.ownerDocument,o=a.createElementNS(de,"g"),e=a.createElementNS(de,"title");e.textContent=n,((r=t.parentNode)==null?!0:r.insertBefore(o,t)),o.appendChild(e),o.appendChild(t)}function ve(t){var n;return __gvOr(Array.from(t.querySelectorAll("tspan")).map(a=>{var o;return(o=a.textContent)!=null?o:""}).join(" "),()=>(((n=t.textContent)!=null?n:"").trim()))}function Ce(t,n,a,o=1.15){var s;let e=((s=t.textContent)!=null?s:"").trim(),r=$e(t,e,n,a,o);return (r.cut?vn(t,e):!1),r.lines}function St(t,n,a,o=1.15){let e=t.map(s=>{var u;return((u=s.textContent)!=null?u:"").trim()}),r=t.map((s,u)=>s.getComputedTextLength()>n?$e(s,e[u],n,a,o):{lines:1,cut:!1});for(let s of Cr(t,e)){let u=$r(e[s],e,n,a,wn(t[s]));u?(kn(t[s],u,o),r[s]={lines:u.length,cut:!0}):r[s]=$e(t[s],e[s],n,a,o)}return r.forEach((s,u)=>__gvAnd(s.cut,()=>(vn(t[u],e[u])))),r.map(s=>s.lines)}function Cr(t,n){let a=new Map;t.forEach((e,r)=>{var s;return a.set(ve(e),[...(s=a.get(ve(e)))!=null?s:[],r])});let o=[];for(let e of a.values())(new Set(e.map(r=>n[r])).size>1?o.push(...e.filter(r=>n[r]!==ve(t[r]))):!1);return o}var $n=110,Sr=3,Tn=19,Fn=10;function Se(t){return t.toUpperCase()===yt.orange?yt.azure:yt.orange}function Ln(t){var lt,dt,mt,ht,Mt,N;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=a.type==="stacked",u=a.type==="combo",c=S=>(!u?!0:S===0),i=S=>__gvAnd((u?S>0:u),()=>(e.series[S].axis==="right")),m=S=>t.fmtFor(e.series[S]),l=e.x.map(S=>t.fmtX(S)),d=l.length;if(d===0)return;let p=e.series.length,b=0,y=0,g=[];if(s){let S=e.x.map((f,x)=>e.series.map(et=>{var nt;return(nt=et.values[x])!=null?nt:0}));g=n.stack().keys(e.series.map((f,x)=>x)).value((f,x)=>f[x]).offset(n.stackOffsetDiverging)(S),b=Math.min(0,(lt=n.min(g,f=>n.min(f,x=>x[0])))!=null?lt:0),y=Math.max(0,(dt=n.max(g,f=>n.max(f,x=>x[1])))!=null?dt:0)}else{let S=e.series.filter((f,x)=>!i(x)).flatMap(f=>f.values).filter(f=>f!==null);b=Math.min(0,(mt=n.min(S))!=null?mt:0),y=Math.max(0,(ht=n.max(S))!=null?ht:0)}((r.yMax!==null?r.yMax>y:!1)?(y=r.yMax):!1),(b===y?(y=1):!1);let w=e.series.some((S,f)=>i(f)),B=t.mobile?4:5,F=null,E=t.fmtAxis,H=0;if(w){let S=e.series.filter((et,nt)=>i(nt)).flatMap(et=>et.values).filter(et=>et!==null),f=(Mt=n.min(S))!=null?Mt:0,x=(N=n.max(S))!=null?N:1;(r.rightFromZero?(f=Math.min(0,f),x=Math.max(0,x)):!1),(f===x?(x=f+1):!1),F=n.scaleLinear().domain([f,x]).nice(B),E=t.rightAxis(F.domain(),B),H=ft(t,F.ticks(B).map(E),It)+10,t.margin.right=Math.max(t.margin.right,H+4)}let L=n.scaleBand().domain(l.map((S,f)=>String(f))).range([0,1]).paddingInner(.25).paddingOuter(.1),A=l.map((S,f)=>{var x;return((x=L(String(f)))!=null?x:0)+L.bandwidth()/2}),D=(S,f)=>{let x=null;return l.forEach((et,nt)=>{var ot;if(((ot=L(String(nt)))!=null?ot:0)>S)return;let W=s?g.flatMap(pt=>[pt[nt][0],pt[nt][1]]):e.series.filter((pt,ut)=>__gvAnd(c(ut),()=>(!i(ut)))).map(pt=>{var ut;return(ut=pt.values[nt])!=null?ut:0}),Z=Math.max(0,...W),q=Math.min(0,...W);x=$t(x,[f(Z)-((r.valueLabels?Z>0:!1)?Tn:2),f(q)+((r.valueLabels?(0)>(q):!1)?Fn+6:2)])}),e.series.forEach((et,nt)=>{if(c(nt))return;let W=(i(nt)?F:!1)?F.copy().range(f.range()):f;x=$t(x,oe(Bt(A,et.values,S,W),6))}),x},C=t.margin,P=n.scaleLinear().domain([b,y]).nice(t.mobile?4:5).range([t.height-C.top-40,0]);t.setAxis(P.domain(),t.mobile?4:5);let $=P.copy();((r.valueLabels?(24)>=(d):!1)?Sn($,t.height-C.top-40,C.top,Cn(t,g)):!1),C.left=Math.max(Pt(t,P,D),Pt(t,$,D));let I=Math.max(40,t.width-C.left-C.right),O=n.scaleBand().domain(l.map((S,f)=>String(f))).range([0,I]).paddingInner(.25).paddingOuter(.1),K=O.bandwidth(),at=t.mobile?12:13,rt=ft(t,l,at),st=e.xKind!=="category",U=1,Y="flat";(rt>K+O.step()*.25?(st?U=Math.ceil((rt+10)/O.step()):Y=((14)>=(d)?K>36:!1)?"wrap":"rotate"):!1),(Y==="rotate"?(U=Math.max(1,Math.ceil(14/Math.max(1,O.step())))):!1);let _=o.append("g").attr("class",t.cls("ticks")),k=0,h=[];l.forEach((S,f)=>{var W;if(f%U!==0)return;let x=((W=O(String(f)))!=null?W:0)+K/2,et=_.append("text").style("font-size",`${at}px`).text(S),nt=et.node();if(Y==="rotate"){et.attr("text-anchor","end").attr("transform",`translate(${x},12) rotate(-45)`);let Z=Math.min(($n-12)/.72,(x+C.left-at)/Math.SQRT1_2);(nt.getComputedTextLength()>Z?Ce(nt,Z,1):!1),k=Math.max(k,nt.getComputedTextLength())}else et.attr("x",x).attr("y",20).attr("text-anchor","middle"),(Y==="wrap"?h.push(nt):!1)});let v=Math.max(1,...St(h,O.step()-4,Sr)),G=Y==="rotate"?Math.min($n,k*.72+12)+8:Y==="wrap"?Math.ceil(20+(v-1)*at*1.15+at*.35+8):30;C.bottom=G+(r.xLabel?20:0);let V=Math.max(60,t.height-C.top-C.bottom),z=n.scaleLinear().domain([b,y]).nice(B).range([V,0]);((r.valueLabels?(24)>=(d):!1)?Sn(z,V,C.top,Cn(t,g)):!1),(F==null?!0:F.range([V,0])),_.attr("transform",`translate(${C.left},${C.top+V})`),(r.xLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",C.left+I/2).attr("y",C.top+V+G+12).attr("text-anchor","middle").text(r.xLabel):!1);let Q=o.append("g").attr("transform",`translate(${C.left},${C.top})`);if(zt(t,Q,z,I),F){let S=At(a,ct(a,e.series.findIndex((f,x)=>i(x)),t.dark),t.dark);Q.append("g").attr("class",t.cls("ticks")).selectAll("text").data(F.ticks(B)).join("text").attr("x",I+8).attr("y",f=>F(f)).attr("dy","0.32em").style("fill",S).text(f=>E(f)),(r.rightLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",t.width).attr("y",t.rightTitleY).attr("text-anchor","end").style("fill",S).text(r.rightLabel):!1)}let j=Q.append("g"),M=Ht(t)?Ct(t,j,I,V):null,X=u?1:p,R=(S,f)=>{let x=ct(a,S,t.dark);return ((((0)>(f)?X===1:!1)?!u:!1)?!s:!1)?Se(x):x},tt=n.scaleBand().domain(n.range(X)).range([0,K]).padding(X>1?.08:0),J=[];if(s?(g.forEach((S,f)=>{S.forEach((x,et)=>{var pt;let nt=z(x[0]),W=z(x[1]),Z=Math.abs(nt-W);if((0)>=(Z))return;let q=(pt=O(String(et)))!=null?pt:0,ot=M?xt(t,[e.series[f].key,String(e.x[et])]):null;((M?ot:!1)?M.clip(ot,ct(a,f,t.dark)).append("rect").attr("x",q).attr("y",Math.min(nt,W)).attr("width",K).attr("height",Z):!1),j.append("rect").attr("class",t.cls("segment")).attr("x",q).attr("y",Math.min(nt,W)).attr("width",K).attr("height",Z).attr("fill",ct(a,f,t.dark)).attr("fill-opacity",kt(t,ot))})}),(r.valueLabels?e.x.forEach((S,f)=>{var Z;let x=e.series.map(q=>{var ot;return(ot=q.values[f])!=null?ot:0}),et=x.filter(q=>q>0).reduce((q,ot)=>q+ot,0),nt=x.filter(q=>(0)>(q)).reduce((q,ot)=>q+ot,0),W=((Z=O(String(f)))!=null?Z:0)+K/2;(((et>0?!0:nt===0))?J.push({x:W,y:z(et)-6,text:t.fmtValue(et),below:!1}):!1),((0)>(nt)?J.push({x:W,y:z(nt)+14,text:t.fmtValue(nt),below:!0}):!1)}):!1)):e.series.forEach((S,f)=>{(c(f)?S.values.forEach((x,et)=>{var vt,Tt;if(x===null)return;let nt=((vt=O(String(et)))!=null?vt:0)+((Tt=tt(f))!=null?Tt:0),W=tt.bandwidth(),Z=z(Math.max(0,x)),q=Math.abs(z(x)-z(0)),ot=pe(nt,Z,W,q,4,x>=0?"up":"down"),pt=M?xt(t,[S.key,String(e.x[et])]):null,ut=R(f,x);((M?pt:!1)?M.clip(pt,ut,me(t,String(e.x[et]))?{x:nt,y:Z,w:W,h:q}:void 0).append("path").attr("d",ot):!1),j.append("path").attr("class",t.cls("bar")).attr("d",ot).attr("fill",ut).attr("fill-opacity",kt(t,pt)),(r.valueLabels?J.push({x:nt+W/2,y:x>=0?z(x)-6:z(x)+14,text:m(f)(x),below:(0)>(x)}):!1)}):!1)}),(M==null?!0:M.paint()),Ot(t,Q,z,I),(u?e.series.forEach((S,f)=>{var Z;if(f===0)return;let x=(i(f)?F:!1)?F:z,et=q=>{var ot;return((ot=O(String(q)))!=null?ot:0)+K/2},nt=(Z=n.line().defined(q=>q!==null).x((q,ot)=>et(ot)).y(q=>x(q))(S.values))!=null?Z:"",W=ct(a,f,t.dark);j.append("path").attr("class",t.cls("line-halo")).attr("d",nt),j.append("path").attr("class",t.cls("line")).attr("d",nt).attr("stroke",W).attr("stroke-width",t.mobile?3:3.5).attr("stroke-dasharray",S.dashed?"6 4":null),S.values.forEach((q,ot)=>{(q!==null?j.append("circle").attr("class",t.cls("dot")).attr("cx",et(ot)).attr("cy",x(q)).attr("r",d>24?2.5:4).attr("fill",W):!1)})}):!1),(J.length?(24)>=(d):!1)){let S=(X>1?!s:!1)?tt.bandwidth():K;(__gvLe(ft(t,J.map(x=>x.text),12),S+6)?Q.append("g").selectAll("text").data(J).join("text").attr("class",t.cls("value-label")).attr("x",x=>x.x).attr("y",x=>x.y).attr("text-anchor","middle").text(x=>x.text):!1)}let T=Q.append("g").selectAll("rect").data(l.map((S,f)=>f)).join("rect").attr("class",t.cls("overlay")).attr("x",S=>{var f;return((f=O(String(S)))!=null?f:0)-(O.step()-K)/2}).attr("width",O.step()).attr("y",0).attr("height",V);t.tooltip.bind(T,(S,f)=>{let x=l[f],et=e.series.map((q,ot)=>q.values[f]===null?"":gt(t,R(ot,q.values[f]),q.label,m(ot)(q.values[f]),q.dashed)).join(""),nt=(s?p>1:!1)?gt(t,"transparent","Total",t.fmtValue(e.series.reduce((q,ot)=>{var pt;return q+((pt=ot.values[f])!=null?pt:0)},0))):"",[W,Z]=n.pointer(S,t.chartEl);t.tooltip.show(`${bt(t,x)}${et}${nt}`,W,Z)})}function Cn(t,n){var u,c,i,m;let{d3:a,spec:o}=t;if(o.type==="stacked"){let l=(u=a.min(n,d=>a.min(d,p=>p[0])))!=null?u:0;return{top:(c=a.max(n,d=>a.max(d,p=>p[1])))!=null?c:null,bottom:(0)>(l)?l:null}}let e=(o.type==="combo"?o.data.series.slice(0,1):o.data.series).flatMap(l=>l.values).filter(l=>l!==null),r=(i=a.max(e.filter(l=>l>=0)))!=null?i:null,s=(m=a.min(e.filter(l=>(0)>(l))))!=null?m:null;return{top:r,bottom:s}}function Sn(t,n,a,o){let e=Math.min(.4,Fn/n),r=Math.min(.4,Math.max(0,Tn-a)/n);for(let s=0;(3)>(s);s++){let[u,c]=t.domain();((o.bottom!==null?t(o.bottom)>n*(1-e):!1)?(u=c-(c-o.bottom)/(1-e)):!1),((o.top!==null?__gvLt(t(o.top),n*r):!1)?(c=(o.top-r*u)/(1-r)):!1),t.domain([u,c])}}var Tr=3;function Fr(t){return t>1?t*13+14:30}function En(t){var _,k;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=e.x.map(h=>t.fmtX(h)),u=s.length;if(u===0)return;let c=e.series.length,i=t.margin,m=e.series.flatMap(h=>h.values).filter(h=>h!==null),l=Math.min(0,(_=n.min(m))!=null?_:0),d=Math.max(0,(k=n.max(m))!=null?k:0);((r.yMax!==null?r.yMax>d:!1)?(d=r.yMax):!1),(l===d?(d=1):!1);let p=t.mobile?13:14,b=t.width*(t.mobile?.42:.34),y=Math.min(b,ft(t,s,p));i.left=y+10;let g=r.valueLabels,w=g?ft(t,m.map(t.fmtValue),12)+8:0;i.right=Math.max(i.right,w),(((0)>(l)?g:!1)?(i.left+=w):!1),i.bottom=g?8:28;let B=Math.max(40,t.width-i.left-i.right),F=o.append("g").attr("transform",`translate(${i.left},${i.top})`),E=F.append("g").attr("class",t.cls("cat-labels")),H=s.map(h=>E.append("text").attr("x",-10-(((0)>(l)?g:!1)?w:0)).attr("text-anchor","end").style("font-size",`${p}px`).text(h)),L=St(H.map(h=>h.node()),y,Tr),A=H.map((h,v)=>({t:h,lines:L[v]})),D=Fr(c),C=Math.max(D,Math.ceil(n.max(A,h=>h.lines)*p*1.15+10)),P=u*C,$=n.scaleLinear().domain([l,d]).nice(t.mobile?4:5).range([0,B]);t.setAxis($.domain(),t.mobile?4:5);let I=Math.max(.25,1-D*.75/C),O=n.scaleBand().domain(s.map((h,v)=>String(v))).range([0,P]).paddingInner(I).paddingOuter(I/2),K=n.scaleBand().domain(n.range(c)).range([0,O.bandwidth()]).padding(c>1?.1:0);if(A.forEach(({t:h,lines:v},G)=>{var V;h.attr("y",((V=O(String(G)))!=null?V:0)+O.bandwidth()/2).attr("dy",`${.32-(v-1)*.575}em`)}),!g){let h=$.ticks(t.mobile?4:5);F.append("g").attr("class",t.cls("grid")).selectAll("line").data(h).join("line").attr("x1",v=>Math.round($(v))+.5).attr("x2",v=>Math.round($(v))+.5).attr("y1",0).attr("y2",P),F.append("g").attr("class",t.cls("ticks")).selectAll("text").data(h).join("text").attr("x",v=>$(v)).attr("y",P+20).attr("text-anchor","middle").text(v=>t.fmtAxis(v))}let at=F.append("g"),rt=Ht(t)?Ct(t,at,B,P):null,st=[],U=(h,v)=>{let G=ct(a,h,t.dark);return ((0)>(v)?c===1:!1)?Se(G):G};e.series.forEach((h,v)=>{h.values.forEach((G,V)=>{var J,T;if(G===null)return;let z=((J=O(String(V)))!=null?J:0)+((T=K(v))!=null?T:0),Q=K.bandwidth(),j=$(Math.min(0,G)),M=Math.abs($(G)-$(0)),X=pe(j,z,M,Q,4,G>=0?"right":"left"),R=rt?xt(t,[h.key,String(e.x[V])]):null,tt=U(v,G);((rt?R:!1)?rt.clip(R,tt,me(t,String(e.x[V]))?{x:j,y:z,w:M,h:Q}:void 0).append("path").attr("d",X):!1),at.append("path").attr("class",t.cls("bar")).attr("d",X).attr("fill",tt).attr("fill-opacity",kt(t,R)),(g?st.push({x:G>=0?$(G)+6:$(G)-6,y:z+Q/2,text:t.fmtValue(G),anchor:G>=0?"start":"end"}):!1)})}),(rt==null?!0:rt.paint()),(0)>(l)?F.append("line").attr("class",t.cls("zero")).attr("x1",$(0)).attr("x2",$(0)).attr("y1",0).attr("y2",P):F.append("line").attr("class",t.cls("baseline")).attr("x1",$(0)+.5).attr("x2",$(0)+.5).attr("y1",0).attr("y2",P),F.append("g").selectAll("text").data(st).join("text").attr("class",t.cls("value-label")).attr("x",h=>h.x).attr("y",h=>h.y).attr("dy","0.32em").attr("text-anchor",h=>h.anchor).text(h=>h.text);let Y=F.append("g").selectAll("rect").data(s.map((h,v)=>v)).join("rect").attr("class",t.cls("overlay")).attr("x",-i.left).attr("width",t.width).attr("y",h=>{var v;return((v=O(String(h)))!=null?v:0)-(O.step()-O.bandwidth())/2}).attr("height",O.step());return t.tooltip.bind(Y,(h,v)=>{if((c===1?g:!1))return;let G=s[v],V=e.series.map((j,M)=>j.values[v]===null?"":gt(t,U(M,j.values[v]),j.label,t.fmtValue(j.values[v]))).join(""),[z,Q]=n.pointer(h,t.chartEl);t.tooltip.show(`${bt(t,G)}${V}`,z,Q)}),P+i.top+i.bottom}var An=40;function Lr(t,n){let a=n==="exponential"?t.filter(i=>i.y>0).map(i=>({x:i.x,y:Math.log(i.y)})):t;if((2)>(a.length))return null;let o=a.length,e=a.reduce((i,m)=>i+m.x,0)/o,r=a.reduce((i,m)=>i+m.y,0)/o,s=a.reduce((i,m)=>i+(m.x-e)**2,0);if(s===0)return null;let u=a.reduce((i,m)=>i+(m.x-e)*(m.y-r),0)/s,c=r-u*e;return n==="exponential"?i=>Math.exp(c+u*i):i=>c+u*i}function Er(t,n){let a=t.map((r,s)=>({item:r,i:s,s:n(r)})).sort((r,s)=>r.s[0]-s.s[0]),o=[],e=-1/0;for(let r of a)(!o.length?!0:r.s[0]>e)?(o.push([r]),e=r.s[1]):(o[o.length-1].push(r),e=Math.max(e,r.s[1]));return o.map(r=>r.sort((s,u)=>s.i-u.i).map(s=>s.item))}function Dn(t,n){for(let a of[[1,2,5],[1,5],[1]]){let o=[0];for(let e=1;(t*10)>=(e);e*=10)for(let r of a)((t+1e-9)>=(e*r)?o.push(e*r):!1);if(((n)>=(o.length)?!0:a.length===1))return o}return[0]}function Te(t){var a;let n=1;for(;(t)>(n*10);)n*=10;return(a=[1,2,5,10].map(o=>o*n).find(o=>o>=t))!=null?a:n*10}function Pn(t){var G,V,z,Q,j;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=(G=e.points)!=null?G:[];if(!s.length)return;let u=new Map(e.series.map((M,X)=>[M.key,X])),c=M=>{var X,R;return ct(a,(R=u.get((X=M.group)!=null?X:e.series[0].key))!=null?R:0,t.dark)},i=([M,X])=>{let R=(__gvOr(__gvOr(X-M,()=>(Math.abs(M))),()=>(1)))*.04;return[M-R,X+R]},[m,l]=i(n.extent(s,M=>M.x));(r.xFromZero?(m=Math.min(0,m),l=Math.max(0,l)):!1),(r.xMin!==null?(m=r.xMin):!1),(r.xMax!==null?(l=r.xMax):!1);let[d,p]=i(n.extent(s,M=>M.y));(r.yFromZero?(d=Math.min(0,d),p=Math.max(0,p)):!1),(r.yMin!==null?(d=r.yMin):!1),(r.yMax!==null?(p=r.yMax):!1),(m>l?([m,l]=[l,m]):!1),(d>p?([d,p]=[p,d]):!1);let b=t.margin;b.bottom=r.xLabel?48:30;let y=t.height-b.top-b.bottom,w=r.yScale==="symlog"?Object.assign(n.scaleSymlog().domain([0,(V=r.yMax)!=null?V:Te(Math.max(p,1))]).range([y,0]),{ticks:()=>{var M;return Dn((M=r.yMax)!=null?M:Te(Math.max(p,1)),t.mobile?5:8)}}):n.scaleLinear().domain([d,p===d?d+1:p]).nice(5).range([y,0]);t.setAxis(w.domain(),t.mobile?4:5);let B=r.xScale==="symlog",F=(z=r.xMax)!=null?z:Te(Math.max(l,1)),E=M=>B?Object.assign(n.scaleSymlog().domain([0,F]).range(M),{ticks:X=>Dn(F,Math.max(2,X))}):n.scaleLinear().domain([m,l===m?m+1:l]).nice().range(M),H=E([0,1]),L=t.mobile?4:5.5;b.left=Pt(t,w,M=>{let X=null;for(let R of s)(__gvLe(H(R.x),M+.02)?(X=$t(X,[w(R.y)-L-2,w(R.y)+L+2])):!1);return X});let A=Math.max(40,t.width-b.left-b.right),D=E([0,A]),C=o.append("g").attr("transform",`translate(${b.left},${b.top})`);zt(t,C,w,A),se(t,C,A,y),Ot(t,C,w,A);let P=M=>D(M);ue(t,C,y,le(t,P,ce(t,D),ie(A,t.mobile)),P),(r.xLabel?C.append("text").attr("class",t.cls("axis-title")).attr("x",A).attr("y",y+42).attr("text-anchor","end").text(r.xLabel):!1);let $=t.id("plot");if(o.append("defs").append("clipPath").attr("id",$).append("rect").attr("x",-L).attr("y",-L).attr("width",A+2*L).attr("height",y+2*L),r.trend){let M=C.append("g").attr("clip-path",`url(#${$})`);for(let X of e.series){let R=s.filter(mt=>{var ht;return((ht=mt.group)!=null?ht:e.series[0].key)===X.key}),tt=Lr(R,r.trend);if(!tt)continue;let[J,T]=n.extent(R,mt=>mt.x),lt=n.range(0,41).map(mt=>J+(T-J)*mt/40),dt=n.line().x(mt=>D(mt)).y(mt=>w(tt(mt)));M.append("path").attr("class",t.cls("trend")).attr("d",dt(lt)).attr("fill","none").attr("stroke",c(R[0])).attr("stroke-width",t.mobile?2:2.5).attr("stroke-dasharray","6 4")}}if(r.refLine){let{slope:M,intercept:X=0,label:R}=r.refLine,[tt,J]=D.domain(),[T,lt]=w.domain(),dt=n.range(0,201).map(mt=>B?D.invert(A*mt/200):tt+(J-tt)*mt/200).filter(mt=>{let ht=M*mt+X;return (ht>=Math.min(T,lt)?__gvLe(ht,Math.max(T,lt)):!1)});if(dt.length>1){let mt=n.line().x(ht=>D(ht)).y(ht=>w(M*ht+X));if(C.append("path").attr("class",t.cls("ref-line")).attr("d",mt(dt)).attr("fill","none").style("stroke","var(--gv-text-2)").attr("stroke-width",1.5).attr("stroke-dasharray","5 4"),R){let ht=dt[dt.length-1],Mt=D(ht),N=w(M*ht+X);C.append("text").attr("class",t.cls("axis-title")).attr("x",Math.min(Mt,A)).attr("y",Math.max(N-8,12)).attr("text-anchor","end").text(R)}}}C.append("g").attr("clip-path",`url(#${$})`).selectAll("circle").data(s).join("circle").attr("class",t.cls("point")).attr("cx",M=>D(M.x)).attr("cy",M=>w(M.y)).attr("r",L).attr("fill",c);let[I,O]=D.domain(),[K,at]=w.domain(),rt=s.filter(M=>__gvAnd(__gvAnd(__gvAnd(__gvAnd(M.label,()=>(M.x>=I)),()=>((O)>=(M.x))),()=>(M.y>=K)),()=>((at)>=(M.y)))).slice(0,An);if((rt.length?(An)>=(rt.length):!1)){let M=T=>T>A*.85?"end":(A*.15)>(T)?"start":"middle",X=Zt(t,rt.map(T=>T.label),12),R=rt.map((T,lt)=>({p:T,y:w(T.y)-L-5,w:X[lt]+6})),J=Er(R,T=>{let lt=D(T.p.x),dt=M(lt);return dt==="start"?[lt-3,lt+T.w]:dt==="end"?[lt-T.w,lt+3]:[lt-T.w/2,lt+T.w/2]}).flatMap(T=>hn(T,13,8,y,40).kept);C.append("g").selectAll("text").data(J).join("text").attr("class",t.cls("value-label")).attr("x",T=>D(T.p.x)).attr("y",T=>T.y).attr("text-anchor",T=>M(D(T.p.x))).text(T=>T.p.label)}let st=n.Delaunay.from(s,M=>D(M.x),M=>w(M.y)),U=C.append("circle").attr("class",t.cls("ring")).attr("r",L+3).style("display","none"),Y=s.some(M=>M.group!==void 0),_=__gvOr(__gvOr(__gvOr(((Q=r.tooltip)==null?void 0:Q.valueName),()=>(r.yLabel)),()=>((Y?"Vertical axis":(j=e.series[0])==null?void 0:j.label))),()=>("Vertical axis")),k=__gvOr(r.xLabel,()=>("Horizontal axis")),h=C.append("rect").attr("class",t.cls("overlay")).attr("width",A).attr("height",y),v=()=>U.style("display","none");t.tooltip.bind(h,M=>{var Mt,N;let[X,R]=n.pointer(M),tt=st.find(X,R),J=s[tt];if((!J?!0:Math.hypot(D(J.x)-X,w(J.y)-R)>40)){v(),t.tooltip.hide();return}U.style("display",null).attr("cx",D(J.x)).attr("cy",w(J.y));let T=__gvOr(__gvOr(J.label,()=>(J.group)),()=>("")),lt=__gvAnd(__gvAnd((Y?J.group:Y),()=>(J.label)),()=>(!(((N=(Mt=r.tooltip)==null?void 0:Mt.hideRows)!=null?N.includes(J.group):!1)))),dt=lt?Wt(t,c(J),J.group,""):"",mt=lt?"transparent":c(J),ht=dt+Wt(t,"transparent",k,t.fmtX(J.x))+gt(t,mt,_,t.fmtValue(J.y));t.tooltip.show(`${T?bt(t,T):""}${ht}`,D(J.x)+b.left,w(J.y)+b.top)},v)}var Ar=.25,Dr=16,Pr=3;function Gn(t){let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=e.x.map(String),u=e.series.length;if((!s.length?!0:!u))return t.height;let c=Math.max(1,Math.min(u,Math.floor(t.width/(t.mobile?170:220)))),i=Math.ceil(u/c),m=t.width/c,l=D=>D%c*m+m/2,d=u>1?e.series.map((D,C)=>o.append("text").attr("class",t.cls("donut-title")).attr("x",l(C)).attr("text-anchor","middle").text(D.label)):[],p=St(d.map(D=>D.node()),m-12,Pr),b=d.map((D,C)=>({t:D,lines:p[C]})),y=Math.max(1,...b.map(D=>D.lines)),g=u>1?30+Math.ceil((y-1)*Dr*1.15):0,w=Math.max(50,Math.min(m/2-12,t.mobile?130:150)),B=r.donutHole?w*.56:0,F=g+w*2+18,E=D=>{var C,P;return Et(a,(P=(C=e.categoryColors)==null?void 0:C[D])!=null?P:it.muted,t.dark)},H=n.format(".0%"),L=n.arc().innerRadius(B).outerRadius(w).padAngle(r.donutHole?.012:.006).cornerRadius(r.donutHole?2:0),A=n.arc().innerRadius(B?(B+w)/2:w*.62).outerRadius(B?(B+w)/2:w*.62);return e.series.forEach((D,C)=>{var U;let P=Math.floor(C/c),$=l(C),I=P*F+g+w+6,O=D.values.map(Y=>(Y!==null?Y>0:!1)?Y:0),K=O.reduce((Y,_)=>Y+_,0),at=o.append("g").attr("transform",`translate(${$},${I})`);if(((U=b[C])==null?!0:U.t.attr("y",P*F+18)),!K)return;let rt=n.pie().sort(null).value(Y=>Y)(O),st=Ct(t,at,0,0);rt.forEach((Y,_)=>{var G;if((0)>=(Y.value))return;let k=(G=L(Y))!=null?G:"",h=xt(t,[s[_],D.key]);(h?st.clip(h,E(_),{x:-w,y:-w,w:w*2,h:w*2}).append("path").attr("d",k):!1);let v=at.append("path").attr("class",t.cls("slice")).attr("d",k).attr("fill",E(_)).attr("fill-opacity",kt(t,h));t.tooltip.bind(v,V=>{var M;let[z,Q]=n.pointer(V,t.chartEl),j=gt(t,E(_),u>1?D.label:"Value",t.fmtValue((M=D.values[_])!=null?M:0))+Wt(t,"transparent","Share",H(Y.value/K));t.tooltip.show(`${bt(t,s[_])}${j}`,z,Q)})}),st.paint(),rt.forEach((Y,_)=>{if(((Ar)>(Y.endAngle-Y.startAngle)?!0:(0)>=(Y.value)))return;let[k,h]=A.centroid(Y),v=te(E(_)),G=at.append("text").attr("class",t.cls("slice-label")).attr("x",k).attr("y",h).attr("dy","0.35em").attr("text-anchor","middle").text(H(Y.value/K));(v!=="#FFFFFF"?G.style("fill",v).style("stroke","rgba(255,255,255,0.35)"):!1)})}),i*F+6}function Vn(t){let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,[s,u]=e.series;if(((!s?!0:!u)?!0:!e.x.length))return;let i=e.x.map(String).map((k,h)=>({i:h,name:k,a:s.values[h],b:u.values[h]})).filter(k=>(k.a!==null?k.b!==null:!1));if(!i.length)return;let m=t.margin;m.top=Math.max(m.top,34),m.bottom=14;let l=t.mobile?12:13,d=l+3,p=Math.max(t.height-m.top-m.bottom,i.length*d);o.attr("height",p+m.top+m.bottom);let[b,y]=Gt(i.flatMap(k=>[k.a,k.b]),r.yFromZero,r.yMin,r.yMax),g=n.scaleLinear().domain([b,y]).nice().range([p,0]),[w,B]=g.domain(),F=(k,h)=>h==="left"?{name:k.name,value:t.fmtValue(k.a),nameFirst:!0}:{name:t.mobile?"":k.name,value:t.fmtValue(k.b),nameFirst:!1},E=(k,h=k.name)=>h?k.nameFirst?`${h} ${k.value}`:`${k.value} ${h}`:k.value,H=k=>E(F(k,"left")),L=k=>E(F(k,"right")),A=t.width*(t.mobile?.4:.3),D=Math.min(A,ft(t,i.map(H),l))+12,C=Math.min(A,ft(t,i.map(L),l))+12,P=D,$=Math.max(P+60,t.width-C),I=k=>{var h,v;return Et(a,(v=(h=e.categoryColors)==null?void 0:h[k])!=null?v:it.muted,t.dark)},O=k=>(I(k).toUpperCase()===it.muted.toUpperCase()?!0:I(k).toUpperCase()===it.darkMuted.toUpperCase()),K=o.append("g").attr("transform",`translate(0,${m.top})`);o.append("text").attr("class",t.cls("slope-head")).attr("x",P).attr("y",18).attr("text-anchor","middle").text(s.label),o.append("text").attr("class",t.cls("slope-head")).attr("x",$).attr("y",18).attr("text-anchor","middle").text(u.label),K.append("line").attr("class",t.cls("slope-axis")).attr("x1",P).attr("x2",P).attr("y1",0).attr("y2",p),K.append("line").attr("class",t.cls("slope-axis")).attr("x1",$).attr("x2",$).attr("y1",0).attr("y2",p);let at=t.id("plot");o.append("defs").append("clipPath").attr("id",at).append("rect").attr("x",0).attr("y",-5).attr("width",t.width).attr("height",p+10);let rt=K.append("g").attr("clip-path",(r.yMin!==null?!0:r.yMax!==null)?`url(#${at})`:null),st=[...i].sort((k,h)=>+!O(k.i)-+!O(h.i));for(let k of st){let h=I(k.i);rt.append("line").attr("class",t.cls("slope-line")).attr("x1",P).attr("x2",$).attr("y1",g(k.a)).attr("y2",g(k.b)).attr("stroke",h).attr("stroke-width",O(k.i)?2:3),rt.append("circle").attr("cx",P).attr("cy",g(k.a)).attr("r",4).attr("fill",h),rt.append("circle").attr("cx",$).attr("cy",g(k.b)).attr("r",4).attr("fill",h)}let U=new Set,Y=k=>{let h=i.map(G=>({r:G,y:g(k==="left"?G.a:G.b)}));Gr(h,d,d/2,p);let v=k==="left"?P:$;for(let G of h){let V=k==="left"?G.r.a:G.r.b,z=V>B?-1:(w)>(V)?1:0;((z?!U.has(`${k}${z}`):!1)?(U.add(`${k}${z}`),K.append("path").attr("class",t.cls("off-scale")).attr("d",`M${v},${(0)>(z)?-8:p+8}l-5,${-z*8}h10z`).attr("fill",t.dark?it.darkSecondary:it.secondary).append("title").text((0)>(z)?"Above the axis range":"Below the axis range")):!1);let Q=F(G.r,k),j=K.append("text").attr("class",t.cls("slope-label")).attr("x",k==="left"?P-10:$+10).attr("y",G.y).attr("dy","0.32em").attr("text-anchor",k==="left"?"end":"start").style("font-size",`${l}px`).text(E(Q));(O(G.r.i)?!0:j.style("fill",At(a,I(G.r.i),t.dark)));let M=j.node(),X=Q.name;for(;(M.getComputedTextLength()>A?X.length>3:!1);)X=X.slice(0,-1),j.text(E(Q,`${X.trimEnd()}\u2026`))}};Y("left"),Y("right");let _=K.append("rect").attr("class",t.cls("overlay")).attr("x",P).attr("width",$-P).attr("height",p);t.tooltip.bind(_,k=>{let[h,v]=n.pointer(k),G=(h-P)/($-P),V=i[0],z=1/0;for(let M of i){let X=g(M.a)+(g(M.b)-g(M.a))*G;(__gvLt(Math.abs(X-v),z)?([V,z]=[M,Math.abs(X-v)]):!1)}let Q=V.b-V.a,j=gt(t,I(V.i),s.label,t.fmtValue(V.a))+gt(t,I(V.i),u.label,t.fmtValue(V.b))+gt(t,"transparent","Change",`${Q>=0?"+":""}${t.fmtValue(Q)}`);t.tooltip.show(`${bt(t,V.name)}${j}`,h,v+m.top)})}function Gr(t,n,a,o){let e=[...t].sort((r,s)=>r.y-s.y);e.forEach((r,s)=>r.y=Math.max(r.y,s?e[s-1].y+n:a));for(let r=e.length-1;r>=0;r--)e[r].y=Math.min(e[r].y,(e.length-1)>(r)?e[r+1].y-n:o)}var Vr=3;function _n(t){let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=e.x.map(_=>t.fmtX(_)),u=s.length;if((!u?!0:!e.series.length))return t.height;let c=t.margin,i=t.mobile?30:32,m=t.mobile?13:14,l=t.width*(t.mobile?.38:.3),d=Math.min(l,ft(t,s,m));c.left=d+14,c.right=Math.max(c.right,16),c.bottom=30,c.top=Math.max(c.top,6);let p=Math.max(60,t.width-c.left-c.right),b=o.append("g").attr("transform",`translate(${c.left},${c.top})`),y=s.map(_=>b.append("text").attr("class",t.cls("cat-label")).attr("x",-12).attr("text-anchor","end").style("font-size",`${m}px`).text(_)),g=St(y.map(_=>_.node()),d,Vr),w=Math.max(i,Math.ceil(Math.max(1,...g)*m*1.15+10)),B=u*w,F=e.series.flatMap(_=>_.values).filter(_=>_!==null),[E,H]=Gt(F,r.yFromZero,r.yMin,r.yMax),L=t.mobile?4:5,A=n.scaleLinear().domain([E,H]).nice(L).range([0,p]);t.setAxis(A.domain(),L);let[D,C]=A.domain(),P=_=>(_>=D?(C)>=(_):!1),$=_=>_*w+w/2,I=_=>e.series.map(k=>k.values[_]).filter(k=>k!==null),O=s.map((_,k)=>r.valueLabels?_r(I(k),P):[]);(r.valueLabels?Br(t,A,p,O):!1);let K=Rr(t,A,L),at=_=>ft(t,[t.fmtValue(_)],12),rt=O.map(_=>Nr(A,p,_,at)),st=t.id("plot");o.append("defs").append("clipPath").attr("id",st).append("rect").attr("x",A(D)-8).attr("y",0).attr("width",A(C)-A(D)+16).attr("height",B),b.append("g").attr("class",t.cls("grid")).selectAll("line").data(K).join("line").attr("x1",_=>Math.round(A(_))+.5).attr("x2",_=>Math.round(A(_))+.5).attr("y1",0).attr("y2",B),b.append("g").attr("class",t.cls("ticks")).selectAll("text").data(K).join("text").attr("x",_=>A(_)).attr("y",B+20).attr("text-anchor","middle").text(_=>t.fmtAxis(_)),(((0)>(E)?H>0:!1)?b.append("line").attr("class",t.cls("zero")).attr("x1",A(0)).attr("x2",A(0)).attr("y1",0).attr("y2",B):!1);let U=b.append("g").attr("clip-path",`url(#${st})`);s.forEach((_,k)=>{y[k].attr("y",$(k)).attr("dy",`${.32-(g[k]-1)*.575}em`);let h=I(k),v=Math.min(...h),G=Math.max(...h);(((h.length>1?G>=D:!1)?(C)>=(v):!1)?U.append("line").attr("class",t.cls("dumbbell")).attr("x1",A(Math.max(D,v))).attr("x2",A(Math.min(C,G))).attr("y1",$(k)).attr("y2",$(k)):!1),Ir(t,b,A,$(k),h),e.series.forEach((V,z)=>{let Q=V.values[k];(Q!==null?U.append("circle").attr("class",t.cls("dot")).attr("cx",A(Q)).attr("cy",$(k)).attr("r",t.mobile?6:7).attr("fill",ct(a,z,t.dark)):!1)});for(let V of rt[k])b.append("text").attr("class",t.cls("value-label")).attr("x",A(V.v)+V.dx).attr("y",$(k)).attr("dy","0.32em").attr("text-anchor",V.anchor).text(t.fmtValue(V.v))});let Y=b.append("g").selectAll("rect").data(s.map((_,k)=>k)).join("rect").attr("class",t.cls("overlay")).attr("x",-c.left).attr("width",t.width).attr("y",_=>_*w).attr("height",w);return t.tooltip.bind(Y,(_,k)=>{let h=e.series.map((V,z)=>V.values[k]===null?"":gt(t,ct(a,z,t.dark),V.label,t.fmtValue(V.values[k]))).join(""),[v,G]=n.pointer(_,t.chartEl);t.tooltip.show(`${bt(t,s[k])}${h}`,v,G)}),B+c.top+c.bottom}function _r(t,n){if(!t.length)return[];let a=Math.min(...t),o=Math.max(...t),e=[];return (((o)>(a)?n(a):!1)?e.push({v:a,anchor:"end",dx:-11}):!1),(n(o)?e.push({v:o,anchor:"start",dx:11}):!1),e}function Rr(t,n,a){for(let o=a;o>=1;o--){t.setAxis(n.domain(),o);let e=n.ticks(o),r=e.map(u=>ft(t,[t.fmtAxis(u)],12));if((e.every((u,c)=>(c===0?!0:n(u)-n(e[c-1])>=(r[c]+r[c-1])/2+8))?!0:o===1))return e}return[]}function Nr(t,n,a,o){let e=l=>{let d=l.anchor==="start"?t(l.v)+l.dx:t(l.v)+l.dx-o(l.v);return[d,d+o(l.v)]},r=l=>(e(l)[0]>=1?__gvLe(e(l)[1],n-1):!1),s=l=>({v:l.v,anchor:l.anchor==="end"?"start":"end",dx:-l.dx}),u=Math.min(...a.map(l=>l.v)),c=Math.max(...a.map(l=>l.v)),i=l=>((2)>(a.length)?!0:(e(l)[0]>=t(u)+7?__gvLe(e(l)[1],t(c)-7):!1)),m=[];for(let l of a){let d=r(l)?l:s(l);(((!r(d)?!0:(d!==l?!i(d):!1))?!0:m.some(p=>(__gvLt(e(p)[0],e(d)[1]+6)?__gvLt(e(d)[0],e(p)[1]+6):!1)))?!0:m.push(d))}return m}function Ir(t,n,a,o,e){let[r,s]=a.domain(),u=e.filter(l=>(r)>(l)),c=e.filter(l=>l>s),i=t.dark?it.darkSecondary:it.secondary,m=(l,d,p)=>{let b=`M${l},${o}l${-d*6},-5v10z`;n.append("path").attr("class",t.cls("off-scale")).attr("d",b).attr("fill",i).append("title").text(`${p} ${p===1?"value is":"values are"} ${(0)>(d)?"below":"above"} the axis range`)};(u.length?m(a(r)-2,-1,u.length):!1),(c.length?m(a(s)+2,1,c.length):!1)}function Br(t,n,a,o){let e=new Map,r=c=>((e.has(c)?!0:e.set(c,ft(t,[t.fmtValue(c)],12))),e.get(c)),s=0,u=0;for(let c=0;(4)>(c);c++){let i=0,m=0;for(let l of o.flat()){let d=n(l.v)+l.dx;l.anchor==="end"?i=Math.max(i,r(l.v)-d+2):m=Math.max(m,d+r(l.v)-a+2)}if(((.5)>=(i)?(.5)>=(m):!1))return;s=Math.min(a*.3,s+Math.max(0,i)),u=Math.min(a*.3,u+Math.max(0,m)),n.range([s,a-u])}}var Fe={paletteId:"",political:!1,background:"white",yFormat:{prefix:"",suffix:"",decimals:null},xFormat:{prefix:"",suffix:"",decimals:null},yFromZero:!0,yMin:null,yMax:null,valueLabels:!1,endDots:!0,imageFill:null,width:"column",height:400,yLabel:"",xLabel:"",highlight:null,legend:"top",xFromZero:!1,xMin:null,xMax:null,rightAxis:[],rightFormat:{prefix:"",suffix:"",decimals:null},rightLabel:"",rightFromZero:!0,donutHole:!0,partners:[],titleFont:"sans",swatch:"pebble",map:{method:"rounded",classes:5,breaks:[],palette:"seq-orange",reverse:!1,midpoint:null,continuous:!1,labels:!0,symbolMax:18,noDataLabel:"No data",thresholds:[],stops:[],colors:[],domain:null,categories:[],sizeTicks:[],projection:"equal-earth",sphere:!1,graticule:!1,center:[-30,20]}};var Nn=600;function Rn(t){var n;return{...t,style:{...Fe,...t.style,map:{...Fe.map,...(n=t.style)==null?void 0:n.map}}}}function In(t,n){var e;if(!n.size)return Le(t);let a=t.type==="combo"?t.data.series.flatMap((r,s)=>n.has(r.key)?s===0?[{...r,values:r.values.map(()=>null)}]:[]:[r]):t.data.series.filter(r=>!n.has(r.key)),o=(e=t.data.points)==null?void 0:e.filter(r=>{var s,u;return!n.has((u=r.group)!=null?u:(s=t.data.series[0])==null?void 0:s.key)});return Le({...t,data:{...t.data,series:a,points:o}})}function Le(t){if((t.type!=="line"?t.type!=="combo":!1))return t;let n=t.data.series.filter(s=>s.values.some(u=>u!==null));if((!n.length?!0:!n.every(s=>s.axis==="right")))return t;let a=t.data.series.map(s=>({...s,axis:"left"})),o=t.style,e=__gvOr(o.rightLabel,()=>((Hr(o.yFormat,o.rightFormat)?o.yLabel:""))),r={...o,yFormat:o.rightFormat,yFromZero:o.rightFromZero,yMin:null,yMax:null,yLabel:e,rightLabel:""};return{...t,style:r,data:{...t.data,series:a}}}function zr(t){if((t.type!=="line"?t.type!=="combo":!1))return!1;let n=(a,o)=>(a.axis==="right"?((t.type==="line"?!0:o>0)):!1);return __gvAnd(t.data.series.some(n),()=>(t.data.series.some((a,o)=>!n(a,o))))}function Or(t,n){return["bar","donut","dot","slope"].includes(t)?10:n?34:18}function Hr(t,n){var a,o;return __gvAnd(__gvAnd((t.prefix===n.prefix?t.suffix===n.suffix:!1),()=>(t.decimals===n.decimals)),()=>(((a=t.multiply)!=null?a:1)===((o=n.multiply)!=null?o:1)))}function jr(t,n,a,o=null){var L,A,D,C;let e=Rn(n),r=o?_e(o):null,s=new Set,u=`gv-${e.slug}`,c=P=>`${u}__${P}`,i=t.querySelector(`.${c("chart")}`),m=t.querySelector(`.${c("legend")}`),l=Ue(i,c("tooltip")),d=-1,p,b=0;(m==null?!0:m.addEventListener("click",P=>{let $=P.target.closest("[data-key]"),I=$==null?void 0:$.dataset.key;(I!==void 0?(s.has(I)?s.delete(I):((e.data.series.length-1)>(s.size)?s.add(I):!1),y()):!1)}));let y=()=>{var M,X,R,tt,J;b=0;let P=Math.floor(i.clientWidth);if((0)>=(P))return;let $=e.style.background==="white"?be(t):{color:null,dark:!1},I=$.dark;t.classList.toggle(`${u}--dark`,I),$.color?t.style.setProperty("--gv-halo",$.color):t.style.removeProperty("--gv-halo"),d=P,p=$.color;let O=(Nn)>(t.clientWidth);((M=i.querySelector("svg"))==null?!0:M.remove());let K=i.ownerDocument.createElementNS("http://www.w3.org/2000/svg","svg");i.insertBefore(K,i.firstChild);let at=a.select(K).attr("class",c("svg")).attr("width",P).attr("aria-hidden","true"),rt=Ae(e.type),st=rt?400:O?Math.min(e.style.height,360):e.style.height;at.attr("height",st);let U=In(e,s),Y=U.style.yFormat,_=U.style.rightFormat,k=_t(a,Y.prefix,Y.suffix,Y.decimals,Y.multiply),h=_t(a,_.prefix,_.suffix,_.decimals,_.multiply),v=_t(a,"","",Y.decimals,Y.multiply),G=T=>k.value(T),V=T=>v.value(T),z={d3:a,spec:U,base:u,root:t,chartEl:i,svg:at,width:P,height:st,mobile:O,dark:I,page:$.color,margin:{top:Or(e.type,!!((U.style.yLabel?!0:U.style.rightLabel))),right:14,bottom:30,left:40},id:T=>`${u}-${T}`,cls:c,fmtAxis:T=>G(T),fmtAxisBare:T=>V(T),setAxis:(T,lt)=>{let dt=U.style.yScale==="symlog"?{...Y,decimals:0}:Y;G=Lt(a,dt,T,lt),V=Lt(a,{...dt,prefix:"",suffix:""},T,lt)},fmtValue:k.value,fmtRightValue:h.value,rightAxis:(T,lt)=>Lt(a,_,T,lt),fmtFor:T=>T.axis==="right"?h.value:k.value,fmtX:qe(a,e,O),xAxis:(T,lt)=>Lt(a,e.style.xScale==="symlog"?{...e.style.xFormat,decimals:0}:e.style.xFormat,T,lt),color:T=>ct(U,T,I),tooltip:l,rightTitleY:14},Q=(rt?r:!1)?rn(r,e):r;rt?(Q?sn(z,m,e,Q):!1):ln(z,m,e,s);let j=__gvAnd(__gvAnd(__gvAnd((!rt?e.type!=="bar":!1),()=>(e.type!=="donut")),()=>(e.type!=="dot")),()=>(e.type!=="slope"));if((((j?U.style.yLabel:!1)?U.style.rightLabel:!1)?zr(U):!1)){let[T,lt]=[U.style.yLabel,U.style.rightLabel].map(dt=>ft(z,[dt],12));(T+lt+16>P?(z.rightTitleY=30,z.margin.top+=16):!1)}((U.style.yLabel?j:!1)?at.append("text").attr("class",c("axis-title")).attr("x",0).attr("y",14).text(U.style.yLabel):!1);try{let T=e.type;if(rt){if((!r?!0:r.id!==((X=e.data.map)==null?void 0:X.geo)))throw new Error("map geography missing");at.attr("height",an(z,Q))}else (T==="line"?!0:T==="area")?bn(z):((T==="column"?!0:T==="stacked")?!0:T==="combo")?Ln(z):T==="bar"?at.attr("height",(R=En(z))!=null?R:st):T==="scatter"?Pn(z):T==="donut"?at.attr("height",(tt=Gn(z))!=null?tt:st):T==="slope"?Vn(z):(T==="dot"?at.attr("height",(J=_n(z))!=null?J:st):!1);dn(z)}catch(T){at.selectAll("*").remove(),at.append("text").attr("class",c("ticks")).attr("x",0).attr("y",20).text("Chart could not be drawn."),console.error("[gristviz]",T)}},g=()=>{(b?!0:(b=requestAnimationFrame(y)))},w=new ResizeObserver(()=>{(Math.floor(i.clientWidth)!==d?g():!1)});w.observe(i);let B=()=>{((e.style.background==="white"?be(t).color!==p:!1)?g():!1)},F=new MutationObserver(B),E=t.ownerDocument;F.observe(E.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme"]}),(E.body?F.observe(E.body,{attributes:!0,attributeFilter:["class","style","data-theme"]}):!1);let H=(A=(L=E.defaultView)==null?void 0:L.matchMedia)==null?void 0:A.call(L,"(prefers-color-scheme: dark)");return((D=H==null?void 0:H.addEventListener)==null?!0:D.call(H,"change",B)),y(),((C=E.fonts)==null?!0:C.ready.then(()=>g())),{update(P){e=Rn(P);for(let $ of[...s])(e.data.series.some(I=>I.key===$)?!0:s.delete($));y()},destroy(){var P;w.disconnect(),F.disconnect(),l.destroy(),((P=H==null?void 0:H.removeEventListener)==null?!0:P.call(H,"change",B)),(b?cancelAnimationFrame(b):!1)}}}return Xn(qr);})(); function run(d3){var el=document.getElementById(ID);if(el)__gvRuntime.mount(el,SPEC,d3,GEO);} function fail(){var el=document.getElementById(ID);var c=el?el.querySelector("."+ID+"__chart"):null;if(c)c.textContent="This chart could not load. Try refreshing the page.";} function loadD3(){return new Promise(function(res,rej){ var s=document.createElement("script"),page=window.d3,mine,trap=false; try{Object.defineProperty(window,"d3",{configurable:true,enumerable:true, get:function(){return document.currentScript===s?mine:page;}, set:function(v){if(document.currentScript===s)mine=v;else page=v;}});trap=true;} catch(e){window.d3=undefined;} function settle(){if(trap){delete window.d3;if(page!==undefined)window.d3=page;}else{mine=window.d3;window.d3=page;}} s.src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.5/d3.min.js";s.integrity="sha384-su5kReKyYlIFrI62mbQRKXHzFobMa7BHp1cK6julLPbnYcCW9NIZKJiTODjLPeDh";s.crossOrigin="anonymous";s.async=true; s.onload=function(){settle();if(mine?mine.stack:!1)res(Object.assign({},mine));else rej(new Error("d3 did not load"));}; s.onerror=function(e){settle();rej(e);}; document.head.appendChild(s);});} var started=false; function go(){ if(started)return;started=true; if(window.d3?window.d3.stack?/^7\./.test(window.d3.version?window.d3.version:""):!1:!1){run(window.d3);return;} if(!window.__gvD3)window.__gvD3=loadD3(); window.__gvD3.then(run,fail); } if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",go);else go(); })();

Many states are grappling with the ramifications of recent data-center buildouts. Because the Harvard study was limited to hyperscale facilities the authors could verify, its electricity-use estimates are likely undercounts. In Virginia, for example, the study’s 142 included facilities account for about 15 percent of the state’s electricity sales — itself a staggering sum. But Dominion Energy, the largest seller of electricity in the state, has estimated that data centers purchased 28 percent of the electricity its Virginia subsidiary sold last year.

Currently, there is no federal apparatus to track or check these figures, as surveys of utilities’ sales tend to label customer segments as merely residential, commercial, industrial, or transportation-related. In March, Senators Elizabeth Warren and Josh Hawley wrote to the EIA, arguing: “Without this data, policymakers, utility companies, and local communities are operating in the dark.” The Bipartisan American Affordability and Jobs Act, the infrastructure permitting bill currently under consideration in the Senate, would direct the agency to explicitly measure data-center electricity usage.

Hyperscale electricity can also be understood in terms of the plant-warming gases emitted during its generation. Together, the facilities catalogued by the Harvard researchers emit more annually than the carbon-dioxide equivalent of countries like Jordan, Kenya, and Guatemala. 

State context matters here, too, since emissions estimates depend on a given state’s grid, which vary by energy mix. The Nature Sustainability study’s authors used federal power-plant data to estimate the average per kilowatt-hour emissions for each confirmed data center. The resulting rates range from Washington’s hydropower-heavy 10 grams of carbon dioxide per kilowatt-hour to Virginia’s fossil-fuel-backed 325.

Read Next What’s behind your eye-popping power bill? We broke it down, region by region. &

Yet even grid averages fail to capture the growing phenomenon of on-site power plants. Frequently gas-fired, these generators are built at or near hyperscale campuses to generate electricity directly for the data centers themselves. Electricity usage from on-site power can be harder to measure, given it is often “behind the meter” — that is, the electrons might never touch a public grid. As of June, about 2 GW of gas generators powered four data centers around the country, including Elon Musk’s xAI sites in Memphis, Tennessee. There are 143 GW of gas plants currently proposed to power data centers around the United States, according to the Environmental Integrity Project (EIP), a watchdog group. 

Most of this proposed on-site power could push the hyperscale buildout outside the Harvard study’s map. West Virginia, for example, hosts exactly zero of the data-center campuses confirmed by the Nature Sustainability study. Yet the state is second only to Texas in proposed on-site gas capacity, with more than 15 GW tagged by EIP.

If built, these projects could reshape the geography of U.S. data centers — and make their electricity use less visible in utility-sales and grid-demand data. Behind-the-meter power doesn’t show up as utility purchases.

.gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c{--gv-text:#3C3830;--gv-text-2:#6B665E;--gv-grid:#E6E3DD;--gv-halo:#FFFFFF;--gv-axis:#3C3830;box-sizing:border-box;position:relative;width:100%;text-align:left;font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-weight:500;font-size:16px;line-height:1.3;color:var(--gv-text);margin-top:1.5rem!important;margin-bottom:1.5rem!important;padding:0;letter-spacing:normal;word-break:normal} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c *{box-sizing:border-box} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c div,.gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c span{margin:0;padding:0;font-size:inherit;line-height:inherit} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c.gv-dc-gas-vs-fleet-w37k6c--dark{--gv-text:#F0EDE6;--gv-text-2:#B3ADA3;--gv-grid:#3A3732;--gv-halo:#1C1B19;--gv-axis:#B3ADA3} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__header{margin:0 0 16px} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__title{font-family:"PolySans", Arial, sans-serif;font-weight:500;font-size:25px;line-height:1.15;letter-spacing:-0.018em;margin:10px 0 8px;padding:0;color:var(--gv-text);text-transform:none} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__subtitle{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-weight:500;font-size:16px;line-height:1.4;margin:0;padding:0;color:var(--gv-text-2);text-wrap:pretty} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__hl{font-weight:700} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c.gv-dc-gas-vs-fleet-w37k6c--dark .gv-dc-gas-vs-fleet-w37k6c__hl[style*="--gv-hl-dk"]{color:var(--gv-hl-dk)!important} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c.gv-dc-gas-vs-fleet-w37k6c--dark .gv-dc-gas-vs-fleet-w37k6c__hl--dk-primary{color:#F0EDE6!important} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c.gv-dc-gas-vs-fleet-w37k6c--dark .gv-dc-gas-vs-fleet-w37k6c__hl--dk-muted{color:#6B665E!important} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 18px;margin:-4px 0 12px;padding:0;font-size:14px;line-height:1.2;color:var(--gv-text)} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__legend-item,.gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__legend-item:hover,.gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__legend-item:focus,.gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__legend-item:active{display:inline-flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:7px;font:inherit;color:inherit;background:none;border:0;padding:2px 0;margin:0;line-height:1.2;text-align:left;cursor:default;box-shadow:none;text-transform:none;letter-spacing:normal;border-radius:0;min-height:0;min-width:0;height:auto;width:auto;text-decoration:none} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c button.gv-dc-gas-vs-fleet-w37k6c__legend-item,.gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c button.gv-dc-gas-vs-fleet-w37k6c__legend-item:hover{cursor:pointer} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c button.gv-dc-gas-vs-fleet-w37k6c__legend-item:hover{text-decoration:underline;text-underline-offset:3px} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c button.gv-dc-gas-vs-fleet-w37k6c__legend-item:focus-visible{outline:2px solid #3977F3;outline-offset:2px} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__legend-item--off{opacity:0.35} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__map-label{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:11px;font-weight:500;letter-spacing:0.02em} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__legend-label{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:12px;fill:var(--gv-text-2)} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__legend-key{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:14px;fill:var(--gv-text)} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__place{cursor:default} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__legend-axis{font-size:11px;color:var(--gv-text-2);margin-left:2px} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__swatch{display:block;flex:none;overflow:visible} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__chart{position:relative;width:100%;margin:0;padding:0} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c svg.gv-dc-gas-vs-fleet-w37k6c__svg{display:block;overflow:visible;max-width:none;height:auto} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c svg text{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-weight:500;font-size:14px;fill:var(--gv-text);letter-spacing:normal} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__ticks text{font-size:12px;fill:var(--gv-text-2);font-variant-numeric:tabular-nums} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__ticks--y text{paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:4px;stroke-linejoin:round;pointer-events:none} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__cat-labels text{fill:var(--gv-text)} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__grid line{stroke:var(--gv-grid);shape-rendering:crispEdges} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__baseline{stroke:var(--gv-axis);stroke-width:1.25;shape-rendering:crispEdges} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__zero{stroke:#888888;stroke-width:1;stroke-dasharray:4 4} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__line{fill:none;stroke-linecap:round;stroke-linejoin:round} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__line-halo{fill:none;stroke:var(--gv-halo);stroke-width:7;stroke-linecap:round;stroke-linejoin:round} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__segment{stroke:var(--gv-halo);stroke-width:1} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__point{fill-opacity:0.85;stroke:var(--gv-halo);stroke-width:1} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__ring{fill:none;stroke:var(--gv-text);stroke-width:1.5} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__dot{stroke:var(--gv-halo);stroke-width:1.7} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__dot--pulse{transform-box:fill-box;transform-origin:center;animation:gv-dc-gas-vs-fleet-w37k6c-pulse 1.6s ease-in-out infinite} @keyframes gv-dc-gas-vs-fleet-w37k6c-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.2)}} @media (prefers-reduced-motion:reduce){.gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__dot--pulse{animation:none}} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__value-label{font-size:12px;paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__axis-title{font-size:12px;fill:var(--gv-text-2)} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__direct-label{font-size:13px;font-weight:700;paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__donut-title{font-size:16px;font-weight:700;fill:var(--gv-text)} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__slice{stroke:var(--gv-halo);stroke-width:1.5} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__slice-label{font-size:14px;font-weight:700;fill:#FFFFFF;paint-order:stroke fill;stroke:rgba(0,0,0,0.25);stroke-width:2px;pointer-events:none} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__slope-head{font-size:14px;font-weight:700;fill:var(--gv-text)} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__slope-axis{stroke:var(--gv-grid);stroke-width:1} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__slope-line{stroke-linecap:round} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__slope-label{fill:var(--gv-text);paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__dumbbell{stroke:#C9C5BD;stroke-width:3;stroke-linecap:round} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c.gv-dc-gas-vs-fleet-w37k6c--dark .gv-dc-gas-vs-fleet-w37k6c__dumbbell{stroke:#6B665E} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__cat-label{fill:var(--gv-text)} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__overlay{fill:transparent;pointer-events:all} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__rule{stroke:var(--gv-text-2);stroke-width:1;stroke-dasharray:2 3} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__tooltip{position:absolute;display:none;pointer-events:none;z-index:5;min-width:150px;max-width:260px;padding:9px 12px 10px;background:#FFFFFF;border:1.5px solid #3C3830;border-radius:6px;box-shadow:3px 3px 0 #3C3830;font-size:13px;line-height:1.35;color:#3C3830} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c.gv-dc-gas-vs-fleet-w37k6c--dark .gv-dc-gas-vs-fleet-w37k6c__tooltip{background:#2A2824;border-color:#F0EDE6;box-shadow:3px 3px 0 #F0EDE6;color:#F0EDE6} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__tip-title{font-family:"PolySans", Arial, sans-serif;font-weight:500;font-size:14px;margin:0 0 5px} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__tip-row{display:flex;align-items:center;gap:8px;font-variant-numeric:tabular-nums} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__tip-row svg{display:block;flex:none;overflow:visible} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__tip-row i{display:block;flex:none;width:10px;height:10px;border-radius:2px} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__tip-row span{flex:1;color:var(--gv-text-2)} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__tip-row b{font-weight:700;white-space:nowrap} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__tip-more{color:var(--gv-text-2);font-size:12px;margin-top:2px} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__note{color:var(--gv-text-2);font-size:12px;font-style:italic;line-height:1.35;margin:8px 0 0;padding:0} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__footer{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:14px 0 0;padding:10px 0 0;border-top:1px solid var(--gv-grid)} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__credits{display:flex;flex-direction:column} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__source{color:var(--gv-text-2);font-size:12px;line-height:1.35;display:inline-block} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__credit{color:var(--gv-text-2);font-size:12px;font-style:italic;font-weight:700;line-height:1.35;margin-top:3px;display:inline-block} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__credit .gv-dc-gas-vs-fleet-w37k6c__credit-link{color:inherit;font:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px;border:0;box-shadow:none;background:none} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__logo{display:block;height:auto;max-width:46px;min-width:40px;width:46px;margin:0 0 0 auto;padding:0;transform:translateY(-2px);overflow:visible} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__logo path{fill:var(--gv-text)} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__logos{display:flex;align-items:center;gap:14px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__logos .gv-dc-gas-vs-fleet-w37k6c__logo{margin:0} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__partner{display:block;margin:0;padding:0;border:0;line-height:0} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__partner img{display:block;height:22px;width:auto;max-width:110px;margin:0;padding:0;border:0;box-shadow:none;object-fit:contain} .gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c.gv-dc-gas-vs-fleet-w37k6c--dark .gv-dc-gas-vs-fleet-w37k6c__partner--invert img{filter:brightness(0) invert(1)} @media (max-width:600px){.gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__title{font-size:21px}.gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__subtitle{font-size:15px}.gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__legend{font-size:13px}.gv-dc-gas-vs-fleet-w37k6c#gv-dc-gas-vs-fleet-w37k6c .gv-dc-gas-vs-fleet-w37k6c__logo{width:42px}} Most gas proposed for data centers is in states with little hyperscale capacity today Existing data-center capacity and gas proposed to power data centers directly, gigawatts by state Logarithmic scale. Proposed gas is each plant’s full capacity, including plants that would also sell power to the grid, as of April 30, 2026. Source: Environmental Integrity Project / Guidi et al. (2026) Clayton Aldern / Grist (function(){ var K="__gv_dc_gas_vs_fleet_w37k6c_initialized__";if(window[K])return;window[K]=true; var ID="gv-dc-gas-vs-fleet-w37k6c"; var SPEC={"version":1,"slug":"dc-gas-vs-fleet-w37k6c","type":"scatter","data":{"xKind":"number","x":[],"series":[{"key":"More proposed gas than existing capacity","label":"More proposed gas than existing capacity","color":"#F79945","values":[]},{"key":"More existing capacity than proposed gas","label":"More existing capacity than proposed gas","color":"#3977F3","values":[]}],"points":[{"x":0.907,"y":63.153,"group":"More proposed gas than existing capacity","label":"TX"},{"x":0,"y":15.516,"group":"More proposed gas than existing capacity","label":"WV"},{"x":1.739,"y":14.005,"group":"More proposed gas than existing capacity","label":"OH"},{"x":0.048,"y":13.711,"group":"More proposed gas than existing capacity","label":"PA"},{"x":0.25,"y":13.021,"group":"More proposed gas than existing capacity","label":"UT"},{"x":0.242,"y":6.989,"group":"More proposed gas than existing capacity","label":"WY"},{"x":0.23,"y":6.069,"group":"More proposed gas than existing capacity","label":"NM"},{"x":0.695,"y":3,"group":"More proposed gas than existing capacity","label":"NE"},{"x":0.396,"y":2.4,"group":"More proposed gas than existing capacity","label":"NC"},{"x":0,"y":2.3,"group":"More proposed gas than existing capacity","label":"IN"},{"x":0,"y":1.24,"group":"More proposed gas than existing capacity","label":"MS"},{"x":0.57,"y":0.5,"group":"More existing capacity than proposed gas","label":"OK"},{"x":4.211,"y":0.215,"group":"More existing capacity than proposed gas","label":"VA"},{"x":1.411,"y":0,"group":"More existing capacity than proposed gas","label":"IA"},{"x":2.19,"y":0,"group":"More existing capacity than proposed gas","label":"OR"}],"groupColors":{"More proposed gas than existing capacity":"#F79945","More existing capacity than proposed gas":"#3977F3"}},"text":{"title":"Most gas proposed for data centers is in states with little hyperscale capacity today","subtitle":"Existing data-center capacity and gas proposed to power data centers directly, gigawatts by state","note":"Logarithmic scale. Proposed gas is each plant’s full capacity, including plants that would also sell power to the grid, as of April 30, 2026.","source":"Environmental Integrity Project / Guidi et al. (2026)","credit":"Clayton Aldern","altText":"Scatter plot of existing hyperscale capacity and proposed gas capacity by state. Texas has 0.9 gigawatts of existing hyperscale capacity and 63 gigawatts of gas proposed to power data centers directly. West Virginia has none covered by Guidi et al. (2026) and 15.5 proposed; Pennsylvania 0.05 and 13.7; Utah 0.25 and 13.0. Virginia has 4.2 gigawatts existing and 0.2 proposed."},"style":{"paletteId":"pair-tc","political":false,"background":"white","yFormat":{"prefix":"","suffix":" GW","decimals":null},"xFormat":{"prefix":"","suffix":" GW","decimals":null},"yFromZero":true,"yMin":null,"yMax":null,"valueLabels":false,"endDots":true,"imageFill":null,"width":"column","height":400,"yLabel":"Gas proposed for data centers","xLabel":"Existing hyperscale data center capacity","highlight":null,"legend":"top","xFromZero":false,"xMin":null,"xMax":null,"rightAxis":[],"rightFormat":{"prefix":"","suffix":"","decimals":null},"rightLabel":"","rightFromZero":true,"donutHole":true,"partners":[],"titleFont":"sans","swatch":"dot","map":{"method":"rounded","classes":5,"breaks":[],"palette":"seq-orange","reverse":false,"midpoint":null,"continuous":false,"labels":true,"symbolMax":18,"noDataLabel":"No data","thresholds":[],"stops":[],"colors":[],"domain":null,"categories":[],"sizeTicks":[],"projection":"equal-earth","sphere":false,"graticule":false,"center":[-30,20]},"xScale":"symlog","yScale":"symlog","refLine":{"slope":1,"label":"Equal amounts"},"tooltip":{"hideKeys":true,"hideRows":["More proposed gas than existing capacity","More existing capacity than proposed gas"]}},"meta":{"toolVersion":"0.4.0","createdAt":"","updatedAt":"","fallbackPngUrl":"","review":null}}; var GEO=null; function __gvOr(a,b){return a?a:b()};function __gvAnd(a,b){return a?b():a};function __gvLe(a,b){return b>=a};function __gvLt(a,b){return b>a};var __gvRuntime=(()=>{var he=Object.defineProperty;var zn=Object.getOwnPropertyDescriptor;var On=Object.getOwnPropertyNames;var Hn=Object.prototype.hasOwnProperty;var jn=(t,n)=>{for(var a in n)he(t,a,{get:n[a],enumerable:!0})},qn=(t,n,a,o)=>{if(((n?typeof n=="object":!1)?!0:typeof n=="function"))for(let e of On(n))((!Hn.call(t,e)?e!==a:!1)?he(t,e,{get:()=>n[e],enumerable:(!(o=zn(n,e))?!0:o.enumerable)}):!1);return t};var Xn=t=>qn(he({},"__esModule",{value:!0}),t);var qr={};jn(qr,{MOBILE_BREAKPOINT:()=>Nn,mount:()=>jr,primaryAxis:()=>Le,visible:()=>In});var Wn=["map-states","map-counties","map-world","map-dots"];function Ae(t){return Wn.includes(t)}var De=["line","slope"];var Yn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",Zn=new Map([...Yn].map((t,n)=>[t,n])),Kn=10;function fe(t){let n=[],a=0,o=1;for(let e of t){let r=Zn.get(e);if(r===void 0)throw new Error("Unreadable map geography");a+=r%32*o,r>=32?o*=32:(n.push(a%2?-(a+1)/2:a/2),a=0,o=1)}return n}function Un(t,n){let a=fe(t),o=[],e=0,r=0,s=0;for(;(a.length)>(e);){let u=a[e++],c=[];for(let i=0;(u)>(i);i++)r+=a[e++],s+=a[e++],c.push([r/n,s/n]);o.push(c)}return o}function Pe(t,n){let a=[];return n.forEach((o,e)=>{let r=o>=0?t[o]:[...t[-o-1]].reverse();for(let s=e?1:0;(r.length)>(s);s++)a.push(r[s])}),a}var Ge=t=>String(Math.round(t*10)/10),Ve=(t,n)=>t.length?`M${t.map(([a,o])=>`${Ge(a)} ${Ge(o)}`).join("L")}${n?"Z":""}`:"";function Qn(t){var e;let n=0,a=0,o=0;for(let r=0,s=t.length-1;(t.length)>(r);s=r++){let u=t[s][0]*t[r][1]-t[r][0]*t[s][1];n+=u,a+=(t[s][0]+t[r][0])*u,o+=(t[s][1]+t[r][1])*u}return n?{area:n/2,c:[a/(3*n),o/(3*n)]}:{area:0,c:(e=t[0])!=null?e:null}}function _e(t){var d;let n=Un(t.arcs,(d=t.q)!=null?d:Kn),a=!!t.sphere,o=fe(t.geoms),e=0,r=0,s=t.ids.map((p,b)=>{var E,H,L;let y=o[e++],g="",w=null,B=-1,F=[];for(let A=0;(y)>(A);A++){let D=o[e++],C=[];F.push(C);for(let P=0;(D)>(P);P++){let $=o[e++],I=[];for(let K=0;($)>(K);K++)r+=o[e++],I.push(r);let O=Pe(n,I);if(a){C.push(O);continue}if(g+=Ve(O,!0),P===0){let{area:K,c:at}=Qn(O);(Math.abs(K)>B?(B=Math.abs(K),w=at):!1)}}}return{id:p,name:(E=t.names[b])!=null?E:p,code:(L=(H=t.codes)==null?void 0:H[b])!=null?L:"",d:g,anchor:w,...a?{polygons:F}:{}}}),u=p=>{var F;let b=fe(p),y=0,g=0,w=[],B=(F=b[y++])!=null?F:0;for(let E=0;(B)>(E);E++){let H=b[y++],L=[];for(let A=0;(H)>(A);A++)g+=b[y++],L.push(g);w.push(Pe(n,L))}return w},[c,i,m]=[u(t.inner),u(t.outer),u(t.group)],l=p=>a?"":p.map(b=>Ve(b,!1)).join("");return{id:t.id,w:t.w,h:t.h,features:s,inner:l(c),outer:l(i),group:l(m),...a?{sphere:!0,lines:{inner:c,outer:i,group:m}}:{}}}var yt={orange:"#F79945",turquoise:"#12A07F",fuchsia:"#AC00E8",azure:"#3977F3",earth:"#3C3830",red:"#F5515B"},it={primary:"#3C3830",secondary:"#6B665E",grid:"#E6E3DD",muted:"#C9C5BD",darkPrimary:"#F0EDE6",darkSecondary:"#B3ADA3",darkGrid:"#3A3732",darkMuted:"#6B665E"},Ie={white:"#FFFFFF",smog:"#F0F0F0",lavender:"#D3C8FF",celery:"#E6FFA0",sky:"#C5E0F7",butter:"#FFF1C7",blush:"#FFD6DA"};function Re(t,n,a){let o=t.replace("#",""),e=n.replace("#","");return`#${[0,2,4].map(s=>{let u=parseInt(o.slice(s,s+2),16),c=parseInt(e.slice(s,s+2),16);return Math.round(u+(c-u)*a).toString(16).padStart(2,"0")}).join("")}`.toUpperCase()}var Ft=yt;var qt="#D9D7D2",Xt="#3A3733",Be="#EDEBE6",ze="#2E2B28",Ne="#F5EDDA",Jn="#EF6C4A",Kt=t=>[Re(t,"#FFFFFF",.8),t.toUpperCase(),Re(t,"#000000",.45)],Zr=[{id:"seq-orange",label:"Orange",kind:"sequential",stops:Kt(Ft.orange)},{id:"seq-turquoise",label:"Turquoise",kind:"sequential",stops:Kt(Ft.turquoise)},{id:"seq-azure",label:"Azure",kind:"sequential",stops:Kt(Ft.azure)},{id:"seq-fuchsia",label:"Fuchsia",kind:"sequential",stops:Kt(Ft.fuchsia)},{id:"div-turquoise-coral",label:"Turquoise to coral",kind:"diverging",stops:[Ft.turquoise,Ne,Jn]},{id:"div-azure-orange",label:"Azure to orange",kind:"diverging",stops:[Ft.azure,Ne,Ft.orange]}];function be(t){let n=t.parentElement;for(;n;){let o=getComputedStyle(n).backgroundColor.match(/rgba?\(([\d.]+),\s*([\d.]+),\s*([\d.]+)(?:,\s*([\d.]+))?\)/);if((o?((o[4]===void 0?!0:parseFloat(o[4])>.5)):!1)){let e=(.299*+o[1]+.587*+o[2]+.114*+o[3])/255;return{color:`rgb(${o[1]},${o[2]},${o[3]})`,dark:(.5)>(e)}}n=n.parentElement}return{color:null,dark:!1}}function tr(t){return/^[A-Za-z]{2}/.test(t)?` ${t}`:t}function _t(t,n,a,o,e=1){let r=tr(a),s=(i,m)=>`${((0)>(i)?/[1-9]/.test(m):!1)?"\u2212":""}${n}${m}${r}`;return{axis:(i,m)=>{let l=i*e>=1e4,d=((m?m:1))*e,p=i*e,b=l?t.formatPrefix(`.${o!=null?o:t.precisionPrefix(d,p)}`,p):t.format(`,.${o!=null?o:t.precisionFixed(d)}f`);return y=>(l?y===0:!1)?s(0,"0"):s(y,b(Math.abs(y*e)).replace("G","B"))},value:i=>{let m=Math.abs(i*e),l=o===null?t.format(`,.${er(m)}~f`):t.format(`,.${o}f`);return s(i,l(m))}}}function er(t){return t>=100?0:t>=10?1:((t>=1?!0:t===0)?!0:!Number.isFinite(t))?2:Math.min(20,Math.max(2,Math.ceil(-Math.log10(t))+1))}function Lt(t,n,a,o){let[e,r]=a,s=t.tickStep(e,r,o);return _t(t,n.prefix,n.suffix,n.decimals,n.multiply).axis(Math.max(Math.abs(e),Math.abs(r)),s)}function je(t){let n=1/0,a=-1/0;for(let o of t)((n)>(o)?(n=o):!1),(o>a?(a=o):!1);return n===1/0?null:[n,a]}function qe(t,n,a){let{xKind:o,x:e}=n.data,r=n.style.xFormat;if(o==="year")return s=>String(s);if(o==="number"){let s=_t(t,r.prefix,r.suffix,r.decimals,r.multiply);return u=>s.value(Number(u))}if(o==="date"){let s=e.map(l=>String(l)),u=s.every(l=>l.endsWith("-01-01")),c=s.every(l=>l.endsWith("-01")),i=u?"%Y":c?a?"%b \u2019%y":"%b %Y":"%b %-d, %Y",m=t.utcFormat(i);return l=>m(l instanceof Date?l:new Date(String(l)+(String(l).length===10?"T00:00:00Z":"")))}return s=>String(s)}function Xe(t){return new Date(String(t)+"T00:00:00Z")}function nr(t,n){var a;return n?"#1A1A1A":(a=Ie[t.style.background])!=null?a:"#FFFFFF"}function ge(t){let n=t.replace("#",""),a=n.length===3?n.split("").map(o=>o+o).join(""):n.slice(0,6);return[0,2,4].map(o=>__gvOr(parseInt(a.slice(o,o+2),16),()=>(0)))}function rr([t,n,a]){return`#${[t,n,a].map(o=>Math.round(Math.max(0,Math.min(255,o))).toString(16).padStart(2,"0")).join("")}`.toUpperCase()}function Qt(t,n,a){let o=ge(t),e=ge(n);return rr(o.map((r,s)=>r+(e[s]-r)*a))}function Jt(t){let[n,a,o]=ge(t).map(e=>{let r=e/255;return (.03928)>=(r)?r/12.92:((r+.055)/1.055)**2.4});return .2126*n+.7152*a+.0722*o}function Vt(t,n){let[a,o]=[Jt(t),Jt(n)].sort((e,r)=>r-e);return(a+.05)/(o+.05)}function ar(t,n){if(!n)return t;let a=t.toUpperCase();return a===yt.earth?it.darkPrimary:a===it.muted.toUpperCase()?it.darkMuted:t}var Oe=.58,Ut=.45,or=.7,He=new Map;function sr(t,n){let a=`${t}|${n}`,o=He.get(a);if(o)return o;let e=Jt(t),r=0,s=1/0;for(let i=0;(206)>=(i);i++){let m=-Ut+i/206*(Ut+Oe),l=Math.abs(Jt((0)>(m)?Qt(n,"#FFFFFF",-m):Qt(n,"#000000",m))-e);((s)>(l)?([r,s]=[m,l]):!1)}let u=(r+Ut)/(Ut+Oe),c=Qt(n,"#FFFFFF",u*or);return He.set(a,c),c}function Et(t,n,a){var e;if(!a)return n;let o=(e=t.style.paletteId)!=null?e:"";if(o.startsWith("tonal-")){let r=yt[o.slice(6)];if(r)return sr(n,r)}return ar(n,a)}function ct(t,n,a){var o,e;return Et(t,(e=(o=t.data.series[n])==null?void 0:o.color)!=null?e:yt.orange,a)}function At(t,n,a,o=4.5){let e=nr(t,a);if(Vt(n,e)>=o)return n;let r=a?"#FFFFFF":"#000000";for(let s=.05;(1)>(s);s+=.05){let u=Qt(n,r,s);if(Vt(u,e)>=o)return u}return r}function te(t){return Vt("#FFFFFF",t)>=4.5?"#FFFFFF":Vt(it.primary,t)>=4.5?it.primary:Vt("#FFFFFF",t)>=Vt("#000000",t)?"#FFFFFF":"#000000"}var ye={w:975,h:610,scale:1300,x:487.5,y:305},ee=ye.scale,We=ye.x,Ye=ye.y,Ze=[[We+.29*ee,Ye+.17*ee],[We+.41*ee,Ye+.234*ee]];var ir="M11.3,4.9Q12.4,6.0 12.5,7.7Q12.5,9.5 10.5,10.1Q8.4,10.7 6.7,10.3Q4.9,9.8 3.5,9.2Q2.1,8.6 1.3,7.3Q0.6,6.0 0.9,4.5Q1.3,3.0 2.9,1.9Q4.4,0.8 6.3,1.2Q8.2,1.7 9.2,2.8Q10.1,3.9 11.3,4.9Z",lr="M0.6,7.2C4,3.9 10.5,3.1 17.4,4.4C18.6,4.6 18.7,6.1 17.6,6.3C11.8,7 6.2,8.6 1.7,9.1C0.4,9.3 -0.1,7.9 0.6,7.2Z",Ke={pebble:[13,12],brush:[19,12],dot:[12,12]};function ne(t,n,a="",o=!1){var c;let[e,r]=(c=Ke[t])!=null?c:Ke.pebble,s=i=>`\x3csvg${a?` class="${a}"`:""} width="${i}" height="${r}" viewBox="0 0 ${i} ${r}" aria-hidden="true">`;if(n==="transparent")return`${s(e)}\x3c/svg>`;if(o)return`${s(22)}\x3cline x1="1.5" x2="20.5" y1="6" y2="6" stroke="${n}" stroke-width="3" stroke-linecap="round" stroke-dasharray="5 4"/>\x3c/svg>`;if(t==="dot")return`${s(e)}\x3ccircle cx="6" cy="6" r="5.5" fill="${n}" fill-opacity="0.85"/>\x3c/svg>`;let u=t==="brush"?`\x3cpath d="${lr}" transform="rotate(-6 9 6.5)"`:`\x3cpath d="${ir}"`;return`${s(e)}${u} fill="${n}"/>\x3c/svg>`}function Ue(t,n){let a=t.querySelector(`.${n}`);(a?!0:(a=t.ownerDocument.createElement("div"),a.className=n,a.setAttribute("role","presentation"),t.appendChild(a)));let o=a,e=null,r=null,s=()=>{o.style.display="none"},u=i=>{((i===r?!0:!e)?!0:(i.pointerType==="touch"?(e(),e=null):!1))},c=t.ownerDocument;return c.addEventListener("pointerdown",u),{show(i,m,l){o.innerHTML=i,o.style.display="block";let d=o.offsetWidth,p=o.offsetHeight,b=t.clientWidth,y=m+14;(y+d>b?(y=m-d-14):!1),((0)>(y)?(y=Math.max(0,Math.min(b-d,m-d/2))):!1),o.style.left=`${y}px`,o.style.top=`${Math.max(0,l-p-12)}px`},hide:s,bind(i,m,l){let d=()=>{(l==null?!0:l()),s()};i.on("pointermove.gvtip",(p,b)=>m(p,b)).on("pointerdown.gvtip",(p,b)=>{((p.pointerType!=="touch"?p.pointerType!=="pen":!1)?!0:(r=p,e=d,m(p,b)))}).on("pointerleave.gvtip",p=>{(p.pointerType!=="touch"?d():!1)})},destroy(){c.removeEventListener("pointerdown",u)}}}function wt(t){return t.replace(/[\x26\x3c>"]/g,n=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;",'"':"\x26quot;"})[n])}function Rt(t,n,a,o,e,r=!1){let s=c=>c.replace(/[\x26\x3c>]/g,i=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;"})[i]),u=e?ne(e,n,"",r):`\x3ci style="background:${n}">\x3c/i>`;return`\x3cdiv class="${t}">${u}\x3cspan>${s(a)}\x3c/span>\x3cb>${s(o)}\x3c/b>\x3c/div>`}function Wt(t,n,a,o,e=!1){var r,s;return((s=(r=t.spec.style.tooltip)==null?void 0:r.hideRows)!=null?s.includes(a):!1)?"":Qe(t,n,a,o,e)}function gt(t,n,a,o,e=!1){var c;let r=t.spec.style.tooltip;if(((c=r==null?void 0:r.hideRows)!=null?c.includes(a):!1))return"";let s=t.spec.data.series.length===1,u=((r!=null?r.hideSeriesName:!1)?s:!1)?"":(s?((r!=null?r.valueName:!1)):!1)?r.valueName:a;return Qe(t,n,u,o+Je(r==null?void 0:r.valueSuffix),e)}function Qe(t,n,a,o,e){var s;if(!(((s=t.spec.style.tooltip)!=null?s.hideKeys:!1)))return Rt(t.cls("tip-row"),n,a,o,t.spec.style.swatch,e);let r=u=>u.replace(/[\x26\x3c>]/g,c=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;"})[c]);return`\x3cdiv class="${t.cls("tip-row")}">\x3cspan>${r(a)}\x3c/span>\x3cb>${r(o)}\x3c/b>\x3c/div>`}function bt(t,n){var a;return`\x3cdiv class="${t.cls("tip-title")}">${wt(n+Je((a=t.spec.style.tooltip)==null?void 0:a.titleSuffix))}\x3c/div>`}function Je(t=""){return(!t?!0:/^[\s,.;:!?)\]]/.test(t))?t:` ${t}`}var tn=["VT","NH","MA","RI","CT","NJ","DE","MD","DC"],cr={CA:[80,318],FL:[790,534],ID:[192,163],KY:[703,315],LA:[562,460],MI:[683,199],NC:[816,350]},ur=560;function mr(t,n,a){var c,i,m;let o=t.style.map,e=n?Xt:qt,r=(i=(c=t.data.series[0])==null?void 0:c.values)!=null?i:[],s=(m=t.data.map)==null?void 0:m.categories;if(s){let l=new Map(o.categories.map(d=>[d.name,d.color]));return d=>{var p;return (s[d]!==null?s[d]!==void 0:!1)?(p=l.get(s[d]))!=null?p:it.muted:e}}if((o.continuous?o.stops.length>=2:!1)){let l=a.scaleLinear().domain(o.stops).range(o.colors).interpolate(a.interpolateLab).clamp(!0);return d=>(r[d]===null?!0:r[d]===void 0)?e:l(r[d])}if(!o.colors.length)return()=>e;let u=a.scaleThreshold().domain(o.thresholds).range(o.colors);return l=>(r[l]===null?!0:r[l]===void 0)?e:u(r[l])}function Nt(t,n){for(let[a,o]of Object.entries(n))t.style.setProperty(a,o,"important")}var pr=t=>{var o,e;let n=["th","st","nd","rd"],a=t%100;return`${t}${(e=(o=n[(a-20)%10])!=null?o:n[a])!=null?e:n[0]}`},en=new WeakMap;function dr(t,n){let a=t.width/n.w,o=n.features.map(e=>e.d).join("");return{height:Math.ceil(n.h*a),transform:`scale(${a})`,unit:1/a,d:e=>e.d,anchor:e=>e.anchor?[e.anchor[0]*a,e.anchor[1]*a]:null,land:()=>o,inner:()=>n.inner,outer:()=>n.outer,group:()=>n.group,sphere:()=>"",graticule:()=>""}}function rn(t,n){var c;if((t.sphere?!0:((c=n.data.map)!=null?c.pr:!1)))return t;let[[a,o],[e,r]]=Ze,s=i=>{let[m,l]=i.split("L")[0].split(" ").map(Number);return __gvAnd(__gvAnd((m>=a?(e)>=(m):!1),()=>(l>=o)),()=>((r)>=(l)))},u=i=>i.split("M").filter(m=>(m?!s(m):m)).map(m=>`M${m}`).join("");return{...t,features:t.features.filter(i=>!i.id.startsWith("72")),inner:u(t.inner),outer:u(t.outer),group:u(t.group)}}function hr(t){let n=0;for(let a=0,o=t.length-1;(t.length)>(a);o=a++)n+=t[o][0]*t[a][1]-t[a][0]*t[o][1];return n}function fr(t){let n=a=>(a.length>=4?Math.abs(hr(a))>1e-6:!1);return t.features.map(a=>{var o;return{type:"MultiPolygon",coordinates:((o=a.polygons)!=null?o:[]).filter(e=>__gvAnd(e.length,()=>(n(e[0])))).map(e=>[e[0],...e.slice(1).filter(n)])}})}function nn(t,n,a,o=fr(n)){let{d3:e,spec:r}=t,s=r.style.map,u=s.projection==="globe",c={type:"GeometryCollection",geometries:o},i={type:"Sphere"},m,l;if(u)l=Math.min(t.width,ur),m=e.geoOrthographic().rotate([a[0],a[1]]).fitExtent([[4,4],[t.width-4,l-4]],i);else{let y=(s.sphere?!0:s.graticule)?i:c;m=e.geoEqualEarth().fitWidth(t.width,y),l=Math.ceil(e.geoPath(m).bounds(y)[1][1])+1}let d=e.geoPath(m),p=new Map(n.features.map((y,g)=>[y.id,o[g]])),b=y=>{var g;return(g=d({type:"MultiLineString",coordinates:y}))!=null?g:""};return{height:l,transform:null,unit:1,d:y=>{var g;return(g=d(p.get(y.id)))!=null?g:""},anchor:y=>{let g=d.centroid(p.get(y.id));return (Number.isFinite(g[0])?Number.isFinite(g[1]):!1)?g:null},land:()=>{var y;return(y=d(c))!=null?y:""},inner:()=>{var y,g;return b((g=(y=n.lines)==null?void 0:y.inner)!=null?g:[])},outer:()=>{var y,g;return b((g=(y=n.lines)==null?void 0:y.outer)!=null?g:[])},group:()=>{var y,g;return b((g=(y=n.lines)==null?void 0:y.group)!=null?g:[])},sphere:()=>{var y;return(((u?!0:s.sphere))?(y=d(i))!=null:!1)?y:""},graticule:()=>{var y;return (s.graticule?(y=d(e.geoGraticule10()))!=null:!1)?y:""}}}function an(t,n){var U,Y,_,k;let{d3:a,spec:o,svg:e}=t,r=o.data.map,s=o.style.map,u=(!!n.sphere?s.projection==="globe":!1),c=(U=s.center)!=null?U:[0,20],i=en.get(t.chartEl),m=((i?i.center[0]===c[0]:!1)?i.center[1]===c[1]:!1)?i:{center:c,rotate:[-c[0],-c[1]]};en.set(t.chartEl,m);let l=n.sphere?nn(t,n,m.rotate):dr(t,n),d=o.type==="map-dots",p=mr(o,t.dark,a),b=(_=(Y=o.data.series[0])==null?void 0:Y.values)!=null?_:[],y=new Map(r.ids.map((h,v)=>[h,v]).filter(([h])=>h!==null)),g=b.map((h,v)=>[h,v]).filter(([h])=>h!==null).sort((h,v)=>v[0]-h[0]),w=new Map;g.forEach(([h,v],G)=>w.set(v,(G>0?g[G-1][0]===h:!1)?w.get(g[G-1][1]):G+1));let B=(k=t.page)!=null?k:t.dark?"#1A1A1A":"#FFFFFF",F=(h,v,G)=>Nt(h,{fill:"none",stroke:v,"stroke-width":`${G}px`,"vector-effect":"non-scaling-stroke","stroke-linejoin":"round","pointer-events":"none"}),E=t.id("map-shadow"),H=l.unit;e.append("defs").append("filter").attr("id",E).attr("x","-5%").attr("y","-5%").attr("width","110%").attr("height","110%").append("feGaussianBlur").attr("stdDeviation",2.5*H);let L=e.append("g").attr("class",t.cls("map"));(l.transform?L.attr("transform",l.transform):!1);let A=L.append("path").attr("class",t.cls("shadow")).attr("filter",`url(#${E})`).attr("transform",`translate(${2*H},${2.5*H})`);Nt(A.node(),{fill:t.dark?"#000000":yt.earth,opacity:"0.25",stroke:"none","fill-rule":"evenodd","pointer-events":"none"});let D=L.append("path").attr("class",t.cls("sphere"));Nt(D.node(),{fill:u?t.dark?"#23282C":"#EEF3F6":"none",stroke:t.dark?it.darkMuted:it.muted,"stroke-width":"0.75px","pointer-events":"none"});let C=L.append("path").attr("class",t.cls("graticule"));F(C.node(),t.dark?it.darkGrid:it.grid,.5);let P=(h,v)=>{var z,Q;if(h===void 0)return`\x3cdiv class="${t.cls("tip-title")}">${wt(v)}\x3c/div>\x3cdiv class="${t.cls("tip-row")}">\x3cspan>No data\x3c/span>\x3c/div>`;let G=b[h],V=`\x3cdiv class="${t.cls("tip-title")}">${wt(o.data.x[h])}\x3c/div>`;(r.categories?(V+=Rt(t.cls("tip-row"),p(h),"Category",(z=r.categories[h])!=null?z:"None")):!1),(G!=null?(V+=Rt(t.cls("tip-row"),(r.categories?!0:d)?"transparent":p(h),o.data.series[0].label,t.fmtValue(G)),((!d?g.length>2:!1)?(V+=Rt(t.cls("tip-row"),"transparent","Rank",`${pr(w.get(h))} of ${g.length}`)):!1)):!1);for(let j of(Q=r.tips)!=null?Q:[])(j.values[h]?(V+=Rt(t.cls("tip-row"),"transparent",j.label,j.values[h])):!1);return V},$=L.append("g").selectAll("path").data(n.features).join("path").attr("class",t.cls("place")).each(function(h){let v=y.get(h.id);Nt(this,{fill:d?t.dark?ze:Be:v===void 0?t.dark?Xt:qt:p(v),stroke:"none","fill-rule":"evenodd"})}),I=L.append("path");F(I.node(),B,n.id==="us-counties"?.4:.75);let O=L.append("path");F(O.node(),B,1.2);let K=L.append("path").attr("class",t.cls("map-hover"));F(K.node(),t.dark?it.darkPrimary:yt.earth,1.5),K.style("display","none");let at=null;(d?!0:t.tooltip.bind(L,h=>{let v=h.target.__data__;if((!v?!0:!h.target.classList.contains(t.cls("place"))))return;let[G,V]=a.pointer(h,t.chartEl);at=v,K.attr("d",l.d(v)).style("display",null),t.tooltip.show(P(y.get(v.id),v.name),G,V)},()=>{at=null,K.style("display","none")}));let rt=()=>{};if(d){let h=s.domain?Math.max(Math.abs(s.domain[0]),Math.abs(s.domain[1])):0,v=s.symbolMax*Math.min(1,t.width/600)*(t.mobile?.8:1),G=R=>(R===null?!0:!h)?3.5:Math.max(1.5,v*Math.sqrt(Math.abs(R)/h)),V=new Map(n.features.map(R=>[R.id,R])),z=o.data.x.map((R,tt)=>({i:tt,r:G(b[tt])})).sort((R,tt)=>tt.r-R.r),Q=R=>r.categories?p(R):yt.turquoise,j=n.sphere?1:t.width/n.w,M=R=>{var T;let tt=(T=r.xy)==null?void 0:T[R];if(tt)return[tt[0]*j,tt[1]*j];let J=r.ids[R]?V.get(r.ids[R]):void 0;return J?l.anchor(J):null},X=e.append("g").selectAll("circle").data(z).join("circle").attr("class",t.cls("symbol")).attr("r",R=>R.r).each(function(R){Nt(this,{fill:Q(R.i),"fill-opacity":h?"0.78":"0.9",stroke:B,"stroke-width":"0.75px"})});rt=()=>X.each(function(R){var J,T;let tt=M(R.i);this.setAttribute("cx",String((J=tt==null?void 0:tt[0])!=null?J:0)),this.setAttribute("cy",String((T=tt==null?void 0:tt[1])!=null?T:0)),this.style.setProperty("display",tt?"":"none")}),t.tooltip.bind(X,(R,tt)=>{let[J,T]=a.pointer(R,t.chartEl);t.tooltip.show(P(tt.i,o.data.x[tt.i]),J,T)})}let st=()=>{A.attr("d",u?l.sphere():l.land()),D.attr("d",l.sphere()),C.attr("d",l.graticule()),$.attr("d",h=>l.d(h)),I.attr("d",l.inner()),O.attr("d",l.group()),(at?K.attr("d",l.d(at)):!1),rt()};if(st(),u){let h=Math.min(t.width,l.height)/2,v=a.drag().on("drag",G=>{let V=75/h;m.rotate=[m.rotate[0]+G.dx*V,Math.max(-85,Math.min(85,m.rotate[1]-G.dy*V))],l=nn(t,n,m.rotate),st()});e.call(v).style("touch-action","none").style("cursor","grab")}if((o.type==="map-states"?s.labels:!1)){let h=e.append("g").attr("class",t.cls("map-labels")).style("pointer-events","none"),v=n.features.map(j=>({f:j,a:l.anchor(j)})).filter(j=>!!j.a),G=v.filter(j=>tn.includes(j.f.code)).sort((j,M)=>j.a[1]-M.a[1]),V=(520)>(t.width),z=(j,M,X,R,tt)=>h.append("text").attr("class",t.cls("map-label")).attr("x",j).attr("y",M).attr("dy","0.35em").attr("text-anchor",X).style("fill",R).style("fill-opacity","0.8").text(tt),Q=t.width/n.w;for(let{f:j,a:M}of v){if((!j.code?!0:tn.includes(j.code)))continue;let X=y.get(j.id),R=cr[j.code],[tt,J]=R?[R[0]*Q,R[1]*Q]:M;z(tt,J,"middle",X===void 0?t.dark?it.darkPrimary:it.primary:te(p(X)),j.code)}if(!V){let j=t.width-16*Q,M=-1/0;for(let{f:X,a:R}of G){M=Math.max(R[1],M+14);let tt=h.append("line").attr("x1",R[0]).attr("y1",R[1]).attr("x2",j-14).attr("y2",M);Nt(tt.node(),{stroke:t.dark?it.darkMuted:it.secondary,"stroke-width":"0.75px"}),z(j,M,"end",t.dark?it.darkPrimary:it.primary,X.code)}}}return l.height}var Dt=8,Yt=2,xe=Yt+Dt+13,on=xe+5;function sn(t,n,a,o){var b,y,g,w,B,F,E,H;if(!n)return;let e=a.style.map,r=a.data.map,s=t.dark?it.darkSecondary:it.secondary,u=t.dark?Xt:qt,c=new Set(r.ids.filter(L=>L!==null)),i=(a.type!=="map-dots"?o.features.some(L=>!c.has(L.id)):!1),m=(L,A)=>`\x3cspan class="${t.cls("legend-item")}">\x3csvg class="${t.cls("swatch")}" width="12" height="12" aria-hidden="true">\x3crect width="12" height="12" rx="2" fill="${L}"/>\x3c/svg>${wt(A)}\x3c/span>`,l=i?m(u,__gvOr(e.noDataLabel,()=>("No data"))):"",d=L=>{if(!i)return{svg:"",width:0};let A=__gvOr(e.noDataLabel,()=>("No data")),D=Yt+Dt/2;return{svg:`\x3crect class="${t.cls("legend-nodata")}" x="${L}" y="${D-5}" width="10" height="10" rx="2" fill="${u}"/>\x3ctext x="${L+16}" y="${D}" dy="0.35em" class="${t.cls("legend-key")}">${wt(A)}\x3c/text>`,width:40+A.length*7.5}},p="";if(e.categories.length)p=e.categories.map(L=>m(L.color,L.name)).join("")+l;else if(a.type==="map-dots"){let L=e.domain?Math.max(Math.abs(e.domain[0]),Math.abs(e.domain[1])):0,A=e.symbolMax*Math.min(1,t.width/600)*(t.mobile?.8:1),D=C=>A*Math.sqrt(C/L);if((L?e.sizeTicks.length:!1)){let C=D(e.sizeTicks[e.sizeTicks.length-1]),P=C*2+7,$=[];[...e.sizeTicks].reverse().forEach((rt,st)=>$.push(Math.max(P-2*D(rt),st?$[st-1]+12:7)));let I=C*2+70,O=Math.max(P+3,$[$.length-1]+8),K=`stroke:${s} !important;fill:none !important`,at=[...e.sizeTicks].reverse().map((rt,st)=>{let U=P-2*D(rt);return`\x3ccircle cx="${C+1}" cy="${P-D(rt)}" r="${D(rt)}" style="${K};stroke-width:1px"/>\x3cpolyline points="${C+1},${U} ${C*2+4},${U} ${C*2+8},${$[st]}" style="${K};stroke-width:0.5px"/>\x3ctext x="${C*2+11}" y="${$[st]}" dy="0.35em" class="${t.cls("legend-label")}">${wt(t.fmtValue(rt))}\x3c/text>`}).join("");p=`\x3csvg width="${I}" height="${O}" aria-hidden="true">${at}\x3c/svg>`}}else if(((e.continuous?e.stops.length>=2:!1)?e.stops[0]!==e.stops[e.stops.length-1]:!1)){let L=Math.min(260,t.width-20),A=t.id("legend-grad"),D=e.colors.map(($,I)=>`\x3cstop offset="${I/(e.colors.length-1)*100}%" stop-color="${$}"/>`).join(""),C=[e.stops[0],e.stops.length===3?e.stops[1]:null,e.stops[e.stops.length-1]].map(($,I)=>$===null?"":`\x3ctext x="${I/2*L}" y="${xe}" text-anchor="${["start","middle","end"][I]}" class="${t.cls("legend-label")}">${wt(t.fmtValue($))}\x3c/text>`).join(""),P=d(L+24);p=`\x3csvg width="${L+P.width+4}" height="${on}" aria-hidden="true">\x3cdefs>\x3clinearGradient id="${A}">${D}\x3c/linearGradient>\x3c/defs>\x3crect class="${t.cls("legend-step")}" y="${Yt}" width="${L}" height="${Dt}" rx="${Dt/2}" fill="url(#${A})"/>${C}${P.svg}\x3c/svg>`}else if((e.colors.length===1?!0:((e.continuous?e.stops.length>=2:!1)?e.stops[0]===e.stops[e.stops.length-1]:!1))){let L=(y=(b=e.domain)==null?void 0:b[0])!=null?y:e.stops[0];p=(L===void 0?"":m(e.colors[0],t.fmtValue(L)))+l}else if(e.colors.length){let L=e.colors.length,A=(B=(w=(g=e.domain)==null?void 0:g[0])!=null?w:e.thresholds[0])!=null?B:0,D=(H=(E=(F=e.domain)==null?void 0:F[1])!=null?E:e.thresholds[e.thresholds.length-1])!=null?H:0,C=Lt(t.d3,a.style.yFormat,[A,D],Math.max(1,e.thresholds.length)),P=e.thresholds.map(U=>C(U)),$=Math.max(0,...P.map(U=>U.length))*7+6,I=Math.max($,Math.min(44,Math.floor((Math.min(320,t.width)-20)/L))),O=I*L,K=t.id("legend-clip"),at=e.colors.map((U,Y)=>`\x3crect class="${t.cls("legend-step")}" x="${Y*I}" y="${Yt}" width="${I}" height="${Dt}" fill="${U}"/>`).join(""),rt=P.map((U,Y)=>`\x3ctext x="${(Y+1)*I}" y="${xe}" text-anchor="middle" class="${t.cls("legend-label")}">${wt(U)}\x3c/text>`).join(""),st=d(O+24);p=`\x3csvg width="${O+st.width+4}" height="${on}" aria-hidden="true">\x3cdefs>\x3cclipPath id="${K}">\x3crect y="${Yt}" width="${O}" height="${Dt}" rx="${Dt/2}"/>\x3c/clipPath>\x3c/defs>\x3cg clip-path="url(#${K})">${at}\x3c/g>${rt}${st.svg}\x3c/svg>`}n.innerHTML=p,n.style.display=p?"":"none",n.removeAttribute("role"),n.removeAttribute("aria-label")}function Me(t){return t.replace(/[\x26\x3c>"]/g,n=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;",'"':"\x26quot;"})[n])}var gr=["line","area","column","bar","stacked","combo","dot","scatter"];function we(t){return (t.style.legend==="direct"?De.includes(t.type):!1)}function ln(t,n,a,o){var y,g,w,B;if(!n)return;let e=a,r=e.data.series,s=(y=e.style.legend)!=null?y:"top",u=()=>{n.innerHTML="",n.style.display="none",n.removeAttribute("role"),n.removeAttribute("aria-label")};if(((s==="none"?!0:s==="subtitle")?!0:we(e)))return u();let c=(F,E)=>ne(e.style.swatch,F,t.cls("swatch"),E),i=(F,E,H,L=!1)=>{let A=(H!==void 0?m:!1)?"button":"span",D=A==="button"?` type="button" data-key="${Me(H)}" aria-pressed="${!o.has(H)}" title="Show or hide ${Me(F)}"`:"",C=`${t.cls("legend-item")}${(H!==void 0?o.has(H):!1)?` ${t.cls("legend-item--off")}`:""}`;return`\x3c${A} class="${C}"${D}>${E}${Me(F)}${L?`\x3cspan class="${t.cls("legend-axis")}">right axis\x3c/span>`:""}\x3c/${A}>`},m=__gvAnd(__gvAnd(gr.includes(e.type),()=>(r.length>1)),()=>(!e.style.paletteId.startsWith("highlight"))),l=[];if(e.type==="donut"){let F=(g=e.data.categoryColors)!=null?g:[];l=e.data.x.map((E,H)=>i(String(E),c(re(e,F[H],t.dark))))}else if(e.type==="slope"){let F=e.style.paletteId;if(((F==="rise-fall"?!0:F==="rise-fall-azure")?!0:F==="political")){let E=(w=e.data.categoryColors)!=null?w:[],[H,L]=e.data.series,A=$=>E.find((I,O)=>__gvAnd(((H==null?void 0:H.values[O])!=null?(L==null?void 0:L.values[O])!=null:!1),()=>($(H.values[O],L.values[O])))),D=A(($,I)=>I>$),C=A(($,I)=>($)>(I)),P=A(($,I)=>I===$);l=[D?i("Rose",c(re(e,D,t.dark))):"",C?i("Fell",c(re(e,C,t.dark))):"",P?i("No change",c(re(e,P,t.dark))):""].filter(Boolean)}}else if((e.style.paletteId.startsWith("highlight")?r.length>1:!1)){let F=Math.max(0,r.findIndex(E=>E.key===e.style.highlight));l=[i(r[F].label,c(ct(e,F,t.dark))),i("All others",c(ct(e,F===0?1:0,t.dark)))]}else if(r.length>1){let F=__gvAnd(r.some(E=>E.axis==="right"),()=>(r.some(E=>E.axis!=="right")));l=r.map((E,H)=>i(E.label,c(ct(e,H,t.dark),E.dashed),E.key,(F?E.axis==="right":F)))}let d=l.join(""),p=n.ownerDocument.activeElement,b=(p?n.contains(p):!1)?(B=p.dataset)==null?void 0:B.key:void 0;if(n.innerHTML=d,n.style.display=l.length?"":"none",(m?l.length:!1)?(n.setAttribute("role","group"),n.setAttribute("aria-label","Series. Select to show or hide.")):(n.removeAttribute("role"),n.removeAttribute("aria-label")),b!==void 0){let F=[...n.querySelectorAll("[data-key]")].find(E=>E.dataset.key===b);((F?n.ownerDocument.activeElement!==F:!1)?F.focus():!1)}}function re(t,n,a){return Et(t,n!=null?n:it.muted,a)}function Zt(t,n,a,o={}){let e=t.svg.append("g").attr("class",t.cls("tick-probe")).attr("opacity",0),r=n.map(s=>{var c;let u=e.append("text").attr("class",(c=o.cls)!=null?c:null).style("font-size",`${a}px`).style("font-variant-numeric","tabular-nums").text(s);return (o.weight?u.style("font-weight",String(o.weight)):!1),Math.ceil(u.node().getComputedTextLength())});return e.remove(),r}function ft(t,n,a,o={}){return Math.max(0,...Zt(t,n,a,o))}function un(t,n){return n.ticks(t.mobile?4:5)}var It=12;function mn(t){let n=-1;for(let a=0;(t.length)>(a);a++){let o=(0)>(n)?1:Math.abs(t[a])-Math.abs(t[n]);(((o>0?!0:(o===0?t[a]>t[n]:!1)))?(n=a):!1)}return n}function pn(t,n){let a=mn(n);return n.map((o,e)=>e===a?t.fmtAxis(o):t.fmtAxisBare(o))}function $t(t,n){return t?n?[Math.min(t[0],n[0]),Math.max(t[1],n[1])]:t:n}function Pt(t,n,a){let o=un(t,n);if(!o.length)return 10;let e=Zt(t,pn(t,o),It),r=mn(o),s=e[r],u=Math.max(0,...e.filter((b,y)=>y!==r)),c=Math.max(s,u)+10;if((u)>=(s))return c;let i=u+10,m=Math.max(40,t.width-i-t.margin.right),l=s-i+6,d=Math.round(n(o[r])),p=a(l/m,n);return ((p?(d+2)>=(p[0]):!1)?p[1]>=d-16:!1)?c:i}function Bt(t,n,a,o){let e=null,r=s=>e=$t(e,[s,s]);for(let s=0;(n.length)>(s);s++){let u=n[s];if((u===null?!0:t[s]>a))continue;r(o(u));let c=n[s+1];if(((c!=null?t[s+1]>a:!1)?t[s+1]>t[s]:!1)){let i=(a-t[s])/(t[s+1]-t[s]);r(o(u+(c-u)*i))}}return e}function oe(t,n){return t?[t[0]-n,t[1]+n]:null}function zt(t,n,a,o){let e=un(t,a),r=pn(t,e),s=-t.margin.left;n.append("g").attr("class",t.cls("grid")).selectAll("line").data(e).join("line").attr("x1",s).attr("x2",o).attr("y1",c=>Math.round(a(c))+.5).attr("y2",c=>Math.round(a(c))+.5),n.append("g").attr("class",`${t.cls("ticks")} ${t.cls("ticks--y")}`).selectAll("text").data(e).join("text").attr("x",s).attr("y",c=>Math.round(a(c))-4).text((c,i)=>r[i])}function dn(t){t.svg.selectAll(`.${t.cls("ticks--y")}`).raise()}function Ot(t,n,a,o){let[e,r]=a.domain();if((e>0?!0:(0)>(r)))return;let s=((0)>(e)?r>0:!1);n.append("line").attr("class",t.cls(s?"zero":"baseline")).attr("x1",-t.margin.left).attr("x2",o).attr("y1",Math.round(a(0))+.5).attr("y2",Math.round(a(0))+.5)}function se(t,n,a,o){n.append("line").attr("class",t.cls("baseline")).attr("x1",-t.margin.left).attr("x2",a).attr("y1",o+.5).attr("y2",o+.5)}function ie(t,n){return Math.max(2,Math.floor(t/(n?70:90)))}var br=10;function yr(t){return It}function xr(t,n,a,o){return (a)>(t-n/2)?{anchor:"start",start:t,end:t+n}:t+n/2>o?{anchor:"end",start:t-n,end:t}:{anchor:"middle",start:t-n/2,end:t+n/2}}function le(t,n,a,o){let e=-t.margin.left,r=t.width-t.margin.left,s=new Map,u=m=>{let l=[...new Set(m.filter(d=>!s.has(d)))];return Zt(t,l,yr(t)).forEach((d,p)=>s.set(l[p],d)),m.map(d=>s.get(d))},c=null,i=-1;for(let m=Math.max(1,Math.floor(o));m>=1;m--){let l=a(m);if(l.ticks.length===i)continue;i=l.ticks.length;let d=l.ticks.map(l.label),p=u(d),b=l.ticks.map((w,B)=>xr(n(w),p[B],e,r));c={...l,anchor:w=>b[w].anchor};let y=b.every(w=>(w.start>=e-.5?(r+.5)>=(w.end):!1)),g=b.every((w,B)=>(B===0?!0:(w.start)>=(b[B-1].end+br)));if((y?g:!1))return c}return c!=null?c:{...a(1),anchor:()=>"middle"}}function ce(t,n){let a=n.domain();return t.spec.data.xKind==="year"?o=>({ticks:n.ticks(o).filter(e=>Number.isInteger(e)),label:e=>String(e)}):o=>{let e=t.xAxis(a,o);return{ticks:n.ticks(o),label:r=>e(r)}}}function ue(t,n,a,o,e){n.append("g").attr("class",t.cls("ticks")).attr("transform",`translate(0,${a})`).selectAll("text").data(o.ticks).join("text").attr("x",r=>e(r)).attr("y",22).attr("text-anchor",(r,s)=>o.anchor(s)).text((r,s)=>o.label(r,s))}function ae(t,n,a,o){let e=[...t].sort((i,m)=>i.y-m.y),r=e.length;if(!r)return;let s=r>1?Math.min(n,Math.max(0,o-a)/(r-1)):n,u=i=>{i.top=Math.max(a,Math.min(o-(i.size-1)*s,i.sum/i.size))},c=[];e.forEach((i,m)=>{let l={start:m,size:1,sum:i.y,top:i.y};for(u(l),c.push(l);c.length>1;){let d=c[c.length-1],p=c[c.length-2];if((d.top+1e-9)>=(p.top+p.size*s))break;p.sum+=d.sum-d.size*p.size*s,p.size+=d.size,c.pop(),u(p)}});for(let i of c)for(let m=0;(i.size)>(m);m++)e[i.start+m].y=i.top+m*s}function hn(t,n,a,o,e){let r=[],s=[];for(let c of t){let i=[...r,{item:c,y:c.y}].map(l=>({own:l.y,y:l.y})),m=(o-a)>=((i.length-1)*n);(m?ae(i,n,a,o):!1),(m?i.every(l=>__gvLe(Math.abs(l.y-l.own),e)):!1)?r.push({item:c,y:c.y}):s.push(c)}let u=r.map(c=>({y:c.y}));return ae(u,n,a,o),r.forEach((c,i)=>c.item.y=u[i].y),{kept:r.map(c=>c.item),dropped:s}}function fn(t,n,a,o){let e=[...new Set(a.map(g=>g.getTime()))].sort((g,w)=>g-w),r=Mr(a,e),s=[...[t.utcDay,t.utcDay.every(2),t.utcWeek,t.utcWeek.every(2)].map(g=>[g,"day"]),...[1,2,3,6].map(g=>[t.utcMonth.every(g),"month"]),...[1,2,5,10,20,25,50,100,200,250,500,1e3].map(g=>[t.utcYear.every(g),"year"])],u=s.slice(s.findIndex(([,g])=>g===r)),[c,i]=n.domain(),[m,l]=u[u.length-1],d=[];for(let[g,w]of u){let B=cn(g,e,c,i);if((o)>=(B.length)){[m,l,d]=[g,w,B];break}}(d.length?!0:(d=cn(m,e,c,i))),((!d.length?e.length:!1)?(d=e.length===1?[new Date(e[0])]:[new Date(e[0]),new Date(e[e.length-1])]):!1);let p=(g,w)=>(w===0?!0:d[w-1].getUTCFullYear()!==g.getUTCFullYear()),b={year:t.utcFormat("%Y"),month:t.utcFormat("%b"),monthYear:t.utcFormat("%b %Y"),day:t.utcFormat("%b %-d"),dayYear:t.utcFormat("%b %-d, %Y")};return{ticks:d,label:(g,w)=>l==="year"?b.year(g):l==="month"?p(g,w)?b.monthYear(g):b.month(g):p(g,w)?b.dayYear(g):b.day(g)}}function Mr(t,n){if(t.every(r=>(r.getUTCMonth()===0?r.getUTCDate()===1:!1)))return"year";if((2)>(n.length))return t.every(r=>r.getUTCDate()===1)?"month":"day";let o=1/0;for(let r=1;(n.length)>(r);r++)o=Math.min(o,n[r]-n[r-1]);let e=o/864e5;return e>=360?"year":e>=28?"month":"day"}function cn(t,n,a,o){let e=t.range(t.floor(a),new Date(o.getTime()+1)),r=[];return e.forEach((s,u)=>{var m;let c=((m=e[u+1])!=null?m:t.offset(s,1)).getTime(),i=wr(n,s.getTime());((n.length)>(i)?(c)>(n[i]):!1)?r.push(new Date(n[i])):((s>=a?(o)>=(s):!1)?r.push(s):!1)}),r}function wr(t,n){let a=0,o=t.length;for(;(o)>(a);){let e=a+o>>1;(n)>(t[e])?a=e+1:o=e}return a}function xt(t,n){var o,e,r;let a=(o=t.spec.style.imageFill)==null?void 0:o.photos;if(!a)return null;for(let s of n)if((s!==void 0?(((e=a[s])!=null?e.url:!1)):!1))return a[s].url;return __gvOr(((r=a["*"])==null?void 0:r.url),()=>(null))}function Ht(t){var a;let n=(a=t.spec.style.imageFill)==null?void 0:a.photos;return(!!n?Object.values(n).some(o=>!!((o!=null?o.url:!1))):!1)}function gn(t,n,a){let o=(e,r)=>__gvOr(parseInt(e.replace("#","").slice(r,r+2),16),()=>(0));return[0,2,4].map(e=>(o(t,e)+(o(n,e)-o(t,e))*a)/255)}function Ct(t,n,a,o){let e=t.svg.select("defs").empty()?t.svg.append("defs"):t.svg.select("defs"),r=i=>{let m=t.id(`duo-${i.replace(/[^0-9a-z]/gi,"")}`);if(!e.select(`#${m}`).empty())return m;let l=e.append("filter").attr("id",m).attr("color-interpolation-filters","sRGB").attr("x",0).attr("y",0).attr("width",1).attr("height",1);l.append("feColorMatrix").attr("type","saturate").attr("values","0");let d=gn(i,"#000000",.6),p=gn(i,"#FFFFFF",.6),b=l.append("feComponentTransfer");return["feFuncR","feFuncG","feFuncB"].forEach((y,g)=>b.append(y).attr("type","table").attr("tableValues",`${d[g].toFixed(3)} ${p[g].toFixed(3)}`)),m},s=new Map;return{clip:(i,m,l)=>{let d=`${i}|${m}${l?`|${l.x},${l.y},${l.w},${l.h}`:""}`,p=s.get(d);if(!p){let b=t.id(`clip-${e.selectAll("clipPath").size()}`);p={id:b,url:i,color:m,box:l!=null?l:{x:0,y:0,w:a,h:o},sel:e.append("clipPath").attr("id",b)},s.set(d,p)}return p.sel},paint:()=>{for(let i of s.values())n.insert("image",":first-child").attr("class",t.cls("photo")).attr("href",i.url).attr("x",i.box.x).attr("y",i.box.y).attr("width",Math.max(1,i.box.w)).attr("height",Math.max(1,i.box.h)).attr("preserveAspectRatio","xMidYMid slice").attr("clip-path",`url(#${i.id})`).attr("filter",`url(#${r(i.color)})`),n.insert("rect",":first-child").attr("x",i.box.x).attr("y",i.box.y).attr("width",Math.max(1,i.box.w)).attr("height",Math.max(1,i.box.h)).attr("fill",i.color).attr("clip-path",`url(#${i.id})`)}}}function me(t,n){var o;let a=t.spec.style.imageFill;return __gvAnd((!!a?a.mode==="category":!1),()=>(!!(((o=a.photos[n])!=null?o.url:!1))))}function kt(t,n){return n?0:1}function pe(t,n,a,o,e,r){if(((0)>=(a)?!0:(0)>=(o)))return"";let s=Math.min(e,(r==="up"?!0:r==="down")?a/2:o/2,(r==="up"?!0:r==="down")?o:a),u=t+a,c=n+o;switch(r){case"up":return`M${t},${c}V${n+s}Q${t},${n} ${t+s},${n}H${u-s}Q${u},${n} ${u},${n+s}V${c}Z`;case"down":return`M${t},${n}V${c-s}Q${t},${c} ${t+s},${c}H${u-s}Q${u},${c} ${u},${c-s}V${n}Z`;case"right":return`M${t},${n}H${u-s}Q${u},${n} ${u},${n+s}V${c-s}Q${u},${c} ${u-s},${c}H${t}Z`;case"left":return`M${u},${n}H${t+s}Q${t},${n} ${t},${n+s}V${c-s}Q${t},${c} ${t+s},${c}H${u}Z`}}function Gt(t,n,a,o){let e=t.length?t[0]:0,r=e;for(let s of t)((e)>(s)?(e=s):!1),(s>r?(r=s):!1);return (t.length?!0:([e,r]=[0,1])),(n?(e=Math.min(0,e),r=Math.max(0,r)):!1),(a!==null?(e=a):!1),(o!==null?(r=o):!1),(e===r?(r=e+1):!1),(e>r?([e,r]=[r,e]):!1),[e,r]}function bn(t){var lt,dt,mt,ht,Mt;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=a.type==="area",u=(s?e.series.length>1:s),c=e.xKind==="category",i=e.x.map((N,S)=>e.xKind==="date"?Xe(N):c?S:Number(N)),m=i.length;if(m===0)return;let l=__gvAnd((!s?e.series.some(N=>N.axis==="right"):!1),()=>(e.series.some(N=>N.axis!=="right"))),d=N=>(l?e.series[N].axis==="right":l),p=N=>e.series.filter((S,f)=>d(f)===N).flatMap(S=>S.values).filter(S=>S!==null),b=[],y,g;if(u){let N=i.map((S,f)=>e.series.map(x=>{var et;return(et=x.values[f])!=null?et:0}));b=n.stack().keys(e.series.map((S,f)=>f)).value((S,f)=>S[f]).offset(n.stackOffsetDiverging)(N),[y,g]=Gt(b.flatMap(S=>S.flatMap(f=>[f[0],f[1]])),!0,r.yMin,r.yMax)}else[y,g]=Gt(p(!1),__gvOr(__gvOr(r.yFromZero,()=>(s)),()=>(ke(t))),r.yMin,r.yMax);let w=t.margin,B=t.height-w.top-w.bottom,F=t.mobile?4:5,E=n.scaleLinear().domain([y,g]).nice(F).range([B,0]);t.setAxis(E.domain(),F);let H=l?n.scaleLinear().domain(Gt(p(!0),r.rightFromZero,null,null)).nice(F).range([B,0]):E,L=l?t.rightAxis(H.domain(),F):t.fmtAxis,A=l?H.ticks(F):[],D=l?ft(t,A.map(L),It)+10:0,C=N=>d(N)?H:E,P=N=>t.fmtFor(e.series[N]),$=e.series.map(N=>{for(let S=N.values.length-1;S>=0;S--)if(N.values[S]!==null)return S;return-1}),I=__gvAnd(we(a),()=>(!u)),O=__gvAnd((__gvOr(r.valueLabels,()=>(I))),()=>(!u)),K=N=>{if((0)>($[N]))return["",""];let S=P(N)(e.series[N].values[$[N]]);return I?[e.series[N].label,r.valueLabels?S:""]:["",S]},at=N=>K(N).filter(Boolean).join(" "),rt=D?D+6:9,st=I?{cls:t.cls("direct-label"),size:13,weight:700}:{cls:t.cls("value-label"),size:12,weight:500};if(O){let N=ft(t,e.series.map((S,f)=>at(f)),st.size,st);w.right=Math.max(w.right,Math.min(N,t.width/3)+rt+6)}else l?w.right=Math.max(w.right,D+4):(r.endDots?(w.right=Math.max(w.right,10)):!1);let U=i.map(N=>+N),[Y,_]=(lt=je(U))!=null?lt:[0,0],k=U.map(N=>_>Y?(N-Y)/(_-Y):0),h=(s?s:ke(t));w.left=Pt(t,E,N=>{let S=u?b.flatMap(x=>[Bt(k,x.map(et=>et[1]),N,E),Bt(k,x.map(et=>et[0]),N,E)]):e.series.map((x,et)=>Bt(k,x.values,N,C(et))),f=oe(S.reduce($t,null),6);return ((f?h:!1)?(f=$t(f,[E(0),E(0)])):!1),f});let v=Math.max(40,t.width-w.left-w.right),G=e.xKind==="date"?n.scaleUtc().domain(n.extent(i)).range([0,v]):n.scaleLinear().domain(n.extent(i)).range([0,v]),V=o.append("g").attr("transform",`translate(${w.left},${w.top})`);if(zt(t,V,E,v),se(t,V,v,B),Ot(t,V,E,v),l){let N=At(a,ct(a,e.series.findIndex(S=>S.axis==="right"),t.dark),t.dark);V.append("g").attr("class",t.cls("ticks")).selectAll("text").data(A).join("text").attr("x",v+8).attr("y",S=>H(S)).attr("dy","0.32em").style("fill",N).text(S=>L(S)),(r.rightLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",t.width).attr("y",t.rightTitleY).attr("text-anchor","end").style("fill",N).text(r.rightLabel):!1)}let z=N=>G(N);ue(t,V,B,le(t,z,kr(t,G,i),c?m:ie(v,t.mobile)),z);let Q=N=>G(i[N]),j=t.id("plot");o.append("defs").append("clipPath").attr("id",j).append("rect").attr("x",-8).attr("y",-8).attr("width",v+16).attr("height",B+16);let M=V.append("g").attr("clip-path",(r.yMin!==null?!0:r.yMax!==null)?`url(#${j})`:null),X=V.append("g"),R=r.curve==="monotone"?n.curveMonotoneX:n.curveLinear;if(s){let N=Ht(t)?Ct(t,M,v,B):null;(u?b:[e.series[0].values.map(f=>[0,f!=null?f:0])]).forEach((f,x)=>{var Z;let nt=(Z=n.area().curve(R).x((q,ot)=>Q(ot)).y0(q=>E(q[0])).y1(q=>E(q[1]))(f))!=null?Z:"",W=N?xt(t,[e.series[x].key]):null;((N?W:!1)?N.clip(W,ct(a,x,t.dark)).append("path").attr("d",nt):!1),M.append("path").attr("class",t.cls("area")).attr("d",nt).attr("fill",ct(a,x,t.dark)).attr("fill-opacity",kt(t,W)),((m===1?e.series[x].values[0]!==null:!1)?M.append("circle").attr("cx",Q(0)).attr("cy",E(f[0][1])).attr("r",3.5).attr("fill",ct(a,x,t.dark)):!1)}),(N==null?!0:N.paint())}if(!s){let[N,S]=E.domain(),f=((ke(t)?(0)>=(N):!1)?S>=0:!1)?xt(t,[e.series[0].key]):null,x=f?Ct(t,M,v,B):null;if((x?f:!1)){let Z=(dt=n.area().curve(R).defined(q=>q!==null).x((q,ot)=>Q(ot)).y0(E(0)).y1(q=>E(q))(e.series[0].values))!=null?dt:"";x.clip(f,ct(a,0,t.dark)).append("path").attr("d",Z),M.append("path").attr("d",Z).attr("fill",ct(a,0,t.dark)).attr("fill-opacity",kt(t,f)),x.paint()}let et=W=>n.line().curve(R).defined(Z=>Z!==null).x((Z,q)=>Q(q)).y(Z=>C(W)(Z)),nt=e.series.map((W,Z)=>Z).sort((W,Z)=>Number(jt(a,W))-Number(jt(a,Z))).reverse();for(let W of nt){let Z=e.series[W],q=(mt=et(W)(Z.values))!=null?mt:"";((e.series.length>1?!jt(a,W):!1)?M.append("path").attr("class",t.cls("line-halo")).attr("d",q):!1),M.append("path").attr("class",t.cls("line")).attr("d",q).attr("stroke",ct(a,W,t.dark)).attr("stroke-width",jt(a,W)?2:t.mobile?3:3.5).attr("stroke-dasharray",Z.dashed?"6 4":null),Z.values.forEach((ot,pt)=>{(((ot===null?!0:Z.values[pt-1]!=null)?!0:Z.values[pt+1]!=null)?!0:M.append("circle").attr("cx",Q(pt)).attr("cy",C(W)(ot)).attr("r",3.5).attr("fill",ct(a,W,t.dark)))})}(r.endDots?e.series.forEach((W,Z)=>{if(((0)>($[Z])?!0:jt(a,Z)))return;let q=Q($[Z]),ot=C(Z)(e.series[Z].values[$[Z]]);M.append("circle").attr("class",`${t.cls("dot")} ${t.cls("dot--pulse")}`).attr("cx",q).attr("cy",ot).attr("r",5).attr("fill",ct(a,Z,t.dark))}):!1)}if(O){let N=e.series.map((f,x)=>({i:x,y:$[x]>=0?C(x)(f.values[$[x]]):NaN,x:$[x]>=0?Q($[x]):0})).filter(f=>(!Number.isNaN(f.y)?((!jt(a,f.i)?!0:I)):!1));ae(N,15,6,B);let S=t.width/3;for(let f of N){let x=e.series[f.i].values[$[f.i]],[et,nt]=C(f.i).domain(),W=x>nt?-1:(et)>(x)?1:0,Z=(l?v:f.x)+rt,q=At(a,ct(a,f.i,t.dark),t.dark);(W?X.append("path").attr("class",t.cls("off-scale")).attr("d",`M${Z+4},${f.y+W*5}l-4,${-W*8}h8z`).attr("fill",q).append("title").text((0)>(W)?"Above the axis range":"Below the axis range"):!1);let ot=X.append("text").attr("class",t.cls(I?"direct-label":"value-label")).attr("x",Z+(W?12:0)).attr("y",f.y).attr("dy","0.32em").style("fill",q).text(at(f.i)),pt=ot.node(),[ut,vt]=K(f.i),Tt=(ut?ut:vt),Bn=Ee=>ut?[`${Ee.trimEnd()}\u2026`,vt].filter(Boolean).join(" "):`${Ee.trimEnd()}\u2026`;for(;(pt.getComputedTextLength()>S?Tt.length>4:!1);)Tt=Tt.slice(0,-2),ot.text(Bn(Tt))}}let tt=V.append("g").attr("class",t.cls("hover")).style("display","none"),J=new Set((Mt=(ht=r.tooltip)==null?void 0:ht.hideRows)!=null?Mt:[]);tt.append("line").attr("class",t.cls("rule")).attr("y1",0).attr("y2",B);let T=V.append("rect").attr("class",t.cls("overlay")).attr("width",v).attr("height",B);t.tooltip.bind(T,N=>{var pt;let[S]=n.pointer(N),f=G.invert(S),x=Math.max(0,Math.min(m-1,n.bisectCenter(i,f))),et=Q(x);tt.style("display",null).select("line").attr("x1",et).attr("x2",et);let nt=e.series.map((ut,vt)=>({si:vt,v:ut.values[x]})).filter(ut=>(ut.v!==null?!J.has(e.series[ut.si].label):!1)).sort((ut,vt)=>vt.v-ut.v),W=nt.slice(0,8),Z=W.map(ut=>gt(t,ct(a,ut.si,t.dark),e.series[ut.si].label,P(ut.si)(ut.v),e.series[ut.si].dashed)).join(""),q=nt.length>W.length?`\x3cdiv class="${t.cls("tip-more")}">+${nt.length-W.length} more\x3c/div>`:"",ot=W.length?u?E((pt=n.max(b,ut=>ut[x][1]))!=null?pt:0):C(W[0].si)(W[0].v):B/2;t.tooltip.show(`${bt(t,c?String(e.x[x]):t.fmtX((e.xKind==="date",i[x])))}${Z}${q}`,et+w.left,ot+w.top)},()=>tt.style("display","none"))}function ke(t){let{spec:n}=t;return __gvAnd((n.type==="line"?n.data.series.length===1:!1),()=>(!!xt(t,[n.data.series[0].key])))}function jt(t,n){var a;return __gvAnd(t.style.paletteId.startsWith("highlight"),()=>(t.data.series[n].key!==((a=t.style.highlight)!=null?a:t.data.series[0].key)))}function kr(t,n,a){let{d3:o,spec:e}=t,r=e.data;if(r.xKind==="date")return s=>{let u=fn(o,n,a,s);return{ticks:u.ticks,label:(c,i)=>u.label(c,i)}};if(r.xKind==="category"){let s=r.x.map(String),u=s.length;return c=>({ticks:o.range(0,u,Math.max(1,Math.ceil(u/c))),label:i=>s[i]})}return ce(t,n)}var de="http://www.w3.org/2000/svg",yn=/[\p{Script=Latin}\p{Script=Greek}\p{Script=Cyrillic}]/u,xn=/[_\-/.]/;function vr(t,n,a){let o=[],e=Array.from(t);for(;(e.length>1?a(e.join(""))>n:!1);){let r=c=>{let i=e.slice(0,c).join("");return (yn.test(e[c-1])?yn.test(e[c]):!1)?`${i}-`:i},s=1;for(;((e.length-1)>(s)?__gvLe(a(r(s+1)),n):!1);)s++;let u=s;for(;(u>Math.ceil(s/2)?!xn.test(e[u-1]):!1);)u--;(xn.test(e[u-1])?(s=u):!1),o.push(r(s)),e=e.slice(s)}return{lines:o,rest:e.join("")}}function Mn(t,n,a,o){let e=[],r="";for(let s of t.split(/\s+/).filter(Boolean)){let u=r?`${r} ${s}`:s;if(__gvLe(o(u),n)){r=u;continue}(r?e.push(r):!1);let c=vr(s,n,o);if(e.push(...c.lines),r=c.rest,e.length>a)break}if((r?e.push(r):!1),e.length>a){let s=Array.from(e[a-1].replace(/-$/,""));for(;(s.length>1?o(`${s.join("").trimEnd()}\u2026`)>n:!1);)s=s.slice(0,-1);e.length=a,e[a-1]=`${s.join("").trimEnd()}\u2026`}return e}function wn(t){t.textContent="";let n=t.ownerDocument.createElementNS(de,"tspan");return t.appendChild(n),a=>(n.textContent=a,n.getComputedTextLength())}function kn(t,n,a){var r;let o=t.getAttribute("x"),e=t.ownerDocument;if(t.textContent="",(1)>=(n.length)){t.textContent=(r=n[0])!=null?r:"";return}n.forEach((s,u)=>{let c=e.createElementNS(de,"tspan");(o!==null?c.setAttribute("x",o):!1),(u?c.setAttribute("dy",`${a}em`):!1),c.textContent=s,t.appendChild(c)})}function $e(t,n,a,o,e){let r=Mn(n,a,o,wn(t));kn(t,r,e);let s=__gvAnd((r.length>0?r[r.length-1].endsWith("\u2026"):!1),()=>(!n.endsWith("\u2026")));return{lines:Math.max(1,r.length),cut:s}}function $r(t,n,a,o,e){let r=/\s/.test(t),s=p=>r?p.split(/\s+/).filter(Boolean):Array.from(p),u=p=>p.join(r?" ":""),c=s(t),i=n.filter(p=>p!==t).map(s),m=(p,b)=>(p.length>=b?u(p.slice(-b))===u(c.slice(-b)):!1),l=1;for(;((c.length)>(l)?i.some(p=>m(p,l)):!1);)l++;let d=u(c.slice(-l));for(let p=c.length-l-1;p>=0;p--){let b=u(c.slice(0,p)),y=r?`${b?`${b} `:""}\u2026 ${d}`:`${b}\u2026${d}`,g=Mn(y,a,1/0,e);if((o)>=(g.length))return g}return null}function vn(t,n){var r;let a=t.ownerDocument,o=a.createElementNS(de,"g"),e=a.createElementNS(de,"title");e.textContent=n,((r=t.parentNode)==null?!0:r.insertBefore(o,t)),o.appendChild(e),o.appendChild(t)}function ve(t){var n;return __gvOr(Array.from(t.querySelectorAll("tspan")).map(a=>{var o;return(o=a.textContent)!=null?o:""}).join(" "),()=>(((n=t.textContent)!=null?n:"").trim()))}function Ce(t,n,a,o=1.15){var s;let e=((s=t.textContent)!=null?s:"").trim(),r=$e(t,e,n,a,o);return (r.cut?vn(t,e):!1),r.lines}function St(t,n,a,o=1.15){let e=t.map(s=>{var u;return((u=s.textContent)!=null?u:"").trim()}),r=t.map((s,u)=>s.getComputedTextLength()>n?$e(s,e[u],n,a,o):{lines:1,cut:!1});for(let s of Cr(t,e)){let u=$r(e[s],e,n,a,wn(t[s]));u?(kn(t[s],u,o),r[s]={lines:u.length,cut:!0}):r[s]=$e(t[s],e[s],n,a,o)}return r.forEach((s,u)=>__gvAnd(s.cut,()=>(vn(t[u],e[u])))),r.map(s=>s.lines)}function Cr(t,n){let a=new Map;t.forEach((e,r)=>{var s;return a.set(ve(e),[...(s=a.get(ve(e)))!=null?s:[],r])});let o=[];for(let e of a.values())(new Set(e.map(r=>n[r])).size>1?o.push(...e.filter(r=>n[r]!==ve(t[r]))):!1);return o}var $n=110,Sr=3,Tn=19,Fn=10;function Se(t){return t.toUpperCase()===yt.orange?yt.azure:yt.orange}function Ln(t){var lt,dt,mt,ht,Mt,N;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=a.type==="stacked",u=a.type==="combo",c=S=>(!u?!0:S===0),i=S=>__gvAnd((u?S>0:u),()=>(e.series[S].axis==="right")),m=S=>t.fmtFor(e.series[S]),l=e.x.map(S=>t.fmtX(S)),d=l.length;if(d===0)return;let p=e.series.length,b=0,y=0,g=[];if(s){let S=e.x.map((f,x)=>e.series.map(et=>{var nt;return(nt=et.values[x])!=null?nt:0}));g=n.stack().keys(e.series.map((f,x)=>x)).value((f,x)=>f[x]).offset(n.stackOffsetDiverging)(S),b=Math.min(0,(lt=n.min(g,f=>n.min(f,x=>x[0])))!=null?lt:0),y=Math.max(0,(dt=n.max(g,f=>n.max(f,x=>x[1])))!=null?dt:0)}else{let S=e.series.filter((f,x)=>!i(x)).flatMap(f=>f.values).filter(f=>f!==null);b=Math.min(0,(mt=n.min(S))!=null?mt:0),y=Math.max(0,(ht=n.max(S))!=null?ht:0)}((r.yMax!==null?r.yMax>y:!1)?(y=r.yMax):!1),(b===y?(y=1):!1);let w=e.series.some((S,f)=>i(f)),B=t.mobile?4:5,F=null,E=t.fmtAxis,H=0;if(w){let S=e.series.filter((et,nt)=>i(nt)).flatMap(et=>et.values).filter(et=>et!==null),f=(Mt=n.min(S))!=null?Mt:0,x=(N=n.max(S))!=null?N:1;(r.rightFromZero?(f=Math.min(0,f),x=Math.max(0,x)):!1),(f===x?(x=f+1):!1),F=n.scaleLinear().domain([f,x]).nice(B),E=t.rightAxis(F.domain(),B),H=ft(t,F.ticks(B).map(E),It)+10,t.margin.right=Math.max(t.margin.right,H+4)}let L=n.scaleBand().domain(l.map((S,f)=>String(f))).range([0,1]).paddingInner(.25).paddingOuter(.1),A=l.map((S,f)=>{var x;return((x=L(String(f)))!=null?x:0)+L.bandwidth()/2}),D=(S,f)=>{let x=null;return l.forEach((et,nt)=>{var ot;if(((ot=L(String(nt)))!=null?ot:0)>S)return;let W=s?g.flatMap(pt=>[pt[nt][0],pt[nt][1]]):e.series.filter((pt,ut)=>__gvAnd(c(ut),()=>(!i(ut)))).map(pt=>{var ut;return(ut=pt.values[nt])!=null?ut:0}),Z=Math.max(0,...W),q=Math.min(0,...W);x=$t(x,[f(Z)-((r.valueLabels?Z>0:!1)?Tn:2),f(q)+((r.valueLabels?(0)>(q):!1)?Fn+6:2)])}),e.series.forEach((et,nt)=>{if(c(nt))return;let W=(i(nt)?F:!1)?F.copy().range(f.range()):f;x=$t(x,oe(Bt(A,et.values,S,W),6))}),x},C=t.margin,P=n.scaleLinear().domain([b,y]).nice(t.mobile?4:5).range([t.height-C.top-40,0]);t.setAxis(P.domain(),t.mobile?4:5);let $=P.copy();((r.valueLabels?(24)>=(d):!1)?Sn($,t.height-C.top-40,C.top,Cn(t,g)):!1),C.left=Math.max(Pt(t,P,D),Pt(t,$,D));let I=Math.max(40,t.width-C.left-C.right),O=n.scaleBand().domain(l.map((S,f)=>String(f))).range([0,I]).paddingInner(.25).paddingOuter(.1),K=O.bandwidth(),at=t.mobile?12:13,rt=ft(t,l,at),st=e.xKind!=="category",U=1,Y="flat";(rt>K+O.step()*.25?(st?U=Math.ceil((rt+10)/O.step()):Y=((14)>=(d)?K>36:!1)?"wrap":"rotate"):!1),(Y==="rotate"?(U=Math.max(1,Math.ceil(14/Math.max(1,O.step())))):!1);let _=o.append("g").attr("class",t.cls("ticks")),k=0,h=[];l.forEach((S,f)=>{var W;if(f%U!==0)return;let x=((W=O(String(f)))!=null?W:0)+K/2,et=_.append("text").style("font-size",`${at}px`).text(S),nt=et.node();if(Y==="rotate"){et.attr("text-anchor","end").attr("transform",`translate(${x},12) rotate(-45)`);let Z=Math.min(($n-12)/.72,(x+C.left-at)/Math.SQRT1_2);(nt.getComputedTextLength()>Z?Ce(nt,Z,1):!1),k=Math.max(k,nt.getComputedTextLength())}else et.attr("x",x).attr("y",20).attr("text-anchor","middle"),(Y==="wrap"?h.push(nt):!1)});let v=Math.max(1,...St(h,O.step()-4,Sr)),G=Y==="rotate"?Math.min($n,k*.72+12)+8:Y==="wrap"?Math.ceil(20+(v-1)*at*1.15+at*.35+8):30;C.bottom=G+(r.xLabel?20:0);let V=Math.max(60,t.height-C.top-C.bottom),z=n.scaleLinear().domain([b,y]).nice(B).range([V,0]);((r.valueLabels?(24)>=(d):!1)?Sn(z,V,C.top,Cn(t,g)):!1),(F==null?!0:F.range([V,0])),_.attr("transform",`translate(${C.left},${C.top+V})`),(r.xLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",C.left+I/2).attr("y",C.top+V+G+12).attr("text-anchor","middle").text(r.xLabel):!1);let Q=o.append("g").attr("transform",`translate(${C.left},${C.top})`);if(zt(t,Q,z,I),F){let S=At(a,ct(a,e.series.findIndex((f,x)=>i(x)),t.dark),t.dark);Q.append("g").attr("class",t.cls("ticks")).selectAll("text").data(F.ticks(B)).join("text").attr("x",I+8).attr("y",f=>F(f)).attr("dy","0.32em").style("fill",S).text(f=>E(f)),(r.rightLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",t.width).attr("y",t.rightTitleY).attr("text-anchor","end").style("fill",S).text(r.rightLabel):!1)}let j=Q.append("g"),M=Ht(t)?Ct(t,j,I,V):null,X=u?1:p,R=(S,f)=>{let x=ct(a,S,t.dark);return ((((0)>(f)?X===1:!1)?!u:!1)?!s:!1)?Se(x):x},tt=n.scaleBand().domain(n.range(X)).range([0,K]).padding(X>1?.08:0),J=[];if(s?(g.forEach((S,f)=>{S.forEach((x,et)=>{var pt;let nt=z(x[0]),W=z(x[1]),Z=Math.abs(nt-W);if((0)>=(Z))return;let q=(pt=O(String(et)))!=null?pt:0,ot=M?xt(t,[e.series[f].key,String(e.x[et])]):null;((M?ot:!1)?M.clip(ot,ct(a,f,t.dark)).append("rect").attr("x",q).attr("y",Math.min(nt,W)).attr("width",K).attr("height",Z):!1),j.append("rect").attr("class",t.cls("segment")).attr("x",q).attr("y",Math.min(nt,W)).attr("width",K).attr("height",Z).attr("fill",ct(a,f,t.dark)).attr("fill-opacity",kt(t,ot))})}),(r.valueLabels?e.x.forEach((S,f)=>{var Z;let x=e.series.map(q=>{var ot;return(ot=q.values[f])!=null?ot:0}),et=x.filter(q=>q>0).reduce((q,ot)=>q+ot,0),nt=x.filter(q=>(0)>(q)).reduce((q,ot)=>q+ot,0),W=((Z=O(String(f)))!=null?Z:0)+K/2;(((et>0?!0:nt===0))?J.push({x:W,y:z(et)-6,text:t.fmtValue(et),below:!1}):!1),((0)>(nt)?J.push({x:W,y:z(nt)+14,text:t.fmtValue(nt),below:!0}):!1)}):!1)):e.series.forEach((S,f)=>{(c(f)?S.values.forEach((x,et)=>{var vt,Tt;if(x===null)return;let nt=((vt=O(String(et)))!=null?vt:0)+((Tt=tt(f))!=null?Tt:0),W=tt.bandwidth(),Z=z(Math.max(0,x)),q=Math.abs(z(x)-z(0)),ot=pe(nt,Z,W,q,4,x>=0?"up":"down"),pt=M?xt(t,[S.key,String(e.x[et])]):null,ut=R(f,x);((M?pt:!1)?M.clip(pt,ut,me(t,String(e.x[et]))?{x:nt,y:Z,w:W,h:q}:void 0).append("path").attr("d",ot):!1),j.append("path").attr("class",t.cls("bar")).attr("d",ot).attr("fill",ut).attr("fill-opacity",kt(t,pt)),(r.valueLabels?J.push({x:nt+W/2,y:x>=0?z(x)-6:z(x)+14,text:m(f)(x),below:(0)>(x)}):!1)}):!1)}),(M==null?!0:M.paint()),Ot(t,Q,z,I),(u?e.series.forEach((S,f)=>{var Z;if(f===0)return;let x=(i(f)?F:!1)?F:z,et=q=>{var ot;return((ot=O(String(q)))!=null?ot:0)+K/2},nt=(Z=n.line().defined(q=>q!==null).x((q,ot)=>et(ot)).y(q=>x(q))(S.values))!=null?Z:"",W=ct(a,f,t.dark);j.append("path").attr("class",t.cls("line-halo")).attr("d",nt),j.append("path").attr("class",t.cls("line")).attr("d",nt).attr("stroke",W).attr("stroke-width",t.mobile?3:3.5).attr("stroke-dasharray",S.dashed?"6 4":null),S.values.forEach((q,ot)=>{(q!==null?j.append("circle").attr("class",t.cls("dot")).attr("cx",et(ot)).attr("cy",x(q)).attr("r",d>24?2.5:4).attr("fill",W):!1)})}):!1),(J.length?(24)>=(d):!1)){let S=(X>1?!s:!1)?tt.bandwidth():K;(__gvLe(ft(t,J.map(x=>x.text),12),S+6)?Q.append("g").selectAll("text").data(J).join("text").attr("class",t.cls("value-label")).attr("x",x=>x.x).attr("y",x=>x.y).attr("text-anchor","middle").text(x=>x.text):!1)}let T=Q.append("g").selectAll("rect").data(l.map((S,f)=>f)).join("rect").attr("class",t.cls("overlay")).attr("x",S=>{var f;return((f=O(String(S)))!=null?f:0)-(O.step()-K)/2}).attr("width",O.step()).attr("y",0).attr("height",V);t.tooltip.bind(T,(S,f)=>{let x=l[f],et=e.series.map((q,ot)=>q.values[f]===null?"":gt(t,R(ot,q.values[f]),q.label,m(ot)(q.values[f]),q.dashed)).join(""),nt=(s?p>1:!1)?gt(t,"transparent","Total",t.fmtValue(e.series.reduce((q,ot)=>{var pt;return q+((pt=ot.values[f])!=null?pt:0)},0))):"",[W,Z]=n.pointer(S,t.chartEl);t.tooltip.show(`${bt(t,x)}${et}${nt}`,W,Z)})}function Cn(t,n){var u,c,i,m;let{d3:a,spec:o}=t;if(o.type==="stacked"){let l=(u=a.min(n,d=>a.min(d,p=>p[0])))!=null?u:0;return{top:(c=a.max(n,d=>a.max(d,p=>p[1])))!=null?c:null,bottom:(0)>(l)?l:null}}let e=(o.type==="combo"?o.data.series.slice(0,1):o.data.series).flatMap(l=>l.values).filter(l=>l!==null),r=(i=a.max(e.filter(l=>l>=0)))!=null?i:null,s=(m=a.min(e.filter(l=>(0)>(l))))!=null?m:null;return{top:r,bottom:s}}function Sn(t,n,a,o){let e=Math.min(.4,Fn/n),r=Math.min(.4,Math.max(0,Tn-a)/n);for(let s=0;(3)>(s);s++){let[u,c]=t.domain();((o.bottom!==null?t(o.bottom)>n*(1-e):!1)?(u=c-(c-o.bottom)/(1-e)):!1),((o.top!==null?__gvLt(t(o.top),n*r):!1)?(c=(o.top-r*u)/(1-r)):!1),t.domain([u,c])}}var Tr=3;function Fr(t){return t>1?t*13+14:30}function En(t){var _,k;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=e.x.map(h=>t.fmtX(h)),u=s.length;if(u===0)return;let c=e.series.length,i=t.margin,m=e.series.flatMap(h=>h.values).filter(h=>h!==null),l=Math.min(0,(_=n.min(m))!=null?_:0),d=Math.max(0,(k=n.max(m))!=null?k:0);((r.yMax!==null?r.yMax>d:!1)?(d=r.yMax):!1),(l===d?(d=1):!1);let p=t.mobile?13:14,b=t.width*(t.mobile?.42:.34),y=Math.min(b,ft(t,s,p));i.left=y+10;let g=r.valueLabels,w=g?ft(t,m.map(t.fmtValue),12)+8:0;i.right=Math.max(i.right,w),(((0)>(l)?g:!1)?(i.left+=w):!1),i.bottom=g?8:28;let B=Math.max(40,t.width-i.left-i.right),F=o.append("g").attr("transform",`translate(${i.left},${i.top})`),E=F.append("g").attr("class",t.cls("cat-labels")),H=s.map(h=>E.append("text").attr("x",-10-(((0)>(l)?g:!1)?w:0)).attr("text-anchor","end").style("font-size",`${p}px`).text(h)),L=St(H.map(h=>h.node()),y,Tr),A=H.map((h,v)=>({t:h,lines:L[v]})),D=Fr(c),C=Math.max(D,Math.ceil(n.max(A,h=>h.lines)*p*1.15+10)),P=u*C,$=n.scaleLinear().domain([l,d]).nice(t.mobile?4:5).range([0,B]);t.setAxis($.domain(),t.mobile?4:5);let I=Math.max(.25,1-D*.75/C),O=n.scaleBand().domain(s.map((h,v)=>String(v))).range([0,P]).paddingInner(I).paddingOuter(I/2),K=n.scaleBand().domain(n.range(c)).range([0,O.bandwidth()]).padding(c>1?.1:0);if(A.forEach(({t:h,lines:v},G)=>{var V;h.attr("y",((V=O(String(G)))!=null?V:0)+O.bandwidth()/2).attr("dy",`${.32-(v-1)*.575}em`)}),!g){let h=$.ticks(t.mobile?4:5);F.append("g").attr("class",t.cls("grid")).selectAll("line").data(h).join("line").attr("x1",v=>Math.round($(v))+.5).attr("x2",v=>Math.round($(v))+.5).attr("y1",0).attr("y2",P),F.append("g").attr("class",t.cls("ticks")).selectAll("text").data(h).join("text").attr("x",v=>$(v)).attr("y",P+20).attr("text-anchor","middle").text(v=>t.fmtAxis(v))}let at=F.append("g"),rt=Ht(t)?Ct(t,at,B,P):null,st=[],U=(h,v)=>{let G=ct(a,h,t.dark);return ((0)>(v)?c===1:!1)?Se(G):G};e.series.forEach((h,v)=>{h.values.forEach((G,V)=>{var J,T;if(G===null)return;let z=((J=O(String(V)))!=null?J:0)+((T=K(v))!=null?T:0),Q=K.bandwidth(),j=$(Math.min(0,G)),M=Math.abs($(G)-$(0)),X=pe(j,z,M,Q,4,G>=0?"right":"left"),R=rt?xt(t,[h.key,String(e.x[V])]):null,tt=U(v,G);((rt?R:!1)?rt.clip(R,tt,me(t,String(e.x[V]))?{x:j,y:z,w:M,h:Q}:void 0).append("path").attr("d",X):!1),at.append("path").attr("class",t.cls("bar")).attr("d",X).attr("fill",tt).attr("fill-opacity",kt(t,R)),(g?st.push({x:G>=0?$(G)+6:$(G)-6,y:z+Q/2,text:t.fmtValue(G),anchor:G>=0?"start":"end"}):!1)})}),(rt==null?!0:rt.paint()),(0)>(l)?F.append("line").attr("class",t.cls("zero")).attr("x1",$(0)).attr("x2",$(0)).attr("y1",0).attr("y2",P):F.append("line").attr("class",t.cls("baseline")).attr("x1",$(0)+.5).attr("x2",$(0)+.5).attr("y1",0).attr("y2",P),F.append("g").selectAll("text").data(st).join("text").attr("class",t.cls("value-label")).attr("x",h=>h.x).attr("y",h=>h.y).attr("dy","0.32em").attr("text-anchor",h=>h.anchor).text(h=>h.text);let Y=F.append("g").selectAll("rect").data(s.map((h,v)=>v)).join("rect").attr("class",t.cls("overlay")).attr("x",-i.left).attr("width",t.width).attr("y",h=>{var v;return((v=O(String(h)))!=null?v:0)-(O.step()-O.bandwidth())/2}).attr("height",O.step());return t.tooltip.bind(Y,(h,v)=>{if((c===1?g:!1))return;let G=s[v],V=e.series.map((j,M)=>j.values[v]===null?"":gt(t,U(M,j.values[v]),j.label,t.fmtValue(j.values[v]))).join(""),[z,Q]=n.pointer(h,t.chartEl);t.tooltip.show(`${bt(t,G)}${V}`,z,Q)}),P+i.top+i.bottom}var An=40;function Lr(t,n){let a=n==="exponential"?t.filter(i=>i.y>0).map(i=>({x:i.x,y:Math.log(i.y)})):t;if((2)>(a.length))return null;let o=a.length,e=a.reduce((i,m)=>i+m.x,0)/o,r=a.reduce((i,m)=>i+m.y,0)/o,s=a.reduce((i,m)=>i+(m.x-e)**2,0);if(s===0)return null;let u=a.reduce((i,m)=>i+(m.x-e)*(m.y-r),0)/s,c=r-u*e;return n==="exponential"?i=>Math.exp(c+u*i):i=>c+u*i}function Er(t,n){let a=t.map((r,s)=>({item:r,i:s,s:n(r)})).sort((r,s)=>r.s[0]-s.s[0]),o=[],e=-1/0;for(let r of a)(!o.length?!0:r.s[0]>e)?(o.push([r]),e=r.s[1]):(o[o.length-1].push(r),e=Math.max(e,r.s[1]));return o.map(r=>r.sort((s,u)=>s.i-u.i).map(s=>s.item))}function Dn(t,n){for(let a of[[1,2,5],[1,5],[1]]){let o=[0];for(let e=1;(t*10)>=(e);e*=10)for(let r of a)((t+1e-9)>=(e*r)?o.push(e*r):!1);if(((n)>=(o.length)?!0:a.length===1))return o}return[0]}function Te(t){var a;let n=1;for(;(t)>(n*10);)n*=10;return(a=[1,2,5,10].map(o=>o*n).find(o=>o>=t))!=null?a:n*10}function Pn(t){var G,V,z,Q,j;let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=(G=e.points)!=null?G:[];if(!s.length)return;let u=new Map(e.series.map((M,X)=>[M.key,X])),c=M=>{var X,R;return ct(a,(R=u.get((X=M.group)!=null?X:e.series[0].key))!=null?R:0,t.dark)},i=([M,X])=>{let R=(__gvOr(__gvOr(X-M,()=>(Math.abs(M))),()=>(1)))*.04;return[M-R,X+R]},[m,l]=i(n.extent(s,M=>M.x));(r.xFromZero?(m=Math.min(0,m),l=Math.max(0,l)):!1),(r.xMin!==null?(m=r.xMin):!1),(r.xMax!==null?(l=r.xMax):!1);let[d,p]=i(n.extent(s,M=>M.y));(r.yFromZero?(d=Math.min(0,d),p=Math.max(0,p)):!1),(r.yMin!==null?(d=r.yMin):!1),(r.yMax!==null?(p=r.yMax):!1),(m>l?([m,l]=[l,m]):!1),(d>p?([d,p]=[p,d]):!1);let b=t.margin;b.bottom=r.xLabel?48:30;let y=t.height-b.top-b.bottom,w=r.yScale==="symlog"?Object.assign(n.scaleSymlog().domain([0,(V=r.yMax)!=null?V:Te(Math.max(p,1))]).range([y,0]),{ticks:()=>{var M;return Dn((M=r.yMax)!=null?M:Te(Math.max(p,1)),t.mobile?5:8)}}):n.scaleLinear().domain([d,p===d?d+1:p]).nice(5).range([y,0]);t.setAxis(w.domain(),t.mobile?4:5);let B=r.xScale==="symlog",F=(z=r.xMax)!=null?z:Te(Math.max(l,1)),E=M=>B?Object.assign(n.scaleSymlog().domain([0,F]).range(M),{ticks:X=>Dn(F,Math.max(2,X))}):n.scaleLinear().domain([m,l===m?m+1:l]).nice().range(M),H=E([0,1]),L=t.mobile?4:5.5;b.left=Pt(t,w,M=>{let X=null;for(let R of s)(__gvLe(H(R.x),M+.02)?(X=$t(X,[w(R.y)-L-2,w(R.y)+L+2])):!1);return X});let A=Math.max(40,t.width-b.left-b.right),D=E([0,A]),C=o.append("g").attr("transform",`translate(${b.left},${b.top})`);zt(t,C,w,A),se(t,C,A,y),Ot(t,C,w,A);let P=M=>D(M);ue(t,C,y,le(t,P,ce(t,D),ie(A,t.mobile)),P),(r.xLabel?C.append("text").attr("class",t.cls("axis-title")).attr("x",A).attr("y",y+42).attr("text-anchor","end").text(r.xLabel):!1);let $=t.id("plot");if(o.append("defs").append("clipPath").attr("id",$).append("rect").attr("x",-L).attr("y",-L).attr("width",A+2*L).attr("height",y+2*L),r.trend){let M=C.append("g").attr("clip-path",`url(#${$})`);for(let X of e.series){let R=s.filter(mt=>{var ht;return((ht=mt.group)!=null?ht:e.series[0].key)===X.key}),tt=Lr(R,r.trend);if(!tt)continue;let[J,T]=n.extent(R,mt=>mt.x),lt=n.range(0,41).map(mt=>J+(T-J)*mt/40),dt=n.line().x(mt=>D(mt)).y(mt=>w(tt(mt)));M.append("path").attr("class",t.cls("trend")).attr("d",dt(lt)).attr("fill","none").attr("stroke",c(R[0])).attr("stroke-width",t.mobile?2:2.5).attr("stroke-dasharray","6 4")}}if(r.refLine){let{slope:M,intercept:X=0,label:R}=r.refLine,[tt,J]=D.domain(),[T,lt]=w.domain(),dt=n.range(0,201).map(mt=>B?D.invert(A*mt/200):tt+(J-tt)*mt/200).filter(mt=>{let ht=M*mt+X;return (ht>=Math.min(T,lt)?__gvLe(ht,Math.max(T,lt)):!1)});if(dt.length>1){let mt=n.line().x(ht=>D(ht)).y(ht=>w(M*ht+X));if(C.append("path").attr("class",t.cls("ref-line")).attr("d",mt(dt)).attr("fill","none").style("stroke","var(--gv-text-2)").attr("stroke-width",1.5).attr("stroke-dasharray","5 4"),R){let ht=dt[dt.length-1],Mt=D(ht),N=w(M*ht+X);C.append("text").attr("class",t.cls("axis-title")).attr("x",Math.min(Mt,A)).attr("y",Math.max(N-8,12)).attr("text-anchor","end").text(R)}}}C.append("g").attr("clip-path",`url(#${$})`).selectAll("circle").data(s).join("circle").attr("class",t.cls("point")).attr("cx",M=>D(M.x)).attr("cy",M=>w(M.y)).attr("r",L).attr("fill",c);let[I,O]=D.domain(),[K,at]=w.domain(),rt=s.filter(M=>__gvAnd(__gvAnd(__gvAnd(__gvAnd(M.label,()=>(M.x>=I)),()=>((O)>=(M.x))),()=>(M.y>=K)),()=>((at)>=(M.y)))).slice(0,An);if((rt.length?(An)>=(rt.length):!1)){let M=T=>T>A*.85?"end":(A*.15)>(T)?"start":"middle",X=Zt(t,rt.map(T=>T.label),12),R=rt.map((T,lt)=>({p:T,y:w(T.y)-L-5,w:X[lt]+6})),J=Er(R,T=>{let lt=D(T.p.x),dt=M(lt);return dt==="start"?[lt-3,lt+T.w]:dt==="end"?[lt-T.w,lt+3]:[lt-T.w/2,lt+T.w/2]}).flatMap(T=>hn(T,13,8,y,40).kept);C.append("g").selectAll("text").data(J).join("text").attr("class",t.cls("value-label")).attr("x",T=>D(T.p.x)).attr("y",T=>T.y).attr("text-anchor",T=>M(D(T.p.x))).text(T=>T.p.label)}let st=n.Delaunay.from(s,M=>D(M.x),M=>w(M.y)),U=C.append("circle").attr("class",t.cls("ring")).attr("r",L+3).style("display","none"),Y=s.some(M=>M.group!==void 0),_=__gvOr(__gvOr(__gvOr(((Q=r.tooltip)==null?void 0:Q.valueName),()=>(r.yLabel)),()=>((Y?"Vertical axis":(j=e.series[0])==null?void 0:j.label))),()=>("Vertical axis")),k=__gvOr(r.xLabel,()=>("Horizontal axis")),h=C.append("rect").attr("class",t.cls("overlay")).attr("width",A).attr("height",y),v=()=>U.style("display","none");t.tooltip.bind(h,M=>{var Mt,N;let[X,R]=n.pointer(M),tt=st.find(X,R),J=s[tt];if((!J?!0:Math.hypot(D(J.x)-X,w(J.y)-R)>40)){v(),t.tooltip.hide();return}U.style("display",null).attr("cx",D(J.x)).attr("cy",w(J.y));let T=__gvOr(__gvOr(J.label,()=>(J.group)),()=>("")),lt=__gvAnd(__gvAnd((Y?J.group:Y),()=>(J.label)),()=>(!(((N=(Mt=r.tooltip)==null?void 0:Mt.hideRows)!=null?N.includes(J.group):!1)))),dt=lt?Wt(t,c(J),J.group,""):"",mt=lt?"transparent":c(J),ht=dt+Wt(t,"transparent",k,t.fmtX(J.x))+gt(t,mt,_,t.fmtValue(J.y));t.tooltip.show(`${T?bt(t,T):""}${ht}`,D(J.x)+b.left,w(J.y)+b.top)},v)}var Ar=.25,Dr=16,Pr=3;function Gn(t){let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=e.x.map(String),u=e.series.length;if((!s.length?!0:!u))return t.height;let c=Math.max(1,Math.min(u,Math.floor(t.width/(t.mobile?170:220)))),i=Math.ceil(u/c),m=t.width/c,l=D=>D%c*m+m/2,d=u>1?e.series.map((D,C)=>o.append("text").attr("class",t.cls("donut-title")).attr("x",l(C)).attr("text-anchor","middle").text(D.label)):[],p=St(d.map(D=>D.node()),m-12,Pr),b=d.map((D,C)=>({t:D,lines:p[C]})),y=Math.max(1,...b.map(D=>D.lines)),g=u>1?30+Math.ceil((y-1)*Dr*1.15):0,w=Math.max(50,Math.min(m/2-12,t.mobile?130:150)),B=r.donutHole?w*.56:0,F=g+w*2+18,E=D=>{var C,P;return Et(a,(P=(C=e.categoryColors)==null?void 0:C[D])!=null?P:it.muted,t.dark)},H=n.format(".0%"),L=n.arc().innerRadius(B).outerRadius(w).padAngle(r.donutHole?.012:.006).cornerRadius(r.donutHole?2:0),A=n.arc().innerRadius(B?(B+w)/2:w*.62).outerRadius(B?(B+w)/2:w*.62);return e.series.forEach((D,C)=>{var U;let P=Math.floor(C/c),$=l(C),I=P*F+g+w+6,O=D.values.map(Y=>(Y!==null?Y>0:!1)?Y:0),K=O.reduce((Y,_)=>Y+_,0),at=o.append("g").attr("transform",`translate(${$},${I})`);if(((U=b[C])==null?!0:U.t.attr("y",P*F+18)),!K)return;let rt=n.pie().sort(null).value(Y=>Y)(O),st=Ct(t,at,0,0);rt.forEach((Y,_)=>{var G;if((0)>=(Y.value))return;let k=(G=L(Y))!=null?G:"",h=xt(t,[s[_],D.key]);(h?st.clip(h,E(_),{x:-w,y:-w,w:w*2,h:w*2}).append("path").attr("d",k):!1);let v=at.append("path").attr("class",t.cls("slice")).attr("d",k).attr("fill",E(_)).attr("fill-opacity",kt(t,h));t.tooltip.bind(v,V=>{var M;let[z,Q]=n.pointer(V,t.chartEl),j=gt(t,E(_),u>1?D.label:"Value",t.fmtValue((M=D.values[_])!=null?M:0))+Wt(t,"transparent","Share",H(Y.value/K));t.tooltip.show(`${bt(t,s[_])}${j}`,z,Q)})}),st.paint(),rt.forEach((Y,_)=>{if(((Ar)>(Y.endAngle-Y.startAngle)?!0:(0)>=(Y.value)))return;let[k,h]=A.centroid(Y),v=te(E(_)),G=at.append("text").attr("class",t.cls("slice-label")).attr("x",k).attr("y",h).attr("dy","0.35em").attr("text-anchor","middle").text(H(Y.value/K));(v!=="#FFFFFF"?G.style("fill",v).style("stroke","rgba(255,255,255,0.35)"):!1)})}),i*F+6}function Vn(t){let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,[s,u]=e.series;if(((!s?!0:!u)?!0:!e.x.length))return;let i=e.x.map(String).map((k,h)=>({i:h,name:k,a:s.values[h],b:u.values[h]})).filter(k=>(k.a!==null?k.b!==null:!1));if(!i.length)return;let m=t.margin;m.top=Math.max(m.top,34),m.bottom=14;let l=t.mobile?12:13,d=l+3,p=Math.max(t.height-m.top-m.bottom,i.length*d);o.attr("height",p+m.top+m.bottom);let[b,y]=Gt(i.flatMap(k=>[k.a,k.b]),r.yFromZero,r.yMin,r.yMax),g=n.scaleLinear().domain([b,y]).nice().range([p,0]),[w,B]=g.domain(),F=(k,h)=>h==="left"?{name:k.name,value:t.fmtValue(k.a),nameFirst:!0}:{name:t.mobile?"":k.name,value:t.fmtValue(k.b),nameFirst:!1},E=(k,h=k.name)=>h?k.nameFirst?`${h} ${k.value}`:`${k.value} ${h}`:k.value,H=k=>E(F(k,"left")),L=k=>E(F(k,"right")),A=t.width*(t.mobile?.4:.3),D=Math.min(A,ft(t,i.map(H),l))+12,C=Math.min(A,ft(t,i.map(L),l))+12,P=D,$=Math.max(P+60,t.width-C),I=k=>{var h,v;return Et(a,(v=(h=e.categoryColors)==null?void 0:h[k])!=null?v:it.muted,t.dark)},O=k=>(I(k).toUpperCase()===it.muted.toUpperCase()?!0:I(k).toUpperCase()===it.darkMuted.toUpperCase()),K=o.append("g").attr("transform",`translate(0,${m.top})`);o.append("text").attr("class",t.cls("slope-head")).attr("x",P).attr("y",18).attr("text-anchor","middle").text(s.label),o.append("text").attr("class",t.cls("slope-head")).attr("x",$).attr("y",18).attr("text-anchor","middle").text(u.label),K.append("line").attr("class",t.cls("slope-axis")).attr("x1",P).attr("x2",P).attr("y1",0).attr("y2",p),K.append("line").attr("class",t.cls("slope-axis")).attr("x1",$).attr("x2",$).attr("y1",0).attr("y2",p);let at=t.id("plot");o.append("defs").append("clipPath").attr("id",at).append("rect").attr("x",0).attr("y",-5).attr("width",t.width).attr("height",p+10);let rt=K.append("g").attr("clip-path",(r.yMin!==null?!0:r.yMax!==null)?`url(#${at})`:null),st=[...i].sort((k,h)=>+!O(k.i)-+!O(h.i));for(let k of st){let h=I(k.i);rt.append("line").attr("class",t.cls("slope-line")).attr("x1",P).attr("x2",$).attr("y1",g(k.a)).attr("y2",g(k.b)).attr("stroke",h).attr("stroke-width",O(k.i)?2:3),rt.append("circle").attr("cx",P).attr("cy",g(k.a)).attr("r",4).attr("fill",h),rt.append("circle").attr("cx",$).attr("cy",g(k.b)).attr("r",4).attr("fill",h)}let U=new Set,Y=k=>{let h=i.map(G=>({r:G,y:g(k==="left"?G.a:G.b)}));Gr(h,d,d/2,p);let v=k==="left"?P:$;for(let G of h){let V=k==="left"?G.r.a:G.r.b,z=V>B?-1:(w)>(V)?1:0;((z?!U.has(`${k}${z}`):!1)?(U.add(`${k}${z}`),K.append("path").attr("class",t.cls("off-scale")).attr("d",`M${v},${(0)>(z)?-8:p+8}l-5,${-z*8}h10z`).attr("fill",t.dark?it.darkSecondary:it.secondary).append("title").text((0)>(z)?"Above the axis range":"Below the axis range")):!1);let Q=F(G.r,k),j=K.append("text").attr("class",t.cls("slope-label")).attr("x",k==="left"?P-10:$+10).attr("y",G.y).attr("dy","0.32em").attr("text-anchor",k==="left"?"end":"start").style("font-size",`${l}px`).text(E(Q));(O(G.r.i)?!0:j.style("fill",At(a,I(G.r.i),t.dark)));let M=j.node(),X=Q.name;for(;(M.getComputedTextLength()>A?X.length>3:!1);)X=X.slice(0,-1),j.text(E(Q,`${X.trimEnd()}\u2026`))}};Y("left"),Y("right");let _=K.append("rect").attr("class",t.cls("overlay")).attr("x",P).attr("width",$-P).attr("height",p);t.tooltip.bind(_,k=>{let[h,v]=n.pointer(k),G=(h-P)/($-P),V=i[0],z=1/0;for(let M of i){let X=g(M.a)+(g(M.b)-g(M.a))*G;(__gvLt(Math.abs(X-v),z)?([V,z]=[M,Math.abs(X-v)]):!1)}let Q=V.b-V.a,j=gt(t,I(V.i),s.label,t.fmtValue(V.a))+gt(t,I(V.i),u.label,t.fmtValue(V.b))+gt(t,"transparent","Change",`${Q>=0?"+":""}${t.fmtValue(Q)}`);t.tooltip.show(`${bt(t,V.name)}${j}`,h,v+m.top)})}function Gr(t,n,a,o){let e=[...t].sort((r,s)=>r.y-s.y);e.forEach((r,s)=>r.y=Math.max(r.y,s?e[s-1].y+n:a));for(let r=e.length-1;r>=0;r--)e[r].y=Math.min(e[r].y,(e.length-1)>(r)?e[r+1].y-n:o)}var Vr=3;function _n(t){let{d3:n,spec:a,svg:o}=t,{data:e,style:r}=a,s=e.x.map(_=>t.fmtX(_)),u=s.length;if((!u?!0:!e.series.length))return t.height;let c=t.margin,i=t.mobile?30:32,m=t.mobile?13:14,l=t.width*(t.mobile?.38:.3),d=Math.min(l,ft(t,s,m));c.left=d+14,c.right=Math.max(c.right,16),c.bottom=30,c.top=Math.max(c.top,6);let p=Math.max(60,t.width-c.left-c.right),b=o.append("g").attr("transform",`translate(${c.left},${c.top})`),y=s.map(_=>b.append("text").attr("class",t.cls("cat-label")).attr("x",-12).attr("text-anchor","end").style("font-size",`${m}px`).text(_)),g=St(y.map(_=>_.node()),d,Vr),w=Math.max(i,Math.ceil(Math.max(1,...g)*m*1.15+10)),B=u*w,F=e.series.flatMap(_=>_.values).filter(_=>_!==null),[E,H]=Gt(F,r.yFromZero,r.yMin,r.yMax),L=t.mobile?4:5,A=n.scaleLinear().domain([E,H]).nice(L).range([0,p]);t.setAxis(A.domain(),L);let[D,C]=A.domain(),P=_=>(_>=D?(C)>=(_):!1),$=_=>_*w+w/2,I=_=>e.series.map(k=>k.values[_]).filter(k=>k!==null),O=s.map((_,k)=>r.valueLabels?_r(I(k),P):[]);(r.valueLabels?Br(t,A,p,O):!1);let K=Rr(t,A,L),at=_=>ft(t,[t.fmtValue(_)],12),rt=O.map(_=>Nr(A,p,_,at)),st=t.id("plot");o.append("defs").append("clipPath").attr("id",st).append("rect").attr("x",A(D)-8).attr("y",0).attr("width",A(C)-A(D)+16).attr("height",B),b.append("g").attr("class",t.cls("grid")).selectAll("line").data(K).join("line").attr("x1",_=>Math.round(A(_))+.5).attr("x2",_=>Math.round(A(_))+.5).attr("y1",0).attr("y2",B),b.append("g").attr("class",t.cls("ticks")).selectAll("text").data(K).join("text").attr("x",_=>A(_)).attr("y",B+20).attr("text-anchor","middle").text(_=>t.fmtAxis(_)),(((0)>(E)?H>0:!1)?b.append("line").attr("class",t.cls("zero")).attr("x1",A(0)).attr("x2",A(0)).attr("y1",0).attr("y2",B):!1);let U=b.append("g").attr("clip-path",`url(#${st})`);s.forEach((_,k)=>{y[k].attr("y",$(k)).attr("dy",`${.32-(g[k]-1)*.575}em`);let h=I(k),v=Math.min(...h),G=Math.max(...h);(((h.length>1?G>=D:!1)?(C)>=(v):!1)?U.append("line").attr("class",t.cls("dumbbell")).attr("x1",A(Math.max(D,v))).attr("x2",A(Math.min(C,G))).attr("y1",$(k)).attr("y2",$(k)):!1),Ir(t,b,A,$(k),h),e.series.forEach((V,z)=>{let Q=V.values[k];(Q!==null?U.append("circle").attr("class",t.cls("dot")).attr("cx",A(Q)).attr("cy",$(k)).attr("r",t.mobile?6:7).attr("fill",ct(a,z,t.dark)):!1)});for(let V of rt[k])b.append("text").attr("class",t.cls("value-label")).attr("x",A(V.v)+V.dx).attr("y",$(k)).attr("dy","0.32em").attr("text-anchor",V.anchor).text(t.fmtValue(V.v))});let Y=b.append("g").selectAll("rect").data(s.map((_,k)=>k)).join("rect").attr("class",t.cls("overlay")).attr("x",-c.left).attr("width",t.width).attr("y",_=>_*w).attr("height",w);return t.tooltip.bind(Y,(_,k)=>{let h=e.series.map((V,z)=>V.values[k]===null?"":gt(t,ct(a,z,t.dark),V.label,t.fmtValue(V.values[k]))).join(""),[v,G]=n.pointer(_,t.chartEl);t.tooltip.show(`${bt(t,s[k])}${h}`,v,G)}),B+c.top+c.bottom}function _r(t,n){if(!t.length)return[];let a=Math.min(...t),o=Math.max(...t),e=[];return (((o)>(a)?n(a):!1)?e.push({v:a,anchor:"end",dx:-11}):!1),(n(o)?e.push({v:o,anchor:"start",dx:11}):!1),e}function Rr(t,n,a){for(let o=a;o>=1;o--){t.setAxis(n.domain(),o);let e=n.ticks(o),r=e.map(u=>ft(t,[t.fmtAxis(u)],12));if((e.every((u,c)=>(c===0?!0:n(u)-n(e[c-1])>=(r[c]+r[c-1])/2+8))?!0:o===1))return e}return[]}function Nr(t,n,a,o){let e=l=>{let d=l.anchor==="start"?t(l.v)+l.dx:t(l.v)+l.dx-o(l.v);return[d,d+o(l.v)]},r=l=>(e(l)[0]>=1?__gvLe(e(l)[1],n-1):!1),s=l=>({v:l.v,anchor:l.anchor==="end"?"start":"end",dx:-l.dx}),u=Math.min(...a.map(l=>l.v)),c=Math.max(...a.map(l=>l.v)),i=l=>((2)>(a.length)?!0:(e(l)[0]>=t(u)+7?__gvLe(e(l)[1],t(c)-7):!1)),m=[];for(let l of a){let d=r(l)?l:s(l);(((!r(d)?!0:(d!==l?!i(d):!1))?!0:m.some(p=>(__gvLt(e(p)[0],e(d)[1]+6)?__gvLt(e(d)[0],e(p)[1]+6):!1)))?!0:m.push(d))}return m}function Ir(t,n,a,o,e){let[r,s]=a.domain(),u=e.filter(l=>(r)>(l)),c=e.filter(l=>l>s),i=t.dark?it.darkSecondary:it.secondary,m=(l,d,p)=>{let b=`M${l},${o}l${-d*6},-5v10z`;n.append("path").attr("class",t.cls("off-scale")).attr("d",b).attr("fill",i).append("title").text(`${p} ${p===1?"value is":"values are"} ${(0)>(d)?"below":"above"} the axis range`)};(u.length?m(a(r)-2,-1,u.length):!1),(c.length?m(a(s)+2,1,c.length):!1)}function Br(t,n,a,o){let e=new Map,r=c=>((e.has(c)?!0:e.set(c,ft(t,[t.fmtValue(c)],12))),e.get(c)),s=0,u=0;for(let c=0;(4)>(c);c++){let i=0,m=0;for(let l of o.flat()){let d=n(l.v)+l.dx;l.anchor==="end"?i=Math.max(i,r(l.v)-d+2):m=Math.max(m,d+r(l.v)-a+2)}if(((.5)>=(i)?(.5)>=(m):!1))return;s=Math.min(a*.3,s+Math.max(0,i)),u=Math.min(a*.3,u+Math.max(0,m)),n.range([s,a-u])}}var Fe={paletteId:"",political:!1,background:"white",yFormat:{prefix:"",suffix:"",decimals:null},xFormat:{prefix:"",suffix:"",decimals:null},yFromZero:!0,yMin:null,yMax:null,valueLabels:!1,endDots:!0,imageFill:null,width:"column",height:400,yLabel:"",xLabel:"",highlight:null,legend:"top",xFromZero:!1,xMin:null,xMax:null,rightAxis:[],rightFormat:{prefix:"",suffix:"",decimals:null},rightLabel:"",rightFromZero:!0,donutHole:!0,partners:[],titleFont:"sans",swatch:"pebble",map:{method:"rounded",classes:5,breaks:[],palette:"seq-orange",reverse:!1,midpoint:null,continuous:!1,labels:!0,symbolMax:18,noDataLabel:"No data",thresholds:[],stops:[],colors:[],domain:null,categories:[],sizeTicks:[],projection:"equal-earth",sphere:!1,graticule:!1,center:[-30,20]}};var Nn=600;function Rn(t){var n;return{...t,style:{...Fe,...t.style,map:{...Fe.map,...(n=t.style)==null?void 0:n.map}}}}function In(t,n){var e;if(!n.size)return Le(t);let a=t.type==="combo"?t.data.series.flatMap((r,s)=>n.has(r.key)?s===0?[{...r,values:r.values.map(()=>null)}]:[]:[r]):t.data.series.filter(r=>!n.has(r.key)),o=(e=t.data.points)==null?void 0:e.filter(r=>{var s,u;return!n.has((u=r.group)!=null?u:(s=t.data.series[0])==null?void 0:s.key)});return Le({...t,data:{...t.data,series:a,points:o}})}function Le(t){if((t.type!=="line"?t.type!=="combo":!1))return t;let n=t.data.series.filter(s=>s.values.some(u=>u!==null));if((!n.length?!0:!n.every(s=>s.axis==="right")))return t;let a=t.data.series.map(s=>({...s,axis:"left"})),o=t.style,e=__gvOr(o.rightLabel,()=>((Hr(o.yFormat,o.rightFormat)?o.yLabel:""))),r={...o,yFormat:o.rightFormat,yFromZero:o.rightFromZero,yMin:null,yMax:null,yLabel:e,rightLabel:""};return{...t,style:r,data:{...t.data,series:a}}}function zr(t){if((t.type!=="line"?t.type!=="combo":!1))return!1;let n=(a,o)=>(a.axis==="right"?((t.type==="line"?!0:o>0)):!1);return __gvAnd(t.data.series.some(n),()=>(t.data.series.some((a,o)=>!n(a,o))))}function Or(t,n){return["bar","donut","dot","slope"].includes(t)?10:n?34:18}function Hr(t,n){var a,o;return __gvAnd(__gvAnd((t.prefix===n.prefix?t.suffix===n.suffix:!1),()=>(t.decimals===n.decimals)),()=>(((a=t.multiply)!=null?a:1)===((o=n.multiply)!=null?o:1)))}function jr(t,n,a,o=null){var L,A,D,C;let e=Rn(n),r=o?_e(o):null,s=new Set,u=`gv-${e.slug}`,c=P=>`${u}__${P}`,i=t.querySelector(`.${c("chart")}`),m=t.querySelector(`.${c("legend")}`),l=Ue(i,c("tooltip")),d=-1,p,b=0;(m==null?!0:m.addEventListener("click",P=>{let $=P.target.closest("[data-key]"),I=$==null?void 0:$.dataset.key;(I!==void 0?(s.has(I)?s.delete(I):((e.data.series.length-1)>(s.size)?s.add(I):!1),y()):!1)}));let y=()=>{var M,X,R,tt,J;b=0;let P=Math.floor(i.clientWidth);if((0)>=(P))return;let $=e.style.background==="white"?be(t):{color:null,dark:!1},I=$.dark;t.classList.toggle(`${u}--dark`,I),$.color?t.style.setProperty("--gv-halo",$.color):t.style.removeProperty("--gv-halo"),d=P,p=$.color;let O=(Nn)>(t.clientWidth);((M=i.querySelector("svg"))==null?!0:M.remove());let K=i.ownerDocument.createElementNS("http://www.w3.org/2000/svg","svg");i.insertBefore(K,i.firstChild);let at=a.select(K).attr("class",c("svg")).attr("width",P).attr("aria-hidden","true"),rt=Ae(e.type),st=rt?400:O?Math.min(e.style.height,360):e.style.height;at.attr("height",st);let U=In(e,s),Y=U.style.yFormat,_=U.style.rightFormat,k=_t(a,Y.prefix,Y.suffix,Y.decimals,Y.multiply),h=_t(a,_.prefix,_.suffix,_.decimals,_.multiply),v=_t(a,"","",Y.decimals,Y.multiply),G=T=>k.value(T),V=T=>v.value(T),z={d3:a,spec:U,base:u,root:t,chartEl:i,svg:at,width:P,height:st,mobile:O,dark:I,page:$.color,margin:{top:Or(e.type,!!((U.style.yLabel?!0:U.style.rightLabel))),right:14,bottom:30,left:40},id:T=>`${u}-${T}`,cls:c,fmtAxis:T=>G(T),fmtAxisBare:T=>V(T),setAxis:(T,lt)=>{let dt=U.style.yScale==="symlog"?{...Y,decimals:0}:Y;G=Lt(a,dt,T,lt),V=Lt(a,{...dt,prefix:"",suffix:""},T,lt)},fmtValue:k.value,fmtRightValue:h.value,rightAxis:(T,lt)=>Lt(a,_,T,lt),fmtFor:T=>T.axis==="right"?h.value:k.value,fmtX:qe(a,e,O),xAxis:(T,lt)=>Lt(a,e.style.xScale==="symlog"?{...e.style.xFormat,decimals:0}:e.style.xFormat,T,lt),color:T=>ct(U,T,I),tooltip:l,rightTitleY:14},Q=(rt?r:!1)?rn(r,e):r;rt?(Q?sn(z,m,e,Q):!1):ln(z,m,e,s);let j=__gvAnd(__gvAnd(__gvAnd((!rt?e.type!=="bar":!1),()=>(e.type!=="donut")),()=>(e.type!=="dot")),()=>(e.type!=="slope"));if((((j?U.style.yLabel:!1)?U.style.rightLabel:!1)?zr(U):!1)){let[T,lt]=[U.style.yLabel,U.style.rightLabel].map(dt=>ft(z,[dt],12));(T+lt+16>P?(z.rightTitleY=30,z.margin.top+=16):!1)}((U.style.yLabel?j:!1)?at.append("text").attr("class",c("axis-title")).attr("x",0).attr("y",14).text(U.style.yLabel):!1);try{let T=e.type;if(rt){if((!r?!0:r.id!==((X=e.data.map)==null?void 0:X.geo)))throw new Error("map geography missing");at.attr("height",an(z,Q))}else (T==="line"?!0:T==="area")?bn(z):((T==="column"?!0:T==="stacked")?!0:T==="combo")?Ln(z):T==="bar"?at.attr("height",(R=En(z))!=null?R:st):T==="scatter"?Pn(z):T==="donut"?at.attr("height",(tt=Gn(z))!=null?tt:st):T==="slope"?Vn(z):(T==="dot"?at.attr("height",(J=_n(z))!=null?J:st):!1);dn(z)}catch(T){at.selectAll("*").remove(),at.append("text").attr("class",c("ticks")).attr("x",0).attr("y",20).text("Chart could not be drawn."),console.error("[gristviz]",T)}},g=()=>{(b?!0:(b=requestAnimationFrame(y)))},w=new ResizeObserver(()=>{(Math.floor(i.clientWidth)!==d?g():!1)});w.observe(i);let B=()=>{((e.style.background==="white"?be(t).color!==p:!1)?g():!1)},F=new MutationObserver(B),E=t.ownerDocument;F.observe(E.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme"]}),(E.body?F.observe(E.body,{attributes:!0,attributeFilter:["class","style","data-theme"]}):!1);let H=(A=(L=E.defaultView)==null?void 0:L.matchMedia)==null?void 0:A.call(L,"(prefers-color-scheme: dark)");return((D=H==null?void 0:H.addEventListener)==null?!0:D.call(H,"change",B)),y(),((C=E.fonts)==null?!0:C.ready.then(()=>g())),{update(P){e=Rn(P);for(let $ of[...s])(e.data.series.some(I=>I.key===$)?!0:s.delete($));y()},destroy(){var P;w.disconnect(),F.disconnect(),l.destroy(),((P=H==null?void 0:H.removeEventListener)==null?!0:P.call(H,"change",B)),(b?cancelAnimationFrame(b):!1)}}}return Xn(qr);})(); function run(d3){var el=document.getElementById(ID);if(el)__gvRuntime.mount(el,SPEC,d3,GEO);} function fail(){var el=document.getElementById(ID);var c=el?el.querySelector("."+ID+"__chart"):null;if(c)c.textContent="This chart could not load. Try refreshing the page.";} function loadD3(){return new Promise(function(res,rej){ var s=document.createElement("script"),page=window.d3,mine,trap=false; try{Object.defineProperty(window,"d3",{configurable:true,enumerable:true, get:function(){return document.currentScript===s?mine:page;}, set:function(v){if(document.currentScript===s)mine=v;else page=v;}});trap=true;} catch(e){window.d3=undefined;} function settle(){if(trap){delete window.d3;if(page!==undefined)window.d3=page;}else{mine=window.d3;window.d3=page;}} s.src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.5/d3.min.js";s.integrity="sha384-su5kReKyYlIFrI62mbQRKXHzFobMa7BHp1cK6julLPbnYcCW9NIZKJiTODjLPeDh";s.crossOrigin="anonymous";s.async=true; s.onload=function(){settle();if(mine?mine.stack:!1)res(Object.assign({},mine));else rej(new Error("d3 did not load"));}; s.onerror=function(e){settle();rej(e);}; document.head.appendChild(s);});} var started=false; function go(){ if(started)return;started=true; if(window.d3?window.d3.stack?/^7\./.test(window.d3.version?window.d3.version:""):!1:!1){run(window.d3);return;} if(!window.__gvD3)window.__gvD3=loadD3(); window.__gvD3.then(run,fail); } if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",go);else go(); })();

It’s possible many of these proposed plants will never actually break ground; only about two dozen of the 74 proposed plants tagged by EIP are currently permitted for construction under the Clean Air Act. Yet if the recent supercharged data center build-out offers any indication, applications for new on-site facilities will continue to roll in.

“What we’re seeing is already striking, but it’s only a snapshot of a rapidly expanding industry,” said Gianluca Guidi, lead author of the Nature Sustainability study, in a statement. Forget 2 percent: The electricity and emissions estimates offered by his team “could already be substantially larger now in 2026.”

This story was originally published by Grist with the headline Data centers’ electricity use is soaring — especially in these states on Nov 20, 2026.

Categories: H. Green News

Is it OK to want a ‘normal life’ during the climate crisis?

Grist - Fri, 11/20/2026 - 01:30

“I would love to be a parent, but I worry it is unethical to bring children into a world that is wrecked by climate change.”

“It feels kind of silly to be bothering with working a normal job and planning for retirement in some distant future, given the overall circumstances.”

“Sometimes I feel hypocritical, working toward a better, more sustainable future while not fully reflecting those values in my own daily choices.”

“My partner and I are thinking about buying our first home together and becoming parents. How can I make plans for the future in a world that is unravelling?”

In the many questions we’ve received through the Ask a Climate Therapist form, I’ve noticed a theme running through several of them. People longing to have children, but grappling with the ethics of that decision. People wanting to enjoy occasional travel or an omnivorous diet, but feeling the sting of guilt. People hoping to plan for retirement or home ownership, but unsure how to reconcile those long-term visions with their fears and doubts about our climate future.

I’d sum it up like this: Knowing what we know about the climate crisis, and knowing that we each must do our part to contribute to a liveable future, is it OK to want to enjoy life, too?

Ask a Climate Therapist tackles your questions about how to navigate the emotional side of climate change, with leading climate-aware therapist Leslie Davenport. Have a question? Ask it here!

Climate change is a systemic problem, but the choices we make in our own lives still matter as we push for large-scale change. Some choices are more impactful than others — but it’s important to remember that guilt isn’t a very discriminating guide. 

A practice for distinguishing guilt from true impact

Pick one or more of the decisions that’s been bothering you or causing guilt. Sit with it for five quiet minutes and then ask:

  1. Whose voice is this?
    Sometimes guilt helps you see your true values. Sometimes it’s a voice you’ve internalized from a friend, a parent, a headline, or a stranger online.
  2. In reality, how large are my impacts?
    Do a little research — and remember to zoom out. Rather than agonizing over one flight, for instance, consider how often you’re flying and what guidelines you might want to set for yourself there, or elsewhere.
  3. Is it a one-time or built-in impact?
    Decisions that lock in years of extra emissions — like where you live and how you get around — are where personal choices matter the most.
  4. What does this choice offer me?
    Name it honestly: connection, security, rest, love. These personal values count.
  5. Is there a more sustainable option that also keeps alive the most meaningful connections?

    When a choice comes out heavy in impact and light in meaning, it’s worth changing. When it comes out light in impact and full of love, put the guilt down. Most choices land somewhere in between, and that’s where question five supports you the most. Keep what matters and adjust what you can: Buy the house and plan its first upgrades around efficiency. If you have kids, let raising them bring your family into your community’s climate efforts. When you’ve stopped agonizing over the decision, you can put the energy you’ve freed up where it counts the most: advocating within your sphere of influence, showing up for local policy meetings, voting, and talking honestly about climate with the people in your life.

    A warming world asks you to pursue your dreams more intentionally. It doesn’t require you to abandon them. A home, a family, time away — these things already look different for everyone, and what counts as “normal” or aspirational may shift, but the wish for a place to belong and people to love is an ancient human drive.

    I’d even go so far as to say that life is what we’re fighting to protect when we work for a healthier, safer, and more just future. 

    Rest, joy, and your love of life are what will make a lifelong commitment to the planet possible. In my experience, the people who stay engaged for decades always make time for what matters most to them. So take the trip and let yourself relax and rejuvenate. Love deeply. Then come home and continue to defend our planet, where your dedication will help shape the future for all of us.

    In this with you,
    Leslie

    I’m Leslie Davenport, a licensed therapist, educator, speaker, consultant, and internationally recognized voice on the emotional and psychological dimensions of climate change. If you’ve got a question about climate and mental health, please consider submitting it for a future column. Submit a question for a future Ask a Climate Therapist column More from Ask a Climate Therapist

    This story was originally published by Grist with the headline Is it OK to want a ‘normal life’ during the climate crisis? on Nov 20, 2026.

    Categories: H. Green News

    Russia, India, and Saudi Arabia Are Stalling a Key U.N. Climate Report

    Yale Environment 360 - Fri, 11/20/2026 - 01:19

    Experts are warning that political attacks on a critical scientific report could undermine the basis for future U.N. climate negotiations.

    Read more on E360 →

    Categories: H. Green News

    Mining Claims in Bears Ears and Grand Staircase-Escalante

    Southern Utah Wilderness Alliance - Fri, 11/20/2026 - 01:13
    Bears Ears National Monument Grand Staircase-Escalante National Monument

    The post Mining Claims in Bears Ears and Grand Staircase-Escalante appeared first on Southern Utah Wilderness Alliance.

    Categories: G2. Local Greens

    I Won’t Pretend These Missiles Are Stars – Review

    Red Pepper - Fri, 11/20/2026 - 00:00

    The Cartoonist Collective’s anthology on the 2025 aerial bombardment of Iran is painfully timely, writes Hank Kennedy

    The post I Won’t Pretend These Missiles Are Stars – Review appeared first on Red Pepper.

    Categories: F. Left News

    La Via Campesina calls for the immediate release of Palestinian farmer and land defender Ghassan Najjar

    His work includes helping farmers protect and reach their land, organising mutual support during the olive harvest, and strengthening community life in Burin.

    The post La Via Campesina calls for the immediate release of Palestinian farmer and land defender Ghassan Najjar appeared first on La Via Campesina - EN.

    “Grand Theft Antalya:” A climate heist, or should we stop expecting COPs to call time on fossil fuels?

    Renew Economy - Thu, 11/19/2026 - 20:05

    A global compact on phasing out fossil fuels seems increasingly unlikely as COP31 crawls to a close. But there's still hope for a quiet victory on electrification.

    The post “Grand Theft Antalya:” A climate heist, or should we stop expecting COPs to call time on fossil fuels? appeared first on Renew Economy.

    Energy Insiders Podcast: On the ground at COP31

    Renew Economy - Thu, 11/19/2026 - 20:02

    IGCC's Anna Hancock offers on-the-ground insight into what has – and hasn't – been happening at COP31. Plus news of the week with David Leitch and Peter Hannam.

    The post Energy Insiders Podcast: On the ground at COP31 appeared first on Renew Economy.

    SUWA Statement on Senate Passage of Bipartisan American Affordability and Jobs Act (BAAJA) – 11.19.26 

    Southern Utah Wilderness Alliance - Thu, 11/19/2026 - 19:57

    November 19, 2026 – FOR IMMEDIATE RELEASE

    SUWA Statement on Senate Passage of Bipartisan American Affordability and Jobs Act (BAAJA) – 11.19.26  Bill would gut bedrock environmental laws that protect Southern Utah’s wildest places 

    Contacts:
    Grant Stevens, Campaigns and Communications Director, Southern Utah Wilderness Alliance (SUWA); (319) 427-0260; grant@suwa.org

    Washington, DC – Today, the US Senate voted 62-33 to pass the Bipartisan American Affordability and Jobs Act of 2026 (BAAJA), which is being championed by Senators Mike Lee (R-UT), Shelley Moore Capito (R-WV), Sheldon Whitehouse (D-RI), and Martin Heinrich (D-NM). Below is a statement from SUWA Government Affairs Director Travis Hammill and additional information on the bill’s potential impact on public lands in Southern Utah. 

    “Southern Utah’s wild places and cultural sites have endured because generations of Americans fought for the environmental and historic preservation laws that protect them. While the Senate has chosen to advance legislation that undermines those protections, the House of Representatives has the chance to reject this misguided approach. We are grateful for the Senators who voted no, including Sen. Dick Durbin (D-IL) and all co-sponsors of America’s Red Rock Wilderness Act,” said Travis Hammill, Government Affairs Director at the Southern Utah Wilderness Alliance (SUWA). “This fight is not over. The House of Representatives now has a responsibility to stop these attacks on public participation, environmental review, Tribal sovereignty, and our clean air and water. We encourage everyone who values our public lands and democratic process to make their voices heard and urge their Representative to vote no.” 

    Additional information: 
    Here’s just a few ways the bill would impact Southern Utah’s wildest public lands: 

    • It will lock in harmful development projects on public lands, preventing future administrations from taking any action on these permitted projects even if those projects were approved illegally. This includes permits for data centers, oil and gas drilling approvals, and hard rock mining authorizations. In Bears Ears and Grand Staircase-Escalante National Monuments, this bill could preclude future administrations from taking corrective action on the over 200 mining claims filed on lands within the original boundaries of the monuments that President Trump unlawfully cut by nearly 90%. The bill will also make it extremely difficult for the public to challenge development of those mining claims, permanently greenlighting endless development and harm for these iconic landscapes.  
    • It will undermine Tribal sovereignty while threatening sacred and irreplaceable cultural sites. Southern Utah holds tens of thousands of cultural sites reflecting thousands of years of human history. The bill effectively rewrites provisions of the National Historic Preservation Act to diminish or preclude protection of important cultural sites, make consultation with Tribes and communities optional and withdraw effective court remedies to prevent irreparable damage to cultural sites. 
    • It will fast-track the already rapid acceleration of data center proposals on public lands. In Utah and across the country, communities are demanding greater transparency and input as data centers are rapidly built. Proposals like Project Beehive in Carbon County have many unanswered questions about their legality and potential impacts, but would be expedited if the bill passed.   
    • Decreases transparency in decision making by narrowing the projects subject to environmental review under the National Environmental Policy Act (NEPA) and limiting the public’s ability to review and comment on projects that impact public lands. 

    ### 
    The Southern Utah Wilderness Alliance (SUWA) is a nonprofit organization with members and supporters from around the country dedicated to protecting America’s redrock wilderness. From offices in Moab, Salt Lake City, and Washington, DC, our team of professionals defends the redrock, organizes support for America’s Red Rock Wilderness Act, and stewards a world-renowned landscape. Learn more at www.suwa.org. 

    The post SUWA Statement on Senate Passage of Bipartisan American Affordability and Jobs Act (BAAJA) – 11.19.26  appeared first on Southern Utah Wilderness Alliance.

    Categories: G2. Local Greens

    “100 towers raised:” State ticks off major transmission milestones, kicks off helicopter wire stringing

    Renew Economy - Thu, 11/19/2026 - 19:39

    State's build-out of major new transmission projects hits important milestones, including 100 transmission towers in a REZ, and next-stage works at HumeLink East.

    The post “100 towers raised:” State ticks off major transmission milestones, kicks off helicopter wire stringing appeared first on Renew Economy.

    Senate Democrats join Republicans to effectively repeal nation’s bedrock environmental laws; “permitting reform” bill now moves to House

    Western Environmental Law Center - Thu, 11/19/2026 - 19:12

    Today, the U.S. Senate voted 62-33 to pass the most damaging environmental and community protection rollback in American history. The Bipartisan American Affordability and Jobs Act (BAAJA) now advances to the House of Representatives. The Senate rushed to pass the bill—written in secret and only released to the public and even other legislators on September 30, 2026—without holding a single committee hearing. Bill sponsors inserted BAAJA into H.R. 2347, the Survivor Justice Tax Prevention Act, replacing a bill intended to protect victims of sexual assault, to circumvent the committee hearing process.

    BAAJA would cause grave, generational harm to the West’s public lands, waters and wildlife, and communities. It would functionally repeal the National Environmental Policy and Historic Preservation Acts by depriving the courts of the power to vacate unlawful permits or otherwise take action to prevent the irreparable harm caused by unlawfully approved permits, turning the U.S. Magna Carta of environmental laws into a paper tiger. Compounding the damage, BAAJA would impinge on the right of states and Tribes to protect their rivers, streams, and wetlands by virtue of severely weakening the Clean Water Act. Further, it would weaken the Endangered Species Act, making it far harder for the federal government to conserve and restore imperiled species in the face of uncertainty caused, for example, by climate change. Outside the traditional domain of environmental law, BAAJA would accelerate Trump’s vanity projects such as the “triumphal arch” and White House “ballroom,” and remove barriers designed to impose meaningful consideration before building unwanted, cruel, and wasteful immigrant detention centers.

    Overall, the bill, by weakening these bedrock laws, would make it far easier to fast-track AI data centers as well as fossil fuel, mining, and other extractive infrastructure. Once these projects are approved, they would be difficult to unwind. BAAJA includes a “project certainty” provision that would strictly limit the ability of a future presidential administration to revisit Trump-era project approvals, even if that administration found the Trump administration had approved them unlawfully. Meanwhile, an additional “project certainty” provision would hobble the power of a future president to deprioritize fossil fuels and incentivize renewable infrastructure by prohibiting “disparate treatment” of fossil fuels, a legal concept noxiously pulled from anti-discrimination law. Many provisions of the bill can be found in far-right policy blueprint Project 2025.

    Senate Democrats supporting BAAJA contend that it is needed for renewable energy buildout. But President Trump has explicitly stated he will not approve wind energy projects even if he signs the bill into law. Further, the U.S. grid interconnection queue has shifted dramatically over the past two years, reversing a trend towards renewable power generation. In August 2024, 26% of the U.S. interconnection queue (based on potential generation) was for fossil fuels while, in August 2026, 51% of the queue was for fossil fuels–a function of data center demand growth.

    Democrats pushing the bill have also cited “affordability” as a main justification. This argument is wildly overstated. Rhodium, the analysis relied upon by BAAJA’s supporters, concluded that estimated median household electricity costs in 2035 would decline from $2,200 a year to $2,134 a year. This decline, roughly equivalent to the cost of one cup of coffee each month, is indistinguishable from normal price fluctuations from weather. Meanwhile, we are unaware of any analysis that estimates the vast profits for AI technology, energy, and finance interests, which could likely reach into the hundreds of billions of dollars.

    BAAJA is widely and fiercely opposed by Tribes and Indigenous groups, state attorneys general, and advocacy organizations focusing on environmental justice, climate, public lands, ocean conservation, civil rights, faith, immigration, human rights, archaeology, and public health. Even outdoor retailers including REI and Patagonia took the extraordinary step of publicly opposing BAAJA. Key BAAJA proponents include the American Petroleum Institute, Data Center Coalition, and National Mining Association.

    “We urge the House of Representatives, in particular elected leaders who care about the West’s public lands, waters and wildlife, and communities to reject this bill. This is the single most important vote on environmental and community protections since our bedrock environmental laws were passed into law by overwhelming bipartisan majorities in the 1970s. We are watching,” said Erik Schlenker-Goodrich, executive director of the Western Environmental Law Center. “There is a constructive conversation to be had in the 120th Congress to build out renewables infrastructure and deliver on the promise of affordability, while respecting people and place through thoughtful updates to NEPA and other permitting laws. That conversation should proceed through regular order to bring new ideas to the table and ensure all voices are heard.”

    A coalition of 29 groups in Sen. Heinrich’s home state of New Mexico with diverse focus areas including Indigenous, faith, children’s health, clean water, conservation, climate, and community issues sent him a letter opposing the bill last week. He ignored those constituents.

    New Mexico Gov.-elect Deb Haaland as well as Reps. Melanie Stansbury and Teresa Leger Fernàndez vocally oppose BAAJA. New Mexico Attorney General Raúl Torrez led a group of six state attorneys general in a letter opposing the bill.

    Contacts:
    Erik Schlenker-Goodrich, Western Environmental Law Center, 575-751-0351, eriksg@westernlaw.orgMarlyn Twitchell, Western Environmental Law Center, 541-485-2471, ext. 144, twitchell@westernlaw.org

    Resources:

    • Veteran Attorney David Bookbinder excoriates BAAJA as a threat to American democracy in a memo here.
    • A national Earthjustice poll found that “Given a choice, 77% of voters said the U.S. should maintain existing laws that protect the environment and public health even if some projects take longer to build. Only 23% preferred building faster if it meant weakening environmental laws.”

    Groups that have publicly opposed BAAJA:

    Indigenous and Tribal
    Indigenous Environmental Network; Honor the Earth; Western Shoshone Defense Project; Indigenous Lifeways; Native American Rights Fund; The Klamath Tribes’ Culture and Heritage Department; National Congress of American Indians; Diné Citizens Against Ruining Our Environment; New Mexico Native Vote; Sovereign Energy; Naeva

    Civil rights, democracy and progressive groups
    ACLU, NAACP, Black Voters Matter Fund; Our Revolution; Progressive Democrats of America; Muslims for Just Futures; Grassroots Global Justice Alliance; New York Communities for Change; Common Ground Rising; People Power United; Community Alliance for Global Justice; Black Lives Matter Louisville; Veterans For Peace (Baltimore chapter); Environmental Issues Team of Indivisible Santa Cruz County; Center for Civic Policy; New Mexico Voices for Children; The Semilla Project; ProgressNow New Mexico

    Faith groups
    Unitarian Universalist Association; Unitarian Universalist Service Committee; Unitarian Universalists for Social Justice; GreenFaith; Creation Justice Ministries; Dayenu: A Jewish Call to Climate Action; Mennonite Central Committee U.S.; Virginia Interfaith Power & Light; Church Women United in New York State; Unitarian Universalist Action New Hampshire; Maine Unitarian Universalist State Advocacy Network; New Mexico Interfaith Power & Light

    Consumer and public interest
    Consumer Federation of America; Center for Progressive Reform; New York Public Interest Research Group; Virginia Citizens Consumer Council; Green America; Green Amendments For The Generations; Private Equity Stakeholder Project; Income Movement; Center for Organizing; Next 100 Coalition

    Technology and media
    AI Now Institute; Free Press Action; MediaJustice; Media Alliance; TechTonic Justice; Labor Tech Research Network; Progressive Technology Project; Until Justice Data Partners

    Health and labor
    National Nurses United; Physicians for Social Responsibility; San Francisco Bay Physicians for Social Responsibility; Oregon Physicians for Social Responsibility; Science and Environmental Health Network; AFGE Local 704; Therapists for Peace & Justice

    Mining and land use
    Great Basin Resource Watch; Arizona Mining Reform Coalition; Basin and Range Watch; Patagonia Area Resource Alliance; Save the Scenic Santa Ritas Association; Gila Resources Information Project; Citizens to Protect Smith Valley, NV

    Conservation, wildlife and forests
    Center for Biological Diversity; Defenders of Wildlife; Southern Environmental Law Center; Western Environmental Law Center; WildEarth Guardians; Western Watersheds Project; Southern Utah Wilderness Alliance; Great Old Broads for Wilderness; Wilderness Watch; Conservation Northwest; Idaho Conservation League; Cascadia Wildlands; Oregon Wild; Oregon Natural Desert Association; Rocky Mountain Wild; San Juan Citizens Alliance; Alliance for the Wild Rockies; Friends of the Clearwater; Friends of the Boundary Waters Wilderness; Southeast Alaska Conservation Council; Cook Inletkeeper; CalWild; Los Padres ForestWatch; Friends of the Inyo; Environmental Protection Information Center; Sierra Forest Legacy; Greater Hell’s Canyon Council; Central Oregon Land Watch; Cascade Forest Conservancy; Think Wild; Bird Alliance of Oregon; Rewilding Institute; Predator Defense; Save the Yellowstone Grizzly; Yellowstone to Uintas Connection; Wyoming Wilderness Association; Wildlife for All; Wild Connections; Wilderness Workshop; Sheep Mountain Alliance; San Luis Valley Ecosystem Council; Santa Fe Forest Coalition; Gallatin Wildlife Association; John Muir Project; Dogwood Alliance; Turtle Island Restoration Network; Scenic America; Izaak Walton League (Minnesota Division); Conservation Congress; Montana Environmental Information Center; Klamath-Siskiyou Wildlands Center; Xerces Society for Invertebrate Conservation; Native Fish Society; Umpqua Watersheds; Soda Mountain Wilderness Council, Mid-Willamette Bird Alliance; Coast to Cascades Bird Alliance; Kalmiopsis Audubon; Bark

    Climate, energy and fossil fuels
    Greenpeace USA; Friends of the Earth US; Oil Change International; Food & Water Watch; Earthworks; U.S. Climate Action Network; Third Act; Third Act Faith; Third Act Georgia; Fridays for Future USA; Progressives for Climate; Beyond Extreme Energy; Oil and Gas Action Network; Frack Action; Stop the (Constitution) Pipeline; Compressor Free Franklin; Elmirans and Friends Against Fracking; Santa Cruz Climate Action Network; Long Beach Alliance for Clean Energy; Clean Energy Action; Sane Energy Project; Climate Defenders; Extinction Rebellion SWCT; Climate Families NYC; Youth United for Climate Crisis Action; No False Climate Solutions PA; Climate Conversation Brazoria County; Sunflower Alliance; Institute for Policy Studies Climate Policy Program; Partnership for Policy Integrity; Property Rights and Pipeline Center; Sustain SJ; 350 Bay Area Action; 350 Yakima Climate Action; 350Hawaii; 350PDX; 350 Conejo/San Fernando Valley; 350 Triangle; 350Brooklyn; SanDiego350; Natural Resources Defense Council; Sierra Club; Breach Collective

    Environmental justice and community and data center groups
    Climate Justice Alliance; WE ACT for Environmental Justice; GreenLatinos; Center on Race, Poverty, and the Environment; Center for Community Action and Environmental Justice; Central California Environmental Justice Network; Michigan Environmental Justice Coalition; NC Environmental Justice Network; NC Climate Justice Collective; NC Alliance to Protect Our People and the Places We Live; Environmental Justice Task Force; Flint Rising; Port Arthur Community Action Network; Mossville Environmental Action Now; RiSE for Environmental Justice; West End Revitalization Association; Vessel Project of Louisiana; Multicultural Alliance for a Safe Environment; Cherokee Concerned Citizens; Environmental Advocates Mississippi; Rural Arizona Action; Clean Air Council; Clean Air Coalition of Western New York; Bucks Environmental Action; HALT Taylor Data Centers; No Data Center 502; No Landover Data Center Movement; Oregon Data Center Defiance; Washington AI Resistance; Kentuckians for the Commonwealth; Citizens Caring for the Future

    Water, rivers and oceans
    Oceana; Waterkeeper Alliance; American Rivers; Conservation Law Foundation; Delaware Riverkeeper Network; Milwaukee Riverkeeper; Columbia Riverkeeper; Save Our Wild Salmon Coalition; Columbia Riverkeeper; Association of Northwest Steelheaders; Clean Water for North Carolina; WaterLegacy; Great Egg Harbor Watershed Association; Lower San Pedro Watershed Alliance; Norton Bay Watershed Council; Black Hills Clean Water Alliance; Bitterroot River Protection Association; Seneca Lake Guardian; Tualatin Riverkeepers; The Water Collaborative of New Orleans; International Marine Mammal Project (Earth Island Institute); WaterWatch of Oregon; Willamette Riverkeeper; The Ocean Project; Inland Ocean Coalition; Waterspirit; Amigos Bravos; New Mexico Acequia Association

     

    The post Senate Democrats join Republicans to effectively repeal nation’s bedrock environmental laws; “permitting reform” bill now moves to House appeared first on Western Environmental Law Center.

    Categories: G1. Progressive Green

    Fire service thanks wind farm workers for “quick action” on neighbouring hay shed fire

    Renew Economy - Thu, 11/19/2026 - 18:46

    Country Fire Service praises the "quick action" of 20 wind farm workers from an un-named project for helping to prevent the spread of a hay-shed fire.

    The post Fire service thanks wind farm workers for “quick action” on neighbouring hay shed fire appeared first on Renew Economy.

    Growing Conservation, Community, and Opportunity at Audubon Center at Debs Park

    Audubon Society - Thu, 11/19/2026 - 18:44
    Restoring Habitat for Birds and PeopleDebs Park is an important urban refuge for birds, wildlife, and people. In a city shaped by development, habitat fragmentation, drought, and wildfire risk...
    Categories: G3. Big Green

    State orders rooftop solar switch-off, asks for patience, as wild storm cuts power to 24,000 properties

    Renew Economy - Thu, 11/19/2026 - 18:09

    Around 24,000 South properties have been cut off from power – and rooftop solar switched off – after a storm cell flattened transmission towers in state's south.

    The post State orders rooftop solar switch-off, asks for patience, as wild storm cuts power to 24,000 properties appeared first on Renew Economy.

    Black Oystercatchers and Their Beloved Rocky Intertidal: A Climate Q&A with Dan Orr

    Audubon Society - Thu, 11/19/2026 - 18:02
    Climate-threatened Black Oystercatchers don't just love the coast. They love a particular stretch of coastal habitat, from Alaska to Baja California. This "rocky intertidal" habitat they depend on...
    Categories: G3. Big Green

    Big batteries to boost reliability over summer, says AEMO, as extreme weather meets changing demand

    Renew Economy - Thu, 11/19/2026 - 17:36

    More than 6 GW of added big battery capacity will help Australia's electricity grids rise to the challenge of an El Niño-charged summer – with all eyes on impact of home batteries and EVs.

    The post Big batteries to boost reliability over summer, says AEMO, as extreme weather meets changing demand appeared first on Renew Economy.

    Produced water: Industry says science is settled. Two new white papers investigate significant knowledge and feasibility gaps

    Western Environmental Law Center - Thu, 11/19/2026 - 17:30

    Amigos Bravos offers reporters two new resources for tracking the produced water issue in New Mexico. The group commissioned two new white papers examining the risks to human health and environment and the feasibility of the reuse and discharge of treated oil and gas wastewater. The studies find significant shortcomings in scientific advancements and feasibility of treated produced water reuse and discharge.

    In 2025, the New Mexico Water Quality Control Commission (WQCC) adopted a rule prohibiting the discharge of treated produced water in the state and allowing its use in non-discharging pilot projects for research. Even before the rule went into effect in July 2025, an industry group petitioned the WQCC to undertake a new rulemaking to broadly allow treated produced water reuse and discharge to New Mexico’s rivers, streams, acequias, cropland, and ground water. WQCC voted to undertake this rulemaking to reverse the prohibition based on an assertion that New Mexico Produced Water Research Consortium (NMPWRC) research shows reuse is safe. Industry is also pushing for legislation that would require the WQCC to pass rules to allow discharge and reuse. A hearing has yet to be scheduled for 2027.

    The new white papers:

    Produced Water in New Mexico: A Critical Review of Recent Toxicity and Risk Assessment Literature

    Christopher Lewis, ScD, and Ann Jones, PhD, at Industrial Economics, Inc. Fact sheet here.

    The NMPWRC research represents progress on treatment technologies, yet even the authors of the studies acknowledge that work remains. A handful of small bench and pilot-scale studies, none reproduced independently and none addressing fate and transport, does not amount to a comprehensive or adequate risk evaluation. These substantial gaps mean that the safety to human health and the environment from discharge of treated produced water has not not been established and the discharge prohibition should be maintained while research continues.

    Beneficial Reuse of Treated Produced Water: Assessing Feasibility and Sustainability

    Dan Mueller, PE. Fact sheet here.

    Overall, beneficial reuse of treated produced water, while promising, is technically unproven, economically uncertain, and limited by unresolved sustainability concerns. The appropriate path forward is a deliberate, transparent, and independently evaluated process that establishes treatment performance, protects human health and the environment, demonstrates full-cost economic viability, and addresses long-term water-supply reliability and waste-management responsibility. Decisionmakers must rely on scientifically defensible, reproducible data—not assumptions—to avoid creating new environmental, public-health, or financial liabilities while attempting to address the oil and gas industry’s produced-water management challenges.

    Please reach out to Rachel Conn, and/or Tannis Fox with any questions.

    Contacts:

    Rachel Conn, Amigos Bravos, 575-770-8327, rconn@amigosbravos.org

    Tannis Fox, Western Environmental Law Center, 505-629-0732, fox@westernlaw.org

    The post Produced water: Industry says science is settled. Two new white papers investigate significant knowledge and feasibility gaps appeared first on Western Environmental Law Center.

    Categories: G1. Progressive Green

    Cross-border Collaboration to Protect Wintering Grassland Birds

    Audubon Society - Thu, 11/19/2026 - 16:16
    Team members from Audubon Southwest, Audubon Conservation Ranching, and Audubon Americas recently joined Bird Conservancy of the Rockies (BCR) and Mexican partners in Chihuahua City, Mexico for the...
    Categories: G3. Big Green

    Deep Dive on Medicare for All w/ Zero Hour’s Richard Eskow

    Green and Red Podcast - Thu, 11/19/2026 - 15:55
    According to recent polls, 66% of U.S. adults favor a national health plan (“Medicare for All”) in which all Americans receive insurance from a single government plan. Yet, the issue…
    Categories: B4. Radical Ecology

    Announcing: Rowe Sanctuary Crane Viewing Season & Special Guest Illustrator Rosemary Mosco

    Audubon Society - Thu, 11/19/2026 - 15:17
    Starting on December 2nd, visitors can begin planning their visit to Rowe Sanctuary by previewing the unique programming offered throughout Crane Season 2027. This year’s programming includes daily...
    Categories: G3. Big Green

    Pages

    The Fine Print I:

    Disclaimer: The views expressed on this site are not the official position of the IWW (or even the IWW’s EUC) unless otherwise indicated and do not necessarily represent the views of anyone but the author’s, nor should it be assumed that any of these authors automatically support the IWW or endorse any of its positions.

    Further: the inclusion of a link on our site (other than the link to the main IWW site) does not imply endorsement by or an alliance with the IWW. These sites have been chosen by our members due to their perceived relevance to the IWW EUC and are included here for informational purposes only. If you have any suggestions or comments on any of the links included (or not included) above, please contact us.

    The Fine Print II:

    Fair Use Notice: The material on this site is provided for educational and informational purposes. It may contain copyrighted material the use of which has not always been specifically authorized by the copyright owner. It is being made available in an effort to advance the understanding of scientific, environmental, economic, social justice and human rights issues etc.

    It is believed that this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit to those who have an interest in using the included information for research and educational purposes. If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner. The information on this site does not constitute legal or technical advice.