diff --git a/.gitignore b/.gitignore index c881e3d..a2ede65 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,8 @@ +*.Rproj .Rproj.user .Rhistory .RData .Ruserdata -eurlex.Rproj /doc/ /Meta/ +inst/doc diff --git a/CRAN-SUBMISSION b/CRAN-SUBMISSION deleted file mode 100644 index 2495aa6..0000000 --- a/CRAN-SUBMISSION +++ /dev/null @@ -1,3 +0,0 @@ -Version: 0.4.3 -Date: 2022-11-16 23:29:33 UTC -SHA: e23189b5f2a502b340d37964f81d316b86507acf diff --git a/DESCRIPTION b/DESCRIPTION index 6e671c8..c49f07f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -34,6 +34,7 @@ Suggests: wordcloud, purrr, ggplot2, + ggiraph, testthat (>= 3.0.0) URL: https://michalovadek.github.io/eurlex/ VignetteBuilder: knitr diff --git a/README.md b/README.md index 21c7d7d..568864b 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,14 @@ +# eurlex: Retrieve Data on European Union Law + + [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/eurlex)](https://cran.r-project.org/package=eurlex) [![CRAN\_Downloads](http://cranlogs.r-pkg.org/badges/grand-total/eurlex)](https://cran.r-project.org/package=eurlex) [![R-CMD-check](https://github.com/michalovadek/eurlex/actions/workflows/check-standard.yaml/badge.svg)](https://github.com/michalovadek/eurlex/actions/workflows/check-standard.yaml) -# eurlex + -The `eurlex` R package attempts to significantly reduce the overhead associated with using SPARQL and REST APIs made available by the EU Publication Office and other EU institutions. Compared to pure web-scraping, the package provides more efficient and transparent access to data on European Union laws and policies. +The `eurlex` R [package](https://michalovadek.github.io/eurlex/) reduces the overhead associated with using SPARQL and REST APIs made available by the EU Publication Office and other EU institutions. Compared to pure web-scraping, the package provides more efficient and transparent access to data on European Union laws and policies. -See the [vignette](https://michalovadek.github.io/eurlex/articles/eurlexpkg.html) for a walkthrough on how to use the package. Check function documentation for most up-to-date overview of features. Example use cases are shown in this [paper](https://www.tandfonline.com/doi/full/10.1080/2474736X.2020.1870150). +See the [vignette](https://michalovadek.github.io/eurlex/articles/eurlexpkg.html) for a basic walkthrough on how to use the package. Check function documentation for most up-to-date overview of features. Example use cases are shown in this [paper](https://www.tandfonline.com/doi/full/10.1080/2474736X.2020.1870150). You can use `eurlex` to create automatically updated overviews of EU decision-making activity, as shown [here](https://michalovadek.github.io/eulaw/). @@ -18,31 +21,39 @@ The development version is available via `remotes::install_github("michalovadek/ Michal Ovádek (2021) **Facilitating access to data on European Union laws**, *Political Research Exchange*, 3:1, DOI: [10.1080/2474736X.2020.1870150](https://www.tandfonline.com/doi/full/10.1080/2474736X.2020.1870150) ## Basic usage - The `eurlex` package currently envisions the typical use-case to consist of getting bulk information about EU legislation into R as fast as possible. The package contains three core functions to achieve that objective: `elx_make_query()` to create pre-defined or customized SPARQL queries; `elx_run_query()` to execute the pre-made or any other manually input query; and `elx_fetch_data()` to fire GET requests for certain metadata to the REST API. The function `elx_make_query` takes as its first argument the type of resource to be retrieved (such as "directive" or "any") from the semantic database that powers Eur-Lex (and other publications) called Cellar. If you are familiar with SPARQL, you can always specify your own queries and execute them with `elx_run_query()`. -`elx_run_query()` executes SPARQL queries on a pre-specified endpoint of the EU Publication Office. It outputs a `data.frame` where each column corresponds to one of the requested variables, while the rows accumulate observations of the resource type satisfying the query criteria. Obviously, the more data is to be returned, the longer the execution time, varying from a few seconds to several hours, depending also on your connection. The first column always contains the unique URI of a "work" (legislative act or court judgment) which identifies each resource in Cellar. Several human-readable identifiers are normally associated with each "work" but the most useful one is [CELEX](https://eur-lex.europa.eu/content/tools/TableOfSectors/types_of_documents_in_eurlex.html), retrieved by default. +`elx_run_query()` executes SPARQL queries on a pre-specified endpoint of the EU Publication Office. It outputs a `data.frame` where each column corresponds to one of the requested variables, while the rows accumulate observations of the resource type satisfying the query criteria. Obviously, the more data is to be returned, the longer the execution time, varying from a few seconds to several hours, depending also on your connection. The first column always contains the unique URI of a "work" (usually legislative act or court judgment) which identifies each resource in Cellar. Several human-readable identifiers are normally associated with each "work" but the most useful one tends to be [CELEX](https://eur-lex.europa.eu/content/tools/TableOfSectors/types_of_documents_in_eurlex.html), retrieved by default. -For the moment, it is recommended to retrieve metadata one variable at a time. For example, if you wish to obtain the legal bases of directives and the date of transposition, you should run separate calls: +``` r +# load library +library(eurlex) -0. `ids <- elx_make_query("directive") |> elx_run_query()` -1. `lbs <- elx_make_query("directive", include_lbs = TRUE) |> elx_run_query()` -2. `dates <- elx_make_query("directive", include_date_transpos = TRUE) |> elx_run_query()` -3. `ids |> dplyr::left_join(lbs) |> dplyr::left_join(dates)` +# create query +query <- elx_make_query("directive", include_date_transpos = TRUE) -rather than `elx_make_query("directive", include_lbs = TRUE, include_date_transpos = TRUE)`. This approach is usually faster and should also make it easier to understand the returned data frame(s), especially when some variables contain missing or duplicated data. Always keep an eye on whether the `work` and `celex` columns identify rows uniquely or not. +# execute query +results <- elx_run_query(query) +``` -One of the most useful things about the API is that we obtain a comprehensive list of identifiers that we can subsequently use to obtain more data relating to the document in question. While the results of the SPARQL queries are useful also for webscraping (with the `rvest` package), the function `elx_fetch_data()` enables us to fire GET requests to retrieve data on documents with known identifiers (including Cellar URI). The function for example enables downloading the title and the full text of a document in all available languages. +One of the most useful things about the API is that we obtain a comprehensive list of identifiers that we can subsequently use to obtain more data relating to the document in question. While the results of the SPARQL queries can also be useful for web-scraping, the function `elx_fetch_data()` makes it possible to fire GET requests to retrieve data on documents with known identifiers (including Cellar URI). The function for example enables downloading the title and the full text of a document in all available languages. ## Note -This package nor its author are in any way affiliated with the EU Publications Office. Please refer to the applicable [data reuse policies](https://eur-lex.europa.eu/content/welcome/data-reuse.html). +This package nor its author are in any way affiliated with the EU, its institutions, offices or agencies. Please refer to the applicable [data reuse policies](https://eur-lex.europa.eu/content/welcome/data-reuse.html). Please consider contributing to the maintenance and development of the package by reporting bugs or suggesting new features. ## Latest changes +### eurlex 0.4.5 + +- breaking change: `elx_run_query()` now strips URIs (except Eurovoc ones) by default and keeps only the identifier to reduce object size +- where `elx_fetch_data()` is used to retrieve texts from an html document, it now uses by default `rvest::html_text2()` instead of `rvest::html_text()`. This is slower but more resembling of how the page renders in some cases. New argument `html_text = "text2"` controls the setting. +- new feature: `elx_make_query(..., include_court_origin = TRUE)` retrieves the country of origin of a court case. As per Eur-Lex documentation, this is primarily intended to be the country of the national court referring a preliminary question, but other countries are present in the data as well at the moment. Recommended to interact with court procedure +- new feature: `elx_make_query(..., include_original_language = TRUE)` retrieves the authentic language of a document, typically a court case + ### eurlex 0.4.3 - all date variables retrieved through `elx_make_query(include_... = TRUE)` are now properly named @@ -61,29 +72,6 @@ Please consider contributing to the maintenance and development of the package b - fixed bug in `elx_download_xml()` parameter checking - `elx_download_xml(notice = "object")` now retrieves metadata correctly -### eurlex 0.4.0 - -- download XML notices associated with Cellar URLs with `elx_download_xml()` -- retrieve European Case Law Identifier (ECLI) with `elx_make_query(include_ecli = TRUE)` - -### eurlex 0.3.6 - -- `elx_run_query()` now fails gracefully in presence of internet/server problems -- `elx_fetch_data()` now automatically fixes urls with parentheses (e.g. "32019H1115(01)" used to fail) -- minor fixes to vignette -- `elx_parse_xml` no longer an exported function - -### eurlex 0.3.5 - -- it is now possible to select all resource types available with `elx_make_query(resource_type = "any")`. Since there are nearly 1 million CELEX codes, use with discretion and expect long execution times -- results can be restricted to a particular directory code with `elx_make_query(directory = "18")` (directory code "18" denotes Common Foreign and Security Policy) -- results can be restricted to a particular sector with `elx_make_query(sector = 2)` (sector code 2 denotes EU international agreements) - -- new feature: request date of court case submission `elx_make_query(include_date_lodged = TRUE)` -- new feature: request type of court procedure and outcome `elx_make_query(include_court_procedure = TRUE)` -- new feature: request directory code of legal act `elx_make_query(include_directory = TRUE)` -- `elx_curia_list()` has a new default parameter `parse = TRUE` which creates separate columns for `ecli`, `see_case`, `appeal` applying regular expressions on `case_info` - ## Useful resources Guide to CELEX numbers: https://eur-lex.europa.eu/content/tools/TableOfSectors/types_of_documents_in_eurlex.html diff --git a/cran-comments.md b/cran-comments.md deleted file mode 100644 index 2c74612..0000000 --- a/cran-comments.md +++ /dev/null @@ -1,5 +0,0 @@ -## R CMD check results - -0 errors | 0 warnings | 1 note - -* Passed R CMD Check locally diff --git a/doc/eurlexpkg.R b/doc/eurlexpkg.R index cbbca34..ace0486 100644 --- a/doc/eurlexpkg.R +++ b/doc/eurlexpkg.R @@ -108,7 +108,7 @@ dir_titles <- results[1:5,] %>% # take the first 5 directives only to save time print(dir_titles) -## ---- eval=FALSE-------------------------------------------------------------- +## ----dirsdata, eval=FALSE----------------------------------------------------- # dirs <- elx_make_query(resource_type = "directive", include_date = TRUE, include_force = TRUE) %>% # elx_run_query() @@ -120,7 +120,7 @@ dirs %>% ggplot(aes(x = force, y = n)) + geom_col() -## ----------------------------------------------------------------------------- +## ----dirforce----------------------------------------------------------------- dirs %>% filter(!is.na(force)) %>% mutate(date = as.Date(date)) %>% @@ -130,7 +130,7 @@ dirs %>% axis.line.y = element_blank(), axis.ticks.y = element_blank()) -## ----------------------------------------------------------------------------- +## ----dirtitles---------------------------------------------------------------- dirs_1970_title <- dirs %>% filter(between(as.Date(date), as.Date("1970-01-01"), as.Date("1973-01-01")), force == "true") %>% @@ -140,12 +140,12 @@ dirs_1970_title <- dirs %>% as_tibble() print(dirs_1970_title) - ## ----wordcloud, message = FALSE, warning=FALSE, error=FALSE------------------- library(tidytext) library(wordcloud) +# wordcloud dirs_1970_title %>% select(celex,title) %>% unnest_tokens(word, title) %>% @@ -154,4 +154,3 @@ dirs_1970_title %>% bind_tf_idf(word, celex, n) %>% with(wordcloud(word, tf_idf, max.words = 40)) - diff --git a/doc/eurlexpkg.Rmd b/doc/eurlexpkg.Rmd index a80bb02..bf00a2f 100644 --- a/doc/eurlexpkg.Rmd +++ b/doc/eurlexpkg.Rmd @@ -203,7 +203,7 @@ Note that text requests are by far the most time-intensive; requesting the full In this section I showcase a simple application of `eurlex` on making overviews of EU legislation. First, we collate data on directives. -```{r, eval=FALSE} +```{r dirsdata, eval=FALSE} dirs <- elx_make_query(resource_type = "directive", include_date = TRUE, include_force = TRUE) %>% elx_run_query() ``` @@ -221,7 +221,7 @@ dirs %>% Directives become naturally outdated with time. It might be all the more interesting to see which older acts are thus still surviving. -```{r} +```{r dirforce} dirs %>% filter(!is.na(force)) %>% mutate(date = as.Date(date)) %>% @@ -234,7 +234,7 @@ dirs %>% We want to know a bit more about some directives from the early 1970s that are still in force today. Their titles could give us a clue. -```{r} +```{r dirtitles} dirs_1970_title <- dirs %>% filter(between(as.Date(date), as.Date("1970-01-01"), as.Date("1973-01-01")), force == "true") %>% @@ -244,7 +244,6 @@ dirs_1970_title <- dirs %>% as_tibble() print(dirs_1970_title) - ``` I will use the `tidytext` package to get a quick idea of what the legislation is about. @@ -253,6 +252,7 @@ I will use the `tidytext` package to get a quick idea of what the legislation is library(tidytext) library(wordcloud) +# wordcloud dirs_1970_title %>% select(celex,title) %>% unnest_tokens(word, title) %>% @@ -260,7 +260,6 @@ dirs_1970_title %>% filter(!grepl("\\d", word)) %>% bind_tf_idf(word, celex, n) %>% with(wordcloud(word, tf_idf, max.words = 40)) - ``` I use term-frequency inverse-document frequency (tf-idf) to weight the importance of the words in the wordcloud. If we used pure frequencies, the wordcloud would largely consist of words conveying little meaning ("the", "and", ...). diff --git a/doc/eurlexpkg.html b/doc/eurlexpkg.html index 52575fe..c804959 100644 --- a/doc/eurlexpkg.html +++ b/doc/eurlexpkg.html @@ -751,7 +751,7 @@

