You are here

News Feeds

South Dakota’s Prairie Fest 2026

Audubon Society - Thu, 10/15/2026 - 07:48
If you spend a day on the South Dakota prairie with its rustling grasses, bright blooms, open skies, and rich wildlife, then it’s easy to understand why so many people are passionate about...
Categories: G3. Big Green

AEP in deal to buy up to 1.6 GW of Mainspring linear generators

Utility Dive - Thu, 10/15/2026 - 07:47

Separately, American Electric Power expects to spend about $4 billion on a 702-MW Bloom Energy fuel cell project in Wyoming that is under contract to Google.

EA issues revised Burniston fracking assessment

DRILL OR DROP? - Thu, 10/15/2026 - 07:41

The Environment Agency (EA) has amended its much-criticised assessment of gas drilling and lower-volume fracking at Burniston in North Yorkshire.

The EA has corrected what it described as “drafting errors” in two key documents on an environmental permit.

It has now acknowledged “a small number of minor typographical errors and inconsistencies” and published revised versions.

However, analysis by DrillOrDrop has identified at least 58 changes in the updated draft decision document and more than 20 in the draft permit.

Many other local concerns about the documents remain.

The permit process at Burniston is the subject of an official complaint against the EA. The documents have also been strongly criticised by residents and campaigners, the local action group, Frack Free Coastal Communities, and Burniston Parish Council.

The EA was accused of inaccurate, inconsistent, contradictory and missing information. It was urged to withdraw its draft decision to approve the permit.

But the EA said its technical assessment was unchanged, despite the errors in the original documents.

Extract from Environment Agency website on Burniston environmental permit

DrillOrDrop will report separately on reaction to the revised permit documents. The environmental permit is a separate process from planning permission, which was formally refused for the Burniston proposal in May 2026.

Changes

DrillOrDrop used the EA’s list of changes (p3) to the 92-page draft decision document. We found:

  • At least 50 unique amendments
  • At least a third of pages (30) had amendments
  • Two pages each had at least five changes and another page had at least four
  • One section comprising five-and-a-half pages had at least15 amendments

In the 30-page draft permit, again using the EA’s list of changes, we found:

  • At least 20 unique amendments
  • At least a third of pages had amendments (10)
  • One page had four changes, all in one section
  • Another two pages each had three changes

The EA’s lists of changes refer to additional amendments to key terms that had been made throughout both the draft decision document and draft permit.

These, and many of the listed amendments, are not always easy to find in the revised versions. We found:

  • Page numbers in the list of changes did not always match the pages in the new draft decision document
  • Some amended paragraphs were numbered in the list but not in the document
  • Some terms listed as amended throughout the draft decision document appeared in different forms in the list and the original document
  • Some terms listed as amended throughout the draft decision document did not appear in searches of the original

Some of the amendments were basic corrections. These include the use of the term “oil-based” fracturing fluid and the naming of the target rock formation as within the Kirkham Abbey Formation.

Other amendments were more complicated and potentially contentious, particularly about the proposed lower-volume fracking operation.

Fracking

The term fracking appeared in the EA text in the original draft decision document but was removed from this section in the revised version.

“Fracking” has been used by residents, at least once by the would-be Burniston operator Europa Oil & Gas and by the EA in the permitting process for another site. A legal opinion by a KC has confirmed that the Burniston operation qualified as fracking.

The revised draft decision document now widely refers to the proposed operation as proppant squeeze. But most references in the document to “proppant fluid” have been replaced with “hydraulic fracture fluid”. A new definition has been added for “carrier fluid”, also called hydraulic fracture fluid.

The EA’s revised draft decision document continues to state that a “small” volume of hydraulic fracture fluid would be used at Burniston. We previously asked the EA to define “small”. It said “small” would be removed from the revised document.

The draft decision document also retains the statement that high -volume associated hydraulic fracturing, currently subject to a moratorium in England, “typically involves the injection of thousands of cubic meters of fluid”.

The EA does not give an example of a fracking site using this volume of fluid.

The most recent high-volume fracks in England were at Preston New Road in Lancashire in 2018 and 2019. Both operations induced multiple earthquakes. The 2019 fracks, which led to the moratorium, used a total of 2,485m3 of fluid in seven fracking stages, with an average volume of 354m3 per stage.

Europa Oil & Gas has said it intends to use 300m3-500m3 per stage (p25) with up to four stages. This would potentially use a total volume of 2,000m3.

Extended consultation

The EA has said “In the interests of transparency and openness” it has extended the consultation until 21 October 2026.

But DrillOrDrop understands local organisations are calling for more time to review the updated documents. We will report on any further change to the consultation period and to reaction to the EA’s revisions.

Categories: G2. Local Greens

Best Buy pilots battery-powered vehicles at California distribution sites

Utility Dive - Thu, 10/15/2026 - 07:32

The retailer deployed electric yard switchers as part of its efforts to curb emissions and will gauge future deployment potential across its supply chain, it said.

Grow EKY Loan Fund: Supporting the Businesses Our Communities Depend On

Strong communities are built on essential services—the businesses that feed families, care for children, build homes, and help neighborhoods recover in times of crisis. Yet, these vital industries often face barriers when it comes to accessing flexible, affordable capital.  

That’s why we’re introducing the Grow EKY Fund, a financing initiative and support program designed to strengthen the businesses our communities rely on every day. 

This fund is specifically focused on businesses driving impact in four key areas:

  • Housing & skilled trades
  • Food access
  • Childcare
  • Disaster resiliency.

From neighborhood grocers and farmers to daycare providers, plumbers, electricians, and contractors, these are the businesses that keep communities functioning and growing. They are also critical to long-term stability, economic opportunity, and recovery. 

In addition to flexible financing with reduced fees, businesses supported through the fund can also access personalized, one-on-one guidance from experienced business coaches and industry experts. Whether it’s refining a business plan, improving financial management, navigating growth challenges, or preparing for unexpected disruptions, this hands-on support is designed to meet businesses where they are. Grow EKY businesses and organizations can also receive free energy assessments & five free hours of technical assistance for solar and efficiency upgrades.

By pairing funding with expert support, we’re investing in both the immediate needs and the future resilience of the businesses that keep our communities strong. 

Whether you’re launching, expanding, or adapting your business or nonprofit, the Grow EKY Fund is here to help you grow what matters most. Together, we can make our communities stronger, healthier, and more connected. 

Learn more at mtassociation.org/grow

The post Grow EKY Loan Fund: Supporting the Businesses Our Communities Depend On appeared first on Mountain Association.

Reliability standards for AI data centers, crypto miners move closer to adoption

Utility Dive - Thu, 10/15/2026 - 06:28

The proposed rules must still be approved by NERC’s board and federal regulators. As written, they would apply to computational loads of 50 MW or more connected at voltage levels of at least 100 kV.

Could dirty, salty wastewater quench data center thirst?

Anthropocene Magazine - Thu, 10/15/2026 - 05:20

Data centers have become a major flashpoint as midterm elections near in the United States. Besides their intensive energy use, they are drawing public ire for use of freshwater for to cool data centers.

But researchers at the University of Texas at Austin have an idea that could alleviate the stress on local freshwater resources. They propose using waste water from the oil and gas industry. Today’s desalination technologies could clean up dirty and salty water to produce clean-enough water for data center cooling needs, the team shows in a paper published in the journal Water Research.

“We’re not waiting for a futuristic technology to come along and solve this problem for us,” said mechanical engineering professor Vaibhav Bahadur in a press release. “We can solve parts of this problem with the technology we already have; there’s just a cost to it.”

Data centers underpin our modern digital economy. But they are highly energy-intensive. Their power needs are “equivalent to the electrical power draw of 1000 US households going into a computing unit the size of a bookshelf,” the team writes in the paper.

The heat this generates requires immense amounts of water for cooling. Data centers can consume millions of gallons of water a day. Meanwhile, the Permian Basin in West Texas produces about 8 billion gallons of waste water per day during oil and gas extraction. And “right now this water is transported over long distances and injected underground,” Bahadur said.

 

