diff --git a/.circleci/config.yml b/.circleci/config.yml index 14fb4e2..b6312de 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,24 +1,155 @@ -version: 2 # use CircleCI 2.0 +version: 2.1 -jobs: # a collection of steps - build: # runs not using Workflows must have a `build` job as entry point - working_directory: ~/worldmap-panel # directory where steps will run - docker: # run the steps with Docker - - image: circleci/node:latest - steps: - - checkout - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-{{ checksum "yarn.lock" }} - - run: - name: Install Dependencies - command: yarn install --frozen-lockfile - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-{{ checksum "yarn.lock" }} - paths: - - ~/.cache/yarn - - run: # run tests - name: test - command: yarn test +parameters: + ssh-fingerprint: + type: string + default: ${GITHUB_SSH_FINGERPRINT} + +aliases: + # Workflow filters + - &filter-only-master + branches: + only: master + - &filter-only-release + branches: + only: /^v[1-9]*[0-9]+\.[1-9]*[0-9]+\.x$/ + +workflows: + plugin_workflow: + jobs: + - build + - report: + requires: + - build + - approve_release: + type: approval + requires: + - report + filters: *filter-only-release + - publish_github_release: + requires: + - approve_release + filters: *filter-only-release + +executors: + default_exec: # declares a reusable executor + docker: + - image: srclosson/grafana-plugin-ci-alpine:latest + e2e_exec: + docker: + - image: srclosson/grafana-plugin-ci-e2e:latest + +jobs: + build: + executor: default_exec + steps: + - checkout + - restore_cache: + name: restore node_modules + keys: + - build-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "yarn.lock" }} + - run: + name: Install dependencies + command: | + mkdir ci + [ -f ~/project/node_modules/.bin/grafana-toolkit ] || yarn install --frozen-lockfile + - save_cache: + name: save node_modules + paths: + - ~/project/node_modules + key: build-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "yarn.lock" }} + - save_cache: + name: save cypress cache + paths: + - ~/.cache/Cypress + key: cypress-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "yarn.lock" }} + - run: + name: Build and test panel + command: | + sed -e "s/%VERSION%/$(cat package.json | jq .version | tr -d '\"')/" -e "s/%TODAY%/$(date)/" ./src/plugin.json.tmpl > ./src/plugin.json + yarn build + - run: + name: Move results to ci folder + command: | + # Update the plugin.json with up to date info + mkdir -pv ci/job/build_plugin + mkdir -pv ci/packages + mkdir -pv ci/jobs/package + mkdir -pv ci/grafana-test-env + cp -rv dist ci/job/build_plugin + - run: + name: Package distribution + command: | + ./node_modules/.bin/grafana-toolkit plugin:ci-package + - persist_to_workspace: + root: . + paths: + - ci/jobs/package + - ci/packages + - ci/dist + - ci/grafana-test-env + - store_artifacts: + path: ci + + report: + executor: default_exec + steps: + - checkout + - attach_workspace: + at: . + - restore_cache: + name: restore node_modules + keys: + - build-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "yarn.lock" }} + - run: + name: Toolkit report + command: | + ./node_modules/.bin/grafana-toolkit plugin:ci-report + - store_artifacts: + path: ci + + publish_github_release: + executor: default_exec + steps: + - checkout + - add_ssh_keys: + fingerprints: + - "${GITHUB_SSH_FINGERPRINT}" + - attach_workspace: + at: . + - restore_cache: + name: restore node_modules + keys: + - build-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "yarn.lock" }} + - run: + name: "Publish Release on GitHub" + command: | + wget "https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz" + tar zxvf "./ghr_v0.13.0_linux_amd64.tar.gz" -C /usr/local + /bin/rm -rf "./ghr_v0.13.0_linux_amd64.tar.gz" + mkdir -pv dist + mkdir -pv artifacts + cp -r ci/dist/grafana-worldmap-panel/* dist/ + cp -r ci/packages/* artifacts/ + DATASOURCE_NAME=grafana-worldmap-panel + RELEASE_NOTES=`awk 'BEGIN {FS="##"; RS=""} FNR==4 {print; exit}' CHANGELOG.md` + VERSION=`cat ci/dist/plugin.json|jq '.info.version'| sed s/\"//g` + git config user.email "eng@grafana.com" + git config user.name "CircleCI Automation" + git checkout -b release-${VERSION} + git add --force dist/ + git add --force artifacts/ + git commit -m "automated release $VERSION [skip ci]" + git push -f origin release-${VERSION} + git tag -f v${VERSION} + git push -f origin v${VERSION} + /usr/local/ghr_v0.13.0_linux_amd64/ghr \ + -t ${GITHUB_TOKEN} \ + -u ${CIRCLE_PROJECT_USERNAME} \ + -r ${CIRCLE_PROJECT_REPONAME} \ + -c ${CIRCLE_SHA1} \ + -n "${DATASOURCE_NAME} v${VERSION}" \ + -b "${RELEASE_NOTES}" \ + -delete \ + v${VERSION} \ + ./artifacts diff --git a/.gitignore b/.gitignore index 5f2e26b..d5a2735 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,12 @@ node_modules npm-debug.log .DS_Store .vscode +.idea + +dist/ +coverage/ +artifacts/ + +.venv* +bin/ +build/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a87a15..32f5e3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,63 @@ # Changelog +## Entries + +## v1.1.1 + +- Allow the key to be an array in the location data. For example: +```json +[ + { + "key": "US", + "latitude": 37.09024, + "longitude": -95.712891, + "name": "United States" + }, + { + "key": [ + "US.CA","US-CA","US_California" + ], + "latitude": 36.17, + "longitude": -119.7462, + "name": "California" + }, + { + "key": [ + "US.IA","US-IA","US_Iowa" + ], + "latitude": 42.0046, + "longitude": -93.214, + "name": "Iowa" + }, + { + "key": "Unknown", + "latitude": 66, + "longitude": 66, + "name": "Unknown" + } +] +``` +- Support hierarchical keys with segments delimited by '.-_'. The longest match at a segment boundary wins. For example, with the location data above, a key of "US.CA.PaloAlto" will be matching "US.CA". "US-Unknown" will match "US". +- If the location data has an entry with key="unknown", this entry will be returned for any un-matched input data. +- Added a built-in location data file "world_regions", with 2 letter country code and provinces in China and states in the US. +- Made circle area (instead of radius) to be linear in data value. +- Added 'kMGTP' unit to the data value + +## v1.0.1 + +- Release for Grafana 7.0 with plugin signing + +## v0.2.1 + +- Fixes error handling that made everything disappear in edit mode, [#213](https://github.com/grafana/worldmap-panel/issues/213) +- Fixes partial (not full height) map on first render [#212](https://github.com/grafana/worldmap-panel/issues/212) + +## v0.2.0 + +- Convert to TypeScript, webpack and Jest +- Use Yarn on CircleCI +- Add missing dev dependencies +- Tweak for incorrect height on render + which occurs more frequently in Grafana 6.0 ## v0.1.2 @@ -13,7 +72,7 @@ ## v0.1.0 - Configuration option for turning mouse wheel zoom on or off. [#140](https://github.com/grafana/worldmap-panel/issues/140) Thanks [@Perlovka](https://github.com/Perlovka) -- Upgrade to Leaflet JS [#132](https://github.com/grafana/worldmap-panel/pull/132) Thanks [@cbarbier](https://github.com/cbarbier) +- Upgrade to Leaflet JS [#132](https://github.com/grafana/worldmap-panel/pull/132) Thanks [@cbarbier](https://github.com/cbarbier) ## v0.0.21 diff --git a/README.md b/README.md index 8a0a44a..1cd8b8c 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,8 @@ Time Series data contains a timestamp, a metric name and a numeric value. In oth ```json [ {"target": "SE", "datapoints": [[183255.0, 1529755200]]}, - {"target": "US", "datapoints": [[192224.0, 1529755200]]} + {"target": "US", "datapoints": [[192224.0, 1529755200]]}, + {"target": "US.CA.PaloAlto", "datapoints": [[3922.0, 1529755200]]} ] ``` @@ -46,11 +47,37 @@ Location data should be in the JSON format and should be an array of JSON object "latitude": 37.09024, "longitude": -95.712891, "name": "United States" + }, + { + "key": [ + "US.CA", + "US-CA", + "US_California" + ], + "latitude": 36.17, + "longitude": -119.7462, + "name": "California" + }, + { + "key": [ + "US.IA", + "US-IA", + "US_Iowa" + ], + "latitude": 42.0046, + "longitude": -93.214, + "name": "Iowa" + }, + { + "key": "Unknown", + "latitude": 66, + "longitude": 66, + "name": "Unknown" } ] ``` -The Worldmap will then match the metric name (target in the example data) with a key field from the location data. With this example data there will be two circles drawn on the map, one for Sweden and one for the United States with values 183255 and 192224. +The Worldmap will then match the metric name (target in the example data) with a key field from the location data. With this example data there will be three circles drawn on the map, one for Sweden, one for the United States and one for California with values 183255, 192224 and 3922. ### Table Format @@ -218,8 +245,9 @@ There are four ways to provide data for the worldmap panel: - *countries*: This is a list of all the countries in the world. It works by matching a country code (US, FR, AU) to a node alias in a time series query. - *states*: Similar to countries but for the states in USA e.g. CA for California + - *world_regions*: On top of countries, added states in USA and provinces in China with hierarchical keys e.g. US.CA for California, CN.GD for Guangdong. - *geohash*: An ElasticSearch query that returns geohashes. - - *json*: A json endpoint that returns custom json. Examples of the format are the [countries data used in first option](https://github.com/grafana/worldmap-panel/blob/master/src/data/countries.json) or [this list of cities](https://github.com/grafana/worldmap-panel/blob/master/src/data/probes.json). + - *json*: A json endpoint that returns custom json. Examples of the format are the [countries data used in first option](https://github.com/mileweb/worldmap-panel/blob/master/src/data/countries.json) or [this list of world_regions](https://github.com/mileweb/worldmap-panel/blob/master/src/data/world_regions.json). - *jsonp*: A jsonp endpoint that returns custom json wrapped as jsonp. Use this if you are having problems with CORS. - *table*: This expects the metric query to return data points with a field named geohash or two fields/columns named `latitude` and `longitude`. This field should contain a string in the [geohash form](https://www.elastic.co/guide/en/elasticsearch/guide/current/geohashes.html). For example: London -> "gcpvh3zgu992". @@ -279,4 +307,4 @@ The threshold field also accepts 2 or more comma-separated values. For example, ### CHANGELOG -The latest changes can be found here: [CHANGELOG.md](https://github.com/grafana/worldmap-panel/blob/master/CHANGELOG.md) +The latest changes can be found here: [CHANGELOG.md](https://github.com/mileweb/worldmap-panel/blob/master/CHANGELOG.md) diff --git a/dist/CHANGELOG.md b/dist/CHANGELOG.md deleted file mode 100644 index 8a87a15..0000000 --- a/dist/CHANGELOG.md +++ /dev/null @@ -1,110 +0,0 @@ -# Changelog - -## v0.1.2 - -- Map centering ignores configured location [#149](https://github.com/grafana/worldmap-panel/issues/149) Thanks [@clompsy](https://github.com/clompsy) - -## v0.1.1 - -- New mapping option for table data that contains latitude and longitude columns. [#144](https://github.com/grafana/worldmap-panel/pull/144) Thanks [@kylios](https://github.com/kylios) -- More mapping options for table data for datasources that cannot alias/rename the columns to the names that the Worldmap panel expects (e.g. `metric` for the metric column) -- Readme update - -## v0.1.0 - -- Configuration option for turning mouse wheel zoom on or off. [#140](https://github.com/grafana/worldmap-panel/issues/140) Thanks [@Perlovka](https://github.com/Perlovka) -- Upgrade to Leaflet JS [#132](https://github.com/grafana/worldmap-panel/pull/132) Thanks [@cbarbier](https://github.com/cbarbier) - -## v0.0.21 - -- Support for new data source integration, the Dynamic JSON endpoint [#103](https://github.com/grafana/worldmap-panel/issues/103), thanks [@LostInBrittany](https://github.com/LostInBrittany) -- Fix for using floats in thresholds [#79](https://github.com/grafana/worldmap-panel/issues/79), thanks [@fabienpomerol](https://github.com/fabienpomerol) -- Fix for newly created Worldmap panels overflowing their boundaries. -- Fix for legend css -- Turned off mouse wheel zoom - -## v0.0.20 - -Small fixes. - -## v0.0.19 - -Fix for Elasticsearch geohash maps after breaking change in Grafana 4.5. - -## v0.0.18 - -- Fixes some coordinates in the country location data. -- Last Geohash as center for the map - it centers the map on the last geohash position received. Useful for real time tracking (with auto refresh on in Grafana). - -## v.0.0.17 - -- Adds Country data with 3-letter country codes. - -## v.0.0.16 - -- Option for sticky labels. Fix for https://github.com/grafana/worldmap-panel/issues/27 - -- Ability to hide null or 0 values. Fix for https://github.com/grafana/worldmap-panel/issues/13 - -- Background color change. Fixes https://github.com/grafana/worldmap-panel/issues/36 - -- Dynamic thresholds implemented by [Sam Hatchett](https://github.com/samhatchett). Can now have more than 2 threshold values. Thanks! Fixes https://github.com/grafana/worldmap-panel/issues/25 - -- Validation and default values for option fields. Fixes https://github.com/grafana/worldmap-panel/issues/29 - -## v.0.0.15 - -- Fix for change in Grafana that [breaks Worldmap panels using Geohash or Table Data](https://github.com/grafana/worldmap-panel/issues/45). - -## v.0.0.14 - -- Various [bug](https://github.com/grafana/worldmap-panel/pull/31) [fixes](https://github.com/grafana/worldmap-panel/pull/32) provided by [linkslice](https://github.com/linkslice) (Thank you!) - -## v.0.0.13 - -- New location data option -> table data. Location data can now come from data sources other than graphite and Elasticsearch (InfluxDb for example). See table data instructions above on how to use it. - -## v.0.0.12 - -- Fixes [issue with the JSON endpoint not working](https://github.com/grafana/worldmap-panel/issues/22) - -## v.0.0.11 - -- Zoom issue fix and adds a states options for USA states location data. - -## v.0.0.10 - -- Performance fix for snapshotting. Sets maxdatapoints to 1 to minimize data that needs to be saved in the snapshot. - -## v.0.0.9 - -- Fixes bug that meant location data did not refresh after being changed in the editor. It required the page to be refreshed to reload it. - -## v.0.0.8 - -- Saves location data in the dashboard json when snapshotting. This means snapshots should work even when using a custom endpoint for returning a location data json file. - -## v.0.0.7 - -- Updates tile map urls to https to avoid mixed content warnings on https sites. - -## v.0.0.6 - -- Adds decimal places option for data values in circle popovers. - -## v.0.0.5 - -- Adds support for json and jsonp endpoints for location data. - -## v0.0.4 - -- Fixes snapshotting. - -## v0.0.3 - -- Support for lowercase country codes for non-elasticsearch datasources. - -## v0.0.2 - -- Fixes bug where time series with a country code not found in the country data crashes the panel. -- Adds some extra country codes to the country data to be more similar to the MaxMind Country database. diff --git a/dist/LICENSE b/dist/LICENSE deleted file mode 100644 index 4644c8c..0000000 --- a/dist/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Grafana - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/dist/README.md b/dist/README.md deleted file mode 100644 index 8a0a44a..0000000 --- a/dist/README.md +++ /dev/null @@ -1,282 +0,0 @@ -# Worldmap Panel Plugin for Grafana - -The Worldmap Panel is a tile map of the world that can be overlaid with circles representing data points from a query. It can be used with time series metrics, with geohash data from Elasticsearch or data in the Table format. - -![Worldmap](https://raw.githubusercontent.com/grafana/worldmap-panel/54f83cfdc7339fee02df00933422c35630677330/src/images/worldmap-world.png) - -## How The Worldmap Works (Theory and Examples) - -The Worldmap panel needs two sources of data: - -- a location (latitude and longitude) -- data that has a link to a location - -The data comes from a database query: Prometheus, InfluxDB, Graphite, Elasticsearch, MySQL etc. It can be in the Time Series format or in the Table format. - -### Time Series Format - -If it is in the **Time Series format** then the metric name needs to match a key from a list of locations. That key is usually a country code or city name. The list of locations can come from a file or an HTTP endpoint. - -The list of locations can be provided in several ways: - -- json files with locations and their coordinates (the plugin includes list for countries and US states) -- json endpoints that return a list of locations and their coordinates - -Time Series data contains a timestamp, a metric name and a numeric value. In other words, a typical query for a time series database. Here is some time series data from Graphite: - -```json -[ - {"target": "SE", "datapoints": [[183255.0, 1529755200]]}, - {"target": "US", "datapoints": [[192224.0, 1529755200]]} -] -``` - -Location data should be in the JSON format and should be an array of JSON objects with four properties: - -```json -[ - { - "key": "SE", - "latitude": 60.128161, - "longitude": 18.643501, - "name": "Sweden" - }, - { - "key": "US", - "latitude": 37.09024, - "longitude": -95.712891, - "name": "United States" - } -] -``` - -The Worldmap will then match the metric name (target in the example data) with a key field from the location data. With this example data there will be two circles drawn on the map, one for Sweden and one for the United States with values 183255 and 192224. - -### Table Format - -If the data is in the **Table format** then it should have a column that is a geohash or two columns that contain the latitude and longitude (together with the columns for the data). - -Table data is tabular data with columns and rows. Here is an example of Table data from InfluxDB: - -```json -"series": [ - { - "name": "logins.count", - "tags": { - "geohash": "9wvfgzurfzb" - }, - "columns": [ - "time", - "metric" - ], - "values": [ - [ - 1529762933815, - 75.654324173059 - ] - ] - } -] -``` - -This query contains both data (the value `75.654324173059`) and a location (the geohash `9wvfgzurfzb` which is in Colorado). So using these, the Worldmap panel will draw one circle in Colorado, USA with the value 75.654324173059. - -## Time Series Data as the Data Source - -Supported Databases: - -- Graphite -- InfluxDB -- OpenTSDB -- Prometheus -- MySQL -- Postgres -- MSSQL -- Elasticsearch - -The following location files are included in the plugin: - -- Countries (2 letter codes) -- Countries (3 letter codes) -- US states - -Alternatively, you can provide your own location lists by using: - -- A JSON endpoint that returns a list of locations -- A JSONP endpoint that returns a list of locations - -This works by matching country codes (like US or GB or FR) or US state codes (TX or NY) to a metric name. If a metric name matches a country in the list of countries then a circle will be drawn at that location. - -If you want to match to other data than countries or states, then you will have to provide custom location data. The current way to do that is via a JSON endpoint that returns a json file with location data (See Map Data Options) - -The size of the circle depends on the value of the matched metric. Circle size is relative e.g. if you have 3 countries with values 1, 2 and 3 or 100, 200 and 300 then you will get one small circle, one medium circle and one large circle. - -### Time Series - Graphite and InfluxDB - -Here are some examples of Time Series Queries - -#### Graphite Query - -Use the aliasByNode function to point to the field containing the country code. See the image below for an example of a graphite query. - -![Graphite Query for Countries](https://raw.githubusercontent.com/grafana/worldmap-panel/master/src/images/worldmap-timeseries-query.png) - -Example dashboard for Worldmap with Graphite queries on [the Grafana play site](http://localhost:3000/d/000000003/worldmap-panels?panelId=8&fullscreen&edit&orgId=1). - -#### InfluxDB Query - -The Group By clause should be the country code and an alias is needed too. The alias should be in the form `$tag_`. - -![Influx Query for Countries](https://raw.githubusercontent.com/grafana/worldmap-panel/master/src/images/influx-query.png) - -#### Elasticsearch Query for Countries - -Use a Group By clause on the field containing the country code and a Then by clause with Date Histogram by `@timestamp` (or corresponding date field). - -![Elasticsearch Query for Countries](https://raw.githubusercontent.com/grafana/worldmap-panel/master/src/images/elasticsearch-query.png) - -#### Map Data Options for Time Series Data - -Under the Worldmap tab, choose either the `countries` or `states` option. - -![Worldmap Options for Countries](https://raw.githubusercontent.com/grafana/worldmap-panel/master/src/images/countries-option.png) - -Using a JSON endpoint to return a custom list of locations: - -![Worldmap Options for JSON](https://raw.githubusercontent.com/grafana/worldmap-panel/master/src/images/json-endpoint.png) - -The endpoint used here is for the demo version of worldPing - [https://worldpingdemo.grafana.net/api/plugin-proxy/raintank-worldping-app/api/v2/probes/locations](https://worldpingdemo.grafana.net/api/plugin-proxy/raintank-worldping-app/api/v2/probes/locations). If you have your own endpoint defined it must be reachable from the client side, as it is approached by client's browser. - -Using a JSONP endpoint (if you need to wrap the JSON to get around CORS problems): - -![Worldmap Options for JSONP](https://raw.githubusercontent.com/grafana/worldmap-panel/master/src/images/jsonp-endpoint.png) - -For some details on troubleshooting JSON/JSONP check [#47](https://github.com/grafana/worldmap-panel/issues/47). - -## Geohashes as the Data Source - -Supported Databases: - -- ElasticSearch - -The [Geo-point](https://www.elastic.co/guide/en/elasticsearch/reference/2.3/geo-point.html) data type with geohash indexing in Elasticsearch can also be used as a datasource for the worldmap panel. Grafana has a new bucket aggregate for Elasticsearch queries - Geo Hash Grid that allows grouping of coordinates. The Geo Hash Grid has a precision option where 1 is the highest level and 7 is the lowest. - -![Elasticsearch Query for Worldmap](https://raw.githubusercontent.com/grafana/worldmap-panel/master/src/images/worldmap-geohash-query.png) - -Three fields need to be provided by the ElasticSearch query: - -- A metric. This is free text and should match the aggregation used (Count, Average, Sum, Unique Count etc.) -- Location Name (optional - geohash value will be shown if not chosen) -- geo_point field that provides the geohash value. - -![Elasticsearch Query for Worldmap](https://raw.githubusercontent.com/grafana/worldmap-panel/master/src/images/es-options.png) - -## Table Data as the Data Source - -Supported Databases: - -- InfluxDB -- Elasticsearch -- MySQL, Postgres, MSSQL -- Any database that can return data in Table Format - -If a datasource can return Table Data then on the Metrics tab in Grafana choose the `FORMAT AS` Table option. - -### Table Data with a Geohash Column - -Similar to the Elasticsearch query above, 3 fields are expected (2 of them are mandatory) - -- A *metric* field. This is used to give the circle a value and determines how large the circle is. -- A *geohash* field. This is used to calculate where the circle should be drawn. -- an optional location name field (shown in the mouse over). Used to label each circle on the map. If it is empty then the geohash value is used as the label. - -The field mappings have to be specified on the Worldmap settings tab. - -![Example influxdb query](https://cloud.githubusercontent.com/assets/434655/16535977/8cd520be-3fec-11e6-8dc9-2ecf7b16ad5f.png) - -### Table Data with Latitude and Longitude Columns - -The Table Data format also works with two columns for latitude and longitude instead of a geohash column. - -- A *metric* field. This is used to give the circle a value and determines how large the circle is. -- Latitude/Longitude Fields. These are used to calculate where the circle should be drawn. -- an optional location name field (shown in the mouse over). Used to label each circle on the map. If it is empty then the geohash value is used as the label. - -## JSON result as the Data Source - -Supported Databases: - -- Warp 10 via [grafana-warp10-datasource](https://github.com/cityzendata/grafana-warp10) plugin - -It supports any datasource capable of generating a JSON response with a a custom list of locations (the same format that for the JSON enpoint). - -### Map Data Options - -#### Location Data - -There are four ways to provide data for the worldmap panel: - - - *countries*: This is a list of all the countries in the world. It works by matching a country code (US, FR, AU) to a node alias in a time series query. - - *states*: Similar to countries but for the states in USA e.g. CA for California - - *geohash*: An ElasticSearch query that returns geohashes. - - *json*: A json endpoint that returns custom json. Examples of the format are the [countries data used in first option](https://github.com/grafana/worldmap-panel/blob/master/src/data/countries.json) or [this list of cities](https://github.com/grafana/worldmap-panel/blob/master/src/data/probes.json). - - *jsonp*: A jsonp endpoint that returns custom json wrapped as jsonp. Use this if you are having problems with CORS. - - *table*: This expects the metric query to return data points with a field named geohash or two fields/columns named `latitude` and `longitude`. This field should contain a string in the [geohash form](https://www.elastic.co/guide/en/elasticsearch/guide/current/geohashes.html). For example: London -> "gcpvh3zgu992". - -#### Aggregation - -If you chose *countries* or *table* as the source of the location data then you can choose an aggregation here: avg, total etc. - -For Graphite, be aware that the default value for Max Data Points is 1. This is to aggregate data points per country to one value in the most accurate way. This will by default, consolidate by average. To change the consolidation, use the consolidateBy function like so: - -![Graphite Consolidate By](https://raw.githubusercontent.com/grafana/worldmap-panel/master/src/images/graphite-consolidateby.png) - -Or just remove the 1 from the Max Data Point field and use the consolidation functions in Map Data Options (though depending on the timerange and amount of data points, this will be usually less accurate due to Graphite consolidation). - -![Graphite Max Data Points](https://raw.githubusercontent.com/grafana/worldmap-panel/master/src/images/graphite-maxdatapoints.png) - -#### ES Metric/Location Name/geo_point Field - -Three fields need to be provided by the ElasticSearch query. They are text fields and should be the field names from the query under the Metrics tab. - -- The Metric in Elasticsearch is one of `Count`, `Average`, `Sum` etc. -- Location Name is the field that gives the circle a name. If it is blank, then the geohash value is shown in the popover instead of the location. -- geo_point is the GeoHashGrid field that provides the geohash value. - -### Map Visual Option Settings - -**Center** - -This settings configures the default center of the map. There are 5 centers to choose from or you can choose a custom center or last GeoHash center..For a custom center there are two fields: latitude and longitude. Examples of values are 37.09024, -95.712891 for the center of the US or 55.378051, -3.435973 for Great Britain. Last GeoHash center will centered the map on the last GeoHash received from the data. - -**Initial Zoom** - -The initial zoom factor for the map. This is a value between 1 and 18 where 1 is the most zoomed out. - -**Min Circle Size** - -This is minimum size for a circle in pixels. - -**Max Circle Size** - -This is the maximum size for a circle in pixels. Depending on the zoom level you might want a larger or smaller max circle size to avoid overlapping. - -**Unit** - -The Unit is shown in the popover when you hover over a circle. There are two fields the singular form and the plural form. E.g. visit/visits or error/errors - -**Show Legend** - -Shows/hide the legend on the bottom left that shows the threshold ranges and their associated colors. - -### Threshold Options - -Thresholds control the color of the circles. - -If one value is specified then two colors are used. For example, if the threshold is set to 10 then values under 10 get the first color and values that are 10 or more get the second color. - -The threshold field also accepts 2 or more comma-separated values. For example, if you have 2 values that represents 3 ranges that correspond to the three colors. For example: if the thresholds are 70, 90 then the first color represents < 70, the second color represents between 70 and 90 and the third color represents > 90. - -### CHANGELOG - -The latest changes can be found here: [CHANGELOG.md](https://github.com/grafana/worldmap-panel/blob/master/CHANGELOG.md) diff --git a/dist/css/leaflet.css b/dist/css/leaflet.css deleted file mode 100644 index f68b2ee..0000000 --- a/dist/css/leaflet.css +++ /dev/null @@ -1,636 +0,0 @@ -/* required styles */ - -.leaflet-pane, -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-tile-container, -.leaflet-pane > svg, -.leaflet-pane > canvas, -.leaflet-zoom-box, -.leaflet-image-layer, -.leaflet-layer { - position: absolute; - left: 0; - top: 0; - } -.leaflet-container { - overflow: hidden; - } -.leaflet-tile, -.leaflet-marker-icon, -.leaflet-marker-shadow { - -webkit-user-select: none; - -moz-user-select: none; - user-select: none; - -webkit-user-drag: none; - } -/* Safari renders non-retina tile on retina better with this, but Chrome is worse */ -.leaflet-safari .leaflet-tile { - image-rendering: -webkit-optimize-contrast; - } -/* hack that prevents hw layers "stretching" when loading new tiles */ -.leaflet-safari .leaflet-tile-container { - width: 1600px; - height: 1600px; - -webkit-transform-origin: 0 0; - } -.leaflet-marker-icon, -.leaflet-marker-shadow { - display: block; - } -/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */ -/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */ -.leaflet-container .leaflet-overlay-pane svg, -.leaflet-container .leaflet-marker-pane img, -.leaflet-container .leaflet-shadow-pane img, -.leaflet-container .leaflet-tile-pane img, -.leaflet-container img.leaflet-image-layer { - max-width: none !important; - max-height: none !important; - } - -.leaflet-container.leaflet-touch-zoom { - -ms-touch-action: pan-x pan-y; - touch-action: pan-x pan-y; - } -.leaflet-container.leaflet-touch-drag { - -ms-touch-action: pinch-zoom; - /* Fallback for FF which doesn't support pinch-zoom */ - touch-action: none; - touch-action: pinch-zoom; -} -.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { - -ms-touch-action: none; - touch-action: none; -} -.leaflet-container { - -webkit-tap-highlight-color: transparent; -} -.leaflet-container a { - -webkit-tap-highlight-color: rgba(51, 181, 229, 0.4); -} -.leaflet-tile { - filter: inherit; - visibility: hidden; - } -.leaflet-tile-loaded { - visibility: inherit; - } -.leaflet-zoom-box { - width: 0; - height: 0; - -moz-box-sizing: border-box; - box-sizing: border-box; - z-index: 800; - } -/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */ -.leaflet-overlay-pane svg { - -moz-user-select: none; - } - -.leaflet-pane { z-index: 400; } - -.leaflet-tile-pane { z-index: 200; } -.leaflet-overlay-pane { z-index: 400; } -.leaflet-shadow-pane { z-index: 500; } -.leaflet-marker-pane { z-index: 600; } -.leaflet-tooltip-pane { z-index: 650; } -.leaflet-popup-pane { z-index: 700; } - -.leaflet-map-pane canvas { z-index: 100; } -.leaflet-map-pane svg { z-index: 200; } - -.leaflet-vml-shape { - width: 1px; - height: 1px; - } -.lvml { - behavior: url(#default#VML); - display: inline-block; - position: absolute; - } - - -/* control positioning */ - -.leaflet-control { - position: relative; - z-index: 800; - pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ - pointer-events: auto; - } -.leaflet-top, -.leaflet-bottom { - position: absolute; - z-index: 1000; - pointer-events: none; - } -.leaflet-top { - top: 0; - } -.leaflet-right { - right: 0; - } -.leaflet-bottom { - bottom: 0; - } -.leaflet-left { - left: 0; - } -.leaflet-control { - float: left; - clear: both; - } -.leaflet-right .leaflet-control { - float: right; - } -.leaflet-top .leaflet-control { - margin-top: 10px; - } -.leaflet-bottom .leaflet-control { - margin-bottom: 10px; - } -.leaflet-left .leaflet-control { - margin-left: 10px; - } -.leaflet-right .leaflet-control { - margin-right: 10px; - } - - -/* zoom and fade animations */ - -.leaflet-fade-anim .leaflet-tile { - will-change: opacity; - } -.leaflet-fade-anim .leaflet-popup { - opacity: 0; - -webkit-transition: opacity 0.2s linear; - -moz-transition: opacity 0.2s linear; - -o-transition: opacity 0.2s linear; - transition: opacity 0.2s linear; - } -.leaflet-fade-anim .leaflet-map-pane .leaflet-popup { - opacity: 1; - } -.leaflet-zoom-animated { - -webkit-transform-origin: 0 0; - -ms-transform-origin: 0 0; - transform-origin: 0 0; - } -.leaflet-zoom-anim .leaflet-zoom-animated { - will-change: transform; - } -.leaflet-zoom-anim .leaflet-zoom-animated { - -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1); - -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1); - -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1); - transition: transform 0.25s cubic-bezier(0,0,0.25,1); - } -.leaflet-zoom-anim .leaflet-tile, -.leaflet-pan-anim .leaflet-tile { - -webkit-transition: none; - -moz-transition: none; - -o-transition: none; - transition: none; - } - -.leaflet-zoom-anim .leaflet-zoom-hide { - visibility: hidden; - } - - -/* cursors */ - -.leaflet-interactive { - cursor: pointer; - } -.leaflet-grab { - cursor: -webkit-grab; - cursor: -moz-grab; - } -.leaflet-crosshair, -.leaflet-crosshair .leaflet-interactive { - cursor: crosshair; - } -.leaflet-popup-pane, -.leaflet-control { - cursor: auto; - } -.leaflet-dragging .leaflet-grab, -.leaflet-dragging .leaflet-grab .leaflet-interactive, -.leaflet-dragging .leaflet-marker-draggable { - cursor: move; - cursor: -webkit-grabbing; - cursor: -moz-grabbing; - } - -/* marker & overlays interactivity */ -.leaflet-marker-icon, -.leaflet-marker-shadow, -.leaflet-image-layer, -.leaflet-pane > svg path, -.leaflet-tile-container { - pointer-events: none; - } - -.leaflet-marker-icon.leaflet-interactive, -.leaflet-image-layer.leaflet-interactive, -.leaflet-pane > svg path.leaflet-interactive { - pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */ - pointer-events: auto; - } - -/* visual tweaks */ - -.leaflet-container { - background: #ddd; - outline: 0; - } -.leaflet-container a { - color: #0078A8; - } -.leaflet-container a.leaflet-active { - outline: 2px solid orange; - } -.leaflet-zoom-box { - border: 2px dotted #38f; - background: rgba(255,255,255,0.5); - } - - -/* general typography */ -.leaflet-container { - font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; - } - - -/* general toolbar styles */ - -.leaflet-bar { - box-shadow: 0 1px 5px rgba(0,0,0,0.65); - border-radius: 4px; - } -.leaflet-bar a, -.leaflet-bar a:hover { - background-color: #fff; - border-bottom: 1px solid #ccc; - width: 26px; - height: 26px; - line-height: 26px; - display: block; - text-align: center; - text-decoration: none; - color: black; - } -.leaflet-bar a, -.leaflet-control-layers-toggle { - background-position: 50% 50%; - background-repeat: no-repeat; - display: block; - } -.leaflet-bar a:hover { - background-color: #f4f4f4; - } -.leaflet-bar a:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; - } -.leaflet-bar a:last-child { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; - border-bottom: none; - } -.leaflet-bar a.leaflet-disabled { - cursor: default; - background-color: #f4f4f4; - color: #bbb; - } - -.leaflet-touch .leaflet-bar a { - width: 30px; - height: 30px; - line-height: 30px; - } -.leaflet-touch .leaflet-bar a:first-child { - border-top-left-radius: 2px; - border-top-right-radius: 2px; - } -.leaflet-touch .leaflet-bar a:last-child { - border-bottom-left-radius: 2px; - border-bottom-right-radius: 2px; - } - -/* zoom control */ - -.leaflet-control-zoom-in, -.leaflet-control-zoom-out { - font: bold 18px 'Lucida Console', Monaco, monospace; - text-indent: 1px; - } - -.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out { - font-size: 22px; - } - - -/* layers control */ - -.leaflet-control-layers { - box-shadow: 0 1px 5px rgba(0,0,0,0.4); - background: #fff; - border-radius: 5px; - } -.leaflet-control-layers-toggle { - background-image: url(../images/layers.png); - width: 36px; - height: 36px; - } -.leaflet-retina .leaflet-control-layers-toggle { - background-image: url(../images/layers-2x.png); - background-size: 26px 26px; - } -.leaflet-touch .leaflet-control-layers-toggle { - width: 44px; - height: 44px; - } -.leaflet-control-layers .leaflet-control-layers-list, -.leaflet-control-layers-expanded .leaflet-control-layers-toggle { - display: none; - } -.leaflet-control-layers-expanded .leaflet-control-layers-list { - display: block; - position: relative; - } -.leaflet-control-layers-expanded { - padding: 6px 10px 6px 6px; - color: #333; - background: #fff; - } -.leaflet-control-layers-scrollbar { - overflow-y: scroll; - overflow-x: hidden; - padding-right: 5px; - } -.leaflet-control-layers-selector { - margin-top: 2px; - position: relative; - top: 1px; - } -.leaflet-control-layers label { - display: block; - } -.leaflet-control-layers-separator { - height: 0; - border-top: 1px solid #ddd; - margin: 5px -10px 5px -6px; - } - -/* Default icon URLs */ -.leaflet-default-icon-path { - background-image: url(../images/marker-icon.png); - } - - -/* attribution and scale controls */ - -.leaflet-container .leaflet-control-attribution { - background: #fff; - background: rgba(255, 255, 255, 0.7); - margin: 0; - } -.leaflet-control-attribution, -.leaflet-control-scale-line { - padding: 0 5px; - color: #333; - } -.leaflet-control-attribution a { - text-decoration: none; - } -.leaflet-control-attribution a:hover { - text-decoration: underline; - } -.leaflet-container .leaflet-control-attribution, -.leaflet-container .leaflet-control-scale { - font-size: 11px; - } -.leaflet-left .leaflet-control-scale { - margin-left: 5px; - } -.leaflet-bottom .leaflet-control-scale { - margin-bottom: 5px; - } -.leaflet-control-scale-line { - border: 2px solid #777; - border-top: none; - line-height: 1.1; - padding: 2px 5px 1px; - font-size: 11px; - white-space: nowrap; - overflow: hidden; - -moz-box-sizing: border-box; - box-sizing: border-box; - - background: #fff; - background: rgba(255, 255, 255, 0.5); - } -.leaflet-control-scale-line:not(:first-child) { - border-top: 2px solid #777; - border-bottom: none; - margin-top: -2px; - } -.leaflet-control-scale-line:not(:first-child):not(:last-child) { - border-bottom: 2px solid #777; - } - -.leaflet-touch .leaflet-control-attribution, -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - box-shadow: none; - } -.leaflet-touch .leaflet-control-layers, -.leaflet-touch .leaflet-bar { - border: 2px solid rgba(0,0,0,0.2); - background-clip: padding-box; - } - - -/* popup */ - -.leaflet-popup { - position: absolute; - text-align: center; - margin-bottom: 20px; - } -.leaflet-popup-content-wrapper { - padding: 1px; - text-align: left; - border-radius: 12px; - } -.leaflet-popup-content { - margin: 13px 19px; - line-height: 1.4; - } -.leaflet-popup-content p { - margin: 18px 0; - } -.leaflet-popup-tip-container { - width: 40px; - height: 20px; - position: absolute; - left: 50%; - margin-left: -20px; - overflow: hidden; - pointer-events: none; - } -.leaflet-popup-tip { - width: 17px; - height: 17px; - padding: 1px; - - margin: -10px auto 0; - - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -ms-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); - } -.leaflet-popup-content-wrapper, -.leaflet-popup-tip { - background: white; - color: #333; - box-shadow: 0 3px 14px rgba(0,0,0,0.4); - } -.leaflet-container a.leaflet-popup-close-button { - position: absolute; - top: 0; - right: 0; - padding: 4px 4px 0 0; - border: none; - text-align: center; - width: 18px; - height: 14px; - font: 16px/14px Tahoma, Verdana, sans-serif; - color: #c3c3c3; - text-decoration: none; - font-weight: bold; - background: transparent; - } -.leaflet-container a.leaflet-popup-close-button:hover { - color: #999; - } -.leaflet-popup-scrolled { - overflow: auto; - border-bottom: 1px solid #ddd; - border-top: 1px solid #ddd; - } - -.leaflet-oldie .leaflet-popup-content-wrapper { - zoom: 1; - } -.leaflet-oldie .leaflet-popup-tip { - width: 24px; - margin: 0 auto; - - -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)"; - filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678); - } -.leaflet-oldie .leaflet-popup-tip-container { - margin-top: -1px; - } - -.leaflet-oldie .leaflet-control-zoom, -.leaflet-oldie .leaflet-control-layers, -.leaflet-oldie .leaflet-popup-content-wrapper, -.leaflet-oldie .leaflet-popup-tip { - border: 1px solid #999; - } - - -/* div icon */ - -.leaflet-div-icon { - background: #fff; - border: 1px solid #666; - } - - -/* Tooltip */ -/* Base styles for the element that has a tooltip */ -.leaflet-tooltip { - position: absolute; - padding: 6px; - background-color: #fff; - border: 1px solid #fff; - border-radius: 3px; - color: #222; - white-space: nowrap; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - pointer-events: none; - box-shadow: 0 1px 3px rgba(0,0,0,0.4); - } -.leaflet-tooltip.leaflet-clickable { - cursor: pointer; - pointer-events: auto; - } -.leaflet-tooltip-top:before, -.leaflet-tooltip-bottom:before, -.leaflet-tooltip-left:before, -.leaflet-tooltip-right:before { - position: absolute; - pointer-events: none; - border: 6px solid transparent; - background: transparent; - content: ""; - } - -/* Directions */ - -.leaflet-tooltip-bottom { - margin-top: 6px; -} -.leaflet-tooltip-top { - margin-top: -6px; -} -.leaflet-tooltip-bottom:before, -.leaflet-tooltip-top:before { - left: 50%; - margin-left: -6px; - } -.leaflet-tooltip-top:before { - bottom: 0; - margin-bottom: -12px; - border-top-color: #fff; - } -.leaflet-tooltip-bottom:before { - top: 0; - margin-top: -12px; - margin-left: -6px; - border-bottom-color: #fff; - } -.leaflet-tooltip-left { - margin-left: -6px; -} -.leaflet-tooltip-right { - margin-left: 6px; -} -.leaflet-tooltip-left:before, -.leaflet-tooltip-right:before { - top: 50%; - margin-top: -6px; - } -.leaflet-tooltip-left:before { - right: 0; - margin-right: -12px; - border-left-color: #fff; - } -.leaflet-tooltip-right:before { - left: 0; - margin-left: -12px; - border-right-color: #fff; - } diff --git a/dist/css/worldmap-panel.css b/dist/css/worldmap-panel.css deleted file mode 100644 index 94cab8b..0000000 --- a/dist/css/worldmap-panel.css +++ /dev/null @@ -1,42 +0,0 @@ -.mapcontainer { - overflow: hidden; -} - -.info { - padding: 6px 8px; - font: 14px/16px Arial, Helvetica, sans-serif; - background: white; - background: rgba(255,255,255,0.8); - box-shadow: 0 0 15px rgba(0,0,0,0.2); - border-radius: 5px; -} -.info h4 { - margin: 0 0 5px; - color: #777; -} - -.legend { - line-height: 18px; - color: #555; - display: flex; - flex-direction: column; -} - -.legend-item { - white-space: nowrap; -} -.legend i { - width: 18px; - height: 18px; - float: left; - margin-right: 8px; - opacity: 0.7; -} - -.leaflet-top.leaflet-left, .leaflet-bottom.leaflet-left, .leaflet-bottom.leaflet-right { - z-index: 1000; -} - -.leaflet-popup-content-wrapper, .leaflet-popup-tip { - color: #d8d9da !important; -} diff --git a/dist/css/worldmap.dark.css b/dist/css/worldmap.dark.css deleted file mode 100644 index 0ac76fb..0000000 --- a/dist/css/worldmap.dark.css +++ /dev/null @@ -1,8 +0,0 @@ -.map-darken img.leaflet-tile { - -webkit-filter: brightness(1.6) grayscale(1) contrast(1); - filter: brightness(1.6) grayscale(1) contrast(1); -} - -.worldmap-popup .leaflet-popup-content-wrapper, .worldmap-popup .leaflet-popup-tip { - background-color: #333; -} diff --git a/dist/css/worldmap.light.css b/dist/css/worldmap.light.css deleted file mode 100644 index a97b73d..0000000 --- a/dist/css/worldmap.light.css +++ /dev/null @@ -1,3 +0,0 @@ -.worldmap-popup .leaflet-popup-content-wrapper, .worldmap-popup .leaflet-popup-tip { - background-color: #ECECEC; -} diff --git a/dist/data/countries_3letter.json b/dist/data/countries_3letter.json deleted file mode 100644 index fc23b58..0000000 --- a/dist/data/countries_3letter.json +++ /dev/null @@ -1,1460 +0,0 @@ -[ - { - "key": "ALB", - "latitude": 41, - "longitude": 20, - "name": "Albania" - }, - { - "key": "DZA", - "latitude": 28, - "longitude": 3, - "name": "Algeria" - }, - { - "key": "ASM", - "latitude": -14.3333, - "longitude": -170, - "name": "American Samoa" - }, - { - "key": "AND", - "latitude": 42.5, - "longitude": 1.6, - "name": "Andorra" - }, - { - "key": "AGO", - "latitude": -12.5, - "longitude": 18.5, - "name": "Angola" - }, - { - "key": "AIA", - "latitude": 18.25, - "longitude": -63.1667, - "name": "Anguilla" - }, - { - "key": "ATA", - "latitude": -90, - "longitude": 0, - "name": "Antarctica" - }, - { - "key": "ATG", - "latitude": 17.05, - "longitude": -61.8, - "name": "Antigua and Barbuda" - }, - { - "key": "ARG", - "latitude": -34, - "longitude": -64, - "name": "Argentina" - }, - { - "key": "ARM", - "latitude": 40, - "longitude": 45, - "name": "Armenia" - }, - { - "key": "ABW", - "latitude": 12.5, - "longitude": -69.9667, - "name": "Aruba" - }, - { - "key": "AUS", - "latitude": -27, - "longitude": 133, - "name": "Australia" - }, - { - "key": "AUT", - "latitude": 47.3333, - "longitude": 13.3333, - "name": "Austria" - }, - { - "key": "AZE", - "latitude": 40.5, - "longitude": 47.5, - "name": "Azerbaijan" - }, - { - "key": "BHS", - "latitude": 24.25, - "longitude": -76, - "name": "Bahamas" - }, - { - "key": "BHR", - "latitude": 26, - "longitude": 50.55, - "name": "Bahrain" - }, - { - "key": "BGD", - "latitude": 24, - "longitude": 90, - "name": "Bangladesh" - }, - { - "key": "BRB", - "latitude": 13.1667, - "longitude": -59.5333, - "name": "Barbados" - }, - { - "key": "BLR", - "latitude": 53, - "longitude": 28, - "name": "Belarus" - }, - { - "key": "BEL", - "latitude": 50.8333, - "longitude": 4, - "name": "Belgium" - }, - { - "key": "BLZ", - "latitude": 17.25, - "longitude": -88.75, - "name": "Belize" - }, - { - "key": "BEN", - "latitude": 9.5, - "longitude": 2.25, - "name": "Benin" - }, - { - "key": "BMU", - "latitude": 32.3333, - "longitude": -64.75, - "name": "Bermuda" - }, - { - "key": "BTN", - "latitude": 27.5, - "longitude": 90.5, - "name": "Bhutan" - }, - { - "key": "BOL", - "latitude": -17, - "longitude": -65, - "name": "Bolivia, Plurinational State of" - }, - { - "key": "BIH", - "latitude": 44, - "longitude": 18, - "name": "Bosnia and Herzegovina" - }, - { - "key": "BWA", - "latitude": -22, - "longitude": 24, - "name": "Botswana" - }, - { - "key": "BVT", - "latitude": -54.4333, - "longitude": 3.4, - "name": "Bouvet Island" - }, - { - "key": "BRA", - "latitude": -10, - "longitude": -55, - "name": "Brazil" - }, - { - "key": "IOT", - "latitude": -6, - "longitude": 71.5, - "name": "British Indian Ocean Territory" - }, - { - "key": "BRN", - "latitude": 4.5, - "longitude": 114.6667, - "name": "Brunei Darussalam" - }, - { - "key": "BGR", - "latitude": 43, - "longitude": 25, - "name": "Bulgaria" - }, - { - "key": "BFA", - "latitude": 13, - "longitude": -2, - "name": "Burkina Faso" - }, - { - "key": "BDI", - "latitude": -3.5, - "longitude": 30, - "name": "Burundi" - }, - { - "key": "KHM", - "latitude": 13, - "longitude": 105, - "name": "Cambodia" - }, - { - "key": "CMR", - "latitude": 6, - "longitude": 12, - "name": "Cameroon" - }, - { - "key": "CAN", - "latitude": 56.130366, - "longitude":-106.346771, - "name": "Canada" - }, - { - "key": "CPV", - "latitude": 16, - "longitude": -24, - "name": "Cape Verde" - }, - { - "key": "CYM", - "latitude": 19.5, - "longitude": -80.5, - "name": "Cayman Islands" - }, - { - "key": "CAF", - "latitude": 7, - "longitude": 21, - "name": "Central African Republic" - }, - { - "key": "TCD", - "latitude": 15, - "longitude": 19, - "name": "Chad" - }, - { - "key": "CHL", - "latitude": -30, - "longitude": -71, - "name": "Chile" - }, - { - "key": "CHN", - "latitude": 35, - "longitude": 105, - "name": "China" - }, - { - "key": "CXR", - "latitude": -10.5, - "longitude": 105.6667, - "name": "Christmas Island" - }, - { - "key": "CCK", - "latitude": -12.5, - "longitude": 96.8333, - "name": "Cocos (Keeling) Islands" - }, - { - "key": "COL", - "latitude": 4, - "longitude": -72, - "name": "Colombia" - }, - { - "key": "COM", - "latitude": -12.1667, - "longitude": 44.25, - "name": "Comoros" - }, - { - "key": "COG", - "latitude": -1, - "longitude": 15, - "name": "Congo" - }, - { - "key": "COD", - "latitude": 0, - "longitude": 25, - "name": "Congo, the Democratic Republic of the" - }, - { - "key": "COK", - "latitude": -21.2333, - "longitude": -159.7667, - "name": "Cook Islands" - }, - { - "key": "CRI", - "latitude": 10, - "longitude": -84, - "name": "Costa Rica" - }, - { - "key": "CIV", - "latitude": 8, - "longitude": -5, - "name": "Côte d'Ivoire" - }, - { - "key": "HRV", - "latitude": 45.1667, - "longitude": 15.5, - "name": "Croatia" - }, - { - "key": "CUB", - "latitude": 21.5, - "longitude": -80, - "name": "Cuba" - }, - { - "key": "CYP", - "latitude": 35, - "longitude": 33, - "name": "Cyprus" - }, - { - "key": "CZE", - "latitude": 49.75, - "longitude": 15.5, - "name": "Czech Republic" - }, - { - "key": "DNK", - "latitude": 56, - "longitude": 10, - "name": "Denmark" - }, - { - "key": "DJI", - "latitude": 11.5, - "longitude": 43, - "name": "Djibouti" - }, - { - "key": "DMA", - "latitude": 15.4167, - "longitude": -61.3333, - "name": "Dominica" - }, - { - "key": "DOM", - "latitude": 19, - "longitude": -70.6667, - "name": "Dominican Republic" - }, - { - "key": "ECU", - "latitude": -2, - "longitude": -77.5, - "name": "Ecuador" - }, - { - "key": "EGY", - "latitude": 27, - "longitude": 30, - "name": "Egypt" - }, - { - "key": "SLV", - "latitude": 13.8333, - "longitude": -88.9167, - "name": "El Salvador" - }, - { - "key": "GNQ", - "latitude": 2, - "longitude": 10, - "name": "Equatorial Guinea" - }, - { - "key": "ERI", - "latitude": 15, - "longitude": 39, - "name": "Eritrea" - }, - { - "key": "EST", - "latitude": 59, - "longitude": 26, - "name": "Estonia" - }, - { - "key": "ETH", - "latitude": 8, - "longitude": 38, - "name": "Ethiopia" - }, - { - "key": "FLK", - "latitude": -51.75, - "longitude": -59, - "name": "Falkland Islands (Malvinas)" - }, - { - "key": "FRO", - "latitude": 62, - "longitude": -7, - "name": "Faroe Islands" - }, - { - "key": "FJI", - "latitude": -18, - "longitude": 175, - "name": "Fiji" - }, - { - "key": "FIN", - "latitude": 64, - "longitude": 26, - "name": "Finland" - }, - { - "key": "FRA", - "latitude": 46, - "longitude": 2, - "name": "France" - }, - { - "key": "GUF", - "latitude": 4, - "longitude": -53, - "name": "French Guiana" - }, - { - "key": "PYF", - "latitude": -15, - "longitude": -140, - "name": "French Polynesia" - }, - { - "key": "ATF", - "latitude": -43, - "longitude": 67, - "name": "French Southern Territories" - }, - { - "key": "GAB", - "latitude": -1, - "longitude": 11.75, - "name": "Gabon" - }, - { - "key": "GMB", - "latitude": 13.4667, - "longitude": -16.5667, - "name": "Gambia" - }, - { - "key": "GEO", - "latitude": 42, - "longitude": 43.5, - "name": "Georgia" - }, - { - "key": "DEU", - "latitude": 51, - "longitude": 9, - "name": "Germany" - }, - { - "key": "GHA", - "latitude": 8, - "longitude": -2, - "name": "Ghana" - }, - { - "key": "GIB", - "latitude": 36.1833, - "longitude": -5.3667, - "name": "Gibraltar" - }, - { - "key": "GRC", - "latitude": 39, - "longitude": 22, - "name": "Greece" - }, - { - "key": "GRL", - "latitude": 72, - "longitude": -40, - "name": "Greenland" - }, - { - "key": "GRD", - "latitude": 12.1167, - "longitude": -61.6667, - "name": "Grenada" - }, - { - "key": "GLP", - "latitude": 16.25, - "longitude": -61.5833, - "name": "Guadeloupe" - }, - { - "key": "GUM", - "latitude": 13.4667, - "longitude": 144.7833, - "name": "Guam" - }, - { - "key": "GTM", - "latitude": 15.5, - "longitude": -90.25, - "name": "Guatemala" - }, - { - "key": "GGY", - "latitude": 49.5, - "longitude": -2.56, - "name": "Guernsey" - }, - { - "key": "GIN", - "latitude": 11, - "longitude": -10, - "name": "Guinea" - }, - { - "key": "GNB", - "latitude": 12, - "longitude": -15, - "name": "Guinea-Bissau" - }, - { - "key": "GUY", - "latitude": 5, - "longitude": -59, - "name": "Guyana" - }, - { - "key": "HTI", - "latitude": 19, - "longitude": -72.4167, - "name": "Haiti" - }, - { - "key": "HMD", - "latitude": -53.1, - "longitude": 72.5167, - "name": "Heard Island and McDonald Islands" - }, - { - "key": "VAT", - "latitude": 41.9, - "longitude": 12.45, - "name": "Holy See (Vatican City State)" - }, - { - "key": "HND", - "latitude": 15, - "longitude": -86.5, - "name": "Honduras" - }, - { - "key": "HKG", - "latitude": 22.25, - "longitude": 114.1667, - "name": "Hong Kong" - }, - { - "key": "HUN", - "latitude": 47, - "longitude": 20, - "name": "Hungary" - }, - { - "key": "ISL", - "latitude": 65, - "longitude": -18, - "name": "Iceland" - }, - { - "key": "IND", - "latitude": 20, - "longitude": 77, - "name": "India" - }, - { - "key": "IDN", - "latitude": -5, - "longitude": 120, - "name": "Indonesia" - }, - { - "key": "IRN", - "latitude": 32, - "longitude": 53, - "name": "Iran, Islamic Republic of" - }, - { - "key": "IRQ", - "latitude": 33, - "longitude": 44, - "name": "Iraq" - }, - { - "key": "IRL", - "latitude": 53.41291, - "longitude": -8.24389, - "name": "Ireland" - }, - { - "key": "IMN", - "latitude": 54.23, - "longitude": -4.55, - "name": "Isle of Man" - }, - { - "key": "ISR", - "latitude": 31.5, - "longitude": 34.75, - "name": "Israel" - }, - { - "key": "ITA", - "latitude": 42.8333, - "longitude": 12.8333, - "name": "Italy" - }, - { - "key": "JAM", - "latitude": 18.25, - "longitude": -77.5, - "name": "Jamaica" - }, - { - "key": "JPN", - "latitude": 36, - "longitude": 138, - "name": "Japan" - }, - { - "key": "JEY", - "latitude": 49.21, - "longitude": -2.13, - "name": "Jersey" - }, - { - "key": "JOR", - "latitude": 31, - "longitude": 36, - "name": "Jordan" - }, - { - "key": "KAZ", - "latitude": 48, - "longitude": 68, - "name": "Kazakhstan" - }, - { - "key": "KEN", - "latitude": 1, - "longitude": 38, - "name": "Kenya" - }, - { - "key": "KIR", - "latitude": 1.4167, - "longitude": 173, - "name": "Kiribati" - }, - { - "key": "PRK", - "latitude": 40, - "longitude": 127, - "name": "Korea, Democratic People's Republic of" - }, - { - "key": "KOR", - "latitude": 37, - "longitude": 127.5, - "name": "Korea, Republic of" - }, - { - "key": "KWT", - "latitude": 29.3375, - "longitude": 47.6581, - "name": "Kuwait" - }, - { - "key": "KGZ", - "latitude": 41, - "longitude": 75, - "name": "Kyrgyzstan" - }, - { - "key": "LAO", - "latitude": 18, - "longitude": 105, - "name": "Lao People's Democratic Republic" - }, - { - "key": "LVA", - "latitude": 57, - "longitude": 25, - "name": "Latvia" - }, - { - "key": "LBN", - "latitude": 33.8333, - "longitude": 35.8333, - "name": "Lebanon" - }, - { - "key": "LSO", - "latitude": -29.5, - "longitude": 28.5, - "name": "Lesotho" - }, - { - "key": "LBR", - "latitude": 6.5, - "longitude": -9.5, - "name": "Liberia" - }, - { - "key": "LBY", - "latitude": 25, - "longitude": 17, - "name": "Libyan Arab Jamahiriya" - }, - { - "key": "LIE", - "latitude": 47.1667, - "longitude": 9.5333, - "name": "Liechtenstein" - }, - { - "key": "LTU", - "latitude": 56, - "longitude": 24, - "name": "Lithuania" - }, - { - "key": "LUX", - "latitude": 49.75, - "longitude": 6.1667, - "name": "Luxembourg" - }, - { - "key": "MAC", - "latitude": 22.1667, - "longitude": 113.55, - "name": "Macao" - }, - { - "key": "MKD", - "latitude": 41.8333, - "longitude": 22, - "name": "Macedonia, the former Yugoslav Republic of" - }, - { - "key": "MDG", - "latitude": -20, - "longitude": 47, - "name": "Madagascar" - }, - { - "key": "MWI", - "latitude": -13.5, - "longitude": 34, - "name": "Malawi" - }, - { - "key": "MYS", - "latitude": 2.5, - "longitude": 112.5, - "name": "Malaysia" - }, - { - "key": "MDV", - "latitude": 3.25, - "longitude": 73, - "name": "Maldives" - }, - { - "key": "MLI", - "latitude": 17, - "longitude": -4, - "name": "Mali" - }, - { - "key": "MLT", - "latitude": 35.8333, - "longitude": 14.5833, - "name": "Malta" - }, - { - "key": "MHL", - "latitude": 9, - "longitude": 168, - "name": "Marshall Islands" - }, - { - "key": "MTQ", - "latitude": 14.6667, - "longitude": -61, - "name": "Martinique" - }, - { - "key": "MRT", - "latitude": 20, - "longitude": -12, - "name": "Mauritania" - }, - { - "key": "MUS", - "latitude": -20.2833, - "longitude": 57.55, - "name": "Mauritius" - }, - { - "key": "MYT", - "latitude": -12.8333, - "longitude": 45.1667, - "name": "Mayotte" - }, - { - "key": "MEX", - "latitude": 23, - "longitude": -102, - "name": "Mexico" - }, - { - "key": "FSM", - "latitude": 6.9167, - "longitude": 158.25, - "name": "Micronesia, Federated States of" - }, - { - "key": "MDA", - "latitude": 47, - "longitude": 29, - "name": "Moldova, Republic of" - }, - { - "key": "MCO", - "latitude": 43.7333, - "longitude": 7.4, - "name": "Monaco" - }, - { - "key": "MNG", - "latitude": 46, - "longitude": 105, - "name": "Mongolia" - }, - { - "key": "MNE", - "latitude": 42, - "longitude": 19, - "name": "Montenegro" - }, - { - "key": "MSR", - "latitude": 16.75, - "longitude": -62.2, - "name": "Montserrat" - }, - { - "key": "MAR", - "latitude": 32, - "longitude": -5, - "name": "Morocco" - }, - { - "key": "MOZ", - "latitude": -18.25, - "longitude": 35, - "name": "Mozambique" - }, - { - "key": "MMR", - "latitude": 22, - "longitude": 98, - "name": "Myanmar" - }, - { - "key": "NAM", - "latitude": -22, - "longitude": 17, - "name": "Namibia" - }, - { - "key": "NRU", - "latitude": -0.5333, - "longitude": 166.9167, - "name": "Nauru" - }, - { - "key": "NPL", - "latitude": 28, - "longitude": 84, - "name": "Nepal" - }, - { - "key": "NLD", - "latitude": 52.5, - "longitude": 5.75, - "name": "Netherlands" - }, - { - "key": "ANT", - "latitude": 12.25, - "longitude": -68.75, - "name": "Netherlands Antilles" - }, - { - "key": "NCL", - "latitude": -21.5, - "longitude": 165.5, - "name": "New Caledonia" - }, - { - "key": "NZL", - "latitude": -41, - "longitude": 174, - "name": "New Zealand" - }, - { - "key": "NIC", - "latitude": 13, - "longitude": -85, - "name": "Nicaragua" - }, - { - "key": "NER", - "latitude": 16, - "longitude": 8, - "name": "Niger" - }, - { - "key": "NGA", - "latitude": 10, - "longitude": 8, - "name": "Nigeria" - }, - { - "key": "NIU", - "latitude": -19.0333, - "longitude": -169.8667, - "name": "Niue" - }, - { - "key": "NFK", - "latitude": -29.0333, - "longitude": 167.95, - "name": "Norfolk Island" - }, - { - "key": "MNP", - "latitude": 15.2, - "longitude": 145.75, - "name": "Northern Mariana Islands" - }, - { - "key": "NOR", - "latitude": 62, - "longitude": 10, - "name": "Norway" - }, - { - "key": "OMN", - "latitude": 21, - "longitude": 57, - "name": "Oman" - }, - { - "key": "PAK", - "latitude": 30, - "longitude": 70, - "name": "Pakistan" - }, - { - "key": "PLW", - "latitude": 7.5, - "longitude": 134.5, - "name": "Palau" - }, - { - "key": "PSE", - "latitude": 32, - "longitude": 35.25, - "name": "Palestinian Territory, Occupied" - }, - { - "key": "PAN", - "latitude": 9, - "longitude": -80, - "name": "Panama" - }, - { - "key": "PNG", - "latitude": -6, - "longitude": 147, - "name": "Papua New Guinea" - }, - { - "key": "PRY", - "latitude": -23, - "longitude": -58, - "name": "Paraguay" - }, - { - "key": "PER", - "latitude": -10, - "longitude": -76, - "name": "Peru" - }, - { - "key": "PHL", - "latitude": 13, - "longitude": 122, - "name": "Philippines" - }, - { - "key": "PCN", - "latitude": -24.7, - "longitude": -127.4, - "name": "Pitcairn" - }, - { - "key": "POL", - "latitude": 52, - "longitude": 20, - "name": "Poland" - }, - { - "key": "PRT", - "latitude": 39.5, - "longitude": -8, - "name": "Portugal" - }, - { - "key": "PRI", - "latitude": 18.25, - "longitude": -66.5, - "name": "Puerto Rico" - }, - { - "key": "QAT", - "latitude": 25.5, - "longitude": 51.25, - "name": "Qatar" - }, - { - "key": "REU", - "latitude": -21.1, - "longitude": 55.6, - "name": "Réunion" - }, - { - "key": "ROU", - "latitude": 46, - "longitude": 25, - "name": "Romania" - }, - { - "key": "RUS", - "latitude": 60, - "longitude": 100, - "name": "Russian Federation" - }, - { - "key": "RWA", - "latitude": -2, - "longitude": 30, - "name": "Rwanda" - }, - { - "key": "SHN", - "latitude": -15.9333, - "longitude": -5.7, - "name": "Saint Helena, Ascension and Tristan da Cunha" - }, - { - "key": "KNA", - "latitude": 17.3333, - "longitude": -62.75, - "name": "Saint Kitts and Nevis" - }, - { - "key": "LCA", - "latitude": 13.8833, - "longitude": -61.1333, - "name": "Saint Lucia" - }, - { - "key": "SPM", - "latitude": 46.8333, - "longitude": -56.3333, - "name": "Saint Pierre and Miquelon" - }, - { - "key": "VCT", - "latitude": 13.25, - "longitude": -61.2, - "name": "Saint Vincent and the Grenadines" - }, - { - "key": "WSM", - "latitude": -13.5833, - "longitude": -172.3333, - "name": "Samoa" - }, - { - "key": "SMR", - "latitude": 43.7667, - "longitude": 12.4167, - "name": "San Marino" - }, - { - "key": "STP", - "latitude": 1, - "longitude": 7, - "name": "Sao Tome and Principe" - }, - { - "key": "SAU", - "latitude": 25, - "longitude": 45, - "name": "Saudi Arabia" - }, - { - "key": "SEN", - "latitude": 14, - "longitude": -14, - "name": "Senegal" - }, - { - "key": "SRB", - "latitude": 44, - "longitude": 21, - "name": "Serbia" - }, - { - "key": "SYC", - "latitude": -4.5833, - "longitude": 55.6667, - "name": "Seychelles" - }, - { - "key": "SLE", - "latitude": 8.5, - "longitude": -11.5, - "name": "Sierra Leone" - }, - { - "key": "SGP", - "latitude": 1.3667, - "longitude": 103.8, - "name": "Singapore" - }, - { - "key": "SVK", - "latitude": 48.6667, - "longitude": 19.5, - "name": "Slovakia" - }, - { - "key": "SVN", - "latitude": 46, - "longitude": 15, - "name": "Slovenia" - }, - { - "key": "SLB", - "latitude": -8, - "longitude": 159, - "name": "Solomon Islands" - }, - { - "key": "SOM", - "latitude": 10, - "longitude": 49, - "name": "Somalia" - }, - { - "key": "ZAF", - "latitude": -29, - "longitude": 24, - "name": "South Africa" - }, - { - "key": "SGS", - "latitude": -54.5, - "longitude": -37, - "name": "South Georgia and the South Sandwich Islands" - }, - { - "key": "ESP", - "latitude": 40, - "longitude": -4, - "name": "Spain" - }, - { - "key": "LKA", - "latitude": 7.873054, - "longitude": 80.771797, - "name": "Sri Lanka" - }, - { - "key": "SDN", - "latitude": 15, - "longitude": 30, - "name": "Sudan" - }, - { - "key": "SUR", - "latitude": 4, - "longitude": -56, - "name": "Suriname" - }, - { - "key": "SJM", - "latitude": 78, - "longitude": 20, - "name": "Svalbard and Jan Mayen" - }, - { - "key": "SWZ", - "latitude": -26.5, - "longitude": 31.5, - "name": "Swaziland" - }, - { - "key": "SWE", - "latitude": 62, - "longitude": 15, - "name": "Sweden" - }, - { - "key": "CHE", - "latitude": 47, - "longitude": 8, - "name": "Switzerland" - }, - { - "key": "SYR", - "latitude": 35, - "longitude": 38, - "name": "Syrian Arab Republic" - }, - { - "key": "TWN", - "latitude": 23.5, - "longitude": 121, - "name": "Taiwan, Province of China" - }, - { - "key": "TJK", - "latitude": 39, - "longitude": 71, - "name": "Tajikistan" - }, - { - "key": "TZA", - "latitude": -6, - "longitude": 35, - "name": "Tanzania, United Republic of" - }, - { - "key": "THA", - "latitude": 15, - "longitude": 100, - "name": "Thailand" - }, - { - "key": "TLS", - "latitude": -8.55, - "longitude": 125.5167, - "name": "Timor-Leste" - }, - { - "key": "TGO", - "latitude": 8, - "longitude": 1.1667, - "name": "Togo" - }, - { - "key": "TKL", - "latitude": -9, - "longitude": -172, - "name": "Tokelau" - }, - { - "key": "TON", - "latitude": -20, - "longitude": -175, - "name": "Tonga" - }, - { - "key": "TTO", - "latitude": 11, - "longitude": -61, - "name": "Trinidad and Tobago" - }, - { - "key": "TUN", - "latitude": 34, - "longitude": 9, - "name": "Tunisia" - }, - { - "key": "TUR", - "latitude": 39, - "longitude": 35, - "name": "Turkey" - }, - { - "key": "TKM", - "latitude": 40, - "longitude": 60, - "name": "Turkmenistan" - }, - { - "key": "TCA", - "latitude": 21.75, - "longitude": -71.5833, - "name": "Turks and Caicos Islands" - }, - { - "key": "TUV", - "latitude": -8, - "longitude": 178, - "name": "Tuvalu" - }, - { - "key": "UGA", - "latitude": 1, - "longitude": 32, - "name": "Uganda" - }, - { - "key": "UKR", - "latitude": 49, - "longitude": 32, - "name": "Ukraine" - }, - { - "key": "ARE", - "latitude": 24, - "longitude": 54, - "name": "United Arab Emirates" - }, - { - "key": "GBR", - "latitude": 54, - "longitude": -2, - "name": "United Kingdom" - }, - { - "key": "USA", - "latitude": 38, - "longitude": -97, - "name": "United States" - }, - { - "key": "UMI", - "latitude": 19.2833, - "longitude": 166.6, - "name": "United States Minor Outlying Islands" - }, - { - "key": "URY", - "latitude": -33, - "longitude": -56, - "name": "Uruguay" - }, - { - "key": "UZB", - "latitude": 41, - "longitude": 64, - "name": "Uzbekistan" - }, - { - "key": "VUT", - "latitude": -16, - "longitude": 167, - "name": "Vanuatu" - }, - { - "key": "VEN", - "latitude": 8, - "longitude": -66, - "name": "Venezuela, Bolivarian Republic of" - }, - { - "key": "VNM", - "latitude": 16, - "longitude": 106, - "name": "Viet Nam" - }, - { - "key": "VGB", - "latitude": 18.5, - "longitude": -64.5, - "name": "Virgin Islands, British" - }, - { - "key": "VIR", - "latitude": 18.3333, - "longitude": -64.8333, - "name": "Virgin Islands, U.S." - }, - { - "key": "WLF", - "latitude": -13.3, - "longitude": -176.2, - "name": "Wallis and Futuna" - }, - { - "key": "ESH", - "latitude": 24.5, - "longitude": -13, - "name": "Western Sahara" - }, - { - "key": "YEM", - "latitude": 15, - "longitude": 48, - "name": "Yemen" - }, - { - "key": "ZMB", - "latitude": -15, - "longitude": 30, - "name": "Zambia" - }, - { - "key": "ZWE", - "latitude": -20, - "longitude": 30, - "name": "Zimbabwe" - }, - { - "key": "AFG", - "latitude": 33, - "longitude": 65, - "name": "Afghanistan" - } -] diff --git a/dist/data/probes.json b/dist/data/probes.json deleted file mode 100644 index 629c6b0..0000000 --- a/dist/data/probes.json +++ /dev/null @@ -1,128 +0,0 @@ -[ - { - "key": "amsterdam", - "latitude": 52.3702, - "longitude": 4.8952, - "name": "Amsterdam" - }, - { - "key": "charleroi", - "latitude": 50.4108, - "longitude": 4.4446, - "name": "Charleroi" - }, - { - "key": "chicago", - "latitude": 41.881832, - "longitude": -87.623177, - "name": "Chicago" - }, - { - "key": "dallas", - "latitude": 32.7767, - "longitude": -97.040443, - "name": "Dallas" - }, - { - "key": "frankfurt", - "latitude": 50.110924, - "longitude": 8.682127, - "name": "Frankfurt" - }, - { - "key": "london", - "latitude": 51.503399, - "longitude": -0.119519, - "name": "London" - }, - { - "key": "los-angeles", - "latitude": 34.052235, - "longitude": -118.243683, - "name": "Los Angeles" - }, - { - "key": "miami", - "latitude": 25.766430, - "longitude": -80.189888, - "name": "Miami" - }, - { - "key": "new-jersey", - "latitude": 39.833851, - "longitude": -74.871826, - "name": "New Jersey" - }, - { - "key": "new-york", - "latitude": 40.730610, - "longitude": -73.935242, - "name": "New York" - }, - { - "key": "omaha", - "latitude": 41.257160, - "longitude": -95.995102, - "name": "Omaha" - }, - { - "key": "paris", - "latitude": 48.864716, - "longitude": 2.349014, - "name": "Paris" - }, - { - "key": "portland", - "latitude": 45.512794, - "longitude": -122.679565, - "name": "Portland" - }, - { - "key": "san-francisco", - "latitude": 37.733795, - "longitude": -122.446747, - "name": "San Francisco" - }, - { - "key": "seattle", - "latitude": 47.608013, - "longitude": -122.335167, - "name": "Seattle" - }, - { - "key": "silicon-valley", - "latitude": 37.362517, - "longitude": -122.03476, - "name": "Silicon Valley" - }, - { - "key": "singapore", - "latitude": 1.290270, - "longitude": 103.851959, - "name": "Singapore" - }, - { - "key": "south-carolina", - "latitude": 33.836082, - "longitude": -81.163727, - "name": "South Carolina" - }, - { - "key": "sydney", - "latitude": -33.865143, - "longitude": 151.209900, - "name": "Sydney" - }, - { - "key": "taipei", - "latitude": 25.105497, - "longitude": 121.597366, - "name": "Taipei" - }, - { - "key": "tokyo", - "latitude": 35.652832, - "longitude": 139.839478, - "name": "Tokyo" - } -] \ No newline at end of file diff --git a/dist/data/states.json b/dist/data/states.json deleted file mode 100644 index 4d7a6f3..0000000 --- a/dist/data/states.json +++ /dev/null @@ -1,332 +0,0 @@ -[ - { - "key": "AK", - "latitude": 61.3850, - "longitude": -152.2683, - "name": "Alaska" - }, - { - "key": "AL", - "latitude": 32.7990, - "longitude": -86.8073, - "name": "Alabama" - }, - { - "key": "AR", - "latitude": 34.9513, - "longitude": -92.3809, - "name": "Arkansas" - }, - { - "key": "AS", - "latitude": 14.2417, - "longitude": -170.7197, - "name": "American Samoa" - }, - { - "key": "AZ", - "latitude": 33.7712, - "longitude": -111.3877, - "name": "Arizona" - }, - { - "key": "CA", - "latitude": 36.1700, - "longitude": -119.7462, - "name": "California" - }, - { - "key": "CO", - "latitude": 39.0646, - "longitude": -105.3272, - "name": "Colorado" - }, - { - "key": "CT", - "latitude": 41.5834, - "longitude": -72.7622, - "name": "Connecticut" - }, - { - "key": "DC", - "latitude": 38.8964, - "longitude": -77.0262, - "name": "Washington DC" - }, - { - "key": "DE", - "latitude": 39.3498, - "longitude": -75.5148, - "name": "Delaware" - }, - { - "key": "FL", - "latitude": 27.8333, - "longitude": -81.7170, - "name": "Florida" - }, - { - "key": "GA", - "latitude": 32.9866, - "longitude": -83.6487, - "name": "Georgia" - }, - { - "key": "HI", - "latitude": 21.1098, - "longitude": -157.5311, - "name": "Hawaii" - }, - { - "key": "IA", - "latitude": 42.0046, - "longitude": -93.2140, - "name": "Iowa" - }, - { - "key": "ID", - "latitude": 44.2394, - "longitude": -114.5103, - "name": "Idaho" - }, - { - "key": "IL", - "latitude": 40.3363, - "longitude": -89.0022, - "name": "Illinois" - }, - { - "key": "IN", - "latitude": 39.8647, - "longitude": -86.2604, - "name": "Indiana" - }, - { - "key": "KS", - "latitude": 38.5111, - "longitude": -96.8005, - "name": "Kansas" - }, - { - "key": "KY", - "latitude": 37.6690, - "longitude": -84.6514, - "name": "Kentucky" - }, - { - "key": "LA", - "latitude": 31.1801, - "longitude": -91.8749, - "name": "Louisiana" - }, - { - "key": "MA", - "latitude": 42.2373, - "longitude": -71.5314, - "name": "Massachusetts" - }, - { - "key": "MD", - "latitude": 39.0724, - "longitude": -76.7902, - "name": "Maryland" - }, - { - "key": "ME", - "latitude": 44.6074, - "longitude": -69.3977, - "name": "Maine" - }, - { - "key": "MI", - "latitude": 43.3504, - "longitude": -84.5603, - "name": "Michigan" - }, - { - "key": "MN", - "latitude": 45.7326, - "longitude": -93.9196, - "name": "Minnesota" - }, - { - "key": "MO", - "latitude": 38.4623, - "longitude": -92.3020, - "name": "Missouri" - }, - { - "key": "MP", - "latitude": 14.8058, - "longitude": 145.5505, - "name": "Northern Mariana Islands" - }, - { - "key": "MS", - "latitude": 32.7673, - "longitude": -89.6812, - "name": "Mississippi" - }, - { - "key": "MT", - "latitude": 46.9048, - "longitude": -110.3261, - "name": "Montana" - }, - { - "key": "NC", - "latitude": 35.6411, - "longitude": -79.8431, - "name": "North Carolina" - }, - { - "key": "ND", - "latitude": 47.5362, - "longitude": -99.7930, - "name": "North Dakota" - }, - { - "key": "NE", - "latitude": 41.1289, - "longitude": -98.2883, - "name": "Nebraska" - }, - { - "key": "NH", - "latitude": 43.4108, - "longitude": -71.5653, - "name": "New Hampshire" - }, - { - "key": "NJ", - "latitude": 40.3140, - "longitude": -74.5089, - "name": "New Jersey" - }, - { - "key": "NM", - "latitude": 34.8375, - "longitude": -106.2371, - "name": "New Mexico" - }, - { - "key": "NV", - "latitude": 38.4199, - "longitude": -117.1219, - "name": "Nevada" - }, - { - "key": "NY", - "latitude": 42.1497, - "longitude": -74.9384, - "name": "New York" - }, - { - "key": "OH", - "latitude": 40.3736, - "longitude": -82.7755, - "name": "Ohio" - }, - { - "key": "OK", - "latitude": 35.5376, - "longitude": -96.9247, - "name": "Oklahoma" - }, - { - "key": "OR", - "latitude": 44.5672, - "longitude": -122.1269, - "name": "Oregon" - }, - { - "key": "PA", - "latitude": 40.5773, - "longitude": -77.2640, - "name": "Pennsylvania" - }, - { - "key": "PR", - "latitude": 18.2766, - "longitude": -66.3350, - "name": "Puerto Rico" - }, - { - "key": "RI", - "latitude": 41.6772, - "longitude": -71.5101, - "name": "Rhode Island" - }, - { - "key": "SC", - "latitude": 33.8191, - "longitude": -80.9066, - "name": "South Carolina" - }, - { - "key": "SD", - "latitude": 44.2853, - "longitude": -99.4632, - "name": "South Dakota" - }, - { - "key": "TN", - "latitude": 35.7449, - "longitude": -86.7489, - "name": "Tennessee" - }, - { - "key": "TX", - "latitude": 31.1060, - "longitude": -97.6475, - "name": "Texas" - }, - { - "key": "UT", - "latitude": 40.1135, - "longitude": -111.8535, - "name": "Utah" - }, - { - "key": "VA", - "latitude": 37.7680, - "longitude": -78.2057, - "name": "Virginia" - }, - { - "key": "VI", - "latitude": 18.0001, - "longitude": -64.8199, - "name": "U.S. Virgin Islands" - }, - { - "key": "VT", - "latitude": 44.0407, - "longitude": -72.7093, - "name": "Vermont" - }, - { - "key": "WA", - "latitude": 47.3917, - "longitude": -121.5708, - "name": "Washington" - }, - { - "key": "WI", - "latitude": 44.2563, - "longitude": -89.6385, - "name": "Wisconsin" - }, - { - "key": "WV", - "latitude": 38.4680, - "longitude": -80.9696, - "name": "West Virginia" - }, - { - "key": "WY", - "latitude": 42.7475, - "longitude": -107.2085, - "name": "Wyoming" - } -] diff --git a/dist/images/countries-option.png b/dist/images/countries-option.png deleted file mode 100644 index 5ff68b0..0000000 Binary files a/dist/images/countries-option.png and /dev/null differ diff --git a/dist/images/elasticsearch-query.png b/dist/images/elasticsearch-query.png deleted file mode 100644 index 2eef897..0000000 Binary files a/dist/images/elasticsearch-query.png and /dev/null differ diff --git a/dist/images/es-options.png b/dist/images/es-options.png deleted file mode 100644 index 1f6cebb..0000000 Binary files a/dist/images/es-options.png and /dev/null differ diff --git a/dist/images/graphite-consolidateby.png b/dist/images/graphite-consolidateby.png deleted file mode 100644 index 5cb555c..0000000 Binary files a/dist/images/graphite-consolidateby.png and /dev/null differ diff --git a/dist/images/graphite-maxdatapoints.png b/dist/images/graphite-maxdatapoints.png deleted file mode 100644 index 6ee561b..0000000 Binary files a/dist/images/graphite-maxdatapoints.png and /dev/null differ diff --git a/dist/images/influx-query.png b/dist/images/influx-query.png deleted file mode 100644 index 57e7bad..0000000 Binary files a/dist/images/influx-query.png and /dev/null differ diff --git a/dist/images/json-endpoint.png b/dist/images/json-endpoint.png deleted file mode 100644 index d84c42b..0000000 Binary files a/dist/images/json-endpoint.png and /dev/null differ diff --git a/dist/images/jsonp-endpoint.png b/dist/images/jsonp-endpoint.png deleted file mode 100644 index 15b84b3..0000000 Binary files a/dist/images/jsonp-endpoint.png and /dev/null differ diff --git a/dist/images/layers-2x.png b/dist/images/layers-2x.png deleted file mode 100644 index a2cf7f9..0000000 Binary files a/dist/images/layers-2x.png and /dev/null differ diff --git a/dist/images/layers.png b/dist/images/layers.png deleted file mode 100644 index bca0a0e..0000000 Binary files a/dist/images/layers.png and /dev/null differ diff --git a/dist/images/marker-icon-2x.png b/dist/images/marker-icon-2x.png deleted file mode 100644 index 0015b64..0000000 Binary files a/dist/images/marker-icon-2x.png and /dev/null differ diff --git a/dist/images/marker-icon.png b/dist/images/marker-icon.png deleted file mode 100644 index e2e9f75..0000000 Binary files a/dist/images/marker-icon.png and /dev/null differ diff --git a/dist/images/marker-shadow.png b/dist/images/marker-shadow.png deleted file mode 100644 index d1e773c..0000000 Binary files a/dist/images/marker-shadow.png and /dev/null differ diff --git a/dist/images/worldmap-geohash-query.png b/dist/images/worldmap-geohash-query.png deleted file mode 100644 index ea4d51b..0000000 Binary files a/dist/images/worldmap-geohash-query.png and /dev/null differ diff --git a/dist/images/worldmap-light-theme.png b/dist/images/worldmap-light-theme.png deleted file mode 100644 index 357af69..0000000 Binary files a/dist/images/worldmap-light-theme.png and /dev/null differ diff --git a/dist/images/worldmap-timeseries-query.png b/dist/images/worldmap-timeseries-query.png deleted file mode 100644 index 98a142f..0000000 Binary files a/dist/images/worldmap-timeseries-query.png and /dev/null differ diff --git a/dist/images/worldmap-usa.png b/dist/images/worldmap-usa.png deleted file mode 100644 index d59d710..0000000 Binary files a/dist/images/worldmap-usa.png and /dev/null differ diff --git a/dist/images/worldmap-world.png b/dist/images/worldmap-world.png deleted file mode 100644 index 2bdb9da..0000000 Binary files a/dist/images/worldmap-world.png and /dev/null differ diff --git a/dist/images/worldmap_logo.svg b/dist/images/worldmap_logo.svg deleted file mode 100644 index 0f01541..0000000 --- a/dist/images/worldmap_logo.svg +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dist/module.js b/dist/module.js deleted file mode 100644 index 590e261..0000000 --- a/dist/module.js +++ /dev/null @@ -1,44 +0,0 @@ -define(["lodash","app/plugins/sdk","app/core/time_series2","app/core/utils/kbn"],function(t,e,n,i){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},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 i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},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=4)}([function(e,n){e.exports=t},function(t,n){t.exports=e},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=function(t){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(t))))+" */"}(i),r=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[n].concat(r).concat([o]).join("\n")}return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o=0&&l.splice(e,1)}function f(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var i=n.nc;i&&(t.attrs.nonce=i)}return m(e,t.attrs),p(t,e),e}function m(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function g(t,e){var n,i,o,r;if(e.transform&&t.css){if(!(r="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var l=s++;n=a||(a=f(e)),i=v.bind(null,n,l,!1),o=v.bind(null,n,l,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",m(e,t.attrs),p(t,e),e}(e),i=function(t,e,n){var i=n.css,o=n.sourceMap,r=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||r)&&(i=u(i)),o&&(i+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([i],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),o=function(){d(n),n.href&&URL.revokeObjectURL(n.href)}):(n=f(e),i=function(t,e){var n=e.css,i=e.media;if(i&&t.setAttribute("media",i),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){d(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=c(t,e);return h(n,e),function(t){for(var o=[],r=0;rr.size(this.data.thresholds)+1;)this.panel.colors.pop();for(;r.size(this.panel.colors)-1)){if(!i.map){var n=new l.default(i,t[0]);n.createMap(),i.map=n}i.map.resize(),i.mapCenterMoved&&i.map.panToMapCenter(),!i.map.legend&&i.panel.showLegend&&i.map.createLegend(),i.map.drawCircles()}}}(),i.renderingCompleted()})},e.templateUrl="partials/module.html",e}(i.MetricsPanelCtrl);e.default=d},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var i=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,n):{};i.get||i.set?Object.defineProperty(e,n,i):e[n]=t[n]}return e.default=t,e}(n(0)),o=a(n(8)),r=a(n(9));function a(t){return t&&t.__esModule?t:{default:t}}var s=function(){function t(t){this.ctrl=t}return t.prototype.setValues=function(t){var e=this;if(this.ctrl.series&&this.ctrl.series.length>0){var n=0,o=Number.MAX_VALUE;this.ctrl.series.forEach(function(a){var s=i.last(a.datapoints),l=i.isArray(s)?s[0]:null,u=i.find(e.ctrl.locations,function(t){return t.key.toUpperCase()===a.alias.toUpperCase()});if(u)if(i.isString(l))t.push({key:a.alias,value:0,valueFormatted:l,valueRounded:0});else{var h={key:a.alias,locationName:u.name,locationLatitude:u.latitude,locationLongitude:u.longitude,value:a.stats[e.ctrl.panel.valueName],valueFormatted:l,valueRounded:0};h.value>n&&(n=h.value),h.value0){var i=0,r=Number.MAX_VALUE;t.forEach(function(t){if("table"===t.type){var a={};t.columns.forEach(function(t,e){a[t.text]=e}),t.rows.forEach(function(t){var s=t[a[n.ctrl.panel.esGeoPoint]],l=(0,o.default)(s),u=n.ctrl.panel.esLocationName?t[a[n.ctrl.panel.esLocationName]]:s,h=t[a[n.ctrl.panel.esMetric]],c=n.createDataValue(s,l,u,h);c.value>i&&(i=c.value),c.valuei&&(i=h.value),h.value0){var i=0,a=Number.MAX_VALUE;t[0].forEach(function(t){var s,l,u;if("geohash"===n.ctrl.panel.tableQueryOptions.queryType){var h=t[n.ctrl.panel.tableQueryOptions.geohashField],c=(0,o.default)(h);u=c.latitude,l=c.longitude,s=h}else s=(u=t[n.ctrl.panel.tableQueryOptions.latitudeField])+"_"+(l=t[n.ctrl.panel.tableQueryOptions.longitudeField]);var p={key:s,locationName:t[n.ctrl.panel.tableQueryOptions.labelField]||"n/a",locationLatitude:u,locationLongitude:l,value:t[n.ctrl.panel.tableQueryOptions.metricField],valueFormatted:t[n.ctrl.panel.tableQueryOptions.metricField],valueRounded:0};p.value>i&&(i=p.value),p.value0){var e=0,n=Number.MAX_VALUE;this.ctrl.series.forEach(function(i){var o={key:i.key,locationName:i.name,locationLatitude:i.latitude,locationLongitude:i.longitude,value:void 0!==i.value?i.value:1,valueRounded:0};o.value>e&&(e=o.value),o.value0&&e-1 in t)}x.fn=x.prototype={jquery:"3.3.1",constructor:x,length:0,toArray:function(){return l.call(this)},get:function(t){return null==t?l.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=x.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return x.each(this,t)},map:function(t){return this.pushStack(x.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n+~]|"+j+")"+j+"*"),W=new RegExp("="+j+"*([^\\]'\"]*?)"+j+"*\\]","g"),U=new RegExp(I),V=new RegExp("^"+Z+"$"),G={ID:new RegExp("^#("+Z+")"),CLASS:new RegExp("^\\.("+Z+")"),TAG:new RegExp("^("+Z+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+I),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+j+"*(even|odd|(([+-]|)(\\d*)n|)"+j+"*(?:([+-]|)"+j+"*(\\d+)|))"+j+"*\\)|)","i"),bool:new RegExp("^(?:"+O+")$","i"),needsContext:new RegExp("^"+j+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+j+"*((?:-\\d)?\\d*)"+j+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,$=/^h\d$/i,X=/^[^{]+\{\s*\[native \w/,K=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Q=new RegExp("\\\\([\\da-f]{1,6}"+j+"?|("+j+")|.)","ig"),tt=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},et=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,nt=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},it=function(){p()},ot=vt(function(t){return!0===t.disabled&&("form"in t||"label"in t)},{dir:"parentNode",next:"legend"});try{M.apply(P=S.call(C.childNodes),C.childNodes),P[C.childNodes.length].nodeType}catch(t){M={apply:P.length?function(t,e){z.apply(t,S.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function rt(t,e,i,o){var r,s,u,h,c,f,_,v=e&&e.ownerDocument,b=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==b&&9!==b&&11!==b)return i;if(!o&&((e?e.ownerDocument||e:C)!==d&&p(e),e=e||d,m)){if(11!==b&&(c=K.exec(t)))if(r=c[1]){if(9===b){if(!(u=e.getElementById(r)))return i;if(u.id===r)return i.push(u),i}else if(v&&(u=v.getElementById(r))&&y(e,u)&&u.id===r)return i.push(u),i}else{if(c[2])return M.apply(i,e.getElementsByTagName(t)),i;if((r=c[3])&&n.getElementsByClassName&&e.getElementsByClassName)return M.apply(i,e.getElementsByClassName(r)),i}if(n.qsa&&!L[t+" "]&&(!g||!g.test(t))){if(1!==b)v=e,_=t;else if("object"!==e.nodeName.toLowerCase()){for((h=e.getAttribute("id"))?h=h.replace(et,nt):e.setAttribute("id",h=A),s=(f=a(t)).length;s--;)f[s]="#"+h+" "+_t(f[s]);_=f.join(","),v=J.test(t)&&mt(e.parentNode)||e}if(_)try{return M.apply(i,v.querySelectorAll(_)),i}catch(t){}finally{h===A&&e.removeAttribute("id")}}}return l(t.replace(R,"$1"),e,i,o)}function at(){var t=[];return function e(n,o){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=o}}function st(t){return t[A]=!0,t}function lt(t){var e=d.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ut(t,e){for(var n=t.split("|"),o=n.length;o--;)i.attrHandle[n[o]]=e}function ht(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ct(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function pt(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function dt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ot(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ft(t){return st(function(e){return e=+e,st(function(n,i){for(var o,r=t([],n.length,e),a=r.length;a--;)n[o=r[a]]&&(n[o]=!(i[o]=n[o]))})})}function mt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=rt.support={},r=rt.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},p=rt.setDocument=function(t){var e,o,a=t?t.ownerDocument||t:C;return a!==d&&9===a.nodeType&&a.documentElement?(f=(d=a).documentElement,m=!r(d),C!==d&&(o=d.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",it,!1):o.attachEvent&&o.attachEvent("onunload",it)),n.attributes=lt(function(t){return t.className="i",!t.getAttribute("className")}),n.getElementsByTagName=lt(function(t){return t.appendChild(d.createComment("")),!t.getElementsByTagName("*").length}),n.getElementsByClassName=X.test(d.getElementsByClassName),n.getById=lt(function(t){return f.appendChild(t).id=A,!d.getElementsByName||!d.getElementsByName(A).length}),n.getById?(i.filter.ID=function(t){var e=t.replace(Q,tt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(Q,tt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n,i,o,r=e.getElementById(t);if(r){if((n=r.getAttributeNode("id"))&&n.value===t)return[r];for(o=e.getElementsByName(t),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===t)return[r]}return[]}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},_=[],g=[],(n.qsa=X.test(d.querySelectorAll))&&(lt(function(t){f.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+j+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\["+j+"*(?:value|"+O+")"),t.querySelectorAll("[id~="+A+"-]").length||g.push("~="),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+A+"+*").length||g.push(".#.+[+~]")}),lt(function(t){t.innerHTML="";var e=d.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name"+j+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")})),(n.matchesSelector=X.test(v=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&<(function(t){n.disconnectedMatch=v.call(t,"*"),v.call(t,"[s!='']:x"),_.push("!=",I)}),g=g.length&&new RegExp(g.join("|")),_=_.length&&new RegExp(_.join("|")),e=X.test(f.compareDocumentPosition),y=e||X.test(f.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},T=e?function(t,e){if(t===e)return c=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t===d||t.ownerDocument===C&&y(C,t)?-1:e===d||e.ownerDocument===C&&y(C,e)?1:h?D(h,t)-D(h,e):0:4&i?-1:1)}:function(t,e){if(t===e)return c=!0,0;var n,i=0,o=t.parentNode,r=e.parentNode,a=[t],s=[e];if(!o||!r)return t===d?-1:e===d?1:o?-1:r?1:h?D(h,t)-D(h,e):0;if(o===r)return ht(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;a[i]===s[i];)i++;return i?ht(a[i],s[i]):a[i]===C?-1:s[i]===C?1:0},d):d},rt.matches=function(t,e){return rt(t,null,null,e)},rt.matchesSelector=function(t,e){if((t.ownerDocument||t)!==d&&p(t),e=e.replace(W,"='$1']"),n.matchesSelector&&m&&!L[e+" "]&&(!_||!_.test(e))&&(!g||!g.test(e)))try{var i=v.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){}return rt(e,d,null,[t]).length>0},rt.contains=function(t,e){return(t.ownerDocument||t)!==d&&p(t),y(t,e)},rt.attr=function(t,e){(t.ownerDocument||t)!==d&&p(t);var o=i.attrHandle[e.toLowerCase()],r=o&&E.call(i.attrHandle,e.toLowerCase())?o(t,e,!m):void 0;return void 0!==r?r:n.attributes||!m?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},rt.escape=function(t){return(t+"").replace(et,nt)},rt.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},rt.uniqueSort=function(t){var e,i=[],o=0,r=0;if(c=!n.detectDuplicates,h=!n.sortStable&&t.slice(0),t.sort(T),c){for(;e=t[r++];)e===t[r]&&(o=i.push(r));for(;o--;)t.splice(i[o],1)}return h=null,t},o=rt.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=o(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=o(e);return n},(i=rt.selectors={cacheLength:50,createPseudo:st,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Q,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(Q,tt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||rt.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&rt.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return G.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&U.test(n)&&(e=a(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Q,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=w[t+" "];return e||(e=new RegExp("(^|"+j+")"+t+"("+j+"|$)"))&&w(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(i){var o=rt.attr(i,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o.replace(F," ")+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,o){var r="nth"!==t.slice(0,3),a="last"!==t.slice(-4),s="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var u,h,c,p,d,f,m=r!==a?"nextSibling":"previousSibling",g=e.parentNode,_=s&&e.nodeName.toLowerCase(),v=!l&&!s,y=!1;if(g){if(r){for(;m;){for(p=e;p=p[m];)if(s?p.nodeName.toLowerCase()===_:1===p.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[a?g.firstChild:g.lastChild],a&&v){for(y=(d=(u=(h=(c=(p=g)[A]||(p[A]={}))[p.uniqueID]||(c[p.uniqueID]={}))[t]||[])[0]===b&&u[1])&&u[2],p=d&&g.childNodes[d];p=++d&&p&&p[m]||(y=d=0)||f.pop();)if(1===p.nodeType&&++y&&p===e){h[t]=[b,d,y];break}}else if(v&&(y=d=(u=(h=(c=(p=e)[A]||(p[A]={}))[p.uniqueID]||(c[p.uniqueID]={}))[t]||[])[0]===b&&u[1]),!1===y)for(;(p=++d&&p&&p[m]||(y=d=0)||f.pop())&&((s?p.nodeName.toLowerCase()!==_:1!==p.nodeType)||!++y||(v&&((h=(c=p[A]||(p[A]={}))[p.uniqueID]||(c[p.uniqueID]={}))[t]=[b,y]),p!==e)););return(y-=o)===i||y%i==0&&y/i>=0}}},PSEUDO:function(t,e){var n,o=i.pseudos[t]||i.setFilters[t.toLowerCase()]||rt.error("unsupported pseudo: "+t);return o[A]?o(e):o.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?st(function(t,n){for(var i,r=o(t,e),a=r.length;a--;)t[i=D(t,r[a])]=!(n[i]=r[a])}):function(t){return o(t,0,n)}):o}},pseudos:{not:st(function(t){var e=[],n=[],i=s(t.replace(R,"$1"));return i[A]?st(function(t,e,n,o){for(var r,a=i(t,null,o,[]),s=t.length;s--;)(r=a[s])&&(t[s]=!(e[s]=r))}):function(t,o,r){return e[0]=t,i(e,null,r,n),e[0]=null,!n.pop()}}),has:st(function(t){return function(e){return rt(t,e).length>0}}),contains:st(function(t){return t=t.replace(Q,tt),function(e){return(e.textContent||e.innerText||o(e)).indexOf(t)>-1}}),lang:st(function(t){return V.test(t||"")||rt.error("unsupported lang: "+t),t=t.replace(Q,tt).toLowerCase(),function(e){var n;do{if(n=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:dt(!1),disabled:dt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return $.test(t.nodeName)},input:function(t){return Y.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ft(function(){return[0]}),last:ft(function(t,e){return[e-1]}),eq:ft(function(t,e,n){return[n<0?n+e:n]}),even:ft(function(t,e){for(var n=0;n=0;)t.push(i);return t}),gt:ft(function(t,e,n){for(var i=n<0?n+e:n;++i1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function At(t,e,n,i,o){for(var r,a=[],s=0,l=t.length,u=null!=e;s-1&&(r[u]=!(a[u]=c))}}else _=At(_===a?_.splice(f,_.length):_),o?o(null,a,_,l):M.apply(a,_)})}function bt(t){for(var e,n,o,r=t.length,a=i.relative[t[0].type],s=a||i.relative[" "],l=a?1:0,h=vt(function(t){return t===e},s,!0),c=vt(function(t){return D(e,t)>-1},s,!0),p=[function(t,n,i){var o=!a&&(i||n!==u)||((e=n).nodeType?h(t,n,i):c(t,n,i));return e=null,o}];l1&&yt(p),l>1&&_t(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(R,"$1"),n,l0,o=t.length>0,r=function(r,a,s,l,h){var c,f,g,_=0,v="0",y=r&&[],A=[],C=u,x=r||o&&i.find.TAG("*",h),w=b+=null==C?1:Math.random()||.1,B=x.length;for(h&&(u=a===d||a||h);v!==B&&null!=(c=x[v]);v++){if(o&&c){for(f=0,a||c.ownerDocument===d||(p(c),s=!m);g=t[f++];)if(g(c,a||d,s)){l.push(c);break}h&&(b=w)}n&&((c=!g&&c)&&_--,r&&y.push(c))}if(_+=v,n&&v!==_){for(f=0;g=e[f++];)g(y,A,a,s);if(r){if(_>0)for(;v--;)y[v]||A[v]||(A[v]=k.call(l));A=At(A)}M.apply(l,A),h&&!r&&A.length>0&&_+e.length>1&&rt.uniqueSort(l)}return h&&(b=w,u=C),y};return n?st(r):r}(r,o))).selector=t}return s},l=rt.select=function(t,e,n,o){var r,l,u,h,c,p="function"==typeof t&&t,d=!o&&a(t=p.selector||t);if(n=n||[],1===d.length){if((l=d[0]=d[0].slice(0)).length>2&&"ID"===(u=l[0]).type&&9===e.nodeType&&m&&i.relative[l[1].type]){if(!(e=(i.find.ID(u.matches[0].replace(Q,tt),e)||[])[0]))return n;p&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(r=G.needsContext.test(t)?0:l.length;r--&&(u=l[r],!i.relative[h=u.type]);)if((c=i.find[h])&&(o=c(u.matches[0].replace(Q,tt),J.test(l[0].type)&&mt(e.parentNode)||e))){if(l.splice(r,1),!(t=o.length&&_t(l)))return M.apply(n,o),n;break}}return(p||s(t,d))(o,e,!m,n,!e||J.test(t)&&mt(e.parentNode)||e),n},n.sortStable=A.split("").sort(T).join("")===A,n.detectDuplicates=!!c,p(),n.sortDetached=lt(function(t){return 1&t.compareDocumentPosition(d.createElement("fieldset"))}),lt(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||ut("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),n.attributes&<(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||ut("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),lt(function(t){return null==t.getAttribute("disabled")})||ut(O,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),rt}(n);x.find=L,x.expr=L.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=L.uniqueSort,x.text=L.getText,x.isXMLDoc=L.isXML,x.contains=L.contains,x.escapeSelector=L.escape;var T=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&x(t).is(n))break;i.push(t)}return i},E=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},P=x.expr.match.needsContext;function k(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var z=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function M(t,e,n){return v(e)?x.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?x.grep(t,function(t){return t===e!==n}):"string"!=typeof e?x.grep(t,function(t){return c.call(e,t)>-1!==n}):x.filter(e,t,n)}x.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?x.find.matchesSelector(i,t)?[i]:[]:x.find.matches(t,x.grep(e,function(t){return 1===t.nodeType}))},x.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(x(t).filter(function(){for(e=0;e1?x.uniqueSort(n):n},filter:function(t){return this.pushStack(M(this,t||[],!1))},not:function(t){return this.pushStack(M(this,t||[],!0))},is:function(t){return!!M(this,"string"==typeof t&&P.test(t)?x(t):t||[],!1).length}});var S,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||S,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:D.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof x?e[0]:e,x.merge(this,x.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:a,!0)),z.test(i[1])&&x.isPlainObject(e))for(i in e)v(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(o=a.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):v(t)?void 0!==n.ready?n.ready(t):t(x):x.makeArray(t,this)}).prototype=x.fn,S=x(a);var O=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function Z(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}x.fn.extend({has:function(t){var e=x(t,this),n=e.length;return this.filter(function(){for(var t=0;t-1:1===n.nodeType&&x.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?x.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?c.call(x(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),x.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return T(t,"parentNode")},parentsUntil:function(t,e,n){return T(t,"parentNode",n)},next:function(t){return Z(t,"nextSibling")},prev:function(t){return Z(t,"previousSibling")},nextAll:function(t){return T(t,"nextSibling")},prevAll:function(t){return T(t,"previousSibling")},nextUntil:function(t,e,n){return T(t,"nextSibling",n)},prevUntil:function(t,e,n){return T(t,"previousSibling",n)},siblings:function(t){return E((t.parentNode||{}).firstChild,t)},children:function(t){return E(t.firstChild)},contents:function(t){return k(t,"iframe")?t.contentDocument:(k(t,"template")&&(t=t.content||t),x.merge([],t.childNodes))}},function(t,e){x.fn[t]=function(n,i){var o=x.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=x.filter(i,o)),this.length>1&&(j[t]||x.uniqueSort(o),O.test(t)&&o.reverse()),this.pushStack(o)}});var N=/[^\x20\t\r\n\f]+/g;function I(t){return t}function F(t){throw t}function R(t,e,n,i){var o;try{t&&v(o=t.promise)?o.call(t).done(e).fail(n):t&&v(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}x.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return x.each(t.match(N)||[],function(t,n){e[n]=!0}),e}(t):x.extend({},t);var e,n,i,o,r=[],a=[],s=-1,l=function(){for(o=o||t.once,i=e=!0;a.length;s=-1)for(n=a.shift();++s-1;)r.splice(n,1),n<=s&&s--}),this},has:function(t){return t?x.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=a=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=a=[],n||e||(r=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},x.extend({Deferred:function(t){var e=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return x.Deferred(function(n){x.each(e,function(e,i){var o=v(t[i[4]])&&t[i[4]];r[i[1]](function(){var t=o&&o.apply(this,arguments);t&&v(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,o?[t]:arguments)})}),t=null}).promise()},then:function(t,i,o){var r=0;function a(t,e,i,o){return function(){var s=this,l=arguments,u=function(){var n,u;if(!(t=r&&(i!==F&&(s=void 0,l=[n]),e.rejectWith(s,l))}};t?h():(x.Deferred.getStackHook&&(h.stackTrace=x.Deferred.getStackHook()),n.setTimeout(h))}}return x.Deferred(function(n){e[0][3].add(a(0,n,v(o)?o:I,n.notifyWith)),e[1][3].add(a(0,n,v(t)?t:I)),e[2][3].add(a(0,n,v(i)?i:F))}).promise()},promise:function(t){return null!=t?x.extend(t,o):o}},r={};return x.each(e,function(t,n){var a=n[2],s=n[5];o[n[1]]=a.add,s&&a.add(function(){i=s},e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),a.add(n[3].fire),r[n[0]]=function(){return r[n[0]+"With"](this===r?void 0:this,arguments),this},r[n[0]+"With"]=a.fireWith}),o.promise(r),t&&t.call(r,r),r},when:function(t){var e=arguments.length,n=e,i=Array(n),o=l.call(arguments),r=x.Deferred(),a=function(t){return function(n){i[t]=this,o[t]=arguments.length>1?l.call(arguments):n,--e||r.resolveWith(i,o)}};if(e<=1&&(R(t,r.done(a(n)).resolve,r.reject,!e),"pending"===r.state()||v(o[n]&&o[n].then)))return r.then();for(;n--;)R(o[n],a(n),r.reject);return r.promise()}});var q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&q.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},x.readyException=function(t){n.setTimeout(function(){throw t})};var H=x.Deferred();function W(){a.removeEventListener("DOMContentLoaded",W),n.removeEventListener("load",W),x.ready()}x.fn.ready=function(t){return H.then(t).catch(function(t){x.readyException(t)}),this},x.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==t&&--x.readyWait>0||H.resolveWith(a,[x]))}}),x.ready.then=H.then,"complete"===a.readyState||"loading"!==a.readyState&&!a.documentElement.doScroll?n.setTimeout(x.ready):(a.addEventListener("DOMContentLoaded",W),n.addEventListener("load",W));var U=function(t,e,n,i,o,r,a){var s=0,l=t.length,u=null==n;if("object"===b(n))for(s in o=!0,n)U(t,e,s,n[s],!0,r,a);else if(void 0!==i&&(o=!0,v(i)||(a=!0),u&&(a?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(x(t),n)})),e))for(;s1,null,!0)},removeData:function(t){return this.each(function(){Q.remove(this,t)})}}),x.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=J.get(t,e),n&&(!i||Array.isArray(n)?i=J.access(t,e,x.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=x.queue(t,e),i=n.length,o=n.shift(),r=x._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,function(){x.dequeue(t,e)},r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return J.get(t,n)||J.access(t,n,{empty:x.Callbacks("once memory").add(function(){J.remove(t,[e+"queue",n])})})}}),x.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]+)/i,ft=/^$|^module$|\/(?:java|ecma)script/i,mt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function gt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&k(t,e)?x.merge([t],n):n}function _t(t,e){for(var n=0,i=t.length;n-1)o&&o.push(r);else if(u=x.contains(r.ownerDocument,r),a=gt(c.appendChild(r),"script"),u&&_t(a),n)for(h=0;r=a[h++];)ft.test(r.type||"")&&n.push(r);return c}!function(){var t=a.createDocumentFragment().appendChild(a.createElement("div")),e=a.createElement("input");e.setAttribute("type","radio"),e.setAttribute("checked","checked"),e.setAttribute("name","t"),t.appendChild(e),_.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",_.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var At=a.documentElement,Ct=/^key/,bt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,xt=/^([^.]*)(?:\.(.+)|)/;function wt(){return!0}function Bt(){return!1}function Lt(){try{return a.activeElement}catch(t){}}function Tt(t,e,n,i,o,r){var a,s;if("object"==typeof e){for(s in"string"!=typeof n&&(i=i||n,n=void 0),e)Tt(t,s,n,i,e[s],r);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=Bt;else if(!o)return t;return 1===r&&(a=o,(o=function(t){return x().off(t),a.apply(this,arguments)}).guid=a.guid||(a.guid=x.guid++)),t.each(function(){x.event.add(this,e,o,i,n)})}x.event={global:{},add:function(t,e,n,i,o){var r,a,s,l,u,h,c,p,d,f,m,g=J.get(t);if(g)for(n.handler&&(n=(r=n).handler,o=r.selector),o&&x.find.matchesSelector(At,o),n.guid||(n.guid=x.guid++),(l=g.events)||(l=g.events={}),(a=g.handle)||(a=g.handle=function(e){return void 0!==x&&x.event.triggered!==e.type?x.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(N)||[""]).length;u--;)d=m=(s=xt.exec(e[u])||[])[1],f=(s[2]||"").split(".").sort(),d&&(c=x.event.special[d]||{},d=(o?c.delegateType:c.bindType)||d,c=x.event.special[d]||{},h=x.extend({type:d,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:f.join(".")},r),(p=l[d])||((p=l[d]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(t,i,f,a)||t.addEventListener&&t.addEventListener(d,a)),c.add&&(c.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,h):p.push(h),x.event.global[d]=!0)},remove:function(t,e,n,i,o){var r,a,s,l,u,h,c,p,d,f,m,g=J.hasData(t)&&J.get(t);if(g&&(l=g.events)){for(u=(e=(e||"").match(N)||[""]).length;u--;)if(d=m=(s=xt.exec(e[u])||[])[1],f=(s[2]||"").split(".").sort(),d){for(c=x.event.special[d]||{},p=l[d=(i?c.delegateType:c.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=p.length;r--;)h=p[r],!o&&m!==h.origType||n&&n.guid!==h.guid||s&&!s.test(h.namespace)||i&&i!==h.selector&&("**"!==i||!h.selector)||(p.splice(r,1),h.selector&&p.delegateCount--,c.remove&&c.remove.call(t,h));a&&!p.length&&(c.teardown&&!1!==c.teardown.call(t,f,g.handle)||x.removeEvent(t,d,g.handle),delete l[d])}else for(d in l)x.event.remove(t,d+e[u],n,i,!0);x.isEmptyObject(l)&&J.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,r,a,s=x.event.fix(t),l=new Array(arguments.length),u=(J.get(this,"events")||{})[s.type]||[],h=x.event.special[s.type]||{};for(l[0]=s,e=1;e=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(r=[],a={},n=0;n-1:x.find(o,this,null,[u]).length),a[o]&&r.push(i);r.length&&s.push({elem:u,handlers:r})}return u=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,Pt=/\s*$/g;function Mt(t,e){return k(t,"table")&&k(11!==e.nodeType?e:e.firstChild,"tr")&&x(t).children("tbody")[0]||t}function St(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Dt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ot(t,e){var n,i,o,r,a,s,l,u;if(1===e.nodeType){if(J.hasData(t)&&(r=J.access(t),a=J.set(e,r),u=r.events))for(o in delete a.handle,a.events={},u)for(n=0,i=u[o].length;n1&&"string"==typeof f&&!_.checkClone&&kt.test(f))return t.each(function(o){var r=t.eq(o);m&&(e[0]=f.call(this,o,r.html())),Zt(r,e,n,i)});if(p&&(r=(o=yt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(s=(a=x.map(gt(o,"script"),St)).length;c")},clone:function(t,e,n){var i,o,r,a,s=t.cloneNode(!0),l=x.contains(t.ownerDocument,t);if(!(_.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||x.isXMLDoc(t)))for(a=gt(s),i=0,o=(r=gt(t)).length;i0&&_t(a,!l&>(t,"script")),s},cleanData:function(t){for(var e,n,i,o=x.event.special,r=0;void 0!==(n=t[r]);r++)if(X(n)){if(e=n[J.expando]){if(e.events)for(i in e.events)o[i]?x.event.remove(n,i):x.removeEvent(n,i,e.handle);n[J.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),x.fn.extend({detach:function(t){return Nt(this,t,!0)},remove:function(t){return Nt(this,t)},text:function(t){return U(this,function(t){return void 0===t?x.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Zt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Mt(this,t).appendChild(t)})},prepend:function(){return Zt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Mt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Zt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Zt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(x.cleanData(gt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return x.clone(this,t,e)})},html:function(t){return U(this,function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Pt.test(t)&&!mt[(dt.exec(t)||["",""])[1].toLowerCase()]){t=x.htmlPrefilter(t);try{for(;n=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-l-s-.5))),l}function Qt(t,e,n){var i=Ft(t),o=qt(t,e,i),r="border-box"===x.css(t,"boxSizing",!1,i),a=r;if(It.test(o)){if(!n)return o;o="auto"}return a=a&&(_.boxSizingReliable()||o===t.style[e]),("auto"===o||!parseFloat(o)&&"inline"===x.css(t,"display",!1,i))&&(o=t["offset"+e[0].toUpperCase()+e.slice(1)],a=!0),(o=parseFloat(o)||0)+Jt(t,e,n||(r?"border":"content"),a,i,o)+"px"}function te(t,e,n,i,o){return new te.prototype.init(t,e,n,i,o)}x.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=qt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,a,s=$(e),l=Ut.test(e),u=t.style;if(l||(e=Xt(s)),a=x.cssHooks[e]||x.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(o=a.get(t,!1,i))?o:u[e];"string"==(r=typeof n)&&(o=ot.exec(n))&&o[1]&&(n=lt(t,e,o),r="number"),null!=n&&n==n&&("number"===r&&(n+=o&&o[3]||(x.cssNumber[s]?"":"px")),_.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,i))||(l?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,i){var o,r,a,s=$(e);return Ut.test(e)||(e=Xt(s)),(a=x.cssHooks[e]||x.cssHooks[s])&&"get"in a&&(o=a.get(t,!0,n)),void 0===o&&(o=qt(t,e,i)),"normal"===o&&e in Gt&&(o=Gt[e]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),x.each(["height","width"],function(t,e){x.cssHooks[e]={get:function(t,n,i){if(n)return!Wt.test(x.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?Qt(t,e,i):st(t,Vt,function(){return Qt(t,e,i)})},set:function(t,n,i){var o,r=Ft(t),a="border-box"===x.css(t,"boxSizing",!1,r),s=i&&Jt(t,e,i,a,r);return a&&_.scrollboxSize()===r.position&&(s-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(r[e])-Jt(t,e,"border",!1,r)-.5)),s&&(o=ot.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=x.css(t,e)),Kt(0,n,s)}}}),x.cssHooks.marginLeft=Ht(_.reliableMarginLeft,function(t,e){if(e)return(parseFloat(qt(t,"marginLeft"))||t.getBoundingClientRect().left-st(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),x.each({margin:"",padding:"",border:"Width"},function(t,e){x.cssHooks[t+e]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+rt[i]+e]=r[i]||r[i-2]||r[0];return o}},"margin"!==t&&(x.cssHooks[t+e].set=Kt)}),x.fn.extend({css:function(t,e){return U(this,function(t,e,n){var i,o,r={},a=0;if(Array.isArray(e)){for(i=Ft(t),o=e.length;a1)}}),x.Tween=te,te.prototype={constructor:te,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||x.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(x.cssNumber[n]?"":"px")},cur:function(){var t=te.propHooks[this.prop];return t&&t.get?t.get(this):te.propHooks._default.get(this)},run:function(t){var e,n=te.propHooks[this.prop];return this.options.duration?this.pos=e=x.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):te.propHooks._default.set(this),this}},te.prototype.init.prototype=te.prototype,te.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=x.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){x.fx.step[t.prop]?x.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[x.cssProps[t.prop]]&&!x.cssHooks[t.prop]?t.elem[t.prop]=t.now:x.style(t.elem,t.prop,t.now+t.unit)}}},te.propHooks.scrollTop=te.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},x.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},x.fx=te.prototype.init,x.fx.step={};var ee,ne,ie=/^(?:toggle|show|hide)$/,oe=/queueHooks$/;function re(){ne&&(!1===a.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(re):n.setTimeout(re,x.fx.interval),x.fx.tick())}function ae(){return n.setTimeout(function(){ee=void 0}),ee=Date.now()}function se(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)o["margin"+(n=rt[i])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function le(t,e,n){for(var i,o=(ue.tweeners[e]||[]).concat(ue.tweeners["*"]),r=0,a=o.length;r1)},removeAttr:function(t){return this.each(function(){x.removeAttr(this,t)})}}),x.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?x.prop(t,e,n):(1===r&&x.isXMLDoc(t)||(o=x.attrHooks[e.toLowerCase()]||(x.expr.match.bool.test(e)?he:void 0)),void 0!==n?null===n?void x.removeAttr(t,e):o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:null==(i=x.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!_.radioValue&&"radio"===e&&k(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,o=e&&e.match(N);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),he={set:function(t,e,n){return!1===e?x.removeAttr(t,n):t.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ce[e]||x.find.attr;ce[e]=function(t,e,i){var o,r,a=e.toLowerCase();return i||(r=ce[a],ce[a]=o,o=null!=n(t,e,i)?a:null,ce[a]=r),o}});var pe=/^(?:input|select|textarea|button)$/i,de=/^(?:a|area)$/i;function fe(t){return(t.match(N)||[]).join(" ")}function me(t){return t.getAttribute&&t.getAttribute("class")||""}function ge(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(N)||[]}x.fn.extend({prop:function(t,e){return U(this,x.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[x.propFix[t]||t]})}}),x.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&x.isXMLDoc(t)||(e=x.propFix[e]||e,o=x.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=x.find.attr(t,"tabindex");return e?parseInt(e,10):pe.test(t.nodeName)||de.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_.optSelected||(x.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.fn.extend({addClass:function(t){var e,n,i,o,r,a,s,l=0;if(v(t))return this.each(function(e){x(this).addClass(t.call(this,e,me(this)))});if((e=ge(t)).length)for(;n=this[l++];)if(o=me(n),i=1===n.nodeType&&" "+fe(o)+" "){for(a=0;r=e[a++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(s=fe(i))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,i,o,r,a,s,l=0;if(v(t))return this.each(function(e){x(this).removeClass(t.call(this,e,me(this)))});if(!arguments.length)return this.attr("class","");if((e=ge(t)).length)for(;n=this[l++];)if(o=me(n),i=1===n.nodeType&&" "+fe(o)+" "){for(a=0;r=e[a++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o!==(s=fe(i))&&n.setAttribute("class",s)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"==typeof e&&i?e?this.addClass(t):this.removeClass(t):v(t)?this.each(function(n){x(this).toggleClass(t.call(this,n,me(this),e),e)}):this.each(function(){var e,o,r,a;if(i)for(o=0,r=x(this),a=ge(t);e=a[o++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||((e=me(this))&&J.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":J.get(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+fe(me(n))+" ").indexOf(e)>-1)return!0;return!1}});var _e=/\r/g;x.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=v(t),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,x(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=x.map(o,function(t){return null==t?"":t+""})),(e=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))})):o?(e=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(_e,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(t){var e=x.find.attr(t,"value");return null!=e?e:fe(x.text(t))}},select:{get:function(t){var e,n,i,o=t.options,r=t.selectedIndex,a="select-one"===t.type,s=a?null:[],l=a?r+1:o.length;for(i=r<0?l:a?r:0;i-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=x.inArray(x(t).val(),e)>-1}},_.checkOn||(x.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),_.focusin="onfocusin"in n;var ve=/^(?:focusinfocus|focusoutblur)$/,ye=function(t){t.stopPropagation()};x.extend(x.event,{trigger:function(t,e,i,o){var r,s,l,u,h,c,p,d,m=[i||a],g=f.call(t,"type")?t.type:t,_=f.call(t,"namespace")?t.namespace.split("."):[];if(s=d=l=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!ve.test(g+x.event.triggered)&&(g.indexOf(".")>-1&&(g=(_=g.split(".")).shift(),_.sort()),h=g.indexOf(":")<0&&"on"+g,(t=t[x.expando]?t:new x.Event(g,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=_.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:x.makeArray(e,[t]),p=x.event.special[g]||{},o||!p.trigger||!1!==p.trigger.apply(i,e))){if(!o&&!p.noBubble&&!y(i)){for(u=p.delegateType||g,ve.test(u+g)||(s=s.parentNode);s;s=s.parentNode)m.push(s),l=s;l===(i.ownerDocument||a)&&m.push(l.defaultView||l.parentWindow||n)}for(r=0;(s=m[r++])&&!t.isPropagationStopped();)d=s,t.type=r>1?u:p.bindType||g,(c=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&c.apply(s,e),(c=h&&s[h])&&c.apply&&X(s)&&(t.result=c.apply(s,e),!1===t.result&&t.preventDefault());return t.type=g,o||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(m.pop(),e)||!X(i)||h&&v(i[g])&&!y(i)&&((l=i[h])&&(i[h]=null),x.event.triggered=g,t.isPropagationStopped()&&d.addEventListener(g,ye),i[g](),t.isPropagationStopped()&&d.removeEventListener(g,ye),x.event.triggered=void 0,l&&(i[h]=l)),t.result}},simulate:function(t,e,n){var i=x.extend(new x.Event,n,{type:t,isSimulated:!0});x.event.trigger(i,null,e)}}),x.fn.extend({trigger:function(t,e){return this.each(function(){x.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return x.event.trigger(t,e,n,!0)}}),_.focusin||x.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){x.event.simulate(e,t.target,x.event.fix(t))};x.event.special[e]={setup:function(){var i=this.ownerDocument||this,o=J.access(i,e);o||i.addEventListener(t,n,!0),J.access(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=J.access(i,e)-1;o?J.access(i,e,o):(i.removeEventListener(t,n,!0),J.remove(i,e))}}});var Ae=n.location,Ce=Date.now(),be=/\?/;x.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+t),e};var xe=/\[\]$/,we=/\r?\n/g,Be=/^(?:submit|button|image|reset|file)$/i,Le=/^(?:input|select|textarea|keygen)/i;function Te(t,e,n,i){var o;if(Array.isArray(e))x.each(e,function(e,o){n||xe.test(t)?i(t,o):Te(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)});else if(n||"object"!==b(e))i(t,e);else for(o in e)Te(t+"["+o+"]",e[o],n,i)}x.param=function(t,e){var n,i=[],o=function(t,e){var n=v(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(t)||t.jquery&&!x.isPlainObject(t))x.each(t,function(){o(this.name,this.value)});else for(n in t)Te(n,t[n],e,o);return i.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=x.prop(this,"elements");return t?x.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!x(this).is(":disabled")&&Le.test(this.nodeName)&&!Be.test(t)&&(this.checked||!pt.test(t))}).map(function(t,e){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,function(t){return{name:e.name,value:t.replace(we,"\r\n")}}):{name:e.name,value:n.replace(we,"\r\n")}}).get()}});var Ee=/%20/g,Pe=/#.*$/,ke=/([?&])_=[^&]*/,ze=/^(.*?):[ \t]*([^\r\n]*)$/gm,Me=/^(?:GET|HEAD)$/,Se=/^\/\//,De={},Oe={},je="*/".concat("*"),Ze=a.createElement("a");function Ne(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,r=e.toLowerCase().match(N)||[];if(v(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Ie(t,e,n,i){var o={},r=t===Oe;function a(s){var l;return o[s]=!0,x.each(t[s]||[],function(t,s){var u=s(e,n,i);return"string"!=typeof u||r||o[u]?r?!(l=u):void 0:(e.dataTypes.unshift(u),a(u),!1)}),l}return a(e.dataTypes[0])||!o["*"]&&a("*")}function Fe(t,e){var n,i,o=x.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&x.extend(!0,t,i),t}Ze.href=Ae.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ae.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ae.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":je,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Fe(Fe(t,x.ajaxSettings),e):Fe(x.ajaxSettings,t)},ajaxPrefilter:Ne(De),ajaxTransport:Ne(Oe),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,o,r,s,l,u,h,c,p,d,f=x.ajaxSetup({},e),m=f.context||f,g=f.context&&(m.nodeType||m.jquery)?x(m):x.event,_=x.Deferred(),v=x.Callbacks("once memory"),y=f.statusCode||{},A={},C={},b="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(h){if(!s)for(s={};e=ze.exec(r);)s[e[1].toLowerCase()]=e[2];e=s[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return h?r:null},setRequestHeader:function(t,e){return null==h&&(t=C[t.toLowerCase()]=C[t.toLowerCase()]||t,A[t]=e),this},overrideMimeType:function(t){return null==h&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(h)w.always(t[w.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||b;return i&&i.abort(e),B(0,e),this}};if(_.promise(w),f.url=((t||f.url||Ae.href)+"").replace(Se,Ae.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(N)||[""],null==f.crossDomain){u=a.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Ze.protocol+"//"+Ze.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=x.param(f.data,f.traditional)),Ie(De,f,e,w),h)return w;for(p in(c=x.event&&f.global)&&0==x.active++&&x.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Me.test(f.type),o=f.url.replace(Pe,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Ee,"+")):(d=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(be.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(ke,"$1"),d=(be.test(o)?"&":"?")+"_="+Ce+++d),f.url=o+d),f.ifModified&&(x.lastModified[o]&&w.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&w.setRequestHeader("If-None-Match",x.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&w.setRequestHeader("Content-Type",f.contentType),w.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+je+"; q=0.01":""):f.accepts["*"]),f.headers)w.setRequestHeader(p,f.headers[p]);if(f.beforeSend&&(!1===f.beforeSend.call(m,w,f)||h))return w.abort();if(b="abort",v.add(f.complete),w.done(f.success),w.fail(f.error),i=Ie(Oe,f,e,w)){if(w.readyState=1,c&&g.trigger("ajaxSend",[w,f]),h)return w;f.async&&f.timeout>0&&(l=n.setTimeout(function(){w.abort("timeout")},f.timeout));try{h=!1,i.send(A,B)}catch(t){if(h)throw t;B(-1,t)}}else B(-1,"No Transport");function B(t,e,a,s){var u,p,d,A,C,b=e;h||(h=!0,l&&n.clearTimeout(l),i=void 0,r=s||"",w.readyState=t>0?4:0,u=t>=200&&t<300||304===t,a&&(A=function(t,e,n){for(var i,o,r,a,s=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(o in s)if(s[o]&&s[o].test(i)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||t.converters[o+" "+l[0]]){r=o;break}a||(a=o)}r=r||a}if(r)return r!==l[0]&&l.unshift(r),n[r]}(f,w,a)),A=function(t,e,n,i){var o,r,a,s,l,u={},h=t.dataTypes.slice();if(h[1])for(a in t.converters)u[a.toLowerCase()]=t.converters[a];for(r=h.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=h.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=u[l+" "+r]||u["* "+r]))for(o in u)if((s=o.split(" "))[1]===r&&(a=u[l+" "+s[0]]||u["* "+s[0]])){!0===a?a=u[o]:!0!==u[o]&&(r=s[0],h.unshift(s[1]));break}if(!0!==a)if(a&&t.throws)e=a(e);else try{e=a(e)}catch(t){return{state:"parsererror",error:a?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}(f,A,w,u),u?(f.ifModified&&((C=w.getResponseHeader("Last-Modified"))&&(x.lastModified[o]=C),(C=w.getResponseHeader("etag"))&&(x.etag[o]=C)),204===t||"HEAD"===f.type?b="nocontent":304===t?b="notmodified":(b=A.state,p=A.data,u=!(d=A.error))):(d=b,!t&&b||(b="error",t<0&&(t=0))),w.status=t,w.statusText=(e||b)+"",u?_.resolveWith(m,[p,b,w]):_.rejectWith(m,[w,b,d]),w.statusCode(y),y=void 0,c&&g.trigger(u?"ajaxSuccess":"ajaxError",[w,f,u?p:d]),v.fireWith(m,[w,b]),c&&(g.trigger("ajaxComplete",[w,f]),--x.active||x.event.trigger("ajaxStop")))}return w},getJSON:function(t,e,n){return x.get(t,e,n,"json")},getScript:function(t,e){return x.get(t,void 0,e,"script")}}),x.each(["get","post"],function(t,e){x[e]=function(t,n,i,o){return v(n)&&(o=o||i,i=n,n=void 0),x.ajax(x.extend({url:t,type:e,dataType:o,data:n,success:i},x.isPlainObject(t)&&t))}}),x._evalUrl=function(t){return x.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},x.fn.extend({wrapAll:function(t){var e;return this[0]&&(v(t)&&(t=t.call(this[0])),e=x(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return v(t)?this.each(function(e){x(this).wrapInner(t.call(this,e))}):this.each(function(){var e=x(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=v(t);return this.each(function(n){x(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){x(this).replaceWith(this.childNodes)}),this}}),x.expr.pseudos.hidden=function(t){return!x.expr.pseudos.visible(t)},x.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var Re={0:200,1223:204},qe=x.ajaxSettings.xhr();_.cors=!!qe&&"withCredentials"in qe,_.ajax=qe=!!qe,x.ajaxTransport(function(t){var e,i;if(_.cors||qe&&!t.crossDomain)return{send:function(o,r){var a,s=t.xhr();if(s.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(a in t.xhrFields)s[a]=t.xhrFields[a];for(a in t.mimeType&&s.overrideMimeType&&s.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)s.setRequestHeader(a,o[a]);e=function(t){return function(){e&&(e=i=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===t?s.abort():"error"===t?"number"!=typeof s.status?r(0,"error"):r(s.status,s.statusText):r(Re[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=e(),i=s.onerror=s.ontimeout=e("error"),void 0!==s.onabort?s.onabort=i:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout(function(){e&&i()})},e=e("abort");try{s.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),x.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return x.globalEval(t),t}}}),x.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),x.ajaxTransport("script",function(t){var e,n;if(t.crossDomain)return{send:function(i,o){e=x("