Application

theme(axis.text.y = element_blank(), axis.line.y = element_blank(), axis.ticks.y = element_blank()) -

+

We want to know a bit more about some directives from the early 1970s that are still in force today. Their titles could give us a clue.

dirs_1970_title <- dirs %>% 
@@ -776,14 +776,15 @@ 

Application

library(tidytext)
 library(wordcloud)
 
-dirs_1970_title %>% 
-  select(celex,title) %>% 
-  unnest_tokens(word, title) %>% 
-  count(celex, word, sort = TRUE) %>% 
-  filter(!grepl("\\d", word)) %>% 
-  bind_tf_idf(word, celex, n) %>% 
-  with(wordcloud(word, tf_idf, max.words = 40))
-

+# wordcloud +dirs_1970_title %>% + select(celex,title) %>% + unnest_tokens(word, title) %>% + count(celex, word, sort = TRUE) %>% + filter(!grepl("\\d", word)) %>% + bind_tf_idf(word, celex, n) %>% + with(wordcloud(word, tf_idf, max.words = 40))
+

I use term-frequency inverse-document frequency (tf-idf) to weight the importance of the words in the wordcloud. If we used pure frequencies, the wordcloud would largely consist of words conveying diff --git a/docs/404.html b/docs/404.html index 0e28a81..b0c0e68 100644 --- a/docs/404.html +++ b/docs/404.html @@ -56,6 +56,9 @@