.IRPP_ruby , .IRPP_ruby .postImageUrl , .IRPP_ruby .centered-text-area {height: auto;position: relative;}.IRPP_ruby , .IRPP_ruby:hover , .IRPP_ruby:visited , .IRPP_ruby:active {border:0!important;}.IRPP_ruby .clearfix:after {content: "";display: table;clear: both;}.IRPP_ruby {display: block;transition: background-color 250ms;webkit-transition: background-color 250ms;width: 100%;opacity: 1;transition: opacity 250ms;webkit-transition: opacity 250ms;background-color: #eaeaea;}.IRPP_ruby:active , .IRPP_ruby:hover {opacity: 1;transition: opacity 250ms;webkit-transition: opacity 250ms;background-color: inherit;}.IRPP_ruby .postImageUrl {background-position: center;background-size: cover;float: left;margin: 0;padding: 0;width: 31.59%;position: absolute;top: 0;bottom: 0;}.IRPP_ruby .centered-text-area {float: right;width: 65.65%;padding:0;margin:0;}.IRPP_ruby .centered-text {display: table;height: 130px;left: 0;top: 0;padding:0;margin:0;padding-top: 20px;padding-bottom: 20px;}.IRPP_ruby .IRPP_ruby-content {display: table-cell;margin: 0;padding: 0 74px 0 0px;position: relative;vertical-align: middle;width: 100%;}.IRPP_ruby .ctaText {border-bottom: 0 solid #fff;color: #0099cc;font-size: 14px;font-weight: bold;letter-spacing: normal;margin: 0;padding: 0;font-family:'Arial';}.IRPP_ruby .postTitle {color: #000000;font-size: 16px;font-weight: 600;letter-spacing: normal;margin: 0;padding: 0;font-family:'Arial';}.IRPP_ruby .ctaButton {background: url(https://www.anthropocenemagazine.org/wp-content/plugins/intelly-related-posts-pro/assets/images/next-arrow.png)no-repeat;background-color: #afb4b6;background-position: center;display: inline-block;height: 100%;width: 54px;margin-left: 10px;position: absolute;bottom:0;right: 0;top: 0;}.IRPP_ruby:after {content: "";display: block;clear: both;}Recommended Reading:Scientists made an ultra-black wool. And it turns saltwater into drinking water

 

So why not put this water to cooling use at data centers? Besides the quantity, the quality of the water is also important. Freshwater needs to have less than 500 parts per million of dissolved solids.

The UT Austin team looked at how data centers could produce such relatively clean water using desalination. And they analyzed how desalination treatment choice influences cost and environmental impact.

They modeled the cost and energy trade-offs of treating various saline water sources, from mildly brackish groundwater to the much saltier water produced during oil and gas drilling. And they focused on two leading desalination technologies. One, called reverse osmosis, pushes water through membranes that block salt and impurities. The other is a heat-driven process, where water is evaporated, leaving impurities behind, and then the clean vapor is condensed and collected.

The team evaluated three data center deployment case studies. The model captured the “combined effect of cooling technique, local saline water conditions, geographic water stress, and brine disposal strategy on water availability,” they write.

Their results show that a project in Longview, Texas, which uses brackish groundwater treated via reverse osmosis came out with the lowest local water-stress score of the three. But the finding is much more general. Even the most energy-intensive desalination option consumed a fraction of a data center’s total energy demand.

Source: Vishnu Sree Shanthanu Katakam et al. System-scale design and analysis of desalination systems for meeting water needs of data centers. Water Research, 2026.

Image: ©Anthropocene Magazine

Spanish giant wins contracts for transmission projects to connect offshore and onshore renewables

Renew Economy - Thu, 10/15/2026 - 04:39

Spanish energy giant snags two major transmission contracts at opposite ends of Australia – one connecting offshore wind to the grid another to accommodate 2.3 GW of new solar and wind.

The post Spanish giant wins contracts for transmission projects to connect offshore and onshore renewables appeared first on Renew Economy.

Canada’s $430M for skilled trades training must go towards building tomorrow’s workforce

Pembina Institute News - Thu, 10/15/2026 - 04:03
OTTAWA — HANNAH HUNTER, senior analyst with the Pembina Institute’s Sustainable Workforce program, made the following statement in response to the federal government’s announcement of more than $430 million in apprenticeship training funding over the...

A new report just busted another myth about heat pumps

Grist - Thu, 10/15/2026 - 04:00

You may have heard by now that heat pumps — which transfer warmth from outdoor air to an indoor space, instead of generating it like a furnace — don’t work when it gets really cold out. That’s incorrect, as models designed for frigid climes can keep you toasty even in the dead of winter. Don’t believe me? Look no further than the Nordic countries, which have fully committed to them despite the region’s not-exactly-balmy winters.

OK, so heat pumps are more efficient than ever, which is why Americans seem to be warming up to the appliances. But surely, since they’re electric, switching to them en masse will push the grid to collapse? That’s also false. A new report from the energy thinktank RMI finds that thanks to “headroom” in the grid during the winter months, three-quarters of U.S. homes — some 109 million — could adopt the technology, no problem. That would significantly reduce greenhouse gas emissions and slash electric bills by over 20 percent in some states. 

“A substantial number of homes can upgrade to heat pumps within the headroom today,” said Ryan Shea, a manager in the organization’s buildings team. “We’d be better utilizing the grid capacity that’s already there, that essentially spreads those costs across more kilowatt-hours, and everyone benefits with a lower electricity rate.”

What is this headroom, exactly? It’s the difference between the grid’s generation capacity and demand in winter. Typically, the need for electricity is highest in the summer, when millions of air conditioners gobble tremendous amounts of power. In the winter, many folks instead heat their homes with gas furnaces, so they’re getting that energy elsewhere, relieving strain on the grid. This means that during colder months, there’s additional capacity to provide power. 

“That’s where we see moving to heat pumps, adding that electrical load in the winter, where there is all that available grid capacity, is a way to add load to the grid without needing to build it out more,” Shea said. In other words, keeping 109 million heat pumps running through the winter wouldn’t require, say, heaps of new gas-fired power plants.

This buffer, though, isn’t the same state to state or region to region. For one, climates are different: In Phoenix, summers are way hotter than in Boston, requiring more AC, with much milder winters, requiring less heating. How local utilities generate electricity matters, too. Gas power plants can run year-round, but with more solar coming online, generation dips in the winter as the days grow shorter. To compensate for this, utilities are building sprawling battery farms to store energy, and experimenting with using electric vehicles as a vast network of backup power. (They’re even using Earth itself as a giant battery for longer-duration storage.) Either way, renewables and batteries are combining to make the grid more reliable than it is with fossil fuels, and much more flexible no matter the time of year, further reducing costs for ratepayers.

Read Next The US may be hitting a tipping point for heat pumps

The ultimate goal is for heat pumps to replace fossil fuels as the dominant way of warming and cooling our homes. (Yes, heat pumps can cool a space by transferring warmth from inside to outside.) But they also need to replace electric resistance heating, like space heaters. These appliances are especially common in the Pacific Northwest and the Southeast, which endure less punishing winters than the Northeast. These giant toasters are, of course, a better option than a gas furnace, as they’re inherently more efficient and don’t poison homes. But heat pumps are around three to four times more efficient, meaning they require less electricity and therefore demand less from the grid. This could theoretically save households switching from resistance heating an average of $1,530 a year, according to RMI’s previous research.

So how can the U.S. accelerate its shift to heat pumps? For one, AC units that go kaput should be replaced with heat pumps. States can provide rebates to encourage people to make the switch. When a state puts its collective mind to it, the transition can happen faster than you think: Maine (again, another place not known for comfortable winters) blew past its goal of installing 100,000 heat pumps two years ahead of schedule. Oddly enough, simply building more apartments — tackling the housing crisis is a rare bit of agreement between Democrats and Republicans — is a sneaky way to get more heat pumps into units.

Instead of crashing the grid, then, heat pumps working in all American climates (even Alaska) will reduce electricity costs for owners — and rates overall — while making the system as a whole more flexible. As affordability dominates the conversation in American politics, the heat pump could well emerge as a superstar, a rare feat for an appliance. “We really think there’s a reason to include heat pumps within those affordability plans,” Shea said, “and try to really establish some heat pump installation goals.”

This story was originally published by Grist with the headline A new report just busted another myth about heat pumps on Oct 15, 2026.

Categories: H. Green News

Spring Radio: Education workers and the fight for decent public education

Spring Magazine - Thu, 10/15/2026 - 03:00

In the second episode of our mini-series on organized labour, Spring Radio takes a look at how some of the lessons learned in the previous...

The post Spring Radio: Education workers and the fight for decent public education first appeared on Spring.

Categories: B3. EcoSocialism

Arctic Wildlife Research Suffers as Geopolitical Competition Grows

Yale Environment 360 - Thu, 10/15/2026 - 02:09

As national security and the hunt for rare minerals come to dominate Arctic agendas, governments are slashing support for wildlife research. Scientists say the loss of monitoring is unprecedented and comes as climate change dramatically reshapes life in the Far North.

Read more on E360 →

Categories: H. Green News

Brazil’s election could determine the fate of the Amazon

Grist - Thu, 10/15/2026 - 01:45

Brazilians filling out presidential ballots earlier this month saw three-term incumbent Luiz Inácio Lula da Silva pitted against Senator Flávio Bolsonaro. Environmental observers saw something else: a referendum on the future of the Amazon rainforest.

“We are very serious about the risks for the Amazon if Flávio wins the election, because he is a climate denier,” said Carlos Nobre, a climate scientist currently at the University of São Paulo’s Institute for Advanced Studies. “If this candidate is elected, certainly deforestation in the Amazon will increase. We are in a very serious situation.”

Flávio Bolsonaro, son of imprisoned former president Jair Bolsonaro, is campaigning on an agribusiness-friendly, deregulatory agenda. In the first round of voting, he finished 2.2 million votes ahead of Lula. With neither candidate securing the requisite 50 percent needed to be declared the winner outright, the two will head to a runoff on October 25.

President Luiz Inácio Lula da Silva, left, and Senator and presidential candidate Flávio Bolsonaro in October 2026. Pablo Porciuncula / Mauro Pimentel / AFP vai Getty Images

Taken at face value, Bolsonaro and Lula would appear to have similar rainforest policies. Lula promises net-zero deforestation by 2030; Bolsonaro promises zero illegal deforestation by 2029. Legal is the operative term. Bolsonaro’s platform argues for an “agile, modern” environmental licensing process that “will no longer serve as a way to block those seeking to invest and create jobs.” 

Monica de Bolle, an economist at the Peterson Institute for International Economics, argues a Bolsonaro win would amount to a repeat of his father’s term, which saw an increase in clearing, a plummeting of environmental infraction notices, and a near doubling of carbon emissions in Amazonia in 2019 and 2020, compared to the average levels between 2010 and 2018.

Jair Bolsonaro “basically dismantled the enforcement structure,” de Bolle said. “Which is, I think, what would likely happen again.”

.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9{--gv-text:#3C3830;--gv-text-2:#747473;--gv-grid:#E0E0E0;--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-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 *{box-sizing:border-box} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 div,.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 span{margin:0;padding:0;font-size:inherit;line-height:inherit} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9.gv-br-draft-record-15dtzb9--dark{--gv-text:#F0EDE6;--gv-text-2:#B3ADA3;--gv-grid:#4A4640;--gv-halo:#1C1B19;--gv-axis:#B3ADA3} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__header{margin:0 0 12px} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__title{font-family:"PolySans", Arial, sans-serif;font-weight:500;font-size:24px;line-height:1.2;margin:10px 0 6px;padding:0;color:var(--gv-text);text-transform:none;letter-spacing:normal} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__subtitle{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-weight:500;font-size:18px;line-height:1.35;margin:0;padding:0;color:var(--gv-text)} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__hl{font-weight:700} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9.gv-br-draft-record-15dtzb9--dark .gv-br-draft-record-15dtzb9__hl--dk-primary{color:#F0EDE6!important} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9.gv-br-draft-record-15dtzb9--dark .gv-br-draft-record-15dtzb9__hl--dk-muted{color:#6B665E!important} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin:0 0 8px;padding:0;font-size:14px;line-height:1.2;color:var(--gv-text)} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__legend-item,.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__legend-item:hover,.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__legend-item:focus,.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__legend-item:active{display:inline-flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:6px;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-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 button.gv-br-draft-record-15dtzb9__legend-item,.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 button.gv-br-draft-record-15dtzb9__legend-item:hover{cursor:pointer} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 button.gv-br-draft-record-15dtzb9__legend-item:hover{text-decoration:underline;text-underline-offset:3px} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 button.gv-br-draft-record-15dtzb9__legend-item:focus-visible{outline:2px solid #3977F3;outline-offset:2px} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__legend-item--off{opacity:0.35} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__map-label{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:11px;font-weight:500;letter-spacing:0.02em} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__legend-label{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:12px;fill:var(--gv-text-2)} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__legend-key{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:14px;fill:var(--gv-text)} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__place{cursor:default} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__legend-axis{font-size:11px;color:var(--gv-text-2);margin-left:2px} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__swatch{display:block;flex:none;overflow:visible} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__chart{position:relative;width:100%;margin:0;padding:0} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 svg.gv-br-draft-record-15dtzb9__svg{display:block;overflow:visible;max-width:none;height:auto} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 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-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__ticks text{font-size:14px} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__cat-labels text{fill:var(--gv-text)} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__grid line{stroke:var(--gv-grid);stroke-opacity:0.7;shape-rendering:crispEdges} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__baseline{stroke:var(--gv-axis);stroke-width:1;shape-rendering:crispEdges} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__zero{stroke:#888888;stroke-width:1;stroke-dasharray:4 4} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__line{fill:none;stroke-linecap:round;stroke-linejoin:round} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__line-halo{fill:none;stroke:var(--gv-halo);stroke-width:7;stroke-linecap:round;stroke-linejoin:round} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__segment{stroke:var(--gv-halo);stroke-width:1} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__point{fill-opacity:0.85;stroke:var(--gv-halo);stroke-width:1} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__ring{fill:none;stroke:var(--gv-text);stroke-width:1.5} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__dot{stroke:var(--gv-halo);stroke-width:1.7} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__dot--pulse{transform-box:fill-box;transform-origin:center;animation:gv-br-draft-record-15dtzb9-pulse 1.6s ease-in-out infinite} @keyframes gv-br-draft-record-15dtzb9-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.2)}} @media (prefers-reduced-motion:reduce){.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__dot--pulse{animation:none}} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__value-label{font-size:12px;paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__axis-title{font-size:12px;fill:var(--gv-text-2)} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__direct-label{font-size:13px;font-weight:700;paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__donut-title{font-size:16px;font-weight:700;fill:var(--gv-text)} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__slice{stroke:var(--gv-halo);stroke-width:1.5} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__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-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__slope-head{font-size:14px;font-weight:700;fill:var(--gv-text)} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__slope-axis{stroke:var(--gv-grid);stroke-width:1} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__slope-line{stroke-linecap:round} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__slope-label{fill:var(--gv-text);paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__dumbbell{stroke:#C9C5BD;stroke-width:3;stroke-linecap:round} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9.gv-br-draft-record-15dtzb9--dark .gv-br-draft-record-15dtzb9__dumbbell{stroke:#6B665E} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__cat-label{fill:var(--gv-text)} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__overlay{fill:transparent;pointer-events:all} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__rule{stroke:var(--gv-text-2);stroke-width:1;stroke-dasharray:2 3} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__tooltip{position:absolute;display:none;pointer-events:none;z-index:5;min-width:120px;max-width:260px;padding:6px 9px;background:rgba(255,255,255,0.9);border:2px solid #888888;border-radius:4px;font-size:13px;line-height:1.35;color:#3C3830} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9.gv-br-draft-record-15dtzb9--dark .gv-br-draft-record-15dtzb9__tooltip{background:rgba(28,27,25,0.94);color:#F0EDE6} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__tip-title{font-weight:700;margin:0 0 3px} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__tip-row{display:flex;align-items:center;gap:6px} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__tip-row i{display:block;flex:none;width:10px;height:10px;border-radius:2px} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__tip-row span{flex:1} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__tip-row b{font-weight:700;white-space:nowrap} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__tip-more{color:var(--gv-text-2);font-size:12px;margin-top:2px} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__note{color:var(--gv-text-2);font-size:12px;font-style:italic;line-height:1.35;margin:8px 0 0;padding:0} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__footer{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:8px 0 0} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__credits{display:flex;flex-direction:column} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__source{color:var(--gv-text-2);font-size:12px;line-height:1.35;display:inline-block} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__credit{color:var(--gv-text-2);font-size:12px;line-height:1.35;margin-top:3px;font-style:italic;font-weight:700;display:inline-block} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__credit .gv-br-draft-record-15dtzb9__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-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__logo{display:block;height:auto;max-width:62px;min-width:50px;width:62px;margin:0 0 0 auto;padding:0;transform:translateY(-2px);overflow:visible} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__logo path{fill:var(--gv-text)} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__logos{display:flex;align-items:center;gap:14px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__logos .gv-br-draft-record-15dtzb9__logo{margin:0} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__partner{display:block;margin:0;padding:0;border:0;line-height:0} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__partner img{display:block;height:22px;width:auto;max-width:110px;margin:0;padding:0;border:0;box-shadow:none;object-fit:contain} .gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9.gv-br-draft-record-15dtzb9--dark .gv-br-draft-record-15dtzb9__partner--invert img{filter:brightness(0) invert(1)} @media (max-width:600px){.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__title{font-size:21px}.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__subtitle{font-size:16px}.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__legend{font-size:13px}.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__ticks text{font-size:12px}.gv-br-draft-record-15dtzb9#gv-br-draft-record-15dtzb9 .gv-br-draft-record-15dtzb9__logo{width:50px}} Up and down with Brasília Forest cleared each year in Brazil’s Legal Amazon, square miles Each year runs August to July and is assigned to the president who was in office for most of it. Source: INPE PRODES Clayton Aldern / Grist / gryffyn m / Unsplash (function(){ var K="__gv_br_draft_record_15dtzb9_initialized__";if(window[K])return;window[K]=true; var ID="gv-br-draft-record-15dtzb9"; var SPEC={"version":1,"slug":"br-draft-record-15dtzb9","type":"stacked","data":{"xKind":"year","x":[1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2023,2024,2025],"series":[{"key":"Jair Bolsonaro","label":"Jair Bolsonaro","color":"#3977F3","values":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,3911,4190,5034,4476,null,null,null]},{"key":"Lula","label":"Lula","color":"#F5515B","values":[null,null,null,null,null,null,9805,10723,7341,5516,4498,4985,2882,2703,null,null,null,null,null,null,null,null,null,null,null,null,3500,2517,2213]},{"key":"Other presidents","label":"Other presidents","color":"#C9C5BD","values":[5107,6712,6664,7037,7014,8359,null,null,null,null,null,null,null,null,2478,1765,2275,1935,2397,3048,2682,2910,null,null,null,null,null,null,null]}]},"text":{"title":"Up and down with Brasília","subtitle":"Forest cleared each year in Brazil’s Legal Amazon, square miles","note":"Each year runs August to July and is assigned to the president who was in office for most of it.","source":"Source: INPE PRODES","credit":"Clayton Aldern / Grist","altText":"Bar chart showing annual forest clearing in Brazil's Legal Amazon, 1997 to 2025, shaded by president. Deforestation peaked near 10,700 square miles in 2004 (early in Lula's first term), fell to about 1,800 by 2012, rose under Jair Bolsonaro to 5,000 in 2021, and fell under Lula to 2,200 in 2025."},"style":{"paletteId":"trio","political":true,"background":"white","yFormat":{"prefix":"","suffix":" sq mi","decimals":0},"xFormat":{"prefix":"","suffix":"","decimals":null},"yFromZero":true,"yMin":null,"yMax":null,"valueLabels":false,"endDots":true,"imageFill":{"mode":"all","opacity":0.65,"photos":{"*":{"url":"https://images.unsplash.com/photo-1602484894924-75eddc89d32b?w=1600\u0026q=80\u0026fm=jpg","photographer":"gryffyn m","via":"unsplash","page":"https://unsplash.com/photos/green-trees-on-brown-soil-axE5o1Xh7_Q","profile":"https://unsplash.com/@gryffyn1"}}},"width":"column","height":400,"yLabel":"","xLabel":"","highlight":null,"legend":"top","xFromZero":false,"xMin":null,"xMax":null,"rightAxis":[],"rightFormat":{"prefix":"","suffix":"","decimals":null},"rightLabel":"","rightFromZero":true,"donutHole":true,"partners":[],"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.2.0","createdAt":"","updatedAt":"","fallbackPngUrl":"","review":null}}; var GEO=null; function __gvTip(h){return h.replace(/\x3cdiv class="[^"]*"\x3e\x3ci style="background:transparent"\x3e\x3c\/i\x3e\x3cspan\x3eTotal\x3c\/span\x3e\x3cb\x3e[^\x3c]*\x3c\/b\x3e\x3c\/div\x3e/, "");} 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 te=Object.defineProperty;var hn=Object.getOwnPropertyDescriptor;var fn=Object.getOwnPropertyNames;var gn=Object.prototype.hasOwnProperty;var bn=(t,n)=>{for(var r in n)te(t,r,{get:n[r],enumerable:!0})},yn=(t,n,r,o)=>{if(((n?typeof n=="object":!1)?!0:typeof n=="function"))for(let e of fn(n))((!gn.call(t,e)?e!==r:!1)?te(t,e,{get:()=>n[e],enumerable:(!(o=hn(n,e))?!0:o.enumerable)}):!1);return t};var xn=t=>yn(te({},"__esModule",{value:!0}),t);var gr={};bn(gr,{MOBILE_BREAKPOINT:()=>mn,mount:()=>fr,primaryAxis:()=>de,visible:()=>pn});var kn=["map-states","map-counties","map-world","map-dots"];function ge(t){return kn.includes(t)}var be=["line","slope"];var wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",Mn=new Map([...wn].map((t,n)=>[t,n])),vn=10;function ee(t){let n=[],r=0,o=1;for(let e of t){let a=Mn.get(e);if(a===void 0)throw new Error("Unreadable map geography");r+=a%32*o,a>=32?o*=32:(n.push(r%2?-(r+1)/2:r/2),r=0,o=1)}return n}function $n(t,n){let r=ee(t),o=[],e=0,a=0,s=0;for(;(r.length)>(e);){let c=r[e++],i=[];for(let m=0;(c)>(m);m++)a+=r[e++],s+=r[e++],i.push([a/n,s/n]);o.push(i)}return o}function ye(t,n){let r=[];return n.forEach((o,e)=>{let a=o>=0?t[o]:[...t[-o-1]].reverse();for(let s=e?1:0;(a.length)>(s);s++)r.push(a[s])}),r}var xe=t=>String(Math.round(t*10)/10),ke=(t,n)=>t.length?`M${t.map(([r,o])=>`${xe(r)} ${xe(o)}`).join("L")}${n?"Z":""}`:"";function Cn(t){var e;let n=0,r=0,o=0;for(let a=0,s=t.length-1;(t.length)>(a);s=a++){let c=t[s][0]*t[a][1]-t[a][0]*t[s][1];n+=c,r+=(t[s][0]+t[a][0])*c,o+=(t[s][1]+t[a][1])*c}return n?{area:n/2,c:[r/(3*n),o/(3*n)]}:{area:0,c:(e=t[0])!=null?e:null}}function we(t){var h;let n=$n(t.arcs,(h=t.q)!=null?h:vn),r=!!t.sphere,o=ee(t.geoms),e=0,a=0,s=t.ids.map((f,b)=>{var F,G,y;let x=o[e++],g="",k=null,P=-1,N=[];for(let R=0;(x)>(R);R++){let _=o[e++],V=[];N.push(V);for(let S=0;(_)>(S);S++){let M=o[e++],I=[];for(let O=0;(M)>(O);O++)a+=o[e++],I.push(a);let B=ye(n,I);if(r){V.push(B);continue}if(g+=ke(B,!0),S===0){let{area:O,c:Y}=Cn(B);(Math.abs(O)>P?(P=Math.abs(O),k=Y):!1)}}}return{id:f,name:(F=t.names[b])!=null?F:f,code:(y=(G=t.codes)==null?void 0:G[b])!=null?y:"",d:g,anchor:k,...r?{polygons:N}:{}}}),c=f=>{var N;let b=ee(f),x=0,g=0,k=[],P=(N=b[x++])!=null?N:0;for(let F=0;(P)>(F);F++){let G=b[x++],y=[];for(let R=0;(G)>(R);R++)g+=b[x++],y.push(g);k.push(ye(n,y))}return k},[i,m,p]=[c(t.inner),c(t.outer),c(t.group)],l=f=>r?"":f.map(b=>ke(b,!1)).join("");return{id:t.id,w:t.w,h:t.h,features:s,inner:l(i),outer:l(m),group:l(p),...r?{sphere:!0,lines:{inner:i,outer:m,group:p}}:{}}}var mt={orange:"#F79945",turquoise:"#12A07F",fuchsia:"#AC00E8",azure:"#3977F3",earth:"#3C3830",red:"#F5515B"},nt={primary:"#3C3830",secondary:"#777777",grid:"#E0E0E0",muted:"#C9C5BD",darkPrimary:"#F0EDE6",darkSecondary:"#B3ADA3",darkGrid:"#4A4640",darkMuted:"#6B665E"},$e={white:"#FFFFFF",smog:"#F0F0F0",lavender:"#D3C8FF",celery:"#E6FFA0",sky:"#C5E0F7",butter:"#FFF1C7",blush:"#FFD6DA"};function Me(t,n,r){let o=t.replace("#",""),e=n.replace("#","");return`#${[0,2,4].map(s=>{let c=parseInt(o.slice(s,s+2),16),i=parseInt(e.slice(s,s+2),16);return Math.round(c+(i-c)*r).toString(16).padStart(2,"0")}).join("")}`.toUpperCase()}var bt=mt;var Dt="#D9D7D2",Pt="#3A3733",Ce="#EDEBE6",Te="#2E2B28",ve="#F5EDDA",Tn="#EF6C4A",Rt=t=>[Me(t,"#FFFFFF",.8),t.toUpperCase(),Me(t,"#000000",.45)],kr=[{id:"seq-orange",label:"Orange",kind:"sequential",stops:Rt(bt.orange)},{id:"seq-turquoise",label:"Turquoise",kind:"sequential",stops:Rt(bt.turquoise)},{id:"seq-azure",label:"Azure",kind:"sequential",stops:Rt(bt.azure)},{id:"seq-fuchsia",label:"Fuchsia",kind:"sequential",stops:Rt(bt.fuchsia)},{id:"div-turquoise-coral",label:"Turquoise to coral",kind:"diverging",stops:[bt.turquoise,ve,Tn]},{id:"div-azure-orange",label:"Azure to orange",kind:"diverging",stops:[bt.azure,ve,bt.orange]}];function re(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 Gt(t,n,r,o,e=1){let a=(i,m)=>`${(0)>(i)?"\u2212":""}${n}${m}${r}`;return{axis:(i,m)=>{let p=i*e>=1e4,l=((m?m:1))*e,h=i*e,f=p?t.formatPrefix(`.${o!=null?o:t.precisionPrefix(l,h)}`,h):t.format(`,.${o!=null?o:t.precisionFixed(l)}f`);return b=>{let s=(p?b===0:!1)?a(0,"0"):a(b,f(Math.abs(b*e)).replace("G","B"));return (r?Math.abs(Math.abs(b*e)-Math.floor(h/l+1e-9)*l)>l*1e-6:!1)?s.slice(0,-r.length):s}},value:i=>{let m=Math.abs(i*e),p=o!=null?o:Sn(m),l=t.format(`,.${p}~f`);return a(i,l(m))}}}function Sn(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 $t(t,n,r,o){let[e,a]=r,s=t.tickStep(e,a,o);return Gt(t,n.prefix,n.suffix,n.decimals,n.multiply).axis(Math.max(Math.abs(e),Math.abs(a)),s)}function Fe(t,n,r){let{xKind:o,x:e}=n.data,a=n.style.xFormat;if(o==="year")return s=>String(s);if(o==="number"){let s=Gt(t,a.prefix,a.suffix,a.decimals,a.multiply);return c=>s.value(Number(c))}if(o==="date"){let s=e.map(l=>String(l)),c=s.every(l=>l.endsWith("-01-01")),i=s.every(l=>l.endsWith("-01")),m=c?"%Y":i?r?"%b \u2019%y":"%b %Y":"%b %-d, %Y",p=t.utcFormat(m);return l=>p(l instanceof Date?l:new Date(String(l)+(String(l).length===10?"T00:00:00Z":"")))}return s=>String(s)}function Le(t){return new Date(String(t)+"T00:00:00Z")}function En(t,n){var r;return n?"#1A1A1A":(r=$e[t.style.background])!=null?r:"#FFFFFF"}function ne(t){let n=t.replace("#",""),r=n.length===3?n.split("").map(o=>o+o).join(""):n.slice(0,6);return[0,2,4].map(o=>__gvOr(parseInt(r.slice(o,o+2),16),()=>(0)))}function Fn([t,n,r]){return`#${[t,n,r].map(o=>Math.round(Math.max(0,Math.min(255,o))).toString(16).padStart(2,"0")).join("")}`.toUpperCase()}function zt(t,n,r){let o=ne(t),e=ne(n);return Fn(o.map((a,s)=>a+(e[s]-a)*r))}function Ht(t){let[n,r,o]=ne(t).map(e=>{let a=e/255;return (.03928)>=(a)?a/12.92:((a+.055)/1.055)**2.4});return .2126*n+.7152*r+.0722*o}function vt(t,n){let[r,o]=[Ht(t),Ht(n)].sort((e,a)=>a-e);return(r+.05)/(o+.05)}function Ln(t,n){if(!n)return t;let r=t.toUpperCase();return r===mt.earth?nt.darkPrimary:r===nt.muted.toUpperCase()?nt.darkMuted:t}var Se=.58,It=.45,An=.7,Ee=new Map;function Dn(t,n){let r=`${t}|${n}`,o=Ee.get(r);if(o)return o;let e=Ht(t),a=0,s=1/0;for(let m=0;(206)>=(m);m++){let p=-It+m/206*(It+Se),l=Math.abs(Ht((0)>(p)?zt(n,"#FFFFFF",-p):zt(n,"#000000",p))-e);((s)>(l)?([a,s]=[p,l]):!1)}let c=(a+It)/(It+Se),i=zt(n,"#FFFFFF",c*An);return Ee.set(r,i),i}function yt(t,n,r){var e;if(!r)return n;let o=(e=t.style.paletteId)!=null?e:"";if(o.startsWith("tonal-")){let a=mt[o.slice(6)];if(a)return Dn(n,a)}return Ln(n,r)}function at(t,n,r){var o,e;return yt(t,(e=(o=t.data.series[n])==null?void 0:o.color)!=null?e:mt.orange,r)}function xt(t,n,r,o=4.5){let e=En(t,r);if(vt(n,e)>=o)return n;let a=r?"#FFFFFF":"#000000";for(let s=.05;(1)>(s);s+=.05){let c=zt(n,a,s);if(vt(c,e)>=o)return c}return a}function Ot(t){return vt("#FFFFFF",t)>=4.5?"#FFFFFF":vt(nt.primary,t)>=4.5?nt.primary:vt("#FFFFFF",t)>=vt("#000000",t)?"#FFFFFF":"#000000"}var ae={w:975,h:610,scale:1300,x:487.5,y:305},Bt=ae.scale,Ae=ae.x,De=ae.y,Pe=[[Ae+.29*Bt,De+.17*Bt],[Ae+.41*Bt,De+.234*Bt]];function Ge(t,n){let r=t.querySelector(`.${n}`);(r?!0:(r=t.ownerDocument.createElement("div"),r.className=n,r.setAttribute("role","presentation"),t.appendChild(r)));let o=r,e=null,a=null,s=()=>{o.style.display="none"},c=m=>{((m===a?!0:!e)?!0:(m.pointerType==="touch"?(e(),e=null):!1))},i=t.ownerDocument;return i.addEventListener("pointerdown",c),{show(m,p,l){m=__gvTip(m);o.innerHTML=m,o.style.display="block";let h=o.offsetWidth,f=o.offsetHeight,b=t.clientWidth,x=p+14;(x+h>b?(x=p-h-14):!1),((0)>(x)?(x=Math.max(0,Math.min(b-h,p-h/2))):!1),o.style.left=`${x}px`,o.style.top=`${Math.max(0,l-f-12)}px`},hide:s,bind(m,p,l){let h=()=>{(l==null?!0:l()),s()};m.on("pointermove.gvtip",(f,b)=>p(f,b)).on("pointerdown.gvtip",(f,b)=>{((f.pointerType!=="touch"?f.pointerType!=="pen":!1)?!0:(a=f,e=h,p(f,b)))}).on("pointerleave.gvtip",f=>{(f.pointerType!=="touch"?h():!1)})},destroy(){i.removeEventListener("pointerdown",c)}}}function ct(t){return t.replace(/[\x26\x3c>"]/g,n=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;",'"':"\x26quot;"})[n])}function it(t,n,r,o){let e=a=>a.replace(/[\x26\x3c>]/g,s=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;"})[s]);return`\x3cdiv class="${t}">\x3ci style="background:${n}">\x3c/i>\x3cspan>${e(r)}\x3c/span>\x3cb>${e(o)}\x3c/b>\x3c/div>`}var Ve=["VT","NH","MA","RI","CT","NJ","DE","MD","DC"],Pn={CA:[80,318],FL:[790,534],ID:[192,163],KY:[703,315],LA:[562,460],MI:[683,199],NC:[816,350]},Gn=560;function Vn(t,n,r){var i,m,p;let o=t.style.map,e=n?Pt:Dt,a=(m=(i=t.data.series[0])==null?void 0:i.values)!=null?m:[],s=(p=t.data.map)==null?void 0:p.categories;if(s){let l=new Map(o.categories.map(h=>[h.name,h.color]));return h=>{var f;return (s[h]!==null?s[h]!==void 0:!1)?(f=l.get(s[h]))!=null?f:nt.muted:e}}if((o.continuous?o.stops.length>=2:!1)){let l=r.scaleLinear().domain(o.stops).range(o.colors).interpolate(r.interpolateLab).clamp(!0);return h=>(a[h]===null?!0:a[h]===void 0)?e:l(a[h])}if(!o.colors.length)return()=>e;let c=r.scaleThreshold().domain(o.thresholds).range(o.colors);return l=>(a[l]===null?!0:a[l]===void 0)?e:c(a[l])}function Ct(t,n){for(let[r,o]of Object.entries(n))t.style.setProperty(r,o,"important")}var _n=t=>{var o,e;let n=["th","st","nd","rd"],r=t%100;return`${t}${(e=(o=n[(r-20)%10])!=null?o:n[r])!=null?e:n[0]}`},_e=new WeakMap;function Nn(t,n){let r=t.width/n.w,o=n.features.map(e=>e.d).join("");return{height:Math.ceil(n.h*r),transform:`scale(${r})`,unit:1/r,d:e=>e.d,anchor:e=>e.anchor?[e.anchor[0]*r,e.anchor[1]*r]:null,land:()=>o,inner:()=>n.inner,outer:()=>n.outer,group:()=>n.group,sphere:()=>"",graticule:()=>""}}function Re(t,n){var i;if((t.sphere?!0:((i=n.data.map)!=null?i.pr:!1)))return t;let[[r,o],[e,a]]=Pe,s=m=>{let[p,l]=m.split("L")[0].split(" ").map(Number);return __gvAnd(__gvAnd((p>=r?(e)>=(p):!1),()=>(l>=o)),()=>((a)>=(l)))},c=m=>m.split("M").filter(p=>(p?!s(p):p)).map(p=>`M${p}`).join("");return{...t,features:t.features.filter(m=>!m.id.startsWith("72")),inner:c(t.inner),outer:c(t.outer),group:c(t.group)}}function Rn(t){let n=0;for(let r=0,o=t.length-1;(t.length)>(r);o=r++)n+=t[o][0]*t[r][1]-t[r][0]*t[o][1];return n}function In(t){let n=r=>(r.length>=4?Math.abs(Rn(r))>1e-6:!1);return t.features.map(r=>{var o;return{type:"MultiPolygon",coordinates:((o=r.polygons)!=null?o:[]).filter(e=>__gvAnd(e.length,()=>(n(e[0])))).map(e=>[e[0],...e.slice(1).filter(n)])}})}function Ne(t,n,r,o=In(n)){let{d3:e,spec:a}=t,s=a.style.map,c=s.projection==="globe",i={type:"GeometryCollection",geometries:o},m={type:"Sphere"},p,l;if(c)l=Math.min(t.width,Gn),p=e.geoOrthographic().rotate([r[0],r[1]]).fitExtent([[4,4],[t.width-4,l-4]],m);else{let x=(s.sphere?!0:s.graticule)?m:i;p=e.geoEqualEarth().fitWidth(t.width,x),l=Math.ceil(e.geoPath(p).bounds(x)[1][1])+1}let h=e.geoPath(p),f=new Map(n.features.map((x,g)=>[x.id,o[g]])),b=x=>{var g;return(g=h({type:"MultiLineString",coordinates:x}))!=null?g:""};return{height:l,transform:null,unit:1,d:x=>{var g;return(g=h(f.get(x.id)))!=null?g:""},anchor:x=>{let g=h.centroid(f.get(x.id));return (Number.isFinite(g[0])?Number.isFinite(g[1]):!1)?g:null},land:()=>{var x;return(x=h(i))!=null?x:""},inner:()=>{var x,g;return b((g=(x=n.lines)==null?void 0:x.inner)!=null?g:[])},outer:()=>{var x,g;return b((g=(x=n.lines)==null?void 0:x.outer)!=null?g:[])},group:()=>{var x,g;return b((g=(x=n.lines)==null?void 0:x.group)!=null?g:[])},sphere:()=>{var x;return(((c?!0:s.sphere))?(x=h(m))!=null:!1)?x:""},graticule:()=>{var x;return (s.graticule?(x=h(e.geoGraticule10()))!=null:!1)?x:""}}}function Ie(t,n){var H,X,E,u;let{d3:r,spec:o,svg:e}=t,a=o.data.map,s=o.style.map,c=(!!n.sphere?s.projection==="globe":!1),i=(H=s.center)!=null?H:[0,20],m=_e.get(t.chartEl),p=((m?m.center[0]===i[0]:!1)?m.center[1]===i[1]:!1)?m:{center:i,rotate:[-i[0],-i[1]]};_e.set(t.chartEl,p);let l=n.sphere?Ne(t,n,p.rotate):Nn(t,n),h=o.type==="map-dots",f=Vn(o,t.dark,r),b=(E=(X=o.data.series[0])==null?void 0:X.values)!=null?E:[],x=new Map(a.ids.map((d,T)=>[d,T]).filter(([d])=>d!==null)),g=b.map((d,T)=>[d,T]).filter(([d])=>d!==null).sort((d,T)=>T[0]-d[0]),k=new Map;g.forEach(([d,T],v)=>k.set(T,(v>0?g[v-1][0]===d:!1)?k.get(g[v-1][1]):v+1));let P=(u=t.page)!=null?u:t.dark?"#1A1A1A":"#FFFFFF",N=(d,T,v)=>Ct(d,{fill:"none",stroke:T,"stroke-width":`${v}px`,"vector-effect":"non-scaling-stroke","stroke-linejoin":"round","pointer-events":"none"}),F=t.id("map-shadow"),G=l.unit;e.append("defs").append("filter").attr("id",F).attr("x","-5%").attr("y","-5%").attr("width","110%").attr("height","110%").append("feGaussianBlur").attr("stdDeviation",2.5*G);let y=e.append("g").attr("class",t.cls("map"));(l.transform?y.attr("transform",l.transform):!1);let R=y.append("path").attr("class",t.cls("shadow")).attr("filter",`url(#${F})`).attr("transform",`translate(${2*G},${2.5*G})`);Ct(R.node(),{fill:t.dark?"#000000":mt.earth,opacity:"0.25",stroke:"none","fill-rule":"evenodd","pointer-events":"none"});let _=y.append("path").attr("class",t.cls("sphere"));Ct(_.node(),{fill:c?t.dark?"#23282C":"#EEF3F6":"none",stroke:t.dark?nt.darkMuted:nt.muted,"stroke-width":"0.75px","pointer-events":"none"});let V=y.append("path").attr("class",t.cls("graticule"));N(V.node(),t.dark?nt.darkGrid:nt.grid,.5);let S=(d,T)=>{var Z,Q;if(d===void 0)return`\x3cdiv class="${t.cls("tip-title")}">${ct(T)}\x3c/div>\x3cdiv class="${t.cls("tip-row")}">\x3cspan>No data\x3c/span>\x3c/div>`;let v=b[d],L=`\x3cdiv class="${t.cls("tip-title")}">${ct(o.data.x[d])}\x3c/div>`;(a.categories?(L+=it(t.cls("tip-row"),f(d),"Category",(Z=a.categories[d])!=null?Z:"None")):!1),(v!=null?(L+=it(t.cls("tip-row"),(a.categories?!0:h)?"transparent":f(d),o.data.series[0].label,t.fmtValue(v)),((!h?g.length>2:!1)?(L+=it(t.cls("tip-row"),"transparent","Rank",`${_n(k.get(d))} of ${g.length}`)):!1)):!1);for(let q of(Q=a.tips)!=null?Q:[])(q.values[d]?(L+=it(t.cls("tip-row"),"transparent",q.label,q.values[d])):!1);return L},M=y.append("g").selectAll("path").data(n.features).join("path").attr("class",t.cls("place")).each(function(d){let T=x.get(d.id);Ct(this,{fill:h?t.dark?Te:Ce:T===void 0?t.dark?Pt:Dt:f(T),stroke:"none","fill-rule":"evenodd"})}),I=y.append("path");N(I.node(),P,n.id==="us-counties"?.4:.75);let B=y.append("path");N(B.node(),P,1.2);let O=y.append("path").attr("class",t.cls("map-hover"));N(O.node(),t.dark?nt.darkPrimary:mt.earth,1.5),O.style("display","none");let Y=null;(h?!0:t.tooltip.bind(y,d=>{let T=d.target.__data__;if((!T?!0:!d.target.classList.contains(t.cls("place"))))return;let[v,L]=r.pointer(d,t.chartEl);Y=T,O.attr("d",l.d(T)).style("display",null),t.tooltip.show(S(x.get(T.id),T.name),v,L)},()=>{Y=null,O.style("display","none")}));let K=()=>{};if(h){let d=s.domain?Math.max(Math.abs(s.domain[0]),Math.abs(s.domain[1])):0,T=s.symbolMax*Math.min(1,t.width/600)*(t.mobile?.8:1),v=D=>(D===null?!0:!d)?3.5:Math.max(1.5,T*Math.sqrt(Math.abs(D)/d)),L=new Map(n.features.map(D=>[D.id,D])),Z=o.data.x.map((D,w)=>({i:w,r:v(b[w])})).sort((D,w)=>w.r-D.r),Q=D=>a.categories?f(D):mt.turquoise,q=n.sphere?1:t.width/n.w,et=D=>{var ut;let w=(ut=a.xy)==null?void 0:ut[D];if(w)return[w[0]*q,w[1]*q];let U=a.ids[D]?L.get(a.ids[D]):void 0;return U?l.anchor(U):null},A=e.append("g").selectAll("circle").data(Z).join("circle").attr("class",t.cls("symbol")).attr("r",D=>D.r).each(function(D){Ct(this,{fill:Q(D.i),"fill-opacity":d?"0.78":"0.9",stroke:P,"stroke-width":"0.75px"})});K=()=>A.each(function(D){var U,ut;let w=et(D.i);this.setAttribute("cx",String((U=w==null?void 0:w[0])!=null?U:0)),this.setAttribute("cy",String((ut=w==null?void 0:w[1])!=null?ut:0)),this.style.setProperty("display",w?"":"none")}),t.tooltip.bind(A,(D,w)=>{let[U,ut]=r.pointer(D,t.chartEl);t.tooltip.show(S(w.i,o.data.x[w.i]),U,ut)})}let tt=()=>{R.attr("d",c?l.sphere():l.land()),_.attr("d",l.sphere()),V.attr("d",l.graticule()),M.attr("d",d=>l.d(d)),I.attr("d",l.inner()),B.attr("d",l.group()),(Y?O.attr("d",l.d(Y)):!1),K()};if(tt(),c){let d=Math.min(t.width,l.height)/2,T=r.drag().on("drag",v=>{let L=75/d;p.rotate=[p.rotate[0]+v.dx*L,Math.max(-85,Math.min(85,p.rotate[1]-v.dy*L))],l=Ne(t,n,p.rotate),tt()});e.call(T).style("touch-action","none").style("cursor","grab")}if((o.type==="map-states"?s.labels:!1)){let d=e.append("g").attr("class",t.cls("map-labels")).style("pointer-events","none"),T=n.features.map(q=>({f:q,a:l.anchor(q)})).filter(q=>!!q.a),v=T.filter(q=>Ve.includes(q.f.code)).sort((q,et)=>q.a[1]-et.a[1]),L=(520)>(t.width),Z=(q,et,A,D,w)=>d.append("text").attr("class",t.cls("map-label")).attr("x",q).attr("y",et).attr("dy","0.35em").attr("text-anchor",A).style("fill",D).style("fill-opacity","0.8").text(w),Q=t.width/n.w;for(let{f:q,a:et}of T){if((!q.code?!0:Ve.includes(q.code)))continue;let A=x.get(q.id),D=Pn[q.code],[w,U]=D?[D[0]*Q,D[1]*Q]:et;Z(w,U,"middle",A===void 0?t.dark?nt.darkPrimary:nt.primary:Ot(f(A)),q.code)}if(!L){let q=t.width-16*Q,et=-1/0;for(let{f:A,a:D}of v){et=Math.max(D[1],et+14);let w=d.append("line").attr("x1",D[0]).attr("y1",D[1]).attr("x2",q-14).attr("y2",et);Ct(w.node(),{stroke:t.dark?nt.darkMuted:nt.secondary,"stroke-width":"0.75px"}),Z(q,et,"end",t.dark?nt.darkPrimary:nt.primary,A.code)}}}return l.height}var kt=8,Vt=2,oe=Vt+kt+13,ze=oe+5;function He(t,n,r,o){var b,x,g,k,P,N,F,G;if(!n)return;let e=r.style.map,a=r.data.map,s=t.dark?nt.darkSecondary:nt.secondary,c=t.dark?Pt:Dt,i=new Set(a.ids.filter(y=>y!==null)),m=(r.type!=="map-dots"?o.features.some(y=>!i.has(y.id)):!1),p=(y,R)=>`\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="${y}"/>\x3c/svg>${ct(R)}\x3c/span>`,l=m?p(c,__gvOr(e.noDataLabel,()=>("No data"))):"",h=y=>{if(!m)return{svg:"",width:0};let R=__gvOr(e.noDataLabel,()=>("No data")),_=Vt+kt/2;return{svg:`\x3crect class="${t.cls("legend-nodata")}" x="${y}" y="${_-5}" width="10" height="10" rx="2" fill="${c}"/>\x3ctext x="${y+16}" y="${_}" dy="0.35em" class="${t.cls("legend-key")}">${ct(R)}\x3c/text>`,width:40+R.length*7.5}},f="";if(e.categories.length)f=e.categories.map(y=>p(y.color,y.name)).join("")+l;else if(r.type==="map-dots"){let y=e.domain?Math.max(Math.abs(e.domain[0]),Math.abs(e.domain[1])):0,R=e.symbolMax*Math.min(1,t.width/600)*(t.mobile?.8:1),_=V=>R*Math.sqrt(V/y);if((y?e.sizeTicks.length:!1)){let V=_(e.sizeTicks[e.sizeTicks.length-1]),S=V*2+7,M=[];[...e.sizeTicks].reverse().forEach((K,tt)=>M.push(Math.max(S-2*_(K),tt?M[tt-1]+12:7)));let I=V*2+70,B=Math.max(S+3,M[M.length-1]+8),O=`stroke:${s} !important;fill:none !important`,Y=[...e.sizeTicks].reverse().map((K,tt)=>{let H=S-2*_(K);return`\x3ccircle cx="${V+1}" cy="${S-_(K)}" r="${_(K)}" style="${O};stroke-width:1px"/>\x3cpolyline points="${V+1},${H} ${V*2+4},${H} ${V*2+8},${M[tt]}" style="${O};stroke-width:0.5px"/>\x3ctext x="${V*2+11}" y="${M[tt]}" dy="0.35em" class="${t.cls("legend-label")}">${ct(t.fmtValue(K))}\x3c/text>`}).join("");f=`\x3csvg width="${I}" height="${B}" aria-hidden="true">${Y}\x3c/svg>`}}else if(((e.continuous?e.stops.length>=2:!1)?e.stops[0]!==e.stops[e.stops.length-1]:!1)){let y=Math.min(260,t.width-20),R=t.id("legend-grad"),_=e.colors.map((M,I)=>`\x3cstop offset="${I/(e.colors.length-1)*100}%" stop-color="${M}"/>`).join(""),V=[e.stops[0],e.stops.length===3?e.stops[1]:null,e.stops[e.stops.length-1]].map((M,I)=>M===null?"":`\x3ctext x="${I/2*y}" y="${oe}" text-anchor="${["start","middle","end"][I]}" class="${t.cls("legend-label")}">${ct(t.fmtValue(M))}\x3c/text>`).join(""),S=h(y+24);f=`\x3csvg width="${y+S.width+4}" height="${ze}" aria-hidden="true">\x3cdefs>\x3clinearGradient id="${R}">${_}\x3c/linearGradient>\x3c/defs>\x3crect class="${t.cls("legend-step")}" y="${Vt}" width="${y}" height="${kt}" rx="${kt/2}" fill="url(#${R})"/>${V}${S.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 y=(x=(b=e.domain)==null?void 0:b[0])!=null?x:e.stops[0];f=(y===void 0?"":p(e.colors[0],t.fmtValue(y)))+l}else if(e.colors.length){let y=e.colors.length,R=(P=(k=(g=e.domain)==null?void 0:g[0])!=null?k:e.thresholds[0])!=null?P:0,_=(G=(F=(N=e.domain)==null?void 0:N[1])!=null?F:e.thresholds[e.thresholds.length-1])!=null?G:0,V=$t(t.d3,r.style.yFormat,[R,_],Math.max(1,e.thresholds.length)),S=e.thresholds.map(H=>V(H)),M=Math.max(0,...S.map(H=>H.length))*7+6,I=Math.max(M,Math.min(44,Math.floor((Math.min(320,t.width)-20)/y))),B=I*y,O=t.id("legend-clip"),Y=e.colors.map((H,X)=>`\x3crect class="${t.cls("legend-step")}" x="${X*I}" y="${Vt}" width="${I}" height="${kt}" fill="${H}"/>`).join(""),K=S.map((H,X)=>`\x3ctext x="${(X+1)*I}" y="${oe}" text-anchor="middle" class="${t.cls("legend-label")}">${ct(H)}\x3c/text>`).join(""),tt=h(B+24);f=`\x3csvg width="${B+tt.width+4}" height="${ze}" aria-hidden="true">\x3cdefs>\x3cclipPath id="${O}">\x3crect y="${Vt}" width="${B}" height="${kt}" rx="${kt/2}"/>\x3c/clipPath>\x3c/defs>\x3cg clip-path="url(#${O})">${Y}\x3c/g>${K}${tt.svg}\x3c/svg>`}n.innerHTML=f,n.style.display=f?"":"none",n.removeAttribute("role"),n.removeAttribute("aria-label")}function se(t){return t.replace(/[\x26\x3c>"]/g,n=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;",'"':"\x26quot;"})[n])}var zn=["line","area","column","bar","stacked","combo","dot","scatter"];function ie(t){return (t.style.legend==="direct"?be.includes(t.type):!1)}function Oe(t,n,r,o){var g,k,P,N;if(!n)return;let e=r,a=e.data.series,s=(g=e.style.legend)!=null?g:"top",c=()=>{n.innerHTML="",n.style.display="none",n.removeAttribute("role"),n.removeAttribute("aria-label")};if(((s==="none"?!0:s==="subtitle")?!0:ie(e)))return c();let i=(F,G,y)=>F==="line"?`\x3csvg class="${t.cls("swatch")}" width="24" height="10" aria-hidden="true">\x3cline x1="1" x2="23" y1="5" y2="5" stroke="${G}" stroke-width="3.5" stroke-linecap="round"${y?' stroke-dasharray="6 4"':""}/>\x3c/svg>`:F==="dot"?`\x3csvg class="${t.cls("swatch")}" width="12" height="12" aria-hidden="true">\x3ccircle cx="6" cy="6" r="5" fill="${G}"/>\x3c/svg>`:`\x3csvg class="${t.cls("swatch")}" width="12" height="12" aria-hidden="true">\x3crect width="12" height="12" rx="2" fill="${G}"/>\x3c/svg>`,m=F=>e.type==="line"?"line":e.type==="combo"?F===0?"box":"line":(e.type==="scatter"?!0:e.type==="dot")?"dot":"box",p=(F,G,y,R=!1)=>{let _=(y!==void 0?l:!1)?"button":"span",V=_==="button"?` type="button" data-key="${se(y)}" aria-pressed="${!o.has(y)}" title="Show or hide ${se(F)}"`:"",S=`${t.cls("legend-item")}${(y!==void 0?o.has(y):!1)?` ${t.cls("legend-item--off")}`:""}`;return`\x3c${_} class="${S}"${V}>${G}${se(F)}${R?`\x3cspan class="${t.cls("legend-axis")}">right axis\x3c/span>`:""}\x3c/${_}>`},l=__gvAnd(__gvAnd(zn.includes(e.type),()=>(a.length>1)),()=>(!e.style.paletteId.startsWith("highlight"))),h=[];if(e.type==="donut"){let F=(k=e.data.categoryColors)!=null?k:[];h=e.data.x.map((G,y)=>p(String(G),i("box",qt(e,F[y],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 G=(P=e.data.categoryColors)!=null?P:[],[y,R]=e.data.series,_=I=>G.find((B,O)=>__gvAnd(((y==null?void 0:y.values[O])!=null?(R==null?void 0:R.values[O])!=null:!1),()=>(I(y.values[O],R.values[O])))),V=_((I,B)=>B>I),S=_((I,B)=>(I)>(B)),M=_((I,B)=>B===I);h=[V?p("Rose",i("line",qt(e,V,t.dark))):"",S?p("Fell",i("line",qt(e,S,t.dark))):"",M?p("No change",i("line",qt(e,M,t.dark))):""].filter(Boolean)}}else if((e.style.paletteId.startsWith("highlight")?a.length>1:!1)){let F=Math.max(0,a.findIndex(G=>G.key===e.style.highlight));h=[p(a[F].label,i(m(F),at(e,F,t.dark))),p("All others",i(m(F),at(e,F===0?1:0,t.dark)))]}else if(a.length>1){let F=__gvAnd(a.some(G=>G.axis==="right"),()=>(a.some(G=>G.axis!=="right")));h=a.map((G,y)=>p(G.label,i(m(y),at(e,y,t.dark),G.dashed),G.key,(F?G.axis==="right":F)))}let f=h.join(""),b=n.ownerDocument.activeElement,x=(b?n.contains(b):!1)?(N=b.dataset)==null?void 0:N.key:void 0;if(n.innerHTML=f,n.style.display=h.length?"":"none",(l?h.length:!1)?(n.setAttribute("role","group"),n.setAttribute("aria-label","Series. Select to show or hide.")):(n.removeAttribute("role"),n.removeAttribute("aria-label")),x!==void 0){let F=[...n.querySelectorAll("[data-key]")].find(G=>G.dataset.key===x);((F?n.ownerDocument.activeElement!==F:!1)?F.focus():!1)}}function qt(t,n,r){return yt(t,n!=null?n:nt.muted,r)}function qe(t,n,r,o={}){let e=t.svg.append("g").attr("class",t.cls("tick-probe")).attr("opacity",0),a=n.map(s=>{var i;let c=e.append("text").attr("class",(i=o.cls)!=null?i:null).style("font-size",`${r}px`).text(s);return (o.weight?c.style("font-weight",String(o.weight)):!1),Math.ceil(c.node().getComputedTextLength())});return e.remove(),a}function lt(t,n,r,o={}){return Math.max(0,...qe(t,n,r,o))}function wt(t,n){return n.ticks(t.mobile?4:5)}function Tt(t,n,r,o){let e=wt(t,r),a=t.fmtAxis;n.append("g").attr("class",t.cls("grid")).selectAll("line").data(e).join("line").attr("x1",-t.margin.left).attr("x2",o).attr("y1",i=>Math.round(r(i))+.5).attr("y2",i=>Math.round(r(i))+.5),n.append("g").attr("class",t.cls("ticks")).selectAll("text").data(e).join("text").attr("x",-t.margin.left).attr("y",i=>r(i)).attr("dy","-0.45em").attr("text-anchor","start").text(i=>a(i))}function St(t,n,r,o){let[e,a]=r.domain();if((e>0?!0:(0)>(a)))return;let s=((0)>(e)?a>0:!1);n.append("line").attr("class",t.cls(s?"zero":"baseline")).attr("x1",0).attr("x2",o).attr("y1",Math.round(r(0))+.5).attr("y2",Math.round(r(0))+.5)}function Xt(t,n,r,o){n.append("line").attr("class",t.cls("baseline")).attr("x1",0).attr("x2",r).attr("y1",o+.5).attr("y2",o+.5)}function Wt(t,n){return Math.max(2,Math.floor(t/(n?70:90)))}var Hn=10;function On(t){return t.mobile?12:14}function Bn(t,n,r,o){return (r)>(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 Yt(t,n,r,o){let e=-t.margin.left,a=t.width-t.margin.left,s=new Map,c=p=>{let l=[...new Set(p.filter(h=>!s.has(h)))];return qe(t,l,On(t)).forEach((h,f)=>s.set(l[f],h)),p.map(h=>s.get(h))},i=null,m=-1;for(let p=Math.max(1,Math.floor(o));p>=1;p--){let l=r(p);if(l.ticks.length===m)continue;m=l.ticks.length;let h=l.ticks.map(l.label),f=c(h),b=l.ticks.map((k,P)=>Bn(n(k),f[P],e,a));i={...l,anchor:k=>b[k].anchor};let x=b.every(k=>(k.start>=e-.5?(a+.5)>=(k.end):!1)),g=b.every((k,P)=>(P===0?!0:(k.start)>=(b[P-1].end+Hn)));if((x?g:!1))return i}return i!=null?i:{...r(1),anchor:()=>"middle"}}function Zt(t,n){let r=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(r,o);return{ticks:n.ticks(o),label:a=>e(a)}}}function Ut(t,n,r,o,e){n.append("g").attr("class",t.cls("ticks")).attr("transform",`translate(0,${r})`).selectAll("text").data(o.ticks).join("text").attr("x",a=>e(a)).attr("y",22).attr("text-anchor",(a,s)=>o.anchor(s)).text((a,s)=>o.label(a,s))}function jt(t,n,r,o){let e=[...t].sort((m,p)=>m.y-p.y),a=e.length;if(!a)return;let s=a>1?Math.min(n,Math.max(0,o-r)/(a-1)):n,c=m=>{m.top=Math.max(r,Math.min(o-(m.size-1)*s,m.sum/m.size))},i=[];e.forEach((m,p)=>{let l={start:p,size:1,sum:m.y,top:m.y};for(c(l),i.push(l);i.length>1;){let h=i[i.length-1],f=i[i.length-2];if((h.top+1e-9)>=(f.top+f.size*s))break;f.sum+=h.sum-h.size*f.size*s,f.size+=h.size,i.pop(),c(f)}});for(let m of i)for(let p=0;(m.size)>(p);p++)e[m.start+p].y=m.top+p*s}function je(t,n,r,o,e){let a=[],s=[];for(let i of t){let m=[...a,{item:i,y:i.y}].map(l=>({own:l.y,y:l.y})),p=(o-r)>=((m.length-1)*n);(p?jt(m,n,r,o):!1),(p?m.every(l=>__gvLe(Math.abs(l.y-l.own),e)):!1)?a.push({item:i,y:i.y}):s.push(i)}let c=a.map(i=>({y:i.y}));return jt(c,n,r,o),a.forEach((i,m)=>i.item.y=c[m].y),{kept:a.map(i=>i.item),dropped:s}}function Xe(t,n,r,o){let e=[...new Set(r.map(g=>g.getTime()))].sort((g,k)=>g-k),a=qn(r,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"])],c=s.slice(s.findIndex(([,g])=>g===a)),[i,m]=n.domain(),[p,l]=c[c.length-1],h=[];for(let[g,k]of c){let P=Be(g,e,i,m);if((o)>=(P.length)){[p,l,h]=[g,k,P];break}}(h.length?!0:(h=Be(p,e,i,m))),((!h.length?e.length:!1)?(h=e.length===1?[new Date(e[0])]:[new Date(e[0]),new Date(e[e.length-1])]):!1);let f=(g,k)=>(k===0?!0:h[k-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:h,label:(g,k)=>l==="year"?b.year(g):l==="month"?f(g,k)?b.monthYear(g):b.month(g):f(g,k)?b.dayYear(g):b.day(g)}}function qn(t,n){if(t.every(a=>(a.getUTCMonth()===0?a.getUTCDate()===1:!1)))return"year";if((2)>(n.length))return t.every(a=>a.getUTCDate()===1)?"month":"day";let o=1/0;for(let a=1;(n.length)>(a);a++)o=Math.min(o,n[a]-n[a-1]);let e=o/864e5;return e>=360?"year":e>=28?"month":"day"}function Be(t,n,r,o){let e=t.range(t.floor(r),new Date(o.getTime()+1)),a=[];return e.forEach((s,c)=>{var p;let i=((p=e[c+1])!=null?p:t.offset(s,1)).getTime(),m=jn(n,s.getTime());((n.length)>(m)?(i)>(n[m]):!1)?a.push(new Date(n[m])):((s>=r?(o)>=(s):!1)?a.push(s):!1)}),a}function jn(t,n){let r=0,o=t.length;for(;(o)>(r);){let e=r+o>>1;(n)>(t[e])?r=e+1:o=e}return r}function dt(t,n){var o,e,a;let r=(o=t.spec.style.imageFill)==null?void 0:o.photos;if(!r)return null;for(let s of n)if((s!==void 0?(((e=r[s])!=null?e.url:!1)):!1))return r[s].url;return __gvOr(((a=r["*"])==null?void 0:a.url),()=>(null))}function Et(t){var r;let n=(r=t.spec.style.imageFill)==null?void 0:r.photos;return(!!n?Object.values(n).some(o=>!!((o!=null?o.url:!1))):!1)}function ft(t,n,r,o){let e=t.svg.select("defs").empty()?t.svg.append("defs"):t.svg.select("defs"),a=t.id("grey");(e.select(`#${a}`).empty()?e.append("filter").attr("id",a).append("feColorMatrix").attr("type","saturate").attr("values","0"):!1);let s=new Map;return{clip:(m,p)=>{let l=p?`${m}|${p.x},${p.y},${p.w},${p.h}`:m,h=s.get(l);if(!h){let f=t.id(`clip-${e.selectAll("clipPath").size()}`);h={id:f,url:m,box:p!=null?p:{x:0,y:0,w:r,h:o},sel:e.append("clipPath").attr("id",f)},s.set(l,h)}return h.sel},paint:()=>{for(let m of s.values())n.insert("image",":first-child").attr("class",t.cls("photo")).attr("href",m.url).attr("x",m.box.x).attr("y",m.box.y).attr("width",Math.max(1,m.box.w)).attr("height",Math.max(1,m.box.h)).attr("preserveAspectRatio","xMidYMid slice").attr("clip-path",`url(#${m.id})`).attr("filter",`url(#${a})`)}}}function Kt(t,n){var o;let r=t.spec.style.imageFill;return __gvAnd((!!r?r.mode==="category":!1),()=>(!!(((o=r.photos[n])!=null?o.url:!1))))}function ht(t,n){var r,o;return n?(o=(r=t.spec.style.imageFill)==null?void 0:r.opacity)!=null?o:.65:1}function Qt(t,n,r,o,e,a){if(((0)>=(r)?!0:(0)>=(o)))return"";let s=Math.min(e,(a==="up"?!0:a==="down")?r/2:o/2,(a==="up"?!0:a==="down")?o:r),c=t+r,i=n+o;switch(a){case"up":return`M${t},${i}V${n+s}Q${t},${n} ${t+s},${n}H${c-s}Q${c},${n} ${c},${n+s}V${i}Z`;case"down":return`M${t},${n}V${i-s}Q${t},${i} ${t+s},${i}H${c-s}Q${c},${i} ${c},${i-s}V${n}Z`;case"right":return`M${t},${n}H${c-s}Q${c},${n} ${c},${n+s}V${i-s}Q${c},${i} ${c-s},${i}H${t}Z`;case"left":return`M${c},${n}H${t+s}Q${t},${n} ${t},${n+s}V${i-s}Q${t},${i} ${t+s},${i}H${c}Z`}}function Mt(t,n,r,o){let e=t.length?t[0]:0,a=e;for(let s of t)((e)>(s)?(e=s):!1),(s>a?(a=s):!1);return (t.length?!0:([e,a]=[0,1])),(n?(e=Math.min(0,e),a=Math.max(0,a)):!1),(r!==null?(e=r):!1),(o!==null?(a=o):!1),(e===a?(a=e+1):!1),(e>a?([e,a]=[a,e]):!1),[e,a]}function Ye(t){var q,et;let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=r.type==="area",c=(s?e.series.length>1:s),i=e.xKind==="category",m=e.x.map((A,D)=>e.xKind==="date"?Le(A):i?D:Number(A)),p=m.length;if(p===0)return;let l=__gvAnd((!s?e.series.some(A=>A.axis==="right"):!1),()=>(e.series.some(A=>A.axis!=="right"))),h=A=>(l?e.series[A].axis==="right":l),f=A=>e.series.filter((D,w)=>h(w)===A).flatMap(D=>D.values).filter(D=>D!==null),b=[],x,g;if(c){let A=m.map((D,w)=>e.series.map(U=>{var ut;return(ut=U.values[w])!=null?ut:0}));b=n.stack().keys(e.series.map((D,w)=>w)).value((D,w)=>D[w]).offset(n.stackOffsetDiverging)(A),[x,g]=Mt(b.flatMap(D=>D.flatMap(w=>[w[0],w[1]])),!0,a.yMin,a.yMax)}else[x,g]=Mt(f(!1),__gvOr(__gvOr(a.yFromZero,()=>(s)),()=>(We(t))),a.yMin,a.yMax);let k=t.margin,P=t.height-k.top-k.bottom,N=t.mobile?4:5,F=n.scaleLinear().domain([x,g]).nice(N).range([P,0]);t.setAxis(F.domain(),N),k.left=lt(t,wt(t,F).filter(function(v,i,a){return Math.abs(v)!==Math.max(Math.abs(a[0]),Math.abs(a[a.length-1]))}).map(t.fmtAxis),t.mobile?12:14)+10;let G=l?n.scaleLinear().domain(Mt(f(!0),a.rightFromZero,null,null)).nice(N).range([P,0]):F,y=l?t.rightAxis(G.domain(),N):t.fmtAxis,R=l?G.ticks(N):[],_=l?lt(t,R.map(y),t.mobile?12:14)+10:0,V=A=>h(A)?G:F,S=A=>t.fmtFor(e.series[A]),M=e.series.map(A=>{for(let D=A.values.length-1;D>=0;D--)if(A.values[D]!==null)return D;return-1}),I=__gvAnd(ie(r),()=>(!c)),B=__gvAnd((__gvOr(a.valueLabels,()=>(I))),()=>(!c)),O=A=>{if((0)>(M[A]))return["",""];let D=S(A)(e.series[A].values[M[A]]);return I?[e.series[A].label,a.valueLabels?D:""]:["",D]},Y=A=>O(A).filter(Boolean).join(" "),K=_?_+6:9,tt=I?{cls:t.cls("direct-label"),size:13,weight:700}:{cls:t.cls("value-label"),size:12,weight:500};if(B){let A=lt(t,e.series.map((D,w)=>Y(w)),tt.size,tt);k.right=Math.max(k.right,Math.min(A,t.width/3)+K+6)}else l?k.right=Math.max(k.right,_+4):(a.endDots?(k.right=Math.max(k.right,10)):!1);let H=Math.max(40,t.width-k.left-k.right),X=e.xKind==="date"?n.scaleUtc().domain(n.extent(m)).range([0,H]):n.scaleLinear().domain(n.extent(m)).range([0,H]),E=o.append("g").attr("transform",`translate(${k.left},${k.top})`);if(Tt(t,E,F,H),Xt(t,E,H,P),St(t,E,F,H),l){let A=xt(r,at(r,e.series.findIndex(D=>D.axis==="right"),t.dark),t.dark);E.append("g").attr("class",t.cls("ticks")).selectAll("text").data(R).join("text").attr("x",H+8).attr("y",D=>G(D)).attr("dy","0.32em").style("fill",A).text(D=>y(D)),(a.rightLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",t.width).attr("y",t.rightTitleY).attr("text-anchor","end").style("fill",A).text(a.rightLabel):!1)}let u=A=>X(A);Ut(t,E,P,Yt(t,u,Xn(t,X,m),i?p:Wt(H,t.mobile)),u);let d=A=>X(m[A]),T=t.id("plot");o.append("defs").append("clipPath").attr("id",T).append("rect").attr("x",-8).attr("y",-8).attr("width",H+16).attr("height",P+16);let v=E.append("g").attr("clip-path",(a.yMin!==null?!0:a.yMax!==null)?`url(#${T})`:null),L=E.append("g");if(s){let A=Et(t)?ft(t,v,H,P):null;(c?b:[e.series[0].values.map(w=>[0,w!=null?w:0])]).forEach((w,U)=>{var $;let j=($=n.area().x((z,W)=>d(W)).y0(z=>F(z[0])).y1(z=>F(z[1]))(w))!=null?$:"",C=A?dt(t,[e.series[U].key]):null;((A?C:!1)?A.clip(C).append("path").attr("d",j):!1),v.append("path").attr("class",t.cls("area")).attr("d",j).attr("fill",at(r,U,t.dark)).attr("fill-opacity",ht(t,C)),((p===1?e.series[U].values[0]!==null:!1)?v.append("circle").attr("cx",d(0)).attr("cy",F(w[0][1])).attr("r",3.5).attr("fill",at(r,U,t.dark)):!1)}),(A==null?!0:A.paint())}if(!s){let[A,D]=F.domain(),w=((We(t)?(0)>=(A):!1)?D>=0:!1)?dt(t,[e.series[0].key]):null,U=w?ft(t,v,H,P):null;if((U?w:!1)){let $=(q=n.area().defined(z=>z!==null).x((z,W)=>d(W)).y0(F(0)).y1(z=>F(z))(e.series[0].values))!=null?q:"";U.clip(w).append("path").attr("d",$),v.append("path").attr("d",$).attr("fill",at(r,0,t.dark)).attr("fill-opacity",ht(t,w)),U.paint()}let ut=C=>n.line().defined($=>$!==null).x(($,z)=>d(z)).y($=>V(C)($)),j=e.series.map((C,$)=>$).sort((C,$)=>Number(Ft(r,C))-Number(Ft(r,$))).reverse();for(let C of j){let $=e.series[C],z=(et=ut(C)($.values))!=null?et:"";((e.series.length>1?!Ft(r,C):!1)?v.append("path").attr("class",t.cls("line-halo")).attr("d",z):!1),v.append("path").attr("class",t.cls("line")).attr("d",z).attr("stroke",at(r,C,t.dark)).attr("stroke-width",Ft(r,C)?2:t.mobile?3:3.5).attr("stroke-dasharray",$.dashed?"6 4":null),$.values.forEach((W,st)=>{(((W===null?!0:$.values[st-1]!=null)?!0:$.values[st+1]!=null)?!0:v.append("circle").attr("cx",d(st)).attr("cy",V(C)(W)).attr("r",3.5).attr("fill",at(r,C,t.dark)))})}if((a.endDots?e.series.forEach((C,$)=>{if(((0)>(M[$])?!0:Ft(r,$)))return;let z=d(M[$]),W=V($)(e.series[$].values[M[$]]);v.append("circle").attr("class",`${t.cls("dot")} ${t.cls("dot--pulse")}`).attr("cx",z).attr("cy",W).attr("r",5).attr("fill",at(r,$,t.dark))}):!1),B){let C=e.series.map((z,W)=>({i:W,y:M[W]>=0?V(W)(z.values[M[W]]):NaN,x:M[W]>=0?d(M[W]):0})).filter(z=>(!Number.isNaN(z.y)?((!Ft(r,z.i)?!0:I)):!1));jt(C,15,6,P);let $=t.width/3;for(let z of C){let W=e.series[z.i].values[M[z.i]],[st,rt]=V(z.i).domain(),J=W>rt?-1:(st)>(W)?1:0,ot=(l?H:z.x)+K,pt=xt(r,at(r,z.i,t.dark),t.dark);(J?L.append("path").attr("class",t.cls("off-scale")).attr("d",`M${ot+4},${z.y+J*5}l-4,${-J*8}h8z`).attr("fill",pt).append("title").text((0)>(J)?"Above the axis range":"Below the axis range"):!1);let Lt=L.append("text").attr("class",t.cls(I?"direct-label":"value-label")).attr("x",ot+(J?12:0)).attr("y",z.y).attr("dy","0.32em").style("fill",pt).text(Y(z.i)),_t=Lt.node(),[At,he]=O(z.i),Nt=(At?At:he),dn=fe=>At?[`${fe.trimEnd()}\u2026`,he].filter(Boolean).join(" "):`${fe.trimEnd()}\u2026`;for(;(_t.getComputedTextLength()>$?Nt.length>4:!1);)Nt=Nt.slice(0,-2),Lt.text(dn(Nt))}}}let Z=E.append("g").attr("class",t.cls("hover")).style("display","none");Z.append("line").attr("class",t.cls("rule")).attr("y1",0).attr("y2",P);let Q=E.append("rect").attr("class",t.cls("overlay")).attr("width",H).attr("height",P);t.tooltip.bind(Q,A=>{var st;let[D]=n.pointer(A),w=X.invert(D),U=Math.max(0,Math.min(p-1,n.bisectCenter(m,w))),ut=d(U);Z.style("display",null).select("line").attr("x1",ut).attr("x2",ut);let j=e.series.map((rt,J)=>({si:J,v:rt.values[U]})).filter(rt=>rt.v!==null).sort((rt,J)=>J.v-rt.v),C=j.slice(0,8),$=C.map(rt=>it(t.cls("tip-row"),at(r,rt.si,t.dark),e.series[rt.si].label,S(rt.si)(rt.v))).join(""),z=j.length>C.length?`\x3cdiv class="${t.cls("tip-more")}">+${j.length-C.length} more\x3c/div>`:"",W=C.length?c?F((st=n.max(b,rt=>rt[U][1]))!=null?st:0):V(C[0].si)(C[0].v):P/2;t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct(i?String(e.x[U]):t.fmtX((e.xKind==="date",m[U])))}\x3c/div>${$}${z}`,ut+k.left,W+k.top)},()=>Z.style("display","none"))}function We(t){let{spec:n}=t;return __gvAnd((n.type==="line"?n.data.series.length===1:!1),()=>(!!dt(t,[n.data.series[0].key])))}function Ft(t,n){var r;return __gvAnd(t.style.paletteId.startsWith("highlight"),()=>(t.data.series[n].key!==((r=t.style.highlight)!=null?r:t.data.series[0].key)))}function Xn(t,n,r){let{d3:o,spec:e}=t,a=e.data;if(a.xKind==="date")return s=>{let c=Xe(o,n,r,s);return{ticks:c.ticks,label:(i,m)=>c.label(i,m)}};if(a.xKind==="category"){let s=a.x.map(String),c=s.length;return i=>({ticks:o.range(0,c,Math.max(1,Math.ceil(c/i))),label:m=>s[m]})}return Zt(t,n)}var Jt="http://www.w3.org/2000/svg",Ze=/[\p{Script=Latin}\p{Script=Greek}\p{Script=Cyrillic}]/u,Ue=/[_\-/.]/;function Wn(t,n,r){let o=[],e=Array.from(t);for(;(e.length>1?r(e.join(""))>n:!1);){let a=i=>{let m=e.slice(0,i).join("");return (Ze.test(e[i-1])?Ze.test(e[i]):!1)?`${m}-`:m},s=1;for(;((e.length-1)>(s)?__gvLe(r(a(s+1)),n):!1);)s++;let c=s;for(;(c>Math.ceil(s/2)?!Ue.test(e[c-1]):!1);)c--;(Ue.test(e[c-1])?(s=c):!1),o.push(a(s)),e=e.slice(s)}return{lines:o,rest:e.join("")}}function Ke(t,n,r,o){let e=[],a="";for(let s of t.split(/\s+/).filter(Boolean)){let c=a?`${a} ${s}`:s;if(__gvLe(o(c),n)){a=c;continue}(a?e.push(a):!1);let i=Wn(s,n,o);if(e.push(...i.lines),a=i.rest,e.length>r)break}if((a?e.push(a):!1),e.length>r){let s=Array.from(e[r-1].replace(/-$/,""));for(;(s.length>1?o(`${s.join("").trimEnd()}\u2026`)>n:!1);)s=s.slice(0,-1);e.length=r,e[r-1]=`${s.join("").trimEnd()}\u2026`}return e}function Qe(t){t.textContent="";let n=t.ownerDocument.createElementNS(Jt,"tspan");return t.appendChild(n),r=>(n.textContent=r,n.getComputedTextLength())}function Je(t,n,r){var a;let o=t.getAttribute("x"),e=t.ownerDocument;if(t.textContent="",(1)>=(n.length)){t.textContent=(a=n[0])!=null?a:"";return}n.forEach((s,c)=>{let i=e.createElementNS(Jt,"tspan");(o!==null?i.setAttribute("x",o):!1),(c?i.setAttribute("dy",`${r}em`):!1),i.textContent=s,t.appendChild(i)})}function ce(t,n,r,o,e){let a=Ke(n,r,o,Qe(t));Je(t,a,e);let s=__gvAnd((a.length>0?a[a.length-1].endsWith("\u2026"):!1),()=>(!n.endsWith("\u2026")));return{lines:Math.max(1,a.length),cut:s}}function Yn(t,n,r,o,e){let a=/\s/.test(t),s=f=>a?f.split(/\s+/).filter(Boolean):Array.from(f),c=f=>f.join(a?" ":""),i=s(t),m=n.filter(f=>f!==t).map(s),p=(f,b)=>(f.length>=b?c(f.slice(-b))===c(i.slice(-b)):!1),l=1;for(;((i.length)>(l)?m.some(f=>p(f,l)):!1);)l++;let h=c(i.slice(-l));for(let f=i.length-l-1;f>=0;f--){let b=c(i.slice(0,f)),x=a?`${b?`${b} `:""}\u2026 ${h}`:`${b}\u2026${h}`,g=Ke(x,r,1/0,e);if((o)>=(g.length))return g}return null}function tn(t,n){var a;let r=t.ownerDocument,o=r.createElementNS(Jt,"g"),e=r.createElementNS(Jt,"title");e.textContent=n,((a=t.parentNode)==null?!0:a.insertBefore(o,t)),o.appendChild(e),o.appendChild(t)}function le(t){var n;return __gvOr(Array.from(t.querySelectorAll("tspan")).map(r=>{var o;return(o=r.textContent)!=null?o:""}).join(" "),()=>(((n=t.textContent)!=null?n:"").trim()))}function ue(t,n,r,o=1.15){var s;let e=((s=t.textContent)!=null?s:"").trim(),a=ce(t,e,n,r,o);return (a.cut?tn(t,e):!1),a.lines}function gt(t,n,r,o=1.15){let e=t.map(s=>{var c;return((c=s.textContent)!=null?c:"").trim()}),a=t.map((s,c)=>s.getComputedTextLength()>n?ce(s,e[c],n,r,o):{lines:1,cut:!1});for(let s of Zn(t,e)){let c=Yn(e[s],e,n,r,Qe(t[s]));c?(Je(t[s],c,o),a[s]={lines:c.length,cut:!0}):a[s]=ce(t[s],e[s],n,r,o)}return a.forEach((s,c)=>__gvAnd(s.cut,()=>(tn(t[c],e[c])))),a.map(s=>s.lines)}function Zn(t,n){let r=new Map;t.forEach((e,a)=>{var s;return r.set(le(e),[...(s=r.get(le(e)))!=null?s:[],a])});let o=[];for(let e of r.values())(new Set(e.map(a=>n[a])).size>1?o.push(...e.filter(a=>n[a]!==le(t[a]))):!1);return o}var en=110,Un=3,Kn=19,Qn=10;function me(t){return t.toUpperCase()===mt.orange?mt.azure:mt.orange}function nn(t){var et,A,D,w,U,ut;let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=r.type==="stacked",c=r.type==="combo",i=j=>(!c?!0:j===0),m=j=>__gvAnd((c?j>0:c),()=>(e.series[j].axis==="right")),p=j=>t.fmtFor(e.series[j]),l=e.x.map(j=>t.fmtX(j)),h=l.length;if(h===0)return;let f=e.series.length,b=0,x=0,g=[];if(s){let j=e.x.map((C,$)=>e.series.map(z=>{var W;return(W=z.values[$])!=null?W:0}));g=n.stack().keys(e.series.map((C,$)=>$)).value((C,$)=>C[$]).offset(n.stackOffsetDiverging)(j),b=Math.min(0,(et=n.min(g,C=>n.min(C,$=>$[0])))!=null?et:0),x=Math.max(0,(A=n.max(g,C=>n.max(C,$=>$[1])))!=null?A:0)}else{let j=e.series.filter((C,$)=>!m($)).flatMap(C=>C.values).filter(C=>C!==null);b=Math.min(0,(D=n.min(j))!=null?D:0),x=Math.max(0,(w=n.max(j))!=null?w:0)}((a.yMax!==null?a.yMax>x:!1)?(x=a.yMax):!1),(b===x?(x=1):!1);let k=e.series.some((j,C)=>m(C)),P=t.mobile?4:5,N=null,F=t.fmtAxis,G=0;if(k){let j=e.series.filter((z,W)=>m(W)).flatMap(z=>z.values).filter(z=>z!==null),C=(U=n.min(j))!=null?U:0,$=(ut=n.max(j))!=null?ut:1;(a.rightFromZero?(C=Math.min(0,C),$=Math.max(0,$)):!1),(C===$?($=C+1):!1),N=n.scaleLinear().domain([C,$]).nice(P),F=t.rightAxis(N.domain(),P),G=lt(t,N.ticks(P).map(F),t.mobile?12:14)+10,t.margin.right=Math.max(t.margin.right,G+4)}let y=t.margin,R=n.scaleLinear().domain([b,x]).nice(t.mobile?4:5).range([t.height-y.top-40,0]);t.setAxis(R.domain(),t.mobile?4:5),y.left=lt(t,wt(t,R).filter(function(v,i,a){return Math.abs(v)!==Math.max(Math.abs(a[0]),Math.abs(a[a.length-1]))}).map(t.fmtAxis),t.mobile?12:14)+10;let _=Math.max(40,t.width-y.left-y.right),V=n.scaleBand().domain(l.map((j,C)=>String(C))).range([0,_]).paddingInner(.25).paddingOuter(.1),S=V.bandwidth(),M=t.mobile?12:13,I=lt(t,l,M),B=e.xKind!=="category",O=1,Y="flat";(I>S+V.step()*.25?(B?O=Math.ceil((I+10)/V.step()):Y=((14)>=(h)?S>36:!1)?"wrap":"rotate"):!1),(Y==="rotate"?(O=Math.max(1,Math.ceil(14/Math.max(1,V.step())))):!1);let K=o.append("g").attr("class",t.cls("ticks")),tt=0,H=[];l.forEach((j,C)=>{var st;if(C%O!==0)return;let $=((st=V(String(C)))!=null?st:0)+S/2,z=K.append("text").style("font-size",`${M}px`).text(j),W=z.node();if(Y==="rotate"){z.attr("text-anchor","end").attr("transform",`translate(${$},12) rotate(-45)`);let rt=Math.min((en-12)/.72,($+y.left-M)/Math.SQRT1_2);(W.getComputedTextLength()>rt?ue(W,rt,1):!1),tt=Math.max(tt,W.getComputedTextLength())}else z.attr("x",$).attr("y",20).attr("text-anchor","middle"),(Y==="wrap"?H.push(W):!1)});let X=Math.max(1,...gt(H,V.step()-4,Un));y.bottom=Y==="rotate"?Math.min(en,tt*.72+12)+8:Y==="wrap"?Math.ceil(20+(X-1)*M*1.15+M*.35+8):30;let E=Math.max(60,t.height-y.top-y.bottom),u=n.scaleLinear().domain([b,x]).nice(P).range([E,0]);((a.valueLabels?(24)>=(h):!1)?tr(u,E,y.top,Jn(t,g)):!1),(N==null?!0:N.range([E,0])),K.attr("transform",`translate(${y.left},${y.top+E})`);let d=o.append("g").attr("transform",`translate(${y.left},${y.top})`);if(Tt(t,d,u,_),N){let j=xt(r,at(r,e.series.findIndex((C,$)=>m($)),t.dark),t.dark);d.append("g").attr("class",t.cls("ticks")).selectAll("text").data(N.ticks(P)).join("text").attr("x",_+8).attr("y",C=>N(C)).attr("dy","0.32em").style("fill",j).text(C=>F(C)),(a.rightLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",t.width).attr("y",t.rightTitleY).attr("text-anchor","end").style("fill",j).text(a.rightLabel):!1)}let T=d.append("g"),v=Et(t)?ft(t,T,_,E):null,L=c?1:f,Z=n.scaleBand().domain(n.range(L)).range([0,S]).padding(L>1?.08:0),Q=[];if(s?(g.forEach((j,C)=>{j.forEach(($,z)=>{var pt;let W=u($[0]),st=u($[1]),rt=Math.abs(W-st);if((0)>=(rt))return;let J=(pt=V(String(z)))!=null?pt:0,ot=v?dt(t,[e.series[C].key,String(e.x[z])]):null;((v?ot:!1)?v.clip(ot).append("rect").attr("x",J).attr("y",Math.min(W,st)).attr("width",S).attr("height",rt):!1),T.append("rect").attr("class",t.cls("segment")).attr("x",J).attr("y",Math.min(W,st)).attr("width",S).attr("height",rt).attr("fill",at(r,C,t.dark)).attr("fill-opacity",ht(t,ot))})}),(a.valueLabels?e.x.forEach((j,C)=>{var rt;let $=e.series.map(J=>{var ot;return(ot=J.values[C])!=null?ot:0}),z=$.filter(J=>J>0).reduce((J,ot)=>J+ot,0),W=$.filter(J=>(0)>(J)).reduce((J,ot)=>J+ot,0),st=((rt=V(String(C)))!=null?rt:0)+S/2;(((z>0?!0:W===0))?Q.push({x:st,y:u(z)-6,text:t.fmtValue(z),below:!1}):!1),((0)>(W)?Q.push({x:st,y:u(W)+14,text:t.fmtValue(W),below:!0}):!1)}):!1)):e.series.forEach((j,C)=>{(i(C)?j.values.forEach(($,z)=>{var _t,At;if($===null)return;let W=((_t=V(String(z)))!=null?_t:0)+((At=Z(C))!=null?At:0),st=Z.bandwidth(),rt=u(Math.max(0,$)),J=Math.abs(u($)-u(0)),ot=Qt(W,rt,st,J,4,$>=0?"up":"down"),pt=v?dt(t,[j.key,String(e.x[z])]):null;((v?pt:!1)?v.clip(pt,Kt(t,String(e.x[z]))?{x:W,y:rt,w:st,h:J}:void 0).append("path").attr("d",ot):!1);let Lt=at(r,C,t.dark);T.append("path").attr("class",t.cls("bar")).attr("d",ot).attr("fill",(((0)>($)?L===1:!1)?!c:!1)?me(Lt):Lt).attr("fill-opacity",ht(t,pt)),(a.valueLabels?Q.push({x:W+st/2,y:$>=0?u($)-6:u($)+14,text:p(C)($),below:(0)>($)}):!1)}):!1)}),(v==null?!0:v.paint()),St(t,d,u,_),(c?e.series.forEach((j,C)=>{var rt;if(C===0)return;let $=(m(C)?N:!1)?N:u,z=J=>{var ot;return((ot=V(String(J)))!=null?ot:0)+S/2},W=(rt=n.line().defined(J=>J!==null).x((J,ot)=>z(ot)).y(J=>$(J))(j.values))!=null?rt:"",st=at(r,C,t.dark);T.append("path").attr("class",t.cls("line-halo")).attr("d",W),T.append("path").attr("class",t.cls("line")).attr("d",W).attr("stroke",st).attr("stroke-width",t.mobile?3:3.5).attr("stroke-dasharray",j.dashed?"6 4":null),j.values.forEach((J,ot)=>{(J!==null?T.append("circle").attr("class",t.cls("dot")).attr("cx",z(ot)).attr("cy",$(J)).attr("r",h>24?2.5:4).attr("fill",st):!1)})}):!1),(Q.length?(24)>=(h):!1)){let j=(L>1?!s:!1)?Z.bandwidth():S;(__gvLe(lt(t,Q.map($=>$.text),12),j+6)?d.append("g").selectAll("text").data(Q).join("text").attr("class",t.cls("value-label")).attr("x",$=>$.x).attr("y",$=>$.y).attr("text-anchor","middle").text($=>$.text):!1)}let q=d.append("g").selectAll("rect").data(l.map((j,C)=>C)).join("rect").attr("class",t.cls("overlay")).attr("x",j=>{var C;return((C=V(String(j)))!=null?C:0)-(V.step()-S)/2}).attr("width",V.step()).attr("y",0).attr("height",E);t.tooltip.bind(q,(j,C)=>{let $=l[C],z=e.series.map((J,ot)=>J.values[C]===null?"":it(t.cls("tip-row"),at(r,ot,t.dark),J.label,p(ot)(J.values[C]))).join(""),W=(s?f>1:!1)?it(t.cls("tip-row"),"transparent","Total",t.fmtValue(e.series.reduce((J,ot)=>{var pt;return J+((pt=ot.values[C])!=null?pt:0)},0))):"",[st,rt]=n.pointer(j,t.chartEl);t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct($)}\x3c/div>${z}${W}`,st,rt)})}function Jn(t,n){var c,i,m,p;let{d3:r,spec:o}=t;if(o.type==="stacked"){let l=(c=r.min(n,h=>r.min(h,f=>f[0])))!=null?c:0;return{top:(i=r.max(n,h=>r.max(h,f=>f[1])))!=null?i: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),a=(m=r.max(e.filter(l=>l>=0)))!=null?m:null,s=(p=r.min(e.filter(l=>(0)>(l))))!=null?p:null;return{top:a,bottom:s}}function tr(t,n,r,o){let e=Math.min(.4,Qn/n),a=Math.min(.4,Math.max(0,Kn-r)/n);for(let s=0;(3)>(s);s++){let[c,i]=t.domain();((o.bottom!==null?t(o.bottom)>n*(1-e):!1)?(c=i-(i-o.bottom)/(1-e)):!1),((o.top!==null?__gvLt(t(o.top),n*a):!1)?(i=(o.top-a*c)/(1-a)):!1),t.domain([c,i])}}var er=3;function nr(t){return t>1?t*13+14:30}function rn(t){var X,E;let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=e.x.map(u=>t.fmtX(u)),c=s.length;if(c===0)return;let i=e.series.length,m=t.margin,p=e.series.flatMap(u=>u.values).filter(u=>u!==null),l=Math.min(0,(X=n.min(p))!=null?X:0),h=Math.max(0,(E=n.max(p))!=null?E:0);((a.yMax!==null?a.yMax>h:!1)?(h=a.yMax):!1),(l===h?(h=1):!1);let f=t.mobile?13:14,b=t.width*(t.mobile?.42:.34),x=Math.min(b,lt(t,s,f));m.left=x+10;let g=a.valueLabels,k=g?lt(t,p.map(t.fmtValue),12)+8:0;m.right=Math.max(m.right,k),(((0)>(l)?g:!1)?(m.left+=k):!1),m.bottom=g?8:28;let P=Math.max(40,t.width-m.left-m.right),N=o.append("g").attr("transform",`translate(${m.left},${m.top})`),F=N.append("g").attr("class",t.cls("cat-labels")),G=s.map(u=>F.append("text").attr("x",-10-(((0)>(l)?g:!1)?k:0)).attr("text-anchor","end").style("font-size",`${f}px`).text(u)),y=gt(G.map(u=>u.node()),x,er),R=G.map((u,d)=>({t:u,lines:y[d]})),_=nr(i),V=Math.max(_,Math.ceil(n.max(R,u=>u.lines)*f*1.15+10)),S=c*V,M=n.scaleLinear().domain([l,h]).nice(t.mobile?4:5).range([0,P]);t.setAxis(M.domain(),t.mobile?4:5);let I=Math.max(.25,1-_*.75/V),B=n.scaleBand().domain(s.map((u,d)=>String(d))).range([0,S]).paddingInner(I).paddingOuter(I/2),O=n.scaleBand().domain(n.range(i)).range([0,B.bandwidth()]).padding(i>1?.1:0);if(R.forEach(({t:u,lines:d},T)=>{var v;u.attr("y",((v=B(String(T)))!=null?v:0)+B.bandwidth()/2).attr("dy",`${.32-(d-1)*.575}em`)}),!g){let u=M.ticks(t.mobile?4:5);N.append("g").attr("class",t.cls("grid")).selectAll("line").data(u).join("line").attr("x1",d=>Math.round(M(d))+.5).attr("x2",d=>Math.round(M(d))+.5).attr("y1",0).attr("y2",S),N.append("g").attr("class",t.cls("ticks")).selectAll("text").data(u).join("text").attr("x",d=>M(d)).attr("y",S+20).attr("text-anchor","middle").text(d=>t.fmtAxis(d))}let Y=N.append("g"),K=Et(t)?ft(t,Y,P,S):null,tt=[];e.series.forEach((u,d)=>{u.values.forEach((T,v)=>{var w,U;if(T===null)return;let L=((w=B(String(v)))!=null?w:0)+((U=O(d))!=null?U:0),Z=O.bandwidth(),Q=M(Math.min(0,T)),q=Math.abs(M(T)-M(0)),et=Qt(Q,L,q,Z,4,T>=0?"right":"left"),A=K?dt(t,[u.key,String(e.x[v])]):null;((K?A:!1)?K.clip(A,Kt(t,String(e.x[v]))?{x:Q,y:L,w:q,h:Z}:void 0).append("path").attr("d",et):!1);let D=at(r,d,t.dark);Y.append("path").attr("class",t.cls("bar")).attr("d",et).attr("fill",((0)>(T)?i===1:!1)?me(D):D).attr("fill-opacity",ht(t,A)),(g?tt.push({x:T>=0?M(T)+6:M(T)-6,y:L+Z/2,text:t.fmtValue(T),anchor:T>=0?"start":"end"}):!1)})}),(K==null?!0:K.paint()),(0)>(l)?N.append("line").attr("class",t.cls("zero")).attr("x1",M(0)).attr("x2",M(0)).attr("y1",0).attr("y2",S):N.append("line").attr("class",t.cls("baseline")).attr("x1",M(0)+.5).attr("x2",M(0)+.5).attr("y1",0).attr("y2",S),N.append("g").selectAll("text").data(tt).join("text").attr("class",t.cls("value-label")).attr("x",u=>u.x).attr("y",u=>u.y).attr("dy","0.32em").attr("text-anchor",u=>u.anchor).text(u=>u.text);let H=N.append("g").selectAll("rect").data(s.map((u,d)=>d)).join("rect").attr("class",t.cls("overlay")).attr("x",-m.left).attr("width",t.width).attr("y",u=>{var d;return((d=B(String(u)))!=null?d:0)-(B.step()-B.bandwidth())/2}).attr("height",B.step());return t.tooltip.bind(H,(u,d)=>{if((i===1?g:!1))return;let T=s[d],v=e.series.map((Q,q)=>Q.values[d]===null?"":it(t.cls("tip-row"),at(r,q,t.dark),Q.label,t.fmtValue(Q.values[d]))).join(""),[L,Z]=n.pointer(u,t.chartEl);t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct(T)}\x3c/div>${v}`,L,Z)}),S+m.top+m.bottom}var an=40;function on(t){var X,E;let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=(X=e.points)!=null?X:[];if(!s.length)return;let c=new Map(e.series.map((u,d)=>[u.key,d])),i=u=>{var d,T;return at(r,(T=c.get((d=u.group)!=null?d:e.series[0].key))!=null?T:0,t.dark)},m=([u,d])=>{let T=(__gvOr(__gvOr(d-u,()=>(Math.abs(u))),()=>(1)))*.04;return[u-T,d+T]},[p,l]=m(n.extent(s,u=>u.x));(a.xFromZero?(p=Math.min(0,p),l=Math.max(0,l)):!1),(a.xMin!==null?(p=a.xMin):!1),(a.xMax!==null?(l=a.xMax):!1);let[h,f]=m(n.extent(s,u=>u.y));(a.yFromZero?(h=Math.min(0,h),f=Math.max(0,f)):!1),(a.yMin!==null?(h=a.yMin):!1),(a.yMax!==null?(f=a.yMax):!1),(p>l?([p,l]=[l,p]):!1),(h>f?([h,f]=[f,h]):!1);let b=t.margin;b.bottom=a.xLabel?48:30;let x=t.height-b.top-b.bottom,g=n.scaleLinear().domain([h,f===h?h+1:f]).nice(5).range([x,0]);t.setAxis(g.domain(),t.mobile?4:5),b.left=lt(t,wt(t,g).filter(function(v,i,a){return Math.abs(v)!==Math.max(Math.abs(a[0]),Math.abs(a[a.length-1]))}).map(t.fmtAxis),t.mobile?12:14)+10;let k=Math.max(40,t.width-b.left-b.right),P=n.scaleLinear().domain([p,l===p?p+1:l]).nice().range([0,k]),N=o.append("g").attr("transform",`translate(${b.left},${b.top})`);Tt(t,N,g,k),Xt(t,N,k,x),St(t,N,g,k);let F=u=>P(u);Ut(t,N,x,Yt(t,F,Zt(t,P),Wt(k,t.mobile)),F),(a.xLabel?N.append("text").attr("class",t.cls("axis-title")).attr("x",k).attr("y",x+42).attr("text-anchor","end").text(a.xLabel):!1);let G=t.mobile?4:5.5,y=t.id("plot");o.append("defs").append("clipPath").attr("id",y).append("rect").attr("x",-G).attr("y",-G).attr("width",k+2*G).attr("height",x+2*G),N.append("g").attr("clip-path",`url(#${y})`).selectAll("circle").data(s).join("circle").attr("class",t.cls("point")).attr("cx",u=>P(u.x)).attr("cy",u=>g(u.y)).attr("r",G).attr("fill",i);let[R,_]=P.domain(),[V,S]=g.domain(),M=s.filter(u=>__gvAnd(__gvAnd(__gvAnd(__gvAnd(u.label,()=>(u.x>=R)),()=>((_)>=(u.x))),()=>(u.y>=V)),()=>((S)>=(u.y)))).slice(0,an);if((M.length?(an)>=(M.length):!1)){let{kept:u}=je(M.map(d=>({p:d,y:g(d.y)-G-5})),13,8,x,40);N.append("g").selectAll("text").data(u).join("text").attr("class",t.cls("value-label")).attr("x",d=>P(d.p.x)).attr("y",d=>d.y).attr("text-anchor",d=>P(d.p.x)>k*.85?"end":__gvLt(P(d.p.x),k*.15)?"start":"middle").text(d=>d.p.label)}let I=n.Delaunay.from(s,u=>P(u.x),u=>g(u.y)),B=N.append("circle").attr("class",t.cls("ring")).attr("r",G+3).style("display","none"),O=s.some(u=>u.group!==void 0),Y=__gvOr(__gvOr(a.yLabel,()=>((O?"Vertical axis":(E=e.series[0])==null?void 0:E.label))),()=>("Vertical axis")),K=__gvOr(a.xLabel,()=>("Horizontal axis")),tt=N.append("rect").attr("class",t.cls("overlay")).attr("width",k).attr("height",x),H=()=>B.style("display","none");t.tooltip.bind(tt,u=>{let[d,T]=n.pointer(u),v=I.find(d,T),L=s[v];if((!L?!0:Math.hypot(P(L.x)-d,g(L.y)-T)>40)){H(),t.tooltip.hide();return}B.style("display",null).attr("cx",P(L.x)).attr("cy",g(L.y));let Z=__gvOr(__gvOr(L.label,()=>(L.group)),()=>("")),Q=((O?L.group:!1)?L.label:!1)?it(t.cls("tip-row"),i(L),L.group,""):"",q=((O?L.group:!1)?L.label:!1)?"transparent":i(L),et=Q+it(t.cls("tip-row"),"transparent",K,t.fmtX(L.x))+it(t.cls("tip-row"),q,Y,t.fmtValue(L.y));t.tooltip.show(`${Z?`\x3cdiv class="${t.cls("tip-title")}">${ct(Z)}\x3c/div>`:""}${et}`,P(L.x)+b.left,g(L.y)+b.top)},H)}var rr=.25,ar=16,or=3;function sn(t){let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=e.x.map(String),c=e.series.length;if((!s.length?!0:!c))return t.height;let i=Math.max(1,Math.min(c,Math.floor(t.width/(t.mobile?170:220)))),m=Math.ceil(c/i),p=t.width/i,l=_=>_%i*p+p/2,h=c>1?e.series.map((_,V)=>o.append("text").attr("class",t.cls("donut-title")).attr("x",l(V)).attr("text-anchor","middle").text(_.label)):[],f=gt(h.map(_=>_.node()),p-12,or),b=h.map((_,V)=>({t:_,lines:f[V]})),x=Math.max(1,...b.map(_=>_.lines)),g=c>1?30+Math.ceil((x-1)*ar*1.15):0,k=Math.max(50,Math.min(p/2-12,t.mobile?130:150)),P=a.donutHole?k*.56:0,N=g+k*2+18,F=_=>{var V,S;return yt(r,(S=(V=e.categoryColors)==null?void 0:V[_])!=null?S:nt.muted,t.dark)},G=n.format(".0%"),y=n.arc().innerRadius(P).outerRadius(k).padAngle(a.donutHole?.012:.006).cornerRadius(a.donutHole?2:0),R=n.arc().innerRadius(P?(P+k)/2:k*.62).outerRadius(P?(P+k)/2:k*.62);return e.series.forEach((_,V)=>{var H;let S=Math.floor(V/i),M=l(V),I=S*N+g+k+6,B=_.values.map(X=>(X!==null?X>0:!1)?X:0),O=B.reduce((X,E)=>X+E,0),Y=o.append("g").attr("transform",`translate(${M},${I})`);if(((H=b[V])==null?!0:H.t.attr("y",S*N+18)),!O)return;let K=n.pie().sort(null).value(X=>X)(B),tt=ft(t,Y,0,0);K.forEach((X,E)=>{var v;if((0)>=(X.value))return;let u=(v=y(X))!=null?v:"",d=dt(t,[s[E],_.key]);(d?tt.clip(d,{x:-k,y:-k,w:k*2,h:k*2}).append("path").attr("d",u):!1);let T=Y.append("path").attr("class",t.cls("slice")).attr("d",u).attr("fill",F(E)).attr("fill-opacity",ht(t,d));t.tooltip.bind(T,L=>{var et;let[Z,Q]=n.pointer(L,t.chartEl),q=it(t.cls("tip-row"),F(E),c>1?_.label:"Value",t.fmtValue((et=_.values[E])!=null?et:0))+it(t.cls("tip-row"),"transparent","Share",G(X.value/O));t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct(s[E])}\x3c/div>${q}`,Z,Q)})}),tt.paint(),K.forEach((X,E)=>{if(((rr)>(X.endAngle-X.startAngle)?!0:(0)>=(X.value)))return;let[u,d]=R.centroid(X),T=Ot(F(E)),v=Y.append("text").attr("class",t.cls("slice-label")).attr("x",u).attr("y",d).attr("dy","0.35em").attr("text-anchor","middle").text(G(X.value/O));(T!=="#FFFFFF"?v.style("fill",T).style("stroke","rgba(255,255,255,0.35)"):!1)})}),m*N+6}function ln(t){let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,[s,c]=e.series;if(((!s?!0:!c)?!0:!e.x.length))return;let m=e.x.map(String).map((u,d)=>({i:d,name:u,a:s.values[d],b:c.values[d]})).filter(u=>(u.a!==null?u.b!==null:!1));if(!m.length)return;let p=t.margin;p.top=Math.max(p.top,34),p.bottom=14;let l=t.mobile?12:13,h=l+3,f=Math.max(t.height-p.top-p.bottom,m.length*h);o.attr("height",f+p.top+p.bottom);let[b,x]=Mt(m.flatMap(u=>[u.a,u.b]),a.yFromZero,a.yMin,a.yMax),g=n.scaleLinear().domain([b,x]).nice().range([f,0]),[k,P]=g.domain(),N=(u,d)=>d==="left"?{name:u.name,value:t.fmtValue(u.a),nameFirst:!0}:{name:t.mobile?"":u.name,value:t.fmtValue(u.b),nameFirst:!1},F=(u,d=u.name)=>d?u.nameFirst?`${d} ${u.value}`:`${u.value} ${d}`:u.value,G=u=>F(N(u,"left")),y=u=>F(N(u,"right")),R=t.width*(t.mobile?.4:.3),_=Math.min(R,lt(t,m.map(G),l))+12,V=Math.min(R,lt(t,m.map(y),l))+12,S=_,M=Math.max(S+60,t.width-V),I=u=>{var d,T;return yt(r,(T=(d=e.categoryColors)==null?void 0:d[u])!=null?T:nt.muted,t.dark)},B=u=>(I(u).toUpperCase()===nt.muted.toUpperCase()?!0:I(u).toUpperCase()===nt.darkMuted.toUpperCase()),O=o.append("g").attr("transform",`translate(0,${p.top})`);o.append("text").attr("class",t.cls("slope-head")).attr("x",S).attr("y",18).attr("text-anchor","middle").text(s.label),o.append("text").attr("class",t.cls("slope-head")).attr("x",M).attr("y",18).attr("text-anchor","middle").text(c.label),O.append("line").attr("class",t.cls("slope-axis")).attr("x1",S).attr("x2",S).attr("y1",0).attr("y2",f),O.append("line").attr("class",t.cls("slope-axis")).attr("x1",M).attr("x2",M).attr("y1",0).attr("y2",f);let Y=t.id("plot");o.append("defs").append("clipPath").attr("id",Y).append("rect").attr("x",0).attr("y",-5).attr("width",t.width).attr("height",f+10);let K=O.append("g").attr("clip-path",(a.yMin!==null?!0:a.yMax!==null)?`url(#${Y})`:null),tt=[...m].sort((u,d)=>+!B(u.i)-+!B(d.i));for(let u of tt){let d=I(u.i);K.append("line").attr("class",t.cls("slope-line")).attr("x1",S).attr("x2",M).attr("y1",g(u.a)).attr("y2",g(u.b)).attr("stroke",d).attr("stroke-width",B(u.i)?2:3),K.append("circle").attr("cx",S).attr("cy",g(u.a)).attr("r",4).attr("fill",d),K.append("circle").attr("cx",M).attr("cy",g(u.b)).attr("r",4).attr("fill",d)}let H=new Set,X=u=>{let d=m.map(v=>({r:v,y:g(u==="left"?v.a:v.b)}));sr(d,h,h/2,f);let T=u==="left"?S:M;for(let v of d){let L=u==="left"?v.r.a:v.r.b,Z=L>P?-1:(k)>(L)?1:0;((Z?!H.has(`${u}${Z}`):!1)?(H.add(`${u}${Z}`),O.append("path").attr("class",t.cls("off-scale")).attr("d",`M${T},${(0)>(Z)?-8:f+8}l-5,${-Z*8}h10z`).attr("fill",t.dark?nt.darkSecondary:nt.secondary).append("title").text((0)>(Z)?"Above the axis range":"Below the axis range")):!1);let Q=N(v.r,u),q=O.append("text").attr("class",t.cls("slope-label")).attr("x",u==="left"?S-10:M+10).attr("y",v.y).attr("dy","0.32em").attr("text-anchor",u==="left"?"end":"start").style("font-size",`${l}px`).text(F(Q));(B(v.r.i)?!0:q.style("fill",xt(r,I(v.r.i),t.dark)));let et=q.node(),A=Q.name;for(;(et.getComputedTextLength()>R?A.length>3:!1);)A=A.slice(0,-1),q.text(F(Q,`${A.trimEnd()}\u2026`))}};X("left"),X("right");let E=O.append("rect").attr("class",t.cls("overlay")).attr("x",S).attr("width",M-S).attr("height",f);t.tooltip.bind(E,u=>{let[d,T]=n.pointer(u),v=(d-S)/(M-S),L=m[0],Z=1/0;for(let et of m){let A=g(et.a)+(g(et.b)-g(et.a))*v;(__gvLt(Math.abs(A-T),Z)?([L,Z]=[et,Math.abs(A-T)]):!1)}let Q=L.b-L.a,q=it(t.cls("tip-row"),I(L.i),s.label,t.fmtValue(L.a))+it(t.cls("tip-row"),I(L.i),c.label,t.fmtValue(L.b))+it(t.cls("tip-row"),"transparent","Change",`${Q>=0?"+":""}${t.fmtValue(Q)}`);t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct(L.name)}\x3c/div>${q}`,d,T+p.top)})}function sr(t,n,r,o){let e=[...t].sort((a,s)=>a.y-s.y);e.forEach((a,s)=>a.y=Math.max(a.y,s?e[s-1].y+n:r));for(let a=e.length-1;a>=0;a--)e[a].y=Math.min(e[a].y,(e.length-1)>(a)?e[a+1].y-n:o)}var ir=3;function cn(t){let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=e.x.map(E=>t.fmtX(E)),c=s.length;if((!c?!0:!e.series.length))return t.height;let i=t.margin,m=t.mobile?30:32,p=t.mobile?13:14,l=t.width*(t.mobile?.38:.3),h=Math.min(l,lt(t,s,p));i.left=h+14,i.right=Math.max(i.right,16),i.bottom=30,i.top=Math.max(i.top,6);let f=Math.max(60,t.width-i.left-i.right),b=o.append("g").attr("transform",`translate(${i.left},${i.top})`),x=s.map(E=>b.append("text").attr("class",t.cls("cat-label")).attr("x",-12).attr("text-anchor","end").style("font-size",`${p}px`).text(E)),g=gt(x.map(E=>E.node()),h,ir),k=Math.max(m,Math.ceil(Math.max(1,...g)*p*1.15+10)),P=c*k,N=e.series.flatMap(E=>E.values).filter(E=>E!==null),[F,G]=Mt(N,a.yFromZero,a.yMin,a.yMax),y=t.mobile?4:5,R=n.scaleLinear().domain([F,G]).nice(y).range([0,f]);t.setAxis(R.domain(),y);let[_,V]=R.domain(),S=E=>(E>=_?(V)>=(E):!1),M=E=>E*k+k/2,I=E=>e.series.map(u=>u.values[E]).filter(u=>u!==null),B=s.map((E,u)=>a.valueLabels?lr(I(u),S):[]);(a.valueLabels?pr(t,R,f,B):!1);let O=cr(t,R,y),Y=E=>lt(t,[t.fmtValue(E)],12),K=B.map(E=>ur(R,f,E,Y)),tt=t.id("plot");o.append("defs").append("clipPath").attr("id",tt).append("rect").attr("x",R(_)-8).attr("y",0).attr("width",R(V)-R(_)+16).attr("height",P),b.append("g").attr("class",t.cls("grid")).selectAll("line").data(O).join("line").attr("x1",E=>Math.round(R(E))+.5).attr("x2",E=>Math.round(R(E))+.5).attr("y1",0).attr("y2",P),b.append("g").attr("class",t.cls("ticks")).selectAll("text").data(O).join("text").attr("x",E=>R(E)).attr("y",P+20).attr("text-anchor","middle").text(E=>t.fmtAxis(E)),(((0)>(F)?G>0:!1)?b.append("line").attr("class",t.cls("zero")).attr("x1",R(0)).attr("x2",R(0)).attr("y1",0).attr("y2",P):!1);let H=b.append("g").attr("clip-path",`url(#${tt})`);s.forEach((E,u)=>{x[u].attr("y",M(u)).attr("dy",`${.32-(g[u]-1)*.575}em`);let d=I(u),T=Math.min(...d),v=Math.max(...d);(((d.length>1?v>=_:!1)?(V)>=(T):!1)?H.append("line").attr("class",t.cls("dumbbell")).attr("x1",R(Math.max(_,T))).attr("x2",R(Math.min(V,v))).attr("y1",M(u)).attr("y2",M(u)):!1),mr(t,b,R,M(u),d),e.series.forEach((L,Z)=>{let Q=L.values[u];(Q!==null?H.append("circle").attr("class",t.cls("dot")).attr("cx",R(Q)).attr("cy",M(u)).attr("r",t.mobile?6:7).attr("fill",at(r,Z,t.dark)):!1)});for(let L of K[u])b.append("text").attr("class",t.cls("value-label")).attr("x",R(L.v)+L.dx).attr("y",M(u)).attr("dy","0.32em").attr("text-anchor",L.anchor).text(t.fmtValue(L.v))});let X=b.append("g").selectAll("rect").data(s.map((E,u)=>u)).join("rect").attr("class",t.cls("overlay")).attr("x",-i.left).attr("width",t.width).attr("y",E=>E*k).attr("height",k);return t.tooltip.bind(X,(E,u)=>{let d=e.series.map((L,Z)=>L.values[u]===null?"":it(t.cls("tip-row"),at(r,Z,t.dark),L.label,t.fmtValue(L.values[u]))).join(""),[T,v]=n.pointer(E,t.chartEl);t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct(s[u])}\x3c/div>${d}`,T,v)}),P+i.top+i.bottom}function lr(t,n){if(!t.length)return[];let r=Math.min(...t),o=Math.max(...t),e=[];return (((o)>(r)?n(r):!1)?e.push({v:r,anchor:"end",dx:-11}):!1),(n(o)?e.push({v:o,anchor:"start",dx:11}):!1),e}function cr(t,n,r){for(let o=r;o>=1;o--){t.setAxis(n.domain(),o);let e=n.ticks(o),a=e.map(c=>lt(t,[t.fmtAxis(c)],12));if((e.every((c,i)=>(i===0?!0:n(c)-n(e[i-1])>=(a[i]+a[i-1])/2+8))?!0:o===1))return e}return[]}function ur(t,n,r,o){let e=l=>{let h=l.anchor==="start"?t(l.v)+l.dx:t(l.v)+l.dx-o(l.v);return[h,h+o(l.v)]},a=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}),c=Math.min(...r.map(l=>l.v)),i=Math.max(...r.map(l=>l.v)),m=l=>((2)>(r.length)?!0:(e(l)[0]>=t(c)+7?__gvLe(e(l)[1],t(i)-7):!1)),p=[];for(let l of r){let h=a(l)?l:s(l);(((!a(h)?!0:(h!==l?!m(h):!1))?!0:p.some(f=>(__gvLt(e(f)[0],e(h)[1]+6)?__gvLt(e(h)[0],e(f)[1]+6):!1)))?!0:p.push(h))}return p}function mr(t,n,r,o,e){let[a,s]=r.domain(),c=e.filter(l=>(a)>(l)),i=e.filter(l=>l>s),m=t.dark?nt.darkSecondary:nt.secondary,p=(l,h,f)=>{let b=`M${l},${o}l${-h*6},-5v10z`;n.append("path").attr("class",t.cls("off-scale")).attr("d",b).attr("fill",m).append("title").text(`${f} ${f===1?"value is":"values are"} ${(0)>(h)?"below":"above"} the axis range`)};(c.length?p(r(a)-2,-1,c.length):!1),(i.length?p(r(s)+2,1,i.length):!1)}function pr(t,n,r,o){let e=new Map,a=i=>((e.has(i)?!0:e.set(i,lt(t,[t.fmtValue(i)],12))),e.get(i)),s=0,c=0;for(let i=0;(4)>(i);i++){let m=0,p=0;for(let l of o.flat()){let h=n(l.v)+l.dx;l.anchor==="end"?m=Math.max(m,a(l.v)-h+2):p=Math.max(p,h+a(l.v)-r+2)}if(((.5)>=(m)?(.5)>=(p):!1))return;s=Math.min(r*.3,s+Math.max(0,m)),c=Math.min(r*.3,c+Math.max(0,p)),n.range([s,r-c])}}var pe={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:[],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 mn=600;function un(t){var n;return{...t,style:{...pe,...t.style,map:{...pe.map,...(n=t.style)==null?void 0:n.map}}}}function pn(t,n){var e;if(!n.size)return de(t);let r=t.type==="combo"?t.data.series.flatMap((a,s)=>n.has(a.key)?s===0?[{...a,values:a.values.map(()=>null)}]:[]:[a]):t.data.series.filter(a=>!n.has(a.key)),o=(e=t.data.points)==null?void 0:e.filter(a=>{var s,c;return!n.has((c=a.group)!=null?c:(s=t.data.series[0])==null?void 0:s.key)});return de({...t,data:{...t.data,series:r,points:o}})}function de(t){if((t.type!=="line"?t.type!=="combo":!1))return t;let n=t.data.series.filter(s=>s.values.some(c=>c!==null));if((!n.length?!0:!n.every(s=>s.axis==="right")))return t;let r=t.data.series.map(s=>({...s,axis:"left"})),o=t.style,e=__gvOr(o.rightLabel,()=>((hr(o.yFormat,o.rightFormat)?o.yLabel:""))),a={...o,yFormat:o.rightFormat,yFromZero:o.rightFromZero,yMin:null,yMax:null,yLabel:e,rightLabel:""};return{...t,style:a,data:{...t.data,series:r}}}function dr(t){if((t.type!=="line"?t.type!=="combo":!1))return!1;let n=(r,o)=>(r.axis==="right"?((t.type==="line"?!0:o>0)):!1);return __gvAnd(t.data.series.some(n),()=>(t.data.series.some((r,o)=>!n(r,o))))}function hr(t,n){var r,o;return __gvAnd(__gvAnd((t.prefix===n.prefix?t.suffix===n.suffix:!1),()=>(t.decimals===n.decimals)),()=>(((r=t.multiply)!=null?r:1)===((o=n.multiply)!=null?o:1)))}function fr(t,n,r,o=null){var y,R,_,V;let e=un(n),a=o?we(o):null,s=new Set,c=`gv-${e.slug}`,i=S=>`${c}__${S}`,m=t.querySelector(`.${i("chart")}`),p=t.querySelector(`.${i("legend")}`),l=Ge(m,i("tooltip")),h=-1,f,b=0;(p==null?!0:p.addEventListener("click",S=>{let M=S.target.closest("[data-key]"),I=M==null?void 0:M.dataset.key;(I!==void 0?(s.has(I)?s.delete(I):((e.data.series.length-1)>(s.size)?s.add(I):!1),x()):!1)}));let x=()=>{var Q,q,et,A,D;b=0;let S=Math.floor(m.clientWidth);if((0)>=(S))return;let M=e.style.background==="white"?re(t):{color:null,dark:!1},I=M.dark;t.classList.toggle(`${c}--dark`,I),M.color?t.style.setProperty("--gv-halo",M.color):t.style.removeProperty("--gv-halo"),h=S,f=M.color;let B=(mn)>(t.clientWidth);((Q=m.querySelector("svg"))==null?!0:Q.remove());let O=m.ownerDocument.createElementNS("http://www.w3.org/2000/svg","svg");m.insertBefore(O,m.firstChild);let Y=r.select(O).attr("class",i("svg")).attr("width",S).attr("aria-hidden","true"),K=ge(e.type),tt=K?400:B?Math.min(e.style.height,360):e.style.height;Y.attr("height",tt);let H=pn(e,s),X=H.style.yFormat,E=H.style.rightFormat,u=Gt(r,X.prefix,X.suffix,X.decimals,X.multiply),d=Gt(r,E.prefix,E.suffix,E.decimals,E.multiply),T=w=>u.value(w),v={d3:r,spec:H,base:c,root:t,chartEl:m,svg:Y,width:S,height:tt,mobile:B,dark:I,page:M.color,margin:{top:(((H.style.yLabel?!0:H.style.rightLabel))?!["bar","donut","dot","slope"].includes(e.type):!1)?30:24,right:14,bottom:30,left:40},id:w=>`${c}-${w}`,cls:i,fmtAxis:w=>T(w),setAxis:(w,U)=>{T=$t(r,X,w,U)},fmtValue:u.value,fmtRightValue:d.value,rightAxis:(w,U)=>$t(r,E,w,U),fmtFor:w=>w.axis==="right"?d.value:u.value,fmtX:Fe(r,e,B),xAxis:(w,U)=>$t(r,e.style.xFormat,w,U),color:w=>at(H,w,I),tooltip:l,rightTitleY:14},L=(K?a:!1)?Re(a,e):a;K?(L?He(v,p,e,L):!1):Oe(v,p,e,s);let Z=__gvAnd(__gvAnd(__gvAnd((!K?e.type!=="bar":!1),()=>(e.type!=="donut")),()=>(e.type!=="dot")),()=>(e.type!=="slope"));if((((Z?H.style.yLabel:!1)?H.style.rightLabel:!1)?dr(H):!1)){let[w,U]=[H.style.yLabel,H.style.rightLabel].map(ut=>lt(v,[ut],12));(w+U+16>S?(v.rightTitleY=30,v.margin.top+=16):!1)}((H.style.yLabel?Z:!1)?Y.append("text").attr("class",i("axis-title")).attr("x",0).attr("y",14).text(H.style.yLabel):!1);try{let w=e.type;if(K){if((!a?!0:a.id!==((q=e.data.map)==null?void 0:q.geo)))throw new Error("map geography missing");Y.attr("height",Ie(v,L))}else (w==="line"?!0:w==="area")?Ye(v):((w==="column"?!0:w==="stacked")?!0:w==="combo")?nn(v):w==="bar"?Y.attr("height",(et=rn(v))!=null?et:tt):w==="scatter"?on(v):w==="donut"?Y.attr("height",(A=sn(v))!=null?A:tt):w==="slope"?ln(v):(w==="dot"?Y.attr("height",(D=cn(v))!=null?D:tt):!1)}catch(w){Y.selectAll("*").remove(),Y.append("text").attr("class",i("ticks")).attr("x",0).attr("y",20).text("Chart could not be drawn."),console.error("[gristviz]",w)}},g=()=>{(b?!0:(b=requestAnimationFrame(x)))},k=new ResizeObserver(()=>{(Math.floor(m.clientWidth)!==h?g():!1)});k.observe(m);let P=()=>{((e.style.background==="white"?re(t).color!==f:!1)?g():!1)},N=new MutationObserver(P),F=t.ownerDocument;N.observe(F.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme"]}),(F.body?N.observe(F.body,{attributes:!0,attributeFilter:["class","style","data-theme"]}):!1);let G=(R=(y=F.defaultView)==null?void 0:y.matchMedia)==null?void 0:R.call(y,"(prefers-color-scheme: dark)");return((_=G==null?void 0:G.addEventListener)==null?!0:_.call(G,"change",P)),x(),((V=F.fonts)==null?!0:V.ready.then(()=>g())),{update(S){e=un(S);for(let M of[...s])(e.data.series.some(I=>I.key===M)?!0:s.delete(M));x()},destroy(){var S;k.disconnect(),N.disconnect(),l.destroy(),((S=G==null?void 0:G.removeEventListener)==null?!0:S.call(G,"change",P)),(b?cancelAnimationFrame(b):!1)}}}return xn(gr);})(); 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);});} function go(){ 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(); })();

Omnipresent but non-voting in the coming election is the Amazon itself, which stands at the edge of farm country and stores something on the order of 175 billion metric tons of carbon, equivalent to roughly 15 years of global carbon dioxide emissions. The planet’s largest tropical rainforest, the Amazon is big enough to make its own weather: Water drawn up by its trees ultimately accounts for up to half of the region’s rainfall.

Affronting the forest is a menagerie of harms, from drought to fire and logging to clear-cuts. And while the Brazilian Forest Code permits landowners to cut up to 20 percent of their Amazon properties, the monitoring network MapBiomas recently estimated that 97 percent of Amazon land clearing in 2025 showed signs of illegality.

An aerial view of an illegal mining area at Tapajos Environmental Protection Area in the Amazon rainforest, in southwestern Para State, Brazil, in May 2026. Evaristo Sa / AFP via Getty Images

Under Lula’s current term, clearing rates in the Amazon have fallen every year. If Brazil returned to the elder Bolsonaro’s deforestation pace, the rainforest would lose about 17,600 square miles over the next four years, versus about 8,900 square miles at the 2025 rate: a difference in landmass approximately the size of Belize.

The first-round election results suggest agricultural interests likely played a role in Bolsonaro’s strong performance. Lula lost vote share in almost every municipality in the country relative to his 2022 results. But in municipalities where agriculture accounts for more than half of the local economy, his vote share fell by nearly 8 points: triple his loss in non-agricultural areas.

.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda{--gv-text:#3C3830;--gv-text-2:#747473;--gv-grid:#E0E0E0;--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-br-draft-swing-mzehda#gv-br-draft-swing-mzehda *{box-sizing:border-box} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda div,.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda span{margin:0;padding:0;font-size:inherit;line-height:inherit} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda.gv-br-draft-swing-mzehda--dark{--gv-text:#F0EDE6;--gv-text-2:#B3ADA3;--gv-grid:#4A4640;--gv-halo:#1C1B19;--gv-axis:#B3ADA3} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__header{margin:0 0 12px} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__title{font-family:"PolySans", Arial, sans-serif;font-weight:500;font-size:24px;line-height:1.2;margin:10px 0 6px;padding:0;color:var(--gv-text);text-transform:none;letter-spacing:normal} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__subtitle{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-weight:500;font-size:18px;line-height:1.35;margin:0;padding:0;color:var(--gv-text)} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__hl{font-weight:700} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda.gv-br-draft-swing-mzehda--dark .gv-br-draft-swing-mzehda__hl--dk-primary{color:#F0EDE6!important} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda.gv-br-draft-swing-mzehda--dark .gv-br-draft-swing-mzehda__hl--dk-muted{color:#6B665E!important} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px 16px;margin:0 0 8px;padding:0;font-size:14px;line-height:1.2;color:var(--gv-text)} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__legend-item,.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__legend-item:hover,.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__legend-item:focus,.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__legend-item:active{display:inline-flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:6px;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-br-draft-swing-mzehda#gv-br-draft-swing-mzehda button.gv-br-draft-swing-mzehda__legend-item,.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda button.gv-br-draft-swing-mzehda__legend-item:hover{cursor:pointer} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda button.gv-br-draft-swing-mzehda__legend-item:hover{text-decoration:underline;text-underline-offset:3px} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda button.gv-br-draft-swing-mzehda__legend-item:focus-visible{outline:2px solid #3977F3;outline-offset:2px} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__legend-item--off{opacity:0.35} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__map-label{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:11px;font-weight:500;letter-spacing:0.02em} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__legend-label{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:12px;fill:var(--gv-text-2)} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__legend-key{font-family:"Basis Grotesque", "Basis Grotesque Pro", Arial, sans-serif;font-size:14px;fill:var(--gv-text)} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__place{cursor:default} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__legend-axis{font-size:11px;color:var(--gv-text-2);margin-left:2px} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__swatch{display:block;flex:none;overflow:visible} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__chart{position:relative;width:100%;margin:0;padding:0} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda svg.gv-br-draft-swing-mzehda__svg{display:block;overflow:visible;max-width:none;height:auto} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda 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-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__ticks text{font-size:14px} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__cat-labels text{fill:var(--gv-text)} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__grid line{stroke:var(--gv-grid);stroke-opacity:0.7;shape-rendering:crispEdges} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__baseline{stroke:var(--gv-axis);stroke-width:1;shape-rendering:crispEdges} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__zero{stroke:#888888;stroke-width:1;stroke-dasharray:4 4} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__line{fill:none;stroke-linecap:round;stroke-linejoin:round} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__line-halo{fill:none;stroke:var(--gv-halo);stroke-width:7;stroke-linecap:round;stroke-linejoin:round} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__segment{stroke:var(--gv-halo);stroke-width:1} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__point{fill-opacity:0.85;stroke:var(--gv-halo);stroke-width:1} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__ring{fill:none;stroke:var(--gv-text);stroke-width:1.5} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__dot{stroke:var(--gv-halo);stroke-width:1.7} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__dot--pulse{transform-box:fill-box;transform-origin:center;animation:gv-br-draft-swing-mzehda-pulse 1.6s ease-in-out infinite} @keyframes gv-br-draft-swing-mzehda-pulse{0%,100%{transform:scale(1)}50%{transform:scale(1.2)}} @media (prefers-reduced-motion:reduce){.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__dot--pulse{animation:none}} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__value-label{font-size:12px;paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__axis-title{font-size:12px;fill:var(--gv-text-2)} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__direct-label{font-size:13px;font-weight:700;paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__donut-title{font-size:16px;font-weight:700;fill:var(--gv-text)} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__slice{stroke:var(--gv-halo);stroke-width:1.5} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__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-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__slope-head{font-size:14px;font-weight:700;fill:var(--gv-text)} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__slope-axis{stroke:var(--gv-grid);stroke-width:1} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__slope-line{stroke-linecap:round} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__slope-label{fill:var(--gv-text);paint-order:stroke fill;stroke:var(--gv-halo);stroke-width:3px;stroke-linejoin:round} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__dumbbell{stroke:#C9C5BD;stroke-width:3;stroke-linecap:round} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda.gv-br-draft-swing-mzehda--dark .gv-br-draft-swing-mzehda__dumbbell{stroke:#6B665E} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__cat-label{fill:var(--gv-text)} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__overlay{fill:transparent;pointer-events:all} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__rule{stroke:var(--gv-text-2);stroke-width:1;stroke-dasharray:2 3} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__tooltip{position:absolute;display:none;pointer-events:none;z-index:5;min-width:120px;max-width:260px;padding:6px 9px;background:rgba(255,255,255,0.9);border:2px solid #888888;border-radius:4px;font-size:13px;line-height:1.35;color:#3C3830} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda.gv-br-draft-swing-mzehda--dark .gv-br-draft-swing-mzehda__tooltip{background:rgba(28,27,25,0.94);color:#F0EDE6} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__tip-title{font-weight:700;margin:0 0 3px} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__tip-row{display:flex;align-items:center;gap:6px} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__tip-row i{display:block;flex:none;width:10px;height:10px;border-radius:2px} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__tip-row span{flex:1} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__tip-row b{font-weight:700;white-space:nowrap} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__tip-more{color:var(--gv-text-2);font-size:12px;margin-top:2px} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__note{color:var(--gv-text-2);font-size:12px;font-style:italic;line-height:1.35;margin:8px 0 0;padding:0} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__footer{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;margin:8px 0 0} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__credits{display:flex;flex-direction:column} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__source{color:var(--gv-text-2);font-size:12px;line-height:1.35;display:inline-block} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__credit{color:var(--gv-text-2);font-size:12px;line-height:1.35;margin-top:3px;font-style:italic;font-weight:700;display:inline-block} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__credit .gv-br-draft-swing-mzehda__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-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__logo{display:block;height:auto;max-width:62px;min-width:50px;width:62px;margin:0 0 0 auto;padding:0;transform:translateY(-2px);overflow:visible} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__logo path{fill:var(--gv-text)} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__logos{display:flex;align-items:center;gap:14px;margin-left:auto;flex-wrap:wrap;justify-content:flex-end} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__logos .gv-br-draft-swing-mzehda__logo{margin:0} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__partner{display:block;margin:0;padding:0;border:0;line-height:0} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__partner img{display:block;height:22px;width:auto;max-width:110px;margin:0;padding:0;border:0;box-shadow:none;object-fit:contain} .gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda.gv-br-draft-swing-mzehda--dark .gv-br-draft-swing-mzehda__partner--invert img{filter:brightness(0) invert(1)} @media (max-width:600px){.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__title{font-size:21px}.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__subtitle{font-size:16px}.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__legend{font-size:13px}.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__ticks text{font-size:12px}.gv-br-draft-swing-mzehda#gv-br-draft-swing-mzehda .gv-br-draft-swing-mzehda__logo{width:50px}} Agricultural revolution Change in Lula's vote share, 2022 to 2026, percentage points Source: TSE, IBGE, Marco Antonio Faganello Clayton Aldern / Grist / Meredith Petrick / Unsplash (function(){ var K="__gv_br_draft_swing_mzehda_initialized__";if(window[K])return;window[K]=true; var ID="gv-br-draft-swing-mzehda"; var SPEC={"version":1,"slug":"br-draft-swing-mzehda","type":"column","data":{"xKind":"category","x":["Under 5%","5–10%","10–20%","20–30%","30–40%","40–50%","Over 50%"],"series":[{"key":"All votes in group","label":"All votes in group","color":"#12A07F","values":[-2.2,-4.1,-4.7,-5.2,-6.5,-6.8,-7.8]}]},"text":{"title":"Agricultural revolution","subtitle":"Change in Lula's vote share, 2022 to 2026, percentage points","source":"Source: TSE, IBGE, Marco Antonio Faganello","credit":"Clayton Aldern / Grist","altText":"Bar chart of Lula’s vote share in 2026 relative to 2022, broken down by farming’s contribution to the local economy. In towns where farming is under 5 percent of the local economy, his vote share fell by 2.2 percentage points. In towns where farming comprises over 50 percent, Lula’s share fell by 7.8 percentage points.","note":""},"style":{"paletteId":"single-turquoise","political":false,"background":"white","yFormat":{"prefix":"","suffix":" pts","decimals":null},"xFormat":{"prefix":"","suffix":"","decimals":null},"yFromZero":true,"yMin":null,"yMax":null,"valueLabels":false,"endDots":true,"imageFill":{"mode":"all","opacity":0.65,"photos":{"*":{"url":"https://images.unsplash.com/photo-1562702076-c719c8796b8d?w=1600\u0026q=80\u0026fm=jpg","photographer":"Meredith Petrick","via":"unsplash","page":"https://unsplash.com/photos/green-leafed-plants-83RJnK0UbW4","profile":"https://unsplash.com/@mpetrick"}}},"width":"column","height":400,"yLabel":"","xLabel":"Agriculture’s share of local economy","highlight":null,"legend":"none","xFromZero":false,"xMin":null,"xMax":null,"rightAxis":[],"rightFormat":{"prefix":"","suffix":"","decimals":null},"rightLabel":"","rightFromZero":true,"donutHole":true,"partners":[],"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.2.0","createdAt":"","updatedAt":"","fallbackPngUrl":"","review":null}}; var GEO=null; function __gvTip(h){return h.replace(/(tip-title"\x3e)([^\x3c]*)/, "$1$2 agriculture").replace(/\x3cspan\x3e[^\x3c]*\x3c\/span\x3e\x3cb\x3e([^\x3c]*)/, "\x3cspan\x3e\x3c/span\x3e\x3cb\x3e$1 vs. 2022").replace(/background:#[0-9A-Fa-f]{6}/, "background:#F79945");} 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 te=Object.defineProperty;var hn=Object.getOwnPropertyDescriptor;var fn=Object.getOwnPropertyNames;var gn=Object.prototype.hasOwnProperty;var bn=(t,n)=>{for(var r in n)te(t,r,{get:n[r],enumerable:!0})},yn=(t,n,r,o)=>{if(((n?typeof n=="object":!1)?!0:typeof n=="function"))for(let e of fn(n))((!gn.call(t,e)?e!==r:!1)?te(t,e,{get:()=>n[e],enumerable:(!(o=hn(n,e))?!0:o.enumerable)}):!1);return t};var xn=t=>yn(te({},"__esModule",{value:!0}),t);var gr={};bn(gr,{MOBILE_BREAKPOINT:()=>mn,mount:()=>fr,primaryAxis:()=>de,visible:()=>pn});var kn=["map-states","map-counties","map-world","map-dots"];function ge(t){return kn.includes(t)}var be=["line","slope"];var wn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",Mn=new Map([...wn].map((t,n)=>[t,n])),vn=10;function ee(t){let n=[],r=0,o=1;for(let e of t){let a=Mn.get(e);if(a===void 0)throw new Error("Unreadable map geography");r+=a%32*o,a>=32?o*=32:(n.push(r%2?-(r+1)/2:r/2),r=0,o=1)}return n}function $n(t,n){let r=ee(t),o=[],e=0,a=0,s=0;for(;(r.length)>(e);){let c=r[e++],i=[];for(let m=0;(c)>(m);m++)a+=r[e++],s+=r[e++],i.push([a/n,s/n]);o.push(i)}return o}function ye(t,n){let r=[];return n.forEach((o,e)=>{let a=o>=0?t[o]:[...t[-o-1]].reverse();for(let s=e?1:0;(a.length)>(s);s++)r.push(a[s])}),r}var xe=t=>String(Math.round(t*10)/10),ke=(t,n)=>t.length?`M${t.map(([r,o])=>`${xe(r)} ${xe(o)}`).join("L")}${n?"Z":""}`:"";function Cn(t){var e;let n=0,r=0,o=0;for(let a=0,s=t.length-1;(t.length)>(a);s=a++){let c=t[s][0]*t[a][1]-t[a][0]*t[s][1];n+=c,r+=(t[s][0]+t[a][0])*c,o+=(t[s][1]+t[a][1])*c}return n?{area:n/2,c:[r/(3*n),o/(3*n)]}:{area:0,c:(e=t[0])!=null?e:null}}function we(t){var h;let n=$n(t.arcs,(h=t.q)!=null?h:vn),r=!!t.sphere,o=ee(t.geoms),e=0,a=0,s=t.ids.map((f,b)=>{var F,G,y;let x=o[e++],g="",k=null,P=-1,N=[];for(let R=0;(x)>(R);R++){let _=o[e++],V=[];N.push(V);for(let S=0;(_)>(S);S++){let M=o[e++],I=[];for(let O=0;(M)>(O);O++)a+=o[e++],I.push(a);let B=ye(n,I);if(r){V.push(B);continue}if(g+=ke(B,!0),S===0){let{area:O,c:Y}=Cn(B);(Math.abs(O)>P?(P=Math.abs(O),k=Y):!1)}}}return{id:f,name:(F=t.names[b])!=null?F:f,code:(y=(G=t.codes)==null?void 0:G[b])!=null?y:"",d:g,anchor:k,...r?{polygons:N}:{}}}),c=f=>{var N;let b=ee(f),x=0,g=0,k=[],P=(N=b[x++])!=null?N:0;for(let F=0;(P)>(F);F++){let G=b[x++],y=[];for(let R=0;(G)>(R);R++)g+=b[x++],y.push(g);k.push(ye(n,y))}return k},[i,m,p]=[c(t.inner),c(t.outer),c(t.group)],l=f=>r?"":f.map(b=>ke(b,!1)).join("");return{id:t.id,w:t.w,h:t.h,features:s,inner:l(i),outer:l(m),group:l(p),...r?{sphere:!0,lines:{inner:i,outer:m,group:p}}:{}}}var mt={orange:"#F79945",turquoise:"#12A07F",fuchsia:"#AC00E8",azure:"#3977F3",earth:"#3C3830",red:"#F5515B"},nt={primary:"#3C3830",secondary:"#777777",grid:"#E0E0E0",muted:"#C9C5BD",darkPrimary:"#F0EDE6",darkSecondary:"#B3ADA3",darkGrid:"#4A4640",darkMuted:"#6B665E"},$e={white:"#FFFFFF",smog:"#F0F0F0",lavender:"#D3C8FF",celery:"#E6FFA0",sky:"#C5E0F7",butter:"#FFF1C7",blush:"#FFD6DA"};function Me(t,n,r){let o=t.replace("#",""),e=n.replace("#","");return`#${[0,2,4].map(s=>{let c=parseInt(o.slice(s,s+2),16),i=parseInt(e.slice(s,s+2),16);return Math.round(c+(i-c)*r).toString(16).padStart(2,"0")}).join("")}`.toUpperCase()}var bt=mt;var Dt="#D9D7D2",Pt="#3A3733",Ce="#EDEBE6",Te="#2E2B28",ve="#F5EDDA",Tn="#EF6C4A",Rt=t=>[Me(t,"#FFFFFF",.8),t.toUpperCase(),Me(t,"#000000",.45)],kr=[{id:"seq-orange",label:"Orange",kind:"sequential",stops:Rt(bt.orange)},{id:"seq-turquoise",label:"Turquoise",kind:"sequential",stops:Rt(bt.turquoise)},{id:"seq-azure",label:"Azure",kind:"sequential",stops:Rt(bt.azure)},{id:"seq-fuchsia",label:"Fuchsia",kind:"sequential",stops:Rt(bt.fuchsia)},{id:"div-turquoise-coral",label:"Turquoise to coral",kind:"diverging",stops:[bt.turquoise,ve,Tn]},{id:"div-azure-orange",label:"Azure to orange",kind:"diverging",stops:[bt.azure,ve,bt.orange]}];function re(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 Gt(t,n,r,o,e=1){let a=(i,m)=>`${(0)>(i)?"\u2212":""}${n}${m}${r}`;return{axis:(i,m)=>{let p=i*e>=1e4,l=((m?m:1))*e,h=i*e,f=p?t.formatPrefix(`.${o!=null?o:t.precisionPrefix(l,h)}`,h):t.format(`,.${o!=null?o:t.precisionFixed(l)}f`);return b=>{let s=(p?b===0:!1)?a(0,"0"):a(b,f(Math.abs(b*e)).replace("G","B"));return (r?Math.abs(Math.abs(b*e)-Math.floor(h/l+1e-9)*l)>l*1e-6:!1)?s.slice(0,-r.length):s}},value:i=>{let m=Math.abs(i*e),p=o!=null?o:Sn(m),l=t.format(`,.${p}~f`);return a(i,l(m))}}}function Sn(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 $t(t,n,r,o){let[e,a]=r,s=t.tickStep(e,a,o);return Gt(t,n.prefix,n.suffix,n.decimals,n.multiply).axis(Math.max(Math.abs(e),Math.abs(a)),s)}function Fe(t,n,r){let{xKind:o,x:e}=n.data,a=n.style.xFormat;if(o==="year")return s=>String(s);if(o==="number"){let s=Gt(t,a.prefix,a.suffix,a.decimals,a.multiply);return c=>s.value(Number(c))}if(o==="date"){let s=e.map(l=>String(l)),c=s.every(l=>l.endsWith("-01-01")),i=s.every(l=>l.endsWith("-01")),m=c?"%Y":i?r?"%b \u2019%y":"%b %Y":"%b %-d, %Y",p=t.utcFormat(m);return l=>p(l instanceof Date?l:new Date(String(l)+(String(l).length===10?"T00:00:00Z":"")))}return s=>String(s)}function Le(t){return new Date(String(t)+"T00:00:00Z")}function En(t,n){var r;return n?"#1A1A1A":(r=$e[t.style.background])!=null?r:"#FFFFFF"}function ne(t){let n=t.replace("#",""),r=n.length===3?n.split("").map(o=>o+o).join(""):n.slice(0,6);return[0,2,4].map(o=>__gvOr(parseInt(r.slice(o,o+2),16),()=>(0)))}function Fn([t,n,r]){return`#${[t,n,r].map(o=>Math.round(Math.max(0,Math.min(255,o))).toString(16).padStart(2,"0")).join("")}`.toUpperCase()}function zt(t,n,r){let o=ne(t),e=ne(n);return Fn(o.map((a,s)=>a+(e[s]-a)*r))}function Ht(t){let[n,r,o]=ne(t).map(e=>{let a=e/255;return (.03928)>=(a)?a/12.92:((a+.055)/1.055)**2.4});return .2126*n+.7152*r+.0722*o}function vt(t,n){let[r,o]=[Ht(t),Ht(n)].sort((e,a)=>a-e);return(r+.05)/(o+.05)}function Ln(t,n){if(!n)return t;let r=t.toUpperCase();return r===mt.earth?nt.darkPrimary:r===nt.muted.toUpperCase()?nt.darkMuted:t}var Se=.58,It=.45,An=.7,Ee=new Map;function Dn(t,n){let r=`${t}|${n}`,o=Ee.get(r);if(o)return o;let e=Ht(t),a=0,s=1/0;for(let m=0;(206)>=(m);m++){let p=-It+m/206*(It+Se),l=Math.abs(Ht((0)>(p)?zt(n,"#FFFFFF",-p):zt(n,"#000000",p))-e);((s)>(l)?([a,s]=[p,l]):!1)}let c=(a+It)/(It+Se),i=zt(n,"#FFFFFF",c*An);return Ee.set(r,i),i}function yt(t,n,r){var e;if(!r)return n;let o=(e=t.style.paletteId)!=null?e:"";if(o.startsWith("tonal-")){let a=mt[o.slice(6)];if(a)return Dn(n,a)}return Ln(n,r)}function at(t,n,r){var o,e;return yt(t,(e=(o=t.data.series[n])==null?void 0:o.color)!=null?e:mt.orange,r)}function xt(t,n,r,o=4.5){let e=En(t,r);if(vt(n,e)>=o)return n;let a=r?"#FFFFFF":"#000000";for(let s=.05;(1)>(s);s+=.05){let c=zt(n,a,s);if(vt(c,e)>=o)return c}return a}function Ot(t){return vt("#FFFFFF",t)>=4.5?"#FFFFFF":vt(nt.primary,t)>=4.5?nt.primary:vt("#FFFFFF",t)>=vt("#000000",t)?"#FFFFFF":"#000000"}var ae={w:975,h:610,scale:1300,x:487.5,y:305},Bt=ae.scale,Ae=ae.x,De=ae.y,Pe=[[Ae+.29*Bt,De+.17*Bt],[Ae+.41*Bt,De+.234*Bt]];function Ge(t,n){let r=t.querySelector(`.${n}`);(r?!0:(r=t.ownerDocument.createElement("div"),r.className=n,r.setAttribute("role","presentation"),t.appendChild(r)));let o=r,e=null,a=null,s=()=>{o.style.display="none"},c=m=>{((m===a?!0:!e)?!0:(m.pointerType==="touch"?(e(),e=null):!1))},i=t.ownerDocument;return i.addEventListener("pointerdown",c),{show(m,p,l){m=__gvTip(m);o.innerHTML=m,o.style.display="block";let h=o.offsetWidth,f=o.offsetHeight,b=t.clientWidth,x=p+14;(x+h>b?(x=p-h-14):!1),((0)>(x)?(x=Math.max(0,Math.min(b-h,p-h/2))):!1),o.style.left=`${x}px`,o.style.top=`${Math.max(0,l-f-12)}px`},hide:s,bind(m,p,l){let h=()=>{(l==null?!0:l()),s()};m.on("pointermove.gvtip",(f,b)=>p(f,b)).on("pointerdown.gvtip",(f,b)=>{((f.pointerType!=="touch"?f.pointerType!=="pen":!1)?!0:(a=f,e=h,p(f,b)))}).on("pointerleave.gvtip",f=>{(f.pointerType!=="touch"?h():!1)})},destroy(){i.removeEventListener("pointerdown",c)}}}function ct(t){return t.replace(/[\x26\x3c>"]/g,n=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;",'"':"\x26quot;"})[n])}function it(t,n,r,o){let e=a=>a.replace(/[\x26\x3c>]/g,s=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;"})[s]);return`\x3cdiv class="${t}">\x3ci style="background:${n}">\x3c/i>\x3cspan>${e(r)}\x3c/span>\x3cb>${e(o)}\x3c/b>\x3c/div>`}var Ve=["VT","NH","MA","RI","CT","NJ","DE","MD","DC"],Pn={CA:[80,318],FL:[790,534],ID:[192,163],KY:[703,315],LA:[562,460],MI:[683,199],NC:[816,350]},Gn=560;function Vn(t,n,r){var i,m,p;let o=t.style.map,e=n?Pt:Dt,a=(m=(i=t.data.series[0])==null?void 0:i.values)!=null?m:[],s=(p=t.data.map)==null?void 0:p.categories;if(s){let l=new Map(o.categories.map(h=>[h.name,h.color]));return h=>{var f;return (s[h]!==null?s[h]!==void 0:!1)?(f=l.get(s[h]))!=null?f:nt.muted:e}}if((o.continuous?o.stops.length>=2:!1)){let l=r.scaleLinear().domain(o.stops).range(o.colors).interpolate(r.interpolateLab).clamp(!0);return h=>(a[h]===null?!0:a[h]===void 0)?e:l(a[h])}if(!o.colors.length)return()=>e;let c=r.scaleThreshold().domain(o.thresholds).range(o.colors);return l=>(a[l]===null?!0:a[l]===void 0)?e:c(a[l])}function Ct(t,n){for(let[r,o]of Object.entries(n))t.style.setProperty(r,o,"important")}var _n=t=>{var o,e;let n=["th","st","nd","rd"],r=t%100;return`${t}${(e=(o=n[(r-20)%10])!=null?o:n[r])!=null?e:n[0]}`},_e=new WeakMap;function Nn(t,n){let r=t.width/n.w,o=n.features.map(e=>e.d).join("");return{height:Math.ceil(n.h*r),transform:`scale(${r})`,unit:1/r,d:e=>e.d,anchor:e=>e.anchor?[e.anchor[0]*r,e.anchor[1]*r]:null,land:()=>o,inner:()=>n.inner,outer:()=>n.outer,group:()=>n.group,sphere:()=>"",graticule:()=>""}}function Re(t,n){var i;if((t.sphere?!0:((i=n.data.map)!=null?i.pr:!1)))return t;let[[r,o],[e,a]]=Pe,s=m=>{let[p,l]=m.split("L")[0].split(" ").map(Number);return __gvAnd(__gvAnd((p>=r?(e)>=(p):!1),()=>(l>=o)),()=>((a)>=(l)))},c=m=>m.split("M").filter(p=>(p?!s(p):p)).map(p=>`M${p}`).join("");return{...t,features:t.features.filter(m=>!m.id.startsWith("72")),inner:c(t.inner),outer:c(t.outer),group:c(t.group)}}function Rn(t){let n=0;for(let r=0,o=t.length-1;(t.length)>(r);o=r++)n+=t[o][0]*t[r][1]-t[r][0]*t[o][1];return n}function In(t){let n=r=>(r.length>=4?Math.abs(Rn(r))>1e-6:!1);return t.features.map(r=>{var o;return{type:"MultiPolygon",coordinates:((o=r.polygons)!=null?o:[]).filter(e=>__gvAnd(e.length,()=>(n(e[0])))).map(e=>[e[0],...e.slice(1).filter(n)])}})}function Ne(t,n,r,o=In(n)){let{d3:e,spec:a}=t,s=a.style.map,c=s.projection==="globe",i={type:"GeometryCollection",geometries:o},m={type:"Sphere"},p,l;if(c)l=Math.min(t.width,Gn),p=e.geoOrthographic().rotate([r[0],r[1]]).fitExtent([[4,4],[t.width-4,l-4]],m);else{let x=(s.sphere?!0:s.graticule)?m:i;p=e.geoEqualEarth().fitWidth(t.width,x),l=Math.ceil(e.geoPath(p).bounds(x)[1][1])+1}let h=e.geoPath(p),f=new Map(n.features.map((x,g)=>[x.id,o[g]])),b=x=>{var g;return(g=h({type:"MultiLineString",coordinates:x}))!=null?g:""};return{height:l,transform:null,unit:1,d:x=>{var g;return(g=h(f.get(x.id)))!=null?g:""},anchor:x=>{let g=h.centroid(f.get(x.id));return (Number.isFinite(g[0])?Number.isFinite(g[1]):!1)?g:null},land:()=>{var x;return(x=h(i))!=null?x:""},inner:()=>{var x,g;return b((g=(x=n.lines)==null?void 0:x.inner)!=null?g:[])},outer:()=>{var x,g;return b((g=(x=n.lines)==null?void 0:x.outer)!=null?g:[])},group:()=>{var x,g;return b((g=(x=n.lines)==null?void 0:x.group)!=null?g:[])},sphere:()=>{var x;return(((c?!0:s.sphere))?(x=h(m))!=null:!1)?x:""},graticule:()=>{var x;return (s.graticule?(x=h(e.geoGraticule10()))!=null:!1)?x:""}}}function Ie(t,n){var H,X,E,u;let{d3:r,spec:o,svg:e}=t,a=o.data.map,s=o.style.map,c=(!!n.sphere?s.projection==="globe":!1),i=(H=s.center)!=null?H:[0,20],m=_e.get(t.chartEl),p=((m?m.center[0]===i[0]:!1)?m.center[1]===i[1]:!1)?m:{center:i,rotate:[-i[0],-i[1]]};_e.set(t.chartEl,p);let l=n.sphere?Ne(t,n,p.rotate):Nn(t,n),h=o.type==="map-dots",f=Vn(o,t.dark,r),b=(E=(X=o.data.series[0])==null?void 0:X.values)!=null?E:[],x=new Map(a.ids.map((d,T)=>[d,T]).filter(([d])=>d!==null)),g=b.map((d,T)=>[d,T]).filter(([d])=>d!==null).sort((d,T)=>T[0]-d[0]),k=new Map;g.forEach(([d,T],v)=>k.set(T,(v>0?g[v-1][0]===d:!1)?k.get(g[v-1][1]):v+1));let P=(u=t.page)!=null?u:t.dark?"#1A1A1A":"#FFFFFF",N=(d,T,v)=>Ct(d,{fill:"none",stroke:T,"stroke-width":`${v}px`,"vector-effect":"non-scaling-stroke","stroke-linejoin":"round","pointer-events":"none"}),F=t.id("map-shadow"),G=l.unit;e.append("defs").append("filter").attr("id",F).attr("x","-5%").attr("y","-5%").attr("width","110%").attr("height","110%").append("feGaussianBlur").attr("stdDeviation",2.5*G);let y=e.append("g").attr("class",t.cls("map"));(l.transform?y.attr("transform",l.transform):!1);let R=y.append("path").attr("class",t.cls("shadow")).attr("filter",`url(#${F})`).attr("transform",`translate(${2*G},${2.5*G})`);Ct(R.node(),{fill:t.dark?"#000000":mt.earth,opacity:"0.25",stroke:"none","fill-rule":"evenodd","pointer-events":"none"});let _=y.append("path").attr("class",t.cls("sphere"));Ct(_.node(),{fill:c?t.dark?"#23282C":"#EEF3F6":"none",stroke:t.dark?nt.darkMuted:nt.muted,"stroke-width":"0.75px","pointer-events":"none"});let V=y.append("path").attr("class",t.cls("graticule"));N(V.node(),t.dark?nt.darkGrid:nt.grid,.5);let S=(d,T)=>{var Z,Q;if(d===void 0)return`\x3cdiv class="${t.cls("tip-title")}">${ct(T)}\x3c/div>\x3cdiv class="${t.cls("tip-row")}">\x3cspan>No data\x3c/span>\x3c/div>`;let v=b[d],L=`\x3cdiv class="${t.cls("tip-title")}">${ct(o.data.x[d])}\x3c/div>`;(a.categories?(L+=it(t.cls("tip-row"),f(d),"Category",(Z=a.categories[d])!=null?Z:"None")):!1),(v!=null?(L+=it(t.cls("tip-row"),(a.categories?!0:h)?"transparent":f(d),o.data.series[0].label,t.fmtValue(v)),((!h?g.length>2:!1)?(L+=it(t.cls("tip-row"),"transparent","Rank",`${_n(k.get(d))} of ${g.length}`)):!1)):!1);for(let q of(Q=a.tips)!=null?Q:[])(q.values[d]?(L+=it(t.cls("tip-row"),"transparent",q.label,q.values[d])):!1);return L},M=y.append("g").selectAll("path").data(n.features).join("path").attr("class",t.cls("place")).each(function(d){let T=x.get(d.id);Ct(this,{fill:h?t.dark?Te:Ce:T===void 0?t.dark?Pt:Dt:f(T),stroke:"none","fill-rule":"evenodd"})}),I=y.append("path");N(I.node(),P,n.id==="us-counties"?.4:.75);let B=y.append("path");N(B.node(),P,1.2);let O=y.append("path").attr("class",t.cls("map-hover"));N(O.node(),t.dark?nt.darkPrimary:mt.earth,1.5),O.style("display","none");let Y=null;(h?!0:t.tooltip.bind(y,d=>{let T=d.target.__data__;if((!T?!0:!d.target.classList.contains(t.cls("place"))))return;let[v,L]=r.pointer(d,t.chartEl);Y=T,O.attr("d",l.d(T)).style("display",null),t.tooltip.show(S(x.get(T.id),T.name),v,L)},()=>{Y=null,O.style("display","none")}));let K=()=>{};if(h){let d=s.domain?Math.max(Math.abs(s.domain[0]),Math.abs(s.domain[1])):0,T=s.symbolMax*Math.min(1,t.width/600)*(t.mobile?.8:1),v=D=>(D===null?!0:!d)?3.5:Math.max(1.5,T*Math.sqrt(Math.abs(D)/d)),L=new Map(n.features.map(D=>[D.id,D])),Z=o.data.x.map((D,w)=>({i:w,r:v(b[w])})).sort((D,w)=>w.r-D.r),Q=D=>a.categories?f(D):mt.turquoise,q=n.sphere?1:t.width/n.w,et=D=>{var ut;let w=(ut=a.xy)==null?void 0:ut[D];if(w)return[w[0]*q,w[1]*q];let U=a.ids[D]?L.get(a.ids[D]):void 0;return U?l.anchor(U):null},A=e.append("g").selectAll("circle").data(Z).join("circle").attr("class",t.cls("symbol")).attr("r",D=>D.r).each(function(D){Ct(this,{fill:Q(D.i),"fill-opacity":d?"0.78":"0.9",stroke:P,"stroke-width":"0.75px"})});K=()=>A.each(function(D){var U,ut;let w=et(D.i);this.setAttribute("cx",String((U=w==null?void 0:w[0])!=null?U:0)),this.setAttribute("cy",String((ut=w==null?void 0:w[1])!=null?ut:0)),this.style.setProperty("display",w?"":"none")}),t.tooltip.bind(A,(D,w)=>{let[U,ut]=r.pointer(D,t.chartEl);t.tooltip.show(S(w.i,o.data.x[w.i]),U,ut)})}let tt=()=>{R.attr("d",c?l.sphere():l.land()),_.attr("d",l.sphere()),V.attr("d",l.graticule()),M.attr("d",d=>l.d(d)),I.attr("d",l.inner()),B.attr("d",l.group()),(Y?O.attr("d",l.d(Y)):!1),K()};if(tt(),c){let d=Math.min(t.width,l.height)/2,T=r.drag().on("drag",v=>{let L=75/d;p.rotate=[p.rotate[0]+v.dx*L,Math.max(-85,Math.min(85,p.rotate[1]-v.dy*L))],l=Ne(t,n,p.rotate),tt()});e.call(T).style("touch-action","none").style("cursor","grab")}if((o.type==="map-states"?s.labels:!1)){let d=e.append("g").attr("class",t.cls("map-labels")).style("pointer-events","none"),T=n.features.map(q=>({f:q,a:l.anchor(q)})).filter(q=>!!q.a),v=T.filter(q=>Ve.includes(q.f.code)).sort((q,et)=>q.a[1]-et.a[1]),L=(520)>(t.width),Z=(q,et,A,D,w)=>d.append("text").attr("class",t.cls("map-label")).attr("x",q).attr("y",et).attr("dy","0.35em").attr("text-anchor",A).style("fill",D).style("fill-opacity","0.8").text(w),Q=t.width/n.w;for(let{f:q,a:et}of T){if((!q.code?!0:Ve.includes(q.code)))continue;let A=x.get(q.id),D=Pn[q.code],[w,U]=D?[D[0]*Q,D[1]*Q]:et;Z(w,U,"middle",A===void 0?t.dark?nt.darkPrimary:nt.primary:Ot(f(A)),q.code)}if(!L){let q=t.width-16*Q,et=-1/0;for(let{f:A,a:D}of v){et=Math.max(D[1],et+14);let w=d.append("line").attr("x1",D[0]).attr("y1",D[1]).attr("x2",q-14).attr("y2",et);Ct(w.node(),{stroke:t.dark?nt.darkMuted:nt.secondary,"stroke-width":"0.75px"}),Z(q,et,"end",t.dark?nt.darkPrimary:nt.primary,A.code)}}}return l.height}var kt=8,Vt=2,oe=Vt+kt+13,ze=oe+5;function He(t,n,r,o){var b,x,g,k,P,N,F,G;if(!n)return;let e=r.style.map,a=r.data.map,s=t.dark?nt.darkSecondary:nt.secondary,c=t.dark?Pt:Dt,i=new Set(a.ids.filter(y=>y!==null)),m=(r.type!=="map-dots"?o.features.some(y=>!i.has(y.id)):!1),p=(y,R)=>`\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="${y}"/>\x3c/svg>${ct(R)}\x3c/span>`,l=m?p(c,__gvOr(e.noDataLabel,()=>("No data"))):"",h=y=>{if(!m)return{svg:"",width:0};let R=__gvOr(e.noDataLabel,()=>("No data")),_=Vt+kt/2;return{svg:`\x3crect class="${t.cls("legend-nodata")}" x="${y}" y="${_-5}" width="10" height="10" rx="2" fill="${c}"/>\x3ctext x="${y+16}" y="${_}" dy="0.35em" class="${t.cls("legend-key")}">${ct(R)}\x3c/text>`,width:40+R.length*7.5}},f="";if(e.categories.length)f=e.categories.map(y=>p(y.color,y.name)).join("")+l;else if(r.type==="map-dots"){let y=e.domain?Math.max(Math.abs(e.domain[0]),Math.abs(e.domain[1])):0,R=e.symbolMax*Math.min(1,t.width/600)*(t.mobile?.8:1),_=V=>R*Math.sqrt(V/y);if((y?e.sizeTicks.length:!1)){let V=_(e.sizeTicks[e.sizeTicks.length-1]),S=V*2+7,M=[];[...e.sizeTicks].reverse().forEach((K,tt)=>M.push(Math.max(S-2*_(K),tt?M[tt-1]+12:7)));let I=V*2+70,B=Math.max(S+3,M[M.length-1]+8),O=`stroke:${s} !important;fill:none !important`,Y=[...e.sizeTicks].reverse().map((K,tt)=>{let H=S-2*_(K);return`\x3ccircle cx="${V+1}" cy="${S-_(K)}" r="${_(K)}" style="${O};stroke-width:1px"/>\x3cpolyline points="${V+1},${H} ${V*2+4},${H} ${V*2+8},${M[tt]}" style="${O};stroke-width:0.5px"/>\x3ctext x="${V*2+11}" y="${M[tt]}" dy="0.35em" class="${t.cls("legend-label")}">${ct(t.fmtValue(K))}\x3c/text>`}).join("");f=`\x3csvg width="${I}" height="${B}" aria-hidden="true">${Y}\x3c/svg>`}}else if(((e.continuous?e.stops.length>=2:!1)?e.stops[0]!==e.stops[e.stops.length-1]:!1)){let y=Math.min(260,t.width-20),R=t.id("legend-grad"),_=e.colors.map((M,I)=>`\x3cstop offset="${I/(e.colors.length-1)*100}%" stop-color="${M}"/>`).join(""),V=[e.stops[0],e.stops.length===3?e.stops[1]:null,e.stops[e.stops.length-1]].map((M,I)=>M===null?"":`\x3ctext x="${I/2*y}" y="${oe}" text-anchor="${["start","middle","end"][I]}" class="${t.cls("legend-label")}">${ct(t.fmtValue(M))}\x3c/text>`).join(""),S=h(y+24);f=`\x3csvg width="${y+S.width+4}" height="${ze}" aria-hidden="true">\x3cdefs>\x3clinearGradient id="${R}">${_}\x3c/linearGradient>\x3c/defs>\x3crect class="${t.cls("legend-step")}" y="${Vt}" width="${y}" height="${kt}" rx="${kt/2}" fill="url(#${R})"/>${V}${S.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 y=(x=(b=e.domain)==null?void 0:b[0])!=null?x:e.stops[0];f=(y===void 0?"":p(e.colors[0],t.fmtValue(y)))+l}else if(e.colors.length){let y=e.colors.length,R=(P=(k=(g=e.domain)==null?void 0:g[0])!=null?k:e.thresholds[0])!=null?P:0,_=(G=(F=(N=e.domain)==null?void 0:N[1])!=null?F:e.thresholds[e.thresholds.length-1])!=null?G:0,V=$t(t.d3,r.style.yFormat,[R,_],Math.max(1,e.thresholds.length)),S=e.thresholds.map(H=>V(H)),M=Math.max(0,...S.map(H=>H.length))*7+6,I=Math.max(M,Math.min(44,Math.floor((Math.min(320,t.width)-20)/y))),B=I*y,O=t.id("legend-clip"),Y=e.colors.map((H,X)=>`\x3crect class="${t.cls("legend-step")}" x="${X*I}" y="${Vt}" width="${I}" height="${kt}" fill="${H}"/>`).join(""),K=S.map((H,X)=>`\x3ctext x="${(X+1)*I}" y="${oe}" text-anchor="middle" class="${t.cls("legend-label")}">${ct(H)}\x3c/text>`).join(""),tt=h(B+24);f=`\x3csvg width="${B+tt.width+4}" height="${ze}" aria-hidden="true">\x3cdefs>\x3cclipPath id="${O}">\x3crect y="${Vt}" width="${B}" height="${kt}" rx="${kt/2}"/>\x3c/clipPath>\x3c/defs>\x3cg clip-path="url(#${O})">${Y}\x3c/g>${K}${tt.svg}\x3c/svg>`}n.innerHTML=f,n.style.display=f?"":"none",n.removeAttribute("role"),n.removeAttribute("aria-label")}function se(t){return t.replace(/[\x26\x3c>"]/g,n=>({"\x26":"\x26amp;","\x3c":"\x26lt;",">":"\x26gt;",'"':"\x26quot;"})[n])}var zn=["line","area","column","bar","stacked","combo","dot","scatter"];function ie(t){return (t.style.legend==="direct"?be.includes(t.type):!1)}function Oe(t,n,r,o){var g,k,P,N;if(!n)return;let e=r,a=e.data.series,s=(g=e.style.legend)!=null?g:"top",c=()=>{n.innerHTML="",n.style.display="none",n.removeAttribute("role"),n.removeAttribute("aria-label")};if(((s==="none"?!0:s==="subtitle")?!0:ie(e)))return c();let i=(F,G,y)=>F==="line"?`\x3csvg class="${t.cls("swatch")}" width="24" height="10" aria-hidden="true">\x3cline x1="1" x2="23" y1="5" y2="5" stroke="${G}" stroke-width="3.5" stroke-linecap="round"${y?' stroke-dasharray="6 4"':""}/>\x3c/svg>`:F==="dot"?`\x3csvg class="${t.cls("swatch")}" width="12" height="12" aria-hidden="true">\x3ccircle cx="6" cy="6" r="5" fill="${G}"/>\x3c/svg>`:`\x3csvg class="${t.cls("swatch")}" width="12" height="12" aria-hidden="true">\x3crect width="12" height="12" rx="2" fill="${G}"/>\x3c/svg>`,m=F=>e.type==="line"?"line":e.type==="combo"?F===0?"box":"line":(e.type==="scatter"?!0:e.type==="dot")?"dot":"box",p=(F,G,y,R=!1)=>{let _=(y!==void 0?l:!1)?"button":"span",V=_==="button"?` type="button" data-key="${se(y)}" aria-pressed="${!o.has(y)}" title="Show or hide ${se(F)}"`:"",S=`${t.cls("legend-item")}${(y!==void 0?o.has(y):!1)?` ${t.cls("legend-item--off")}`:""}`;return`\x3c${_} class="${S}"${V}>${G}${se(F)}${R?`\x3cspan class="${t.cls("legend-axis")}">right axis\x3c/span>`:""}\x3c/${_}>`},l=__gvAnd(__gvAnd(zn.includes(e.type),()=>(a.length>1)),()=>(!e.style.paletteId.startsWith("highlight"))),h=[];if(e.type==="donut"){let F=(k=e.data.categoryColors)!=null?k:[];h=e.data.x.map((G,y)=>p(String(G),i("box",qt(e,F[y],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 G=(P=e.data.categoryColors)!=null?P:[],[y,R]=e.data.series,_=I=>G.find((B,O)=>__gvAnd(((y==null?void 0:y.values[O])!=null?(R==null?void 0:R.values[O])!=null:!1),()=>(I(y.values[O],R.values[O])))),V=_((I,B)=>B>I),S=_((I,B)=>(I)>(B)),M=_((I,B)=>B===I);h=[V?p("Rose",i("line",qt(e,V,t.dark))):"",S?p("Fell",i("line",qt(e,S,t.dark))):"",M?p("No change",i("line",qt(e,M,t.dark))):""].filter(Boolean)}}else if((e.style.paletteId.startsWith("highlight")?a.length>1:!1)){let F=Math.max(0,a.findIndex(G=>G.key===e.style.highlight));h=[p(a[F].label,i(m(F),at(e,F,t.dark))),p("All others",i(m(F),at(e,F===0?1:0,t.dark)))]}else if(a.length>1){let F=__gvAnd(a.some(G=>G.axis==="right"),()=>(a.some(G=>G.axis!=="right")));h=a.map((G,y)=>p(G.label,i(m(y),at(e,y,t.dark),G.dashed),G.key,(F?G.axis==="right":F)))}let f=h.join(""),b=n.ownerDocument.activeElement,x=(b?n.contains(b):!1)?(N=b.dataset)==null?void 0:N.key:void 0;if(n.innerHTML=f,n.style.display=h.length?"":"none",(l?h.length:!1)?(n.setAttribute("role","group"),n.setAttribute("aria-label","Series. Select to show or hide.")):(n.removeAttribute("role"),n.removeAttribute("aria-label")),x!==void 0){let F=[...n.querySelectorAll("[data-key]")].find(G=>G.dataset.key===x);((F?n.ownerDocument.activeElement!==F:!1)?F.focus():!1)}}function qt(t,n,r){return yt(t,n!=null?n:nt.muted,r)}function qe(t,n,r,o={}){let e=t.svg.append("g").attr("class",t.cls("tick-probe")).attr("opacity",0),a=n.map(s=>{var i;let c=e.append("text").attr("class",(i=o.cls)!=null?i:null).style("font-size",`${r}px`).text(s);return (o.weight?c.style("font-weight",String(o.weight)):!1),Math.ceil(c.node().getComputedTextLength())});return e.remove(),a}function lt(t,n,r,o={}){return Math.max(0,...qe(t,n,r,o))}function wt(t,n){return n.ticks(t.mobile?4:5)}function Tt(t,n,r,o){let e=wt(t,r),a=t.fmtAxis;n.append("g").attr("class",t.cls("grid")).selectAll("line").data(e).join("line").attr("x1",-t.margin.left).attr("x2",o).attr("y1",i=>Math.round(r(i))+.5).attr("y2",i=>Math.round(r(i))+.5),n.append("g").attr("class",t.cls("ticks")).selectAll("text").data(e).join("text").attr("x",-t.margin.left).attr("y",i=>r(i)).attr("dy","-0.45em").attr("text-anchor","start").text(i=>a(i))}function St(t,n,r,o){let[e,a]=r.domain();if((e>0?!0:(0)>(a)))return;let s=((0)>(e)?a>0:!1);n.append("line").attr("class",t.cls(s?"zero":"baseline")).attr("x1",0).attr("x2",o).attr("y1",Math.round(r(0))+.5).attr("y2",Math.round(r(0))+.5)}function Xt(t,n,r,o){n.append("line").attr("class",t.cls("baseline")).attr("x1",0).attr("x2",r).attr("y1",o+.5).attr("y2",o+.5)}function Wt(t,n){return Math.max(2,Math.floor(t/(n?70:90)))}var Hn=10;function On(t){return t.mobile?12:14}function Bn(t,n,r,o){return (r)>(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 Yt(t,n,r,o){let e=-t.margin.left,a=t.width-t.margin.left,s=new Map,c=p=>{let l=[...new Set(p.filter(h=>!s.has(h)))];return qe(t,l,On(t)).forEach((h,f)=>s.set(l[f],h)),p.map(h=>s.get(h))},i=null,m=-1;for(let p=Math.max(1,Math.floor(o));p>=1;p--){let l=r(p);if(l.ticks.length===m)continue;m=l.ticks.length;let h=l.ticks.map(l.label),f=c(h),b=l.ticks.map((k,P)=>Bn(n(k),f[P],e,a));i={...l,anchor:k=>b[k].anchor};let x=b.every(k=>(k.start>=e-.5?(a+.5)>=(k.end):!1)),g=b.every((k,P)=>(P===0?!0:(k.start)>=(b[P-1].end+Hn)));if((x?g:!1))return i}return i!=null?i:{...r(1),anchor:()=>"middle"}}function Zt(t,n){let r=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(r,o);return{ticks:n.ticks(o),label:a=>e(a)}}}function Ut(t,n,r,o,e){n.append("g").attr("class",t.cls("ticks")).attr("transform",`translate(0,${r})`).selectAll("text").data(o.ticks).join("text").attr("x",a=>e(a)).attr("y",22).attr("text-anchor",(a,s)=>o.anchor(s)).text((a,s)=>o.label(a,s))}function jt(t,n,r,o){let e=[...t].sort((m,p)=>m.y-p.y),a=e.length;if(!a)return;let s=a>1?Math.min(n,Math.max(0,o-r)/(a-1)):n,c=m=>{m.top=Math.max(r,Math.min(o-(m.size-1)*s,m.sum/m.size))},i=[];e.forEach((m,p)=>{let l={start:p,size:1,sum:m.y,top:m.y};for(c(l),i.push(l);i.length>1;){let h=i[i.length-1],f=i[i.length-2];if((h.top+1e-9)>=(f.top+f.size*s))break;f.sum+=h.sum-h.size*f.size*s,f.size+=h.size,i.pop(),c(f)}});for(let m of i)for(let p=0;(m.size)>(p);p++)e[m.start+p].y=m.top+p*s}function je(t,n,r,o,e){let a=[],s=[];for(let i of t){let m=[...a,{item:i,y:i.y}].map(l=>({own:l.y,y:l.y})),p=(o-r)>=((m.length-1)*n);(p?jt(m,n,r,o):!1),(p?m.every(l=>__gvLe(Math.abs(l.y-l.own),e)):!1)?a.push({item:i,y:i.y}):s.push(i)}let c=a.map(i=>({y:i.y}));return jt(c,n,r,o),a.forEach((i,m)=>i.item.y=c[m].y),{kept:a.map(i=>i.item),dropped:s}}function Xe(t,n,r,o){let e=[...new Set(r.map(g=>g.getTime()))].sort((g,k)=>g-k),a=qn(r,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"])],c=s.slice(s.findIndex(([,g])=>g===a)),[i,m]=n.domain(),[p,l]=c[c.length-1],h=[];for(let[g,k]of c){let P=Be(g,e,i,m);if((o)>=(P.length)){[p,l,h]=[g,k,P];break}}(h.length?!0:(h=Be(p,e,i,m))),((!h.length?e.length:!1)?(h=e.length===1?[new Date(e[0])]:[new Date(e[0]),new Date(e[e.length-1])]):!1);let f=(g,k)=>(k===0?!0:h[k-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:h,label:(g,k)=>l==="year"?b.year(g):l==="month"?f(g,k)?b.monthYear(g):b.month(g):f(g,k)?b.dayYear(g):b.day(g)}}function qn(t,n){if(t.every(a=>(a.getUTCMonth()===0?a.getUTCDate()===1:!1)))return"year";if((2)>(n.length))return t.every(a=>a.getUTCDate()===1)?"month":"day";let o=1/0;for(let a=1;(n.length)>(a);a++)o=Math.min(o,n[a]-n[a-1]);let e=o/864e5;return e>=360?"year":e>=28?"month":"day"}function Be(t,n,r,o){let e=t.range(t.floor(r),new Date(o.getTime()+1)),a=[];return e.forEach((s,c)=>{var p;let i=((p=e[c+1])!=null?p:t.offset(s,1)).getTime(),m=jn(n,s.getTime());((n.length)>(m)?(i)>(n[m]):!1)?a.push(new Date(n[m])):((s>=r?(o)>=(s):!1)?a.push(s):!1)}),a}function jn(t,n){let r=0,o=t.length;for(;(o)>(r);){let e=r+o>>1;(n)>(t[e])?r=e+1:o=e}return r}function dt(t,n){var o,e,a;let r=(o=t.spec.style.imageFill)==null?void 0:o.photos;if(!r)return null;for(let s of n)if((s!==void 0?(((e=r[s])!=null?e.url:!1)):!1))return r[s].url;return __gvOr(((a=r["*"])==null?void 0:a.url),()=>(null))}function Et(t){var r;let n=(r=t.spec.style.imageFill)==null?void 0:r.photos;return(!!n?Object.values(n).some(o=>!!((o!=null?o.url:!1))):!1)}function ft(t,n,r,o){let e=t.svg.select("defs").empty()?t.svg.append("defs"):t.svg.select("defs"),a=t.id("grey");(e.select(`#${a}`).empty()?e.append("filter").attr("id",a).append("feColorMatrix").attr("type","saturate").attr("values","0"):!1);let s=new Map;return{clip:(m,p)=>{let l=p?`${m}|${p.x},${p.y},${p.w},${p.h}`:m,h=s.get(l);if(!h){let f=t.id(`clip-${e.selectAll("clipPath").size()}`);h={id:f,url:m,box:p!=null?p:{x:0,y:0,w:r,h:o},sel:e.append("clipPath").attr("id",f)},s.set(l,h)}return h.sel},paint:()=>{for(let m of s.values())n.insert("image",":first-child").attr("class",t.cls("photo")).attr("href",m.url).attr("x",m.box.x).attr("y",m.box.y).attr("width",Math.max(1,m.box.w)).attr("height",Math.max(1,m.box.h)).attr("preserveAspectRatio","xMidYMid slice").attr("clip-path",`url(#${m.id})`).attr("filter",`url(#${a})`)}}}function Kt(t,n){var o;let r=t.spec.style.imageFill;return __gvAnd((!!r?r.mode==="category":!1),()=>(!!(((o=r.photos[n])!=null?o.url:!1))))}function ht(t,n){var r,o;return n?(o=(r=t.spec.style.imageFill)==null?void 0:r.opacity)!=null?o:.65:1}function Qt(t,n,r,o,e,a){if(((0)>=(r)?!0:(0)>=(o)))return"";let s=Math.min(e,(a==="up"?!0:a==="down")?r/2:o/2,(a==="up"?!0:a==="down")?o:r),c=t+r,i=n+o;switch(a){case"up":return`M${t},${i}V${n+s}Q${t},${n} ${t+s},${n}H${c-s}Q${c},${n} ${c},${n+s}V${i}Z`;case"down":return`M${t},${n}V${i-s}Q${t},${i} ${t+s},${i}H${c-s}Q${c},${i} ${c},${i-s}V${n}Z`;case"right":return`M${t},${n}H${c-s}Q${c},${n} ${c},${n+s}V${i-s}Q${c},${i} ${c-s},${i}H${t}Z`;case"left":return`M${c},${n}H${t+s}Q${t},${n} ${t},${n+s}V${i-s}Q${t},${i} ${t+s},${i}H${c}Z`}}function Mt(t,n,r,o){let e=t.length?t[0]:0,a=e;for(let s of t)((e)>(s)?(e=s):!1),(s>a?(a=s):!1);return (t.length?!0:([e,a]=[0,1])),(n?(e=Math.min(0,e),a=Math.max(0,a)):!1),(r!==null?(e=r):!1),(o!==null?(a=o):!1),(e===a?(a=e+1):!1),(e>a?([e,a]=[a,e]):!1),[e,a]}function Ye(t){var q,et;let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=r.type==="area",c=(s?e.series.length>1:s),i=e.xKind==="category",m=e.x.map((A,D)=>e.xKind==="date"?Le(A):i?D:Number(A)),p=m.length;if(p===0)return;let l=__gvAnd((!s?e.series.some(A=>A.axis==="right"):!1),()=>(e.series.some(A=>A.axis!=="right"))),h=A=>(l?e.series[A].axis==="right":l),f=A=>e.series.filter((D,w)=>h(w)===A).flatMap(D=>D.values).filter(D=>D!==null),b=[],x,g;if(c){let A=m.map((D,w)=>e.series.map(U=>{var ut;return(ut=U.values[w])!=null?ut:0}));b=n.stack().keys(e.series.map((D,w)=>w)).value((D,w)=>D[w]).offset(n.stackOffsetDiverging)(A),[x,g]=Mt(b.flatMap(D=>D.flatMap(w=>[w[0],w[1]])),!0,a.yMin,a.yMax)}else[x,g]=Mt(f(!1),__gvOr(__gvOr(a.yFromZero,()=>(s)),()=>(We(t))),a.yMin,a.yMax);let k=t.margin,P=t.height-k.top-k.bottom,N=t.mobile?4:5,F=n.scaleLinear().domain([x,g]).nice(N).range([P,0]);t.setAxis(F.domain(),N),k.left=lt(t,wt(t,F).filter(function(v,i,a){return Math.abs(v)!==Math.max(Math.abs(a[0]),Math.abs(a[a.length-1]))}).map(t.fmtAxis),t.mobile?12:14)+10;let G=l?n.scaleLinear().domain(Mt(f(!0),a.rightFromZero,null,null)).nice(N).range([P,0]):F,y=l?t.rightAxis(G.domain(),N):t.fmtAxis,R=l?G.ticks(N):[],_=l?lt(t,R.map(y),t.mobile?12:14)+10:0,V=A=>h(A)?G:F,S=A=>t.fmtFor(e.series[A]),M=e.series.map(A=>{for(let D=A.values.length-1;D>=0;D--)if(A.values[D]!==null)return D;return-1}),I=__gvAnd(ie(r),()=>(!c)),B=__gvAnd((__gvOr(a.valueLabels,()=>(I))),()=>(!c)),O=A=>{if((0)>(M[A]))return["",""];let D=S(A)(e.series[A].values[M[A]]);return I?[e.series[A].label,a.valueLabels?D:""]:["",D]},Y=A=>O(A).filter(Boolean).join(" "),K=_?_+6:9,tt=I?{cls:t.cls("direct-label"),size:13,weight:700}:{cls:t.cls("value-label"),size:12,weight:500};if(B){let A=lt(t,e.series.map((D,w)=>Y(w)),tt.size,tt);k.right=Math.max(k.right,Math.min(A,t.width/3)+K+6)}else l?k.right=Math.max(k.right,_+4):(a.endDots?(k.right=Math.max(k.right,10)):!1);let H=Math.max(40,t.width-k.left-k.right),X=e.xKind==="date"?n.scaleUtc().domain(n.extent(m)).range([0,H]):n.scaleLinear().domain(n.extent(m)).range([0,H]),E=o.append("g").attr("transform",`translate(${k.left},${k.top})`);if(Tt(t,E,F,H),Xt(t,E,H,P),St(t,E,F,H),l){let A=xt(r,at(r,e.series.findIndex(D=>D.axis==="right"),t.dark),t.dark);E.append("g").attr("class",t.cls("ticks")).selectAll("text").data(R).join("text").attr("x",H+8).attr("y",D=>G(D)).attr("dy","0.32em").style("fill",A).text(D=>y(D)),(a.rightLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",t.width).attr("y",t.rightTitleY).attr("text-anchor","end").style("fill",A).text(a.rightLabel):!1)}let u=A=>X(A);Ut(t,E,P,Yt(t,u,Xn(t,X,m),i?p:Wt(H,t.mobile)),u);let d=A=>X(m[A]),T=t.id("plot");o.append("defs").append("clipPath").attr("id",T).append("rect").attr("x",-8).attr("y",-8).attr("width",H+16).attr("height",P+16);let v=E.append("g").attr("clip-path",(a.yMin!==null?!0:a.yMax!==null)?`url(#${T})`:null),L=E.append("g");if(s){let A=Et(t)?ft(t,v,H,P):null;(c?b:[e.series[0].values.map(w=>[0,w!=null?w:0])]).forEach((w,U)=>{var $;let j=($=n.area().x((z,W)=>d(W)).y0(z=>F(z[0])).y1(z=>F(z[1]))(w))!=null?$:"",C=A?dt(t,[e.series[U].key]):null;((A?C:!1)?A.clip(C).append("path").attr("d",j):!1),v.append("path").attr("class",t.cls("area")).attr("d",j).attr("fill",at(r,U,t.dark)).attr("fill-opacity",ht(t,C)),((p===1?e.series[U].values[0]!==null:!1)?v.append("circle").attr("cx",d(0)).attr("cy",F(w[0][1])).attr("r",3.5).attr("fill",at(r,U,t.dark)):!1)}),(A==null?!0:A.paint())}if(!s){let[A,D]=F.domain(),w=((We(t)?(0)>=(A):!1)?D>=0:!1)?dt(t,[e.series[0].key]):null,U=w?ft(t,v,H,P):null;if((U?w:!1)){let $=(q=n.area().defined(z=>z!==null).x((z,W)=>d(W)).y0(F(0)).y1(z=>F(z))(e.series[0].values))!=null?q:"";U.clip(w).append("path").attr("d",$),v.append("path").attr("d",$).attr("fill",at(r,0,t.dark)).attr("fill-opacity",ht(t,w)),U.paint()}let ut=C=>n.line().defined($=>$!==null).x(($,z)=>d(z)).y($=>V(C)($)),j=e.series.map((C,$)=>$).sort((C,$)=>Number(Ft(r,C))-Number(Ft(r,$))).reverse();for(let C of j){let $=e.series[C],z=(et=ut(C)($.values))!=null?et:"";((e.series.length>1?!Ft(r,C):!1)?v.append("path").attr("class",t.cls("line-halo")).attr("d",z):!1),v.append("path").attr("class",t.cls("line")).attr("d",z).attr("stroke",at(r,C,t.dark)).attr("stroke-width",Ft(r,C)?2:t.mobile?3:3.5).attr("stroke-dasharray",$.dashed?"6 4":null),$.values.forEach((W,st)=>{(((W===null?!0:$.values[st-1]!=null)?!0:$.values[st+1]!=null)?!0:v.append("circle").attr("cx",d(st)).attr("cy",V(C)(W)).attr("r",3.5).attr("fill",at(r,C,t.dark)))})}if((a.endDots?e.series.forEach((C,$)=>{if(((0)>(M[$])?!0:Ft(r,$)))return;let z=d(M[$]),W=V($)(e.series[$].values[M[$]]);v.append("circle").attr("class",`${t.cls("dot")} ${t.cls("dot--pulse")}`).attr("cx",z).attr("cy",W).attr("r",5).attr("fill",at(r,$,t.dark))}):!1),B){let C=e.series.map((z,W)=>({i:W,y:M[W]>=0?V(W)(z.values[M[W]]):NaN,x:M[W]>=0?d(M[W]):0})).filter(z=>(!Number.isNaN(z.y)?((!Ft(r,z.i)?!0:I)):!1));jt(C,15,6,P);let $=t.width/3;for(let z of C){let W=e.series[z.i].values[M[z.i]],[st,rt]=V(z.i).domain(),J=W>rt?-1:(st)>(W)?1:0,ot=(l?H:z.x)+K,pt=xt(r,at(r,z.i,t.dark),t.dark);(J?L.append("path").attr("class",t.cls("off-scale")).attr("d",`M${ot+4},${z.y+J*5}l-4,${-J*8}h8z`).attr("fill",pt).append("title").text((0)>(J)?"Above the axis range":"Below the axis range"):!1);let Lt=L.append("text").attr("class",t.cls(I?"direct-label":"value-label")).attr("x",ot+(J?12:0)).attr("y",z.y).attr("dy","0.32em").style("fill",pt).text(Y(z.i)),_t=Lt.node(),[At,he]=O(z.i),Nt=(At?At:he),dn=fe=>At?[`${fe.trimEnd()}\u2026`,he].filter(Boolean).join(" "):`${fe.trimEnd()}\u2026`;for(;(_t.getComputedTextLength()>$?Nt.length>4:!1);)Nt=Nt.slice(0,-2),Lt.text(dn(Nt))}}}let Z=E.append("g").attr("class",t.cls("hover")).style("display","none");Z.append("line").attr("class",t.cls("rule")).attr("y1",0).attr("y2",P);let Q=E.append("rect").attr("class",t.cls("overlay")).attr("width",H).attr("height",P);t.tooltip.bind(Q,A=>{var st;let[D]=n.pointer(A),w=X.invert(D),U=Math.max(0,Math.min(p-1,n.bisectCenter(m,w))),ut=d(U);Z.style("display",null).select("line").attr("x1",ut).attr("x2",ut);let j=e.series.map((rt,J)=>({si:J,v:rt.values[U]})).filter(rt=>rt.v!==null).sort((rt,J)=>J.v-rt.v),C=j.slice(0,8),$=C.map(rt=>it(t.cls("tip-row"),at(r,rt.si,t.dark),e.series[rt.si].label,S(rt.si)(rt.v))).join(""),z=j.length>C.length?`\x3cdiv class="${t.cls("tip-more")}">+${j.length-C.length} more\x3c/div>`:"",W=C.length?c?F((st=n.max(b,rt=>rt[U][1]))!=null?st:0):V(C[0].si)(C[0].v):P/2;t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct(i?String(e.x[U]):t.fmtX((e.xKind==="date",m[U])))}\x3c/div>${$}${z}`,ut+k.left,W+k.top)},()=>Z.style("display","none"))}function We(t){let{spec:n}=t;return __gvAnd((n.type==="line"?n.data.series.length===1:!1),()=>(!!dt(t,[n.data.series[0].key])))}function Ft(t,n){var r;return __gvAnd(t.style.paletteId.startsWith("highlight"),()=>(t.data.series[n].key!==((r=t.style.highlight)!=null?r:t.data.series[0].key)))}function Xn(t,n,r){let{d3:o,spec:e}=t,a=e.data;if(a.xKind==="date")return s=>{let c=Xe(o,n,r,s);return{ticks:c.ticks,label:(i,m)=>c.label(i,m)}};if(a.xKind==="category"){let s=a.x.map(String),c=s.length;return i=>({ticks:o.range(0,c,Math.max(1,Math.ceil(c/i))),label:m=>s[m]})}return Zt(t,n)}var Jt="http://www.w3.org/2000/svg",Ze=/[\p{Script=Latin}\p{Script=Greek}\p{Script=Cyrillic}]/u,Ue=/[_\-/.]/;function Wn(t,n,r){let o=[],e=Array.from(t);for(;(e.length>1?r(e.join(""))>n:!1);){let a=i=>{let m=e.slice(0,i).join("");return (Ze.test(e[i-1])?Ze.test(e[i]):!1)?`${m}-`:m},s=1;for(;((e.length-1)>(s)?__gvLe(r(a(s+1)),n):!1);)s++;let c=s;for(;(c>Math.ceil(s/2)?!Ue.test(e[c-1]):!1);)c--;(Ue.test(e[c-1])?(s=c):!1),o.push(a(s)),e=e.slice(s)}return{lines:o,rest:e.join("")}}function Ke(t,n,r,o){let e=[],a="";for(let s of t.split(/\s+/).filter(Boolean)){let c=a?`${a} ${s}`:s;if(__gvLe(o(c),n)){a=c;continue}(a?e.push(a):!1);let i=Wn(s,n,o);if(e.push(...i.lines),a=i.rest,e.length>r)break}if((a?e.push(a):!1),e.length>r){let s=Array.from(e[r-1].replace(/-$/,""));for(;(s.length>1?o(`${s.join("").trimEnd()}\u2026`)>n:!1);)s=s.slice(0,-1);e.length=r,e[r-1]=`${s.join("").trimEnd()}\u2026`}return e}function Qe(t){t.textContent="";let n=t.ownerDocument.createElementNS(Jt,"tspan");return t.appendChild(n),r=>(n.textContent=r,n.getComputedTextLength())}function Je(t,n,r){var a;let o=t.getAttribute("x"),e=t.ownerDocument;if(t.textContent="",(1)>=(n.length)){t.textContent=(a=n[0])!=null?a:"";return}n.forEach((s,c)=>{let i=e.createElementNS(Jt,"tspan");(o!==null?i.setAttribute("x",o):!1),(c?i.setAttribute("dy",`${r}em`):!1),i.textContent=s,t.appendChild(i)})}function ce(t,n,r,o,e){let a=Ke(n,r,o,Qe(t));Je(t,a,e);let s=__gvAnd((a.length>0?a[a.length-1].endsWith("\u2026"):!1),()=>(!n.endsWith("\u2026")));return{lines:Math.max(1,a.length),cut:s}}function Yn(t,n,r,o,e){let a=/\s/.test(t),s=f=>a?f.split(/\s+/).filter(Boolean):Array.from(f),c=f=>f.join(a?" ":""),i=s(t),m=n.filter(f=>f!==t).map(s),p=(f,b)=>(f.length>=b?c(f.slice(-b))===c(i.slice(-b)):!1),l=1;for(;((i.length)>(l)?m.some(f=>p(f,l)):!1);)l++;let h=c(i.slice(-l));for(let f=i.length-l-1;f>=0;f--){let b=c(i.slice(0,f)),x=a?`${b?`${b} `:""}\u2026 ${h}`:`${b}\u2026${h}`,g=Ke(x,r,1/0,e);if((o)>=(g.length))return g}return null}function tn(t,n){var a;let r=t.ownerDocument,o=r.createElementNS(Jt,"g"),e=r.createElementNS(Jt,"title");e.textContent=n,((a=t.parentNode)==null?!0:a.insertBefore(o,t)),o.appendChild(e),o.appendChild(t)}function le(t){var n;return __gvOr(Array.from(t.querySelectorAll("tspan")).map(r=>{var o;return(o=r.textContent)!=null?o:""}).join(" "),()=>(((n=t.textContent)!=null?n:"").trim()))}function ue(t,n,r,o=1.15){var s;let e=((s=t.textContent)!=null?s:"").trim(),a=ce(t,e,n,r,o);return (a.cut?tn(t,e):!1),a.lines}function gt(t,n,r,o=1.15){let e=t.map(s=>{var c;return((c=s.textContent)!=null?c:"").trim()}),a=t.map((s,c)=>s.getComputedTextLength()>n?ce(s,e[c],n,r,o):{lines:1,cut:!1});for(let s of Zn(t,e)){let c=Yn(e[s],e,n,r,Qe(t[s]));c?(Je(t[s],c,o),a[s]={lines:c.length,cut:!0}):a[s]=ce(t[s],e[s],n,r,o)}return a.forEach((s,c)=>__gvAnd(s.cut,()=>(tn(t[c],e[c])))),a.map(s=>s.lines)}function Zn(t,n){let r=new Map;t.forEach((e,a)=>{var s;return r.set(le(e),[...(s=r.get(le(e)))!=null?s:[],a])});let o=[];for(let e of r.values())(new Set(e.map(a=>n[a])).size>1?o.push(...e.filter(a=>n[a]!==le(t[a]))):!1);return o}var en=110,Un=3,Kn=19,Qn=10;function me(t){return t.toUpperCase()===mt.orange?mt.azure:mt.orange}function nn(t){var et,A,D,w,U,ut;let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=r.type==="stacked",c=r.type==="combo",i=j=>(!c?!0:j===0),m=j=>__gvAnd((c?j>0:c),()=>(e.series[j].axis==="right")),p=j=>t.fmtFor(e.series[j]),l=e.x.map(j=>t.fmtX(j)),h=l.length;if(h===0)return;let f=e.series.length,b=0,x=0,g=[];if(s){let j=e.x.map((C,$)=>e.series.map(z=>{var W;return(W=z.values[$])!=null?W:0}));g=n.stack().keys(e.series.map((C,$)=>$)).value((C,$)=>C[$]).offset(n.stackOffsetDiverging)(j),b=Math.min(0,(et=n.min(g,C=>n.min(C,$=>$[0])))!=null?et:0),x=Math.max(0,(A=n.max(g,C=>n.max(C,$=>$[1])))!=null?A:0)}else{let j=e.series.filter((C,$)=>!m($)).flatMap(C=>C.values).filter(C=>C!==null);b=Math.min(0,(D=n.min(j))!=null?D:0),x=Math.max(0,(w=n.max(j))!=null?w:0)}((a.yMax!==null?a.yMax>x:!1)?(x=a.yMax):!1),(b===x?(x=1):!1);let k=e.series.some((j,C)=>m(C)),P=t.mobile?4:5,N=null,F=t.fmtAxis,G=0;if(k){let j=e.series.filter((z,W)=>m(W)).flatMap(z=>z.values).filter(z=>z!==null),C=(U=n.min(j))!=null?U:0,$=(ut=n.max(j))!=null?ut:1;(a.rightFromZero?(C=Math.min(0,C),$=Math.max(0,$)):!1),(C===$?($=C+1):!1),N=n.scaleLinear().domain([C,$]).nice(P),F=t.rightAxis(N.domain(),P),G=lt(t,N.ticks(P).map(F),t.mobile?12:14)+10,t.margin.right=Math.max(t.margin.right,G+4)}let y=t.margin,R=n.scaleLinear().domain([b,x]).nice(t.mobile?4:5).range([t.height-y.top-40,0]);t.setAxis(R.domain(),t.mobile?4:5),y.left=lt(t,wt(t,R).filter(function(v,i,a){return Math.abs(v)!==Math.max(Math.abs(a[0]),Math.abs(a[a.length-1]))}).map(t.fmtAxis),t.mobile?12:14)+10;let _=Math.max(40,t.width-y.left-y.right),V=n.scaleBand().domain(l.map((j,C)=>String(C))).range([0,_]).paddingInner(.25).paddingOuter(.1),S=V.bandwidth(),M=t.mobile?12:13,I=lt(t,l,M),B=e.xKind!=="category",O=1,Y="flat";(I>S+V.step()*.25?(B?O=Math.ceil((I+10)/V.step()):Y=((14)>=(h)?S>36:!1)?"wrap":"rotate"):!1),(Y==="rotate"?(O=Math.max(1,Math.ceil(14/Math.max(1,V.step())))):!1);let K=o.append("g").attr("class",t.cls("ticks")),tt=0,H=[];l.forEach((j,C)=>{var st;if(C%O!==0)return;let $=((st=V(String(C)))!=null?st:0)+S/2,z=K.append("text").style("font-size",`${M}px`).text(j),W=z.node();if(Y==="rotate"){z.attr("text-anchor","end").attr("transform",`translate(${$},12) rotate(-45)`);let rt=Math.min((en-12)/.72,($+y.left-M)/Math.SQRT1_2);(W.getComputedTextLength()>rt?ue(W,rt,1):!1),tt=Math.max(tt,W.getComputedTextLength())}else z.attr("x",$).attr("y",20).attr("text-anchor","middle"),(Y==="wrap"?H.push(W):!1)});let X=Math.max(1,...gt(H,V.step()-4,Un));y.bottom=Y==="rotate"?Math.min(en,tt*.72+12)+8:Y==="wrap"?Math.ceil(20+(X-1)*M*1.15+M*.35+8):30;y.bottom+=a.xLabel?20:0;let E=Math.max(60,t.height-y.top-y.bottom),u=n.scaleLinear().domain([b,x]).nice(P).range([E,0]);((a.valueLabels?(24)>=(h):!1)?tr(u,E,y.top,Jn(t,g)):!1),(N==null?!0:N.range([E,0])),K.attr("transform",`translate(${y.left},${y.top+E})`);(a.xLabel?K.append("text").attr("class",t.cls("axis-title")).attr("x",V.range()[1]/2).attr("y",y.bottom-6).attr("text-anchor","middle").text(a.xLabel):!1);let d=o.append("g").attr("transform",`translate(${y.left},${y.top})`);if(Tt(t,d,u,_),N){let j=xt(r,at(r,e.series.findIndex((C,$)=>m($)),t.dark),t.dark);d.append("g").attr("class",t.cls("ticks")).selectAll("text").data(N.ticks(P)).join("text").attr("x",_+8).attr("y",C=>N(C)).attr("dy","0.32em").style("fill",j).text(C=>F(C)),(a.rightLabel?o.append("text").attr("class",t.cls("axis-title")).attr("x",t.width).attr("y",t.rightTitleY).attr("text-anchor","end").style("fill",j).text(a.rightLabel):!1)}let T=d.append("g"),v=Et(t)?ft(t,T,_,E):null,L=c?1:f,Z=n.scaleBand().domain(n.range(L)).range([0,S]).padding(L>1?.08:0),Q=[];if(s?(g.forEach((j,C)=>{j.forEach(($,z)=>{var pt;let W=u($[0]),st=u($[1]),rt=Math.abs(W-st);if((0)>=(rt))return;let J=(pt=V(String(z)))!=null?pt:0,ot=v?dt(t,[e.series[C].key,String(e.x[z])]):null;((v?ot:!1)?v.clip(ot).append("rect").attr("x",J).attr("y",Math.min(W,st)).attr("width",S).attr("height",rt):!1),T.append("rect").attr("class",t.cls("segment")).attr("x",J).attr("y",Math.min(W,st)).attr("width",S).attr("height",rt).attr("fill",at(r,C,t.dark)).attr("fill-opacity",ht(t,ot))})}),(a.valueLabels?e.x.forEach((j,C)=>{var rt;let $=e.series.map(J=>{var ot;return(ot=J.values[C])!=null?ot:0}),z=$.filter(J=>J>0).reduce((J,ot)=>J+ot,0),W=$.filter(J=>(0)>(J)).reduce((J,ot)=>J+ot,0),st=((rt=V(String(C)))!=null?rt:0)+S/2;(((z>0?!0:W===0))?Q.push({x:st,y:u(z)-6,text:t.fmtValue(z),below:!1}):!1),((0)>(W)?Q.push({x:st,y:u(W)+14,text:t.fmtValue(W),below:!0}):!1)}):!1)):e.series.forEach((j,C)=>{(i(C)?j.values.forEach(($,z)=>{var _t,At;if($===null)return;let W=((_t=V(String(z)))!=null?_t:0)+((At=Z(C))!=null?At:0),st=Z.bandwidth(),rt=u(Math.max(0,$)),J=Math.abs(u($)-u(0)),ot=Qt(W,rt,st,J,4,$>=0?"up":"down"),pt=v?dt(t,[j.key,String(e.x[z])]):null;((v?pt:!1)?v.clip(pt,Kt(t,String(e.x[z]))?{x:W,y:rt,w:st,h:J}:void 0).append("path").attr("d",ot):!1);let Lt=at(r,C,t.dark);T.append("path").attr("class",t.cls("bar")).attr("d",ot).attr("fill",(((0)>($)?L===1:!1)?!c:!1)?me(Lt):Lt).attr("fill-opacity",ht(t,pt)),(a.valueLabels?Q.push({x:W+st/2,y:$>=0?u($)-6:u($)+14,text:p(C)($),below:(0)>($)}):!1)}):!1)}),(v==null?!0:v.paint()),St(t,d,u,_),(c?e.series.forEach((j,C)=>{var rt;if(C===0)return;let $=(m(C)?N:!1)?N:u,z=J=>{var ot;return((ot=V(String(J)))!=null?ot:0)+S/2},W=(rt=n.line().defined(J=>J!==null).x((J,ot)=>z(ot)).y(J=>$(J))(j.values))!=null?rt:"",st=at(r,C,t.dark);T.append("path").attr("class",t.cls("line-halo")).attr("d",W),T.append("path").attr("class",t.cls("line")).attr("d",W).attr("stroke",st).attr("stroke-width",t.mobile?3:3.5).attr("stroke-dasharray",j.dashed?"6 4":null),j.values.forEach((J,ot)=>{(J!==null?T.append("circle").attr("class",t.cls("dot")).attr("cx",z(ot)).attr("cy",$(J)).attr("r",h>24?2.5:4).attr("fill",st):!1)})}):!1),(Q.length?(24)>=(h):!1)){let j=(L>1?!s:!1)?Z.bandwidth():S;(__gvLe(lt(t,Q.map($=>$.text),12),j+6)?d.append("g").selectAll("text").data(Q).join("text").attr("class",t.cls("value-label")).attr("x",$=>$.x).attr("y",$=>$.y).attr("text-anchor","middle").text($=>$.text):!1)}let q=d.append("g").selectAll("rect").data(l.map((j,C)=>C)).join("rect").attr("class",t.cls("overlay")).attr("x",j=>{var C;return((C=V(String(j)))!=null?C:0)-(V.step()-S)/2}).attr("width",V.step()).attr("y",0).attr("height",E);t.tooltip.bind(q,(j,C)=>{let $=l[C],z=e.series.map((J,ot)=>J.values[C]===null?"":it(t.cls("tip-row"),at(r,ot,t.dark),J.label,p(ot)(J.values[C]))).join(""),W=(s?f>1:!1)?it(t.cls("tip-row"),"transparent","Total",t.fmtValue(e.series.reduce((J,ot)=>{var pt;return J+((pt=ot.values[C])!=null?pt:0)},0))):"",[st,rt]=n.pointer(j,t.chartEl);t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct($)}\x3c/div>${z}${W}`,st,rt)})}function Jn(t,n){var c,i,m,p;let{d3:r,spec:o}=t;if(o.type==="stacked"){let l=(c=r.min(n,h=>r.min(h,f=>f[0])))!=null?c:0;return{top:(i=r.max(n,h=>r.max(h,f=>f[1])))!=null?i: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),a=(m=r.max(e.filter(l=>l>=0)))!=null?m:null,s=(p=r.min(e.filter(l=>(0)>(l))))!=null?p:null;return{top:a,bottom:s}}function tr(t,n,r,o){let e=Math.min(.4,Qn/n),a=Math.min(.4,Math.max(0,Kn-r)/n);for(let s=0;(3)>(s);s++){let[c,i]=t.domain();((o.bottom!==null?t(o.bottom)>n*(1-e):!1)?(c=i-(i-o.bottom)/(1-e)):!1),((o.top!==null?__gvLt(t(o.top),n*a):!1)?(i=(o.top-a*c)/(1-a)):!1),t.domain([c,i])}}var er=3;function nr(t){return t>1?t*13+14:30}function rn(t){var X,E;let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=e.x.map(u=>t.fmtX(u)),c=s.length;if(c===0)return;let i=e.series.length,m=t.margin,p=e.series.flatMap(u=>u.values).filter(u=>u!==null),l=Math.min(0,(X=n.min(p))!=null?X:0),h=Math.max(0,(E=n.max(p))!=null?E:0);((a.yMax!==null?a.yMax>h:!1)?(h=a.yMax):!1),(l===h?(h=1):!1);let f=t.mobile?13:14,b=t.width*(t.mobile?.42:.34),x=Math.min(b,lt(t,s,f));m.left=x+10;let g=a.valueLabels,k=g?lt(t,p.map(t.fmtValue),12)+8:0;m.right=Math.max(m.right,k),(((0)>(l)?g:!1)?(m.left+=k):!1),m.bottom=g?8:28;let P=Math.max(40,t.width-m.left-m.right),N=o.append("g").attr("transform",`translate(${m.left},${m.top})`),F=N.append("g").attr("class",t.cls("cat-labels")),G=s.map(u=>F.append("text").attr("x",-10-(((0)>(l)?g:!1)?k:0)).attr("text-anchor","end").style("font-size",`${f}px`).text(u)),y=gt(G.map(u=>u.node()),x,er),R=G.map((u,d)=>({t:u,lines:y[d]})),_=nr(i),V=Math.max(_,Math.ceil(n.max(R,u=>u.lines)*f*1.15+10)),S=c*V,M=n.scaleLinear().domain([l,h]).nice(t.mobile?4:5).range([0,P]);t.setAxis(M.domain(),t.mobile?4:5);let I=Math.max(.25,1-_*.75/V),B=n.scaleBand().domain(s.map((u,d)=>String(d))).range([0,S]).paddingInner(I).paddingOuter(I/2),O=n.scaleBand().domain(n.range(i)).range([0,B.bandwidth()]).padding(i>1?.1:0);if(R.forEach(({t:u,lines:d},T)=>{var v;u.attr("y",((v=B(String(T)))!=null?v:0)+B.bandwidth()/2).attr("dy",`${.32-(d-1)*.575}em`)}),!g){let u=M.ticks(t.mobile?4:5);N.append("g").attr("class",t.cls("grid")).selectAll("line").data(u).join("line").attr("x1",d=>Math.round(M(d))+.5).attr("x2",d=>Math.round(M(d))+.5).attr("y1",0).attr("y2",S),N.append("g").attr("class",t.cls("ticks")).selectAll("text").data(u).join("text").attr("x",d=>M(d)).attr("y",S+20).attr("text-anchor","middle").text(d=>t.fmtAxis(d))}let Y=N.append("g"),K=Et(t)?ft(t,Y,P,S):null,tt=[];e.series.forEach((u,d)=>{u.values.forEach((T,v)=>{var w,U;if(T===null)return;let L=((w=B(String(v)))!=null?w:0)+((U=O(d))!=null?U:0),Z=O.bandwidth(),Q=M(Math.min(0,T)),q=Math.abs(M(T)-M(0)),et=Qt(Q,L,q,Z,4,T>=0?"right":"left"),A=K?dt(t,[u.key,String(e.x[v])]):null;((K?A:!1)?K.clip(A,Kt(t,String(e.x[v]))?{x:Q,y:L,w:q,h:Z}:void 0).append("path").attr("d",et):!1);let D=at(r,d,t.dark);Y.append("path").attr("class",t.cls("bar")).attr("d",et).attr("fill",((0)>(T)?i===1:!1)?me(D):D).attr("fill-opacity",ht(t,A)),(g?tt.push({x:T>=0?M(T)+6:M(T)-6,y:L+Z/2,text:t.fmtValue(T),anchor:T>=0?"start":"end"}):!1)})}),(K==null?!0:K.paint()),(0)>(l)?N.append("line").attr("class",t.cls("zero")).attr("x1",M(0)).attr("x2",M(0)).attr("y1",0).attr("y2",S):N.append("line").attr("class",t.cls("baseline")).attr("x1",M(0)+.5).attr("x2",M(0)+.5).attr("y1",0).attr("y2",S),N.append("g").selectAll("text").data(tt).join("text").attr("class",t.cls("value-label")).attr("x",u=>u.x).attr("y",u=>u.y).attr("dy","0.32em").attr("text-anchor",u=>u.anchor).text(u=>u.text);let H=N.append("g").selectAll("rect").data(s.map((u,d)=>d)).join("rect").attr("class",t.cls("overlay")).attr("x",-m.left).attr("width",t.width).attr("y",u=>{var d;return((d=B(String(u)))!=null?d:0)-(B.step()-B.bandwidth())/2}).attr("height",B.step());return t.tooltip.bind(H,(u,d)=>{if((i===1?g:!1))return;let T=s[d],v=e.series.map((Q,q)=>Q.values[d]===null?"":it(t.cls("tip-row"),at(r,q,t.dark),Q.label,t.fmtValue(Q.values[d]))).join(""),[L,Z]=n.pointer(u,t.chartEl);t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct(T)}\x3c/div>${v}`,L,Z)}),S+m.top+m.bottom}var an=40;function on(t){var X,E;let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=(X=e.points)!=null?X:[];if(!s.length)return;let c=new Map(e.series.map((u,d)=>[u.key,d])),i=u=>{var d,T;return at(r,(T=c.get((d=u.group)!=null?d:e.series[0].key))!=null?T:0,t.dark)},m=([u,d])=>{let T=(__gvOr(__gvOr(d-u,()=>(Math.abs(u))),()=>(1)))*.04;return[u-T,d+T]},[p,l]=m(n.extent(s,u=>u.x));(a.xFromZero?(p=Math.min(0,p),l=Math.max(0,l)):!1),(a.xMin!==null?(p=a.xMin):!1),(a.xMax!==null?(l=a.xMax):!1);let[h,f]=m(n.extent(s,u=>u.y));(a.yFromZero?(h=Math.min(0,h),f=Math.max(0,f)):!1),(a.yMin!==null?(h=a.yMin):!1),(a.yMax!==null?(f=a.yMax):!1),(p>l?([p,l]=[l,p]):!1),(h>f?([h,f]=[f,h]):!1);let b=t.margin;b.bottom=a.xLabel?48:30;let x=t.height-b.top-b.bottom,g=n.scaleLinear().domain([h,f===h?h+1:f]).nice(5).range([x,0]);t.setAxis(g.domain(),t.mobile?4:5),b.left=lt(t,wt(t,g).filter(function(v,i,a){return Math.abs(v)!==Math.max(Math.abs(a[0]),Math.abs(a[a.length-1]))}).map(t.fmtAxis),t.mobile?12:14)+10;let k=Math.max(40,t.width-b.left-b.right),P=n.scaleLinear().domain([p,l===p?p+1:l]).nice().range([0,k]),N=o.append("g").attr("transform",`translate(${b.left},${b.top})`);Tt(t,N,g,k),Xt(t,N,k,x),St(t,N,g,k);let F=u=>P(u);Ut(t,N,x,Yt(t,F,Zt(t,P),Wt(k,t.mobile)),F),(a.xLabel?N.append("text").attr("class",t.cls("axis-title")).attr("x",k).attr("y",x+42).attr("text-anchor","end").text(a.xLabel):!1);let G=t.mobile?4:5.5,y=t.id("plot");o.append("defs").append("clipPath").attr("id",y).append("rect").attr("x",-G).attr("y",-G).attr("width",k+2*G).attr("height",x+2*G),N.append("g").attr("clip-path",`url(#${y})`).selectAll("circle").data(s).join("circle").attr("class",t.cls("point")).attr("cx",u=>P(u.x)).attr("cy",u=>g(u.y)).attr("r",G).attr("fill",i);let[R,_]=P.domain(),[V,S]=g.domain(),M=s.filter(u=>__gvAnd(__gvAnd(__gvAnd(__gvAnd(u.label,()=>(u.x>=R)),()=>((_)>=(u.x))),()=>(u.y>=V)),()=>((S)>=(u.y)))).slice(0,an);if((M.length?(an)>=(M.length):!1)){let{kept:u}=je(M.map(d=>({p:d,y:g(d.y)-G-5})),13,8,x,40);N.append("g").selectAll("text").data(u).join("text").attr("class",t.cls("value-label")).attr("x",d=>P(d.p.x)).attr("y",d=>d.y).attr("text-anchor",d=>P(d.p.x)>k*.85?"end":__gvLt(P(d.p.x),k*.15)?"start":"middle").text(d=>d.p.label)}let I=n.Delaunay.from(s,u=>P(u.x),u=>g(u.y)),B=N.append("circle").attr("class",t.cls("ring")).attr("r",G+3).style("display","none"),O=s.some(u=>u.group!==void 0),Y=__gvOr(__gvOr(a.yLabel,()=>((O?"Vertical axis":(E=e.series[0])==null?void 0:E.label))),()=>("Vertical axis")),K=__gvOr(a.xLabel,()=>("Horizontal axis")),tt=N.append("rect").attr("class",t.cls("overlay")).attr("width",k).attr("height",x),H=()=>B.style("display","none");t.tooltip.bind(tt,u=>{let[d,T]=n.pointer(u),v=I.find(d,T),L=s[v];if((!L?!0:Math.hypot(P(L.x)-d,g(L.y)-T)>40)){H(),t.tooltip.hide();return}B.style("display",null).attr("cx",P(L.x)).attr("cy",g(L.y));let Z=__gvOr(__gvOr(L.label,()=>(L.group)),()=>("")),Q=((O?L.group:!1)?L.label:!1)?it(t.cls("tip-row"),i(L),L.group,""):"",q=((O?L.group:!1)?L.label:!1)?"transparent":i(L),et=Q+it(t.cls("tip-row"),"transparent",K,t.fmtX(L.x))+it(t.cls("tip-row"),q,Y,t.fmtValue(L.y));t.tooltip.show(`${Z?`\x3cdiv class="${t.cls("tip-title")}">${ct(Z)}\x3c/div>`:""}${et}`,P(L.x)+b.left,g(L.y)+b.top)},H)}var rr=.25,ar=16,or=3;function sn(t){let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=e.x.map(String),c=e.series.length;if((!s.length?!0:!c))return t.height;let i=Math.max(1,Math.min(c,Math.floor(t.width/(t.mobile?170:220)))),m=Math.ceil(c/i),p=t.width/i,l=_=>_%i*p+p/2,h=c>1?e.series.map((_,V)=>o.append("text").attr("class",t.cls("donut-title")).attr("x",l(V)).attr("text-anchor","middle").text(_.label)):[],f=gt(h.map(_=>_.node()),p-12,or),b=h.map((_,V)=>({t:_,lines:f[V]})),x=Math.max(1,...b.map(_=>_.lines)),g=c>1?30+Math.ceil((x-1)*ar*1.15):0,k=Math.max(50,Math.min(p/2-12,t.mobile?130:150)),P=a.donutHole?k*.56:0,N=g+k*2+18,F=_=>{var V,S;return yt(r,(S=(V=e.categoryColors)==null?void 0:V[_])!=null?S:nt.muted,t.dark)},G=n.format(".0%"),y=n.arc().innerRadius(P).outerRadius(k).padAngle(a.donutHole?.012:.006).cornerRadius(a.donutHole?2:0),R=n.arc().innerRadius(P?(P+k)/2:k*.62).outerRadius(P?(P+k)/2:k*.62);return e.series.forEach((_,V)=>{var H;let S=Math.floor(V/i),M=l(V),I=S*N+g+k+6,B=_.values.map(X=>(X!==null?X>0:!1)?X:0),O=B.reduce((X,E)=>X+E,0),Y=o.append("g").attr("transform",`translate(${M},${I})`);if(((H=b[V])==null?!0:H.t.attr("y",S*N+18)),!O)return;let K=n.pie().sort(null).value(X=>X)(B),tt=ft(t,Y,0,0);K.forEach((X,E)=>{var v;if((0)>=(X.value))return;let u=(v=y(X))!=null?v:"",d=dt(t,[s[E],_.key]);(d?tt.clip(d,{x:-k,y:-k,w:k*2,h:k*2}).append("path").attr("d",u):!1);let T=Y.append("path").attr("class",t.cls("slice")).attr("d",u).attr("fill",F(E)).attr("fill-opacity",ht(t,d));t.tooltip.bind(T,L=>{var et;let[Z,Q]=n.pointer(L,t.chartEl),q=it(t.cls("tip-row"),F(E),c>1?_.label:"Value",t.fmtValue((et=_.values[E])!=null?et:0))+it(t.cls("tip-row"),"transparent","Share",G(X.value/O));t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct(s[E])}\x3c/div>${q}`,Z,Q)})}),tt.paint(),K.forEach((X,E)=>{if(((rr)>(X.endAngle-X.startAngle)?!0:(0)>=(X.value)))return;let[u,d]=R.centroid(X),T=Ot(F(E)),v=Y.append("text").attr("class",t.cls("slice-label")).attr("x",u).attr("y",d).attr("dy","0.35em").attr("text-anchor","middle").text(G(X.value/O));(T!=="#FFFFFF"?v.style("fill",T).style("stroke","rgba(255,255,255,0.35)"):!1)})}),m*N+6}function ln(t){let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,[s,c]=e.series;if(((!s?!0:!c)?!0:!e.x.length))return;let m=e.x.map(String).map((u,d)=>({i:d,name:u,a:s.values[d],b:c.values[d]})).filter(u=>(u.a!==null?u.b!==null:!1));if(!m.length)return;let p=t.margin;p.top=Math.max(p.top,34),p.bottom=14;let l=t.mobile?12:13,h=l+3,f=Math.max(t.height-p.top-p.bottom,m.length*h);o.attr("height",f+p.top+p.bottom);let[b,x]=Mt(m.flatMap(u=>[u.a,u.b]),a.yFromZero,a.yMin,a.yMax),g=n.scaleLinear().domain([b,x]).nice().range([f,0]),[k,P]=g.domain(),N=(u,d)=>d==="left"?{name:u.name,value:t.fmtValue(u.a),nameFirst:!0}:{name:t.mobile?"":u.name,value:t.fmtValue(u.b),nameFirst:!1},F=(u,d=u.name)=>d?u.nameFirst?`${d} ${u.value}`:`${u.value} ${d}`:u.value,G=u=>F(N(u,"left")),y=u=>F(N(u,"right")),R=t.width*(t.mobile?.4:.3),_=Math.min(R,lt(t,m.map(G),l))+12,V=Math.min(R,lt(t,m.map(y),l))+12,S=_,M=Math.max(S+60,t.width-V),I=u=>{var d,T;return yt(r,(T=(d=e.categoryColors)==null?void 0:d[u])!=null?T:nt.muted,t.dark)},B=u=>(I(u).toUpperCase()===nt.muted.toUpperCase()?!0:I(u).toUpperCase()===nt.darkMuted.toUpperCase()),O=o.append("g").attr("transform",`translate(0,${p.top})`);o.append("text").attr("class",t.cls("slope-head")).attr("x",S).attr("y",18).attr("text-anchor","middle").text(s.label),o.append("text").attr("class",t.cls("slope-head")).attr("x",M).attr("y",18).attr("text-anchor","middle").text(c.label),O.append("line").attr("class",t.cls("slope-axis")).attr("x1",S).attr("x2",S).attr("y1",0).attr("y2",f),O.append("line").attr("class",t.cls("slope-axis")).attr("x1",M).attr("x2",M).attr("y1",0).attr("y2",f);let Y=t.id("plot");o.append("defs").append("clipPath").attr("id",Y).append("rect").attr("x",0).attr("y",-5).attr("width",t.width).attr("height",f+10);let K=O.append("g").attr("clip-path",(a.yMin!==null?!0:a.yMax!==null)?`url(#${Y})`:null),tt=[...m].sort((u,d)=>+!B(u.i)-+!B(d.i));for(let u of tt){let d=I(u.i);K.append("line").attr("class",t.cls("slope-line")).attr("x1",S).attr("x2",M).attr("y1",g(u.a)).attr("y2",g(u.b)).attr("stroke",d).attr("stroke-width",B(u.i)?2:3),K.append("circle").attr("cx",S).attr("cy",g(u.a)).attr("r",4).attr("fill",d),K.append("circle").attr("cx",M).attr("cy",g(u.b)).attr("r",4).attr("fill",d)}let H=new Set,X=u=>{let d=m.map(v=>({r:v,y:g(u==="left"?v.a:v.b)}));sr(d,h,h/2,f);let T=u==="left"?S:M;for(let v of d){let L=u==="left"?v.r.a:v.r.b,Z=L>P?-1:(k)>(L)?1:0;((Z?!H.has(`${u}${Z}`):!1)?(H.add(`${u}${Z}`),O.append("path").attr("class",t.cls("off-scale")).attr("d",`M${T},${(0)>(Z)?-8:f+8}l-5,${-Z*8}h10z`).attr("fill",t.dark?nt.darkSecondary:nt.secondary).append("title").text((0)>(Z)?"Above the axis range":"Below the axis range")):!1);let Q=N(v.r,u),q=O.append("text").attr("class",t.cls("slope-label")).attr("x",u==="left"?S-10:M+10).attr("y",v.y).attr("dy","0.32em").attr("text-anchor",u==="left"?"end":"start").style("font-size",`${l}px`).text(F(Q));(B(v.r.i)?!0:q.style("fill",xt(r,I(v.r.i),t.dark)));let et=q.node(),A=Q.name;for(;(et.getComputedTextLength()>R?A.length>3:!1);)A=A.slice(0,-1),q.text(F(Q,`${A.trimEnd()}\u2026`))}};X("left"),X("right");let E=O.append("rect").attr("class",t.cls("overlay")).attr("x",S).attr("width",M-S).attr("height",f);t.tooltip.bind(E,u=>{let[d,T]=n.pointer(u),v=(d-S)/(M-S),L=m[0],Z=1/0;for(let et of m){let A=g(et.a)+(g(et.b)-g(et.a))*v;(__gvLt(Math.abs(A-T),Z)?([L,Z]=[et,Math.abs(A-T)]):!1)}let Q=L.b-L.a,q=it(t.cls("tip-row"),I(L.i),s.label,t.fmtValue(L.a))+it(t.cls("tip-row"),I(L.i),c.label,t.fmtValue(L.b))+it(t.cls("tip-row"),"transparent","Change",`${Q>=0?"+":""}${t.fmtValue(Q)}`);t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct(L.name)}\x3c/div>${q}`,d,T+p.top)})}function sr(t,n,r,o){let e=[...t].sort((a,s)=>a.y-s.y);e.forEach((a,s)=>a.y=Math.max(a.y,s?e[s-1].y+n:r));for(let a=e.length-1;a>=0;a--)e[a].y=Math.min(e[a].y,(e.length-1)>(a)?e[a+1].y-n:o)}var ir=3;function cn(t){let{d3:n,spec:r,svg:o}=t,{data:e,style:a}=r,s=e.x.map(E=>t.fmtX(E)),c=s.length;if((!c?!0:!e.series.length))return t.height;let i=t.margin,m=t.mobile?30:32,p=t.mobile?13:14,l=t.width*(t.mobile?.38:.3),h=Math.min(l,lt(t,s,p));i.left=h+14,i.right=Math.max(i.right,16),i.bottom=30,i.top=Math.max(i.top,6);let f=Math.max(60,t.width-i.left-i.right),b=o.append("g").attr("transform",`translate(${i.left},${i.top})`),x=s.map(E=>b.append("text").attr("class",t.cls("cat-label")).attr("x",-12).attr("text-anchor","end").style("font-size",`${p}px`).text(E)),g=gt(x.map(E=>E.node()),h,ir),k=Math.max(m,Math.ceil(Math.max(1,...g)*p*1.15+10)),P=c*k,N=e.series.flatMap(E=>E.values).filter(E=>E!==null),[F,G]=Mt(N,a.yFromZero,a.yMin,a.yMax),y=t.mobile?4:5,R=n.scaleLinear().domain([F,G]).nice(y).range([0,f]);t.setAxis(R.domain(),y);let[_,V]=R.domain(),S=E=>(E>=_?(V)>=(E):!1),M=E=>E*k+k/2,I=E=>e.series.map(u=>u.values[E]).filter(u=>u!==null),B=s.map((E,u)=>a.valueLabels?lr(I(u),S):[]);(a.valueLabels?pr(t,R,f,B):!1);let O=cr(t,R,y),Y=E=>lt(t,[t.fmtValue(E)],12),K=B.map(E=>ur(R,f,E,Y)),tt=t.id("plot");o.append("defs").append("clipPath").attr("id",tt).append("rect").attr("x",R(_)-8).attr("y",0).attr("width",R(V)-R(_)+16).attr("height",P),b.append("g").attr("class",t.cls("grid")).selectAll("line").data(O).join("line").attr("x1",E=>Math.round(R(E))+.5).attr("x2",E=>Math.round(R(E))+.5).attr("y1",0).attr("y2",P),b.append("g").attr("class",t.cls("ticks")).selectAll("text").data(O).join("text").attr("x",E=>R(E)).attr("y",P+20).attr("text-anchor","middle").text(E=>t.fmtAxis(E)),(((0)>(F)?G>0:!1)?b.append("line").attr("class",t.cls("zero")).attr("x1",R(0)).attr("x2",R(0)).attr("y1",0).attr("y2",P):!1);let H=b.append("g").attr("clip-path",`url(#${tt})`);s.forEach((E,u)=>{x[u].attr("y",M(u)).attr("dy",`${.32-(g[u]-1)*.575}em`);let d=I(u),T=Math.min(...d),v=Math.max(...d);(((d.length>1?v>=_:!1)?(V)>=(T):!1)?H.append("line").attr("class",t.cls("dumbbell")).attr("x1",R(Math.max(_,T))).attr("x2",R(Math.min(V,v))).attr("y1",M(u)).attr("y2",M(u)):!1),mr(t,b,R,M(u),d),e.series.forEach((L,Z)=>{let Q=L.values[u];(Q!==null?H.append("circle").attr("class",t.cls("dot")).attr("cx",R(Q)).attr("cy",M(u)).attr("r",t.mobile?6:7).attr("fill",at(r,Z,t.dark)):!1)});for(let L of K[u])b.append("text").attr("class",t.cls("value-label")).attr("x",R(L.v)+L.dx).attr("y",M(u)).attr("dy","0.32em").attr("text-anchor",L.anchor).text(t.fmtValue(L.v))});let X=b.append("g").selectAll("rect").data(s.map((E,u)=>u)).join("rect").attr("class",t.cls("overlay")).attr("x",-i.left).attr("width",t.width).attr("y",E=>E*k).attr("height",k);return t.tooltip.bind(X,(E,u)=>{let d=e.series.map((L,Z)=>L.values[u]===null?"":it(t.cls("tip-row"),at(r,Z,t.dark),L.label,t.fmtValue(L.values[u]))).join(""),[T,v]=n.pointer(E,t.chartEl);t.tooltip.show(`\x3cdiv class="${t.cls("tip-title")}">${ct(s[u])}\x3c/div>${d}`,T,v)}),P+i.top+i.bottom}function lr(t,n){if(!t.length)return[];let r=Math.min(...t),o=Math.max(...t),e=[];return (((o)>(r)?n(r):!1)?e.push({v:r,anchor:"end",dx:-11}):!1),(n(o)?e.push({v:o,anchor:"start",dx:11}):!1),e}function cr(t,n,r){for(let o=r;o>=1;o--){t.setAxis(n.domain(),o);let e=n.ticks(o),a=e.map(c=>lt(t,[t.fmtAxis(c)],12));if((e.every((c,i)=>(i===0?!0:n(c)-n(e[i-1])>=(a[i]+a[i-1])/2+8))?!0:o===1))return e}return[]}function ur(t,n,r,o){let e=l=>{let h=l.anchor==="start"?t(l.v)+l.dx:t(l.v)+l.dx-o(l.v);return[h,h+o(l.v)]},a=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}),c=Math.min(...r.map(l=>l.v)),i=Math.max(...r.map(l=>l.v)),m=l=>((2)>(r.length)?!0:(e(l)[0]>=t(c)+7?__gvLe(e(l)[1],t(i)-7):!1)),p=[];for(let l of r){let h=a(l)?l:s(l);(((!a(h)?!0:(h!==l?!m(h):!1))?!0:p.some(f=>(__gvLt(e(f)[0],e(h)[1]+6)?__gvLt(e(h)[0],e(f)[1]+6):!1)))?!0:p.push(h))}return p}function mr(t,n,r,o,e){let[a,s]=r.domain(),c=e.filter(l=>(a)>(l)),i=e.filter(l=>l>s),m=t.dark?nt.darkSecondary:nt.secondary,p=(l,h,f)=>{let b=`M${l},${o}l${-h*6},-5v10z`;n.append("path").attr("class",t.cls("off-scale")).attr("d",b).attr("fill",m).append("title").text(`${f} ${f===1?"value is":"values are"} ${(0)>(h)?"below":"above"} the axis range`)};(c.length?p(r(a)-2,-1,c.length):!1),(i.length?p(r(s)+2,1,i.length):!1)}function pr(t,n,r,o){let e=new Map,a=i=>((e.has(i)?!0:e.set(i,lt(t,[t.fmtValue(i)],12))),e.get(i)),s=0,c=0;for(let i=0;(4)>(i);i++){let m=0,p=0;for(let l of o.flat()){let h=n(l.v)+l.dx;l.anchor==="end"?m=Math.max(m,a(l.v)-h+2):p=Math.max(p,h+a(l.v)-r+2)}if(((.5)>=(m)?(.5)>=(p):!1))return;s=Math.min(r*.3,s+Math.max(0,m)),c=Math.min(r*.3,c+Math.max(0,p)),n.range([s,r-c])}}var pe={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:[],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 mn=600;function un(t){var n;return{...t,style:{...pe,...t.style,map:{...pe.map,...(n=t.style)==null?void 0:n.map}}}}function pn(t,n){var e;if(!n.size)return de(t);let r=t.type==="combo"?t.data.series.flatMap((a,s)=>n.has(a.key)?s===0?[{...a,values:a.values.map(()=>null)}]:[]:[a]):t.data.series.filter(a=>!n.has(a.key)),o=(e=t.data.points)==null?void 0:e.filter(a=>{var s,c;return!n.has((c=a.group)!=null?c:(s=t.data.series[0])==null?void 0:s.key)});return de({...t,data:{...t.data,series:r,points:o}})}function de(t){if((t.type!=="line"?t.type!=="combo":!1))return t;let n=t.data.series.filter(s=>s.values.some(c=>c!==null));if((!n.length?!0:!n.every(s=>s.axis==="right")))return t;let r=t.data.series.map(s=>({...s,axis:"left"})),o=t.style,e=__gvOr(o.rightLabel,()=>((hr(o.yFormat,o.rightFormat)?o.yLabel:""))),a={...o,yFormat:o.rightFormat,yFromZero:o.rightFromZero,yMin:null,yMax:null,yLabel:e,rightLabel:""};return{...t,style:a,data:{...t.data,series:r}}}function dr(t){if((t.type!=="line"?t.type!=="combo":!1))return!1;let n=(r,o)=>(r.axis==="right"?((t.type==="line"?!0:o>0)):!1);return __gvAnd(t.data.series.some(n),()=>(t.data.series.some((r,o)=>!n(r,o))))}function hr(t,n){var r,o;return __gvAnd(__gvAnd((t.prefix===n.prefix?t.suffix===n.suffix:!1),()=>(t.decimals===n.decimals)),()=>(((r=t.multiply)!=null?r:1)===((o=n.multiply)!=null?o:1)))}function fr(t,n,r,o=null){var y,R,_,V;let e=un(n),a=o?we(o):null,s=new Set,c=`gv-${e.slug}`,i=S=>`${c}__${S}`,m=t.querySelector(`.${i("chart")}`),p=t.querySelector(`.${i("legend")}`),l=Ge(m,i("tooltip")),h=-1,f,b=0;(p==null?!0:p.addEventListener("click",S=>{let M=S.target.closest("[data-key]"),I=M==null?void 0:M.dataset.key;(I!==void 0?(s.has(I)?s.delete(I):((e.data.series.length-1)>(s.size)?s.add(I):!1),x()):!1)}));let x=()=>{var Q,q,et,A,D;b=0;let S=Math.floor(m.clientWidth);if((0)>=(S))return;let M=e.style.background==="white"?re(t):{color:null,dark:!1},I=M.dark;t.classList.toggle(`${c}--dark`,I),M.color?t.style.setProperty("--gv-halo",M.color):t.style.removeProperty("--gv-halo"),h=S,f=M.color;let B=(mn)>(t.clientWidth);((Q=m.querySelector("svg"))==null?!0:Q.remove());let O=m.ownerDocument.createElementNS("http://www.w3.org/2000/svg","svg");m.insertBefore(O,m.firstChild);let Y=r.select(O).attr("class",i("svg")).attr("width",S).attr("aria-hidden","true"),K=ge(e.type),tt=K?400:B?Math.min(e.style.height,360):e.style.height;Y.attr("height",tt);let H=pn(e,s),X=H.style.yFormat,E=H.style.rightFormat,u=Gt(r,X.prefix,X.suffix,X.decimals,X.multiply),d=Gt(r,E.prefix,E.suffix,E.decimals,E.multiply),T=w=>u.value(w),v={d3:r,spec:H,base:c,root:t,chartEl:m,svg:Y,width:S,height:tt,mobile:B,dark:I,page:M.color,margin:{top:(((H.style.yLabel?!0:H.style.rightLabel))?!["bar","donut","dot","slope"].includes(e.type):!1)?30:24,right:14,bottom:30,left:40},id:w=>`${c}-${w}`,cls:i,fmtAxis:w=>T(w),setAxis:(w,U)=>{T=$t(r,X,w,U)},fmtValue:u.value,fmtRightValue:d.value,rightAxis:(w,U)=>$t(r,E,w,U),fmtFor:w=>w.axis==="right"?d.value:u.value,fmtX:Fe(r,e,B),xAxis:(w,U)=>$t(r,e.style.xFormat,w,U),color:w=>at(H,w,I),tooltip:l,rightTitleY:14},L=(K?a:!1)?Re(a,e):a;K?(L?He(v,p,e,L):!1):Oe(v,p,e,s);let Z=__gvAnd(__gvAnd(__gvAnd((!K?e.type!=="bar":!1),()=>(e.type!=="donut")),()=>(e.type!=="dot")),()=>(e.type!=="slope"));if((((Z?H.style.yLabel:!1)?H.style.rightLabel:!1)?dr(H):!1)){let[w,U]=[H.style.yLabel,H.style.rightLabel].map(ut=>lt(v,[ut],12));(w+U+16>S?(v.rightTitleY=30,v.margin.top+=16):!1)}((H.style.yLabel?Z:!1)?Y.append("text").attr("class",i("axis-title")).attr("x",0).attr("y",14).text(H.style.yLabel):!1);try{let w=e.type;if(K){if((!a?!0:a.id!==((q=e.data.map)==null?void 0:q.geo)))throw new Error("map geography missing");Y.attr("height",Ie(v,L))}else (w==="line"?!0:w==="area")?Ye(v):((w==="column"?!0:w==="stacked")?!0:w==="combo")?nn(v):w==="bar"?Y.attr("height",(et=rn(v))!=null?et:tt):w==="scatter"?on(v):w==="donut"?Y.attr("height",(A=sn(v))!=null?A:tt):w==="slope"?ln(v):(w==="dot"?Y.attr("height",(D=cn(v))!=null?D:tt):!1)}catch(w){Y.selectAll("*").remove(),Y.append("text").attr("class",i("ticks")).attr("x",0).attr("y",20).text("Chart could not be drawn."),console.error("[gristviz]",w)}},g=()=>{(b?!0:(b=requestAnimationFrame(x)))},k=new ResizeObserver(()=>{(Math.floor(m.clientWidth)!==h?g():!1)});k.observe(m);let P=()=>{((e.style.background==="white"?re(t).color!==f:!1)?g():!1)},N=new MutationObserver(P),F=t.ownerDocument;N.observe(F.documentElement,{attributes:!0,attributeFilter:["class","style","data-theme"]}),(F.body?N.observe(F.body,{attributes:!0,attributeFilter:["class","style","data-theme"]}):!1);let G=(R=(y=F.defaultView)==null?void 0:y.matchMedia)==null?void 0:R.call(y,"(prefers-color-scheme: dark)");return((_=G==null?void 0:G.addEventListener)==null?!0:_.call(G,"change",P)),x(),((V=F.fonts)==null?!0:V.ready.then(()=>g())),{update(S){e=un(S);for(let M of[...s])(e.data.series.some(I=>I.key===M)?!0:s.delete(M));x()},destroy(){var S;k.disconnect(),N.disconnect(),l.destroy(),((S=G==null?void 0:G.removeEventListener)==null?!0:S.call(G,"change",P)),(b?cancelAnimationFrame(b):!1)}}}return xn(gr);})(); 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);});} function go(){ 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(); })();

If Brazil’s next administration accelerates clearing, the effects could be devastating for the rainforest, the people who call it home, and the industries on which its continued health depends. For decades, forest and climate scientists have warned of a brutal tipping point: Cut enough of the forest down and the water cycle won’t be strong enough to sustain a rainforest ecosystem. Instead, the area would morph into savanna and degraded forest — causing a net release of planet-warming carbon and depriving nearby soybean farms of rain.

The actual tipping point in question is multi-causal and difficult to estimate, but the most frequently quoted deforestation threshold is 20 to 25 percent clearing across Amazonia, a range first suggested in 2018 by Nobre and U.S. conservation biologist Thomas Lovejoy. The duo argued that “negative synergies between deforestation, climate change, and widespread use of fire” would send the forest into a feedback loop once this threshold is passed. A Nature study published in May of this year estimated the tipping-point range to be closer to 22 to 28 percent clearing when paired with the 1.5 to 1.9 degrees Celsius (2.7 to 3.4 degrees Fahrenheit) of global warming the world is likely to experience by mid-century.

About 18 percent of the Amazon — which spans nine countries — and 22 percent of the Brazilian Amazon have already been cleared.

iframe.arc-of-deforestation { display: block; background: #F0F0F0; width: 100vw; margin-left: calc(50% - 50vw); margin-top: 24px; /* the charts' 24px; the theme gives .article-body iframe 60px */ margin-bottom: 24px; border: 0; height: 880px; /* placeholder until the script measures the content */ } (function () { var frame = document.querySelector('.arc-of-deforestation'); frame.addEventListener('load', function () { var doc = frame.contentDocument; doc.documentElement.style.setProperty('--color-background', '#F0F0F0'); doc.documentElement.style.overflow = 'hidden'; // Line the map up with the story's text column, as the charts are: same left edge and width as the // nearest paragraph above, and no padding of its own, so its text also sits 24px from the story. var root = doc.querySelector('.amazon-clearing'); var ref = frame.previousElementSibling; while (ref ? ref.tagName !== 'P' : false) ref = ref.previousElementSibling; if (!ref) ref = frame.parentElement; function fit() { if (root) { var col = ref.getBoundingClientRect(), box = frame.getBoundingClientRect(); var parent = root.parentElement.getBoundingClientRect(); root.style.maxWidth = 'none'; root.style.width = col.width + 'px'; root.style.marginLeft = (col.left - box.left - parent.left) + 'px'; root.style.padding = '0'; } frame.style.height = Math.ceil(doc.body.getBoundingClientRect().height) + 'px'; } fit(); if (window.ResizeObserver) new ResizeObserver(fit).observe(doc.body); window.addEventListener('resize', fit); }); })();

Nico Wunderling, a climate scientist at Goethe University Frankfurt who led May’s Nature study, estimated a return to Jair Bolsonaro-era practices would clear about 1 percent of the Amazon basin’s rainforest over the next presidential term. At this rate, “we would reach the danger zone by the middle or end of the 2030s,” he told Grist.

Conversely, if Lula delivered on his pledge of net-zero deforestation by the early 2030s, Wunderling argues runaway feedback might yet be avoided. While climate change is a global process requiring global coordination, deforestation is “the lever that can be pulled back more easily,” he said.

The late 2030s is beyond the term covered by this election cycle, and the exact science of the tipping point remains uncertain. But the result of this election could still set the Amazon rainforest on its ultimate path. Ronaldo Christofoletti, an oceanographer at the Federal University of São Paulo, likened the situation to insuring a vehicle. “Why do I pay the insurance? Because an accident can happen. When? I don’t know.”

For Christofoletti, the electoral stakes are all about managing this uncertainty. “Do not expect magic from scientists,” he said. “Do trust that the tipping point is getting closer.”

The Bolsonaro campaign did not respond to a request for comment.

In the meantime, organized agribusiness is pushing for Bolsonaro in the runoff election. The Parliamentary Agricultural Front, Brazil’s primary agribusiness lobby, recently endorsed Flávio Bolsonaro, who has promised that the caucus will choose his minister of agriculture.

Even if Bolsonaro doesn’t win the October 25 runoff, agribusiness may already have done so. On October 4, Bolsonaro’s party won 121 House seats, the most any party has held since the Brazilian Constitution was promulgated in 1988. An analysis by the Brazilian Amazon-based news platform Sumaúma suggests that half of the incoming House has voted to loosen environmental licensing and limit Indigenous land claims. 

For agribusiness, that means the currently off-limits may soon be in play. “Even if Lula gets reelected,” said de Bolle, “he’s going to be very weak.”

This story was originally published by Grist with the headline Brazil’s election could determine the fate of the Amazon on Oct 15, 2026.

Categories: H. Green News

Magic: The Gathering draws a bad hand with El Niño

Grist - Thu, 10/15/2026 - 01:30

On a Saturday morning in September, the game shop Dice Dojo was packed. Players sat shoulder-to-shoulder at tables lining the far North Side Chicago shop with board games stacked from floor to ceiling and a giant yellow Pikachu on the wall. They were eagerly waiting to crack open boxes of the latest Magic: The Gathering trading cards and face off in a tournament.

Noel Camilotas spent most of the day pacing past rows of packed tables and helping players decipher the rules of the hotly anticipated new set. When he was done for the day, he walked out of the store with two boxes of cards. 

Despite that haul, Camilotas had hoped for more. 

“Some of the products I requested are not going to be available for me anytime soon,” he said. “One of the other products is not going to be available for purchase at all.”

Wizards of the Coast, a division of the toy giant Hasbro, announced in August that delivery of its new set of Magic cards would be delayed throughout North America. The company pointed to a drought-powered traffic jam at the Panama Canal through which nearly 6 percent of global maritime trade and about 40 percent of U.S. container traffic pass. The drought this year has been magnified by the El Niño climate pattern, which spikes air and surface water temperatures in parts of the Pacific Ocean and sets off extreme weather like floods and drought across the globe. The phenomenon has compounded the effects of rising global temperatures, adding to drought conditions in Central America and upending international maritime traffic. 

A bottleneck in the Panama Canal has made it harder for fans of Magic: The Gathering to buy the game’s latest Reality Fracture expansion set. Pat Nabong / Chicago Sun-Times

The delay is an early warning sign for how susceptible one of the world’s most important shipping lanes is in the face of a warming planet and what experts warn could be the strongest El Niño in history.

“Supply will be tighter at launch than anticipated as those boosters make their way through the logjam,” according to the card game’s website. 

Magic: The Gathering has amassed more than 50 million players worldwide since its introduction in 1993. The game has birthed an entire media ecosystem as well as a robust resale market for rare cards. The rapper Post Malone reportedly purchased a one-of-a-kind card based on the One Ring from a Lord of the Rings-themed set for $2 million. 

To win the game, players take the role of powerful, spell-slinging wizards and compete to see who can draw the most cards, cast the biggest spells, and defeat opponents by reducing their life points to zero. Cards are spells, and each player has an endlessly customizable deck of cards that draw on a massive catalogue that grows several times a year. New sets are released every few months.

The model has been tremendously successful. The game has made its parent company Hasbro more than $1 billion in revenue in just the first half of this year. But the trading game now faces an unexpected real-world challenge: El Niño.

“Even in our little corner of the multiverse, the supply chain affects us.”

“The result of an El Niño for Central America is a very strong drought,” said Ross Griffith, the head of Americas freight pricing at Argus Media, a U.K.-based agency tracking commodity prices. Between May and August this year, parts of Panama received rainfall about a third below the long-term average, raising concerns about water levels at the freshwater reservoirs that supply drinking water to the region and provide the water needed to lift and lower ships through the canal’s system of locks. 

People play Magic: The Gathering at Dice Dojo, a game shop in Chicago. Pat Nabong / Chicago Sun-Times

As a result, the Panama Canal Authority began restricting traffic, cutting daily vessel crossing slots by nearly 20 percent. That bottleneck drove up the fees shipping companies paid to cross the canal in September to as high as $5.3 million, topping the previous $4.6 million record set the previous month. Such restrictions are not new. During the last El Niño in 2023, daily crossings had dropped even lower. 

El Niño is expected to last into early 2027 and could exacerbate Panama’s upcoming dry season, according to Ross, who added that the delayed Magic cards could be just the beginning of El Niño-induced knock-on effects.

“If you have drought conditions on top of a typically more dry period, even what little replenishment you were getting then is probably not coming,” he said. “That can be really dangerous.”

So, at least for now, card collectors in Chicago and beyond will likely be waiting longer than usual. 

“Some products are now coming in waves,” Emma Hendren, the general manager at Dice Dojo, said on that Saturday in September. “We’re not going to have it available for sale today. We’re not certain when it’s going to arrive, unfortunately.”

Magic players are used to dealing with limited quantities or even delayed cards, but the current  El Niño-powered disruption is new. 

“Magic: The Gathering is all fantasy and all that stuff,” Joshua Wiltsie, who has been playing Magic for 30 years, said. “Even in our little corner of the multiverse, the supply chain affects us.”

This story was originally published by Grist with the headline Magic: The Gathering draws a bad hand with El Niño on Oct 15, 2026.

Categories: H. Green News

Freeing Europe from Cloud Giants 

Green European Journal - Thu, 10/15/2026 - 01:15

Beyond rogue scenarios and hype, the AI boom is accelerating a deeper structural shift: the migration of the global economy to the cloud. So far, the EU has mostly tried to rein in Big Tech through regulation, but this reactive approach has fallen short. The recent push for tech sovereignty can only succeed if it starts with democratic choice and a shared vision for social and technological progress.

Alessio Giussani: Your book The Rulers is primarily about three companies: Google, Amazon, and Microsoft. What sets them apart from other big corporations?

Cecilia Rikap: In the current debate, there’s a lot of noise about what’s going on with AI. Everybody, of course, has the right to talk about AI, particularly because decisions are made behind closed doors, and we lack a space to democratically discuss the ways forward. But instead of talking about the roots of corporate power and how it dictates technological change and profits from it, the conversation is often about two types of agents – and I’m playing with the word “agent” here.

One is the AI agent. People marvel at the things that AI can do, and instead of trying to understand who is developing this technology and for what purposes, they get caught up in this rhetoric that AI is either wonderful or horrible, but is extremely powerful either way. Others, who are more concerned with economic inequalities – as I also am – focus on another type of agent: the CEOs and the founders of these companies, particularly the ones who side with the far right, like Elon Musk or Alex Karp. I’m not saying that this approach is not relevant. But if we truly want to understand the roots of corporate power today, and therefore act upon it, dismantle it, and create alternatives, we cannot miss the forest for the tree.

These far-right characters shout very loudly and sometimes distract us from what’s really going on; this is what happens often with someone like Elon Musk. I’m not saying his companies don’t matter or that we shouldn’t study them, but in my research I don’t want to single out companies arbitrarily. Instead, I try to offer a more comprehensive view of corporate power. Therefore, I start by analysing the largest companies by market capitalisation, and then try to understand what explains their power.

I identify two groups: one is the group of big oil companies, and more broadly, companies that get their advantage by systematically extracting and monetising nature in different forms. The other group, which is the largest one and has been growing fast and overtaking some of the old giants, is made up of companies whose advantage comes from systematically capturing intangibles.

Corporate power has always been built, to some degree at least, on capturing and making sense of intangibles like information and knowledge, organising them, and putting them at the service of production processes. Think, for example, of the R&D laboratory of IBM, or the marketing department of Coca-Cola. These companies have been intellectual monopolies for decades, capturing intangibles like science and knowledge (in the case of IBM) or narratives and brand-building (Coca-Cola).

As intellectual monopolies, they mobilise their intangible assets to exercise economic power. Start-ups, for example, control intangibles, but usually they are not used for capturing economic value. An intellectual monopoly puts different forms of knowledge, narratives, and data at the service of expanding its control of the economy. This control can take the form of a chokepoint if it occurs on a specific market, or of a panopticon if it gives the ability to monitor all information created and exchanged within a network, enabling the leading corporation to plan, organise, and control beyond ownership.

Based on your analysis, a company like NVIDIA – which designs the most advanced AI chips and is the largest in the world by market capitalisation – does not qualify as a “ruler”. Why?

Nvidia has a clear chokepoint because it controls a specific market and is certainly an intellectual monopoly. But beyond that, it doesn’t have the capacity to control a broad part of the global economy. Its power is focused on semiconductor design, whereas other companies have a panopticon view, often because they sell directly across multiple markets. When you are at the supermarket, you think there are so many brands, but then you start turning the packaging, and you see Unilever everywhere. This gives a company like Unilever a panopticon: broad oversight across different parts of the economy. So all these companies mobilise intangibles to control portions of our lives, but these end up being contained, limited. Amazon, Microsoft, and Google are the only ones that combine multiple chokepoints and the largest panopticon of Western capitalism.

Many powerful actors are involved in producing an AI model. NVIDIA’s semiconductors are manufactured in Taiwan at TSMC, which I also classify as an intellectual monopoly with a chokepoint. So I’m not saying a company like Nvidia or TSMC isn’t powerful. But even the semiconductors from Nvidia end up entering the cloud of Amazon, Microsoft, and Google. Everywhere we look, we see these three companies controlling the many pieces and actors that then, seen together, become the digital stack.

Take academic research on AI, for example. Amazon, Microsoft, and Google co-produce around 90 per cent of their research with thousands of organisations. This isn’t exclusive to them: Meta, Nvidia, and companies from other sectors do it too. But when it comes to AI, Google and Microsoft are those with the largest capacity to control universities and public research organisations developing frontier research on AI. Moreover, they control the largest number of other companies, including start-ups, with their venture capital money and through the cloud.

Nvidia is expanding its profits so much that it has leverage to expand beyond its chokepoint. It is now trying to get its own cloud by investing a lot of money – also in partnership with other leading companies – to basically offer its semiconductors as a service on independent data centres that are not those of Amazon, Microsoft, and Google. Of course, this makes total sense because Nvidia doesn’t want to depend on selling to other big players. To some extent, what NVIDIA is trying to do is build its own cloud, and for me, this shows how important the cloud is.

What exactly is the cloud? And why does it bring so much power to the companies that control it?

Let me start with an example everyone knows: Netflix. It looks like a simple streaming app where we can watch whatever we want. Behind Netflix, there are thousands of digital services, which means that you have millions of lines of code that do a lot of different things. Not even a company as large as Netflix writes every line of code that makes the platform exist for all of us. Why? Because there are a lot of services, a lot of ready-made pieces of software for solving specific and repetitive issues that can be purchased. Where do you buy that? In the past, organisations used to go to a software provider and ask for software for their needs. It was more tailor-made, but it was also more expensive. Now, they rent it in the cloud.

The cloud is like a supermarket for digital technologies. It’s not just infrastructure offered as a service – that is, the data centres where data is stored and processed. You can get whatever you want in the cloud: software, a model, data, a platform, infrastructure, and more. From each of these clouds – which are run by Amazon, Microsoft and Google – you have thousands of options that you can purchase as a service.

That also means you never truly get access to the code. You don’t download the service to your computer, but you can use it while you are connected to the cloud. And this is where the cloud starts being something different. It’s not just the supermarket of technologies. It is also the production sphere, the factory, the place where data is arranged and organised, the software is produced, the architecture of the platforms is designed. Everything happens inside the cloud, and when we consume the services, we’re also inside the cloud. It’s as if I were also cooking and eating my meal inside the supermarket where I bought the ingredients. The production, the exchange, the consumption: it all happens there.

This differs from the power these companies already had over individuals through social media. Organisations of every size and every type, from small firms to large companies like Netflix, Nestlé, or Coca-Cola, and even governments, migrate to the cloud. In fact, the entire global economy is migrating to the cloud, which means that companies that control it get the capacity to oversee, predict, and anticipate where the economy is going; a level of foresight that no single institution, government, or organisation had in the past.

The cloud and intellectual monopolies predate the explosion of AI hype with the public release of ChatGPT in 2022. What does AI fundamentally change in the cloud’s role and the power relations it generates?

The AI companies that we now associate with the AI boom or hype, like OpenAI and Anthropic – but also DeepMind, which was acquired by Google in 2014 – are tightly connected to the cloud giants in multiple ways, including venture capital money. Since the release of ChatGPT, these AI companies have required a growing amount of processing power, which has also driven the data centre boom. At the same time, we have organisations around the world that feel that they must adopt AI, that they cannot be left out. I call this AI FOMO. And what is the safest, and also the most seamless, way to adopt AI? Well, the cloud.

AI is like a Trojan horse, a marketing strategy for the cloud. It accelerates migration to the cloud. Through Amazon, Microsoft, or Google Cloud, you automatically integrate the AI models into all the rest of the digital services you use. And you might not trust Anthropic, but Microsoft? Microsoft has been there for many years, so these companies have built a reputation as trustworthy partners, especially for other leading firms. Some companies have contracts directly with OpenAI or with Anthropic, but more and more we see that organisations prefer to go to the supermarket, where today they might use Claude, tomorrow ChatGPT, and the day after tomorrow they may use China’s DeepSeek, because even DeepSeek is available as a service on the cloud of Amazon, Microsoft, and Google.

Meanwhile, regulators and competition authorities focus on AI and whether the AI market will be competitive, or what to do to make it competitive. But AI exists within an ecosystem, and the ones that control the ecosystem beyond ownership are the cloud giants.

Controlling beyond ownership is also linked to planning and delivering innovation. How do you understand that concept?

We tend to think that innovation is a precondition for economic growth, and that growth, if we have the right policies, will lead to prosperity and a better life for everyone. Private companies are seen as the innovators, so governments are expected to cut red tape so we can achieve prosperity. Yet societies are not becoming more prosperous.

The classical understanding of innovation would define it as a new process or product put on the market. An invention might be the discovery of a new drug or treatment, but until it’s approved and sold on the market, it’s not an innovation. But this definition neglects that every innovation is produced collectively by many, and then monetised by the company that captures that co-created knowledge. Between 2012 and 2021, for example, Microsoft produced over 15,000 scientific publications. Almost all of them had at least one co-author who worked for another organisation, not Microsoft. During the same period, Microsoft was granted 35,000 patents. It shared ownership of just 1 per cent of those patents.

This goes to show that these corporations are not the only innovators. When companies like Microsoft, Amazon, Google, and others work with public universities and research institutes or invest in startups, they do so to get access to the knowledge that is being produced, to steer the trajectory of that knowledge, and then recombine all the pieces of that huge puzzle and monetise all the new recombinations. In a way, they are the big appropriators. So we shouldn’t cope with them under the promise that their innovations will contribute to a better life. In fact, they don’t, and these are not just “their” innovations, but the product of collective creative processes involving many others. These companies are indeed producing a lot of frontier research on AI, but never alone.

Besides, innovation today should be understood as knowledge in all its forms. This includes narratives and data, and how all this gets combined in the melting pot of creativity that the intellectual monopolies control beyond ownership. Corporations craft narratives about what we think AI is and how it should be regulated, and push us to use AI as a method of inventing, sidelining other means of producing and creating. I call this process epistemic totalitarianism.

Europe seems to have only awakened to the dangers of this system since Trump’s return to the White House in 2024 and his unholy alliance with tech bros. But who’s really in charge? Who’s driving whom?

During the Cold War, the Department of Defence set the trajectory and orientation of technological change. The Pentagon did this by investing strategically as well as coordinating and planning the big technological innovations of the Cold War period. After the Cold War, there was a sense of, “Why should we continue doing this the same way? We won.” Of course, it doesn’t mean that the Pentagon stopped investing in technology in the 1990s and 2000s, but it was no longer steering and planning technological development in the same way. Now, big tech companies have increasingly become the big planners of science and technology, particularly of AI. The AI that we have is the AI that they want. It’s an AI that can be resold again and again to countless actors, making it cheaper to produce and expanding their control over our societies.

Europe has been missing this story for decades. It thought that the world was operating as a common market, and that we should promote competition because everyone was on the same page. Of course, Europe knew that China wasn’t on that page and that China was planning. But what was harder to see was that leading corporations, in particular those from the US, were also planning and controlling beyond ownership.

The US government, once it realised around a decade ago that this was going on, decided to take action, and the already solid relationship between big tech and the Department of Defence has grown stronger and stronger since then. The most important change in this dynamic is that big tech – unlike previous military subcontractors – does not depend on government money. A key difference between a company like Palantir and a company like Microsoft is that Microsoft doesn’t depend on funding from the US government and its allies to be profitable, whereas Palantir does. This doesn’t mean Palantir will always obey the White House rule and bend the knee, but it is in its best interest to keep the government happy. For big tech companies, it’s not about getting money from the government; it’s about getting political help. They need the US government to stop places like Europe from regulating them.

What do they want exactly? They seem to be asking to pull the brake on AI development, while promising that AI could bring immense benefits to humanity and pushing on the accelerator.

There are two prevalent discourses in Silicon Valley, which correspond to two different ways of trying to control the state. One is that democracy, innovation, and freedom cannot go together. It posits that innovation and freedom should be prioritised over democracy. For those pushing this view, the state has failed and needs to be destroyed; technology by itself will bring a better world and deliver progress in every respect – to those who can pay for it, of course. These are the views of people like Alex Karp, Elon Musk, and Peter Thiel. But we also have the discourse of Satya Nadella and Sundar Pichai, the CEOs of Microsoft and Google, who say almost every day that their technologies will deliver promised economic growth while helping governments manage public administration, schools, hospitals, and borders.

This second discourse is more subtle. I describe it as corporate diplomacy because it’s a more strategic way to convince governments – even progressive ones. And when it comes to regulations, of course, these companies will respond differently: they will pretend to be much more open to oversight, but the question is which type of regulation and who designs it. They say that the technology moves so fast that it’s impossible for government regulation to be updated as it should be, and so they push for self-regulation, or regulation done by a third-party actor that goes inside the company and works together with its employees, with the information that the company wants to share. And they agree on regulations that blame tech users but never (themselves as) producers.

So, even though it might seem like they’re saying something different, in the end, they are all pushing for a certain type of regulation that blinds governments and society more and creates a shield from external oversight.

Regulation has been the approach driving policymaking in Brussels for a long time. Now there has been a shift towards competitiveness and a new buzzword: tech sovereignty. You’ve been working with this concept well before it became so popular. What does it mean?

Tech sovereignty can mean three different things. It can mean techno-nationalism, which consists in giving all the contracts to European firms. However, European companies like Siemens or SAP are also intellectual monopolies. And they are private companies, so their interest is to make money, not to grant options, choices, and openness to our societies in terms of how technology is produced or for what purposes.

Another interpretation, prevalent today at the EU level, sees tech sovereignty as making things happen in Europe, and it is as problematic as the first, if not more. The European Commission’s Tech sovereignty package should be renamed the tech competitiveness package. It aims to achieve competitiveness and economic growth through or with the excuse of sovereignty. It’s good marketing to call it sovereignty, but it’s essentially about attracting more capital to Europe, growing GDP, and reducing the feeling that we are lagging behind vis-à-vis the US. As it is designed, the package allows a company like Microsoft to fulfil all the criteria [of Europeanness] if it stores data in European data centres, and if its subsidiaries selling its services are based in Europe. So, from a legal point of view, these companies will be European entities, even if they are part of the Microsoft multinational corporation.

Clearly, these two ways of thinking about sovereignty are very short-sighted. Sovereignty, when it comes to tech, should be connected to governance, democracy, and choice. It is about being able to decide which technologies we want, which ones we don’t want, and for what purposes. Who is going to develop them? To what extent are we going to develop them, given their ecological footprint? What data are we going to use? How will we recognise the collective work that goes into developing technology? How are we going to make sure the effects don’t harm workers?

Ultimately, sovereignty is about who decides. It’s about democratising the political power of who is deciding about the present and future of humanity, because these technologies are powerful and ubiquitous, and the technologies that we are getting today are decided behind closed doors by a few actors.

If you were a progressive politician, government, or policymaker who wants to work towards this more expansive notion of tech sovereignty, what kind of coalitions and constituencies would you try to involve in the process?

The “we” needs to include everyone who identifies that this is a problem and wants to build a vision of digital sovereignty that is about collectively co-creating and sharing knowledge.

I think we need to start by decoupling the public sector from these companies. We need to make sure the US government and the companies can’t switch off the states participating in building an alternative. We can start small, for example with education, which is a critical sector, because kids at school are receiving a Google Suite package and studying with generative AI. We’ve seen the effect it has even on adults: it reduces people’s capacity to think critically. We, as adults, have learned to maintain some balance, but kids often don’t have that capacity. Other critical sectors are healthcare and the public service media.

It’s hard, but it will not require all the money that the companies are investing because we are going to start smaller, from the capabilities that already exist. And Europe has a lot of those. A significant part of these companies’ advantage comes from research that was done and is still being done in Europe by European universities, European companies, and so on.

There’s a growing movement against data centres. Should they be part of the conversation? And can we really build a democratic and sovereign tech if we put a pause on them altogether?

Including the communities that are fighting against data centres is critical because if we are building a public alternative, we will need infrastructure. The question is, where are we going to build these data centres? To what extent do we need them?

There is the idea that hyperscale data centres are inevitable, but only because we’ve accepted the narrative from cloud giants and AI companies that what we need is the largest model with more parameters, even though that is less rigorous than the machine learning models developed to detect or do specific tasks. But of course, those models require more human effort and less energy. So, we also need to change the AI paradigm in this process.

Tech CEOs and politicians in the US mention China “catching up” day in and day out as the ultimate reason to push the accelerator and push back against meaningful regulation. Is that narrative justified by reality?

When you look at the level of investment in the digital infrastructure of Amazon, Microsoft, and Google compared to Alibaba, Tencent, or Huawei, you can clearly see that China is playing a different game. It is trying to expand the adoption of its models as much as possible, even if they are not at the frontier. If it had political interest in doing so, China could channel all its efforts into one big team producing the largest AI model you’ve ever seen, and it has the resources and people to do that. But that’s not the game that China is playing.

Nor is Beijing just playing the AI game. China has been focusing on so many industries; it’s trying to lead everywhere, while the US is focused on AI, and Europe is stuck in between because it’s not thinking about what Europeans’ problems are today. What’s the priority? What should we be focusing on?

I like to live in Europe. The quality of life here is way better than in the US, and we often forget this. We forget about all the things we still get in Europe that are much rarer in other parts of the world, and I think we need to embrace that much more. It’s the time to build digital commons. It’s the time to build global public goods. It’s time to solve critical problems instead of being blinded by the latest iteration of an AI model that clearly brings more problems than solutions. And again, I’m not saying we should solve all problems without technology, but we should first map the problems, who is being affected by them, and how, and then identify what type of solutions is needed. In some cases, it might be technology; in other cases, it might just be redistributing wealth and decision-making power. It’s ultimately about bold political choices, and I hope to see more of those coming from Europe.

The content of this interview has been edited and rearranged for length and clarity.

Categories: H. Green News

Walkability is not just about walking

Resilience - Thu, 10/15/2026 - 01:00
Walkable cities are places that do best what cities are meant to do: contain and display human life with all of its variety, tension, diversity, struggle and beauty.

Data centers have exposed big tech’s trust deficit

Resilience - Thu, 10/15/2026 - 01:00
Americans used the products for twenty years without trusting the companies. A data center is the first thing they could vote on.

Stories on the Edge: On the front lines of climate-driven water scarcity in Morocco

Resilience - Thu, 10/15/2026 - 01:00
In recent years, Agadir, Morocco, has become a focal point for discussions on climate resilience and adaptation. In a recent episode of The Stories on the Edge podcast, hosts Veronica and Nigel spoke with Zach Oulad, an urban data expert and local official, who discussed the urgent need for community adaptation and innovative policies.

Wind developer signs community benefit deals worth up to $160m to end stalemate over called-in projects

Renew Economy - Thu, 10/15/2026 - 00:12

UK developer and local council sign community benefit deals for two projects stuck in limbo after being "called" in by he LNP state government.

The post Wind developer signs community benefit deals worth up to $160m to end stalemate over called-in projects appeared first on Renew Economy.

'Imagination is resistance'

Ecologist - Wed, 10/14/2026 - 23:00
'Imagination is resistance' Channel News brendan 15th October 2026 Teaser Media
Categories: H. Green News

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.