diff --git a/docs/articles/council.html b/docs/articles/council.html new file mode 100644 index 0000000..ae0af23 --- /dev/null +++ b/docs/articles/council.html @@ -0,0 +1,276 @@ + + + + + + + +Data on votes in the Council of the EU • eurlex + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+
+
+ + + + +

Few would disagree that the Council of the European Union (EU) – +sometimes also referred to as the Council of Ministers – is the most +important decision-maker in the EU’s legislative process. The Council +brings together the government representatives of the Member States to, +among others, negotiate EU legislation with the European Parliament as +part of the ordinary legislative procedure (OLP).

+

Under the OLP, which is nowadays the most common type of law-making +procedure, the Council should make decisions by qualified majority. In +practice, it often decides by consensus, as Member States tend to avoid +open disagreements. Still, enough votes are taken to give us some +insight into the variation in Member State governments’ behaviour. We +access these through a dedicated API maintained by the Council, which is +also wrapped in the eurlex package.

+
+

Council votes +

+
+# packages
+library(eurlex)
+library(ggplot2)
+library(dplyr)
+#> 
+#> Attaching package: 'dplyr'
+#> The following objects are masked from 'package:stats':
+#> 
+#>     filter, lag
+#> The following objects are masked from 'package:base':
+#> 
+#>     intersect, setdiff, setequal, union
+library(tidyr)
+library(stringr)
+library(ggiraph)
+
+# pull Council voting data
+cns_votes_raw <- elx_council_votes()
+
+# vote level, keep only votes with disagreements
+votes_dis <- cns_votes_raw %>% 
+  select(voteProc, starts_with("countryCode")) %>% 
+  select(-countryCodeNotParticipatingGrouped) %>% 
+  distinct() %>% 
+  filter((!is.na(countryCodeAgainstGrouped) & !is.na(countryCodeAbstainedGrouped))) %>% 
+  pivot_longer(cols = starts_with("country"), names_to = "vote", values_to = "country") %>% 
+  separate_rows(country, sep = "\\|") %>% 
+  drop_na() %>% 
+  mutate(vote = case_when(str_detect(vote, "Favour") ~ 1L,
+                          str_detect(vote, "Absta") ~ 2L,
+                          str_detect(vote, "Against") ~ 3L,
+                          T ~ NA_integer_))
+
+# country vote counts
+country_votes_n <- votes_dis %>% 
+  count(country, vote)
+
+# weighted vote proportion
+country_votes_prop <- country_votes_n %>% 
+  mutate(value = case_when(vote == 1 ~ n * 1,
+                           vote == 2 ~ n * -1,
+                           vote == 3 ~ n * -2)) %>% 
+  group_by(country) %>% 
+  summarise(value = sum(value),
+            n_votes = sum(n),
+            prop = round(value / n_votes, 3)) %>% 
+  ungroup()
+

Excluding votes where all governments voted in favour, we are left +with between 109 and 81 votes per Member +State. While these numbers do not represent the entire historical voting +record, they should still help us lift the veil on variation in Member +States’ propensity to disagree. Note that due to opt-outs not all +countries have participated in every vote.

+

To highlight that votes against tend to represent a strong signal of +disagreement, the following simple formula is used to calculate the +weighted proportion of Member State discontent: \(p_i = \frac{\sum_j^a{\text{infavour}_{ij}} - +\sum_k^b{\text{abstain}_{ik}} - \sum_l^c{\text{against}_{il} * 2}}{a + b ++ c}\)

+
+
+

Interactive plot +

+

The data on votes are easy enough to plot interactively with +ggplot2 and ggiraph. The following plot shows +the variation in \(p_i\) where \(i\) indexes Member States.

+
+# viz Council votes and weighted proportion
+iplot_votes_prop <- country_votes_prop %>% 
+  mutate(tooltip = str_c(country,": ", prop, ". Total number of votes: ", n_votes)) %>% 
+  ggplot(aes(y = reorder(country, prop), x = prop, yend = reorder(country, prop), xend = 0, color = prop)) + 
+  geom_vline(xintercept = c(0.25,0.5,0.75), color = "grey90", lty = 2) +
+  geom_point_interactive(aes(tooltip = tooltip, data_id = country),
+                         show.legend = FALSE) +
+  geom_segment_interactive(aes(tooltip = tooltip, data_id = country),
+                           show.legend = FALSE) +
+  theme_minimal(base_family = "Arial") +
+  theme(legend.position = "top",
+        legend.justification = "left",
+        legend.title = element_text(face = "italic"),
+        plot.background = element_rect(fill = "white", color = "grey88"),
+        axis.text = element_text(color = "grey10", size = 12),
+        title = element_text(face = "bold", size = 16),
+        panel.grid = element_line(color = "grey94"),
+        axis.title = element_text(hjust = 1, size = 14),
+        plot.subtitle = element_text(face = "italic", size = 15),
+        plot.caption = element_text(face = "italic", size = 8),
+        strip.text = element_text(hjust = 0, face = "bold")) +
+  scale_x_continuous(expand = c(0.01,0)) +
+  scale_color_gradient(low = "red", high = "navyblue") +
+  labs(x = NULL,
+       y = NULL,
+       color = NULL,
+       fill = NULL,
+       title = "Legislative discontent in the Council",
+       subtitle = "Weighted proportion of government votes in favour on contested legislation*",
+       caption = "* Only legislation with at least one vote not in favour; abstentions (x1) and votes against (x2) are subtracted from votes in favour")
+
+# interactive plot
+girafe(ggobj = iplot_votes_prop,
+       fonts = list(sans = "Arial"),
+       width_svg = 12,
+       height_svg = 8,
+       options = list(opts_sizing(rescale = TRUE),
+                      opts_toolbar(saveaspng = FALSE),
+                      opts_tooltip(css = "background-color:gray;color:white;font-style:italic;padding:9px;border-radius:5px;font-size:15px;",
+                                   use_fill = TRUE),
+                      opts_hover_inv(css = "opacity:0.1;"),
+                      opts_hover(css = "fill:green;"))
+)
+
+

The country comparison reveals substantial variation in the frequency +of disagreement. The only Member State to ever exit the EU, the United +Kingdom, was particularly active when it comes to abstaining or voting +against legislation. On the other end of the scale is France, which has +been happy to support almost every law or Council position put in front +of it. We are unable to tell from this simple comparison whether a +supportive voting record reflects satisfaction with the negotiated +substance or governments’ overall stance on European integration (or +both).

+

A more sophisticated way of scaling Member States’ preferences would +involve deriving their ideal points from the votes through an +item-response model.1 In our example, we assume that all votes +are equally informative and important; ideally, we would want to relax +this assumption.

+
+
+
+
    +
  1. An example application of an ideal point IRT model can +be found in this +paper.↩︎

  2. +
+
+
+ + + +
+ + + + +
+ + + + + + + + diff --git a/docs/articles/council_files/d3-bundle-5.16.0/d3-bundle.min.js b/docs/articles/council_files/d3-bundle-5.16.0/d3-bundle.min.js new file mode 100644 index 0000000..4ebf9df --- /dev/null +++ b/docs/articles/council_files/d3-bundle-5.16.0/d3-bundle.min.js @@ -0,0 +1,26 @@ +// https://d3js.org/d3-selection/ v1.4.2 Copyright 2020 Mike Bostock +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t=t||self).d3=t.d3||{})}(this,function(t){"use strict";var n="http://www.w3.org/1999/xhtml",e={svg:"http://www.w3.org/2000/svg",xhtml:n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function r(t){var n=t+="",r=n.indexOf(":");return r>=0&&"xmlns"!==(n=t.slice(0,r))&&(t=t.slice(r+1)),e.hasOwnProperty(n)?{space:e[n],local:t}:t}function i(t){var e=r(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===n&&e.documentElement.namespaceURI===n?e.createElement(t):e.createElementNS(r,t)}})(e)}function o(){}function u(t){return null==t?o:function(){return this.querySelector(t)}}function c(){return[]}function s(t){return null==t?c:function(){return this.querySelectorAll(t)}}function a(t){return function(){return this.matches(t)}}function l(t){return new Array(t.length)}function f(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}f.prototype={constructor:f,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var h="$";function p(t,n,e,r,i,o){for(var u,c=0,s=n.length,a=o.length;cn?1:t>=n?0:NaN}function d(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function y(t,n){return t.style.getPropertyValue(n)||d(t).getComputedStyle(t,null).getPropertyValue(n)}function m(t){return t.trim().split(/^|\s+/)}function g(t){return t.classList||new w(t)}function w(t){this._node=t,this._names=m(t.getAttribute("class")||"")}function A(t,n){for(var e=g(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var B={};(t.event=null,"undefined"!=typeof document)&&("onmouseenter"in document.documentElement||(B={mouseenter:"mouseover",mouseleave:"mouseout"}));function q(t,n,e){return t=D(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function D(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function M(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=S&&(S=x+1);!(A=g[S])&&++S=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=v);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):y(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=m(t+"");if(arguments.length<2){for(var r=g(this.node()),i=-1,o=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),u=o.length;if(!(arguments.length<2)){for(c=n?O:M,null==e&&(e=!1),r=0;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?m(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?m(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=h.exec(t))?new M(e[1],e[2],e[3],1):(e=l.exec(t))?new M(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=u.exec(t))?m(e[1],e[2],e[3],e[4]):(e=c.exec(t))?m(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=g.exec(t))?R(e[1],e[2]/100,e[3]/100,1):(e=f.exec(t))?R(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?w(d[t]):"transparent"===t?new M(NaN,NaN,NaN,0):null}function w(t){return new M(t>>16&255,t>>8&255,255&t,1)}function m(t,e,n,i){return i<=0&&(t=e=n=NaN),new M(t,e,n,i)}function N(t){return t instanceof i||(t=y(t)),t?new M((t=t.rgb()).r,t.g,t.b,t.opacity):new M}function k(t,e,n,i){return 1===arguments.length?N(t):new M(t,e,n,null==i?1:i)}function M(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function v(){return"#"+q(this.r)+q(this.g)+q(this.b)}function x(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function q(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function R(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new H(t,e,n,i)}function E(t){if(t instanceof H)return new H(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=y(t)),!t)return new H;if(t instanceof H)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,a=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,h=s-a,l=(s+a)/2;return h?(o=e===s?(n-r)/h+6*(n0&&l<1?0:o,new H(o,h,l,t.opacity)}function $(t,e,n,i){return 1===arguments.length?E(t):new H(t,e,n,null==i?1:i)}function H(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function j(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}e(i,y,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:p,formatHex:p,formatHsl:function(){return E(this).formatHsl()},formatRgb:b,toString:b}),e(M,k,n(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new M(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new M(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:v,formatHex:v,formatRgb:x,toString:x})),e(H,$,n(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new H(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new H(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new M(j(t>=240?t-240:t+120,r,i),j(t,r,i),j(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var O=Math.PI/180,P=180/Math.PI,I=.96422,S=1,_=.82521,z=4/29,C=6/29,L=3*C*C,A=C*C*C;function B(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof V)return W(t);t instanceof M||(t=N(t));var e,n,i=Q(t.r),r=Q(t.g),a=Q(t.b),s=G((.2225045*i+.7168786*r+.0606169*a)/S);return i===r&&r===a?e=n=s:(e=G((.4360747*i+.3850649*r+.1430804*a)/I),n=G((.0139322*i+.0971045*r+.7141733*a)/_)),new F(116*s-16,500*(e-s),200*(s-n),t.opacity)}function D(t,e,n,i){return 1===arguments.length?B(t):new F(t,e,n,null==i?1:i)}function F(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}function G(t){return t>A?Math.pow(t,1/3):t/L+z}function J(t){return t>C?t*t*t:L*(t-z)}function K(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Q(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function T(t){if(t instanceof V)return new V(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=B(t)),0===t.a&&0===t.b)return new V(NaN,0=0&&(t=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:t}})}function i(n,e){for(var t,r=0,o=n.length;r0)for(var t,r,o=new Array(t),i=0;i=1?(e=1,n-1):Math.floor(e*n),o=t[a],u=t[a+1],i=a>0?t[a-1]:2*o-u,l=a180||r<-180?r-360*Math.round(r/360):r):o(isNaN(t)?n:t)}function l(t){return 1==(t=+t)?c:function(n,r){return r-n?function(t,n,r){return t=Math.pow(t,r),n=Math.pow(n,r)-t,r=1/r,function(e){return Math.pow(t+e*n,r)}}(n,r,t):o(isNaN(n)?r:n)}}function c(t,n){var r=n-t;return r?u(t,r):o(isNaN(t)?n:t)}var f=function t(r){var e=l(r);function a(t,r){var a=e((t=n.rgb(t)).r,(r=n.rgb(r)).r),o=e(t.g,r.g),u=e(t.b,r.b),i=c(t.opacity,r.opacity);return function(n){return t.r=a(n),t.g=o(n),t.b=u(n),t.opacity=i(n),t+""}}return a.gamma=t,a}(1);function s(t){return function(r){var e,a,o=r.length,u=new Array(o),i=new Array(o),l=new Array(o);for(e=0;eo&&(a=n.slice(o,a),i[u]?i[u]+=a:i[++u]=a),(r=r[0])===(e=e[0])?i[u]?i[u]+=e:i[++u]=e:(i[++u]=null,l.push({i:u,x:m(r,e)})),o=x.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:r.push(a(r)+"rotate(",null,e)-2,x:m(t,n)})):n&&r.push(a(r)+"rotate("+n+e)}(o.rotate,u.rotate,i,l),function(t,n,r,o){t!==n?o.push({i:r.push(a(r)+"skewX(",null,e)-2,x:m(t,n)}):n&&r.push(a(r)+"skewX("+n+e)}(o.skewX,u.skewX,i,l),function(t,n,r,e,o,u){if(t!==r||n!==e){var i=o.push(a(o)+"scale(",null,",",null,")");u.push({i:i-4,x:m(t,r)},{i:i-2,x:m(n,e)})}else 1===r&&1===e||o.push(a(o)+"scale("+r+","+e+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,i,l),o=u=null,function(t){for(var n,r=-1,e=l.length;++r=0&&e._call.call(null,t),e=e._next;--o}function h(){c=(l=a.now())+f,o=i=0;try{d()}finally{o=0,function(){var t,o,i=n,r=1/0;for(;i;)i._call?(r>i._time&&(r=i._time),t=i,i=i._next):(o=i._next,i._next=null,i=t?t._next=o:n=o);e=t,v(r)}(),c=0}}function y(){var t=a.now(),n=t-l;n>u&&(f-=n,l=t)}function v(t){o||(i&&(i=clearTimeout(i)),t-c>24?(t<1/0&&(i=setTimeout(h,t-a.now()-f)),r&&(r=clearInterval(r))):(r||(l=a.now(),r=setInterval(y,u)),o=1,s(h)))}p.prototype=w.prototype={constructor:p,restart:function(t,o,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?_():+i)+(null==o?0:+o),this._next||e===this||(e?e._next=this:n=this,e=this),this._call=t,this._time=i,v()},stop:function(){this._call&&(this._call=null,this._time=1/0,v())}},t.interval=function(t,n,e){var o=new p,i=n;return null==n?(o.restart(t,n,e),o):(n=+n,e=null==e?_():+e,o.restart(function r(u){u+=i,o.restart(r,i+=n,e),t(u)},n,e),o)},t.now=_,t.timeout=function(t,n,e){var o=new p;return n=null==n?0:+n,o.restart(function(e){o.stop(),t(e+n)},n,e),o},t.timer=w,t.timerFlush=d,Object.defineProperty(t,"__esModule",{value:!0})}); + +// https://d3js.org/d3-transition/ v1.3.2 Copyright 2019 Mike Bostock +!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-selection"),require("d3-dispatch"),require("d3-timer"),require("d3-interpolate"),require("d3-color"),require("d3-ease")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-dispatch","d3-timer","d3-interpolate","d3-color","d3-ease"],n):n((t=t||self).d3=t.d3||{},t.d3,t.d3,t.d3,t.d3,t.d3,t.d3)}(this,function(t,n,e,r,i,o,u){"use strict";var a=e.dispatch("start","end","cancel","interrupt"),s=[],l=0,f=1,c=2,h=3,d=4,_=5,v=6;function p(t,n,e,i,o,u){var p=t.__transition;if(p){if(e in p)return}else t.__transition={};!function(t,n,e){var i,o=t.__transition;function u(l){var _,p,y,m;if(e.state!==f)return s();for(_ in o)if((m=o[_]).name===e.name){if(m.state===h)return r.timeout(u);m.state===d?(m.state=v,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete o[_]):+_l)throw new Error("too late; already scheduled");return e}function m(t,n){var e=w(t,n);if(e.state>h)throw new Error("too late; already running");return e}function w(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function g(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>c&&e.state<_,e.state=v,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}}function b(t,n,e){var r=t._id;return t.each(function(){var t=m(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return w(t,r).value[n]}}function x(t,n){var e;return("number"==typeof n?i.interpolateNumber:n instanceof o.color?i.interpolateRgb:(e=o.color(n))?(n=e,i.interpolateRgb):i.interpolateString)(t,n)}var A=n.selection.prototype.constructor;function E(t){return function(){this.style.removeProperty(t)}}var T=0;function N(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function S(t){return n.selection().transition(t)}function q(){return++T}var C=n.selection.prototype;N.prototype=S.prototype={constructor:N,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=n.selector(t));for(var i=this._groups,o=i.length,u=new Array(o),a=0;a=0&&(t=t.slice(0,n)),!t||"start"===t})}(n)?y:m;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}(e,t,n))},attr:function(t,e){var r=n.namespace(t),o="transform"===r?i.interpolateTransformSvg:x;return this.attrTween(t,"function"==typeof e?(r.local?function(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttributeNS(t.space,t.local))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttribute(t))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttribute(t)}})(r,o,b(this,"attr."+t,e)):null==e?(r.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(r):(r.local?function(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttributeNS(t.space,t.local);return u===o?null:u===r?i:i=n(r=u,e)}}:function(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttribute(t);return u===o?null:u===r?i:i=n(r=u,e)}})(r,o,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=n.namespace(t);return this.tween(r,(i.local?function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}(t,i)),e}return i._value=n,i}:function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}(t,i)),e}return i._value=n,i})(i,e))},style:function(t,e,r){var o="transform"==(t+="")?i.interpolateTransformCss:x;return null==e?this.styleTween(t,function(t,e){var r,i,o;return function(){var u=n.style(this,t),a=(this.style.removeProperty(t),n.style(this,t));return u===a?null:u===r&&a===i?o:o=e(r=u,i=a)}}(t,o)).on("end.style."+t,E(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,o,u;return function(){var a=n.style(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=n.style(this,t)),a===l?null:a===i&&l===o?u:(o=l,u=e(i=a,s))}}(t,o,b(this,"style."+t,e))).each(function(t,n){var e,r,i,o,u="style."+n,a="end."+u;return function(){var s=m(this,t),l=s.on,f=null==s.value[u]?o||(o=E(n)):void 0;l===e&&i===f||(r=(e=l).copy()).on(a,i=f),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,o,u=r+"";return function(){var a=n.style(this,t);return a===u?null:a===i?o:o=e(i=a,r)}}(t,o,e),r).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(b(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=w(this.node(),e).tween,o=0,u=i.length;of&&e.name===n)return new N([[t]],O,n,+r);return null},t.interrupt=g,t.transition=S,Object.defineProperty(t,"__esModule",{value:!0})}); + +// https://d3js.org/d3-drag/ v1.2.5 Copyright 2019 Mike Bostock +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("d3-dispatch"),require("d3-selection")):"function"==typeof define&&define.amd?define(["exports","d3-dispatch","d3-selection"],e):e((t=t||self).d3=t.d3||{},t.d3,t.d3)}(this,function(t,e,n){"use strict";function o(){n.event.stopImmediatePropagation()}function i(){n.event.preventDefault(),n.event.stopImmediatePropagation()}function r(t){var e=t.document.documentElement,o=n.select(t).on("dragstart.drag",i,!0);"onselectstart"in e?o.on("selectstart.drag",i,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function c(t,e){var o=t.document.documentElement,r=n.select(t).on("dragstart.drag",null);e&&(r.on("click.drag",i,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in o?r.on("selectstart.drag",null):(o.style.MozUserSelect=o.__noselect,delete o.__noselect)}function u(t){return function(){return t}}function s(t,e,n,o,i,r,c,u,s,a){this.target=t,this.type=e,this.subject=n,this.identifier=o,this.active=i,this.x=r,this.y=c,this.dx=u,this.dy=s,this._=a}function a(){return!n.event.ctrlKey&&!n.event.button}function l(){return this.parentNode}function d(t){return null==t?{x:n.event.x,y:n.event.y}:t}function f(){return navigator.maxTouchPoints||"ontouchstart"in this}s.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t},t.drag=function(){var t,h,v,p,g=a,m=l,y=d,b=f,_={},w=e.dispatch("start","drag","end"),x=0,T=0;function j(t){t.on("mousedown.drag",k).filter(b).on("touchstart.drag",P).on("touchmove.drag",q).on("touchend.drag touchcancel.drag",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function k(){if(!p&&g.apply(this,arguments)){var e=D("mouse",m.apply(this,arguments),n.mouse,this,arguments);e&&(n.select(n.event.view).on("mousemove.drag",E,!0).on("mouseup.drag",M,!0),r(n.event.view),o(),v=!1,t=n.event.clientX,h=n.event.clientY,e("start"))}}function E(){if(i(),!v){var e=n.event.clientX-t,o=n.event.clientY-h;v=e*e+o*o>T}_.mouse("drag")}function M(){n.select(n.event.view).on("mousemove.drag mouseup.drag",null),c(n.event.view,v),i(),_.mouse("end")}function P(){if(g.apply(this,arguments)){var t,e,i=n.event.changedTouches,r=m.apply(this,arguments),c=i.length;for(t=0;to?(o+i)/2:Math.min(0,o)||Math.max(0,i),r>u?(u+r)/2:Math.min(0,u)||Math.max(0,r))}a.prototype=h.prototype,t.zoom=function(){var t,a,_=m,g=p,x=z,k=d,w=y,M=[0,1/0],T=[[-1/0,-1/0],[1/0,1/0]],b=250,Y=o.interpolateZoom,X=n.dispatch("start","zoom","end"),q=500,E=150,V=0;function B(t){t.property("__zoom",v).on("wheel.zoom",K).on("mousedown.zoom",A).on("dblclick.zoom",H).filter(w).on("touchstart.zoom",N).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",W).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function D(t,n){return(n=Math.max(M[0],Math.min(M[1],n)))===t.k?t:new h(n,t.x,t.y)}function P(t,n,e){var o=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return o===t.x&&i===t.y?t:new h(t.k,o,i)}function I(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function S(t,n,e){t.on("start.zoom",function(){j(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){j(this,arguments).end()}).tween("zoom",function(){var t=this,o=arguments,i=j(t,o),u=g.apply(t,o),r=null==e?I(u):"function"==typeof e?e.apply(t,o):e,s=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),c=t.__zoom,a="function"==typeof n?n.apply(t,o):n,f=Y(c.invert(r).concat(s/c.k),a.invert(r).concat(s/a.k));return function(t){if(1===t)t=a;else{var n=f(t),e=s/n[2];t=new h(e,r[0]-n[0]*e,r[1]-n[1]*e)}i.zoom(null,t)}})}function j(t,n,e){return!e&&t.__zooming||new G(t,n)}function G(t,n){this.that=t,this.args=n,this.active=0,this.extent=g.apply(t,n),this.taps=0}function K(){if(_.apply(this,arguments)){var t=j(this,arguments),n=this.__zoom,e=Math.max(M[0],Math.min(M[1],n.k*Math.pow(2,k.apply(this,arguments)))),o=i.mouse(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=n.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(n.k===e)return;t.mouse=[o,n.invert(o)],u.interrupt(this),t.start()}l(),t.wheel=setTimeout(function(){t.wheel=null,t.end()},E),t.zoom("mouse",x(P(D(n,e),t.mouse[0],t.mouse[1]),t.extent,T))}}function A(){if(!a&&_.apply(this,arguments)){var t=j(this,arguments,!0),n=i.select(i.event.view).on("mousemove.zoom",function(){if(l(),!t.moved){var n=i.event.clientX-r,e=i.event.clientY-s;t.moved=n*n+e*e>V}t.zoom("mouse",x(P(t.that.__zoom,t.mouse[0]=i.mouse(t.that),t.mouse[1]),t.extent,T))},!0).on("mouseup.zoom",function(){n.on("mousemove.zoom mouseup.zoom",null),e.dragEnable(i.event.view,t.moved),l(),t.end()},!0),o=i.mouse(this),r=i.event.clientX,s=i.event.clientY;e.dragDisable(i.event.view),f(),t.mouse=[o,this.__zoom.invert(o)],u.interrupt(this),t.start()}}function H(){if(_.apply(this,arguments)){var t=this.__zoom,n=i.mouse(this),e=t.invert(n),o=t.k*(i.event.shiftKey?.5:2),u=x(P(D(t,o),n,e),g.apply(this,arguments),T);l(),b>0?i.select(this).transition().duration(b).call(S,u,n):i.select(this).call(B.transform,u)}}function N(){if(_.apply(this,arguments)){var n,e,o,r,s=i.event.touches,h=s.length,c=j(this,arguments,i.event.changedTouches.length===h);for(f(),e=0;e-1&&(i[n]=r),t},t.targetArea=function(r){return arguments.length?(n=r,t):n},t}var a=e(function(t){function n(t,n,e){var o=t*n,a=r*t,s=a-t,i=a-s,u=t-i,l=r*n,f=l-n,c=l-f,h=n-c,v=o-i*c,d=v-u*c,p=d-i*h,g=u*h-p;return e?(e[0]=g,e[1]=o,e):[g,o]}t.exports=n;var r=+(Math.pow(2,27)+1)}),s=e(function(t){function n(t,n){var r=t+n,e=r-t,o=r-e,a=n-e,s=t-o,i=s+a;return i?[i,r]:[r]}function r(t,r){var e=0|t.length,o=0|r.length;if(1===e&&1===o)return n(t[0],r[0]);var a,s,i=e+o,u=new Array(i),l=0,f=0,c=0,h=Math.abs,v=t[f],d=h(v),p=r[c],g=h(p);d=o?(a=v,f+=1,f=o?(a=v,f+=1,f>1;return["sum(",o(t.slice(0,n)),",",o(t.slice(n)),")"].join("")}function i(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var r=[],a=0;a0){if(a<=0)return s;e=o+a}else{if(!(o<0))return s;if(a>=0)return s;e=-(o+a)}var i=b*e;return s>=i||s<=-i?s:y(t,n,r)},function(t,n,r,e){var o=t[0]-e[0],a=n[0]-e[0],s=r[0]-e[0],i=t[1]-e[1],u=n[1]-e[1],l=r[1]-e[1],f=t[2]-e[2],c=n[2]-e[2],h=r[2]-e[2],v=a*l,d=s*u,p=s*i,g=o*l,_=o*u,m=a*i,b=f*(v-d)+c*(p-g)+h*(_-m),y=(Math.abs(v)+Math.abs(d))*Math.abs(f)+(Math.abs(p)+Math.abs(g))*Math.abs(c)+(Math.abs(_)+Math.abs(m))*Math.abs(h),x=M*y;return b>x||-b>x?b:w(t,n,r,e)}];h()}),c=e(function(t){function n(t,n){for(var e=n[0],o=n[1],a=t.length,s=1,i=a,u=0,l=a-1;u0;){var b=(l+a-1)%a,M=t[b];if(M[1]!==o)break;var y=M[0];_=Math.min(_,y),m=Math.max(m,y),l=b}if(0===l)return _<=e&&e<=m?0:1;i=l+1}for(var w=t[(l+a-1)%a][1];u+1>1,h=this.values[e];if(h<=s)break;this.ids[i]=this.ids[e],this.values[i]=h,i=e}this.ids[i]=t,this.values[i]=s}pop(){if(0!==this.length){var t=this.ids[0];if(this.length--,0>1;let e=0;for(;e=h)break;this.ids[e]=s,this.values[e]=i,e=t}this.ids[e]=s,this.values[e]=h}return t}}peek(){if(0!==this.length)return this.ids[0]}peekValue(){if(0!==this.length)return this.values[0]}shrink(){this.ids.length=this.values.length=this.length}}const l=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];function f(t,s,i){return t>1;s[h]>t?e=h:i=1+h}return s[i]}function m(t,s,i,e,h){var r=t[e],t=(t[e]=t[h],t[h]=r,4*e),r=4*h,n=s[t],o=s[1+t],a=s[2+t],l=s[3+t],t=(s[t]=s[r],s[1+t]=s[1+r],s[2+t]=s[2+r],s[3+t]=s[3+r],s[r]=n,s[1+r]=o,s[2+r]=a,s[3+r]=l,i[e]);i[e]=i[h],i[h]=t}return class h{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var[s,i]=new Uint8Array(t,0,2);if(251!==s)throw new Error("Data does not appear to be in a Flatbush format.");if(i>>4!=3)throw new Error(`Got v${i>>4} data when expected v3.`);var[s]=new Uint16Array(t,2,1),[e]=new Uint32Array(t,4,1);return new h(e,s,l[15&i],t)}constructor(t,s=16,i=Float64Array,e){if(void 0===t)throw new Error("Missing required argument: numItems.");if(isNaN(t)||t<=0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+s,2),65535);let h=t,r=h;for(this._levelBounds=[4*h];h=Math.ceil(h/this.nodeSize),r+=h,this._levelBounds.push(4*r),1!==h;);this.ArrayType=i||Float64Array,this.IndexArrayType=r<16384?Uint16Array:Uint32Array;var n=l.indexOf(this.ArrayType),o=4*r*this.ArrayType.BYTES_PER_ELEMENT;if(n<0)throw new Error(`Unexpected typed array class: ${i}.`);e&&e instanceof ArrayBuffer?(this.data=e,this._boxes=new this.ArrayType(this.data,8,4*r),this._indices=new this.IndexArrayType(this.data,8+o,r),this._pos=4*r,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1]):(this.data=new ArrayBuffer(8+o+r*this.IndexArrayType.BYTES_PER_ELEMENT),this._boxes=new this.ArrayType(this.data,8,4*r),this._indices=new this.IndexArrayType(this.data,8+o,r),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(this.data,0,2).set([251,48+n]),new Uint16Array(this.data,2,1)[0]=s,new Uint32Array(this.data,4,1)[0]=t),this._queue=new a}add(t,s,i,e){var h=this._pos>>2;return this._indices[h]=h,this._boxes[this._pos++]=t,this._boxes[this._pos++]=s,this._boxes[this._pos++]=i,this._boxes[this._pos++]=e,tthis.maxX&&(this.maxX=i),e>this.maxY&&(this.maxY=e),h}finish(){if(this._pos>>2!==this.numItems)throw new Error(`Added ${this._pos>>2} items when expected ${this.numItems}.`);if(this.numItems<=this.nodeSize)this._boxes[this._pos++]=this.minX,this._boxes[this._pos++]=this.minY,this._boxes[this._pos++]=this.maxX,this._boxes[this._pos++]=this.maxY;else{var s,i,e,h,r,n,o=this.maxX-this.minX||1,a=this.maxY-this.minY||1;const p=new Uint32Array(this.numItems);for(let t=0;t>1,r=(s=65535^(d|u))>>1^l&(i=d&(65535^u))>>1^s,n=_&s>>1^i>>1^i,l=h=_>>1^_,e=(_=e)&_>>2^h&h>>2,r^=_&(s=r)>>2^h&n>>2,n^=h&s>>2^(_^h)&(i=n)>>2,l=h=_&h>>2^h&(_^h)>>2,e=(_=e)&_>>4^h&h>>4,r^=_&(s=r)>>4^h&n>>4,n^=h&s>>4^(_^h)&(i=n)>>4,l=h=_&h>>4^h&(_^h)>>4,r^=e&(s=r)>>8^h&n>>8,h=(l=(n^=h&s>>8^((_=e)^(l=h))&(i=n)>>8)^n>>1)|65535^((e=d^u)|(_=r^r>>1)),e=1431655765&((e=858993459&((e=252645135&((e=16711935&(e|e<<8))|e<<4))|e<<2))|e<<1),((h=1431655765&((h=858993459&((h=252645135&((h=16711935&(h|h<<8))|h<<4))|h<<2))|h<<1))<<1|e)>>>0)}!function i(e,h,r,n,o,a){if(!(Math.floor(n/a)>=Math.floor(o/a))){const l=e[n+o>>1];let t=n-1,s=o+1;for(;;){for(;t++,e[t]l;);if(t>=s)break;m(e,h,r,t,s)}i(e,h,r,n,s,a),i(e,h,r,s+1,o,a)}}(p,this._boxes,this._indices,0,this.numItems-1,this.nodeSize);for(let t=0,r=0;t>2]=x,this._boxes[this._pos++]=s,this._boxes[this._pos++]=i,this._boxes[this._pos++]=e,this._boxes[this._pos++]=h}}}search(s,i,e,h,r){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let n=this._boxes.length-4;const o=[],a=[];for(;void 0!==n;){var l,d=Math.min(n+4*this.nodeSize,x(n,this._levelBounds));for(let t=n;tthis._boxes[t+2]||i>this._boxes[t+3]||(l=0|this._indices[t>>2],n<4*this.numItems?void 0!==r&&!r(l)||a.push(l):o.push(l));n=o.pop()}return a}neighbors(s,i,t=1/0,e=1/0,h){if(this._pos!==this._boxes.length)throw new Error("Data not yet indexed - call index.finish().");let r=this._boxes.length-4;const n=this._queue,o=[];for(var a=e*e;void 0!==r;){var l=Math.min(r+4*this.nodeSize,x(r,this._levelBounds));for(let t=r;t>2],_=f(s,this._boxes[t],this._boxes[t+2]),u=f(i,this._boxes[t+1],this._boxes[t+3]),_=_*_+u*u;r<4*this.numItems?void 0!==h&&!h(d)||n.push(1+(d<<1),_):n.push(d<<1,_)}for(;n.length&&1&n.peek();){if(a>1),o.length===t)return n.clear(),o}r=n.pop()>>1}return n.clear(),o}}}); \ No newline at end of file diff --git a/docs/articles/council_files/ggiraphjs-0.4.6/ggiraphjs.min.css b/docs/articles/council_files/ggiraphjs-0.4.6/ggiraphjs.min.css new file mode 100644 index 0000000..c830bce --- /dev/null +++ b/docs/articles/council_files/ggiraphjs-0.4.6/ggiraphjs.min.css @@ -0,0 +1 @@ +.girafe,.girafe_container_std{margin-left:auto;margin-right:auto}.girafe_container_std{position:relative;text-align:center}.girafe_container_ie{height:0}.girafe_svg_ie{position:absolute;top:0;left:0}.ggiraph-toolbar{position:absolute;background-color:#fff;background-color:hsla(0,0%,100%,.3);border-radius:5px;padding:2px;opacity:0}.ggiraph-toolbar-top{text-align:center;top:3px;right:0;left:0}.ggiraph-toolbar-topleft{text-align:left;top:3px;left:3px}.ggiraph-toolbar-topright{text-align:right;top:3px;right:3px}.ggiraph-toolbar-bottom{text-align:center;bottom:3px;right:0;left:0}.ggiraph-toolbar-bottomleft{text-align:left;left:3px;bottom:3px}.ggiraph-toolbar-bottomright{text-align:right;right:3px;bottom:3px}.ggiraph-toolbar-block{display:inline-block}.ggiraph-toolbar-block:not(:last-child){margin-right:10px}.ggiraph-toolbar-icon{display:inline-block;cursor:pointer;border:0;padding:0;margin:0;width:15pt;height:15pt}.ggiraph-toolbar-icon:not(:last-child){margin-right:3px}.ggiraph-toolbar-icon svg{pointer-events:none}.ggiraph-toolbar-icon.drop{stroke:#e30c37;fill:#e30c37}.ggiraph-toolbar-icon.drop:hover{stroke:#333;fill:#333}.ggiraph-toolbar-icon.neutral{stroke:#069;fill:#069}.ggiraph-toolbar-icon.neutral:hover{stroke:#333;fill:#333}.ggiraph-svg .lasso path{stroke:#505050;stroke-width:1px}.ggiraph-svg .lasso .drawn{fill-opacity:.05}.ggiraph-svg .lasso .loop_close{fill:none;stroke-dasharray:4,4}.ggiraph-svg .lasso .origin{fill:#333;fill-opacity:.5}.ggiraph-svg .dragrect rect{stroke:#505050;stroke-width:1px;fill-opacity:.05}.ggiraph-svg .ggiraph-svg-rootg circle:not([id]),.ggiraph-svg .ggiraph-svg-rootg image:not([id]),.ggiraph-svg .ggiraph-svg-rootg line:not([id]),.ggiraph-svg .ggiraph-svg-rootg path:not([id]),.ggiraph-svg .ggiraph-svg-rootg polygon:not([id]),.ggiraph-svg .ggiraph-svg-rootg polyline:not([id]),.ggiraph-svg .ggiraph-svg-rootg rect:not([id]):not(.ggiraph-svg-bg),.ggiraph-svg .ggiraph-svg-rootg text:not([id]){pointer-events:none}.ggiraph-svg .ggiraph-svg-rootg [id]{pointer-events:all} \ No newline at end of file diff --git a/docs/articles/council_files/ggiraphjs-0.4.6/ggiraphjs.min.js b/docs/articles/council_files/ggiraphjs-0.4.6/ggiraphjs.min.js new file mode 100644 index 0000000..56f046c --- /dev/null +++ b/docs/articles/council_files/ggiraphjs-0.4.6/ggiraphjs.min.js @@ -0,0 +1 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3"),require("Flatbush")):"function"==typeof define&&define.amd?define(["d3","Flatbush"],e):"object"==typeof exports?exports.ggiraphjs=e(require("d3"),require("Flatbush")):t.ggiraphjs=e(t.d3,t.Flatbush)}(window,(function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=245)}([function(e,n){e.exports=t},function(t,e,n){var r=n(63),i=Function.prototype,o=i.bind,s=i.call,a=r&&o.bind(s,s);t.exports=r?function(t){return t&&a(t)}:function(t){return t&&function(){return s.apply(t,arguments)}}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(4),i=n(44).f,o=n(23),s=n(18),a=n(87),u=n(120),c=n(93);t.exports=function(t,e){var n,f,l,h,d,p=t.target,y=t.global,v=t.stat;if(n=y?r:v?r[p]||a(p,{}):(r[p]||{}).prototype)for(f in e){if(h=e[f],l=t.dontCallGetSet?(d=i(n,f))&&d.value:n[f],!c(y?f:p+(v?".":"#")+f,t.forced)&&void 0!==l){if(typeof h==typeof l)continue;u(h,l)}(t.sham||l&&l.sham)&&o(h,"sham",!0),s(n,f,h,t)}}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n(166))},function(t,e,n){"use strict";var r,i,o,s=n(153),a=n(8),u=n(4),c=n(7),f=n(13),l=n(10),h=n(32),d=n(35),p=n(23),y=n(18),v=n(11).f,g=n(28),m=n(69),x=n(59),b=n(6),w=n(52),S=n(22),A=S.enforce,E=S.get,O=u.Int8Array,k=O&&O.prototype,T=u.Uint8ClampedArray,I=T&&T.prototype,M=O&&m(O),_=k&&m(k),P=Object.prototype,j=u.TypeError,N=b("toStringTag"),R=w("TYPED_ARRAY_TAG"),V=s&&!!x&&"Opera"!==h(u.opera),C=!1,D={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},z={BigInt64Array:8,BigUint64Array:8},F=function(t){var e=m(t);if(f(e)){var n=E(e);return n&&l(n,"TypedArrayConstructor")?n.TypedArrayConstructor:F(e)}},B=function(t){if(!f(t))return!1;var e=h(t);return l(D,e)||l(z,e)};for(r in D)(o=(i=u[r])&&i.prototype)?A(o).TypedArrayConstructor=i:V=!1;for(r in z)(o=(i=u[r])&&i.prototype)&&(A(o).TypedArrayConstructor=i);if((!V||!c(M)||M===Function.prototype)&&(M=function(){throw j("Incorrect invocation")},V))for(r in D)u[r]&&x(u[r],M);if((!V||!_||_===P)&&(_=M.prototype,V))for(r in D)u[r]&&x(u[r].prototype,_);if(V&&m(I)!==_&&x(I,_),a&&!l(_,N))for(r in C=!0,v(_,N,{get:function(){return f(this)?this[R]:void 0}}),D)u[r]&&p(u[r],R,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:V,TYPED_ARRAY_TAG:C&&R,aTypedArray:function(t){if(B(t))return t;throw j("Target is not a typed array")},aTypedArrayConstructor:function(t){if(c(t)&&(!x||g(M,t)))return t;throw j(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n,r){if(a){if(n)for(var i in D){var o=u[i];if(o&&l(o.prototype,t))try{delete o.prototype[t]}catch(n){try{o.prototype[t]=e}catch(t){}}}_[t]&&!n||y(_,t,n?e:V&&k[t]||e,r)}},exportTypedArrayStaticMethod:function(t,e,n){var r,i;if(a){if(x){if(n)for(r in D)if((i=u[r])&&l(i,t))try{delete i[t]}catch(t){}if(M[t]&&!n)return;try{return y(M,t,n?e:V&&M[t]||e)}catch(t){}}for(r in D)!(i=u[r])||i[t]&&!n||y(i,t,e)}},getTypedArrayConstructor:F,isView:function(t){if(!f(t))return!1;var e=h(t);return"DataView"===e||l(D,e)||l(z,e)},isTypedArray:B,TypedArray:M,TypedArrayPrototype:_}},function(t,e,n){var r=n(4),i=n(38),o=n(10),s=n(52),a=n(40),u=n(112),c=i("wks"),f=r.Symbol,l=f&&f.for,h=u?f:f&&f.withoutSetter||s;t.exports=function(t){if(!o(c,t)||!a&&"string"!=typeof c[t]){var e="Symbol."+t;a&&o(f,t)?c[t]=f[t]:c[t]=u&&l?l(e):h(e)}return c[t]}},function(t,e){t.exports=function(t){return"function"==typeof t}},function(t,e,n){var r=n(2);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(63),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},function(t,e,n){var r=n(1),i=n(16),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},function(t,e,n){var r=n(8),i=n(115),o=n(114),s=n(12),a=n(53),u=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor;e.f=r?o?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=f(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=a(e),s(n),i)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw u("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(13),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(i(t)+" is not an object")}},function(t,e,n){var r=n(7),i="object"==typeof document&&document.all,o=void 0===i&&void 0!==i;t.exports=o?function(t){return"object"==typeof t?null!==t:r(t)||t===i}:function(t){return"object"==typeof t?null!==t:r(t)}},function(t,e,n){var r=n(21);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(32),i=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return i(t)}},function(t,e,n){var r=n(25),i=Object;t.exports=function(t){return i(r(t))}},function(t,e,n){var r=n(45),i=n(1),o=n(62),s=n(16),a=n(14),u=n(101),c=i([].push),f=function(t){var e=1==t,n=2==t,i=3==t,f=4==t,l=6==t,h=7==t,d=5==t||l;return function(p,y,v,g){for(var m,x,b=s(p),w=o(b),S=r(y,v),A=a(w),E=0,O=g||u,k=e?O(p,A):n||h?O(p,0):void 0;A>E;E++)if((d||E in w)&&(x=S(m=w[E],E,b),t))if(e)k[E]=x;else if(x)switch(t){case 3:return!0;case 5:return m;case 6:return E;case 2:c(k,m)}else switch(t){case 4:return!1;case 7:c(k,m)}return l?-1:i||f?f:k}};t.exports={forEach:f(0),map:f(1),filter:f(2),some:f(3),every:f(4),find:f(5),findIndex:f(6),filterReject:f(7)}},function(t,e,n){var r=n(7),i=n(11),o=n(171),s=n(87);t.exports=function(t,e,n,a){a||(a={});var u=a.enumerable,c=void 0!==a.name?a.name:e;if(r(n)&&o(n,c,a),a.global)u?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(u=!0):delete t[e]}catch(t){}u?t[e]=n:i.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},function(t,e,n){var r=n(62),i=n(25);t.exports=function(t){return r(i(t))}},function(t,e,n){var r=n(168);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},function(t,e,n){var r=n(20),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},function(t,e,n){var r,i,o,s=n(170),a=n(4),u=n(1),c=n(13),f=n(23),l=n(10),h=n(86),d=n(67),p=n(56),y=a.TypeError,v=a.WeakMap;if(s||h.state){var g=h.state||(h.state=new v),m=u(g.get),x=u(g.has),b=u(g.set);r=function(t,e){if(x(g,t))throw y("Object already initialized");return e.facade=t,b(g,t,e),e},i=function(t){return m(g,t)||{}},o=function(t){return x(g,t)}}else{var w=d("state");p[w]=!0,r=function(t,e){if(l(t,w))throw y("Object already initialized");return e.facade=t,f(t,w,e),e},i=function(t){return l(t,w)?t[w]:{}},o=function(t){return l(t,w)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!c(e)||(n=i(e)).type!==t)throw y("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){var r=n(8),i=n(11),o=n(43);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(3),i=n(8),o=n(11).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==o,sham:!i},{defineProperty:o})},function(t,e,n){var r=n(26),i=TypeError;t.exports=function(t){if(r(t))throw i("Can't call method on "+t);return t}},function(t,e){t.exports=function(t){return null==t}},function(t,e,n){var r=n(4),i=n(7),o=function(t){return i(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(1);t.exports=r({}.isPrototypeOf)},function(t,e,n){var r=n(97),i=n(18),o=n(181);r||i(Object.prototype,"toString",o,{unsafe:!0})},function(t,e,n){var r,i=n(12),o=n(113),s=n(90),a=n(56),u=n(169),c=n(88),f=n(67),l=f("IE_PROTO"),h=function(){},d=function(t){return"