diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..a8f5e15a --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: "Plugin release" + +on: + push: + tags: + - '*' + +jobs: + create-release: + name: "Create release" + runs-on: "ubuntu-latest" + steps: + - name: "Extract tag name" + run: | + echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV + - name: "Checkout" + uses: "actions/checkout@v2" + - name: "Build package" + id: "build-package" + uses: "glpi-project/tools/github-actions/build-package@0.1.15" + with: + plugin-version: ${{ env.tag_name }} + - name: "Create release" + id: "create-release" + uses: "actions/create-release@v1" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ env.tag_name }} + release_name: ${{ env.tag_name }} + draft: true + - name: "Attach package to release" + uses: "actions/upload-release-asset@v1" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: ${{ steps.build-package.outputs.package-path }} + asset_name: ${{ steps.build-package.outputs.package-basename }} + asset_content_type: " application/x-bzip2" diff --git a/ajax/dashboard.php b/ajax/dashboard.php index 8e3e535c..3df47804 100644 --- a/ajax/dashboard.php +++ b/ajax/dashboard.php @@ -27,8 +27,7 @@ //load protovis lib for dashboard render $version = Plugin::getInfo('mreporting', 'version'); $php_dir = Plugin::getPhpDir('mreporting', false); - echo Html::script($php_dir . "/lib/protovis/protovis.min.js", ['version' => $version]); - echo Html::script($php_dir . "/lib/protovis-msie/protovis-msie.min.js", ['version' => $version]); + echo Html::script($php_dir . "/lib/protovis/protovis.js", ['version' => $version]); Html::popFooter(); break; diff --git a/composer.lock b/composer.lock index be24f61d..dc27d828 100644 --- a/composer.lock +++ b/composer.lock @@ -68,48 +68,35 @@ "packages-dev": [ { "name": "consolidation/annotated-command", - "version": "4.1.1", + "version": "4.2.4", "source": { "type": "git", "url": "https://github.com/consolidation/annotated-command.git", - "reference": "efc58dc0f34a45539787c5190b41b5d2a50a08da" + "reference": "ec297e05cb86557671c2d6cbb1bebba6c7ae2c60" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/efc58dc0f34a45539787c5190b41b5d2a50a08da", - "reference": "efc58dc0f34a45539787c5190b41b5d2a50a08da", + "url": "https://api.github.com/repos/consolidation/annotated-command/zipball/ec297e05cb86557671c2d6cbb1bebba6c7ae2c60", + "reference": "ec297e05cb86557671c2d6cbb1bebba6c7ae2c60", "shasum": "" }, "require": { "consolidation/output-formatters": "^4.1.1", "php": ">=7.1.3", "psr/log": "^1|^2", - "symfony/console": "^4.4.8|^5", + "symfony/console": "^4.4.8|~5.1.0", "symfony/event-dispatcher": "^4.4.8|^5", "symfony/finder": "^4.4.8|^5" }, "require-dev": { - "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^3" + "phpunit/phpunit": ">=7.5.20", + "squizlabs/php_codesniffer": "^3", + "yoast/phpunit-polyfills": "^0.2.0" }, "type": "library", "extra": { - "scenarios": { - "symfony4": { - "require": { - "symfony/console": "^4.0" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - } - }, "branch-alias": { - "dev-master": "4.x-dev" + "dev-main": "4.x-dev" } }, "autoload": { @@ -128,69 +115,48 @@ } ], "description": "Initialize Symfony Console commands from annotated command class methods.", - "time": "2020-05-27T21:11:36+00:00" + "support": { + "issues": "https://github.com/consolidation/annotated-command/issues", + "source": "https://github.com/consolidation/annotated-command/tree/4.2.4" + }, + "time": "2020-12-10T16:56:39+00:00" }, { "name": "consolidation/config", - "version": "1.2.1", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/consolidation/config.git", - "reference": "cac1279bae7efb5c7fb2ca4c3ba4b8eb741a96c1" + "reference": "9a2c2a7b2aea1b3525984a4378743a8b74c14e1c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/config/zipball/cac1279bae7efb5c7fb2ca4c3ba4b8eb741a96c1", - "reference": "cac1279bae7efb5c7fb2ca4c3ba4b8eb741a96c1", + "url": "https://api.github.com/repos/consolidation/config/zipball/9a2c2a7b2aea1b3525984a4378743a8b74c14e1c", + "reference": "9a2c2a7b2aea1b3525984a4378743a8b74c14e1c", "shasum": "" }, "require": { "dflydev/dot-access-data": "^1.1.0", "grasmash/expander": "^1", - "php": ">=5.4.0" + "php": ">=7.1.3", + "psr/log": "^1.1", + "symfony/event-dispatcher": "^4||^5" }, "require-dev": { - "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^1", - "phpunit/phpunit": "^5", - "squizlabs/php_codesniffer": "2.*", - "symfony/console": "^2.5|^3|^4", - "symfony/yaml": "^2.8.11|^3|^4" + "phpunit/phpunit": ">=7.5.20", + "squizlabs/php_codesniffer": "^3", + "symfony/console": "^4||^5", + "symfony/yaml": "^4||^5", + "yoast/phpunit-polyfills": "^0.2.0" }, "suggest": { + "symfony/event-dispatcher": "Required to inject configuration into Command options", "symfony/yaml": "Required to use Consolidation\\Config\\Loader\\YamlConfigLoader" }, "type": "library", "extra": { - "scenarios": { - "symfony4": { - "require-dev": { - "symfony/console": "^4.0" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony2": { - "require-dev": { - "symfony/console": "^2.8", - "symfony/event-dispatcher": "^2.8", - "phpunit/phpunit": "^4.8.36" - }, - "remove": [ - "php-coveralls/php-coveralls" - ], - "config": { - "platform": { - "php": "5.4.8" - } - } - } - }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-main": "2.x-dev" } }, "autoload": { @@ -209,20 +175,24 @@ } ], "description": "Provide configuration services for a commandline tool.", - "time": "2019-03-03T19:37:04+00:00" + "support": { + "issues": "https://github.com/consolidation/config/issues", + "source": "https://github.com/consolidation/config/tree/2.0.1" + }, + "time": "2020-12-06T00:03:30+00:00" }, { "name": "consolidation/log", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/consolidation/log.git", - "reference": "ba0bf6af1fbd09ed4dc18fc2f27b12ceff487cbf" + "reference": "82a2aaaa621a7b976e50a745a8d249d5085ee2b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/log/zipball/ba0bf6af1fbd09ed4dc18fc2f27b12ceff487cbf", - "reference": "ba0bf6af1fbd09ed4dc18fc2f27b12ceff487cbf", + "url": "https://api.github.com/repos/consolidation/log/zipball/82a2aaaa621a7b976e50a745a8d249d5085ee2b1", + "reference": "82a2aaaa621a7b976e50a745a8d249d5085ee2b1", "shasum": "" }, "require": { @@ -231,27 +201,14 @@ "symfony/console": "^4|^5" }, "require-dev": { - "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^3" + "phpunit/phpunit": ">=7.5.20", + "squizlabs/php_codesniffer": "^3", + "yoast/phpunit-polyfills": "^0.2.0" }, "type": "library", "extra": { - "scenarios": { - "symfony4": { - "require-dev": { - "symfony/console": "^4" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - } - }, "branch-alias": { - "dev-master": "2.x-dev" + "dev-main": "2.x-dev" } }, "autoload": { @@ -270,20 +227,24 @@ } ], "description": "Improved Psr-3 / Psr\\Log logger based on Symfony Console components.", - "time": "2020-05-27T17:06:13+00:00" + "support": { + "issues": "https://github.com/consolidation/log/issues", + "source": "https://github.com/consolidation/log/tree/2.0.2" + }, + "time": "2020-12-10T16:26:23+00:00" }, { "name": "consolidation/output-formatters", - "version": "4.1.1", + "version": "4.1.2", "source": { "type": "git", "url": "https://github.com/consolidation/output-formatters.git", - "reference": "9deeddd6a916d0a756b216a8b40ce1016e17c0b9" + "reference": "5821e6ae076bf690058a4de6c94dce97398a69c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/9deeddd6a916d0a756b216a8b40ce1016e17c0b9", - "reference": "9deeddd6a916d0a756b216a8b40ce1016e17c0b9", + "url": "https://api.github.com/repos/consolidation/output-formatters/zipball/5821e6ae076bf690058a4de6c94dce97398a69c9", + "reference": "5821e6ae076bf690058a4de6c94dce97398a69c9", "shasum": "" }, "require": { @@ -293,32 +254,20 @@ "symfony/finder": "^4|^5" }, "require-dev": { - "g1a/composer-test-scenarios": "^3", - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^6", + "php-coveralls/php-coveralls": "^2.4.2", + "phpunit/phpunit": ">=7", "squizlabs/php_codesniffer": "^3", "symfony/var-dumper": "^4", - "symfony/yaml": "^4" + "symfony/yaml": "^4", + "yoast/phpunit-polyfills": "^0.2.0" }, "suggest": { "symfony/var-dumper": "For using the var_dump formatter" }, "type": "library", "extra": { - "scenarios": { - "symfony4": { - "require": { - "symfony/console": "^4.0" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - } - }, "branch-alias": { - "dev-master": "4.x-dev" + "dev-main": "4.x-dev" } }, "autoload": { @@ -337,54 +286,57 @@ } ], "description": "Format text by applying transformations provided by plug-in formatters.", - "time": "2020-05-27T20:51:17+00:00" + "support": { + "issues": "https://github.com/consolidation/output-formatters/issues", + "source": "https://github.com/consolidation/output-formatters/tree/4.1.2" + }, + "time": "2020-12-12T19:04:59+00:00" }, { "name": "consolidation/robo", - "version": "1.4.12", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/consolidation/Robo.git", - "reference": "eb45606f498b3426b9a98b7c85e300666a968e51" + "reference": "734620ad3f9bb457fda1a52338b42439115cf941" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/consolidation/Robo/zipball/eb45606f498b3426b9a98b7c85e300666a968e51", - "reference": "eb45606f498b3426b9a98b7c85e300666a968e51", + "url": "https://api.github.com/repos/consolidation/Robo/zipball/734620ad3f9bb457fda1a52338b42439115cf941", + "reference": "734620ad3f9bb457fda1a52338b42439115cf941", "shasum": "" }, "require": { - "consolidation/annotated-command": "^2.11.0|^4.1", - "consolidation/config": "^1.2.1", - "consolidation/log": "^1.1.1|^2", - "consolidation/output-formatters": "^3.1.13|^4.1", - "consolidation/self-update": "^1.1.5", - "grasmash/yaml-expander": "^1.4", - "league/container": "^2.4.1", - "php": ">=5.5.0", - "symfony/console": "^2.8|^3|^4", - "symfony/event-dispatcher": "^2.5|^3|^4", - "symfony/filesystem": "^2.5|^3|^4", - "symfony/finder": "^2.5|^3|^4", - "symfony/process": "^2.5|^3|^4" + "consolidation/annotated-command": "^4.2.4", + "consolidation/config": "^1.2.1|^2.0.1", + "consolidation/log": "^1.1.1|^2.0.2", + "consolidation/output-formatters": "^4.1.2", + "consolidation/self-update": "^1.2", + "league/container": "^3.3.1", + "php": ">=7.1.3", + "symfony/console": "^4.4.19 || ^5", + "symfony/event-dispatcher": "^4.4.19 || ^5", + "symfony/filesystem": "^4.4.9 || ^5", + "symfony/finder": "^4.4.9 || ^5", + "symfony/process": "^4.4.9 || ^5", + "symfony/yaml": "^4.4 || ^5" }, - "replace": { - "codegyre/robo": "< 1.0" + "conflict": { + "codegyre/robo": "*" }, "require-dev": { - "g1a/composer-test-scenarios": "^3", "natxet/cssmin": "3.0.4", "patchwork/jsqueeze": "^2", "pear/archive_tar": "^1.4.4", - "php-coveralls/php-coveralls": "^1", - "phpunit/phpunit": "^5.7.27", - "squizlabs/php_codesniffer": "^3" + "phpunit/phpunit": "^7.5.20 | ^8", + "squizlabs/php_codesniffer": "^3", + "yoast/phpunit-polyfills": "^0.2.0" }, "suggest": { - "henrikbjorn/lurker": "For monitoring filesystem changes in taskWatch", - "natxet/CssMin": "For minifying CSS files in taskMinify", + "natxet/cssmin": "For minifying CSS files in taskMinify", "patchwork/jsqueeze": "For minifying JS files in taskMinify", - "pear/archive_tar": "Allows tar archives to be created and extracted in taskPack and taskExtract, respectively." + "pear/archive_tar": "Allows tar archives to be created and extracted in taskPack and taskExtract, respectively.", + "totten/lurkerlite": "For monitoring filesystem changes in taskWatch" }, "bin": [ "robo" @@ -394,36 +346,27 @@ "scenarios": { "symfony4": { "require": { - "symfony/console": "^4" - }, - "config": { - "platform": { - "php": "7.1.3" - } - } - }, - "symfony2": { - "require": { - "symfony/console": "^2.8" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.36" + "symfony/console": "^4.4.11", + "symfony/event-dispatcher": "^4.4.11", + "symfony/filesystem": "^4.4.11", + "symfony/finder": "^4.4.11", + "symfony/process": "^4.4.11", + "phpunit/phpunit": "^6", + "nikic/php-parser": "^2" }, "remove": [ - "php-coveralls/php-coveralls" + "codeception/phpunit-wrapper" ], "config": { "platform": { - "php": "5.5.9" + "php": "7.1.3" } - }, - "scenario-options": { - "create-lockfile": "false" } } }, "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.x-dev", + "dev-main": "2.x-dev" } }, "autoload": { @@ -442,7 +385,11 @@ } ], "description": "Modern task runner", - "time": "2020-02-18T17:31:26+00:00" + "support": { + "issues": "https://github.com/consolidation/Robo/issues", + "source": "https://github.com/consolidation/Robo/tree/3.0.3" + }, + "time": "2021-02-21T19:19:43+00:00" }, { "name": "consolidation/self-update", @@ -492,39 +439,81 @@ } ], "description": "Provides a self:update command for Symfony Console applications.", + "support": { + "issues": "https://github.com/consolidation/self-update/issues", + "source": "https://github.com/consolidation/self-update/tree/1.2.0" + }, "time": "2020-04-13T02:49:20+00:00" }, { - "name": "container-interop/container-interop", - "version": "1.2.0", + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.1", "source": { "type": "git", - "url": "https://github.com/container-interop/container-interop.git", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", - "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/fe390591e0241955f22eb9ba327d137e501c771c", + "reference": "fe390591e0241955f22eb9ba327d137e501c771c", "shasum": "" }, "require": { - "psr/container": "^1.0" + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "phpcompatibility/php-compatibility": "^9.0", + "sensiolabs/security-checker": "^4.1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" }, - "type": "library", "autoload": { "psr-4": { - "Interop\\Container\\": "src/Interop/Container/" + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", - "homepage": "https://github.com/container-interop/container-interop", - "abandoned": "psr/container", - "time": "2017-02-14T19:40:03+00:00" + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2020-12-07T18:04:37+00:00" }, { "name": "dflydev/dot-access-data", @@ -583,24 +572,29 @@ "dot", "notation" ], + "support": { + "issues": "https://github.com/dflydev/dflydev-dot-access-data/issues", + "source": "https://github.com/dflydev/dflydev-dot-access-data/tree/master" + }, "time": "2017-01-20T21:14:22+00:00" }, { "name": "glpi-project/coding-standard", - "version": "0.7.2", + "version": "0.8", "source": { "type": "git", "url": "https://github.com/glpi-project/coding-standard.git", - "reference": "dbba6566e1ce7f7d0778794cd6e93bc07080c8c7" + "reference": "a34ec2abf52e720ef700f59a91a4dde963b9f33e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/glpi-project/coding-standard/zipball/dbba6566e1ce7f7d0778794cd6e93bc07080c8c7", - "reference": "dbba6566e1ce7f7d0778794cd6e93bc07080c8c7", + "url": "https://api.github.com/repos/glpi-project/coding-standard/zipball/a34ec2abf52e720ef700f59a91a4dde963b9f33e", + "reference": "a34ec2abf52e720ef700f59a91a4dde963b9f33e", "shasum": "" }, "require": { - "squizlabs/php_codesniffer": "^3.5" + "slevomat/coding-standard": "^6.3", + "squizlabs/php_codesniffer": "^3.5.5" }, "type": "library", "notification-url": "https://packagist.org/downloads/", @@ -620,32 +614,35 @@ "glpi", "phpcs" ], - "time": "2019-10-31T10:30:33+00:00" + "support": { + "issues": "https://github.com/glpi-project/coding-standard/issues", + "source": "https://github.com/glpi-project/coding-standard" + }, + "time": "2020-06-03T08:54:27+00:00" }, { "name": "glpi-project/tools", - "version": "0.1.13", + "version": "0.1.16", "source": { "type": "git", "url": "https://github.com/glpi-project/tools.git", - "reference": "2028ecf9acd8b838cff37771dcab77ced9391f41" + "reference": "218e67a88ed2f5db7085af80e39522a138a262d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/glpi-project/tools/zipball/2028ecf9acd8b838cff37771dcab77ced9391f41", - "reference": "2028ecf9acd8b838cff37771dcab77ced9391f41", + "url": "https://api.github.com/repos/glpi-project/tools/zipball/218e67a88ed2f5db7085af80e39522a138a262d8", + "reference": "218e67a88ed2f5db7085af80e39522a138a262d8", "shasum": "" }, "require": { - "consolidation/robo": "^1.3", - "glpi-project/coding-standard": "^0.7", - "natxet/cssmin": "^3.0", - "patchwork/jsqueeze": "^1.0" + "consolidation/robo": "^2.0 || ^3.0", + "glpi-project/coding-standard": "^0.8", + "symfony/console": "^4.4 || ^5.0" }, "bin": [ - "tools/plugin-release", + "bin/licence-headers-check", "tools/extract_template.sh", - "tools/modify_headers.pl" + "tools/plugin-release" ], "type": "library", "autoload": { @@ -670,7 +667,11 @@ "plugins", "tools" ], - "time": "2020-06-19T10:29:26+00:00" + "support": { + "issues": "https://github.com/glpi-project/tools/issues", + "source": "https://github.com/glpi-project/tools" + }, + "time": "2021-03-03T08:05:40+00:00" }, { "name": "grasmash/expander", @@ -717,87 +718,47 @@ } ], "description": "Expands internal property references in PHP arrays file.", - "time": "2017-12-21T22:14:55+00:00" - }, - { - "name": "grasmash/yaml-expander", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/grasmash/yaml-expander.git", - "reference": "3f0f6001ae707a24f4d9733958d77d92bf9693b1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/grasmash/yaml-expander/zipball/3f0f6001ae707a24f4d9733958d77d92bf9693b1", - "reference": "3f0f6001ae707a24f4d9733958d77d92bf9693b1", - "shasum": "" - }, - "require": { - "dflydev/dot-access-data": "^1.1.0", - "php": ">=5.4", - "symfony/yaml": "^2.8.11|^3|^4" - }, - "require-dev": { - "greg-1-anderson/composer-test-scenarios": "^1", - "phpunit/phpunit": "^4.8|^5.5.4", - "satooshi/php-coveralls": "^1.0.2|dev-master", - "squizlabs/php_codesniffer": "^2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Grasmash\\YamlExpander\\": "src/" - } + "support": { + "issues": "https://github.com/grasmash/expander/issues", + "source": "https://github.com/grasmash/expander/tree/master" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthew Grasmick" - } - ], - "description": "Expands internal property references in a yaml file.", - "time": "2017-12-16T16:06:03+00:00" + "time": "2017-12-21T22:14:55+00:00" }, { "name": "league/container", - "version": "2.4.1", + "version": "3.3.4", "source": { "type": "git", "url": "https://github.com/thephpleague/container.git", - "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0" + "reference": "40aed0f11d16bc23f9d04a27acc3549cd1bb42ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/container/zipball/43f35abd03a12977a60ffd7095efd6a7808488c0", - "reference": "43f35abd03a12977a60ffd7095efd6a7808488c0", + "url": "https://api.github.com/repos/thephpleague/container/zipball/40aed0f11d16bc23f9d04a27acc3549cd1bb42ab", + "reference": "40aed0f11d16bc23f9d04a27acc3549cd1bb42ab", "shasum": "" }, "require": { - "container-interop/container-interop": "^1.2", - "php": "^5.4.0 || ^7.0" + "php": "^7.0 || ^8.0", + "psr/container": "^1.0" }, "provide": { - "container-interop/container-interop-implementation": "^1.2", "psr/container-implementation": "^1.0" }, "replace": { "orno/di": "~2.0" }, "require-dev": { - "phpunit/phpunit": "4.*" + "phpunit/phpunit": "^6.0", + "roave/security-advisories": "dev-master", + "scrutinizer/ocular": "^1.8", + "squizlabs/php_codesniffer": "^3.5" }, "type": "library", "extra": { "branch-alias": { + "dev-master": "3.x-dev", + "dev-3.x": "3.x-dev", "dev-2.x": "2.x-dev", "dev-1.x": "1.x-dev" } @@ -830,120 +791,89 @@ "provider", "service" ], - "time": "2017-05-10T09:20:27+00:00" + "support": { + "issues": "https://github.com/thephpleague/container/issues", + "source": "https://github.com/thephpleague/container/tree/3.3.4" + }, + "funding": [ + { + "url": "https://github.com/philipobenito", + "type": "github" + } + ], + "time": "2021-02-22T10:35:05+00:00" }, { - "name": "natxet/CssMin", - "version": "v3.0.6", + "name": "phpstan/phpdoc-parser", + "version": "0.4.9", "source": { "type": "git", - "url": "https://github.com/natxet/CssMin.git", - "reference": "d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd" + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/natxet/CssMin/zipball/d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd", - "reference": "d5d9f4c3e5cedb1ae96a95a21731f8790e38f1dd", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/98a088b17966bdf6ee25c8a4b634df313d8aa531", + "reference": "98a088b17966bdf6ee25c8a4b634df313d8aa531", "shasum": "" }, "require": { - "php": ">=5.0" + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "consistence/coding-standard": "^3.5", + "ergebnis/composer-normalize": "^2.0.2", + "jakub-onderka/php-parallel-lint": "^0.9.2", + "phing/phing": "^2.16.0", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.26", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^6.3", + "slevomat/coding-standard": "^4.7.2", + "symfony/process": "^4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "0.4-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "authors": [ - { - "name": "Joe Scylla", - "email": "joe.scylla@gmail.com", - "homepage": "https://profiles.google.com/joe.scylla" - } - ], - "description": "Minifying CSS", - "homepage": "http://code.google.com/p/cssmin/", - "keywords": [ - "css", - "minify" - ], - "time": "2018-01-09T11:15:01+00:00" - }, - { - "name": "patchwork/jsqueeze", - "version": "v1.0.7", - "source": { - "type": "git", - "url": "https://github.com/tchwork/jsqueeze.git", - "reference": "f90a933213534b93e4ff3c2c3026ff7458f7721b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tchwork/jsqueeze/zipball/f90a933213534b93e4ff3c2c3026ff7458f7721b", - "reference": "f90a933213534b93e4ff3c2c3026ff7458f7721b", - "shasum": "" - }, - "require": { - "php": ">=5.1.4" - }, - "type": "library", - "autoload": { - "psr-0": { - "JSqueeze": "class/" - } + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/master" }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "(Apache-2.0 or GPL-2.0)" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - } - ], - "description": "Efficient JavaScript minification in PHP", - "homepage": "https://github.com/tchwork/jsqueeze", - "keywords": [ - "compression", - "javascript", - "minification" - ], - "time": "2015-03-25T10:11:08+00:00" + "time": "2020-08-03T20:32:43+00:00" }, { "name": "psr/container", - "version": "1.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.2.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -956,7 +886,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -968,7 +898,11 @@ "container-interop", "psr" ], - "time": "2017-02-14T16:28:37+00:00" + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" }, { "name": "psr/log", @@ -1015,20 +949,84 @@ "psr", "psr-3" ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.3" + }, "time": "2020-03-23T09:12:05+00:00" }, + { + "name": "slevomat/coding-standard", + "version": "6.4.1", + "source": { + "type": "git", + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "696dcca217d0c9da2c40d02731526c1e25b65346" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/696dcca217d0c9da2c40d02731526c1e25b65346", + "reference": "696dcca217d0c9da2c40d02731526c1e25b65346", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "php": "^7.1 || ^8.0", + "phpstan/phpdoc-parser": "0.4.5 - 0.4.9", + "squizlabs/php_codesniffer": "^3.5.6" + }, + "require-dev": { + "phing/phing": "2.16.3", + "php-parallel-lint/php-parallel-lint": "1.2.0", + "phpstan/phpstan": "0.12.48", + "phpstan/phpstan-deprecation-rules": "0.12.5", + "phpstan/phpstan-phpunit": "0.12.16", + "phpstan/phpstan-strict-rules": "0.12.5", + "phpunit/phpunit": "7.5.20|8.5.5|9.4.0" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "support": { + "issues": "https://github.com/slevomat/coding-standard/issues", + "source": "https://github.com/slevomat/coding-standard/tree/6.4.1" + }, + "funding": [ + { + "url": "https://github.com/kukulich", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" + } + ], + "time": "2020-10-05T12:39:37+00:00" + }, { "name": "squizlabs/php_codesniffer", - "version": "3.5.5", + "version": "3.5.8", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6" + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/73e2e7f57d958e7228fce50dc0c61f58f017f9f6", - "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", + "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", "shasum": "" }, "require": { @@ -1066,20 +1064,25 @@ "phpcs", "standards" ], - "time": "2020-04-17T01:09:41+00:00" + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2020-10-23T02:01:07+00:00" }, { "name": "symfony/console", - "version": "v4.4.10", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "326b064d804043005526f5a0494cfb49edb59bb0" + "reference": "c98349bda966c70d6c08b4cd8658377c94166492" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/326b064d804043005526f5a0494cfb49edb59bb0", - "reference": "326b064d804043005526f5a0494cfb49edb59bb0", + "url": "https://api.github.com/repos/symfony/console/zipball/c98349bda966c70d6c08b4cd8658377c94166492", + "reference": "c98349bda966c70d6c08b4cd8658377c94166492", "shasum": "" }, "require": { @@ -1114,11 +1117,6 @@ "symfony/process": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" @@ -1141,8 +1139,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Console Component", + "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/console/tree/v4.4.20" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1157,20 +1158,20 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:06:45+00:00" + "time": "2021-02-22T18:44:15+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v4.4.10", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866" + "reference": "c352647244bd376bf7d31efbd5401f13f50dad0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5370aaa7807c7a439b21386661ffccf3dff2866", - "reference": "a5370aaa7807c7a439b21386661ffccf3dff2866", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c352647244bd376bf7d31efbd5401f13f50dad0c", + "reference": "c352647244bd376bf7d31efbd5401f13f50dad0c", "shasum": "" }, "require": { @@ -1188,6 +1189,7 @@ "psr/log": "~1.0", "symfony/config": "^3.4|^4.0|^5.0", "symfony/dependency-injection": "^3.4|^4.0|^5.0", + "symfony/error-handler": "~3.4|~4.4", "symfony/expression-language": "^3.4|^4.0|^5.0", "symfony/http-foundation": "^3.4|^4.0|^5.0", "symfony/service-contracts": "^1.1|^2", @@ -1198,11 +1200,6 @@ "symfony/http-kernel": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" @@ -1225,8 +1222,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony EventDispatcher Component", + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v4.4.20" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1241,24 +1241,24 @@ "type": "tidelift" } ], - "time": "2020-05-20T08:37:50+00:00" + "time": "2021-01-27T09:09:26+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v1.1.7", + "version": "v1.1.9", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18" + "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18", - "reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/84e23fdcd2517bf37aecbd16967e83f0caee25a7", + "reference": "84e23fdcd2517bf37aecbd16967e83f0caee25a7", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "suggest": { "psr/event-dispatcher": "", @@ -1268,6 +1268,10 @@ "extra": { "branch-alias": { "dev-master": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1299,20 +1303,37 @@ "interoperability", "standards" ], - "time": "2019-09-17T09:54:03+00:00" + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v1.1.9" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-06T13:19:58+00:00" }, { "name": "symfony/filesystem", - "version": "v4.4.10", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b27f491309db5757816db672b256ea2e03677d30" + "reference": "715e7a531bdae109a828f9e91629e5b3b2926beb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b27f491309db5757816db672b256ea2e03677d30", - "reference": "b27f491309db5757816db672b256ea2e03677d30", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/715e7a531bdae109a828f9e91629e5b3b2926beb", + "reference": "715e7a531bdae109a828f9e91629e5b3b2926beb", "shasum": "" }, "require": { @@ -1320,11 +1341,6 @@ "symfony/polyfill-ctype": "~1.8" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Filesystem\\": "" @@ -1347,8 +1363,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Filesystem Component", + "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v4.4.20" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1363,31 +1382,26 @@ "type": "tidelift" } ], - "time": "2020-05-30T18:50:54+00:00" + "time": "2021-02-11T19:34:41+00:00" }, { "name": "symfony/finder", - "version": "v4.4.10", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "5729f943f9854c5781984ed4907bbb817735776b" + "reference": "2543795ab1570df588b9bbd31e1a2bd7037b94f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5729f943f9854c5781984ed4907bbb817735776b", - "reference": "5729f943f9854c5781984ed4907bbb817735776b", + "url": "https://api.github.com/repos/symfony/finder/zipball/2543795ab1570df588b9bbd31e1a2bd7037b94f6", + "reference": "2543795ab1570df588b9bbd31e1a2bd7037b94f6", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" @@ -1410,8 +1424,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v4.4.20" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1426,24 +1443,24 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2021-02-12T10:48:09+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.17.1", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d" + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", - "reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", + "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -1451,7 +1468,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1488,6 +1505,9 @@ "polyfill", "portable" ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.22.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1502,24 +1522,24 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.17.1", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "7110338d81ce1cbc3e273136e4574663627037a7" + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/7110338d81ce1cbc3e273136e4574663627037a7", - "reference": "7110338d81ce1cbc3e273136e4574663627037a7", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/5232de97ee3b75b0360528dae24e73db49566ab1", + "reference": "5232de97ee3b75b0360528dae24e73db49566ab1", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -1527,7 +1547,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1565,6 +1585,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.22.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1579,29 +1602,29 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2021-01-22T09:19:47+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.17.1", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a" + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fa0837fe02d617d31fbb25f990655861bb27bd1a", - "reference": "fa0837fe02d617d31fbb25f990655861bb27bd1a", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", + "reference": "a678b42e92f86eca04b7fa4c0f6f19d097fb69e2", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1641,6 +1664,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.22.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1655,29 +1681,29 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.17.1", + "version": "v1.22.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2" + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/4a5b6bba3259902e386eb80dd1956181ee90b5b2", - "reference": "4a5b6bba3259902e386eb80dd1956181ee90b5b2", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", "shasum": "" }, "require": { - "php": ">=7.0.8" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.22-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1721,6 +1747,9 @@ "portable", "shim" ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1735,31 +1764,26 @@ "type": "tidelift" } ], - "time": "2020-06-06T08:46:27+00:00" + "time": "2021-01-07T16:49:33+00:00" }, { "name": "symfony/process", - "version": "v4.4.10", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5" + "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/c714958428a85c86ab97e3a0c96db4c4f381b7f5", - "reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5", + "url": "https://api.github.com/repos/symfony/process/zipball/7e950b6366d4da90292c2e7fa820b3c1842b965a", + "reference": "7e950b6366d4da90292c2e7fa820b3c1842b965a", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.1.3" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" @@ -1782,8 +1806,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Process Component", + "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v4.4.20" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1798,24 +1825,24 @@ "type": "tidelift" } ], - "time": "2020-05-30T20:06:45+00:00" + "time": "2021-01-27T09:09:26+00:00" }, { "name": "symfony/service-contracts", - "version": "v1.1.8", + "version": "v1.1.9", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "ffc7f5692092df31515df2a5ecf3b7302b3ddacf" + "reference": "b776d18b303a39f56c63747bcb977ad4b27aca26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ffc7f5692092df31515df2a5ecf3b7302b3ddacf", - "reference": "ffc7f5692092df31515df2a5ecf3b7302b3ddacf", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/b776d18b303a39f56c63747bcb977ad4b27aca26", + "reference": "b776d18b303a39f56c63747bcb977ad4b27aca26", "shasum": "" }, "require": { - "php": "^7.1.3", + "php": ">=7.1.3", "psr/container": "^1.0" }, "suggest": { @@ -1825,6 +1852,10 @@ "extra": { "branch-alias": { "dev-master": "1.1-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1856,20 +1887,37 @@ "interoperability", "standards" ], - "time": "2019-10-14T12:27:06+00:00" + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v1.1.9" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-06T13:19:58+00:00" }, { "name": "symfony/yaml", - "version": "v4.4.10", + "version": "v4.4.20", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a" + "reference": "29e61305e1c79d25f71060903982ead8f533e267" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a", - "reference": "c2d2cc66e892322cfcc03f8f12f8340dbd7a3f8a", + "url": "https://api.github.com/repos/symfony/yaml/zipball/29e61305e1c79d25f71060903982ead8f533e267", + "reference": "29e61305e1c79d25f71060903982ead8f533e267", "shasum": "" }, "require": { @@ -1886,11 +1934,6 @@ "symfony/console": "For validating YAML files using the lint command" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" @@ -1913,8 +1956,11 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v4.4.20" + }, "funding": [ { "url": "https://symfony.com/sponsor", @@ -1929,7 +1975,7 @@ "type": "tidelift" } ], - "time": "2020-05-20T08:37:50+00:00" + "time": "2021-02-22T15:36:50+00:00" } ], "aliases": [], @@ -1946,5 +1992,5 @@ "platform-overrides": { "php": "7.2.0" }, - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/lib/protovis-msie/GPL-LICENSE.txt b/lib/protovis-msie/GPL-LICENSE.txt deleted file mode 100644 index 11dddd00..00000000 --- a/lib/protovis-msie/GPL-LICENSE.txt +++ /dev/null @@ -1,278 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. diff --git a/lib/protovis-msie/MIT-LICENSE.txt b/lib/protovis-msie/MIT-LICENSE.txt deleted file mode 100755 index 369c0b87..00000000 --- a/lib/protovis-msie/MIT-LICENSE.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2011 DataMArket, http://datamarket.com/ - -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/lib/protovis-msie/Makefile b/lib/protovis-msie/Makefile deleted file mode 100644 index c79beab3..00000000 --- a/lib/protovis-msie/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -SRC_DIR = ./src - -UGLIFY ?= `which uglifyjs` - -SOURCE_FILES = \ - ${SRC_DIR}/shim-head.js \ - ${SRC_DIR}/Vml.js \ - ${SRC_DIR}/VmlScene.js \ - ${SRC_DIR}/VmlPanel.js \ - ${SRC_DIR}/VmlEvents.js \ - ${SRC_DIR}/VmlImage.js \ - ${SRC_DIR}/VmlLabel.js \ - ${SRC_DIR}/VmlWedge.js \ - ${SRC_DIR}/shim-tail.js - -all: msie min - -msie: protovis-msie.js -min: protovis-msie.min.js - -protovis-msie.js: $(SOURCE_FILES) Makefile - @@echo "Building" $@ - @@cat $(SOURCE_FILES) > $@ - -%.min.js: %.js Makefile - @@if test ! -z ${UGLIFY}; then \ - echo "Building" $@; \ - ${UGLIFY} --ascii < $< > $@; \ - else \ - echo "You must have ${UGLIFY} installed in order to minify the library."; \ - fi - -clean: - rm -f protovis-msie.js protovis-msie.min.js - -.PHONY: all msie min clean diff --git a/lib/protovis-msie/README.md b/lib/protovis-msie/README.md deleted file mode 100644 index 2e50b3aa..00000000 --- a/lib/protovis-msie/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# Protovis MSIE-VML compatibility layer - -A compatibility layer for [Protovis][pv] that adds support for [VML][vml] compatible browsers (Internet Explorer 7 and 8). - -## How to use this: - -As you include Protovis as you normally would, include protovis-msie.js __after__ it: - - - - -The software should kick in on browsers that support VML, but don't support SVG, and procede to translate the visualization into VML. - -There is no harm in including the file on other browsers but you can still choose to conditionally include the MSIE support: - - - -This saves non-VML browsers the trouble of downloading the code. - - -## What can it do - -The shim can translate lines, areas, panels, rules, labels and most basic things into VML at a fairly acceptable running speed. It has trouble with massive/complicated visualizations but most simple charts work fine. - - -## Where does it fail? - -Things known not to work are: - -* Polar interpolation for lines is missing. -* Rotated labels are incorrectly positioned. -* Label shadow is missing. -* Label text does not support opacity. -* Zoom property is not supported. - -The VML layer works quite well for visualizations that are static or not overly complex. However MSIE versions before 9 are slow and it will likely never be viable to run large and complex animated Protovis visualizations on those browsers. - -Other than that you will simply have to experiment. - - - -[pv]: http://mbostock.github.com/protovis/ -[vml]: http://www.w3.org/TR/NOTE-VML diff --git a/lib/protovis-msie/protovis-msie.js b/lib/protovis-msie/protovis-msie.js deleted file mode 100644 index 7b5f5bbe..00000000 --- a/lib/protovis-msie/protovis-msie.js +++ /dev/null @@ -1,1064 +0,0 @@ -/*! - * Protovis MSIE/VML addon - * Copyright (C) 2011 by DataMarket - * Dual licensed under the terms of the MIT or GPL Version 2 software licenses. - * - * This software includes code from jQuery, http://jquery.com/ - * jQuery is licensed under the MIT or GPL Version 2 license. - * - * This software includes code from the Protovis, http://mbostock.github.com/protovis/ - * Protovis is licensed under the BSD license. - * - */ - -// detect SVG support -pv.have_SVG = !!( - document.createElementNS && - document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ).createSVGRect -); - -// detect VML support -pv.have_VML = (function (d,a,b) { - a = d.createElement('div'); - a.innerHTML = ''; - b = a.firstChild; - b.style.behavior = 'url(#default#VML)'; - return b ? typeof b.adj === 'object' : true; -})(document); - -// MSIE does not support indexOf on arrays -if ( !Array.prototype.indexOf ) { - Array.prototype.indexOf = function (s, from) { - var n = this.length >>> 0, - i = (!isFinite(from) || from < 0) ? 0 : (from > this.length) ? this.length : from; - for (; i < n; i++) { if ( this[i] === s ) { return i; } } - return -1; - }; -} - -// only run if we need to -if ( !pv.have_SVG && pv.have_VML ){(function(){ - -if ( typeof Date.now !== 'function' ) { - Date.now = function () { return new Date() * 1; }; -} - - -var vml = { - - round: function(n){ return Math.round( n * 21.6 ); }, - - styles: null, - - pre: '', - - block: { 'group':1, 'shape':1, 'shapetype':1, 'line':1, - 'polyline':1, 'curve':1, 'rect':1, 'roundrect':1, - 'oval':1, 'arc':1, 'image':1 }, - ends: { 'butt':'flat','round':'round','square':'square','flat':'flat'}, - joins: { 'bevel':'bevel','round':'round','miter':'miter'}, - cursorstyles: { - 'hand': 'pointer', - 'crosshair': 1, 'pointer': 1, 'move': 1, 'text': 1, - 'wait': 1, 'help': 1, 'progress': 1, - 'n-resize': 1, 'ne-resize': 1, 'nw-resize': 1, 's-resize': 1, - 'se-resize': 1, 'sw-resize': 1, 'e-resize': 1, 'w-resize': 1 - }, - - text_shim: null, - _textcache: {}, - text_dims: function ( text, font ) { - if ( !(font in vml._textcache) ) { - vml._textcache[ font ] = {}; - } - if ( text in vml._textcache[ font ] ) { - return vml._textcache[ font ][ text ]; - } - var shim = vml.text_shim; - shim.style.font = font; - shim.innerText = text; - return (vml._textcache[ font ][ text ] = { - fontsize: parseInt( shim.style.fontSize, 10 ), - height: shim.offsetHeight, - width: shim.offsetWidth - }); - }, - - d2r: Math.PI * 2 / 360, // is this used more than once? - - get_dim: function ( attr, target ) { - var o = target || {}; - // reformat the most common attributes - o.translate_x = 0; - o.translate_y = 0; - if ( attr.transform ) { - var t = /translate\((\d+(?:\.\d+)?)(?:,(\d+(?:\.\d+)?))?\)/.exec( attr.transform ); - if ( t && t[1] ) { o.translate_x = parseFloat( t[1] ); } - if ( t && t[2] ) { o.translate_y = parseFloat( t[2] ); } - var r = /rotate\((\d+\.\d+|\d+)\)/.exec( attr.transform ); - if ( r ) { o.rotation = parseFloat( r[1] ) % 360; } - // var scale_x = 1, scale_y = 1, - // var s = /scale\((\d+)(?:,(\d+))?\)/i.exec( value ); - // if ( s && s[1] ) { scale[0] = parseInt( s[1], 10 ); } - // if ( s && s[2] ) { scale[1] = parseInt( s[2], 10 ); } - } - o.x = parseFloat( attr.x||0 ); - o.y = parseFloat( attr.y||0 ); - if ( 'width' in attr ) { - o.width = parseInt( attr.width, 10 ); - } - if ( 'height' in attr ) { - o.height = parseInt( attr.height, 10 ); - } - return o; - }, - - elm_defaults: { - - "g": { - rewrite: 'span', - attr: function ( attr, style, elm ) { - var d = vml.get_dim( attr ); - elm.style.cssText = "position:absolute;zoom:1;left:"+ - (d.translate_x + d.x)+"px;top:"+ - (d.translate_y + d.y)+"px;"; - } - }, - - "line": { - rewrite: 'shape', - attr: function ( attr, style, elm ) { - var x1 = parseFloat( attr.x1 || 0 ), - y1 = parseFloat( attr.y1 || 0 ), - x2 = parseFloat( attr.x2 || 0 ), - y2 = parseFloat( attr.y2 || 0 ), - r = vml.round; - elm.coordorigin = "0,0"; - elm.coordsize = "21600,21600"; - vml.path( elm ).v = 'M '+ r(x1) + ' ' + r(y1) + ' L ' + r(x2) + ' ' + r(y2) + ' E'; - vml.stroke( elm, attr ); - }, - css: "top:0px;left:0px;width:1000px;height:1000px" - }, - - "rect": { - rewrite: 'shape', - attr: function ( attr, style, elm ) { - var d = vml.get_dim( attr ), - p = vml.path( elm ), - r = vml.round; - elm.coordorigin = "0,0"; - elm.coordsize = "21600,21600"; - var x = r(d.translate_x + d.x), - y = r(d.translate_y + d.y), - w = r(d.width), - h = r(d.height); - p.v = 'M ' + x + ' ' + y + - ' L ' + (x + w) + ' ' + y + - ' L ' + (x + w) + ' ' + (y + h) + - ' L ' + x + ' ' + (y + h) + - ' x'; - vml.stroke( elm, attr ); - vml.fill( elm, attr ); - }, - css: "top:0px;left:0px;width:1000px;height:1000px" - }, - - "path": { - rewrite: 'shape', - attr: function ( attr, style, elm ) { - var d = vml.get_dim( attr ), - es = elm.style; - es.left = (d.translate_x + d.x) + "px"; - es.top = (d.translate_y + d.y) + "px"; - elm.coordorigin = "0,0"; - elm.coordsize = "21600,21600"; - vml.path( elm, attr.d ); - vml.fill( elm, attr ); - vml.stroke( elm, attr ); - }, - css: "top:0px;left:0px;width:1000px;height:1000px" - }, - - "circle": { - /* This version of circles is crisper but seems slower - rewrite: 'shape', - attr: function ( attr, style, elm ) { - var d = vml.get_dim( attr ), - r = vml.round( parseFloat( attr.r || 0 ) ), - cx = parseFloat( attr.cx || 0 ), - cy = parseFloat( attr.cy || 0 ), - es = elm.style; - es.left = (d.translate_x + d.x + cx + 0.3) + "px"; - es.top = (d.translate_y + d.y + cy + 0.3) + "px"; - elm.coordorigin = "0,0"; - elm.coordsize = "21600,21600"; - vml.path( elm ).v = "ar-" + r + ",-" + r + "," + r + "," + r + ",0,0,0,0x"; - vml.fill( elm, attr ); - vml.stroke( elm, attr ); - }, - css: "top:0px;left:0px;width:1000px;height:1000px" - */ - rewrite: 'oval', - attr: function ( attr, style, elm ) { - var d = vml.get_dim( attr ), - es = elm.style, - cx = parseFloat( attr.cx || 0 ) + 0.7, - cy = parseFloat( attr.cy || 0 ) + 0.7, - r = parseFloat( attr.r || 0 ) + 0.5; - es.top = ( d.translate_y + cy - r ) + "px"; - es.left = ( d.translate_x + cx - r ) + "px"; - es.width = ( r * 2 ) + "px"; - es.height = ( r * 2 ) + "px"; - vml.fill( elm, attr ); - vml.stroke( elm, attr ); - } - }, - - "text": { - rewrite: 'span' - }, - - "svg": { - rewrite: 'span', - css: 'position:relative;overflow:hidden;display:inline-block;~display:block;' - }, - - // this allows reuse of the createElement function for actual VML - "vml:path": { rewrite: 'path' }, - "vml:stroke": { rewrite: 'stroke' }, - "vml:fill": { rewrite: 'fill' } - - }, - - // cloning elements is a lot faster than creating them - _elmcache: { - 'span': document.createElement( 'span' ), - 'div': document.createElement( 'div' ) - }, - - createElement: function ( type, reformat ) { - var elm, - cache = vml._elmcache, - helper = vml.elm_defaults[ type ] || {}; - var tagName = helper.rewrite || type; - if ( tagName in cache ) { - elm = cache[ tagName ].cloneNode( false ); - } - else { - cache[ tagName ] = document.createElement( vml.pre + tagName + vml.post ); - if ( tagName in vml.block ) { - cache[ tagName ].className += ' msvml_block'; - } - elm = cache[ tagName ].cloneNode( false ); - } - helper.css && (elm.style.cssText = helper.css); - return elm; - }, - - - // hex values lookup table - _hex: pv.range(0,256).map(function(i){ return pv.Format.pad("0",2,i.toString(16)); }), - _colorcache: { 'none': 'transparent' }, - color: function ( value, rgb ) { - // TODO: deal with opacity here ? - if ( !(value in vml._colorcache) && (rgb = /^rgb\((\d+),(\d+),(\d+)\)$/i.exec( value )) ) { - vml._colorcache[value] = '#' + vml._hex[rgb[1]] + vml._hex[rgb[2]] + vml._hex[rgb[3]]; - } - return vml._colorcache[ value ] || value; - }, - - - fill: function ( elm, attr ) { - var fill = elm.getElementsByTagName( 'fill' )[0]; - if ( !fill ) { - fill = elm.appendChild( vml.createElement( 'vml:fill' ) ); - } - if ( !attr.fill || attr.fill === 'none' ) { - fill.on = false; - } - else { - fill.on = 'true'; - fill.color = vml.color( attr.fill ); - fill.opacity = parseFloat( attr['fill-opacity'] || '1' ) || '1'; - } - }, - - - stroke: function ( elm, attr ) { - var stroke = elm.getElementsByTagName( 'stroke' )[0]; - if ( !stroke ) { - stroke = elm.appendChild( vml.createElement( 'vml:stroke' ) ); - } - if ( !attr.stroke || attr.stroke === 'none' ) { - stroke.on = 'false'; - stroke.weight = '0'; - } - else { - stroke.on = 'true'; - stroke.weight = parseFloat( attr['stroke-width'] || '1' ) / 1.25; - stroke.color = vml.color( attr.stroke ) || 'black'; - stroke.opacity = parseFloat( attr['stroke-opacity'] || '1' ) || '1'; - stroke.joinstyle = vml.joins[ attr['stroke-linejoin'] ] || 'miter'; - } - }, - - path: function ( elm, svgpath ) { - var p = elm.getElementsByTagName( 'path' )[0]; - if ( !p ) { - p = elm.appendChild( vml.createElement( 'vml:path' ) ); - } - if ( arguments.length > 1 ) { - p.v = vml.rewritePath( svgpath ); - } - return p; - }, - - - init: function () { - if ( !vml.text_shim ) { - vml.text_shim = document.getElementById('pv_vml_text_shim') || document.createElement('span'); - vml.text_shim.id = 'protovisvml_text_shim'; - vml.text_shim.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline-block;white-space:nowrap;"; - document.body.insertBefore( vml.text_shim, document.body.firstChild ); - } - if ( !vml.styles ) { - vml.styles = document.getElementById('protovisvml_styles') || document.createElement("style"); - if ( vml.styles.id !== 'protovisvml_styles' ) { - vml.styles.id = 'protovisvml_styles'; - document.documentElement.firstChild.appendChild( vml.styles ); - vml.styles.styleSheet.addRule( '.msvml', 'behavior:url(#default#VML);' ); - vml.styles.styleSheet.addRule( '.msvml_block', 'position:absolute;top:0;left:0;' ); - } - try { - if ( !document.namespaces.v ) { document.namespaces.add( 'v', 'urn:schemas-microsoft-com:vml' ); } - } - catch (e) { - vml.pre = '<'; - vml.post = ' class="msvml" xmlns="urn:schemas-microsoft.com:vml">'; - } - } - }, - - // SVG->VML path conversion - This converts a SVG path to a VML path - // - // Things that are missing: - // - Multiple sets of coords. - // Some commands (lineto,curveto,..) can take multiple sets of coords. - // Because Protovis always supplies the command between arguments, this isn't - // implemented, but it would be trivial to complete this. - // - ARCs need solving - _pathcache: {}, - rewritePath:function ( p, deb ) { - var x = 0, y = 0, round = vml.round; - - if ( !p ) { return p; } - if ( p in vml._pathcache ) { return vml._pathcache[p]; } - - // clean up overly detailed fractions (8.526512829121202e-148) - p = p.replace( /(\d*)((\.*\d*)(e ?-?\d*))/g, "$1"); - - var bits = p.match( /([MLHVCSQTAZ][^MLHVCSQTAZ]*)/gi ); - var np = [], lastcurve = []; - for ( var i=0,bl=bits.length; i= 2 * Math.PI) { - if (r1) { - d = "AE0,0 " + r2 + "," + r2 + " 0 23592960" - + "AL0,0 " + r1 + "," + r1 + " 0 23592960"; - } - else { - d = "AE0,0 " + r2 + "," + r2 + " 0 23592960"; - } - } - else { - var sa = Math.round(s.startAngle / Math.PI * 11796480), - a = Math.round(s.angle / Math.PI * 11796480); - if (r1) { - d = "AE 0,0 " + r2 + "," + r2 + " " + -sa + " " + -a - + " 0,0 " + r1 + "," + r1 + " " + -(sa + a) + " " + a - + "X"; - } - else { - d = "M0,0" - + "AE0,0 " + r2 + "," + r2 + " " + -sa + " " + -a - + "X"; - } - } - p.v = d; - - e = this.append(e, scenes, i); - - } - return e; -}; - -// end VML override -})();} diff --git a/lib/protovis-msie/protovis-msie.min.js b/lib/protovis-msie/protovis-msie.min.js deleted file mode 100644 index 8e4d04f3..00000000 --- a/lib/protovis-msie/protovis-msie.min.js +++ /dev/null @@ -1,44 +0,0 @@ -/*! - * Protovis MSIE/VML addon - * Copyright (C) 2011 by DataMarket - * Dual licensed under the terms of the MIT or GPL Version 2 software licenses. - * - * This software includes code from jQuery, http://jquery.com/ - * jQuery is licensed under the MIT or GPL Version 2 license. - * - * This software includes code from the Protovis, http://mbostock.github.com/protovis/ - * Protovis is licensed under the BSD license. - * - */// detect SVG support -pv.have_SVG=!(!document.createElementNS||!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect);pv.have_VML=function(f,m,n){m=f.createElement("div");m.innerHTML='';n=m.firstChild;n.style.behavior="url(#default#VML)";return n?"object"===typeof n.adj:!0}(document);Array.prototype.indexOf||(Array.prototype.indexOf=function(f,m){for(var n=this.length>>>0,q=!isFinite(m)||0>m?0:m>this.length?this.length:m;q',block:{group:1,shape:1,shapetype:1,line:1,polyline:1,curve:1,rect:1,roundrect:1,oval:1,arc:1,image:1},ends:{butt:"flat",round:"round",square:"square",flat:"flat"},joins:{bevel:"bevel",round:"round",miter:"miter"},cursorstyles:{hand:"pointer",crosshair:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1, -"n-resize":1,"ne-resize":1,"nw-resize":1,"s-resize":1,"se-resize":1,"sw-resize":1,"e-resize":1,"w-resize":1},text_shim:null,_textcache:{},text_dims:function(a,b){b in f._textcache||(f._textcache[b]={});if(a in f._textcache[b])return f._textcache[b][a];var c=f.text_shim;c.style.font=b;c.innerText=a;return f._textcache[b][a]={fontsize:parseInt(c.style.fontSize,10),height:c.offsetHeight,width:c.offsetWidth}},d2r:2*Math.PI/360,get_dim:function(a,b){var c=b||{};c.translate_x=0;c.translate_y=0;if(a.transform){var d= -/translate\((\d+(?:\.\d+)?)(?:,(\d+(?:\.\d+)?))?\)/.exec(a.transform);d&&d[1]&&(c.translate_x=parseFloat(d[1]));d&&d[2]&&(c.translate_y=parseFloat(d[2]));if(d=/rotate\((-?\d+\.\d+|-?\d+)\)/.exec(a.transform))c.rotation=parseFloat(d[1])%360}c.x=parseFloat(a.x||0);c.y=parseFloat(a.y||0);"width"in a&&(c.width=parseInt(a.width,10));"height"in a&&(c.height=parseInt(a.height,10));return c},elm_defaults:{g:{rewrite:"span",attr:function(a,b,c){a=f.get_dim(a);c.style.cssText="position:absolute;zoom:1;left:"+ -(a.translate_x+a.x)+"px;top:"+(a.translate_y+a.y)+"px;"}},line:{rewrite:"shape",attr:function(a,b,c){var b=parseFloat(a.x1||0),d=parseFloat(a.y1||0),e=parseFloat(a.x2||0),i=parseFloat(a.y2||0),h=f.round;c.coordorigin="0,0";c.coordsize="21600,21600";f.path(c).v="M "+h(b)+" "+h(d)+" L "+h(e)+" "+h(i)+" E";f.stroke(c,a)},css:"top:0px;left:0px;width:1000px;height:1000px"},rect:{rewrite:"shape",attr:function(a,b,c){var d=f.get_dim(a),b=f.path(c),e=f.round;c.coordorigin="0,0";c.coordsize="21600,21600"; -var i=e(d.translate_x+d.x),h=e(d.translate_y+d.y),k=e(d.width),d=e(d.height);b.v="M "+i+" "+h+" L "+(i+k)+" "+h+" L "+(i+k)+" "+(h+d)+" L "+i+" "+(h+d)+" x";f.stroke(c,a);f.fill(c,a)},css:"top:0px;left:0px;width:1000px;height:1000px"},path:{rewrite:"shape",attr:function(a,b,c){var b=f.get_dim(a),d=c.style;d.left=b.translate_x+b.x+"px";d.top=b.translate_y+b.y+"px";c.coordorigin="0,0";c.coordsize="21600,21600";f.path(c,a.d);f.fill(c,a);f.stroke(c,a);b.rotation?(b=~~b.rotation%360*f.d2r,a=Math.cos(b), -b=Math.sin(b),f.skew(c,[a.toFixed(8),-b.toFixed(8),b.toFixed(8),a.toFixed(8),0,0].join())):f.skew(c,"")},css:"top:0px;left:0px;width:1000px;height:1000px"},circle:{rewrite:"oval",attr:function(a,b,c){var b=f.get_dim(a),d=c.style,e=parseFloat(a.cx||0)+0.7,i=parseFloat(a.cy||0)+0.7,h=parseFloat(a.r||0)+0.5;d.top=b.translate_y+i-h+"px";d.left=b.translate_x+e-h+"px";d.width=2*h+"px";d.height=2*h+"px";f.fill(c,a);f.stroke(c,a)}},text:{rewrite:"span"},svg:{rewrite:"span",css:"position:relative;overflow:hidden;display:inline-block;~display:block;"}, -"vml:textpath":{rewrite:"textpath"},"vml:skew":{rewrite:"skew"},"vml:path":{rewrite:"path"},"vml:stroke":{rewrite:"stroke"},"vml:fill":{rewrite:"fill"}},_elmcache:{span:document.createElement("span"),div:document.createElement("div")},_elementZIndex:1,createElement:function(a){var b;b=f._elmcache;var c=f.elm_defaults[a]||{},a=c.rewrite||a;a in b||(b[a]=document.createElement(f.pre+a+f.post),a in f.block&&(b[a].className+=" msvml_block"));b=b[a].cloneNode(!1);c.css&&(b.style.cssText=c.css);a in f.block&& -(b.style.cssText=b.style.cssText?b.style.cssText+(";z-index:"+f._elementZIndex++):"z-index:"+f._elementZIndex++);return b},_hex:pv.range(0,256).map(function(a){return pv.Format.pad("0",2,a.toString(16))}),_colorcache:{none:"transparent"},color:function(a,b){if(!(a in f._colorcache)&&(b=/^rgb\((\d+),(\d+),(\d+)\)$/i.exec(a)))f._colorcache[a]="#"+f._hex[b[1]]+f._hex[b[2]]+f._hex[b[3]];return f._colorcache[a]||a},fill:function(a,b){var c=a.getElementsByTagName("fill")[0];c||(c=a.appendChild(f.createElement("vml:fill"))); -!b.fill||"none"===b.fill?c.on=!1:(c.on="true",c.color=f.color(b.fill),c.opacity=parseFloat(b["fill-opacity"]||"1")||"1")},stroke:function(a,b){var c=a.getElementsByTagName("stroke")[0];c||(c=a.appendChild(f.createElement("vml:stroke")));!b.stroke||"none"===b.stroke?(c.on="false",c.weight="0"):(c.on="true",c.weight=parseFloat(b["stroke-width"]||"1")/1.25,c.color=f.color(b.stroke)||"black",c.opacity=parseFloat(b["stroke-opacity"]||"1")||"1",c.joinstyle=f.joins[b["stroke-linejoin"]]||"miter",c.dashstyle= -b["stroke-dasharray"]||"")},path:function(a,b){var c=a.getElementsByTagName("path")[0];c||(c=a.appendChild(f.createElement("vml:path")));1=2*Math.PI)e=h?"AE0,0 "+k+","+k+" 0 23592960AL0,0 "+h+","+h+" 0 23592960":"AE0,0 "+k+","+k+" 0 23592960";else var l=Math.round(11796480*(e.startAngle/Math.PI)),e=Math.round(11796480*(e.angle/Math.PI)),e=h?"AE 0,0 "+k+","+k+" "+-l+" "+-e+" 0,0 "+h+","+h+" "+-(l+e)+" "+e+"X":"M0,0AE0,0 "+k+","+k+" "+-l+" "+-e+"X"; -i.v=e;b=this.append(b,a,d)}}}return b}}(); \ No newline at end of file diff --git a/lib/protovis-msie/src/Vml.js b/lib/protovis-msie/src/Vml.js deleted file mode 100644 index 88bfdbf4..00000000 --- a/lib/protovis-msie/src/Vml.js +++ /dev/null @@ -1,465 +0,0 @@ -var vml = { - - round: function(n){ return Math.round( n * 21.6 ); }, - - styles: null, - - pre: '', - - block: { 'group':1, 'shape':1, 'shapetype':1, 'line':1, - 'polyline':1, 'curve':1, 'rect':1, 'roundrect':1, - 'oval':1, 'arc':1, 'image':1 }, - ends: { 'butt':'flat','round':'round','square':'square','flat':'flat'}, - joins: { 'bevel':'bevel','round':'round','miter':'miter'}, - cursorstyles: { - 'hand': 'pointer', - 'crosshair': 1, 'pointer': 1, 'move': 1, 'text': 1, - 'wait': 1, 'help': 1, 'progress': 1, - 'n-resize': 1, 'ne-resize': 1, 'nw-resize': 1, 's-resize': 1, - 'se-resize': 1, 'sw-resize': 1, 'e-resize': 1, 'w-resize': 1 - }, - - text_shim: null, - _textcache: {}, - text_dims: function ( text, font ) { - if ( !(font in vml._textcache) ) { - vml._textcache[ font ] = {}; - } - if ( text in vml._textcache[ font ] ) { - return vml._textcache[ font ][ text ]; - } - var shim = vml.text_shim; - shim.style.font = font; - shim.innerText = text; - return (vml._textcache[ font ][ text ] = { - fontsize: parseInt( shim.style.fontSize, 10 ), - height: shim.offsetHeight, - width: shim.offsetWidth - }); - }, - - d2r: Math.PI * 2 / 360, // is this used more than once? - - get_dim: function ( attr, target ) { - var o = target || {}; - // reformat the most common attributes - o.translate_x = 0; - o.translate_y = 0; - if ( attr.transform ) { - var t = /translate\((\d+(?:\.\d+)?)(?:,(\d+(?:\.\d+)?))?\)/.exec( attr.transform ); - if ( t && t[1] ) { o.translate_x = parseFloat( t[1] ); } - if ( t && t[2] ) { o.translate_y = parseFloat( t[2] ); } - var r = /rotate\((\d+\.\d+|\d+)\)/.exec( attr.transform ); - if ( r ) { o.rotation = parseFloat( r[1] ) % 360; } - // var scale_x = 1, scale_y = 1, - // var s = /scale\((\d+)(?:,(\d+))?\)/i.exec( value ); - // if ( s && s[1] ) { scale[0] = parseInt( s[1], 10 ); } - // if ( s && s[2] ) { scale[1] = parseInt( s[2], 10 ); } - } - o.x = parseFloat( attr.x||0 ); - o.y = parseFloat( attr.y||0 ); - if ( 'width' in attr ) { - o.width = parseInt( attr.width, 10 ); - } - if ( 'height' in attr ) { - o.height = parseInt( attr.height, 10 ); - } - return o; - }, - - elm_defaults: { - - "g": { - rewrite: 'span', - attr: function ( attr, style, elm ) { - var d = vml.get_dim( attr ); - elm.style.cssText = "position:absolute;zoom:1;left:"+ - (d.translate_x + d.x)+"px;top:"+ - (d.translate_y + d.y)+"px;"; - } - }, - - "line": { - rewrite: 'shape', - attr: function ( attr, style, elm ) { - var x1 = parseFloat( attr.x1 || 0 ), - y1 = parseFloat( attr.y1 || 0 ), - x2 = parseFloat( attr.x2 || 0 ), - y2 = parseFloat( attr.y2 || 0 ), - r = vml.round; - elm.coordorigin = "0,0"; - elm.coordsize = "21600,21600"; - vml.path( elm ).v = 'M '+ r(x1) + ' ' + r(y1) + ' L ' + r(x2) + ' ' + r(y2) + ' E'; - vml.stroke( elm, attr ); - }, - css: "top:0px;left:0px;width:1000px;height:1000px" - }, - - "rect": { - rewrite: 'shape', - attr: function ( attr, style, elm ) { - var d = vml.get_dim( attr ), - p = vml.path( elm ), - r = vml.round; - elm.coordorigin = "0,0"; - elm.coordsize = "21600,21600"; - var x = r(d.translate_x + d.x), - y = r(d.translate_y + d.y), - w = r(d.width), - h = r(d.height); - p.v = 'M ' + x + ' ' + y + - ' L ' + (x + w) + ' ' + y + - ' L ' + (x + w) + ' ' + (y + h) + - ' L ' + x + ' ' + (y + h) + - ' x'; - vml.stroke( elm, attr ); - vml.fill( elm, attr ); - }, - css: "top:0px;left:0px;width:1000px;height:1000px" - }, - - "path": { - rewrite: 'shape', - attr: function ( attr, style, elm ) { - var d = vml.get_dim( attr ), - es = elm.style; - es.left = (d.translate_x + d.x) + "px"; - es.top = (d.translate_y + d.y) + "px"; - elm.coordorigin = "0,0"; - elm.coordsize = "21600,21600"; - vml.path( elm, attr.d ); - vml.fill( elm, attr ); - vml.stroke( elm, attr ); - }, - css: "top:0px;left:0px;width:1000px;height:1000px" - }, - - "circle": { - /* This version of circles is crisper but seems slower - rewrite: 'shape', - attr: function ( attr, style, elm ) { - var d = vml.get_dim( attr ), - r = vml.round( parseFloat( attr.r || 0 ) ), - cx = parseFloat( attr.cx || 0 ), - cy = parseFloat( attr.cy || 0 ), - es = elm.style; - es.left = (d.translate_x + d.x + cx + 0.3) + "px"; - es.top = (d.translate_y + d.y + cy + 0.3) + "px"; - elm.coordorigin = "0,0"; - elm.coordsize = "21600,21600"; - vml.path( elm ).v = "ar-" + r + ",-" + r + "," + r + "," + r + ",0,0,0,0x"; - vml.fill( elm, attr ); - vml.stroke( elm, attr ); - }, - css: "top:0px;left:0px;width:1000px;height:1000px" - */ - rewrite: 'oval', - attr: function ( attr, style, elm ) { - var d = vml.get_dim( attr ), - es = elm.style, - cx = parseFloat( attr.cx || 0 ) + 0.7, - cy = parseFloat( attr.cy || 0 ) + 0.7, - r = parseFloat( attr.r || 0 ) + 0.5; - es.top = ( d.translate_y + cy - r ) + "px"; - es.left = ( d.translate_x + cx - r ) + "px"; - es.width = ( r * 2 ) + "px"; - es.height = ( r * 2 ) + "px"; - vml.fill( elm, attr ); - vml.stroke( elm, attr ); - } - }, - - "text": { - rewrite: 'span' - }, - - "svg": { - rewrite: 'span', - css: 'position:relative;overflow:hidden;display:inline-block;~display:block;' - }, - - // this allows reuse of the createElement function for actual VML - "vml:path": { rewrite: 'path' }, - "vml:stroke": { rewrite: 'stroke' }, - "vml:fill": { rewrite: 'fill' } - - }, - - // cloning elements is a lot faster than creating them - _elmcache: { - 'span': document.createElement( 'span' ), - 'div': document.createElement( 'div' ) - }, - - createElement: function ( type, reformat ) { - var elm, - cache = vml._elmcache, - helper = vml.elm_defaults[ type ] || {}; - var tagName = helper.rewrite || type; - if ( tagName in cache ) { - elm = cache[ tagName ].cloneNode( false ); - } - else { - cache[ tagName ] = document.createElement( vml.pre + tagName + vml.post ); - if ( tagName in vml.block ) { - cache[ tagName ].className += ' msvml_block'; - } - elm = cache[ tagName ].cloneNode( false ); - } - helper.css && (elm.style.cssText = helper.css); - return elm; - }, - - - // hex values lookup table - _hex: pv.range(0,256).map(function(i){ return pv.Format.pad("0",2,i.toString(16)); }), - _colorcache: { 'none': 'transparent' }, - color: function ( value, rgb ) { - // TODO: deal with opacity here ? - if ( !(value in vml._colorcache) && (rgb = /^rgb\((\d+),(\d+),(\d+)\)$/i.exec( value )) ) { - vml._colorcache[value] = '#' + vml._hex[rgb[1]] + vml._hex[rgb[2]] + vml._hex[rgb[3]]; - } - return vml._colorcache[ value ] || value; - }, - - - fill: function ( elm, attr ) { - var fill = elm.getElementsByTagName( 'fill' )[0]; - if ( !fill ) { - fill = elm.appendChild( vml.createElement( 'vml:fill' ) ); - } - if ( !attr.fill || attr.fill === 'none' ) { - fill.on = false; - } - else { - fill.on = 'true'; - fill.color = vml.color( attr.fill ); - fill.opacity = parseFloat( attr['fill-opacity'] || '1' ) || '1'; - } - }, - - - stroke: function ( elm, attr ) { - var stroke = elm.getElementsByTagName( 'stroke' )[0]; - if ( !stroke ) { - stroke = elm.appendChild( vml.createElement( 'vml:stroke' ) ); - } - if ( !attr.stroke || attr.stroke === 'none' ) { - stroke.on = 'false'; - stroke.weight = '0'; - } - else { - stroke.on = 'true'; - stroke.weight = parseFloat( attr['stroke-width'] || '1' ) / 1.25; - stroke.color = vml.color( attr.stroke ) || 'black'; - stroke.opacity = parseFloat( attr['stroke-opacity'] || '1' ) || '1'; - stroke.joinstyle = vml.joins[ attr['stroke-linejoin'] ] || 'miter'; - } - }, - - path: function ( elm, svgpath ) { - var p = elm.getElementsByTagName( 'path' )[0]; - if ( !p ) { - p = elm.appendChild( vml.createElement( 'vml:path' ) ); - } - if ( arguments.length > 1 ) { - p.v = vml.rewritePath( svgpath ); - } - return p; - }, - - - init: function () { - if ( !vml.text_shim ) { - vml.text_shim = document.getElementById('pv_vml_text_shim') || document.createElement('span'); - vml.text_shim.id = 'protovisvml_text_shim'; - vml.text_shim.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline-block;white-space:nowrap;"; - document.body.insertBefore( vml.text_shim, document.body.firstChild ); - } - if ( !vml.styles ) { - vml.styles = document.getElementById('protovisvml_styles') || document.createElement("style"); - if ( vml.styles.id !== 'protovisvml_styles' ) { - vml.styles.id = 'protovisvml_styles'; - document.documentElement.firstChild.appendChild( vml.styles ); - vml.styles.styleSheet.addRule( '.msvml', 'behavior:url(#default#VML);' ); - vml.styles.styleSheet.addRule( '.msvml_block', 'position:absolute;top:0;left:0;' ); - } - try { - if ( !document.namespaces.v ) { document.namespaces.add( 'v', 'urn:schemas-microsoft-com:vml' ); } - } - catch (e) { - vml.pre = '<'; - vml.post = ' class="msvml" xmlns="urn:schemas-microsoft.com:vml">'; - } - } - }, - - // SVG->VML path conversion - This converts a SVG path to a VML path - // - // Things that are missing: - // - Multiple sets of coords. - // Some commands (lineto,curveto,..) can take multiple sets of coords. - // Because Protovis always supplies the command between arguments, this isn't - // implemented, but it would be trivial to complete this. - // - ARCs need solving - _pathcache: {}, - rewritePath:function ( p, deb ) { - var x = 0, y = 0, round = vml.round; - - if ( !p ) { return p; } - if ( p in vml._pathcache ) { return vml._pathcache[p]; } - - // clean up overly detailed fractions (8.526512829121202e-148) - p = p.replace( /(\d*)((\.*\d*)(e ?-?\d*))/g, "$1"); - - var bits = p.match( /([MLHVCSQTAZ][^MLHVCSQTAZ]*)/gi ); - var np = [], lastcurve = []; - for ( var i=0,bl=bits.length; i= 2 * Math.PI) { - if (r1) { - d = "AE0,0 " + r2 + "," + r2 + " 0 23592960" - + "AL0,0 " + r1 + "," + r1 + " 0 23592960"; - } - else { - d = "AE0,0 " + r2 + "," + r2 + " 0 23592960"; - } - } - else { - var sa = Math.round(s.startAngle / Math.PI * 11796480), - a = Math.round(s.angle / Math.PI * 11796480); - if (r1) { - d = "AE 0,0 " + r2 + "," + r2 + " " + -sa + " " + -a - + " 0,0 " + r1 + "," + r1 + " " + -(sa + a) + " " + a - + "X"; - } - else { - d = "M0,0" - + "AE0,0 " + r2 + "," + r2 + " " + -sa + " " + -a - + "X"; - } - } - p.v = d; - - e = this.append(e, scenes, i); - - } - return e; -}; diff --git a/lib/protovis-msie/src/shim-head.js b/lib/protovis-msie/src/shim-head.js deleted file mode 100644 index 2d0ded3d..00000000 --- a/lib/protovis-msie/src/shim-head.js +++ /dev/null @@ -1,46 +0,0 @@ -/*! - * Protovis MSIE/VML addon - * Copyright (C) 2011 by DataMarket - * Dual licensed under the terms of the MIT or GPL Version 2 software licenses. - * - * This software includes code from jQuery, http://jquery.com/ - * jQuery is licensed under the MIT or GPL Version 2 license. - * - * This software includes code from the Protovis, http://mbostock.github.com/protovis/ - * Protovis is licensed under the BSD license. - * - */ - -// detect SVG support -pv.have_SVG = !!( - document.createElementNS && - document.createElementNS( 'http://www.w3.org/2000/svg', 'svg' ).createSVGRect -); - -// detect VML support -pv.have_VML = (function (d,a,b) { - a = d.createElement('div'); - a.innerHTML = ''; - b = a.firstChild; - b.style.behavior = 'url(#default#VML)'; - return b ? typeof b.adj === 'object' : true; -})(document); - -// MSIE does not support indexOf on arrays -if ( !Array.prototype.indexOf ) { - Array.prototype.indexOf = function (s, from) { - var n = this.length >>> 0, - i = (!isFinite(from) || from < 0) ? 0 : (from > this.length) ? this.length : from; - for (; i < n; i++) { if ( this[i] === s ) { return i; } } - return -1; - }; -} - -// only run if we need to -if ( !pv.have_SVG && pv.have_VML ){(function(){ - -if ( typeof Date.now !== 'function' ) { - Date.now = function () { return new Date() * 1; }; -} - - diff --git a/lib/protovis-msie/src/shim-tail.js b/lib/protovis-msie/src/shim-tail.js deleted file mode 100644 index 9cb70af3..00000000 --- a/lib/protovis-msie/src/shim-tail.js +++ /dev/null @@ -1,3 +0,0 @@ - -// end VML override -})();} diff --git a/lib/protovis/.gitignore b/lib/protovis/.gitignore deleted file mode 100644 index 30d1e49a..00000000 --- a/lib/protovis/.gitignore +++ /dev/null @@ -1 +0,0 @@ -jsdoc diff --git a/lib/protovis/FUTURE b/lib/protovis/FUTURE deleted file mode 100644 index ee043e3b..00000000 --- a/lib/protovis/FUTURE +++ /dev/null @@ -1,62 +0,0 @@ -* -- use === and !== instead of == and != -- force type conversion of input arguments in public API? -- use array push rather than string concatentation to improve performance? -- use Object.create instead of pv.extend, if available - -data/? -- AJAX helper? or refer to jQuery - -data/Scale.js -- allow customization of data ticks (e.g., "3 months", "5 minutes") -- greedily convert range to the expected type (for colors?) -- ignore undefined values when computing min/max for domains - -mark/Mark.js -- event handlers should be inherited? -- antialias doesn't always work as expected; requires pixel rounding? -- allow mixin rather than single inheritance? -- linear and radial gradient fills -- pattern fills -- drop shadows, blurring, other graphical effects? -- animation -- faster incremental rendering (detect properties) -- remove first, last, cousin, sibling methods? -- dot-dash strokes using stroke-dasharray - -mark/Bar.js -- rounded corners - -mark/Line.js -- support fillStyle on segmented lines -- spline interpolation -- arrows (markers)? - -mark/Label.js -- text metrics API for smart label placement - -mark/Area.js -- spline interpolation - -mark/Area.Radial.js -mark/Line.Radial.js -mark/Bar.Radial.js - -mark/Image.js -- scale / tile / center / fill / preserveAspectRatio - -physics/LinkConstraint.js -- should support an alpha parameter, like pv.Constraint.position - -layout/Tree.js -- allow depth and breadth offset to be computed automatically - -layout/Force.js -- smarter default rest length / charge force constant - -behavior/Pan.js -- custom bounds -- lock one axis - -behavior/Point.js -- compute true distance from mouse to perimeter (e.g., wedge) diff --git a/lib/protovis/Makefile b/lib/protovis/Makefile deleted file mode 100644 index ae6c3c90..00000000 --- a/lib/protovis/Makefile +++ /dev/null @@ -1,131 +0,0 @@ -JS_LANG_FILES = \ - src/lang/Array.js - -JS_CORE_FILES = \ - src/pv.js \ - src/pv-internals.js \ - src/lang/init.js \ - src/text/Format.js \ - src/text/DateFormat.js \ - src/text/TimeFormat.js \ - src/text/NumberFormat.js \ - src/data/Arrays.js \ - src/data/Numbers.js \ - src/data/Objects.js \ - src/data/Dom.js \ - src/data/Tree.js \ - src/data/Nest.js \ - src/data/Flatten.js \ - src/data/Vector.js \ - src/data/Transform.js \ - src/data/Scale.js \ - src/data/QuantitativeScale.js \ - src/data/LinearScale.js \ - src/data/LogScale.js \ - src/data/RootScale.js \ - src/data/OrdinalScale.js \ - src/data/QuantileScale.js \ - src/data/Histogram.js \ - src/color/Color.js \ - src/color/Colors.js \ - src/color/Ramp.js \ - src/scene/SvgScene.js \ - src/scene/SvgCurve.js \ - src/scene/SvgArea.js \ - src/scene/SvgBar.js \ - src/scene/SvgDot.js \ - src/scene/SvgImage.js \ - src/scene/SvgLabel.js \ - src/scene/SvgLine.js \ - src/scene/SvgPanel.js \ - src/scene/SvgRule.js \ - src/scene/SvgWedge.js \ - src/mark/Mark.js \ - src/mark/Anchor.js \ - src/mark/Area.js \ - src/mark/Bar.js \ - src/mark/Dot.js \ - src/mark/Label.js \ - src/mark/Line.js \ - src/mark/Rule.js \ - src/mark/Panel.js \ - src/mark/Image.js \ - src/mark/Wedge.js - -JS_LAYOUT_FILES = \ - src/physics/Particle.js \ - src/physics/Simulation.js \ - src/physics/Quadtree.js \ - src/physics/Force.js \ - src/physics/ChargeForce.js \ - src/physics/DragForce.js \ - src/physics/SpringForce.js \ - src/physics/Constraint.js \ - src/physics/CollisionConstraint.js \ - src/physics/PositionConstraint.js \ - src/physics/BoundConstraint.js \ - src/layout/Layout.js \ - src/layout/Network.js \ - src/layout/Hierarchy.js \ - src/layout/Grid.js \ - src/layout/Stack.js \ - src/layout/Treemap.js \ - src/layout/Tree.js \ - src/layout/Indent.js \ - src/layout/Pack.js \ - src/layout/Force.js \ - src/layout/Cluster.js \ - src/layout/Partition.js \ - src/layout/Arc.js \ - src/layout/Horizon.js \ - src/layout/Rollup.js \ - src/layout/Matrix.js \ - src/layout/Bullet.js \ - src/behavior/Behavior.js \ - src/behavior/Drag.js \ - src/behavior/Point.js \ - src/behavior/Select.js \ - src/behavior/Resize.js \ - src/behavior/Pan.js \ - src/behavior/Zoom.js - -JS_GEO_FILES = \ - src/geo/Geo.js \ - src/geo/LatLng.js \ - src/geo/Projection.js \ - src/geo/Projections.js \ - src/geo/GeoScale.js - -JS_FILES = \ - $(JS_LANG_FILES) \ - $(JS_CORE_FILES) \ - $(JS_LAYOUT_FILES) \ - $(JS_GEO_FILES) - -JS_COMPILER = \ - java -jar lib/google-compiler/compiler-20100201.jar \ - --charset UTF-8 \ - --warning_level=QUIET - -JSDOC_HOME = /Library/jsdoc-toolkit -JSDOC = java -jar $(JSDOC_HOME)/jsrun.jar $(JSDOC_HOME)/app/run.js - -all: protovis.js protovis.min.js - -protovis.js: $(JS_FILES) Makefile - grep ' ' -Hn $(filter %.js,$^) && echo "ERROR: tab" && exit 1 || true - grep ' ' -Hn $(filter %.js,$^) && echo "ERROR: dos newline" && exit 1 || true - grep ' $$' -Hn $(filter %.js,$^) && echo "ERROR: trailing space" && exit 1 || true - rm -f $@ - cat $(JS_FILES) >> $@ - -protovis.min.js: protovis.js Makefile - rm -f $@ - cat $< | $(JS_COMPILER) >> $@ - -jsdoc: $(JS_FILES) Makefile - rm -rf jsdoc - $(JSDOC) -a -t=$(JSDOC_HOME)/templates/jsdoc -d=$@ -E="^pv-" $(JS_FILES) - -clean: - rm -rf protovis.js protovis.min.js jsdoc diff --git a/lib/protovis/TODO b/lib/protovis/TODO deleted file mode 100644 index d3e27797..00000000 --- a/lib/protovis/TODO +++ /dev/null @@ -1,22 +0,0 @@ -layout/Layout.js -- standardize which attributes are populated -- add support for sort() functions as appropriate (e.g., arc) - -mark/Mark.js -- partial redraw for newly-added marks - -mark/Panel.js -- remove() -- query the visible region (avoid transform invert in panel-transform.html)? - -mark/Anchor.js -- {min,max}:name "singleton" anchors for center labeling on area and line? - -geo/GeoScale.js -- determine center point of projection from domain -- standardize on GeoJSON representation -- include shapefile -> GeoJSON convertors or link to them - -* -- documentation -- port examples diff --git a/lib/protovis/examples/antibiotics/antibiotics-scatter.html b/lib/protovis/examples/antibiotics/antibiotics-scatter.html deleted file mode 100644 index 03b6e84d..00000000 --- a/lib/protovis/examples/antibiotics/antibiotics-scatter.html +++ /dev/null @@ -1,113 +0,0 @@ - - - Antibiotic Effectiveness - - - - - -
- -
- diff --git a/lib/protovis/examples/antibiotics/antibiotics.html b/lib/protovis/examples/antibiotics/antibiotics.html deleted file mode 100644 index 1df410f2..00000000 --- a/lib/protovis/examples/antibiotics/antibiotics.html +++ /dev/null @@ -1,140 +0,0 @@ - - - Antibiotic Effectiveness - - - - - -
- - - diff --git a/lib/protovis/examples/antibiotics/antibiotics.js b/lib/protovis/examples/antibiotics/antibiotics.js deleted file mode 100644 index 45f5ced1..00000000 --- a/lib/protovis/examples/antibiotics/antibiotics.js +++ /dev/null @@ -1,20 +0,0 @@ -var antibiotics = ["penicillin", "streptomycin", "neomycin"]; - -var bacteria = [ - {name: "Mycobacterium tuberculosis", penicillin: 800, streptomycin: 5, neomycin: 2, gram: "negative"}, - {name: "Salmonella schottmuelleri", penicillin: 10, streptomycin: 0.8, neomycin: 0.09, gram: "negative"}, - {name: "Proteus vulgaris", penicillin: 3, streptomycin: 0.1, neomycin: 0.1, gram: "negative"}, - {name: "Klebsiella pneumoniae", penicillin: 850, streptomycin: 1.2, neomycin: 1, gram: "negative"}, - {name: "Brucella abortus", penicillin: 1, streptomycin: 2, neomycin: 0.02, gram: "negative"}, - {name: "Pseudomonas aeruginosa", penicillin: 850, streptomycin: 2, neomycin: 0.4, gram: "negative"}, - {name: "Escherichia coli", penicillin: 100, streptomycin: 0.4, neomycin: 0.1, gram: "negative"}, - {name: "Salmonella (Eberthella) typhosa", penicillin: 1, streptomycin: 0.4, neomycin: 0.008, gram: "negative"}, - {name: "Aerobacter aerogenes", penicillin: 870, streptomycin: 1, neomycin: 1.6, gram: "negative"}, - {name: "Brucella antracis", penicillin: 0.001, streptomycin: 0.01, neomycin: 0.007, gram: "positive"}, - {name: "Streptococcus fecalis", penicillin: 1, streptomycin: 1, neomycin: 0.1, gram: "positive"}, - {name: "Staphylococcus aureus", penicillin: 0.03, streptomycin: 0.03, neomycin: 0.001, gram: "positive"}, - {name: "Staphylococcus albus", penicillin: 0.007, streptomycin: 0.1, neomycin: 0.001, gram: "positive"}, - {name: "Streptococcus hemolyticus", penicillin: 0.001, streptomycin: 14, neomycin: 10, gram: "positive"}, - {name: "Streptococcus viridans", penicillin: 0.005, streptomycin: 10, neomycin: 40, gram: "positive"}, - {name: "Diplococcus pneumoniae", penicillin: 0.005, streptomycin: 11, neomycin: 10, gram: "positive"} -]; diff --git a/lib/protovis/examples/barley/barley.html b/lib/protovis/examples/barley/barley.html deleted file mode 100644 index 6aee0c3e..00000000 --- a/lib/protovis/examples/barley/barley.html +++ /dev/null @@ -1,103 +0,0 @@ - - - Barley Yields - - - - - -
- -
- diff --git a/lib/protovis/examples/barley/barley.js b/lib/protovis/examples/barley/barley.js deleted file mode 100644 index 78af337e..00000000 --- a/lib/protovis/examples/barley/barley.js +++ /dev/null @@ -1,122 +0,0 @@ -var barley = [ - { yield: 27.00000, variety: "Manchuria", year: 1931, site: "University Farm" }, - { yield: 48.86667, variety: "Manchuria", year: 1931, site: "Waseca" }, - { yield: 27.43334, variety: "Manchuria", year: 1931, site: "Morris" }, - { yield: 39.93333, variety: "Manchuria", year: 1931, site: "Crookston" }, - { yield: 32.96667, variety: "Manchuria", year: 1931, site: "Grand Rapids" }, - { yield: 28.96667, variety: "Manchuria", year: 1931, site: "Duluth" }, - { yield: 43.06666, variety: "Glabron", year: 1931, site: "University Farm" }, - { yield: 55.20000, variety: "Glabron", year: 1931, site: "Waseca" }, - { yield: 28.76667, variety: "Glabron", year: 1931, site: "Morris" }, - { yield: 38.13333, variety: "Glabron", year: 1931, site: "Crookston" }, - { yield: 29.13333, variety: "Glabron", year: 1931, site: "Grand Rapids" }, - { yield: 29.66667, variety: "Glabron", year: 1931, site: "Duluth" }, - { yield: 35.13333, variety: "Svansota", year: 1931, site: "University Farm" }, - { yield: 47.33333, variety: "Svansota", year: 1931, site: "Waseca" }, - { yield: 25.76667, variety: "Svansota", year: 1931, site: "Morris" }, - { yield: 40.46667, variety: "Svansota", year: 1931, site: "Crookston" }, - { yield: 29.66667, variety: "Svansota", year: 1931, site: "Grand Rapids" }, - { yield: 25.70000, variety: "Svansota", year: 1931, site: "Duluth" }, - { yield: 39.90000, variety: "Velvet", year: 1931, site: "University Farm" }, - { yield: 50.23333, variety: "Velvet", year: 1931, site: "Waseca" }, - { yield: 26.13333, variety: "Velvet", year: 1931, site: "Morris" }, - { yield: 41.33333, variety: "Velvet", year: 1931, site: "Crookston" }, - { yield: 23.03333, variety: "Velvet", year: 1931, site: "Grand Rapids" }, - { yield: 26.30000, variety: "Velvet", year: 1931, site: "Duluth" }, - { yield: 36.56666, variety: "Trebi", year: 1931, site: "University Farm" }, - { yield: 63.83330, variety: "Trebi", year: 1931, site: "Waseca" }, - { yield: 43.76667, variety: "Trebi", year: 1931, site: "Morris" }, - { yield: 46.93333, variety: "Trebi", year: 1931, site: "Crookston" }, - { yield: 29.76667, variety: "Trebi", year: 1931, site: "Grand Rapids" }, - { yield: 33.93333, variety: "Trebi", year: 1931, site: "Duluth" }, - { yield: 43.26667, variety: "No. 457", year: 1931, site: "University Farm" }, - { yield: 58.10000, variety: "No. 457", year: 1931, site: "Waseca" }, - { yield: 28.70000, variety: "No. 457", year: 1931, site: "Morris" }, - { yield: 45.66667, variety: "No. 457", year: 1931, site: "Crookston" }, - { yield: 32.16667, variety: "No. 457", year: 1931, site: "Grand Rapids" }, - { yield: 33.60000, variety: "No. 457", year: 1931, site: "Duluth" }, - { yield: 36.60000, variety: "No. 462", year: 1931, site: "University Farm" }, - { yield: 65.76670, variety: "No. 462", year: 1931, site: "Waseca" }, - { yield: 30.36667, variety: "No. 462", year: 1931, site: "Morris" }, - { yield: 48.56666, variety: "No. 462", year: 1931, site: "Crookston" }, - { yield: 24.93334, variety: "No. 462", year: 1931, site: "Grand Rapids" }, - { yield: 28.10000, variety: "No. 462", year: 1931, site: "Duluth" }, - { yield: 32.76667, variety: "Peatland", year: 1931, site: "University Farm" }, - { yield: 48.56666, variety: "Peatland", year: 1931, site: "Waseca" }, - { yield: 29.86667, variety: "Peatland", year: 1931, site: "Morris" }, - { yield: 41.60000, variety: "Peatland", year: 1931, site: "Crookston" }, - { yield: 34.70000, variety: "Peatland", year: 1931, site: "Grand Rapids" }, - { yield: 32.00000, variety: "Peatland", year: 1931, site: "Duluth" }, - { yield: 24.66667, variety: "No. 475", year: 1931, site: "University Farm" }, - { yield: 46.76667, variety: "No. 475", year: 1931, site: "Waseca" }, - { yield: 22.60000, variety: "No. 475", year: 1931, site: "Morris" }, - { yield: 44.10000, variety: "No. 475", year: 1931, site: "Crookston" }, - { yield: 19.70000, variety: "No. 475", year: 1931, site: "Grand Rapids" }, - { yield: 33.06666, variety: "No. 475", year: 1931, site: "Duluth" }, - { yield: 39.30000, variety: "Wisconsin No. 38", year: 1931, site: "University Farm" }, - { yield: 58.80000, variety: "Wisconsin No. 38", year: 1931, site: "Waseca" }, - { yield: 29.46667, variety: "Wisconsin No. 38", year: 1931, site: "Morris" }, - { yield: 49.86667, variety: "Wisconsin No. 38", year: 1931, site: "Crookston" }, - { yield: 34.46667, variety: "Wisconsin No. 38", year: 1931, site: "Grand Rapids" }, - { yield: 31.60000, variety: "Wisconsin No. 38", year: 1931, site: "Duluth" }, - { yield: 26.90000, variety: "Manchuria", year: 1932, site: "University Farm" }, - { yield: 33.46667, variety: "Manchuria", year: 1932, site: "Waseca" }, - { yield: 34.36666, variety: "Manchuria", year: 1932, site: "Morris" }, - { yield: 32.96667, variety: "Manchuria", year: 1932, site: "Crookston" }, - { yield: 22.13333, variety: "Manchuria", year: 1932, site: "Grand Rapids" }, - { yield: 22.56667, variety: "Manchuria", year: 1932, site: "Duluth" }, - { yield: 36.80000, variety: "Glabron", year: 1932, site: "University Farm" }, - { yield: 37.73333, variety: "Glabron", year: 1932, site: "Waseca" }, - { yield: 35.13333, variety: "Glabron", year: 1932, site: "Morris" }, - { yield: 26.16667, variety: "Glabron", year: 1932, site: "Crookston" }, - { yield: 14.43333, variety: "Glabron", year: 1932, site: "Grand Rapids" }, - { yield: 25.86667, variety: "Glabron", year: 1932, site: "Duluth" }, - { yield: 27.43334, variety: "Svansota", year: 1932, site: "University Farm" }, - { yield: 38.50000, variety: "Svansota", year: 1932, site: "Waseca" }, - { yield: 35.03333, variety: "Svansota", year: 1932, site: "Morris" }, - { yield: 20.63333, variety: "Svansota", year: 1932, site: "Crookston" }, - { yield: 16.63333, variety: "Svansota", year: 1932, site: "Grand Rapids" }, - { yield: 22.23333, variety: "Svansota", year: 1932, site: "Duluth" }, - { yield: 26.80000, variety: "Velvet", year: 1932, site: "University Farm" }, - { yield: 37.40000, variety: "Velvet", year: 1932, site: "Waseca" }, - { yield: 38.83333, variety: "Velvet", year: 1932, site: "Morris" }, - { yield: 32.06666, variety: "Velvet", year: 1932, site: "Crookston" }, - { yield: 32.23333, variety: "Velvet", year: 1932, site: "Grand Rapids" }, - { yield: 22.46667, variety: "Velvet", year: 1932, site: "Duluth" }, - { yield: 29.06667, variety: "Trebi", year: 1932, site: "University Farm" }, - { yield: 49.23330, variety: "Trebi", year: 1932, site: "Waseca" }, - { yield: 46.63333, variety: "Trebi", year: 1932, site: "Morris" }, - { yield: 41.83333, variety: "Trebi", year: 1932, site: "Crookston" }, - { yield: 20.63333, variety: "Trebi", year: 1932, site: "Grand Rapids" }, - { yield: 30.60000, variety: "Trebi", year: 1932, site: "Duluth" }, - { yield: 26.43334, variety: "No. 457", year: 1932, site: "University Farm" }, - { yield: 42.20000, variety: "No. 457", year: 1932, site: "Waseca" }, - { yield: 43.53334, variety: "No. 457", year: 1932, site: "Morris" }, - { yield: 34.33333, variety: "No. 457", year: 1932, site: "Crookston" }, - { yield: 19.46667, variety: "No. 457", year: 1932, site: "Grand Rapids" }, - { yield: 22.70000, variety: "No. 457", year: 1932, site: "Duluth" }, - { yield: 25.56667, variety: "No. 462", year: 1932, site: "University Farm" }, - { yield: 44.70000, variety: "No. 462", year: 1932, site: "Waseca" }, - { yield: 47.00000, variety: "No. 462", year: 1932, site: "Morris" }, - { yield: 30.53333, variety: "No. 462", year: 1932, site: "Crookston" }, - { yield: 19.90000, variety: "No. 462", year: 1932, site: "Grand Rapids" }, - { yield: 22.50000, variety: "No. 462", year: 1932, site: "Duluth" }, - { yield: 28.06667, variety: "Peatland", year: 1932, site: "University Farm" }, - { yield: 36.03333, variety: "Peatland", year: 1932, site: "Waseca" }, - { yield: 43.20000, variety: "Peatland", year: 1932, site: "Morris" }, - { yield: 25.23333, variety: "Peatland", year: 1932, site: "Crookston" }, - { yield: 26.76667, variety: "Peatland", year: 1932, site: "Grand Rapids" }, - { yield: 31.36667, variety: "Peatland", year: 1932, site: "Duluth" }, - { yield: 30.00000, variety: "No. 475", year: 1932, site: "University Farm" }, - { yield: 41.26667, variety: "No. 475", year: 1932, site: "Waseca" }, - { yield: 44.23333, variety: "No. 475", year: 1932, site: "Morris" }, - { yield: 32.13333, variety: "No. 475", year: 1932, site: "Crookston" }, - { yield: 15.23333, variety: "No. 475", year: 1932, site: "Grand Rapids" }, - { yield: 27.36667, variety: "No. 475", year: 1932, site: "Duluth" }, - { yield: 38.00000, variety: "Wisconsin No. 38", year: 1932, site: "University Farm" }, - { yield: 58.16667, variety: "Wisconsin No. 38", year: 1932, site: "Waseca" }, - { yield: 47.16667, variety: "Wisconsin No. 38", year: 1932, site: "Morris" }, - { yield: 35.90000, variety: "Wisconsin No. 38", year: 1932, site: "Crookston" }, - { yield: 20.66667, variety: "Wisconsin No. 38", year: 1932, site: "Grand Rapids" }, - { yield: 29.33333, variety: "Wisconsin No. 38", year: 1932, site: "Duluth" } -]; diff --git a/lib/protovis/examples/cars/cars.html b/lib/protovis/examples/cars/cars.html deleted file mode 100644 index 7459840a..00000000 --- a/lib/protovis/examples/cars/cars.html +++ /dev/null @@ -1,90 +0,0 @@ - - - Cars - - - - - -
- -
- diff --git a/lib/protovis/examples/cars/cars.js b/lib/protovis/examples/cars/cars.js deleted file mode 100644 index c5a95aeb..00000000 --- a/lib/protovis/examples/cars/cars.js +++ /dev/null @@ -1,408 +0,0 @@ -var cars = [ -{name:"chevrolet chevelle malibu", mpg:18, cylinders:8, displacement:307, horsepower:130, weight:3504, acceleration:12, year:70, origin:1}, -{name:"buick skylark 320", mpg:15, cylinders:8, displacement:350, horsepower:165, weight:3693, acceleration:11.5, year:70, origin:1}, -{name:"plymouth satellite", mpg:18, cylinders:8, displacement:318, horsepower:150, weight:3436, acceleration:11, year:70, origin:1}, -{name:"amc rebel sst", mpg:16, cylinders:8, displacement:304, horsepower:150, weight:3433, acceleration:12, year:70, origin:1}, -{name:"ford torino", mpg:17, cylinders:8, displacement:302, horsepower:140, weight:3449, acceleration:10.5, year:70, origin:1}, -{name:"ford galaxie 500", mpg:15, cylinders:8, displacement:429, horsepower:198, weight:4341, acceleration:10, year:70, origin:1}, -{name:"chevrolet impala", mpg:14, cylinders:8, displacement:454, horsepower:220, weight:4354, acceleration:9, year:70, origin:1}, -{name:"plymouth fury iii", mpg:14, cylinders:8, displacement:440, horsepower:215, weight:4312, acceleration:8.5, year:70, origin:1}, -{name:"pontiac catalina", mpg:14, cylinders:8, displacement:455, horsepower:225, weight:4425, acceleration:10, year:70, origin:1}, -{name:"amc ambassador dpl", mpg:15, cylinders:8, displacement:390, horsepower:190, weight:3850, acceleration:8.5, year:70, origin:1}, -{name:"citroen ds-21 pallas", mpg:undefined, cylinders:4, displacement:133, horsepower:115, weight:3090, acceleration:17.5, year:70, origin:2}, -{name:"chevrolet chevelle concours (sw)", mpg:undefined, cylinders:8, displacement:350, horsepower:165, weight:4142, acceleration:11.5, year:70, origin:1}, -{name:"ford torino (sw)", mpg:undefined, cylinders:8, displacement:351, horsepower:153, weight:4034, acceleration:11, year:70, origin:1}, -{name:"plymouth satellite (sw)", mpg:undefined, cylinders:8, displacement:383, horsepower:175, weight:4166, acceleration:10.5, year:70, origin:1}, -{name:"amc rebel sst (sw)", mpg:undefined, cylinders:8, displacement:360, horsepower:175, weight:3850, acceleration:11, year:70, origin:1}, -{name:"dodge challenger se", mpg:15, cylinders:8, displacement:383, horsepower:170, weight:3563, acceleration:10, year:70, origin:1}, -{name:"plymouth 'cuda 340", mpg:14, cylinders:8, displacement:340, horsepower:160, weight:3609, acceleration:8, year:70, origin:1}, -{name:"ford mustang boss 302", mpg:undefined, cylinders:8, displacement:302, horsepower:140, weight:3353, acceleration:8, year:70, origin:1}, -{name:"chevrolet monte carlo", mpg:15, cylinders:8, displacement:400, horsepower:150, weight:3761, acceleration:9.5, year:70, origin:1}, -{name:"buick estate wagon (sw)", mpg:14, cylinders:8, displacement:455, horsepower:225, weight:3086, acceleration:10, year:70, origin:1}, -{name:"toyota corona mark ii", mpg:24, cylinders:4, displacement:113, horsepower:95, weight:2372, acceleration:15, year:70, origin:3}, -{name:"plymouth duster", mpg:22, cylinders:6, displacement:198, horsepower:95, weight:2833, acceleration:15.5, year:70, origin:1}, -{name:"amc hornet", mpg:18, cylinders:6, displacement:199, horsepower:97, weight:2774, acceleration:15.5, year:70, origin:1}, -{name:"ford maverick", mpg:21, cylinders:6, displacement:200, horsepower:85, weight:2587, acceleration:16, year:70, origin:1}, -{name:"datsun pl510", mpg:27, cylinders:4, displacement:97, horsepower:88, weight:2130, acceleration:14.5, year:70, origin:3}, -{name:"volkswagen 1131 deluxe sedan", mpg:26, cylinders:4, displacement:97, horsepower:46, weight:1835, acceleration:20.5, year:70, origin:2}, -{name:"peugeot 504", mpg:25, cylinders:4, displacement:110, horsepower:87, weight:2672, acceleration:17.5, year:70, origin:2}, -{name:"audi 100 ls", mpg:24, cylinders:4, displacement:107, horsepower:90, weight:2430, acceleration:14.5, year:70, origin:2}, -{name:"saab 99e", mpg:25, cylinders:4, displacement:104, horsepower:95, weight:2375, acceleration:17.5, year:70, origin:2}, -{name:"bmw 2002", mpg:26, cylinders:4, displacement:121, horsepower:113, weight:2234, acceleration:12.5, year:70, origin:2}, -{name:"amc gremlin", mpg:21, cylinders:6, displacement:199, horsepower:90, weight:2648, acceleration:15, year:70, origin:1}, -{name:"ford f250", mpg:10, cylinders:8, displacement:360, horsepower:215, weight:4615, acceleration:14, year:70, origin:1}, -{name:"chevy c20", mpg:10, cylinders:8, displacement:307, horsepower:200, weight:4376, acceleration:15, year:70, origin:1}, -{name:"dodge d200", mpg:11, cylinders:8, displacement:318, horsepower:210, weight:4382, acceleration:13.5, year:70, origin:1}, -{name:"hi 1200d", mpg:9, cylinders:8, displacement:304, horsepower:193, weight:4732, acceleration:18.5, year:70, origin:1}, -{name:"datsun pl510", mpg:27, cylinders:4, displacement:97, horsepower:88, weight:2130, acceleration:14.5, year:71, origin:3}, -{name:"chevrolet vega 2300", mpg:28, cylinders:4, displacement:140, horsepower:90, weight:2264, acceleration:15.5, year:71, origin:1}, -{name:"toyota corona", mpg:25, cylinders:4, displacement:113, horsepower:95, weight:2228, acceleration:14, year:71, origin:3}, -{name:"ford pinto", mpg:25, cylinders:4, displacement:98, horsepower:undefined, weight:2046, acceleration:19, year:71, origin:1}, -{name:"volkswagen super beetle 117", mpg:undefined, cylinders:4, displacement:97, horsepower:48, weight:1978, acceleration:20, year:71, origin:2}, -{name:"amc gremlin", mpg:19, cylinders:6, displacement:232, horsepower:100, weight:2634, acceleration:13, year:71, origin:1}, -{name:"plymouth satellite custom", mpg:16, cylinders:6, displacement:225, horsepower:105, weight:3439, acceleration:15.5, year:71, origin:1}, -{name:"chevrolet chevelle malibu", mpg:17, cylinders:6, displacement:250, horsepower:100, weight:3329, acceleration:15.5, year:71, origin:1}, -{name:"ford torino 500", mpg:19, cylinders:6, displacement:250, horsepower:88, weight:3302, acceleration:15.5, year:71, origin:1}, -{name:"amc matador", mpg:18, cylinders:6, displacement:232, horsepower:100, weight:3288, acceleration:15.5, year:71, origin:1}, -{name:"chevrolet impala", mpg:14, cylinders:8, displacement:350, horsepower:165, weight:4209, acceleration:12, year:71, origin:1}, -{name:"pontiac catalina brougham", mpg:14, cylinders:8, displacement:400, horsepower:175, weight:4464, acceleration:11.5, year:71, origin:1}, -{name:"ford galaxie 500", mpg:14, cylinders:8, displacement:351, horsepower:153, weight:4154, acceleration:13.5, year:71, origin:1}, -{name:"plymouth fury iii", mpg:14, cylinders:8, displacement:318, horsepower:150, weight:4096, acceleration:13, year:71, origin:1}, -{name:"dodge monaco (sw)", mpg:12, cylinders:8, displacement:383, horsepower:180, weight:4955, acceleration:11.5, year:71, origin:1}, -{name:"ford country squire (sw)", mpg:13, cylinders:8, displacement:400, horsepower:170, weight:4746, acceleration:12, year:71, origin:1}, -{name:"pontiac safari (sw)", mpg:13, cylinders:8, displacement:400, horsepower:175, weight:5140, acceleration:12, year:71, origin:1}, -{name:"amc hornet sportabout (sw)", mpg:18, cylinders:6, displacement:258, horsepower:110, weight:2962, acceleration:13.5, year:71, origin:1}, -{name:"chevrolet vega (sw)", mpg:22, cylinders:4, displacement:140, horsepower:72, weight:2408, acceleration:19, year:71, origin:1}, -{name:"pontiac firebird", mpg:19, cylinders:6, displacement:250, horsepower:100, weight:3282, acceleration:15, year:71, origin:1}, -{name:"ford mustang", mpg:18, cylinders:6, displacement:250, horsepower:88, weight:3139, acceleration:14.5, year:71, origin:1}, -{name:"mercury capri 2000", mpg:23, cylinders:4, displacement:122, horsepower:86, weight:2220, acceleration:14, year:71, origin:1}, -{name:"opel 1900", mpg:28, cylinders:4, displacement:116, horsepower:90, weight:2123, acceleration:14, year:71, origin:2}, -{name:"peugeot 304", mpg:30, cylinders:4, displacement:79, horsepower:70, weight:2074, acceleration:19.5, year:71, origin:2}, -{name:"fiat 124b", mpg:30, cylinders:4, displacement:88, horsepower:76, weight:2065, acceleration:14.5, year:71, origin:2}, -{name:"toyota corolla 1200", mpg:31, cylinders:4, displacement:71, horsepower:65, weight:1773, acceleration:19, year:71, origin:3}, -{name:"datsun 1200", mpg:35, cylinders:4, displacement:72, horsepower:69, weight:1613, acceleration:18, year:71, origin:3}, -{name:"volkswagen model 111", mpg:27, cylinders:4, displacement:97, horsepower:60, weight:1834, acceleration:19, year:71, origin:2}, -{name:"plymouth cricket", mpg:26, cylinders:4, displacement:91, horsepower:70, weight:1955, acceleration:20.5, year:71, origin:1}, -{name:"toyota corona hardtop", mpg:24, cylinders:4, displacement:113, horsepower:95, weight:2278, acceleration:15.5, year:72, origin:3}, -{name:"dodge colt hardtop", mpg:25, cylinders:4, displacement:97.5, horsepower:80, weight:2126, acceleration:17, year:72, origin:1}, -{name:"volkswagen type 3", mpg:23, cylinders:4, displacement:97, horsepower:54, weight:2254, acceleration:23.5, year:72, origin:2}, -{name:"chevrolet vega", mpg:20, cylinders:4, displacement:140, horsepower:90, weight:2408, acceleration:19.5, year:72, origin:1}, -{name:"ford pinto runabout", mpg:21, cylinders:4, displacement:122, horsepower:86, weight:2226, acceleration:16.5, year:72, origin:1}, -{name:"chevrolet impala", mpg:13, cylinders:8, displacement:350, horsepower:165, weight:4274, acceleration:12, year:72, origin:1}, -{name:"pontiac catalina", mpg:14, cylinders:8, displacement:400, horsepower:175, weight:4385, acceleration:12, year:72, origin:1}, -{name:"plymouth fury iii", mpg:15, cylinders:8, displacement:318, horsepower:150, weight:4135, acceleration:13.5, year:72, origin:1}, -{name:"ford galaxie 500", mpg:14, cylinders:8, displacement:351, horsepower:153, weight:4129, acceleration:13, year:72, origin:1}, -{name:"amc ambassador sst", mpg:17, cylinders:8, displacement:304, horsepower:150, weight:3672, acceleration:11.5, year:72, origin:1}, -{name:"mercury marquis", mpg:11, cylinders:8, displacement:429, horsepower:208, weight:4633, acceleration:11, year:72, origin:1}, -{name:"buick lesabre custom", mpg:13, cylinders:8, displacement:350, horsepower:155, weight:4502, acceleration:13.5, year:72, origin:1}, -{name:"oldsmobile delta 88 royale", mpg:12, cylinders:8, displacement:350, horsepower:160, weight:4456, acceleration:13.5, year:72, origin:1}, -{name:"chrysler newport royal", mpg:13, cylinders:8, displacement:400, horsepower:190, weight:4422, acceleration:12.5, year:72, origin:1}, -{name:"mazda rx2 coupe", mpg:19, cylinders:3, displacement:70, horsepower:97, weight:2330, acceleration:13.5, year:72, origin:3}, -{name:"amc matador (sw)", mpg:15, cylinders:8, displacement:304, horsepower:150, weight:3892, acceleration:12.5, year:72, origin:1}, -{name:"chevrolet chevelle concours (sw)", mpg:13, cylinders:8, displacement:307, horsepower:130, weight:4098, acceleration:14, year:72, origin:1}, -{name:"ford gran torino (sw)", mpg:13, cylinders:8, displacement:302, horsepower:140, weight:4294, acceleration:16, year:72, origin:1}, -{name:"plymouth satellite custom (sw)", mpg:14, cylinders:8, displacement:318, horsepower:150, weight:4077, acceleration:14, year:72, origin:1}, -{name:"volvo 145e (sw)", mpg:18, cylinders:4, displacement:121, horsepower:112, weight:2933, acceleration:14.5, year:72, origin:2}, -{name:"volkswagen 411 (sw)", mpg:22, cylinders:4, displacement:121, horsepower:76, weight:2511, acceleration:18, year:72, origin:2}, -{name:"peugeot 504 (sw)", mpg:21, cylinders:4, displacement:120, horsepower:87, weight:2979, acceleration:19.5, year:72, origin:2}, -{name:"renault 12 (sw)", mpg:26, cylinders:4, displacement:96, horsepower:69, weight:2189, acceleration:18, year:72, origin:2}, -{name:"ford pinto (sw)", mpg:22, cylinders:4, displacement:122, horsepower:86, weight:2395, acceleration:16, year:72, origin:1}, -{name:"datsun 510 (sw)", mpg:28, cylinders:4, displacement:97, horsepower:92, weight:2288, acceleration:17, year:72, origin:3}, -{name:"toyouta corona mark ii (sw)", mpg:23, cylinders:4, displacement:120, horsepower:97, weight:2506, acceleration:14.5, year:72, origin:3}, -{name:"dodge colt (sw)", mpg:28, cylinders:4, displacement:98, horsepower:80, weight:2164, acceleration:15, year:72, origin:1}, -{name:"toyota corolla 1600 (sw)", mpg:27, cylinders:4, displacement:97, horsepower:88, weight:2100, acceleration:16.5, year:72, origin:3}, -{name:"buick century 350", mpg:13, cylinders:8, displacement:350, horsepower:175, weight:4100, acceleration:13, year:73, origin:1}, -{name:"amc matador", mpg:14, cylinders:8, displacement:304, horsepower:150, weight:3672, acceleration:11.5, year:73, origin:1}, -{name:"chevrolet malibu", mpg:13, cylinders:8, displacement:350, horsepower:145, weight:3988, acceleration:13, year:73, origin:1}, -{name:"ford gran torino", mpg:14, cylinders:8, displacement:302, horsepower:137, weight:4042, acceleration:14.5, year:73, origin:1}, -{name:"dodge coronet custom", mpg:15, cylinders:8, displacement:318, horsepower:150, weight:3777, acceleration:12.5, year:73, origin:1}, -{name:"mercury marquis brougham", mpg:12, cylinders:8, displacement:429, horsepower:198, weight:4952, acceleration:11.5, year:73, origin:1}, -{name:"chevrolet caprice classic", mpg:13, cylinders:8, displacement:400, horsepower:150, weight:4464, acceleration:12, year:73, origin:1}, -{name:"ford ltd", mpg:13, cylinders:8, displacement:351, horsepower:158, weight:4363, acceleration:13, year:73, origin:1}, -{name:"plymouth fury gran sedan", mpg:14, cylinders:8, displacement:318, horsepower:150, weight:4237, acceleration:14.5, year:73, origin:1}, -{name:"chrysler new yorker brougham", mpg:13, cylinders:8, displacement:440, horsepower:215, weight:4735, acceleration:11, year:73, origin:1}, -{name:"buick electra 225 custom", mpg:12, cylinders:8, displacement:455, horsepower:225, weight:4951, acceleration:11, year:73, origin:1}, -{name:"amc ambassador brougham", mpg:13, cylinders:8, displacement:360, horsepower:175, weight:3821, acceleration:11, year:73, origin:1}, -{name:"plymouth valiant", mpg:18, cylinders:6, displacement:225, horsepower:105, weight:3121, acceleration:16.5, year:73, origin:1}, -{name:"chevrolet nova custom", mpg:16, cylinders:6, displacement:250, horsepower:100, weight:3278, acceleration:18, year:73, origin:1}, -{name:"amc hornet", mpg:18, cylinders:6, displacement:232, horsepower:100, weight:2945, acceleration:16, year:73, origin:1}, -{name:"ford maverick", mpg:18, cylinders:6, displacement:250, horsepower:88, weight:3021, acceleration:16.5, year:73, origin:1}, -{name:"plymouth duster", mpg:23, cylinders:6, displacement:198, horsepower:95, weight:2904, acceleration:16, year:73, origin:1}, -{name:"volkswagen super beetle", mpg:26, cylinders:4, displacement:97, horsepower:46, weight:1950, acceleration:21, year:73, origin:2}, -{name:"chevrolet impala", mpg:11, cylinders:8, displacement:400, horsepower:150, weight:4997, acceleration:14, year:73, origin:1}, -{name:"ford country", mpg:12, cylinders:8, displacement:400, horsepower:167, weight:4906, acceleration:12.5, year:73, origin:1}, -{name:"plymouth custom suburb", mpg:13, cylinders:8, displacement:360, horsepower:170, weight:4654, acceleration:13, year:73, origin:1}, -{name:"oldsmobile vista cruiser", mpg:12, cylinders:8, displacement:350, horsepower:180, weight:4499, acceleration:12.5, year:73, origin:1}, -{name:"amc gremlin", mpg:18, cylinders:6, displacement:232, horsepower:100, weight:2789, acceleration:15, year:73, origin:1}, -{name:"toyota carina", mpg:20, cylinders:4, displacement:97, horsepower:88, weight:2279, acceleration:19, year:73, origin:3}, -{name:"chevrolet vega", mpg:21, cylinders:4, displacement:140, horsepower:72, weight:2401, acceleration:19.5, year:73, origin:1}, -{name:"datsun 610", mpg:22, cylinders:4, displacement:108, horsepower:94, weight:2379, acceleration:16.5, year:73, origin:3}, -{name:"maxda rx3", mpg:18, cylinders:3, displacement:70, horsepower:90, weight:2124, acceleration:13.5, year:73, origin:3}, -{name:"ford pinto", mpg:19, cylinders:4, displacement:122, horsepower:85, weight:2310, acceleration:18.5, year:73, origin:1}, -{name:"mercury capri v6", mpg:21, cylinders:6, displacement:155, horsepower:107, weight:2472, acceleration:14, year:73, origin:1}, -{name:"fiat 124 sport coupe", mpg:26, cylinders:4, displacement:98, horsepower:90, weight:2265, acceleration:15.5, year:73, origin:2}, -{name:"chevrolet monte carlo s", mpg:15, cylinders:8, displacement:350, horsepower:145, weight:4082, acceleration:13, year:73, origin:1}, -{name:"pontiac grand prix", mpg:16, cylinders:8, displacement:400, horsepower:230, weight:4278, acceleration:9.5, year:73, origin:1}, -{name:"fiat 128", mpg:29, cylinders:4, displacement:68, horsepower:49, weight:1867, acceleration:19.5, year:73, origin:2}, -{name:"opel manta", mpg:24, cylinders:4, displacement:116, horsepower:75, weight:2158, acceleration:15.5, year:73, origin:2}, -{name:"audi 100ls", mpg:20, cylinders:4, displacement:114, horsepower:91, weight:2582, acceleration:14, year:73, origin:2}, -{name:"volvo 144ea", mpg:19, cylinders:4, displacement:121, horsepower:112, weight:2868, acceleration:15.5, year:73, origin:2}, -{name:"dodge dart custom", mpg:15, cylinders:8, displacement:318, horsepower:150, weight:3399, acceleration:11, year:73, origin:1}, -{name:"saab 99le", mpg:24, cylinders:4, displacement:121, horsepower:110, weight:2660, acceleration:14, year:73, origin:2}, -{name:"toyota mark ii", mpg:20, cylinders:6, displacement:156, horsepower:122, weight:2807, acceleration:13.5, year:73, origin:3}, -{name:"oldsmobile omega", mpg:11, cylinders:8, displacement:350, horsepower:180, weight:3664, acceleration:11, year:73, origin:1}, -{name:"plymouth duster", mpg:20, cylinders:6, displacement:198, horsepower:95, weight:3102, acceleration:16.5, year:74, origin:1}, -{name:"ford maverick", mpg:21, cylinders:6, displacement:200, horsepower:undefined, weight:2875, acceleration:17, year:74, origin:1}, -{name:"amc hornet", mpg:19, cylinders:6, displacement:232, horsepower:100, weight:2901, acceleration:16, year:74, origin:1}, -{name:"chevrolet nova", mpg:15, cylinders:6, displacement:250, horsepower:100, weight:3336, acceleration:17, year:74, origin:1}, -{name:"datsun b210", mpg:31, cylinders:4, displacement:79, horsepower:67, weight:1950, acceleration:19, year:74, origin:3}, -{name:"ford pinto", mpg:26, cylinders:4, displacement:122, horsepower:80, weight:2451, acceleration:16.5, year:74, origin:1}, -{name:"toyota corolla 1200", mpg:32, cylinders:4, displacement:71, horsepower:65, weight:1836, acceleration:21, year:74, origin:3}, -{name:"chevrolet vega", mpg:25, cylinders:4, displacement:140, horsepower:75, weight:2542, acceleration:17, year:74, origin:1}, -{name:"chevrolet chevelle malibu classic", mpg:16, cylinders:6, displacement:250, horsepower:100, weight:3781, acceleration:17, year:74, origin:1}, -{name:"amc matador", mpg:16, cylinders:6, displacement:258, horsepower:110, weight:3632, acceleration:18, year:74, origin:1}, -{name:"plymouth satellite sebring", mpg:18, cylinders:6, displacement:225, horsepower:105, weight:3613, acceleration:16.5, year:74, origin:1}, -{name:"ford gran torino", mpg:16, cylinders:8, displacement:302, horsepower:140, weight:4141, acceleration:14, year:74, origin:1}, -{name:"buick century luxus (sw)", mpg:13, cylinders:8, displacement:350, horsepower:150, weight:4699, acceleration:14.5, year:74, origin:1}, -{name:"dodge coronet custom (sw)", mpg:14, cylinders:8, displacement:318, horsepower:150, weight:4457, acceleration:13.5, year:74, origin:1}, -{name:"ford gran torino (sw)", mpg:14, cylinders:8, displacement:302, horsepower:140, weight:4638, acceleration:16, year:74, origin:1}, -{name:"amc matador (sw)", mpg:14, cylinders:8, displacement:304, horsepower:150, weight:4257, acceleration:15.5, year:74, origin:1}, -{name:"audi fox", mpg:29, cylinders:4, displacement:98, horsepower:83, weight:2219, acceleration:16.5, year:74, origin:2}, -{name:"volkswagen dasher", mpg:26, cylinders:4, displacement:79, horsepower:67, weight:1963, acceleration:15.5, year:74, origin:2}, -{name:"opel manta", mpg:26, cylinders:4, displacement:97, horsepower:78, weight:2300, acceleration:14.5, year:74, origin:2}, -{name:"toyota corona", mpg:31, cylinders:4, displacement:76, horsepower:52, weight:1649, acceleration:16.5, year:74, origin:3}, -{name:"datsun 710", mpg:32, cylinders:4, displacement:83, horsepower:61, weight:2003, acceleration:19, year:74, origin:3}, -{name:"dodge colt", mpg:28, cylinders:4, displacement:90, horsepower:75, weight:2125, acceleration:14.5, year:74, origin:1}, -{name:"fiat 128", mpg:24, cylinders:4, displacement:90, horsepower:75, weight:2108, acceleration:15.5, year:74, origin:2}, -{name:"fiat 124 tc", mpg:26, cylinders:4, displacement:116, horsepower:75, weight:2246, acceleration:14, year:74, origin:2}, -{name:"honda civic", mpg:24, cylinders:4, displacement:120, horsepower:97, weight:2489, acceleration:15, year:74, origin:3}, -{name:"subaru", mpg:26, cylinders:4, displacement:108, horsepower:93, weight:2391, acceleration:15.5, year:74, origin:3}, -{name:"fiat x1.9", mpg:31, cylinders:4, displacement:79, horsepower:67, weight:2000, acceleration:16, year:74, origin:2}, -{name:"plymouth valiant custom", mpg:19, cylinders:6, displacement:225, horsepower:95, weight:3264, acceleration:16, year:75, origin:1}, -{name:"chevrolet nova", mpg:18, cylinders:6, displacement:250, horsepower:105, weight:3459, acceleration:16, year:75, origin:1}, -{name:"mercury monarch", mpg:15, cylinders:6, displacement:250, horsepower:72, weight:3432, acceleration:21, year:75, origin:1}, -{name:"ford maverick", mpg:15, cylinders:6, displacement:250, horsepower:72, weight:3158, acceleration:19.5, year:75, origin:1}, -{name:"pontiac catalina", mpg:16, cylinders:8, displacement:400, horsepower:170, weight:4668, acceleration:11.5, year:75, origin:1}, -{name:"chevrolet bel air", mpg:15, cylinders:8, displacement:350, horsepower:145, weight:4440, acceleration:14, year:75, origin:1}, -{name:"plymouth grand fury", mpg:16, cylinders:8, displacement:318, horsepower:150, weight:4498, acceleration:14.5, year:75, origin:1}, -{name:"ford ltd", mpg:14, cylinders:8, displacement:351, horsepower:148, weight:4657, acceleration:13.5, year:75, origin:1}, -{name:"buick century", mpg:17, cylinders:6, displacement:231, horsepower:110, weight:3907, acceleration:21, year:75, origin:1}, -{name:"chevroelt chevelle malibu", mpg:16, cylinders:6, displacement:250, horsepower:105, weight:3897, acceleration:18.5, year:75, origin:1}, -{name:"amc matador", mpg:15, cylinders:6, displacement:258, horsepower:110, weight:3730, acceleration:19, year:75, origin:1}, -{name:"plymouth fury", mpg:18, cylinders:6, displacement:225, horsepower:95, weight:3785, acceleration:19, year:75, origin:1}, -{name:"buick skyhawk", mpg:21, cylinders:6, displacement:231, horsepower:110, weight:3039, acceleration:15, year:75, origin:1}, -{name:"chevrolet monza 2+2", mpg:20, cylinders:8, displacement:262, horsepower:110, weight:3221, acceleration:13.5, year:75, origin:1}, -{name:"ford mustang ii", mpg:13, cylinders:8, displacement:302, horsepower:129, weight:3169, acceleration:12, year:75, origin:1}, -{name:"toyota corolla", mpg:29, cylinders:4, displacement:97, horsepower:75, weight:2171, acceleration:16, year:75, origin:3}, -{name:"ford pinto", mpg:23, cylinders:4, displacement:140, horsepower:83, weight:2639, acceleration:17, year:75, origin:1}, -{name:"amc gremlin", mpg:20, cylinders:6, displacement:232, horsepower:100, weight:2914, acceleration:16, year:75, origin:1}, -{name:"pontiac astro", mpg:23, cylinders:4, displacement:140, horsepower:78, weight:2592, acceleration:18.5, year:75, origin:1}, -{name:"toyota corona", mpg:24, cylinders:4, displacement:134, horsepower:96, weight:2702, acceleration:13.5, year:75, origin:3}, -{name:"volkswagen dasher", mpg:25, cylinders:4, displacement:90, horsepower:71, weight:2223, acceleration:16.5, year:75, origin:2}, -{name:"datsun 710", mpg:24, cylinders:4, displacement:119, horsepower:97, weight:2545, acceleration:17, year:75, origin:3}, -{name:"ford pinto", mpg:18, cylinders:6, displacement:171, horsepower:97, weight:2984, acceleration:14.5, year:75, origin:1}, -{name:"volkswagen rabbit", mpg:29, cylinders:4, displacement:90, horsepower:70, weight:1937, acceleration:14, year:75, origin:2}, -{name:"amc pacer", mpg:19, cylinders:6, displacement:232, horsepower:90, weight:3211, acceleration:17, year:75, origin:1}, -{name:"audi 100ls", mpg:23, cylinders:4, displacement:115, horsepower:95, weight:2694, acceleration:15, year:75, origin:2}, -{name:"peugeot 504", mpg:23, cylinders:4, displacement:120, horsepower:88, weight:2957, acceleration:17, year:75, origin:2}, -{name:"volvo 244dl", mpg:22, cylinders:4, displacement:121, horsepower:98, weight:2945, acceleration:14.5, year:75, origin:2}, -{name:"saab 99le", mpg:25, cylinders:4, displacement:121, horsepower:115, weight:2671, acceleration:13.5, year:75, origin:2}, -{name:"honda civic cvcc", mpg:33, cylinders:4, displacement:91, horsepower:53, weight:1795, acceleration:17.5, year:75, origin:3}, -{name:"fiat 131", mpg:28, cylinders:4, displacement:107, horsepower:86, weight:2464, acceleration:15.5, year:76, origin:2}, -{name:"opel 1900", mpg:25, cylinders:4, displacement:116, horsepower:81, weight:2220, acceleration:16.9, year:76, origin:2}, -{name:"capri ii", mpg:25, cylinders:4, displacement:140, horsepower:92, weight:2572, acceleration:14.9, year:76, origin:1}, -{name:"dodge colt", mpg:26, cylinders:4, displacement:98, horsepower:79, weight:2255, acceleration:17.7, year:76, origin:1}, -{name:"renault 12tl", mpg:27, cylinders:4, displacement:101, horsepower:83, weight:2202, acceleration:15.3, year:76, origin:2}, -{name:"chevrolet chevelle malibu classic", mpg:17.5, cylinders:8, displacement:305, horsepower:140, weight:4215, acceleration:13, year:76, origin:1}, -{name:"dodge coronet brougham", mpg:16, cylinders:8, displacement:318, horsepower:150, weight:4190, acceleration:13, year:76, origin:1}, -{name:"amc matador", mpg:15.5, cylinders:8, displacement:304, horsepower:120, weight:3962, acceleration:13.9, year:76, origin:1}, -{name:"ford gran torino", mpg:14.5, cylinders:8, displacement:351, horsepower:152, weight:4215, acceleration:12.8, year:76, origin:1}, -{name:"plymouth valiant", mpg:22, cylinders:6, displacement:225, horsepower:100, weight:3233, acceleration:15.4, year:76, origin:1}, -{name:"chevrolet nova", mpg:22, cylinders:6, displacement:250, horsepower:105, weight:3353, acceleration:14.5, year:76, origin:1}, -{name:"ford maverick", mpg:24, cylinders:6, displacement:200, horsepower:81, weight:3012, acceleration:17.6, year:76, origin:1}, -{name:"amc hornet", mpg:22.5, cylinders:6, displacement:232, horsepower:90, weight:3085, acceleration:17.6, year:76, origin:1}, -{name:"chevrolet chevette", mpg:29, cylinders:4, displacement:85, horsepower:52, weight:2035, acceleration:22.2, year:76, origin:1}, -{name:"chevrolet woody", mpg:24.5, cylinders:4, displacement:98, horsepower:60, weight:2164, acceleration:22.1, year:76, origin:1}, -{name:"vw rabbit", mpg:29, cylinders:4, displacement:90, horsepower:70, weight:1937, acceleration:14.2, year:76, origin:2}, -{name:"honda civic", mpg:33, cylinders:4, displacement:91, horsepower:53, weight:1795, acceleration:17.4, year:76, origin:3}, -{name:"dodge aspen se", mpg:20, cylinders:6, displacement:225, horsepower:100, weight:3651, acceleration:17.7, year:76, origin:1}, -{name:"ford granada ghia", mpg:18, cylinders:6, displacement:250, horsepower:78, weight:3574, acceleration:21, year:76, origin:1}, -{name:"pontiac ventura sj", mpg:18.5, cylinders:6, displacement:250, horsepower:110, weight:3645, acceleration:16.2, year:76, origin:1}, -{name:"amc pacer d/l", mpg:17.5, cylinders:6, displacement:258, horsepower:95, weight:3193, acceleration:17.8, year:76, origin:1}, -{name:"volkswagen rabbit", mpg:29.5, cylinders:4, displacement:97, horsepower:71, weight:1825, acceleration:12.2, year:76, origin:2}, -{name:"datsun b-210", mpg:32, cylinders:4, displacement:85, horsepower:70, weight:1990, acceleration:17, year:76, origin:3}, -{name:"toyota corolla", mpg:28, cylinders:4, displacement:97, horsepower:75, weight:2155, acceleration:16.4, year:76, origin:3}, -{name:"ford pinto", mpg:26.5, cylinders:4, displacement:140, horsepower:72, weight:2565, acceleration:13.6, year:76, origin:1}, -{name:"volvo 245", mpg:20, cylinders:4, displacement:130, horsepower:102, weight:3150, acceleration:15.7, year:76, origin:2}, -{name:"plymouth volare premier v8", mpg:13, cylinders:8, displacement:318, horsepower:150, weight:3940, acceleration:13.2, year:76, origin:1}, -{name:"peugeot 504", mpg:19, cylinders:4, displacement:120, horsepower:88, weight:3270, acceleration:21.9, year:76, origin:2}, -{name:"toyota mark ii", mpg:19, cylinders:6, displacement:156, horsepower:108, weight:2930, acceleration:15.5, year:76, origin:3}, -{name:"mercedes-benz 280s", mpg:16.5, cylinders:6, displacement:168, horsepower:120, weight:3820, acceleration:16.7, year:76, origin:2}, -{name:"cadillac seville", mpg:16.5, cylinders:8, displacement:350, horsepower:180, weight:4380, acceleration:12.1, year:76, origin:1}, -{name:"chevy c10", mpg:13, cylinders:8, displacement:350, horsepower:145, weight:4055, acceleration:12, year:76, origin:1}, -{name:"ford f108", mpg:13, cylinders:8, displacement:302, horsepower:130, weight:3870, acceleration:15, year:76, origin:1}, -{name:"dodge d100", mpg:13, cylinders:8, displacement:318, horsepower:150, weight:3755, acceleration:14, year:76, origin:1}, -{name:"honda accord cvcc", mpg:31.5, cylinders:4, displacement:98, horsepower:68, weight:2045, acceleration:18.5, year:77, origin:3}, -{name:"buick opel isuzu deluxe", mpg:30, cylinders:4, displacement:111, horsepower:80, weight:2155, acceleration:14.8, year:77, origin:1}, -{name:"renault 5 gtl", mpg:36, cylinders:4, displacement:79, horsepower:58, weight:1825, acceleration:18.6, year:77, origin:2}, -{name:"plymouth arrow gs", mpg:25.5, cylinders:4, displacement:122, horsepower:96, weight:2300, acceleration:15.5, year:77, origin:1}, -{name:"datsun f-10 hatchback", mpg:33.5, cylinders:4, displacement:85, horsepower:70, weight:1945, acceleration:16.8, year:77, origin:3}, -{name:"chevrolet caprice classic", mpg:17.5, cylinders:8, displacement:305, horsepower:145, weight:3880, acceleration:12.5, year:77, origin:1}, -{name:"oldsmobile cutlass supreme", mpg:17, cylinders:8, displacement:260, horsepower:110, weight:4060, acceleration:19, year:77, origin:1}, -{name:"dodge monaco brougham", mpg:15.5, cylinders:8, displacement:318, horsepower:145, weight:4140, acceleration:13.7, year:77, origin:1}, -{name:"mercury cougar brougham", mpg:15, cylinders:8, displacement:302, horsepower:130, weight:4295, acceleration:14.9, year:77, origin:1}, -{name:"chevrolet concours", mpg:17.5, cylinders:6, displacement:250, horsepower:110, weight:3520, acceleration:16.4, year:77, origin:1}, -{name:"buick skylark", mpg:20.5, cylinders:6, displacement:231, horsepower:105, weight:3425, acceleration:16.9, year:77, origin:1}, -{name:"plymouth volare custom", mpg:19, cylinders:6, displacement:225, horsepower:100, weight:3630, acceleration:17.7, year:77, origin:1}, -{name:"ford granada", mpg:18.5, cylinders:6, displacement:250, horsepower:98, weight:3525, acceleration:19, year:77, origin:1}, -{name:"pontiac grand prix lj", mpg:16, cylinders:8, displacement:400, horsepower:180, weight:4220, acceleration:11.1, year:77, origin:1}, -{name:"chevrolet monte carlo landau", mpg:15.5, cylinders:8, displacement:350, horsepower:170, weight:4165, acceleration:11.4, year:77, origin:1}, -{name:"chrysler cordoba", mpg:15.5, cylinders:8, displacement:400, horsepower:190, weight:4325, acceleration:12.2, year:77, origin:1}, -{name:"ford thunderbird", mpg:16, cylinders:8, displacement:351, horsepower:149, weight:4335, acceleration:14.5, year:77, origin:1}, -{name:"volkswagen rabbit custom", mpg:29, cylinders:4, displacement:97, horsepower:78, weight:1940, acceleration:14.5, year:77, origin:2}, -{name:"pontiac sunbird coupe", mpg:24.5, cylinders:4, displacement:151, horsepower:88, weight:2740, acceleration:16, year:77, origin:1}, -{name:"toyota corolla liftback", mpg:26, cylinders:4, displacement:97, horsepower:75, weight:2265, acceleration:18.2, year:77, origin:3}, -{name:"ford mustang ii 2+2", mpg:25.5, cylinders:4, displacement:140, horsepower:89, weight:2755, acceleration:15.8, year:77, origin:1}, -{name:"chevrolet chevette", mpg:30.5, cylinders:4, displacement:98, horsepower:63, weight:2051, acceleration:17, year:77, origin:1}, -{name:"dodge colt m/m", mpg:33.5, cylinders:4, displacement:98, horsepower:83, weight:2075, acceleration:15.9, year:77, origin:1}, -{name:"subaru dl", mpg:30, cylinders:4, displacement:97, horsepower:67, weight:1985, acceleration:16.4, year:77, origin:3}, -{name:"volkswagen dasher", mpg:30.5, cylinders:4, displacement:97, horsepower:78, weight:2190, acceleration:14.1, year:77, origin:2}, -{name:"datsun 810", mpg:22, cylinders:6, displacement:146, horsepower:97, weight:2815, acceleration:14.5, year:77, origin:3}, -{name:"bmw 320i", mpg:21.5, cylinders:4, displacement:121, horsepower:110, weight:2600, acceleration:12.8, year:77, origin:2}, -{name:"mazda rx-4", mpg:21.5, cylinders:3, displacement:80, horsepower:110, weight:2720, acceleration:13.5, year:77, origin:3}, -{name:"volkswagen rabbit custom diesel", mpg:43.1, cylinders:4, displacement:90, horsepower:48, weight:1985, acceleration:21.5, year:78, origin:2}, -{name:"ford fiesta", mpg:36.1, cylinders:4, displacement:98, horsepower:66, weight:1800, acceleration:14.4, year:78, origin:1}, -{name:"mazda glc deluxe", mpg:32.8, cylinders:4, displacement:78, horsepower:52, weight:1985, acceleration:19.4, year:78, origin:3}, -{name:"datsun b210 gx", mpg:39.4, cylinders:4, displacement:85, horsepower:70, weight:2070, acceleration:18.6, year:78, origin:3}, -{name:"honda civic cvcc", mpg:36.1, cylinders:4, displacement:91, horsepower:60, weight:1800, acceleration:16.4, year:78, origin:3}, -{name:"oldsmobile cutlass salon brougham", mpg:19.9, cylinders:8, displacement:260, horsepower:110, weight:3365, acceleration:15.5, year:78, origin:1}, -{name:"dodge diplomat", mpg:19.4, cylinders:8, displacement:318, horsepower:140, weight:3735, acceleration:13.2, year:78, origin:1}, -{name:"mercury monarch ghia", mpg:20.2, cylinders:8, displacement:302, horsepower:139, weight:3570, acceleration:12.8, year:78, origin:1}, -{name:"pontiac phoenix lj", mpg:19.2, cylinders:6, displacement:231, horsepower:105, weight:3535, acceleration:19.2, year:78, origin:1}, -{name:"chevrolet malibu", mpg:20.5, cylinders:6, displacement:200, horsepower:95, weight:3155, acceleration:18.2, year:78, origin:1}, -{name:"ford fairmont (auto)", mpg:20.2, cylinders:6, displacement:200, horsepower:85, weight:2965, acceleration:15.8, year:78, origin:1}, -{name:"ford fairmont (man)", mpg:25.1, cylinders:4, displacement:140, horsepower:88, weight:2720, acceleration:15.4, year:78, origin:1}, -{name:"plymouth volare", mpg:20.5, cylinders:6, displacement:225, horsepower:100, weight:3430, acceleration:17.2, year:78, origin:1}, -{name:"amc concord", mpg:19.4, cylinders:6, displacement:232, horsepower:90, weight:3210, acceleration:17.2, year:78, origin:1}, -{name:"buick century special", mpg:20.6, cylinders:6, displacement:231, horsepower:105, weight:3380, acceleration:15.8, year:78, origin:1}, -{name:"mercury zephyr", mpg:20.8, cylinders:6, displacement:200, horsepower:85, weight:3070, acceleration:16.7, year:78, origin:1}, -{name:"dodge aspen", mpg:18.6, cylinders:6, displacement:225, horsepower:110, weight:3620, acceleration:18.7, year:78, origin:1}, -{name:"amc concord d/l", mpg:18.1, cylinders:6, displacement:258, horsepower:120, weight:3410, acceleration:15.1, year:78, origin:1}, -{name:"chevrolet monte carlo landau", mpg:19.2, cylinders:8, displacement:305, horsepower:145, weight:3425, acceleration:13.2, year:78, origin:1}, -{name:"buick regal sport coupe (turbo)", mpg:17.7, cylinders:6, displacement:231, horsepower:165, weight:3445, acceleration:13.4, year:78, origin:1}, -{name:"ford futura", mpg:18.1, cylinders:8, displacement:302, horsepower:139, weight:3205, acceleration:11.2, year:78, origin:1}, -{name:"dodge magnum xe", mpg:17.5, cylinders:8, displacement:318, horsepower:140, weight:4080, acceleration:13.7, year:78, origin:1}, -{name:"chevrolet chevette", mpg:30, cylinders:4, displacement:98, horsepower:68, weight:2155, acceleration:16.5, year:78, origin:1}, -{name:"toyota corona", mpg:27.5, cylinders:4, displacement:134, horsepower:95, weight:2560, acceleration:14.2, year:78, origin:3}, -{name:"datsun 510", mpg:27.2, cylinders:4, displacement:119, horsepower:97, weight:2300, acceleration:14.7, year:78, origin:3}, -{name:"dodge omni", mpg:30.9, cylinders:4, displacement:105, horsepower:75, weight:2230, acceleration:14.5, year:78, origin:1}, -{name:"toyota celica gt liftback", mpg:21.1, cylinders:4, displacement:134, horsepower:95, weight:2515, acceleration:14.8, year:78, origin:3}, -{name:"plymouth sapporo", mpg:23.2, cylinders:4, displacement:156, horsepower:105, weight:2745, acceleration:16.7, year:78, origin:1}, -{name:"oldsmobile starfire sx", mpg:23.8, cylinders:4, displacement:151, horsepower:85, weight:2855, acceleration:17.6, year:78, origin:1}, -{name:"datsun 200-sx", mpg:23.9, cylinders:4, displacement:119, horsepower:97, weight:2405, acceleration:14.9, year:78, origin:3}, -{name:"audi 5000", mpg:20.3, cylinders:5, displacement:131, horsepower:103, weight:2830, acceleration:15.9, year:78, origin:2}, -{name:"volvo 264gl", mpg:17, cylinders:6, displacement:163, horsepower:125, weight:3140, acceleration:13.6, year:78, origin:2}, -{name:"saab 99gle", mpg:21.6, cylinders:4, displacement:121, horsepower:115, weight:2795, acceleration:15.7, year:78, origin:2}, -{name:"peugeot 604sl", mpg:16.2, cylinders:6, displacement:163, horsepower:133, weight:3410, acceleration:15.8, year:78, origin:2}, -{name:"volkswagen scirocco", mpg:31.5, cylinders:4, displacement:89, horsepower:71, weight:1990, acceleration:14.9, year:78, origin:2}, -{name:"honda accord lx", mpg:29.5, cylinders:4, displacement:98, horsepower:68, weight:2135, acceleration:16.6, year:78, origin:3}, -{name:"pontiac lemans v6", mpg:21.5, cylinders:6, displacement:231, horsepower:115, weight:3245, acceleration:15.4, year:79, origin:1}, -{name:"mercury zephyr 6", mpg:19.8, cylinders:6, displacement:200, horsepower:85, weight:2990, acceleration:18.2, year:79, origin:1}, -{name:"ford fairmont 4", mpg:22.3, cylinders:4, displacement:140, horsepower:88, weight:2890, acceleration:17.3, year:79, origin:1}, -{name:"amc concord dl 6", mpg:20.2, cylinders:6, displacement:232, horsepower:90, weight:3265, acceleration:18.2, year:79, origin:1}, -{name:"dodge aspen 6", mpg:20.6, cylinders:6, displacement:225, horsepower:110, weight:3360, acceleration:16.6, year:79, origin:1}, -{name:"chevrolet caprice classic", mpg:17, cylinders:8, displacement:305, horsepower:130, weight:3840, acceleration:15.4, year:79, origin:1}, -{name:"ford ltd landau", mpg:17.6, cylinders:8, displacement:302, horsepower:129, weight:3725, acceleration:13.4, year:79, origin:1}, -{name:"mercury grand marquis", mpg:16.5, cylinders:8, displacement:351, horsepower:138, weight:3955, acceleration:13.2, year:79, origin:1}, -{name:"dodge st. regis", mpg:18.2, cylinders:8, displacement:318, horsepower:135, weight:3830, acceleration:15.2, year:79, origin:1}, -{name:"buick estate wagon (sw)", mpg:16.9, cylinders:8, displacement:350, horsepower:155, weight:4360, acceleration:14.9, year:79, origin:1}, -{name:"ford country squire (sw)", mpg:15.5, cylinders:8, displacement:351, horsepower:142, weight:4054, acceleration:14.3, year:79, origin:1}, -{name:"chevrolet malibu classic (sw)", mpg:19.2, cylinders:8, displacement:267, horsepower:125, weight:3605, acceleration:15, year:79, origin:1}, -{name:"chrysler lebaron town @ country (sw)", mpg:18.5, cylinders:8, displacement:360, horsepower:150, weight:3940, acceleration:13, year:79, origin:1}, -{name:"vw rabbit custom", mpg:31.9, cylinders:4, displacement:89, horsepower:71, weight:1925, acceleration:14, year:79, origin:2}, -{name:"maxda glc deluxe", mpg:34.1, cylinders:4, displacement:86, horsepower:65, weight:1975, acceleration:15.2, year:79, origin:3}, -{name:"dodge colt hatchback custom", mpg:35.7, cylinders:4, displacement:98, horsepower:80, weight:1915, acceleration:14.4, year:79, origin:1}, -{name:"amc spirit dl", mpg:27.4, cylinders:4, displacement:121, horsepower:80, weight:2670, acceleration:15, year:79, origin:1}, -{name:"mercedes benz 300d", mpg:25.4, cylinders:5, displacement:183, horsepower:77, weight:3530, acceleration:20.1, year:79, origin:2}, -{name:"cadillac eldorado", mpg:23, cylinders:8, displacement:350, horsepower:125, weight:3900, acceleration:17.4, year:79, origin:1}, -{name:"peugeot 504", mpg:27.2, cylinders:4, displacement:141, horsepower:71, weight:3190, acceleration:24.8, year:79, origin:2}, -{name:"oldsmobile cutlass salon brougham", mpg:23.9, cylinders:8, displacement:260, horsepower:90, weight:3420, acceleration:22.2, year:79, origin:1}, -{name:"plymouth horizon", mpg:34.2, cylinders:4, displacement:105, horsepower:70, weight:2200, acceleration:13.2, year:79, origin:1}, -{name:"plymouth horizon tc3", mpg:34.5, cylinders:4, displacement:105, horsepower:70, weight:2150, acceleration:14.9, year:79, origin:1}, -{name:"datsun 210", mpg:31.8, cylinders:4, displacement:85, horsepower:65, weight:2020, acceleration:19.2, year:79, origin:3}, -{name:"fiat strada custom", mpg:37.3, cylinders:4, displacement:91, horsepower:69, weight:2130, acceleration:14.7, year:79, origin:2}, -{name:"buick skylark limited", mpg:28.4, cylinders:4, displacement:151, horsepower:90, weight:2670, acceleration:16, year:79, origin:1}, -{name:"chevrolet citation", mpg:28.8, cylinders:6, displacement:173, horsepower:115, weight:2595, acceleration:11.3, year:79, origin:1}, -{name:"oldsmobile omega brougham", mpg:26.8, cylinders:6, displacement:173, horsepower:115, weight:2700, acceleration:12.9, year:79, origin:1}, -{name:"pontiac phoenix", mpg:33.5, cylinders:4, displacement:151, horsepower:90, weight:2556, acceleration:13.2, year:79, origin:1}, -{name:"vw rabbit", mpg:41.5, cylinders:4, displacement:98, horsepower:76, weight:2144, acceleration:14.7, year:80, origin:2}, -{name:"toyota corolla tercel", mpg:38.1, cylinders:4, displacement:89, horsepower:60, weight:1968, acceleration:18.8, year:80, origin:3}, -{name:"chevrolet chevette", mpg:32.1, cylinders:4, displacement:98, horsepower:70, weight:2120, acceleration:15.5, year:80, origin:1}, -{name:"datsun 310", mpg:37.2, cylinders:4, displacement:86, horsepower:65, weight:2019, acceleration:16.4, year:80, origin:3}, -{name:"chevrolet citation", mpg:28, cylinders:4, displacement:151, horsepower:90, weight:2678, acceleration:16.5, year:80, origin:1}, -{name:"ford fairmont", mpg:26.4, cylinders:4, displacement:140, horsepower:88, weight:2870, acceleration:18.1, year:80, origin:1}, -{name:"amc concord", mpg:24.3, cylinders:4, displacement:151, horsepower:90, weight:3003, acceleration:20.1, year:80, origin:1}, -{name:"dodge aspen", mpg:19.1, cylinders:6, displacement:225, horsepower:90, weight:3381, acceleration:18.7, year:80, origin:1}, -{name:"audi 4000", mpg:34.3, cylinders:4, displacement:97, horsepower:78, weight:2188, acceleration:15.8, year:80, origin:2}, -{name:"toyota corona liftback", mpg:29.8, cylinders:4, displacement:134, horsepower:90, weight:2711, acceleration:15.5, year:80, origin:3}, -{name:"mazda 626", mpg:31.3, cylinders:4, displacement:120, horsepower:75, weight:2542, acceleration:17.5, year:80, origin:3}, -{name:"datsun 510 hatchback", mpg:37, cylinders:4, displacement:119, horsepower:92, weight:2434, acceleration:15, year:80, origin:3}, -{name:"toyota corolla", mpg:32.2, cylinders:4, displacement:108, horsepower:75, weight:2265, acceleration:15.2, year:80, origin:3}, -{name:"mazda glc", mpg:46.6, cylinders:4, displacement:86, horsepower:65, weight:2110, acceleration:17.9, year:80, origin:3}, -{name:"dodge colt", mpg:27.9, cylinders:4, displacement:156, horsepower:105, weight:2800, acceleration:14.4, year:80, origin:1}, -{name:"datsun 210", mpg:40.8, cylinders:4, displacement:85, horsepower:65, weight:2110, acceleration:19.2, year:80, origin:3}, -{name:"vw rabbit c (diesel)", mpg:44.3, cylinders:4, displacement:90, horsepower:48, weight:2085, acceleration:21.7, year:80, origin:2}, -{name:"vw dasher (diesel)", mpg:43.4, cylinders:4, displacement:90, horsepower:48, weight:2335, acceleration:23.7, year:80, origin:2}, -{name:"audi 5000s (diesel)", mpg:36.4, cylinders:5, displacement:121, horsepower:67, weight:2950, acceleration:19.9, year:80, origin:2}, -{name:"mercedes-benz 240d", mpg:30, cylinders:4, displacement:146, horsepower:67, weight:3250, acceleration:21.8, year:80, origin:2}, -{name:"honda civic 1500 gl", mpg:44.6, cylinders:4, displacement:91, horsepower:67, weight:1850, acceleration:13.8, year:80, origin:3}, -{name:"renault lecar deluxe", mpg:40.9, cylinders:4, displacement:85, horsepower:undefined, weight:1835, acceleration:17.3, year:80, origin:2}, -{name:"subaru dl", mpg:33.8, cylinders:4, displacement:97, horsepower:67, weight:2145, acceleration:18, year:80, origin:3}, -{name:"vokswagen rabbit", mpg:29.8, cylinders:4, displacement:89, horsepower:62, weight:1845, acceleration:15.3, year:80, origin:2}, -{name:"datsun 280-zx", mpg:32.7, cylinders:6, displacement:168, horsepower:132, weight:2910, acceleration:11.4, year:80, origin:3}, -{name:"mazda rx-7 gs", mpg:23.7, cylinders:3, displacement:70, horsepower:100, weight:2420, acceleration:12.5, year:80, origin:3}, -{name:"triumph tr7 coupe", mpg:35, cylinders:4, displacement:122, horsepower:88, weight:2500, acceleration:15.1, year:80, origin:2}, -{name:"ford mustang cobra", mpg:23.6, cylinders:4, displacement:140, horsepower:undefined, weight:2905, acceleration:14.3, year:80, origin:1}, -{name:"honda accord", mpg:32.4, cylinders:4, displacement:107, horsepower:72, weight:2290, acceleration:17, year:80, origin:3}, -{name:"plymouth reliant", mpg:27.2, cylinders:4, displacement:135, horsepower:84, weight:2490, acceleration:15.7, year:81, origin:1}, -{name:"buick skylark", mpg:26.6, cylinders:4, displacement:151, horsepower:84, weight:2635, acceleration:16.4, year:81, origin:1}, -{name:"dodge aries wagon (sw)", mpg:25.8, cylinders:4, displacement:156, horsepower:92, weight:2620, acceleration:14.4, year:81, origin:1}, -{name:"chevrolet citation", mpg:23.5, cylinders:6, displacement:173, horsepower:110, weight:2725, acceleration:12.6, year:81, origin:1}, -{name:"plymouth reliant", mpg:30, cylinders:4, displacement:135, horsepower:84, weight:2385, acceleration:12.9, year:81, origin:1}, -{name:"toyota starlet", mpg:39.1, cylinders:4, displacement:79, horsepower:58, weight:1755, acceleration:16.9, year:81, origin:3}, -{name:"plymouth champ", mpg:39, cylinders:4, displacement:86, horsepower:64, weight:1875, acceleration:16.4, year:81, origin:1}, -{name:"honda civic 1300", mpg:35.1, cylinders:4, displacement:81, horsepower:60, weight:1760, acceleration:16.1, year:81, origin:3}, -{name:"subaru", mpg:32.3, cylinders:4, displacement:97, horsepower:67, weight:2065, acceleration:17.8, year:81, origin:3}, -{name:"datsun 210 mpg", mpg:37, cylinders:4, displacement:85, horsepower:65, weight:1975, acceleration:19.4, year:81, origin:3}, -{name:"toyota tercel", mpg:37.7, cylinders:4, displacement:89, horsepower:62, weight:2050, acceleration:17.3, year:81, origin:3}, -{name:"mazda glc 4", mpg:34.1, cylinders:4, displacement:91, horsepower:68, weight:1985, acceleration:16, year:81, origin:3}, -{name:"plymouth horizon 4", mpg:34.7, cylinders:4, displacement:105, horsepower:63, weight:2215, acceleration:14.9, year:81, origin:1}, -{name:"ford escort 4w", mpg:34.4, cylinders:4, displacement:98, horsepower:65, weight:2045, acceleration:16.2, year:81, origin:1}, -{name:"ford escort 2h", mpg:29.9, cylinders:4, displacement:98, horsepower:65, weight:2380, acceleration:20.7, year:81, origin:1}, -{name:"volkswagen jetta", mpg:33, cylinders:4, displacement:105, horsepower:74, weight:2190, acceleration:14.2, year:81, origin:2}, -{name:"renault 18i", mpg:34.5, cylinders:4, displacement:100, horsepower:undefined, weight:2320, acceleration:15.8, year:81, origin:2}, -{name:"honda prelude", mpg:33.7, cylinders:4, displacement:107, horsepower:75, weight:2210, acceleration:14.4, year:81, origin:3}, -{name:"toyota corolla", mpg:32.4, cylinders:4, displacement:108, horsepower:75, weight:2350, acceleration:16.8, year:81, origin:3}, -{name:"datsun 200sx", mpg:32.9, cylinders:4, displacement:119, horsepower:100, weight:2615, acceleration:14.8, year:81, origin:3}, -{name:"mazda 626", mpg:31.6, cylinders:4, displacement:120, horsepower:74, weight:2635, acceleration:18.3, year:81, origin:3}, -{name:"peugeot 505s turbo diesel", mpg:28.1, cylinders:4, displacement:141, horsepower:80, weight:3230, acceleration:20.4, year:81, origin:2}, -{name:"saab 900s", mpg:undefined, cylinders:4, displacement:121, horsepower:110, weight:2800, acceleration:15.4, year:81, origin:2}, -{name:"volvo diesel", mpg:30.7, cylinders:6, displacement:145, horsepower:76, weight:3160, acceleration:19.6, year:81, origin:2}, -{name:"toyota cressida", mpg:25.4, cylinders:6, displacement:168, horsepower:116, weight:2900, acceleration:12.6, year:81, origin:3}, -{name:"datsun 810 maxima", mpg:24.2, cylinders:6, displacement:146, horsepower:120, weight:2930, acceleration:13.8, year:81, origin:3}, -{name:"buick century", mpg:22.4, cylinders:6, displacement:231, horsepower:110, weight:3415, acceleration:15.8, year:81, origin:1}, -{name:"oldsmobile cutlass ls", mpg:26.6, cylinders:8, displacement:350, horsepower:105, weight:3725, acceleration:19, year:81, origin:1}, -{name:"ford granada gl", mpg:20.2, cylinders:6, displacement:200, horsepower:88, weight:3060, acceleration:17.1, year:81, origin:1}, -{name:"chrysler lebaron salon", mpg:17.6, cylinders:6, displacement:225, horsepower:85, weight:3465, acceleration:16.6, year:81, origin:1}, -{name:"chevrolet cavalier", mpg:28, cylinders:4, displacement:112, horsepower:88, weight:2605, acceleration:19.6, year:82, origin:1}, -{name:"chevrolet cavalier wagon", mpg:27, cylinders:4, displacement:112, horsepower:88, weight:2640, acceleration:18.6, year:82, origin:1}, -{name:"chevrolet cavalier 2-door", mpg:34, cylinders:4, displacement:112, horsepower:88, weight:2395, acceleration:18, year:82, origin:1}, -{name:"pontiac j2000 se hatchback", mpg:31, cylinders:4, displacement:112, horsepower:85, weight:2575, acceleration:16.2, year:82, origin:1}, -{name:"dodge aries se", mpg:29, cylinders:4, displacement:135, horsepower:84, weight:2525, acceleration:16, year:82, origin:1}, -{name:"pontiac phoenix", mpg:27, cylinders:4, displacement:151, horsepower:90, weight:2735, acceleration:18, year:82, origin:1}, -{name:"ford fairmont futura", mpg:24, cylinders:4, displacement:140, horsepower:92, weight:2865, acceleration:16.4, year:82, origin:1}, -{name:"amc concord dl", mpg:23, cylinders:4, displacement:151, horsepower:undefined, weight:3035, acceleration:20.5, year:82, origin:1}, -{name:"volkswagen rabbit l", mpg:36, cylinders:4, displacement:105, horsepower:74, weight:1980, acceleration:15.3, year:82, origin:2}, -{name:"mazda glc custom l", mpg:37, cylinders:4, displacement:91, horsepower:68, weight:2025, acceleration:18.2, year:82, origin:3}, -{name:"mazda glc custom", mpg:31, cylinders:4, displacement:91, horsepower:68, weight:1970, acceleration:17.6, year:82, origin:3}, -{name:"plymouth horizon miser", mpg:38, cylinders:4, displacement:105, horsepower:63, weight:2125, acceleration:14.7, year:82, origin:1}, -{name:"mercury lynx l", mpg:36, cylinders:4, displacement:98, horsepower:70, weight:2125, acceleration:17.3, year:82, origin:1}, -{name:"nissan stanza xe", mpg:36, cylinders:4, displacement:120, horsepower:88, weight:2160, acceleration:14.5, year:82, origin:3}, -{name:"honda accord", mpg:36, cylinders:4, displacement:107, horsepower:75, weight:2205, acceleration:14.5, year:82, origin:3}, -{name:"toyota corolla", mpg:34, cylinders:4, displacement:108, horsepower:70, weight:2245, acceleration:16.9, year:82, origin:3}, -{name:"honda civic", mpg:38, cylinders:4, displacement:91, horsepower:67, weight:1965, acceleration:15, year:82, origin:3}, -{name:"honda civic (auto)", mpg:32, cylinders:4, displacement:91, horsepower:67, weight:1965, acceleration:15.7, year:82, origin:3}, -{name:"datsun 310 gx", mpg:38, cylinders:4, displacement:91, horsepower:67, weight:1995, acceleration:16.2, year:82, origin:3}, -{name:"buick century limited", mpg:25, cylinders:6, displacement:181, horsepower:110, weight:2945, acceleration:16.4, year:82, origin:1}, -{name:"oldsmobile cutlass ciera (diesel)", mpg:38, cylinders:6, displacement:262, horsepower:85, weight:3015, acceleration:17, year:82, origin:1}, -{name:"chrysler lebaron medallion", mpg:26, cylinders:4, displacement:156, horsepower:92, weight:2585, acceleration:14.5, year:82, origin:1}, -{name:"ford granada l", mpg:22, cylinders:6, displacement:232, horsepower:112, weight:2835, acceleration:14.7, year:82, origin:1}, -{name:"toyota celica gt", mpg:32, cylinders:4, displacement:144, horsepower:96, weight:2665, acceleration:13.9, year:82, origin:3}, -{name:"dodge charger 2.2", mpg:36, cylinders:4, displacement:135, horsepower:84, weight:2370, acceleration:13, year:82, origin:1}, -{name:"chevrolet camaro", mpg:27, cylinders:4, displacement:151, horsepower:90, weight:2950, acceleration:17.3, year:82, origin:1}, -{name:"ford mustang gl", mpg:27, cylinders:4, displacement:140, horsepower:86, weight:2790, acceleration:15.6, year:82, origin:1}, -{name:"vw pickup", mpg:44, cylinders:4, displacement:97, horsepower:52, weight:2130, acceleration:24.6, year:82, origin:2}, -{name:"dodge rampage", mpg:32, cylinders:4, displacement:135, horsepower:84, weight:2295, acceleration:11.6, year:82, origin:1}, -{name:"ford ranger", mpg:28, cylinders:4, displacement:120, horsepower:79, weight:2625, acceleration:18.6, year:82, origin:1}, -{name:"chevy s-10", mpg:31, cylinders:4, displacement:119, horsepower:82, weight:2720, acceleration:19.4, year:82, origin:1} -]; diff --git a/lib/protovis/examples/clock/clock.html b/lib/protovis/examples/clock/clock.html deleted file mode 100644 index ace50e70..00000000 --- a/lib/protovis/examples/clock/clock.html +++ /dev/null @@ -1,91 +0,0 @@ - - - PolarClock - - - - -
- -
-
- Inspired by pixelbreaker. -
- - diff --git a/lib/protovis/examples/crimea/crimea-grouped-bar.html b/lib/protovis/examples/crimea/crimea-grouped-bar.html deleted file mode 100644 index 7fe80249..00000000 --- a/lib/protovis/examples/crimea/crimea-grouped-bar.html +++ /dev/null @@ -1,65 +0,0 @@ - - - Crimean War - - - - - -
- -
- diff --git a/lib/protovis/examples/crimea/crimea-line.html b/lib/protovis/examples/crimea/crimea-line.html deleted file mode 100644 index 0db219f1..00000000 --- a/lib/protovis/examples/crimea/crimea-line.html +++ /dev/null @@ -1,61 +0,0 @@ - - - Crimean War - - - - - -
- -
- diff --git a/lib/protovis/examples/crimea/crimea-stacked-area.html b/lib/protovis/examples/crimea/crimea-stacked-area.html deleted file mode 100644 index 99916c6b..00000000 --- a/lib/protovis/examples/crimea/crimea-stacked-area.html +++ /dev/null @@ -1,61 +0,0 @@ - - - Crimean War - - - - - -
- -
- diff --git a/lib/protovis/examples/crimea/crimea-stacked-bar.html b/lib/protovis/examples/crimea/crimea-stacked-bar.html deleted file mode 100644 index 0a33efe4..00000000 --- a/lib/protovis/examples/crimea/crimea-stacked-bar.html +++ /dev/null @@ -1,60 +0,0 @@ - - - Crimean War - - - - - -
- -
- diff --git a/lib/protovis/examples/crimea/crimea.html b/lib/protovis/examples/crimea/crimea.html deleted file mode 100644 index f089e07f..00000000 --- a/lib/protovis/examples/crimea/crimea.html +++ /dev/null @@ -1,100 +0,0 @@ - - - Crimean War - - - - - -
-
- Diagram of the Causes of Mortality
- in the Army of the East -
- -
- The Areas of the blue, red, & black wedges are each measured from the - centre as the common vertex -

The blue wedges measured from the centre of the circle represent area - for area the deaths from Preventible or Mitigable Zymotic Diseases, the - red wedges measured from the center the deaths from wounds, & the - black wedges measured from the center the deaths from all other causes -

In October 1844, & April 1855, the black area coincides with the - red, in January & February 1856, the blue coincides with the black -

The entire areas may be compared by following the blue, the red & - the black lines enclosing them. -

-
- diff --git a/lib/protovis/examples/crimea/crimea.js b/lib/protovis/examples/crimea/crimea.js deleted file mode 100644 index 8578a734..00000000 --- a/lib/protovis/examples/crimea/crimea.js +++ /dev/null @@ -1,33 +0,0 @@ -var causes = ["wounds", "other", "disease"]; - -var crimea = [ - { date: "4/1854", wounds: 0, other: 110, disease: 110 }, - { date: "5/1854", wounds: 0, other: 95, disease: 105 }, - { date: "6/1854", wounds: 0, other: 40, disease: 95 }, - { date: "7/1854", wounds: 0, other: 140, disease: 520 }, - { date: "8/1854", wounds: 20, other: 150, disease: 800 }, - { date: "9/1854", wounds: 220, other: 230, disease: 740 }, - { date: "10/1854", wounds: 305, other: 310, disease: 600 }, - { date: "11/1854", wounds: 480, other: 290, disease: 820 }, - { date: "12/1854", wounds: 295, other: 310, disease: 1100 }, - { date: "1/1855", wounds: 230, other: 460, disease: 1440 }, - { date: "2/1855", wounds: 180, other: 520, disease: 1270 }, - { date: "3/1855", wounds: 155, other: 350, disease: 935 }, - { date: "4/1855", wounds: 195, other: 195, disease: 560 }, - { date: "5/1855", wounds: 180, other: 155, disease: 550 }, - { date: "6/1855", wounds: 330, other: 130, disease: 650 }, - { date: "7/1855", wounds: 260, other: 130, disease: 430 }, - { date: "8/1855", wounds: 290, other: 110, disease: 490 }, - { date: "9/1855", wounds: 355, other: 100, disease: 290 }, - { date: "10/1855", wounds: 135, other: 95, disease: 245 }, - { date: "11/1855", wounds: 100, other: 140, disease: 325 }, - { date: "12/1855", wounds: 40, other: 120, disease: 215 }, - { date: "1/1856", wounds: 0, other: 160, disease: 160 }, - { date: "2/1856", wounds: 0, other: 100, disease: 100 }, - { date: "3/1856", wounds: 0, other: 125, disease: 90 } -]; - -(function() { - var format = pv.Format.date("%m/%y"); - crimea.forEach(function(d) { d.date = format.parse(d.date); }); -})(); diff --git a/lib/protovis/examples/downloadify/LICENSE.txt b/lib/protovis/examples/downloadify/LICENSE.txt deleted file mode 100755 index aed74639..00000000 --- a/lib/protovis/examples/downloadify/LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Downloadify: Client Side File Creation -JavaScript + Flash Library - -Copyright (c) 2009 Douglas C. Neiner - -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/lib/protovis/examples/downloadify/download.png b/lib/protovis/examples/downloadify/download.png deleted file mode 100755 index d2fabbf5..00000000 Binary files a/lib/protovis/examples/downloadify/download.png and /dev/null differ diff --git a/lib/protovis/examples/downloadify/downloadify.html b/lib/protovis/examples/downloadify/downloadify.html deleted file mode 100755 index e80ef046..00000000 --- a/lib/protovis/examples/downloadify/downloadify.html +++ /dev/null @@ -1,57 +0,0 @@ - - - Downloadify - - - - - - - -

You must have Flash 10 installed to download this file.

- -

This example demonstrates using Downloadify to save the contents of - a Protovis canvas to a static SVG file. Note that because of security - restrictions, this example only works when hosted on a server; it will not - work when opened as a local file. Also note that Downloadify requires Flash - 10. - - diff --git a/lib/protovis/examples/downloadify/downloadify.min.js b/lib/protovis/examples/downloadify/downloadify.min.js deleted file mode 100755 index 659d2292..00000000 --- a/lib/protovis/examples/downloadify/downloadify.min.js +++ /dev/null @@ -1,3 +0,0 @@ -/* Downloadify 0.2 (c) 2009 by Douglas Neiner. Licensed under the MIT license */ -/* See http://github.com/dcneiner/Downloadify for license and more info */ -(function(){Downloadify=window.Downloadify={queue:{},uid:new Date().getTime(),getTextForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getData();return""},getFileNameForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getFilename();return""},getDataTypeForSave:function(a){var b=Downloadify.queue[a];if(b)return b.getDataType();return""},saveComplete:function(a){var b=Downloadify.queue[a];if(b)b.complete();return true},saveCancel:function(a){var b=Downloadify.queue[a];if(b)b.cancel();return true},saveError:function(a){var b=Downloadify.queue[a];if(b)b.error();return true},addToQueue:function(a){Downloadify.queue[a.queue_name]=a},getUID:function(a){if(a.id=="")a.id='downloadify_'+Downloadify.uid++;return a.id}};Downloadify.create=function(a,b){var c=(typeof(a)=="string"?document.getElementById(a):a);return new Downloadify.Container(c,b)};Downloadify.Container=function(d,e){var f=this;f.el=d;f.enabled=true;f.dataCallback=null;f.filenameCallback=null;f.data=null;f.filename=null;var g=function(){f.options=e;if(!f.options.append)f.el.innerHTML="";f.flashContainer=document.createElement('span');f.el.appendChild(f.flashContainer);f.queue_name=Downloadify.getUID(f.flashContainer);if(typeof(f.options.filename)==="function")f.filenameCallback=f.options.filename;else if(f.options.filename)f.filename=f.options.filename;if(typeof(f.options.data)==="function")f.dataCallback=f.options.data;else if(f.options.data)f.data=f.options.data;var a={queue_name:f.queue_name,width:f.options.width,height:f.options.height};var b={allowScriptAccess:'always'};var c={id:f.flashContainer.id,name:f.flashContainer.id};if(f.options.enabled===false)f.enabled=false;if(f.options.transparent===true)b.wmode="transparent";if(f.options.downloadImage)a.downloadImage=f.options.downloadImage;swfobject.embedSWF(f.options.swf,f.flashContainer.id,f.options.width,f.options.height,"10",null,a,b,c);Downloadify.addToQueue(f)};f.enable=function(){var a=document.getElementById(f.flashContainer.id);a.setEnabled(true);f.enabled=true};f.disable=function(){var a=document.getElementById(f.flashContainer.id);a.setEnabled(false);f.enabled=false};f.getData=function(){if(!f.enabled)return"";if(f.dataCallback)return f.dataCallback();else if(f.data)return f.data;else return""};f.getFilename=function(){if(f.filenameCallback)return f.filenameCallback();else if(f.filename)return f.filename;else return""};f.getDataType=function(){if(f.options.dataType)return f.options.dataType;return"string"};f.complete=function(){if(typeof(f.options.onComplete)==="function")f.options.onComplete()};f.cancel=function(){if(typeof(f.options.onCancel)==="function")f.options.onCancel()};f.error=function(){if(typeof(f.options.onError)==="function")f.options.onError()};g()};Downloadify.defaultOptions={swf:'media/downloadify.swf',downloadImage:'images/download.png',width:100,height:30,transparent:true,append:false,dataType:"string"}})();if(typeof(jQuery)!="undefined"){(function($){$.fn.downloadify=function(b){return this.each(function(){b=$.extend({},Downloadify.defaultOptions,b);var a=Downloadify.create(this,b);$(this).data('Downloadify',a)})}})(jQuery)};if(typeof(MooTools)!='undefined'){Element.implement({downloadify:function(a){a=$extend(Downloadify.defaultOptions,a);return this.store('Downloadify',Downloadify.create(this,a))}})}; \ No newline at end of file diff --git a/lib/protovis/examples/downloadify/downloadify.swf b/lib/protovis/examples/downloadify/downloadify.swf deleted file mode 100755 index 2a2f01c4..00000000 Binary files a/lib/protovis/examples/downloadify/downloadify.swf and /dev/null differ diff --git a/lib/protovis/examples/downloadify/swfobject.js b/lib/protovis/examples/downloadify/swfobject.js deleted file mode 100755 index 8eafe9dd..00000000 --- a/lib/protovis/examples/downloadify/swfobject.js +++ /dev/null @@ -1,4 +0,0 @@ -/* SWFObject v2.2 - is released under the MIT License -*/ -var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y0){for(var af=0;af0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad'}}aa.outerHTML='"+af+"";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab - - My God, it's full of eyes! - - - - -

- -
- diff --git a/lib/protovis/examples/eyes/matrix.html b/lib/protovis/examples/eyes/matrix.html deleted file mode 100644 index 7c3971ea..00000000 --- a/lib/protovis/examples/eyes/matrix.html +++ /dev/null @@ -1,46 +0,0 @@ - - - Matrix - - - - -
- -
- diff --git a/lib/protovis/examples/flowers/flowers.html b/lib/protovis/examples/flowers/flowers.html deleted file mode 100644 index 9b8af886..00000000 --- a/lib/protovis/examples/flowers/flowers.html +++ /dev/null @@ -1,109 +0,0 @@ - - - Iris Flowers - - - - - -
- -
- diff --git a/lib/protovis/examples/flowers/flowers.js b/lib/protovis/examples/flowers/flowers.js deleted file mode 100644 index 584d6839..00000000 --- a/lib/protovis/examples/flowers/flowers.js +++ /dev/null @@ -1,154 +0,0 @@ -var species = ["setosa", "versicolor", "virginica"]; -var traits = ["sepalLength", "sepalWidth", "petalLength", "petalWidth"]; -var flowers = [ - { sepalLength: 5.1, sepalWidth: 3.5, petalLength: 1.4, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.9, sepalWidth: 3.0, petalLength: 1.4, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.7, sepalWidth: 3.2, petalLength: 1.3, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.6, sepalWidth: 3.1, petalLength: 1.5, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.0, sepalWidth: 3.6, petalLength: 1.4, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.4, sepalWidth: 3.9, petalLength: 1.7, petalWidth: 0.4, species: "setosa" }, - { sepalLength: 4.6, sepalWidth: 3.4, petalLength: 1.4, petalWidth: 0.3, species: "setosa" }, - { sepalLength: 5.0, sepalWidth: 3.4, petalLength: 1.5, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.4, sepalWidth: 2.9, petalLength: 1.4, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.9, sepalWidth: 3.1, petalLength: 1.5, petalWidth: 0.1, species: "setosa" }, - { sepalLength: 5.4, sepalWidth: 3.7, petalLength: 1.5, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.8, sepalWidth: 3.4, petalLength: 1.6, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.8, sepalWidth: 3.0, petalLength: 1.4, petalWidth: 0.1, species: "setosa" }, - { sepalLength: 4.3, sepalWidth: 3.0, petalLength: 1.1, petalWidth: 0.1, species: "setosa" }, - { sepalLength: 5.8, sepalWidth: 4.0, petalLength: 1.2, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.7, sepalWidth: 4.4, petalLength: 1.5, petalWidth: 0.4, species: "setosa" }, - { sepalLength: 5.4, sepalWidth: 3.9, petalLength: 1.3, petalWidth: 0.4, species: "setosa" }, - { sepalLength: 5.1, sepalWidth: 3.5, petalLength: 1.4, petalWidth: 0.3, species: "setosa" }, - { sepalLength: 5.7, sepalWidth: 3.8, petalLength: 1.7, petalWidth: 0.3, species: "setosa" }, - { sepalLength: 5.1, sepalWidth: 3.8, petalLength: 1.5, petalWidth: 0.3, species: "setosa" }, - { sepalLength: 5.4, sepalWidth: 3.4, petalLength: 1.7, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.1, sepalWidth: 3.7, petalLength: 1.5, petalWidth: 0.4, species: "setosa" }, - { sepalLength: 4.6, sepalWidth: 3.6, petalLength: 1.0, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.1, sepalWidth: 3.3, petalLength: 1.7, petalWidth: 0.5, species: "setosa" }, - { sepalLength: 4.8, sepalWidth: 3.4, petalLength: 1.9, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.0, sepalWidth: 3.0, petalLength: 1.6, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.0, sepalWidth: 3.4, petalLength: 1.6, petalWidth: 0.4, species: "setosa" }, - { sepalLength: 5.2, sepalWidth: 3.5, petalLength: 1.5, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.2, sepalWidth: 3.4, petalLength: 1.4, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.7, sepalWidth: 3.2, petalLength: 1.6, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.8, sepalWidth: 3.1, petalLength: 1.6, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.4, sepalWidth: 3.4, petalLength: 1.5, petalWidth: 0.4, species: "setosa" }, - { sepalLength: 5.2, sepalWidth: 4.1, petalLength: 1.5, petalWidth: 0.1, species: "setosa" }, - { sepalLength: 5.5, sepalWidth: 4.2, petalLength: 1.4, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.9, sepalWidth: 3.1, petalLength: 1.5, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.0, sepalWidth: 3.2, petalLength: 1.2, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.5, sepalWidth: 3.5, petalLength: 1.3, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.9, sepalWidth: 3.6, petalLength: 1.4, petalWidth: 0.1, species: "setosa" }, - { sepalLength: 4.4, sepalWidth: 3.0, petalLength: 1.3, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.1, sepalWidth: 3.4, petalLength: 1.5, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.0, sepalWidth: 3.5, petalLength: 1.3, petalWidth: 0.3, species: "setosa" }, - { sepalLength: 4.5, sepalWidth: 2.3, petalLength: 1.3, petalWidth: 0.3, species: "setosa" }, - { sepalLength: 4.4, sepalWidth: 3.2, petalLength: 1.3, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.0, sepalWidth: 3.5, petalLength: 1.6, petalWidth: 0.6, species: "setosa" }, - { sepalLength: 5.1, sepalWidth: 3.8, petalLength: 1.9, petalWidth: 0.4, species: "setosa" }, - { sepalLength: 4.8, sepalWidth: 3.0, petalLength: 1.4, petalWidth: 0.3, species: "setosa" }, - { sepalLength: 5.1, sepalWidth: 3.8, petalLength: 1.6, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 4.6, sepalWidth: 3.2, petalLength: 1.4, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.3, sepalWidth: 3.7, petalLength: 1.5, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 5.0, sepalWidth: 3.3, petalLength: 1.4, petalWidth: 0.2, species: "setosa" }, - { sepalLength: 7.0, sepalWidth: 3.2, petalLength: 4.7, petalWidth: 1.4, species: "versicolor" }, - { sepalLength: 6.4, sepalWidth: 3.2, petalLength: 4.5, petalWidth: 1.5, species: "versicolor" }, - { sepalLength: 6.9, sepalWidth: 3.1, petalLength: 4.9, petalWidth: 1.5, species: "versicolor" }, - { sepalLength: 5.5, sepalWidth: 2.3, petalLength: 4.0, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 6.5, sepalWidth: 2.8, petalLength: 4.6, petalWidth: 1.5, species: "versicolor" }, - { sepalLength: 5.7, sepalWidth: 2.8, petalLength: 4.5, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 6.3, sepalWidth: 3.3, petalLength: 4.7, petalWidth: 1.6, species: "versicolor" }, - { sepalLength: 4.9, sepalWidth: 2.4, petalLength: 3.3, petalWidth: 1.0, species: "versicolor" }, - { sepalLength: 6.6, sepalWidth: 2.9, petalLength: 4.6, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 5.2, sepalWidth: 2.7, petalLength: 3.9, petalWidth: 1.4, species: "versicolor" }, - { sepalLength: 5.0, sepalWidth: 2.0, petalLength: 3.5, petalWidth: 1.0, species: "versicolor" }, - { sepalLength: 5.9, sepalWidth: 3.0, petalLength: 4.2, petalWidth: 1.5, species: "versicolor" }, - { sepalLength: 6.0, sepalWidth: 2.2, petalLength: 4.0, petalWidth: 1.0, species: "versicolor" }, - { sepalLength: 6.1, sepalWidth: 2.9, petalLength: 4.7, petalWidth: 1.4, species: "versicolor" }, - { sepalLength: 5.6, sepalWidth: 2.9, petalLength: 3.6, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 6.7, sepalWidth: 3.1, petalLength: 4.4, petalWidth: 1.4, species: "versicolor" }, - { sepalLength: 5.6, sepalWidth: 3.0, petalLength: 4.5, petalWidth: 1.5, species: "versicolor" }, - { sepalLength: 5.8, sepalWidth: 2.7, petalLength: 4.1, petalWidth: 1.0, species: "versicolor" }, - { sepalLength: 6.2, sepalWidth: 2.2, petalLength: 4.5, petalWidth: 1.5, species: "versicolor" }, - { sepalLength: 5.6, sepalWidth: 2.5, petalLength: 3.9, petalWidth: 1.1, species: "versicolor" }, - { sepalLength: 5.9, sepalWidth: 3.2, petalLength: 4.8, petalWidth: 1.8, species: "versicolor" }, - { sepalLength: 6.1, sepalWidth: 2.8, petalLength: 4.0, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 6.3, sepalWidth: 2.5, petalLength: 4.9, petalWidth: 1.5, species: "versicolor" }, - { sepalLength: 6.1, sepalWidth: 2.8, petalLength: 4.7, petalWidth: 1.2, species: "versicolor" }, - { sepalLength: 6.4, sepalWidth: 2.9, petalLength: 4.3, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 6.6, sepalWidth: 3.0, petalLength: 4.4, petalWidth: 1.4, species: "versicolor" }, - { sepalLength: 6.8, sepalWidth: 2.8, petalLength: 4.8, petalWidth: 1.4, species: "versicolor" }, - { sepalLength: 6.7, sepalWidth: 3.0, petalLength: 5.0, petalWidth: 1.7, species: "versicolor" }, - { sepalLength: 6.0, sepalWidth: 2.9, petalLength: 4.5, petalWidth: 1.5, species: "versicolor" }, - { sepalLength: 5.7, sepalWidth: 2.6, petalLength: 3.5, petalWidth: 1.0, species: "versicolor" }, - { sepalLength: 5.5, sepalWidth: 2.4, petalLength: 3.8, petalWidth: 1.1, species: "versicolor" }, - { sepalLength: 5.5, sepalWidth: 2.4, petalLength: 3.7, petalWidth: 1.0, species: "versicolor" }, - { sepalLength: 5.8, sepalWidth: 2.7, petalLength: 3.9, petalWidth: 1.2, species: "versicolor" }, - { sepalLength: 6.0, sepalWidth: 2.7, petalLength: 5.1, petalWidth: 1.6, species: "versicolor" }, - { sepalLength: 5.4, sepalWidth: 3.0, petalLength: 4.5, petalWidth: 1.5, species: "versicolor" }, - { sepalLength: 6.0, sepalWidth: 3.4, petalLength: 4.5, petalWidth: 1.6, species: "versicolor" }, - { sepalLength: 6.7, sepalWidth: 3.1, petalLength: 4.7, petalWidth: 1.5, species: "versicolor" }, - { sepalLength: 6.3, sepalWidth: 2.3, petalLength: 4.4, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 5.6, sepalWidth: 3.0, petalLength: 4.1, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 5.5, sepalWidth: 2.5, petalLength: 4.0, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 5.5, sepalWidth: 2.6, petalLength: 4.4, petalWidth: 1.2, species: "versicolor" }, - { sepalLength: 6.1, sepalWidth: 3.0, petalLength: 4.6, petalWidth: 1.4, species: "versicolor" }, - { sepalLength: 5.8, sepalWidth: 2.6, petalLength: 4.0, petalWidth: 1.2, species: "versicolor" }, - { sepalLength: 5.0, sepalWidth: 2.3, petalLength: 3.3, petalWidth: 1.0, species: "versicolor" }, - { sepalLength: 5.6, sepalWidth: 2.7, petalLength: 4.2, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 5.7, sepalWidth: 3.0, petalLength: 4.2, petalWidth: 1.2, species: "versicolor" }, - { sepalLength: 5.7, sepalWidth: 2.9, petalLength: 4.2, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 6.2, sepalWidth: 2.9, petalLength: 4.3, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 5.1, sepalWidth: 2.5, petalLength: 3.0, petalWidth: 1.1, species: "versicolor" }, - { sepalLength: 5.7, sepalWidth: 2.8, petalLength: 4.1, petalWidth: 1.3, species: "versicolor" }, - { sepalLength: 6.3, sepalWidth: 3.3, petalLength: 6.0, petalWidth: 2.5, species: "virginica" }, - { sepalLength: 5.8, sepalWidth: 2.7, petalLength: 5.1, petalWidth: 1.9, species: "virginica" }, - { sepalLength: 7.1, sepalWidth: 3.0, petalLength: 5.9, petalWidth: 2.1, species: "virginica" }, - { sepalLength: 6.3, sepalWidth: 2.9, petalLength: 5.6, petalWidth: 1.8, species: "virginica" }, - { sepalLength: 6.5, sepalWidth: 3.0, petalLength: 5.8, petalWidth: 2.2, species: "virginica" }, - { sepalLength: 7.6, sepalWidth: 3.0, petalLength: 6.6, petalWidth: 2.1, species: "virginica" }, - { sepalLength: 4.9, sepalWidth: 2.5, petalLength: 4.5, petalWidth: 1.7, species: "virginica" }, - { sepalLength: 7.3, sepalWidth: 2.9, petalLength: 6.3, petalWidth: 1.8, species: "virginica" }, - { sepalLength: 6.7, sepalWidth: 2.5, petalLength: 5.8, petalWidth: 1.8, species: "virginica" }, - { sepalLength: 7.2, sepalWidth: 3.6, petalLength: 6.1, petalWidth: 2.5, species: "virginica" }, - { sepalLength: 6.5, sepalWidth: 3.2, petalLength: 5.1, petalWidth: 2.0, species: "virginica" }, - { sepalLength: 6.4, sepalWidth: 2.7, petalLength: 5.3, petalWidth: 1.9, species: "virginica" }, - { sepalLength: 6.8, sepalWidth: 3.0, petalLength: 5.5, petalWidth: 2.1, species: "virginica" }, - { sepalLength: 5.7, sepalWidth: 2.5, petalLength: 5.0, petalWidth: 2.0, species: "virginica" }, - { sepalLength: 5.8, sepalWidth: 2.8, petalLength: 5.1, petalWidth: 2.4, species: "virginica" }, - { sepalLength: 6.4, sepalWidth: 3.2, petalLength: 5.3, petalWidth: 2.3, species: "virginica" }, - { sepalLength: 6.5, sepalWidth: 3.0, petalLength: 5.5, petalWidth: 1.8, species: "virginica" }, - { sepalLength: 7.7, sepalWidth: 3.8, petalLength: 6.7, petalWidth: 2.2, species: "virginica" }, - { sepalLength: 7.7, sepalWidth: 2.6, petalLength: 6.9, petalWidth: 2.3, species: "virginica" }, - { sepalLength: 6.0, sepalWidth: 2.2, petalLength: 5.0, petalWidth: 1.5, species: "virginica" }, - { sepalLength: 6.9, sepalWidth: 3.2, petalLength: 5.7, petalWidth: 2.3, species: "virginica" }, - { sepalLength: 5.6, sepalWidth: 2.8, petalLength: 4.9, petalWidth: 2.0, species: "virginica" }, - { sepalLength: 7.7, sepalWidth: 2.8, petalLength: 6.7, petalWidth: 2.0, species: "virginica" }, - { sepalLength: 6.3, sepalWidth: 2.7, petalLength: 4.9, petalWidth: 1.8, species: "virginica" }, - { sepalLength: 6.7, sepalWidth: 3.3, petalLength: 5.7, petalWidth: 2.1, species: "virginica" }, - { sepalLength: 7.2, sepalWidth: 3.2, petalLength: 6.0, petalWidth: 1.8, species: "virginica" }, - { sepalLength: 6.2, sepalWidth: 2.8, petalLength: 4.8, petalWidth: 1.8, species: "virginica" }, - { sepalLength: 6.1, sepalWidth: 3.0, petalLength: 4.9, petalWidth: 1.8, species: "virginica" }, - { sepalLength: 6.4, sepalWidth: 2.8, petalLength: 5.6, petalWidth: 2.1, species: "virginica" }, - { sepalLength: 7.2, sepalWidth: 3.0, petalLength: 5.8, petalWidth: 1.6, species: "virginica" }, - { sepalLength: 7.4, sepalWidth: 2.8, petalLength: 6.1, petalWidth: 1.9, species: "virginica" }, - { sepalLength: 7.9, sepalWidth: 3.8, petalLength: 6.4, petalWidth: 2.0, species: "virginica" }, - { sepalLength: 6.4, sepalWidth: 2.8, petalLength: 5.6, petalWidth: 2.2, species: "virginica" }, - { sepalLength: 6.3, sepalWidth: 2.8, petalLength: 5.1, petalWidth: 1.5, species: "virginica" }, - { sepalLength: 6.1, sepalWidth: 2.6, petalLength: 5.6, petalWidth: 1.4, species: "virginica" }, - { sepalLength: 7.7, sepalWidth: 3.0, petalLength: 6.1, petalWidth: 2.3, species: "virginica" }, - { sepalLength: 6.3, sepalWidth: 3.4, petalLength: 5.6, petalWidth: 2.4, species: "virginica" }, - { sepalLength: 6.4, sepalWidth: 3.1, petalLength: 5.5, petalWidth: 1.8, species: "virginica" }, - { sepalLength: 6.0, sepalWidth: 3.0, petalLength: 4.8, petalWidth: 1.8, species: "virginica" }, - { sepalLength: 6.9, sepalWidth: 3.1, petalLength: 5.4, petalWidth: 2.1, species: "virginica" }, - { sepalLength: 6.7, sepalWidth: 3.1, petalLength: 5.6, petalWidth: 2.4, species: "virginica" }, - { sepalLength: 6.9, sepalWidth: 3.1, petalLength: 5.1, petalWidth: 2.3, species: "virginica" }, - { sepalLength: 5.8, sepalWidth: 2.7, petalLength: 5.1, petalWidth: 1.9, species: "virginica" }, - { sepalLength: 6.8, sepalWidth: 3.2, petalLength: 5.9, petalWidth: 2.3, species: "virginica" }, - { sepalLength: 6.7, sepalWidth: 3.3, petalLength: 5.7, petalWidth: 2.5, species: "virginica" }, - { sepalLength: 6.7, sepalWidth: 3.0, petalLength: 5.2, petalWidth: 2.3, species: "virginica" }, - { sepalLength: 6.3, sepalWidth: 2.5, petalLength: 5.0, petalWidth: 1.9, species: "virginica" }, - { sepalLength: 6.5, sepalWidth: 3.0, petalLength: 5.2, petalWidth: 2.0, species: "virginica" }, - { sepalLength: 6.2, sepalWidth: 3.4, petalLength: 5.4, petalWidth: 2.3, species: "virginica" }, - { sepalLength: 5.9, sepalWidth: 3.0, petalLength: 5.1, petalWidth: 1.8, species: "virginica" } -]; diff --git a/lib/protovis/examples/group-stack/group-stack.html b/lib/protovis/examples/group-stack/group-stack.html deleted file mode 100644 index e29408af..00000000 --- a/lib/protovis/examples/group-stack/group-stack.html +++ /dev/null @@ -1,79 +0,0 @@ - - - Group Stacked Bar Chart - - - - - - - diff --git a/lib/protovis/examples/group-stack/headcount.js b/lib/protovis/examples/group-stack/headcount.js deleted file mode 100644 index f08ce308..00000000 --- a/lib/protovis/examples/group-stack/headcount.js +++ /dev/null @@ -1,23 +0,0 @@ -var headcount = [ - {date: "1/2009", dept: "eng", type: "perm", headcount: 140}, - {date: "1/2009", dept: "eng", type: "temp", headcount: 39}, - {date: "1/2009", dept: "sales", type: "perm", headcount: 209}, - {date: "1/2009", dept: "sales", type: "temp", headcount: 123}, - {date: "4/2009", dept: "eng", type: "perm", headcount: 160}, - {date: "4/2009", dept: "eng", type: "temp", headcount: 44}, - {date: "4/2009", dept: "sales", type: "perm", headcount: 229}, - {date: "4/2009", dept: "sales", type: "temp", headcount: 113}, - {date: "7/2009", dept: "eng", type: "perm", headcount: 174}, - {date: "7/2009", dept: "eng", type: "temp", headcount: 41}, - {date: "7/2009", dept: "sales", type: "perm", headcount: 224}, - {date: "7/2009", dept: "sales", type: "temp", headcount: 169}, - {date: "10/2009", dept: "eng", type: "perm", headcount: 190}, - {date: "10/2009", dept: "eng", type: "temp", headcount: 43}, - {date: "10/2009", dept: "sales", type: "perm", headcount: 232}, - {date: "10/2009", dept: "sales", type: "temp", headcount: 185} -]; - -(function() { - var df = pv.Format.date("%m/%y"); - headcount.forEach(function(d) { d.date = df.parse(d.date); }); -})(); diff --git a/lib/protovis/examples/hotel/hotel.html b/lib/protovis/examples/hotel/hotel.html deleted file mode 100644 index 747c842f..00000000 --- a/lib/protovis/examples/hotel/hotel.html +++ /dev/null @@ -1,76 +0,0 @@ - - - Hotel Stays - - - - - -
- -
- diff --git a/lib/protovis/examples/hotel/hotel.js b/lib/protovis/examples/hotel/hotel.js deleted file mode 100644 index 1668b293..00000000 --- a/lib/protovis/examples/hotel/hotel.js +++ /dev/null @@ -1,245 +0,0 @@ -var hotel = [ - {"type":"1. % CLIENTELE FEMALE","month":"Jan","count":26}, - {"type":"1. % CLIENTELE FEMALE","month":"Feb","count":21}, - {"type":"1. % CLIENTELE FEMALE","month":"Mar","count":26}, - {"type":"1. % CLIENTELE FEMALE","month":"Apr","count":28}, - {"type":"1. % CLIENTELE FEMALE","month":"May","count":20}, - {"type":"1. % CLIENTELE FEMALE","month":"Jun","count":20}, - {"type":"1. % CLIENTELE FEMALE","month":"Jul","count":20}, - {"type":"1. % CLIENTELE FEMALE","month":"Aug","count":20}, - {"type":"1. % CLIENTELE FEMALE","month":"Sep","count":20}, - {"type":"1. % CLIENTELE FEMALE","month":"Oct","count":40}, - {"type":"1. % CLIENTELE FEMALE","month":"Nov","count":15}, - {"type":"1. % CLIENTELE FEMALE","month":"Dec","count":40}, - {"type":"2. % CLIENTELE LOCAL","month":"Jan","count":69}, - {"type":"2. % CLIENTELE LOCAL","month":"Feb","count":70}, - {"type":"2. % CLIENTELE LOCAL","month":"Mar","count":77}, - {"type":"2. % CLIENTELE LOCAL","month":"Apr","count":71}, - {"type":"2. % CLIENTELE LOCAL","month":"May","count":37}, - {"type":"2. % CLIENTELE LOCAL","month":"Jun","count":36}, - {"type":"2. % CLIENTELE LOCAL","month":"Jul","count":39}, - {"type":"2. % CLIENTELE LOCAL","month":"Aug","count":39}, - {"type":"2. % CLIENTELE LOCAL","month":"Sep","count":55}, - {"type":"2. % CLIENTELE LOCAL","month":"Oct","count":60}, - {"type":"2. % CLIENTELE LOCAL","month":"Nov","count":68}, - {"type":"2. % CLIENTELE LOCAL","month":"Dec","count":72}, - {"type":"3. % CLIENTELE USA","month":"Jan","count":7}, - {"type":"3. % CLIENTELE USA","month":"Feb","count":6}, - {"type":"3. % CLIENTELE USA","month":"Mar","count":3}, - {"type":"3. % CLIENTELE USA","month":"Apr","count":6}, - {"type":"3. % CLIENTELE USA","month":"May","count":23}, - {"type":"3. % CLIENTELE USA","month":"Jun","count":14}, - {"type":"3. % CLIENTELE USA","month":"Jul","count":19}, - {"type":"3. % CLIENTELE USA","month":"Aug","count":14}, - {"type":"3. % CLIENTELE USA","month":"Sep","count":9}, - {"type":"3. % CLIENTELE USA","month":"Oct","count":6}, - {"type":"3. % CLIENTELE USA","month":"Nov","count":8}, - {"type":"3. % CLIENTELE USA","month":"Dec","count":8}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Jan","count":0}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Feb","count":0}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Mar","count":0}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Apr","count":0}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"May","count":8}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Jun","count":6}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Jul","count":6}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Aug","count":4}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Sep","count":2}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Oct","count":12}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Nov","count":0}, - {"type":"4. % CLIENTELE SOUTH-AMERICA","month":"Dec","count":0}, - {"type":"5. % CLIENTELE EUROPE","month":"Jan","count":20}, - {"type":"5. % CLIENTELE EUROPE","month":"Feb","count":15}, - {"type":"5. % CLIENTELE EUROPE","month":"Mar","count":14}, - {"type":"5. % CLIENTELE EUROPE","month":"Apr","count":15}, - {"type":"5. % CLIENTELE EUROPE","month":"May","count":23}, - {"type":"5. % CLIENTELE EUROPE","month":"Jun","count":27}, - {"type":"5. % CLIENTELE EUROPE","month":"Jul","count":22}, - {"type":"5. % CLIENTELE EUROPE","month":"Aug","count":30}, - {"type":"5. % CLIENTELE EUROPE","month":"Sep","count":27}, - {"type":"5. % CLIENTELE EUROPE","month":"Oct","count":19}, - {"type":"5. % CLIENTELE EUROPE","month":"Nov","count":19}, - {"type":"5. % CLIENTELE EUROPE","month":"Dec","count":17}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Jan","count":1}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Feb","count":0}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Mar","count":0}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Apr","count":8}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"May","count":6}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Jun","count":4}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Jul","count":6}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Aug","count":4}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Sep","count":2}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Oct","count":1}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Nov","count":0}, - {"type":"6. % CLIENTELE M.EAST, AFRICA","month":"Dec","count":1}, - {"type":"7. % CLIENTELE ASIA","month":"Jan","count":3}, - {"type":"7. % CLIENTELE ASIA","month":"Feb","count":10}, - {"type":"7. % CLIENTELE ASIA","month":"Mar","count":6}, - {"type":"7. % CLIENTELE ASIA","month":"Apr","count":0}, - {"type":"7. % CLIENTELE ASIA","month":"May","count":3}, - {"type":"7. % CLIENTELE ASIA","month":"Jun","count":13}, - {"type":"7. % CLIENTELE ASIA","month":"Jul","count":8}, - {"type":"7. % CLIENTELE ASIA","month":"Aug","count":9}, - {"type":"7. % CLIENTELE ASIA","month":"Sep","count":5}, - {"type":"7. % CLIENTELE ASIA","month":"Oct","count":2}, - {"type":"7. % CLIENTELE ASIA","month":"Nov","count":5}, - {"type":"7. % CLIENTELE ASIA","month":"Dec","count":2}, - {"type":"8. % BUSINESSMEN","month":"Jan","count":78}, - {"type":"8. % BUSINESSMEN","month":"Feb","count":80}, - {"type":"8. % BUSINESSMEN","month":"Mar","count":85}, - {"type":"8. % BUSINESSMEN","month":"Apr","count":86}, - {"type":"8. % BUSINESSMEN","month":"May","count":85}, - {"type":"8. % BUSINESSMEN","month":"Jun","count":87}, - {"type":"8. % BUSINESSMEN","month":"Jul","count":70}, - {"type":"8. % BUSINESSMEN","month":"Aug","count":76}, - {"type":"8. % BUSINESSMEN","month":"Sep","count":87}, - {"type":"8. % BUSINESSMEN","month":"Oct","count":85}, - {"type":"8. % BUSINESSMEN","month":"Nov","count":87}, - {"type":"8. % BUSINESSMEN","month":"Dec","count":80}, - {"type":"9. % TOURISTS","month":"Jan","count":22}, - {"type":"9. % TOURISTS","month":"Feb","count":20}, - {"type":"9. % TOURISTS","month":"Mar","count":15}, - {"type":"9. % TOURISTS","month":"Apr","count":14}, - {"type":"9. % TOURISTS","month":"May","count":15}, - {"type":"9. % TOURISTS","month":"Jun","count":13}, - {"type":"9. % TOURISTS","month":"Jul","count":30}, - {"type":"9. % TOURISTS","month":"Aug","count":24}, - {"type":"9. % TOURISTS","month":"Sep","count":13}, - {"type":"9. % TOURISTS","month":"Oct","count":15}, - {"type":"9. % TOURISTS","month":"Nov","count":13}, - {"type":"9. % TOURISTS","month":"Dec","count":20}, - {"type":"10. % DIRECT RESERVATIONS","month":"Jan","count":70}, - {"type":"10. % DIRECT RESERVATIONS","month":"Feb","count":70}, - {"type":"10. % DIRECT RESERVATIONS","month":"Mar","count":75}, - {"type":"10. % DIRECT RESERVATIONS","month":"Apr","count":74}, - {"type":"10. % DIRECT RESERVATIONS","month":"May","count":69}, - {"type":"10. % DIRECT RESERVATIONS","month":"Jun","count":68}, - {"type":"10. % DIRECT RESERVATIONS","month":"Jul","count":74}, - {"type":"10. % DIRECT RESERVATIONS","month":"Aug","count":75}, - {"type":"10. % DIRECT RESERVATIONS","month":"Sep","count":68}, - {"type":"10. % DIRECT RESERVATIONS","month":"Oct","count":68}, - {"type":"10. % DIRECT RESERVATIONS","month":"Nov","count":64}, - {"type":"10. % DIRECT RESERVATIONS","month":"Dec","count":75}, - {"type":"11. % AGENCY RESERVATIONS","month":"Jan","count":20}, - {"type":"11. % AGENCY RESERVATIONS","month":"Feb","count":18}, - {"type":"11. % AGENCY RESERVATIONS","month":"Mar","count":19}, - {"type":"11. % AGENCY RESERVATIONS","month":"Apr","count":17}, - {"type":"11. % AGENCY RESERVATIONS","month":"May","count":27}, - {"type":"11. % AGENCY RESERVATIONS","month":"Jun","count":27}, - {"type":"11. % AGENCY RESERVATIONS","month":"Jul","count":19}, - {"type":"11. % AGENCY RESERVATIONS","month":"Aug","count":19}, - {"type":"11. % AGENCY RESERVATIONS","month":"Sep","count":26}, - {"type":"11. % AGENCY RESERVATIONS","month":"Oct","count":27}, - {"type":"11. % AGENCY RESERVATIONS","month":"Nov","count":21}, - {"type":"11. % AGENCY RESERVATIONS","month":"Dec","count":15}, - {"type":"12. % AIR CREWS","month":"Jan","count":10}, - {"type":"12. % AIR CREWS","month":"Feb","count":12}, - {"type":"12. % AIR CREWS","month":"Mar","count":6}, - {"type":"12. % AIR CREWS","month":"Apr","count":9}, - {"type":"12. % AIR CREWS","month":"May","count":4}, - {"type":"12. % AIR CREWS","month":"Jun","count":5}, - {"type":"12. % AIR CREWS","month":"Jul","count":7}, - {"type":"12. % AIR CREWS","month":"Aug","count":6}, - {"type":"12. % AIR CREWS","month":"Sep","count":6}, - {"type":"12. % AIR CREWS","month":"Oct","count":5}, - {"type":"12. % AIR CREWS","month":"Nov","count":15}, - {"type":"12. % AIR CREWS","month":"Dec","count":10}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Jan","count":2}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Feb","count":2}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Mar","count":4}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Apr","count":2}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"May","count":2}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Jun","count":1}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Jul","count":1}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Aug","count":2}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Sep","count":2}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Oct","count":4}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Nov","count":2}, - {"type":"13. % CLIENTS UNDER 20 YEARS","month":"Dec","count":5}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"Jan","count":25}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"Feb","count":27}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"Mar","count":37}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"Apr","count":35}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"May","count":25}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"Jun","count":25}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"Jul","count":27}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"Aug","count":28}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"Sep","count":24}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"Oct","count":30}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"Nov","count":24}, - {"type":"14. % CLIENTS 20-35 YEARS","month":"Dec","count":30}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"Jan","count":48}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"Feb","count":49}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"Mar","count":42}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"Apr","count":48}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"May","count":54}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"Jun","count":55}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"Jul","count":53}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"Aug","count":51}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"Sep","count":55}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"Oct","count":46}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"Nov","count":55}, - {"type":"15. % CLIENTS 35-55 YEARS","month":"Dec","count":43}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Jan","count":25}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Feb","count":22}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Mar","count":17}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Apr","count":15}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"May","count":19}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Jun","count":19}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Jul","count":19}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Aug","count":19}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Sep","count":19}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Oct","count":20}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Nov","count":19}, - {"type":"16. % CLIENTS MORE THAN 55 YEARS","month":"Dec","count":22}, - {"type":"17. PRICE OF ROOMS","month":"Jan","count":163}, - {"type":"17. PRICE OF ROOMS","month":"Feb","count":167}, - {"type":"17. PRICE OF ROOMS","month":"Mar","count":166}, - {"type":"17. PRICE OF ROOMS","month":"Apr","count":174}, - {"type":"17. PRICE OF ROOMS","month":"May","count":152}, - {"type":"17. PRICE OF ROOMS","month":"Jun","count":155}, - {"type":"17. PRICE OF ROOMS","month":"Jul","count":145}, - {"type":"17. PRICE OF ROOMS","month":"Aug","count":170}, - {"type":"17. PRICE OF ROOMS","month":"Sep","count":157}, - {"type":"17. PRICE OF ROOMS","month":"Oct","count":174}, - {"type":"17. PRICE OF ROOMS","month":"Nov","count":165}, - {"type":"17. PRICE OF ROOMS","month":"Dec","count":158}, - {"type":"18. LENGTH OF STAY","month":"Jan","count":1.65}, - {"type":"18. LENGTH OF STAY","month":"Feb","count":1.71}, - {"type":"18. LENGTH OF STAY","month":"Mar","count":1.65}, - {"type":"18. LENGTH OF STAY","month":"Apr","count":1.91}, - {"type":"18. LENGTH OF STAY","month":"May","count":1.9}, - {"type":"18. LENGTH OF STAY","month":"Jun","count":2}, - {"type":"18. LENGTH OF STAY","month":"Jul","count":1.54}, - {"type":"18. LENGTH OF STAY","month":"Aug","count":1.6}, - {"type":"18. LENGTH OF STAY","month":"Sep","count":1.73}, - {"type":"18. LENGTH OF STAY","month":"Oct","count":1.82}, - {"type":"18. LENGTH OF STAY","month":"Nov","count":1.66}, - {"type":"18. LENGTH OF STAY","month":"Dec","count":1.44}, - {"type":"19. % OCCUPANCY","month":"Jan","count":67}, - {"type":"19. % OCCUPANCY","month":"Feb","count":82}, - {"type":"19. % OCCUPANCY","month":"Mar","count":70}, - {"type":"19. % OCCUPANCY","month":"Apr","count":83}, - {"type":"19. % OCCUPANCY","month":"May","count":74}, - {"type":"19. % OCCUPANCY","month":"Jun","count":77}, - {"type":"19. % OCCUPANCY","month":"Jul","count":56}, - {"type":"19. % OCCUPANCY","month":"Aug","count":62}, - {"type":"19. % OCCUPANCY","month":"Sep","count":90}, - {"type":"19. % OCCUPANCY","month":"Oct","count":92}, - {"type":"19. % OCCUPANCY","month":"Nov","count":78}, - {"type":"19. % OCCUPANCY","month":"Dec","count":55}, - {"type":"20. CONVENTIONS","month":"Jan","count":0}, - {"type":"20. CONVENTIONS","month":"Feb","count":0}, - {"type":"20. CONVENTIONS","month":"Mar","count":0}, - {"type":"20. CONVENTIONS","month":"Apr","count":1}, - {"type":"20. CONVENTIONS","month":"May","count":1}, - {"type":"20. CONVENTIONS","month":"Jun","count":1}, - {"type":"20. CONVENTIONS","month":"Jul","count":0}, - {"type":"20. CONVENTIONS","month":"Aug","count":0}, - {"type":"20. CONVENTIONS","month":"Sep","count":1}, - {"type":"20. CONVENTIONS","month":"Oct","count":1}, - {"type":"20. CONVENTIONS","month":"Nov","count":1}, - {"type":"20. CONVENTIONS","month":"Dec","count":1} -]; - -/* Bertin's order, grouping metrics by seasonal pattern. */ -var order = [18, 17, 19, 7, 10, 3, 11, 12, 15, 13, 0, 1, 6, 8, 9, 16, 5, 2, 4, 14]; diff --git a/lib/protovis/examples/jobs/jobs.html b/lib/protovis/examples/jobs/jobs.html deleted file mode 100644 index aa887b6d..00000000 --- a/lib/protovis/examples/jobs/jobs.html +++ /dev/null @@ -1,71 +0,0 @@ - - - Job Voyager - - - - - - -
- -
- diff --git a/lib/protovis/examples/jobs/jobs.js b/lib/protovis/examples/jobs/jobs.js deleted file mode 100644 index c1aba9f0..00000000 --- a/lib/protovis/examples/jobs/jobs.js +++ /dev/null @@ -1,1024 +0,0 @@ -var years = [1850,1860,1870,1880,1900,1910,1920,1930,1940,1950,1960,1970,1980,1990,2000]; - -var jobs = { -"Accountant / Auditor": { -men: [708,1805,1310,2295,11753,0,111209,181482,0,330352,425002,575667,661606,814842,866460], -women: [0,0,0,0,807,0,15746,14657,0,56117,112853,248441,452783,949683,1217596] -}, -"Actor": { -men: [506,401,1507,3983,10449,15867,14020,28815,12428,10678,10461,11726,0,0,29975], -women: [0,100,200,1994,6736,14106,11001,19210,8750,7067,8069,11127,0,0,25931] -}, -"Advertising Agent": { -men: [0,0,703,499,4526,0,15437,37913,33554,26603,32275,53993,72865,94797,114250], -women: [0,0,0,0,0,0,1414,4043,4883,4219,8669,19544,58594,104742,132581] -}, -"Agent": { -men: [2528,4610,5930,20657,19299,52647,30365,54081,92566,115523,146745,23236,0,0,0], -women: [0,200,0,498,906,2016,3632,5562,12692,23172,46524,1102,0,0,0] -}, -"Apprentice": { -men: [3134,22765,24010,20449,17486,70527,17761,17699,39638,30590,21110,16425,4442,1865,0], -women: [101,1107,4116,5585,5026,8568,3428,1517,3081,1072,2492,1103,1622,405,0] -}, -"Apprentice - Auto Mechanic": { -men: [0,0,0,0,0,0,3532,506,0,5955,2093,4106,3961,1800,0], -women: [0,0,0,0,0,0,0,506,0,1074,0,100,120,51,0] -}, -"Apprentice - Bricklayer": { -men: [0,1204,3320,699,1004,0,101,2021,0,8290,2991,4710,3562,976,0], -women: [0,0,0,0,0,0,0,0,0,0,0,200,140,53,0] -}, -"Apprentice - Carpenter": { -men: [404,6818,8443,5589,3113,0,1615,2527,13667,11840,7666,9616,11127,5609,0], -women: [0,0,101,0,0,0,0,0,1010,54,0,0,840,318,0] -}, -"Apprentice - Construction": { -men: [202,3408,5525,1995,2012,21412,705,1515,18051,5717,3489,2603,0,0,0], -women: [0,202,101,0,0,0,0,0,101,0,100,302,0,0,0] -}, -"Apprentice - Electrician": { -men: [0,0,0,0,1407,0,4439,1517,7102,12387,9156,22140,18588,17188,0], -women: [0,0,0,0,0,0,0,0,101,0,99,500,1160,901,0] -}, -"Apprentice - Machinist": { -men: [0,2612,3212,4391,12049,0,17659,7077,17891,17372,14047,17724,15146,4030,0], -women: [0,0,0,200,100,0,101,0,0,165,497,401,841,356,0] -}, -"Apprentice - Mechanic": { -men: [0,1003,1710,0,504,0,1313,1011,0,4726,4784,5309,0,0,0], -women: [0,0,101,0,0,0,0,0,0,0,200,201,0,0,0] -}, -"Apprentice - Metal Working": { -men: [0,13251,15780,8480,8337,0,8076,6067,0,8716,4984,6807,720,930,0], -women: [0,0,0,0,101,0,0,0,0,246,0,0,160,106,0] -}, -"Apprentice - Plumber": { -men: [0,1004,2011,1694,2815,0,5749,6571,8921,17684,9754,15327,12270,7878,0], -women: [0,0,0,0,200,0,0,0,2821,3305,0,200,500,244,0] -}, -"Apprentice - Printing": { -men: [0,2005,4522,2597,4229,0,5150,9605,15899,20145,12253,10015,0,0,0], -women: [0,0,0,99,200,0,303,505,2435,1967,299,1100,0,0,0] -}, -"Architect": { -men: [405,1707,1914,3892,10151,16624,15439,18200,19929,24820,30179,57091,107765,143413,171025], -women: [0,0,0,0,100,0,100,0,303,519,1096,2606,10949,27057,45789] -}, -"Artist / Art Teacher": { -men: [2123,5024,3716,5485,15074,20151,20083,34876,43200,52247,70230,70208,88510,113275,147525], -women: [0,605,502,3393,11754,15617,13929,20220,19699,30171,59496,51690,91749,136297,144382] -}, -"Athlete": { -men: [204,100,201,498,3417,0,3735,7579,10153,8927,4387,0,0,0,0], -women: [0,0,0,200,0,0,0,0,748,155,796,0,0,0,0] -}, -"Auctioneer": { -men: [809,1908,2108,2594,2818,2519,5652,5053,5580,13509,4385,5415,6427,8339,0], -women: [0,0,0,0,0,0,0,0,2744,2970,99,800,1282,1577,0] -}, -"Author": { -men: [101,301,303,797,803,1260,3836,7581,11522,9927,20930,18231,28608,61985,89748], -women: [0,201,201,99,1104,756,2924,5055,4047,5669,11349,12021,26476,63063,107058] -}, -"Baggageman": { -men: [809,1509,2913,5186,7529,12846,11103,7582,5504,7482,6868,0,0,0,0], -women: [0,0,0,0,0,251,101,0,0,381,498,0,0,0,0] -}, -"Baker": { -men: [14557,17661,24323,36718,70477,69276,99297,123866,139541,110668,108960,96872,88978,107471,109810], -women: [101,401,602,897,4121,5036,4643,10112,12300,9889,28685,49583,66119,100474,117400] -}, -"Bank Teller": { -men: [404,1004,806,1396,5029,0,18875,33870,0,35493,45627,41973,55680,61846,53683], -women: [0,0,101,0,101,0,2222,6067,0,32017,146571,312725,583967,562920,474467] -}, -"Barber / Beautician": { -men: [7685,8928,24425,43679,122105,177585,187113,275008,218924,199062,232886,227274,176025,162502,180813], -women: [202,100,1104,2990,7325,19898,32802,118798,222479,199372,382438,640008,636306,806487,912194] -}, -"Bartender": { -men: [5660,9528,16476,25639,91055,110336,23312,1516,129349,207898,192736,189712,211294,194743,185678], -women: [0,0,0,100,503,252,101,0,6704,17293,32280,61604,192798,215718,232073] -}, -"Bill Collector": { -men: [1212,2311,1908,3688,21211,31238,29573,36399,38109,18194,31184,40757,40434,61919,73893], -women: [0,0,0,100,201,2016,3228,3538,3309,3874,9255,30353,64010,125183,189733] -}, -"Blacksmith": { -men: [96744,111164,133448,177847,220322,239044,202217,117282,90238,45402,29270,21935,0,0,0], -women: [101,503,201,0,200,504,707,0,303,65,99,500,0,0,0] -}, -"Blaster": { -men: [0,0,300,0,302,0,2320,1011,6971,11950,8858,10522,12387,10256,11083], -women: [0,0,0,0,0,0,0,0,202,0,100,402,541,537,1187] -}, -"Boarding House Keeper": { -men: [2124,4819,4924,7586,12564,19149,16353,10617,8844,7385,4282,2103,0,0,0], -women: [910,9733,9138,16963,78882,141058,110201,81890,55217,21857,38355,10713,0,0,0] -}, -"Boatman": { -men: [28295,22671,19903,22846,8743,5291,5850,5561,12583,14891,8368,6510,0,0,0], -women: [304,200,202,300,0,0,0,0,1355,773,199,100,0,0,0] -}, -"Boilermaker": { -men: [2020,3917,7332,10973,28436,39803,71945,55615,34322,38374,30978,35752,42092,28061,24467], -women: [0,0,0,0,100,252,202,0,303,319,99,602,761,664,810] -}, -"Bookbinder": { -men: [3435,3410,5127,6884,13265,0,11605,11625,0,14948,14843,17835,14787,16648,29675], -women: [0,201,702,3490,12966,0,11707,8599,0,17486,24210,35459,23481,21119,34600] -}, -"Bookkeeper": { -men: [2225,16847,30849,62745,158957,294208,244835,234070,454109,177052,170070,337040,226696,239124,220113], -women: [0,301,1204,2889,57988,190197,283872,385193,475928,595798,1262258,1840579,2139251,2111677,1920224] -}, -"Bootblack": { -men: [0,202,1206,1896,9535,19394,15242,20226,15029,14807,13752,6012,0,0,0], -women: [0,0,0,0,0,0,201,0,1503,1787,399,1002,0,0,0] -}, -"Building Manager": { -men: [2125,2909,602,1696,68034,0,12514,29320,46583,49271,35767,62713,133459,247337,244612], -women: [101,0,101,0,20099,0,6156,25781,33714,27306,28494,50878,107540,229483,272713] -}, -"Bus Driver": { -men: [3839,4514,6318,3990,4622,0,11098,39423,0,155103,181709,196639,246381,272749,317367], -women: [0,0,0,0,0,0,201,0,0,5339,23108,83046,216409,251743,303925] -}, -"Buyer - Farm": { -men: [404,4919,12366,23831,45443,0,60344,51566,38019,28490,21507,23538,20732,16759,12935], -women: [0,0,0,100,505,0,403,506,505,166,597,1103,2223,3951,3870] -}, -"Buyer - Store": { -men: [0,100,0,99,5429,0,33604,42965,53514,102591,195651,544178,700449,560069,825260], -women: [0,0,0,0,604,0,7972,10614,19293,35223,75217,150434,232898,359754,735183] -}, -"Cabinet Maker": { -men: [38303,35416,30948,36108,36590,40555,53790,61678,74244,70956,75927,82235,78786,75521,94810], -women: [101,500,100,200,302,1008,504,506,4667,559,1395,6113,8669,6140,7648] -}, -"Car Washer": { -men: [0,0,0,0,0,0,27553,69245,54742,90099,110112,0,0,0,0], -women: [0,0,0,0,0,0,101,506,482,8613,5875,0,0,0,0] -}, -"Carpenter": { -men: [219647,273528,352340,387029,600594,816886,840929,852292,741073,973660,1100617,1111775,1531584,1604105,1712796], -women: [707,804,302,798,1103,2519,3129,506,1903,5723,3792,15824,28434,31003,35826] -}, -"Cashier": { -men: [101,600,604,2495,12054,0,27251,32354,0,47193,131521,185135,390848,766005,976286], -women: [0,0,101,599,13373,0,57119,79874,0,197824,710621,1236998,2318015,3286285,3347118] -}, -"Cement / Concrete Finisher": { -men: [102,101,0,499,502,0,7972,20726,30773,36637,54904,88343,85759,88695,116125], -women: [0,0,0,0,0,0,0,0,101,175,299,1201,1180,1386,1620] -}, -"Chainman": { -men: [0,0,0,0,302,0,2020,3536,13526,12715,14249,16531,13886,5411,0], -women: [0,0,0,0,0,0,0,0,0,929,499,602,1021,759,0] -}, -"Charwoman": { -men: [0,0,302,600,3520,10579,16448,24774,37062,50778,74484,275355,204143,166599,198452], -women: [0,400,100,100,4524,25945,18771,29825,43528,76814,206218,406102,766315,820584,1538658] -}, -"Chemist": { -men: [809,301,1104,2594,8036,15115,31894,37922,56420,71535,81301,104054,88543,114710,79842], -women: [0,0,0,0,404,252,1414,505,1908,7798,13145,19839,23895,42610,39726] -}, -"Chiropractor": { -men: [0,0,0,0,100,0,3837,9605,9091,12017,13641,14624,20496,33741,46698], -women: [0,0,0,0,0,0,1717,1011,1818,1932,1990,2205,3324,15502,19954] -}, -"Clergyman": { -men: [29414,35220,45907,68499,108124,122668,129169,136996,133751,168400,212391,230171,291038,321137,379579], -women: [101,300,201,898,1207,2267,2424,2529,4020,8045,7764,8308,19574,40106,69192] -}, -"Clerical Worker": { -men: [2929,8431,62494,98934,245106,525693,850683,1078763,1329366,1584096,2030615,2474020,2718238,2983145,3739906], -women: [0,100,2308,4788,38400,121157,417539,494402,745669,1539068,3761404,5105863,6374822,7560092,9244984] -}, -"College President / Dean": { -men: [101,101,101,398,201,0,505,1011,0,4142,6378,34354,0,0,0], -women: [0,101,100,0,0,0,404,0,0,1526,1496,15025,0,0,0] -}, -"Constable": { -men: [3439,4715,4019,5686,8545,9825,5449,9099,10729,7493,8368,5110,0,0,0], -women: [0,0,0,0,0,0,202,0,0,164,696,200,0,0,0] -}, -"Cook": { -men: [0,6928,16086,5690,68137,0,107994,170873,205345,230222,259815,433899,906926,1481390,2100285], -women: [0,8032,37994,4787,204394,0,73046,104637,143807,254588,600691,867535,1375041,1609016,2289731] -}, -"Counter Worker": { -men: [0,0,0,0,502,0,6865,16175,0,51488,56092,64511,56640,93128,95273], -women: [0,0,0,0,100,0,1313,7082,0,49079,210897,217777,270330,256746,208388] -}, -"Craftsman": { -men: [47904,78049,91556,61142,108845,43321,75069,49544,0,78662,122735,904916,0,0,0], -women: [202,501,101,200,2211,756,1110,1011,0,619,2789,62514,0,0,0] -}, -"Cranemen / Hoistmen": { -men: [0,0,0,0,2717,0,30474,51565,123466,109222,144028,173610,182572,120046,97514], -women: [0,0,0,0,0,0,202,0,583,1405,1097,2404,4400,3169,3609] -}, -"Creditor": { -men: [0,0,0,0,201,0,8582,18198,28019,27992,41142,46190,0,0,0], -women: [0,0,0,0,0,0,403,2529,4308,8548,17638,22537,0,0,0] -}, -"Crossing Guard / Toll Collector": { -men: [1818,1604,2313,4192,4725,0,9889,10114,17110,12586,20520,22533,22733,23485,0], -women: [0,402,300,697,202,0,202,0,0,229,14536,31948,42251,42603,0] -}, -"Dancer / Dance Teacher": { -men: [102,300,201,100,401,0,1313,2021,3362,3270,5981,1901,3925,6107,4794], -women: [0,100,0,0,501,0,2825,11122,11905,12049,28201,10013,13749,21996,29546] -}, -"Decorator": { -men: [0,0,101,0,1812,5292,7571,20224,27711,30892,29889,36665,0,0,0], -women: [0,0,0,0,100,504,705,4548,6321,11781,40449,66709,0,0,0] -}, -"Delivery Man": { -men: [1316,2109,3812,12462,41899,217884,166109,236570,409059,245625,470814,742046,769142,143502,50821], -women: [0,100,101,398,100,2520,1211,2528,3817,4586,24218,35857,71026,18029,13282] -}, -"Demonstrator": { -men: [0,0,0,0,0,1008,1513,1012,2021,4894,1796,4512,3161,11569,18049], -women: [0,0,0,0,602,2771,2422,2527,7821,14926,52985,76833,21926,67502,73418] -}, -"Dentist": { -men: [2023,5720,7136,12171,26222,41818,56401,69763,69505,70950,84779,90658,125312,148591,141323], -women: [0,100,0,0,603,756,807,2528,1415,2037,3187,4605,10409,22823,30915] -}, -"Designer": { -men: [203,101,202,798,3515,7306,11402,11122,15745,34062,61770,94265,183331,294288,373242], -women: [0,0,0,0,301,3022,5448,11126,8941,11044,21834,41775,221166,418677,521359] -}, -"Disabled": { -men: [910,2512,10656,7383,23017,0,10597,15166,0,0,0,0,0,0,0], -women: [202,1305,8545,8179,8040,0,3534,505,0,0,0,0,0,0,0] -}, -"Dispatcher": { -men: [0,0,101,1198,803,0,2823,2529,0,31256,54589,59485,75592,123787,138567], -women: [0,0,0,0,0,0,202,0,0,3466,10561,16128,38161,113690,163762] -}, -"Doctor Office Attendant": { -men: [101,0,0,0,503,0,2421,0,8806,2497,2891,25944,59807,62365,112481], -women: [0,0,0,0,303,0,11105,28308,32096,40013,127703,298831,520895,442489,960494] -}, -"Draftsman": { -men: [101,302,1003,2394,12362,32998,51760,80877,91661,112090,222058,290040,307888,301258,216855], -women: [0,0,0,0,201,252,1514,3540,2020,6803,24997,32359,65804,71277,52679] -}, -"Dressmaker / Seamstress": { -men: [202,1910,1706,998,4217,4282,8171,5053,7270,4609,5480,6409,8547,8137,35316], -women: [2226,131138,138614,233469,453625,403770,281139,184030,155175,143321,186323,163170,141472,125498,115374] -}, -"Dyer": { -men: [2326,2715,2310,5188,17179,16375,17962,21242,24246,28005,21118,25750,0,0,0], -women: [0,101,202,99,603,504,1110,0,758,2297,1395,3107,0,0,0] -}, -"Economist": { -men: [0,0,0,0,0,0,101,1011,0,6678,16035,61492,74162,93846,71392], -women: [0,0,0,0,0,0,100,0,0,3251,3289,10717,32636,74349,64767] -}, -"Editor / Reporter": { -men: [2327,3611,5834,11872,28136,31492,28555,49037,47417,66138,94148,159347,186706,221291,239429], -women: [0,0,100,400,2711,3524,5750,12637,15064,25334,69526,117199,200657,278778,318909] -}, -"Electrician": { -men: [0,0,101,400,46435,130726,206165,257818,217697,325389,384469,494793,698214,777440,868613], -women: [0,0,100,0,502,252,2017,0,1898,2213,4685,13323,15435,21758,24584] -}, -"Electrotyper": { -men: [0,100,100,999,2206,5541,3933,9099,9311,18965,9759,6913,0,0,0], -women: [0,0,0,0,100,753,101,505,606,1605,298,301,0,0,0] -}, -"Elevator Operator": { -men: [0,0,0,0,11247,18893,31072,71278,72757,67776,69127,38849,21958,11416,0], -women: [0,0,0,0,0,0,6156,13143,14365,29340,45326,19036,7664,3215,0] -}, -"Engineer": { -men: [0,0,101,0,1006,0,9888,12636,0,78147,152998,253425,308454,395357,396626], -women: [0,0,0,0,0,0,101,0,0,333,1096,4508,13670,41711,49325] -}, -"Engineer - Aeuronautical": { -men: [0,0,0,0,0,0,403,3035,0,18100,54294,70109,89216,144618,117501], -women: [0,0,0,0,0,0,0,0,0,545,897,2003,3140,13004,11645] -}, -"Engineer - Chemical": { -men: [0,0,0,0,100,0,1312,7075,11561,30515,42658,53196,59210,65561,62749], -women: [0,0,0,0,0,0,0,0,203,1545,897,1205,3282,8189,10994] -}, -"Engineer - Civil": { -men: [607,2507,4019,6381,18597,47349,68401,85930,90394,127908,172552,188593,214288,259854,275116], -women: [0,0,0,0,0,1258,0,0,303,4171,1194,3405,7342,19468,32554] -}, -"Engineer - Electrical": { -men: [0,0,0,0,6644,0,29464,54095,55931,110418,183872,301011,325825,463684,377014], -women: [0,0,0,0,0,0,202,0,202,1010,2196,6709,18148,50213,44169] -}, -"Engineer - Industrial": { -men: [0,0,0,0,0,0,3331,7078,13750,46819,103512,187121,287934,390793,570889], -women: [0,0,0,0,0,0,0,0,1372,843,2594,6610,56732,137988,285490] -}, -"Engineer - Mechanical": { -men: [101,300,202,399,11145,14607,26647,43477,81157,117503,167238,194229,228850,215965,297908], -women: [0,0,0,0,101,0,0,0,202,746,599,1704,5288,11152,20586] -}, -"Engineer - Metallurgical": { -men: [0,0,0,0,0,0,1108,3538,10425,11737,18527,15622,25544,17850,36887], -women: [0,0,0,0,0,0,0,0,1414,679,700,401,1380,2562,4554] -}, -"Engineer - Mining": { -men: [0,100,100,999,3417,10328,6256,8091,0,10661,12947,17124,35084,33345,23729], -women: [0,0,0,0,0,0,0,0,0,420,0,201,1462,2347,1776] -}, -"Engraver": { -men: [1820,2608,3516,5884,9368,13348,10088,13141,8127,9858,12760,7511,10670,13165,11601], -women: [0,0,0,0,500,252,606,3035,808,1318,2591,3504,7723,7785,6674] -}, -"Entertainer": { -men: [910,501,604,3593,3713,22165,3632,9609,6756,11328,10860,55995,70659,100096,84890], -women: [0,0,101,398,402,252,403,1518,897,6703,5075,26138,48109,102835,122685] -}, -"Farm Advisor": { -men: [0,100,0,0,0,0,3127,4549,7677,6357,7078,6811,0,0,0], -women: [0,0,0,0,0,0,202,505,4520,8128,10762,10811,0,0,0] -}, -"Farm Foreman": { -men: [16270,31787,2810,3790,4022,51894,15337,20723,24110,18215,28900,38151,50749,42815,57670], -women: [101,402,0,199,100,5794,1211,1518,303,420,1495,4011,12963,8331,11769] -}, -"Farm Laborer": { -men: [296047,841587,2595826,2913760,3964960,5061866,3295843,3489124,3086228,2188723,1784546,1407937,995680,853810,856153], -women: [1313,18465,401852,508897,677490,1641086,819956,654160,392640,644460,838162,516273,429164,347642,384886] -}, -"Farm Manager": { -men: [707,3514,1710,2196,8940,0,80524,44993,34456,30519,26102,67090,145958,251617,208086], -women: [0,1606,100,400,1003,0,14731,15166,1010,2118,997,4006,18873,41998,37048] -}, -"Farmer": { -men: [2415878,2586005,3118876,4483723,5535233,5765835,6225184,5791250,5064557,4225264,2766741,1655668,1284012,868622,634832], -women: [17583,99747,46126,95948,316196,282118,274294,246702,161483,113760,181127,112396,181370,157681,117671] -}, -"Fireman": { -men: [1718,3811,6031,16261,81592,139785,192430,196150,199221,250390,255326,292747,404958,382977,373490], -women: [0,0,0,99,200,252,606,1516,1480,3969,1396,9011,11495,15924,23972] -}, -"Fisherman": { -men: [12734,18666,24328,34303,73919,73556,51958,67234,66581,81244,55407,47863,72464,70675,68818], -women: [0,0,0,599,3514,0,404,0,3039,1461,1098,3008,7263,6360,5504] -}, -"Floor Manager": { -men: [0,0,0,0,802,14106,3533,3034,7505,5095,7174,0,0,0,0], -women: [0,0,0,0,101,4030,1414,505,3596,5334,7976,0,0,0,0] -}, -"Foremen": { -men: [2427,9835,10358,22943,131261,274820,443397,519696,568592,790386,1215583,1664520,2132755,1741680,1999279], -women: [0,101,201,599,9846,20403,39854,41959,48342,66337,113444,170726,352845,322602,436539] -}, -"Forgemen": { -men: [1010,1507,1308,599,3613,7558,8676,6069,0,17916,11543,17428,16311,19672,16752], -women: [0,0,0,0,101,0,303,0,0,339,997,1304,1322,1246,1115] -}, -"Forrester": { -men: [0,300,100,0,1207,4284,7266,12134,0,26195,40254,52191,59767,52735,46628], -women: [0,0,0,0,0,0,0,0,0,1750,2487,3109,8826,9165,7396] -}, -"Funeral Director": { -men: [606,601,2106,5784,12066,16372,22005,32352,34865,35287,36562,44275,42362,46564,44421], -women: [0,0,0,99,200,1259,806,1011,1718,4118,2591,4205,4483,7353,9932] -}, -"Furnaceman": { -men: [9808,7528,13162,42480,28251,29463,28262,19715,30045,58253,62349,79432,0,0,0], -women: [0,0,0,0,200,504,202,0,101,783,1190,3505,0,0,0] -}, -"Furrier": { -men: [202,301,501,997,3919,0,7469,10616,16327,13387,4085,3807,3882,7218,0], -women: [0,303,0,796,903,0,1514,1010,2424,2251,1297,802,8922,14334,0] -}, -"Gardener / Groundskeeper": { -men: [8596,18751,31048,41906,55665,93958,39958,124869,186215,157029,287768,543926,570275,924326,1267931], -women: [0,1005,100,898,905,5542,909,1011,2518,3698,6477,20631,57849,86456,113506] -}, -"Glazier": { -men: [101,901,904,696,3317,0,3635,9101,12949,14297,18235,28336,34302,49856,57335], -women: [0,0,0,0,101,0,202,0,303,784,500,1504,2142,2971,2671] -}, -"Hospital Attendant": { -men: [101,200,403,1495,5430,0,12112,24262,65725,87897,124009,145853,207920,281405,329525], -women: [101,902,403,698,3113,0,11104,10616,54842,126801,479067,984420,1705976,2153464,2508569] -}, -"Household Worker": { -men: [14966,36635,79495,200507,109734,287427,108884,108678,188721,92978,114267,100857,57388,62976,31353], -women: [11620,616191,869232,1096234,1465711,2031315,1476973,1947276,2259463,1541444,2760658,2152078,962462,855222,123088] -}, -"Huckster": { -men: [11322,21079,32454,54049,73066,0,45724,52579,54906,21167,27385,35059,57774,96374,0], -women: [0,1403,2110,3786,2513,0,1514,3540,3755,3572,49318,170465,281812,216853,0] -}, -"Human Resources": { -men: [0,0,0,0,0,0,1917,2022,0,39058,76577,231098,393747,407601,565758], -women: [0,0,0,0,0,0,200,505,0,15585,45217,126330,327683,501023,974106] -}, -"Inmate": { -men: [303,1303,19096,11683,20904,25692,32293,64714,0,0,0,0,0,0,0], -women: [0,2305,14797,8674,11053,3778,17355,40948,0,0,0,0,0,0,0] -}, -"Inspector": { -men: [1721,1808,5325,7384,40907,48616,118660,123842,137552,170403,212526,254269,204298,204463,161302], -women: [0,0,0,0,1405,1259,4742,4041,8597,11117,24507,28647,37570,66435,72389] -}, -"Insulation Worker": { -men: [0,0,0,0,202,0,2624,1517,10681,17794,24297,29951,60958,86239,77376], -women: [0,0,0,0,101,0,0,0,786,1610,995,900,3242,4158,4840] -}, -"Insurance Agent": { -men: [606,1806,12458,13365,67332,74801,119169,259333,232506,288469,415632,509645,536722,605552,512838], -women: [0,0,604,0,1403,3024,5653,15160,15793,24562,65148,110316,297359,589576,752326] -}, -"Janitor": { -men: [202,803,3016,7480,48751,94970,135536,253254,343957,423443,698408,1471666,2153590,2288548,2004939], -women: [0,100,302,697,7340,18391,21601,24772,41564,62893,117939,238126,751580,1153478,953749] -}, -"Jeweler": { -men: [11832,17268,14776,22250,49851,27203,33402,31341,44607,48404,40433,35357,68858,77985,120157], -women: [101,301,101,599,2510,1008,2624,2024,5015,2997,3887,9316,24699,32224,31809] -}, -"Job Setter": { -men: [0,0,0,0,0,0,2524,6571,0,24555,40441,91541,57611,28718,0], -women: [0,0,0,0,0,0,0,0,0,550,698,3011,4323,2841,0] -}, -"Laborer": { -men: [620277,826978,1134710,1851194,3134854,3523434,3861050,4421845,4600712,3170293,3563009,4034593,4605256,5021782,4746546], -women: [3436,18778,37194,157410,134963,123424,206999,202730,134098,117171,210569,474892,837301,1077068,825610] -}, -"Laundry / Dry Cleaning": { -men: [303,1805,7018,16074,48646,40805,54781,95031,53970,143430,132711,141238,113516,161794,157827], -women: [0,601,4030,39807,31145,73802,99415,187559,175984,307130,504340,416819,286070,318990,275642] -}, -"Lawyer / Judge": { -men: [24369,35027,44027,65815,98163,111097,121497,158729,168630,173840,211203,281466,481261,628376,699931], -women: [0,100,0,0,402,1258,1110,2529,4735,5909,9565,17728,85744,213279,310186] -}, -"Librarian": { -men: [0,100,302,298,805,0,1313,2022,4836,6517,12953,24742,38669,50193,38871], -women: [0,0,201,399,2813,0,12916,29830,31267,55246,103011,146646,209578,257080,188810] -}, -"Library Attendant": { -men: [0,0,303,0,402,0,303,0,7096,2879,10059,32563,35398,41915,52874], -women: [0,0,302,0,1307,0,3028,1518,28746,12268,36750,136732,151852,149378,205979] -}, -"Lithographer": { -men: [808,600,1207,3493,8239,7054,11407,14663,28115,30018,28588,32552,22554,41137,0], -women: [0,0,101,0,202,252,404,506,606,1051,1992,5615,6041,14706,0] -}, -"Locomotive Engineer": { -men: [505,2206,11876,16461,52563,106301,113014,114256,69930,78796,79088,66515,87426,55052,57211], -women: [0,0,0,0,100,252,403,506,202,189,198,800,1480,1520,2324] -}, -"Locomotive Fireman": { -men: [0,1709,8755,10872,45919,71293,93545,64215,50255,60293,40442,13918,0,0,0], -women: [0,0,0,0,0,252,0,0,0,55,0,100,0,0,0] -}, -"Longshoreman": { -men: [1314,2207,6423,10575,26726,70023,84361,63693,68299,71535,64546,57690,31467,20427,0], -women: [0,0,0,0,101,252,505,0,449,1266,398,601,522,563,0] -}, -"Loom Fixer": { -men: [0,100,100,299,7435,12595,18167,18704,23235,32712,30085,25537,0,0,0], -women: [0,0,0,0,101,0,0,505,0,1016,398,300,0,0,0] -}, -"Lumberman": { -men: [7986,16948,27120,50575,108406,144577,177099,147613,161252,202339,163385,108184,135143,137894,132973], -women: [0,101,0,500,302,503,1109,1010,824,1710,1596,4105,4223,4953,4596] -}, -"Machinist": { -men: [23644,38635,51649,84404,263131,471039,818495,655648,503033,522212,572045,422413,555009,612731,546426], -women: [0,403,0,99,1207,3273,6660,8597,4600,7161,11652,17829,32900,30893,33788] -}, -"Mail Carrier": { -men: [808,1907,2312,9171,26923,84376,97076,111722,123474,168099,230874,262603,261261,279346,269004], -women: [0,0,0,0,302,504,908,506,2323,2689,6875,27746,41965,98128,137492] -}, -"Manager / Owner": { -men: [224003,365479,493343,629424,1277509,2160453,2171254,2864304,2930996,3890801,4254695,4393393,6783518,8899765,11270779], -women: [1717,21688,18179,35500,88545,117876,150882,219900,347927,561469,862923,997653,2683545,4957672,7154236] -}, -"Mason": { -men: [51032,67738,88049,96139,149652,183629,125934,164810,147647,169569,236678,235386,279192,307451,264638], -women: [0,200,301,400,504,252,504,505,1411,819,1096,3402,3882,5004,3111] -}, -"Mathematician": { -men: [0,0,0,0,100,0,0,505,0,1618,5874,6907,5543,4668,0], -women: [0,0,0,0,0,0,0,0,0,669,3187,1902,1321,1952,0] -}, -"Meat Cutter": { -men: [19314,35620,42303,77217,107334,15115,125634,131935,146170,173515,200374,214449,281687,257308,269489], -women: [0,202,101,399,603,0,1312,1010,987,3651,9559,17125,61267,76033,94222] -}, -"Mechanic": { -men: [29113,39053,29052,30222,44014,40551,119593,211814,429926,858091,1414733,1218050,1700996,1821648,2232570], -women: [101,200,0,0,402,252,1312,2021,9456,12727,32085,36966,65886,78010,90507] -}, -"Mechanic - Airplane": { -men: [0,0,0,0,0,0,1007,9603,31726,73763,121473,157173,119283,180131,202371], -women: [0,0,0,0,0,0,0,506,505,1239,3689,5511,4303,9653,13018] -}, -"Mechanic - Automobile": { -men: [0,0,0,0,0,0,197967,434751,418084,695009,727963,989179,1431954,1586352,1829579], -women: [0,0,0,0,0,0,707,1517,1313,6934,3488,15418,18996,31606,36084] -}, -"Mechanic - Office Machines": { -men: [0,0,0,0,100,0,3027,6070,0,18600,30580,72912,82521,125662,276652], -women: [0,0,0,0,0,0,0,0,0,163,100,2406,6744,16289,43897] -}, -"Mechanic - Radio / Television": { -men: [0,0,0,0,0,0,101,26789,0,78890,114485,144978,175139,182758,91074], -women: [0,0,0,0,0,0,0,0,0,1856,3084,7808,10370,17777,6283] -}, -"Mechanic - Railroad": { -men: [101,0,1106,2296,9950,0,74476,50037,40559,52977,51803,73929,0,0,0], -women: [0,0,0,0,0,0,101,0,0,0,99,702,0,0,0] -}, -"Messenger": { -men: [506,1704,10651,16762,70948,109325,93446,122857,84153,72703,84687,67815,89011,136265,193642], -women: [0,0,302,998,5431,9823,10900,9605,3421,15403,19520,19726,32289,46974,57087] -}, -"Metal Filer": { -men: [303,2514,5418,7390,39098,39544,60232,84931,104474,156734,164297,263025,286902,146202,110367], -women: [0,202,605,199,1706,3780,3024,3539,7582,6945,15144,56876,64627,28219,16030] -}, -"Metal Heater": { -men: [101,1404,1402,2196,5633,7305,14739,13143,17704,10872,10362,9310,0,0,0], -women: [0,0,100,0,0,0,0,505,5079,1491,99,601,0,0,0] -}, -"Metal Worker": { -men: [11319,20465,30239,40487,64716,76316,155800,126889,135611,189923,229401,261258,295536,291631,297786], -women: [0,100,101,299,101,0,605,505,3866,1796,4682,5616,11370,15090,12523] -}, -"Midwife": { -men: [0,0,0,0,0,252,101,0,0,109,600,200,0,0,0], -women: [0,1404,1203,2592,5623,4787,4740,3539,0,1086,1391,1203,0,0,0] -}, -"Military": { -men: [8693,10522,29943,27521,133383,132487,249460,108692,235610,991684,1765471,2108307,1610699,1540672,1017572], -women: [0,0,100,300,202,0,906,0,404,20661,34658,60304,173030,187266,171138] -}, -"Miller": { -men: [31743,34234,37084,43282,37099,21411,23918,13648,16251,12321,10764,8412,0,0,0], -women: [101,100,100,398,200,252,403,0,101,0,100,100,0,0,0] -}, -"Milliner": { -men: [202,903,1009,1598,2914,6549,2117,3034,1616,3488,794,500,0,0,0], -women: [506,25379,26737,38392,81502,123938,64274,33868,10493,14466,5575,4505,0,0,0] -}, -"Millwright": { -men: [9003,7722,8735,9183,10861,0,38246,53577,43715,59944,72993,91451,145908,106960,90310], -women: [101,0,100,0,0,0,303,1011,0,265,0,901,5382,3918,2007] -}, -"Miner": { -men: [87431,147614,171550,274581,584858,914115,1026107,758812,795289,593828,416018,271064,350231,238962,200747], -women: [303,803,302,100,2812,3275,4137,2022,4858,725,3088,10623,12927,9715,7109] -}, -"Model Maker": { -men: [1616,2912,3314,5789,15775,23428,29867,29314,34247,52235,47117,42759,35088,29407,16049], -women: [0,101,0,0,301,252,202,0,505,2444,1596,2403,5804,7102,2772] -}, -"Molder": { -men: [9102,18769,29132,40395,95689,123690,131574,104648,78483,61505,62161,56384,36344,19382,0], -women: [0,0,0,0,302,0,404,506,778,441,2786,11423,7024,3892,0] -}, -"Motion Picture Projectionist": { -men: [0,0,0,0,0,0,10089,18705,29822,25522,20021,20335,15972,10917,10296], -women: [0,0,0,0,0,0,202,0,1313,445,399,1301,1861,2219,1720] -}, -"Motorman": { -men: [101,100,0,10756,33779,66248,67514,76336,52754,50163,27104,13617,0,0,0], -women: [0,0,0,0,100,504,303,0,101,516,100,100,0,0,0] -}, -"Musician / Music Teacher": { -men: [3236,8025,9053,17949,40304,57938,50958,89981,84556,82343,92558,150233,288301,402586,413003], -women: [101,4715,6638,16453,50346,84875,71438,76841,63824,91745,140663,213735,363906,587496,761844] -}, -"Newsboy": { -men: [505,1105,1909,3192,7438,28718,32389,32860,55754,99159,264781,250617,100156,87100,123854], -women: [0,0,100,0,0,504,606,0,1515,3154,11756,17517,51773,59204,140034] -}, -"Nurse": { -men: [101,101,1105,2294,7541,22169,8785,4041,19999,17356,28988,90047,154691,241714,403441], -women: [707,6629,16289,26836,100388,225705,256231,388747,436474,615880,1287387,1563833,2096615,2702420,3505260] -}, -"Nutritionist": { -men: [0,0,0,0,0,0,101,0,0,1180,1991,3205,7965,11261,9461], -women: [0,0,0,0,0,0,1514,4552,0,22631,40932,52883,73865,99487,88039] -}, -"Office Machine Operator": { -men: [0,0,0,0,201,0,1917,6071,16510,26048,81701,159568,278817,450697,334259], -women: [0,0,0,0,0,0,13621,38412,61555,129829,408461,612403,854621,1252448,891903] -}, -"Oiler / Greaser": { -men: [0,0,0,0,6630,15620,26540,29825,40008,62567,60558,56403,51225,28470,30515], -women: [0,0,0,0,100,0,302,0,778,671,797,2306,2201,1252,2196] -}, -"Operative": { -men: [192143,247834,609233,989348,1052589,1753668,1963909,2144940,2999021,4057324,4986070,5939103,5807712,5338347,5837694], -women: [1212,73186,182209,303660,492853,943342,1107472,1268895,2053061,2577284,5044007,6135206,5651553,4635239,4200004] -}, -"Optician / Lens Grinder": { -men: [202,401,503,1398,3920,0,11710,8087,13608,19545,17831,23534,29999,37323,20024], -women: [0,0,0,0,504,0,907,505,863,1947,4679,8509,23697,49567,39007] -}, -"Optometrist": { -men: [0,0,0,0,0,0,3430,10106,11290,16568,17440,20031,24055,25867,24325], -women: [0,0,0,0,0,0,0,506,1773,946,1197,902,2442,4742,9246] -}, -"Osteopath": { -men: [0,0,0,0,201,0,2825,4045,5657,6758,3784,0,0,0,0], -women: [0,0,0,0,101,0,909,2527,1212,574,500,0,0,0,0] -}, -"Painter": { -men: [24058,55188,86449,130754,278009,336038,331975,554055,505402,570711,643596,631217,760594,885076,882211], -women: [101,201,301,698,2913,2771,6659,14158,11859,31300,41041,65407,110802,128104,108402] -}, -"Paperhanger": { -men: [607,1907,2712,3990,21617,23172,18656,33868,31499,22586,13057,0,0,0,15223], -women: [0,0,0,0,403,1007,707,505,3800,3055,2288,0,0,0,7125] -}, -"Parking Attendant": { -men: [0,0,0,0,0,0,3532,76845,244162,255490,434923,621579,438129,343931,290103], -women: [0,0,0,0,0,0,202,505,11348,6263,10951,22439,47128,46028,53227] -}, -"Pharmacist": { -men: [5461,9836,16085,28406,54859,0,69519,89469,79447,84842,97311,107984,122992,129075,123677], -women: [0,201,0,200,1003,0,2825,2023,5816,13857,10264,20235,41371,76550,107598] -}, -"Photo Developer": { -men: [0,0,0,100,603,0,2422,8590,15775,18452,26196,41276,48507,55700,43477], -women: [0,0,100,200,1106,0,4341,6572,9844,15688,32268,47477,65144,67981,62574] -}, -"Photographer": { -men: [707,3815,6935,10667,21811,25946,23116,27300,34411,46122,50022,66716,81296,112297,116115], -women: [0,100,303,698,2820,5792,4842,3034,3311,9922,10361,15632,32123,57529,70166] -}, -"Physician / Surgeon": { -men: [43256,58907,61635,86590,117403,147613,130056,139517,167176,186164,222442,269060,394999,494783,576125], -women: [0,301,904,2592,5635,7555,5555,8593,8033,11600,16339,31353,65607,133057,211250] -}, -"Piano / Organ Tuner": { -men: [0,501,402,1398,4526,9065,6860,12135,10537,13802,5384,8118,0,0,0], -women: [0,0,0,0,0,0,0,506,0,325,99,500,0,0,0] -}, -"Pilot": { -men: [0,0,0,0,101,0,806,6571,6947,16817,30676,51099,80769,117916,136359], -women: [0,0,0,0,0,0,0,0,303,0,599,804,1341,4648,5919] -}, -"Plasterer": { -men: [9505,13749,19695,27532,39880,46607,38442,77840,59528,68312,63664,36556,32999,49512,54434], -women: [0,200,100,0,201,0,101,0,909,1203,200,1201,880,1043,695] -}, -"Plumber": { -men: [1516,6216,12969,18655,90259,152913,216042,249220,205078,292481,371777,426834,560336,576342,636668], -women: [0,0,101,0,202,756,604,505,1388,2210,1397,5604,8083,9252,11947] -}, -"Policeman / Detective": { -men: [2930,4117,12456,14858,41908,68769,92029,141547,150849,202046,274172,391239,504399,589960,817139], -women: [0,100,101,0,201,0,1107,1516,1920,4611,11849,18734,32562,91240,144722] -}, -"Porter": { -men: [6064,11944,17889,21643,72538,87910,111610,159765,173740,173360,182380,29337,24222,40885,56206], -women: [0,0,0,0,403,1008,1413,2529,3714,6489,3484,600,2120,4839,11117] -}, -"Postmaster": { -men: [1922,3108,3317,5488,14178,0,16751,18192,21643,22144,27385,30154,23556,27766,20279], -women: [0,100,201,798,5831,0,13418,11622,16614,14591,21920,16728,18413,25369,27120] -}, -"Power Station Operator": { -men: [0,0,0,0,0,0,4036,7583,35641,22608,28090,23836,29157,39503,43979], -women: [0,0,0,0,0,0,101,2022,1245,1045,2787,802,1441,2285,3787] -}, -"Pressman": { -men: [101,301,601,699,14669,25186,23918,34884,38795,56811,78705,147758,269303,324773,280610], -women: [0,0,0,0,602,1008,706,506,773,1908,5886,19231,63388,79866,72897] -}, -"Produce Grader": { -men: [0,0,0,0,403,2519,5048,4549,22012,23753,10362,12425,0,0,0], -women: [0,0,0,0,1509,2016,4032,3031,20208,28323,53084,56705,0,0,0] -}, -"Professional - Misc": { -men: [7076,1711,3814,3295,9149,11587,9086,31847,133278,98096,263832,907129,634581,1190777,2833825], -women: [303,0,200,599,1909,10580,3129,2528,37527,19300,94244,764981,580750,1012193,2592152] -}, -"Professor": { -men: [1112,1002,1712,3190,5628,21667,17960,31851,53898,31980,66431,175361,337037,452502,707315], -women: [0,400,0,0,805,4031,8881,14656,20493,17593,27397,109100,213694,329228,637686] -}, -"Professor - Agriculture ": { -men: [0,0,0,0,101,0,303,0,0,5005,3288,4806,3400,1167,0], -women: [0,0,0,0,0,0,0,0,0,109,299,301,720,237,0] -}, -"Professor - Biology": { -men: [0,0,0,0,302,0,0,0,0,4834,6975,17827,7188,4388,0], -women: [0,0,0,0,0,0,0,0,0,1407,2691,6407,3922,2447,0] -}, -"Professor - Chemistry": { -men: [0,0,0,99,0,0,404,0,0,5931,5785,14525,7186,4135,0], -women: [0,0,0,0,0,0,0,0,0,1034,1394,2702,1943,1329,0] -}, -"Professor - Economics": { -men: [0,0,0,0,0,0,0,505,0,3419,3883,10217,4463,3274,0], -women: [0,0,0,0,0,0,0,0,0,463,199,903,1262,1134,0] -}, -"Professor - Engineering": { -men: [0,0,0,0,0,0,705,0,0,8515,9866,16335,10848,7440,0], -women: [0,0,0,0,0,0,0,0,0,0,299,1303,1541,1418,0] -}, -"Professor - Geology": { -men: [0,0,100,100,0,0,0,0,0,936,1795,0,0,0,0], -women: [0,0,0,0,0,0,0,0,0,0,100,0,0,0,0] -}, -"Professor - Mathematics": { -men: [101,200,100,200,100,0,202,0,0,4048,8964,24749,15650,15592,0], -women: [0,0,0,0,0,0,0,0,0,998,1693,8811,7664,10315,0] -}, -"Professor - Medical": { -men: [0,0,0,0,0,0,403,1012,0,2200,4982,13320,9945,7061,0], -women: [0,0,0,0,0,0,101,0,0,246,1796,17730,22797,15130,0] -}, -"Professor - Physics": { -men: [0,0,0,0,100,0,202,0,0,2972,5282,14037,5609,3834,0], -women: [0,0,0,0,0,0,0,0,0,1101,199,1000,440,503,0] -}, -"Professor - Psychology": { -men: [0,0,0,0,0,0,0,0,0,2316,2193,10322,3322,2555,0], -women: [0,0,0,0,0,0,0,0,0,1497,1196,3308,2585,2702,0] -}, -"Professor - Science": { -men: [0,100,0,100,0,0,101,0,0,136,199,3906,2240,961,0], -women: [0,0,0,0,0,0,0,0,0,0,100,201,641,665,0] -}, -"Professor - Social Science ": { -men: [0,202,202,0,101,0,505,1011,0,13381,17431,31253,10031,6137,0], -women: [0,0,0,0,0,0,101,0,0,6210,11061,8218,5305,3183,0] -}, -"Professor - Statistics": { -men: [0,0,0,0,0,0,0,0,0,519,100,0,0,0,0], -women: [0,0,0,0,0,0,0,0,0,0,100,0,0,0,0] -}, -"Psychologist": { -men: [0,0,0,0,0,0,0,0,0,1742,10065,16925,50235,83271,66504], -women: [0,0,0,0,0,0,100,0,0,2509,5376,14422,50476,123250,119715] -}, -"Public Officials": { -men: [7585,10236,14974,28125,35977,103010,50743,54094,138820,109734,173633,252529,284687,435434,129379], -women: [102,0,100,897,1605,12093,4844,3032,16572,21025,59279,84936,158596,600459,162534] -}, -"Purchasing Agent": { -men: [0,0,0,996,1006,0,15744,21742,34317,63795,99324,152374,207326,239191,141566], -women: [0,0,0,100,402,0,807,2528,8463,6955,14743,28844,85914,170629,160663] -}, -"Radio Operator": { -men: [0,0,0,0,0,0,2825,5059,12231,16670,27301,51476,83564,70794,121044], -women: [0,0,0,0,0,0,202,506,404,2611,5379,11417,47147,21810,24389] -}, -"Railroad Brakeman": { -men: [506,2410,12362,23342,71057,94464,121299,87963,75661,79785,71215,57785,91941,39506,11668], -women: [0,0,0,0,100,252,302,506,458,485,199,600,1303,564,377] -}, -"Railroad Conductor": { -men: [404,5217,8237,18353,55275,60701,82636,80889,47656,55662,63262,53684,58455,45153,54613], -women: [0,0,0,99,101,0,202,0,606,54,400,901,981,2878,3685] -}, -"Railroad Switchman": { -men: [101,202,1308,3191,22994,68008,68425,68251,46193,67040,65023,62820,10746,5871,0], -women: [0,0,0,0,0,0,301,0,0,218,498,800,321,393,0] -}, -"Real Estate Agent": { -men: [405,2511,9342,13753,54886,125936,120301,164288,111205,134551,172155,208549,404125,446923,437118], -women: [0,0,0,0,1408,3275,4338,9603,9954,24702,65960,119193,375987,499220,500595] -}, -"Recreation Attendant": { -men: [303,0,201,797,1305,0,7368,21230,58467,63049,93742,146544,177265,227691,343733], -women: [0,0,0,0,0,0,201,506,9754,5241,16527,70335,149228,204770,339990] -}, -"Religious Worker": { -men: [0,1712,400,99,3717,9319,6861,9100,8879,15925,26016,17126,23979,49125,63275], -women: [101,2014,7131,7088,26638,10328,26133,38417,23772,29036,42944,24832,36143,70844,108514] -}, -"Retired": { -men: [1112,10543,77092,109228,87522,0,143179,199186,0,0,0,0,0,0,0], -women: [0,2711,11762,14252,8536,0,10593,21738,0,0,0,0,0,0,0] -}, -"Road Machinery Operator": { -men: [1415,0,0,698,803,0,10292,22751,0,113735,235174,394873,466269,477535,512160], -women: [0,0,0,0,0,0,404,0,0,948,599,4905,7446,9309,12391] -}, -"Roller": { -men: [1010,1706,2312,2996,14363,16373,26233,41952,28821,33817,33573,19733,20678,13779,14228], -women: [0,0,0,0,0,252,201,0,202,510,896,1403,2542,2172,5966] -}, -"Roofer": { -men: [101,1202,2809,4591,8648,14860,11707,30332,36595,56125,64048,73714,149440,236158,291409], -women: [0,0,0,0,0,0,0,0,808,0,99,1002,1701,3950,4992] -}, -"Sailor": { -men: [69440,67827,65509,72121,50515,50632,52981,44992,44940,58129,48904,42272,42697,34208,31389], -women: [101,301,201,299,503,252,404,0,505,986,698,1201,1321,1197,1895] -}, -"Salesman": { -men: [104351,166761,218916,362213,829630,1078646,1178007,1830029,1832034,2171684,2558950,3021401,3004021,3500491,4087696], -women: [405,4616,12868,32418,201808,356928,504441,698141,847292,1345595,3203794,3508146,3179503,3386271,3846310] -}, -"Sawyer": { -men: [9799,13444,13364,9285,39788,46344,39246,41453,46802,98150,109190,114909,110477,95725,70658], -women: [0,0,0,0,402,0,303,0,303,2415,3092,13721,17380,15024,11801] -}, -"Scientist": { -men: [101,101,0,0,101,0,303,1518,0,2012,2787,802,7405,13614,116374], -women: [0,0,0,0,0,0,0,0,0,65,597,301,2142,6180,61293] -}, -"Scientist - Agriculture": { -men: [0,0,0,0,0,0,404,3032,0,5534,8576,12623,21680,28764,24723], -women: [0,0,0,0,0,0,101,505,0,201,997,1305,6944,11230,8867] -}, -"Scientist - Biology": { -men: [0,100,100,199,202,0,1109,3036,0,6498,10164,22333,46475,56200,98754], -women: [0,0,0,0,0,0,707,1517,0,2817,4885,13616,27184,42853,84371] -}, -"Scientist - Geology": { -men: [0,0,101,299,100,0,2014,1515,0,10546,20425,21138,43346,50659,70402], -women: [0,0,0,0,0,0,101,0,0,435,1195,1500,6407,9337,23132] -}, -"Scientist - Physics": { -men: [0,0,0,0,0,0,202,1011,0,6923,13544,21536,31601,37195,29426], -women: [0,0,0,0,0,0,0,0,0,636,499,1301,1800,5253,3888] -}, -"Scientist - Social": { -men: [0,0,0,0,302,0,302,505,0,2784,2489,10112,19772,28226,21044], -women: [0,0,0,0,0,0,0,0,0,1187,1195,5808,17494,31972,22081] -}, -"Secretary": { -men: [0,0,202,1199,31973,48107,62172,92012,84828,89660,91039,166371,97205,125895,191588], -women: [0,0,0,0,93152,261962,606354,980734,1100500,1574256,3861587,5795976,6002545,5743406,4829263] -}, -"Security Guard": { -men: [3134,5921,13271,22650,59778,80602,127651,150635,236592,261719,352263,403058,720590,1009311,1212189], -women: [0,302,0,198,905,1007,1412,1012,3536,5407,16836,23846,124913,217882,376663] -}, -"Service Attendant": { -men: [0,100,200,2091,2613,15874,5246,5054,17126,19180,29596,57294,137592,172544,211791], -women: [0,601,6331,8885,5227,9826,7167,14156,25520,37959,95145,327779,1001088,1490132,1948587] -}, -"Service Worker": { -men: [2324,401,2512,13370,15770,17630,61340,95556,161281,254527,337750,1009079,726901,879740,627109], -women: [0,2005,6030,3991,37766,1260,110919,162783,195557,339275,782462,1739908,952071,1031602,446730] -}, -"Serviceman": { -men: [0,0,101,1197,17088,24432,57005,103125,114467,213453,283614,407903,412263,372866,536422], -women: [0,0,0,0,101,504,909,505,1871,5900,6880,15325,39367,39196,52984] -}, -"Sheriff / Bailiff": { -men: [1718,2913,3321,7084,8546,10833,9679,18197,14692,18768,28402,37065,60663,108736,8228], -women: [0,0,0,0,0,0,201,0,404,1147,1594,2502,9769,25739,3574] -}, -"Ship Officers": { -men: [7781,15656,15980,17955,26327,24683,43997,36906,34287,45197,45128,28364,48159,49256,43594], -women: [0,0,0,0,302,0,202,0,303,5697,199,1003,1322,1940,1504] -}, -"Shipping and Receiving": { -men: [303,100,1204,7481,37391,76329,122796,172885,230332,287314,296519,409220,593776,678335,584615], -women: [0,0,0,0,1103,1512,5047,2022,17449,18829,39555,94357,187654,294791,254624] -}, -"Shoemaker": { -men: [139284,154840,111359,107911,103413,65241,69127,64211,68516,56070,40653,85438,120915,145321,282385], -women: [101,804,302,199,5427,252,3331,4046,764,1432,1492,12019,15429,14360,14101] -}, -"Social Worker": { -men: [0,0,0,0,1510,504,9488,12641,29975,37483,90078,147737,204654,263039,404846], -women: [0,0,0,0,803,0,10699,13648,46434,65279,155991,263309,409918,587375,1023517] -}, -"Sports Instructor / Official": { -men: [0,0,1006,0,6727,0,8069,20225,21582,33262,57567,65403,59219,84565,173041], -women: [0,0,0,0,602,0,1614,0,5037,11964,41355,43071,23814,34696,90745] -}, -"Stationary Engineer": { -men: [10304,21783,27547,62034,156714,225712,206553,208276,201613,228473,314408,201808,182504,243935,213589], -women: [101,101,0,100,202,755,404,2023,1379,1732,2889,3004,6103,12680,9471] -}, -"Statistician / Actuary": { -men: [0,0,0,0,202,0,2018,3537,0,15850,15446,17925,25151,30736,33042], -women: [0,0,0,0,0,0,605,2528,0,8274,10469,17530,20670,25831,23370] -}, -"Stock Broker": { -men: [101,0,0,597,100,16374,16956,41456,21300,11770,33367,97647,115757,231013,467290], -women: [0,0,0,0,0,0,403,1517,3484,2603,2392,12318,27833,94937,235499] -}, -"Stone Cutter": { -men: [11323,15541,19486,29221,43720,32995,21792,21734,20082,11725,6378,7016,0,0,0], -women: [0,0,0,0,100,0,202,0,1978,219,399,801,0,0,0] -}, -"Street Car Conductor": { -men: [0,300,2813,1698,21815,61212,59636,39428,17030,12833,5974,12222,0,0,0], -women: [0,0,0,0,0,0,202,0,101,0,99,301,0,0,0] -}, -"Surveyor": { -men: [1314,2606,2713,3789,5323,0,9684,14157,18349,24636,51674,70528,91629,106192,118867], -women: [0,0,0,100,0,0,0,0,1098,2892,5078,5608,9826,14333,17314] -}, -"Tailor": { -men: [55694,64025,57391,79299,136114,156426,175990,165822,102822,83604,42928,56304,43507,36681,0], -women: [1517,38441,31066,43974,49576,44844,37442,29321,16548,24368,12553,37364,34396,37225,0] -}, -"Taxi Cab Driver / Chauffeur": { -men: [1212,8330,13171,6883,54585,81605,163471,245170,0,210517,182830,183626,202071,221055,294801], -women: [0,0,0,99,200,252,1110,2529,0,2306,7277,13222,29521,30311,48088] -}, -"Teacher": { -men: [30418,45663,44313,74988,111956,122676,120384,189588,273015,296407,510329,950391,1271710,1343051,1402235], -women: [2728,68141,89459,155996,328340,501770,619195,765334,808035,864419,1680774,2725497,3208473,3902382,4460616] -}, -"Teamster": { -men: [0,0,0,0,0,0,288481,106152,29961,25025,25494,11323,0,0,0], -women: [0,0,0,0,0,0,1616,0,404,511,100,801,0,0,0] -}, -"Technician": { -men: [0,0,101,0,703,0,1212,2023,7420,27935,96121,160324,248394,365240,431203], -women: [0,0,0,0,0,0,100,0,1201,3687,6772,15023,37006,65100,117728] -}, -"Technician - Medical / Dental": { -men: [0,0,0,0,0,0,3530,10614,0,36735,59266,107186,197649,296690,460297], -women: [0,0,0,0,0,0,1311,3539,0,46337,137864,255735,487792,833104,1064460] -}, -"Technician - Testing": { -men: [0,0,101,0,803,0,4946,9603,43733,63429,235487,313412,679611,806222,242234], -women: [0,0,0,0,603,0,2018,5054,21121,21443,66442,89253,282257,358804,148853] -}, -"Telegraph Messenger": { -men: [101,0,601,1497,4122,6801,8784,12129,15456,8459,5382,2505,0,0,0], -women: [0,0,0,0,0,504,303,1516,179,499,896,301,0,0,0] -}, -"Telegraph Operator": { -men: [505,1403,6639,16164,42897,61714,63275,55610,43794,29863,18035,13520,5545,0,0], -women: [0,0,502,999,5528,6803,15944,12130,11584,6225,9559,5107,3804,0,0] -}, -"Telephone Operator": { -men: [0,0,0,1097,6126,9573,11407,13651,13047,28994,17446,30156,79779,36678,32532], -women: [0,0,0,100,17985,86153,179937,229503,191238,360778,652281,635165,389159,269331,189007] -}, -"Temperer": { -men: [0,0,202,398,1105,1007,3735,3033,13475,17479,21626,22225,27475,20928,14405], -women: [0,0,0,100,0,252,0,0,391,167,699,1003,1881,1310,1677] -}, -"Textile Spinner": { -men: [4955,6524,3412,1495,29336,26445,31896,32354,0,19327,13945,0,0,0,0], -women: [606,5118,1006,1292,32956,46599,55605,65222,0,63813,69634,0,0,0,0] -}, -"Therapist": { -men: [0,401,805,700,2011,2517,3127,6069,12063,11852,17043,36159,64399,89015,127400], -women: [0,0,100,0,1706,5036,3231,4046,9081,13497,30066,70219,168127,284654,423125] -}, -"Ticket Agent": { -men: [1314,4718,9655,20852,36377,28718,51963,55611,41637,53053,67749,68007,47751,88051,104583], -women: [0,0,100,399,404,1259,1716,506,2121,7253,25404,51088,66826,221236,307394] -}, -"Tool Maker": { -men: [505,301,804,1097,7140,11840,61051,101109,96279,161693,205485,214270,208764,164984,138638], -women: [0,0,0,0,0,252,303,0,101,401,2486,5308,4680,4571,4739] -}, -"Truck / Tractor Driver": { -men: [31753,63194,118214,157797,435202,430738,296383,752249,1314002,1406612,1787785,1582606,2084404,3150279,3681627], -women: [202,200,100,199,1704,2268,2120,2023,9254,5306,11548,28240,60371,233616,255543] -}, -"Typesetter": { -men: [16068,21878,31352,56060,104848,119412,138562,200197,170993,172748,181010,150058,38944,27338,51064], -women: [101,100,1108,2193,12370,12090,11095,13145,12657,11801,25304,38163,47775,59642,48722] -}, -"Union Official": { -men: [0,0,0,897,2111,4535,8777,8593,20236,22634,31957,49489,0,0,0], -women: [0,0,0,200,504,1511,1615,0,2802,2839,5282,11723,0,0,0] -}, -"Upholsterer": { -men: [2425,2406,3415,8976,20400,17134,21188,39935,39026,62230,58277,66008,62601,65890,57883], -women: [0,202,201,500,806,1511,808,4548,2222,4590,9070,16631,19717,21674,17947] -}, -"Usher": { -men: [0,100,0,0,403,0,2317,7078,17957,17200,15142,20237,23617,30728,58147], -women: [0,0,0,0,0,0,2925,6069,4500,9367,10360,8512,13330,15375,26527] -}, -"Veterinarian": { -men: [0,101,905,2894,6837,12344,14934,12131,11029,15063,17730,17025,32252,38495,39184], -women: [0,0,0,0,0,0,202,0,606,2701,598,1401,5206,14634,25883] -}, -"Waiter / Waitress": { -men: [7184,7926,18090,27544,63437,119657,109513,154184,205614,129961,151423,178989,227767,356754,595509], -women: [202,705,7343,7381,43520,92691,104857,185034,412143,610478,1661504,1932298,2063563,1690717,1843769] -}, -"Weaver": { -men: [15970,14346,11651,16657,97151,111082,102615,96063,0,64570,46228,28449,31842,24244,17800], -women: [909,27189,9755,11071,96654,99753,87387,62189,0,43353,42041,41582,61698,49668,32015] -}, -"Welder": { -men: [101,200,300,198,904,0,25637,61167,134709,281806,399733,576267,821710,700666,727405], -women: [0,0,0,0,0,0,606,1011,2323,10209,28594,48083,57920,36224,63197] -} -}; diff --git a/lib/protovis/examples/jquery-1.4.2.min.js b/lib/protovis/examples/jquery-1.4.2.min.js deleted file mode 100644 index 7c243080..00000000 --- a/lib/protovis/examples/jquery-1.4.2.min.js +++ /dev/null @@ -1,154 +0,0 @@ -/*! - * jQuery JavaScript Library v1.4.2 - * http://jquery.com/ - * - * Copyright 2010, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2010, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Sat Feb 13 22:33:48 2010 -0500 - */ -(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, -Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& -(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, -a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== -"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, -function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a"; -var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, -parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= -false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= -s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, -applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; -else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, -a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== -w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, -cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= -c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); -a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, -function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); -k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), -C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= -e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& -f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; -if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", -e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, -"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, -d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, -e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); -t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| -g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, -CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, -g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, -text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, -setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= -h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== -"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, -h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& -q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; -if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); -(function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: -function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= -{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== -"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", -d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? -a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== -1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= -c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, -wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, -prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, -this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); -return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, -""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); -return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", -""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= -c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? -c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= -function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= -Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, -"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= -a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= -a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!== -"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, -serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), -function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, -global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& -e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? -"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== -false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= -false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", -c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| -d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x); -g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== -1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== -"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; -if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== -"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| -c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; -this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= -this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, -e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
"; -a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); -c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, -d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- -f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": -"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in -e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/lib/protovis/examples/nba/nba.html b/lib/protovis/examples/nba/nba.html deleted file mode 100644 index 078149f2..00000000 --- a/lib/protovis/examples/nba/nba.html +++ /dev/null @@ -1,85 +0,0 @@ - - - NBA per game performance of top 50 scorers - - - - - -

NBA per game performance of top 50 scorers

- 2008-2009 season

- -

- Source: FlowingData
- Implementation: Protovis -
- - diff --git a/lib/protovis/examples/nba/nba.js b/lib/protovis/examples/nba/nba.js deleted file mode 100644 index 7334a1c3..00000000 --- a/lib/protovis/examples/nba/nba.js +++ /dev/null @@ -1,53 +0,0 @@ -var nba = [ -["Name","G","MIN","PTS","FGM","FGA","FGP","FTM","FTA","FTP","3PM","3PA","3PP","ORB","DRB","TRB","AST","STL","BLK","TO","PF"], -["Dwyane Wade",79,38.6,30.2,10.8,22,0.491,7.5,9.8,0.765,1.1,3.5,0.317,1.1,3.9,5,7.5,2.2,1.3,3.4,2.3], -["LeBron James",81,37.7,28.4,9.7,19.9,0.489,7.3,9.4,0.78,1.6,4.7,0.344,1.3,6.3,7.6,7.2,1.7,1.1,3,1.7], -["Kobe Bryant",82,36.2,26.8,9.8,20.9,0.467,5.9,6.9,0.856,1.4,4.1,0.351,1.1,4.1,5.2,4.9,1.5,0.5,2.6,2.3], -["Dirk Nowitzki",81,37.7,25.9,9.6,20,0.479,6,6.7,0.89,0.8,2.1,0.359,1.1,7.3,8.4,2.4,0.8,0.8,1.9,2.2], -["Danny Granger",67,36.2,25.8,8.5,19.1,0.447,6,6.9,0.878,2.7,6.7,0.404,0.7,4.4,5.1,2.7,1,1.4,2.5,3.1], -["Kevin Durant",74,39,25.3,8.9,18.8,0.476,6.1,7.1,0.863,1.3,3.1,0.422,1,5.5,6.5,2.8,1.3,0.7,3,1.8], -["Kevin Martin",51,38.2,24.6,6.7,15.9,0.42,9,10.3,0.867,2.3,5.4,0.415,0.6,3,3.6,2.7,1.2,0.2,2.9,2.3], -["Al Jefferson",50,36.6,23.1,9.7,19.5,0.497,3.7,5,0.738,0,0.1,0,3.4,7.5,11,1.6,0.8,1.7,1.8,2.8], -["Chris Paul",78,38.5,22.8,8.1,16.1,0.503,5.8,6.7,0.868,0.8,2.3,0.364,0.9,4.7,5.5,11,2.8,0.1,3,2.7], -["Carmelo Anthony",66,34.5,22.8,8.1,18.3,0.443,5.6,7.1,0.793,1,2.6,0.371,1.6,5.2,6.8,3.4,1.1,0.4,3,3], -["Chris Bosh",77,38.1,22.7,8,16.4,0.487,6.5,8,0.817,0.2,0.6,0.245,2.8,7.2,10,2.5,0.9,1,2.3,2.5], -["Brandon Roy",78,37.2,22.6,8.1,16.9,0.48,5.3,6.5,0.824,1.1,2.8,0.377,1.3,3.4,4.7,5.1,1.1,0.3,1.9,1.6], -["Antawn Jamison",81,38.2,22.2,8.3,17.8,0.468,4.2,5.6,0.754,1.4,3.9,0.351,2.4,6.5,8.9,1.9,1.2,0.3,1.5,2.7], -["Tony Parker",72,34.1,22,8.9,17.5,0.506,3.9,5,0.782,0.3,0.9,0.292,0.4,2.7,3.1,6.9,0.9,0.1,2.6,1.5], -["Amare Stoudemire",53,36.8,21.4,7.6,14.1,0.539,6.1,7.3,0.835,0.1,0.1,0.429,2.2,5.9,8.1,2,0.9,1.1,2.8,3.1], -["Joe Johnson",79,39.5,21.4,7.8,18,0.437,3.8,4.6,0.826,1.9,5.2,0.36,0.8,3.6,4.4,5.8,1.1,0.2,2.5,2.2], -["Devin Harris",69,36.1,21.3,6.6,15.1,0.438,7.2,8.8,0.82,0.9,3.2,0.291,0.4,2.9,3.3,6.9,1.7,0.2,3.1,2.4], -["Michael Redd",33,36.4,21.2,7.5,16.6,0.455,4,4.9,0.814,2.1,5.8,0.366,0.7,2.5,3.2,2.7,1.1,0.1,1.6,1.4], -["David West",76,39.3,21,8,17,0.472,4.8,5.5,0.884,0.1,0.3,0.24,2.1,6.4,8.5,2.3,0.6,0.9,2.1,2.7], -["Zachary Randolph",50,35.1,20.8,8.3,17.5,0.475,3.6,4.9,0.734,0.6,1.9,0.33,3.1,6.9,10.1,2.1,0.9,0.3,2.3,2.7], -["Caron Butler",67,38.6,20.8,7.3,16.2,0.453,5.1,6,0.858,1,3.1,0.31,1.8,4.4,6.2,4.3,1.6,0.3,3.1,2.5], -["Vince Carter",80,36.8,20.8,7.4,16.8,0.437,4.2,5.1,0.817,1.9,4.9,0.385,0.9,4.2,5.1,4.7,1,0.5,2.1,2.9], -["Stephen Jackson",59,39.7,20.7,7,16.9,0.414,5,6,0.826,1.7,5.2,0.338,1.2,3.9,5.1,6.5,1.5,0.5,3.9,2.6], -["Ben Gordon",82,36.6,20.7,7.3,16,0.455,4,4.7,0.864,2.1,5.1,0.41,0.6,2.8,3.5,3.4,0.9,0.3,2.4,2.2], -["Dwight Howard",79,35.7,20.6,7.1,12.4,0.572,6.4,10.7,0.594,0,0,0,4.3,9.6,13.8,1.4,1,2.9,3,3.4], -["Paul Pierce",81,37.4,20.5,6.7,14.6,0.457,5.7,6.8,0.83,1.5,3.8,0.391,0.7,5,5.6,3.6,1,0.3,2.8,2.7], -["Al Harrington",73,34.9,20.1,7.3,16.6,0.439,3.2,4,0.793,2.3,6.4,0.364,1.4,4.9,6.2,1.4,1.2,0.3,2.2,3.1], -["Jamal Crawford",65,38.1,19.7,6.4,15.7,0.41,4.6,5.3,0.872,2.2,6.1,0.36,0.4,2.6,3,4.4,0.9,0.2,2.3,1.4], -["Yao Ming",77,33.6,19.7,7.4,13.4,0.548,4.9,5.7,0.866,0,0,1,2.6,7.2,9.9,1.8,0.4,1.9,3,3.3], -["Richard Jefferson",82,35.9,19.6,6.5,14.9,0.439,5.1,6.3,0.805,1.4,3.6,0.397,0.7,3.9,4.6,2.4,0.8,0.2,2,3.1], -["Jason Terry",74,33.6,19.6,7.3,15.8,0.463,2.7,3,0.88,2.3,6.2,0.366,0.5,1.9,2.4,3.4,1.3,0.3,1.6,1.9], -["Deron Williams",68,36.9,19.4,6.8,14.5,0.471,4.8,5.6,0.849,1,3.3,0.31,0.4,2.5,2.9,10.7,1.1,0.3,3.4,2], -["Tim Duncan",75,33.7,19.3,7.4,14.8,0.504,4.5,6.4,0.692,0,0,0,2.7,8,10.7,3.5,0.5,1.7,2.2,2.3], -["Monta Ellis",25,35.6,19,7.8,17.2,0.451,3.1,3.8,0.83,0.3,1,0.308,0.6,3.8,4.3,3.7,1.6,0.3,2.7,2.7], -["Rudy Gay",79,37.3,18.9,7.2,16,0.453,3.3,4.4,0.767,1.1,3.1,0.351,1.4,4.2,5.5,1.7,1.2,0.7,2.6,2.8], -["Pau Gasol",81,37.1,18.9,7.3,12.9,0.567,4.2,5.4,0.781,0,0,0.5,3.2,6.4,9.6,3.5,0.6,1,1.9,2.1], -["Andre Iguodala",82,39.8,18.8,6.6,14,0.473,4.6,6.4,0.724,1,3.2,0.307,1.1,4.6,5.7,5.3,1.6,0.4,2.7,1.9], -["Corey Maggette",51,31.1,18.6,5.7,12.4,0.461,6.7,8.1,0.824,0.5,1.9,0.253,1,4.6,5.5,1.8,0.9,0.2,2.4,3.8], -["O.J. Mayo",82,38,18.5,6.9,15.6,0.438,3,3.4,0.879,1.8,4.6,0.384,0.7,3.1,3.8,3.2,1.1,0.2,2.8,2.5], -["John Salmons",79,37.5,18.3,6.5,13.8,0.472,3.6,4.4,0.83,1.6,3.8,0.417,0.7,3.5,4.2,3.2,1.1,0.3,2.1,2.3], -["Richard Hamilton",67,34,18.3,7,15.6,0.447,3.3,3.9,0.848,1,2.8,0.368,0.7,2.4,3.1,4.4,0.6,0.1,2,2.6], -["Ray Allen",79,36.3,18.2,6.3,13.2,0.48,3,3.2,0.952,2.5,6.2,0.409,0.8,2.7,3.5,2.8,0.9,0.2,1.7,2], -["LaMarcus Aldridge",81,37.1,18.1,7.4,15.3,0.484,3.2,4.1,0.781,0.1,0.3,0.25,2.9,4.6,7.5,1.9,1,1,1.5,2.6], -["Josh Howard",52,31.9,18,6.8,15.1,0.451,3.3,4.2,0.782,1.1,3.2,0.345,1.1,3.9,5.1,1.6,1.1,0.6,1.7,2.6], -["Maurice Williams",81,35,17.8,6.5,13.9,0.467,2.6,2.8,0.912,2.3,5.2,0.436,0.6,2.9,3.4,4.1,0.9,0.1,2.2,2.7], -["Shaquille O'neal",75,30.1,17.8,6.8,11.2,0.609,4.1,6.9,0.595,0,0,0,2.5,5.9,8.4,1.7,0.7,1.4,2.2,3.4], -["Rashard Lewis",79,36.2,17.7,6.1,13.8,0.439,2.8,3.4,0.836,2.8,7,0.397,1.2,4.6,5.7,2.6,1,0.6,2,2.5], -["Chauncey Billups",79,35.3,17.7,5.2,12.4,0.418,5.3,5.8,0.913,2.1,5,0.408,0.4,2.6,3,6.4,1.2,0.2,2.2,2], -["Allen Iverson",57,36.7,17.5,6.1,14.6,0.417,4.8,6.1,0.781,0.5,1.7,0.283,0.5,2.5,3,5,1.5,0.1,2.6,1.5], -["Nate Robinson",74,29.9,17.2,6.1,13.9,0.437,3.4,4,0.841,1.7,5.2,0.325,1.3,2.6,3.9,4.1,1.3,0.1,1.9,2.8] -]; diff --git a/lib/protovis/examples/nba/nba2.html b/lib/protovis/examples/nba/nba2.html deleted file mode 100644 index 4988b7be..00000000 --- a/lib/protovis/examples/nba/nba2.html +++ /dev/null @@ -1,84 +0,0 @@ - - - NBA per game performance of top 50 scorers - - - - - -

NBA per game performance of top 50 scorers

- 2008-2009 season

- -

- Source: FlowingData
- Implementation: Protovis -
- - diff --git a/lib/protovis/examples/sankey/gdp2009.js b/lib/protovis/examples/sankey/gdp2009.js deleted file mode 100644 index d7a22623..00000000 --- a/lib/protovis/examples/sankey/gdp2009.js +++ /dev/null @@ -1,184 +0,0 @@ -var gdp2009 = [ - {name:"United States", gdp:14256275}, - {name:"Japan", gdp:5068059}, - {name:"China", gdp:4908982}, - {name:"Germany", gdp:3352742}, - {name:"France", gdp:2675951}, - {name:"United Kingdom", gdp:2183607}, - {name:"Italy", gdp:2118264}, - {name:"Brazil", gdp:1574039}, - {name:"Spain", gdp:1464040}, - {name:"Canada", gdp:1336427}, - {name:"India", gdp:1235975}, - {name:"Russia", gdp:1229227}, - {name:"Australia", gdp:997201}, - {name:"Mexico", gdp:874903}, - {name:"South Korea", gdp:832512}, - {name:"Netherlands", gdp:794777}, - {name:"Turkey", gdp:615329}, - {name:"Indonesia", gdp:539377}, - {name:"Switzerland", gdp:494622}, - {name:"Belgium", gdp:470400}, - {name:"Poland", gdp:430197}, - {name:"Sweden", gdp:405440}, - {name:"Norway", gdp:382983}, - {name:"Austria", gdp:381880}, - {name:"Republic of China (Taiwan)", gdp:378969}, - {name:"Saudi Arabia", gdp:369671}, - {name:"Venezuela", gdp:337295}, - {name:"Greece", gdp:330780}, - {name:"Iran", gdp:330461}, - {name:"Argentina", gdp:310065}, - {name:"Denmark", gdp:309252}, - {name:"South Africa", gdp:287219}, - {name:"Thailand", gdp:263889}, - {name:"Finland", gdp:238128}, - {name:"United Arab Emirates", gdp:229971}, - {name:"Colombia", gdp:228836}, - {name:"Portugal", gdp:227855}, - {name:"Ireland", gdp:227781}, - {name:"Hong Kong", gdp:210731}, - {name:"Czech Republic", gdp:194828}, - {name:"Israel", gdp:194825}, - {name:"Malaysia", gdp:191463}, - {name:"Egypt", gdp:187954}, - {name:"Singapore", gdp:177132}, - {name:"Nigeria", gdp:173428}, - {name:"Pakistan", gdp:166515}, - {name:"Chile", gdp:161781}, - {name:"Romania", gdp:161521}, - {name:"Philippines", gdp:160991}, - {name:"Algeria", gdp:140848}, - {name:"Hungary", gdp:129407}, - {name:"Peru", gdp:126766}, - {name:"New Zealand", gdp:117795}, - {name:"Ukraine", gdp:116191}, - {name:"Kuwait", gdp:111309}, - {name:"Kazakhstan", gdp:109273}, - {name:"Bangladesh", gdp:94507}, - {name:"Vietnam", gdp:92439}, - {name:"Morocco", gdp:90815}, - {name:"Slovakia", gdp:88208}, - {name:"Qatar", gdp:83910}, - {name:"Angola", gdp:68755}, - {name:"Iraq", gdp:65838}, - {name:"Croatia", gdp:63188}, - {name:"Libya", gdp:60351}, - {name:"Ecuador", gdp:57303}, - {name:"Sudan", gdp:54677}, - {name:"Oman", gdp:53395}, - {name:"Syria", gdp:52524}, - {name:"Luxembourg", gdp:51736}, - {name:"Slovenia", gdp:49217}, - {name:"Belarus", gdp:48973}, - {name:"Bulgaria", gdp:47102}, - {name:"Dominican Republic", gdp:46743}, - {name:"Azerbaijan", gdp:43111}, - {name:"Serbia", gdp:42879}, - {name:"Sri Lanka", gdp:41323}, - {name:"Tunisia", gdp:40168}, - {name:"Guatemala", gdp:37302}, - {name:"Lithuania", gdp:37254}, - {name:"Lebanon", gdp:33585}, - {name:"Uzbekistan", gdp:32816}, - {name:"Kenya", gdp:32724}, - {name:"Ethiopia", gdp:32319}, - {name:"Uruguay", gdp:31528}, - {name:"Costa Rica", gdp:29318}, - {name:"Burma", gdp:27553}, - {name:"Latvia", gdp:26247}, - {name:"Yemen", gdp:25131}, - {name:"Panama", gdp:24711}, - {name:"Cyprus", gdp:23603}, - {name:"Jordan", gdp:22929}, - {name:"Cte d'Ivoire", gdp:22497}, - {name:"Tanzania", gdp:22318}, - {name:"Cameroon", gdp:22223}, - {name:"El Salvador", gdp:21100}, - {name:"Trinidad and Tobago", gdp:20380}, - {name:"Bahrain", gdp:20214}, - {name:"Estonia", gdp:19123}, - {name:"Bolivia", gdp:17627}, - {name:"Bosnia and Herzegovina", gdp:17133}, - {name:"Uganda", gdp:15736}, - {name:"Ghana", gdp:15513}, - {name:"Paraguay", gdp:14668}, - {name:"Honduras", gdp:14268}, - {name:"Afghanistan", gdp:14044}, - {name:"Zambia", gdp:13000}, - {name:"Senegal", gdp:12738}, - {name:"Nepal", gdp:12615}, - {name:"Equatorial Guinea", gdp:12222}, - {name:"Albania", gdp:12185}, - {name:"Iceland", gdp:12133}, - {name:"Jamaica", gdp:11903}, - {name:"Botswana", gdp:11630}, - {name:"Democratic Republic of the Congo", gdp:11108}, - {name:"Gabon", gdp:11016}, - {name:"Cambodia", gdp:10804}, - {name:"Georgia", gdp:10737}, - {name:"Brunei", gdp:10546}, - {name:"Mozambique", gdp:9831}, - {name:"Republic of the Congo", gdp:9532}, - {name:"Namibia", gdp:9459}, - {name:"Macedonia", gdp:9238}, - {name:"Mali", gdp:8965}, - {name:"Mauritius", gdp:8761}, - {name:"Armenia", gdp:8714}, - {name:"Madagascar", gdp:8551}, - {name:"Burkina Faso", gdp:8105}, - {name:"Malta", gdp:7955}, - {name:"Papua New Guinea", gdp:7907}, - {name:"The Bahamas", gdp:7335}, - {name:"Chad", gdp:6854}, - {name:"Benin", gdp:6672}, - {name:"Haiti", gdp:6558}, - {name:"Nicaragua", gdp:6151}, - {name:"Laos", gdp:5598}, - {name:"Moldova", gdp:5403}, - {name:"Kosovo", gdp:5352}, - {name:"Niger", gdp:5261}, - {name:"Rwanda", gdp:5245}, - {name:"Tajikistan", gdp:4982}, - {name:"Kyrgyzstan", gdp:4570}, - {name:"Malawi", gdp:4570}, - {name:"Zimbabwe", gdp:4397}, - {name:"Guinea", gdp:4394}, - {name:"Mongolia", gdp:4203}, - {name:"Montenegro", gdp:4114}, - {name:"Barbados", gdp:3595}, - {name:"Fiji", gdp:3060}, - {name:"Mauritania", gdp:3029}, - {name:"Swaziland", gdp:2983}, - {name:"Suriname", gdp:2962}, - {name:"Togo", gdp:2865}, - {name:"Guyana", gdp:2024}, - {name:"Central African Republic", gdp:1986}, - {name:"Sierra Leone", gdp:1877}, - {name:"Eritrea", gdp:1873}, - {name:"Cape Verde", gdp:1768}, - {name:"Lesotho", gdp:1602}, - {name:"Maldives", gdp:1357}, - {name:"Belize", gdp:1336}, - {name:"Burundi", gdp:1321}, - {name:"Bhutan", gdp:1269}, - {name:"Antigua and Barbuda", gdp:1178}, - {name:"Djibouti", gdp:1049}, - {name:"Saint Lucia", gdp:973}, - {name:"Liberia", gdp:876}, - {name:"Guinea-Bissau", gdp:826}, - {name:"Seychelles", gdp:767}, - {name:"The Gambia", gdp:736}, - {name:"Solomon Islands", gdp:657}, - {name:"Vanuatu", gdp:635}, - {name:"Grenada", gdp:615}, - {name:"East Timor", gdp:590}, - {name:"Saint Vincent and the Grenadines", gdp:567}, - {name:"Samoa", gdp:558}, - {name:"Saint Kitts and Nevis", gdp:557}, - {name:"Comoros", gdp:532}, - {name:"Dominica", gdp:362}, - {name:"Tonga", gdp:313}, - {name:"So Tom and Prncipe", gdp:191}, - {name:"Kiribati", gdp:130}, -]; \ No newline at end of file diff --git a/lib/protovis/examples/sankey/sankey.html b/lib/protovis/examples/sankey/sankey.html deleted file mode 100644 index 70b705d3..00000000 --- a/lib/protovis/examples/sankey/sankey.html +++ /dev/null @@ -1,77 +0,0 @@ - - - GDP of the World - - - - - - - diff --git a/lib/protovis/examples/slider/cell.html b/lib/protovis/examples/slider/cell.html deleted file mode 100644 index 6b850942..00000000 --- a/lib/protovis/examples/slider/cell.html +++ /dev/null @@ -1,112 +0,0 @@ - - - Automaton Explorer - - - - - - - - - -

Automaton Explorer

-
- rule: 30 - - start: - - - - -

- - -

From MathWorld: - "A cellular automaton is a collection of 'colored' cells on a grid of - specified shape that evolves through a number of discrete time steps - according to a set of rules based on the states of neighboring cells." This - example explores binary, nearest-neighbor, one-dimensional automata, of - which there are 256 (28) possible rules. The eight possible - outcomes for the current rule are shown across the top; click to toggle the - selected bit. - - - diff --git a/lib/protovis/examples/slider/cell.js b/lib/protovis/examples/slider/cell.js deleted file mode 100644 index 051b4e18..00000000 --- a/lib/protovis/examples/slider/cell.js +++ /dev/null @@ -1,31 +0,0 @@ -/** Depends on globals: rule, w, h, mode. */ -function cell() { - var d = pv.range(h).map(function() { - return pv.range(w).map(function() { return 0; }); - }), - r = pv.range(8).map(function(i) { - return rule >> i & 1; - }); - if (start == "point") { - d[0][w >> 1] = 1; - } else { - for (var x = 0; x < w; x++) { - d[0][x] = cell.random(x); - } - } - for (var y = 1; y < h; y++) { - var p = d[y - 1], c = d[y]; - for (var x = 0; x < w; x++) { - c[x] = r[p[x - 1] << 2 | p[x] << 1 | p[x + 1]]; - } - } - return d; -} - -cell.$random = {}; - -/** Caches random output to make exploration deterministic. */ -cell.random = function(i) { - return i in cell.$random ? cell.$random[i] - : (cell.$random[i] = Math.random() < .5 ? 0 : 1); -}; diff --git a/lib/protovis/examples/slider/horizon.html b/lib/protovis/examples/slider/horizon.html deleted file mode 100644 index 117a65e4..00000000 --- a/lib/protovis/examples/slider/horizon.html +++ /dev/null @@ -1,85 +0,0 @@ - - - Horizon Explorer - - - - - - - - -

Horizon Explorer

-
- bands: 1 - - mode: - - - - -

- - - diff --git a/lib/protovis/examples/slider/jquery-ui-1.8rc3.custom.min.js b/lib/protovis/examples/slider/jquery-ui-1.8rc3.custom.min.js deleted file mode 100755 index 38f70ae8..00000000 --- a/lib/protovis/examples/slider/jquery-ui-1.8rc3.custom.min.js +++ /dev/null @@ -1,71 +0,0 @@ -/*! - * jQuery UI 1.8rc3 - * - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI - */ /* - * jQuery UI 1.8rc3 - * - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI - */ -jQuery.ui||(function(b){var a=b.browser.mozilla&&(parseFloat(b.browser.version)<1.9);b.ui={version:"1.8rc3",plugin:{add:function(d,e,g){var f=b.ui[d].prototype;for(var c in g){f.plugins[c]=f.plugins[c]||[];f.plugins[c].push([e,g[c]])}},call:function(c,e,d){var g=c.plugins[e];if(!g||!c.element[0].parentNode){return}for(var f=0;f0){return true}f[c]=1;e=(f[c]>0);f[c]=0;return e},isOverAxis:function(d,c,e){return(d>c)&&(d<(c+e))},isOver:function(h,d,g,f,c,e){return b.ui.isOverAxis(h,g,c)&&b.ui.isOverAxis(d,f,e)},keyCode:{BACKSPACE:8,CAPS_LOCK:20,COMMA:188,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38}};b.fn.extend({_focus:b.fn.focus,focus:function(c,d){return typeof c==="number"?this.each(function(){var e=this;setTimeout(function(){b(e).focus();(d&&d.call(e))},c)}):this._focus.apply(this,arguments)},enableSelection:function(){return this.attr("unselectable","off").css("MozUserSelect","").unbind("selectstart.ui")},disableSelection:function(){return this.attr("unselectable","on").css("MozUserSelect","none").bind("selectstart.ui",function(){return false})},scrollParent:function(){var c;if((b.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){c=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(b.curCSS(this,"position",1))&&(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}else{c=this.parents().filter(function(){return(/(auto|scroll)/).test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!c.length?b(document):c},zIndex:function(f){if(f!==undefined){return this.css("zIndex",f)}if(this.length){var d=b(this[0]),c,e;while(d.length&&d[0]!==document){c=d.css("position");if(c=="absolute"||c=="relative"||c=="fixed"){e=parseInt(d.css("zIndex"));if(!isNaN(e)&&e!=0){return e}}d=d.parent()}}return 0}});b.extend(b.expr[":"],{data:function(e,d,c){return !!b.data(e,c[3])},focusable:function(d){var e=d.nodeName.toLowerCase(),c=b.attr(d,"tabindex");return(/input|select|textarea|button|object/.test(e)?!d.disabled:"a"==e||"area"==e?d.href||!isNaN(c):!isNaN(c))&&!b(d)["area"==e?"parents":"closest"](":hidden").length},tabbable:function(d){var c=b.attr(d,"tabindex");return(isNaN(c)||c>=0)&&b(d).is(":focusable")}})})(jQuery);;/*! - * jQuery UI Widget 1.8rc3 - * - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI/Widget - */ /* - * jQuery UI Widget 1.8rc3 - * - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI/Widget - */ -(function(b){var a=b.fn.remove;b.fn.remove=function(c,d){return this.each(function(){if(!d){if(!c||b.filter(c,[this]).length){b("*",this).add(this).each(function(){b(this).triggerHandler("remove")})}}return a.call(b(this),c,d)})};b.widget=function(d,f,c){var e=d.split(".")[0],h;d=d.split(".")[1];h=e+"-"+d;if(!c){c=f;f=b.Widget}b.expr[":"][h]=function(i){return !!b.data(i,d)};b[e]=b[e]||{};b[e][d]=function(i,j){if(arguments.length){this._createWidget(i,j)}};var g=new f();g.options=b.extend({},g.options);b[e][d].prototype=b.extend(true,g,{namespace:e,widgetName:d,widgetEventPrefix:b[e][d].prototype.widgetEventPrefix||d,widgetBaseClass:h},c);b.widget.bridge(d,b[e][d])};b.widget.bridge=function(d,c){b.fn[d]=function(g){var e=typeof g==="string",f=Array.prototype.slice.call(arguments,1),h=this;g=!e&&f.length?b.extend.apply(null,[true,g].concat(f)):g;if(e&&g.substring(0,1)==="_"){return h}if(e){this.each(function(){var i=b.data(this,d),j=i&&b.isFunction(i[g])?i[g].apply(i,f):i;if(j!==i&&j!==undefined){h=j;return false}})}else{this.each(function(){var i=b.data(this,d);if(i){if(g){i.option(g)}i._init()}else{b.data(this,d,new c(g,this))}})}return h}};b.Widget=function(c,d){if(arguments.length){this._createWidget(c,d)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(d,e){this.element=b(e).data(this.widgetName,this);this.options=b.extend(true,{},this.options,b.metadata&&b.metadata.get(e)[this.widgetName],d);var c=this;this.element.bind("remove."+this.widgetName,function(){c.destroy()});this._create();this._init()},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled")},widget:function(){return this.element},option:function(e,f){var d=e,c=this;if(arguments.length===0){return b.extend({},c.options)}if(typeof e==="string"){if(f===undefined){return this.options[e]}d={};d[e]=f}b.each(d,function(g,h){c._setOption(g,h)});return c},_setOption:function(c,d){this.options[c]=d;if(c==="disabled"){this.widget()[d?"addClass":"removeClass"](this.widgetBaseClass+"-disabled "+this.namespace+"-state-disabled").attr("aria-disabled",d)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(d,e,f){var h=this.options[d];e=b.Event(e);e.type=(d===this.widgetEventPrefix?d:this.widgetEventPrefix+d).toLowerCase();f=f||{};if(e.originalEvent){for(var c=b.event.props.length,g;c;){g=b.event.props[--c];e[g]=e.originalEvent[g]}}this.element.trigger(e,f);return !(b.isFunction(h)&&h.call(this.element[0],e,f)===false||e.isDefaultPrevented())}}})(jQuery);;/*! - * jQuery UI Mouse 1.8rc3 - * - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI/Mouse - * - * Depends: - * jquery.ui.widget.js - */ /* - * jQuery UI Mouse 1.8rc3 - * - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI/Mouse - * - * Depends: - * jquery.ui.widget.js - */ -(function(a){a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(c){return b._mouseDown(c)}).bind("click."+this.widgetName,function(c){if(b._preventClickEvent){b._preventClickEvent=false;c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(d){d.originalEvent=d.originalEvent||{};if(d.originalEvent.mouseHandled){return}(this._mouseStarted&&this._mouseUp(d));this._mouseDownEvent=d;var c=this,e=(d.which==1),b=(typeof this.options.cancel=="string"?a(d.target).parents().add(d.target).filter(this.options.cancel).length:false);if(!e||b||!this._mouseCapture(d)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(d)!==false);if(!this._mouseStarted){d.preventDefault();return true}}this._mouseMoveDelegate=function(f){return c._mouseMove(f)};this._mouseUpDelegate=function(f){return c._mouseUp(f)};a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);(a.browser.safari||d.preventDefault());d.originalEvent.mouseHandled=true;return true},_mouseMove:function(b){if(a.browser.msie&&!b.button){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,b)!==false);(this._mouseStarted?this._mouseDrag(b):this._mouseUp(b))}return !this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;this._preventClickEvent=(b.target==this._mouseDownEvent.target);this._mouseStop(b)}return false},_mouseDistanceMet:function(b){return(Math.max(Math.abs(this._mouseDownEvent.pageX-b.pageX),Math.abs(this._mouseDownEvent.pageY-b.pageY))>=this.options.distance)},_mouseDelayMet:function(b){return this.mouseDelayMet},_mouseStart:function(b){},_mouseDrag:function(b){},_mouseStop:function(b){},_mouseCapture:function(b){return true}})})(jQuery);;/* - * jQuery UI Slider 1.8rc3 - * - * Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * http://docs.jquery.com/UI/Slider - * - * Depends: - * jquery.ui.core.js - * jquery.ui.mouse.js - * jquery.ui.widget.js - */ (function(b){var a=5;b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var c=this,d=this.options;this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");if(d.disabled){this.element.addClass("ui-slider-disabled ui-disabled")}this.range=b([]);if(d.range){if(d.range===true){this.range=b("

");if(!d.values){d.values=[this._valueMin(),this._valueMin()]}if(d.values.length&&d.values.length!=2){d.values=[d.values[0],d.values[0]]}}else{this.range=b("
")}this.range.appendTo(this.element).addClass("ui-slider-range");if(d.range=="min"||d.range=="max"){this.range.addClass("ui-slider-range-"+d.range)}this.range.addClass("ui-widget-header")}if(b(".ui-slider-handle",this.element).length==0){b('').appendTo(this.element).addClass("ui-slider-handle")}if(d.values&&d.values.length){while(b(".ui-slider-handle",this.element).length').appendTo(this.element).addClass("ui-slider-handle")}}this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(e){e.preventDefault()}).hover(function(){if(!d.disabled){b(this).addClass("ui-state-hover")}},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(!d.disabled){b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}else{b(this).blur()}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(e){b(this).data("index.ui-slider-handle",e)});this.handles.keydown(function(j){var g=true;var f=b(this).data("index.ui-slider-handle");if(c.options.disabled){return}switch(j.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:g=false;if(!c._keySliding){c._keySliding=true;b(this).addClass("ui-state-active");c._start(j,f)}break}var h,e,i=c._step();if(c.options.values&&c.options.values.length){h=e=c.values(f)}else{h=e=c.value()}switch(j.keyCode){case b.ui.keyCode.HOME:e=c._valueMin();break;case b.ui.keyCode.END:e=c._valueMax();break;case b.ui.keyCode.PAGE_UP:e=h+((c._valueMax()-c._valueMin())/a);break;case b.ui.keyCode.PAGE_DOWN:e=h-((c._valueMax()-c._valueMin())/a);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(h==c._valueMax()){return}e=h+i;break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(h==c._valueMin()){return}e=h-i;break}c._slide(j,f,e);return g}).keyup(function(f){var e=b(this).data("index.ui-slider-handle");if(c._keySliding){c._stop(f,e);c._change(f,e);c._keySliding=false;b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy();return this},_mouseCapture:function(e){var f=this.options;if(f.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();var i={x:e.pageX,y:e.pageY};var k=this._normValueFromMouse(i);var d=this._valueMax()-this._valueMin()+1,g;var l=this,j;this.handles.each(function(m){var n=Math.abs(k-l.values(m));if(d>n){d=n;g=b(this);j=m}});if(f.range==true&&this.values(1)==f.min){g=b(this.handles[++j])}this._start(e,j);this._mouseSliding=true;l._handleIndex=j;g.addClass("ui-state-active").focus();var h=g.offset();var c=!b(e.target).parents().andSelf().is(".ui-slider-handle");this._clickOffset=c?{left:0,top:0}:{left:e.pageX-h.left-(g.width()/2),top:e.pageY-h.top-(g.height()/2)-(parseInt(g.css("borderTopWidth"),10)||0)-(parseInt(g.css("borderBottomWidth"),10)||0)+(parseInt(g.css("marginTop"),10)||0)};k=this._normValueFromMouse(i);this._slide(e,j,k);this._animateOff=true;return true},_mouseStart:function(c){return true},_mouseDrag:function(e){var c={x:e.pageX,y:e.pageY};var d=this._normValueFromMouse(c);this._slide(e,this._handleIndex,d);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=this.options.orientation=="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(e){var d,i;if("horizontal"==this.orientation){d=this.elementSize.width;i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}var g=(i/d);if(g>1){g=1}if(g<0){g=0}if("vertical"==this.orientation){g=1-g}var f=this._valueMax()-this._valueMin(),j=g*f,c=j%this.options.step,h=this._valueMin()+j-c;if(c>(this.options.step/2)){h+=this.options.step}return parseFloat(h.toFixed(5))},_start:function(e,d){var c={handle:this.handles[d],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(d);c.values=this.values()}this._trigger("start",e,c)},_slide:function(g,f,e){var h=this.handles[f];if(this.options.values&&this.options.values.length){var c=this.values(f?0:1);if((this.options.values.length==2&&this.options.range===true)&&((f==0&&e>c)||(f==1&&e1){this.options.values[e]=this._trimValue(h);this._refreshValue();this._change(null,e)}if(arguments.length){if(b.isArray(arguments[0])){var g=this.options.values,d=arguments[0];for(var f=0,c=g.length;fthis._valueMax()){c=this._valueMax()}return c},_valueMin:function(){var c=this.options.min;return c},_valueMax:function(){var c=this.options.max;return c},_refreshValue:function(){var g=this.options.range,e=this.options,m=this;var d=(!this._animateOff)?e.animate:false;if(this.options.values&&this.options.values.length){var j,i;this.handles.each(function(q,o){var p=(m.values(q)-m._valueMin())/(m._valueMax()-m._valueMin())*100;var n={};n[m.orientation=="horizontal"?"left":"bottom"]=p+"%";b(this).stop(1,1)[d?"animate":"css"](n,e.animate);if(m.options.range===true){if(m.orientation=="horizontal"){(q==0)&&m.range.stop(1,1)[d?"animate":"css"]({left:p+"%"},e.animate);(q==1)&&m.range[d?"animate":"css"]({width:(p-lastValPercent)+"%"},{queue:false,duration:e.animate})}else{(q==0)&&m.range.stop(1,1)[d?"animate":"css"]({bottom:(p)+"%"},e.animate);(q==1)&&m.range[d?"animate":"css"]({height:(p-lastValPercent)+"%"},{queue:false,duration:e.animate})}}lastValPercent=p})}else{var k=this.value(),h=this._valueMin(),l=this._valueMax(),f=l!=h?(k-h)/(l-h)*100:0;var c={};c[m.orientation=="horizontal"?"left":"bottom"]=f+"%";this.handle.stop(1,1)[d?"animate":"css"](c,e.animate);(g=="min")&&(this.orientation=="horizontal")&&this.range.stop(1,1)[d?"animate":"css"]({width:f+"%"},e.animate);(g=="max")&&(this.orientation=="horizontal")&&this.range[d?"animate":"css"]({width:(100-f)+"%"},{queue:false,duration:e.animate});(g=="min")&&(this.orientation=="vertical")&&this.range.stop(1,1)[d?"animate":"css"]({height:f+"%"},e.animate);(g=="max")&&(this.orientation=="vertical")&&this.range[d?"animate":"css"]({height:(100-f)+"%"},{queue:false,duration:e.animate})}}});b.extend(b.ui.slider,{version:"1.8rc3"})})(jQuery);; \ No newline at end of file diff --git a/lib/protovis/examples/slider/slider.html b/lib/protovis/examples/slider/slider.html deleted file mode 100644 index 16916a64..00000000 --- a/lib/protovis/examples/slider/slider.html +++ /dev/null @@ -1,50 +0,0 @@ - - - Slider - - - - - - - - -
-
-
- - - - diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/lib/protovis/examples/slider/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png deleted file mode 100755 index 954e22db..00000000 Binary files a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png and /dev/null differ diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/lib/protovis/examples/slider/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png deleted file mode 100755 index 64ece570..00000000 Binary files a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png and /dev/null differ diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/lib/protovis/examples/slider/ui-lightness/images/ui-bg_flat_10_000000_40x100.png deleted file mode 100755 index abdc0108..00000000 Binary files a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_flat_10_000000_40x100.png and /dev/null differ diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/lib/protovis/examples/slider/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png deleted file mode 100755 index 9b383f4d..00000000 Binary files a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png and /dev/null differ diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/lib/protovis/examples/slider/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png deleted file mode 100755 index a23baad2..00000000 Binary files a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png and /dev/null differ diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/lib/protovis/examples/slider/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png deleted file mode 100755 index 42ccba26..00000000 Binary files a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png and /dev/null differ diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/lib/protovis/examples/slider/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png deleted file mode 100755 index 39d5824d..00000000 Binary files a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png and /dev/null differ diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/lib/protovis/examples/slider/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png deleted file mode 100755 index f1273672..00000000 Binary files a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png and /dev/null differ diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/lib/protovis/examples/slider/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png deleted file mode 100755 index 359397ac..00000000 Binary files a/lib/protovis/examples/slider/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png and /dev/null differ diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-icons_222222_256x240.png b/lib/protovis/examples/slider/ui-lightness/images/ui-icons_222222_256x240.png deleted file mode 100755 index 25d777a3..00000000 --- a/lib/protovis/examples/slider/ui-lightness/images/ui-icons_222222_256x240.png +++ /dev/null @@ -1,2 +0,0 @@ -
-Fatal error: Call to undefined function ImageColorMatch() in /srv/jqueryui.com/htdocs/themeroller/images/phpthumb.filters.php on line 1040
diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-icons_228ef1_256x240.png b/lib/protovis/examples/slider/ui-lightness/images/ui-icons_228ef1_256x240.png deleted file mode 100755 index 25d777a3..00000000 --- a/lib/protovis/examples/slider/ui-lightness/images/ui-icons_228ef1_256x240.png +++ /dev/null @@ -1,2 +0,0 @@ -
-Fatal error: Call to undefined function ImageColorMatch() in /srv/jqueryui.com/htdocs/themeroller/images/phpthumb.filters.php on line 1040
diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-icons_ef8c08_256x240.png b/lib/protovis/examples/slider/ui-lightness/images/ui-icons_ef8c08_256x240.png deleted file mode 100755 index 25d777a3..00000000 --- a/lib/protovis/examples/slider/ui-lightness/images/ui-icons_ef8c08_256x240.png +++ /dev/null @@ -1,2 +0,0 @@ -
-Fatal error: Call to undefined function ImageColorMatch() in /srv/jqueryui.com/htdocs/themeroller/images/phpthumb.filters.php on line 1040
diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-icons_ffd27a_256x240.png b/lib/protovis/examples/slider/ui-lightness/images/ui-icons_ffd27a_256x240.png deleted file mode 100755 index 25d777a3..00000000 --- a/lib/protovis/examples/slider/ui-lightness/images/ui-icons_ffd27a_256x240.png +++ /dev/null @@ -1,2 +0,0 @@ -
-Fatal error: Call to undefined function ImageColorMatch() in /srv/jqueryui.com/htdocs/themeroller/images/phpthumb.filters.php on line 1040
diff --git a/lib/protovis/examples/slider/ui-lightness/images/ui-icons_ffffff_256x240.png b/lib/protovis/examples/slider/ui-lightness/images/ui-icons_ffffff_256x240.png deleted file mode 100755 index 25d777a3..00000000 --- a/lib/protovis/examples/slider/ui-lightness/images/ui-icons_ffffff_256x240.png +++ /dev/null @@ -1,2 +0,0 @@ -
-Fatal error: Call to undefined function ImageColorMatch() in /srv/jqueryui.com/htdocs/themeroller/images/phpthumb.filters.php on line 1040
diff --git a/lib/protovis/examples/slider/ui-lightness/jquery-ui-1.8rc3.custom.css b/lib/protovis/examples/slider/ui-lightness/jquery-ui-1.8rc3.custom.css deleted file mode 100755 index 307880b7..00000000 --- a/lib/protovis/examples/slider/ui-lightness/jquery-ui-1.8rc3.custom.css +++ /dev/null @@ -1,302 +0,0 @@ -/* -* jQuery UI CSS Framework -* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) -* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. -*/ - -/* Layout helpers -----------------------------------*/ -.ui-helper-hidden { display: none; } -.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } -.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } -.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } -.ui-helper-clearfix { display: inline-block; } -/* required comment for clearfix to work in Opera \*/ -* html .ui-helper-clearfix { height:1%; } -.ui-helper-clearfix { display:block; } -/* end clearfix */ -.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } - - -/* Interaction Cues -----------------------------------*/ -.ui-state-disabled { cursor: default !important; } - - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } - - -/* Misc visuals -----------------------------------*/ - -/* Overlays */ -.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } - - -/* -* jQuery UI CSS Framework -* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about) -* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. -* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px -*/ - - -/* Component containers -----------------------------------*/ -.ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } -.ui-widget .ui-widget { font-size: 1em; } -.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } -.ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } -.ui-widget-content a { color: #333333; } -.ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } -.ui-widget-header a { color: #ffffff; } - -/* Interaction states -----------------------------------*/ -.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } -.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } -.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } -.ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } -.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } -.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } -.ui-widget :active { outline: none; } - -/* Interaction Cues -----------------------------------*/ -.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } -.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #363636; } -.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } -.ui-state-error a, .ui-widget-content .ui-state-error a { color: #ffffff; } -.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #ffffff; } -.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } -.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } -.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } - -/* Icons -----------------------------------*/ - -/* states and images */ -.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } -.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } -.ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } -.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } -.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } - -/* positioning */ -.ui-icon-carat-1-n { background-position: 0 0; } -.ui-icon-carat-1-ne { background-position: -16px 0; } -.ui-icon-carat-1-e { background-position: -32px 0; } -.ui-icon-carat-1-se { background-position: -48px 0; } -.ui-icon-carat-1-s { background-position: -64px 0; } -.ui-icon-carat-1-sw { background-position: -80px 0; } -.ui-icon-carat-1-w { background-position: -96px 0; } -.ui-icon-carat-1-nw { background-position: -112px 0; } -.ui-icon-carat-2-n-s { background-position: -128px 0; } -.ui-icon-carat-2-e-w { background-position: -144px 0; } -.ui-icon-triangle-1-n { background-position: 0 -16px; } -.ui-icon-triangle-1-ne { background-position: -16px -16px; } -.ui-icon-triangle-1-e { background-position: -32px -16px; } -.ui-icon-triangle-1-se { background-position: -48px -16px; } -.ui-icon-triangle-1-s { background-position: -64px -16px; } -.ui-icon-triangle-1-sw { background-position: -80px -16px; } -.ui-icon-triangle-1-w { background-position: -96px -16px; } -.ui-icon-triangle-1-nw { background-position: -112px -16px; } -.ui-icon-triangle-2-n-s { background-position: -128px -16px; } -.ui-icon-triangle-2-e-w { background-position: -144px -16px; } -.ui-icon-arrow-1-n { background-position: 0 -32px; } -.ui-icon-arrow-1-ne { background-position: -16px -32px; } -.ui-icon-arrow-1-e { background-position: -32px -32px; } -.ui-icon-arrow-1-se { background-position: -48px -32px; } -.ui-icon-arrow-1-s { background-position: -64px -32px; } -.ui-icon-arrow-1-sw { background-position: -80px -32px; } -.ui-icon-arrow-1-w { background-position: -96px -32px; } -.ui-icon-arrow-1-nw { background-position: -112px -32px; } -.ui-icon-arrow-2-n-s { background-position: -128px -32px; } -.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } -.ui-icon-arrow-2-e-w { background-position: -160px -32px; } -.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } -.ui-icon-arrowstop-1-n { background-position: -192px -32px; } -.ui-icon-arrowstop-1-e { background-position: -208px -32px; } -.ui-icon-arrowstop-1-s { background-position: -224px -32px; } -.ui-icon-arrowstop-1-w { background-position: -240px -32px; } -.ui-icon-arrowthick-1-n { background-position: 0 -48px; } -.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } -.ui-icon-arrowthick-1-e { background-position: -32px -48px; } -.ui-icon-arrowthick-1-se { background-position: -48px -48px; } -.ui-icon-arrowthick-1-s { background-position: -64px -48px; } -.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } -.ui-icon-arrowthick-1-w { background-position: -96px -48px; } -.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } -.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } -.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } -.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } -.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } -.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } -.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } -.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } -.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } -.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } -.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } -.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } -.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } -.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } -.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } -.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } -.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } -.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } -.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } -.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } -.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } -.ui-icon-arrow-4 { background-position: 0 -80px; } -.ui-icon-arrow-4-diag { background-position: -16px -80px; } -.ui-icon-extlink { background-position: -32px -80px; } -.ui-icon-newwin { background-position: -48px -80px; } -.ui-icon-refresh { background-position: -64px -80px; } -.ui-icon-shuffle { background-position: -80px -80px; } -.ui-icon-transfer-e-w { background-position: -96px -80px; } -.ui-icon-transferthick-e-w { background-position: -112px -80px; } -.ui-icon-folder-collapsed { background-position: 0 -96px; } -.ui-icon-folder-open { background-position: -16px -96px; } -.ui-icon-document { background-position: -32px -96px; } -.ui-icon-document-b { background-position: -48px -96px; } -.ui-icon-note { background-position: -64px -96px; } -.ui-icon-mail-closed { background-position: -80px -96px; } -.ui-icon-mail-open { background-position: -96px -96px; } -.ui-icon-suitcase { background-position: -112px -96px; } -.ui-icon-comment { background-position: -128px -96px; } -.ui-icon-person { background-position: -144px -96px; } -.ui-icon-print { background-position: -160px -96px; } -.ui-icon-trash { background-position: -176px -96px; } -.ui-icon-locked { background-position: -192px -96px; } -.ui-icon-unlocked { background-position: -208px -96px; } -.ui-icon-bookmark { background-position: -224px -96px; } -.ui-icon-tag { background-position: -240px -96px; } -.ui-icon-home { background-position: 0 -112px; } -.ui-icon-flag { background-position: -16px -112px; } -.ui-icon-calendar { background-position: -32px -112px; } -.ui-icon-cart { background-position: -48px -112px; } -.ui-icon-pencil { background-position: -64px -112px; } -.ui-icon-clock { background-position: -80px -112px; } -.ui-icon-disk { background-position: -96px -112px; } -.ui-icon-calculator { background-position: -112px -112px; } -.ui-icon-zoomin { background-position: -128px -112px; } -.ui-icon-zoomout { background-position: -144px -112px; } -.ui-icon-search { background-position: -160px -112px; } -.ui-icon-wrench { background-position: -176px -112px; } -.ui-icon-gear { background-position: -192px -112px; } -.ui-icon-heart { background-position: -208px -112px; } -.ui-icon-star { background-position: -224px -112px; } -.ui-icon-link { background-position: -240px -112px; } -.ui-icon-cancel { background-position: 0 -128px; } -.ui-icon-plus { background-position: -16px -128px; } -.ui-icon-plusthick { background-position: -32px -128px; } -.ui-icon-minus { background-position: -48px -128px; } -.ui-icon-minusthick { background-position: -64px -128px; } -.ui-icon-close { background-position: -80px -128px; } -.ui-icon-closethick { background-position: -96px -128px; } -.ui-icon-key { background-position: -112px -128px; } -.ui-icon-lightbulb { background-position: -128px -128px; } -.ui-icon-scissors { background-position: -144px -128px; } -.ui-icon-clipboard { background-position: -160px -128px; } -.ui-icon-copy { background-position: -176px -128px; } -.ui-icon-contact { background-position: -192px -128px; } -.ui-icon-image { background-position: -208px -128px; } -.ui-icon-video { background-position: -224px -128px; } -.ui-icon-script { background-position: -240px -128px; } -.ui-icon-alert { background-position: 0 -144px; } -.ui-icon-info { background-position: -16px -144px; } -.ui-icon-notice { background-position: -32px -144px; } -.ui-icon-help { background-position: -48px -144px; } -.ui-icon-check { background-position: -64px -144px; } -.ui-icon-bullet { background-position: -80px -144px; } -.ui-icon-radio-off { background-position: -96px -144px; } -.ui-icon-radio-on { background-position: -112px -144px; } -.ui-icon-pin-w { background-position: -128px -144px; } -.ui-icon-pin-s { background-position: -144px -144px; } -.ui-icon-play { background-position: 0 -160px; } -.ui-icon-pause { background-position: -16px -160px; } -.ui-icon-seek-next { background-position: -32px -160px; } -.ui-icon-seek-prev { background-position: -48px -160px; } -.ui-icon-seek-end { background-position: -64px -160px; } -.ui-icon-seek-start { background-position: -80px -160px; } -/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ -.ui-icon-seek-first { background-position: -80px -160px; } -.ui-icon-stop { background-position: -96px -160px; } -.ui-icon-eject { background-position: -112px -160px; } -.ui-icon-volume-off { background-position: -128px -160px; } -.ui-icon-volume-on { background-position: -144px -160px; } -.ui-icon-power { background-position: 0 -176px; } -.ui-icon-signal-diag { background-position: -16px -176px; } -.ui-icon-signal { background-position: -32px -176px; } -.ui-icon-battery-0 { background-position: -48px -176px; } -.ui-icon-battery-1 { background-position: -64px -176px; } -.ui-icon-battery-2 { background-position: -80px -176px; } -.ui-icon-battery-3 { background-position: -96px -176px; } -.ui-icon-circle-plus { background-position: 0 -192px; } -.ui-icon-circle-minus { background-position: -16px -192px; } -.ui-icon-circle-close { background-position: -32px -192px; } -.ui-icon-circle-triangle-e { background-position: -48px -192px; } -.ui-icon-circle-triangle-s { background-position: -64px -192px; } -.ui-icon-circle-triangle-w { background-position: -80px -192px; } -.ui-icon-circle-triangle-n { background-position: -96px -192px; } -.ui-icon-circle-arrow-e { background-position: -112px -192px; } -.ui-icon-circle-arrow-s { background-position: -128px -192px; } -.ui-icon-circle-arrow-w { background-position: -144px -192px; } -.ui-icon-circle-arrow-n { background-position: -160px -192px; } -.ui-icon-circle-zoomin { background-position: -176px -192px; } -.ui-icon-circle-zoomout { background-position: -192px -192px; } -.ui-icon-circle-check { background-position: -208px -192px; } -.ui-icon-circlesmall-plus { background-position: 0 -208px; } -.ui-icon-circlesmall-minus { background-position: -16px -208px; } -.ui-icon-circlesmall-close { background-position: -32px -208px; } -.ui-icon-squaresmall-plus { background-position: -48px -208px; } -.ui-icon-squaresmall-minus { background-position: -64px -208px; } -.ui-icon-squaresmall-close { background-position: -80px -208px; } -.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } -.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } -.ui-icon-grip-solid-vertical { background-position: -32px -224px; } -.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } -.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } -.ui-icon-grip-diagonal-se { background-position: -80px -224px; } - - -/* Misc visuals -----------------------------------*/ - -/* Corner radius */ -.ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } -.ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } -.ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } -.ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } -.ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } - -/* Overlays */ -.ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } -.ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* Slider -----------------------------------*/ -.ui-slider { position: relative; text-align: left; } -.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } -.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } - -.ui-slider-horizontal { height: .8em; } -.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } -.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } -.ui-slider-horizontal .ui-slider-range-min { left: 0; } -.ui-slider-horizontal .ui-slider-range-max { right: 0; } - -.ui-slider-vertical { width: .8em; height: 100px; } -.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } -.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } -.ui-slider-vertical .ui-slider-range-min { bottom: 0; } -.ui-slider-vertical .ui-slider-range-max { top: 0; } \ No newline at end of file diff --git a/lib/protovis/examples/tipsy/jquery.tipsy.js b/lib/protovis/examples/tipsy/jquery.tipsy.js deleted file mode 100644 index 0f938097..00000000 --- a/lib/protovis/examples/tipsy/jquery.tipsy.js +++ /dev/null @@ -1,198 +0,0 @@ -// tipsy, facebook style tooltips for jquery -// version 1.0.0a -// (c) 2008-2010 jason frame [jason@onehackoranother.com] -// releated under the MIT license - -(function($) { - - function fixTitle($ele) { - if ($ele.attr('title') || typeof($ele.attr('original-title')) != 'string') { - $ele.attr('original-title', $ele.attr('title') || '').removeAttr('title'); - } - } - - function Tipsy(element, options) { - this.$element = $(element); - this.options = options; - this.enabled = true; - fixTitle(this.$element); - } - - Tipsy.prototype = { - show: function() { - var title = this.getTitle(); - if (title && this.enabled) { - var $tip = this.tip(); - - $tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title); - $tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity - $tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body); - - var pos = $.extend({}, this.$element.offset(), { - width: this.$element[0].offsetWidth, - height: this.$element[0].offsetHeight - }); - - var actualWidth = $tip[0].offsetWidth, actualHeight = $tip[0].offsetHeight; - var gravity = (typeof this.options.gravity == 'function') - ? this.options.gravity.call(this.$element[0]) - : this.options.gravity; - - var tp; - switch (gravity.charAt(0)) { - case 'n': - tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; - break; - case 's': - tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2}; - break; - case 'e': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset}; - break; - case 'w': - tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset}; - break; - } - - if (gravity.length == 2) { - if (gravity.charAt(1) == 'w') { - tp.left = pos.left + pos.width / 2 - 15; - } else { - tp.left = pos.left + pos.width / 2 - actualWidth + 15; - } - } - - $tip.css(tp).addClass('tipsy-' + gravity); - - if (this.options.fade) { - $tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity}); - } else { - $tip.css({visibility: 'visible', opacity: this.options.opacity}); - } - } - }, - - hide: function() { - if (this.options.fade) { - this.tip().stop().fadeOut(function() { $(this).remove(); }); - } else { - this.tip().remove(); - } - }, - - getTitle: function() { - var title, $e = this.$element, o = this.options; - fixTitle($e); - var title, o = this.options; - if (typeof o.title == 'string') { - title = $e.attr(o.title == 'title' ? 'original-title' : o.title); - } else if (typeof o.title == 'function') { - title = o.title.call($e[0]); - } - title = ('' + title).replace(/(^\s*|\s*$)/, ""); - return title || o.fallback; - }, - - tip: function() { - if (!this.$tip) { - this.$tip = $('
').html('
'); - } - return this.$tip; - }, - - validate: function() { - if (!this.$element[0].parentNode) { - this.hide(); - this.$element = null; - this.options = null; - } - }, - - enable: function() { this.enabled = true; }, - disable: function() { this.enabled = false; }, - toggleEnabled: function() { this.enabled = !this.enabled; } - }; - - $.fn.tipsy = function(options) { - - if (options === true) { - return this.data('tipsy'); - } else if (typeof options == 'string') { - return this.data('tipsy')[options](); - } - - options = $.extend({}, $.fn.tipsy.defaults, options); - - function get(ele) { - var tipsy = $.data(ele, 'tipsy'); - if (!tipsy) { - tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options)); - $.data(ele, 'tipsy', tipsy); - } - return tipsy; - } - - function enter() { - var tipsy = get(this); - tipsy.hoverState = 'in'; - if (options.delayIn == 0) { - tipsy.show(); - } else { - setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn); - } - }; - - function leave() { - var tipsy = get(this); - tipsy.hoverState = 'out'; - if (options.delayOut == 0) { - tipsy.hide(); - } else { - setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut); - } - }; - - if (!options.live) this.each(function() { get(this); }); - - if (options.trigger != 'manual') { - var binder = options.live ? 'live' : 'bind', - eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus', - eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur'; - this[binder](eventIn, enter)[binder](eventOut, leave); - } - - return this; - - }; - - $.fn.tipsy.defaults = { - delayIn: 0, - delayOut: 0, - fade: false, - fallback: '', - gravity: 'n', - html: false, - live: false, - offset: 0, - opacity: 0.8, - title: 'title', - trigger: 'hover' - }; - - // Overwrite this method to provide options on a per-element basis. - // For example, you could store the gravity in a 'tipsy-gravity' attribute: - // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); - // (remember - do not modify 'options' in place!) - $.fn.tipsy.elementOptions = function(ele, options) { - return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; - }; - - $.fn.tipsy.autoNS = function() { - return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; - }; - - $.fn.tipsy.autoWE = function() { - return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; - }; - -})(jQuery); diff --git a/lib/protovis/examples/tipsy/tipsy-bar.html b/lib/protovis/examples/tipsy/tipsy-bar.html deleted file mode 100644 index 79310d28..00000000 --- a/lib/protovis/examples/tipsy/tipsy-bar.html +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - Tipsy Bar - - - - -
- - diff --git a/lib/protovis/examples/tipsy/tipsy-line.html b/lib/protovis/examples/tipsy/tipsy-line.html deleted file mode 100644 index 633865ea..00000000 --- a/lib/protovis/examples/tipsy/tipsy-line.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - Tipsy Line - - - - - - - - - - - diff --git a/lib/protovis/examples/tipsy/tipsy.css b/lib/protovis/examples/tipsy/tipsy.css deleted file mode 100644 index 0e63a1c5..00000000 --- a/lib/protovis/examples/tipsy/tipsy.css +++ /dev/null @@ -1,12 +0,0 @@ -.tipsy { pointer-events: none; padding: 5px; font-size: 10px; position: absolute; z-index: 100000; } - .tipsy-inner { padding: 5px 8px 4px 8px; background-color: black; color: white; max-width: 200px; text-align: center; } - .tipsy-inner { border-radius: 3px; -moz-border-radius:3px; -webkit-border-radius:3px; } - .tipsy-arrow { position: absolute; background: url(tipsy.gif) no-repeat top left; width: 9px; height: 5px; } - .tipsy-n .tipsy-arrow { top: 0; left: 50%; margin-left: -4px; } - .tipsy-nw .tipsy-arrow { top: 0; left: 10px; } - .tipsy-ne .tipsy-arrow { top: 0; right: 10px; } - .tipsy-s .tipsy-arrow { bottom: 0; left: 50%; margin-left: -4px; background-position: bottom left; } - .tipsy-sw .tipsy-arrow { bottom: 0; left: 10px; background-position: bottom left; } - .tipsy-se .tipsy-arrow { bottom: 0; right: 10px; background-position: bottom left; } - .tipsy-e .tipsy-arrow { top: 50%; margin-top: -4px; right: 0; width: 5px; height: 9px; background-position: top right; } - .tipsy-w .tipsy-arrow { top: 50%; margin-top: -4px; left: 0; width: 5px; height: 9px; } diff --git a/lib/protovis/examples/tipsy/tipsy.gif b/lib/protovis/examples/tipsy/tipsy.gif deleted file mode 100644 index 74eebae2..00000000 Binary files a/lib/protovis/examples/tipsy/tipsy.gif and /dev/null differ diff --git a/lib/protovis/examples/tipsy/tipsy.js b/lib/protovis/examples/tipsy/tipsy.js deleted file mode 100644 index 29a1ffef..00000000 --- a/lib/protovis/examples/tipsy/tipsy.js +++ /dev/null @@ -1,66 +0,0 @@ -pv.Behavior.tipsy = function(opts) { - var tip; - - /** - * @private When the mouse leaves the root panel, trigger a mouseleave event - * on the tooltip span. This is necessary for dimensionless marks (e.g., - * lines) when the mouse isn't actually over the span. - */ - function trigger() { - if (tip) { - $(tip).tipsy("hide"); - tip.parentNode.removeChild(tip); - tip = null; - } - } - - return function(d) { - /* Compute the transform to offset the tooltip position. */ - var t = pv.Transform.identity, p = this.parent; - do { - t = t.translate(p.left(), p.top()).times(p.transform()); - } while (p = p.parent); - - /* Create and cache the tooltip span to be used by tipsy. */ - if (!tip) { - var c = this.root.canvas(); - c.style.position = "relative"; - $(c).mouseleave(trigger); - - tip = c.appendChild(document.createElement("div")); - tip.style.position = "absolute"; - tip.style.pointerEvents = "none"; // ignore mouse events - $(tip).tipsy(opts); - } - - /* Propagate the tooltip text. */ - tip.title = this.title() || this.text(); - - /* - * Compute bounding box. TODO support area, lines, wedges, stroke. Also - * note that CSS positioning does not support subpixels, and the current - * rounding implementation can be off by one pixel. - */ - if (this.properties.width) { - tip.style.width = Math.ceil(this.width() * t.k) + 1 + "px"; - tip.style.height = Math.ceil(this.height() * t.k) + 1 + "px"; - } else if (this.properties.radius) { - var r = this.radius(); - t.x -= r; - t.y -= r; - tip.style.height = tip.style.width = Math.ceil(2 * r * t.k) + "px"; - } - tip.style.left = Math.floor(this.left() * t.k + t.x) + "px"; - tip.style.top = Math.floor(this.top() * t.k + t.y) + "px"; - - /* - * Cleanup the tooltip span on mouseout. Immediately trigger the tooltip; - * this is necessary for dimensionless marks. Note that the tip has - * pointer-events disabled (so as to not interfere with other mouse - * events, such as "click"); thus the mouseleave event handler is - * registered on the event target rather than the tip overlay. - */ - if (tip.style.height) $(pv.event.target).mouseleave(trigger); - $(tip).tipsy("show"); - }; -}; diff --git a/lib/protovis/examples/weather/weather.html b/lib/protovis/examples/weather/weather.html deleted file mode 100644 index ba1f45be..00000000 --- a/lib/protovis/examples/weather/weather.html +++ /dev/null @@ -1,86 +0,0 @@ - - - Weather - - - - - -
- -
- diff --git a/lib/protovis/examples/weather/weather.js b/lib/protovis/examples/weather/weather.js deleted file mode 100644 index 6b41769b..00000000 --- a/lib/protovis/examples/weather/weather.js +++ /dev/null @@ -1,42 +0,0 @@ -var weather = [ - { day: "M", - record: { high: 62, low: 15 }, - normal: { high: 50, low: 38 }, - actual: { high: 48, low: 36 } }, - { day: "T", - record: { high: 62, low: 23 }, - normal: { high: 50, low: 38 }, - actual: { high: 50, low: 40 } }, - { day: "W", - record: { high: 61, low: 20 }, - normal: { high: 50, low: 38 }, - actual: { high: 55, low: 36 } }, - { day: "T", - record: { high: 67, low: 21 }, - normal: { high: 50, low: 38 }, - actual: { high: 51, low: 33 } }, - { day: "F", - record: { high: 61, low: 23 }, - normal: { high: 50, low: 38 }, - actual: { high: 50, low: 30 } }, - { day: "S", - record: { high: 67, low: 20 }, - normal: { high: 50, low: 38 }, - forecast: { high: { high: 53, low: 49 }, low: { high: 40, low: 35 } } }, - { day: "S", - record: { high: 63, low: 23 }, - normal: { high: 50, low: 39 }, - forecast: { high: { high: 55, low: 49 }, low: { high: 42, low: 37 } } }, - { day: "M", - record: { high: 61, low: 26 }, - normal: { high: 51, low: 39 }, - forecast: { high: { high: 53, low: 49 }, low: { high: 43, low: 40 } } }, - { day: "T", - record: { high: 61, low: 24 }, - normal: { high: 51, low: 39 }, - forecast: { high: { high: 52, low: 46 }, low: { high: 44, low: 40 } } }, - { day: "W", - record: { high: 63, low: 20 }, - normal: { high: 51, low: 39 }, - forecast: { high: { high: 53, low: 46 }, low: { high: 43, low: 38 } } } -]; diff --git a/lib/protovis/examples/wheat/wheat.html b/lib/protovis/examples/wheat/wheat.html deleted file mode 100644 index a791cd94..00000000 --- a/lib/protovis/examples/wheat/wheat.html +++ /dev/null @@ -1,130 +0,0 @@ - - - Wheat & Wages - - - - - -
-
- CHART,
- Shewing at One View
- The Price of The Quarter of Wheat,

& - Wages of Labour by the Week,
- from The Year 1565 to 1821,
- by WILLIAM PLAYFAIR -
- -
- diff --git a/lib/protovis/examples/wheat/wheat.js b/lib/protovis/examples/wheat/wheat.js deleted file mode 100644 index 41e14632..00000000 --- a/lib/protovis/examples/wheat/wheat.js +++ /dev/null @@ -1,70 +0,0 @@ -var wheat = [ - { year: 1565, wheat: 41, wages: 5 }, - { year: 1570, wheat: 45, wages: 5.05 }, - { year: 1575, wheat: 42, wages: 5.08 }, - { year: 1580, wheat: 49, wages: 5.12 }, - { year: 1585, wheat: 41.5, wages: 5.15 }, - { year: 1590, wheat: 47, wages: 5.25 }, - { year: 1595, wheat: 64, wages: 5.54 }, - { year: 1600, wheat: 27, wages: 5.61 }, - { year: 1605, wheat: 33, wages: 5.69 }, - { year: 1610, wheat: 32, wages: 5.78 }, - { year: 1615, wheat: 33, wages: 5.94 }, - { year: 1620, wheat: 35, wages: 6.01 }, - { year: 1625, wheat: 33, wages: 6.12 }, - { year: 1630, wheat: 45, wages: 6.22 }, - { year: 1635, wheat: 33, wages: 6.3 }, - { year: 1640, wheat: 39, wages: 6.37 }, - { year: 1645, wheat: 53, wages: 6.45 }, - { year: 1650, wheat: 42, wages: 6.5 }, - { year: 1655, wheat: 40.5, wages: 6.6 }, - { year: 1660, wheat: 46.5, wages: 6.75 }, - { year: 1665, wheat: 32, wages: 6.8 }, - { year: 1670, wheat: 37, wages: 6.9 }, - { year: 1675, wheat: 43, wages: 7 }, - { year: 1680, wheat: 35, wages: 7.3 }, - { year: 1685, wheat: 27, wages: 7.6 }, - { year: 1690, wheat: 40, wages: 8 }, - { year: 1695, wheat: 50, wages: 8.5 }, - { year: 1700, wheat: 30, wages: 9 }, - { year: 1705, wheat: 32, wages: 10 }, - { year: 1710, wheat: 44, wages: 11 }, - { year: 1715, wheat: 33, wages: 11.75 }, - { year: 1720, wheat: 29, wages: 12.5 }, - { year: 1725, wheat: 39, wages: 13 }, - { year: 1730, wheat: 26, wages: 13.3 }, - { year: 1735, wheat: 32, wages: 13.6 }, - { year: 1740, wheat: 27, wages: 14 }, - { year: 1745, wheat: 27.5, wages: 14.5 }, - { year: 1750, wheat: 31, wages: 15 }, - { year: 1755, wheat: 35.5, wages: 15.7 }, - { year: 1760, wheat: 31, wages: 16.5 }, - { year: 1765, wheat: 43, wages: 17.6 }, - { year: 1770, wheat: 47, wages: 18.5 }, - { year: 1775, wheat: 44, wages: 19.5 }, - { year: 1780, wheat: 46, wages: 21 }, - { year: 1785, wheat: 42, wages: 23 }, - { year: 1790, wheat: 47.5, wages: 25.5 }, - { year: 1795, wheat: 76, wages: 27.5 }, - { year: 1800, wheat: 79, wages: 28.5 }, - { year: 1805, wheat: 81, wages: 29.5 }, - { year: 1810, wheat: 99, wages: 30 }, - { year: 1815, wheat: 78 }, // TODO - { year: 1820, wheat: 54 }, - { year: 1821, wheat: 54 } -]; - -var monarch = [ - { name: "Elizabeth", start: 1565, end: 1603 }, - { name: "James I", start: 1603, end: 1625 }, - { name: "Charles I", start: 1625, end: 1649 }, - { name: "Cromwell", start: 1649, end: 1660, commonwealth: true }, - { name: "Charles II", start: 1660, end: 1685 }, - { name: "James II", start: 1685, end: 1689 }, - { name: "W&M", start: 1689, end: 1702 }, - { name: "Anne", start: 1702, end: 1714 }, - { name: "George I", start: 1714, end: 1727 }, - { name: "George II", start: 1727, end: 1760 }, - { name: "George III", start: 1760, end: 1820 }, - { name: "George IV", start: 1820, end: 1821 } -]; diff --git a/lib/protovis/protovis-d3.2.js b/lib/protovis/protovis-d3.2.js deleted file mode 100644 index bfe5a020..00000000 --- a/lib/protovis/protovis-d3.2.js +++ /dev/null @@ -1,15324 +0,0 @@ -// fba9dc272a443cf9fdb984676a7732a6a082f4c0 -/** - * @class The built-in Array class. - * @name Array - */ - -/** - * Creates a new array with the results of calling a provided function on every - * element in this array. Implemented in Javascript 1.6. - * - * @function - * @name Array.prototype.map - * @see map - * documentation. - * @param {function} f function that produces an element of the new Array from - * an element of the current one. - * @param [o] object to use as this when executing f. - */ -if (!Array.prototype.map) Array.prototype.map = function(f, o) { - var n = this.length; - var result = new Array(n); - for (var i = 0; i < n; i++) { - if (i in this) { - result[i] = f.call(o, this[i], i, this); - } - } - return result; -}; - -/** - * Creates a new array with all elements that pass the test implemented by the - * provided function. Implemented in Javascript 1.6. - * - * @function - * @name Array.prototype.filter - * @see filter - * documentation. - * @param {function} f function to test each element of the array. - * @param [o] object to use as this when executing f. - */ -if (!Array.prototype.filter) Array.prototype.filter = function(f, o) { - var n = this.length; - var result = new Array(); - for (var i = 0; i < n; i++) { - if (i in this) { - var v = this[i]; - if (f.call(o, v, i, this)) result.push(v); - } - } - return result; -}; - -/** - * Executes a provided function once per array element. Implemented in - * Javascript 1.6. - * - * @function - * @name Array.prototype.forEach - * @see forEach - * documentation. - * @param {function} f function to execute for each element. - * @param [o] object to use as this when executing f. - */ -if (!Array.prototype.forEach) Array.prototype.forEach = function(f, o) { - var n = this.length >>> 0; - for (var i = 0; i < n; i++) { - if (i in this) f.call(o, this[i], i, this); - } -}; - -/** - * Apply a function against an accumulator and each value of the array (from - * left-to-right) as to reduce it to a single value. Implemented in Javascript - * 1.8. - * - * @function - * @name Array.prototype.reduce - * @see reduce - * documentation. - * @param {function} f function to execute on each value in the array. - * @param [v] object to use as the first argument to the first call of - * t. - */ -if (!Array.prototype.reduce) Array.prototype.reduce = function(f, v) { - var len = this.length; - if (!len && (arguments.length == 1)) { - throw new Error("reduce: empty array, no initial value"); - } - - var i = 0; - if (arguments.length < 2) { - while (true) { - if (i in this) { - v = this[i++]; - break; - } - if (++i >= len) { - throw new Error("reduce: no values, no initial value"); - } - } - } - - for (; i < len; i++) { - if (i in this) { - v = f(v, this[i], i, this); - } - } - return v; -}; -/** - * The top-level Protovis namespace. All public methods and fields should be - * registered on this object. Note that core Protovis source is surrounded by an - * anonymous function, so any other declared globals will not be visible outside - * of core methods. This also allows multiple versions of Protovis to coexist, - * since each version will see their own pv namespace. - * - * @namespace The top-level Protovis namespace, pv. - */ -var pv = {}; - -/** - * Protovis major and minor version numbers. - * - * @namespace Protovis major and minor version numbers. - */ -pv.version = { - /** - * The major version number. - * - * @type number - * @constant - */ - major: 3, - - /** - * The minor version number. - * - * @type number - * @constant - */ - minor: 2 -}; - -/** - * Returns the passed-in argument, x; the identity function. This method - * is provided for convenience since it is used as the default behavior for a - * number of property functions. - * - * @param x a value. - * @returns the value x. - */ -pv.identity = function(x) { return x; }; - -/** - * Returns this.index. This method is provided for convenience for use - * with scales. For example, to color bars by their index, say: - * - *
.fillStyle(pv.Colors.category10().by(pv.index))
- * - * This method is equivalent to function() this.index, but more - * succinct. Note that the index property is also supported for - * accessor functions with {@link pv.max}, {@link pv.min} and other array - * utility methods. - * - * @see pv.Scale - * @see pv.Mark#index - */ -pv.index = function() { return this.index; }; - -/** - * Returns this.childIndex. This method is provided for convenience for - * use with scales. For example, to color bars by their child index, say: - * - *
.fillStyle(pv.Colors.category10().by(pv.child))
- * - * This method is equivalent to function() this.childIndex, but more - * succinct. - * - * @see pv.Scale - * @see pv.Mark#childIndex - */ -pv.child = function() { return this.childIndex; }; - -/** - * Returns this.parent.index. This method is provided for convenience - * for use with scales. This method is provided for convenience for use with - * scales. For example, to color bars by their parent index, say: - * - *
.fillStyle(pv.Colors.category10().by(pv.parent))
- * - * Tthis method is equivalent to function() this.parent.index, but more - * succinct. - * - * @see pv.Scale - * @see pv.Mark#index - */ -pv.parent = function() { return this.parent.index; }; - -/** - * Stores the current event. This field is only set within event handlers. - * - * @type Event - * @name pv.event - */ -/** - * @private Returns a prototype object suitable for extending the given class - * f. Rather than constructing a new instance of f to serve as - * the prototype (which unnecessarily runs the constructor on the created - * prototype object, potentially polluting it), an anonymous function is - * generated internally that shares the same prototype: - * - *
function g() {}
- * g.prototype = f.prototype;
- * return new g();
- * - * For more details, see Douglas Crockford's essay on prototypal inheritance. - * - * @param {function} f a constructor. - * @returns a suitable prototype object. - * @see Douglas Crockford's essay on prototypal - * inheritance. - */ -pv.extend = function(f) { - function g() {} - g.prototype = f.prototype || f; - return new g(); -}; - -try { - eval("pv.parse = function(x) x;"); // native support -} catch (e) { - -/** - * @private Parses a Protovis specification, which may use JavaScript 1.8 - * function expresses, replacing those function expressions with proper - * functions such that the code can be run by a JavaScript 1.6 interpreter. This - * hack only supports function expressions (using clumsy regular expressions, no - * less), and not other JavaScript 1.8 features such as let expressions. - * - * @param {string} s a Protovis specification (i.e., a string of JavaScript 1.8 - * source code). - * @returns {string} a conformant JavaScript 1.6 source code. - */ - pv.parse = function(js) { // hacky regex support - var re = new RegExp("function\\s*(\\b\\w+)?\\s*\\([^)]*\\)\\s*", "mg"), m, d, i = 0, s = ""; - while (m = re.exec(js)) { - var j = m.index + m[0].length; - if (js.charAt(j) != '{') { - s += js.substring(i, j) + "{return "; - i = j; - for (var p = 0; p >= 0 && j < js.length; j++) { - var c = js.charAt(j); - switch (c) { - case '"': case '\'': { - while (++j < js.length && (d = js.charAt(j)) != c) { - if (d == '\\') j++; - } - break; - } - case '[': case '(': p++; break; - case ']': case ')': p--; break; - case ';': - case ',': if (p == 0) p--; break; - } - } - s += pv.parse(js.substring(i, --j)) + ";}"; - i = j; - } - re.lastIndex = j; - } - s += js.substring(i); - return s; - }; -} - -/** - * @private Computes the value of the specified CSS property p on the - * specified element e. - * - * @param {string} p the name of the CSS property. - * @param e the element on which to compute the CSS property. - */ -pv.css = function(e, p) { - return window.getComputedStyle - ? window.getComputedStyle(e, null).getPropertyValue(p) - : e.currentStyle[p]; -}; - -/** - * @private Reports the specified error to the JavaScript console. Mozilla only - * allows logging to the console for privileged code; if the console is - * unavailable, the alert dialog box is used instead. - * - * @param e the exception that triggered the error. - */ -pv.error = function(e) { - (typeof console == "undefined") ? alert(e) : console.error(e); -}; - -/** - * @private Registers the specified listener for events of the specified type on - * the specified target. For standards-compliant browsers, this method uses - * addEventListener; for Internet Explorer, attachEvent. - * - * @param target a DOM element. - * @param {string} type the type of event, such as "click". - * @param {function} the event handler callback. - */ -pv.listen = function(target, type, listener) { - listener = pv.listener(listener); - return target.addEventListener - ? target.addEventListener(type, listener, false) - : target.attachEvent("on" + type, listener); -}; - -/** - * @private Returns a wrapper for the specified listener function such that the - * {@link pv.event} is set for the duration of the listener's invocation. The - * wrapper is cached on the returned function, such that duplicate registrations - * of the wrapped event handler are ignored. - * - * @param {function} f an event handler. - * @returns {function} the wrapped event handler. - */ -pv.listener = function(f) { - return f.$listener || (f.$listener = function(e) { - try { - pv.event = e; - return f.call(this, e); - } finally { - delete pv.event; - } - }); -}; - -/** - * @private Returns true iff a is an ancestor of e. This is useful - * for ignoring mouseout and mouseover events that are contained within the - * target element. - */ -pv.ancestor = function(a, e) { - while (e) { - if (e == a) return true; - e = e.parentNode; - } - return false; -}; - -/** @private Returns a locally-unique positive id. */ -pv.id = function() { - var id = 1; return function() { return id++; }; -}(); - -/** @private Returns a function wrapping the specified constant. */ -pv.functor = function(v) { - return typeof v == "function" ? v : function() { return v; }; -}; -/* - * Parses the Protovis specifications on load, allowing the use of JavaScript - * 1.8 function expressions on browsers that only support JavaScript 1.6. - * - * @see pv.parse - */ -pv.listen(window, "load", function() { - /* - * Note: in Firefox any variables declared here are visible to the eval'd - * script below. Even worse, any global variables declared by the script - * could overwrite local variables here (such as the index, `i`)! To protect - * against this, all variables are explicitly scoped on a pv.$ object. - */ - pv.$ = {i:0, x:document.getElementsByTagName("script")}; - for (; pv.$.i < pv.$.x.length; pv.$.i++) { - pv.$.s = pv.$.x[pv.$.i]; - if (pv.$.s.type == "text/javascript+protovis") { - try { - window.eval(pv.parse(pv.$.s.text)); - } catch (e) { - pv.error(e); - } - } - } - delete pv.$; - }); -/** - * Abstract; see an implementing class. - * - * @class Represents an abstract text formatter and parser. A format is a - * function that converts an object of a given type, such as a Date, to - * a human-readable string representation. The format may also have a - * {@link #parse} method for converting a string representation back to the - * given object type. - * - *

Because formats are themselves functions, they can be used directly as - * mark properties. For example, if the data associated with a label are dates, - * a date format can be used as label text: - * - *

    .text(pv.Format.date("%m/%d/%y"))
- * - * And as with scales, if the format is used in multiple places, it can be - * convenient to declare it as a global variable and then reference it from the - * appropriate property functions. For example, if the data has a date - * attribute, and format references a given date format: - * - *
    .text(function(d) format(d.date))
- * - * Similarly, to parse a string into a date: - * - *
var date = format.parse("4/30/2010");
- * - * Not all format implementations support parsing. See the implementing class - * for details. - * - * @see pv.Format.date - * @see pv.Format.number - * @see pv.Format.time - */ -pv.Format = {}; - -/** - * Formats the specified object, returning the string representation. - * - * @function - * @name pv.Format.prototype.format - * @param {object} x the object to format. - * @returns {string} the formatted string. - */ - -/** - * Parses the specified string, returning the object representation. - * - * @function - * @name pv.Format.prototype.parse - * @param {string} x the string to parse. - * @returns {object} the parsed object. - */ - -/** - * @private Given a string that may be used as part of a regular expression, - * this methods returns an appropriately quoted version of the specified string, - * with any special characters escaped. - * - * @param {string} s a string to quote. - * @returns {string} the quoted string. - */ -pv.Format.re = function(s) { - return s.replace(/[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g, "\\$&"); -}; - -/** - * @private Optionally pads the specified string s so that it is at least - * n characters long, using the padding character c. - * - * @param {string} c the padding character. - * @param {number} n the minimum string length. - * @param {string} s the string to pad. - * @returns {string} the padded string. - */ -pv.Format.pad = function(c, n, s) { - var m = n - String(s).length; - return (m < 1) ? s : new Array(m + 1).join(c) + s; -}; -/** - * Constructs a new date format with the specified string pattern. - * - * @class The format string is in the same format expected by the - * strftime function in C. The following conversion specifications are - * supported:
    - * - *
  • %a - abbreviated weekday name.
  • - *
  • %A - full weekday name.
  • - *
  • %b - abbreviated month names.
  • - *
  • %B - full month names.
  • - *
  • %c - locale's appropriate date and time.
  • - *
  • %C - century number.
  • - *
  • %d - day of month [01,31] (zero padded).
  • - *
  • %D - same as %m/%d/%y.
  • - *
  • %e - day of month [ 1,31] (space padded).
  • - *
  • %h - same as %b.
  • - *
  • %H - hour (24-hour clock) [00,23] (zero padded).
  • - *
  • %I - hour (12-hour clock) [01,12] (zero padded).
  • - *
  • %m - month number [01,12] (zero padded).
  • - *
  • %M - minute [0,59] (zero padded).
  • - *
  • %n - newline character.
  • - *
  • %p - locale's equivalent of a.m. or p.m.
  • - *
  • %r - same as %I:%M:%S %p.
  • - *
  • %R - same as %H:%M.
  • - *
  • %S - second [00,61] (zero padded).
  • - *
  • %t - tab character.
  • - *
  • %T - same as %H:%M:%S.
  • - *
  • %x - same as %m/%d/%y.
  • - *
  • %X - same as %I:%M:%S %p.
  • - *
  • %y - year with century [00,99] (zero padded).
  • - *
  • %Y - year including century.
  • - *
  • %% - %.
  • - * - *
The following conversion specifications are currently unsupported - * for formatting:
    - * - *
  • %j - day number [1,366].
  • - *
  • %u - weekday number [1,7].
  • - *
  • %U - week number [00,53].
  • - *
  • %V - week number [01,53].
  • - *
  • %w - weekday number [0,6].
  • - *
  • %W - week number [00,53].
  • - *
  • %Z - timezone name or abbreviation.
  • - * - *
In addition, the following conversion specifications are currently - * unsupported for parsing:
    - * - *
  • %a - day of week, either abbreviated or full name.
  • - *
  • %A - same as %a.
  • - *
  • %c - locale's appropriate date and time.
  • - *
  • %C - century number.
  • - *
  • %D - same as %m/%d/%y.
  • - *
  • %I - hour (12-hour clock) [1,12].
  • - *
  • %n - any white space.
  • - *
  • %p - locale's equivalent of a.m. or p.m.
  • - *
  • %r - same as %I:%M:%S %p.
  • - *
  • %R - same as %H:%M.
  • - *
  • %t - same as %n.
  • - *
  • %T - same as %H:%M:%S.
  • - *
  • %x - locale's equivalent to %m/%d/%y.
  • - *
  • %X - locale's equivalent to %I:%M:%S %p.
  • - * - *
- * - * @see strftime - * documentation. - * @see strptime - * documentation. - * @extends pv.Format - * @param {string} pattern the format pattern. - */ -pv.Format.date = function(pattern) { - var pad = pv.Format.pad; - - /** @private */ - function format(d) { - return pattern.replace(/%[a-zA-Z0-9]/g, function(s) { - switch (s) { - case '%a': return [ - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" - ][d.getDay()]; - case '%A': return [ - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", - "Saturday" - ][d.getDay()]; - case '%h': - case '%b': return [ - "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", - "Oct", "Nov", "Dec" - ][d.getMonth()]; - case '%B': return [ - "January", "February", "March", "April", "May", "June", "July", - "August", "September", "October", "November", "December" - ][d.getMonth()]; - case '%c': return d.toLocaleString(); - case '%C': return pad("0", 2, Math.floor(d.getFullYear() / 100) % 100); - case '%d': return pad("0", 2, d.getDate()); - case '%x': - case '%D': return pad("0", 2, d.getMonth() + 1) - + "/" + pad("0", 2, d.getDate()) - + "/" + pad("0", 2, d.getFullYear() % 100); - case '%e': return pad(" ", 2, d.getDate()); - case '%H': return pad("0", 2, d.getHours()); - case '%I': { - var h = d.getHours() % 12; - return h ? pad("0", 2, h) : 12; - } - // TODO %j: day of year as a decimal number [001,366] - case '%m': return pad("0", 2, d.getMonth() + 1); - case '%M': return pad("0", 2, d.getMinutes()); - case '%n': return "\n"; - case '%p': return d.getHours() < 12 ? "AM" : "PM"; - case '%T': - case '%X': - case '%r': { - var h = d.getHours() % 12; - return (h ? pad("0", 2, h) : 12) - + ":" + pad("0", 2, d.getMinutes()) - + ":" + pad("0", 2, d.getSeconds()) - + " " + (d.getHours() < 12 ? "AM" : "PM"); - } - case '%R': return pad("0", 2, d.getHours()) + ":" + pad("0", 2, d.getMinutes()); - case '%S': return pad("0", 2, d.getSeconds()); - case '%Q': return pad("0", 3, d.getMilliseconds()); - case '%t': return "\t"; - case '%u': { - var w = d.getDay(); - return w ? w : 1; - } - // TODO %U: week number (sunday first day) [00,53] - // TODO %V: week number (monday first day) [01,53] ... with weirdness - case '%w': return d.getDay(); - // TODO %W: week number (monday first day) [00,53] ... with weirdness - case '%y': return pad("0", 2, d.getFullYear() % 100); - case '%Y': return d.getFullYear(); - // TODO %Z: timezone name or abbreviation - case '%%': return "%"; - } - return s; - }); - } - - /** - * Converts a date to a string using the associated formatting pattern. - * - * @function - * @name pv.Format.date.prototype.format - * @param {Date} date a date to format. - * @returns {string} the formatted date as a string. - */ - format.format = format; - - /** - * Parses a date from a string using the associated formatting pattern. - * - * @function - * @name pv.Format.date.prototype.parse - * @param {string} s the string to parse as a date. - * @returns {Date} the parsed date. - */ - format.parse = function(s) { - var year = 1970, month = 0, date = 1, hour = 0, minute = 0, second = 0; - var fields = [function() {}]; - - /* Register callbacks for each field in the format pattern. */ - var re = pv.Format.re(pattern).replace(/%[a-zA-Z0-9]/g, function(s) { - switch (s) { - // TODO %a: day of week, either abbreviated or full name - // TODO %A: same as %a - case '%b': { - fields.push(function(x) { month = { - Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7, - Sep: 8, Oct: 9, Nov: 10, Dec: 11 - }[x]; }); - return "([A-Za-z]+)"; - } - case '%h': - case '%B': { - fields.push(function(x) { month = { - January: 0, February: 1, March: 2, April: 3, May: 4, June: 5, - July: 6, August: 7, September: 8, October: 9, November: 10, - December: 11 - }[x]; }); - return "([A-Za-z]+)"; - } - // TODO %c: locale's appropriate date and time - // TODO %C: century number[0,99] - case '%e': - case '%d': { - fields.push(function(x) { date = x; }); - return "([0-9]+)"; - } - // TODO %D: same as %m/%d/%y - case '%I': - case '%H': { - fields.push(function(x) { hour = x; }); - return "([0-9]+)"; - } - // TODO %j: day number [1,366] - case '%m': { - fields.push(function(x) { month = x - 1; }); - return "([0-9]+)"; - } - case '%M': { - fields.push(function(x) { minute = x; }); - return "([0-9]+)"; - } - // TODO %n: any white space - // TODO %p: locale's equivalent of a.m. or p.m. - case '%p': { // TODO this is a hack - fields.push(function(x) { - if (hour == 12) { - if (x == "am") hour = 0; - } else if (x == "pm") { - hour = Number(hour) + 12; - } - }); - return "(am|pm)"; - } - // TODO %r: %I:%M:%S %p - // TODO %R: %H:%M - case '%S': { - fields.push(function(x) { second = x; }); - return "([0-9]+)"; - } - // TODO %t: any white space - // TODO %T: %H:%M:%S - // TODO %U: week number [00,53] - // TODO %w: weekday [0,6] - // TODO %W: week number [00, 53] - // TODO %x: locale date (%m/%d/%y) - // TODO %X: locale time (%I:%M:%S %p) - case '%y': { - fields.push(function(x) { - x = Number(x); - year = x + (((0 <= x) && (x < 69)) ? 2000 - : (((x >= 69) && (x < 100) ? 1900 : 0))); - }); - return "([0-9]+)"; - } - case '%Y': { - fields.push(function(x) { year = x; }); - return "([0-9]+)"; - } - case '%%': { - fields.push(function() {}); - return "%"; - } - } - return s; - }); - - var match = s.match(re); - if (match) match.forEach(function(m, i) { fields[i](m); }); - return new Date(year, month, date, hour, minute, second); - }; - - return format; -}; -/** - * Returns a time format of the given type, either "short" or "long". - * - * @class Represents a time format, converting between a number - * representing a duration in milliseconds, and a string. Two types of - * time formats are supported: "short" and "long". The short format type - * returns a string such as "3.3 days" or "12.1 minutes", while the long - * format returns "13:04:12" or similar. - * - * @extends pv.Format - * @param {string} type the type; "short" or "long". - */ -pv.Format.time = function(type) { - var pad = pv.Format.pad; - - /* - * MILLISECONDS = 1 - * SECONDS = 1e3 - * MINUTES = 6e4 - * HOURS = 36e5 - * DAYS = 864e5 - * WEEKS = 6048e5 - * MONTHS = 2592e6 - * YEARS = 31536e6 - */ - - /** @private */ - function format(t) { - t = Number(t); // force conversion from Date - switch (type) { - case "short": { - if (t >= 31536e6) { - return (t / 31536e6).toFixed(1) + " years"; - } else if (t >= 6048e5) { - return (t / 6048e5).toFixed(1) + " weeks"; - } else if (t >= 864e5) { - return (t / 864e5).toFixed(1) + " days"; - } else if (t >= 36e5) { - return (t / 36e5).toFixed(1) + " hours"; - } else if (t >= 6e4) { - return (t / 6e4).toFixed(1) + " minutes"; - } - return (t / 1e3).toFixed(1) + " seconds"; - } - case "long": { - var a = [], - s = ((t % 6e4) / 1e3) >> 0, - m = ((t % 36e5) / 6e4) >> 0; - a.push(pad("0", 2, s)); - if (t >= 36e5) { - var h = ((t % 864e5) / 36e5) >> 0; - a.push(pad("0", 2, m)); - if (t >= 864e5) { - a.push(pad("0", 2, h)); - a.push(Math.floor(t / 864e5).toFixed()); - } else { - a.push(h.toFixed()); - } - } else { - a.push(m.toFixed()); - } - return a.reverse().join(":"); - } - } - } - - /** - * Formats the specified time, returning the string representation. - * - * @function - * @name pv.Format.time.prototype.format - * @param {number} t the duration in milliseconds. May also be a Date. - * @returns {string} the formatted string. - */ - format.format = format; - - /** - * Parses the specified string, returning the time in milliseconds. - * - * @function - * @name pv.Format.time.prototype.parse - * @param {string} s a formatted string. - * @returns {number} the parsed duration in milliseconds. - */ - format.parse = function(s) { - switch (type) { - case "short": { - var re = /([0-9,.]+)\s*([a-z]+)/g, a, t = 0; - while (a = re.exec(s)) { - var f = parseFloat(a[0].replace(",", "")), u = 0; - switch (a[2].toLowerCase()) { - case "year": case "years": u = 31536e6; break; - case "week": case "weeks": u = 6048e5; break; - case "day": case "days": u = 864e5; break; - case "hour": case "hours": u = 36e5; break; - case "minute": case "minutes": u = 6e4; break; - case "second": case "seconds": u = 1e3; break; - } - t += f * u; - } - return t; - } - case "long": { - var a = s.replace(",", "").split(":").reverse(), t = 0; - if (a.length) t += parseFloat(a[0]) * 1e3; - if (a.length > 1) t += parseFloat(a[1]) * 6e4; - if (a.length > 2) t += parseFloat(a[2]) * 36e5; - if (a.length > 3) t += parseFloat(a[3]) * 864e5; - return t; - } - } - } - - return format; -}; -/** - * Returns a default number format. - * - * @class Represents a number format, converting between a number and a - * string. This class allows numbers to be formatted with variable - * precision (both for the integral and fractional part of the number), optional - * thousands grouping, and optional padding. The thousands (",") and decimal - * (".") separator can be customized. - * - * @returns {pv.Format.number} a number format. - */ -pv.Format.number = function() { - var mini = 0, // default minimum integer digits - maxi = Infinity, // default maximum integer digits - mins = 0, // mini, including group separators - minf = 0, // default minimum fraction digits - maxf = 0, // default maximum fraction digits - maxk = 1, // 10^maxf - padi = "0", // default integer pad - padf = "0", // default fraction pad - padg = true, // whether group separator affects integer padding - decimal = ".", // default decimal separator - group = ","; // default group separator - - /** @private */ - function format(x) { - /* Round the fractional part, and split on decimal separator. */ - if (Infinity > maxf) x = Math.round(x * maxk) / maxk; - var s = String(Math.abs(x)).split("."); - - /* Pad, truncate and group the integral part. */ - var i = s[0], n = (x < 0) ? "-" : ""; - if (i.length > maxi) i = i.substring(i.length - maxi); - if (padg && (i.length < mini)) i = n + new Array(mini - i.length + 1).join(padi) + i; - if (i.length > 3) i = i.replace(/\B(?=(?:\d{3})+(?!\d))/g, group); - if (!padg && (i.length < mins)) i = new Array(mins - i.length + 1).join(padi) + n + i; - s[0] = i; - - /* Pad the fractional part. */ - var f = s[1] || ""; - if (f.length < minf) s[1] = f + new Array(minf - f.length + 1).join(padf); - - return s.join(decimal); - } - - /** - * @function - * @name pv.Format.number.prototype.format - * @param {number} x - * @returns {string} - */ - format.format = format; - - /** - * Parses the specified string as a number. Before parsing, leading and - * trailing padding is removed. Group separators are also removed, and the - * decimal separator is replaced with the standard point ("."). The integer - * part is truncated per the maximum integer digits, and the fraction part is - * rounded per the maximum fraction digits. - * - * @function - * @name pv.Format.number.prototype.parse - * @param {string} x the string to parse. - * @returns {number} the parsed number. - */ - format.parse = function(x) { - var re = pv.Format.re; - - /* Remove leading and trailing padding. Split on the decimal separator. */ - var s = String(x) - .replace(new RegExp("^(" + re(padi) + ")*"), "") - .replace(new RegExp("(" + re(padf) + ")*$"), "") - .split(decimal); - - /* Remove grouping and truncate the integral part. */ - var i = s[0].replace(new RegExp(re(group), "g"), ""); - if (i.length > maxi) i = i.substring(i.length - maxi); - - /* Round the fractional part. */ - var f = s[1] ? Number("0." + s[1]) : 0; - if (Infinity > maxf) f = Math.round(f * maxk) / maxk; - - return Math.round(i) + f; - }; - - /** - * Sets or gets the minimum and maximum number of integer digits. This - * controls the number of decimal digits to display before the decimal - * separator for the integral part of the number. If the number of digits is - * smaller than the minimum, the digits are padded; if the number of digits is - * larger, the digits are truncated, showing only the lower-order digits. The - * default range is [0, Infinity]. - * - *

If only one argument is specified to this method, this value is used as - * both the minimum and maximum number. If no arguments are specified, a - * two-element array is returned containing the minimum and the maximum. - * - * @function - * @name pv.Format.number.prototype.integerDigits - * @param {number} [min] the minimum integer digits. - * @param {number} [max] the maximum integer digits. - * @returns {pv.Format.number} this, or the current integer digits. - */ - format.integerDigits = function(min, max) { - if (arguments.length) { - mini = Number(min); - maxi = (arguments.length > 1) ? Number(max) : mini; - mins = mini + Math.floor(mini / 3) * group.length; - return this; - } - return [mini, maxi]; - }; - - /** - * Sets or gets the minimum and maximum number of fraction digits. The - * controls the number of decimal digits to display after the decimal - * separator for the fractional part of the number. If the number of digits is - * smaller than the minimum, the digits are padded; if the number of digits is - * larger, the fractional part is rounded, showing only the higher-order - * digits. The default range is [0, 0]. - * - *

If only one argument is specified to this method, this value is used as - * both the minimum and maximum number. If no arguments are specified, a - * two-element array is returned containing the minimum and the maximum. - * - * @function - * @name pv.Format.number.prototype.fractionDigits - * @param {number} [min] the minimum fraction digits. - * @param {number} [max] the maximum fraction digits. - * @returns {pv.Format.number} this, or the current fraction digits. - */ - format.fractionDigits = function(min, max) { - if (arguments.length) { - minf = Number(min); - maxf = (arguments.length > 1) ? Number(max) : minf; - maxk = Math.pow(10, maxf); - return this; - } - return [minf, maxf]; - }; - - /** - * Sets or gets the character used to pad the integer part. The integer pad is - * used when the number of integer digits is smaller than the minimum. The - * default pad character is "0" (zero). - * - * @param {string} [x] the new pad character. - * @returns {pv.Format.number} this or the current pad character. - */ - format.integerPad = function(x) { - if (arguments.length) { - padi = String(x); - padg = /\d/.test(padi); - return this; - } - return padi; - }; - - /** - * Sets or gets the character used to pad the fration part. The fraction pad - * is used when the number of fraction digits is smaller than the minimum. The - * default pad character is "0" (zero). - * - * @param {string} [x] the new pad character. - * @returns {pv.Format.number} this or the current pad character. - */ - format.fractionPad = function(x) { - if (arguments.length) { - padf = String(x); - return this; - } - return padf; - }; - - /** - * Sets or gets the character used as the decimal point, separating the - * integer and fraction parts of the number. The default decimal point is ".". - * - * @param {string} [x] the new decimal separator. - * @returns {pv.Format.number} this or the current decimal separator. - */ - format.decimal = function(x) { - if (arguments.length) { - decimal = String(x); - return this; - } - return decimal; - }; - - /** - * Sets or gets the character used as the group separator, grouping integer - * digits by thousands. The default decimal point is ",". Grouping can be - * disabled by using "" for the separator. - * - * @param {string} [x] the new group separator. - * @returns {pv.Format.number} this or the current group separator. - */ - format.group = function(x) { - if (arguments.length) { - group = x ? String(x) : ""; - mins = mini + Math.floor(mini / 3) * group.length; - return this; - } - return group; - }; - - return format; -}; -/** - * @private A private variant of Array.prototype.map that supports the index - * property. - */ -pv.map = function(array, f) { - var o = {}; - return f - ? array.map(function(d, i) { o.index = i; return f.call(o, d); }) - : array.slice(); -}; - -/** - * Concatenates the specified array with itself n times. For example, - * pv.repeat([1, 2]) returns [1, 2, 1, 2]. - * - * @param {array} a an array. - * @param {number} [n] the number of times to repeat; defaults to two. - * @returns {array} an array that repeats the specified array. - */ -pv.repeat = function(array, n) { - if (arguments.length == 1) n = 2; - return pv.blend(pv.range(n).map(function() { return array; })); -}; - -/** - * Given two arrays a and b, returns an array of all possible - * pairs of elements [ai, bj]. The outer loop is on array - * a, while the inner loop is on b, such that the order of - * returned elements is [a0, b0], [a0, - * b1], ... [a0, bm], [a1, - * b0], [a1, b1], ... [a1, - * bm], ... [an, bm]. If either array is empty, - * an empty array is returned. - * - * @param {array} a an array. - * @param {array} b an array. - * @returns {array} an array of pairs of elements in a and b. - */ -pv.cross = function(a, b) { - var array = []; - for (var i = 0, n = a.length, m = b.length; i < n; i++) { - for (var j = 0, x = a[i]; j < m; j++) { - array.push([x, b[j]]); - } - } - return array; -}; - -/** - * Given the specified array of arrays, concatenates the arrays into a single - * array. If the individual arrays are explicitly known, an alternative to blend - * is to use JavaScript's concat method directly. These two equivalent - * expressions:

    - * - *
  • pv.blend([[1, 2, 3], ["a", "b", "c"]]) - *
  • [1, 2, 3].concat(["a", "b", "c"]) - * - *
return [1, 2, 3, "a", "b", "c"]. - * - * @param {array[]} arrays an array of arrays. - * @returns {array} an array containing all the elements of each array in - * arrays. - */ -pv.blend = function(arrays) { - return Array.prototype.concat.apply([], arrays); -}; - -/** - * Given the specified array of arrays, transposes each element - * arrayij with arrayji. If the array has dimensions - * n×m, it will have dimensions m×n - * after this method returns. This method transposes the elements of the array - * in place, mutating the array, and returning a reference to the array. - * - * @param {array[]} arrays an array of arrays. - * @returns {array[]} the passed-in array, after transposing the elements. - */ -pv.transpose = function(arrays) { - var n = arrays.length, m = pv.max(arrays, function(d) { return d.length; }); - - if (m > n) { - arrays.length = m; - for (var i = n; i < m; i++) { - arrays[i] = new Array(n); - } - for (var i = 0; i < n; i++) { - for (var j = i + 1; j < m; j++) { - var t = arrays[i][j]; - arrays[i][j] = arrays[j][i]; - arrays[j][i] = t; - } - } - } else { - for (var i = 0; i < m; i++) { - arrays[i].length = n; - } - for (var i = 0; i < n; i++) { - for (var j = 0; j < i; j++) { - var t = arrays[i][j]; - arrays[i][j] = arrays[j][i]; - arrays[j][i] = t; - } - } - } - - arrays.length = m; - for (var i = 0; i < m; i++) { - arrays[i].length = n; - } - - return arrays; -}; - -/** - * Returns a normalized copy of the specified array, such that the sum of the - * returned elements sum to one. If the specified array is not an array of - * numbers, an optional accessor function f can be specified to map the - * elements to numbers. For example, if array is an array of objects, - * and each object has a numeric property "foo", the expression - * - *
pv.normalize(array, function(d) d.foo)
- * - * returns a normalized array on the "foo" property. If an accessor function is - * not specified, the identity function is used. Accessor functions can refer to - * this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number[]} an array of numbers that sums to one. - */ -pv.normalize = function(array, f) { - var norm = pv.map(array, f), sum = pv.sum(norm); - for (var i = 0; i < norm.length; i++) norm[i] /= sum; - return norm; -}; - -/** - * Returns a permutation of the specified array, using the specified array of - * indexes. The returned array contains the corresponding element in - * array for each index in indexes, in order. For example, - * - *
pv.permute(["a", "b", "c"], [1, 2, 0])
- * - * returns ["b", "c", "a"]. It is acceptable for the array of indexes - * to be a different length from the array of elements, and for indexes to be - * duplicated or omitted. The optional accessor function f can be used - * to perform a simultaneous mapping of the array elements. Accessor functions - * can refer to this.index. - * - * @param {array} array an array. - * @param {number[]} indexes an array of indexes into array. - * @param {function} [f] an optional accessor function. - * @returns {array} an array of elements from array; a permutation. - */ -pv.permute = function(array, indexes, f) { - if (!f) f = pv.identity; - var p = new Array(indexes.length), o = {}; - indexes.forEach(function(j, i) { o.index = j; p[i] = f.call(o, array[j]); }); - return p; -}; - -/** - * Returns a map from key to index for the specified keys array. For - * example, - * - *
pv.numerate(["a", "b", "c"])
- * - * returns {a: 0, b: 1, c: 2}. Note that since JavaScript maps only - * support string keys, keys must contain strings, or other values that - * naturally map to distinct string values. Alternatively, an optional accessor - * function f can be specified to compute the string key for the given - * element. Accessor functions can refer to this.index. - * - * @param {array} keys an array, usually of string keys. - * @param {function} [f] an optional key function. - * @returns a map from key to index. - */ -pv.numerate = function(keys, f) { - if (!f) f = pv.identity; - var map = {}, o = {}; - keys.forEach(function(x, i) { o.index = i; map[f.call(o, x)] = i; }); - return map; -}; - -/** - * Returns the unique elements in the specified array, in the order they appear. - * Note that since JavaScript maps only support string keys, array must - * contain strings, or other values that naturally map to distinct string - * values. Alternatively, an optional accessor function f can be - * specified to compute the string key for the given element. Accessor functions - * can refer to this.index. - * - * @param {array} array an array, usually of string keys. - * @param {function} [f] an optional key function. - * @returns {array} the unique values. - */ -pv.uniq = function(array, f) { - if (!f) f = pv.identity; - var map = {}, keys = [], o = {}, y; - array.forEach(function(x, i) { - o.index = i; - y = f.call(o, x); - if (!(y in map)) map[y] = keys.push(y); - }); - return keys; -}; - -/** - * The comparator function for natural order. This can be used in conjunction with - * the built-in array sort method to sort elements by their natural - * order, ascending. Note that if no comparator function is specified to the - * built-in sort method, the default order is lexicographic, not - * natural! - * - * @see Array.sort. - * @param a an element to compare. - * @param b an element to compare. - * @returns {number} negative if a < b; positive if a > b; otherwise 0. - */ -pv.naturalOrder = function(a, b) { - return (a < b) ? -1 : ((a > b) ? 1 : 0); -}; - -/** - * The comparator function for reverse natural order. This can be used in - * conjunction with the built-in array sort method to sort elements by - * their natural order, descending. Note that if no comparator function is - * specified to the built-in sort method, the default order is - * lexicographic, not natural! - * - * @see #naturalOrder - * @param a an element to compare. - * @param b an element to compare. - * @returns {number} negative if a < b; positive if a > b; otherwise 0. - */ -pv.reverseOrder = function(b, a) { - return (a < b) ? -1 : ((a > b) ? 1 : 0); -}; - -/** - * Searches the specified array of numbers for the specified value using the - * binary search algorithm. The array must be sorted (as by the sort - * method) prior to making this call. If it is not sorted, the results are - * undefined. If the array contains multiple elements with the specified value, - * there is no guarantee which one will be found. - * - *

The insertion point is defined as the point at which the value - * would be inserted into the array: the index of the first element greater than - * the value, or array.length, if all elements in the array are less - * than the specified value. Note that this guarantees that the return value - * will be nonnegative if and only if the value is found. - * - * @param {number[]} array the array to be searched. - * @param {number} value the value to be searched for. - * @returns the index of the search value, if it is contained in the array; - * otherwise, (-(insertion point) - 1). - * @param {function} [f] an optional key function. - */ -pv.search = function(array, value, f) { - if (!f) f = pv.identity; - var low = 0, high = array.length - 1; - while (low <= high) { - var mid = (low + high) >> 1, midValue = f(array[mid]); - if (midValue < value) low = mid + 1; - else if (midValue > value) high = mid - 1; - else return mid; - } - return -low - 1; -}; - -pv.search.index = function(array, value, f) { - var i = pv.search(array, value, f); - return (i < 0) ? (-i - 1) : i; -}; -/** - * Returns an array of numbers, starting at start, incrementing by - * step, until stop is reached. The stop value is - * exclusive. If only a single argument is specified, this value is interpeted - * as the stop value, with the start value as zero. If only two - * arguments are specified, the step value is implied to be one. - * - *

The method is modeled after the built-in range method from - * Python. See the Python documentation for more details. - * - * @see Python range - * @param {number} [start] the start value. - * @param {number} stop the stop value. - * @param {number} [step] the step value. - * @returns {number[]} an array of numbers. - */ -pv.range = function(start, stop, step) { - if (arguments.length == 1) { - stop = start; - start = 0; - } - if (step == undefined) step = 1; - if ((stop - start) / step == Infinity) throw new Error("range must be finite"); - var array = [], i = 0, j; - if (step < 0) { - while ((j = start + step * i++) > stop) { - array.push(j); - } - } else { - while ((j = start + step * i++) < stop) { - array.push(j); - } - } - return array; -}; - -/** - * Returns a random number in the range [start, stop) that is - * a multiple of step. More specifically, the returned number is of the - * form start + n * step, where n is a - * nonnegative integer. If step is not specified, it defaults to 1, - * returning a random integer if start is also an integer. - * - * @param {number} [start] the start value value. - * @param {number} stop the stop value. - * @param {number} [step] the step value. - * @returns {number} a random number between start and stop. - */ -pv.random = function(start, stop, step) { - if (arguments.length == 1) { - stop = start; - start = 0; - } - if (step == undefined) step = 1; - return step - ? (Math.floor(Math.random() * (stop - start) / step) * step + start) - : (Math.random() * (stop - start) + start); -}; - -/** - * Returns the sum of the specified array. If the specified array is not an - * array of numbers, an optional accessor function f can be specified - * to map the elements to numbers. See {@link #normalize} for an example. - * Accessor functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the sum of the specified array. - */ -pv.sum = function(array, f) { - var o = {}; - return array.reduce(f - ? function(p, d, i) { o.index = i; return p + f.call(o, d); } - : function(p, d) { return p + d; }, 0); -}; - -/** - * Returns the maximum value of the specified array. If the specified array is - * not an array of numbers, an optional accessor function f can be - * specified to map the elements to numbers. See {@link #normalize} for an - * example. Accessor functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the maximum value of the specified array. - */ -pv.max = function(array, f) { - if (f == pv.index) return array.length - 1; - return Math.max.apply(null, f ? pv.map(array, f) : array); -}; - -/** - * Returns the index of the maximum value of the specified array. If the - * specified array is not an array of numbers, an optional accessor function - * f can be specified to map the elements to numbers. See - * {@link #normalize} for an example. Accessor functions can refer to - * this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the index of the maximum value of the specified array. - */ -pv.max.index = function(array, f) { - if (!array.length) return -1; - if (f == pv.index) return array.length - 1; - if (!f) f = pv.identity; - var maxi = 0, maxx = -Infinity, o = {}; - for (var i = 0; i < array.length; i++) { - o.index = i; - var x = f.call(o, array[i]); - if (x > maxx) { - maxx = x; - maxi = i; - } - } - return maxi; -} - -/** - * Returns the minimum value of the specified array of numbers. If the specified - * array is not an array of numbers, an optional accessor function f - * can be specified to map the elements to numbers. See {@link #normalize} for - * an example. Accessor functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the minimum value of the specified array. - */ -pv.min = function(array, f) { - if (f == pv.index) return 0; - return Math.min.apply(null, f ? pv.map(array, f) : array); -}; - -/** - * Returns the index of the minimum value of the specified array. If the - * specified array is not an array of numbers, an optional accessor function - * f can be specified to map the elements to numbers. See - * {@link #normalize} for an example. Accessor functions can refer to - * this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the index of the minimum value of the specified array. - */ -pv.min.index = function(array, f) { - if (!array.length) return -1; - if (f == pv.index) return 0; - if (!f) f = pv.identity; - var mini = 0, minx = Infinity, o = {}; - for (var i = 0; i < array.length; i++) { - o.index = i; - var x = f.call(o, array[i]); - if (x < minx) { - minx = x; - mini = i; - } - } - return mini; -} - -/** - * Returns the arithmetic mean, or average, of the specified array. If the - * specified array is not an array of numbers, an optional accessor function - * f can be specified to map the elements to numbers. See - * {@link #normalize} for an example. Accessor functions can refer to - * this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the mean of the specified array. - */ -pv.mean = function(array, f) { - return pv.sum(array, f) / array.length; -}; - -/** - * Returns the median of the specified array. If the specified array is not an - * array of numbers, an optional accessor function f can be specified - * to map the elements to numbers. See {@link #normalize} for an example. - * Accessor functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the median of the specified array. - */ -pv.median = function(array, f) { - if (f == pv.index) return (array.length - 1) / 2; - array = pv.map(array, f).sort(pv.naturalOrder); - if (array.length % 2) return array[Math.floor(array.length / 2)]; - var i = array.length / 2; - return (array[i - 1] + array[i]) / 2; -}; - -/** - * Returns the unweighted variance of the specified array. If the specified - * array is not an array of numbers, an optional accessor function f - * can be specified to map the elements to numbers. See {@link #normalize} for - * an example. Accessor functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the variance of the specified array. - */ -pv.variance = function(array, f) { - if (array.length < 1) return NaN; - if (array.length == 1) return 0; - var mean = pv.mean(array, f), sum = 0, o = {}; - if (!f) f = pv.identity; - for (var i = 0; i < array.length; i++) { - o.index = i; - var d = f.call(o, array[i]) - mean; - sum += d * d; - } - return sum; -}; - -/** - * Returns an unbiased estimation of the standard deviation of a population, - * given the specified random sample. If the specified array is not an array of - * numbers, an optional accessor function f can be specified to map the - * elements to numbers. See {@link #normalize} for an example. Accessor - * functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the standard deviation of the specified array. - */ -pv.deviation = function(array, f) { - return Math.sqrt(pv.variance(array, f) / (array.length - 1)); -}; - -/** - * Returns the logarithm with a given base value. - * - * @param {number} x the number for which to compute the logarithm. - * @param {number} b the base of the logarithm. - * @returns {number} the logarithm value. - */ -pv.log = function(x, b) { - return Math.log(x) / Math.log(b); -}; - -/** - * Computes a zero-symmetric logarithm. Computes the logarithm of the absolute - * value of the input, and determines the sign of the output according to the - * sign of the input value. - * - * @param {number} x the number for which to compute the logarithm. - * @param {number} b the base of the logarithm. - * @returns {number} the symmetric log value. - */ -pv.logSymmetric = function(x, b) { - return (x == 0) ? 0 : ((x < 0) ? -pv.log(-x, b) : pv.log(x, b)); -}; - -/** - * Computes a zero-symmetric logarithm, with adjustment to values between zero - * and the logarithm base. This adjustment introduces distortion for values less - * than the base number, but enables simultaneous plotting of log-transformed - * data involving both positive and negative numbers. - * - * @param {number} x the number for which to compute the logarithm. - * @param {number} b the base of the logarithm. - * @returns {number} the adjusted, symmetric log value. - */ -pv.logAdjusted = function(x, b) { - if (!isFinite(x)) return x; - var negative = x < 0; - if (x < b) x += (b - x) / b; - return negative ? -pv.log(x, b) : pv.log(x, b); -}; - -/** - * Rounds an input value down according to its logarithm. The method takes the - * floor of the logarithm of the value and then uses the resulting value as an - * exponent for the base value. - * - * @param {number} x the number for which to compute the logarithm floor. - * @param {number} b the base of the logarithm. - * @returns {number} the rounded-by-logarithm value. - */ -pv.logFloor = function(x, b) { - return (x > 0) - ? Math.pow(b, Math.floor(pv.log(x, b))) - : -Math.pow(b, -Math.floor(-pv.log(-x, b))); -}; - -/** - * Rounds an input value up according to its logarithm. The method takes the - * ceiling of the logarithm of the value and then uses the resulting value as an - * exponent for the base value. - * - * @param {number} x the number for which to compute the logarithm ceiling. - * @param {number} b the base of the logarithm. - * @returns {number} the rounded-by-logarithm value. - */ -pv.logCeil = function(x, b) { - return (x > 0) - ? Math.pow(b, Math.ceil(pv.log(x, b))) - : -Math.pow(b, -Math.ceil(-pv.log(-x, b))); -}; - -(function() { - var radians = Math.PI / 180, - degrees = 180 / Math.PI; - - /** Returns the number of radians corresponding to the specified degrees. */ - pv.radians = function(degrees) { return radians * degrees; }; - - /** Returns the number of degrees corresponding to the specified radians. */ - pv.degrees = function(radians) { return degrees * radians; }; -})(); -/** - * Returns all of the property names (keys) of the specified object (a map). The - * order of the returned array is not defined. - * - * @param map an object. - * @returns {string[]} an array of strings corresponding to the keys. - * @see #entries - */ -pv.keys = function(map) { - var array = []; - for (var key in map) { - array.push(key); - } - return array; -}; - -/** - * Returns all of the entries (key-value pairs) of the specified object (a - * map). The order of the returned array is not defined. Each key-value pair is - * represented as an object with key and value attributes, - * e.g., {key: "foo", value: 42}. - * - * @param map an object. - * @returns {array} an array of key-value pairs corresponding to the keys. - */ -pv.entries = function(map) { - var array = []; - for (var key in map) { - array.push({ key: key, value: map[key] }); - } - return array; -}; - -/** - * Returns all of the values (attribute values) of the specified object (a - * map). The order of the returned array is not defined. - * - * @param map an object. - * @returns {array} an array of objects corresponding to the values. - * @see #entries - */ -pv.values = function(map) { - var array = []; - for (var key in map) { - array.push(map[key]); - } - return array; -}; - -/** - * Returns a map constructed from the specified keys, using the - * function f to compute the value for each key. The single argument to - * the value function is the key. The callback is invoked only for indexes of - * the array which have assigned values; it is not invoked for indexes which - * have been deleted or which have never been assigned values. - * - *

For example, this expression creates a map from strings to string length: - * - *

pv.dict(["one", "three", "seventeen"], function(s) s.length)
- * - * The returned value is {one: 3, three: 5, seventeen: 9}. Accessor - * functions can refer to this.index. - * - * @param {array} keys an array. - * @param {function} f a value function. - * @returns a map from keys to values. - */ -pv.dict = function(keys, f) { - var m = {}, o = {}; - for (var i = 0; i < keys.length; i++) { - if (i in keys) { - var k = keys[i]; - o.index = i; - m[k] = f.call(o, k); - } - } - return m; -}; -/** - * Returns a {@link pv.Dom} operator for the given map. This is a convenience - * factory method, equivalent to new pv.Dom(map). To apply the operator - * and retrieve the root node, call {@link pv.Dom#root}; to retrieve all nodes - * flattened, use {@link pv.Dom#nodes}. - * - * @see pv.Dom - * @param map a map from which to construct a DOM. - * @returns {pv.Dom} a DOM operator for the specified map. - */ -pv.dom = function(map) { - return new pv.Dom(map); -}; - -/** - * Constructs a DOM operator for the specified map. This constructor should not - * be invoked directly; use {@link pv.dom} instead. - * - * @class Represets a DOM operator for the specified map. This allows easy - * transformation of a hierarchical JavaScript object (such as a JSON map) to a - * W3C Document Object Model hierarchy. For more information on which attributes - * and methods from the specification are supported, see {@link pv.Dom.Node}. - * - *

Leaves in the map are determined using an associated leaf function; - * see {@link #leaf}. By default, leaves are any value whose type is not - * "object", such as numbers or strings. - * - * @param map a map from which to construct a DOM. - */ -pv.Dom = function(map) { - this.$map = map; -}; - -/** @private The default leaf function. */ -pv.Dom.prototype.$leaf = function(n) { - return typeof n != "object"; -}; - -/** - * Sets or gets the leaf function for this DOM operator. The leaf function - * identifies which values in the map are leaves, and which are internal nodes. - * By default, objects are considered internal nodes, and primitives (such as - * numbers and strings) are considered leaves. - * - * @param {function} f the new leaf function. - * @returns the current leaf function, or this. - */ -pv.Dom.prototype.leaf = function(f) { - if (arguments.length) { - this.$leaf = f; - return this; - } - return this.$leaf; -}; - -/** - * Applies the DOM operator, returning the root node. - * - * @returns {pv.Dom.Node} the root node. - * @param {string} [nodeName] optional node name for the root. - */ -pv.Dom.prototype.root = function(nodeName) { - var leaf = this.$leaf, root = recurse(this.$map); - - /** @private */ - function recurse(map) { - var n = new pv.Dom.Node(); - for (var k in map) { - var v = map[k]; - n.appendChild(leaf(v) ? new pv.Dom.Node(v) : recurse(v)).nodeName = k; - } - return n; - } - - root.nodeName = nodeName; - return root; -}; - -/** - * Applies the DOM operator, returning the array of all nodes in preorder - * traversal. - * - * @returns {array} the array of nodes in preorder traversal. - */ -pv.Dom.prototype.nodes = function() { - return this.root().nodes(); -}; - -/** - * Constructs a DOM node for the specified value. Instances of this class are - * not typically created directly; instead they are generated from a JavaScript - * map using the {@link pv.Dom} operator. - * - * @class Represents a Node in the W3C Document Object Model. - */ -pv.Dom.Node = function(value) { - this.nodeValue = value; - this.childNodes = []; -}; - -/** - * The node name. When generated from a map, the node name corresponds to the - * key at the given level in the map. Note that the root node has no associated - * key, and thus has an undefined node name (and no parentNode). - * - * @type string - * @field pv.Dom.Node.prototype.nodeName - */ - -/** - * The node value. When generated from a map, node value corresponds to the leaf - * value for leaf nodes, and is undefined for internal nodes. - * - * @field pv.Dom.Node.prototype.nodeValue - */ - -/** - * The array of child nodes. This array is empty for leaf nodes. An easy way to - * check if child nodes exist is to query firstChild. - * - * @type array - * @field pv.Dom.Node.prototype.childNodes - */ - -/** - * The parent node, which is null for root nodes. - * - * @type pv.Dom.Node - */ -pv.Dom.Node.prototype.parentNode = null; - -/** - * The first child, which is null for leaf nodes. - * - * @type pv.Dom.Node - */ -pv.Dom.Node.prototype.firstChild = null; - -/** - * The last child, which is null for leaf nodes. - * - * @type pv.Dom.Node - */ -pv.Dom.Node.prototype.lastChild = null; - -/** - * The previous sibling node, which is null for the first child. - * - * @type pv.Dom.Node - */ -pv.Dom.Node.prototype.previousSibling = null; - -/** - * The next sibling node, which is null for the last child. - * - * @type pv.Dom.Node - */ -pv.Dom.Node.prototype.nextSibling = null; - -/** - * Removes the specified child node from this node. - * - * @throws Error if the specified child is not a child of this node. - * @returns {pv.Dom.Node} the removed child. - */ -pv.Dom.Node.prototype.removeChild = function(n) { - var i = this.childNodes.indexOf(n); - if (i == -1) throw new Error("child not found"); - this.childNodes.splice(i, 1); - if (n.previousSibling) n.previousSibling.nextSibling = n.nextSibling; - else this.firstChild = n.nextSibling; - if (n.nextSibling) n.nextSibling.previousSibling = n.previousSibling; - else this.lastChild = n.previousSibling; - delete n.nextSibling; - delete n.previousSibling; - delete n.parentNode; - return n; -}; - -/** - * Appends the specified child node to this node. If the specified child is - * already part of the DOM, the child is first removed before being added to - * this node. - * - * @returns {pv.Dom.Node} the appended child. - */ -pv.Dom.Node.prototype.appendChild = function(n) { - if (n.parentNode) n.parentNode.removeChild(n); - n.parentNode = this; - n.previousSibling = this.lastChild; - if (this.lastChild) this.lastChild.nextSibling = n; - else this.firstChild = n; - this.lastChild = n; - this.childNodes.push(n); - return n; -}; - -/** - * Inserts the specified child n before the given reference child - * r of this node. If r is null, this method is equivalent to - * {@link #appendChild}. If n is already part of the DOM, it is first - * removed before being inserted. - * - * @throws Error if r is non-null and not a child of this node. - * @returns {pv.Dom.Node} the inserted child. - */ -pv.Dom.Node.prototype.insertBefore = function(n, r) { - if (!r) return this.appendChild(n); - var i = this.childNodes.indexOf(r); - if (i == -1) throw new Error("child not found"); - if (n.parentNode) n.parentNode.removeChild(n); - n.parentNode = this; - n.nextSibling = r; - n.previousSibling = r.previousSibling; - if (r.previousSibling) { - r.previousSibling.nextSibling = n; - } else { - if (r == this.lastChild) this.lastChild = n; - this.firstChild = n; - } - this.childNodes.splice(i, 0, n); - return n; -}; - -/** - * Replaces the specified child r of this node with the node n. If - * n is already part of the DOM, it is first removed before being added. - * - * @throws Error if r is not a child of this node. - */ -pv.Dom.Node.prototype.replaceChild = function(n, r) { - var i = this.childNodes.indexOf(r); - if (i == -1) throw new Error("child not found"); - if (n.parentNode) n.parentNode.removeChild(n); - n.parentNode = this; - n.nextSibling = r.nextSibling; - n.previousSibling = r.previousSibling; - if (r.previousSibling) r.previousSibling.nextSibling = n; - else this.firstChild = n; - if (r.nextSibling) r.nextSibling.previousSibling = n; - else this.lastChild = n; - this.childNodes[i] = n; - return r; -}; - -/** - * Visits each node in the tree in preorder traversal, applying the specified - * function f. The arguments to the function are:

    - * - *
  1. The current node. - *
  2. The current depth, starting at 0 for the root node.
- * - * @param {function} f a function to apply to each node. - */ -pv.Dom.Node.prototype.visitBefore = function(f) { - function visit(n, i) { - f(n, i); - for (var c = n.firstChild; c; c = c.nextSibling) { - visit(c, i + 1); - } - } - visit(this, 0); -}; - -/** - * Visits each node in the tree in postorder traversal, applying the specified - * function f. The arguments to the function are:
    - * - *
  1. The current node. - *
  2. The current depth, starting at 0 for the root node.
- * - * @param {function} f a function to apply to each node. - */ -pv.Dom.Node.prototype.visitAfter = function(f) { - function visit(n, i) { - for (var c = n.firstChild; c; c = c.nextSibling) { - visit(c, i + 1); - } - f(n, i); - } - visit(this, 0); -}; - -/** - * Sorts child nodes of this node, and all descendent nodes recursively, using - * the specified comparator function f. The comparator function is - * passed two nodes to compare. - * - *

Note: during the sort operation, the comparator function should not rely - * on the tree being well-formed; the values of previousSibling and - * nextSibling for the nodes being compared are not defined during the - * sort operation. - * - * @param {function} f a comparator function. - * @returns this. - */ -pv.Dom.Node.prototype.sort = function(f) { - if (this.firstChild) { - this.childNodes.sort(f); - var p = this.firstChild = this.childNodes[0], c; - delete p.previousSibling; - for (var i = 1; i < this.childNodes.length; i++) { - p.sort(f); - c = this.childNodes[i]; - c.previousSibling = p; - p = p.nextSibling = c; - } - this.lastChild = p; - delete p.nextSibling; - p.sort(f); - } - return this; -}; - -/** - * Reverses all sibling nodes. - * - * @returns this. - */ -pv.Dom.Node.prototype.reverse = function() { - var childNodes = []; - this.visitAfter(function(n) { - while (n.lastChild) childNodes.push(n.removeChild(n.lastChild)); - for (var c; c = childNodes.pop();) n.insertBefore(c, n.firstChild); - }); - return this; -}; - -/** Returns all descendants of this node in preorder traversal. */ -pv.Dom.Node.prototype.nodes = function() { - var array = []; - - /** @private */ - function flatten(node) { - array.push(node); - node.childNodes.forEach(flatten); - } - - flatten(this, array); - return array; -}; - -/** - * Toggles the child nodes of this node. If this node is not yet toggled, this - * method removes all child nodes and appends them to a new toggled - * array attribute on this node. Otherwise, if this node is toggled, this method - * re-adds all toggled child nodes and deletes the toggled attribute. - * - *

This method has no effect if the node has no child nodes. - * - * @param {boolean} [recursive] whether the toggle should apply to descendants. - */ -pv.Dom.Node.prototype.toggle = function(recursive) { - if (recursive) return this.toggled - ? this.visitBefore(function(n) { if (n.toggled) n.toggle(); }) - : this.visitAfter(function(n) { if (!n.toggled) n.toggle(); }); - var n = this; - if (n.toggled) { - for (var c; c = n.toggled.pop();) n.appendChild(c); - delete n.toggled; - } else if (n.lastChild) { - n.toggled = []; - while (n.lastChild) n.toggled.push(n.removeChild(n.lastChild)); - } -}; - -/** - * Given a flat array of values, returns a simple DOM with each value wrapped by - * a node that is a child of the root node. - * - * @param {array} values. - * @returns {array} nodes. - */ -pv.nodes = function(values) { - var root = new pv.Dom.Node(); - for (var i = 0; i < values.length; i++) { - root.appendChild(new pv.Dom.Node(values[i])); - } - return root.nodes(); -}; -/** - * Returns a {@link pv.Tree} operator for the specified array. This is a - * convenience factory method, equivalent to new pv.Tree(array). - * - * @see pv.Tree - * @param {array} array an array from which to construct a tree. - * @returns {pv.Tree} a tree operator for the specified array. - */ -pv.tree = function(array) { - return new pv.Tree(array); -}; - -/** - * Constructs a tree operator for the specified array. This constructor should - * not be invoked directly; use {@link pv.tree} instead. - * - * @class Represents a tree operator for the specified array. The tree operator - * allows a hierarchical map to be constructed from an array; it is similar to - * the {@link pv.Nest} operator, except the hierarchy is derived dynamically - * from the array elements. - * - *

For example, given an array of size information for ActionScript classes: - * - *

{ name: "flare.flex.FlareVis", size: 4116 },
- * { name: "flare.physics.DragForce", size: 1082 },
- * { name: "flare.physics.GravityForce", size: 1336 }, ...
- * - * To facilitate visualization, it may be useful to nest the elements by their - * package hierarchy: - * - *
var tree = pv.tree(classes)
- *     .keys(function(d) d.name.split("."))
- *     .map();
- * - * The resulting tree is: - * - *
{ flare: {
- *     flex: {
- *       FlareVis: {
- *         name: "flare.flex.FlareVis",
- *         size: 4116 } },
- *     physics: {
- *       DragForce: {
- *         name: "flare.physics.DragForce",
- *         size: 1082 },
- *       GravityForce: {
- *         name: "flare.physics.GravityForce",
- *         size: 1336 } },
- *     ... } }
- * - * By specifying a value function, - * - *
var tree = pv.tree(classes)
- *     .keys(function(d) d.name.split("."))
- *     .value(function(d) d.size)
- *     .map();
- * - * we can further eliminate redundant data: - * - *
{ flare: {
- *     flex: {
- *       FlareVis: 4116 },
- *     physics: {
- *       DragForce: 1082,
- *       GravityForce: 1336 },
- *   ... } }
- * - * For visualizations with large data sets, performance improvements may be seen - * by storing the data in a tree format, and then flattening it into an array at - * runtime with {@link pv.Flatten}. - * - * @param {array} array an array from which to construct a tree. - */ -pv.Tree = function(array) { - this.array = array; -}; - -/** - * Assigns a keys function to this operator; required. The keys function - * returns an array of strings for each element in the associated - * array; these keys determine how the elements are nested in the tree. The - * returned keys should be unique for each element in the array; otherwise, the - * behavior of this operator is undefined. - * - * @param {function} k the keys function. - * @returns {pv.Tree} this. - */ -pv.Tree.prototype.keys = function(k) { - this.k = k; - return this; -}; - -/** - * Assigns a value function to this operator; optional. The value - * function specifies an optional transformation of the element in the array - * before it is inserted into the map. If no value function is specified, it is - * equivalent to using the identity function. - * - * @param {function} k the value function. - * @returns {pv.Tree} this. - */ -pv.Tree.prototype.value = function(v) { - this.v = v; - return this; -}; - -/** - * Returns a hierarchical map of values. The hierarchy is determined by the keys - * function; the values in the map are determined by the value function. - * - * @returns a hierarchical map of values. - */ -pv.Tree.prototype.map = function() { - var map = {}, o = {}; - for (var i = 0; i < this.array.length; i++) { - o.index = i; - var value = this.array[i], keys = this.k.call(o, value), node = map; - for (var j = 0; j < keys.length - 1; j++) { - node = node[keys[j]] || (node[keys[j]] = {}); - } - node[keys[j]] = this.v ? this.v.call(o, value) : value; - } - return map; -}; -/** - * Returns a {@link pv.Nest} operator for the specified array. This is a - * convenience factory method, equivalent to new pv.Nest(array). - * - * @see pv.Nest - * @param {array} array an array of elements to nest. - * @returns {pv.Nest} a nest operator for the specified array. - */ -pv.nest = function(array) { - return new pv.Nest(array); -}; - -/** - * Constructs a nest operator for the specified array. This constructor should - * not be invoked directly; use {@link pv.nest} instead. - * - * @class Represents a {@link Nest} operator for the specified array. Nesting - * allows elements in an array to be grouped into a hierarchical tree - * structure. The levels in the tree are specified by key functions. The - * leaf nodes of the tree can be sorted by value, while the internal nodes can - * be sorted by key. Finally, the tree can be returned either has a - * multidimensional array via {@link #entries}, or as a hierarchical map via - * {@link #map}. The {@link #rollup} routine similarly returns a map, collapsing - * the elements in each leaf node using a summary function. - * - *

For example, consider the following tabular data structure of Barley - * yields, from various sites in Minnesota during 1931-2: - * - *

{ yield: 27.00, variety: "Manchuria", year: 1931, site: "University Farm" },
- * { yield: 48.87, variety: "Manchuria", year: 1931, site: "Waseca" },
- * { yield: 27.43, variety: "Manchuria", year: 1931, site: "Morris" }, ...
- * - * To facilitate visualization, it may be useful to nest the elements first by - * year, and then by variety, as follows: - * - *
var nest = pv.nest(yields)
- *     .key(function(d) d.year)
- *     .key(function(d) d.variety)
- *     .entries();
- * - * This returns a nested array. Each element of the outer array is a key-values - * pair, listing the values for each distinct key: - * - *
{ key: 1931, values: [
- *   { key: "Manchuria", values: [
- *       { yield: 27.00, variety: "Manchuria", year: 1931, site: "University Farm" },
- *       { yield: 48.87, variety: "Manchuria", year: 1931, site: "Waseca" },
- *       { yield: 27.43, variety: "Manchuria", year: 1931, site: "Morris" },
- *       ...
- *     ] },
- *   { key: "Glabron", values: [
- *       { yield: 43.07, variety: "Glabron", year: 1931, site: "University Farm" },
- *       { yield: 55.20, variety: "Glabron", year: 1931, site: "Waseca" },
- *       ...
- *     ] },
- *   ] },
- * { key: 1932, values: ... }
- * - * Further details, including sorting and rollup, is provided below on the - * corresponding methods. - * - * @param {array} array an array of elements to nest. - */ -pv.Nest = function(array) { - this.array = array; - this.keys = []; -}; - -/** - * Nests using the specified key function. Multiple keys may be added to the - * nest; the array elements will be nested in the order keys are specified. - * - * @param {function} key a key function; must return a string or suitable map - * key. - * @returns {pv.Nest} this. - */ -pv.Nest.prototype.key = function(key) { - this.keys.push(key); - return this; -}; - -/** - * Sorts the previously-added keys. The natural sort order is used by default - * (see {@link pv.naturalOrder}); if an alternative order is desired, - * order should be a comparator function. If this method is not called - * (i.e., keys are unsorted), keys will appear in the order they appear - * in the underlying elements array. For example, - * - *
pv.nest(yields)
- *     .key(function(d) d.year)
- *     .key(function(d) d.variety)
- *     .sortKeys()
- *     .entries()
- * - * groups yield data by year, then variety, and sorts the variety groups - * lexicographically (since the variety attribute is a string). - * - *

Key sort order is only used in conjunction with {@link #entries}, which - * returns an array of key-values pairs. If the nest is used to construct a - * {@link #map} instead, keys are unsorted. - * - * @param {function} [order] an optional comparator function. - * @returns {pv.Nest} this. - */ -pv.Nest.prototype.sortKeys = function(order) { - this.keys[this.keys.length - 1].order = order || pv.naturalOrder; - return this; -}; - -/** - * Sorts the leaf values. The natural sort order is used by default (see - * {@link pv.naturalOrder}); if an alternative order is desired, order - * should be a comparator function. If this method is not called (i.e., values - * are unsorted), values will appear in the order they appear in the - * underlying elements array. For example, - * - *

pv.nest(yields)
- *     .key(function(d) d.year)
- *     .key(function(d) d.variety)
- *     .sortValues(function(a, b) a.yield - b.yield)
- *     .entries()
- * - * groups yield data by year, then variety, and sorts the values for each - * variety group by yield. - * - *

Value sort order, unlike keys, applies to both {@link #entries} and - * {@link #map}. It has no effect on {@link #rollup}. - * - * @param {function} [order] an optional comparator function. - * @returns {pv.Nest} this. - */ -pv.Nest.prototype.sortValues = function(order) { - this.order = order || pv.naturalOrder; - return this; -}; - -/** - * Returns a hierarchical map of values. Each key adds one level to the - * hierarchy. With only a single key, the returned map will have a key for each - * distinct value of the key function; the correspond value with be an array of - * elements with that key value. If a second key is added, this will be a nested - * map. For example: - * - *

pv.nest(yields)
- *     .key(function(d) d.variety)
- *     .key(function(d) d.site)
- *     .map()
- * - * returns a map m such that m[variety][site] is an array, a subset of - * yields, with each element having the given variety and site. - * - * @returns a hierarchical map of values. - */ -pv.Nest.prototype.map = function() { - var map = {}, values = []; - - /* Build the map. */ - for (var i, j = 0; j < this.array.length; j++) { - var x = this.array[j]; - var m = map; - for (i = 0; i < this.keys.length - 1; i++) { - var k = this.keys[i](x); - if (!m[k]) m[k] = {}; - m = m[k]; - } - k = this.keys[i](x); - if (!m[k]) { - var a = []; - values.push(a); - m[k] = a; - } - m[k].push(x); - } - - /* Sort each leaf array. */ - if (this.order) { - for (var i = 0; i < values.length; i++) { - values[i].sort(this.order); - } - } - - return map; -}; - -/** - * Returns a hierarchical nested array. This method is similar to - * {@link pv.entries}, but works recursively on the entire hierarchy. Rather - * than returning a map like {@link #map}, this method returns a nested - * array. Each element of the array has a key and values - * field. For leaf nodes, the values array will be a subset of the - * underlying elements array; for non-leaf nodes, the values array will - * contain more key-values pairs. - * - *

For an example usage, see the {@link Nest} constructor. - * - * @returns a hierarchical nested array. - */ -pv.Nest.prototype.entries = function() { - - /** Recursively extracts the entries for the given map. */ - function entries(map) { - var array = []; - for (var k in map) { - var v = map[k]; - array.push({ key: k, values: (v instanceof Array) ? v : entries(v) }); - }; - return array; - } - - /** Recursively sorts the values for the given key-values array. */ - function sort(array, i) { - var o = this.keys[i].order; - if (o) array.sort(function(a, b) { return o(a.key, b.key); }); - if (++i < this.keys.length) { - for (var j = 0; j < array.length; j++) { - sort.call(this, array[j].values, i); - } - } - return array; - } - - return sort.call(this, entries(this.map()), 0); -}; - -/** - * Returns a rollup map. The behavior of this method is the same as - * {@link #map}, except that the leaf values are replaced with the return value - * of the specified rollup function f. For example, - * - *

pv.nest(yields)
- *      .key(function(d) d.site)
- *      .rollup(function(v) pv.median(v, function(d) d.yield))
- * - * first groups yield data by site, and then returns a map from site to median - * yield for the given site. - * - * @see #map - * @param {function} f a rollup function. - * @returns a hierarchical map, with the leaf values computed by f. - */ -pv.Nest.prototype.rollup = function(f) { - - /** Recursively descends to the leaf nodes (arrays) and does rollup. */ - function rollup(map) { - for (var key in map) { - var value = map[key]; - if (value instanceof Array) { - map[key] = f(value); - } else { - rollup(value); - } - } - return map; - } - - return rollup(this.map()); -}; -/** - * Returns a {@link pv.Flatten} operator for the specified map. This is a - * convenience factory method, equivalent to new pv.Flatten(map). - * - * @see pv.Flatten - * @param map a map to flatten. - * @returns {pv.Flatten} a flatten operator for the specified map. - */ -pv.flatten = function(map) { - return new pv.Flatten(map); -}; - -/** - * Constructs a flatten operator for the specified map. This constructor should - * not be invoked directly; use {@link pv.flatten} instead. - * - * @class Represents a flatten operator for the specified array. Flattening - * allows hierarchical maps to be flattened into an array. The levels in the - * input tree are specified by key functions. - * - *

For example, consider the following hierarchical data structure of Barley - * yields, from various sites in Minnesota during 1931-2: - * - *

{ 1931: {
- *     Manchuria: {
- *       "University Farm": 27.00,
- *       "Waseca": 48.87,
- *       "Morris": 27.43,
- *       ... },
- *     Glabron: {
- *       "University Farm": 43.07,
- *       "Waseca": 55.20,
- *       ... } },
- *   1932: {
- *     ... } }
- * - * To facilitate visualization, it may be useful to flatten the tree into a - * tabular array: - * - *
var array = pv.flatten(yields)
- *     .key("year")
- *     .key("variety")
- *     .key("site")
- *     .key("yield")
- *     .array();
- * - * This returns an array of object elements. Each element in the array has - * attributes corresponding to this flatten operator's keys: - * - *
{ site: "University Farm", variety: "Manchuria", year: 1931, yield: 27 },
- * { site: "Waseca", variety: "Manchuria", year: 1931, yield: 48.87 },
- * { site: "Morris", variety: "Manchuria", year: 1931, yield: 27.43 },
- * { site: "University Farm", variety: "Glabron", year: 1931, yield: 43.07 },
- * { site: "Waseca", variety: "Glabron", year: 1931, yield: 55.2 }, ...
- * - *

The flatten operator is roughly the inverse of the {@link pv.Nest} and - * {@link pv.Tree} operators. - * - * @param map a map to flatten. - */ -pv.Flatten = function(map) { - this.map = map; - this.keys = []; -}; - -/** - * Flattens using the specified key function. Multiple keys may be added to the - * flatten; the tiers of the underlying tree must correspond to the specified - * keys, in order. The order of the returned array is undefined; however, you - * can easily sort it. - * - * @param {string} key the key name. - * @param {function} [f] an optional value map function. - * @returns {pv.Nest} this. - */ -pv.Flatten.prototype.key = function(key, f) { - this.keys.push({name: key, value: f}); - delete this.$leaf; - return this; -}; - -/** - * Flattens using the specified leaf function. This is an alternative to - * specifying an explicit set of keys; the tiers of the underlying tree will be - * determined dynamically by recursing on the values, and the resulting keys - * will be stored in the entries keys attribute. The leaf function must - * return true for leaves, and false for internal nodes. - * - * @param {function} f a leaf function. - * @returns {pv.Nest} this. - */ -pv.Flatten.prototype.leaf = function(f) { - this.keys.length = 0; - this.$leaf = f; - return this; -}; - -/** - * Returns the flattened array. Each entry in the array is an object; each - * object has attributes corresponding to this flatten operator's keys. - * - * @returns an array of elements from the flattened map. - */ -pv.Flatten.prototype.array = function() { - var entries = [], stack = [], keys = this.keys, leaf = this.$leaf; - - /* Recursively visit using the leaf function. */ - if (leaf) { - function recurse(value, i) { - if (leaf(value)) { - entries.push({keys: stack.slice(), value: value}); - } else { - for (var key in value) { - stack.push(key); - recurse(value[key], i + 1); - stack.pop(); - } - } - } - recurse(this.map, 0); - return entries; - } - - /* Recursively visits the specified value. */ - function visit(value, i) { - if (i < keys.length - 1) { - for (var key in value) { - stack.push(key); - visit(value[key], i + 1); - stack.pop(); - } - } else { - entries.push(stack.concat(value)); - } - } - - visit(this.map, 0); - return entries.map(function(stack) { - var m = {}; - for (var i = 0; i < keys.length; i++) { - var k = keys[i], v = stack[i]; - m[k.name] = k.value ? k.value.call(null, v) : v; - } - return m; - }); -}; -/** - * Returns a {@link pv.Vector} for the specified x and y - * coordinate. This is a convenience factory method, equivalent to new - * pv.Vector(x, y). - * - * @see pv.Vector - * @param {number} x the x coordinate. - * @param {number} y the y coordinate. - * @returns {pv.Vector} a vector for the specified coordinates. - */ -pv.vector = function(x, y) { - return new pv.Vector(x, y); -}; - -/** - * Constructs a {@link pv.Vector} for the specified x and y - * coordinate. This constructor should not be invoked directly; use - * {@link pv.vector} instead. - * - * @class Represents a two-dimensional vector; a 2-tuple ⟨x, - * y⟩. The intent of this class is to simplify vector math. Note that - * in performance-sensitive cases it may be more efficient to represent 2D - * vectors as simple objects with x and y attributes, rather - * than using instances of this class. - * - * @param {number} x the x coordinate. - * @param {number} y the y coordinate. - */ -pv.Vector = function(x, y) { - this.x = x; - this.y = y; -}; - -/** - * Returns a vector perpendicular to this vector: ⟨-y, x⟩. - * - * @returns {pv.Vector} a perpendicular vector. - */ -pv.Vector.prototype.perp = function() { - return new pv.Vector(-this.y, this.x); -}; - -/** - * Returns a normalized copy of this vector: a vector with the same direction, - * but unit length. If this vector has zero length this method returns a copy of - * this vector. - * - * @returns {pv.Vector} a unit vector. - */ -pv.Vector.prototype.norm = function() { - var l = this.length(); - return this.times(l ? (1 / l) : 1); -}; - -/** - * Returns the magnitude of this vector, defined as sqrt(x * x + y * y). - * - * @returns {number} a length. - */ -pv.Vector.prototype.length = function() { - return Math.sqrt(this.x * this.x + this.y * this.y); -}; - -/** - * Returns a scaled copy of this vector: ⟨x * k, y * k⟩. - * To perform the equivalent divide operation, use 1 / k. - * - * @param {number} k the scale factor. - * @returns {pv.Vector} a scaled vector. - */ -pv.Vector.prototype.times = function(k) { - return new pv.Vector(this.x * k, this.y * k); -}; - -/** - * Returns this vector plus the vector v: ⟨x + v.x, y + - * v.y⟩. If only one argument is specified, it is interpreted as the - * vector v. - * - * @param {number} x the x coordinate to add. - * @param {number} y the y coordinate to add. - * @returns {pv.Vector} a new vector. - */ -pv.Vector.prototype.plus = function(x, y) { - return (arguments.length == 1) - ? new pv.Vector(this.x + x.x, this.y + x.y) - : new pv.Vector(this.x + x, this.y + y); -}; - -/** - * Returns this vector minus the vector v: ⟨x - v.x, y - - * v.y⟩. If only one argument is specified, it is interpreted as the - * vector v. - * - * @param {number} x the x coordinate to subtract. - * @param {number} y the y coordinate to subtract. - * @returns {pv.Vector} a new vector. - */ -pv.Vector.prototype.minus = function(x, y) { - return (arguments.length == 1) - ? new pv.Vector(this.x - x.x, this.y - x.y) - : new pv.Vector(this.x - x, this.y - y); -}; - -/** - * Returns the dot product of this vector and the vector v: x * v.x + - * y * v.y. If only one argument is specified, it is interpreted as the - * vector v. - * - * @param {number} x the x coordinate to dot. - * @param {number} y the y coordinate to dot. - * @returns {number} a dot product. - */ -pv.Vector.prototype.dot = function(x, y) { - return (arguments.length == 1) - ? this.x * x.x + this.y * x.y - : this.x * x + this.y * y; -}; -/** - * Returns a new identity transform. - * - * @class Represents a transformation matrix. The transformation matrix is - * limited to expressing translate and uniform scale transforms only; shearing, - * rotation, general affine, and other transforms are not supported. - * - *

The methods on this class treat the transform as immutable, returning a - * copy of the transformation matrix with the specified transform applied. Note, - * alternatively, that the matrix fields can be get and set directly. - */ -pv.Transform = function() {}; -pv.Transform.prototype = {k: 1, x: 0, y: 0}; - -/** - * The scale magnitude; defaults to 1. - * - * @type number - * @name pv.Transform.prototype.k - */ - -/** - * The x-offset; defaults to 0. - * - * @type number - * @name pv.Transform.prototype.x - */ - -/** - * The y-offset; defaults to 0. - * - * @type number - * @name pv.Transform.prototype.y - */ - -/** - * @private The identity transform. - * - * @type pv.Transform - */ -pv.Transform.identity = new pv.Transform(); - -// k 0 x 1 0 a k 0 ka+x -// 0 k y * 0 1 b = 0 k kb+y -// 0 0 1 0 0 1 0 0 1 - -/** - * Returns a translated copy of this transformation matrix. - * - * @param {number} x the x-offset. - * @param {number} y the y-offset. - * @returns {pv.Transform} the translated transformation matrix. - */ -pv.Transform.prototype.translate = function(x, y) { - var v = new pv.Transform(); - v.k = this.k; - v.x = this.k * x + this.x; - v.y = this.k * y + this.y; - return v; -}; - -// k 0 x d 0 0 kd 0 x -// 0 k y * 0 d 0 = 0 kd y -// 0 0 1 0 0 1 0 0 1 - -/** - * Returns a scaled copy of this transformation matrix. - * - * @param {number} k - * @returns {pv.Transform} the scaled transformation matrix. - */ -pv.Transform.prototype.scale = function(k) { - var v = new pv.Transform(); - v.k = this.k * k; - v.x = this.x; - v.y = this.y; - return v; -}; - -/** - * Returns the inverse of this transformation matrix. - * - * @returns {pv.Transform} the inverted transformation matrix. - */ -pv.Transform.prototype.invert = function() { - var v = new pv.Transform(), k = 1 / this.k; - v.k = k; - v.x = -this.x * k; - v.y = -this.y * k; - return v; -}; - -// k 0 x d 0 a kd 0 ka+x -// 0 k y * 0 d b = 0 kd kb+y -// 0 0 1 0 0 1 0 0 1 - -/** - * Returns this matrix post-multiplied by the specified matrix m. - * - * @param {pv.Transform} m - * @returns {pv.Transform} the post-multiplied transformation matrix. - */ -pv.Transform.prototype.times = function(m) { - var v = new pv.Transform(); - v.k = this.k * m.k; - v.x = this.k * m.x + this.x; - v.y = this.k * m.y + this.y; - return v; -}; -/** - * Abstract; see the various scale implementations. - * - * @class Represents a scale; a function that performs a transformation from - * data domain to visual range. For quantitative and quantile scales, the domain - * is expressed as numbers; for ordinal scales, the domain is expressed as - * strings (or equivalently objects with unique string representations). The - * "visual range" may correspond to pixel space, colors, font sizes, and the - * like. - * - *

Note that scales are functions, and thus can be used as properties - * directly, assuming that the data associated with a mark is a number. While - * this is convenient for single-use scales, frequently it is desirable to - * define scales globally: - * - *

var y = pv.Scale.linear(0, 100).range(0, 640);
- * - * The y scale can now be equivalently referenced within a property: - * - *
    .height(function(d) y(d))
- * - * Alternatively, if the data are not simple numbers, the appropriate value can - * be passed to the y scale (e.g., d.foo). The {@link #by} - * method similarly allows the data to be mapped to a numeric value before - * performing the linear transformation. - * - * @see pv.Scale.quantitative - * @see pv.Scale.quantile - * @see pv.Scale.ordinal - * @extends function - */ -pv.Scale = function() {}; - -/** - * @private Returns a function that interpolators from the start value to the - * end value, given a parameter t in [0, 1]. - * - * @param start the start value. - * @param end the end value. - */ -pv.Scale.interpolator = function(start, end) { - if (typeof start == "number") { - return function(t) { - return t * (end - start) + start; - }; - } - - /* For now, assume color. */ - start = pv.color(start).rgb(); - end = pv.color(end).rgb(); - return function(t) { - var a = start.a * (1 - t) + end.a * t; - if (a < 1e-5) a = 0; // avoid scientific notation - return (start.a == 0) ? pv.rgb(end.r, end.g, end.b, a) - : ((end.a == 0) ? pv.rgb(start.r, start.g, start.b, a) - : pv.rgb( - Math.round(start.r * (1 - t) + end.r * t), - Math.round(start.g * (1 - t) + end.g * t), - Math.round(start.b * (1 - t) + end.b * t), a)); - }; -}; - -/** - * Returns a view of this scale by the specified accessor function f. - * Given a scale y, y.by(function(d) d.foo) is equivalent to - * function(d) y(d.foo). - * - *

This method is provided for convenience, such that scales can be - * succinctly defined inline. For example, given an array of data elements that - * have a score attribute with the domain [0, 1], the height property - * could be specified as: - * - *

    .height(pv.Scale.linear().range(0, 480).by(function(d) d.score))
- * - * This is equivalent to: - * - *
    .height(function(d) d.score * 480)
- * - * This method should be used judiciously; it is typically more clear to invoke - * the scale directly, passing in the value to be scaled. - * - * @function - * @name pv.Scale.prototype.by - * @param {function} f an accessor function. - * @returns {pv.Scale} a view of this scale by the specified accessor function. - */ -/** - * Returns a default quantitative, linear, scale for the specified domain. The - * arguments to this constructor are optional, and equivalent to calling - * {@link #domain}. The default domain and range are [0,1]. - * - *

This constructor is typically not used directly; see one of the - * quantitative scale implementations instead. - * - * @class Represents an abstract quantitative scale; a function that performs a - * numeric transformation. This class is typically not used directly; see one of - * the quantitative scale implementations (linear, log, root, etc.) - * instead. A quantitative - * scale represents a 1-dimensional transformation from a numeric domain of - * input data [d0, d1] to a numeric range of - * pixels [r0, r1]. In addition to - * readability, scales offer several useful features: - * - *

1. The range can be expressed in colors, rather than pixels. For example: - * - *

    .fillStyle(pv.Scale.linear(0, 100).range("red", "green"))
- * - * will fill the marks "red" on an input value of 0, "green" on an input value - * of 100, and some color in-between for intermediate values. - * - *

2. The domain and range can be subdivided for a non-uniform - * transformation. For example, you may want a diverging color scale that is - * increasingly red for negative values, and increasingly green for positive - * values: - * - *

    .fillStyle(pv.Scale.linear(-1, 0, 1).range("red", "white", "green"))
- * - * The domain can be specified as a series of n monotonically-increasing - * values; the range must also be specified as n values, resulting in - * n - 1 contiguous linear scales. - * - *

3. Quantitative scales can be inverted for interaction. The - * {@link #invert} method takes a value in the output range, and returns the - * corresponding value in the input domain. This is frequently used to convert - * the mouse location (see {@link pv.Mark#mouse}) to a value in the input - * domain. Note that inversion is only supported for numeric ranges, and not - * colors. - * - *

4. A scale can be queried for reasonable "tick" values. The {@link #ticks} - * method provides a convenient way to get a series of evenly-spaced rounded - * values in the input domain. Frequently these are used in conjunction with - * {@link pv.Rule} to display tick marks or grid lines. - * - *

5. A scale can be "niced" to extend the domain to suitable rounded - * numbers. If the minimum and maximum of the domain are messy because they are - * derived from data, you can use {@link #nice} to round these values down and - * up to even numbers. - * - * @param {number...} domain... optional domain values. - * @see pv.Scale.linear - * @see pv.Scale.log - * @see pv.Scale.root - * @extends pv.Scale - */ -pv.Scale.quantitative = function() { - var d = [0, 1], // default domain - l = [0, 1], // default transformed domain - r = [0, 1], // default range - i = [pv.identity], // default interpolators - type = Number, // default type - n = false, // whether the domain is negative - f = pv.identity, // default forward transform - g = pv.identity, // default inverse transform - tickFormat = String; // default tick formatting function - - /** @private */ - function newDate(x) { - return new Date(x); - } - - /** @private */ - function scale(x) { - var j = pv.search(d, x); - if (j < 0) j = -j - 2; - j = Math.max(0, Math.min(i.length - 1, j)); - return i[j]((f(x) - l[j]) / (l[j + 1] - l[j])); - } - - /** @private */ - scale.transform = function(forward, inverse) { - /** @ignore */ f = function(x) { return n ? -forward(-x) : forward(x); }; - /** @ignore */ g = function(y) { return n ? -inverse(-y) : inverse(y); }; - l = d.map(f); - return this; - }; - - /** - * Sets or gets the input domain. This method can be invoked several ways: - * - *

1. domain(min, ..., max) - * - *

Specifying the domain as a series of numbers is the most explicit and - * recommended approach. Most commonly, two numbers are specified: the minimum - * and maximum value. However, for a diverging scale, or other subdivided - * non-uniform scales, multiple values can be specified. Values can be derived - * from data using {@link pv.min} and {@link pv.max}. For example: - * - *

    .domain(0, pv.max(array))
- * - * An alternative method for deriving minimum and maximum values from data - * follows. - * - *

2. domain(array, minf, maxf) - * - *

When both the minimum and maximum value are derived from data, the - * arguments to the domain method can be specified as the array of - * data, followed by zero, one or two accessor functions. For example, if the - * array of data is just an array of numbers: - * - *

    .domain(array)
- * - * On the other hand, if the array elements are objects representing stock - * values per day, and the domain should consider the stock's daily low and - * daily high: - * - *
    .domain(array, function(d) d.low, function(d) d.high)
- * - * The first method of setting the domain is preferred because it is more - * explicit; setting the domain using this second method should be used only - * if brevity is required. - * - *

3. domain() - * - *

Invoking the domain method with no arguments returns the - * current domain as an array of numbers. - * - * @function - * @name pv.Scale.quantitative.prototype.domain - * @param {number...} domain... domain values. - * @returns {pv.Scale.quantitative} this, or the current domain. - */ - scale.domain = function(array, min, max) { - if (arguments.length) { - var o; // the object we use to infer the domain type - if (array instanceof Array) { - if (arguments.length < 2) min = pv.identity; - if (arguments.length < 3) max = min; - o = array.length && min(array[0]); - d = array.length ? [pv.min(array, min), pv.max(array, max)] : []; - } else { - o = array; - d = Array.prototype.slice.call(arguments).map(Number); - } - if (!d.length) d = [-Infinity, Infinity]; - else if (d.length == 1) d = [d[0], d[0]]; - n = (d[0] || d[d.length - 1]) < 0; - l = d.map(f); - type = (o instanceof Date) ? newDate : Number; - return this; - } - return d.map(type); - }; - - /** - * Sets or gets the output range. This method can be invoked several ways: - * - *

1. range(min, ..., max) - * - *

The range may be specified as a series of numbers or colors. Most - * commonly, two numbers are specified: the minimum and maximum pixel values. - * For a color scale, values may be specified as {@link pv.Color}s or - * equivalent strings. For a diverging scale, or other subdivided non-uniform - * scales, multiple values can be specified. For example: - * - *

    .range("red", "white", "green")
- * - *

Currently, only numbers and colors are supported as range values. The - * number of range values must exactly match the number of domain values, or - * the behavior of the scale is undefined. - * - *

2. range() - * - *

Invoking the range method with no arguments returns the current - * range as an array of numbers or colors. - * - * @function - * @name pv.Scale.quantitative.prototype.range - * @param {...} range... range values. - * @returns {pv.Scale.quantitative} this, or the current range. - */ - scale.range = function() { - if (arguments.length) { - r = Array.prototype.slice.call(arguments); - if (!r.length) r = [-Infinity, Infinity]; - else if (r.length == 1) r = [r[0], r[0]]; - i = []; - for (var j = 0; j < r.length - 1; j++) { - i.push(pv.Scale.interpolator(r[j], r[j + 1])); - } - return this; - } - return r; - }; - - /** - * Inverts the specified value in the output range, returning the - * corresponding value in the input domain. This is frequently used to convert - * the mouse location (see {@link pv.Mark#mouse}) to a value in the input - * domain. Inversion is only supported for numeric ranges, and not colors. - * - *

Note that this method does not do any rounding or bounds checking. If - * the input domain is discrete (e.g., an array index), the returned value - * should be rounded. If the specified y value is outside the range, - * the returned value may be equivalently outside the input domain. - * - * @function - * @name pv.Scale.quantitative.prototype.invert - * @param {number} y a value in the output range (a pixel location). - * @returns {number} a value in the input domain. - */ - scale.invert = function(y) { - var j = pv.search(r, y); - if (j < 0) j = -j - 2; - j = Math.max(0, Math.min(i.length - 1, j)); - return type(g(l[j] + (y - r[j]) / (r[j + 1] - r[j]) * (l[j + 1] - l[j]))); - }; - - /** - * Returns an array of evenly-spaced, suitably-rounded values in the input - * domain. This method attempts to return between 5 and 10 tick values. These - * values are frequently used in conjunction with {@link pv.Rule} to display - * tick marks or grid lines. - * - * @function - * @name pv.Scale.quantitative.prototype.ticks - * @param {number} [m] optional number of desired ticks. - * @returns {number[]} an array input domain values to use as ticks. - */ - scale.ticks = function(m) { - var start = d[0], - end = d[d.length - 1], - reverse = end < start, - min = reverse ? end : start, - max = reverse ? start : end, - span = max - min; - - /* Special case: empty, invalid or infinite span. */ - if (!span || !isFinite(span)) { - if (type == newDate) tickFormat = pv.Format.date("%x"); - return [type(min)]; - } - - /* Special case: dates. */ - if (type == newDate) { - /* Floor the date d given the precision p. */ - function floor(d, p) { - switch (p) { - case 31536e6: d.setMonth(0); - case 2592e6: d.setDate(1); - case 6048e5: if (p == 6048e5) d.setDate(d.getDate() - d.getDay()); - case 864e5: d.setHours(0); - case 36e5: d.setMinutes(0); - case 6e4: d.setSeconds(0); - case 1e3: d.setMilliseconds(0); - } - } - - var precision, format, increment, step = 1; - if (span >= 3 * 31536e6) { - precision = 31536e6; - format = "%Y"; - /** @ignore */ increment = function(d) { d.setFullYear(d.getFullYear() + step); }; - } else if (span >= 3 * 2592e6) { - precision = 2592e6; - format = "%m/%Y"; - /** @ignore */ increment = function(d) { d.setMonth(d.getMonth() + step); }; - } else if (span >= 3 * 6048e5) { - precision = 6048e5; - format = "%m/%d"; - /** @ignore */ increment = function(d) { d.setDate(d.getDate() + 7 * step); }; - } else if (span >= 3 * 864e5) { - precision = 864e5; - format = "%m/%d"; - /** @ignore */ increment = function(d) { d.setDate(d.getDate() + step); }; - } else if (span >= 3 * 36e5) { - precision = 36e5; - format = "%I:%M %p"; - /** @ignore */ increment = function(d) { d.setHours(d.getHours() + step); }; - } else if (span >= 3 * 6e4) { - precision = 6e4; - format = "%I:%M %p"; - /** @ignore */ increment = function(d) { d.setMinutes(d.getMinutes() + step); }; - } else if (span >= 3 * 1e3) { - precision = 1e3; - format = "%I:%M:%S"; - /** @ignore */ increment = function(d) { d.setSeconds(d.getSeconds() + step); }; - } else { - precision = 1; - format = "%S.%Qs"; - /** @ignore */ increment = function(d) { d.setTime(d.getTime() + step); }; - } - tickFormat = pv.Format.date(format); - - var date = new Date(min), dates = []; - floor(date, precision); - - /* If we'd generate too many ticks, skip some!. */ - var n = span / precision; - if (n > 10) { - switch (precision) { - case 36e5: { - step = (n > 20) ? 6 : 3; - date.setHours(Math.floor(date.getHours() / step) * step); - break; - } - case 2592e6: { - step = 3; // seasons - date.setMonth(Math.floor(date.getMonth() / step) * step); - break; - } - case 6e4: { - step = (n > 30) ? 15 : ((n > 15) ? 10 : 5); - date.setMinutes(Math.floor(date.getMinutes() / step) * step); - break; - } - case 1e3: { - step = (n > 90) ? 15 : ((n > 60) ? 10 : 5); - date.setSeconds(Math.floor(date.getSeconds() / step) * step); - break; - } - case 1: { - step = (n > 1000) ? 250 : ((n > 200) ? 100 : ((n > 100) ? 50 : ((n > 50) ? 25 : 5))); - date.setMilliseconds(Math.floor(date.getMilliseconds() / step) * step); - break; - } - default: { - step = pv.logCeil(n / 15, 10); - if (n / step < 2) step /= 5; - else if (n / step < 5) step /= 2; - date.setFullYear(Math.floor(date.getFullYear() / step) * step); - break; - } - } - } - - while (true) { - increment(date); - if (date > max) break; - dates.push(new Date(date)); - } - return reverse ? dates.reverse() : dates; - } - - /* Normal case: numbers. */ - if (!arguments.length) m = 10; - var step = pv.logFloor(span / m, 10), - err = m / (span / step); - if (err <= .15) step *= 10; - else if (err <= .35) step *= 5; - else if (err <= .75) step *= 2; - var start = Math.ceil(min / step) * step, - end = Math.floor(max / step) * step; - tickFormat = pv.Format.number() - .fractionDigits(Math.max(0, -Math.floor(pv.log(step, 10) + .01))); - var ticks = pv.range(start, end + step, step); - return reverse ? ticks.reverse() : ticks; - }; - - /** - * Formats the specified tick value using the appropriate precision, based on - * the step interval between tick marks. If {@link #ticks} has not been called, - * the argument is converted to a string, but no formatting is applied. - * - * @function - * @name pv.Scale.quantitative.prototype.tickFormat - * @param {number} t a tick value. - * @returns {string} a formatted tick value. - */ - scale.tickFormat = function (t) { return tickFormat(t); }; - - /** - * "Nices" this scale, extending the bounds of the input domain to - * evenly-rounded values. Nicing is useful if the domain is computed - * dynamically from data, and may be irregular. For example, given a domain of - * [0.20147987687960267, 0.996679553296417], a call to nice() might - * extend the domain to [0.2, 1]. - * - *

This method must be invoked each time after setting the domain. - * - * @function - * @name pv.Scale.quantitative.prototype.nice - * @returns {pv.Scale.quantitative} this. - */ - scale.nice = function() { - if (d.length != 2) return this; // TODO support non-uniform domains - var start = d[0], - end = d[d.length - 1], - reverse = end < start, - min = reverse ? end : start, - max = reverse ? start : end, - span = max - min; - - /* Special case: empty, invalid or infinite span. */ - if (!span || !isFinite(span)) return this; - - var step = Math.pow(10, Math.round(Math.log(span) / Math.log(10)) - 1); - d = [Math.floor(min / step) * step, Math.ceil(max / step) * step]; - if (reverse) d.reverse(); - l = d.map(f); - return this; - }; - - /** - * Returns a view of this scale by the specified accessor function f. - * Given a scale y, y.by(function(d) d.foo) is equivalent to - * function(d) y(d.foo). - * - *

This method is provided for convenience, such that scales can be - * succinctly defined inline. For example, given an array of data elements - * that have a score attribute with the domain [0, 1], the height - * property could be specified as: - * - *

    .height(pv.Scale.linear().range(0, 480).by(function(d) d.score))
- * - * This is equivalent to: - * - *
    .height(function(d) d.score * 480)
- * - * This method should be used judiciously; it is typically more clear to - * invoke the scale directly, passing in the value to be scaled. - * - * @function - * @name pv.Scale.quantitative.prototype.by - * @param {function} f an accessor function. - * @returns {pv.Scale.quantitative} a view of this scale by the specified - * accessor function. - */ - scale.by = function(f) { - function by() { return scale(f.apply(this, arguments)); } - for (var method in scale) by[method] = scale[method]; - return by; - }; - - scale.domain.apply(scale, arguments); - return scale; -}; -/** - * Returns a linear scale for the specified domain. The arguments to this - * constructor are optional, and equivalent to calling {@link #domain}. - * The default domain and range are [0,1]. - * - * @class Represents a linear scale; a function that performs a linear - * transformation. Most - * commonly, a linear scale represents a 1-dimensional linear transformation - * from a numeric domain of input data [d0, - * d1] to a numeric range of pixels [r0, - * r1]. The equation for such a scale is: - * - *
f(x) = (x - d0) / (d1 - d0) * - * (r1 - r0) + r0
- * - * For example, a linear scale from the domain [0, 100] to range [0, 640]: - * - *
f(x) = (x - 0) / (100 - 0) * (640 - 0) + 0
- * f(x) = x / 100 * 640
- * f(x) = x * 6.4
- *
- * - * Thus, saying - * - *
    .height(function(d) d * 6.4)
- * - * is identical to - * - *
    .height(pv.Scale.linear(0, 100).range(0, 640))
- * - * Note that the scale is itself a function, and thus can be used as a property - * directly, assuming that the data associated with a mark is a number. While - * this is convenient for single-use scales, frequently it is desirable to - * define scales globally: - * - *
var y = pv.Scale.linear(0, 100).range(0, 640);
- * - * The y scale can now be equivalently referenced within a property: - * - *
    .height(function(d) y(d))
- * - * Alternatively, if the data are not simple numbers, the appropriate value can - * be passed to the y scale (e.g., d.foo). The {@link #by} - * method similarly allows the data to be mapped to a numeric value before - * performing the linear transformation. - * - * @param {number...} domain... optional domain values. - * @extends pv.Scale.quantitative - */ -pv.Scale.linear = function() { - var scale = pv.Scale.quantitative(); - scale.domain.apply(scale, arguments); - return scale; -}; -/** - * Returns a log scale for the specified domain. The arguments to this - * constructor are optional, and equivalent to calling {@link #domain}. - * The default domain is [1,10] and the default range is [0,1]. - * - * @class Represents a log scale. Most commonly, a log scale - * represents a 1-dimensional log transformation from a numeric domain of input - * data [d0, d1] to a numeric range of - * pixels [r0, r1]. The equation for such a - * scale is: - * - *
f(x) = (log(x) - log(d0)) / (log(d1) - - * log(d0)) * (r1 - r0) + - * r0
- * - * where log(x) represents the zero-symmetric logarthim of x using - * the scale's associated base (default: 10, see {@link pv.logSymmetric}). For - * example, a log scale from the domain [1, 100] to range [0, 640]: - * - *
f(x) = (log(x) - log(1)) / (log(100) - log(1)) * (640 - 0) + 0
- * f(x) = log(x) / 2 * 640
- * f(x) = log(x) * 320
- *
- * - * Thus, saying - * - *
    .height(function(d) Math.log(d) * 138.974)
- * - * is equivalent to - * - *
    .height(pv.Scale.log(1, 100).range(0, 640))
- * - * Note that the scale is itself a function, and thus can be used as a property - * directly, assuming that the data associated with a mark is a number. While - * this is convenient for single-use scales, frequently it is desirable to - * define scales globally: - * - *
var y = pv.Scale.log(1, 100).range(0, 640);
- * - * The y scale can now be equivalently referenced within a property: - * - *
    .height(function(d) y(d))
- * - * Alternatively, if the data are not simple numbers, the appropriate value can - * be passed to the y scale (e.g., d.foo). The {@link #by} - * method similarly allows the data to be mapped to a numeric value before - * performing the log transformation. - * - * @param {number...} domain... optional domain values. - * @extends pv.Scale.quantitative - */ -pv.Scale.log = function() { - var scale = pv.Scale.quantitative(1, 10), - b, // logarithm base - p, // cached Math.log(b) - /** @ignore */ log = function(x) { return Math.log(x) / p; }, - /** @ignore */ pow = function(y) { return Math.pow(b, y); }; - - /** - * Returns an array of evenly-spaced, suitably-rounded values in the input - * domain. These values are frequently used in conjunction with - * {@link pv.Rule} to display tick marks or grid lines. - * - * @function - * @name pv.Scale.log.prototype.ticks - * @returns {number[]} an array input domain values to use as ticks. - */ - scale.ticks = function() { - // TODO support non-uniform domains - var d = scale.domain(), - n = d[0] < 0, - i = Math.floor(n ? -log(-d[0]) : log(d[0])), - j = Math.ceil(n ? -log(-d[1]) : log(d[1])), - ticks = []; - if (n) { - ticks.push(-pow(-i)); - for (; i++ < j;) for (var k = b - 1; k > 0; k--) ticks.push(-pow(-i) * k); - } else { - for (; i < j; i++) for (var k = 1; k < b; k++) ticks.push(pow(i) * k); - ticks.push(pow(i)); - } - for (i = 0; ticks[i] < d[0]; i++); // strip small values - for (j = ticks.length; ticks[j - 1] > d[1]; j--); // strip big values - return ticks.slice(i, j); - }; - - /** - * Formats the specified tick value using the appropriate precision, assuming - * base 10. - * - * @function - * @name pv.Scale.log.prototype.tickFormat - * @param {number} t a tick value. - * @returns {string} a formatted tick value. - */ - scale.tickFormat = function(t) { - return t.toPrecision(1); - }; - - /** - * "Nices" this scale, extending the bounds of the input domain to - * evenly-rounded values. This method uses {@link pv.logFloor} and - * {@link pv.logCeil}. Nicing is useful if the domain is computed dynamically - * from data, and may be irregular. For example, given a domain of - * [0.20147987687960267, 0.996679553296417], a call to nice() might - * extend the domain to [0.1, 1]. - * - *

This method must be invoked each time after setting the domain (and - * base). - * - * @function - * @name pv.Scale.log.prototype.nice - * @returns {pv.Scale.log} this. - */ - scale.nice = function() { - // TODO support non-uniform domains - var d = scale.domain(); - return scale.domain(pv.logFloor(d[0], b), pv.logCeil(d[1], b)); - }; - - /** - * Sets or gets the logarithm base. Defaults to 10. - * - * @function - * @name pv.Scale.log.prototype.base - * @param {number} [v] the new base. - * @returns {pv.Scale.log} this, or the current base. - */ - scale.base = function(v) { - if (arguments.length) { - b = Number(v); - p = Math.log(b); - scale.transform(log, pow); // update transformed domain - return this; - } - return b; - }; - - scale.domain.apply(scale, arguments); - return scale.base(10); -}; -/** - * Returns a root scale for the specified domain. The arguments to this - * constructor are optional, and equivalent to calling {@link #domain}. - * The default domain and range are [0,1]. - * - * @class Represents a root scale; a function that performs a power - * transformation. Most - * commonly, a root scale represents a 1-dimensional root transformation from a - * numeric domain of input data [d0, d1] to - * a numeric range of pixels [r0, r1]. - * - *

Note that the scale is itself a function, and thus can be used as a - * property directly, assuming that the data associated with a mark is a - * number. While this is convenient for single-use scales, frequently it is - * desirable to define scales globally: - * - *

var y = pv.Scale.root(0, 100).range(0, 640);
- * - * The y scale can now be equivalently referenced within a property: - * - *
    .height(function(d) y(d))
- * - * Alternatively, if the data are not simple numbers, the appropriate value can - * be passed to the y scale (e.g., d.foo). The {@link #by} - * method similarly allows the data to be mapped to a numeric value before - * performing the root transformation. - * - * @param {number...} domain... optional domain values. - * @extends pv.Scale.quantitative - */ -pv.Scale.root = function() { - var scale = pv.Scale.quantitative(); - - /** - * Sets or gets the exponent; defaults to 2. - * - * @function - * @name pv.Scale.root.prototype.power - * @param {number} [v] the new exponent. - * @returns {pv.Scale.root} this, or the current base. - */ - scale.power = function(v) { - if (arguments.length) { - var b = Number(v), p = 1 / b; - scale.transform( - function(x) { return Math.pow(x, p); }, - function(y) { return Math.pow(y, b); }); - return this; - } - return b; - }; - - scale.domain.apply(scale, arguments); - return scale.power(2); -}; -/** - * Returns an ordinal scale for the specified domain. The arguments to this - * constructor are optional, and equivalent to calling {@link #domain}. - * - * @class Represents an ordinal scale. An ordinal scale represents a - * pairwise mapping from n discrete values in the input domain to - * n discrete values in the output range. For example, an ordinal scale - * might map a domain of species ["setosa", "versicolor", "virginica"] to colors - * ["red", "green", "blue"]. Thus, saying - * - *
    .fillStyle(function(d) {
- *         switch (d.species) {
- *           case "setosa": return "red";
- *           case "versicolor": return "green";
- *           case "virginica": return "blue";
- *         }
- *       })
- * - * is equivalent to - * - *
    .fillStyle(pv.Scale.ordinal("setosa", "versicolor", "virginica")
- *         .range("red", "green", "blue")
- *         .by(function(d) d.species))
- * - * If the mapping from species to color does not need to be specified - * explicitly, the domain can be omitted. In this case it will be inferred - * lazily from the data: - * - *
    .fillStyle(pv.colors("red", "green", "blue")
- *         .by(function(d) d.species))
- * - * When the domain is inferred, the first time the scale is invoked, the first - * element from the range will be returned. Subsequent calls with unique values - * will return subsequent elements from the range. If the inferred domain grows - * larger than the range, range values will be reused. However, it is strongly - * recommended that the domain and the range contain the same number of - * elements. - * - *

A range can be discretized from a continuous interval (e.g., for pixel - * positioning) by using {@link #split}, {@link #splitFlush} or - * {@link #splitBanded} after the domain has been set. For example, if - * states is an array of the fifty U.S. state names, the state name can - * be encoded in the left position: - * - *

    .left(pv.Scale.ordinal(states)
- *         .split(0, 640)
- *         .by(function(d) d.state))
- * - *

N.B.: ordinal scales are not invertible (at least not yet), since the - * domain and range and discontinuous. A workaround is to use a linear scale. - * - * @param {...} domain... optional domain values. - * @extends pv.Scale - * @see pv.colors - */ -pv.Scale.ordinal = function() { - var d = [], i = {}, r = [], band = 0; - - /** @private */ - function scale(x) { - if (!(x in i)) i[x] = d.push(x) - 1; - return r[i[x] % r.length]; - } - - /** - * Sets or gets the input domain. This method can be invoked several ways: - * - *

1. domain(values...) - * - *

Specifying the domain as a series of values is the most explicit and - * recommended approach. However, if the domain values are derived from data, - * you may find the second method more appropriate. - * - *

2. domain(array, f) - * - *

Rather than enumerating the domain values as explicit arguments to this - * method, you can specify a single argument of an array. In addition, you can - * specify an optional accessor function to extract the domain values from the - * array. - * - *

3. domain() - * - *

Invoking the domain method with no arguments returns the - * current domain as an array. - * - * @function - * @name pv.Scale.ordinal.prototype.domain - * @param {...} domain... domain values. - * @returns {pv.Scale.ordinal} this, or the current domain. - */ - scale.domain = function(array, f) { - if (arguments.length) { - array = (array instanceof Array) - ? ((arguments.length > 1) ? pv.map(array, f) : array) - : Array.prototype.slice.call(arguments); - - /* Filter the specified ordinals to their unique values. */ - d = []; - var seen = {}; - for (var j = 0; j < array.length; j++) { - var o = array[j]; - if (!(o in seen)) { - seen[o] = true; - d.push(o); - } - } - - i = pv.numerate(d); - return this; - } - return d; - }; - - /** - * Sets or gets the output range. This method can be invoked several ways: - * - *

1. range(values...) - * - *

Specifying the range as a series of values is the most explicit and - * recommended approach. However, if the range values are derived from data, - * you may find the second method more appropriate. - * - *

2. range(array, f) - * - *

Rather than enumerating the range values as explicit arguments to this - * method, you can specify a single argument of an array. In addition, you can - * specify an optional accessor function to extract the range values from the - * array. - * - *

3. range() - * - *

Invoking the range method with no arguments returns the - * current range as an array. - * - * @function - * @name pv.Scale.ordinal.prototype.range - * @param {...} range... range values. - * @returns {pv.Scale.ordinal} this, or the current range. - */ - scale.range = function(array, f) { - if (arguments.length) { - r = (array instanceof Array) - ? ((arguments.length > 1) ? pv.map(array, f) : array) - : Array.prototype.slice.call(arguments); - if (typeof r[0] == "string") r = r.map(pv.color); - return this; - } - return r; - }; - - /** - * Sets the range from the given continuous interval. The interval - * [min, max] is subdivided into n equispaced points, - * where n is the number of (unique) values in the domain. The first - * and last point are offset from the edge of the range by half the distance - * between points. - * - *

This method must be called after the domain is set. - * - * @function - * @name pv.Scale.ordinal.prototype.split - * @param {number} min minimum value of the output range. - * @param {number} max maximum value of the output range. - * @returns {pv.Scale.ordinal} this. - * @see #splitFlush - * @see #splitBanded - */ - scale.split = function(min, max) { - var step = (max - min) / this.domain().length; - r = pv.range(min + step / 2, max, step); - return this; - }; - - /** - * Sets the range from the given continuous interval. The interval - * [min, max] is subdivided into n equispaced points, - * where n is the number of (unique) values in the domain. The first - * and last point are exactly on the edge of the range. - * - *

This method must be called after the domain is set. - * - * @function - * @name pv.Scale.ordinal.prototype.splitFlush - * @param {number} min minimum value of the output range. - * @param {number} max maximum value of the output range. - * @returns {pv.Scale.ordinal} this. - * @see #split - */ - scale.splitFlush = function(min, max) { - var n = this.domain().length, step = (max - min) / (n - 1); - r = (n == 1) ? [(min + max) / 2] - : pv.range(min, max + step / 2, step); - return this; - }; - - /** - * Sets the range from the given continuous interval. The interval - * [min, max] is subdivided into n equispaced bands, - * where n is the number of (unique) values in the domain. The first - * and last band are offset from the edge of the range by the distance between - * bands. - * - *

The band width argument, band, is typically in the range [0, 1] - * and defaults to 1. This fraction corresponds to the amount of space in the - * range to allocate to the bands, as opposed to padding. A value of 0.5 means - * that the band width will be equal to the padding width. The computed - * absolute band width can be retrieved from the range as - * scale.range().band. - * - *

If the band width argument is negative, this method will allocate bands - * of a fixed width -band, rather than a relative fraction of - * the available space. - * - *

Tip: to inset the bands by a fixed amount p, specify a minimum - * value of min + p (or simply p, if min is - * 0). Then set the mark width to scale.range().band - p. - * - *

This method must be called after the domain is set. - * - * @function - * @name pv.Scale.ordinal.prototype.splitBanded - * @param {number} min minimum value of the output range. - * @param {number} max maximum value of the output range. - * @param {number} [band] the fractional band width in [0, 1]; defaults to 1. - * @returns {pv.Scale.ordinal} this. - * @see #split - */ - scale.splitBanded = function(min, max, band) { - if (arguments.length < 3) band = 1; - if (band < 0) { - var n = this.domain().length, - total = -band * n, - remaining = max - min - total, - padding = remaining / (n + 1); - r = pv.range(min + padding, max, padding - band); - r.band = -band; - } else { - var step = (max - min) / (this.domain().length + (1 - band)); - r = pv.range(min + step * (1 - band), max, step); - r.band = step * band; - } - return this; - }; - - /** - * Returns a view of this scale by the specified accessor function f. - * Given a scale y, y.by(function(d) d.foo) is equivalent to - * function(d) y(d.foo). This method should be used judiciously; it - * is typically more clear to invoke the scale directly, passing in the value - * to be scaled. - * - * @function - * @name pv.Scale.ordinal.prototype.by - * @param {function} f an accessor function. - * @returns {pv.Scale.ordinal} a view of this scale by the specified accessor - * function. - */ - scale.by = function(f) { - function by() { return scale(f.apply(this, arguments)); } - for (var method in scale) by[method] = scale[method]; - return by; - }; - - scale.domain.apply(scale, arguments); - return scale; -}; -/** - * Constructs a default quantile scale. The arguments to this constructor are - * optional, and equivalent to calling {@link #domain}. The default domain is - * the empty set, and the default range is [0,1]. - * - * @class Represents a quantile scale; a function that maps from a value within - * a sortable domain to a quantized numeric range. Typically, the domain is a - * set of numbers, but any sortable value (such as strings) can be used as the - * domain of a quantile scale. The range defaults to [0,1], with 0 corresponding - * to the smallest value in the domain, 1 the largest, .5 the median, etc. - * - *

By default, the number of quantiles in the range corresponds to the number - * of values in the domain. The {@link #quantiles} method can be used to specify - * an explicit number of quantiles; for example, quantiles(4) produces - * a standard quartile scale. A quartile scale's range is a set of four discrete - * values, such as [0, 1/3, 2/3, 1]. Calling the {@link #range} method will - * scale these discrete values accordingly, similar to {@link - * pv.Scale.ordinal#splitFlush}. - * - *

For example, given the strings ["c", "a", "b"], a default quantile scale: - * - *

pv.Scale.quantile("c", "a", "b")
- * - * will return 0 for "a", .5 for "b", and 1 for "c". - * - * @extends pv.Scale - */ -pv.Scale.quantile = function() { - var n = -1, // number of quantiles - j = -1, // max quantile index - q = [], // quantile boundaries - d = [], // domain - y = pv.Scale.linear(); // range - - /** @private */ - function scale(x) { - return y(Math.max(0, Math.min(j, pv.search.index(q, x) - 1)) / j); - } - - /** - * Sets or gets the quantile boundaries. By default, each element in the - * domain is in its own quantile. If the argument to this method is a number, - * it specifies the number of equal-sized quantiles by which to divide the - * domain. - * - *

If no arguments are specified, this method returns the quantile - * boundaries; the first element is always the minimum value of the domain, - * and the last element is the maximum value of the domain. Thus, the length - * of the returned array is always one greater than the number of quantiles. - * - * @function - * @name pv.Scale.quantile.prototype.quantiles - * @param {number} x the number of quantiles. - */ - scale.quantiles = function(x) { - if (arguments.length) { - n = Number(x); - if (n < 0) { - q = [d[0]].concat(d); - j = d.length - 1; - } else { - q = []; - q[0] = d[0]; - for (var i = 1; i <= n; i++) { - q[i] = d[~~(i * (d.length - 1) / n)]; - } - j = n - 1; - } - return this; - } - return q; - }; - - /** - * Sets or gets the input domain. This method can be invoked several ways: - * - *

1. domain(values...) - * - *

Specifying the domain as a series of values is the most explicit and - * recommended approach. However, if the domain values are derived from data, - * you may find the second method more appropriate. - * - *

2. domain(array, f) - * - *

Rather than enumerating the domain values as explicit arguments to this - * method, you can specify a single argument of an array. In addition, you can - * specify an optional accessor function to extract the domain values from the - * array. - * - *

3. domain() - * - *

Invoking the domain method with no arguments returns the - * current domain as an array. - * - * @function - * @name pv.Scale.quantile.prototype.domain - * @param {...} domain... domain values. - * @returns {pv.Scale.quantile} this, or the current domain. - */ - scale.domain = function(array, f) { - if (arguments.length) { - d = (array instanceof Array) - ? pv.map(array, f) - : Array.prototype.slice.call(arguments); - d.sort(pv.naturalOrder); - scale.quantiles(n); // recompute quantiles - return this; - } - return d; - }; - - /** - * Sets or gets the output range. This method can be invoked several ways: - * - *

1. range(min, ..., max) - * - *

The range may be specified as a series of numbers or colors. Most - * commonly, two numbers are specified: the minimum and maximum pixel values. - * For a color scale, values may be specified as {@link pv.Color}s or - * equivalent strings. For a diverging scale, or other subdivided non-uniform - * scales, multiple values can be specified. For example: - * - *

    .range("red", "white", "green")
- * - *

Currently, only numbers and colors are supported as range values. The - * number of range values must exactly match the number of domain values, or - * the behavior of the scale is undefined. - * - *

2. range() - * - *

Invoking the range method with no arguments returns the current - * range as an array of numbers or colors. - * - * @function - * @name pv.Scale.quantile.prototype.range - * @param {...} range... range values. - * @returns {pv.Scale.quantile} this, or the current range. - */ - scale.range = function() { - if (arguments.length) { - y.range.apply(y, arguments); - return this; - } - return y.range(); - }; - - /** - * Returns a view of this scale by the specified accessor function f. - * Given a scale y, y.by(function(d) d.foo) is equivalent to - * function(d) y(d.foo). - * - *

This method is provided for convenience, such that scales can be - * succinctly defined inline. For example, given an array of data elements - * that have a score attribute with the domain [0, 1], the height - * property could be specified as: - * - *

.height(pv.Scale.linear().range(0, 480).by(function(d) d.score))
- * - * This is equivalent to: - * - *
.height(function(d) d.score * 480)
- * - * This method should be used judiciously; it is typically more clear to - * invoke the scale directly, passing in the value to be scaled. - * - * @function - * @name pv.Scale.quantile.prototype.by - * @param {function} f an accessor function. - * @returns {pv.Scale.quantile} a view of this scale by the specified - * accessor function. - */ - scale.by = function(f) { - function by() { return scale(f.apply(this, arguments)); } - for (var method in scale) by[method] = scale[method]; - return by; - }; - - scale.domain.apply(scale, arguments); - return scale; -}; -/** - * Returns a histogram operator for the specified data, with an optional - * accessor function. If the data specified is not an array of numbers, an - * accessor function must be specified to map the data to numeric values. - * - * @class Represents a histogram operator. - * - * @param {array} data an array of numbers or objects. - * @param {function} [f] an optional accessor function. - */ -pv.histogram = function(data, f) { - var frequency = true; - return { - - /** - * Returns the computed histogram bins. An optional array of numbers, - * ticks, may be specified as the break points. If the ticks are - * not specified, default ticks will be computed using a linear scale on the - * data domain. - * - *

The returned array contains {@link pv.histogram.Bin}s. The x - * attribute corresponds to the bin's start value (inclusive), while the - * dx attribute stores the bin size (end - start). The y - * attribute stores either the frequency count or probability, depending on - * how the histogram operator has been configured. - * - *

The {@link pv.histogram.Bin} objects are themselves arrays, containing - * the data elements present in each bin, i.e., the elements in the - * data array (prior to invoking the accessor function, if any). - * For example, if the data represented countries, and the accessor function - * returned the GDP of each country, the returned bins would be arrays of - * countries (not GDPs). - * - * @function - * @name pv.histogram.prototype.bins - * @param {array} [ticks] - * @returns {array} - */ /** @private */ - bins: function(ticks) { - var x = pv.map(data, f), bins = []; - - /* Initialize default ticks. */ - if (!arguments.length) ticks = pv.Scale.linear(x).ticks(); - - /* Initialize the bins. */ - for (var i = 0; i < ticks.length - 1; i++) { - var bin = bins[i] = []; - bin.x = ticks[i]; - bin.dx = ticks[i + 1] - ticks[i]; - bin.y = 0; - } - - /* Count the number of samples per bin. */ - for (var i = 0; i < x.length; i++) { - var j = pv.search.index(ticks, x[i]) - 1, - bin = bins[Math.max(0, Math.min(bins.length - 1, j))]; - bin.y++; - bin.push(data[i]); - } - - /* Convert frequencies to probabilities. */ - if (!frequency) for (var i = 0; i < bins.length; i++) { - bins[i].y /= x.length; - } - - return bins; - }, - - /** - * Sets or gets whether this histogram operator returns frequencies or - * probabilities. - * - * @function - * @name pv.histogram.prototype.frequency - * @param {boolean} [x] - * @returns {pv.histogram} this. - */ /** @private */ - frequency: function(x) { - if (arguments.length) { - frequency = Boolean(x); - return this; - } - return frequency; - } - }; -}; - -/** - * @class Represents a bin returned by the {@link pv.histogram} operator. Bins - * are themselves arrays containing the data elements present in the given bin - * (prior to the accessor function being invoked to convert the data object to a - * numeric value). These bin arrays have additional attributes with meta - * information about the bin. - * - * @name pv.histogram.Bin - * @extends array - * @see pv.histogram - */ - -/** - * The start value of the bin's range. - * - * @type number - * @name pv.histogram.Bin.prototype.x - */ - -/** - * The magnitude value of the bin's range; end - start. - * - * @type number - * @name pv.histogram.Bin.prototype.dx - */ - -/** - * The frequency or probability of the bin, depending on how the histogram - * operator was configured. - * - * @type number - * @name pv.histogram.Bin.prototype.y - */ -/** - * Returns the {@link pv.Color} for the specified color format string. Colors - * may have an associated opacity, or alpha channel. Color formats are specified - * by CSS Color Modular Level 3, using either in RGB or HSL color space. For - * example:

    - * - *
  • #f00 // #rgb - *
  • #ff0000 // #rrggbb - *
  • rgb(255, 0, 0) - *
  • rgb(100%, 0%, 0%) - *
  • hsl(0, 100%, 50%) - *
  • rgba(0, 0, 255, 0.5) - *
  • hsla(120, 100%, 50%, 1) - * - *
The SVG 1.0 color keywords names are also supported, such as "aliceblue" - * and "yellowgreen". The "transparent" keyword is supported for fully- - * transparent black. - * - *

If the format argument is already an instance of Color, - * the argument is returned with no further processing. - * - * @param {string} format the color specification string, such as "#f00". - * @returns {pv.Color} the corresponding Color. - * @see SVG color - * keywords - * @see CSS3 color module - */ -pv.color = function(format) { - if (format.rgb) return format.rgb(); - - /* Handle hsl, rgb. */ - var m1 = /([a-z]+)\((.*)\)/i.exec(format); - if (m1) { - var m2 = m1[2].split(","), a = 1; - switch (m1[1]) { - case "hsla": - case "rgba": { - a = parseFloat(m2[3]); - if (!a) return pv.Color.transparent; - break; - } - } - switch (m1[1]) { - case "hsla": - case "hsl": { - var h = parseFloat(m2[0]), // degrees - s = parseFloat(m2[1]) / 100, // percentage - l = parseFloat(m2[2]) / 100; // percentage - return (new pv.Color.Hsl(h, s, l, a)).rgb(); - } - case "rgba": - case "rgb": { - function parse(c) { // either integer or percentage - var f = parseFloat(c); - return (c[c.length - 1] == '%') ? Math.round(f * 2.55) : f; - } - var r = parse(m2[0]), g = parse(m2[1]), b = parse(m2[2]); - return pv.rgb(r, g, b, a); - } - } - } - - /* Named colors. */ - var named = pv.Color.names[format]; - if (named) return named; - - /* Hexadecimal colors: #rgb and #rrggbb. */ - if (format.charAt(0) == "#") { - var r, g, b; - if (format.length == 4) { - r = format.charAt(1); r += r; - g = format.charAt(2); g += g; - b = format.charAt(3); b += b; - } else if (format.length == 7) { - r = format.substring(1, 3); - g = format.substring(3, 5); - b = format.substring(5, 7); - } - return pv.rgb(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), 1); - } - - /* Otherwise, pass-through unsupported colors. */ - return new pv.Color(format, 1); -}; - -/** - * Constructs a color with the specified color format string and opacity. This - * constructor should not be invoked directly; use {@link pv.color} instead. - * - * @class Represents an abstract (possibly translucent) color. The color is - * divided into two parts: the color attribute, an opaque color format - * string, and the opacity attribute, a float in [0, 1]. The color - * space is dependent on the implementing class; all colors support the - * {@link #rgb} method to convert to RGB color space for interpolation. - * - *

See also the Color guide. - * - * @param {string} color an opaque color format string, such as "#f00". - * @param {number} opacity the opacity, in [0,1]. - * @see pv.color - */ -pv.Color = function(color, opacity) { - /** - * An opaque color format string, such as "#f00". - * - * @type string - * @see SVG color - * keywords - * @see CSS3 color module - */ - this.color = color; - - /** - * The opacity, a float in [0, 1]. - * - * @type number - */ - this.opacity = opacity; -}; - -/** - * Returns a new color that is a brighter version of this color. The behavior of - * this method may vary slightly depending on the underlying color space. - * Although brighter and darker are inverse operations, the results of a series - * of invocations of these two methods might be inconsistent because of rounding - * errors. - * - * @param [k] {number} an optional scale factor; defaults to 1. - * @see #darker - * @returns {pv.Color} a brighter color. - */ -pv.Color.prototype.brighter = function(k) { - return this.rgb().brighter(k); -}; - -/** - * Returns a new color that is a brighter version of this color. The behavior of - * this method may vary slightly depending on the underlying color space. - * Although brighter and darker are inverse operations, the results of a series - * of invocations of these two methods might be inconsistent because of rounding - * errors. - * - * @param [k] {number} an optional scale factor; defaults to 1. - * @see #brighter - * @returns {pv.Color} a darker color. - */ -pv.Color.prototype.darker = function(k) { - return this.rgb().darker(k); -}; - -/** - * Constructs a new RGB color with the specified channel values. - * - * @param {number} r the red channel, an integer in [0,255]. - * @param {number} g the green channel, an integer in [0,255]. - * @param {number} b the blue channel, an integer in [0,255]. - * @param {number} [a] the alpha channel, a float in [0,1]. - * @returns pv.Color.Rgb - */ -pv.rgb = function(r, g, b, a) { - return new pv.Color.Rgb(r, g, b, (arguments.length == 4) ? a : 1); -}; - -/** - * Constructs a new RGB color with the specified channel values. - * - * @class Represents a color in RGB space. - * - * @param {number} r the red channel, an integer in [0,255]. - * @param {number} g the green channel, an integer in [0,255]. - * @param {number} b the blue channel, an integer in [0,255]. - * @param {number} a the alpha channel, a float in [0,1]. - * @extends pv.Color - */ -pv.Color.Rgb = function(r, g, b, a) { - pv.Color.call(this, a ? ("rgb(" + r + "," + g + "," + b + ")") : "none", a); - - /** - * The red channel, an integer in [0, 255]. - * - * @type number - */ - this.r = r; - - /** - * The green channel, an integer in [0, 255]. - * - * @type number - */ - this.g = g; - - /** - * The blue channel, an integer in [0, 255]. - * - * @type number - */ - this.b = b; - - /** - * The alpha channel, a float in [0, 1]. - * - * @type number - */ - this.a = a; -}; -pv.Color.Rgb.prototype = pv.extend(pv.Color); - -/** - * Constructs a new RGB color with the same green, blue and alpha channels as - * this color, with the specified red channel. - * - * @param {number} r the red channel, an integer in [0,255]. - */ -pv.Color.Rgb.prototype.red = function(r) { - return pv.rgb(r, this.g, this.b, this.a); -}; - -/** - * Constructs a new RGB color with the same red, blue and alpha channels as this - * color, with the specified green channel. - * - * @param {number} g the green channel, an integer in [0,255]. - */ -pv.Color.Rgb.prototype.green = function(g) { - return pv.rgb(this.r, g, this.b, this.a); -}; - -/** - * Constructs a new RGB color with the same red, green and alpha channels as - * this color, with the specified blue channel. - * - * @param {number} b the blue channel, an integer in [0,255]. - */ -pv.Color.Rgb.prototype.blue = function(b) { - return pv.rgb(this.r, this.g, b, this.a); -}; - -/** - * Constructs a new RGB color with the same red, green and blue channels as this - * color, with the specified alpha channel. - * - * @param {number} a the alpha channel, a float in [0,1]. - */ -pv.Color.Rgb.prototype.alpha = function(a) { - return pv.rgb(this.r, this.g, this.b, a); -}; - -/** - * Returns the RGB color equivalent to this color. This method is abstract and - * must be implemented by subclasses. - * - * @returns {pv.Color.Rgb} an RGB color. - * @function - * @name pv.Color.prototype.rgb - */ - -/** - * Returns this. - * - * @returns {pv.Color.Rgb} this. - */ -pv.Color.Rgb.prototype.rgb = function() { return this; }; - -/** - * Returns a new color that is a brighter version of this color. This method - * applies an arbitrary scale factor to each of the three RGB components of this - * color to create a brighter version of this color. Although brighter and - * darker are inverse operations, the results of a series of invocations of - * these two methods might be inconsistent because of rounding errors. - * - * @param [k] {number} an optional scale factor; defaults to 1. - * @see #darker - * @returns {pv.Color.Rgb} a brighter color. - */ -pv.Color.Rgb.prototype.brighter = function(k) { - k = Math.pow(0.7, arguments.length ? k : 1); - var r = this.r, g = this.g, b = this.b, i = 30; - if (!r && !g && !b) return pv.rgb(i, i, i, this.a); - if (r && (r < i)) r = i; - if (g && (g < i)) g = i; - if (b && (b < i)) b = i; - return pv.rgb( - Math.min(255, Math.floor(r / k)), - Math.min(255, Math.floor(g / k)), - Math.min(255, Math.floor(b / k)), - this.a); -}; - -/** - * Returns a new color that is a darker version of this color. This method - * applies an arbitrary scale factor to each of the three RGB components of this - * color to create a darker version of this color. Although brighter and darker - * are inverse operations, the results of a series of invocations of these two - * methods might be inconsistent because of rounding errors. - * - * @param [k] {number} an optional scale factor; defaults to 1. - * @see #brighter - * @returns {pv.Color.Rgb} a darker color. - */ -pv.Color.Rgb.prototype.darker = function(k) { - k = Math.pow(0.7, arguments.length ? k : 1); - return pv.rgb( - Math.max(0, Math.floor(k * this.r)), - Math.max(0, Math.floor(k * this.g)), - Math.max(0, Math.floor(k * this.b)), - this.a); -}; - -/** - * Constructs a new HSL color with the specified values. - * - * @param {number} h the hue, an integer in [0, 360]. - * @param {number} s the saturation, a float in [0, 1]. - * @param {number} l the lightness, a float in [0, 1]. - * @param {number} [a] the opacity, a float in [0, 1]. - * @returns pv.Color.Hsl - */ -pv.hsl = function(h, s, l, a) { - return new pv.Color.Hsl(h, s, l, (arguments.length == 4) ? a : 1); -}; - -/** - * Constructs a new HSL color with the specified values. - * - * @class Represents a color in HSL space. - * - * @param {number} h the hue, an integer in [0, 360]. - * @param {number} s the saturation, a float in [0, 1]. - * @param {number} l the lightness, a float in [0, 1]. - * @param {number} a the opacity, a float in [0, 1]. - * @extends pv.Color - */ -pv.Color.Hsl = function(h, s, l, a) { - pv.Color.call(this, "hsl(" + h + "," + (s * 100) + "%," + (l * 100) + "%)", a); - - /** - * The hue, an integer in [0, 360]. - * - * @type number - */ - this.h = h; - - /** - * The saturation, a float in [0, 1]. - * - * @type number - */ - this.s = s; - - /** - * The lightness, a float in [0, 1]. - * - * @type number - */ - this.l = l; - - /** - * The opacity, a float in [0, 1]. - * - * @type number - */ - this.a = a; -}; -pv.Color.Hsl.prototype = pv.extend(pv.Color); - -/** - * Constructs a new HSL color with the same saturation, lightness and alpha as - * this color, and the specified hue. - * - * @param {number} h the hue, an integer in [0, 360]. - */ -pv.Color.Hsl.prototype.hue = function(h) { - return pv.hsl(h, this.s, this.l, this.a); -}; - -/** - * Constructs a new HSL color with the same hue, lightness and alpha as this - * color, and the specified saturation. - * - * @param {number} s the saturation, a float in [0, 1]. - */ -pv.Color.Hsl.prototype.saturation = function(s) { - return pv.hsl(this.h, s, this.l, this.a); -}; - -/** - * Constructs a new HSL color with the same hue, saturation and alpha as this - * color, and the specified lightness. - * - * @param {number} l the lightness, a float in [0, 1]. - */ -pv.Color.Hsl.prototype.lightness = function(l) { - return pv.hsl(this.h, this.s, l, this.a); -}; - -/** - * Constructs a new HSL color with the same hue, saturation and lightness as - * this color, and the specified alpha. - * - * @param {number} a the opacity, a float in [0, 1]. - */ -pv.Color.Hsl.prototype.alpha = function(a) { - return pv.hsl(this.h, this.s, this.l, a); -}; - -/** - * Returns the RGB color equivalent to this HSL color. - * - * @returns {pv.Color.Rgb} an RGB color. - */ -pv.Color.Hsl.prototype.rgb = function() { - var h = this.h, s = this.s, l = this.l; - - /* Some simple corrections for h, s and l. */ - h = h % 360; if (h < 0) h += 360; - s = Math.max(0, Math.min(s, 1)); - l = Math.max(0, Math.min(l, 1)); - - /* From FvD 13.37, CSS Color Module Level 3 */ - var m2 = (l <= .5) ? (l * (1 + s)) : (l + s - l * s); - var m1 = 2 * l - m2; - function v(h) { - if (h > 360) h -= 360; - else if (h < 0) h += 360; - if (h < 60) return m1 + (m2 - m1) * h / 60; - if (h < 180) return m2; - if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60; - return m1; - } - function vv(h) { - return Math.round(v(h) * 255); - } - - return pv.rgb(vv(h + 120), vv(h), vv(h - 120), this.a); -}; - -/** - * @private SVG color keywords, per CSS Color Module Level 3. - * - * @see SVG color - * keywords - */ -pv.Color.names = { - aliceblue: "#f0f8ff", - antiquewhite: "#faebd7", - aqua: "#00ffff", - aquamarine: "#7fffd4", - azure: "#f0ffff", - beige: "#f5f5dc", - bisque: "#ffe4c4", - black: "#000000", - blanchedalmond: "#ffebcd", - blue: "#0000ff", - blueviolet: "#8a2be2", - brown: "#a52a2a", - burlywood: "#deb887", - cadetblue: "#5f9ea0", - chartreuse: "#7fff00", - chocolate: "#d2691e", - coral: "#ff7f50", - cornflowerblue: "#6495ed", - cornsilk: "#fff8dc", - crimson: "#dc143c", - cyan: "#00ffff", - darkblue: "#00008b", - darkcyan: "#008b8b", - darkgoldenrod: "#b8860b", - darkgray: "#a9a9a9", - darkgreen: "#006400", - darkgrey: "#a9a9a9", - darkkhaki: "#bdb76b", - darkmagenta: "#8b008b", - darkolivegreen: "#556b2f", - darkorange: "#ff8c00", - darkorchid: "#9932cc", - darkred: "#8b0000", - darksalmon: "#e9967a", - darkseagreen: "#8fbc8f", - darkslateblue: "#483d8b", - darkslategray: "#2f4f4f", - darkslategrey: "#2f4f4f", - darkturquoise: "#00ced1", - darkviolet: "#9400d3", - deeppink: "#ff1493", - deepskyblue: "#00bfff", - dimgray: "#696969", - dimgrey: "#696969", - dodgerblue: "#1e90ff", - firebrick: "#b22222", - floralwhite: "#fffaf0", - forestgreen: "#228b22", - fuchsia: "#ff00ff", - gainsboro: "#dcdcdc", - ghostwhite: "#f8f8ff", - gold: "#ffd700", - goldenrod: "#daa520", - gray: "#808080", - green: "#008000", - greenyellow: "#adff2f", - grey: "#808080", - honeydew: "#f0fff0", - hotpink: "#ff69b4", - indianred: "#cd5c5c", - indigo: "#4b0082", - ivory: "#fffff0", - khaki: "#f0e68c", - lavender: "#e6e6fa", - lavenderblush: "#fff0f5", - lawngreen: "#7cfc00", - lemonchiffon: "#fffacd", - lightblue: "#add8e6", - lightcoral: "#f08080", - lightcyan: "#e0ffff", - lightgoldenrodyellow: "#fafad2", - lightgray: "#d3d3d3", - lightgreen: "#90ee90", - lightgrey: "#d3d3d3", - lightpink: "#ffb6c1", - lightsalmon: "#ffa07a", - lightseagreen: "#20b2aa", - lightskyblue: "#87cefa", - lightslategray: "#778899", - lightslategrey: "#778899", - lightsteelblue: "#b0c4de", - lightyellow: "#ffffe0", - lime: "#00ff00", - limegreen: "#32cd32", - linen: "#faf0e6", - magenta: "#ff00ff", - maroon: "#800000", - mediumaquamarine: "#66cdaa", - mediumblue: "#0000cd", - mediumorchid: "#ba55d3", - mediumpurple: "#9370db", - mediumseagreen: "#3cb371", - mediumslateblue: "#7b68ee", - mediumspringgreen: "#00fa9a", - mediumturquoise: "#48d1cc", - mediumvioletred: "#c71585", - midnightblue: "#191970", - mintcream: "#f5fffa", - mistyrose: "#ffe4e1", - moccasin: "#ffe4b5", - navajowhite: "#ffdead", - navy: "#000080", - oldlace: "#fdf5e6", - olive: "#808000", - olivedrab: "#6b8e23", - orange: "#ffa500", - orangered: "#ff4500", - orchid: "#da70d6", - palegoldenrod: "#eee8aa", - palegreen: "#98fb98", - paleturquoise: "#afeeee", - palevioletred: "#db7093", - papayawhip: "#ffefd5", - peachpuff: "#ffdab9", - peru: "#cd853f", - pink: "#ffc0cb", - plum: "#dda0dd", - powderblue: "#b0e0e6", - purple: "#800080", - red: "#ff0000", - rosybrown: "#bc8f8f", - royalblue: "#4169e1", - saddlebrown: "#8b4513", - salmon: "#fa8072", - sandybrown: "#f4a460", - seagreen: "#2e8b57", - seashell: "#fff5ee", - sienna: "#a0522d", - silver: "#c0c0c0", - skyblue: "#87ceeb", - slateblue: "#6a5acd", - slategray: "#708090", - slategrey: "#708090", - snow: "#fffafa", - springgreen: "#00ff7f", - steelblue: "#4682b4", - tan: "#d2b48c", - teal: "#008080", - thistle: "#d8bfd8", - tomato: "#ff6347", - turquoise: "#40e0d0", - violet: "#ee82ee", - wheat: "#f5deb3", - white: "#ffffff", - whitesmoke: "#f5f5f5", - yellow: "#ffff00", - yellowgreen: "#9acd32", - transparent: pv.Color.transparent = pv.rgb(0, 0, 0, 0) -}; - -/* Initialized named colors. */ -(function() { - var names = pv.Color.names; - for (var name in names) names[name] = pv.color(names[name]); -})(); -/** - * Returns a new categorical color encoding using the specified colors. The - * arguments to this method are an array of colors; see {@link pv.color}. For - * example, to create a categorical color encoding using the species - * attribute: - * - *

pv.colors("red", "green", "blue").by(function(d) d.species)
- * - * The result of this expression can be used as a fill- or stroke-style - * property. This assumes that the data's species attribute is a - * string. - * - * @param {string} colors... categorical colors. - * @see pv.Scale.ordinal - * @returns {pv.Scale.ordinal} an ordinal color scale. - */ -pv.colors = function() { - var scale = pv.Scale.ordinal(); - scale.range.apply(scale, arguments); - return scale; -}; - -/** - * A collection of standard color palettes for categorical encoding. - * - * @namespace A collection of standard color palettes for categorical encoding. - */ -pv.Colors = {}; - -/** - * Returns a new 10-color scheme. The arguments to this constructor are - * optional, and equivalent to calling {@link pv.Scale.OrdinalScale#domain}. The - * following colors are used: - * - *
#1f77b4
- *
#ff7f0e
- *
#2ca02c
- *
#d62728
- *
#9467bd
- *
#8c564b
- *
#e377c2
- *
#7f7f7f
- *
#bcbd22
- *
#17becf
- * - * @param {number...} domain... domain values. - * @returns {pv.Scale.ordinal} a new ordinal color scale. - * @see pv.color - */ -pv.Colors.category10 = function() { - var scale = pv.colors( - "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", - "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"); - scale.domain.apply(scale, arguments); - return scale; -}; - -/** - * Returns a new 20-color scheme. The arguments to this constructor are - * optional, and equivalent to calling {@link pv.Scale.OrdinalScale#domain}. The - * following colors are used: - * - *
#1f77b4
- *
#aec7e8
- *
#ff7f0e
- *
#ffbb78
- *
#2ca02c
- *
#98df8a
- *
#d62728
- *
#ff9896
- *
#9467bd
- *
#c5b0d5
- *
#8c564b
- *
#c49c94
- *
#e377c2
- *
#f7b6d2
- *
#7f7f7f
- *
#c7c7c7
- *
#bcbd22
- *
#dbdb8d
- *
#17becf
- *
#9edae5
- * - * @param {number...} domain... domain values. - * @returns {pv.Scale.ordinal} a new ordinal color scale. - * @see pv.color -*/ -pv.Colors.category20 = function() { - var scale = pv.colors( - "#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", - "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", - "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", - "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5"); - scale.domain.apply(scale, arguments); - return scale; -}; - -/** - * Returns a new alternative 19-color scheme. The arguments to this constructor - * are optional, and equivalent to calling - * {@link pv.Scale.OrdinalScale#domain}. The following colors are used: - * - *
#9c9ede
- *
#7375b5
- *
#4a5584
- *
#cedb9c
- *
#b5cf6b
- *
#8ca252
- *
#637939
- *
#e7cb94
- *
#e7ba52
- *
#bd9e39
- *
#8c6d31
- *
#e7969c
- *
#d6616b
- *
#ad494a
- *
#843c39
- *
#de9ed6
- *
#ce6dbd
- *
#a55194
- *
#7b4173
- * - * @param {number...} domain... domain values. - * @returns {pv.Scale.ordinal} a new ordinal color scale. - * @see pv.color - */ -pv.Colors.category19 = function() { - var scale = pv.colors( - "#9c9ede", "#7375b5", "#4a5584", "#cedb9c", "#b5cf6b", - "#8ca252", "#637939", "#e7cb94", "#e7ba52", "#bd9e39", - "#8c6d31", "#e7969c", "#d6616b", "#ad494a", "#843c39", - "#de9ed6", "#ce6dbd", "#a55194", "#7b4173"); - scale.domain.apply(scale, arguments); - return scale; -}; -/** - * Returns a linear color ramp from the specified start color to the - * specified end color. The color arguments may be specified either as - * strings or as {@link pv.Color}s. This is equivalent to: - * - *
    pv.Scale.linear().domain(0, 1).range(...)
- * - * @param {string} start the start color; may be a pv.Color. - * @param {string} end the end color; may be a pv.Color. - * @returns {Function} a color ramp from start to end. - * @see pv.Scale.linear - */ -pv.ramp = function(start, end) { - var scale = pv.Scale.linear(); - scale.range.apply(scale, arguments); - return scale; -}; -/** - * @private - * @namespace - */ -pv.Scene = pv.SvgScene = { - /* Various namespaces. */ - svg: "http://www.w3.org/2000/svg", - xmlns: "http://www.w3.org/2000/xmlns", - xlink: "http://www.w3.org/1999/xlink", - xhtml: "http://www.w3.org/1999/xhtml", - - /** The pre-multipled scale, based on any enclosing transforms. */ - scale: 1, - - /** The set of supported events. */ - events: [ - "DOMMouseScroll", // for Firefox - "mousewheel", - "mousedown", - "mouseup", - "mouseover", - "mouseout", - "mousemove", - "click", - "dblclick" - ], - - /** Implicit values for SVG and CSS properties. */ - implicit: { - svg: { - "shape-rendering": "auto", - "pointer-events": "painted", - "x": 0, - "y": 0, - "dy": 0, - "text-anchor": "start", - "transform": "translate(0,0)", - "fill": "none", - "fill-opacity": 1, - "stroke": "none", - "stroke-opacity": 1, - "stroke-width": 1.5, - "stroke-linejoin": "miter" - }, - css: { - "font": "10px sans-serif" - } - } -}; - -/** - * Updates the display for the specified array of scene nodes. - * - * @param scenes {array} an array of scene nodes. - */ -pv.SvgScene.updateAll = function(scenes) { - if (scenes.length - && scenes[0].reverse - && (scenes.type != "line") - && (scenes.type != "area")) { - var reversed = pv.extend(scenes); - for (var i = 0, j = scenes.length - 1; j >= 0; i++, j--) { - reversed[i] = scenes[j]; - } - scenes = reversed; - } - this.removeSiblings(this[scenes.type](scenes)); -}; - -/** - * Creates a new SVG element of the specified type. - * - * @param type {string} an SVG element type, such as "rect". - * @returns a new SVG element. - */ -pv.SvgScene.create = function(type) { - return document.createElementNS(this.svg, type); -}; - -/** - * Expects the element e to be the specified type. If the element does - * not exist, a new one is created. If the element does exist but is the wrong - * type, it is replaced with the specified element. - * - * @param e the current SVG element. - * @param type {string} an SVG element type, such as "rect". - * @param attributes an optional attribute map. - * @param style an optional style map. - * @returns a new SVG element. - */ -pv.SvgScene.expect = function(e, type, attributes, style) { - if (e) { - if (e.tagName == "a") e = e.firstChild; - if (e.tagName != type) { - var n = this.create(type); - e.parentNode.replaceChild(n, e); - e = n; - } - } else { - e = this.create(type); - } - for (var name in attributes) { - var value = attributes[name]; - if (value == this.implicit.svg[name]) value = null; - if (value == null) e.removeAttribute(name); - else e.setAttribute(name, value); - } - for (var name in style) { - var value = style[name]; - if (value == this.implicit.css[name]) value = null; - if (value == null) e.style.removeProperty(name); - else e.style[name] = value; - } - return e; -}; - -/** TODO */ -pv.SvgScene.append = function(e, scenes, index) { - e.$scene = {scenes:scenes, index:index}; - e = this.title(e, scenes[index]); - if (!e.parentNode) scenes.$g.appendChild(e); - return e.nextSibling; -}; - -/** - * Applies a title tooltip to the specified element e, using the - * title property of the specified scene node s. Note that - * this implementation does not create an SVG title element as a child - * of e; although this is the recommended standard, it is only - * supported in Opera. Instead, an anchor element is created around the element - * e, and the xlink:title attribute is set accordingly. - * - * @param e an SVG element. - * @param s a scene node. - */ -pv.SvgScene.title = function(e, s) { - var a = e.parentNode; - if (a && (a.tagName != "a")) a = null; - if (s.title) { - if (!a) { - a = this.create("a"); - if (e.parentNode) e.parentNode.replaceChild(a, e); - a.appendChild(e); - } - a.setAttributeNS(this.xlink, "title", s.title); - return a; - } - if (a) a.parentNode.replaceChild(e, a); - return e; -}; - -/** TODO */ -pv.SvgScene.dispatch = pv.listener(function(e) { - var t = e.target.$scene; - if (t) { - var type = e.type; - - /* Fixes for mousewheel support on Firefox & Opera. */ - switch (type) { - case "DOMMouseScroll": { - type = "mousewheel"; - e.wheel = -480 * e.detail; - break; - } - case "mousewheel": { - e.wheel = (window.opera ? 12 : 1) * e.wheelDelta; - break; - } - } - - if (pv.Mark.dispatch(type, t.scenes, t.index)) e.preventDefault(); - } -}); - -/** @private Remove siblings following element e. */ -pv.SvgScene.removeSiblings = function(e) { - while (e) { - var n = e.nextSibling; - e.parentNode.removeChild(e); - e = n; - } -}; - -/** @private Do nothing when rendering undefined mark types. */ -pv.SvgScene.undefined = function() {}; -/** - * @private Converts the specified b-spline curve segment to a bezier curve - * compatible with SVG "C". - * - * @param p0 the first control point. - * @param p1 the second control point. - * @param p2 the third control point. - * @param p3 the fourth control point. - */ -pv.SvgScene.pathBasis = (function() { - - /** - * Matrix to transform basis (b-spline) control points to bezier control - * points. Derived from FvD 11.2.8. - */ - var basis = [ - [ 1/6, 2/3, 1/6, 0 ], - [ 0, 2/3, 1/3, 0 ], - [ 0, 1/3, 2/3, 0 ], - [ 0, 1/6, 2/3, 1/6 ] - ]; - - /** - * Returns the point that is the weighted sum of the specified control points, - * using the specified weights. This method requires that there are four - * weights and four control points. - */ - function weight(w, p0, p1, p2, p3) { - return { - x: w[0] * p0.left + w[1] * p1.left + w[2] * p2.left + w[3] * p3.left, - y: w[0] * p0.top + w[1] * p1.top + w[2] * p2.top + w[3] * p3.top - }; - } - - var convert = function(p0, p1, p2, p3) { - var b1 = weight(basis[1], p0, p1, p2, p3), - b2 = weight(basis[2], p0, p1, p2, p3), - b3 = weight(basis[3], p0, p1, p2, p3); - return "C" + b1.x + "," + b1.y - + "," + b2.x + "," + b2.y - + "," + b3.x + "," + b3.y; - }; - - convert.segment = function(p0, p1, p2, p3) { - var b0 = weight(basis[0], p0, p1, p2, p3), - b1 = weight(basis[1], p0, p1, p2, p3), - b2 = weight(basis[2], p0, p1, p2, p3), - b3 = weight(basis[3], p0, p1, p2, p3); - return "M" + b0.x + "," + b0.y - + "C" + b1.x + "," + b1.y - + "," + b2.x + "," + b2.y - + "," + b3.x + "," + b3.y; - }; - - return convert; -})(); - -/** - * @private Interpolates the given points using the basis spline interpolation. - * Returns an SVG path without the leading M instruction to allow path - * appending. - * - * @param points the array of points. - */ -pv.SvgScene.curveBasis = function(points) { - if (points.length <= 2) return ""; - var path = "", - p0 = points[0], - p1 = p0, - p2 = p0, - p3 = points[1]; - path += this.pathBasis(p0, p1, p2, p3); - for (var i = 2; i < points.length; i++) { - p0 = p1; - p1 = p2; - p2 = p3; - p3 = points[i]; - path += this.pathBasis(p0, p1, p2, p3); - } - /* Cycle through to get the last point. */ - path += this.pathBasis(p1, p2, p3, p3); - path += this.pathBasis(p2, p3, p3, p3); - return path; -}; - -/** - * @private Interpolates the given points using the basis spline interpolation. - * If points.length == tangents.length then a regular Hermite interpolation is - * performed, if points.length == tangents.length + 2 then the first and last - * segments are filled in with cubic bazier segments. Returns an array of path - * strings. - * - * @param points the array of points. - */ -pv.SvgScene.curveBasisSegments = function(points) { - if (points.length <= 2) return ""; - var paths = [], - p0 = points[0], - p1 = p0, - p2 = p0, - p3 = points[1], - firstPath = this.pathBasis.segment(p0, p1, p2, p3); - - p0 = p1; - p1 = p2; - p2 = p3; - p3 = points[2]; - paths.push(firstPath + this.pathBasis(p0, p1, p2, p3)); // merge first & second path - for (var i = 3; i < points.length; i++) { - p0 = p1; - p1 = p2; - p2 = p3; - p3 = points[i]; - paths.push(this.pathBasis.segment(p0, p1, p2, p3)); - } - - // merge last & second-to-last path - paths.push(this.pathBasis.segment(p1, p2, p3, p3) + this.pathBasis(p2, p3, p3, p3)); - return paths; -}; - -/** - * @private Interpolates the given points with respective tangents using the cubic - * Hermite spline interpolation. If points.length == tangents.length then a regular - * Hermite interpolation is performed, if points.length == tangents.length + 2 then - * the first and last segments are filled in with cubic bazier segments. - * Returns an SVG path without the leading M instruction to allow path appending. - * - * @param points the array of points. - * @param tangents the array of tangent vectors. - */ -pv.SvgScene.curveHermite = function(points, tangents) { - if (tangents.length < 1 - || (points.length != tangents.length - && points.length != tangents.length + 2)) return ""; - var quad = points.length != tangents.length, - path = "", - p0 = points[0], - p = points[1], - t0 = tangents[0], - t = t0, - pi = 1; - - if (quad) { - path += "Q" + (p.left - t0.x * 2 / 3) + "," + (p.top - t0.y * 2 / 3) - + "," + p.left + "," + p.top; - p0 = points[1]; - pi = 2; - } - - if (tangents.length > 1) { - t = tangents[1]; - p = points[pi]; - pi++; - path += "C" + (p0.left + t0.x) + "," + (p0.top + t0.y) - + "," + (p.left - t.x) + "," + (p.top - t.y) - + "," + p.left + "," + p.top; - for (var i = 2; i < tangents.length; i++, pi++) { - p = points[pi]; - t = tangents[i]; - path += "S" + (p.left - t.x) + "," + (p.top - t.y) - + "," + p.left + "," + p.top; - } - } - - if (quad) { - var lp = points[pi]; - path += "Q" + (p.left + t.x * 2 / 3) + "," + (p.top + t.y * 2 / 3) + "," - + lp.left + "," + lp.top; - } - - return path; -}; - -/** - * @private Interpolates the given points with respective tangents using the - * cubic Hermite spline interpolation. Returns an array of path strings. - * - * @param points the array of points. - * @param tangents the array of tangent vectors. - */ -pv.SvgScene.curveHermiteSegments = function(points, tangents) { - if (tangents.length < 1 - || (points.length != tangents.length - && points.length != tangents.length + 2)) return []; - var quad = points.length != tangents.length, - paths = [], - p0 = points[0], - p = p0, - t0 = tangents[0], - t = t0, - pi = 1; - - if (quad) { - p = points[1]; - paths.push("M" + p0.left + "," + p0.top - + "Q" + (p.left - t.x * 2 / 3) + "," + (p.top - t.y * 2 / 3) - + "," + p.left + "," + p.top); - pi = 2; - } - - for (var i = 1; i < tangents.length; i++, pi++) { - p0 = p; - t0 = t; - p = points[pi]; - t = tangents[i]; - paths.push("M" + p0.left + "," + p0.top - + "C" + (p0.left + t0.x) + "," + (p0.top + t0.y) - + "," + (p.left - t.x) + "," + (p.top - t.y) - + "," + p.left + "," + p.top); - } - - if (quad) { - var lp = points[pi]; - paths.push("M" + p.left + "," + p.top - + "Q" + (p.left + t.x * 2 / 3) + "," + (p.top + t.y * 2 / 3) + "," - + lp.left + "," + lp.top); - } - - return paths; -}; - -/** - * @private Computes the tangents for the given points needed for cardinal - * spline interpolation. Returns an array of tangent vectors. Note: that for n - * points only the n-2 well defined tangents are returned. - * - * @param points the array of points. - * @param tension the tension of hte cardinal spline. - */ -pv.SvgScene.cardinalTangents = function(points, tension) { - var tangents = [], - a = (1 - tension) / 2, - p0 = points[0], - p1 = points[1], - p2 = points[2]; - - for (var i = 3; i < points.length; i++) { - tangents.push({x: a * (p2.left - p0.left), y: a * (p2.top - p0.top)}); - p0 = p1; - p1 = p2; - p2 = points[i]; - } - - tangents.push({x: a * (p2.left - p0.left), y: a * (p2.top - p0.top)}); - return tangents; -}; - -/** - * @private Interpolates the given points using cardinal spline interpolation. - * Returns an SVG path without the leading M instruction to allow path - * appending. - * - * @param points the array of points. - * @param tension the tension of hte cardinal spline. - */ -pv.SvgScene.curveCardinal = function(points, tension) { - if (points.length <= 2) return ""; - return this.curveHermite(points, this.cardinalTangents(points, tension)); -}; - -/** - * @private Interpolates the given points using cardinal spline interpolation. - * Returns an array of path strings. - * - * @param points the array of points. - * @param tension the tension of hte cardinal spline. - */ -pv.SvgScene.curveCardinalSegments = function(points, tension) { - if (points.length <= 2) return ""; - return this.curveHermiteSegments(points, this.cardinalTangents(points, tension)); -}; - -/** - * @private Interpolates the given points using Fritsch-Carlson Monotone cubic - * Hermite interpolation. Returns an array of tangent vectors. - * - * @param points the array of points. - */ -pv.SvgScene.monotoneTangents = function(points) { - var tangents = [], - d = [], - m = [], - dx = [], - k = 0; - - /* Compute the slopes of the secant lines between successive points. */ - for (k = 0; k < points.length-1; k++) { - d[k] = (points[k+1].top - points[k].top)/(points[k+1].left - points[k].left); - } - - /* Initialize the tangents at every point as the average of the secants. */ - m[0] = d[0]; - dx[0] = points[1].left - points[0].left; - for (k = 1; k < points.length - 1; k++) { - m[k] = (d[k-1]+d[k])/2; - dx[k] = (points[k+1].left - points[k-1].left)/2; - } - m[k] = d[k-1]; - dx[k] = (points[k].left - points[k-1].left); - - /* Step 3. Very important, step 3. Yep. Wouldn't miss it. */ - for (k = 0; k < points.length - 1; k++) { - if (d[k] == 0) { - m[ k ] = 0; - m[k+1] = 0; - } - } - - /* Step 4 + 5. Out of 5 or more steps. */ - for (k = 0; k < points.length - 1; k++) { - if ((Math.abs(m[k]) < 1e-5) || (Math.abs(m[k+1]) < 1e-5)) continue; - var ak = m[k] / d[k], - bk = m[k + 1] / d[k], - s = ak * ak + bk * bk; // monotone constant (?) - if (s > 9) { - var tk = 3 / Math.sqrt(s); - m[k] = tk * ak * d[k]; - m[k + 1] = tk * bk * d[k]; - } - } - - var len; - for (var i = 0; i < points.length; i++) { - len = 1 + m[i] * m[i]; // pv.vector(1, m[i]).norm().times(dx[i]/3) - tangents.push({x: dx[i] / 3 / len, y: m[i] * dx[i] / 3 / len}); - } - - return tangents; -}; - -/** - * @private Interpolates the given points using Fritsch-Carlson Monotone cubic - * Hermite interpolation. Returns an SVG path without the leading M instruction - * to allow path appending. - * - * @param points the array of points. - */ -pv.SvgScene.curveMonotone = function(points) { - if (points.length <= 2) return ""; - return this.curveHermite(points, this.monotoneTangents(points)); -} - -/** - * @private Interpolates the given points using Fritsch-Carlson Monotone cubic - * Hermite interpolation. - * Returns an array of path strings. - * - * @param points the array of points. - */ -pv.SvgScene.curveMonotoneSegments = function(points) { - if (points.length <= 2) return ""; - return this.curveHermiteSegments(points, this.monotoneTangents(points)); -}; -pv.SvgScene.area = function(scenes) { - var e = scenes.$g.firstChild; - if (!scenes.length) return e; - var s = scenes[0]; - - /* segmented */ - if (s.segmented) return this.areaSegment(scenes); - - /* visible */ - if (!s.visible) return e; - var fill = s.fillStyle, stroke = s.strokeStyle; - if (!fill.opacity && !stroke.opacity) return e; - - /** @private Computes the straight path for the range [i, j]. */ - function path(i, j) { - var p1 = [], p2 = []; - for (var k = j; i <= k; i++, j--) { - var si = scenes[i], - sj = scenes[j], - pi = si.left + "," + si.top, - pj = (sj.left + sj.width) + "," + (sj.top + sj.height); - - /* interpolate */ - if (i < k) { - var sk = scenes[i + 1], sl = scenes[j - 1]; - switch (s.interpolate) { - case "step-before": { - pi += "V" + sk.top; - pj += "H" + (sl.left + sl.width); - break; - } - case "step-after": { - pi += "H" + sk.left; - pj += "V" + (sl.top + sl.height); - break; - } - } - } - - p1.push(pi); - p2.push(pj); - } - return p1.concat(p2).join("L"); - } - - /** @private Computes the curved path for the range [i, j]. */ - function pathCurve(i, j) { - var pointsT = [], pointsB = [], pathT, pathB; - - for (var k = j; i <= k; i++, j--) { - var sj = scenes[j]; - pointsT.push(scenes[i]); - pointsB.push({left: sj.left + sj.width, top: sj.top + sj.height}); - } - - if (s.interpolate == "basis") { - pathT = pv.SvgScene.curveBasis(pointsT); - pathB = pv.SvgScene.curveBasis(pointsB); - } else if (s.interpolate == "cardinal") { - pathT = pv.SvgScene.curveCardinal(pointsT, s.tension); - pathB = pv.SvgScene.curveCardinal(pointsB, s.tension); - } else { // monotone - pathT = pv.SvgScene.curveMonotone(pointsT); - pathB = pv.SvgScene.curveMonotone(pointsB); - } - - return pointsT[0].left + "," + pointsT[0].top + pathT - + "L" + pointsB[0].left + "," + pointsB[0].top + pathB; - } - - /* points */ - var d = [], si, sj; - for (var i = 0; i < scenes.length; i++) { - si = scenes[i]; if (!si.width && !si.height) continue; - for (var j = i + 1; j < scenes.length; j++) { - sj = scenes[j]; if (!sj.width && !sj.height) break; - } - if (i && (s.interpolate != "step-after")) i--; - if ((j < scenes.length) && (s.interpolate != "step-before")) j++; - d.push(((j - i > 2 - && (s.interpolate == "basis" - || s.interpolate == "cardinal" - || s.interpolate == "monotone")) - ? pathCurve : path)(i, j - 1)); - i = j - 1; - } - if (!d.length) return e; - - e = this.expect(e, "path", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "d": "M" + d.join("ZM") + "Z", - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null - }); - return this.append(e, scenes, 0); -}; - -pv.SvgScene.areaSegment = function(scenes) { - var e = scenes.$g.firstChild, s = scenes[0], pathsT, pathsB; - if (s.interpolate == "basis" - || s.interpolate == "cardinal" - || s.interpolate == "monotone") { - var pointsT = [], pointsB = []; - - for (var i = 0, n = scenes.length; i < n; i++) { - var sj = scenes[n - i - 1]; - pointsT.push(scenes[i]); - pointsB.push({left: sj.left + sj.width, top: sj.top + sj.height}); - } - - if (s.interpolate == "basis") { - pathsT = this.curveBasisSegments(pointsT); - pathsB = this.curveBasisSegments(pointsB); - } else if (s.interpolate == "cardinal") { - pathsT = this.curveCardinalSegments(pointsT, s.tension); - pathsB = this.curveCardinalSegments(pointsB, s.tension); - } else { // monotone - pathsT = this.curveMonotoneSegments(pointsT); - pathsB = this.curveMonotoneSegments(pointsB); - } - } - - for (var i = 0, n = scenes.length - 1; i < n; i++) { - var s1 = scenes[i], s2 = scenes[i + 1]; - - /* visible */ - if (!s1.visible || !s2.visible) continue; - var fill = s1.fillStyle, stroke = s1.strokeStyle; - if (!fill.opacity && !stroke.opacity) continue; - - var d; - if (pathsT) { - var pathT = pathsT[i], - pathB = "L" + pathsB[n - i - 1].substr(1); - - d = pathT + pathB + "Z"; - } else { - /* interpolate */ - var si = s1, sj = s2; - switch (s1.interpolate) { - case "step-before": si = s2; break; - case "step-after": sj = s1; break; - } - - /* path */ - d = "M" + s1.left + "," + si.top - + "L" + s2.left + "," + sj.top - + "L" + (s2.left + s2.width) + "," + (sj.top + sj.height) - + "L" + (s1.left + s1.width) + "," + (si.top + si.height) - + "Z"; - } - - e = this.expect(e, "path", { - "shape-rendering": s1.antialias ? null : "crispEdges", - "pointer-events": s1.events, - "cursor": s1.cursor, - "d": d, - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s1.lineWidth / this.scale : null - }); - e = this.append(e, scenes, i); - } - return e; -}; -pv.SvgScene.bar = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - var fill = s.fillStyle, stroke = s.strokeStyle; - if (!fill.opacity && !stroke.opacity) continue; - - e = this.expect(e, "rect", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "x": s.left, - "y": s.top, - "width": Math.max(1E-10, s.width), - "height": Math.max(1E-10, s.height), - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null - }); - e = this.append(e, scenes, i); - } - return e; -}; -pv.SvgScene.dot = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - var fill = s.fillStyle, stroke = s.strokeStyle; - if (!fill.opacity && !stroke.opacity) continue; - - /* points */ - var radius = s.radius, path = null; - switch (s.shape) { - case "cross": { - path = "M" + -radius + "," + -radius - + "L" + radius + "," + radius - + "M" + radius + "," + -radius - + "L" + -radius + "," + radius; - break; - } - case "triangle": { - var h = radius, w = radius * 1.1547; // 2 / Math.sqrt(3) - path = "M0," + h - + "L" + w +"," + -h - + " " + -w + "," + -h - + "Z"; - break; - } - case "diamond": { - radius *= Math.SQRT2; - path = "M0," + -radius - + "L" + radius + ",0" - + " 0," + radius - + " " + -radius + ",0" - + "Z"; - break; - } - case "square": { - path = "M" + -radius + "," + -radius - + "L" + radius + "," + -radius - + " " + radius + "," + radius - + " " + -radius + "," + radius - + "Z"; - break; - } - case "tick": { - path = "M0,0L0," + -s.size; - break; - } - case "bar": { - path = "M0," + (s.size / 2) + "L0," + -(s.size / 2); - break; - } - } - - /* Use for circles, for everything else. */ - var svg = { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null - }; - if (path) { - svg.transform = "translate(" + s.left + "," + s.top + ")"; - if (s.angle) svg.transform += " rotate(" + 180 * s.angle / Math.PI + ")"; - svg.d = path; - e = this.expect(e, "path", svg); - } else { - svg.cx = s.left; - svg.cy = s.top; - svg.r = radius; - e = this.expect(e, "circle", svg); - } - e = this.append(e, scenes, i); - } - return e; -}; -pv.SvgScene.image = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - - /* fill */ - e = this.fill(e, scenes, i); - - /* image */ - if (s.image) { - e = this.expect(e, "foreignObject", { - "cursor": s.cursor, - "x": s.left, - "y": s.top, - "width": s.width, - "height": s.height - }); - var c = e.firstChild || e.appendChild(document.createElementNS(this.xhtml, "canvas")); - c.$scene = {scenes:scenes, index:i}; - c.style.width = s.width; - c.style.height = s.height; - c.width = s.imageWidth; - c.height = s.imageHeight; - c.getContext("2d").putImageData(s.image, 0, 0); - } else { - e = this.expect(e, "image", { - "preserveAspectRatio": "none", - "cursor": s.cursor, - "x": s.left, - "y": s.top, - "width": s.width, - "height": s.height - }); - e.setAttributeNS(this.xlink, "href", s.url); - } - e = this.append(e, scenes, i); - - /* stroke */ - e = this.stroke(e, scenes, i); - } - return e; -}; -pv.SvgScene.label = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - var fill = s.textStyle; - if (!fill.opacity || !s.text) continue; - - /* text-baseline, text-align */ - var x = 0, y = 0, dy = 0, anchor = "start"; - switch (s.textBaseline) { - case "middle": dy = ".35em"; break; - case "top": dy = ".71em"; y = s.textMargin; break; - case "bottom": y = "-" + s.textMargin; break; - } - switch (s.textAlign) { - case "right": anchor = "end"; x = "-" + s.textMargin; break; - case "center": anchor = "middle"; break; - case "left": x = s.textMargin; break; - } - - e = this.expect(e, "text", { - "pointer-events": s.events, - "cursor": s.cursor, - "x": x, - "y": y, - "dy": dy, - "transform": "translate(" + s.left + "," + s.top + ")" - + (s.textAngle ? " rotate(" + 180 * s.textAngle / Math.PI + ")" : "") - + (this.scale != 1 ? " scale(" + 1 / this.scale + ")" : ""), - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "text-anchor": anchor - }, { - "font": s.font, - "text-shadow": s.textShadow, - "text-decoration": s.textDecoration - }); - if (e.firstChild) e.firstChild.nodeValue = s.text; - else e.appendChild(document.createTextNode(s.text)); - e = this.append(e, scenes, i); - } - return e; -}; -pv.SvgScene.line = function(scenes) { - var e = scenes.$g.firstChild; - if (scenes.length < 2) return e; - var s = scenes[0]; - - /* segmented */ - if (s.segmented) return this.lineSegment(scenes); - - /* visible */ - if (!s.visible) return e; - var fill = s.fillStyle, stroke = s.strokeStyle; - if (!fill.opacity && !stroke.opacity) return e; - - /* points */ - var d = "M" + s.left + "," + s.top; - - if (scenes.length > 2 && (s.interpolate == "basis" || s.interpolate == "cardinal" || s.interpolate == "monotone")) { - switch (s.interpolate) { - case "basis": d += this.curveBasis(scenes); break; - case "cardinal": d += this.curveCardinal(scenes, s.tension); break; - case "monotone": d += this.curveMonotone(scenes); break; - } - } else { - for (var i = 1; i < scenes.length; i++) { - d += this.pathSegment(scenes[i - 1], scenes[i]); - } - } - - e = this.expect(e, "path", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "d": d, - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null, - "stroke-linejoin": s.lineJoin - }); - return this.append(e, scenes, 0); -}; - -pv.SvgScene.lineSegment = function(scenes) { - var e = scenes.$g.firstChild; - - var s = scenes[0]; - var paths; - switch (s.interpolate) { - case "basis": paths = this.curveBasisSegments(scenes); break; - case "cardinal": paths = this.curveCardinalSegments(scenes, s.tension); break; - case "monotone": paths = this.curveMonotoneSegments(scenes); break; - } - - for (var i = 0, n = scenes.length - 1; i < n; i++) { - var s1 = scenes[i], s2 = scenes[i + 1]; - - /* visible */ - if (!s1.visible || !s2.visible) continue; - var stroke = s1.strokeStyle, fill = pv.Color.transparent; - if (!stroke.opacity) continue; - - /* interpolate */ - var d; - if ((s1.interpolate == "linear") && (s1.lineJoin == "miter")) { - fill = stroke; - stroke = pv.Color.transparent; - d = this.pathJoin(scenes[i - 1], s1, s2, scenes[i + 2]); - } else if(paths) { - d = paths[i]; - } else { - d = "M" + s1.left + "," + s1.top + this.pathSegment(s1, s2); - } - - e = this.expect(e, "path", { - "shape-rendering": s1.antialias ? null : "crispEdges", - "pointer-events": s1.events, - "cursor": s1.cursor, - "d": d, - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s1.lineWidth / this.scale : null, - "stroke-linejoin": s1.lineJoin - }); - e = this.append(e, scenes, i); - } - return e; -}; - -/** @private Returns the path segment for the specified points. */ -pv.SvgScene.pathSegment = function(s1, s2) { - var l = 1; // sweep-flag - switch (s1.interpolate) { - case "polar-reverse": - l = 0; - case "polar": { - var dx = s2.left - s1.left, - dy = s2.top - s1.top, - e = 1 - s1.eccentricity, - r = Math.sqrt(dx * dx + dy * dy) / (2 * e); - if ((e <= 0) || (e > 1)) break; // draw a straight line - return "A" + r + "," + r + " 0 0," + l + " " + s2.left + "," + s2.top; - } - case "step-before": return "V" + s2.top + "H" + s2.left; - case "step-after": return "H" + s2.left + "V" + s2.top; - } - return "L" + s2.left + "," + s2.top; -}; - -/** @private Line-line intersection, per Akenine-Moller 16.16.1. */ -pv.SvgScene.lineIntersect = function(o1, d1, o2, d2) { - return o1.plus(d1.times(o2.minus(o1).dot(d2.perp()) / d1.dot(d2.perp()))); -} - -/** @private Returns the miter join path for the specified points. */ -pv.SvgScene.pathJoin = function(s0, s1, s2, s3) { - /* - * P1-P2 is the current line segment. V is a vector that is perpendicular to - * the line segment, and has length lineWidth / 2. ABCD forms the initial - * bounding box of the line segment (i.e., the line segment if we were to do - * no joins). - */ - var p1 = pv.vector(s1.left, s1.top), - p2 = pv.vector(s2.left, s2.top), - p = p2.minus(p1), - v = p.perp().norm(), - w = v.times(s1.lineWidth / (2 * this.scale)), - a = p1.plus(w), - b = p2.plus(w), - c = p2.minus(w), - d = p1.minus(w); - - /* - * Start join. P0 is the previous line segment's start point. We define the - * cutting plane as the average of the vector perpendicular to P0-P1, and - * the vector perpendicular to P1-P2. This insures that the cross-section of - * the line on the cutting plane is equal if the line-width is unchanged. - * Note that we don't implement miter limits, so these can get wild. - */ - if (s0 && s0.visible) { - var v1 = p1.minus(s0.left, s0.top).perp().norm().plus(v); - d = this.lineIntersect(p1, v1, d, p); - a = this.lineIntersect(p1, v1, a, p); - } - - /* Similarly, for end join. */ - if (s3 && s3.visible) { - var v2 = pv.vector(s3.left, s3.top).minus(p2).perp().norm().plus(v); - c = this.lineIntersect(p2, v2, c, p); - b = this.lineIntersect(p2, v2, b, p); - } - - return "M" + a.x + "," + a.y - + "L" + b.x + "," + b.y - + " " + c.x + "," + c.y - + " " + d.x + "," + d.y; -}; -pv.SvgScene.panel = function(scenes) { - var g = scenes.$g, e = g && g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - - /* svg */ - if (!scenes.parent) { - s.canvas.style.display = "inline-block"; - if (g && (g.parentNode != s.canvas)) { - g = s.canvas.firstChild; - e = g && g.firstChild; - } - if (!g) { - g = s.canvas.appendChild(this.create("svg")); - g.setAttribute("font-size", "10px"); - g.setAttribute("font-family", "sans-serif"); - g.setAttribute("fill", "none"); - g.setAttribute("stroke", "none"); - g.setAttribute("stroke-width", 1.5); - for (var j = 0; j < this.events.length; j++) { - g.addEventListener(this.events[j], this.dispatch, false); - } - e = g.firstChild; - } - scenes.$g = g; - g.setAttribute("width", s.width + s.left + s.right); - g.setAttribute("height", s.height + s.top + s.bottom); - } - - /* clip (nest children) */ - if (s.overflow == "hidden") { - var id = pv.id().toString(36), - c = this.expect(e, "g", {"clip-path": "url(#" + id + ")"}); - if (!c.parentNode) g.appendChild(c); - scenes.$g = g = c; - e = c.firstChild; - - e = this.expect(e, "clipPath", {"id": id}); - var r = e.firstChild || e.appendChild(this.create("rect")); - r.setAttribute("x", s.left); - r.setAttribute("y", s.top); - r.setAttribute("width", s.width); - r.setAttribute("height", s.height); - if (!e.parentNode) g.appendChild(e); - e = e.nextSibling; - } - - /* fill */ - e = this.fill(e, scenes, i); - - /* transform (push) */ - var k = this.scale, - t = s.transform, - x = s.left + t.x, - y = s.top + t.y; - this.scale *= t.k; - - /* children */ - for (var j = 0; j < s.children.length; j++) { - s.children[j].$g = e = this.expect(e, "g", { - "transform": "translate(" + x + "," + y + ")" - + (t.k != 1 ? " scale(" + t.k + ")" : "") - }); - this.updateAll(s.children[j]); - if (!e.parentNode) g.appendChild(e); - e = e.nextSibling; - } - - /* transform (pop) */ - this.scale = k; - - /* stroke */ - e = this.stroke(e, scenes, i); - - /* clip (restore group) */ - if (s.overflow == "hidden") { - scenes.$g = g = c.parentNode; - e = c.nextSibling; - } - } - return e; -}; - -pv.SvgScene.fill = function(e, scenes, i) { - var s = scenes[i], fill = s.fillStyle; - if (fill.opacity || s.events == "all") { - e = this.expect(e, "rect", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "x": s.left, - "y": s.top, - "width": s.width, - "height": s.height, - "fill": fill.color, - "fill-opacity": fill.opacity, - "stroke": null - }); - e = this.append(e, scenes, i); - } - return e; -}; - -pv.SvgScene.stroke = function(e, scenes, i) { - var s = scenes[i], stroke = s.strokeStyle; - if (stroke.opacity || s.events == "all") { - e = this.expect(e, "rect", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events == "all" ? "stroke" : s.events, - "cursor": s.cursor, - "x": s.left, - "y": s.top, - "width": Math.max(1E-10, s.width), - "height": Math.max(1E-10, s.height), - "fill": null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity, - "stroke-width": s.lineWidth / this.scale - }); - e = this.append(e, scenes, i); - } - return e; -}; -pv.SvgScene.rule = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - var stroke = s.strokeStyle; - if (!stroke.opacity) continue; - - e = this.expect(e, "line", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "x1": s.left, - "y1": s.top, - "x2": s.left + s.width, - "y2": s.top + s.height, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity, - "stroke-width": s.lineWidth / this.scale - }); - e = this.append(e, scenes, i); - } - return e; -}; -pv.SvgScene.wedge = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - var fill = s.fillStyle, stroke = s.strokeStyle; - if (!fill.opacity && !stroke.opacity) continue; - - /* points */ - var r1 = s.innerRadius, r2 = s.outerRadius, a = Math.abs(s.angle), p; - if (a >= 2 * Math.PI) { - if (r1) { - p = "M0," + r2 - + "A" + r2 + "," + r2 + " 0 1,1 0," + (-r2) - + "A" + r2 + "," + r2 + " 0 1,1 0," + r2 - + "M0," + r1 - + "A" + r1 + "," + r1 + " 0 1,1 0," + (-r1) - + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 - + "Z"; - } else { - p = "M0," + r2 - + "A" + r2 + "," + r2 + " 0 1,1 0," + (-r2) - + "A" + r2 + "," + r2 + " 0 1,1 0," + r2 - + "Z"; - } - } else { - var sa = Math.min(s.startAngle, s.endAngle), - ea = Math.max(s.startAngle, s.endAngle), - c1 = Math.cos(sa), c2 = Math.cos(ea), - s1 = Math.sin(sa), s2 = Math.sin(ea); - if (r1) { - p = "M" + r2 * c1 + "," + r2 * s1 - + "A" + r2 + "," + r2 + " 0 " - + ((a < Math.PI) ? "0" : "1") + ",1 " - + r2 * c2 + "," + r2 * s2 - + "L" + r1 * c2 + "," + r1 * s2 - + "A" + r1 + "," + r1 + " 0 " - + ((a < Math.PI) ? "0" : "1") + ",0 " - + r1 * c1 + "," + r1 * s1 + "Z"; - } else { - p = "M" + r2 * c1 + "," + r2 * s1 - + "A" + r2 + "," + r2 + " 0 " - + ((a < Math.PI) ? "0" : "1") + ",1 " - + r2 * c2 + "," + r2 * s2 + "L0,0Z"; - } - } - - e = this.expect(e, "path", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "transform": "translate(" + s.left + "," + s.top + ")", - "d": p, - "fill": fill.color, - "fill-rule": "evenodd", - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null - }); - e = this.append(e, scenes, i); - } - return e; -}; -/** - * Constructs a new mark with default properties. Marks, with the exception of - * the root panel, are not typically constructed directly; instead, they are - * added to a panel or an existing mark via {@link pv.Mark#add}. - * - * @class Represents a data-driven graphical mark. The Mark class is - * the base class for all graphical marks in Protovis; it does not provide any - * specific rendering functionality, but together with {@link Panel} establishes - * the core framework. - * - *

Concrete mark types include familiar visual elements such as bars, lines - * and labels. Although a bar mark may be used to construct a bar chart, marks - * know nothing about charts; it is only through their specification and - * composition that charts are produced. These building blocks permit many - * combinatorial possibilities. - * - *

Marks are associated with data: a mark is generated once per - * associated datum, mapping the datum to visual properties such as - * position and color. Thus, a single mark specification represents a set of - * visual elements that share the same data and visual encoding. The type of - * mark defines the names of properties and their meaning. A property may be - * static, ignoring the associated datum and returning a constant; or, it may be - * dynamic, derived from the associated datum or index. Such dynamic encodings - * can be specified succinctly using anonymous functions. Special properties - * called event handlers can be registered to add interactivity. - * - *

Protovis uses inheritance to simplify the specification of related - * marks: a new mark can be derived from an existing mark, inheriting its - * properties. The new mark can then override properties to specify new - * behavior, potentially in terms of the old behavior. In this way, the old mark - * serves as the prototype for the new mark. Most mark types share the - * same basic properties for consistency and to facilitate inheritance. - * - *

The prioritization of redundant properties is as follows:

    - * - *
  1. If the width property is not specified (i.e., null), its value - * is the width of the parent panel, minus this mark's left and right margins; - * the left and right margins are zero if not specified. - * - *
  2. Otherwise, if the right margin is not specified, its value is - * the width of the parent panel, minus this mark's width and left margin; the - * left margin is zero if not specified. - * - *
  3. Otherwise, if the left property is not specified, its value is - * the width of the parent panel, minus this mark's width and the right margin. - * - *
This prioritization is then duplicated for the height, - * bottom and top properties, respectively. - * - *

While most properties are variable, some mark types, such as lines - * and areas, generate a single visual element rather than a distinct visual - * element per datum. With these marks, some properties may be fixed. - * Fixed properties can vary per mark, but not per datum! These - * properties are evaluated solely for the first (0-index) datum, and typically - * are specified as a constant. However, it is valid to use a function if the - * property varies between panels or is dynamically generated. - * - *

See also the Protovis guide. - */ -pv.Mark = function() { - /* - * TYPE 0 constant defs - * TYPE 1 function defs - * TYPE 2 constant properties - * TYPE 3 function properties - * in order of evaluation! - */ - this.$properties = []; - this.$handlers = {}; -}; - -/** @private Records which properties are defined on this mark type. */ -pv.Mark.prototype.properties = {}; - -/** @private Records the cast function for each property. */ -pv.Mark.cast = {}; - -/** - * @private Defines and registers a property method for the property with the - * given name. This method should be called on a mark class prototype to define - * each exposed property. (Note this refers to the JavaScript - * prototype, not the Protovis mark prototype, which is the {@link - * #proto} field.) - * - *

The created property method supports several modes of invocation:

    - * - *
  1. If invoked with a Function argument, this function is evaluated - * for each associated datum. The return value of the function is used as the - * computed property value. The context of the function (this) is this - * mark. The arguments to the function are the associated data of this mark and - * any enclosing panels. For example, a linear encoding of numerical data to - * height is specified as - * - *
    m.height(function(d) d * 100);
    - * - * The expression d * 100 will be evaluated for the height property of - * each mark instance. The return value of the property method (e.g., - * m.height) is this mark (m)).

    - * - *

  2. If invoked with a non-function argument, the property is treated as a - * constant. The return value of the property method (e.g., m.height) - * is this mark.

    - * - *

  3. If invoked with no arguments, the computed property value for the current - * mark instance in the scene graph is returned. This facilitates property - * chaining, where one mark's properties are defined in terms of another's. - * For example, to offset a mark's location from its prototype, you might say - * - *
    m.top(function() this.proto.top() + 10);
    - * - * Note that the index of the mark being evaluated (in the above example, - * this.proto) is inherited from the Mark class and set by - * this mark. So, if the fifth element's top property is being evaluated, the - * fifth instance of this.proto will similarly be queried for the value - * of its top property. If the mark being evaluated has a different number of - * instances, or its data is unrelated, the behavior of this method is - * undefined. In these cases it may be better to index the scene - * explicitly to specify the exact instance. - * - *

Property names should follow standard JavaScript method naming - * conventions, using lowerCamel-style capitalization. - * - *

In addition to creating the property method, every property is registered - * in the {@link #properties} map on the prototype. Although this is an - * instance field, it is considered immutable and shared by all instances of a - * given mark type. The properties map can be queried to see if a mark - * type defines a particular property, such as width or height. - * - * @param {string} name the property name. - * @param {function} [cast] the cast function for this property. - */ -pv.Mark.prototype.property = function(name, cast) { - if (!this.hasOwnProperty("properties")) { - this.properties = pv.extend(this.properties); - } - this.properties[name] = true; - - /* - * Define the setter-getter globally, since the default behavior should be the - * same for all properties, and since the Protovis inheritance chain is - * independent of the JavaScript inheritance chain. For example, anchors - * define a "name" property that is evaluated on derived marks, even though - * those marks don't normally have a name. - */ - pv.Mark.prototype.propertyMethod(name, false, pv.Mark.cast[name] = cast); - return this; -}; - -/** - * @private Defines a setter-getter for the specified property. - * - *

If a cast function has been assigned to the specified property name, the - * property function is wrapped by the cast function, or, if a constant is - * specified, the constant is immediately cast. Note, however, that if the - * property value is null, the cast function is not invoked. - * - * @param {string} name the property name. - * @param {boolean} [def] whether is a property or a def. - * @param {function} [cast] the cast function for this property. - */ -pv.Mark.prototype.propertyMethod = function(name, def, cast) { - if (!cast) cast = pv.Mark.cast[name]; - this[name] = function(v) { - - /* If this is a def, use it rather than property. */ - if (def && this.scene) { - var defs = this.scene.defs; - if (arguments.length) { - defs[name] = { - id: (v == null) ? 0 : pv.id(), - value: ((v != null) && cast) ? cast(v) : v - }; - return this; - } - return defs[name] ? defs[name].value : null; - } - - /* If arguments are specified, set the property value. */ - if (arguments.length) { - var type = !def << 1 | (typeof v == "function"); - this.propertyValue(name, (type & 1 && cast) ? function() { - var x = v.apply(this, arguments); - return (x != null) ? cast(x) : null; - } : (((v != null) && cast) ? cast(v) : v)).type = type; - return this; - } - - return this.instance()[name]; - }; -}; - -/** @private Sets the value of the property name to v. */ -pv.Mark.prototype.propertyValue = function(name, v) { - var properties = this.$properties, p = {name: name, id: pv.id(), value: v}; - for (var i = 0; i < properties.length; i++) { - if (properties[i].name == name) { - properties.splice(i, 1); - break; - } - } - properties.push(p); - return p; -}; - -/* Define all global properties. */ -pv.Mark.prototype - .property("data") - .property("visible", Boolean) - .property("left", Number) - .property("right", Number) - .property("top", Number) - .property("bottom", Number) - .property("cursor", String) - .property("title", String) - .property("reverse", Boolean) - .property("antialias", Boolean) - .property("events", String); - -/** - * The mark type; a lower camelCase name. The type name controls rendering - * behavior, and unless the rendering engine is extended, must be one of the - * built-in concrete mark types: area, bar, dot, image, label, line, panel, - * rule, or wedge. - * - * @type string - * @name pv.Mark.prototype.type - */ - -/** - * The mark prototype, possibly undefined, from which to inherit property - * functions. The mark prototype is not necessarily of the same type as this - * mark. Any properties defined on this mark will override properties inherited - * either from the prototype or from the type-specific defaults. - * - * @type pv.Mark - * @name pv.Mark.prototype.proto - */ - -/** - * The enclosing parent panel. The parent panel is generally undefined only for - * the root panel; however, it is possible to create "offscreen" marks that are - * used only for inheritance purposes. - * - * @type pv.Panel - * @name pv.Mark.prototype.parent - */ - -/** - * The child index. -1 if the enclosing parent panel is null; otherwise, the - * zero-based index of this mark into the parent panel's children array. - * - * @type number - */ -pv.Mark.prototype.childIndex = -1; - -/** - * The mark index. The value of this field depends on which instance (i.e., - * which element of the data array) is currently being evaluated. During the - * build phase, the index is incremented over each datum; when handling events, - * the index is set to the instance that triggered the event. - * - * @type number - */ -pv.Mark.prototype.index = -1; - -/** - * The current scale factor, based on any enclosing transforms. The current - * scale can be used to create scale-independent graphics. For example, to - * define a dot that has a radius of 10 irrespective of any zooming, say: - * - *

dot.radius(function() 10 / this.scale)
- * - * Note that the stroke width and font size are defined irrespective of scale - * (i.e., in screen space) already. Also note that when a transform is applied - * to a panel, the scale affects only the child marks, not the panel itself. - * - * @type number - * @see pv.Panel#transform - */ -pv.Mark.prototype.scale = 1; - -/** - * @private The scene graph. The scene graph is an array of objects; each object - * (or "node") corresponds to an instance of this mark and an element in the - * data array. The scene graph can be traversed to lookup previously-evaluated - * properties. - * - * @name pv.Mark.prototype.scene - */ - -/** - * The root parent panel. This may be undefined for "offscreen" marks that are - * created for inheritance purposes only. - * - * @type pv.Panel - * @name pv.Mark.prototype.root - */ - -/** - * The data property; an array of objects. The size of the array determines the - * number of marks that will be instantiated; each element in the array will be - * passed to property functions to compute the property values. Typically, the - * data property is specified as a constant array, such as - * - *
m.data([1, 2, 3, 4, 5]);
- * - * However, it is perfectly acceptable to define the data property as a - * function. This function might compute the data dynamically, allowing - * different data to be used per enclosing panel. For instance, in the stacked - * area graph example (see {@link #scene}), the data function on the area mark - * dereferences each series. - * - * @type array - * @name pv.Mark.prototype.data - */ - -/** - * The visible property; a boolean determining whether or not the mark instance - * is visible. If a mark instance is not visible, its other properties will not - * be evaluated. Similarly, for panels no child marks will be rendered. - * - * @type boolean - * @name pv.Mark.prototype.visible - */ - -/** - * The left margin; the distance, in pixels, between the left edge of the - * enclosing panel and the left edge of this mark. Note that in some cases this - * property may be redundant with the right property, or with the conjunction of - * right and width. - * - * @type number - * @name pv.Mark.prototype.left - */ - -/** - * The right margin; the distance, in pixels, between the right edge of the - * enclosing panel and the right edge of this mark. Note that in some cases this - * property may be redundant with the left property, or with the conjunction of - * left and width. - * - * @type number - * @name pv.Mark.prototype.right - */ - -/** - * The top margin; the distance, in pixels, between the top edge of the - * enclosing panel and the top edge of this mark. Note that in some cases this - * property may be redundant with the bottom property, or with the conjunction - * of bottom and height. - * - * @type number - * @name pv.Mark.prototype.top - */ - -/** - * The bottom margin; the distance, in pixels, between the bottom edge of the - * enclosing panel and the bottom edge of this mark. Note that in some cases - * this property may be redundant with the top property, or with the conjunction - * of top and height. - * - * @type number - * @name pv.Mark.prototype.bottom - */ - -/** - * The cursor property; corresponds to the CSS cursor property. This is - * typically used in conjunction with event handlers to indicate interactivity. - * - * @type string - * @name pv.Mark.prototype.cursor - * @see CSS2 cursor - */ - -/** - * The title property; corresponds to the HTML/SVG title property, allowing the - * general of simple plain text tooltips. - * - * @type string - * @name pv.Mark.prototype.title - */ - -/** - * The events property; corresponds to the SVG pointer-events property, - * specifying how the mark should participate in mouse events. The default value - * is "painted". Supported values are: - * - *

"painted": The given mark may receive events when the mouse is over a - * "painted" area. The painted areas are the interior (i.e., fill) of the mark - * if a 'fillStyle' is specified, and the perimeter (i.e., stroke) of the mark - * if a 'strokeStyle' is specified. - * - *

"all": The given mark may receive events when the mouse is over either the - * interior (i.e., fill) or the perimeter (i.e., stroke) of the mark, regardless - * of the specified fillStyle and strokeStyle. - * - *

"none": The given mark may not receive events. - * - * @type string - * @name pv.Mark.prototype.events - */ - -/** - * The reverse property; a boolean determining whether marks are ordered from - * front-to-back or back-to-front. SVG does not support explicit z-ordering; - * shapes are rendered in the order they appear. Thus, by default, marks are - * rendered in data order. Setting the reverse property to false reverses the - * order in which they are rendered; however, the properties are still evaluated - * (i.e., built) in forward order. - * - * @type boolean - * @name pv.Mark.prototype.reverse - */ - -/** - * Default properties for all mark types. By default, the data array is the - * parent data as a single-element array; if the data property is not specified, - * this causes each mark to be instantiated as a singleton with the parents - * datum. The visible property is true by default, and the reverse property is - * false. - * - * @type pv.Mark - */ -pv.Mark.prototype.defaults = new pv.Mark() - .data(function(d) { return [d]; }) - .visible(true) - .antialias(true) - .events("painted"); - -/** - * Sets the prototype of this mark to the specified mark. Any properties not - * defined on this mark may be inherited from the specified prototype mark, or - * its prototype, and so on. The prototype mark need not be the same type of - * mark as this mark. (Note that for inheritance to be useful, properties with - * the same name on different mark types should have equivalent meaning.) - * - * @param {pv.Mark} proto the new prototype. - * @returns {pv.Mark} this mark. - * @see #add - */ -pv.Mark.prototype.extend = function(proto) { - this.proto = proto; - return this; -}; - -/** - * Adds a new mark of the specified type to the enclosing parent panel, whilst - * simultaneously setting the prototype of the new mark to be this mark. - * - * @param {function} type the type of mark to add; a constructor, such as - * pv.Bar. - * @returns {pv.Mark} the new mark. - * @see #extend - */ -pv.Mark.prototype.add = function(type) { - return this.parent.add(type).extend(this); -}; - -/** - * Defines a custom property on this mark. Custom properties are currently - * fixed, in that they are initialized once per mark set (i.e., per parent panel - * instance). Custom properties can be used to store local state for the mark, - * such as data needed by other properties (e.g., a custom scale) or interaction - * state. - * - *

WARNING We plan on changing this feature in a future release to define - * standard properties, as opposed to fixed properties that behave - * idiosyncratically within event handlers. Furthermore, we recommend storing - * state in an external data structure, rather than tying it to the - * visualization specification as with defs. - * - * @param {string} name the name of the local variable. - * @param {function} [v] an optional initializer; may be a constant or a - * function. - */ -pv.Mark.prototype.def = function(name, v) { - this.propertyMethod(name, true); - return this[name](arguments.length > 1 ? v : null); -}; - -/** - * Returns an anchor with the specified name. All marks support the five - * standard anchor names:

    - * - *
  • top - *
  • left - *
  • center - *
  • bottom - *
  • right - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline). Text is - * rendered to appear inside the mark by default. - * - *

To facilitate stacking, anchors are defined in terms of their opposite - * edge. For example, the top anchor defines the bottom property, such that the - * mark extends upwards; the bottom anchor instead defines the top property, - * such that the mark extends downwards. See also {@link pv.Layout.Stack}. - * - *

While anchor names are typically constants, the anchor name is a true - * property, which means you can specify a function to compute the anchor name - * dynamically. See the {@link pv.Anchor#name} property for details. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} the new anchor. - */ -pv.Mark.prototype.anchor = function(name) { - var target = this, scene; - - /* Default anchor name. */ - if (!name) name = "center"; - - /** @private Find the instances of target that match source. */ - function instances(source) { - var mark = target, index = []; - - /* Mirrored descent. */ - while (!(scene = mark.scene)) { - source = source.parent; - index.push({index: source.index, childIndex: mark.childIndex}); - mark = mark.parent; - } - while (index.length) { - var i = index.pop(); - scene = scene[i.index].children[i.childIndex]; - } - - /* - * When the anchor target is also an ancestor, as in the case of adding - * to a panel anchor, only generate one instance per panel. Also, set - * the margins to zero, since they are offset by the enclosing panel. - */ - if (target.hasOwnProperty("index")) { - var s = pv.extend(scene[target.index]); - s.right = s.top = s.left = s.bottom = 0; - return [s]; - } - return scene; - } - - return new pv.Anchor(this) - .name(name) - .def("$mark.anchor", function() { - scene = this.scene.target = instances(this); - }) - .data(function() { - return scene.map(function(s) { return s.data; }); - }) - .visible(function() { - return scene[this.index].visible; - }) - .left(function() { - var s = scene[this.index], w = s.width || 0; - switch (this.name()) { - case "bottom": - case "top": - case "center": return s.left + w / 2; - case "left": return null; - } - return s.left + w; - }) - .top(function() { - var s = scene[this.index], h = s.height || 0; - switch (this.name()) { - case "left": - case "right": - case "center": return s.top + h / 2; - case "top": return null; - } - return s.top + h; - }) - .right(function() { - var s = scene[this.index]; - return this.name() == "left" ? s.right + (s.width || 0) : null; - }) - .bottom(function() { - var s = scene[this.index]; - return this.name() == "top" ? s.bottom + (s.height || 0) : null; - }) - .textAlign(function() { - switch (this.name()) { - case "bottom": - case "top": - case "center": return "center"; - case "right": return "right"; - } - return "left"; - }) - .textBaseline(function() { - switch (this.name()) { - case "right": - case "left": - case "center": return "middle"; - case "top": return "top"; - } - return "bottom"; - }); -}; - -/** - * Returns the anchor target of this mark, if it is derived from an anchor; - * otherwise returns null. For example, if a label is derived from a bar anchor, - * - *

bar.anchor("top").add(pv.Label);
- * - * then property functions on the label can refer to the bar via the - * anchorTarget method. This method is also useful for mark types - * defining properties on custom anchors. - * - * @returns {pv.Mark} the anchor target of this mark; possibly null. - */ -pv.Mark.prototype.anchorTarget = function() { - return this.proto.anchorTarget(); -}; - -/** - * Alias for setting the left, right, top and bottom properties simultaneously. - * - * @see #left - * @see #right - * @see #top - * @see #bottom - * @returns {pv.Mark} this. - */ -pv.Mark.prototype.margin = function(n) { - return this.left(n).right(n).top(n).bottom(n); -}; - -/** - * @private Returns the current instance of this mark in the scene graph. This - * is typically equivalent to this.scene[this.index], however if the - * scene or index is unset, the default instance of the mark is returned. If no - * default is set, the default is the last instance. Similarly, if the scene or - * index of the parent panel is unset, the default instance of this mark in the - * last instance of the enclosing panel is returned, and so on. - * - * @returns a node in the scene graph. - */ -pv.Mark.prototype.instance = function(defaultIndex) { - var scene = this.scene || this.parent.instance(-1).children[this.childIndex], - index = !arguments.length || this.hasOwnProperty("index") ? this.index : defaultIndex; - return scene[index < 0 ? scene.length - 1 : index]; -}; - -/** - * @private Returns the first instance of this mark in the scene graph. This - * method can only be called when the mark is bound to the scene graph (for - * example, from an event handler, or within a property function). - * - * @returns a node in the scene graph. - */ -pv.Mark.prototype.first = function() { - return this.scene[0]; -}; - -/** - * @private Returns the last instance of this mark in the scene graph. This - * method can only be called when the mark is bound to the scene graph (for - * example, from an event handler, or within a property function). In addition, - * note that mark instances are built sequentially, so the last instance of this - * mark may not yet be constructed. - * - * @returns a node in the scene graph. - */ -pv.Mark.prototype.last = function() { - return this.scene[this.scene.length - 1]; -}; - -/** - * @private Returns the previous instance of this mark in the scene graph, or - * null if this is the first instance. - * - * @returns a node in the scene graph, or null. - */ -pv.Mark.prototype.sibling = function() { - return (this.index == 0) ? null : this.scene[this.index - 1]; -}; - -/** - * @private Returns the current instance in the scene graph of this mark, in the - * previous instance of the enclosing parent panel. May return null if this - * instance could not be found. - * - * @returns a node in the scene graph, or null. - */ -pv.Mark.prototype.cousin = function() { - var p = this.parent, s = p && p.sibling(); - return (s && s.children) ? s.children[this.childIndex][this.index] : null; -}; - -/** - * Renders this mark, including recursively rendering all child marks if this is - * a panel. This method finds all instances of this mark and renders them. This - * method descends recursively to the level of the mark to be rendered, finding - * all visible instances of the mark. After the marks are rendered, the scene - * and index attributes are removed from the mark to restore them to a clean - * state. - * - *

If an enclosing panel has an index property set (as is the case inside in - * an event handler), then only instances of this mark inside the given instance - * of the panel will be rendered; otherwise, all visible instances of the mark - * will be rendered. - */ -pv.Mark.prototype.render = function() { - var parent = this.parent, - stack = pv.Mark.stack; - - /* For the first render, take it from the top. */ - if (parent && !this.root.scene) { - this.root.render(); - return; - } - - /* Record the path to this mark. */ - var indexes = []; - for (var mark = this; mark.parent; mark = mark.parent) { - indexes.unshift(mark.childIndex); - } - - /** @private */ - function render(mark, depth, scale) { - mark.scale = scale; - if (depth < indexes.length) { - stack.unshift(null); - if (mark.hasOwnProperty("index")) { - renderInstance(mark, depth, scale); - } else { - for (var i = 0, n = mark.scene.length; i < n; i++) { - mark.index = i; - renderInstance(mark, depth, scale); - } - delete mark.index; - } - stack.shift(); - } else { - mark.build(); - - /* - * In the update phase, the scene is rendered by creating and updating - * elements and attributes in the SVG image. No properties are evaluated - * during the update phase; instead the values computed previously in the - * build phase are simply translated into SVG. The update phase is - * decoupled (see pv.Scene) to allow different rendering engines. - */ - pv.Scene.scale = scale; - pv.Scene.updateAll(mark.scene); - } - delete mark.scale; - } - - /** - * @private Recursively renders the current instance of the specified mark. - * This is slightly tricky because `index` and `scene` properties may or may - * not already be set; if they are set, it means we are rendering only a - * specific instance; if they are unset, we are rendering all instances. - * Furthermore, we must preserve the original context of these properties when - * rendering completes. - * - *

Another tricky aspect is that the `scene` attribute should be set for - * any preceding children, so as to allow property chaining. This is - * consistent with first-pass rendering. - */ - function renderInstance(mark, depth, scale) { - var s = mark.scene[mark.index], i; - if (s.visible) { - var childIndex = indexes[depth], - child = mark.children[childIndex]; - - /* Set preceding child scenes. */ - for (i = 0; i < childIndex; i++) { - mark.children[i].scene = s.children[i]; - } - - /* Set current child scene, if necessary. */ - stack[0] = s.data; - if (child.scene) { - render(child, depth + 1, scale * s.transform.k); - } else { - child.scene = s.children[childIndex]; - render(child, depth + 1, scale * s.transform.k); - delete child.scene; - } - - /* Clear preceding child scenes. */ - for (i = 0; i < childIndex; i++) { - delete mark.children[i].scene; - } - } - } - - /* Bind this mark's property definitions. */ - this.bind(); - - /* The render context is the first ancestor with an explicit index. */ - while (parent && !parent.hasOwnProperty("index")) parent = parent.parent; - - /* Recursively render all instances of this mark. */ - this.context( - parent ? parent.scene : undefined, - parent ? parent.index : -1, - function() { render(this.root, 0, 1); }); -}; - -/** @private Stores the current data stack. */ -pv.Mark.stack = []; - -/** - * @private In the bind phase, inherited property definitions are cached so they - * do not need to be queried during build. - */ -pv.Mark.prototype.bind = function() { - var seen = {}, types = [[], [], [], []], data, visible; - - /** Scans the proto chain for the specified mark. */ - function bind(mark) { - do { - var properties = mark.$properties; - for (var i = properties.length - 1; i >= 0 ; i--) { - var p = properties[i]; - if (!(p.name in seen)) { - seen[p.name] = p; - switch (p.name) { - case "data": data = p; break; - case "visible": visible = p; break; - default: types[p.type].push(p); break; - } - } - } - } while (mark = mark.proto); - } - - /* Scan the proto chain for all defined properties. */ - bind(this); - bind(this.defaults); - types[1].reverse(); - types[3].reverse(); - - /* Any undefined properties are null. */ - var mark = this; - do for (var name in mark.properties) { - if (!(name in seen)) { - types[2].push(seen[name] = {name: name, type: 2, value: null}); - } - } while (mark = mark.proto); - - /* Define setter-getter for inherited defs. */ - var defs = types[0].concat(types[1]); - for (var i = 0; i < defs.length; i++) { - this.propertyMethod(defs[i].name, true); - } - - /* Setup binds to evaluate constants before functions. */ - this.binds = { - properties: seen, - data: data, - defs: defs, - required: [visible], - optional: pv.blend(types) - }; -}; - -/** - * @private Evaluates properties and computes implied properties. Properties are - * stored in the {@link #scene} array for each instance of this mark. - * - *

As marks are built recursively, the {@link #index} property is updated to - * match the current index into the data array for each mark. Note that the - * index property is only set for the mark currently being built and its - * enclosing parent panels. The index property for other marks is unset, but is - * inherited from the global Mark class prototype. This allows mark - * properties to refer to properties on other marks in the same panel - * conveniently; however, in general it is better to reference mark instances - * specifically through the scene graph rather than depending on the magical - * behavior of {@link #index}. - * - *

The root scene array has a special property, data, which stores - * the current data stack. The first element in this stack is the current datum, - * followed by the datum of the enclosing parent panel, and so on. The data - * stack should not be accessed directly; instead, property functions are passed - * the current data stack as arguments. - * - *

The evaluation of the data and visible properties is - * special. The data property is evaluated first; unlike the other - * properties, the data stack is from the parent panel, rather than the current - * mark, since the data is not defined until the data property is evaluated. - * The visisble property is subsequently evaluated for each instance; - * only if true will the {@link #buildInstance} method be called, evaluating - * other properties and recursively building the scene graph. - * - *

If this mark is being re-built, any old instances of this mark that no - * longer exist (because the new data array contains fewer elements) will be - * cleared using {@link #clearInstance}. - * - * @param parent the instance of the parent panel from the scene graph. - */ -pv.Mark.prototype.build = function() { - var scene = this.scene, stack = pv.Mark.stack; - if (!scene) { - scene = this.scene = []; - scene.mark = this; - scene.type = this.type; - scene.childIndex = this.childIndex; - if (this.parent) { - scene.parent = this.parent.scene; - scene.parentIndex = this.parent.index; - } - } - - /* Evaluate defs. */ - if (this.binds.defs.length) { - var defs = scene.defs; - if (!defs) scene.defs = defs = {}; - for (var i = 0; i < this.binds.defs.length; i++) { - var p = this.binds.defs[i], d = defs[p.name]; - if (!d || (p.id > d.id)) { - defs[p.name] = { - id: 0, // this def will be re-evaluated on next build - value: (p.type & 1) ? p.value.apply(this, stack) : p.value - }; - } - } - } - - /* Evaluate special data property. */ - var data = this.binds.data; - data = data.type & 1 ? data.value.apply(this, stack) : data.value; - - /* Create, update and delete scene nodes. */ - stack.unshift(null); - scene.length = data.length; - for (var i = 0; i < data.length; i++) { - pv.Mark.prototype.index = this.index = i; - var s = scene[i]; - if (!s) scene[i] = s = {}; - s.data = stack[0] = data[i]; - this.buildInstance(s); - } - pv.Mark.prototype.index = -1; - delete this.index; - stack.shift(); - - return this; -}; - -/** - * @private Evaluates the specified array of properties for the specified - * instance s in the scene graph. - * - * @param s a node in the scene graph; the instance of the mark to build. - * @param properties an array of properties. - */ -pv.Mark.prototype.buildProperties = function(s, properties) { - for (var i = 0, n = properties.length; i < n; i++) { - var p = properties[i], v = p.value; // assume case 2 (constant) - switch (p.type) { - case 0: - case 1: v = this.scene.defs[p.name].value; break; - case 3: v = v.apply(this, pv.Mark.stack); break; - } - s[p.name] = v; - } -}; - -/** - * @private Evaluates all of the properties for this mark for the specified - * instance s in the scene graph. The set of properties to evaluate is - * retrieved from the {@link #properties} array for this mark type (see {@link - * #type}). After these properties are evaluated, any implied properties - * may be computed by the mark and set on the scene graph; see - * {@link #buildImplied}. - * - *

For panels, this method recursively builds the scene graph for all child - * marks as well. In general, this method should not need to be overridden by - * concrete mark types. - * - * @param s a node in the scene graph; the instance of the mark to build. - */ -pv.Mark.prototype.buildInstance = function(s) { - this.buildProperties(s, this.binds.required); - if (s.visible) { - this.buildProperties(s, this.binds.optional); - this.buildImplied(s); - } -}; - -/** - * @private Computes the implied properties for this mark for the specified - * instance s in the scene graph. Implied properties are those with - * dependencies on multiple other properties; for example, the width property - * may be implied if the left and right properties are set. This method can be - * overridden by concrete mark types to define new implied properties, if - * necessary. - * - * @param s a node in the scene graph; the instance of the mark to build. - */ -pv.Mark.prototype.buildImplied = function(s) { - var l = s.left; - var r = s.right; - var t = s.top; - var b = s.bottom; - - /* Assume width and height are zero if not supported by this mark type. */ - var p = this.properties; - var w = p.width ? s.width : 0; - var h = p.height ? s.height : 0; - - /* Compute implied width, right and left. */ - var width = this.parent ? this.parent.width() : (w + l + r); - if (w == null) { - w = width - (r = r || 0) - (l = l || 0); - } else if (r == null) { - r = width - w - (l = l || 0); - } else if (l == null) { - l = width - w - (r = r || 0); - } - - /* Compute implied height, bottom and top. */ - var height = this.parent ? this.parent.height() : (h + t + b); - if (h == null) { - h = height - (t = t || 0) - (b = b || 0); - } else if (b == null) { - b = height - h - (t = t || 0); - } else if (t == null) { - t = height - h - (b = b || 0); - } - - s.left = l; - s.right = r; - s.top = t; - s.bottom = b; - - /* Only set width and height if they are supported by this mark type. */ - if (p.width) s.width = w; - if (p.height) s.height = h; - - /* Set any null colors to pv.Color.transparent. */ - if (p.textStyle && !s.textStyle) s.textStyle = pv.Color.transparent; - if (p.fillStyle && !s.fillStyle) s.fillStyle = pv.Color.transparent; - if (p.strokeStyle && !s.strokeStyle) s.strokeStyle = pv.Color.transparent; -}; - -/** - * Returns the current location of the mouse (cursor) relative to this mark's - * parent. The x coordinate corresponds to the left margin, while the - * y coordinate corresponds to the top margin. - * - * @returns {pv.Vector} the mouse location. - */ -pv.Mark.prototype.mouse = function() { - - /* Compute xy-coordinates relative to the panel. */ - var x = pv.event.pageX || 0, - y = pv.event.pageY || 0, - n = this.root.canvas(); - do { - x -= n.offsetLeft; - y -= n.offsetTop; - } while (n = n.offsetParent); - - /* Compute the inverse transform of all enclosing panels. */ - var t = pv.Transform.identity, - p = this.properties.transform ? this : this.parent, - pz = []; - do { pz.push(p); } while (p = p.parent); - while (p = pz.pop()) t = t.translate(p.left(), p.top()).times(p.transform()); - t = t.invert(); - - return pv.vector(x * t.k + t.x, y * t.k + t.y); -}; - -/** - * Registers an event handler for the specified event type with this mark. When - * an event of the specified type is triggered, the specified handler will be - * invoked. The handler is invoked in a similar method to property functions: - * the context is this mark instance, and the arguments are the full - * data stack. Event handlers can use property methods to manipulate the display - * properties of the mark: - * - *

m.event("click", function() this.fillStyle("red"));
- * - * Alternatively, the external data can be manipulated and the visualization - * redrawn: - * - *
m.event("click", function(d) {
- *     data = all.filter(function(k) k.name == d);
- *     vis.render();
- *   });
- * - * The return value of the event handler determines which mark gets re-rendered. - * Use defs ({@link #def}) to set temporary state from event handlers. - * - *

The complete set of event types is defined by SVG; see the reference - * below. The set of supported event types is:

    - * - *
  • click - *
  • mousedown - *
  • mouseup - *
  • mouseover - *
  • mousemove - *
  • mouseout - * - *
Since Protovis does not specify any concept of focus, it does not - * support key events; these should be handled outside the visualization using - * standard JavaScript. In the future, support for interaction may be extended - * to support additional event types, particularly those most relevant to - * interactive visualization, such as selection. - * - *

TODO In the current implementation, event handlers are not inherited from - * prototype marks. They must be defined explicitly on each interactive mark. In - * addition, only one event handler for a given event type can be defined; when - * specifying multiple event handlers for the same type, only the last one will - * be used. - * - * @see SVG events - * @param {string} type the event type. - * @param {function} handler the event handler. - * @returns {pv.Mark} this. - */ -pv.Mark.prototype.event = function(type, handler) { - this.$handlers[type] = pv.functor(handler); - return this; -}; - -/** @private Evaluates the function f with the specified context. */ -pv.Mark.prototype.context = function(scene, index, f) { - var proto = pv.Mark.prototype, - stack = pv.Mark.stack, - oscene = pv.Mark.scene, - oindex = proto.index; - - /** @private Sets the context. */ - function apply(scene, index) { - pv.Mark.scene = scene; - proto.index = index; - if (!scene) return; - - var that = scene.mark, - mark = that, - ancestors = []; - - /* Set ancestors' scene and index; populate data stack. */ - do { - ancestors.push(mark); - stack.push(scene[index].data); - mark.index = index; - mark.scene = scene; - index = scene.parentIndex; - scene = scene.parent; - } while (mark = mark.parent); - - /* Set ancestors' scale; requires top-down. */ - for (var i = ancestors.length - 1, k = 1; i > 0; i--) { - mark = ancestors[i]; - mark.scale = k; - k *= mark.scene[mark.index].transform.k; - } - - /* Set children's scene and scale. */ - if (that.children) for (var i = 0, n = that.children.length; i < n; i++) { - mark = that.children[i]; - mark.scene = that.scene[that.index].children[i]; - mark.scale = k; - } - } - - /** @private Clears the context. */ - function clear(scene, index) { - if (!scene) return; - var that = scene.mark, - mark; - - /* Reset children. */ - if (that.children) for (var i = 0, n = that.children.length; i < n; i++) { - mark = that.children[i]; - delete mark.scene; - delete mark.scale; - } - - /* Reset ancestors. */ - mark = that; - do { - stack.pop(); - if (mark.parent) { - delete mark.scene; - delete mark.scale; - } - delete mark.index; - } while (mark = mark.parent); - } - - /* Context switch, invoke the function, then switch back. */ - clear(oscene, oindex); - apply(scene, index); - try { - f.apply(this, stack); - } finally { - clear(scene, index); - apply(oscene, oindex); - } -}; - -/** @private Execute the event listener, then re-render. */ -pv.Mark.dispatch = function(type, scene, index) { - var m = scene.mark, p = scene.parent, l = m.$handlers[type]; - if (!l) return p && pv.Mark.dispatch(type, p, scene.parentIndex); - m.context(scene, index, function() { - m = l.apply(m, pv.Mark.stack); - if (m && m.render) m.render(); - }); - return true; -}; -/** - * Constructs a new mark anchor with default properties. - * - * @class Represents an anchor on a given mark. An anchor is itself a mark, but - * without a visual representation. It serves only to provide useful default - * properties that can be inherited by other marks. Each type of mark can define - * any number of named anchors for convenience. If the concrete mark type does - * not define an anchor implementation specifically, one will be inherited from - * the mark's parent class. - * - *

For example, the bar mark provides anchors for its four sides: left, - * right, top and bottom. Adding a label to the top anchor of a bar, - * - *

bar.anchor("top").add(pv.Label);
- * - * will render a text label on the top edge of the bar; the top anchor defines - * the appropriate position properties (top and left), as well as text-rendering - * properties for convenience (textAlign and textBaseline). - * - *

Note that anchors do not inherit from their targets; the positional - * properties are copied from the scene graph, which guarantees that the anchors - * are positioned correctly, even if the positional properties are not defined - * deterministically. (In addition, it also improves performance by avoiding - * re-evaluating expensive properties.) If you want the anchor to inherit from - * the target, use {@link pv.Mark#extend} before adding. For example: - * - *

bar.anchor("top").extend(bar).add(pv.Label);
- * - * The anchor defines it's own positional properties, but other properties (such - * as the title property, say) can be inherited using the above idiom. Also note - * that you can override positional properties in the anchor for custom - * behavior. - * - * @extends pv.Mark - * @param {pv.Mark} target the anchor target. - */ -pv.Anchor = function(target) { - pv.Mark.call(this); - this.target = target; - this.parent = target.parent; -}; - -pv.Anchor.prototype = pv.extend(pv.Mark) - .property("name", String); - -/** - * The anchor name. The set of supported anchor names is dependent on the - * concrete mark type; see the mark type for details. For example, bars support - * left, right, top and bottom anchors. - * - *

While anchor names are typically constants, the anchor name is a true - * property, which means you can specify a function to compute the anchor name - * dynamically. For instance, if you wanted to alternate top and bottom anchors, - * saying - * - *

m.anchor(function() (this.index % 2) ? "top" : "bottom").add(pv.Dot);
- * - * would have the desired effect. - * - * @type string - * @name pv.Anchor.prototype.name - */ - -/** - * Returns the anchor target of this mark, if it is derived from an anchor; - * otherwise returns null. For example, if a label is derived from a bar anchor, - * - *
bar.anchor("top").add(pv.Label);
- * - * then property functions on the label can refer to the bar via the - * anchorTarget method. This method is also useful for mark types - * defining properties on custom anchors. - * - * @returns {pv.Mark} the anchor target of this mark; possibly null. - */ -pv.Anchor.prototype.anchorTarget = function() { - return this.target; -}; -/** - * Constructs a new area mark with default properties. Areas are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents an area mark: the solid area between two series of - * connected line segments. Unsurprisingly, areas are used most frequently for - * area charts. - * - *

Just as a line represents a polyline, the Area mark type - * represents a polygon. However, an area is not an arbitrary polygon; - * vertices are paired either horizontally or vertically into parallel - * spans, and each span corresponds to an associated datum. Either the - * width or the height must be specified, but not both; this determines whether - * the area is horizontally-oriented or vertically-oriented. Like lines, areas - * can be stroked and filled with arbitrary colors. - * - *

See also the Area guide. - * - * @extends pv.Mark - */ -pv.Area = function() { - pv.Mark.call(this); -}; - -pv.Area.prototype = pv.extend(pv.Mark) - .property("width", Number) - .property("height", Number) - .property("lineWidth", Number) - .property("strokeStyle", pv.color) - .property("fillStyle", pv.color) - .property("segmented", Boolean) - .property("interpolate", String) - .property("tension", Number); - -pv.Area.prototype.type = "area"; - -/** - * The width of a given span, in pixels; used for horizontal spans. If the width - * is specified, the height property should be 0 (the default). Either the top - * or bottom property should be used to space the spans vertically, typically as - * a multiple of the index. - * - * @type number - * @name pv.Area.prototype.width - */ - -/** - * The height of a given span, in pixels; used for vertical spans. If the height - * is specified, the width property should be 0 (the default). Either the left - * or right property should be used to space the spans horizontally, typically - * as a multiple of the index. - * - * @type number - * @name pv.Area.prototype.height - */ - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the perimeter of the area. Unlike the - * {@link Line} mark type, the entire perimeter is stroked, rather than just one - * edge. The default value of this property is 1.5, but since the default stroke - * style is null, area marks are not stroked by default. - * - *

This property is fixed for non-segmented areas. See - * {@link pv.Mark}. - * - * @type number - * @name pv.Area.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the perimeter of the area. Unlike the {@link Line} mark type, the - * entire perimeter is stroked, rather than just one edge. The default value of - * this property is null, meaning areas are not stroked by default. - * - *

This property is fixed for non-segmented areas. See - * {@link pv.Mark}. - * - * @type string - * @name pv.Area.prototype.strokeStyle - * @see pv.color - */ - -/** - * The area fill style; if non-null, the interior of the polygon forming the - * area is filled with the specified color. The default value of this property - * is a categorical color. - * - *

This property is fixed for non-segmented areas. See - * {@link pv.Mark}. - * - * @type string - * @name pv.Area.prototype.fillStyle - * @see pv.color - */ - -/** - * Whether the area is segmented; whether variations in fill style, stroke - * style, and the other properties are treated as fixed. Rendering segmented - * areas is noticeably slower than non-segmented areas. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type boolean - * @name pv.Area.prototype.segmented - */ - -/** - * How to interpolate between values. Linear interpolation ("linear") is the - * default, producing a straight line between points. For piecewise constant - * functions (i.e., step functions), either "step-before" or "step-after" can be - * specified. To draw open uniform b-splines, specify "basis". To draw cardinal - * splines, specify "cardinal"; see also {@link #tension}. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type string - * @name pv.Area.prototype.interpolate - */ - -/** - * The tension of cardinal splines; used in conjunction with - * interpolate("cardinal"). A value between 0 and 1 draws cardinal splines with - * the given tension. In some sense, the tension can be interpreted as the - * "length" of the tangent; a tension of 1 will yield all zero tangents (i.e., - * linear interpolation), and a tension of 0 yields a Catmull-Rom spline. The - * default value is 0.7. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type number - * @name pv.Area.prototype.tension - */ - -/** - * Default properties for areas. By default, there is no stroke and the fill - * style is a categorical color. - * - * @type pv.Area - */ -pv.Area.prototype.defaults = new pv.Area() - .extend(pv.Mark.prototype.defaults) - .lineWidth(1.5) - .fillStyle(pv.Colors.category20().by(pv.parent)) - .interpolate("linear") - .tension(.7); - -/** @private Sets width and height to zero if null. */ -pv.Area.prototype.buildImplied = function(s) { - if (s.height == null) s.height = 0; - if (s.width == null) s.width = 0; - pv.Mark.prototype.buildImplied.call(this, s); -}; - -/** @private Records which properties may be fixed. */ -pv.Area.fixed = { - lineWidth: 1, - lineJoin: 1, - strokeStyle: 1, - fillStyle: 1, - segmented: 1, - interpolate: 1, - tension: 1 -}; - -/** - * @private Make segmented required, such that this fixed property is always - * evaluated, even if the first segment is not visible. Also cache which - * properties are normally fixed. - */ -pv.Area.prototype.bind = function() { - pv.Mark.prototype.bind.call(this); - var binds = this.binds, - required = binds.required, - optional = binds.optional; - for (var i = 0, n = optional.length; i < n; i++) { - var p = optional[i]; - p.fixed = p.name in pv.Area.fixed; - if (p.name == "segmented") { - required.push(p); - optional.splice(i, 1); - i--; - n--; - } - } - - /* Cache the original arrays so they can be restored on build. */ - this.binds.$required = required; - this.binds.$optional = optional; -}; - -/** - * @private Override the default build behavior such that fixed properties are - * determined dynamically, based on the value of the (always) fixed segmented - * property. Any fixed properties are only evaluated on the first instance, - * although their values are propagated to subsequent instances, so that they - * are available for property chaining and the like. - */ -pv.Area.prototype.buildInstance = function(s) { - var binds = this.binds; - - /* Handle fixed properties on secondary instances. */ - if (this.index) { - var fixed = binds.fixed; - - /* Determine which properties are fixed. */ - if (!fixed) { - fixed = binds.fixed = []; - function f(p) { return !p.fixed || (fixed.push(p), false); } - binds.required = binds.required.filter(f); - if (!this.scene[0].segmented) binds.optional = binds.optional.filter(f); - } - - /* Copy fixed property values from the first instance. */ - for (var i = 0, n = fixed.length; i < n; i++) { - var p = fixed[i].name; - s[p] = this.scene[0][p]; - } - } - - /* Evaluate all properties on the first instance. */ - else { - binds.required = binds.$required; - binds.optional = binds.$optional; - binds.fixed = null; - } - - pv.Mark.prototype.buildInstance.call(this, s); -}; - -/** - * Constructs a new area anchor with default properties. Areas support five - * different anchors:

    - * - *
  • top - *
  • left - *
  • center - *
  • bottom - *
  • right - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline). Text - * is rendered to appear inside the area. The area anchor also propagates the - * interpolate, eccentricity, and tension properties such that an anchored area - * or line will match positions between control points. - * - *

For consistency with the other mark types, the anchor positions are - * defined in terms of their opposite edge. For example, the top anchor defines - * the bottom property, such that an area added to the top anchor grows upward. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} - */ -pv.Area.prototype.anchor = function(name) { - var scene; - return pv.Mark.prototype.anchor.call(this, name) - .def("$area.anchor", function() { - scene = this.scene.target; - }) - .interpolate(function() { - return scene[this.index].interpolate; - }) - .eccentricity(function() { - return scene[this.index].eccentricity; - }) - .tension(function() { - return scene[this.index].tension; - }); -}; -/** - * Constructs a new bar mark with default properties. Bars are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a bar: an axis-aligned rectangle that can be stroked and - * filled. Bars are used for many chart types, including bar charts, histograms - * and Gantt charts. Bars can also be used as decorations, for example to draw a - * frame border around a panel; in fact, a panel is a special type (a subclass) - * of bar. - * - *

Bars can be positioned in several ways. Most commonly, one of the four - * corners is fixed using two margins, and then the width and height properties - * determine the extent of the bar relative to this fixed location. For example, - * using the bottom and left properties fixes the bottom-left corner; the width - * then extends to the right, while the height extends to the top. As an - * alternative to the four corners, a bar can be positioned exclusively using - * margins; this is convenient as an inset from the containing panel, for - * example. See {@link pv.Mark} for details on the prioritization of redundant - * positioning properties. - * - *

See also the Bar guide. - * - * @extends pv.Mark - */ -pv.Bar = function() { - pv.Mark.call(this); -}; - -pv.Bar.prototype = pv.extend(pv.Mark) - .property("width", Number) - .property("height", Number) - .property("lineWidth", Number) - .property("strokeStyle", pv.color) - .property("fillStyle", pv.color); - -pv.Bar.prototype.type = "bar"; - -/** - * The width of the bar, in pixels. If the left position is specified, the bar - * extends rightward from the left edge; if the right position is specified, the - * bar extends leftward from the right edge. - * - * @type number - * @name pv.Bar.prototype.width - */ - -/** - * The height of the bar, in pixels. If the bottom position is specified, the - * bar extends upward from the bottom edge; if the top position is specified, - * the bar extends downward from the top edge. - * - * @type number - * @name pv.Bar.prototype.height - */ - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the bar's border. - * - * @type number - * @name pv.Bar.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the bar's border. The default value of this property is null, meaning - * bars are not stroked by default. - * - * @type string - * @name pv.Bar.prototype.strokeStyle - * @see pv.color - */ - -/** - * The bar fill style; if non-null, the interior of the bar is filled with the - * specified color. The default value of this property is a categorical color. - * - * @type string - * @name pv.Bar.prototype.fillStyle - * @see pv.color - */ - -/** - * Default properties for bars. By default, there is no stroke and the fill - * style is a categorical color. - * - * @type pv.Bar - */ -pv.Bar.prototype.defaults = new pv.Bar() - .extend(pv.Mark.prototype.defaults) - .lineWidth(1.5) - .fillStyle(pv.Colors.category20().by(pv.parent)); -/** - * Constructs a new dot mark with default properties. Dots are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a dot; a dot is simply a sized glyph centered at a given - * point that can also be stroked and filled. The size property is - * proportional to the area of the rendered glyph to encourage meaningful visual - * encodings. Dots can visually encode up to eight dimensions of data, though - * this may be unwise due to integrality. See {@link pv.Mark} for details on the - * prioritization of redundant positioning properties. - * - *

See also the Dot guide. - * - * @extends pv.Mark - */ -pv.Dot = function() { - pv.Mark.call(this); -}; - -pv.Dot.prototype = pv.extend(pv.Mark) - .property("size", Number) - .property("radius", Number) - .property("shape", String) - .property("angle", Number) - .property("lineWidth", Number) - .property("strokeStyle", pv.color) - .property("fillStyle", pv.color); - -pv.Dot.prototype.type = "dot"; - -/** - * The size of the dot, in square pixels. Square pixels are used such that the - * area of the dot is linearly proportional to the value of the size property, - * facilitating representative encodings. - * - * @see #radius - * @type number - * @name pv.Dot.prototype.size - */ - -/** - * The radius of the dot, in pixels. This is an alternative to using - * {@link #size}. - * - * @see #size - * @type number - * @name pv.Dot.prototype.radius - */ - -/** - * The shape name. Several shapes are supported:

    - * - *
  • cross - *
  • triangle - *
  • diamond - *
  • square - *
  • circle - *
  • tick - *
  • bar - * - *
These shapes can be further changed using the {@link #angle} property; - * for instance, a cross can be turned into a plus by rotating. Similarly, the - * tick, which is vertical by default, can be rotated horizontally. Note that - * some shapes (cross and tick) do not have interior areas, and thus do not - * support fill style meaningfully. - * - *

Note: it may be more natural to use the {@link pv.Rule} mark for - * horizontal and vertical ticks. The tick shape is only necessary if angled - * ticks are needed. - * - * @type string - * @name pv.Dot.prototype.shape - */ - -/** - * The rotation angle, in radians. Used to rotate shapes, such as to turn a - * cross into a plus. - * - * @type number - * @name pv.Dot.prototype.angle - */ - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the dot's shape. - * - * @type number - * @name pv.Dot.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the dot's shape. The default value of this property is a categorical - * color. - * - * @type string - * @name pv.Dot.prototype.strokeStyle - * @see pv.color - */ - -/** - * The fill style; if non-null, the interior of the dot is filled with the - * specified color. The default value of this property is null, meaning dots are - * not filled by default. - * - * @type string - * @name pv.Dot.prototype.fillStyle - * @see pv.color - */ - -/** - * Default properties for dots. By default, there is no fill and the stroke - * style is a categorical color. The default shape is "circle" with size 20. - * - * @type pv.Dot - */ -pv.Dot.prototype.defaults = new pv.Dot() - .extend(pv.Mark.prototype.defaults) - .size(20) - .shape("circle") - .lineWidth(1.5) - .strokeStyle(pv.Colors.category10().by(pv.parent)); - -/** - * Constructs a new dot anchor with default properties. Dots support five - * different anchors:

    - * - *
  • top - *
  • left - *
  • center - *
  • bottom - *
  • right - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline). Text is - * rendered to appear outside the dot. Note that this behavior is different from - * other mark anchors, which default to rendering text inside the mark. - * - *

For consistency with the other mark types, the anchor positions are - * defined in terms of their opposite edge. For example, the top anchor defines - * the bottom property, such that a bar added to the top anchor grows upward. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} - */ -pv.Dot.prototype.anchor = function(name) { - var scene; - return pv.Mark.prototype.anchor.call(this, name) - .def("$wedge.anchor", function() { - scene = this.scene.target; - }) - .left(function() { - var s = scene[this.index]; - switch (this.name()) { - case "bottom": - case "top": - case "center": return s.left; - case "left": return null; - } - return s.left + s.radius; - }) - .right(function() { - var s = scene[this.index]; - return this.name() == "left" ? s.right + s.radius : null; - }) - .top(function() { - var s = scene[this.index]; - switch (this.name()) { - case "left": - case "right": - case "center": return s.top; - case "top": return null; - } - return s.top + s.radius; - }) - .bottom(function() { - var s = scene[this.index]; - return this.name() == "top" ? s.bottom + s.radius : null; - }) - .textAlign(function() { - switch (this.name()) { - case "left": return "right"; - case "bottom": - case "top": - case "center": return "center"; - } - return "left"; - }) - .textBaseline(function() { - switch (this.name()) { - case "right": - case "left": - case "center": return "middle"; - case "bottom": return "top"; - } - return "bottom"; - }); -}; - -/** @private Sets radius based on size or vice versa. */ -pv.Dot.prototype.buildImplied = function(s) { - if (s.radius == null) s.radius = Math.sqrt(s.size); - else if (s.size == null) s.size = s.radius * s.radius; - pv.Mark.prototype.buildImplied.call(this, s); -}; -/** - * Constructs a new label mark with default properties. Labels are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a text label, allowing textual annotation of other marks or - * arbitrary text within the visualization. The character data must be plain - * text (unicode), though the text can be styled using the {@link #font} - * property. If rich text is needed, external HTML elements can be overlaid on - * the canvas by hand. - * - *

Labels are positioned using the box model, similarly to {@link Dot}. Thus, - * a label has no width or height, but merely a text anchor location. The text - * is positioned relative to this anchor location based on the - * {@link #textAlign}, {@link #textBaseline} and {@link #textMargin} properties. - * Furthermore, the text may be rotated using {@link #textAngle}. - * - *

Labels ignore events, so as to not interfere with event handlers on - * underlying marks, such as bars. In the future, we may support event handlers - * on labels. - * - *

See also the Label guide. - * - * @extends pv.Mark - */ -pv.Label = function() { - pv.Mark.call(this); -}; - -pv.Label.prototype = pv.extend(pv.Mark) - .property("text", String) - .property("font", String) - .property("textAngle", Number) - .property("textStyle", pv.color) - .property("textAlign", String) - .property("textBaseline", String) - .property("textMargin", Number) - .property("textDecoration", String) - .property("textShadow", String); - -pv.Label.prototype.type = "label"; - -/** - * The character data to render; a string. The default value of the text - * property is the identity function, meaning the label's associated datum will - * be rendered using its toString. - * - * @type string - * @name pv.Label.prototype.text - */ - -/** - * The font format, per the CSS Level 2 specification. The default font is "10px - * sans-serif", for consistency with the HTML 5 canvas element specification. - * Note that since text is not wrapped, any line-height property will be - * ignored. The other font-style, font-variant, font-weight, font-size and - * font-family properties are supported. - * - * @see CSS2 fonts - * @type string - * @name pv.Label.prototype.font - */ - -/** - * The rotation angle, in radians. Text is rotated clockwise relative to the - * anchor location. For example, with the default left alignment, an angle of - * Math.PI / 2 causes text to proceed downwards. The default angle is zero. - * - * @type number - * @name pv.Label.prototype.textAngle - */ - -/** - * The text color. The name "textStyle" is used for consistency with "fillStyle" - * and "strokeStyle", although it might be better to rename this property (and - * perhaps use the same name as "strokeStyle"). The default color is black. - * - * @type string - * @name pv.Label.prototype.textStyle - * @see pv.color - */ - -/** - * The horizontal text alignment. One of:

    - * - *
  • left - *
  • center - *
  • right - * - *
The default horizontal alignment is left. - * - * @type string - * @name pv.Label.prototype.textAlign - */ - -/** - * The vertical text alignment. One of:
    - * - *
  • top - *
  • middle - *
  • bottom - * - *
The default vertical alignment is bottom. - * - * @type string - * @name pv.Label.prototype.textBaseline - */ - -/** - * The text margin; may be specified in pixels, or in font-dependent units (such - * as ".1ex"). The margin can be used to pad text away from its anchor location, - * in a direction dependent on the horizontal and vertical alignment - * properties. For example, if the text is left- and middle-aligned, the margin - * shifts the text to the right. The default margin is 3 pixels. - * - * @type number - * @name pv.Label.prototype.textMargin - */ - -/** - * A list of shadow effects to be applied to text, per the CSS Text Level 3 - * text-shadow property. An example specification is "0.1em 0.1em 0.1em - * rgba(0,0,0,.5)"; the first length is the horizontal offset, the second the - * vertical offset, and the third the blur radius. - * - * @see CSS3 text - * @type string - * @name pv.Label.prototype.textShadow - */ - -/** - * A list of decoration to be applied to text, per the CSS Text Level 3 - * text-decoration property. An example specification is "underline". - * - * @see CSS3 text - * @type string - * @name pv.Label.prototype.textDecoration - */ - -/** - * Default properties for labels. See the individual properties for the default - * values. - * - * @type pv.Label - */ -pv.Label.prototype.defaults = new pv.Label() - .extend(pv.Mark.prototype.defaults) - .events("none") - .text(pv.identity) - .font("10px sans-serif") - .textAngle(0) - .textStyle("black") - .textAlign("left") - .textBaseline("bottom") - .textMargin(3); -/** - * Constructs a new line mark with default properties. Lines are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a series of connected line segments, or polyline, - * that can be stroked with a configurable color and thickness. Each - * articulation point in the line corresponds to a datum; for n points, - * n-1 connected line segments are drawn. The point is positioned using - * the box model. Arbitrary paths are also possible, allowing radar plots and - * other custom visualizations. - * - *

Like areas, lines can be stroked and filled with arbitrary colors. In most - * cases, lines are only stroked, but the fill style can be used to construct - * arbitrary polygons. - * - *

See also the Line guide. - * - * @extends pv.Mark - */ -pv.Line = function() { - pv.Mark.call(this); -}; - -pv.Line.prototype = pv.extend(pv.Mark) - .property("lineWidth", Number) - .property("lineJoin", String) - .property("strokeStyle", pv.color) - .property("fillStyle", pv.color) - .property("segmented", Boolean) - .property("interpolate", String) - .property("eccentricity", Number) - .property("tension", Number); - -pv.Line.prototype.type = "line"; - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the line. - * - * @type number - * @name pv.Line.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the line. The default value of this property is a categorical color. - * - * @type string - * @name pv.Line.prototype.strokeStyle - * @see pv.color - */ - -/** - * The type of corners where two lines meet. Accepted values are "bevel", - * "round" and "miter". The default value is "miter". - * - *

For segmented lines, only "miter" joins and "linear" interpolation are - * currently supported. Any other value, including null, will disable joins, - * producing disjoint line segments. Note that the miter joins must be computed - * manually (at least in the current SVG renderer); since this calculation may - * be expensive and unnecessary for small lines, specifying null can improve - * performance significantly. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type string - * @name pv.Line.prototype.lineJoin - */ - -/** - * The line fill style; if non-null, the interior of the line is closed and - * filled with the specified color. The default value of this property is a - * null, meaning that lines are not filled by default. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type string - * @name pv.Line.prototype.fillStyle - * @see pv.color - */ - -/** - * Whether the line is segmented; whether variations in stroke style, line width - * and the other properties are treated as fixed. Rendering segmented lines is - * noticeably slower than non-segmented lines. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type boolean - * @name pv.Line.prototype.segmented - */ - -/** - * How to interpolate between values. Linear interpolation ("linear") is the - * default, producing a straight line between points. For piecewise constant - * functions (i.e., step functions), either "step-before" or "step-after" can be - * specified. To draw a clockwise circular arc between points, specify "polar"; - * to draw a counterclockwise circular arc between points, specify - * "polar-reverse". To draw open uniform b-splines, specify "basis". To draw - * cardinal splines, specify "cardinal"; see also {@link #tension}. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type string - * @name pv.Line.prototype.interpolate - */ - -/** - * The eccentricity of polar line segments; used in conjunction with - * interpolate("polar"). The default value of 0 means that line segments are - * drawn as circular arcs. A value of 1 draws a straight line. A value between 0 - * and 1 draws an elliptical arc with the given eccentricity. - * - * @type number - * @name pv.Line.prototype.eccentricity - */ - -/** - * The tension of cardinal splines; used in conjunction with - * interpolate("cardinal"). A value between 0 and 1 draws cardinal splines with - * the given tension. In some sense, the tension can be interpreted as the - * "length" of the tangent; a tension of 1 will yield all zero tangents (i.e., - * linear interpolation), and a tension of 0 yields a Catmull-Rom spline. The - * default value is 0.7. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type number - * @name pv.Line.prototype.tension - */ - -/** - * Default properties for lines. By default, there is no fill and the stroke - * style is a categorical color. The default interpolation is linear. - * - * @type pv.Line - */ -pv.Line.prototype.defaults = new pv.Line() - .extend(pv.Mark.prototype.defaults) - .lineJoin("miter") - .lineWidth(1.5) - .strokeStyle(pv.Colors.category10().by(pv.parent)) - .interpolate("linear") - .eccentricity(0) - .tension(.7); - -/** @private Reuse Area's implementation for segmented bind & build. */ -pv.Line.prototype.bind = pv.Area.prototype.bind; -pv.Line.prototype.buildInstance = pv.Area.prototype.buildInstance; - -/** - * Constructs a new line anchor with default properties. Lines support five - * different anchors:

    - * - *
  • top - *
  • left - *
  • center - *
  • bottom - *
  • right - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline). Text is - * rendered to appear outside the line. Note that this behavior is different - * from other mark anchors, which default to rendering text inside the - * mark. - * - *

For consistency with the other mark types, the anchor positions are - * defined in terms of their opposite edge. For example, the top anchor defines - * the bottom property, such that a bar added to the top anchor grows upward. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} - */ -pv.Line.prototype.anchor = function(name) { - return pv.Area.prototype.anchor.call(this, name) - .textAlign(function(d) { - switch (this.name()) { - case "left": return "right"; - case "bottom": - case "top": - case "center": return "center"; - case "right": return "left"; - } - }) - .textBaseline(function(d) { - switch (this.name()) { - case "right": - case "left": - case "center": return "middle"; - case "top": return "bottom"; - case "bottom": return "top"; - } - }); -}; -/** - * Constructs a new rule with default properties. Rules are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a horizontal or vertical rule. Rules are frequently used - * for axes and grid lines. For example, specifying only the bottom property - * draws horizontal rules, while specifying only the left draws vertical - * rules. Rules can also be used as thin bars. The visual style is controlled in - * the same manner as lines. - * - *

Rules are positioned exclusively the standard box model properties. The - * following combinations of properties are supported: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
PropertiesOrientation
leftvertical
rightvertical
left, bottom, topvertical
right, bottom, topvertical
tophorizontal
bottomhorizontal
top, left, righthorizontal
bottom, left, righthorizontal
left, top, heightvertical
left, bottom, heightvertical
right, top, heightvertical
right, bottom, heightvertical
left, top, widthhorizontal
left, bottom, widthhorizontal
right, top, widthhorizontal
right, bottom, widthhorizontal
- * - *

Small rules can be used as tick marks; alternatively, a {@link Dot} with - * the "tick" shape can be used. - * - *

See also the Rule guide. - * - * @see pv.Line - * @extends pv.Mark - */ -pv.Rule = function() { - pv.Mark.call(this); -}; - -pv.Rule.prototype = pv.extend(pv.Mark) - .property("width", Number) - .property("height", Number) - .property("lineWidth", Number) - .property("strokeStyle", pv.color); - -pv.Rule.prototype.type = "rule"; - -/** - * The width of the rule, in pixels. If the left position is specified, the rule - * extends rightward from the left edge; if the right position is specified, the - * rule extends leftward from the right edge. - * - * @type number - * @name pv.Rule.prototype.width - */ - -/** - * The height of the rule, in pixels. If the bottom position is specified, the - * rule extends upward from the bottom edge; if the top position is specified, - * the rule extends downward from the top edge. - * - * @type number - * @name pv.Rule.prototype.height - */ - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the rule. The default value is 1 pixel. - * - * @type number - * @name pv.Rule.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the rule. The default value of this property is black. - * - * @type string - * @name pv.Rule.prototype.strokeStyle - * @see pv.color - */ - -/** - * Default properties for rules. By default, a single-pixel black line is - * stroked. - * - * @type pv.Rule - */ -pv.Rule.prototype.defaults = new pv.Rule() - .extend(pv.Mark.prototype.defaults) - .lineWidth(1) - .strokeStyle("black") - .antialias(false); - -/** - * Constructs a new rule anchor with default properties. Rules support five - * different anchors:

    - * - *
  • top - *
  • left - *
  • center - *
  • bottom - *
  • right - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline). Text is - * rendered to appear outside the rule. Note that this behavior is different - * from other mark anchors, which default to rendering text inside the - * mark. - * - *

For consistency with the other mark types, the anchor positions are - * defined in terms of their opposite edge. For example, the top anchor defines - * the bottom property, such that a bar added to the top anchor grows upward. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} - */ -pv.Rule.prototype.anchor = pv.Line.prototype.anchor; - -/** @private Sets width or height based on orientation. */ -pv.Rule.prototype.buildImplied = function(s) { - var l = s.left, r = s.right, t = s.top, b = s.bottom; - - /* Determine horizontal or vertical orientation. */ - if ((s.width != null) - || ((l == null) && (r == null)) - || ((r != null) && (l != null))) { - s.height = 0; - } else { - s.width = 0; - } - - pv.Mark.prototype.buildImplied.call(this, s); -}; -/** - * Constructs a new, empty panel with default properties. Panels, with the - * exception of the root panel, are not typically constructed directly; instead, - * they are added to an existing panel or mark via {@link pv.Mark#add}. - * - * @class Represents a container mark. Panels allow repeated or nested - * structures, commonly used in small multiple displays where a small - * visualization is tiled to facilitate comparison across one or more - * dimensions. Other types of visualizations may benefit from repeated and - * possibly overlapping structure as well, such as stacked area charts. Panels - * can also offset the position of marks to provide padding from surrounding - * content. - * - *

All Protovis displays have at least one panel; this is the root panel to - * which marks are rendered. The box model properties (four margins, width and - * height) are used to offset the positions of contained marks. The data - * property determines the panel count: a panel is generated once per associated - * datum. When nested panels are used, property functions can declare additional - * arguments to access the data associated with enclosing panels. - * - *

Panels can be rendered inline, facilitating the creation of sparklines. - * This allows designers to reuse browser layout features, such as text flow and - * tables; designers can also overlay HTML elements such as rich text and - * images. - * - *

All panels have a children array (possibly empty) containing the - * child marks in the order they were added. Panels also have a root - * field which points to the root (outermost) panel; the root panel's root field - * points to itself. - * - *

See also the Protovis guide. - * - * @extends pv.Bar - */ -pv.Panel = function() { - pv.Bar.call(this); - - /** - * The child marks; zero or more {@link pv.Mark}s in the order they were - * added. - * - * @see #add - * @type pv.Mark[] - */ - this.children = []; - this.root = this; - - /** - * The internal $dom field is set by the Protovis loader; see lang/init.js. It - * refers to the script element that contains the Protovis specification, so - * that the panel knows where in the DOM to insert the generated SVG element. - * - * @private - */ - this.$dom = pv.$ && pv.$.s; -}; - -pv.Panel.prototype = pv.extend(pv.Bar) - .property("transform") - .property("overflow", String) - .property("canvas", function(c) { - return (typeof c == "string") - ? document.getElementById(c) - : c; // assume that c is the passed-in element - }); - -pv.Panel.prototype.type = "panel"; - -/** - * The canvas element; either the string ID of the canvas element in the current - * document, or a reference to the canvas element itself. If null, a canvas - * element will be created and inserted into the document at the location of the - * script element containing the current Protovis specification. This property - * only applies to root panels and is ignored on nested panels. - * - *

Note: the "canvas" element here refers to a div (or other suitable - * HTML container element), not a canvas element. The name of - * this property is a historical anachronism from the first implementation that - * used HTML 5 canvas, rather than SVG. - * - * @type string - * @name pv.Panel.prototype.canvas - */ - -/** - * Specifies whether child marks are clipped when they overflow this panel. - * This affects the clipping of all this panel's descendant marks. - * - * @type string - * @name pv.Panel.prototype.overflow - * @see CSS2 - */ - -/** - * The transform to be applied to child marks. The default transform is - * identity, which has no effect. Note that the panel's own fill and stroke are - * not affected by the transform, and panel's transform only affects the - * scale of child marks, not the panel itself. - * - * @type pv.Transform - * @name pv.Panel.prototype.transform - * @see pv.Mark#scale - */ - -/** - * Default properties for panels. By default, the margins are zero, the fill - * style is transparent. - * - * @type pv.Panel - */ -pv.Panel.prototype.defaults = new pv.Panel() - .extend(pv.Bar.prototype.defaults) - .fillStyle(null) // override Bar default - .overflow("visible"); - -/** - * Returns an anchor with the specified name. This method is overridden such - * that adding to a panel's anchor adds to the panel, rather than to the panel's - * parent. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} the new anchor. - */ -pv.Panel.prototype.anchor = function(name) { - var anchor = pv.Bar.prototype.anchor.call(this, name); - anchor.parent = this; - return anchor; -}; - -/** - * Adds a new mark of the specified type to this panel. Unlike the normal - * {@link Mark#add} behavior, adding a mark to a panel does not cause the mark - * to inherit from the panel. Since the contained marks are offset by the panel - * margins already, inheriting properties is generally undesirable; of course, - * it is always possible to change this behavior by calling {@link Mark#extend} - * explicitly. - * - * @param {function} type the type of the new mark to add. - * @returns {pv.Mark} the new mark. - */ -pv.Panel.prototype.add = function(type) { - var child = new type(); - child.parent = this; - child.root = this.root; - child.childIndex = this.children.length; - this.children.push(child); - return child; -}; - -/** @private Bind this panel, then any child marks recursively. */ -pv.Panel.prototype.bind = function() { - pv.Mark.prototype.bind.call(this); - for (var i = 0; i < this.children.length; i++) { - this.children[i].bind(); - } -}; - -/** - * @private Evaluates all of the properties for this panel for the specified - * instance s in the scene graph, including recursively building the - * scene graph for child marks. - * - * @param s a node in the scene graph; the instance of the panel to build. - * @see Mark#scene - */ -pv.Panel.prototype.buildInstance = function(s) { - pv.Bar.prototype.buildInstance.call(this, s); - if (!s.visible) return; - if (!s.children) s.children = []; - - /* - * Multiply the current scale factor by this panel's transform. Also clear the - * default index as we recurse into child marks; it will be reset to the - * current index when the next panel instance is built. - */ - var scale = this.scale * s.transform.k, child, n = this.children.length; - pv.Mark.prototype.index = -1; - - /* - * Build each child, passing in the parent (this panel) scene graph node. The - * child mark's scene is initialized from the corresponding entry in the - * existing scene graph, such that properties from the previous build can be - * reused; this is largely to facilitate the recycling of SVG elements. - */ - for (var i = 0; i < n; i++) { - child = this.children[i]; - child.scene = s.children[i]; // possibly undefined - child.scale = scale; - child.build(); - } - - /* - * Once the child marks have been built, the new scene graph nodes are removed - * from the child marks and placed into the scene graph. The nodes cannot - * remain on the child nodes because this panel (or a parent panel) may be - * instantiated multiple times! - */ - for (var i = 0; i < n; i++) { - child = this.children[i]; - s.children[i] = child.scene; - delete child.scene; - delete child.scale; - } - - /* Delete any expired child scenes. */ - s.children.length = n; -}; - -/** - * @private Computes the implied properties for this panel for the specified - * instance s in the scene graph. Panels have two implied - * properties:

    - * - *
  • The canvas property references the DOM element, typically a DIV, - * that contains the SVG element that is used to display the visualization. This - * property may be specified as a string, referring to the unique ID of the - * element in the DOM. The string is converted to a reference to the DOM - * element. The width and height of the SVG element is inferred from this DOM - * element. If no canvas property is specified, a new SVG element is created and - * inserted into the document, using the panel dimensions; see - * {@link #createCanvas}. - * - *
  • The children array, while not a property per se, contains the - * scene graph for each child mark. This array is initialized to be empty, and - * is populated above in {@link #buildInstance}. - * - *
The current implementation creates the SVG element, if necessary, during - * the build phase; in the future, it may be preferrable to move this to the - * update phase, although then the canvas property would be undefined. In - * addition, DOM inspection is necessary to define the implied width and height - * properties that may be inferred from the DOM. - * - * @param s a node in the scene graph; the instance of the panel to build. - */ -pv.Panel.prototype.buildImplied = function(s) { - if (!this.parent) { - var c = s.canvas; - if (c) { - /* Clear the container if it's not associated with this panel. */ - if (c.$panel != this) { - c.$panel = this; - while (c.lastChild) c.removeChild(c.lastChild); - } - - /* If width and height weren't specified, inspect the container. */ - var w, h; - if (s.width == null) { - w = parseFloat(pv.css(c, "width")); - s.width = w - s.left - s.right; - } - if (s.height == null) { - h = parseFloat(pv.css(c, "height")); - s.height = h - s.top - s.bottom; - } - } else { - var cache = this.$canvas || (this.$canvas = []); - if (!(c = cache[this.index])) { - c = cache[this.index] = document.createElement("span"); - if (this.$dom) { // script element for text/javascript+protovis - this.$dom.parentNode.insertBefore(c, this.$dom); - } else { // find the last element in the body - var n = document.body; - while (n.lastChild && n.lastChild.tagName) n = n.lastChild; - if (n != document.body) n = n.parentNode; - n.appendChild(c); - } - } - } - s.canvas = c; - } - if (!s.transform) s.transform = pv.Transform.identity; - pv.Mark.prototype.buildImplied.call(this, s); -}; -/** - * Constructs a new image with default properties. Images are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents an image, either a static resource or a dynamically- - * generated pixel buffer. Images share the same layout and style properties as - * bars. The external image resource is specified via the {@link #url} - * property. The optional fill, if specified, appears beneath the image, while - * the optional stroke appears above the image. - * - *

Dynamic images such as heatmaps are supported using the {@link #image} - * psuedo-property. This function is passed the x and y index, in - * addition to the current data stack. The return value is a {@link pv.Color}, - * or null for transparent. A string can also be returned, which will be parsed - * into a color; however, it is typically much faster to return an object with - * r, g, b and a attributes, to avoid the - * cost of parsing and object instantiation. - * - *

See {@link pv.Bar} for details on positioning properties. - * - * @extends pv.Bar - */ -pv.Image = function() { - pv.Bar.call(this); -}; - -pv.Image.prototype = pv.extend(pv.Bar) - .property("url", String) - .property("imageWidth", Number) - .property("imageHeight", Number); - -pv.Image.prototype.type = "image"; - -/** - * The URL of the image to display. The set of supported image types is - * browser-dependent; PNG and JPEG are recommended. - * - * @type string - * @name pv.Image.prototype.url - */ - -/** - * The width of the image in pixels. For static images, this property is - * computed implicitly from the loaded image resources. For dynamic images, this - * property can be used to specify the width of the pixel buffer; otherwise, the - * value is derived from the width property. - * - * @type number - * @name pv.Image.prototype.imageWidth - */ - -/** - * The height of the image in pixels. For static images, this property is - * computed implicitly from the loaded image resources. For dynamic images, this - * property can be used to specify the height of the pixel buffer; otherwise, the - * value is derived from the height property. - * - * @type number - * @name pv.Image.prototype.imageHeight - */ - -/** - * Default properties for images. By default, there is no stroke or fill style. - * - * @type pv.Image - */ -pv.Image.prototype.defaults = new pv.Image() - .extend(pv.Bar.prototype.defaults) - .fillStyle(null); - -/** - * Specifies the dynamic image function. By default, no image function is - * specified and the url property is used to load a static image - * resource. If an image function is specified, it will be invoked for each - * pixel in the image, based on the related imageWidth and - * imageHeight properties. - * - *

For example, given a two-dimensional array heatmap, containing - * numbers in the range [0, 1] in row-major order, a simple monochrome heatmap - * image can be specified as: - * - *

vis.add(pv.Image)
- *     .imageWidth(heatmap[0].length)
- *     .imageHeight(heatmap.length)
- *     .image(pv.ramp("white", "black").by(function(x, y) heatmap[y][x]));
- * - * For fastest performance, use an ordinal scale which caches the fixed color - * palette, or return an object literal with r, g, b - * and a attributes. A {@link pv.Color} or string can also be returned, - * though this typically results in slower performance. - * - * @param {function} f the new sizing function. - * @returns {pv.Layout.Pack} this. - */ -pv.Image.prototype.image = function(f) { - /** @private */ - this.$image = function() { - var c = f.apply(this, arguments); - return c == null ? pv.Color.transparent - : typeof c == "string" ? pv.color(c) - : c; - }; - return this; -}; - -/** @private Scan the proto chain for an image function. */ -pv.Image.prototype.bind = function() { - pv.Bar.prototype.bind.call(this); - var binds = this.binds, mark = this; - do { - binds.image = mark.$image; - } while (!binds.image && (mark = mark.proto)); -}; - -/** @private */ -pv.Image.prototype.buildImplied = function(s) { - pv.Bar.prototype.buildImplied.call(this, s); - if (!s.visible) return; - - /* Compute the implied image dimensions. */ - if (s.imageWidth == null) s.imageWidth = s.width; - if (s.imageHeight == null) s.imageHeight = s.height; - - /* Compute the pixel values. */ - if ((s.url == null) && this.binds.image) { - - /* Cache the canvas element to reuse across renders. */ - var canvas = this.$canvas || (this.$canvas = document.createElement("canvas")), - context = canvas.getContext("2d"), - w = s.imageWidth, - h = s.imageHeight, - stack = pv.Mark.stack, - data; - - /* Evaluate the image function, storing into a CanvasPixelArray. */ - canvas.width = w; - canvas.height = h; - data = (s.image = context.createImageData(w, h)).data; - stack.unshift(null, null); - for (var y = 0, p = 0; y < h; y++) { - stack[1] = y; - for (var x = 0; x < w; x++) { - stack[0] = x; - var color = this.binds.image.apply(this, stack); - data[p++] = color.r; - data[p++] = color.g; - data[p++] = color.b; - data[p++] = 255 * color.a; - } - } - stack.splice(0, 2); - } -}; -/** - * Constructs a new wedge with default properties. Wedges are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a wedge, or pie slice. Specified in terms of start and end - * angle, inner and outer radius, wedges can be used to construct donut charts - * and polar bar charts as well. If the {@link #angle} property is used, the end - * angle is implied by adding this value to start angle. By default, the start - * angle is the previously-generated wedge's end angle. This design allows - * explicit control over the wedge placement if desired, while offering - * convenient defaults for the construction of radial graphs. - * - *

The center point of the circle is positioned using the standard box model. - * The wedge can be stroked and filled, similar to {@link pv.Bar}. - * - *

See also the Wedge guide. - * - * @extends pv.Mark - */ -pv.Wedge = function() { - pv.Mark.call(this); -}; - -pv.Wedge.prototype = pv.extend(pv.Mark) - .property("startAngle", Number) - .property("endAngle", Number) - .property("angle", Number) - .property("innerRadius", Number) - .property("outerRadius", Number) - .property("lineWidth", Number) - .property("strokeStyle", pv.color) - .property("fillStyle", pv.color); - -pv.Wedge.prototype.type = "wedge"; - -/** - * The start angle of the wedge, in radians. The start angle is measured - * clockwise from the 3 o'clock position. The default value of this property is - * the end angle of the previous instance (the {@link Mark#sibling}), or -PI / 2 - * for the first wedge; for pie and donut charts, typically only the - * {@link #angle} property needs to be specified. - * - * @type number - * @name pv.Wedge.prototype.startAngle - */ - -/** - * The end angle of the wedge, in radians. If not specified, the end angle is - * implied as the start angle plus the {@link #angle}. - * - * @type number - * @name pv.Wedge.prototype.endAngle - */ - -/** - * The angular span of the wedge, in radians. This property is used if end angle - * is not specified. - * - * @type number - * @name pv.Wedge.prototype.angle - */ - -/** - * The inner radius of the wedge, in pixels. The default value of this property - * is zero; a positive value will produce a donut slice rather than a pie slice. - * The inner radius can vary per-wedge. - * - * @type number - * @name pv.Wedge.prototype.innerRadius - */ - -/** - * The outer radius of the wedge, in pixels. This property is required. For - * pies, only this radius is required; for donuts, the inner radius must be - * specified as well. The outer radius can vary per-wedge. - * - * @type number - * @name pv.Wedge.prototype.outerRadius - */ - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the wedge's border. - * - * @type number - * @name pv.Wedge.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the wedge's border. The default value of this property is null, - * meaning wedges are not stroked by default. - * - * @type string - * @name pv.Wedge.prototype.strokeStyle - * @see pv.color - */ - -/** - * The wedge fill style; if non-null, the interior of the wedge is filled with - * the specified color. The default value of this property is a categorical - * color. - * - * @type string - * @name pv.Wedge.prototype.fillStyle - * @see pv.color - */ - -/** - * Default properties for wedges. By default, there is no stroke and the fill - * style is a categorical color. - * - * @type pv.Wedge - */ -pv.Wedge.prototype.defaults = new pv.Wedge() - .extend(pv.Mark.prototype.defaults) - .startAngle(function() { - var s = this.sibling(); - return s ? s.endAngle : -Math.PI / 2; - }) - .innerRadius(0) - .lineWidth(1.5) - .strokeStyle(null) - .fillStyle(pv.Colors.category20().by(pv.index)); - -/** - * Returns the mid-radius of the wedge, which is defined as half-way between the - * inner and outer radii. - * - * @see #innerRadius - * @see #outerRadius - * @returns {number} the mid-radius, in pixels. - */ -pv.Wedge.prototype.midRadius = function() { - return (this.innerRadius() + this.outerRadius()) / 2; -}; - -/** - * Returns the mid-angle of the wedge, which is defined as half-way between the - * start and end angles. - * - * @see #startAngle - * @see #endAngle - * @returns {number} the mid-angle, in radians. - */ -pv.Wedge.prototype.midAngle = function() { - return (this.startAngle() + this.endAngle()) / 2; -}; - -/** - * Constructs a new wedge anchor with default properties. Wedges support five - * different anchors:

    - * - *
  • outer - *
  • inner - *
  • center - *
  • start - *
  • end - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline, - * textAngle). Text is rendered to appear inside the wedge. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} - */ -pv.Wedge.prototype.anchor = function(name) { - function partial(s) { return s.innerRadius || s.angle < 2 * Math.PI; } - function midRadius(s) { return (s.innerRadius + s.outerRadius) / 2; } - function midAngle(s) { return (s.startAngle + s.endAngle) / 2; } - var scene; - return pv.Mark.prototype.anchor.call(this, name) - .def("$wedge.anchor", function() { - scene = this.scene.target; - }) - .left(function() { - var s = scene[this.index]; - if (partial(s)) switch (this.name()) { - case "outer": return s.left + s.outerRadius * Math.cos(midAngle(s)); - case "inner": return s.left + s.innerRadius * Math.cos(midAngle(s)); - case "start": return s.left + midRadius(s) * Math.cos(s.startAngle); - case "center": return s.left + midRadius(s) * Math.cos(midAngle(s)); - case "end": return s.left + midRadius(s) * Math.cos(s.endAngle); - } - return s.left; - }) - .top(function() { - var s = scene[this.index]; - if (partial(s)) switch (this.name()) { - case "outer": return s.top + s.outerRadius * Math.sin(midAngle(s)); - case "inner": return s.top + s.innerRadius * Math.sin(midAngle(s)); - case "start": return s.top + midRadius(s) * Math.sin(s.startAngle); - case "center": return s.top + midRadius(s) * Math.sin(midAngle(s)); - case "end": return s.top + midRadius(s) * Math.sin(s.endAngle); - } - return s.top; - }) - .textAlign(function() { - var s = scene[this.index]; - if (partial(s)) switch (this.name()) { - case "outer": return pv.Wedge.upright(midAngle(s)) ? "right" : "left"; - case "inner": return pv.Wedge.upright(midAngle(s)) ? "left" : "right"; - } - return "center"; - }) - .textBaseline(function() { - var s = scene[this.index]; - if (partial(s)) switch (this.name()) { - case "start": return pv.Wedge.upright(s.startAngle) ? "top" : "bottom"; - case "end": return pv.Wedge.upright(s.endAngle) ? "bottom" : "top"; - } - return "middle"; - }) - .textAngle(function() { - var s = scene[this.index], a = 0; - if (partial(s)) switch (this.name()) { - case "center": - case "inner": - case "outer": a = midAngle(s); break; - case "start": a = s.startAngle; break; - case "end": a = s.endAngle; break; - } - return pv.Wedge.upright(a) ? a : (a + Math.PI); - }); -}; - -/** - * Returns true if the specified angle is considered "upright", as in, text - * rendered at that angle would appear upright. If the angle is not upright, - * text is rotated 180 degrees to be upright, and the text alignment properties - * are correspondingly changed. - * - * @param {number} angle an angle, in radius. - * @returns {boolean} true if the specified angle is upright. - */ -pv.Wedge.upright = function(angle) { - angle = angle % (2 * Math.PI); - angle = (angle < 0) ? (2 * Math.PI + angle) : angle; - return (angle < Math.PI / 2) || (angle >= 3 * Math.PI / 2); -}; - -/** @private Sets angle based on endAngle or vice versa. */ -pv.Wedge.prototype.buildImplied = function(s) { - if (s.angle == null) s.angle = s.endAngle - s.startAngle; - else if (s.endAngle == null) s.endAngle = s.startAngle + s.angle; - pv.Mark.prototype.buildImplied.call(this, s); -}; -/** - * Abstract; not implemented. There is no explicit constructor; this class - * merely serves to document the attributes that are used on particles in - * physics simulations. - * - * @class A weighted particle that can participate in a force simulation. - * - * @name pv.Particle - */ - -/** - * The next particle in the simulation. Particles form a singly-linked list. - * - * @field - * @type pv.Particle - * @name pv.Particle.prototype.next - */ - -/** - * The x-position of the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.x - */ - -/** - * The y-position of the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.y - */ - -/** - * The x-velocity of the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.vx - */ - -/** - * The y-velocity of the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.vy - */ - -/** - * The x-position of the particle at -dt. - * - * @field - * @type number - * @name pv.Particle.prototype.px - */ - -/** - * The y-position of the particle at -dt. - * - * @field - * @type number - * @name pv.Particle.prototype.py - */ - -/** - * The x-force on the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.fx - */ - -/** - * The y-force on the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.fy - */ -/** - * Constructs a new empty simulation. - * - * @param {array} particles - * @returns {pv.Simulation} a new simulation for the specified particles. - * @see pv.Simulation - */ -pv.simulation = function(particles) { - return new pv.Simulation(particles); -}; - -/** - * Constructs a new simulation for the specified particles. - * - * @class Represents a particle simulation. Particles are massive points in - * two-dimensional space. Forces can be applied to these particles, causing them - * to move. Constraints can also be applied to restrict particle movement, for - * example, constraining particles to a fixed position, or simulating collision - * between circular particles with area. - * - *

The simulation uses Position Verlet - * integration, due to the ease with which geometric constraints can be - * implemented. For each time step, Verlet integration is performed, new forces - * are accumulated, and then constraints are applied. - * - *

The simulation makes two simplifying assumptions: all particles are - * equal-mass, and the time step of the simulation is fixed. It would be easy to - * incorporate variable-mass particles as a future enhancement. Variable time - * steps are also possible, but are likely to introduce instability in the - * simulation. - * - *

This class can be used directly to simulate particle interaction. - * Alternatively, for network diagrams, see {@link pv.Layout.Force}. - * - * @param {array} particles an array of {@link pv.Particle}s to simulate. - * @see pv.Layout.Force - * @see pv.Force - * @see pv.Constraint - */ -pv.Simulation = function(particles) { - for (var i = 0; i < particles.length; i++) this.particle(particles[i]); -}; - -/** - * The particles in the simulation. Particles are stored as a linked list; this - * field represents the first particle in the simulation. - * - * @field - * @type pv.Particle - * @name pv.Simulation.prototype.particles - */ - -/** - * The forces in the simulation. Forces are stored as a linked list; this field - * represents the first force in the simulation. - * - * @field - * @type pv.Force - * @name pv.Simulation.prototype.forces - */ - -/** - * The constraints in the simulation. Constraints are stored as a linked list; - * this field represents the first constraint in the simulation. - * - * @field - * @type pv.Constraint - * @name pv.Simulation.prototype.constraints - */ - -/** - * Adds the specified particle to the simulation. - * - * @param {pv.Particle} p the new particle. - * @returns {pv.Simulation} this. - */ -pv.Simulation.prototype.particle = function(p) { - p.next = this.particles; - /* Default velocities and forces to zero if unset. */ - if (isNaN(p.px)) p.px = p.x; - if (isNaN(p.py)) p.py = p.y; - if (isNaN(p.fx)) p.fx = 0; - if (isNaN(p.fy)) p.fy = 0; - this.particles = p; - return this; -}; - -/** - * Adds the specified force to the simulation. - * - * @param {pv.Force} f the new force. - * @returns {pv.Simulation} this. - */ -pv.Simulation.prototype.force = function(f) { - f.next = this.forces; - this.forces = f; - return this; -}; - -/** - * Adds the specified constraint to the simulation. - * - * @param {pv.Constraint} c the new constraint. - * @returns {pv.Simulation} this. - */ -pv.Simulation.prototype.constraint = function(c) { - c.next = this.constraints; - this.constraints = c; - return this; -}; - -/** - * Apply constraints, and then set the velocities to zero. - * - * @returns {pv.Simulation} this. - */ -pv.Simulation.prototype.stabilize = function(n) { - var c; - if (!arguments.length) n = 3; // TODO use cooling schedule - for (var i = 0; i < n; i++) { - var q = new pv.Quadtree(this.particles); - for (c = this.constraints; c; c = c.next) c.apply(this.particles, q); - } - for (var p = this.particles; p; p = p.next) { - p.px = p.x; - p.py = p.y; - } - return this; -}; - -/** - * Advances the simulation one time-step. - */ -pv.Simulation.prototype.step = function() { - var p, f, c; - - /* - * Assumptions: - * - The mass (m) of every particles is 1. - * - The time step (dt) is 1. - */ - - /* Position Verlet integration. */ - for (p = this.particles; p; p = p.next) { - var px = p.px, py = p.py; - p.px = p.x; - p.py = p.y; - p.x += p.vx = ((p.x - px) + p.fx); - p.y += p.vy = ((p.y - py) + p.fy); - } - - /* Apply constraints, then accumulate new forces. */ - var q = new pv.Quadtree(this.particles); - for (c = this.constraints; c; c = c.next) c.apply(this.particles, q); - for (p = this.particles; p; p = p.next) p.fx = p.fy = 0; - for (f = this.forces; f; f = f.next) f.apply(this.particles, q); -}; -/** - * Constructs a new quadtree for the specified array of particles. - * - * @class Represents a quadtree: a two-dimensional recursive spatial - * subdivision. This particular implementation uses square partitions, dividing - * each square into four equally-sized squares. Each particle exists in a unique - * node; if multiple particles are in the same position, some particles may be - * stored on internal nodes rather than leaf nodes. - * - *

This quadtree can be used to accelerate various spatial operations, such - * as the Barnes-Hut approximation for computing n-body forces, or collision - * detection. - * - * @see pv.Force.charge - * @see pv.Constraint.collision - * @param {pv.Particle} particles the linked list of particles. - */ -pv.Quadtree = function(particles) { - var p; - - /* Compute bounds. */ - var x1 = Number.POSITIVE_INFINITY, y1 = x1, - x2 = Number.NEGATIVE_INFINITY, y2 = x2; - for (p = particles; p; p = p.next) { - if (p.x < x1) x1 = p.x; - if (p.y < y1) y1 = p.y; - if (p.x > x2) x2 = p.x; - if (p.y > y2) y2 = p.y; - } - - /* Squarify the bounds. */ - var dx = x2 - x1, dy = y2 - y1; - if (dx > dy) y2 = y1 + dx; - else x2 = x1 + dy; - this.xMin = x1; - this.yMin = y1; - this.xMax = x2; - this.yMax = y2; - - /** - * @ignore Recursively inserts the specified particle p at the node - * n or one of its descendants. The bounds are defined by [x1, - * x2] and [y1, y2]. - */ - function insert(n, p, x1, y1, x2, y2) { - if (isNaN(p.x) || isNaN(p.y)) return; // ignore invalid particles - if (n.leaf) { - if (n.p) { - /* - * If the particle at this leaf node is at the same position as the new - * particle we are adding, we leave the particle associated with the - * internal node while adding the new particle to a child node. This - * avoids infinite recursion. - */ - if ((Math.abs(n.p.x - p.x) + Math.abs(n.p.y - p.y)) < .01) { - insertChild(n, p, x1, y1, x2, y2); - } else { - var v = n.p; - n.p = null; - insertChild(n, v, x1, y1, x2, y2); - insertChild(n, p, x1, y1, x2, y2); - } - } else { - n.p = p; - } - } else { - insertChild(n, p, x1, y1, x2, y2); - } - } - - /** - * @ignore Recursively inserts the specified particle p into a - * descendant of node n. The bounds are defined by [x1, - * x2] and [y1, y2]. - */ - function insertChild(n, p, x1, y1, x2, y2) { - /* Compute the split point, and the quadrant in which to insert p. */ - var sx = (x1 + x2) * .5, - sy = (y1 + y2) * .5, - right = p.x >= sx, - bottom = p.y >= sy; - - /* Recursively insert into the child node. */ - n.leaf = false; - switch ((bottom << 1) + right) { - case 0: n = n.c1 || (n.c1 = new pv.Quadtree.Node()); break; - case 1: n = n.c2 || (n.c2 = new pv.Quadtree.Node()); break; - case 2: n = n.c3 || (n.c3 = new pv.Quadtree.Node()); break; - case 3: n = n.c4 || (n.c4 = new pv.Quadtree.Node()); break; - } - - /* Update the bounds as we recurse. */ - if (right) x1 = sx; else x2 = sx; - if (bottom) y1 = sy; else y2 = sy; - insert(n, p, x1, y1, x2, y2); - } - - /* Insert all particles. */ - this.root = new pv.Quadtree.Node(); - for (p = particles; p; p = p.next) insert(this.root, p, x1, y1, x2, y2); -}; - -/** - * The root node of the quadtree. - * - * @type pv.Quadtree.Node - * @name pv.Quadtree.prototype.root - */ - -/** - * The minimum x-coordinate value of all contained particles. - * - * @type number - * @name pv.Quadtree.prototype.xMin - */ - -/** - * The maximum x-coordinate value of all contained particles. - * - * @type number - * @name pv.Quadtree.prototype.xMax - */ - -/** - * The minimum y-coordinate value of all contained particles. - * - * @type number - * @name pv.Quadtree.prototype.yMin - */ - -/** - * The maximum y-coordinate value of all contained particles. - * - * @type number - * @name pv.Quadtree.prototype.yMax - */ - -/** - * Constructs a new node. - * - * @class A node in a quadtree. - * - * @see pv.Quadtree - */ -pv.Quadtree.Node = function() { - /* - * Prepopulating all attributes significantly increases performance! Also, - * letting the language interpreter manage garbage collection was moderately - * faster than creating a cache pool. - */ - this.leaf = true; - this.c1 = null; - this.c2 = null; - this.c3 = null; - this.c4 = null; - this.p = null; -}; - -/** - * True if this node is a leaf node; i.e., it has no children. Note that both - * leaf nodes and non-leaf (internal) nodes may have associated particles. If - * this is a non-leaf node, then at least one of {@link #c1}, {@link #c2}, - * {@link #c3} or {@link #c4} is guaranteed to be non-null. - * - * @type boolean - * @name pv.Quadtree.Node.prototype.leaf - */ - -/** - * The particle associated with this node, if any. - * - * @type pv.Particle - * @name pv.Quadtree.Node.prototype.p - */ - -/** - * The child node for the second quadrant, if any. - * - * @type pv.Quadtree.Node - * @name pv.Quadtree.Node.prototype.c2 - */ - -/** - * The child node for the third quadrant, if any. - * - * @type pv.Quadtree.Node - * @name pv.Quadtree.Node.prototype.c3 - */ - -/** - * The child node for the fourth quadrant, if any. - * - * @type pv.Quadtree.Node - * @name pv.Quadtree.Node.prototype.c4 - */ -/** - * Abstract; see an implementing class. - * - * @class Represents a force that acts on particles. Note that this interface - * does not specify how to bind a force to specific particles; in general, - * forces are applied globally to all particles. However, some forces may be - * applied to specific particles or between particles, such as spring forces, - * through additional specialization. - * - * @see pv.Simulation - * @see pv.Particle - * @see pv.Force.charge - * @see pv.Force.drag - * @see pv.Force.spring - */ -pv.Force = {}; - -/** - * Applies this force to the specified particles. - * - * @function - * @name pv.Force.prototype.apply - * @param {pv.Particle} particles particles to which to apply this force. - * @param {pv.Quadtree} q a quadtree for spatial acceleration. - */ -/** - * Constructs a new charge force, with an optional charge constant. The charge - * constant can be negative for repulsion (e.g., particles with electrical - * charge of equal sign), or positive for attraction (e.g., massive particles - * with mutual gravity). The default charge constant is -40. - * - * @class An n-body force, as defined by Coulomb's law or Newton's law of - * gravitation, inversely proportional to the square of the distance between - * particles. Note that the force is independent of the mass of the - * associated particles, and that the particles do not have charges of varying - * magnitude; instead, the attraction or repulsion of all particles is globally - * specified as the charge {@link #constant}. - * - *

This particular implementation uses the Barnes-Hut algorithm. For details, - * see "A - * hierarchical O(N log N) force-calculation algorithm", J. Barnes & - * P. Hut, Nature 1986. - * - * @name pv.Force.charge - * @param {number} [k] the charge constant. - */ -pv.Force.charge = function(k) { - var min = 2, // minimum distance at which to observe forces - min1 = 1 / min, - max = 500, // maximum distance at which to observe forces - max1 = 1 / max, - theta = .9, // Barnes-Hut theta approximation constant - force = {}; - - if (!arguments.length) k = -40; // default charge constant (repulsion) - - /** - * Sets or gets the charge constant. If an argument is specified, it is the - * new charge constant. The charge constant can be negative for repulsion - * (e.g., particles with electrical charge of equal sign), or positive for - * attraction (e.g., massive particles with mutual gravity). The default - * charge constant is -40. - * - * @function - * @name pv.Force.charge.prototype.constant - * @param {number} x the charge constant. - * @returns {pv.Force.charge} this. - */ - force.constant = function(x) { - if (arguments.length) { - k = Number(x); - return force; - } - return k; - }; - - /** - * Sets or gets the domain; specifies the minimum and maximum domain within - * which charge forces are applied. A minimum distance threshold avoids - * applying forces that are two strong (due to granularity of the simulation's - * numeric integration). A maximum distance threshold improves performance by - * skipping force calculations for particles that are far apart. - * - *

The default domain is [2, 500]. - * - * @function - * @name pv.Force.charge.prototype.domain - * @param {number} a - * @param {number} b - * @returns {pv.Force.charge} this. - */ - force.domain = function(a, b) { - if (arguments.length) { - min = Number(a); - min1 = 1 / min; - max = Number(b); - max1 = 1 / max; - return force; - } - return [min, max]; - }; - - /** - * Sets or gets the Barnes-Hut approximation factor. The Barnes-Hut - * approximation criterion is the ratio of the size of the quadtree node to - * the distance from the point to the node's center of mass is beneath some - * threshold. - * - * @function - * @name pv.Force.charge.prototype.theta - * @param {number} x the new Barnes-Hut approximation factor. - * @returns {pv.Force.charge} this. - */ - force.theta = function(x) { - if (arguments.length) { - theta = Number(x); - return force; - } - return theta; - }; - - /** - * @ignore Recursively computes the center of charge for each node in the - * quadtree. This is equivalent to the center of mass, assuming that all - * particles have unit weight. - */ - function accumulate(n) { - var cx = 0, cy = 0; - n.cn = 0; - function accumulateChild(c) { - accumulate(c); - n.cn += c.cn; - cx += c.cn * c.cx; - cy += c.cn * c.cy; - } - if (!n.leaf) { - if (n.c1) accumulateChild(n.c1); - if (n.c2) accumulateChild(n.c2); - if (n.c3) accumulateChild(n.c3); - if (n.c4) accumulateChild(n.c4); - } - if (n.p) { - n.cn += k; - cx += k * n.p.x; - cy += k * n.p.y; - } - n.cx = cx / n.cn; - n.cy = cy / n.cn; - } - - /** - * @ignore Recursively computes forces on the given particle using the given - * quadtree node. The Barnes-Hut approximation criterion is the ratio of the - * size of the quadtree node to the distance from the point to the node's - * center of mass is beneath some threshold. - */ - function forces(n, p, x1, y1, x2, y2) { - var dx = n.cx - p.x, - dy = n.cy - p.y, - dn = 1 / Math.sqrt(dx * dx + dy * dy); - - /* Barnes-Hut criterion. */ - if ((n.leaf && (n.p != p)) || ((x2 - x1) * dn < theta)) { - if (dn < max1) return; - if (dn > min1) dn = min1; - var kc = n.cn * dn * dn * dn, - fx = dx * kc, - fy = dy * kc; - p.fx += fx; - p.fy += fy; - } else if (!n.leaf) { - var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5; - if (n.c1) forces(n.c1, p, x1, y1, sx, sy); - if (n.c2) forces(n.c2, p, sx, y1, x2, sy); - if (n.c3) forces(n.c3, p, x1, sy, sx, y2); - if (n.c4) forces(n.c4, p, sx, sy, x2, y2); - if (dn < max1) return; - if (dn > min1) dn = min1; - if (n.p && (n.p != p)) { - var kc = k * dn * dn * dn, - fx = dx * kc, - fy = dy * kc; - p.fx += fx; - p.fy += fy; - } - } - } - - /** - * Applies this force to the specified particles. The force is applied between - * all pairs of particles within the domain, using the specified quadtree to - * accelerate n-body force calculation using the Barnes-Hut approximation - * criterion. - * - * @function - * @name pv.Force.charge.prototype.apply - * @param {pv.Particle} particles particles to which to apply this force. - * @param {pv.Quadtree} q a quadtree for spatial acceleration. - */ - force.apply = function(particles, q) { - accumulate(q.root); - for (var p = particles; p; p = p.next) { - forces(q.root, p, q.xMin, q.yMin, q.xMax, q.yMax); - } - }; - - return force; -}; -/** - * Constructs a new drag force with the specified constant. - * - * @class Implements a drag force, simulating friction. The drag force is - * applied in the opposite direction of the particle's velocity. Since Position - * Verlet integration does not track velocities explicitly, the error term with - * this estimate of velocity is fairly high, so the drag force may be - * inaccurate. - * - * @extends pv.Force - * @param {number} k the drag constant. - * @see #constant - */ -pv.Force.drag = function(k) { - var force = {}; - - if (!arguments.length) k = .1; // default drag constant - - /** - * Sets or gets the drag constant, in the range [0,1]. The default drag - * constant is 0.1. The drag forces scales linearly with the particle's - * velocity based on the given drag constant. - * - * @function - * @name pv.Force.drag.prototype.constant - * @param {number} x the new drag constant. - * @returns {pv.Force.drag} this, or the current drag constant. - */ - force.constant = function(x) { - if (arguments.length) { k = x; return force; } - return k; - }; - - /** - * Applies this force to the specified particles. - * - * @function - * @name pv.Force.drag.prototype.apply - * @param {pv.Particle} particles particles to which to apply this force. - */ - force.apply = function(particles) { - if (k) for (var p = particles; p; p = p.next) { - p.fx -= k * p.vx; - p.fy -= k * p.vy; - } - }; - - return force; -}; -/** - * Constructs a new spring force with the specified constant. The links - * associated with this spring force must be specified before the spring force - * can be applied. - * - * @class Implements a spring force, per Hooke's law. The spring force can be - * configured with a tension constant, rest length, and damping factor. The - * tension and damping will automatically be normalized using the inverse square - * root of the maximum link degree of attached nodes; this makes springs weaker - * between nodes of high link degree. - * - *

Unlike other forces (such as charge and drag forces) which may be applied - * globally, spring forces are only applied between linked particles. Therefore, - * an array of links must be specified before this force can be applied; the - * links should be an array of {@link pv.Layout.Network.Link}s. See also - * {@link pv.Layout.Force} for an example of using spring and charge forces for - * network layout. - * - * @extends pv.Force - * @param {number} k the spring constant. - * @see #constant - * @see #links - */ -pv.Force.spring = function(k) { - var d = .1, // default damping factor - l = 20, // default rest length - links, // links on which to apply spring forces - kl, // per-spring normalization - force = {}; - - if (!arguments.length) k = .1; // default spring constant (tension) - - /** - * Sets or gets the links associated with this spring force. Unlike other - * forces (such as charge and drag forces) which may be applied globally, - * spring forces are only applied between linked particles. Therefore, an - * array of links must be specified before this force can be applied; the - * links should be an array of {@link pv.Layout.Network.Link}s. - * - * @function - * @name pv.Force.spring.prototype.links - * @param {array} x the new array of links. - * @returns {pv.Force.spring} this, or the current array of links. - */ - force.links = function(x) { - if (arguments.length) { - links = x; - kl = x.map(function(l) { - return 1 / Math.sqrt(Math.max( - l.sourceNode.linkDegree, - l.targetNode.linkDegree)); - }); - return force; - } - return links; - }; - - /** - * Sets or gets the spring constant. The default value is 0.1; greater values - * will result in stronger tension. The spring tension is automatically - * normalized using the inverse square root of the maximum link degree of - * attached nodes. - * - * @function - * @name pv.Force.spring.prototype.constant - * @param {number} x the new spring constant. - * @returns {pv.Force.spring} this, or the current spring constant. - */ - force.constant = function(x) { - if (arguments.length) { - k = Number(x); - return force; - } - return k; - }; - - /** - * The spring damping factor, in the range [0,1]. Damping functions - * identically to drag forces, damping spring bounciness by applying a force - * in the opposite direction of attached nodes' velocities. The default value - * is 0.1. The spring damping is automatically normalized using the inverse - * square root of the maximum link degree of attached nodes. - * - * @function - * @name pv.Force.spring.prototype.damping - * @param {number} x the new spring damping factor. - * @returns {pv.Force.spring} this, or the current spring damping factor. - */ - force.damping = function(x) { - if (arguments.length) { - d = Number(x); - return force; - } - return d; - }; - - /** - * The spring rest length. The default value is 20 pixels. - * - * @function - * @name pv.Force.spring.prototype.length - * @param {number} x the new spring rest length. - * @returns {pv.Force.spring} this, or the current spring rest length. - */ - force.length = function(x) { - if (arguments.length) { - l = Number(x); - return force; - } - return l; - }; - - /** - * Applies this force to the specified particles. - * - * @function - * @name pv.Force.spring.prototype.apply - * @param {pv.Particle} particles particles to which to apply this force. - */ - force.apply = function(particles) { - for (var i = 0; i < links.length; i++) { - var a = links[i].sourceNode, - b = links[i].targetNode, - dx = a.x - b.x, - dy = a.y - b.y, - dn = Math.sqrt(dx * dx + dy * dy), - dd = dn ? (1 / dn) : 1, - ks = k * kl[i], // normalized tension - kd = d * kl[i], // normalized damping - kk = (ks * (dn - l) + kd * (dx * (a.vx - b.vx) + dy * (a.vy - b.vy)) * dd) * dd, - fx = -kk * (dn ? dx : (.01 * (.5 - Math.random()))), - fy = -kk * (dn ? dy : (.01 * (.5 - Math.random()))); - a.fx += fx; - a.fy += fy; - b.fx -= fx; - b.fy -= fy; - } - }; - - return force; -}; -/** - * Abstract; see an implementing class. - * - * @class Represents a constraint that acts on particles. Note that this - * interface does not specify how to bind a constraint to specific particles; in - * general, constraints are applied globally to all particles. However, some - * constraints may be applied to specific particles or between particles, such - * as position constraints, through additional specialization. - * - * @see pv.Simulation - * @see pv.Particle - * @see pv.Constraint.bound - * @see pv.Constraint.collision - * @see pv.Constraint.position - */ -pv.Constraint = {}; - -/** - * Applies this constraint to the specified particles. - * - * @function - * @name pv.Constraint.prototype.apply - * @param {pv.Particle} particles particles to which to apply this constraint. - * @param {pv.Quadtree} q a quadtree for spatial acceleration. - * @returns {pv.Constraint} this. - */ -/** - * Constructs a new collision constraint. The default search radius is 10, and - * the default repeat count is 1. A radius function must be specified to compute - * the radius of particles. - * - * @class Constraints circles to avoid overlap. Each particle is treated as a - * circle, with the radius of the particle computed using a specified function. - * For example, if the particle has an r attribute storing the radius, - * the radius function(d) d.r specifies a collision constraint using - * this radius. The radius function is passed each {@link pv.Particle} as the - * first argument. - * - *

To accelerate collision detection, this implementation uses a quadtree and - * a search radius. The search radius is computed as the maximum radius of all - * particles in the simulation. - * - * @see pv.Constraint - * @param {function} radius the radius function. - */ -pv.Constraint.collision = function(radius) { - var n = 1, // number of times to repeat the constraint - r1, - px1, - py1, - px2, - py2, - constraint = {}; - - if (!arguments.length) r1 = 10; // default search radius - - /** - * Sets or gets the repeat count. If the repeat count is greater than 1, the - * constraint will be applied repeatedly; this is a form of the Gauss-Seidel - * method for constraints relaxation. Repeating the collision constraint makes - * the constraint have more of an effect when there is a potential for many - * co-occurring collisions. - * - * @function - * @name pv.Constraint.collision.prototype.repeat - * @param {number} x the number of times to repeat this constraint. - * @returns {pv.Constraint.collision} this. - */ - constraint.repeat = function(x) { - if (arguments.length) { - n = Number(x); - return constraint; - } - return n; - }; - - /** @private */ - function constrain(n, p, x1, y1, x2, y2) { - if (!n.leaf) { - var sx = (x1 + x2) * .5, - sy = (y1 + y2) * .5, - top = sy > py1, - bottom = sy < py2, - left = sx > px1, - right = sx < px2; - if (top) { - if (n.c1 && left) constrain(n.c1, p, x1, y1, sx, sy); - if (n.c2 && right) constrain(n.c2, p, sx, y1, x2, sy); - } - if (bottom) { - if (n.c3 && left) constrain(n.c3, p, x1, sy, sx, y2); - if (n.c4 && right) constrain(n.c4, p, sx, sy, x2, y2); - } - } - if (n.p && (n.p != p)) { - var dx = p.x - n.p.x, - dy = p.y - n.p.y, - l = Math.sqrt(dx * dx + dy * dy), - d = r1 + radius(n.p); - if (l < d) { - var k = (l - d) / l * .5; - dx *= k; - dy *= k; - p.x -= dx; - p.y -= dy; - n.p.x += dx; - n.p.y += dy; - } - } - } - - /** - * Applies this constraint to the specified particles. - * - * @function - * @name pv.Constraint.collision.prototype.apply - * @param {pv.Particle} particles particles to which to apply this constraint. - * @param {pv.Quadtree} q a quadtree for spatial acceleration. - */ - constraint.apply = function(particles, q) { - var p, r, max = -Infinity; - for (p = particles; p; p = p.next) { - r = radius(p); - if (r > max) max = r; - } - for (var i = 0; i < n; i++) { - for (p = particles; p; p = p.next) { - r = (r1 = radius(p)) + max; - px1 = p.x - r; - px2 = p.x + r; - py1 = p.y - r; - py2 = p.y + r; - constrain(q.root, p, q.xMin, q.yMin, q.xMax, q.yMax); - } - } - }; - - return constraint; -}; -/** - * Constructs a default position constraint using the fix attribute. - * An optional position function can be specified to determine how the fixed - * position per-particle is determined. - * - * @class Constraints particles to a fixed position. The fixed position per - * particle is determined using a given position function, which defaults to - * function(d) d.fix. - * - *

If the position function returns null, then no position constraint is - * applied to the given particle. Otherwise, the particle's position is set to - * the returned position, as expressed by a {@link pv.Vector}. (Note: the - * position does not need to be an instance of pv.Vector, but simply an - * object with x and y attributes.) - * - *

This constraint also supports a configurable alpha parameter, which - * defaults to 1. If the alpha parameter is in the range [0,1], then rather than - * setting the particle's new position directly to the position returned by the - * supplied position function, the particle's position is interpolated towards - * the fixed position. This results is a smooth (exponential) drift towards the - * fixed position, which can increase the stability of the physics simulation. - * In addition, the alpha parameter can be decayed over time, relaxing the - * position constraint, which helps to stabilize on an optimal solution. - * - * @param {function} [f] the position function. - */ -pv.Constraint.position = function(f) { - var a = 1, // default alpha - constraint = {}; - - if (!arguments.length) /** @ignore */ f = function(p) { return p.fix; }; - - /** - * Sets or gets the alpha parameter for position interpolation. If the alpha - * parameter is in the range [0,1], then rather than setting the particle's - * new position directly to the position returned by the supplied position - * function, the particle's position is interpolated towards the fixed - * position. - * - * @function - * @name pv.Constraint.position.prototype.alpha - * @param {number} x the new alpha parameter, in the range [0,1]. - * @returns {pv.Constraint.position} this. - */ - constraint.alpha = function(x) { - if (arguments.length) { - a = Number(x); - return constraint; - } - return a; - }; - - /** - * Applies this constraint to the specified particles. - * - * @function - * @name pv.Constraint.position.prototype.apply - * @param {pv.Particle} particles particles to which to apply this constraint. - */ - constraint.apply = function(particles) { - for (var p = particles; p; p = p.next) { - var v = f(p); - if (v) { - p.x += (v.x - p.x) * a; - p.y += (v.y - p.y) * a; - p.fx = p.fy = p.vx = p.vy = 0; - } - } - }; - - return constraint; -}; -/** - * Constructs a new bound constraint. Before the constraint can be used, the - * {@link #x} and {@link #y} methods must be call to specify the bounds. - * - * @class Constrains particles to within fixed rectangular bounds. For example, - * this constraint can be used to constrain particles in a physics simulation - * within the bounds of an enclosing panel. - * - *

Note that the current implementation treats particles as points, with no - * area. If the particles are rendered as dots, be sure to include some - * additional padding to inset the bounds such that the edges of the dots do not - * get clipped by the panel bounds. If the particles have different radii, this - * constraint would need to be extended using a radius function, similar to - * {@link pv.Constraint.collision}. - * - * @see pv.Layout.Force - * @extends pv.Constraint - */ -pv.Constraint.bound = function() { - var constraint = {}, - x, - y; - - /** - * Sets or gets the bounds on the x-coordinate. - * - * @function - * @name pv.Constraint.bound.prototype.x - * @param {number} min the minimum allowed x-coordinate. - * @param {number} max the maximum allowed x-coordinate. - * @returns {pv.Constraint.bound} this. - */ - constraint.x = function(min, max) { - if (arguments.length) { - x = {min: Math.min(min, max), max: Math.max(min, max)}; - return this; - } - return x; - }; - - /** - * Sets or gets the bounds on the y-coordinate. - * - * @function - * @name pv.Constraint.bound.prototype.y - * @param {number} min the minimum allowed y-coordinate. - * @param {number} max the maximum allowed y-coordinate. - * @returns {pv.Constraint.bound} this. - */ - constraint.y = function(min, max) { - if (arguments.length) { - y = {min: Math.min(min, max), max: Math.max(min, max)}; - return this; - } - return y; - }; - - /** - * Applies this constraint to the specified particles. - * - * @function - * @name pv.Constraint.bound.prototype.apply - * @param {pv.Particle} particles particles to which to apply this constraint. - */ - constraint.apply = function(particles) { - if (x) for (var p = particles; p; p = p.next) { - p.x = p.x < x.min ? x.min : (p.x > x.max ? x.max : p.x); - } - if (y) for (var p = particles; p; p = p.next) { - p.y = p.y < y.min ? y.min : (p.y > y.max ? y.max : p.y); - } - }; - - return constraint; -}; -/** - * Constructs a new, empty layout with default properties. Layouts are not - * typically constructed directly; instead, a concrete subclass is added to an - * existing panel via {@link pv.Mark#add}. - * - * @class Represents an abstract layout, encapsulating a visualization technique - * such as a streamgraph or treemap. Layouts are themselves containers, - * extending from {@link pv.Panel}, and defining a set of mark prototypes as - * children. These mark prototypes provide default properties that together - * implement the given visualization technique. - * - *

Layouts do not initially contain any marks; any exported marks (such as a - * network layout's link and node) are intended to be used as - * prototypes. By adding a concrete mark, such as a {@link pv.Bar}, to the - * appropriate mark prototype, the mark is added to the layout and inherits the - * given properties. This approach allows further customization of the layout, - * either by choosing a different mark type to add, or more simply by overriding - * some of the layout's defined properties. - * - *

Each concrete layout, such as treemap or circle-packing, has different - * behavior and may export different mark prototypes, depending on what marks - * are typically needed to render the desired visualization. Therefore it is - * important to understand how each layout is structured, such that the provided - * mark prototypes are used appropriately. - * - *

In addition to the mark prototypes, layouts may define custom properties - * that affect the overall behavior of the layout. For example, a treemap layout - * might use a property to specify which layout algorithm to use. These - * properties are just like other mark properties, and can be defined as - * constants or as functions. As with panels, the data property can be used to - * replicate layouts, and properties can be defined to in terms of layout data. - * - * @extends pv.Panel - */ -pv.Layout = function() { - pv.Panel.call(this); -}; - -pv.Layout.prototype = pv.extend(pv.Panel); - -/** - * @private Defines a local property with the specified name and cast. Note that - * although the property method is only defined locally, the cast function is - * global, which is necessary since properties are inherited! - * - * @param {string} name the property name. - * @param {function} [cast] the cast function for this property. - */ -pv.Layout.prototype.property = function(name, cast) { - if (!this.hasOwnProperty("properties")) { - this.properties = pv.extend(this.properties); - } - this.properties[name] = true; - this.propertyMethod(name, false, pv.Mark.cast[name] = cast); - return this; -}; -/** - * Constructs a new, empty network layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Represents an abstract layout for network diagrams. This class - * provides the basic structure for both node-link diagrams (such as - * force-directed graph layout) and space-filling network diagrams (such as - * sunbursts and treemaps). Note that "network" here is a general term that - * includes hierarchical structures; a tree is represented using links from - * child to parent. - * - *

Network layouts require the graph data structure to be defined using two - * properties:

    - * - *
  • nodes - an array of objects representing nodes. Objects in this - * array must conform to the {@link pv.Layout.Network.Node} interface; which is - * to say, be careful to avoid naming collisions with automatic attributes such - * as index and linkDegree. If the nodes property is defined - * as an array of primitives, such as numbers or strings, these primitives are - * automatically wrapped in an object; the resulting object's nodeValue - * attribute points to the original primitive value. - * - *

  • links - an array of objects representing links. Objects in - * this array must conform to the {@link pv.Layout.Network.Link} interface; at a - * minimum, either source and target indexes or - * sourceNode and targetNode references must be set. Note that - * if the links property is defined after the nodes property, the links can be - * defined in terms of this.nodes(). - * - *
- * - *

Three standard mark prototypes are provided:

    - * - *
  • node - for rendering nodes; typically a {@link pv.Dot}. The node - * mark is added directly to the layout, with the data property defined via the - * layout's nodes property. Properties such as strokeStyle and - * fillStyle can be overridden to compute properties from node data - * dynamically. - * - *

  • link - for rendering links; typically a {@link pv.Line}. The - * link mark is added to a child panel, whose data property is defined as - * layout's links property. The link's data property is then a - * two-element array of the source node and target node. Thus, poperties such as - * strokeStyle and fillStyle can be overridden to compute - * properties from either the node data (the first argument) or the link data - * (the second argument; the parent panel data) dynamically. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. The label mark is added directly to the layout, with the - * data property defined via the layout's nodes property. Properties - * such as strokeStyle and fillStyle can be overridden to - * compute properties from node data dynamically. - * - *
Note that some network implementations may not support all three - * standard mark prototypes; for example, space-filling hierarchical layouts - * typically do not use a link prototype, as the parent-child links are - * implied by the structure of the space-filling node marks. Check the - * specific network layout for implementation details. - * - *

Network layout properties, including nodes and links, - * are typically cached rather than re-evaluated with every call to render. This - * is a performance optimization, as network layout algorithms can be - * expensive. If the network structure changes, call {@link #reset} to clear the - * cache before rendering. Note that although the network layout properties are - * cached, child mark properties, such as the marks used to render the nodes and - * links, are not. Therefore, non-structural changes to the network - * layout, such as changing the color of a mark on mouseover, do not need to - * reset the layout. - * - * @see pv.Layout.Hierarchy - * @see pv.Layout.Force - * @see pv.Layout.Matrix - * @see pv.Layout.Arc - * @see pv.Layout.Rollup - * @extends pv.Layout - */ -pv.Layout.Network = function() { - pv.Layout.call(this); - var that = this; - - /* @private Version tracking to cache layout state, improving performance. */ - this.$id = pv.id(); - - /** - * The node prototype. This prototype is intended to be used with a Dot mark - * in conjunction with the link prototype. - * - * @type pv.Mark - * @name pv.Layout.Network.prototype.node - */ - (this.node = new pv.Mark() - .data(function() { return that.nodes(); }) - .strokeStyle("#1f77b4") - .fillStyle("#fff") - .left(function(n) { return n.x; }) - .top(function(n) { return n.y; })).parent = this; - - /** - * The link prototype, which renders edges between source nodes and target - * nodes. This prototype is intended to be used with a Line mark in - * conjunction with the node prototype. - * - * @type pv.Mark - * @name pv.Layout.Network.prototype.link - */ - this.link = new pv.Mark() - .extend(this.node) - .data(function(p) { return [p.sourceNode, p.targetNode]; }) - .fillStyle(null) - .lineWidth(function(d, p) { return p.linkValue * 1.5; }) - .strokeStyle("rgba(0,0,0,.2)"); - - this.link.add = function(type) { - return that.add(pv.Panel) - .data(function() { return that.links(); }) - .add(type) - .extend(this); - }; - - /** - * The node label prototype, which renders the node name adjacent to the node. - * This prototype is provided as an alternative to using the anchor on the - * node mark; it is primarily intended to be used with radial node-link - * layouts, since it provides a convenient mechanism to set the text angle. - * - * @type pv.Mark - * @name pv.Layout.Network.prototype.label - */ - (this.label = new pv.Mark() - .extend(this.node) - .textMargin(7) - .textBaseline("middle") - .text(function(n) { return n.nodeName || n.nodeValue; }) - .textAngle(function(n) { - var a = n.midAngle; - return pv.Wedge.upright(a) ? a : (a + Math.PI); - }) - .textAlign(function(n) { - return pv.Wedge.upright(n.midAngle) ? "left" : "right"; - })).parent = this; -}; - -/** - * @class Represents a node in a network layout. There is no explicit - * constructor; this class merely serves to document the attributes that are - * used on nodes in network layouts. (Note that hierarchical nodes place - * additional requirements on node representation, vis {@link pv.Dom.Node}.) - * - * @see pv.Layout.Network - * @name pv.Layout.Network.Node - */ - -/** - * The node index, zero-based. This attribute is populated automatically based - * on the index in the array returned by the nodes property. - * - * @type number - * @name pv.Layout.Network.Node.prototype.index - */ - -/** - * The link degree; the sum of link values for all incoming and outgoing links. - * This attribute is populated automatically. - * - * @type number - * @name pv.Layout.Network.Node.prototype.linkDegree - */ - -/** - * The node name; optional. If present, this attribute will be used to provide - * the text for node labels. If not present, the label text will fallback to the - * nodeValue attribute. - * - * @type string - * @name pv.Layout.Network.Node.prototype.nodeName - */ - -/** - * The node value; optional. If present, and no nodeName attribute is - * present, the node value will be used as the label text. This attribute is - * also automatically populated if the nodes are specified as an array of - * primitives, such as strings or numbers. - * - * @type object - * @name pv.Layout.Network.Node.prototype.nodeValue - */ - -/** - * @class Represents a link in a network layout. There is no explicit - * constructor; this class merely serves to document the attributes that are - * used on links in network layouts. For hierarchical layouts, this class is - * used to represent the parent-child links. - * - * @see pv.Layout.Network - * @name pv.Layout.Network.Link - */ - -/** - * The link value, or weight; optional. If not specified (or not a number), the - * default value of 1 is used. - * - * @type number - * @name pv.Layout.Network.Link.prototype.linkValue - */ - -/** - * The link's source node. If not set, this value will be derived from the - * source attribute index. - * - * @type pv.Layout.Network.Node - * @name pv.Layout.Network.Link.prototype.sourceNode - */ - -/** - * The link's target node. If not set, this value will be derived from the - * target attribute index. - * - * @type pv.Layout.Network.Node - * @name pv.Layout.Network.Link.prototype.targetNode - */ - -/** - * Alias for sourceNode, as expressed by the index of the source node. - * This attribute is not populated automatically, but may be used as a more - * convenient identification of the link's source, for example in a static JSON - * representation. - * - * @type number - * @name pv.Layout.Network.Link.prototype.source - */ - -/** - * Alias for targetNode, as expressed by the index of the target node. - * This attribute is not populated automatically, but may be used as a more - * convenient identification of the link's target, for example in a static JSON - * representation. - * - * @type number - * @name pv.Layout.Network.Link.prototype.target - */ - -/** - * Alias for linkValue. This attribute is not populated automatically, - * but may be used instead of the linkValue attribute when specifying - * links. - * - * @type number - * @name pv.Layout.Network.Link.prototype.value - */ - -/** @private Transform nodes and links on cast. */ -pv.Layout.Network.prototype = pv.extend(pv.Layout) - .property("nodes", function(v) { - return v.map(function(d, i) { - if (typeof d != "object") d = {nodeValue: d}; - d.index = i; - d.linkDegree = 0; - return d; - }); - }) - .property("links", function(v) { - return v.map(function(d) { - if (isNaN(d.linkValue)) d.linkValue = isNaN(d.value) ? 1 : d.value; - return d; - }); - }); - -/** - * Resets the cache, such that changes to layout property definitions will be - * visible on subsequent render. Unlike normal marks (and normal layouts), - * properties associated with network layouts are not automatically re-evaluated - * on render; the properties are cached, and any expensive layout algorithms are - * only run after the layout is explicitly reset. - * - * @returns {pv.Layout.Network} this. - */ -pv.Layout.Network.prototype.reset = function() { - this.$id = pv.id(); - return this; -}; - -/** @private Skip evaluating properties if cached. */ -pv.Layout.Network.prototype.buildProperties = function(s, properties) { - if ((s.$id || 0) < this.$id) { - pv.Layout.prototype.buildProperties.call(this, s, properties); - } -}; - -/** @private Compute link degrees; map source and target indexes to nodes. */ -pv.Layout.Network.prototype.buildImplied = function(s) { - pv.Layout.prototype.buildImplied.call(this, s); - if (s.$id >= this.$id) return true; - s.$id = this.$id; - s.links.forEach(function(d) { - var v = d.linkValue; - (d.sourceNode || (d.sourceNode = s.nodes[d.source])).linkDegree += v; - (d.targetNode || (d.targetNode = s.nodes[d.target])).linkDegree += v; - }); -}; -/** - * Constructs a new, empty hierarchy layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Represents an abstract layout for hierarchy diagrams. This class is a - * specialization of {@link pv.Layout.Network}, providing the basic structure - * for both hierarchical node-link diagrams (such as Reingold-Tilford trees) and - * space-filling hierarchy diagrams (such as sunbursts and treemaps). - * - *

Unlike general network layouts, the links property need not be - * defined explicitly. Instead, the links are computed implicitly from the - * parentNode attribute of the node objects, as defined by the - * nodes property. This implementation is also available as - * {@link #links}, for reuse with non-hierarchical layouts; for example, to - * render a tree using force-directed layout. - * - *

Correspondingly, the nodes property is represented as a union of - * {@link pv.Layout.Network.Node} and {@link pv.Dom.Node}. To construct a node - * hierarchy from a simple JSON map, use the {@link pv.Dom} operator; this - * operator also provides an easy way to sort nodes before passing them to the - * layout. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Network}. - * - * @see pv.Layout.Cluster - * @see pv.Layout.Partition - * @see pv.Layout.Tree - * @see pv.Layout.Treemap - * @see pv.Layout.Indent - * @see pv.Layout.Pack - * @extends pv.Layout.Network - */ -pv.Layout.Hierarchy = function() { - pv.Layout.Network.call(this); - this.link.strokeStyle("#ccc"); -}; - -pv.Layout.Hierarchy.prototype = pv.extend(pv.Layout.Network); - -/** @private Compute the implied links. (Links are null by default.) */ -pv.Layout.Hierarchy.prototype.buildImplied = function(s) { - if (!s.links) s.links = pv.Layout.Hierarchy.links.call(this); - pv.Layout.Network.prototype.buildImplied.call(this, s); -}; - -/** The implied links; computes links using the parentNode attribute. */ -pv.Layout.Hierarchy.links = function() { - return this.nodes() - .filter(function(n) { return n.parentNode; }) - .map(function(n) { - return { - sourceNode: n, - targetNode: n.parentNode, - linkValue: 1 - }; - }); -}; - -/** @private Provides standard node-link layout based on breadth & depth. */ -pv.Layout.Hierarchy.NodeLink = { - - /** @private */ - buildImplied: function(s) { - var nodes = s.nodes, - orient = s.orient, - horizontal = /^(top|bottom)$/.test(orient), - w = s.width, - h = s.height; - - /* Compute default inner and outer radius. */ - if (orient == "radial") { - var ir = s.innerRadius, or = s.outerRadius; - if (ir == null) ir = 0; - if (or == null) or = Math.min(w, h) / 2; - } - - /** @private Returns the radius of the given node. */ - function radius(n) { - return n.parentNode ? (n.depth * (or - ir) + ir) : 0; - } - - /** @private Returns the angle of the given node. */ - function midAngle(n) { - return (n.parentNode ? (n.breadth - .25) * 2 * Math.PI : 0); - } - - /** @private */ - function x(n) { - switch (orient) { - case "left": return n.depth * w; - case "right": return w - n.depth * w; - case "top": return n.breadth * w; - case "bottom": return w - n.breadth * w; - case "radial": return w / 2 + radius(n) * Math.cos(n.midAngle); - } - } - - /** @private */ - function y(n) { - switch (orient) { - case "left": return n.breadth * h; - case "right": return h - n.breadth * h; - case "top": return n.depth * h; - case "bottom": return h - n.depth * h; - case "radial": return h / 2 + radius(n) * Math.sin(n.midAngle); - } - } - - for (var i = 0; i < nodes.length; i++) { - var n = nodes[i]; - n.midAngle = orient == "radial" ? midAngle(n) - : horizontal ? Math.PI / 2 : 0; - n.x = x(n); - n.y = y(n); - if (n.firstChild) n.midAngle += Math.PI; - } - } -}; - -/** @private Provides standard space-filling layout based on breadth & depth. */ -pv.Layout.Hierarchy.Fill = { - - /** @private */ - constructor: function() { - this.node - .strokeStyle("#fff") - .fillStyle("#ccc") - .width(function(n) { return n.dx; }) - .height(function(n) { return n.dy; }) - .innerRadius(function(n) { return n.innerRadius; }) - .outerRadius(function(n) { return n.outerRadius; }) - .startAngle(function(n) { return n.startAngle; }) - .angle(function(n) { return n.angle; }); - - this.label - .textAlign("center") - .left(function(n) { return n.x + (n.dx / 2); }) - .top(function(n) { return n.y + (n.dy / 2); }); - - /* Hide unsupported link. */ - delete this.link; - }, - - /** @private */ - buildImplied: function(s) { - var nodes = s.nodes, - orient = s.orient, - horizontal = /^(top|bottom)$/.test(orient), - w = s.width, - h = s.height, - depth = -nodes[0].minDepth; - - /* Compute default inner and outer radius. */ - if (orient == "radial") { - var ir = s.innerRadius, or = s.outerRadius; - if (ir == null) ir = 0; - if (ir) depth *= 2; // use full depth step for root - if (or == null) or = Math.min(w, h) / 2; - } - - /** @private Scales the specified depth for a space-filling layout. */ - function scale(d, depth) { - return (d + depth) / (1 + depth); - } - - /** @private */ - function x(n) { - switch (orient) { - case "left": return scale(n.minDepth, depth) * w; - case "right": return (1 - scale(n.maxDepth, depth)) * w; - case "top": return n.minBreadth * w; - case "bottom": return (1 - n.maxBreadth) * w; - case "radial": return w / 2; - } - } - - /** @private */ - function y(n) { - switch (orient) { - case "left": return n.minBreadth * h; - case "right": return (1 - n.maxBreadth) * h; - case "top": return scale(n.minDepth, depth) * h; - case "bottom": return (1 - scale(n.maxDepth, depth)) * h; - case "radial": return h / 2; - } - } - - /** @private */ - function dx(n) { - switch (orient) { - case "left": - case "right": return (n.maxDepth - n.minDepth) / (1 + depth) * w; - case "top": - case "bottom": return (n.maxBreadth - n.minBreadth) * w; - case "radial": return n.parentNode ? (n.innerRadius + n.outerRadius) * Math.cos(n.midAngle) : 0; - } - } - - /** @private */ - function dy(n) { - switch (orient) { - case "left": - case "right": return (n.maxBreadth - n.minBreadth) * h; - case "top": - case "bottom": return (n.maxDepth - n.minDepth) / (1 + depth) * h; - case "radial": return n.parentNode ? (n.innerRadius + n.outerRadius) * Math.sin(n.midAngle) : 0; - } - } - - /** @private */ - function innerRadius(n) { - return Math.max(0, scale(n.minDepth, depth / 2)) * (or - ir) + ir; - } - - /** @private */ - function outerRadius(n) { - return scale(n.maxDepth, depth / 2) * (or - ir) + ir; - } - - /** @private */ - function startAngle(n) { - return (n.parentNode ? n.minBreadth - .25 : 0) * 2 * Math.PI; - } - - /** @private */ - function angle(n) { - return (n.parentNode ? n.maxBreadth - n.minBreadth : 1) * 2 * Math.PI; - } - - for (var i = 0; i < nodes.length; i++) { - var n = nodes[i]; - n.x = x(n); - n.y = y(n); - if (orient == "radial") { - n.innerRadius = innerRadius(n); - n.outerRadius = outerRadius(n); - n.startAngle = startAngle(n); - n.angle = angle(n); - n.midAngle = n.startAngle + n.angle / 2; - } else { - n.midAngle = horizontal ? -Math.PI / 2 : 0; - } - n.dx = dx(n); - n.dy = dy(n); - } - } -}; -/** - * Constructs a new, empty grid layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a grid layout with regularly-sized rows and columns. The - * number of rows and columns are determined from their respective - * properties. For example, the 2×3 array: - * - *

1 2 3
- * 4 5 6
- * - * can be represented using the rows property as: - * - *
[[1, 2, 3], [4, 5, 6]]
- * - * If your data is in column-major order, you can equivalently use the - * columns property. If the rows property is an array, it - * takes priority over the columns property. The data is implicitly - * transposed, as if the {@link pv.transpose} operator were applied. - * - *

This layout exports a single cell mark prototype, which is - * intended to be used with a bar, panel, layout, or subclass thereof. The data - * property of the cell prototype is defined as the elements in the array. For - * example, if the array is a two-dimensional array of values in the range - * [0,1], a simple heatmap can be generated as: - * - *

vis.add(pv.Layout.Grid)
- *     .rows(arrays)
- *   .cell.add(pv.Bar)
- *     .fillStyle(pv.ramp("white", "black"))
- * - * The grid subdivides the full width and height of the parent panel into equal - * rectangles. Note, however, that for large, interactive, or animated heatmaps, - * you may see significantly better performance through dynamic {@link pv.Image} - * generation. - * - *

For irregular grids using value-based spatial partitioning, see {@link - * pv.Layout.Treemap}. - * - * @extends pv.Layout - */ -pv.Layout.Grid = function() { - pv.Layout.call(this); - var that = this; - - /** - * The cell prototype. This prototype is intended to be used with a bar, - * panel, or layout (or subclass thereof) to render the grid cells. - * - * @type pv.Mark - * @name pv.Layout.Grid.prototype.cell - */ - (this.cell = new pv.Mark() - .data(function() { - return that.scene[that.index].$grid; - }) - .width(function() { - return that.width() / that.cols(); - }) - .height(function() { - return that.height() / that.rows(); - }) - .left(function() { - return this.width() * (this.index % that.cols()); - }) - .top(function() { - return this.height() * Math.floor(this.index / that.cols()); - })).parent = this; -}; - -pv.Layout.Grid.prototype = pv.extend(pv.Layout) - .property("rows") - .property("cols"); - -/** - * Default properties for grid layouts. By default, there is one row and one - * column, and the data is the propagated to the child cell. - * - * @type pv.Layout.Grid - */ -pv.Layout.Grid.prototype.defaults = new pv.Layout.Grid() - .extend(pv.Layout.prototype.defaults) - .rows(1) - .cols(1); - -/** @private */ -pv.Layout.Grid.prototype.buildImplied = function(s) { - pv.Layout.prototype.buildImplied.call(this, s); - var r = s.rows, c = s.cols; - if (typeof c == "object") r = pv.transpose(c); - if (typeof r == "object") { - s.$grid = pv.blend(r); - s.rows = r.length; - s.cols = r[0] ? r[0].length : 0; - } else { - s.$grid = pv.repeat([s.data], r * c); - } -}; - -/** - * The number of rows. This property can also be specified as the data in - * row-major order; in this case, the rows property is implicitly set to the - * length of the array, and the cols property is set to the length of the first - * element in the array. - * - * @type number - * @name pv.Layout.Grid.prototype.rows - */ - -/** - * The number of columns. This property can also be specified as the data in - * column-major order; in this case, the cols property is implicitly set to the - * length of the array, and the rows property is set to the length of the first - * element in the array. - * - * @type number - * @name pv.Layout.Grid.prototype.cols - */ -/** - * Constructs a new, empty stack layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a layout for stacked visualizations, ranging from simple - * stacked bar charts to more elaborate "streamgraphs" composed of stacked - * areas. Stack layouts uses length as a visual encoding, as opposed to - * position, as the layers do not share an aligned axis. - * - *

Marks can be stacked vertically or horizontally. For example, - * - *

vis.add(pv.Layout.Stack)
- *     .layers([[1, 1.2, 1.7, 1.5, 1.7],
- *              [.5, 1, .8, 1.1, 1.3],
- *              [.2, .5, .8, .9, 1]])
- *     .x(function() this.index * 35)
- *     .y(function(d) d * 40)
- *   .layer.add(pv.Area);
- * - * specifies a vertically-stacked area chart, using the default "bottom-left" - * orientation with "zero" offset. This visualization can be easily changed into - * a streamgraph using the "wiggle" offset, which attempts to minimize change in - * slope weighted by layer thickness. See the {@link #offset} property for more - * supported streamgraph algorithms. - * - *

In the simplest case, the layer data can be specified as a two-dimensional - * array of numbers. The x and y psuedo-properties are used to - * define the thickness of each layer at the given position, respectively; in - * the above example of the "bottom-left" orientation, the x and - * y psuedo-properties are equivalent to the left and - * height properties that you might use if you implemented a stacked - * area by hand. - * - *

The advantage of using the stack layout is that the baseline, i.e., the - * bottom property is computed automatically using the specified offset - * algorithm. In addition, the order of layers can be computed using a built-in - * algorithm via the order property. - * - *

With the exception of the "expand" offset, the stack layout does - * not perform any automatic scaling of data; the values returned from - * x and y specify pixel sizes. To simplify scaling math, use - * this layout in conjunction with {@link pv.Scale.linear} or similar. - * - *

In other cases, the values psuedo-property can be used to define - * the data more flexibly. As with a typical panel & area, the - * layers property corresponds to the data in the enclosing panel, - * while the values psuedo-property corresponds to the data for the - * area within the panel. For example, given an array of data values: - * - *

var crimea = [
- *  { date: "4/1854", wounds: 0, other: 110, disease: 110 },
- *  { date: "5/1854", wounds: 0, other: 95, disease: 105 },
- *  { date: "6/1854", wounds: 0, other: 40, disease: 95 },
- *  ...
- * - * and a corresponding array of series names: - * - *
var causes = ["wounds", "other", "disease"];
- * - * Separate layers can be defined for each cause like so: - * - *
vis.add(pv.Layout.Stack)
- *     .layers(causes)
- *     .values(crimea)
- *     .x(function(d) x(d.date))
- *     .y(function(d, p) y(d[p]))
- *   .layer.add(pv.Area)
- *     ...
- * - * As with the panel & area case, the datum that is passed to the - * psuedo-properties x and y are the values (an element in - * crimea); the second argument is the layer data (a string in - * causes). Additional arguments specify the data of enclosing panels, - * if any. - * - * @extends pv.Layout - */ -pv.Layout.Stack = function() { - pv.Layout.call(this); - var that = this, - /** @ignore */ none = function() { return null; }, - prop = {t: none, l: none, r: none, b: none, w: none, h: none}, - values, - buildImplied = that.buildImplied; - - /** @private Proxy the given property on the layer. */ - function proxy(name) { - return function() { - return prop[name](this.parent.index, this.index); - }; - } - - /** @private Compute the layout! */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - - var data = s.layers, - n = data.length, - m, - orient = s.orient, - horizontal = /^(top|bottom)\b/.test(orient), - h = this.parent[horizontal ? "height" : "width"](), - x = [], - y = [], - dy = []; - - /* - * Iterate over the data, evaluating the values, x and y functions. The - * context in which the x and y psuedo-properties are evaluated is a - * pseudo-mark that is a grandchild of this layout. - */ - var stack = pv.Mark.stack, o = {parent: {parent: this}}; - stack.unshift(null); - values = []; - for (var i = 0; i < n; i++) { - dy[i] = []; - y[i] = []; - o.parent.index = i; - stack[0] = data[i]; - values[i] = this.$values.apply(o.parent, stack); - if (!i) m = values[i].length; - stack.unshift(null); - for (var j = 0; j < m; j++) { - stack[0] = values[i][j]; - o.index = j; - if (!i) x[j] = this.$x.apply(o, stack); - dy[i][j] = this.$y.apply(o, stack); - } - stack.shift(); - } - stack.shift(); - - /* order */ - var index; - switch (s.order) { - case "inside-out": { - var max = dy.map(function(v) { return pv.max.index(v); }), - map = pv.range(n).sort(function(a, b) { return max[a] - max[b]; }), - sums = dy.map(function(v) { return pv.sum(v); }), - top = 0, - bottom = 0, - tops = [], - bottoms = []; - for (var i = 0; i < n; i++) { - var j = map[i]; - if (top < bottom) { - top += sums[j]; - tops.push(j); - } else { - bottom += sums[j]; - bottoms.push(j); - } - } - index = bottoms.reverse().concat(tops); - break; - } - case "reverse": index = pv.range(n - 1, -1, -1); break; - default: index = pv.range(n); break; - } - - /* offset */ - switch (s.offset) { - case "silohouette": { - for (var j = 0; j < m; j++) { - var o = 0; - for (var i = 0; i < n; i++) o += dy[i][j]; - y[index[0]][j] = (h - o) / 2; - } - break; - } - case "wiggle": { - var o = 0; - for (var i = 0; i < n; i++) o += dy[i][0]; - y[index[0]][0] = o = (h - o) / 2; - for (var j = 1; j < m; j++) { - var s1 = 0, s2 = 0, dx = x[j] - x[j - 1]; - for (var i = 0; i < n; i++) s1 += dy[i][j]; - for (var i = 0; i < n; i++) { - var s3 = (dy[index[i]][j] - dy[index[i]][j - 1]) / (2 * dx); - for (var k = 0; k < i; k++) { - s3 += (dy[index[k]][j] - dy[index[k]][j - 1]) / dx; - } - s2 += s3 * dy[index[i]][j]; - } - y[index[0]][j] = o -= s1 ? s2 / s1 * dx : 0; - } - break; - } - case "expand": { - for (var j = 0; j < m; j++) { - y[index[0]][j] = 0; - var k = 0; - for (var i = 0; i < n; i++) k += dy[i][j]; - if (k) { - k = h / k; - for (var i = 0; i < n; i++) dy[i][j] *= k; - } else { - k = h / n; - for (var i = 0; i < n; i++) dy[i][j] = k; - } - } - break; - } - default: { - for (var j = 0; j < m; j++) y[index[0]][j] = 0; - break; - } - } - - /* Propagate the offset to the other series. */ - for (var j = 0; j < m; j++) { - var o = y[index[0]][j]; - for (var i = 1; i < n; i++) { - o += dy[index[i - 1]][j]; - y[index[i]][j] = o; - } - } - - /* Find the property definitions for dynamic substitution. */ - var i = orient.indexOf("-"), - pdy = horizontal ? "h" : "w", - px = i < 0 ? (horizontal ? "l" : "b") : orient.charAt(i + 1), - py = orient.charAt(0); - for (var p in prop) prop[p] = none; - prop[px] = function(i, j) { return x[j]; }; - prop[py] = function(i, j) { return y[i][j]; }; - prop[pdy] = function(i, j) { return dy[i][j]; }; - }; - - /** - * The layer prototype. This prototype is intended to be used with an area, - * bar or panel mark (or subclass thereof). Other mark types may be possible, - * though note that the stack layout is not currently designed to support - * radial stacked visualizations using wedges. - * - *

The layer is not a direct child of the stack layout; a hidden panel is - * used to replicate layers. - * - * @type pv.Mark - * @name pv.Layout.Stack.prototype.layer - */ - this.layer = new pv.Mark() - .data(function() { return values[this.parent.index]; }) - .top(proxy("t")) - .left(proxy("l")) - .right(proxy("r")) - .bottom(proxy("b")) - .width(proxy("w")) - .height(proxy("h")); - - this.layer.add = function(type) { - return that.add(pv.Panel) - .data(function() { return that.layers(); }) - .add(type) - .extend(this); - }; -}; - -pv.Layout.Stack.prototype = pv.extend(pv.Layout) - .property("orient", String) - .property("offset", String) - .property("order", String) - .property("layers"); - -/** - * Default properties for stack layouts. The default orientation is - * "bottom-left", the default offset is "zero", and the default layers is - * [[]]. - * - * @type pv.Layout.Stack - */ -pv.Layout.Stack.prototype.defaults = new pv.Layout.Stack() - .extend(pv.Layout.prototype.defaults) - .orient("bottom-left") - .offset("zero") - .layers([[]]); - -/** @private */ -pv.Layout.Stack.prototype.$x - = /** @private */ pv.Layout.Stack.prototype.$y - = function() { return 0; }; - -/** - * The x psuedo-property; determines the position of the value within the layer. - * This typically corresponds to the independent variable. For example, with the - * default "bottom-left" orientation, this function defines the "left" property. - * - * @param {function} f the x function. - * @returns {pv.Layout.Stack} this. - */ -pv.Layout.Stack.prototype.x = function(f) { - /** @private */ this.$x = pv.functor(f); - return this; -}; - -/** - * The y psuedo-property; determines the thickness of the layer at the given - * value. This typically corresponds to the dependent variable. For example, - * with the default "bottom-left" orientation, this function defines the - * "height" property. - * - * @param {function} f the y function. - * @returns {pv.Layout.Stack} this. - */ -pv.Layout.Stack.prototype.y = function(f) { - /** @private */ this.$y = pv.functor(f); - return this; -}; - -/** @private The default value function; identity. */ -pv.Layout.Stack.prototype.$values = pv.identity; - -/** - * The values function; determines the values for a given layer. The default - * value is the identity function, which assumes that the layers property is - * specified as a two-dimensional (i.e., nested) array. - * - * @param {function} f the values function. - * @returns {pv.Layout.Stack} this. - */ -pv.Layout.Stack.prototype.values = function(f) { - this.$values = pv.functor(f); - return this; -}; - -/** - * The layer data in row-major order. The value of this property is typically a - * two-dimensional (i.e., nested) array, but any array can be used, provided the - * values psuedo-property is defined accordingly. - * - * @type array[] - * @name pv.Layout.Stack.prototype.layers - */ - -/** - * The layer orientation. The following values are supported:

    - * - *
  • bottom-left == bottom - *
  • bottom-right - *
  • top-left == top - *
  • top-right - *
  • left-top - *
  • left-bottom == left - *
  • right-top - *
  • right-bottom == right - * - *
. The default value is "bottom-left", which means that the layers will - * be built from the bottom-up, and the values within layers will be laid out - * from left-to-right. - * - *

Note that with non-zero baselines, some orientations may give similar - * results. For example, offset("silohouette") centers the layers, resulting in - * a streamgraph. Thus, the orientations "bottom-left" and "top-left" will - * produce similar results, differing only in the layer order. - * - * @type string - * @name pv.Layout.Stack.prototype.orient - */ - -/** - * The layer order. The following values are supported:

    - * - *
  • null - use given layer order. - *
  • inside-out - sort by maximum value, with balanced order. - *
  • reverse - use reverse of given layer order. - * - *
For details on the inside-out order algorithm, refer to "Stacked Graphs - * -- Geometry & Aesthetics" by L. Byron and M. Wattenberg, IEEE TVCG - * November/December 2008. - * - * @type string - * @name pv.Layout.Stack.prototype.order - */ - -/** - * The layer offset; the y-position of the bottom of the lowest layer. The - * following values are supported:
    - * - *
  • zero - use a zero baseline, i.e., the y-axis. - *
  • silohouette - center the stream, i.e., ThemeRiver. - *
  • wiggle - minimize weighted change in slope. - *
  • expand - expand layers to fill the enclosing layout dimensions. - * - *
For details on these offset algorithms, refer to "Stacked Graphs -- - * Geometry & Aesthetics" by L. Byron and M. Wattenberg, IEEE TVCG - * November/December 2008. - * - * @type string - * @name pv.Layout.Stack.prototype.offset - */ -/** - * Constructs a new, empty treemap layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a space-filling rectangular layout, with the hierarchy - * represented via containment. Treemaps represent nodes as boxes, with child - * nodes placed within parent boxes. The size of each box is proportional to the - * size of the node in the tree. This particular algorithm is taken from Bruls, - * D.M., C. Huizing, and J.J. van Wijk, "Squarified Treemaps" in - * Data Visualization 2000, Proceedings of the Joint Eurographics and IEEE - * TCVG Sumposium on Visualization, 2000, pp. 33-42. - * - *

The meaning of the exported mark prototypes changes slightly in the - * space-filling implementation:

    - * - *
  • node - for rendering nodes; typically a {@link pv.Bar}. The node - * data is populated with dx and dy attributes, in addition to - * the standard x and y position attributes. - * - *

  • leaf - for rendering leaf nodes only, with no fill or stroke - * style by default; typically a {@link pv.Panel} or another layout! - * - *

  • link - unsupported; undefined. Links are encoded implicitly - * in the arrangement of the space-filling nodes. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. - * - *
For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @extends pv.Layout.Hierarchy - */ -pv.Layout.Treemap = function() { - pv.Layout.Hierarchy.call(this); - - this.node - .strokeStyle("#fff") - .fillStyle("rgba(31, 119, 180, .25)") - .width(function(n) { return n.dx; }) - .height(function(n) { return n.dy; }); - - this.label - .visible(function(n) { return !n.firstChild; }) - .left(function(n) { return n.x + (n.dx / 2); }) - .top(function(n) { return n.y + (n.dy / 2); }) - .textAlign("center") - .textAngle(function(n) { return n.dx > n.dy ? 0 : -Math.PI / 2; }); - - (this.leaf = new pv.Mark() - .extend(this.node) - .fillStyle(null) - .strokeStyle(null) - .visible(function(n) { return !n.firstChild; })).parent = this; - - /* Hide unsupported link. */ - delete this.link; -}; - -pv.Layout.Treemap.prototype = pv.extend(pv.Layout.Hierarchy) - .property("round", Boolean) - .property("paddingLeft", Number) - .property("paddingRight", Number) - .property("paddingTop", Number) - .property("paddingBottom", Number) - .property("mode", String) - .property("order", String); - -/** - * Default propertiess for treemap layouts. The default mode is "squarify" and - * the default order is "ascending". - * - * @type pv.Layout.Treemap - */ -pv.Layout.Treemap.prototype.defaults = new pv.Layout.Treemap() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .mode("squarify") // squarify, slice-and-dice, slice, dice - .order("ascending"); // ascending, descending, reverse, null - -/** - * Whether node sizes should be rounded to integer values. This has a similar - * effect to setting antialias(false) for node values, but allows the - * treemap algorithm to accumulate error related to pixel rounding. - * - * @type boolean - * @name pv.Layout.Treemap.prototype.round - */ - -/** - * The left inset between parent add child in pixels. Defaults to 0. - * - * @type number - * @name pv.Layout.Treemap.prototype.paddingLeft - * @see #padding - */ - -/** - * The right inset between parent add child in pixels. Defaults to 0. - * - * @type number - * @name pv.Layout.Treemap.prototype.paddingRight - * @see #padding - */ - -/** - * The top inset between parent and child in pixels. Defaults to 0. - * - * @type number - * @name pv.Layout.Treemap.prototype.paddingTop - * @see #padding - */ - -/** - * The bottom inset between parent and child in pixels. Defaults to 0. - * - * @type number - * @name pv.Layout.Treemap.prototype.paddingBottom - * @see #padding - */ - -/** - * The treemap algorithm. The default value is "squarify". The "slice-and-dice" - * algorithm may also be used, which alternates between horizontal and vertical - * slices for different depths. In addition, the "slice" and "dice" algorithms - * may be specified explicitly to control whether horizontal or vertical slices - * are used, which may be useful for nested treemap layouts. - * - * @type string - * @name pv.Layout.Treemap.prototype.mode - * @see "Ordered Treemap Layouts" by B. Shneiderman & M. Wattenberg, IEEE - * InfoVis 2001. - */ - -/** - * The sibling node order. A null value means to use the sibling order - * specified by the nodes property as-is; "reverse" will reverse the given - * order. The default value "ascending" will sort siblings in ascending order of - * size, while "descending" will do the reverse. For sorting based on data - * attributes other than size, use the default null for the order - * property, and sort the nodes beforehand using the {@link pv.Dom} operator. - * - * @type string - * @name pv.Layout.Treemap.prototype.order - */ - -/** - * Alias for setting the left, right, top and bottom padding properties - * simultaneously. - * - * @see #paddingLeft - * @see #paddingRight - * @see #paddingTop - * @see #paddingBottom - * @returns {pv.Layout.Treemap} this. - */ -pv.Layout.Treemap.prototype.padding = function(n) { - return this.paddingLeft(n).paddingRight(n).paddingTop(n).paddingBottom(n); -}; - -/** @private The default size function. */ -pv.Layout.Treemap.prototype.$size = function(d) { - return Number(d.nodeValue); -}; - -/** - * Specifies the sizing function. By default, the size function uses the - * nodeValue attribute of nodes as a numeric value: function(d) - * Number(d.nodeValue). - * - *

The sizing function is invoked for each leaf node in the tree, per the - * nodes property. For example, if the tree data structure represents a - * file system, with files as leaf nodes, and each file has a bytes - * attribute, you can specify a size function as: - * - *

    .size(function(d) d.bytes)
- * - * @param {function} f the new sizing function. - * @returns {pv.Layout.Treemap} this. - */ -pv.Layout.Treemap.prototype.size = function(f) { - this.$size = pv.functor(f); - return this; -}; - -/** @private */ -pv.Layout.Treemap.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var that = this, - nodes = s.nodes, - root = nodes[0], - stack = pv.Mark.stack, - left = s.paddingLeft, - right = s.paddingRight, - top = s.paddingTop, - bottom = s.paddingBottom, - /** @ignore */ size = function(n) { return n.size; }, - round = s.round ? Math.round : Number, - mode = s.mode; - - /** @private */ - function slice(row, sum, horizontal, x, y, w, h) { - for (var i = 0, d = 0; i < row.length; i++) { - var n = row[i]; - if (horizontal) { - n.x = x + d; - n.y = y; - d += n.dx = round(w * n.size / sum); - n.dy = h; - } else { - n.x = x; - n.y = y + d; - n.dx = w; - d += n.dy = round(h * n.size / sum); - } - } - if (n) { // correct on-axis rounding error - if (horizontal) { - n.dx += w - d; - } else { - n.dy += h - d; - } - } - } - - /** @private */ - function ratio(row, l) { - var rmax = -Infinity, rmin = Infinity, s = 0; - for (var i = 0; i < row.length; i++) { - var r = row[i].size; - if (r < rmin) rmin = r; - if (r > rmax) rmax = r; - s += r; - } - s = s * s; - l = l * l; - return Math.max(l * rmax / s, s / (l * rmin)); - } - - /** @private */ - function layout(n, i) { - var x = n.x + left, - y = n.y + top, - w = n.dx - left - right, - h = n.dy - top - bottom; - - /* Assume squarify by default. */ - if (mode != "squarify") { - slice(n.childNodes, n.size, - mode == "slice" ? true - : mode == "dice" ? false - : i & 1, x, y, w, h); - return; - } - - var row = [], - mink = Infinity, - l = Math.min(w, h), - k = w * h / n.size; - - /* Abort if the size is nonpositive. */ - if (n.size <= 0) return; - - /* Scale the sizes to fill the current subregion. */ - n.visitBefore(function(n) { n.size *= k; }); - - /** @private Position the specified nodes along one dimension. */ - function position(row) { - var horizontal = w == l, - sum = pv.sum(row, size), - r = l ? round(sum / l) : 0; - slice(row, sum, horizontal, x, y, horizontal ? w : r, horizontal ? r : h); - if (horizontal) { - y += r; - h -= r; - } else { - x += r; - w -= r; - } - l = Math.min(w, h); - return horizontal; - } - - var children = n.childNodes.slice(); // copy - while (children.length) { - var child = children[children.length - 1]; - if (!child.size) { - children.pop(); - continue; - } - row.push(child); - - var k = ratio(row, l); - if (k <= mink) { - children.pop(); - mink = k; - } else { - row.pop(); - position(row); - row.length = 0; - mink = Infinity; - } - } - - /* correct off-axis rounding error */ - if (position(row)) for (var i = 0; i < row.length; i++) { - row[i].dy += h; - } else for (var i = 0; i < row.length; i++) { - row[i].dx += w; - } - } - - /* Recursively compute the node depth and size. */ - stack.unshift(null); - root.visitAfter(function(n, i) { - n.depth = i; - n.x = n.y = n.dx = n.dy = 0; - n.size = n.firstChild - ? pv.sum(n.childNodes, function(n) { return n.size; }) - : that.$size.apply(that, (stack[0] = n, stack)); - }); - stack.shift(); - - /* Sort. */ - switch (s.order) { - case "ascending": { - root.sort(function(a, b) { return a.size - b.size; }); - break; - } - case "descending": { - root.sort(function(a, b) { return b.size - a.size; }); - break; - } - case "reverse": root.reverse(); break; - } - - /* Recursively compute the layout. */ - root.x = 0; - root.y = 0; - root.dx = s.width; - root.dy = s.height; - root.visitBefore(layout); -}; -/** - * Constructs a new, empty tree layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a node-link tree diagram using the Reingold-Tilford "tidy" - * tree layout algorithm. The specific algorithm used by this layout is based on - * "Improving - * Walker's Algorithm to Run in Linear Time" by C. Buchheim, M. Jünger - * & S. Leipert, Graph Drawing 2002. This layout supports both cartesian and - * radial orientations orientations for node-link diagrams. - * - *

The tree layout supports a "group" property, which if true causes siblings - * to be positioned closer together than unrelated nodes at the same depth. The - * layout can be configured using the depth and breadth - * properties, which control the increments in pixel space between nodes in both - * dimensions, similar to the indent layout. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @extends pv.Layout.Hierarchy - */ -pv.Layout.Tree = function() { - pv.Layout.Hierarchy.call(this); -}; - -pv.Layout.Tree.prototype = pv.extend(pv.Layout.Hierarchy) - .property("group", Number) - .property("breadth", Number) - .property("depth", Number) - .property("orient", String); - -/** - * Default properties for tree layouts. The default orientation is "top", the - * default group parameter is 1, and the default breadth and depth offsets are - * 15 and 60 respectively. - * - * @type pv.Layout.Tree - */ -pv.Layout.Tree.prototype.defaults = new pv.Layout.Tree() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .group(1) - .breadth(15) - .depth(60) - .orient("top"); - -/** @private */ -pv.Layout.Tree.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var nodes = s.nodes, - orient = s.orient, - depth = s.depth, - breadth = s.breadth, - group = s.group, - w = s.width, - h = s.height; - - /** @private */ - function firstWalk(v) { - var l, r, a; - if (!v.firstChild) { - if (l = v.previousSibling) { - v.prelim = l.prelim + distance(v.depth, true); - } - } else { - l = v.firstChild; - r = v.lastChild; - a = l; // default ancestor - for (var c = l; c; c = c.nextSibling) { - firstWalk(c); - a = apportion(c, a); - } - executeShifts(v); - var midpoint = .5 * (l.prelim + r.prelim); - if (l = v.previousSibling) { - v.prelim = l.prelim + distance(v.depth, true); - v.mod = v.prelim - midpoint; - } else { - v.prelim = midpoint; - } - } - } - - /** @private */ - function secondWalk(v, m, depth) { - v.breadth = v.prelim + m; - m += v.mod; - for (var c = v.firstChild; c; c = c.nextSibling) { - secondWalk(c, m, depth); - } - } - - /** @private */ - function apportion(v, a) { - var w = v.previousSibling; - if (w) { - var vip = v, - vop = v, - vim = w, - vom = v.parentNode.firstChild, - sip = vip.mod, - sop = vop.mod, - sim = vim.mod, - som = vom.mod, - nr = nextRight(vim), - nl = nextLeft(vip); - while (nr && nl) { - vim = nr; - vip = nl; - vom = nextLeft(vom); - vop = nextRight(vop); - vop.ancestor = v; - var shift = (vim.prelim + sim) - (vip.prelim + sip) + distance(vim.depth, false); - if (shift > 0) { - moveSubtree(ancestor(vim, v, a), v, shift); - sip += shift; - sop += shift; - } - sim += vim.mod; - sip += vip.mod; - som += vom.mod; - sop += vop.mod; - nr = nextRight(vim); - nl = nextLeft(vip); - } - if (nr && !nextRight(vop)) { - vop.thread = nr; - vop.mod += sim - sop; - } - if (nl && !nextLeft(vom)) { - vom.thread = nl; - vom.mod += sip - som; - a = v; - } - } - return a; - } - - /** @private */ - function nextLeft(v) { - return v.firstChild || v.thread; - } - - /** @private */ - function nextRight(v) { - return v.lastChild || v.thread; - } - - /** @private */ - function moveSubtree(wm, wp, shift) { - var subtrees = wp.number - wm.number; - wp.change -= shift / subtrees; - wp.shift += shift; - wm.change += shift / subtrees; - wp.prelim += shift; - wp.mod += shift; - } - - /** @private */ - function executeShifts(v) { - var shift = 0, change = 0; - for (var c = v.lastChild; c; c = c.previousSibling) { - c.prelim += shift; - c.mod += shift; - change += c.change; - shift += c.shift + change; - } - } - - /** @private */ - function ancestor(vim, v, a) { - return (vim.ancestor.parentNode == v.parentNode) ? vim.ancestor : a; - } - - /** @private */ - function distance(depth, siblings) { - return (siblings ? 1 : (group + 1)) / ((orient == "radial") ? depth : 1); - } - - /* Initialize temporary layout variables. TODO: store separately. */ - var root = nodes[0]; - root.visitAfter(function(v, i) { - v.ancestor = v; - v.prelim = 0; - v.mod = 0; - v.change = 0; - v.shift = 0; - v.number = v.previousSibling ? (v.previousSibling.number + 1) : 0; - v.depth = i; - }); - - /* Compute the layout using Buchheim et al.'s algorithm. */ - firstWalk(root); - secondWalk(root, -root.prelim, 0); - - /** @private Returns the angle of the given node. */ - function midAngle(n) { - return (orient == "radial") ? n.breadth / depth : 0; - } - - /** @private */ - function x(n) { - switch (orient) { - case "left": return n.depth; - case "right": return w - n.depth; - case "top": - case "bottom": return n.breadth + w / 2; - case "radial": return w / 2 + n.depth * Math.cos(midAngle(n)); - } - } - - /** @private */ - function y(n) { - switch (orient) { - case "left": - case "right": return n.breadth + h / 2; - case "top": return n.depth; - case "bottom": return h - n.depth; - case "radial": return h / 2 + n.depth * Math.sin(midAngle(n)); - } - } - - /* Clear temporary layout variables; transform depth and breadth. */ - root.visitAfter(function(v) { - v.breadth *= breadth; - v.depth *= depth; - v.midAngle = midAngle(v); - v.x = x(v); - v.y = y(v); - if (v.firstChild) v.midAngle += Math.PI; - delete v.breadth; - delete v.depth; - delete v.ancestor; - delete v.prelim; - delete v.mod; - delete v.change; - delete v.shift; - delete v.number; - delete v.thread; - }); -}; - -/** - * The offset between siblings nodes; defaults to 15. - * - * @type number - * @name pv.Layout.Tree.prototype.breadth - */ - -/** - * The offset between parent and child nodes; defaults to 60. - * - * @type number - * @name pv.Layout.Tree.prototype.depth - */ - -/** - * The orientation. The default orientation is "top", which means that the root - * node is placed on the top edge, leaf nodes appear at the bottom, and internal - * nodes are in-between. The following orientations are supported:

    - * - *
  • left - left-to-right. - *
  • right - right-to-left. - *
  • top - top-to-bottom. - *
  • bottom - bottom-to-top. - *
  • radial - radially, with the root at the center.
- * - * @type string - * @name pv.Layout.Tree.prototype.orient - */ - -/** - * The sibling grouping, i.e., whether differentiating space is placed between - * sibling groups. The default is 1 (or true), causing sibling leaves to be - * separated by one breadth offset. Setting this to false (or 0) causes - * non-siblings to be adjacent. - * - * @type number - * @name pv.Layout.Tree.prototype.group - */ -/** - * Constructs a new, empty indent layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a hierarchical layout using the indent algorithm. This - * layout implements a node-link diagram where the nodes are presented in - * preorder traversal, and nodes are indented based on their depth from the - * root. This technique is used ubiquitously by operating systems to represent - * file directories; although it requires much vertical space, indented trees - * allow efficient interactive exploration of trees to find a specific - * node. In addition they allow rapid scanning of node labels, and multivariate - * data such as file sizes can be displayed adjacent to the hierarchy. - * - *

The indent layout can be configured using the depth and - * breadth properties, which control the increments in pixel space for - * each indent and row in the layout. This layout does not support multiple - * orientations; the root node is rendered in the top-left, while - * breadth is a vertical offset from the top, and depth is a - * horizontal offset from the left. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @extends pv.Layout.Hierarchy - */ -pv.Layout.Indent = function() { - pv.Layout.Hierarchy.call(this); - this.link.interpolate("step-after"); -}; - -pv.Layout.Indent.prototype = pv.extend(pv.Layout.Hierarchy) - .property("depth", Number) - .property("breadth", Number); - -/** - * The horizontal offset between different levels of the tree; defaults to 15. - * - * @type number - * @name pv.Layout.Indent.prototype.depth - */ - -/** - * The vertical offset between nodes; defaults to 15. - * - * @type number - * @name pv.Layout.Indent.prototype.breadth - */ - -/** - * Default properties for indent layouts. By default the depth and breadth - * offsets are 15 pixels. - * - * @type pv.Layout.Indent - */ -pv.Layout.Indent.prototype.defaults = new pv.Layout.Indent() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .depth(15) - .breadth(15); - -/** @private */ -pv.Layout.Indent.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var nodes = s.nodes, - bspace = s.breadth, - dspace = s.depth, - ax = 0, - ay = 0; - - /** @private */ - function position(n, breadth, depth) { - n.x = ax + depth++ * dspace; - n.y = ay + breadth++ * bspace; - n.midAngle = 0; - for (var c = n.firstChild; c; c = c.nextSibling) { - breadth = position(c, breadth, depth); - } - return breadth; - } - - position(nodes[0], 1, 1); -}; -/** - * Constructs a new, empty circle-packing layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a hierarchical layout using circle-packing. The meaning of - * the exported mark prototypes changes slightly in the space-filling - * implementation:

    - * - *
  • node - for rendering nodes; typically a {@link pv.Dot}. - * - *

  • link - unsupported; undefined. Links are encoded implicitly - * in the arrangement of the space-filling nodes. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. - * - *
The pack layout support dynamic sizing for leaf nodes, if a - * {@link #size} psuedo-property is specified. The default size function returns - * 1, causing all leaf nodes to be sized equally, and all internal nodes to be - * sized by the number of leaf nodes they have as descendants. - * - *

The size function can be used in conjunction with the order property, - * which allows the nodes to the sorted by the computed size. Note: for sorting - * based on other data attributes, simply use the default null for the - * order property, and sort the nodes beforehand using the {@link pv.Dom} - * operator. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @extends pv.Layout.Hierarchy - * @see "Visualization of large hierarchical data by circle packing" by W. Wang, - * H. Wang, G. Dai, and H. Wang, ACM CHI 2006. - */ -pv.Layout.Pack = function() { - pv.Layout.Hierarchy.call(this); - - this.node - .radius(function(n) { return n.radius; }) - .strokeStyle("rgb(31, 119, 180)") - .fillStyle("rgba(31, 119, 180, .25)"); - - this.label - .textAlign("center"); - - /* Hide unsupported link. */ - delete this.link; -}; - -pv.Layout.Pack.prototype = pv.extend(pv.Layout.Hierarchy) - .property("spacing", Number) - .property("order", String); // ascending, descending, reverse, null - -/** - * Default properties for circle-packing layouts. The default spacing parameter - * is 1 and the default order is "ascending". - * - * @type pv.Layout.Pack - */ -pv.Layout.Pack.prototype.defaults = new pv.Layout.Pack() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .spacing(1) - .order("ascending"); - -/** - * The spacing parameter; defaults to 1, which provides a little bit of padding - * between sibling nodes and the enclosing circle. Larger values increase the - * spacing, by making the sibling nodes smaller; a value of zero makes the leaf - * nodes as large as possible, with no padding on enclosing circles. - * - * @type number - * @name pv.Layout.Pack.prototype.spacing - */ - -/** - * The sibling node order. The default order is null, which means to - * use the sibling order specified by the nodes property as-is. A value of - * "ascending" will sort siblings in ascending order of size, while "descending" - * will do the reverse. For sorting based on data attributes other than size, - * use the default null for the order property, and sort the nodes - * beforehand using the {@link pv.Dom} operator. - * - * @see pv.Dom.Node#sort - * @type string - * @name pv.Layout.Pack.prototype.order - */ - -/** @private The default size function. */ -pv.Layout.Pack.prototype.$radius = function() { return 1; }; - -// TODO is it possible for spacing to operate in pixel space? -// Right now it appears to be multiples of the smallest radius. - -/** - * Specifies the sizing function. By default, a sizing function is disabled and - * all nodes are given constant size. The sizing function is invoked for each - * leaf node in the tree (passed to the constructor). - * - *

For example, if the tree data structure represents a file system, with - * files as leaf nodes, and each file has a bytes attribute, you can - * specify a size function as: - * - *

    .size(function(d) d.bytes)
- * - * As with other properties, a size function may specify additional arguments to - * access the data associated with the layout and any enclosing panels. - * - * @param {function} f the new sizing function. - * @returns {pv.Layout.Pack} this. - */ -pv.Layout.Pack.prototype.size = function(f) { - this.$radius = typeof f == "function" - ? function() { return Math.sqrt(f.apply(this, arguments)); } - : (f = Math.sqrt(f), function() { return f; }); - return this; -}; - -/** @private */ -pv.Layout.Pack.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var that = this, - nodes = s.nodes, - root = nodes[0]; - - /** @private Compute the radii of the leaf nodes. */ - function radii(nodes) { - var stack = pv.Mark.stack; - stack.unshift(null); - for (var i = 0, n = nodes.length; i < n; i++) { - var c = nodes[i]; - if (!c.firstChild) { - c.radius = that.$radius.apply(that, (stack[0] = c, stack)); - } - } - stack.shift(); - } - - /** @private */ - function packTree(n) { - var nodes = []; - for (var c = n.firstChild; c; c = c.nextSibling) { - if (c.firstChild) c.radius = packTree(c); - c.n = c.p = c; - nodes.push(c); - } - - /* Sort. */ - switch (s.order) { - case "ascending": { - nodes.sort(function(a, b) { return a.radius - b.radius; }); - break; - } - case "descending": { - nodes.sort(function(a, b) { return b.radius - a.radius; }); - break; - } - case "reverse": nodes.reverse(); break; - } - - return packCircle(nodes); - } - - /** @private */ - function packCircle(nodes) { - var xMin = Infinity, - xMax = -Infinity, - yMin = Infinity, - yMax = -Infinity, - a, b, c, j, k; - - /** @private */ - function bound(n) { - xMin = Math.min(n.x - n.radius, xMin); - xMax = Math.max(n.x + n.radius, xMax); - yMin = Math.min(n.y - n.radius, yMin); - yMax = Math.max(n.y + n.radius, yMax); - } - - /** @private */ - function insert(a, b) { - var c = a.n; - a.n = b; - b.p = a; - b.n = c; - c.p = b; - } - - /** @private */ - function splice(a, b) { - a.n = b; - b.p = a; - } - - /** @private */ - function intersects(a, b) { - var dx = b.x - a.x, - dy = b.y - a.y, - dr = a.radius + b.radius; - return (dr * dr - dx * dx - dy * dy) > .001; // within epsilon - } - - /* Create first node. */ - a = nodes[0]; - a.x = -a.radius; - a.y = 0; - bound(a); - - /* Create second node. */ - if (nodes.length > 1) { - b = nodes[1]; - b.x = b.radius; - b.y = 0; - bound(b); - - /* Create third node and build chain. */ - if (nodes.length > 2) { - c = nodes[2]; - place(a, b, c); - bound(c); - insert(a, c); - a.p = c; - insert(c, b); - b = a.n; - - /* Now iterate through the rest. */ - for (var i = 3; i < nodes.length; i++) { - place(a, b, c = nodes[i]); - - /* Search for the closest intersection. */ - var isect = 0, s1 = 1, s2 = 1; - for (j = b.n; j != b; j = j.n, s1++) { - if (intersects(j, c)) { - isect = 1; - break; - } - } - if (isect == 1) { - for (k = a.p; k != j.p; k = k.p, s2++) { - if (intersects(k, c)) { - if (s2 < s1) { - isect = -1; - j = k; - } - break; - } - } - } - - /* Update node chain. */ - if (isect == 0) { - insert(a, c); - b = c; - bound(c); - } else if (isect > 0) { - splice(a, j); - b = j; - i--; - } else if (isect < 0) { - splice(j, b); - a = j; - i--; - } - } - } - } - - /* Re-center the circles and return the encompassing radius. */ - var cx = (xMin + xMax) / 2, - cy = (yMin + yMax) / 2, - cr = 0; - for (var i = 0; i < nodes.length; i++) { - var n = nodes[i]; - n.x -= cx; - n.y -= cy; - cr = Math.max(cr, n.radius + Math.sqrt(n.x * n.x + n.y * n.y)); - } - return cr + s.spacing; - } - - /** @private */ - function place(a, b, c) { - var da = b.radius + c.radius, - db = a.radius + c.radius, - dx = b.x - a.x, - dy = b.y - a.y, - dc = Math.sqrt(dx * dx + dy * dy), - cos = (db * db + dc * dc - da * da) / (2 * db * dc), - theta = Math.acos(cos), - x = cos * db, - h = Math.sin(theta) * db; - dx /= dc; - dy /= dc; - c.x = a.x + x * dx + h * dy; - c.y = a.y + x * dy - h * dx; - } - - /** @private */ - function transform(n, x, y, k) { - for (var c = n.firstChild; c; c = c.nextSibling) { - c.x += n.x; - c.y += n.y; - transform(c, x, y, k); - } - n.x = x + k * n.x; - n.y = y + k * n.y; - n.radius *= k; - } - - radii(nodes); - - /* Recursively compute the layout. */ - root.x = 0; - root.y = 0; - root.radius = packTree(root); - - var w = this.width(), - h = this.height(), - k = 1 / Math.max(2 * root.radius / w, 2 * root.radius / h); - transform(root, w / 2, h / 2, k); -}; -/** - * Constructs a new, empty force-directed layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements force-directed network layout as a node-link diagram. This - * layout uses the Fruchterman-Reingold algorithm, which applies an attractive - * spring force between neighboring nodes, and a repulsive electrical charge - * force between all nodes. An additional drag force improves stability of the - * simulation. See {@link pv.Force.spring}, {@link pv.Force.drag} and {@link - * pv.Force.charge} for more details; note that the n-body charge force is - * approximated using the Barnes-Hut algorithm. - * - *

This layout is implemented on top of {@link pv.Simulation}, which can be - * used directly for more control over simulation parameters. The simulation - * uses Position Verlet integration, which does not compute velocities - * explicitly, but allows for easy geometric constraints, such as bounding the - * nodes within the layout panel. Many of the configuration properties supported - * by this layout are simply passed through to the underlying forces and - * constraints of the simulation. - * - *

Force layouts are typically interactive. The gradual movement of the nodes - * as they stabilize to a local stress minimum can help reveal the structure of - * the network, as can {@link pv.Behavior.drag}, which allows the user to pick - * up nodes and reposition them while the physics simulation continues. This - * layout can also be used with pan & zoom behaviors for interaction. - * - *

To facilitate interaction, this layout by default automatically re-renders - * using a setInterval every 42 milliseconds. This can be disabled via - * the iterations property, which if non-null specifies the number of - * simulation iterations to run before the force-directed layout is finalized. - * Be careful not to use too high an iteration count, as this can lead to an - * annoying delay on page load. - * - *

As with other network layouts, the network data can be updated - * dynamically, provided the property cache is reset. See - * {@link pv.Layout.Network} for details. New nodes are initialized with random - * positions near the center. Alternatively, positions can be specified manually - * by setting the x and y attributes on nodes. - * - * @extends pv.Layout.Network - * @see "Graph Drawing by Force-directed Placement" by T. Fruchterman & - * E. Reingold, Software--Practice & Experience, November 1991. - */ -pv.Layout.Force = function() { - pv.Layout.Network.call(this); - - /* Force-directed graphs can be messy, so reduce the link width. */ - this.link.lineWidth(function(d, p) { return Math.sqrt(p.linkValue) * 1.5; }); - this.label.textAlign("center"); -}; - -pv.Layout.Force.prototype = pv.extend(pv.Layout.Network) - .property("bound", Boolean) - .property("iterations", Number) - .property("dragConstant", Number) - .property("chargeConstant", Number) - .property("chargeMinDistance", Number) - .property("chargeMaxDistance", Number) - .property("chargeTheta", Number) - .property("springConstant", Number) - .property("springDamping", Number) - .property("springLength", Number); - -/** - * The bound parameter; true if nodes should be constrained within the layout - * panel. Bounding is disabled by default. Currently the layout does not observe - * the radius of the nodes; strictly speaking, only the center of the node is - * constrained to be within the panel, with an additional 6-pixel offset for - * padding. A future enhancement could extend the bound constraint to observe - * the node's radius, which would also support bounding for variable-size nodes. - * - *

Note that if this layout is used in conjunction with pan & zoom - * behaviors, those behaviors should have their bound parameter set to the same - * value. - * - * @type boolean - * @name pv.Layout.Force.prototype.bound - */ - -/** - * The number of simulation iterations to run, or null if this layout is - * interactive. Force-directed layouts are interactive by default, using a - * setInterval to advance the physics simulation and re-render - * automatically. - * - * @type number - * @name pv.Layout.Force.prototype.iterations - */ - -/** - * The drag constant, in the range [0,1]. A value of 0 means no drag (a - * perfectly frictionless environment), while a value of 1 means friction - * immediately cancels all momentum. The default value is 0.1, which provides a - * minimum amount of drag that helps stabilize bouncy springs; lower values may - * result in excessive bounciness, while higher values cause the simulation to - * take longer to converge. - * - * @type number - * @name pv.Layout.Force.prototype.dragConstant - * @see pv.Force.drag#constant - */ - -/** - * The charge constant, which should be a negative number. The default value is - * -40; more negative values will result in a stronger repulsive force, which - * may lead to faster convergence at the risk of instability. Too strong - * repulsive charge forces can cause comparatively weak springs to be stretched - * well beyond their rest length, emphasizing global structure over local - * structure. A nonnegative value will break the Fruchterman-Reingold algorithm, - * and is for entertainment purposes only. - * - * @type number - * @name pv.Layout.Force.prototype.chargeConstant - * @see pv.Force.charge#constant - */ - -/** - * The minimum distance at which charge forces are applied. The default minimum - * distance of 2 avoids applying forces that are two strong; because the physics - * simulation is run at discrete time intervals, it is possible for two same- - * charged particles to become very close or even a singularity! Since the - * charge force is inversely proportional to the square of the distance, very - * small distances can break the simulation. - * - *

In rare cases, two particles can become stuck on top of each other, as a - * minimum distance threshold will prevent the charge force from repelling them. - * However, this occurs very rarely because other forces and momentum typically - * cause the particles to become separated again, at which point the repulsive - * charge force kicks in. - * - * @type number - * @name pv.Layout.Force.prototype.chargeMinDistance - * @see pv.Force.charge#domain - */ - -/** - * The maximum distance at which charge forces are applied. This improves - * performance by ignoring weak charge forces at great distances. Note that this - * parameter is partly redundant, as the Barnes-Hut algorithm for n-body forces - * already improves performance for far-away particles through approximation. - * - * @type number - * @name pv.Layout.Force.prototype.chargeMaxDistance - * @see pv.Force.charge#domain - */ - -/** - * The Barnes-Hut approximation factor. The Barnes-Hut approximation criterion - * is the ratio of the size of the quadtree node to the distance from the point - * to the node's center of mass is beneath some threshold. The default value is - * 0.9. - * - * @type number - * @name pv.Layout.Force.prototype.chargeTheta - * @see pv.Force.charge#theta - */ - -/** - * The spring constant, which should be a positive number. The default value is - * 0.1; greater values will result in a stronger attractive force, which may - * lead to faster convergence at the risk of instability. Too strong spring - * forces can cause comparatively weak charge forces to be ignored, emphasizing - * local structure over global structure. A nonpositive value will break the - * Fruchterman-Reingold algorithm, and is for entertainment purposes only. - * - *

The spring tension is automatically normalized using the inverse square - * root of the maximum link degree of attached nodes. - * - * @type number - * @name pv.Layout.Force.prototype.springConstant - * @see pv.Force.spring#constant - */ - -/** - * The spring damping factor, in the range [0,1]. Damping functions identically - * to drag forces, damping spring bounciness by applying a force in the opposite - * direction of attached nodes' velocities. The default value is 0.3. - * - *

The spring damping is automatically normalized using the inverse square - * root of the maximum link degree of attached nodes. - * - * @type number - * @name pv.Layout.Force.prototype.springDamping - * @see pv.Force.spring#damping - */ - -/** - * The spring rest length. The default value is 20 pixels. Larger values may be - * appropriate if the layout panel is larger, or if the nodes are rendered - * larger than the default dot size of 20. - * - * @type number - * @name pv.Layout.Force.prototype.springLength - * @see pv.Force.spring#length - */ - -/** - * Default properties for force-directed layouts. The default drag constant is - * 0.1, the default charge constant is -40 (with a domain of [2, 500] and theta - * of 0.9), and the default spring constant is 0.1 (with a damping of 0.3 and a - * rest length of 20). - * - * @type pv.Layout.Force - */ -pv.Layout.Force.prototype.defaults = new pv.Layout.Force() - .extend(pv.Layout.Network.prototype.defaults) - .dragConstant(.1) - .chargeConstant(-40) - .chargeMinDistance(2) - .chargeMaxDistance(500) - .chargeTheta(.9) - .springConstant(.1) - .springDamping(.3) - .springLength(20); - -/** @private Initialize the physics simulation. */ -pv.Layout.Force.prototype.buildImplied = function(s) { - - /* Any cached interactive layouts need to be rebound for the timer. */ - if (pv.Layout.Network.prototype.buildImplied.call(this, s)) { - var f = s.$force; - if (f) { - f.next = this.binds.$force; - this.binds.$force = f; - } - return; - } - - var that = this, - nodes = s.nodes, - links = s.links, - k = s.iterations, - w = s.width, - h = s.height; - - /* Initialize positions randomly near the center. */ - for (var i = 0, n; i < nodes.length; i++) { - n = nodes[i]; - if (isNaN(n.x)) n.x = w / 2 + 40 * Math.random() - 20; - if (isNaN(n.y)) n.y = h / 2 + 40 * Math.random() - 20; - } - - /* Initialize the simulation. */ - var sim = pv.simulation(nodes); - - /* Drag force. */ - sim.force(pv.Force.drag(s.dragConstant)); - - /* Charge (repelling) force. */ - sim.force(pv.Force.charge(s.chargeConstant) - .domain(s.chargeMinDistance, s.chargeMaxDistance) - .theta(s.chargeTheta)); - - /* Spring (attracting) force. */ - sim.force(pv.Force.spring(s.springConstant) - .damping(s.springDamping) - .length(s.springLength) - .links(links)); - - /* Position constraint (for interactive dragging). */ - sim.constraint(pv.Constraint.position()); - - /* Optionally add bound constraint. TODO: better padding. */ - if (s.bound) { - sim.constraint(pv.Constraint.bound().x(6, w - 6).y(6, h - 6)); - } - - /** @private Returns the speed of the given node, to determine cooling. */ - function speed(n) { - return n.fix ? 1 : n.vx * n.vx + n.vy * n.vy; - } - - /* - * If the iterations property is null (the default), the layout is - * interactive. The simulation is run until the fastest particle drops below - * an arbitrary minimum speed. Although the timer keeps firing, this speed - * calculation is fast so there is minimal CPU overhead. Note: if a particle - * is fixed for interactivity, treat this as a high speed and resume - * simulation. - */ - if (k == null) { - sim.step(); // compute initial previous velocities - sim.step(); // compute initial velocities - - /* Add the simulation state to the bound list. */ - var force = s.$force = this.binds.$force = { - next: this.binds.$force, - nodes: nodes, - min: 1e-4 * (links.length + 1), - sim: sim - }; - - /* Start the timer, if not already started. */ - if (!this.$timer) this.$timer = setInterval(function() { - var render = false; - for (var f = that.binds.$force; f; f = f.next) { - if (pv.max(f.nodes, speed) > f.min) { - f.sim.step(); - render = true; - } - } - if (render) that.render(); - }, 42); - } else for (var i = 0; i < k; i++) { - sim.step(); - } -}; -/** - * Constructs a new, empty cluster layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a hierarchical layout using the cluster (or dendrogram) - * algorithm. This layout provides both node-link and space-filling - * implementations of cluster diagrams. In many ways it is similar to - * {@link pv.Layout.Partition}, except that leaf nodes are positioned at maximum - * depth, and the depth of internal nodes is based on their distance from their - * deepest descendant, rather than their distance from the root. - * - *

The cluster layout supports a "group" property, which if true causes - * siblings to be positioned closer together than unrelated nodes at the same - * depth. Unlike the partition layout, this layout does not support dynamic - * sizing for leaf nodes; all leaf nodes are the same size. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @see pv.Layout.Cluster.Fill - * @extends pv.Layout.Hierarchy - */ -pv.Layout.Cluster = function() { - pv.Layout.Hierarchy.call(this); - var interpolate, // cached interpolate - buildImplied = this.buildImplied; - - /** @private Cache layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - interpolate - = /^(top|bottom)$/.test(s.orient) ? "step-before" - : /^(left|right)$/.test(s.orient) ? "step-after" - : "linear"; - }; - - this.link.interpolate(function() { return interpolate; }); -}; - -pv.Layout.Cluster.prototype = pv.extend(pv.Layout.Hierarchy) - .property("group", Number) - .property("orient", String) - .property("innerRadius", Number) - .property("outerRadius", Number); - -/** - * The group parameter; defaults to 0, disabling grouping of siblings. If this - * parameter is set to a positive number (or true, which is equivalent to 1), - * then additional space will be allotted between sibling groups. In other - * words, siblings (nodes that share the same parent) will be positioned more - * closely than nodes at the same depth that do not share a parent. - * - * @type number - * @name pv.Layout.Cluster.prototype.group - */ - -/** - * The orientation. The default orientation is "top", which means that the root - * node is placed on the top edge, leaf nodes appear on the bottom edge, and - * internal nodes are in-between. The following orientations are supported:

    - * - *
  • left - left-to-right. - *
  • right - right-to-left. - *
  • top - top-to-bottom. - *
  • bottom - bottom-to-top. - *
  • radial - radially, with the root at the center.
- * - * @type string - * @name pv.Layout.Cluster.prototype.orient - */ - -/** - * The inner radius; defaults to 0. This property applies only to radial - * orientations, and can be used to compress the layout radially. Note that for - * the node-link implementation, the root node is always at the center, - * regardless of the value of this property; this property only affects internal - * and leaf nodes. For the space-filling implementation, a non-zero value of - * this property will result in the root node represented as a ring rather than - * a circle. - * - * @type number - * @name pv.Layout.Cluster.prototype.innerRadius - */ - -/** - * The outer radius; defaults to fill the containing panel, based on the height - * and width of the layout. If the layout has no height and width specified, it - * will extend to fill the enclosing panel. - * - * @type number - * @name pv.Layout.Cluster.prototype.outerRadius - */ - -/** - * Defaults for cluster layouts. The default group parameter is 0 and the - * default orientation is "top". - * - * @type pv.Layout.Cluster - */ -pv.Layout.Cluster.prototype.defaults = new pv.Layout.Cluster() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .group(0) - .orient("top"); - -/** @private */ -pv.Layout.Cluster.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var root = s.nodes[0], - group = s.group, - breadth, - depth, - leafCount = 0, - leafIndex = .5 - group / 2; - - /* Count the leaf nodes and compute the depth of descendants. */ - var p = undefined; - root.visitAfter(function(n) { - if (n.firstChild) { - n.depth = 1 + pv.max(n.childNodes, function(n) { return n.depth; }); - } else { - if (group && (p != n.parentNode)) { - p = n.parentNode; - leafCount += group; - } - leafCount++; - n.depth = 0; - } - }); - breadth = 1 / leafCount; - depth = 1 / root.depth; - - /* Compute the unit breadth and depth of each node. */ - var p = undefined; - root.visitAfter(function(n) { - if (n.firstChild) { - n.breadth = pv.mean(n.childNodes, function(n) { return n.breadth; }); - } else { - if (group && (p != n.parentNode)) { - p = n.parentNode; - leafIndex += group; - } - n.breadth = breadth * leafIndex++; - } - n.depth = 1 - n.depth * depth; - }); - - /* Compute breadth and depth ranges for space-filling layouts. */ - root.visitAfter(function(n) { - n.minBreadth = n.firstChild - ? n.firstChild.minBreadth - : (n.breadth - breadth / 2); - n.maxBreadth = n.firstChild - ? n.lastChild.maxBreadth - : (n.breadth + breadth / 2); - }); - root.visitBefore(function(n) { - n.minDepth = n.parentNode - ? n.parentNode.maxDepth - : 0; - n.maxDepth = n.parentNode - ? (n.depth + root.depth) - : (n.minDepth + 2 * root.depth); - }); - root.minDepth = -depth; - - pv.Layout.Hierarchy.NodeLink.buildImplied.call(this, s); -}; - -/** - * Constructs a new, empty space-filling cluster layout. Layouts are not - * typically constructed directly; instead, they are added to an existing panel - * via {@link pv.Mark#add}. - * - * @class A variant of cluster layout that is space-filling. The meaning of the - * exported mark prototypes changes slightly in the space-filling - * implementation:
    - * - *
  • node - for rendering nodes; typically a {@link pv.Bar} for - * non-radial orientations, and a {@link pv.Wedge} for radial orientations. - * - *

  • link - unsupported; undefined. Links are encoded implicitly - * in the arrangement of the space-filling nodes. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. - * - *
For more details on how to use this layout, see - * {@link pv.Layout.Cluster}. - * - * @extends pv.Layout.Cluster - */ -pv.Layout.Cluster.Fill = function() { - pv.Layout.Cluster.call(this); - pv.Layout.Hierarchy.Fill.constructor.call(this); -}; - -pv.Layout.Cluster.Fill.prototype = pv.extend(pv.Layout.Cluster); - -/** @private */ -pv.Layout.Cluster.Fill.prototype.buildImplied = function(s) { - if (pv.Layout.Cluster.prototype.buildImplied.call(this, s)) return; - pv.Layout.Hierarchy.Fill.buildImplied.call(this, s); -}; -/** - * Constructs a new, empty partition layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implemeents a hierarchical layout using the partition (or sunburst, - * icicle) algorithm. This layout provides both node-link and space-filling - * implementations of partition diagrams. In many ways it is similar to - * {@link pv.Layout.Cluster}, except that leaf nodes are positioned based on - * their distance from the root. - * - *

The partition layout support dynamic sizing for leaf nodes, if a - * {@link #size} psuedo-property is specified. The default size function returns - * 1, causing all leaf nodes to be sized equally, and all internal nodes to be - * sized by the number of leaf nodes they have as descendants. - * - *

The size function can be used in conjunction with the order property, - * which allows the nodes to the sorted by the computed size. Note: for sorting - * based on other data attributes, simply use the default null for the - * order property, and sort the nodes beforehand using the {@link pv.Dom} - * operator. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @see pv.Layout.Partition.Fill - * @extends pv.Layout.Hierarchy - */ -pv.Layout.Partition = function() { - pv.Layout.Hierarchy.call(this); -}; - -pv.Layout.Partition.prototype = pv.extend(pv.Layout.Hierarchy) - .property("order", String) // null, ascending, descending? - .property("orient", String) // top, left, right, bottom, radial - .property("innerRadius", Number) - .property("outerRadius", Number); - -/** - * The sibling node order. The default order is null, which means to - * use the sibling order specified by the nodes property as-is. A value of - * "ascending" will sort siblings in ascending order of size, while "descending" - * will do the reverse. For sorting based on data attributes other than size, - * use the default null for the order property, and sort the nodes - * beforehand using the {@link pv.Dom} operator. - * - * @see pv.Dom.Node#sort - * @type string - * @name pv.Layout.Partition.prototype.order - */ - -/** - * The orientation. The default orientation is "top", which means that the root - * node is placed on the top edge, leaf nodes appear at the bottom, and internal - * nodes are in-between. The following orientations are supported:

    - * - *
  • left - left-to-right. - *
  • right - right-to-left. - *
  • top - top-to-bottom. - *
  • bottom - bottom-to-top. - *
  • radial - radially, with the root at the center.
- * - * @type string - * @name pv.Layout.Partition.prototype.orient - */ - -/** - * The inner radius; defaults to 0. This property applies only to radial - * orientations, and can be used to compress the layout radially. Note that for - * the node-link implementation, the root node is always at the center, - * regardless of the value of this property; this property only affects internal - * and leaf nodes. For the space-filling implementation, a non-zero value of - * this property will result in the root node represented as a ring rather than - * a circle. - * - * @type number - * @name pv.Layout.Partition.prototype.innerRadius - */ - -/** - * The outer radius; defaults to fill the containing panel, based on the height - * and width of the layout. If the layout has no height and width specified, it - * will extend to fill the enclosing panel. - * - * @type number - * @name pv.Layout.Partition.prototype.outerRadius - */ - -/** - * Default properties for partition layouts. The default orientation is "top". - * - * @type pv.Layout.Partition - */ -pv.Layout.Partition.prototype.defaults = new pv.Layout.Partition() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .orient("top"); - -/** @private */ -pv.Layout.Partition.prototype.$size = function() { return 1; }; - -/** - * Specifies the sizing function. By default, a sizing function is disabled and - * all nodes are given constant size. The sizing function is invoked for each - * leaf node in the tree (passed to the constructor). - * - *

For example, if the tree data structure represents a file system, with - * files as leaf nodes, and each file has a bytes attribute, you can - * specify a size function as: - * - *

    .size(function(d) d.bytes)
- * - * As with other properties, a size function may specify additional arguments to - * access the data associated with the layout and any enclosing panels. - * - * @param {function} f the new sizing function. - * @returns {pv.Layout.Partition} this. - */ -pv.Layout.Partition.prototype.size = function(f) { - this.$size = f; - return this; -}; - -/** @private */ -pv.Layout.Partition.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var that = this, - root = s.nodes[0], - stack = pv.Mark.stack, - maxDepth = 0; - - /* Recursively compute the tree depth and node size. */ - stack.unshift(null); - root.visitAfter(function(n, i) { - if (i > maxDepth) maxDepth = i; - n.size = n.firstChild - ? pv.sum(n.childNodes, function(n) { return n.size; }) - : that.$size.apply(that, (stack[0] = n, stack)); - }); - stack.shift(); - - /* Order */ - switch (s.order) { - case "ascending": root.sort(function(a, b) { return a.size - b.size; }); break; - case "descending": root.sort(function(b, a) { return a.size - b.size; }); break; - } - - /* Compute the unit breadth and depth of each node. */ - var ds = 1 / maxDepth; - root.minBreadth = 0; - root.breadth = .5; - root.maxBreadth = 1; - root.visitBefore(function(n) { - var b = n.minBreadth, s = n.maxBreadth - b; - for (var c = n.firstChild; c; c = c.nextSibling) { - c.minBreadth = b; - c.maxBreadth = b += (c.size / n.size) * s; - c.breadth = (b + c.minBreadth) / 2; - } - }); - root.visitAfter(function(n, i) { - n.minDepth = (i - 1) * ds; - n.maxDepth = n.depth = i * ds; - }); - - pv.Layout.Hierarchy.NodeLink.buildImplied.call(this, s); -}; - -/** - * Constructs a new, empty space-filling partition layout. Layouts are not - * typically constructed directly; instead, they are added to an existing panel - * via {@link pv.Mark#add}. - * - * @class A variant of partition layout that is space-filling. The meaning of - * the exported mark prototypes changes slightly in the space-filling - * implementation:
    - * - *
  • node - for rendering nodes; typically a {@link pv.Bar} for - * non-radial orientations, and a {@link pv.Wedge} for radial orientations. - * - *

  • link - unsupported; undefined. Links are encoded implicitly - * in the arrangement of the space-filling nodes. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. - * - *
For more details on how to use this layout, see - * {@link pv.Layout.Partition}. - * - * @extends pv.Layout.Partition - */ -pv.Layout.Partition.Fill = function() { - pv.Layout.Partition.call(this); - pv.Layout.Hierarchy.Fill.constructor.call(this); -}; - -pv.Layout.Partition.Fill.prototype = pv.extend(pv.Layout.Partition); - -/** @private */ -pv.Layout.Partition.Fill.prototype.buildImplied = function(s) { - if (pv.Layout.Partition.prototype.buildImplied.call(this, s)) return; - pv.Layout.Hierarchy.Fill.buildImplied.call(this, s); -}; -/** - * Constructs a new, empty arc layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a layout for arc diagrams. An arc diagram is a network - * visualization with a one-dimensional layout of nodes, using circular arcs to - * render links between nodes. For undirected networks, arcs are rendering on a - * single side; this makes arc diagrams useful as annotations to other - * two-dimensional network layouts, such as rollup, matrix or table layouts. For - * directed networks, links in opposite directions can be rendered on opposite - * sides using directed(true). - * - *

Arc layouts are particularly sensitive to node ordering; for best results, - * order the nodes such that related nodes are close to each other. A poor - * (e.g., random) order may result in large arcs with crossovers that impede - * visual processing. A future improvement to this layout may include automatic - * reordering using, e.g., spectral graph layout or simulated annealing. - * - *

This visualization technique is related to that developed by - * M. Wattenberg, "Arc - * Diagrams: Visualizing Structure in Strings" in IEEE InfoVis, 2002. - * However, this implementation is limited to simple node-link networks, as - * opposed to structures with hierarchical self-similarity (such as strings). - * - *

As with other network layouts, three mark prototypes are provided:

    - * - *
  • node - for rendering nodes; typically a {@link pv.Dot}. - *
  • link - for rendering links; typically a {@link pv.Line}. - *
  • label - for rendering node labels; typically a {@link pv.Label}. - * - *
For more details on how this layout is structured and can be customized, - * see {@link pv.Layout.Network}. - * - * @extends pv.Layout.Network - **/ -pv.Layout.Arc = function() { - pv.Layout.Network.call(this); - var interpolate, // cached interpolate - directed, // cached directed - reverse, // cached reverse - buildImplied = this.buildImplied; - - /** @private Cache layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - directed = s.directed; - interpolate = s.orient == "radial" ? "linear" : "polar"; - reverse = s.orient == "right" || s.orient == "top"; - }; - - /* Override link properties to handle directedness and orientation. */ - this.link - .data(function(p) { - var s = p.sourceNode, t = p.targetNode; - return reverse != (directed || (s.breadth < t.breadth)) ? [s, t] : [t, s]; - }) - .interpolate(function() { return interpolate; }); -}; - -pv.Layout.Arc.prototype = pv.extend(pv.Layout.Network) - .property("orient", String) - .property("directed", Boolean); - -/** - * Default properties for arc layouts. By default, the orientation is "bottom". - * - * @type pv.Layout.Arc - */ -pv.Layout.Arc.prototype.defaults = new pv.Layout.Arc() - .extend(pv.Layout.Network.prototype.defaults) - .orient("bottom"); - -/** - * Specifies an optional sort function. The sort function follows the same - * comparator contract required by {@link pv.Dom.Node#sort}. Specifying a sort - * function provides an alternative to sort the nodes as they are specified by - * the nodes property; the main advantage of doing this is that the - * comparator function can access implicit fields populated by the network - * layout, such as the linkDegree. - * - *

Note that arc diagrams are particularly sensitive to order. This is - * referred to as the seriation problem, and many different techniques exist to - * find good node orders that emphasize clusters, such as spectral layout and - * simulated annealing. - * - * @param {function} f comparator function for nodes. - * @returns {pv.Layout.Arc} this. - */ -pv.Layout.Arc.prototype.sort = function(f) { - this.$sort = f; - return this; -}; - -/** @private Populates the x, y and angle attributes on the nodes. */ -pv.Layout.Arc.prototype.buildImplied = function(s) { - if (pv.Layout.Network.prototype.buildImplied.call(this, s)) return; - - var nodes = s.nodes, - orient = s.orient, - sort = this.$sort, - index = pv.range(nodes.length), - w = s.width, - h = s.height, - r = Math.min(w, h) / 2; - - /* Sort the nodes. */ - if (sort) index.sort(function(a, b) { return sort(nodes[a], nodes[b]); }); - - /** @private Returns the mid-angle, given the breadth. */ - function midAngle(b) { - switch (orient) { - case "top": return -Math.PI / 2; - case "bottom": return Math.PI / 2; - case "left": return Math.PI; - case "right": return 0; - case "radial": return (b - .25) * 2 * Math.PI; - } - } - - /** @private Returns the x-position, given the breadth. */ - function x(b) { - switch (orient) { - case "top": - case "bottom": return b * w; - case "left": return 0; - case "right": return w; - case "radial": return w / 2 + r * Math.cos(midAngle(b)); - } - } - - /** @private Returns the y-position, given the breadth. */ - function y(b) { - switch (orient) { - case "top": return 0; - case "bottom": return h; - case "left": - case "right": return b * h; - case "radial": return h / 2 + r * Math.sin(midAngle(b)); - } - } - - /* Populate the x, y and mid-angle attributes. */ - for (var i = 0; i < nodes.length; i++) { - var n = nodes[index[i]], b = n.breadth = (i + .5) / nodes.length; - n.x = x(b); - n.y = y(b); - n.midAngle = midAngle(b); - } -}; - -/** - * The orientation. The default orientation is "left", which means that nodes - * will be positioned from left-to-right in the order they are specified in the - * nodes property. The following orientations are supported:

    - * - *
  • left - left-to-right. - *
  • right - right-to-left. - *
  • top - top-to-bottom. - *
  • bottom - bottom-to-top. - *
  • radial - radially, starting at 12 o'clock and proceeding clockwise.
- * - * @type string - * @name pv.Layout.Arc.prototype.orient - */ - -/** - * Whether this arc digram is directed (bidirectional); only applies to - * non-radial orientations. By default, arc digrams are undirected, such that - * all arcs appear on one side. If the arc digram is directed, then forward - * links are drawn on the conventional side (the same as as undirected - * links--right, left, bottom and top for left, right, top and bottom, - * respectively), while reverse links are drawn on the opposite side. - * - * @type boolean - * @name pv.Layout.Arc.prototype.directed - */ -/** - * Constructs a new, empty horizon layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a horizon layout, which is a variation of a single-series - * area chart where the area is folded into multiple bands. Color is used to - * encode band, allowing the size of the chart to be reduced significantly - * without impeding readability. This layout algorithm is based on the work of - * J. Heer, N. Kong and M. Agrawala in "Sizing - * the Horizon: The Effects of Chart Size and Layering on the Graphical - * Perception of Time Series Visualizations", CHI 2009. - * - *

This layout exports a single band mark prototype, which is - * intended to be used with an area mark. The band mark is contained in a panel - * which is replicated per band (and for negative/positive bands). For example, - * to create a simple horizon graph given an array of numbers: - * - *

vis.add(pv.Layout.Horizon)
- *     .bands(n)
- *   .band.add(pv.Area)
- *     .data(data)
- *     .left(function() this.index * 35)
- *     .height(function(d) d * 40);
- * - * The layout can be further customized by changing the number of bands, and - * toggling whether the negative bands are mirrored or offset. (See the - * above-referenced paper for guidance.) - * - *

The fillStyle of the area can be overridden, though typically it - * is easier to customize the layout's behavior through the custom - * backgroundStyle, positiveStyle and negativeStyle - * properties. By default, the background is white, positive bands are blue, and - * negative bands are red. For the most accurate presentation, use fully-opaque - * colors of equal intensity for the negative and positive bands. - * - * @extends pv.Layout - */ -pv.Layout.Horizon = function() { - pv.Layout.call(this); - var that = this, - bands, // cached bands - mode, // cached mode - size, // cached height - fill, // cached background style - red, // cached negative color (ramp) - blue, // cached positive color (ramp) - buildImplied = this.buildImplied; - - /** @private Cache the layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - bands = s.bands; - mode = s.mode; - size = Math.round((mode == "color" ? .5 : 1) * s.height); - fill = s.backgroundStyle; - red = pv.ramp(fill, s.negativeStyle).domain(0, bands); - blue = pv.ramp(fill, s.positiveStyle).domain(0, bands); - }; - - var bands = new pv.Panel() - .data(function() { return pv.range(bands * 2); }) - .overflow("hidden") - .height(function() { return size; }) - .top(function(i) { return mode == "color" ? (i & 1) * size : 0; }) - .fillStyle(function(i) { return i ? null : fill; }); - - /** - * The band prototype. This prototype is intended to be used with an Area - * mark to render the horizon bands. - * - * @type pv.Mark - * @name pv.Layout.Horizon.prototype.band - */ - this.band = new pv.Mark() - .top(function(d, i) { - return mode == "mirror" && i & 1 - ? (i + 1 >> 1) * size - : null; - }) - .bottom(function(d, i) { - return mode == "mirror" - ? (i & 1 ? null : (i + 1 >> 1) * -size) - : ((i & 1 || -1) * (i + 1 >> 1) * size); - }) - .fillStyle(function(d, i) { - return (i & 1 ? red : blue)((i >> 1) + 1); - }); - - this.band.add = function(type) { - return that.add(pv.Panel).extend(bands).add(type).extend(this); - }; -}; - -pv.Layout.Horizon.prototype = pv.extend(pv.Layout) - .property("bands", Number) - .property("mode", String) - .property("backgroundStyle", pv.color) - .property("positiveStyle", pv.color) - .property("negativeStyle", pv.color); - -/** - * Default properties for horizon layouts. By default, there are two bands, the - * mode is "offset", the background style is "white", the positive style is - * blue, negative style is red. - * - * @type pv.Layout.Horizon - */ -pv.Layout.Horizon.prototype.defaults = new pv.Layout.Horizon() - .extend(pv.Layout.prototype.defaults) - .bands(2) - .mode("offset") - .backgroundStyle("white") - .positiveStyle("#1f77b4") - .negativeStyle("#d62728"); - -/** - * The horizon mode: offset, mirror, or color. The default is "offset". - * - * @type string - * @name pv.Layout.Horizon.prototype.mode - */ - -/** - * The number of bands. Must be at least one. The default value is two. - * - * @type number - * @name pv.Layout.Horizon.prototype.bands - */ - -/** - * The positive band color; if non-null, the interior of positive bands are - * filled with the specified color. The default value of this property is blue. - * For accurate blending, this color should be fully opaque. - * - * @type pv.Color - * @name pv.Layout.Horizon.prototype.positiveStyle - */ - -/** - * The negative band color; if non-null, the interior of negative bands are - * filled with the specified color. The default value of this property is red. - * For accurate blending, this color should be fully opaque. - * - * @type pv.Color - * @name pv.Layout.Horizon.prototype.negativeStyle - */ - -/** - * The background color. The panel background is filled with the specified - * color, and the negative and positive bands are filled with an interpolated - * color between this color and the respective band color. The default value of - * this property is white. For accurate blending, this color should be fully - * opaque. - * - * @type pv.Color - * @name pv.Layout.Horizon.prototype.backgroundStyle - */ -/** - * Constructs a new, empty rollup network layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a network visualization using a node-link diagram where - * nodes are rolled up along two dimensions. This implementation is based on the - * "PivotGraph" designed by Martin Wattenberg: - * - *

The method is designed for graphs that are "multivariate", i.e., - * where each node is associated with several attributes. Unlike visualizations - * which emphasize global graph topology, PivotGraph uses a simple grid-based - * approach to focus on the relationship between node attributes & - * connections.
- * - * This layout requires two psuedo-properties to be specified, which assign node - * positions along the two dimensions {@link #x} and {@link #y}, corresponding - * to the left and top properties, respectively. Typically, these functions are - * specified using an {@link pv.Scale.ordinal}. Nodes that share the same - * position in x and y are "rolled up" into a meta-node, and - * similarly links are aggregated between meta-nodes. For example, to construct - * a rollup to analyze links by gender and affiliation, first define two ordinal - * scales: - * - *
var x = pv.Scale.ordinal(nodes, function(d) d.gender).split(0, w),
- *     y = pv.Scale.ordinal(nodes, function(d) d.aff).split(0, h);
- * - * Next, define the position psuedo-properties: - * - *
    .x(function(d) x(d.gender))
- *     .y(function(d) y(d.aff))
- * - * Linear and other quantitative scales can alternatively be used to position - * the nodes along either dimension. Note, however, that the rollup requires - * that the positions match exactly, and thus ordinal scales are recommended to - * avoid precision errors. - * - *

Note that because this layout provides a visualization of the rolled up - * graph, the data properties for the mark prototypes (node, - * link and label) are different from most other network - * layouts: they reference the rolled-up nodes and links, rather than the nodes - * and links of the full network. The underlying nodes and links for each - * rolled-up node and link can be accessed via the nodes and - * links attributes, respectively. The aggregated link values for - * rolled-up links can similarly be accessed via the linkValue - * attribute. - * - *

For undirected networks, links are duplicated in both directions. For - * directed networks, use directed(true). The graph is assumed to be - * undirected by default. - * - * @extends pv.Layout.Network - * @see "Visual Exploration of Multivariate Graphs" by M. Wattenberg, CHI 2006. - */ -pv.Layout.Rollup = function() { - pv.Layout.Network.call(this); - var that = this, - nodes, // cached rollup nodes - links, // cached rollup links - buildImplied = that.buildImplied; - - /** @private Cache layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - nodes = s.$rollup.nodes; - links = s.$rollup.links; - }; - - /* Render rollup nodes. */ - this.node - .data(function() { return nodes; }) - .size(function(d) { return d.nodes.length * 20; }); - - /* Render rollup links. */ - this.link - .interpolate("polar") - .eccentricity(.8); - - this.link.add = function(type) { - return that.add(pv.Panel) - .data(function() { return links; }) - .add(type) - .extend(this); - }; -}; - -pv.Layout.Rollup.prototype = pv.extend(pv.Layout.Network) - .property("directed", Boolean); - -/** - * Whether the underlying network is directed. By default, the graph is assumed - * to be undirected, and links are rendered in both directions. If the network - * is directed, then forward links are drawn above the diagonal, while reverse - * links are drawn below. - * - * @type boolean - * @name pv.Layout.Rollup.prototype.directed - */ - -/** - * Specifies the x-position function used to rollup nodes. The rolled up - * nodes are positioned horizontally using the return values from the given - * function. Typically the function is specified as an ordinal scale. For - * single-dimension rollups, a constant value can be specified. - * - * @param {function} f the x-position function. - * @returns {pv.Layout.Rollup} this. - * @see pv.Scale.ordinal - */ -pv.Layout.Rollup.prototype.x = function(f) { - this.$x = pv.functor(f); - return this; -}; - -/** - * Specifies the y-position function used to rollup nodes. The rolled up - * nodes are positioned vertically using the return values from the given - * function. Typically the function is specified as an ordinal scale. For - * single-dimension rollups, a constant value can be specified. - * - * @param {function} f the y-position function. - * @returns {pv.Layout.Rollup} this. - * @see pv.Scale.ordinal - */ -pv.Layout.Rollup.prototype.y = function(f) { - this.$y = pv.functor(f); - return this; -}; - -/** @private */ -pv.Layout.Rollup.prototype.buildImplied = function(s) { - if (pv.Layout.Network.prototype.buildImplied.call(this, s)) return; - - var nodes = s.nodes, - links = s.links, - directed = s.directed, - n = nodes.length, - x = [], - y = [], - rnindex = 0, - rnodes = {}, - rlinks = {}; - - /** @private */ - function id(i) { - return x[i] + "," + y[i]; - } - - /* Iterate over the data, evaluating the x and y functions. */ - var stack = pv.Mark.stack, o = {parent: this}; - stack.unshift(null); - for (var i = 0; i < n; i++) { - o.index = i; - stack[0] = nodes[i]; - x[i] = this.$x.apply(o, stack); - y[i] = this.$y.apply(o, stack); - } - stack.shift(); - - /* Compute rollup nodes. */ - for (var i = 0; i < nodes.length; i++) { - var nodeId = id(i), - rn = rnodes[nodeId]; - if (!rn) { - rn = rnodes[nodeId] = pv.extend(nodes[i]); - rn.index = rnindex++; - rn.x = x[i]; - rn.y = y[i]; - rn.nodes = []; - } - rn.nodes.push(nodes[i]); - } - - /* Compute rollup links. */ - for (var i = 0; i < links.length; i++) { - var source = links[i].sourceNode, - target = links[i].targetNode, - rsource = rnodes[id(source.index)], - rtarget = rnodes[id(target.index)], - reverse = !directed && rsource.index > rtarget.index, - linkId = reverse - ? rtarget.index + "," + rsource.index - : rsource.index + "," + rtarget.index, - rl = rlinks[linkId]; - if (!rl) { - rl = rlinks[linkId] = { - sourceNode: rsource, - targetNode: rtarget, - linkValue: 0, - links: [] - }; - } - rl.links.push(links[i]); - rl.linkValue += links[i].linkValue; - } - - /* Export the rolled up nodes and links to the scene. */ - s.$rollup = { - nodes: pv.values(rnodes), - links: pv.values(rlinks) - }; -}; -/** - * Constructs a new, empty matrix network layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a network visualization using a matrix view. This is, in - * effect, a visualization of the graph's adjacency matrix: the cell at - * row i, column j, corresponds to the link from node i to - * node j. The fill color of each cell is binary by default, and - * corresponds to whether a link exists between the two nodes. If the underlying - * graph has links with variable values, the fillStyle property can be - * substited to use an appropriate color function, such as {@link pv.ramp}. - * - *

For undirected networks, the matrix is symmetric around the diagonal. For - * directed networks, links in opposite directions can be rendered on opposite - * sides of the diagonal using directed(true). The graph is assumed to - * be undirected by default. - * - *

The mark prototypes for this network layout are slightly different than - * other implementations:

    - * - *
  • node - unsupported; undefined. No mark is needed to visualize - * nodes directly, as the nodes are implicit in the location (rows and columns) - * of the links. - * - *

  • link - for rendering links; typically a {@link pv.Bar}. The - * link mark is added directly to the layout, with the data property defined as - * all possible pairs of nodes. Each pair is represented as a - * {@link pv.Network.Layout.Link}, though the linkValue attribute may - * be 0 if no link exists in the graph. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. The label mark is added directly to the layout, with the - * data property defined via the layout's nodes property; note, - * however, that the nodes are duplicated so as to provide a label across the - * top and down the side. Properties such as strokeStyle and - * fillStyle can be overridden to compute properties from node data - * dynamically. - * - *
For more details on how to use this layout, see - * {@link pv.Layout.Network}. - * - * @extends pv.Layout.Network - */ -pv.Layout.Matrix = function() { - pv.Layout.Network.call(this); - var that = this, - n, // cached matrix size - dx, // cached cell width - dy, // cached cell height - labels, // cached labels (array of strings) - pairs, // cached pairs (array of links) - buildImplied = that.buildImplied; - - /** @private Cache layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - n = s.nodes.length; - dx = s.width / n; - dy = s.height / n; - labels = s.$matrix.labels; - pairs = s.$matrix.pairs; - }; - - /* Links are all pairs of nodes. */ - this.link - .data(function() { return pairs; }) - .left(function() { return dx * (this.index % n); }) - .top(function() { return dy * Math.floor(this.index / n); }) - .width(function() { return dx; }) - .height(function() { return dy; }) - .lineWidth(1.5) - .strokeStyle("#fff") - .fillStyle(function(l) { return l.linkValue ? "#555" : "#eee"; }) - .parent = this; - - /* No special add for links! */ - delete this.link.add; - - /* Labels are duplicated for top & left. */ - this.label - .data(function() { return labels; }) - .left(function() { return this.index & 1 ? dx * ((this.index >> 1) + .5) : null; }) - .top(function() { return this.index & 1 ? null : dy * ((this.index >> 1) + .5); }) - .textMargin(4) - .textAlign(function() { return this.index & 1 ? "left" : "right"; }) - .textAngle(function() { return this.index & 1 ? -Math.PI / 2 : 0; }); - - /* The node mark is unused. */ - delete this.node; -}; - -pv.Layout.Matrix.prototype = pv.extend(pv.Layout.Network) - .property("directed", Boolean); - -/** - * Whether this matrix visualization is directed (bidirectional). By default, - * the graph is assumed to be undirected, such that the visualization is - * symmetric across the matrix diagonal. If the network is directed, then - * forward links are drawn above the diagonal, while reverse links are drawn - * below. - * - * @type boolean - * @name pv.Layout.Matrix.prototype.directed - */ - -/** - * Specifies an optional sort function. The sort function follows the same - * comparator contract required by {@link pv.Dom.Node#sort}. Specifying a sort - * function provides an alternative to sort the nodes as they are specified by - * the nodes property; the main advantage of doing this is that the - * comparator function can access implicit fields populated by the network - * layout, such as the linkDegree. - * - *

Note that matrix visualizations are particularly sensitive to order. This - * is referred to as the seriation problem, and many different techniques exist - * to find good node orders that emphasize clusters, such as spectral layout and - * simulated annealing. - * - * @param {function} f comparator function for nodes. - * @returns {pv.Layout.Matrix} this. - */ -pv.Layout.Matrix.prototype.sort = function(f) { - this.$sort = f; - return this; -}; - -/** @private */ -pv.Layout.Matrix.prototype.buildImplied = function(s) { - if (pv.Layout.Network.prototype.buildImplied.call(this, s)) return; - - var nodes = s.nodes, - links = s.links, - sort = this.$sort, - n = nodes.length, - index = pv.range(n), - labels = [], - pairs = [], - map = {}; - - s.$matrix = {labels: labels, pairs: pairs}; - - /* Sort the nodes. */ - if (sort) index.sort(function(a, b) { return sort(nodes[a], nodes[b]); }); - - /* Create pairs. */ - for (var i = 0; i < n; i++) { - for (var j = 0; j < n; j++) { - var a = index[i], - b = index[j], - p = { - row: i, - col: j, - sourceNode: nodes[a], - targetNode: nodes[b], - linkValue: 0 - }; - pairs.push(map[a + "." + b] = p); - } - } - - /* Create labels. */ - for (var i = 0; i < n; i++) { - var a = index[i]; - labels.push(nodes[a], nodes[a]); - } - - /* Accumulate link values. */ - for (var i = 0; i < links.length; i++) { - var l = links[i], - source = l.sourceNode.index, - target = l.targetNode.index, - value = l.linkValue; - map[source + "." + target].linkValue += value; - if (!s.directed) map[target + "." + source].linkValue += value; - } -}; -// ranges (bad, satisfactory, good) -// measures (actual, forecast) -// markers (previous, goal) - -/* - * Chart design based on the recommendations of Stephen Few. Implementation - * based on the work of Clint Ivy, Jamie Love, and Jason Davies. - * http://projects.instantcognition.com/protovis/bulletchart/ - */ - -/** - * Constructs a new, empty bullet layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class - * @extends pv.Layout - */ -pv.Layout.Bullet = function() { - pv.Layout.call(this); - var that = this, - buildImplied = that.buildImplied, - scale = that.x = pv.Scale.linear(), - orient, - horizontal, - rangeColor, - measureColor, - x; - - /** @private Cache layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, x = s); - orient = s.orient; - horizontal = /^left|right$/.test(orient); - rangeColor = pv.ramp("#bbb", "#eee") - .domain(0, Math.max(1, x.ranges.length - 1)); - measureColor = pv.ramp("steelblue", "lightsteelblue") - .domain(0, Math.max(1, x.measures.length - 1)); - }; - - /** - * The range prototype. - * - * @type pv.Mark - * @name pv.Layout.Bullet.prototype.range - */ - (this.range = new pv.Mark()) - .data(function() { return x.ranges; }) - .reverse(true) - .left(function() { return orient == "left" ? 0 : null; }) - .top(function() { return orient == "top" ? 0 : null; }) - .right(function() { return orient == "right" ? 0 : null; }) - .bottom(function() { return orient == "bottom" ? 0 : null; }) - .width(function(d) { return horizontal ? scale(d) : null; }) - .height(function(d) { return horizontal ? null : scale(d); }) - .fillStyle(function() { return rangeColor(this.index); }) - .antialias(false) - .parent = that; - - /** - * The measure prototype. - * - * @type pv.Mark - * @name pv.Layout.Bullet.prototype.measure - */ - (this.measure = new pv.Mark()) - .extend(this.range) - .data(function() { return x.measures; }) - .left(function() { return orient == "left" ? 0 : horizontal ? null : this.parent.width() / 3.25; }) - .top(function() { return orient == "top" ? 0 : horizontal ? this.parent.height() / 3.25 : null; }) - .right(function() { return orient == "right" ? 0 : horizontal ? null : this.parent.width() / 3.25; }) - .bottom(function() { return orient == "bottom" ? 0 : horizontal ? this.parent.height() / 3.25 : null; }) - .fillStyle(function() { return measureColor(this.index); }) - .parent = that; - - /** - * The marker prototype. - * - * @type pv.Mark - * @name pv.Layout.Bullet.prototype.marker - */ - (this.marker = new pv.Mark()) - .data(function() { return x.markers; }) - .left(function(d) { return orient == "left" ? scale(d) : horizontal ? null : this.parent.width() / 2; }) - .top(function(d) { return orient == "top" ? scale(d) : horizontal ? this.parent.height() / 2 : null; }) - .right(function(d) { return orient == "right" ? scale(d) : null; }) - .bottom(function(d) { return orient == "bottom" ? scale(d) : null; }) - .strokeStyle("black") - .shape("bar") - .angle(function() { return horizontal ? 0 : Math.PI / 2; }) - .parent = that; - - (this.tick = new pv.Mark()) - .data(function() { return scale.ticks(7); }) - .left(function(d) { return orient == "left" ? scale(d) : null; }) - .top(function(d) { return orient == "top" ? scale(d) : null; }) - .right(function(d) { return orient == "right" ? scale(d) : horizontal ? null : -6; }) - .bottom(function(d) { return orient == "bottom" ? scale(d) : horizontal ? -8 : null; }) - .height(function() { return horizontal ? 6 : null; }) - .width(function() { return horizontal ? null : 6; }) - .parent = that; -}; - -pv.Layout.Bullet.prototype = pv.extend(pv.Layout) - .property("orient", String) // left, right, top, bottom - .property("ranges") - .property("markers") - .property("measures") - .property("maximum", Number); - -/** - * Default properties for bullet layouts. - * - * @type pv.Layout.Bullet - */ -pv.Layout.Bullet.prototype.defaults = new pv.Layout.Bullet() - .extend(pv.Layout.prototype.defaults) - .orient("left") - .ranges([]) - .markers([]) - .measures([]); - -/** - * The orientation. - * - * @type string - * @name pv.Layout.Bullet.prototype.orient - */ - -/** - * The array of range values. - * - * @type array - * @name pv.Layout.Bullet.prototype.ranges - */ - -/** - * The array of marker values. - * - * @type array - * @name pv.Layout.Bullet.prototype.markers - */ - -/** - * The array of measure values. - * - * @type array - * @name pv.Layout.Bullet.prototype.measures - */ - -/** - * Optional; the maximum range value. - * - * @type number - * @name pv.Layout.Bullet.prototype.maximum - */ - -/** @private */ -pv.Layout.Bullet.prototype.buildImplied = function(s) { - pv.Layout.prototype.buildImplied.call(this, s); - var size = this.parent[/^left|right$/.test(s.orient) ? "width" : "height"](); - s.maximum = s.maximum || pv.max([].concat(s.ranges, s.markers, s.measures)); - this.x.domain(0, s.maximum).range(0, size); -}; -/** - * Abstract; see an implementing class for details. - * - * @class Represents a reusable interaction; applies an interactive behavior to - * a given mark. Behaviors are themselves functions designed to be used as event - * handlers. For example, to add pan and zoom support to any panel, say: - * - *

    .event("mousedown", pv.Behavior.pan())
- *     .event("mousewheel", pv.Behavior.zoom())
- * - * The behavior should be registered on the event that triggers the start of the - * behavior. Typically, the behavior will take care of registering for any - * additional events that are necessary. For example, dragging starts on - * mousedown, while the drag behavior automatically listens for mousemove and - * mouseup events on the window. By listening to the window, the behavior can - * continue to receive mouse events even if the mouse briefly leaves the mark - * being dragged, or even the root panel. - * - *

Each behavior implementation has specific requirements as to which events - * it supports, and how it should be used. For example, the drag behavior - * requires that the data associated with the mark be an object with x - * and y attributes, such as a {@link pv.Vector}, storing the mark's - * position. See an implementing class for details. - * - * @see pv.Behavior.drag - * @see pv.Behavior.pan - * @see pv.Behavior.point - * @see pv.Behavior.select - * @see pv.Behavior.zoom - * @extends function - */ -pv.Behavior = {}; -/** - * Returns a new drag behavior to be registered on mousedown events. - * - * @class Implements interactive dragging starting with mousedown events. - * Register this behavior on marks that should be draggable by the user, such as - * the selected region for brushing and linking. This behavior can be used in - * tandom with {@link pv.Behavior.select} to allow the selected region to be - * dragged interactively. - * - *

After the initial mousedown event is triggered, this behavior listens for - * mousemove and mouseup events on the window. This allows dragging to continue - * even if the mouse temporarily leaves the mark that is being dragged, or even - * the root panel. - * - *

This behavior requires that the data associated with the mark being - * dragged have x and y attributes that correspond to the - * mark's location in pixels. The mark's positional properties are not set - * directly by this behavior; instead, the positional properties should be - * defined as: - * - *

    .left(function(d) d.x)
- *     .top(function(d) d.y)
- * - * Thus, the behavior does not move the mark directly, but instead updates the - * mark position by updating the underlying data. Note that if the positional - * properties are defined with bottom and right (rather than top and left), the - * drag behavior will be inverted, which will confuse users! - * - *

The drag behavior is bounded by the parent panel; the x and - * y attributes are clamped such that the mark being dragged does not - * extend outside the enclosing panel's bounds. To facilitate this, the drag - * behavior also queries for dx and dy attributes on the - * underlying data, to determine the dimensions of the bar being dragged. For - * non-rectangular marks, the drag behavior simply treats the mark as a point, - * which means that only the mark's center is bounded. - * - *

The mark being dragged is automatically re-rendered for each mouse event - * as part of the drag operation. In addition, a fix attribute is - * populated on the mark, which allows visual feedback for dragging. For - * example, to change the mark fill color while dragging: - * - *

    .fillStyle(function(d) d.fix ? "#ff7f0e" : "#aec7e8")
- * - * In some cases, such as with network layouts, dragging the mark may cause - * related marks to change, in which case additional marks may also need to be - * rendered. This can be accomplished by listening for the drag - * psuedo-events:
    - * - *
  • dragstart (on mousedown) - *
  • drag (on mousemove) - *
  • dragend (on mouseup) - * - *
For example, to render the parent panel while dragging, thus - * re-rendering all sibling marks: - * - *
    .event("mousedown", pv.Behavior.drag())
- *     .event("drag", function() this.parent)
- * - * This behavior may be enhanced in the future to allow more flexible - * configuration of drag behavior. - * - * @extends pv.Behavior - * @see pv.Behavior - * @see pv.Behavior.select - * @see pv.Layout.force - */ -pv.Behavior.drag = function() { - var scene, // scene context - index, // scene context - p, // particle being dragged - v1, // initial mouse-particle offset - max; - - /** @private */ - function mousedown(d) { - index = this.index; - scene = this.scene; - var m = this.mouse(); - v1 = ((p = d).fix = pv.vector(d.x, d.y)).minus(m); - max = { - x: this.parent.width() - (d.dx || 0), - y: this.parent.height() - (d.dy || 0) - }; - scene.mark.context(scene, index, function() { this.render(); }); - pv.Mark.dispatch("dragstart", scene, index); - } - - /** @private */ - function mousemove() { - if (!scene) return; - scene.mark.context(scene, index, function() { - var m = this.mouse(); - p.x = p.fix.x = Math.max(0, Math.min(v1.x + m.x, max.x)); - p.y = p.fix.y = Math.max(0, Math.min(v1.y + m.y, max.y)); - this.render(); - }); - pv.Mark.dispatch("drag", scene, index); - } - - /** @private */ - function mouseup() { - if (!scene) return; - p.fix = null; - scene.mark.context(scene, index, function() { this.render(); }); - pv.Mark.dispatch("dragend", scene, index); - scene = null; - } - - pv.listen(window, "mousemove", mousemove); - pv.listen(window, "mouseup", mouseup); - return mousedown; -}; -/** - * Returns a new point behavior to be registered on mousemove events. - * - * @class Implements interactive fuzzy pointing, identifying marks that are in - * close proximity to the mouse cursor. This behavior is an alternative to the - * native mouseover and mouseout events, improving usability. Rather than - * requiring the user to mouseover a mark exactly, the mouse simply needs to - * move near the given mark and a "point" event is triggered. In addition, if - * multiple marks overlap, the point behavior can be used to identify the mark - * instance closest to the cursor, as opposed to the one that is rendered on - * top. - * - *

The point behavior can also identify the closest mark instance for marks - * that produce a continuous graphic primitive. The point behavior can thus be - * used to provide details-on-demand for both discrete marks (such as dots and - * bars), as well as continuous marks (such as lines and areas). - * - *

This behavior is implemented by finding the closest mark instance to the - * mouse cursor on every mousemove event. If this closest mark is within the - * given radius threshold, which defaults to 30 pixels, a "point" psuedo-event - * is dispatched to the given mark instance. If any mark were previously - * pointed, it would receive a corresponding "unpoint" event. These two - * psuedo-event types correspond to the native "mouseover" and "mouseout" - * events, respectively. To increase the radius at which the point behavior can - * be applied, specify an appropriate threshold to the constructor, up to - * Infinity. - * - *

By default, the standard Cartesian distance is computed. However, with - * some visualizations it is desirable to consider only a single dimension, such - * as the x-dimension for an independent variable. In this case, the - * collapse parameter can be set to collapse the y dimension: - * - *

    .event("mousemove", pv.Behavior.point(Infinity).collapse("y"))
- * - *

This behavior only listens to mousemove events on the assigned panel, - * which is typically the root panel. The behavior will search recursively for - * descendant marks to point. If the mouse leaves the assigned panel, the - * behavior no longer receives mousemove events; an unpoint psuedo-event is - * automatically dispatched to unpoint any pointed mark. Marks may be re-pointed - * when the mouse reenters the panel. - * - *

Panels have transparent fill styles by default; this means that panels may - * not receive the initial mousemove event to start pointing. To fix this - * problem, either given the panel a visible fill style (such as "white"), or - * set the events property to "all" such that the panel receives events - * despite its transparent fill. - * - *

Note: this behavior does not currently wedge marks. - * - * @extends pv.Behavior - * - * @param {number} [r] the fuzzy radius threshold in pixels - * @see "The Bubble Cursor: Enhancing Target Acquisition by Dynamic Resizing of the - * Cursor's Activation Area" by T. Grossman & R. Balakrishnan, CHI 2005. - */ -pv.Behavior.point = function(r) { - var unpoint, // the current pointer target - collapse = null, // dimensions to collapse - kx = 1, // x-dimension cost scale - ky = 1, // y-dimension cost scale - r2 = arguments.length ? r * r : 900; // fuzzy radius - - /** @private Search for the mark closest to the mouse. */ - function search(scene, index) { - var s = scene[index], - point = {cost: Infinity}; - for (var i = 0, n = s.visible && s.children.length; i < n; i++) { - var child = s.children[i], mark = child.mark, p; - if (mark.type == "panel") { - mark.scene = child; - for (var j = 0, m = child.length; j < m; j++) { - mark.index = j; - p = search(child, j); - if (p.cost < point.cost) point = p; - } - delete mark.scene; - delete mark.index; - } else if (mark.$handlers.point) { - var v = mark.mouse(); - for (var j = 0, m = child.length; j < m; j++) { - var c = child[j], - dx = v.x - c.left - (c.width || 0) / 2, - dy = v.y - c.top - (c.height || 0) / 2, - dd = kx * dx * dx + ky * dy * dy; - if (dd < point.cost) { - point.distance = dx * dx + dy * dy; - point.cost = dd; - point.scene = child; - point.index = j; - } - } - } - } - return point; - } - - /** @private */ - function mousemove() { - /* If the closest mark is far away, clear the current target. */ - var point = search(this.scene, this.index); - if ((point.cost == Infinity) || (point.distance > r2)) point = null; - - /* Unpoint the old target, if it's not the new target. */ - if (unpoint) { - if (point - && (unpoint.scene == point.scene) - && (unpoint.index == point.index)) return; - pv.Mark.dispatch("unpoint", unpoint.scene, unpoint.index); - } - - /* Point the new target, if there is one. */ - if (unpoint = point) { - pv.Mark.dispatch("point", point.scene, point.index); - - /* Unpoint when the mouse leaves the root panel. */ - pv.listen(this.root.canvas(), "mouseout", mouseout); - } - } - - /** @private */ - function mouseout(e) { - if (unpoint && !pv.ancestor(this, e.relatedTarget)) { - pv.Mark.dispatch("unpoint", unpoint.scene, unpoint.index); - unpoint = null; - } - } - - /** - * Sets or gets the collapse parameter. By default, the standard Cartesian - * distance is computed. However, with some visualizations it is desirable to - * consider only a single dimension, such as the x-dimension for an - * independent variable. In this case, the collapse parameter can be set to - * collapse the y dimension: - * - *

    .event("mousemove", pv.Behavior.point(Infinity).collapse("y"))
- * - * @function - * @returns {pv.Behavior.point} this, or the current collapse parameter. - * @name pv.Behavior.point.prototype.collapse - * @param {string} [x] the new collapse parameter - */ - mousemove.collapse = function(x) { - if (arguments.length) { - collapse = String(x); - switch (collapse) { - case "y": kx = 1; ky = 0; break; - case "x": kx = 0; ky = 1; break; - default: kx = 1; ky = 1; break; - } - return mousemove; - } - return collapse; - }; - - return mousemove; -}; -/** - * Returns a new select behavior to be registered on mousedown events. - * - * @class Implements interactive selecting starting with mousedown events. - * Register this behavior on panels that should be selectable by the user, such - * for brushing and linking. This behavior can be used in tandom with - * {@link pv.Behavior.drag} to allow the selected region to be dragged - * interactively. - * - *

After the initial mousedown event is triggered, this behavior listens for - * mousemove and mouseup events on the window. This allows selecting to continue - * even if the mouse temporarily leaves the assigned panel, or even the root - * panel. - * - *

This behavior requires that the data associated with the mark being - * dragged have x, y, dx and dy attributes - * that correspond to the mark's location and dimensions in pixels. The mark's - * positional properties are not set directly by this behavior; instead, the - * positional properties should be defined as: - * - *

    .left(function(d) d.x)
- *     .top(function(d) d.y)
- *     .width(function(d) d.dx)
- *     .height(function(d) d.dy)
- * - * Thus, the behavior does not resize the mark directly, but instead updates the - * selection by updating the assigned panel's underlying data. Note that if the - * positional properties are defined with bottom and right (rather than top and - * left), the drag behavior will be inverted, which will confuse users! - * - *

The select behavior is bounded by the assigned panel; the positional - * attributes are clamped such that the selection does not extend outside the - * panel's bounds. - * - *

The panel being selected is automatically re-rendered for each mouse event - * as part of the drag operation. This behavior may be enhanced in the future to - * allow more flexible configuration of select behavior. In some cases, such as - * with parallel coordinates, making a selection may cause related marks to - * change, in which case additional marks may also need to be rendered. This can - * be accomplished by listening for the select psuedo-events:

    - * - *
  • selectstart (on mousedown) - *
  • select (on mousemove) - *
  • selectend (on mouseup) - * - *
For example, to render the parent panel while selecting, thus - * re-rendering all sibling marks: - * - *
    .event("mousedown", pv.Behavior.drag())
- *     .event("select", function() this.parent)
- * - * This behavior may be enhanced in the future to allow more flexible - * configuration of the selection behavior. - * - * @extends pv.Behavior - * @see pv.Behavior.drag - */ -pv.Behavior.select = function() { - var scene, // scene context - index, // scene context - r, // region being selected - m1; // initial mouse position - - /** @private */ - function mousedown(d) { - index = this.index; - scene = this.scene; - m1 = this.mouse(); - r = d; - r.x = m1.x; - r.y = m1.y; - r.dx = r.dy = 0; - pv.Mark.dispatch("selectstart", scene, index); - } - - /** @private */ - function mousemove() { - if (!scene) return; - scene.mark.context(scene, index, function() { - var m2 = this.mouse(); - r.x = Math.max(0, Math.min(m1.x, m2.x)); - r.y = Math.max(0, Math.min(m1.y, m2.y)); - r.dx = Math.min(this.width(), Math.max(m2.x, m1.x)) - r.x; - r.dy = Math.min(this.height(), Math.max(m2.y, m1.y)) - r.y; - this.render(); - }); - pv.Mark.dispatch("select", scene, index); - } - - /** @private */ - function mouseup() { - if (!scene) return; - pv.Mark.dispatch("selectend", scene, index); - scene = null; - } - - pv.listen(window, "mousemove", mousemove); - pv.listen(window, "mouseup", mouseup); - return mousedown; -}; -/** - * Returns a new resize behavior to be registered on mousedown events. - * - * @class Implements interactive resizing of a selection starting with mousedown - * events. Register this behavior on selection handles that should be resizeable - * by the user, such for brushing and linking. This behavior can be used in - * tandom with {@link pv.Behavior.select} and {@link pv.Behavior.drag} to allow - * the selected region to be selected and dragged interactively. - * - *

After the initial mousedown event is triggered, this behavior listens for - * mousemove and mouseup events on the window. This allows resizing to continue - * even if the mouse temporarily leaves the assigned panel, or even the root - * panel. - * - *

This behavior requires that the data associated with the mark being - * resized have x, y, dx and dy attributes - * that correspond to the mark's location and dimensions in pixels. The mark's - * positional properties are not set directly by this behavior; instead, the - * positional properties should be defined as: - * - *

    .left(function(d) d.x)
- *     .top(function(d) d.y)
- *     .width(function(d) d.dx)
- *     .height(function(d) d.dy)
- * - * Thus, the behavior does not resize the mark directly, but instead updates the - * size by updating the assigned panel's underlying data. Note that if the - * positional properties are defined with bottom and right (rather than top and - * left), the resize behavior will be inverted, which will confuse users! - * - *

The resize behavior is bounded by the assigned mark's enclosing panel; the - * positional attributes are clamped such that the selection does not extend - * outside the panel's bounds. - * - *

The mark being resized is automatically re-rendered for each mouse event - * as part of the resize operation. This behavior may be enhanced in the future - * to allow more flexible configuration. In some cases, such as with parallel - * coordinates, resizing the selection may cause related marks to change, in - * which case additional marks may also need to be rendered. This can be - * accomplished by listening for the select psuedo-events:

    - * - *
  • resizestart (on mousedown) - *
  • resize (on mousemove) - *
  • resizeend (on mouseup) - * - *
For example, to render the parent panel while resizing, thus - * re-rendering all sibling marks: - * - *
    .event("mousedown", pv.Behavior.resize("left"))
- *     .event("resize", function() this.parent)
- * - * This behavior may be enhanced in the future to allow more flexible - * configuration of the selection behavior. - * - * @extends pv.Behavior - * @see pv.Behavior.select - * @see pv.Behavior.drag - */ -pv.Behavior.resize = function(side) { - var scene, // scene context - index, // scene context - r, // region being selected - m1; // initial mouse position - - /** @private */ - function mousedown(d) { - index = this.index; - scene = this.scene; - m1 = this.mouse(); - r = d; - switch (side) { - case "left": m1.x = r.x + r.dx; break; - case "right": m1.x = r.x; break; - case "top": m1.y = r.y + r.dy; break; - case "bottom": m1.y = r.y; break; - } - pv.Mark.dispatch("resizestart", scene, index); - } - - /** @private */ - function mousemove() { - if (!scene) return; - scene.mark.context(scene, index, function() { - var m2 = this.mouse(); - r.x = Math.max(0, Math.min(m1.x, m2.x)); - r.y = Math.max(0, Math.min(m1.y, m2.y)); - r.dx = Math.min(this.parent.width(), Math.max(m2.x, m1.x)) - r.x; - r.dy = Math.min(this.parent.height(), Math.max(m2.y, m1.y)) - r.y; - this.render(); - }); - pv.Mark.dispatch("resize", scene, index); - } - - /** @private */ - function mouseup() { - if (!scene) return; - pv.Mark.dispatch("resizeend", scene, index); - scene = null; - } - - pv.listen(window, "mousemove", mousemove); - pv.listen(window, "mouseup", mouseup); - return mousedown; -}; -/** - * Returns a new pan behavior to be registered on mousedown events. - * - * @class Implements interactive panning starting with mousedown events. - * Register this behavior on panels to allow panning. This behavior can be used - * in tandem with {@link pv.Behavior.zoom} to allow both panning and zooming: - * - *
    .event("mousedown", pv.Behavior.pan())
- *     .event("mousewheel", pv.Behavior.zoom())
- * - * The pan behavior currently supports only mouse events; support for keyboard - * shortcuts to improve accessibility may be added in the future. - * - *

After the initial mousedown event is triggered, this behavior listens for - * mousemove and mouseup events on the window. This allows panning to continue - * even if the mouse temporarily leaves the panel that is being panned, or even - * the root panel. - * - *

The implementation of this behavior relies on the panel's - * transform property, which specifies a matrix transformation that is - * applied to child marks. Note that the transform property only affects the - * panel's children, but not the panel itself; therefore the panel's fill and - * stroke will not change when the contents are panned. - * - *

Panels have transparent fill styles by default; this means that panels may - * not receive the initial mousedown event to start panning. To fix this - * problem, either given the panel a visible fill style (such as "white"), or - * set the events property to "all" such that the panel receives events - * despite its transparent fill. - * - *

The pan behavior has optional support for bounding. If enabled, the user - * will not be able to pan the panel outside of the initial bounds. This feature - * is designed to work in conjunction with the zoom behavior; otherwise, - * bounding the panel effectively disables all panning. - * - * @extends pv.Behavior - * @see pv.Behavior.zoom - * @see pv.Panel#transform - */ -pv.Behavior.pan = function() { - var scene, // scene context - index, // scene context - m1, // transformation matrix at the start of panning - v1, // mouse location at the start of panning - k, // inverse scale - bound; // whether to bound to the panel - - /** @private */ - function mousedown() { - index = this.index; - scene = this.scene; - v1 = pv.vector(pv.event.pageX, pv.event.pageY); - m1 = this.transform(); - k = 1 / (m1.k * this.scale); - if (bound) { - bound = { - x: (1 - m1.k) * this.width(), - y: (1 - m1.k) * this.height() - }; - } - } - - /** @private */ - function mousemove() { - if (!scene) return; - scene.mark.context(scene, index, function() { - var x = (pv.event.pageX - v1.x) * k, - y = (pv.event.pageY - v1.y) * k, - m = m1.translate(x, y); - if (bound) { - m.x = Math.max(bound.x, Math.min(0, m.x)); - m.y = Math.max(bound.y, Math.min(0, m.y)); - } - this.transform(m).render(); - }); - pv.Mark.dispatch("pan", scene, index); - } - - /** @private */ - function mouseup() { - scene = null; - } - - /** - * Sets or gets the bound parameter. If bounding is enabled, the user will not - * be able to pan outside the initial panel bounds; this typically applies - * only when the pan behavior is used in tandem with the zoom behavior. - * Bounding is not enabled by default. - * - *

Note: enabling bounding after panning has already occurred will not - * immediately reset the transform. Bounding should be enabled before the - * panning behavior is applied. - * - * @function - * @returns {pv.Behavior.pan} this, or the current bound parameter. - * @name pv.Behavior.pan.prototype.bound - * @param {boolean} [x] the new bound parameter. - */ - mousedown.bound = function(x) { - if (arguments.length) { - bound = Boolean(x); - return this; - } - return Boolean(bound); - }; - - pv.listen(window, "mousemove", mousemove); - pv.listen(window, "mouseup", mouseup); - return mousedown; -}; -/** - * Returns a new zoom behavior to be registered on mousewheel events. - * - * @class Implements interactive zooming using mousewheel events. Register this - * behavior on panels to allow zooming. This behavior can be used in tandem with - * {@link pv.Behavior.pan} to allow both panning and zooming: - * - *

    .event("mousedown", pv.Behavior.pan())
- *     .event("mousewheel", pv.Behavior.zoom())
- * - * The zoom behavior currently supports only mousewheel events; support for - * keyboard shortcuts and gesture events to improve accessibility may be added - * in the future. - * - *

The implementation of this behavior relies on the panel's - * transform property, which specifies a matrix transformation that is - * applied to child marks. Note that the transform property only affects the - * panel's children, but not the panel itself; therefore the panel's fill and - * stroke will not change when the contents are zoomed. The built-in support for - * transforms only supports uniform scaling and translates, which is sufficient - * for panning and zooming. Note that this is not a strict geometric - * transformation, as the lineWidth property is scale-aware: strokes - * are drawn at constant size independent of scale. - * - *

Panels have transparent fill styles by default; this means that panels may - * not receive mousewheel events to zoom. To fix this problem, either given the - * panel a visible fill style (such as "white"), or set the events - * property to "all" such that the panel receives events despite its transparent - * fill. - * - *

The zoom behavior has optional support for bounding. If enabled, the user - * will not be able to zoom out farther than the initial bounds. This feature is - * designed to work in conjunction with the pan behavior. - * - * @extends pv.Behavior - * @see pv.Panel#transform - * @see pv.Mark#scale - * @param {number} speed - */ -pv.Behavior.zoom = function(speed) { - var bound; // whether to bound to the panel - - if (!arguments.length) speed = 1 / 48; - - /** @private */ - function mousewheel() { - var v = this.mouse(), - k = pv.event.wheel * speed, - m = this.transform().translate(v.x, v.y) - .scale((k < 0) ? (1e3 / (1e3 - k)) : ((1e3 + k) / 1e3)) - .translate(-v.x, -v.y); - if (bound) { - m.k = Math.max(1, m.k); - m.x = Math.max((1 - m.k) * this.width(), Math.min(0, m.x)); - m.y = Math.max((1 - m.k) * this.height(), Math.min(0, m.y)); - } - this.transform(m).render(); - pv.Mark.dispatch("zoom", this.scene, this.index); - } - - /** - * Sets or gets the bound parameter. If bounding is enabled, the user will not - * be able to zoom out farther than the initial panel bounds. Bounding is not - * enabled by default. If this behavior is used in tandem with the pan - * behavior, both should use the same bound parameter. - * - *

Note: enabling bounding after zooming has already occurred will not - * immediately reset the transform. Bounding should be enabled before the zoom - * behavior is applied. - * - * @function - * @returns {pv.Behavior.zoom} this, or the current bound parameter. - * @name pv.Behavior.zoom.prototype.bound - * @param {boolean} [x] the new bound parameter. - */ - mousewheel.bound = function(x) { - if (arguments.length) { - bound = Boolean(x); - return this; - } - return Boolean(bound); - }; - - return mousewheel; -}; -/** - * @ignore - * @namespace - */ -pv.Geo = function() {}; -/** - * Abstract; not implemented. There is no explicit constructor; this class - * merely serves to document the representation used by {@link pv.Geo.scale}. - * - * @class Represents a pair of geographic coordinates. - * - * @name pv.Geo.LatLng - * @see pv.Geo.scale - */ - -/** - * The latitude coordinate in degrees; positive is North. - * - * @type number - * @name pv.Geo.LatLng.prototype.lat - */ - -/** - * The longitude coordinate in degrees; positive is East. - * - * @type number - * @name pv.Geo.LatLng.prototype.lng - */ -/** - * Abstract; not implemented. There is no explicit constructor; this class - * merely serves to document the representation used by {@link pv.Geo.scale}. - * - * @class Represents a geographic projection. This class provides the core - * implementation for {@link pv.Geo.scale}s, mapping between geographic - * coordinates (latitude and longitude) and normalized screen space in the range - * [-1,1]. The remaining mapping between normalized screen space and actual - * pixels is performed by pv.Geo.scale. - * - *

Many geographic projections have a point around which the projection is - * centered. Rather than have each implementation add support for a - * user-specified center point, the pv.Geo.scale translates the - * geographic coordinates relative to the center point for both the forward and - * inverse projection. - * - *

In general, this class should not be used directly, unless the desire is - * to implement a new geographic projection. Instead, use pv.Geo.scale. - * Implementations are not required to implement inverse projections, but are - * needed for some forms of interactivity. Also note that some inverse - * projections are ambiguous, such as the connecting points in Dymaxian maps. - * - * @name pv.Geo.Projection - * @see pv.Geo.scale - */ - -/** - * The forward projection. - * - * @function - * @name pv.Geo.Projection.prototype.project - * @param {pv.Geo.LatLng} latlng the latitude and longitude to project. - * @returns {pv.Vector} the xy-coordinates of the given point. - */ - -/** - * The inverse projection; optional. - * - * @function - * @name pv.Geo.Projection.prototype.invert - * @param {pv.Vector} xy the x- and y-coordinates to invert. - * @returns {pv.Geo.LatLng} the latitude and longitude of the given point. - */ -/** - * The built-in projections. - * - * @see pv.Geo.Projection - * @namespace - */ -pv.Geo.projections = { - - /** @see http://en.wikipedia.org/wiki/Mercator_projection */ - mercator: { - project: function(latlng) { - return { - x: latlng.lng / 180, - y: latlng.lat > 85 ? 1 : latlng.lat < -85 ? -1 - : Math.log(Math.tan(Math.PI / 4 - + pv.radians(latlng.lat) / 2)) / Math.PI - }; - }, - invert: function(xy) { - return { - lng: xy.x * 180, - lat: pv.degrees(2 * Math.atan(Math.exp(xy.y * Math.PI)) - Math.PI / 2) - }; - } - }, - - /** @see http://en.wikipedia.org/wiki/Gall-Peters_projection */ - "gall-peters": { - project: function(latlng) { - return { - x: latlng.lng / 180, - y: Math.sin(pv.radians(latlng.lat)) - }; - }, - invert: function(xy) { - return { - lng: xy.x * 180, - lat: pv.degrees(Math.asin(xy.y)) - }; - } - }, - - /** @see http://en.wikipedia.org/wiki/Sinusoidal_projection */ - sinusoidal: { - project: function(latlng) { - return { - x: pv.radians(latlng.lng) * Math.cos(pv.radians(latlng.lat)) / Math.PI, - y: latlng.lat / 90 - }; - }, - invert: function(xy) { - return { - lng: pv.degrees((xy.x * Math.PI) / Math.cos(xy.y * Math.PI / 2)), - lat: xy.y * 90 - }; - } - }, - - /** @see http://en.wikipedia.org/wiki/Aitoff_projection */ - aitoff: { - project: function(latlng) { - var l = pv.radians(latlng.lng), - f = pv.radians(latlng.lat), - a = Math.acos(Math.cos(f) * Math.cos(l / 2)); - return { - x: 2 * (a ? (Math.cos(f) * Math.sin(l / 2) * a / Math.sin(a)) : 0) / Math.PI, - y: 2 * (a ? (Math.sin(f) * a / Math.sin(a)) : 0) / Math.PI - }; - }, - invert: function(xy) { - var x = xy.x * Math.PI / 2, - y = xy.y * Math.PI / 2; - return { - lng: pv.degrees(x / Math.cos(y)), - lat: pv.degrees(y) - }; - } - }, - - /** @see http://en.wikipedia.org/wiki/Hammer_projection */ - hammer: { - project: function(latlng) { - var l = pv.radians(latlng.lng), - f = pv.radians(latlng.lat), - c = Math.sqrt(1 + Math.cos(f) * Math.cos(l / 2)); - return { - x: 2 * Math.SQRT2 * Math.cos(f) * Math.sin(l / 2) / c / 3, - y: Math.SQRT2 * Math.sin(f) / c / 1.5 - }; - }, - invert: function(xy) { - var x = xy.x * 3, - y = xy.y * 1.5, - z = Math.sqrt(1 - x * x / 16 - y * y / 4); - return { - lng: pv.degrees(2 * Math.atan2(z * x, 2 * (2 * z * z - 1))), - lat: pv.degrees(Math.asin(z * y)) - }; - } - }, - - /** The identity or "none" projection. */ - identity: { - project: function(latlng) { - return { - x: latlng.lng / 180, - y: latlng.lat / 90 - }; - }, - invert: function(xy) { - return { - lng: xy.x * 180, - lat: xy.y * 90 - }; - } - } -}; -/** - * Returns a geographic scale. The arguments to this constructor are optional, - * and equivalent to calling {@link #projection}. - * - * @class Represents a geographic scale; a mapping between latitude-longitude - * coordinates and screen pixel coordinates. By default, the domain is inferred - * from the geographic coordinates, so that the domain fills the output range. - * - *

Note that geographic scales are two-dimensional transformations, rather - * than the one-dimensional bidrectional mapping typical of other scales. - * Rather than mapping (for example) between a numeric domain and a numeric - * range, geographic scales map between two coordinate objects: {@link - * pv.Geo.LatLng} and {@link pv.Vector}. - * - * @param {pv.Geo.Projection} [p] optional projection. - * @see pv.Geo.scale#ticks - */ -pv.Geo.scale = function(p) { - var rmin = {x: 0, y: 0}, // default range minimum - rmax = {x: 1, y: 1}, // default range maximum - d = [], // default domain - j = pv.Geo.projections.identity, // domain <-> normalized range - x = pv.Scale.linear(-1, 1).range(0, 1), // normalized <-> range - y = pv.Scale.linear(-1, 1).range(1, 0), // normalized <-> range - c = {lng: 0, lat: 0}, // Center Point - lastLatLng, // cached latlng - lastPoint; // cached point - - /** @private */ - function scale(latlng) { - if (!lastLatLng - || (latlng.lng != lastLatLng.lng) - || (latlng.lat != lastLatLng.lat)) { - lastLatLng = latlng; - var p = project(latlng); - lastPoint = {x: x(p.x), y: y(p.y)}; - } - return lastPoint; - } - - /** @private */ - function project(latlng) { - var offset = {lng: latlng.lng - c.lng, lat: latlng.lat}; - return j.project(offset); - } - - /** @private */ - function invert(xy) { - var latlng = j.invert(xy); - latlng.lng += c.lng; - return latlng; - } - - /** Returns the projected x-coordinate. */ - scale.x = function(latlng) { - return scale(latlng).x; - }; - - /** Returns the projected y-coordinate. */ - scale.y = function(latlng) { - return scale(latlng).y; - }; - - /** - * Abstract; this is a local namespace on a given geographic scale. - * - * @namespace Tick functions for geographic scales. Because geographic scales - * represent two-dimensional transformations (as opposed to one-dimensional - * transformations typical of other scales), the tick values are similarly - * represented as two-dimensional coordinates in the input domain, i.e., - * {@link pv.Geo.LatLng} objects. - * - *

Also, note that non-rectilinear projections, such as sinsuoidal and - * aitoff, may not produce straight lines for constant longitude or constant - * latitude. Therefore the returned array of ticks is a two-dimensional array, - * sampling various latitudes as constant longitude, and vice versa. - * - *

The tick lines can therefore be approximated as polylines, either with - * "linear" or "cardinal" interpolation. This is not as accurate as drawing - * the true curve through the projection space, but is usually sufficient. - * - * @name pv.Geo.scale.prototype.ticks - * @see pv.Geo.scale - * @see pv.Geo.LatLng - * @see pv.Line#interpolate - */ - scale.ticks = { - - /** - * Returns longitude ticks. - * - * @function - * @param {number} [m] the desired number of ticks. - * @returns {array} a nested array of pv.Geo.LatLng ticks. - * @name pv.Geo.scale.prototype.ticks.prototype.lng - */ - lng: function(m) { - var lat, lng; - if (d.length > 1) { - var s = pv.Scale.linear(); - if (m == undefined) m = 10; - lat = s.domain(d, function(d) { return d.lat; }).ticks(m); - lng = s.domain(d, function(d) { return d.lng; }).ticks(m); - } else { - lat = pv.range(-80, 81, 10); - lng = pv.range(-180, 181, 10); - } - return lng.map(function(lng) { - return lat.map(function(lat) { - return {lat: lat, lng: lng}; - }); - }); - }, - - /** - * Returns latitude ticks. - * - * @function - * @param {number} [m] the desired number of ticks. - * @returns {array} a nested array of pv.Geo.LatLng ticks. - * @name pv.Geo.scale.prototype.ticks.prototype.lat - */ - lat: function(m) { - return pv.transpose(scale.ticks.lng(m)); - } - }; - - /** - * Inverts the specified value in the output range, returning the - * corresponding value in the input domain. This is frequently used to convert - * the mouse location (see {@link pv.Mark#mouse}) to a value in the input - * domain. Inversion is only supported for numeric ranges, and not colors. - * - *

Note that this method does not do any rounding or bounds checking. If - * the input domain is discrete (e.g., an array index), the returned value - * should be rounded. If the specified y value is outside the range, - * the returned value may be equivalently outside the input domain. - * - * @function - * @name pv.Geo.scale.prototype.invert - * @param {number} y a value in the output range (a pixel location). - * @returns {number} a value in the input domain. - */ - scale.invert = function(p) { - return invert({x: x.invert(p.x), y: y.invert(p.y)}); - }; - - /** - * Sets or gets the input domain. Note that unlike quantitative scales, the - * domain cannot be reduced to a simple rectangle (i.e., minimum and maximum - * values for latitude and longitude). Instead, the domain values must be - * projected to normalized space, effectively finding the domain in normalized - * space rather than in terms of latitude and longitude. Thus, changing the - * projection requires recomputing the normalized domain. - * - *

This method can be invoked several ways: - * - *

1. domain(values...) - * - *

Specifying the domain as a series of {@link pv.Geo.LatLng}s is the most - * explicit and recommended approach. However, if the domain values are - * derived from data, you may find the second method more appropriate. - * - *

2. domain(array, f) - * - *

Rather than enumerating the domain explicitly, you can specify a single - * argument of an array. In addition, you can specify an optional accessor - * function to extract the domain values (as {@link pv.Geo.LatLng}s) from the - * array. If the specified array has fewer than two elements, this scale will - * default to the full normalized domain. - * - *

2. domain() - * - *

Invoking the domain method with no arguments returns the - * current domain as an array. - * - * @function - * @name pv.Geo.scale.prototype.domain - * @param {...} domain... domain values. - * @returns {pv.Geo.scale} this, or the current domain. - */ - scale.domain = function(array, f) { - if (arguments.length) { - d = (array instanceof Array) - ? ((arguments.length > 1) ? pv.map(array, f) : array) - : Array.prototype.slice.call(arguments); - if (d.length > 1) { - var lngs = d.map(function(c) { return c.lng; }); - var lats = d.map(function(c) { return c.lat; }); - c = { - lng: (pv.max(lngs) + pv.min(lngs)) / 2, - lat: (pv.max(lats) + pv.min(lats)) / 2 - }; - var n = d.map(project); // normalized domain - x.domain(n, function(p) { return p.x; }); - y.domain(n, function(p) { return p.y; }); - } else { - c = {lng: 0, lat: 0}; - x.domain(-1, 1); - y.domain(-1, 1); - } - lastLatLng = null; // invalidate the cache - return this; - } - return d; - }; - - /** - * Sets or gets the output range. This method can be invoked several ways: - * - *

1. range(min, max) - * - *

If two objects are specified, the arguments should be {@link pv.Vector}s - * which specify the minimum and maximum values of the x- and y-coordinates - * explicitly. - * - *

2. range(width, height) - * - *

If two numbers are specified, the arguments specify the maximum values - * of the x- and y-coordinates explicitly; the minimum values are implicitly - * zero. - * - *

3. range() - * - *

Invoking the range method with no arguments returns the current - * range as an array of two {@link pv.Vector}s: the minimum (top-left) and - * maximum (bottom-right) values. - * - * @function - * @name pv.Geo.scale.prototype.range - * @param {...} range... range values. - * @returns {pv.Geo.scale} this, or the current range. - */ - scale.range = function(min, max) { - if (arguments.length) { - if (typeof min == "object") { - rmin = {x: Number(min.x), y: Number(min.y)}; - rmax = {x: Number(max.x), y: Number(max.y)}; - } else { - rmin = {x: 0, y: 0}; - rmax = {x: Number(min), y: Number(max)}; - } - x.range(rmin.x, rmax.x); - y.range(rmax.y, rmin.y); // XXX flipped? - lastLatLng = null; // invalidate the cache - return this; - } - return [rmin, rmax]; - }; - - /** - * Sets or gets the projection. This method can be invoked several ways: - * - *

1. projection(string) - * - *

Specifying a string sets the projection to the given named projection in - * {@link pv.Geo.projections}. If no such projection is found, the identity - * projection is used. - * - *

2. projection(object) - * - *

Specifying an object sets the projection to the given custom projection, - * which must implement the forward and inverse methods per the - * {@link pv.Geo.Projection} interface. - * - *

3. projection() - * - *

Invoking the projection method with no arguments returns the - * current object that defined the projection. - * - * @function - * @name pv.Scale.geo.prototype.projection - * @param {...} range... range values. - * @returns {pv.Scale.geo} this, or the current range. - */ - scale.projection = function(p) { - if (arguments.length) { - j = typeof p == "string" - ? pv.Geo.projections[p] || pv.Geo.projections.identity - : p; - return this.domain(d); // recompute normalized domain - } - return p; - }; - - /** - * Returns a view of this scale by the specified accessor function f. - * Given a scale g, g.by(function(d) d.foo) is equivalent to - * function(d) g(d.foo). This method should be used judiciously; it - * is typically more clear to invoke the scale directly, passing in the value - * to be scaled. - * - * @function - * @name pv.Geo.scale.prototype.by - * @param {function} f an accessor function. - * @returns {pv.Geo.scale} a view of this scale by the specified accessor - * function. - */ - scale.by = function(f) { - function by() { return scale(f.apply(this, arguments)); } - for (var method in scale) by[method] = scale[method]; - return by; - }; - - if (arguments.length) scale.projection(p); - return scale; -}; diff --git a/lib/protovis/protovis-r3.2.js b/lib/protovis/protovis-r3.2.js deleted file mode 100644 index 95bb3be0..00000000 --- a/lib/protovis/protovis-r3.2.js +++ /dev/null @@ -1,277 +0,0 @@ -// fba9dc2 -var a;if(!Array.prototype.map)Array.prototype.map=function(b,c){for(var d=this.length,f=new Array(d),g=0;g>>0,f=0;f=d)throw new Error("reduce: no values, no initial value");}for(;f=0&&d=69&&m<100?1900:0)});return"([0-9]+)";case "%Y":q.push(function(m){g=m});return"([0-9]+)";case "%%":q.push(function(){}); -return"%"}return n});(f=f.match(o))&&f.forEach(function(n,m){q[m](n)});return new Date(g,h,i,j,l,k)};return c}; -pv.Format.time=function(b){function c(f){f=Number(f);switch(b){case "short":if(f>=31536E6)return(f/31536E6).toFixed(1)+" years";else if(f>=6048E5)return(f/6048E5).toFixed(1)+" weeks";else if(f>=864E5)return(f/864E5).toFixed(1)+" days";else if(f>=36E5)return(f/36E5).toFixed(1)+" hours";else if(f>=6E4)return(f/6E4).toFixed(1)+" minutes";return(f/1E3).toFixed(1)+" seconds";case "long":var g=[],h=f%36E5/6E4>>0;g.push(d("0",2,f%6E4/1E3>>0));if(f>=36E5){var i=f%864E5/36E5>>0;g.push(d("0",2,h));if(f>=864E5){g.push(d("0", -2,i));g.push(Math.floor(f/864E5).toFixed())}else g.push(i.toFixed())}else g.push(h.toFixed());return g.reverse().join(":")}}var d=pv.Format.pad;c.format=c;c.parse=function(f){switch(b){case "short":for(var g=/([0-9,.]+)\s*([a-z]+)/g,h,i=0;h=g.exec(f);){var j=parseFloat(h[0].replace(",","")),l=0;switch(h[2].toLowerCase()){case "year":case "years":l=31536E6;break;case "week":case "weeks":l=6048E5;break;case "day":case "days":l=864E5;break;case "hour":case "hours":l=36E5;break;case "minute":case "minutes":l= -6E4;break;case "second":case "seconds":l=1E3;break}i+=j*l}return i;case "long":h=f.replace(",","").split(":").reverse();i=0;if(h.length)i+=parseFloat(h[0])*1E3;if(h.length>1)i+=parseFloat(h[1])*6E4;if(h.length>2)i+=parseFloat(h[2])*36E5;if(h.length>3)i+=parseFloat(h[3])*864E5;return i}};return c}; -pv.Format.number=function(){function b(n){if(Infinity>h)n=Math.round(n*i)/i;var m=String(Math.abs(n)).split("."),r=m[0];n=n<0?"-":"";if(r.length>d)r=r.substring(r.length-d);if(k&&r.length3)r=r.replace(/\B(?=(?:\d{3})+(?!\d))/g,o);if(!k&&r.lengthd)m=m.substring(m.length-d);n=n[1]?Number("0."+n[1]):0;if(Infinity>h)n=Math.round(n*i)/i;return Math.round(m)+n};b.integerDigits=function(n,m){if(arguments.length){c=Number(n);d=arguments.length>1?Number(m):c;f=c+Math.floor(c/3)*o.length;return this}return[c,d]};b.fractionDigits=function(n,m){if(arguments.length){g= -Number(n);h=arguments.length>1?Number(m):g;i=Math.pow(10,h);return this}return[g,h]};b.integerPad=function(n){if(arguments.length){j=String(n);k=/\d/.test(j);return this}return j};b.fractionPad=function(n){if(arguments.length){l=String(n);return this}return l};b.decimal=function(n){if(arguments.length){q=String(n);return this}return q};b.group=function(n){if(arguments.length){o=n?String(n):"";f=c+Math.floor(c/3)*o.length;return this}return o};return b}; -pv.map=function(b,c){var d={};return c?b.map(function(f,g){d.index=g;return c.call(d,f)}):b.slice()};pv.repeat=function(b,c){if(arguments.length==1)c=2;return pv.blend(pv.range(c).map(function(){return b}))};pv.cross=function(b,c){for(var d=[],f=0,g=b.length,h=c.length;fc){b.length=d;for(var f=c;fc?1:0}; -pv.reverseOrder=function(b,c){return cb?1:0};pv.search=function(b,c,d){if(!d)d=pv.identity;for(var f=0,g=b.length-1;f<=g;){var h=f+g>>1,i=d(b[h]);if(ic)g=h-1;else return h}return-f-1};pv.search.index=function(b,c,d){b=pv.search(b,c,d);return b<0?-b-1:b}; -pv.range=function(b,c,d){if(arguments.length==1){c=b;b=0}if(d==undefined)d=1;if((c-b)/d==Infinity)throw new Error("range must be finite");var f=[],g=0,h;if(d<0)for(;(h=b+d*g++)>c;)f.push(h);else for(;(h=b+d*g++)f){f=i;d=h}}return d}; -pv.min=function(b,c){if(c==pv.index)return 0;return Math.min.apply(null,c?pv.map(b,c):b)};pv.min.index=function(b,c){if(!b.length)return-1;if(c==pv.index)return 0;if(!c)c=pv.identity;for(var d=0,f=Infinity,g={},h=0;h0?Math.pow(c,Math.floor(pv.log(b,c))):-Math.pow(c,-Math.floor(-pv.log(-b,c)))};pv.logCeil=function(b,c){return b>0?Math.pow(c,Math.ceil(pv.log(b,c))):-Math.pow(c,-Math.ceil(-pv.log(-b,c)))}; -(function(){var b=Math.PI/180,c=180/Math.PI;pv.radians=function(d){return b*d};pv.degrees=function(d){return c*d}})();pv.keys=function(b){var c=[];for(var d in b)c.push(d);return c};pv.entries=function(b){var c=[];for(var d in b)c.push({key:d,value:b[d]});return c};pv.values=function(b){var c=[];for(var d in b)c.push(b[d]);return c};pv.dict=function(b,c){for(var d={},f={},g=0;g=94608E6){n=31536E6;t="%Y";p=function(w){w.setFullYear(w.getFullYear()+v)}}else if(u>=7776E6){n=2592E6;t="%m/%Y";p=function(w){w.setMonth(w.getMonth()+v)}}else if(u>=18144E5){n=6048E5;t="%m/%d";p=function(w){w.setDate(w.getDate()+7*v)}}else if(u>=2592E5){n=864E5;t="%m/%d";p=function(w){w.setDate(w.getDate()+v)}}else if(u>=108E5){n=36E5;t="%I:%M %p";p=function(w){w.setHours(w.getHours()+ -v)}}else if(u>=18E4){n=6E4;t="%I:%M %p";p=function(w){w.setMinutes(w.getMinutes()+v)}}else if(u>=3E3){n=1E3;t="%I:%M:%S";p=function(w){w.setSeconds(w.getSeconds()+v)}}else{n=1;t="%S.%Qs";p=function(w){w.setTime(w.getTime()+v)}}q=pv.Format.date(t);s=new Date(s);t=[];x(s,n);u=u/n;if(u>10)switch(n){case 36E5:v=u>20?6:3;s.setHours(Math.floor(s.getHours()/v)*v);break;case 2592E6:v=3;s.setMonth(Math.floor(s.getMonth()/v)*v);break;case 6E4:v=u>30?15:u>15?10:5;s.setMinutes(Math.floor(s.getMinutes()/v)*v); -break;case 1E3:v=u>90?15:u>60?10:5;s.setSeconds(Math.floor(s.getSeconds()/v)*v);break;case 1:v=u>1E3?250:u>200?100:u>100?50:u>50?25:5;s.setMilliseconds(Math.floor(s.getMilliseconds()/v)*v);break;default:v=pv.logCeil(u/15,10);if(u/v<2)v/=5;else if(u/v<5)v/=2;s.setFullYear(Math.floor(s.getFullYear()/v)*v);break}for(;;){p(s);if(s>m)break;t.push(new Date(s))}return r?t.reverse():t}arguments.length||(o=10);v=pv.logFloor(u/o,10);n=o/(u/v);if(n<=0.15)v*=10;else if(n<=0.35)v*=5;else if(n<=0.75)v*=2;n=Math.ceil(s/ -v)*v;m=Math.floor(m/v)*v;q=pv.Format.number().fractionDigits(Math.max(0,-Math.floor(pv.log(v,10)+0.01)));m=pv.range(n,m+v,v);return r?m.reverse():m};c.tickFormat=function(o){return q(o)};c.nice=function(){if(d.length!=2)return this;var o=d[0],n=d[d.length-1],m=n0;i--)k.push(-g(-j)*i);else{for(;jh[1];l--);return k.slice(j,l)};b.tickFormat=function(h){return h.toPrecision(1)}; -b.nice=function(){var h=b.domain();return b.domain(pv.logFloor(h[0],c),pv.logCeil(h[1],c))};b.base=function(h){if(arguments.length){c=Number(h);d=Math.log(c);b.transform(f,g);return this}return c};b.domain.apply(b,arguments);return b.base(10)};pv.Scale.root=function(){var b=pv.Scale.quantitative();b.power=function(c){if(arguments.length){var d=Number(c),f=1/d;b.transform(function(g){return Math.pow(g,f)},function(g){return Math.pow(g,d)});return this}return d};b.domain.apply(b,arguments);return b.power(2)}; -pv.Scale.ordinal=function(){function b(g){g in d||(d[g]=c.push(g)-1);return f[d[g]%f.length]}var c=[],d={},f=[];b.domain=function(g,h){if(arguments.length){g=g instanceof Array?arguments.length>1?pv.map(g,h):g:Array.prototype.slice.call(arguments);c=[];for(var i={},j=0;j1?pv.map(g,h):g:Array.prototype.slice.call(arguments); -if(typeof f[0]=="string")f=f.map(pv.color);return this}return f};b.split=function(g,h){var i=(h-g)/this.domain().length;f=pv.range(g+i/2,h,i);return this};b.splitFlush=function(g,h){var i=this.domain().length,j=(h-g)/(i-1);f=i==1?[(g+h)/2]:pv.range(g,h+j/2,j);return this};b.splitBanded=function(g,h,i){if(arguments.length<3)i=1;if(i<0){var j=this.domain().length;j=(h-g- -i*j)/(j+1);f=pv.range(g+j,h,j-i);f.band=-i}else{j=(h-g)/(this.domain().length+(1-i));f=pv.range(g+j*(1-i),h,j);f.band=j*i}return this}; -b.by=function(g){function h(){return b(g.apply(this,arguments))}for(var i in b)h[i]=b[i];return h};b.domain.apply(b,arguments);return b}; -pv.Scale.quantile=function(){function b(i){return h(Math.max(0,Math.min(d,pv.search.index(f,i)-1))/d)}var c=-1,d=-1,f=[],g=[],h=pv.Scale.linear();b.quantiles=function(i){if(arguments.length){c=Number(i);if(c<0){f=[g[0]].concat(g);d=g.length-1}else{f=[];f[0]=g[0];for(var j=1;j<=c;j++)f[j]=g[~~(j*(g.length-1)/c)];d=c-1}return this}return f};b.domain=function(i,j){if(arguments.length){g=i instanceof Array?pv.map(i,j):Array.prototype.slice.call(arguments);g.sort(pv.naturalOrder);b.quantiles(c);return this}return g}; -b.range=function(){if(arguments.length){h.range.apply(h,arguments);return this}return h.range()};b.by=function(i){function j(){return b(i.apply(this,arguments))}for(var l in b)j[l]=b[l];return j};b.domain.apply(b,arguments);return b}; -pv.histogram=function(b,c){var d=true;return{bins:function(f){var g=pv.map(b,c),h=[];arguments.length||(f=pv.Scale.linear(g).ticks());for(var i=0;i360)j-=360;else if(j<0)j+=360;if(j<60)return i+(h-i)*j/60;if(j<180)return h;if(j<240)return i+(h-i)*(240-j)/60;return i}function c(j){return Math.round(b(j)*255)}var d=this.h,f=this.s,g=this.l;d%=360;if(d<0)d+=360;f=Math.max(0,Math.min(f,1));g=Math.max(0,Math.min(g,1));var h=g<=0.5?g*(1+f):g+f-g*f,i=2*g-h;return pv.rgb(c(d+120),c(d),c(d-120),this.a)}; -pv.Color.names={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400", -darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc", -ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a", -lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1", -moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57", -seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",transparent:pv.Color.transparent=pv.rgb(0,0,0,0)};(function(){var b=pv.Color.names;for(var c in b)b[c]=pv.color(b[c])})(); -pv.colors=function(){var b=pv.Scale.ordinal();b.range.apply(b,arguments);return b};pv.Colors={};pv.Colors.category10=function(){var b=pv.colors("#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf");b.domain.apply(b,arguments);return b}; -pv.Colors.category20=function(){var b=pv.colors("#1f77b4","#aec7e8","#ff7f0e","#ffbb78","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b","#c49c94","#e377c2","#f7b6d2","#7f7f7f","#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5");b.domain.apply(b,arguments);return b}; -pv.Colors.category19=function(){var b=pv.colors("#9c9ede","#7375b5","#4a5584","#cedb9c","#b5cf6b","#8ca252","#637939","#e7cb94","#e7ba52","#bd9e39","#8c6d31","#e7969c","#d6616b","#ad494a","#843c39","#de9ed6","#ce6dbd","#a55194","#7b4173");b.domain.apply(b,arguments);return b};pv.ramp=function(){var b=pv.Scale.linear();b.range.apply(b,arguments);return b}; -pv.Scene=pv.SvgScene={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns",xlink:"http://www.w3.org/1999/xlink",xhtml:"http://www.w3.org/1999/xhtml",scale:1,events:["DOMMouseScroll","mousewheel","mousedown","mouseup","mouseover","mouseout","mousemove","click","dblclick"],implicit:{svg:{"shape-rendering":"auto","pointer-events":"painted",x:0,y:0,dy:0,"text-anchor":"start",transform:"translate(0,0)",fill:"none","fill-opacity":1,stroke:"none","stroke-opacity":1,"stroke-width":1.5,"stroke-linejoin":"miter"}, -css:{font:"10px sans-serif"}}};pv.SvgScene.updateAll=function(b){if(b.length&&b[0].reverse&&b.type!="line"&&b.type!="area"){for(var c=pv.extend(b),d=0,f=b.length-1;f>=0;d++,f--)c[d]=b[f];b=c}this.removeSiblings(this[b.type](b))};pv.SvgScene.create=function(b){return document.createElementNS(this.svg,b)}; -pv.SvgScene.expect=function(b,c,d,f){if(b){if(b.tagName=="a")b=b.firstChild;if(b.tagName!=c){c=this.create(c);b.parentNode.replaceChild(c,b);b=c}}else b=this.create(c);for(var g in d){c=d[g];if(c==this.implicit.svg[g])c=null;c==null?b.removeAttribute(g):b.setAttribute(g,c)}for(g in f){c=f[g];if(c==this.implicit.css[g])c=null;if(c==null)b.style.removeProperty(g);else b.style[g]=c}return b}; -pv.SvgScene.append=function(b,c,d){b.$scene={scenes:c,index:d};b=this.title(b,c[d]);b.parentNode||c.$g.appendChild(b);return b.nextSibling};pv.SvgScene.title=function(b,c){var d=b.parentNode;if(d&&d.tagName!="a")d=null;if(c.title){if(!d){d=this.create("a");b.parentNode&&b.parentNode.replaceChild(d,b);d.appendChild(b)}d.setAttributeNS(this.xlink,"title",c.title);return d}d&&d.parentNode.replaceChild(b,d);return b}; -pv.SvgScene.dispatch=pv.listener(function(b){var c=b.target.$scene;if(c){var d=b.type;switch(d){case "DOMMouseScroll":d="mousewheel";b.wheel=-480*b.detail;break;case "mousewheel":b.wheel=(window.opera?12:1)*b.wheelDelta;break}pv.Mark.dispatch(d,c.scenes,c.index)&&b.preventDefault()}});pv.SvgScene.removeSiblings=function(b){for(;b;){var c=b.nextSibling;b.parentNode.removeChild(b);b=c}};pv.SvgScene.undefined=function(){}; -pv.SvgScene.pathBasis=function(){function b(f,g,h,i,j){return{x:f[0]*g.left+f[1]*h.left+f[2]*i.left+f[3]*j.left,y:f[0]*g.top+f[1]*h.top+f[2]*i.top+f[3]*j.top}}var c=[[1/6,2/3,1/6,0],[0,2/3,1/3,0],[0,1/3,2/3,0],[0,1/6,2/3,1/6]],d=function(f,g,h,i){var j=b(c[1],f,g,h,i),l=b(c[2],f,g,h,i);f=b(c[3],f,g,h,i);return"C"+j.x+","+j.y+","+l.x+","+l.y+","+f.x+","+f.y};d.segment=function(f,g,h,i){var j=b(c[0],f,g,h,i),l=b(c[1],f,g,h,i),k=b(c[2],f,g,h,i);f=b(c[3],f,g,h,i);return"M"+j.x+","+j.y+"C"+l.x+","+l.y+ -","+k.x+","+k.y+","+f.x+","+f.y};return d}();pv.SvgScene.curveBasis=function(b){if(b.length<=2)return"";var c="",d=b[0],f=d,g=d,h=b[1];c+=this.pathBasis(d,f,g,h);for(var i=2;i1){j=c[1];h=b[l];l++;f+="C"+(g.left+i.x)+","+(g.top+i.y)+","+(h.left-j.x)+","+(h.top-j.y)+","+h.left+","+h.top;for(g=2;g9){l=3/Math.sqrt(l);f[h]= -l*i*d[h];f[h+1]=l*j*d[h]}}for(h=0;h2&&(g.interpolate=="basis"||g.interpolate=="cardinal"||g.interpolate=="monotone")?d:c)(k,q-1));k=q-1}}if(!j.length)return f;f=this.expect(f,"path",{"shape-rendering":g.antialias?null:"crispEdges","pointer-events":g.events,cursor:g.cursor,d:"M"+j.join("ZM")+"Z",fill:h.color,"fill-opacity":h.opacity|| -null,stroke:i.color,"stroke-opacity":i.opacity||null,"stroke-width":i.opacity?g.lineWidth/this.scale:null});return this.append(f,b,0)}; -pv.SvgScene.areaSegment=function(b){var c=b.$g.firstChild,d=b[0],f,g;if(d.interpolate=="basis"||d.interpolate=="cardinal"||d.interpolate=="monotone"){f=[];g=[];for(var h=0,i=b.length;h2&&(d.interpolate=="basis"||d.interpolate=="cardinal"||d.interpolate=="monotone"))switch(d.interpolate){case "basis":h+=this.curveBasis(b);break;case "cardinal":h+=this.curveCardinal(b,d.tension);break;case "monotone":h+=this.curveMonotone(b); -break}else for(var i=1;i1)break;return"A"+f+","+f+" 0 0,"+d+" "+c.left+","+c.top;case "step-before":return"V"+c.top+"H"+c.left;case "step-after":return"H"+c.left+"V"+c.top}return"L"+c.left+","+c.top};pv.SvgScene.lineIntersect=function(b,c,d,f){return b.plus(c.times(d.minus(b).dot(f.perp())/c.dot(f.perp())))}; -pv.SvgScene.pathJoin=function(b,c,d,f){var g=pv.vector(c.left,c.top);d=pv.vector(d.left,d.top);var h=d.minus(g),i=h.perp().norm(),j=i.times(c.lineWidth/(2*this.scale));c=g.plus(j);var l=d.plus(j),k=d.minus(j);j=g.minus(j);if(b&&b.visible){b=g.minus(b.left,b.top).perp().norm().plus(i);j=this.lineIntersect(g,b,j,h);c=this.lineIntersect(g,b,c,h)}if(f&&f.visible){f=pv.vector(f.left,f.top).minus(d).perp().norm().plus(i);k=this.lineIntersect(d,f,k,h);l=this.lineIntersect(d,f,l,h)}return"M"+c.x+","+c.y+ -"L"+l.x+","+l.y+" "+k.x+","+k.y+" "+j.x+","+j.y}; -pv.SvgScene.panel=function(b){for(var c=b.$g,d=c&&c.firstChild,f=0;f=2*Math.PI)i=i?"M0,"+j+"A"+j+","+j+" 0 1,1 0,"+-j+"A"+j+","+j+" 0 1,1 0,"+j+"M0,"+i+"A"+i+","+i+" 0 1,1 0,"+-i+"A"+i+","+i+" 0 1,1 0,"+i+"Z":"M0,"+j+"A"+j+","+j+" 0 1,1 0,"+-j+"A"+j+","+j+" 0 1,1 0,"+j+"Z";else{var k=Math.min(f.startAngle,f.endAngle),q=Math.max(f.startAngle,f.endAngle), -o=Math.cos(k),n=Math.cos(q);k=Math.sin(k);q=Math.sin(q);i=i?"M"+j*o+","+j*k+"A"+j+","+j+" 0 "+(l1?c:null)}; -a.anchor=function(b){function c(g){for(var h=d,i=[];!(f=h.scene);){g=g.parent;i.push({index:g.index,childIndex:h.childIndex});h=h.parent}for(;i.length;){g=i.pop();f=f[g.index].children[g.childIndex]}if(d.hasOwnProperty("index")){i=pv.extend(f[d.index]);i.right=i.top=i.left=i.bottom=0;return[i]}return f}var d=this,f;b||(b="center");return(new pv.Anchor(this)).name(b).def("$mark.anchor",function(){f=this.scene.target=c(this)}).data(function(){return f.map(function(g){return g.data})}).visible(function(){return f[this.index].visible}).left(function(){var g= -f[this.index],h=g.width||0;switch(this.name()){case "bottom":case "top":case "center":return g.left+h/2;case "left":return null}return g.left+h}).top(function(){var g=f[this.index],h=g.height||0;switch(this.name()){case "left":case "right":case "center":return g.top+h/2;case "top":return null}return g.top+h}).right(function(){var g=f[this.index];return this.name()=="left"?g.right+(g.width||0):null}).bottom(function(){var g=f[this.index];return this.name()=="top"?g.bottom+(g.height||0):null}).textAlign(function(){switch(this.name()){case "bottom":case "top":case "center":return"center"; -case "right":return"right"}return"left"}).textBaseline(function(){switch(this.name()){case "right":case "left":case "center":return"middle";case "top":return"top"}return"bottom"})};a.anchorTarget=function(){return this.proto.anchorTarget()};a.margin=function(b){return this.left(b).right(b).top(b).bottom(b)};a.instance=function(b){var c=this.scene||this.parent.instance(-1).children[this.childIndex],d=!arguments.length||this.hasOwnProperty("index")?this.index:b;return c[d<0?c.length-1:d]};a.first=function(){return this.scene[0]}; -a.last=function(){return this.scene[this.scene.length-1]};a.sibling=function(){return this.index==0?null:this.scene[this.index-1]};a.cousin=function(){var b=this.parent;return(b=b&&b.sibling())&&b.children?b.children[this.childIndex][this.index]:null}; -a.render=function(){function b(i,j,l){i.scale=l;if(j=0;k--){var q=l[k];if(!(q.name in c)){c[q.name]=q;switch(q.name){case "data":f=q;break;case "visible":g=q;break;default:d[q.type].push(q);break}}}while(j=j.proto)}var c={},d=[[],[],[],[]],f,g;b(this);b(this.defaults);d[1].reverse();d[3].reverse();var h=this;do for(var i in h.properties)i in c||d[2].push(c[i]={name:i,type:2,value:null});while(h=h.proto);h=d[0].concat(d[1]);for(i=0;ih.id)d[g.name]={id:0,value:g.type&1?g.value.apply(this,c):g.value}}}d=this.binds.data;d=d.type&1?d.value.apply(this,c):d.value;c.unshift(null); -b.length=d.length;for(f=0;f0;k--){n=m[k];n.scale=q;q*=n.scene[n.index].transform.k}if(o.children){k=0;for(m=o.children.length;k=3*Math.PI/2};pv.Wedge.prototype.buildImplied=function(b){if(b.angle==null)b.angle=b.endAngle-b.startAngle;else if(b.endAngle==null)b.endAngle=b.startAngle+b.angle;pv.Mark.prototype.buildImplied.call(this,b)};pv.simulation=function(b){return new pv.Simulation(b)};pv.Simulation=function(b){for(var c=0;c=s,t=q.y>=u;k.leaf=false;switch((t<<1)+x){case 0:k=k.c1||(k.c1=new pv.Quadtree.Node);break;case 1:k=k.c2||(k.c2=new pv.Quadtree.Node);break;case 2:k=k.c3||(k.c3=new pv.Quadtree.Node);break;case 3:k=k.c4||(k.c4=new pv.Quadtree.Node); -break}if(x)o=s;else m=s;if(t)n=u;else r=u;c(k,q,o,n,m,r)}var f,g=Number.POSITIVE_INFINITY,h=g,i=Number.NEGATIVE_INFINITY,j=i;for(f=b;f;f=f.next){if(f.xi)i=f.x;if(f.y>j)j=f.y}f=i-g;var l=j-h;if(f>l)j=h+f;else i=g+l;this.xMin=g;this.yMin=h;this.xMax=i;this.yMax=j;this.root=new pv.Quadtree.Node;for(f=b;f;f=f.next)c(this.root,f,g,h,i,j)};pv.Quadtree.Node=function(){this.leaf=true;this.p=this.c4=this.c3=this.c2=this.c1=null};pv.Force={}; -pv.Force.charge=function(b){function c(k){function q(m){c(m);k.cn+=m.cn;o+=m.cn*m.cx;n+=m.cn*m.cy}var o=0,n=0;k.cn=0;if(!k.leaf){k.c1&&q(k.c1);k.c2&&q(k.c2);k.c3&&q(k.c3);k.c4&&q(k.c4)}if(k.p){k.cn+=b;o+=b*k.p.x;n+=b*k.p.y}k.cx=o/k.cn;k.cy=n/k.cn}function d(k,q,o,n,m,r){var s=k.cx-q.x,u=k.cy-q.y,x=1/Math.sqrt(s*s+u*u);if(k.leaf&&k.p!=q||(m-o)*xg)x=g;k=k.cn*x*x*x;s=s*k;u=u*k;q.fx+=s;q.fy+=u}}else if(!k.leaf){var t=(o+m)*0.5,p=(n+r)*0.5;k.c1&&d(k.c1,q,o,n,t,p);k.c2&&d(k.c2,q,t,n, -m,p);k.c3&&d(k.c3,q,o,p,t,r);k.c4&&d(k.c4,q,t,p,m,r);if(!(xg)x=g;if(k.p&&k.p!=q){k=b*x*x*x;s=s*k;u=u*k;q.fx+=s;q.fy+=u}}}}var f=2,g=1/f,h=500,i=1/h,j=0.9,l={};arguments.length||(b=-40);l.constant=function(k){if(arguments.length){b=Number(k);return l}return b};l.domain=function(k,q){if(arguments.length){f=Number(k);g=1/f;h=Number(q);i=1/h;return l}return[f,h]};l.theta=function(k){if(arguments.length){j=Number(k);return l}return j};l.apply=function(k,q){c(q.root);for(k=k;k;k=k.next)d(q.root, -k,q.xMin,q.yMin,q.xMax,q.yMax)};return l};pv.Force.drag=function(b){var c={};arguments.length||(b=0.1);c.constant=function(d){if(arguments.length){b=d;return c}return b};c.apply=function(d){if(b)for(d=d;d;d=d.next){d.fx-=b*d.vx;d.fy-=b*d.vy}};return c}; -pv.Force.spring=function(b){var c=0.1,d=20,f,g,h={};arguments.length||(b=0.1);h.links=function(i){if(arguments.length){f=i;g=i.map(function(j){return 1/Math.sqrt(Math.max(j.sourceNode.linkDegree,j.targetNode.linkDegree))});return h}return f};h.constant=function(i){if(arguments.length){b=Number(i);return h}return b};h.damping=function(i){if(arguments.length){c=Number(i);return h}return c};h.length=function(i){if(arguments.length){d=Number(i);return h}return d};h.apply=function(){for(var i=0;ig,p=sh){k.c1&&t&&c(k.c1,q,o,n,s,u);k.c2&&p&&c(k.c2,q,s,n,m,u)}if(x){k.c3&&t&&c(k.c3,q,o,u,s,r);k.c4&&p&&c(k.c4,q,s,u,m,r)}}if(k.p&&k.p!=q){o=q.x-k.p.x;n=q.y-k.p.y;m=Math.sqrt(o*o+n*n);r=f+b(k.p);if(mm)m=n}for(var r=0;rc.max?c.max:g.x;if(d)for(g=f;g;g=g.next)g.y=g.yd.max?d.max:g.y};return b};pv.Layout=function(){pv.Panel.call(this)};pv.Layout.prototype=pv.extend(pv.Panel); -pv.Layout.prototype.property=function(b,c){if(!this.hasOwnProperty("properties"))this.properties=pv.extend(this.properties);this.properties[b]=true;this.propertyMethod(b,false,pv.Mark.cast[b]=c);return this}; -pv.Layout.Network=function(){pv.Layout.call(this);var b=this;this.$id=pv.id();(this.node=(new pv.Mark).data(function(){return b.nodes()}).strokeStyle("#1f77b4").fillStyle("#fff").left(function(c){return c.x}).top(function(c){return c.y})).parent=this;this.link=(new pv.Mark).extend(this.node).data(function(c){return[c.sourceNode,c.targetNode]}).fillStyle(null).lineWidth(function(c,d){return d.linkValue*1.5}).strokeStyle("rgba(0,0,0,.2)");this.link.add=function(c){return b.add(pv.Panel).data(function(){return b.links()}).add(c).extend(this)}; -(this.label=(new pv.Mark).extend(this.node).textMargin(7).textBaseline("middle").text(function(c){return c.nodeName||c.nodeValue}).textAngle(function(c){c=c.midAngle;return pv.Wedge.upright(c)?c:c+Math.PI}).textAlign(function(c){return pv.Wedge.upright(c.midAngle)?"left":"right"})).parent=this}; -pv.Layout.Network.prototype=pv.extend(pv.Layout).property("nodes",function(b){return b.map(function(c,d){if(typeof c!="object")c={nodeValue:c};c.index=d;c.linkDegree=0;return c})}).property("links",function(b){return b.map(function(c){if(isNaN(c.linkValue))c.linkValue=isNaN(c.value)?1:c.value;return c})});pv.Layout.Network.prototype.reset=function(){this.$id=pv.id();return this}; -pv.Layout.Network.prototype.buildProperties=function(b,c){if((b.$id||0)=this.$id)return true;b.$id=this.$id;b.links.forEach(function(c){var d=c.linkValue;(c.sourceNode||(c.sourceNode=b.nodes[c.source])).linkDegree+=d;(c.targetNode||(c.targetNode=b.nodes[c.target])).linkDegree+=d})}; -pv.Layout.Hierarchy=function(){pv.Layout.Network.call(this);this.link.strokeStyle("#ccc")};pv.Layout.Hierarchy.prototype=pv.extend(pv.Layout.Network);pv.Layout.Hierarchy.prototype.buildImplied=function(b){if(!b.links)b.links=pv.Layout.Hierarchy.links.call(this);pv.Layout.Network.prototype.buildImplied.call(this,b)};pv.Layout.Hierarchy.links=function(){return this.nodes().filter(function(b){return b.parentNode}).map(function(b){return{sourceNode:b,targetNode:b.parentNode,linkValue:1}})}; -pv.Layout.Hierarchy.NodeLink={buildImplied:function(b){function c(m){return m.parentNode?m.depth*(o-q)+q:0}function d(m){return m.parentNode?(m.breadth-0.25)*2*Math.PI:0}function f(m){switch(i){case "left":return m.depth*l;case "right":return l-m.depth*l;case "top":return m.breadth*l;case "bottom":return l-m.breadth*l;case "radial":return l/2+c(m)*Math.cos(m.midAngle)}}function g(m){switch(i){case "left":return m.breadth*k;case "right":return k-m.breadth*k;case "top":return m.depth*k;case "bottom":return k- -m.depth*k;case "radial":return k/2+c(m)*Math.sin(m.midAngle)}}var h=b.nodes,i=b.orient,j=/^(top|bottom)$/.test(i),l=b.width,k=b.height;if(i=="radial"){var q=b.innerRadius,o=b.outerRadius;if(q==null)q=0;if(o==null)o=Math.min(l,k)/2}for(b=0;bb.dy?0:-Math.PI/2});(this.leaf=(new pv.Mark).extend(this.node).fillStyle(null).strokeStyle(null).visible(function(b){return!b.firstChild})).parent= -this;delete this.link};pv.Layout.Treemap.prototype=pv.extend(pv.Layout.Hierarchy).property("round",Boolean).property("paddingLeft",Number).property("paddingRight",Number).property("paddingTop",Number).property("paddingBottom",Number).property("mode",String).property("order",String);a=pv.Layout.Treemap.prototype;a.defaults=(new pv.Layout.Treemap).extend(pv.Layout.Hierarchy.prototype.defaults).mode("squarify").order("ascending");a.padding=function(b){return this.paddingLeft(b).paddingRight(b).paddingTop(b).paddingBottom(b)}; -a.$size=function(b){return Number(b.nodeValue)};a.size=function(b){this.$size=pv.functor(b);return this}; -a.buildImplied=function(b){function c(r,s,u,x,t,p,v){for(var w=0,y=0;wu)u=v;t+=v}t*=t;s*=s;return Math.max(s*u/t,t/(s*x))}function f(r,s){function u(A){var D=p==y,G=pv.sum(A,o),E=y?n(G/y):0;c(A,G,D,x,t,D?p:E,D?E:v);if(D){t+=E;v-=E}else{x+= -E;p-=E}y=Math.min(p,v);return D}var x=r.x+j,t=r.y+k,p=r.dx-j-l,v=r.dy-k-q;if(m!="squarify")c(r.childNodes,r.size,m=="slice"?true:m=="dice"?false:s&1,x,t,p,v);else{var w=[];s=Infinity;var y=Math.min(p,v),z=p*v/r.size;if(!(r.size<=0)){r.visitBefore(function(A){A.size*=z});for(r=r.childNodes.slice();r.length;){var C=r[r.length-1];if(C.size){w.push(C);z=d(w,y);if(z<=s){r.pop();s=z}else{w.pop();u(w);w.length=0;s=Infinity}}else r.pop()}if(u(w))for(s=0;s0){i(l(C,p,v),p,B);A+=B;D+=B}G+=C.mod;A+=y.mod;E+=w.mod;D+=z.mod;C=h(C);y=g(y)}if(C&&!h(z)){z.thread=C;z.mod+=G-D}if(y&&!g(w)){w.thread=y;w.mod+=A-E;v=p}}return v}function g(p){return p.firstChild||p.thread}function h(p){return p.lastChild||p.thread}function i(p,v,w){var y=v.number-p.number;v.change-=w/y;v.shift+=w;p.change+= -w/y;v.prelim+=w;v.mod+=w}function j(p){var v=0,w=0;for(p=p.lastChild;p;p=p.previousSibling){p.prelim+=v;p.mod+=v;w+=p.change;v+=p.shift+w}}function l(p,v,w){return p.ancestor.parentNode==v.parentNode?p.ancestor:w}function k(p,v){return(v?1:u+1)/(m=="radial"?p:1)}function q(p){return m=="radial"?p.breadth/r:0}function o(p){switch(m){case "left":return p.depth;case "right":return x-p.depth;case "top":case "bottom":return p.breadth+x/2;case "radial":return x/2+p.depth*Math.cos(q(p))}}function n(p){switch(m){case "left":case "right":return p.breadth+ -t/2;case "top":return p.depth;case "bottom":return t-p.depth;case "radial":return t/2+p.depth*Math.sin(q(p))}}if(!pv.Layout.Hierarchy.prototype.buildImplied.call(this,b)){var m=b.orient,r=b.depth,s=b.breadth,u=b.group,x=b.width,t=b.height;b=b.nodes[0];b.visitAfter(function(p,v){p.ancestor=p;p.prelim=0;p.mod=0;p.change=0;p.shift=0;p.number=p.previousSibling?p.previousSibling.number+1:0;p.depth=v});c(b);d(b,-b.prelim,0);b.visitAfter(function(p){p.breadth*=s;p.depth*=r;p.midAngle=q(p);p.x=o(p);p.y=n(p); -if(p.firstChild)p.midAngle+=Math.PI;delete p.breadth;delete p.depth;delete p.ancestor;delete p.prelim;delete p.mod;delete p.change;delete p.shift;delete p.number;delete p.thread})}};pv.Layout.Indent=function(){pv.Layout.Hierarchy.call(this);this.link.interpolate("step-after")};pv.Layout.Indent.prototype=pv.extend(pv.Layout.Hierarchy).property("depth",Number).property("breadth",Number);pv.Layout.Indent.prototype.defaults=(new pv.Layout.Indent).extend(pv.Layout.Hierarchy.prototype.defaults).depth(15).breadth(15); -pv.Layout.Indent.prototype.buildImplied=function(b){function c(i,j,l){i.x=g+l++*f;i.y=h+j++*d;i.midAngle=0;for(i=i.firstChild;i;i=i.nextSibling)j=c(i,j,l);return j}if(!pv.Layout.Hierarchy.prototype.buildImplied.call(this,b)){var d=b.breadth,f=b.depth,g=0,h=0;c(b.nodes[0],1,1)}};pv.Layout.Pack=function(){pv.Layout.Hierarchy.call(this);this.node.radius(function(b){return b.radius}).strokeStyle("rgb(31, 119, 180)").fillStyle("rgba(31, 119, 180, .25)");this.label.textAlign("center");delete this.link}; -pv.Layout.Pack.prototype=pv.extend(pv.Layout.Hierarchy).property("spacing",Number).property("order",String);pv.Layout.Pack.prototype.defaults=(new pv.Layout.Pack).extend(pv.Layout.Hierarchy.prototype.defaults).spacing(1).order("ascending");pv.Layout.Pack.prototype.$radius=function(){return 1};pv.Layout.Pack.prototype.size=function(b){this.$radius=typeof b=="function"?function(){return Math.sqrt(b.apply(this,arguments))}:(b=Math.sqrt(b),function(){return b});return this}; -pv.Layout.Pack.prototype.buildImplied=function(b){function c(o){var n=pv.Mark.stack;n.unshift(null);for(var m=0,r=o.length;m0.0010}var u=Infinity,x=-Infinity,t=Infinity,p=-Infinity,v,w,y,z,C;v=o[0];v.x=-v.radius;v.y=0;n(v);if(o.length>1){w=o[1];w.x=w.radius;w.y=0;n(w);if(o.length>2){y=o[2];g(v,w,y);n(y);m(v,y);v.p= -y;m(y,w);w=v.n;for(var A=3;A0){r(v,z);w=z;A--}else if(D<0){r(z,w);v=z;A--}}}}v=(u+x)/2;w=(t+p)/2;for(A=y=0;Ao.min){o.sim.step(); -q=true}q&&d.render()},42)}else for(l=0;lg)g=j;i.size=i.firstChild?pv.sum(i.childNodes,function(l){return l.size}):c.$size.apply(c,(f[0]=i,f))});f.shift();switch(b.order){case "ascending":d.sort(function(i,j){return i.size-j.size});break;case "descending":d.sort(function(i,j){return j.size-i.size});break}var h=1/g;d.minBreadth=0;d.breadth= -0.5;d.maxBreadth=1;d.visitBefore(function(i){for(var j=i.minBreadth,l=i.maxBreadth-j,k=i.firstChild;k;k=k.nextSibling){k.minBreadth=j;k.maxBreadth=j+=k.size/i.size*l;k.breadth=(j+k.minBreadth)/2}});d.visitAfter(function(i,j){i.minDepth=(j-1)*h;i.maxDepth=i.depth=j*h});pv.Layout.Hierarchy.NodeLink.buildImplied.call(this,b)}};pv.Layout.Partition.Fill=function(){pv.Layout.Partition.call(this);pv.Layout.Hierarchy.Fill.constructor.call(this)};pv.Layout.Partition.Fill.prototype=pv.extend(pv.Layout.Partition); -pv.Layout.Partition.Fill.prototype.buildImplied=function(b){pv.Layout.Partition.prototype.buildImplied.call(this,b)||pv.Layout.Hierarchy.Fill.buildImplied.call(this,b)};pv.Layout.Arc=function(){pv.Layout.Network.call(this);var b,c,d,f=this.buildImplied;this.buildImplied=function(g){f.call(this,g);c=g.directed;b=g.orient=="radial"?"linear":"polar";d=g.orient=="right"||g.orient=="top"};this.link.data(function(g){var h=g.sourceNode;g=g.targetNode;return d!=(c||h.breadth>1)*f:null}).bottom(function(l,k){return d=="mirror"?k&1?null:(k+1>>1)*-f:(k&1||-1)*(k+1>>1)*f}).fillStyle(function(l,k){return(k&1?h:i)((k>>1)+1)});this.band.add=function(l){return b.add(pv.Panel).extend(c).add(l).extend(this)}};pv.Layout.Horizon.prototype=pv.extend(pv.Layout).property("bands",Number).property("mode",String).property("backgroundStyle",pv.color).property("positiveStyle",pv.color).property("negativeStyle",pv.color); -pv.Layout.Horizon.prototype.defaults=(new pv.Layout.Horizon).extend(pv.Layout.prototype.defaults).bands(2).mode("offset").backgroundStyle("white").positiveStyle("#1f77b4").negativeStyle("#d62728"); -pv.Layout.Rollup=function(){pv.Layout.Network.call(this);var b=this,c,d,f=b.buildImplied;this.buildImplied=function(g){f.call(this,g);c=g.$rollup.nodes;d=g.$rollup.links};this.node.data(function(){return c}).size(function(g){return g.nodes.length*20});this.link.interpolate("polar").eccentricity(0.8);this.link.add=function(g){return b.add(pv.Panel).data(function(){return d}).add(g).extend(this)}};pv.Layout.Rollup.prototype=pv.extend(pv.Layout.Network).property("directed",Boolean); -pv.Layout.Rollup.prototype.x=function(b){this.$x=pv.functor(b);return this};pv.Layout.Rollup.prototype.y=function(b){this.$y=pv.functor(b);return this}; -pv.Layout.Rollup.prototype.buildImplied=function(b){function c(r){return i[r]+","+j[r]}if(!pv.Layout.Network.prototype.buildImplied.call(this,b)){var d=b.nodes,f=b.links,g=b.directed,h=d.length,i=[],j=[],l=0,k={},q={},o=pv.Mark.stack,n={parent:this};o.unshift(null);for(var m=0;ml.index?l.index+","+d.index:d.index+","+l.index;(o=q[h])||(o=q[h]={sourceNode:d,targetNode:l,linkValue:0,links:[]});o.links.push(f[m]);o.linkValue+=f[m].linkValue}b.$rollup={nodes:pv.values(k),links:pv.values(q)}}}; -pv.Layout.Matrix=function(){pv.Layout.Network.call(this);var b,c,d,f,g,h=this.buildImplied;this.buildImplied=function(i){h.call(this,i);b=i.nodes.length;c=i.width/b;d=i.height/b;f=i.$matrix.labels;g=i.$matrix.pairs};this.link.data(function(){return g}).left(function(){return c*(this.index%b)}).top(function(){return d*Math.floor(this.index/b)}).width(function(){return c}).height(function(){return d}).lineWidth(1.5).strokeStyle("#fff").fillStyle(function(i){return i.linkValue?"#555":"#eee"}).parent= -this;delete this.link.add;this.label.data(function(){return f}).left(function(){return this.index&1?c*((this.index>>1)+0.5):null}).top(function(){return this.index&1?null:d*((this.index>>1)+0.5)}).textMargin(4).textAlign(function(){return this.index&1?"left":"right"}).textAngle(function(){return this.index&1?-Math.PI/2:0});delete this.node};pv.Layout.Matrix.prototype=pv.extend(pv.Layout.Network).property("directed",Boolean);pv.Layout.Matrix.prototype.sort=function(b){this.$sort=b;return this}; -pv.Layout.Matrix.prototype.buildImplied=function(b){if(!pv.Layout.Network.prototype.buildImplied.call(this,b)){var c=b.nodes,d=b.links,f=this.$sort,g=c.length,h=pv.range(g),i=[],j=[],l={};b.$matrix={labels:i,pairs:j};f&&h.sort(function(m,r){return f(c[m],c[r])});for(var k=0;kl)k=null;if(g){if(k&&g.scene==k.scene&&g.index==k.index)return;pv.Mark.dispatch("unpoint",g.scene,g.index)}if(g=k){pv.Mark.dispatch("point",k.scene,k.index);pv.listen(this.root.canvas(),"mouseout",f)}}function f(k){if(g&&!pv.ancestor(this,k.relatedTarget)){pv.Mark.dispatch("unpoint",g.scene,g.index);g=null}}var g,h=null,i=1,j=1,l=arguments.length?b*b:900;d.collapse=function(k){if(arguments.length){h=String(k);switch(h){case "y":i= -1;j=0;break;case "x":i=0;j=1;break;default:j=i=1;break}return d}return h};return d}; -pv.Behavior.select=function(){function b(j){g=this.index;f=this.scene;i=this.mouse();h=j;h.x=i.x;h.y=i.y;h.dx=h.dy=0;pv.Mark.dispatch("selectstart",f,g)}function c(){if(f){f.mark.context(f,g,function(){var j=this.mouse();h.x=Math.max(0,Math.min(i.x,j.x));h.y=Math.max(0,Math.min(i.y,j.y));h.dx=Math.min(this.width(),Math.max(j.x,i.x))-h.x;h.dy=Math.min(this.height(),Math.max(j.y,i.y))-h.y;this.render()});pv.Mark.dispatch("select",f,g)}}function d(){if(f){pv.Mark.dispatch("selectend",f,g);f=null}}var f, -g,h,i;pv.listen(window,"mousemove",c);pv.listen(window,"mouseup",d);return b}; -pv.Behavior.resize=function(b){function c(l){h=this.index;g=this.scene;j=this.mouse();i=l;switch(b){case "left":j.x=i.x+i.dx;break;case "right":j.x=i.x;break;case "top":j.y=i.y+i.dy;break;case "bottom":j.y=i.y;break}pv.Mark.dispatch("resizestart",g,h)}function d(){if(g){g.mark.context(g,h,function(){var l=this.mouse();i.x=Math.max(0,Math.min(j.x,l.x));i.y=Math.max(0,Math.min(j.y,l.y));i.dx=Math.min(this.parent.width(),Math.max(l.x,j.x))-i.x;i.dy=Math.min(this.parent.height(),Math.max(l.y,j.y))-i.y; -this.render()});pv.Mark.dispatch("resize",g,h)}}function f(){if(g){pv.Mark.dispatch("resizeend",g,h);g=null}}var g,h,i,j;pv.listen(window,"mousemove",d);pv.listen(window,"mouseup",f);return c}; -pv.Behavior.pan=function(){function b(){g=this.index;f=this.scene;i=pv.vector(pv.event.pageX,pv.event.pageY);h=this.transform();j=1/(h.k*this.scale);if(l)l={x:(1-h.k)*this.width(),y:(1-h.k)*this.height()}}function c(){if(f){f.mark.context(f,g,function(){var k=h.translate((pv.event.pageX-i.x)*j,(pv.event.pageY-i.y)*j);if(l){k.x=Math.max(l.x,Math.min(0,k.x));k.y=Math.max(l.y,Math.min(0,k.y))}this.transform(k).render()});pv.Mark.dispatch("pan",f,g)}}function d(){f=null}var f,g,h,i,j,l;b.bound=function(k){if(arguments.length){l= -Boolean(k);return this}return Boolean(l)};pv.listen(window,"mousemove",c);pv.listen(window,"mouseup",d);return b}; -pv.Behavior.zoom=function(b){function c(){var f=this.mouse(),g=pv.event.wheel*b;f=this.transform().translate(f.x,f.y).scale(g<0?1E3/(1E3-g):(1E3+g)/1E3).translate(-f.x,-f.y);if(d){f.k=Math.max(1,f.k);f.x=Math.max((1-f.k)*this.width(),Math.min(0,f.x));f.y=Math.max((1-f.k)*this.height(),Math.min(0,f.y))}this.transform(f).render();pv.Mark.dispatch("zoom",this.scene,this.index)}var d;arguments.length||(b=1/48);c.bound=function(f){if(arguments.length){d=Boolean(f);return this}return Boolean(d)};return c}; -pv.Geo=function(){}; -pv.Geo.projections={mercator:{project:function(b){return{x:b.lng/180,y:b.lat>85?1:b.lat<-85?-1:Math.log(Math.tan(Math.PI/4+pv.radians(b.lat)/2))/Math.PI}},invert:function(b){return{lng:b.x*180,lat:pv.degrees(2*Math.atan(Math.exp(b.y*Math.PI))-Math.PI/2)}}},"gall-peters":{project:function(b){return{x:b.lng/180,y:Math.sin(pv.radians(b.lat))}},invert:function(b){return{lng:b.x*180,lat:pv.degrees(Math.asin(b.y))}}},sinusoidal:{project:function(b){return{x:pv.radians(b.lng)*Math.cos(pv.radians(b.lat))/Math.PI, -y:b.lat/90}},invert:function(b){return{lng:pv.degrees(b.x*Math.PI/Math.cos(b.y*Math.PI/2)),lat:b.y*90}}},aitoff:{project:function(b){var c=pv.radians(b.lng);b=pv.radians(b.lat);var d=Math.acos(Math.cos(b)*Math.cos(c/2));return{x:2*(d?Math.cos(b)*Math.sin(c/2)*d/Math.sin(d):0)/Math.PI,y:2*(d?Math.sin(b)*d/Math.sin(d):0)/Math.PI}},invert:function(b){var c=b.y*Math.PI/2;return{lng:pv.degrees(b.x*Math.PI/2/Math.cos(c)),lat:pv.degrees(c)}}},hammer:{project:function(b){var c=pv.radians(b.lng);b=pv.radians(b.lat); -var d=Math.sqrt(1+Math.cos(b)*Math.cos(c/2));return{x:2*Math.SQRT2*Math.cos(b)*Math.sin(c/2)/d/3,y:Math.SQRT2*Math.sin(b)/d/1.5}},invert:function(b){var c=b.x*3;b=b.y*1.5;var d=Math.sqrt(1-c*c/16-b*b/4);return{lng:pv.degrees(2*Math.atan2(d*c,2*(2*d*d-1))),lat:pv.degrees(Math.asin(d*b))}}},identity:{project:function(b){return{x:b.lng/180,y:b.lat/90}},invert:function(b){return{lng:b.x*180,lat:b.y*90}}}}; -pv.Geo.scale=function(b){function c(m){if(!o||m.lng!=o.lng||m.lat!=o.lat){o=m;m=d(m);n={x:l(m.x),y:k(m.y)}}return n}function d(m){return j.project({lng:m.lng-q.lng,lat:m.lat})}function f(m){m=j.invert(m);m.lng+=q.lng;return m}var g={x:0,y:0},h={x:1,y:1},i=[],j=pv.Geo.projections.identity,l=pv.Scale.linear(-1,1).range(0,1),k=pv.Scale.linear(-1,1).range(1,0),q={lng:0,lat:0},o,n;c.x=function(m){return c(m).x};c.y=function(m){return c(m).y};c.ticks={lng:function(m){var r;if(i.length>1){var s=pv.Scale.linear(); -if(m==undefined)m=10;r=s.domain(i,function(u){return u.lat}).ticks(m);m=s.domain(i,function(u){return u.lng}).ticks(m)}else{r=pv.range(-80,81,10);m=pv.range(-180,181,10)}return m.map(function(u){return r.map(function(x){return{lat:x,lng:u}})})},lat:function(m){return pv.transpose(c.ticks.lng(m))}};c.invert=function(m){return f({x:l.invert(m.x),y:k.invert(m.y)})};c.domain=function(m,r){if(arguments.length){i=m instanceof Array?arguments.length>1?pv.map(m,r):m:Array.prototype.slice.call(arguments); -if(i.length>1){var s=i.map(function(x){return x.lng}),u=i.map(function(x){return x.lat});q={lng:(pv.max(s)+pv.min(s))/2,lat:(pv.max(u)+pv.min(u))/2};s=i.map(d);l.domain(s,function(x){return x.x});k.domain(s,function(x){return x.y})}else{q={lng:0,lat:0};l.domain(-1,1);k.domain(-1,1)}o=null;return this}return i};c.range=function(m,r){if(arguments.length){if(typeof m=="object"){g={x:Number(m.x),y:Number(m.y)};h={x:Number(r.x),y:Number(r.y)}}else{g={x:0,y:0};h={x:Number(m),y:Number(r)}}l.range(g.x,h.x); -k.range(h.y,g.y);o=null;return this}return[g,h]};c.projection=function(m){if(arguments.length){j=typeof m=="string"?pv.Geo.projections[m]||pv.Geo.projections.identity:m;return this.domain(i)}return m};c.by=function(m){function r(){return c(m.apply(this,arguments))}for(var s in c)r[s]=c[s];return r};arguments.length&&c.projection(b);return c}; diff --git a/lib/protovis/src/behavior/Behavior.js b/lib/protovis/src/behavior/Behavior.js deleted file mode 100644 index 0f54e1de..00000000 --- a/lib/protovis/src/behavior/Behavior.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Abstract; see an implementing class for details. - * - * @class Represents a reusable interaction; applies an interactive behavior to - * a given mark. Behaviors are themselves functions designed to be used as event - * handlers. For example, to add pan and zoom support to any panel, say: - * - *

    .event("mousedown", pv.Behavior.pan())
- *     .event("mousewheel", pv.Behavior.zoom())
- * - * The behavior should be registered on the event that triggers the start of the - * behavior. Typically, the behavior will take care of registering for any - * additional events that are necessary. For example, dragging starts on - * mousedown, while the drag behavior automatically listens for mousemove and - * mouseup events on the window. By listening to the window, the behavior can - * continue to receive mouse events even if the mouse briefly leaves the mark - * being dragged, or even the root panel. - * - *

Each behavior implementation has specific requirements as to which events - * it supports, and how it should be used. For example, the drag behavior - * requires that the data associated with the mark be an object with x - * and y attributes, such as a {@link pv.Vector}, storing the mark's - * position. See an implementing class for details. - * - * @see pv.Behavior.drag - * @see pv.Behavior.pan - * @see pv.Behavior.point - * @see pv.Behavior.select - * @see pv.Behavior.zoom - * @extends function - */ -pv.Behavior = {}; diff --git a/lib/protovis/src/behavior/Drag.js b/lib/protovis/src/behavior/Drag.js deleted file mode 100644 index 6f33fa96..00000000 --- a/lib/protovis/src/behavior/Drag.js +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Returns a new drag behavior to be registered on mousedown events. - * - * @class Implements interactive dragging starting with mousedown events. - * Register this behavior on marks that should be draggable by the user, such as - * the selected region for brushing and linking. This behavior can be used in - * tandom with {@link pv.Behavior.select} to allow the selected region to be - * dragged interactively. - * - *

After the initial mousedown event is triggered, this behavior listens for - * mousemove and mouseup events on the window. This allows dragging to continue - * even if the mouse temporarily leaves the mark that is being dragged, or even - * the root panel. - * - *

This behavior requires that the data associated with the mark being - * dragged have x and y attributes that correspond to the - * mark's location in pixels. The mark's positional properties are not set - * directly by this behavior; instead, the positional properties should be - * defined as: - * - *

    .left(function(d) d.x)
- *     .top(function(d) d.y)
- * - * Thus, the behavior does not move the mark directly, but instead updates the - * mark position by updating the underlying data. Note that if the positional - * properties are defined with bottom and right (rather than top and left), the - * drag behavior will be inverted, which will confuse users! - * - *

The drag behavior is bounded by the parent panel; the x and - * y attributes are clamped such that the mark being dragged does not - * extend outside the enclosing panel's bounds. To facilitate this, the drag - * behavior also queries for dx and dy attributes on the - * underlying data, to determine the dimensions of the bar being dragged. For - * non-rectangular marks, the drag behavior simply treats the mark as a point, - * which means that only the mark's center is bounded. - * - *

The mark being dragged is automatically re-rendered for each mouse event - * as part of the drag operation. In addition, a fix attribute is - * populated on the mark, which allows visual feedback for dragging. For - * example, to change the mark fill color while dragging: - * - *

    .fillStyle(function(d) d.fix ? "#ff7f0e" : "#aec7e8")
- * - * In some cases, such as with network layouts, dragging the mark may cause - * related marks to change, in which case additional marks may also need to be - * rendered. This can be accomplished by listening for the drag - * psuedo-events:
    - * - *
  • dragstart (on mousedown) - *
  • drag (on mousemove) - *
  • dragend (on mouseup) - * - *
For example, to render the parent panel while dragging, thus - * re-rendering all sibling marks: - * - *
    .event("mousedown", pv.Behavior.drag())
- *     .event("drag", function() this.parent)
- * - * This behavior may be enhanced in the future to allow more flexible - * configuration of drag behavior. - * - * @extends pv.Behavior - * @see pv.Behavior - * @see pv.Behavior.select - * @see pv.Layout.force - */ -pv.Behavior.drag = function() { - var scene, // scene context - index, // scene context - p, // particle being dragged - v1, // initial mouse-particle offset - max; - - /** @private */ - function mousedown(d) { - index = this.index; - scene = this.scene; - var m = this.mouse(); - v1 = ((p = d).fix = pv.vector(d.x, d.y)).minus(m); - max = { - x: this.parent.width() - (d.dx || 0), - y: this.parent.height() - (d.dy || 0) - }; - scene.mark.context(scene, index, function() { this.render(); }); - pv.Mark.dispatch("dragstart", scene, index); - } - - /** @private */ - function mousemove() { - if (!scene) return; - scene.mark.context(scene, index, function() { - var m = this.mouse(); - p.x = p.fix.x = Math.max(0, Math.min(v1.x + m.x, max.x)); - p.y = p.fix.y = Math.max(0, Math.min(v1.y + m.y, max.y)); - this.render(); - }); - pv.Mark.dispatch("drag", scene, index); - } - - /** @private */ - function mouseup() { - if (!scene) return; - p.fix = null; - scene.mark.context(scene, index, function() { this.render(); }); - pv.Mark.dispatch("dragend", scene, index); - scene = null; - } - - pv.listen(window, "mousemove", mousemove); - pv.listen(window, "mouseup", mouseup); - return mousedown; -}; diff --git a/lib/protovis/src/behavior/Pan.js b/lib/protovis/src/behavior/Pan.js deleted file mode 100644 index d9c50c83..00000000 --- a/lib/protovis/src/behavior/Pan.js +++ /dev/null @@ -1,110 +0,0 @@ -/** - * Returns a new pan behavior to be registered on mousedown events. - * - * @class Implements interactive panning starting with mousedown events. - * Register this behavior on panels to allow panning. This behavior can be used - * in tandem with {@link pv.Behavior.zoom} to allow both panning and zooming: - * - *
    .event("mousedown", pv.Behavior.pan())
- *     .event("mousewheel", pv.Behavior.zoom())
- * - * The pan behavior currently supports only mouse events; support for keyboard - * shortcuts to improve accessibility may be added in the future. - * - *

After the initial mousedown event is triggered, this behavior listens for - * mousemove and mouseup events on the window. This allows panning to continue - * even if the mouse temporarily leaves the panel that is being panned, or even - * the root panel. - * - *

The implementation of this behavior relies on the panel's - * transform property, which specifies a matrix transformation that is - * applied to child marks. Note that the transform property only affects the - * panel's children, but not the panel itself; therefore the panel's fill and - * stroke will not change when the contents are panned. - * - *

Panels have transparent fill styles by default; this means that panels may - * not receive the initial mousedown event to start panning. To fix this - * problem, either given the panel a visible fill style (such as "white"), or - * set the events property to "all" such that the panel receives events - * despite its transparent fill. - * - *

The pan behavior has optional support for bounding. If enabled, the user - * will not be able to pan the panel outside of the initial bounds. This feature - * is designed to work in conjunction with the zoom behavior; otherwise, - * bounding the panel effectively disables all panning. - * - * @extends pv.Behavior - * @see pv.Behavior.zoom - * @see pv.Panel#transform - */ -pv.Behavior.pan = function() { - var scene, // scene context - index, // scene context - m1, // transformation matrix at the start of panning - v1, // mouse location at the start of panning - k, // inverse scale - bound; // whether to bound to the panel - - /** @private */ - function mousedown() { - index = this.index; - scene = this.scene; - v1 = pv.vector(pv.event.pageX, pv.event.pageY); - m1 = this.transform(); - k = 1 / (m1.k * this.scale); - if (bound) { - bound = { - x: (1 - m1.k) * this.width(), - y: (1 - m1.k) * this.height() - }; - } - } - - /** @private */ - function mousemove() { - if (!scene) return; - scene.mark.context(scene, index, function() { - var x = (pv.event.pageX - v1.x) * k, - y = (pv.event.pageY - v1.y) * k, - m = m1.translate(x, y); - if (bound) { - m.x = Math.max(bound.x, Math.min(0, m.x)); - m.y = Math.max(bound.y, Math.min(0, m.y)); - } - this.transform(m).render(); - }); - pv.Mark.dispatch("pan", scene, index); - } - - /** @private */ - function mouseup() { - scene = null; - } - - /** - * Sets or gets the bound parameter. If bounding is enabled, the user will not - * be able to pan outside the initial panel bounds; this typically applies - * only when the pan behavior is used in tandem with the zoom behavior. - * Bounding is not enabled by default. - * - *

Note: enabling bounding after panning has already occurred will not - * immediately reset the transform. Bounding should be enabled before the - * panning behavior is applied. - * - * @function - * @returns {pv.Behavior.pan} this, or the current bound parameter. - * @name pv.Behavior.pan.prototype.bound - * @param {boolean} [x] the new bound parameter. - */ - mousedown.bound = function(x) { - if (arguments.length) { - bound = Boolean(x); - return this; - } - return Boolean(bound); - }; - - pv.listen(window, "mousemove", mousemove); - pv.listen(window, "mouseup", mouseup); - return mousedown; -}; diff --git a/lib/protovis/src/behavior/Point.js b/lib/protovis/src/behavior/Point.js deleted file mode 100644 index 566c3be7..00000000 --- a/lib/protovis/src/behavior/Point.js +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Returns a new point behavior to be registered on mousemove events. - * - * @class Implements interactive fuzzy pointing, identifying marks that are in - * close proximity to the mouse cursor. This behavior is an alternative to the - * native mouseover and mouseout events, improving usability. Rather than - * requiring the user to mouseover a mark exactly, the mouse simply needs to - * move near the given mark and a "point" event is triggered. In addition, if - * multiple marks overlap, the point behavior can be used to identify the mark - * instance closest to the cursor, as opposed to the one that is rendered on - * top. - * - *

The point behavior can also identify the closest mark instance for marks - * that produce a continuous graphic primitive. The point behavior can thus be - * used to provide details-on-demand for both discrete marks (such as dots and - * bars), as well as continuous marks (such as lines and areas). - * - *

This behavior is implemented by finding the closest mark instance to the - * mouse cursor on every mousemove event. If this closest mark is within the - * given radius threshold, which defaults to 30 pixels, a "point" psuedo-event - * is dispatched to the given mark instance. If any mark were previously - * pointed, it would receive a corresponding "unpoint" event. These two - * psuedo-event types correspond to the native "mouseover" and "mouseout" - * events, respectively. To increase the radius at which the point behavior can - * be applied, specify an appropriate threshold to the constructor, up to - * Infinity. - * - *

By default, the standard Cartesian distance is computed. However, with - * some visualizations it is desirable to consider only a single dimension, such - * as the x-dimension for an independent variable. In this case, the - * collapse parameter can be set to collapse the y dimension: - * - *

    .event("mousemove", pv.Behavior.point(Infinity).collapse("y"))
- * - *

This behavior only listens to mousemove events on the assigned panel, - * which is typically the root panel. The behavior will search recursively for - * descendant marks to point. If the mouse leaves the assigned panel, the - * behavior no longer receives mousemove events; an unpoint psuedo-event is - * automatically dispatched to unpoint any pointed mark. Marks may be re-pointed - * when the mouse reenters the panel. - * - *

Panels have transparent fill styles by default; this means that panels may - * not receive the initial mousemove event to start pointing. To fix this - * problem, either given the panel a visible fill style (such as "white"), or - * set the events property to "all" such that the panel receives events - * despite its transparent fill. - * - *

Note: this behavior does not currently wedge marks. - * - * @extends pv.Behavior - * - * @param {number} [r] the fuzzy radius threshold in pixels - * @see "The Bubble Cursor: Enhancing Target Acquisition by Dynamic Resizing of the - * Cursor's Activation Area" by T. Grossman & R. Balakrishnan, CHI 2005. - */ -pv.Behavior.point = function(r) { - var unpoint, // the current pointer target - collapse = null, // dimensions to collapse - kx = 1, // x-dimension cost scale - ky = 1, // y-dimension cost scale - r2 = arguments.length ? r * r : 900; // fuzzy radius - - /** @private Search for the mark closest to the mouse. */ - function search(scene, index) { - var s = scene[index], - point = {cost: Infinity}; - for (var i = 0, n = s.visible && s.children.length; i < n; i++) { - var child = s.children[i], mark = child.mark, p; - if (mark.type == "panel") { - mark.scene = child; - for (var j = 0, m = child.length; j < m; j++) { - mark.index = j; - p = search(child, j); - if (p.cost < point.cost) point = p; - } - delete mark.scene; - delete mark.index; - } else if (mark.$handlers.point) { - var v = mark.mouse(); - for (var j = 0, m = child.length; j < m; j++) { - var c = child[j], - dx = v.x - c.left - (c.width || 0) / 2, - dy = v.y - c.top - (c.height || 0) / 2, - dd = kx * dx * dx + ky * dy * dy; - if (dd < point.cost) { - point.distance = dx * dx + dy * dy; - point.cost = dd; - point.scene = child; - point.index = j; - } - } - } - } - return point; - } - - /** @private */ - function mousemove() { - /* If the closest mark is far away, clear the current target. */ - var point = search(this.scene, this.index); - if ((point.cost == Infinity) || (point.distance > r2)) point = null; - - /* Unpoint the old target, if it's not the new target. */ - if (unpoint) { - if (point - && (unpoint.scene == point.scene) - && (unpoint.index == point.index)) return; - pv.Mark.dispatch("unpoint", unpoint.scene, unpoint.index); - } - - /* Point the new target, if there is one. */ - if (unpoint = point) { - pv.Mark.dispatch("point", point.scene, point.index); - - /* Unpoint when the mouse leaves the root panel. */ - pv.listen(this.root.canvas(), "mouseout", mouseout); - } - } - - /** @private */ - function mouseout(e) { - if (unpoint && !pv.ancestor(this, e.relatedTarget)) { - pv.Mark.dispatch("unpoint", unpoint.scene, unpoint.index); - unpoint = null; - } - } - - /** - * Sets or gets the collapse parameter. By default, the standard Cartesian - * distance is computed. However, with some visualizations it is desirable to - * consider only a single dimension, such as the x-dimension for an - * independent variable. In this case, the collapse parameter can be set to - * collapse the y dimension: - * - *

    .event("mousemove", pv.Behavior.point(Infinity).collapse("y"))
- * - * @function - * @returns {pv.Behavior.point} this, or the current collapse parameter. - * @name pv.Behavior.point.prototype.collapse - * @param {string} [x] the new collapse parameter - */ - mousemove.collapse = function(x) { - if (arguments.length) { - collapse = String(x); - switch (collapse) { - case "y": kx = 1; ky = 0; break; - case "x": kx = 0; ky = 1; break; - default: kx = 1; ky = 1; break; - } - return mousemove; - } - return collapse; - }; - - return mousemove; -}; diff --git a/lib/protovis/src/behavior/Resize.js b/lib/protovis/src/behavior/Resize.js deleted file mode 100644 index 0a10f662..00000000 --- a/lib/protovis/src/behavior/Resize.js +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Returns a new resize behavior to be registered on mousedown events. - * - * @class Implements interactive resizing of a selection starting with mousedown - * events. Register this behavior on selection handles that should be resizeable - * by the user, such for brushing and linking. This behavior can be used in - * tandom with {@link pv.Behavior.select} and {@link pv.Behavior.drag} to allow - * the selected region to be selected and dragged interactively. - * - *

After the initial mousedown event is triggered, this behavior listens for - * mousemove and mouseup events on the window. This allows resizing to continue - * even if the mouse temporarily leaves the assigned panel, or even the root - * panel. - * - *

This behavior requires that the data associated with the mark being - * resized have x, y, dx and dy attributes - * that correspond to the mark's location and dimensions in pixels. The mark's - * positional properties are not set directly by this behavior; instead, the - * positional properties should be defined as: - * - *

    .left(function(d) d.x)
- *     .top(function(d) d.y)
- *     .width(function(d) d.dx)
- *     .height(function(d) d.dy)
- * - * Thus, the behavior does not resize the mark directly, but instead updates the - * size by updating the assigned panel's underlying data. Note that if the - * positional properties are defined with bottom and right (rather than top and - * left), the resize behavior will be inverted, which will confuse users! - * - *

The resize behavior is bounded by the assigned mark's enclosing panel; the - * positional attributes are clamped such that the selection does not extend - * outside the panel's bounds. - * - *

The mark being resized is automatically re-rendered for each mouse event - * as part of the resize operation. This behavior may be enhanced in the future - * to allow more flexible configuration. In some cases, such as with parallel - * coordinates, resizing the selection may cause related marks to change, in - * which case additional marks may also need to be rendered. This can be - * accomplished by listening for the select psuedo-events:

    - * - *
  • resizestart (on mousedown) - *
  • resize (on mousemove) - *
  • resizeend (on mouseup) - * - *
For example, to render the parent panel while resizing, thus - * re-rendering all sibling marks: - * - *
    .event("mousedown", pv.Behavior.resize("left"))
- *     .event("resize", function() this.parent)
- * - * This behavior may be enhanced in the future to allow more flexible - * configuration of the selection behavior. - * - * @extends pv.Behavior - * @see pv.Behavior.select - * @see pv.Behavior.drag - */ -pv.Behavior.resize = function(side) { - var scene, // scene context - index, // scene context - r, // region being selected - m1; // initial mouse position - - /** @private */ - function mousedown(d) { - index = this.index; - scene = this.scene; - m1 = this.mouse(); - r = d; - switch (side) { - case "left": m1.x = r.x + r.dx; break; - case "right": m1.x = r.x; break; - case "top": m1.y = r.y + r.dy; break; - case "bottom": m1.y = r.y; break; - } - pv.Mark.dispatch("resizestart", scene, index); - } - - /** @private */ - function mousemove() { - if (!scene) return; - scene.mark.context(scene, index, function() { - var m2 = this.mouse(); - r.x = Math.max(0, Math.min(m1.x, m2.x)); - r.y = Math.max(0, Math.min(m1.y, m2.y)); - r.dx = Math.min(this.parent.width(), Math.max(m2.x, m1.x)) - r.x; - r.dy = Math.min(this.parent.height(), Math.max(m2.y, m1.y)) - r.y; - this.render(); - }); - pv.Mark.dispatch("resize", scene, index); - } - - /** @private */ - function mouseup() { - if (!scene) return; - pv.Mark.dispatch("resizeend", scene, index); - scene = null; - } - - pv.listen(window, "mousemove", mousemove); - pv.listen(window, "mouseup", mouseup); - return mousedown; -}; diff --git a/lib/protovis/src/behavior/Select.js b/lib/protovis/src/behavior/Select.js deleted file mode 100644 index 148254fb..00000000 --- a/lib/protovis/src/behavior/Select.js +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Returns a new select behavior to be registered on mousedown events. - * - * @class Implements interactive selecting starting with mousedown events. - * Register this behavior on panels that should be selectable by the user, such - * for brushing and linking. This behavior can be used in tandom with - * {@link pv.Behavior.drag} to allow the selected region to be dragged - * interactively. - * - *

After the initial mousedown event is triggered, this behavior listens for - * mousemove and mouseup events on the window. This allows selecting to continue - * even if the mouse temporarily leaves the assigned panel, or even the root - * panel. - * - *

This behavior requires that the data associated with the mark being - * dragged have x, y, dx and dy attributes - * that correspond to the mark's location and dimensions in pixels. The mark's - * positional properties are not set directly by this behavior; instead, the - * positional properties should be defined as: - * - *

    .left(function(d) d.x)
- *     .top(function(d) d.y)
- *     .width(function(d) d.dx)
- *     .height(function(d) d.dy)
- * - * Thus, the behavior does not resize the mark directly, but instead updates the - * selection by updating the assigned panel's underlying data. Note that if the - * positional properties are defined with bottom and right (rather than top and - * left), the drag behavior will be inverted, which will confuse users! - * - *

The select behavior is bounded by the assigned panel; the positional - * attributes are clamped such that the selection does not extend outside the - * panel's bounds. - * - *

The panel being selected is automatically re-rendered for each mouse event - * as part of the drag operation. This behavior may be enhanced in the future to - * allow more flexible configuration of select behavior. In some cases, such as - * with parallel coordinates, making a selection may cause related marks to - * change, in which case additional marks may also need to be rendered. This can - * be accomplished by listening for the select psuedo-events:

    - * - *
  • selectstart (on mousedown) - *
  • select (on mousemove) - *
  • selectend (on mouseup) - * - *
For example, to render the parent panel while selecting, thus - * re-rendering all sibling marks: - * - *
    .event("mousedown", pv.Behavior.drag())
- *     .event("select", function() this.parent)
- * - * This behavior may be enhanced in the future to allow more flexible - * configuration of the selection behavior. - * - * @extends pv.Behavior - * @see pv.Behavior.drag - */ -pv.Behavior.select = function() { - var scene, // scene context - index, // scene context - r, // region being selected - m1; // initial mouse position - - /** @private */ - function mousedown(d) { - index = this.index; - scene = this.scene; - m1 = this.mouse(); - r = d; - r.x = m1.x; - r.y = m1.y; - r.dx = r.dy = 0; - pv.Mark.dispatch("selectstart", scene, index); - } - - /** @private */ - function mousemove() { - if (!scene) return; - scene.mark.context(scene, index, function() { - var m2 = this.mouse(); - r.x = Math.max(0, Math.min(m1.x, m2.x)); - r.y = Math.max(0, Math.min(m1.y, m2.y)); - r.dx = Math.min(this.width(), Math.max(m2.x, m1.x)) - r.x; - r.dy = Math.min(this.height(), Math.max(m2.y, m1.y)) - r.y; - this.render(); - }); - pv.Mark.dispatch("select", scene, index); - } - - /** @private */ - function mouseup() { - if (!scene) return; - pv.Mark.dispatch("selectend", scene, index); - scene = null; - } - - pv.listen(window, "mousemove", mousemove); - pv.listen(window, "mouseup", mouseup); - return mousedown; -}; diff --git a/lib/protovis/src/behavior/Zoom.js b/lib/protovis/src/behavior/Zoom.js deleted file mode 100644 index 3a185b46..00000000 --- a/lib/protovis/src/behavior/Zoom.js +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Returns a new zoom behavior to be registered on mousewheel events. - * - * @class Implements interactive zooming using mousewheel events. Register this - * behavior on panels to allow zooming. This behavior can be used in tandem with - * {@link pv.Behavior.pan} to allow both panning and zooming: - * - *
    .event("mousedown", pv.Behavior.pan())
- *     .event("mousewheel", pv.Behavior.zoom())
- * - * The zoom behavior currently supports only mousewheel events; support for - * keyboard shortcuts and gesture events to improve accessibility may be added - * in the future. - * - *

The implementation of this behavior relies on the panel's - * transform property, which specifies a matrix transformation that is - * applied to child marks. Note that the transform property only affects the - * panel's children, but not the panel itself; therefore the panel's fill and - * stroke will not change when the contents are zoomed. The built-in support for - * transforms only supports uniform scaling and translates, which is sufficient - * for panning and zooming. Note that this is not a strict geometric - * transformation, as the lineWidth property is scale-aware: strokes - * are drawn at constant size independent of scale. - * - *

Panels have transparent fill styles by default; this means that panels may - * not receive mousewheel events to zoom. To fix this problem, either given the - * panel a visible fill style (such as "white"), or set the events - * property to "all" such that the panel receives events despite its transparent - * fill. - * - *

The zoom behavior has optional support for bounding. If enabled, the user - * will not be able to zoom out farther than the initial bounds. This feature is - * designed to work in conjunction with the pan behavior. - * - * @extends pv.Behavior - * @see pv.Panel#transform - * @see pv.Mark#scale - * @param {number} speed - */ -pv.Behavior.zoom = function(speed) { - var bound; // whether to bound to the panel - - if (!arguments.length) speed = 1 / 48; - - /** @private */ - function mousewheel() { - var v = this.mouse(), - k = pv.event.wheel * speed, - m = this.transform().translate(v.x, v.y) - .scale((k < 0) ? (1e3 / (1e3 - k)) : ((1e3 + k) / 1e3)) - .translate(-v.x, -v.y); - if (bound) { - m.k = Math.max(1, m.k); - m.x = Math.max((1 - m.k) * this.width(), Math.min(0, m.x)); - m.y = Math.max((1 - m.k) * this.height(), Math.min(0, m.y)); - } - this.transform(m).render(); - pv.Mark.dispatch("zoom", this.scene, this.index); - } - - /** - * Sets or gets the bound parameter. If bounding is enabled, the user will not - * be able to zoom out farther than the initial panel bounds. Bounding is not - * enabled by default. If this behavior is used in tandem with the pan - * behavior, both should use the same bound parameter. - * - *

Note: enabling bounding after zooming has already occurred will not - * immediately reset the transform. Bounding should be enabled before the zoom - * behavior is applied. - * - * @function - * @returns {pv.Behavior.zoom} this, or the current bound parameter. - * @name pv.Behavior.zoom.prototype.bound - * @param {boolean} [x] the new bound parameter. - */ - mousewheel.bound = function(x) { - if (arguments.length) { - bound = Boolean(x); - return this; - } - return Boolean(bound); - }; - - return mousewheel; -}; diff --git a/lib/protovis/src/color/Color.js b/lib/protovis/src/color/Color.js deleted file mode 100644 index c6f4437d..00000000 --- a/lib/protovis/src/color/Color.js +++ /dev/null @@ -1,598 +0,0 @@ -/** - * Returns the {@link pv.Color} for the specified color format string. Colors - * may have an associated opacity, or alpha channel. Color formats are specified - * by CSS Color Modular Level 3, using either in RGB or HSL color space. For - * example:

    - * - *
  • #f00 // #rgb - *
  • #ff0000 // #rrggbb - *
  • rgb(255, 0, 0) - *
  • rgb(100%, 0%, 0%) - *
  • hsl(0, 100%, 50%) - *
  • rgba(0, 0, 255, 0.5) - *
  • hsla(120, 100%, 50%, 1) - * - *
The SVG 1.0 color keywords names are also supported, such as "aliceblue" - * and "yellowgreen". The "transparent" keyword is supported for fully- - * transparent black. - * - *

If the format argument is already an instance of Color, - * the argument is returned with no further processing. - * - * @param {string} format the color specification string, such as "#f00". - * @returns {pv.Color} the corresponding Color. - * @see SVG color - * keywords - * @see CSS3 color module - */ -pv.color = function(format) { - if (format.rgb) return format.rgb(); - - /* Handle hsl, rgb. */ - var m1 = /([a-z]+)\((.*)\)/i.exec(format); - if (m1) { - var m2 = m1[2].split(","), a = 1; - switch (m1[1]) { - case "hsla": - case "rgba": { - a = parseFloat(m2[3]); - if (!a) return pv.Color.transparent; - break; - } - } - switch (m1[1]) { - case "hsla": - case "hsl": { - var h = parseFloat(m2[0]), // degrees - s = parseFloat(m2[1]) / 100, // percentage - l = parseFloat(m2[2]) / 100; // percentage - return (new pv.Color.Hsl(h, s, l, a)).rgb(); - } - case "rgba": - case "rgb": { - function parse(c) { // either integer or percentage - var f = parseFloat(c); - return (c[c.length - 1] == '%') ? Math.round(f * 2.55) : f; - } - var r = parse(m2[0]), g = parse(m2[1]), b = parse(m2[2]); - return pv.rgb(r, g, b, a); - } - } - } - - /* Named colors. */ - var named = pv.Color.names[format]; - if (named) return named; - - /* Hexadecimal colors: #rgb and #rrggbb. */ - if (format.charAt(0) == "#") { - var r, g, b; - if (format.length == 4) { - r = format.charAt(1); r += r; - g = format.charAt(2); g += g; - b = format.charAt(3); b += b; - } else if (format.length == 7) { - r = format.substring(1, 3); - g = format.substring(3, 5); - b = format.substring(5, 7); - } - return pv.rgb(parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), 1); - } - - /* Otherwise, pass-through unsupported colors. */ - return new pv.Color(format, 1); -}; - -/** - * Constructs a color with the specified color format string and opacity. This - * constructor should not be invoked directly; use {@link pv.color} instead. - * - * @class Represents an abstract (possibly translucent) color. The color is - * divided into two parts: the color attribute, an opaque color format - * string, and the opacity attribute, a float in [0, 1]. The color - * space is dependent on the implementing class; all colors support the - * {@link #rgb} method to convert to RGB color space for interpolation. - * - *

See also the Color guide. - * - * @param {string} color an opaque color format string, such as "#f00". - * @param {number} opacity the opacity, in [0,1]. - * @see pv.color - */ -pv.Color = function(color, opacity) { - /** - * An opaque color format string, such as "#f00". - * - * @type string - * @see SVG color - * keywords - * @see CSS3 color module - */ - this.color = color; - - /** - * The opacity, a float in [0, 1]. - * - * @type number - */ - this.opacity = opacity; -}; - -/** - * Returns a new color that is a brighter version of this color. The behavior of - * this method may vary slightly depending on the underlying color space. - * Although brighter and darker are inverse operations, the results of a series - * of invocations of these two methods might be inconsistent because of rounding - * errors. - * - * @param [k] {number} an optional scale factor; defaults to 1. - * @see #darker - * @returns {pv.Color} a brighter color. - */ -pv.Color.prototype.brighter = function(k) { - return this.rgb().brighter(k); -}; - -/** - * Returns a new color that is a brighter version of this color. The behavior of - * this method may vary slightly depending on the underlying color space. - * Although brighter and darker are inverse operations, the results of a series - * of invocations of these two methods might be inconsistent because of rounding - * errors. - * - * @param [k] {number} an optional scale factor; defaults to 1. - * @see #brighter - * @returns {pv.Color} a darker color. - */ -pv.Color.prototype.darker = function(k) { - return this.rgb().darker(k); -}; - -/** - * Constructs a new RGB color with the specified channel values. - * - * @param {number} r the red channel, an integer in [0,255]. - * @param {number} g the green channel, an integer in [0,255]. - * @param {number} b the blue channel, an integer in [0,255]. - * @param {number} [a] the alpha channel, a float in [0,1]. - * @returns pv.Color.Rgb - */ -pv.rgb = function(r, g, b, a) { - return new pv.Color.Rgb(r, g, b, (arguments.length == 4) ? a : 1); -}; - -/** - * Constructs a new RGB color with the specified channel values. - * - * @class Represents a color in RGB space. - * - * @param {number} r the red channel, an integer in [0,255]. - * @param {number} g the green channel, an integer in [0,255]. - * @param {number} b the blue channel, an integer in [0,255]. - * @param {number} a the alpha channel, a float in [0,1]. - * @extends pv.Color - */ -pv.Color.Rgb = function(r, g, b, a) { - pv.Color.call(this, a ? ("rgb(" + r + "," + g + "," + b + ")") : "none", a); - - /** - * The red channel, an integer in [0, 255]. - * - * @type number - */ - this.r = r; - - /** - * The green channel, an integer in [0, 255]. - * - * @type number - */ - this.g = g; - - /** - * The blue channel, an integer in [0, 255]. - * - * @type number - */ - this.b = b; - - /** - * The alpha channel, a float in [0, 1]. - * - * @type number - */ - this.a = a; -}; -pv.Color.Rgb.prototype = pv.extend(pv.Color); - -/** - * Constructs a new RGB color with the same green, blue and alpha channels as - * this color, with the specified red channel. - * - * @param {number} r the red channel, an integer in [0,255]. - */ -pv.Color.Rgb.prototype.red = function(r) { - return pv.rgb(r, this.g, this.b, this.a); -}; - -/** - * Constructs a new RGB color with the same red, blue and alpha channels as this - * color, with the specified green channel. - * - * @param {number} g the green channel, an integer in [0,255]. - */ -pv.Color.Rgb.prototype.green = function(g) { - return pv.rgb(this.r, g, this.b, this.a); -}; - -/** - * Constructs a new RGB color with the same red, green and alpha channels as - * this color, with the specified blue channel. - * - * @param {number} b the blue channel, an integer in [0,255]. - */ -pv.Color.Rgb.prototype.blue = function(b) { - return pv.rgb(this.r, this.g, b, this.a); -}; - -/** - * Constructs a new RGB color with the same red, green and blue channels as this - * color, with the specified alpha channel. - * - * @param {number} a the alpha channel, a float in [0,1]. - */ -pv.Color.Rgb.prototype.alpha = function(a) { - return pv.rgb(this.r, this.g, this.b, a); -}; - -/** - * Returns the RGB color equivalent to this color. This method is abstract and - * must be implemented by subclasses. - * - * @returns {pv.Color.Rgb} an RGB color. - * @function - * @name pv.Color.prototype.rgb - */ - -/** - * Returns this. - * - * @returns {pv.Color.Rgb} this. - */ -pv.Color.Rgb.prototype.rgb = function() { return this; }; - -/** - * Returns a new color that is a brighter version of this color. This method - * applies an arbitrary scale factor to each of the three RGB components of this - * color to create a brighter version of this color. Although brighter and - * darker are inverse operations, the results of a series of invocations of - * these two methods might be inconsistent because of rounding errors. - * - * @param [k] {number} an optional scale factor; defaults to 1. - * @see #darker - * @returns {pv.Color.Rgb} a brighter color. - */ -pv.Color.Rgb.prototype.brighter = function(k) { - k = Math.pow(0.7, arguments.length ? k : 1); - var r = this.r, g = this.g, b = this.b, i = 30; - if (!r && !g && !b) return pv.rgb(i, i, i, this.a); - if (r && (r < i)) r = i; - if (g && (g < i)) g = i; - if (b && (b < i)) b = i; - return pv.rgb( - Math.min(255, Math.floor(r / k)), - Math.min(255, Math.floor(g / k)), - Math.min(255, Math.floor(b / k)), - this.a); -}; - -/** - * Returns a new color that is a darker version of this color. This method - * applies an arbitrary scale factor to each of the three RGB components of this - * color to create a darker version of this color. Although brighter and darker - * are inverse operations, the results of a series of invocations of these two - * methods might be inconsistent because of rounding errors. - * - * @param [k] {number} an optional scale factor; defaults to 1. - * @see #brighter - * @returns {pv.Color.Rgb} a darker color. - */ -pv.Color.Rgb.prototype.darker = function(k) { - k = Math.pow(0.7, arguments.length ? k : 1); - return pv.rgb( - Math.max(0, Math.floor(k * this.r)), - Math.max(0, Math.floor(k * this.g)), - Math.max(0, Math.floor(k * this.b)), - this.a); -}; - -/** - * Constructs a new HSL color with the specified values. - * - * @param {number} h the hue, an integer in [0, 360]. - * @param {number} s the saturation, a float in [0, 1]. - * @param {number} l the lightness, a float in [0, 1]. - * @param {number} [a] the opacity, a float in [0, 1]. - * @returns pv.Color.Hsl - */ -pv.hsl = function(h, s, l, a) { - return new pv.Color.Hsl(h, s, l, (arguments.length == 4) ? a : 1); -}; - -/** - * Constructs a new HSL color with the specified values. - * - * @class Represents a color in HSL space. - * - * @param {number} h the hue, an integer in [0, 360]. - * @param {number} s the saturation, a float in [0, 1]. - * @param {number} l the lightness, a float in [0, 1]. - * @param {number} a the opacity, a float in [0, 1]. - * @extends pv.Color - */ -pv.Color.Hsl = function(h, s, l, a) { - pv.Color.call(this, "hsl(" + h + "," + (s * 100) + "%," + (l * 100) + "%)", a); - - /** - * The hue, an integer in [0, 360]. - * - * @type number - */ - this.h = h; - - /** - * The saturation, a float in [0, 1]. - * - * @type number - */ - this.s = s; - - /** - * The lightness, a float in [0, 1]. - * - * @type number - */ - this.l = l; - - /** - * The opacity, a float in [0, 1]. - * - * @type number - */ - this.a = a; -}; -pv.Color.Hsl.prototype = pv.extend(pv.Color); - -/** - * Constructs a new HSL color with the same saturation, lightness and alpha as - * this color, and the specified hue. - * - * @param {number} h the hue, an integer in [0, 360]. - */ -pv.Color.Hsl.prototype.hue = function(h) { - return pv.hsl(h, this.s, this.l, this.a); -}; - -/** - * Constructs a new HSL color with the same hue, lightness and alpha as this - * color, and the specified saturation. - * - * @param {number} s the saturation, a float in [0, 1]. - */ -pv.Color.Hsl.prototype.saturation = function(s) { - return pv.hsl(this.h, s, this.l, this.a); -}; - -/** - * Constructs a new HSL color with the same hue, saturation and alpha as this - * color, and the specified lightness. - * - * @param {number} l the lightness, a float in [0, 1]. - */ -pv.Color.Hsl.prototype.lightness = function(l) { - return pv.hsl(this.h, this.s, l, this.a); -}; - -/** - * Constructs a new HSL color with the same hue, saturation and lightness as - * this color, and the specified alpha. - * - * @param {number} a the opacity, a float in [0, 1]. - */ -pv.Color.Hsl.prototype.alpha = function(a) { - return pv.hsl(this.h, this.s, this.l, a); -}; - -/** - * Returns the RGB color equivalent to this HSL color. - * - * @returns {pv.Color.Rgb} an RGB color. - */ -pv.Color.Hsl.prototype.rgb = function() { - var h = this.h, s = this.s, l = this.l; - - /* Some simple corrections for h, s and l. */ - h = h % 360; if (h < 0) h += 360; - s = Math.max(0, Math.min(s, 1)); - l = Math.max(0, Math.min(l, 1)); - - /* From FvD 13.37, CSS Color Module Level 3 */ - var m2 = (l <= .5) ? (l * (1 + s)) : (l + s - l * s); - var m1 = 2 * l - m2; - function v(h) { - if (h > 360) h -= 360; - else if (h < 0) h += 360; - if (h < 60) return m1 + (m2 - m1) * h / 60; - if (h < 180) return m2; - if (h < 240) return m1 + (m2 - m1) * (240 - h) / 60; - return m1; - } - function vv(h) { - return Math.round(v(h) * 255); - } - - return pv.rgb(vv(h + 120), vv(h), vv(h - 120), this.a); -}; - -/** - * @private SVG color keywords, per CSS Color Module Level 3. - * - * @see SVG color - * keywords - */ -pv.Color.names = { - aliceblue: "#f0f8ff", - antiquewhite: "#faebd7", - aqua: "#00ffff", - aquamarine: "#7fffd4", - azure: "#f0ffff", - beige: "#f5f5dc", - bisque: "#ffe4c4", - black: "#000000", - blanchedalmond: "#ffebcd", - blue: "#0000ff", - blueviolet: "#8a2be2", - brown: "#a52a2a", - burlywood: "#deb887", - cadetblue: "#5f9ea0", - chartreuse: "#7fff00", - chocolate: "#d2691e", - coral: "#ff7f50", - cornflowerblue: "#6495ed", - cornsilk: "#fff8dc", - crimson: "#dc143c", - cyan: "#00ffff", - darkblue: "#00008b", - darkcyan: "#008b8b", - darkgoldenrod: "#b8860b", - darkgray: "#a9a9a9", - darkgreen: "#006400", - darkgrey: "#a9a9a9", - darkkhaki: "#bdb76b", - darkmagenta: "#8b008b", - darkolivegreen: "#556b2f", - darkorange: "#ff8c00", - darkorchid: "#9932cc", - darkred: "#8b0000", - darksalmon: "#e9967a", - darkseagreen: "#8fbc8f", - darkslateblue: "#483d8b", - darkslategray: "#2f4f4f", - darkslategrey: "#2f4f4f", - darkturquoise: "#00ced1", - darkviolet: "#9400d3", - deeppink: "#ff1493", - deepskyblue: "#00bfff", - dimgray: "#696969", - dimgrey: "#696969", - dodgerblue: "#1e90ff", - firebrick: "#b22222", - floralwhite: "#fffaf0", - forestgreen: "#228b22", - fuchsia: "#ff00ff", - gainsboro: "#dcdcdc", - ghostwhite: "#f8f8ff", - gold: "#ffd700", - goldenrod: "#daa520", - gray: "#808080", - green: "#008000", - greenyellow: "#adff2f", - grey: "#808080", - honeydew: "#f0fff0", - hotpink: "#ff69b4", - indianred: "#cd5c5c", - indigo: "#4b0082", - ivory: "#fffff0", - khaki: "#f0e68c", - lavender: "#e6e6fa", - lavenderblush: "#fff0f5", - lawngreen: "#7cfc00", - lemonchiffon: "#fffacd", - lightblue: "#add8e6", - lightcoral: "#f08080", - lightcyan: "#e0ffff", - lightgoldenrodyellow: "#fafad2", - lightgray: "#d3d3d3", - lightgreen: "#90ee90", - lightgrey: "#d3d3d3", - lightpink: "#ffb6c1", - lightsalmon: "#ffa07a", - lightseagreen: "#20b2aa", - lightskyblue: "#87cefa", - lightslategray: "#778899", - lightslategrey: "#778899", - lightsteelblue: "#b0c4de", - lightyellow: "#ffffe0", - lime: "#00ff00", - limegreen: "#32cd32", - linen: "#faf0e6", - magenta: "#ff00ff", - maroon: "#800000", - mediumaquamarine: "#66cdaa", - mediumblue: "#0000cd", - mediumorchid: "#ba55d3", - mediumpurple: "#9370db", - mediumseagreen: "#3cb371", - mediumslateblue: "#7b68ee", - mediumspringgreen: "#00fa9a", - mediumturquoise: "#48d1cc", - mediumvioletred: "#c71585", - midnightblue: "#191970", - mintcream: "#f5fffa", - mistyrose: "#ffe4e1", - moccasin: "#ffe4b5", - navajowhite: "#ffdead", - navy: "#000080", - oldlace: "#fdf5e6", - olive: "#808000", - olivedrab: "#6b8e23", - orange: "#ffa500", - orangered: "#ff4500", - orchid: "#da70d6", - palegoldenrod: "#eee8aa", - palegreen: "#98fb98", - paleturquoise: "#afeeee", - palevioletred: "#db7093", - papayawhip: "#ffefd5", - peachpuff: "#ffdab9", - peru: "#cd853f", - pink: "#ffc0cb", - plum: "#dda0dd", - powderblue: "#b0e0e6", - purple: "#800080", - red: "#ff0000", - rosybrown: "#bc8f8f", - royalblue: "#4169e1", - saddlebrown: "#8b4513", - salmon: "#fa8072", - sandybrown: "#f4a460", - seagreen: "#2e8b57", - seashell: "#fff5ee", - sienna: "#a0522d", - silver: "#c0c0c0", - skyblue: "#87ceeb", - slateblue: "#6a5acd", - slategray: "#708090", - slategrey: "#708090", - snow: "#fffafa", - springgreen: "#00ff7f", - steelblue: "#4682b4", - tan: "#d2b48c", - teal: "#008080", - thistle: "#d8bfd8", - tomato: "#ff6347", - turquoise: "#40e0d0", - violet: "#ee82ee", - wheat: "#f5deb3", - white: "#ffffff", - whitesmoke: "#f5f5f5", - yellow: "#ffff00", - yellowgreen: "#9acd32", - transparent: pv.Color.transparent = pv.rgb(0, 0, 0, 0) -}; - -/* Initialized named colors. */ -(function() { - var names = pv.Color.names; - for (var name in names) names[name] = pv.color(names[name]); -})(); diff --git a/lib/protovis/src/color/Colors.js b/lib/protovis/src/color/Colors.js deleted file mode 100644 index ae70f5f5..00000000 --- a/lib/protovis/src/color/Colors.js +++ /dev/null @@ -1,135 +0,0 @@ -/** - * Returns a new categorical color encoding using the specified colors. The - * arguments to this method are an array of colors; see {@link pv.color}. For - * example, to create a categorical color encoding using the species - * attribute: - * - *

pv.colors("red", "green", "blue").by(function(d) d.species)
- * - * The result of this expression can be used as a fill- or stroke-style - * property. This assumes that the data's species attribute is a - * string. - * - * @param {string} colors... categorical colors. - * @see pv.Scale.ordinal - * @returns {pv.Scale.ordinal} an ordinal color scale. - */ -pv.colors = function() { - var scale = pv.Scale.ordinal(); - scale.range.apply(scale, arguments); - return scale; -}; - -/** - * A collection of standard color palettes for categorical encoding. - * - * @namespace A collection of standard color palettes for categorical encoding. - */ -pv.Colors = {}; - -/** - * Returns a new 10-color scheme. The arguments to this constructor are - * optional, and equivalent to calling {@link pv.Scale.OrdinalScale#domain}. The - * following colors are used: - * - *
#1f77b4
- *
#ff7f0e
- *
#2ca02c
- *
#d62728
- *
#9467bd
- *
#8c564b
- *
#e377c2
- *
#7f7f7f
- *
#bcbd22
- *
#17becf
- * - * @param {number...} domain... domain values. - * @returns {pv.Scale.ordinal} a new ordinal color scale. - * @see pv.color - */ -pv.Colors.category10 = function() { - var scale = pv.colors( - "#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd", - "#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf"); - scale.domain.apply(scale, arguments); - return scale; -}; - -/** - * Returns a new 20-color scheme. The arguments to this constructor are - * optional, and equivalent to calling {@link pv.Scale.OrdinalScale#domain}. The - * following colors are used: - * - *
#1f77b4
- *
#aec7e8
- *
#ff7f0e
- *
#ffbb78
- *
#2ca02c
- *
#98df8a
- *
#d62728
- *
#ff9896
- *
#9467bd
- *
#c5b0d5
- *
#8c564b
- *
#c49c94
- *
#e377c2
- *
#f7b6d2
- *
#7f7f7f
- *
#c7c7c7
- *
#bcbd22
- *
#dbdb8d
- *
#17becf
- *
#9edae5
- * - * @param {number...} domain... domain values. - * @returns {pv.Scale.ordinal} a new ordinal color scale. - * @see pv.color -*/ -pv.Colors.category20 = function() { - var scale = pv.colors( - "#1f77b4", "#aec7e8", "#ff7f0e", "#ffbb78", "#2ca02c", - "#98df8a", "#d62728", "#ff9896", "#9467bd", "#c5b0d5", - "#8c564b", "#c49c94", "#e377c2", "#f7b6d2", "#7f7f7f", - "#c7c7c7", "#bcbd22", "#dbdb8d", "#17becf", "#9edae5"); - scale.domain.apply(scale, arguments); - return scale; -}; - -/** - * Returns a new alternative 19-color scheme. The arguments to this constructor - * are optional, and equivalent to calling - * {@link pv.Scale.OrdinalScale#domain}. The following colors are used: - * - *
#9c9ede
- *
#7375b5
- *
#4a5584
- *
#cedb9c
- *
#b5cf6b
- *
#8ca252
- *
#637939
- *
#e7cb94
- *
#e7ba52
- *
#bd9e39
- *
#8c6d31
- *
#e7969c
- *
#d6616b
- *
#ad494a
- *
#843c39
- *
#de9ed6
- *
#ce6dbd
- *
#a55194
- *
#7b4173
- * - * @param {number...} domain... domain values. - * @returns {pv.Scale.ordinal} a new ordinal color scale. - * @see pv.color - */ -pv.Colors.category19 = function() { - var scale = pv.colors( - "#9c9ede", "#7375b5", "#4a5584", "#cedb9c", "#b5cf6b", - "#8ca252", "#637939", "#e7cb94", "#e7ba52", "#bd9e39", - "#8c6d31", "#e7969c", "#d6616b", "#ad494a", "#843c39", - "#de9ed6", "#ce6dbd", "#a55194", "#7b4173"); - scale.domain.apply(scale, arguments); - return scale; -}; diff --git a/lib/protovis/src/color/Ramp.js b/lib/protovis/src/color/Ramp.js deleted file mode 100644 index 5a6c7e3d..00000000 --- a/lib/protovis/src/color/Ramp.js +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Returns a linear color ramp from the specified start color to the - * specified end color. The color arguments may be specified either as - * strings or as {@link pv.Color}s. This is equivalent to: - * - *
    pv.Scale.linear().domain(0, 1).range(...)
- * - * @param {string} start the start color; may be a pv.Color. - * @param {string} end the end color; may be a pv.Color. - * @returns {Function} a color ramp from start to end. - * @see pv.Scale.linear - */ -pv.ramp = function(start, end) { - var scale = pv.Scale.linear(); - scale.range.apply(scale, arguments); - return scale; -}; diff --git a/lib/protovis/src/data/Arrays.js b/lib/protovis/src/data/Arrays.js deleted file mode 100644 index 90b832cc..00000000 --- a/lib/protovis/src/data/Arrays.js +++ /dev/null @@ -1,277 +0,0 @@ -/** - * @private A private variant of Array.prototype.map that supports the index - * property. - */ -pv.map = function(array, f) { - var o = {}; - return f - ? array.map(function(d, i) { o.index = i; return f.call(o, d); }) - : array.slice(); -}; - -/** - * Concatenates the specified array with itself n times. For example, - * pv.repeat([1, 2]) returns [1, 2, 1, 2]. - * - * @param {array} a an array. - * @param {number} [n] the number of times to repeat; defaults to two. - * @returns {array} an array that repeats the specified array. - */ -pv.repeat = function(array, n) { - if (arguments.length == 1) n = 2; - return pv.blend(pv.range(n).map(function() { return array; })); -}; - -/** - * Given two arrays a and b, returns an array of all possible - * pairs of elements [ai, bj]. The outer loop is on array - * a, while the inner loop is on b, such that the order of - * returned elements is [a0, b0], [a0, - * b1], ... [a0, bm], [a1, - * b0], [a1, b1], ... [a1, - * bm], ... [an, bm]. If either array is empty, - * an empty array is returned. - * - * @param {array} a an array. - * @param {array} b an array. - * @returns {array} an array of pairs of elements in a and b. - */ -pv.cross = function(a, b) { - var array = []; - for (var i = 0, n = a.length, m = b.length; i < n; i++) { - for (var j = 0, x = a[i]; j < m; j++) { - array.push([x, b[j]]); - } - } - return array; -}; - -/** - * Given the specified array of arrays, concatenates the arrays into a single - * array. If the individual arrays are explicitly known, an alternative to blend - * is to use JavaScript's concat method directly. These two equivalent - * expressions:
    - * - *
  • pv.blend([[1, 2, 3], ["a", "b", "c"]]) - *
  • [1, 2, 3].concat(["a", "b", "c"]) - * - *
return [1, 2, 3, "a", "b", "c"]. - * - * @param {array[]} arrays an array of arrays. - * @returns {array} an array containing all the elements of each array in - * arrays. - */ -pv.blend = function(arrays) { - return Array.prototype.concat.apply([], arrays); -}; - -/** - * Given the specified array of arrays, transposes each element - * arrayij with arrayji. If the array has dimensions - * n×m, it will have dimensions m×n - * after this method returns. This method transposes the elements of the array - * in place, mutating the array, and returning a reference to the array. - * - * @param {array[]} arrays an array of arrays. - * @returns {array[]} the passed-in array, after transposing the elements. - */ -pv.transpose = function(arrays) { - var n = arrays.length, m = pv.max(arrays, function(d) { return d.length; }); - - if (m > n) { - arrays.length = m; - for (var i = n; i < m; i++) { - arrays[i] = new Array(n); - } - for (var i = 0; i < n; i++) { - for (var j = i + 1; j < m; j++) { - var t = arrays[i][j]; - arrays[i][j] = arrays[j][i]; - arrays[j][i] = t; - } - } - } else { - for (var i = 0; i < m; i++) { - arrays[i].length = n; - } - for (var i = 0; i < n; i++) { - for (var j = 0; j < i; j++) { - var t = arrays[i][j]; - arrays[i][j] = arrays[j][i]; - arrays[j][i] = t; - } - } - } - - arrays.length = m; - for (var i = 0; i < m; i++) { - arrays[i].length = n; - } - - return arrays; -}; - -/** - * Returns a normalized copy of the specified array, such that the sum of the - * returned elements sum to one. If the specified array is not an array of - * numbers, an optional accessor function f can be specified to map the - * elements to numbers. For example, if array is an array of objects, - * and each object has a numeric property "foo", the expression - * - *
pv.normalize(array, function(d) d.foo)
- * - * returns a normalized array on the "foo" property. If an accessor function is - * not specified, the identity function is used. Accessor functions can refer to - * this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number[]} an array of numbers that sums to one. - */ -pv.normalize = function(array, f) { - var norm = pv.map(array, f), sum = pv.sum(norm); - for (var i = 0; i < norm.length; i++) norm[i] /= sum; - return norm; -}; - -/** - * Returns a permutation of the specified array, using the specified array of - * indexes. The returned array contains the corresponding element in - * array for each index in indexes, in order. For example, - * - *
pv.permute(["a", "b", "c"], [1, 2, 0])
- * - * returns ["b", "c", "a"]. It is acceptable for the array of indexes - * to be a different length from the array of elements, and for indexes to be - * duplicated or omitted. The optional accessor function f can be used - * to perform a simultaneous mapping of the array elements. Accessor functions - * can refer to this.index. - * - * @param {array} array an array. - * @param {number[]} indexes an array of indexes into array. - * @param {function} [f] an optional accessor function. - * @returns {array} an array of elements from array; a permutation. - */ -pv.permute = function(array, indexes, f) { - if (!f) f = pv.identity; - var p = new Array(indexes.length), o = {}; - indexes.forEach(function(j, i) { o.index = j; p[i] = f.call(o, array[j]); }); - return p; -}; - -/** - * Returns a map from key to index for the specified keys array. For - * example, - * - *
pv.numerate(["a", "b", "c"])
- * - * returns {a: 0, b: 1, c: 2}. Note that since JavaScript maps only - * support string keys, keys must contain strings, or other values that - * naturally map to distinct string values. Alternatively, an optional accessor - * function f can be specified to compute the string key for the given - * element. Accessor functions can refer to this.index. - * - * @param {array} keys an array, usually of string keys. - * @param {function} [f] an optional key function. - * @returns a map from key to index. - */ -pv.numerate = function(keys, f) { - if (!f) f = pv.identity; - var map = {}, o = {}; - keys.forEach(function(x, i) { o.index = i; map[f.call(o, x)] = i; }); - return map; -}; - -/** - * Returns the unique elements in the specified array, in the order they appear. - * Note that since JavaScript maps only support string keys, array must - * contain strings, or other values that naturally map to distinct string - * values. Alternatively, an optional accessor function f can be - * specified to compute the string key for the given element. Accessor functions - * can refer to this.index. - * - * @param {array} array an array, usually of string keys. - * @param {function} [f] an optional key function. - * @returns {array} the unique values. - */ -pv.uniq = function(array, f) { - if (!f) f = pv.identity; - var map = {}, keys = [], o = {}, y; - array.forEach(function(x, i) { - o.index = i; - y = f.call(o, x); - if (!(y in map)) map[y] = keys.push(y); - }); - return keys; -}; - -/** - * The comparator function for natural order. This can be used in conjunction with - * the built-in array sort method to sort elements by their natural - * order, ascending. Note that if no comparator function is specified to the - * built-in sort method, the default order is lexicographic, not - * natural! - * - * @see Array.sort. - * @param a an element to compare. - * @param b an element to compare. - * @returns {number} negative if a < b; positive if a > b; otherwise 0. - */ -pv.naturalOrder = function(a, b) { - return (a < b) ? -1 : ((a > b) ? 1 : 0); -}; - -/** - * The comparator function for reverse natural order. This can be used in - * conjunction with the built-in array sort method to sort elements by - * their natural order, descending. Note that if no comparator function is - * specified to the built-in sort method, the default order is - * lexicographic, not natural! - * - * @see #naturalOrder - * @param a an element to compare. - * @param b an element to compare. - * @returns {number} negative if a < b; positive if a > b; otherwise 0. - */ -pv.reverseOrder = function(b, a) { - return (a < b) ? -1 : ((a > b) ? 1 : 0); -}; - -/** - * Searches the specified array of numbers for the specified value using the - * binary search algorithm. The array must be sorted (as by the sort - * method) prior to making this call. If it is not sorted, the results are - * undefined. If the array contains multiple elements with the specified value, - * there is no guarantee which one will be found. - * - *

The insertion point is defined as the point at which the value - * would be inserted into the array: the index of the first element greater than - * the value, or array.length, if all elements in the array are less - * than the specified value. Note that this guarantees that the return value - * will be nonnegative if and only if the value is found. - * - * @param {number[]} array the array to be searched. - * @param {number} value the value to be searched for. - * @returns the index of the search value, if it is contained in the array; - * otherwise, (-(insertion point) - 1). - * @param {function} [f] an optional key function. - */ -pv.search = function(array, value, f) { - if (!f) f = pv.identity; - var low = 0, high = array.length - 1; - while (low <= high) { - var mid = (low + high) >> 1, midValue = f(array[mid]); - if (midValue < value) low = mid + 1; - else if (midValue > value) high = mid - 1; - else return mid; - } - return -low - 1; -}; - -pv.search.index = function(array, value, f) { - var i = pv.search(array, value, f); - return (i < 0) ? (-i - 1) : i; -}; diff --git a/lib/protovis/src/data/Dom.js b/lib/protovis/src/data/Dom.js deleted file mode 100644 index b7e354dd..00000000 --- a/lib/protovis/src/data/Dom.js +++ /dev/null @@ -1,380 +0,0 @@ -/** - * Returns a {@link pv.Dom} operator for the given map. This is a convenience - * factory method, equivalent to new pv.Dom(map). To apply the operator - * and retrieve the root node, call {@link pv.Dom#root}; to retrieve all nodes - * flattened, use {@link pv.Dom#nodes}. - * - * @see pv.Dom - * @param map a map from which to construct a DOM. - * @returns {pv.Dom} a DOM operator for the specified map. - */ -pv.dom = function(map) { - return new pv.Dom(map); -}; - -/** - * Constructs a DOM operator for the specified map. This constructor should not - * be invoked directly; use {@link pv.dom} instead. - * - * @class Represets a DOM operator for the specified map. This allows easy - * transformation of a hierarchical JavaScript object (such as a JSON map) to a - * W3C Document Object Model hierarchy. For more information on which attributes - * and methods from the specification are supported, see {@link pv.Dom.Node}. - * - *

Leaves in the map are determined using an associated leaf function; - * see {@link #leaf}. By default, leaves are any value whose type is not - * "object", such as numbers or strings. - * - * @param map a map from which to construct a DOM. - */ -pv.Dom = function(map) { - this.$map = map; -}; - -/** @private The default leaf function. */ -pv.Dom.prototype.$leaf = function(n) { - return typeof n != "object"; -}; - -/** - * Sets or gets the leaf function for this DOM operator. The leaf function - * identifies which values in the map are leaves, and which are internal nodes. - * By default, objects are considered internal nodes, and primitives (such as - * numbers and strings) are considered leaves. - * - * @param {function} f the new leaf function. - * @returns the current leaf function, or this. - */ -pv.Dom.prototype.leaf = function(f) { - if (arguments.length) { - this.$leaf = f; - return this; - } - return this.$leaf; -}; - -/** - * Applies the DOM operator, returning the root node. - * - * @returns {pv.Dom.Node} the root node. - * @param {string} [nodeName] optional node name for the root. - */ -pv.Dom.prototype.root = function(nodeName) { - var leaf = this.$leaf, root = recurse(this.$map); - - /** @private */ - function recurse(map) { - var n = new pv.Dom.Node(); - for (var k in map) { - var v = map[k]; - n.appendChild(leaf(v) ? new pv.Dom.Node(v) : recurse(v)).nodeName = k; - } - return n; - } - - root.nodeName = nodeName; - return root; -}; - -/** - * Applies the DOM operator, returning the array of all nodes in preorder - * traversal. - * - * @returns {array} the array of nodes in preorder traversal. - */ -pv.Dom.prototype.nodes = function() { - return this.root().nodes(); -}; - -/** - * Constructs a DOM node for the specified value. Instances of this class are - * not typically created directly; instead they are generated from a JavaScript - * map using the {@link pv.Dom} operator. - * - * @class Represents a Node in the W3C Document Object Model. - */ -pv.Dom.Node = function(value) { - this.nodeValue = value; - this.childNodes = []; -}; - -/** - * The node name. When generated from a map, the node name corresponds to the - * key at the given level in the map. Note that the root node has no associated - * key, and thus has an undefined node name (and no parentNode). - * - * @type string - * @field pv.Dom.Node.prototype.nodeName - */ - -/** - * The node value. When generated from a map, node value corresponds to the leaf - * value for leaf nodes, and is undefined for internal nodes. - * - * @field pv.Dom.Node.prototype.nodeValue - */ - -/** - * The array of child nodes. This array is empty for leaf nodes. An easy way to - * check if child nodes exist is to query firstChild. - * - * @type array - * @field pv.Dom.Node.prototype.childNodes - */ - -/** - * The parent node, which is null for root nodes. - * - * @type pv.Dom.Node - */ -pv.Dom.Node.prototype.parentNode = null; - -/** - * The first child, which is null for leaf nodes. - * - * @type pv.Dom.Node - */ -pv.Dom.Node.prototype.firstChild = null; - -/** - * The last child, which is null for leaf nodes. - * - * @type pv.Dom.Node - */ -pv.Dom.Node.prototype.lastChild = null; - -/** - * The previous sibling node, which is null for the first child. - * - * @type pv.Dom.Node - */ -pv.Dom.Node.prototype.previousSibling = null; - -/** - * The next sibling node, which is null for the last child. - * - * @type pv.Dom.Node - */ -pv.Dom.Node.prototype.nextSibling = null; - -/** - * Removes the specified child node from this node. - * - * @throws Error if the specified child is not a child of this node. - * @returns {pv.Dom.Node} the removed child. - */ -pv.Dom.Node.prototype.removeChild = function(n) { - var i = this.childNodes.indexOf(n); - if (i == -1) throw new Error("child not found"); - this.childNodes.splice(i, 1); - if (n.previousSibling) n.previousSibling.nextSibling = n.nextSibling; - else this.firstChild = n.nextSibling; - if (n.nextSibling) n.nextSibling.previousSibling = n.previousSibling; - else this.lastChild = n.previousSibling; - delete n.nextSibling; - delete n.previousSibling; - delete n.parentNode; - return n; -}; - -/** - * Appends the specified child node to this node. If the specified child is - * already part of the DOM, the child is first removed before being added to - * this node. - * - * @returns {pv.Dom.Node} the appended child. - */ -pv.Dom.Node.prototype.appendChild = function(n) { - if (n.parentNode) n.parentNode.removeChild(n); - n.parentNode = this; - n.previousSibling = this.lastChild; - if (this.lastChild) this.lastChild.nextSibling = n; - else this.firstChild = n; - this.lastChild = n; - this.childNodes.push(n); - return n; -}; - -/** - * Inserts the specified child n before the given reference child - * r of this node. If r is null, this method is equivalent to - * {@link #appendChild}. If n is already part of the DOM, it is first - * removed before being inserted. - * - * @throws Error if r is non-null and not a child of this node. - * @returns {pv.Dom.Node} the inserted child. - */ -pv.Dom.Node.prototype.insertBefore = function(n, r) { - if (!r) return this.appendChild(n); - var i = this.childNodes.indexOf(r); - if (i == -1) throw new Error("child not found"); - if (n.parentNode) n.parentNode.removeChild(n); - n.parentNode = this; - n.nextSibling = r; - n.previousSibling = r.previousSibling; - if (r.previousSibling) { - r.previousSibling.nextSibling = n; - } else { - if (r == this.lastChild) this.lastChild = n; - this.firstChild = n; - } - this.childNodes.splice(i, 0, n); - return n; -}; - -/** - * Replaces the specified child r of this node with the node n. If - * n is already part of the DOM, it is first removed before being added. - * - * @throws Error if r is not a child of this node. - */ -pv.Dom.Node.prototype.replaceChild = function(n, r) { - var i = this.childNodes.indexOf(r); - if (i == -1) throw new Error("child not found"); - if (n.parentNode) n.parentNode.removeChild(n); - n.parentNode = this; - n.nextSibling = r.nextSibling; - n.previousSibling = r.previousSibling; - if (r.previousSibling) r.previousSibling.nextSibling = n; - else this.firstChild = n; - if (r.nextSibling) r.nextSibling.previousSibling = n; - else this.lastChild = n; - this.childNodes[i] = n; - return r; -}; - -/** - * Visits each node in the tree in preorder traversal, applying the specified - * function f. The arguments to the function are:

    - * - *
  1. The current node. - *
  2. The current depth, starting at 0 for the root node.
- * - * @param {function} f a function to apply to each node. - */ -pv.Dom.Node.prototype.visitBefore = function(f) { - function visit(n, i) { - f(n, i); - for (var c = n.firstChild; c; c = c.nextSibling) { - visit(c, i + 1); - } - } - visit(this, 0); -}; - -/** - * Visits each node in the tree in postorder traversal, applying the specified - * function f. The arguments to the function are:
    - * - *
  1. The current node. - *
  2. The current depth, starting at 0 for the root node.
- * - * @param {function} f a function to apply to each node. - */ -pv.Dom.Node.prototype.visitAfter = function(f) { - function visit(n, i) { - for (var c = n.firstChild; c; c = c.nextSibling) { - visit(c, i + 1); - } - f(n, i); - } - visit(this, 0); -}; - -/** - * Sorts child nodes of this node, and all descendent nodes recursively, using - * the specified comparator function f. The comparator function is - * passed two nodes to compare. - * - *

Note: during the sort operation, the comparator function should not rely - * on the tree being well-formed; the values of previousSibling and - * nextSibling for the nodes being compared are not defined during the - * sort operation. - * - * @param {function} f a comparator function. - * @returns this. - */ -pv.Dom.Node.prototype.sort = function(f) { - if (this.firstChild) { - this.childNodes.sort(f); - var p = this.firstChild = this.childNodes[0], c; - delete p.previousSibling; - for (var i = 1; i < this.childNodes.length; i++) { - p.sort(f); - c = this.childNodes[i]; - c.previousSibling = p; - p = p.nextSibling = c; - } - this.lastChild = p; - delete p.nextSibling; - p.sort(f); - } - return this; -}; - -/** - * Reverses all sibling nodes. - * - * @returns this. - */ -pv.Dom.Node.prototype.reverse = function() { - var childNodes = []; - this.visitAfter(function(n) { - while (n.lastChild) childNodes.push(n.removeChild(n.lastChild)); - for (var c; c = childNodes.pop();) n.insertBefore(c, n.firstChild); - }); - return this; -}; - -/** Returns all descendants of this node in preorder traversal. */ -pv.Dom.Node.prototype.nodes = function() { - var array = []; - - /** @private */ - function flatten(node) { - array.push(node); - node.childNodes.forEach(flatten); - } - - flatten(this, array); - return array; -}; - -/** - * Toggles the child nodes of this node. If this node is not yet toggled, this - * method removes all child nodes and appends them to a new toggled - * array attribute on this node. Otherwise, if this node is toggled, this method - * re-adds all toggled child nodes and deletes the toggled attribute. - * - *

This method has no effect if the node has no child nodes. - * - * @param {boolean} [recursive] whether the toggle should apply to descendants. - */ -pv.Dom.Node.prototype.toggle = function(recursive) { - if (recursive) return this.toggled - ? this.visitBefore(function(n) { if (n.toggled) n.toggle(); }) - : this.visitAfter(function(n) { if (!n.toggled) n.toggle(); }); - var n = this; - if (n.toggled) { - for (var c; c = n.toggled.pop();) n.appendChild(c); - delete n.toggled; - } else if (n.lastChild) { - n.toggled = []; - while (n.lastChild) n.toggled.push(n.removeChild(n.lastChild)); - } -}; - -/** - * Given a flat array of values, returns a simple DOM with each value wrapped by - * a node that is a child of the root node. - * - * @param {array} values. - * @returns {array} nodes. - */ -pv.nodes = function(values) { - var root = new pv.Dom.Node(); - for (var i = 0; i < values.length; i++) { - root.appendChild(new pv.Dom.Node(values[i])); - } - return root.nodes(); -}; diff --git a/lib/protovis/src/data/Flatten.js b/lib/protovis/src/data/Flatten.js deleted file mode 100644 index 117f6f16..00000000 --- a/lib/protovis/src/data/Flatten.js +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Returns a {@link pv.Flatten} operator for the specified map. This is a - * convenience factory method, equivalent to new pv.Flatten(map). - * - * @see pv.Flatten - * @param map a map to flatten. - * @returns {pv.Flatten} a flatten operator for the specified map. - */ -pv.flatten = function(map) { - return new pv.Flatten(map); -}; - -/** - * Constructs a flatten operator for the specified map. This constructor should - * not be invoked directly; use {@link pv.flatten} instead. - * - * @class Represents a flatten operator for the specified array. Flattening - * allows hierarchical maps to be flattened into an array. The levels in the - * input tree are specified by key functions. - * - *

For example, consider the following hierarchical data structure of Barley - * yields, from various sites in Minnesota during 1931-2: - * - *

{ 1931: {
- *     Manchuria: {
- *       "University Farm": 27.00,
- *       "Waseca": 48.87,
- *       "Morris": 27.43,
- *       ... },
- *     Glabron: {
- *       "University Farm": 43.07,
- *       "Waseca": 55.20,
- *       ... } },
- *   1932: {
- *     ... } }
- * - * To facilitate visualization, it may be useful to flatten the tree into a - * tabular array: - * - *
var array = pv.flatten(yields)
- *     .key("year")
- *     .key("variety")
- *     .key("site")
- *     .key("yield")
- *     .array();
- * - * This returns an array of object elements. Each element in the array has - * attributes corresponding to this flatten operator's keys: - * - *
{ site: "University Farm", variety: "Manchuria", year: 1931, yield: 27 },
- * { site: "Waseca", variety: "Manchuria", year: 1931, yield: 48.87 },
- * { site: "Morris", variety: "Manchuria", year: 1931, yield: 27.43 },
- * { site: "University Farm", variety: "Glabron", year: 1931, yield: 43.07 },
- * { site: "Waseca", variety: "Glabron", year: 1931, yield: 55.2 }, ...
- * - *

The flatten operator is roughly the inverse of the {@link pv.Nest} and - * {@link pv.Tree} operators. - * - * @param map a map to flatten. - */ -pv.Flatten = function(map) { - this.map = map; - this.keys = []; -}; - -/** - * Flattens using the specified key function. Multiple keys may be added to the - * flatten; the tiers of the underlying tree must correspond to the specified - * keys, in order. The order of the returned array is undefined; however, you - * can easily sort it. - * - * @param {string} key the key name. - * @param {function} [f] an optional value map function. - * @returns {pv.Nest} this. - */ -pv.Flatten.prototype.key = function(key, f) { - this.keys.push({name: key, value: f}); - delete this.$leaf; - return this; -}; - -/** - * Flattens using the specified leaf function. This is an alternative to - * specifying an explicit set of keys; the tiers of the underlying tree will be - * determined dynamically by recursing on the values, and the resulting keys - * will be stored in the entries keys attribute. The leaf function must - * return true for leaves, and false for internal nodes. - * - * @param {function} f a leaf function. - * @returns {pv.Nest} this. - */ -pv.Flatten.prototype.leaf = function(f) { - this.keys.length = 0; - this.$leaf = f; - return this; -}; - -/** - * Returns the flattened array. Each entry in the array is an object; each - * object has attributes corresponding to this flatten operator's keys. - * - * @returns an array of elements from the flattened map. - */ -pv.Flatten.prototype.array = function() { - var entries = [], stack = [], keys = this.keys, leaf = this.$leaf; - - /* Recursively visit using the leaf function. */ - if (leaf) { - function recurse(value, i) { - if (leaf(value)) { - entries.push({keys: stack.slice(), value: value}); - } else { - for (var key in value) { - stack.push(key); - recurse(value[key], i + 1); - stack.pop(); - } - } - } - recurse(this.map, 0); - return entries; - } - - /* Recursively visits the specified value. */ - function visit(value, i) { - if (i < keys.length - 1) { - for (var key in value) { - stack.push(key); - visit(value[key], i + 1); - stack.pop(); - } - } else { - entries.push(stack.concat(value)); - } - } - - visit(this.map, 0); - return entries.map(function(stack) { - var m = {}; - for (var i = 0; i < keys.length; i++) { - var k = keys[i], v = stack[i]; - m[k.name] = k.value ? k.value.call(null, v) : v; - } - return m; - }); -}; diff --git a/lib/protovis/src/data/Histogram.js b/lib/protovis/src/data/Histogram.js deleted file mode 100644 index 485caae7..00000000 --- a/lib/protovis/src/data/Histogram.js +++ /dev/null @@ -1,120 +0,0 @@ -/** - * Returns a histogram operator for the specified data, with an optional - * accessor function. If the data specified is not an array of numbers, an - * accessor function must be specified to map the data to numeric values. - * - * @class Represents a histogram operator. - * - * @param {array} data an array of numbers or objects. - * @param {function} [f] an optional accessor function. - */ -pv.histogram = function(data, f) { - var frequency = true; - return { - - /** - * Returns the computed histogram bins. An optional array of numbers, - * ticks, may be specified as the break points. If the ticks are - * not specified, default ticks will be computed using a linear scale on the - * data domain. - * - *

The returned array contains {@link pv.histogram.Bin}s. The x - * attribute corresponds to the bin's start value (inclusive), while the - * dx attribute stores the bin size (end - start). The y - * attribute stores either the frequency count or probability, depending on - * how the histogram operator has been configured. - * - *

The {@link pv.histogram.Bin} objects are themselves arrays, containing - * the data elements present in each bin, i.e., the elements in the - * data array (prior to invoking the accessor function, if any). - * For example, if the data represented countries, and the accessor function - * returned the GDP of each country, the returned bins would be arrays of - * countries (not GDPs). - * - * @function - * @name pv.histogram.prototype.bins - * @param {array} [ticks] - * @returns {array} - */ /** @private */ - bins: function(ticks) { - var x = pv.map(data, f), bins = []; - - /* Initialize default ticks. */ - if (!arguments.length) ticks = pv.Scale.linear(x).ticks(); - - /* Initialize the bins. */ - for (var i = 0; i < ticks.length - 1; i++) { - var bin = bins[i] = []; - bin.x = ticks[i]; - bin.dx = ticks[i + 1] - ticks[i]; - bin.y = 0; - } - - /* Count the number of samples per bin. */ - for (var i = 0; i < x.length; i++) { - var j = pv.search.index(ticks, x[i]) - 1, - bin = bins[Math.max(0, Math.min(bins.length - 1, j))]; - bin.y++; - bin.push(data[i]); - } - - /* Convert frequencies to probabilities. */ - if (!frequency) for (var i = 0; i < bins.length; i++) { - bins[i].y /= x.length; - } - - return bins; - }, - - /** - * Sets or gets whether this histogram operator returns frequencies or - * probabilities. - * - * @function - * @name pv.histogram.prototype.frequency - * @param {boolean} [x] - * @returns {pv.histogram} this. - */ /** @private */ - frequency: function(x) { - if (arguments.length) { - frequency = Boolean(x); - return this; - } - return frequency; - } - }; -}; - -/** - * @class Represents a bin returned by the {@link pv.histogram} operator. Bins - * are themselves arrays containing the data elements present in the given bin - * (prior to the accessor function being invoked to convert the data object to a - * numeric value). These bin arrays have additional attributes with meta - * information about the bin. - * - * @name pv.histogram.Bin - * @extends array - * @see pv.histogram - */ - -/** - * The start value of the bin's range. - * - * @type number - * @name pv.histogram.Bin.prototype.x - */ - -/** - * The magnitude value of the bin's range; end - start. - * - * @type number - * @name pv.histogram.Bin.prototype.dx - */ - -/** - * The frequency or probability of the bin, depending on how the histogram - * operator was configured. - * - * @type number - * @name pv.histogram.Bin.prototype.y - */ diff --git a/lib/protovis/src/data/LinearScale.js b/lib/protovis/src/data/LinearScale.js deleted file mode 100644 index 40d3a0c0..00000000 --- a/lib/protovis/src/data/LinearScale.js +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Returns a linear scale for the specified domain. The arguments to this - * constructor are optional, and equivalent to calling {@link #domain}. - * The default domain and range are [0,1]. - * - * @class Represents a linear scale; a function that performs a linear - * transformation. Most - * commonly, a linear scale represents a 1-dimensional linear transformation - * from a numeric domain of input data [d0, - * d1] to a numeric range of pixels [r0, - * r1]. The equation for such a scale is: - * - *

f(x) = (x - d0) / (d1 - d0) * - * (r1 - r0) + r0
- * - * For example, a linear scale from the domain [0, 100] to range [0, 640]: - * - *
f(x) = (x - 0) / (100 - 0) * (640 - 0) + 0
- * f(x) = x / 100 * 640
- * f(x) = x * 6.4
- *
- * - * Thus, saying - * - *
    .height(function(d) d * 6.4)
- * - * is identical to - * - *
    .height(pv.Scale.linear(0, 100).range(0, 640))
- * - * Note that the scale is itself a function, and thus can be used as a property - * directly, assuming that the data associated with a mark is a number. While - * this is convenient for single-use scales, frequently it is desirable to - * define scales globally: - * - *
var y = pv.Scale.linear(0, 100).range(0, 640);
- * - * The y scale can now be equivalently referenced within a property: - * - *
    .height(function(d) y(d))
- * - * Alternatively, if the data are not simple numbers, the appropriate value can - * be passed to the y scale (e.g., d.foo). The {@link #by} - * method similarly allows the data to be mapped to a numeric value before - * performing the linear transformation. - * - * @param {number...} domain... optional domain values. - * @extends pv.Scale.quantitative - */ -pv.Scale.linear = function() { - var scale = pv.Scale.quantitative(); - scale.domain.apply(scale, arguments); - return scale; -}; diff --git a/lib/protovis/src/data/LogScale.js b/lib/protovis/src/data/LogScale.js deleted file mode 100644 index 206351fb..00000000 --- a/lib/protovis/src/data/LogScale.js +++ /dev/null @@ -1,142 +0,0 @@ -/** - * Returns a log scale for the specified domain. The arguments to this - * constructor are optional, and equivalent to calling {@link #domain}. - * The default domain is [1,10] and the default range is [0,1]. - * - * @class Represents a log scale. Most commonly, a log scale - * represents a 1-dimensional log transformation from a numeric domain of input - * data [d0, d1] to a numeric range of - * pixels [r0, r1]. The equation for such a - * scale is: - * - *
f(x) = (log(x) - log(d0)) / (log(d1) - - * log(d0)) * (r1 - r0) + - * r0
- * - * where log(x) represents the zero-symmetric logarthim of x using - * the scale's associated base (default: 10, see {@link pv.logSymmetric}). For - * example, a log scale from the domain [1, 100] to range [0, 640]: - * - *
f(x) = (log(x) - log(1)) / (log(100) - log(1)) * (640 - 0) + 0
- * f(x) = log(x) / 2 * 640
- * f(x) = log(x) * 320
- *
- * - * Thus, saying - * - *
    .height(function(d) Math.log(d) * 138.974)
- * - * is equivalent to - * - *
    .height(pv.Scale.log(1, 100).range(0, 640))
- * - * Note that the scale is itself a function, and thus can be used as a property - * directly, assuming that the data associated with a mark is a number. While - * this is convenient for single-use scales, frequently it is desirable to - * define scales globally: - * - *
var y = pv.Scale.log(1, 100).range(0, 640);
- * - * The y scale can now be equivalently referenced within a property: - * - *
    .height(function(d) y(d))
- * - * Alternatively, if the data are not simple numbers, the appropriate value can - * be passed to the y scale (e.g., d.foo). The {@link #by} - * method similarly allows the data to be mapped to a numeric value before - * performing the log transformation. - * - * @param {number...} domain... optional domain values. - * @extends pv.Scale.quantitative - */ -pv.Scale.log = function() { - var scale = pv.Scale.quantitative(1, 10), - b, // logarithm base - p, // cached Math.log(b) - /** @ignore */ log = function(x) { return Math.log(x) / p; }, - /** @ignore */ pow = function(y) { return Math.pow(b, y); }; - - /** - * Returns an array of evenly-spaced, suitably-rounded values in the input - * domain. These values are frequently used in conjunction with - * {@link pv.Rule} to display tick marks or grid lines. - * - * @function - * @name pv.Scale.log.prototype.ticks - * @returns {number[]} an array input domain values to use as ticks. - */ - scale.ticks = function() { - // TODO support non-uniform domains - var d = scale.domain(), - n = d[0] < 0, - i = Math.floor(n ? -log(-d[0]) : log(d[0])), - j = Math.ceil(n ? -log(-d[1]) : log(d[1])), - ticks = []; - if (n) { - ticks.push(-pow(-i)); - for (; i++ < j;) for (var k = b - 1; k > 0; k--) ticks.push(-pow(-i) * k); - } else { - for (; i < j; i++) for (var k = 1; k < b; k++) ticks.push(pow(i) * k); - ticks.push(pow(i)); - } - for (i = 0; ticks[i] < d[0]; i++); // strip small values - for (j = ticks.length; ticks[j - 1] > d[1]; j--); // strip big values - return ticks.slice(i, j); - }; - - /** - * Formats the specified tick value using the appropriate precision, assuming - * base 10. - * - * @function - * @name pv.Scale.log.prototype.tickFormat - * @param {number} t a tick value. - * @returns {string} a formatted tick value. - */ - scale.tickFormat = function(t) { - return t.toPrecision(1); - }; - - /** - * "Nices" this scale, extending the bounds of the input domain to - * evenly-rounded values. This method uses {@link pv.logFloor} and - * {@link pv.logCeil}. Nicing is useful if the domain is computed dynamically - * from data, and may be irregular. For example, given a domain of - * [0.20147987687960267, 0.996679553296417], a call to nice() might - * extend the domain to [0.1, 1]. - * - *

This method must be invoked each time after setting the domain (and - * base). - * - * @function - * @name pv.Scale.log.prototype.nice - * @returns {pv.Scale.log} this. - */ - scale.nice = function() { - // TODO support non-uniform domains - var d = scale.domain(); - return scale.domain(pv.logFloor(d[0], b), pv.logCeil(d[1], b)); - }; - - /** - * Sets or gets the logarithm base. Defaults to 10. - * - * @function - * @name pv.Scale.log.prototype.base - * @param {number} [v] the new base. - * @returns {pv.Scale.log} this, or the current base. - */ - scale.base = function(v) { - if (arguments.length) { - b = Number(v); - p = Math.log(b); - scale.transform(log, pow); // update transformed domain - return this; - } - return b; - }; - - scale.domain.apply(scale, arguments); - return scale.base(10); -}; diff --git a/lib/protovis/src/data/Nest.js b/lib/protovis/src/data/Nest.js deleted file mode 100644 index 22cd601b..00000000 --- a/lib/protovis/src/data/Nest.js +++ /dev/null @@ -1,257 +0,0 @@ -/** - * Returns a {@link pv.Nest} operator for the specified array. This is a - * convenience factory method, equivalent to new pv.Nest(array). - * - * @see pv.Nest - * @param {array} array an array of elements to nest. - * @returns {pv.Nest} a nest operator for the specified array. - */ -pv.nest = function(array) { - return new pv.Nest(array); -}; - -/** - * Constructs a nest operator for the specified array. This constructor should - * not be invoked directly; use {@link pv.nest} instead. - * - * @class Represents a {@link Nest} operator for the specified array. Nesting - * allows elements in an array to be grouped into a hierarchical tree - * structure. The levels in the tree are specified by key functions. The - * leaf nodes of the tree can be sorted by value, while the internal nodes can - * be sorted by key. Finally, the tree can be returned either has a - * multidimensional array via {@link #entries}, or as a hierarchical map via - * {@link #map}. The {@link #rollup} routine similarly returns a map, collapsing - * the elements in each leaf node using a summary function. - * - *

For example, consider the following tabular data structure of Barley - * yields, from various sites in Minnesota during 1931-2: - * - *

{ yield: 27.00, variety: "Manchuria", year: 1931, site: "University Farm" },
- * { yield: 48.87, variety: "Manchuria", year: 1931, site: "Waseca" },
- * { yield: 27.43, variety: "Manchuria", year: 1931, site: "Morris" }, ...
- * - * To facilitate visualization, it may be useful to nest the elements first by - * year, and then by variety, as follows: - * - *
var nest = pv.nest(yields)
- *     .key(function(d) d.year)
- *     .key(function(d) d.variety)
- *     .entries();
- * - * This returns a nested array. Each element of the outer array is a key-values - * pair, listing the values for each distinct key: - * - *
{ key: 1931, values: [
- *   { key: "Manchuria", values: [
- *       { yield: 27.00, variety: "Manchuria", year: 1931, site: "University Farm" },
- *       { yield: 48.87, variety: "Manchuria", year: 1931, site: "Waseca" },
- *       { yield: 27.43, variety: "Manchuria", year: 1931, site: "Morris" },
- *       ...
- *     ] },
- *   { key: "Glabron", values: [
- *       { yield: 43.07, variety: "Glabron", year: 1931, site: "University Farm" },
- *       { yield: 55.20, variety: "Glabron", year: 1931, site: "Waseca" },
- *       ...
- *     ] },
- *   ] },
- * { key: 1932, values: ... }
- * - * Further details, including sorting and rollup, is provided below on the - * corresponding methods. - * - * @param {array} array an array of elements to nest. - */ -pv.Nest = function(array) { - this.array = array; - this.keys = []; -}; - -/** - * Nests using the specified key function. Multiple keys may be added to the - * nest; the array elements will be nested in the order keys are specified. - * - * @param {function} key a key function; must return a string or suitable map - * key. - * @returns {pv.Nest} this. - */ -pv.Nest.prototype.key = function(key) { - this.keys.push(key); - return this; -}; - -/** - * Sorts the previously-added keys. The natural sort order is used by default - * (see {@link pv.naturalOrder}); if an alternative order is desired, - * order should be a comparator function. If this method is not called - * (i.e., keys are unsorted), keys will appear in the order they appear - * in the underlying elements array. For example, - * - *
pv.nest(yields)
- *     .key(function(d) d.year)
- *     .key(function(d) d.variety)
- *     .sortKeys()
- *     .entries()
- * - * groups yield data by year, then variety, and sorts the variety groups - * lexicographically (since the variety attribute is a string). - * - *

Key sort order is only used in conjunction with {@link #entries}, which - * returns an array of key-values pairs. If the nest is used to construct a - * {@link #map} instead, keys are unsorted. - * - * @param {function} [order] an optional comparator function. - * @returns {pv.Nest} this. - */ -pv.Nest.prototype.sortKeys = function(order) { - this.keys[this.keys.length - 1].order = order || pv.naturalOrder; - return this; -}; - -/** - * Sorts the leaf values. The natural sort order is used by default (see - * {@link pv.naturalOrder}); if an alternative order is desired, order - * should be a comparator function. If this method is not called (i.e., values - * are unsorted), values will appear in the order they appear in the - * underlying elements array. For example, - * - *

pv.nest(yields)
- *     .key(function(d) d.year)
- *     .key(function(d) d.variety)
- *     .sortValues(function(a, b) a.yield - b.yield)
- *     .entries()
- * - * groups yield data by year, then variety, and sorts the values for each - * variety group by yield. - * - *

Value sort order, unlike keys, applies to both {@link #entries} and - * {@link #map}. It has no effect on {@link #rollup}. - * - * @param {function} [order] an optional comparator function. - * @returns {pv.Nest} this. - */ -pv.Nest.prototype.sortValues = function(order) { - this.order = order || pv.naturalOrder; - return this; -}; - -/** - * Returns a hierarchical map of values. Each key adds one level to the - * hierarchy. With only a single key, the returned map will have a key for each - * distinct value of the key function; the correspond value with be an array of - * elements with that key value. If a second key is added, this will be a nested - * map. For example: - * - *

pv.nest(yields)
- *     .key(function(d) d.variety)
- *     .key(function(d) d.site)
- *     .map()
- * - * returns a map m such that m[variety][site] is an array, a subset of - * yields, with each element having the given variety and site. - * - * @returns a hierarchical map of values. - */ -pv.Nest.prototype.map = function() { - var map = {}, values = []; - - /* Build the map. */ - for (var i, j = 0; j < this.array.length; j++) { - var x = this.array[j]; - var m = map; - for (i = 0; i < this.keys.length - 1; i++) { - var k = this.keys[i](x); - if (!m[k]) m[k] = {}; - m = m[k]; - } - k = this.keys[i](x); - if (!m[k]) { - var a = []; - values.push(a); - m[k] = a; - } - m[k].push(x); - } - - /* Sort each leaf array. */ - if (this.order) { - for (var i = 0; i < values.length; i++) { - values[i].sort(this.order); - } - } - - return map; -}; - -/** - * Returns a hierarchical nested array. This method is similar to - * {@link pv.entries}, but works recursively on the entire hierarchy. Rather - * than returning a map like {@link #map}, this method returns a nested - * array. Each element of the array has a key and values - * field. For leaf nodes, the values array will be a subset of the - * underlying elements array; for non-leaf nodes, the values array will - * contain more key-values pairs. - * - *

For an example usage, see the {@link Nest} constructor. - * - * @returns a hierarchical nested array. - */ -pv.Nest.prototype.entries = function() { - - /** Recursively extracts the entries for the given map. */ - function entries(map) { - var array = []; - for (var k in map) { - var v = map[k]; - array.push({ key: k, values: (v instanceof Array) ? v : entries(v) }); - }; - return array; - } - - /** Recursively sorts the values for the given key-values array. */ - function sort(array, i) { - var o = this.keys[i].order; - if (o) array.sort(function(a, b) { return o(a.key, b.key); }); - if (++i < this.keys.length) { - for (var j = 0; j < array.length; j++) { - sort.call(this, array[j].values, i); - } - } - return array; - } - - return sort.call(this, entries(this.map()), 0); -}; - -/** - * Returns a rollup map. The behavior of this method is the same as - * {@link #map}, except that the leaf values are replaced with the return value - * of the specified rollup function f. For example, - * - *

pv.nest(yields)
- *      .key(function(d) d.site)
- *      .rollup(function(v) pv.median(v, function(d) d.yield))
- * - * first groups yield data by site, and then returns a map from site to median - * yield for the given site. - * - * @see #map - * @param {function} f a rollup function. - * @returns a hierarchical map, with the leaf values computed by f. - */ -pv.Nest.prototype.rollup = function(f) { - - /** Recursively descends to the leaf nodes (arrays) and does rollup. */ - function rollup(map) { - for (var key in map) { - var value = map[key]; - if (value instanceof Array) { - map[key] = f(value); - } else { - rollup(value); - } - } - return map; - } - - return rollup(this.map()); -}; diff --git a/lib/protovis/src/data/Numbers.js b/lib/protovis/src/data/Numbers.js deleted file mode 100644 index ec2e8684..00000000 --- a/lib/protovis/src/data/Numbers.js +++ /dev/null @@ -1,313 +0,0 @@ -/** - * Returns an array of numbers, starting at start, incrementing by - * step, until stop is reached. The stop value is - * exclusive. If only a single argument is specified, this value is interpeted - * as the stop value, with the start value as zero. If only two - * arguments are specified, the step value is implied to be one. - * - *

The method is modeled after the built-in range method from - * Python. See the Python documentation for more details. - * - * @see Python range - * @param {number} [start] the start value. - * @param {number} stop the stop value. - * @param {number} [step] the step value. - * @returns {number[]} an array of numbers. - */ -pv.range = function(start, stop, step) { - if (arguments.length == 1) { - stop = start; - start = 0; - } - if (step == undefined) step = 1; - if ((stop - start) / step == Infinity) throw new Error("range must be finite"); - var array = [], i = 0, j; - stop -= (stop - start) * 1e-10; // floating point precision! - if (step < 0) { - while ((j = start + step * i++) > stop) { - array.push(j); - } - } else { - while ((j = start + step * i++) < stop) { - array.push(j); - } - } - return array; -}; - -/** - * Returns a random number in the range [start, stop) that is - * a multiple of step. More specifically, the returned number is of the - * form start + n * step, where n is a - * nonnegative integer. If step is not specified, it defaults to 1, - * returning a random integer if start is also an integer. - * - * @param {number} [start] the start value value. - * @param {number} stop the stop value. - * @param {number} [step] the step value. - * @returns {number} a random number between start and stop. - */ -pv.random = function(start, stop, step) { - if (arguments.length == 1) { - stop = start; - start = 0; - } - if (step == undefined) step = 1; - return step - ? (Math.floor(Math.random() * (stop - start) / step) * step + start) - : (Math.random() * (stop - start) + start); -}; - -/** - * Returns the sum of the specified array. If the specified array is not an - * array of numbers, an optional accessor function f can be specified - * to map the elements to numbers. See {@link #normalize} for an example. - * Accessor functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the sum of the specified array. - */ -pv.sum = function(array, f) { - var o = {}; - return array.reduce(f - ? function(p, d, i) { o.index = i; return p + f.call(o, d); } - : function(p, d) { return p + d; }, 0); -}; - -/** - * Returns the maximum value of the specified array. If the specified array is - * not an array of numbers, an optional accessor function f can be - * specified to map the elements to numbers. See {@link #normalize} for an - * example. Accessor functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the maximum value of the specified array. - */ -pv.max = function(array, f) { - if (f == pv.index) return array.length - 1; - return Math.max.apply(null, f ? pv.map(array, f) : array); -}; - -/** - * Returns the index of the maximum value of the specified array. If the - * specified array is not an array of numbers, an optional accessor function - * f can be specified to map the elements to numbers. See - * {@link #normalize} for an example. Accessor functions can refer to - * this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the index of the maximum value of the specified array. - */ -pv.max.index = function(array, f) { - if (!array.length) return -1; - if (f == pv.index) return array.length - 1; - if (!f) f = pv.identity; - var maxi = 0, maxx = -Infinity, o = {}; - for (var i = 0; i < array.length; i++) { - o.index = i; - var x = f.call(o, array[i]); - if (x > maxx) { - maxx = x; - maxi = i; - } - } - return maxi; -} - -/** - * Returns the minimum value of the specified array of numbers. If the specified - * array is not an array of numbers, an optional accessor function f - * can be specified to map the elements to numbers. See {@link #normalize} for - * an example. Accessor functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the minimum value of the specified array. - */ -pv.min = function(array, f) { - if (f == pv.index) return 0; - return Math.min.apply(null, f ? pv.map(array, f) : array); -}; - -/** - * Returns the index of the minimum value of the specified array. If the - * specified array is not an array of numbers, an optional accessor function - * f can be specified to map the elements to numbers. See - * {@link #normalize} for an example. Accessor functions can refer to - * this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the index of the minimum value of the specified array. - */ -pv.min.index = function(array, f) { - if (!array.length) return -1; - if (f == pv.index) return 0; - if (!f) f = pv.identity; - var mini = 0, minx = Infinity, o = {}; - for (var i = 0; i < array.length; i++) { - o.index = i; - var x = f.call(o, array[i]); - if (x < minx) { - minx = x; - mini = i; - } - } - return mini; -} - -/** - * Returns the arithmetic mean, or average, of the specified array. If the - * specified array is not an array of numbers, an optional accessor function - * f can be specified to map the elements to numbers. See - * {@link #normalize} for an example. Accessor functions can refer to - * this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the mean of the specified array. - */ -pv.mean = function(array, f) { - return pv.sum(array, f) / array.length; -}; - -/** - * Returns the median of the specified array. If the specified array is not an - * array of numbers, an optional accessor function f can be specified - * to map the elements to numbers. See {@link #normalize} for an example. - * Accessor functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the median of the specified array. - */ -pv.median = function(array, f) { - if (f == pv.index) return (array.length - 1) / 2; - array = pv.map(array, f).sort(pv.naturalOrder); - if (array.length % 2) return array[Math.floor(array.length / 2)]; - var i = array.length / 2; - return (array[i - 1] + array[i]) / 2; -}; - -/** - * Returns the unweighted variance of the specified array. If the specified - * array is not an array of numbers, an optional accessor function f - * can be specified to map the elements to numbers. See {@link #normalize} for - * an example. Accessor functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the variance of the specified array. - */ -pv.variance = function(array, f) { - if (array.length < 1) return NaN; - if (array.length == 1) return 0; - var mean = pv.mean(array, f), sum = 0, o = {}; - if (!f) f = pv.identity; - for (var i = 0; i < array.length; i++) { - o.index = i; - var d = f.call(o, array[i]) - mean; - sum += d * d; - } - return sum; -}; - -/** - * Returns an unbiased estimation of the standard deviation of a population, - * given the specified random sample. If the specified array is not an array of - * numbers, an optional accessor function f can be specified to map the - * elements to numbers. See {@link #normalize} for an example. Accessor - * functions can refer to this.index. - * - * @param {array} array an array of objects, or numbers. - * @param {function} [f] an optional accessor function. - * @returns {number} the standard deviation of the specified array. - */ -pv.deviation = function(array, f) { - return Math.sqrt(pv.variance(array, f) / (array.length - 1)); -}; - -/** - * Returns the logarithm with a given base value. - * - * @param {number} x the number for which to compute the logarithm. - * @param {number} b the base of the logarithm. - * @returns {number} the logarithm value. - */ -pv.log = function(x, b) { - return Math.log(x) / Math.log(b); -}; - -/** - * Computes a zero-symmetric logarithm. Computes the logarithm of the absolute - * value of the input, and determines the sign of the output according to the - * sign of the input value. - * - * @param {number} x the number for which to compute the logarithm. - * @param {number} b the base of the logarithm. - * @returns {number} the symmetric log value. - */ -pv.logSymmetric = function(x, b) { - return (x == 0) ? 0 : ((x < 0) ? -pv.log(-x, b) : pv.log(x, b)); -}; - -/** - * Computes a zero-symmetric logarithm, with adjustment to values between zero - * and the logarithm base. This adjustment introduces distortion for values less - * than the base number, but enables simultaneous plotting of log-transformed - * data involving both positive and negative numbers. - * - * @param {number} x the number for which to compute the logarithm. - * @param {number} b the base of the logarithm. - * @returns {number} the adjusted, symmetric log value. - */ -pv.logAdjusted = function(x, b) { - if (!isFinite(x)) return x; - var negative = x < 0; - if (x < b) x += (b - x) / b; - return negative ? -pv.log(x, b) : pv.log(x, b); -}; - -/** - * Rounds an input value down according to its logarithm. The method takes the - * floor of the logarithm of the value and then uses the resulting value as an - * exponent for the base value. - * - * @param {number} x the number for which to compute the logarithm floor. - * @param {number} b the base of the logarithm. - * @returns {number} the rounded-by-logarithm value. - */ -pv.logFloor = function(x, b) { - return (x > 0) - ? Math.pow(b, Math.floor(pv.log(x, b))) - : -Math.pow(b, -Math.floor(-pv.log(-x, b))); -}; - -/** - * Rounds an input value up according to its logarithm. The method takes the - * ceiling of the logarithm of the value and then uses the resulting value as an - * exponent for the base value. - * - * @param {number} x the number for which to compute the logarithm ceiling. - * @param {number} b the base of the logarithm. - * @returns {number} the rounded-by-logarithm value. - */ -pv.logCeil = function(x, b) { - return (x > 0) - ? Math.pow(b, Math.ceil(pv.log(x, b))) - : -Math.pow(b, -Math.ceil(-pv.log(-x, b))); -}; - -(function() { - var radians = Math.PI / 180, - degrees = 180 / Math.PI; - - /** Returns the number of radians corresponding to the specified degrees. */ - pv.radians = function(degrees) { return radians * degrees; }; - - /** Returns the number of degrees corresponding to the specified radians. */ - pv.degrees = function(radians) { return degrees * radians; }; -})(); diff --git a/lib/protovis/src/data/Objects.js b/lib/protovis/src/data/Objects.js deleted file mode 100644 index 5ff94356..00000000 --- a/lib/protovis/src/data/Objects.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Returns all of the property names (keys) of the specified object (a map). The - * order of the returned array is not defined. - * - * @param map an object. - * @returns {string[]} an array of strings corresponding to the keys. - * @see #entries - */ -pv.keys = function(map) { - var array = []; - for (var key in map) { - array.push(key); - } - return array; -}; - -/** - * Returns all of the entries (key-value pairs) of the specified object (a - * map). The order of the returned array is not defined. Each key-value pair is - * represented as an object with key and value attributes, - * e.g., {key: "foo", value: 42}. - * - * @param map an object. - * @returns {array} an array of key-value pairs corresponding to the keys. - */ -pv.entries = function(map) { - var array = []; - for (var key in map) { - array.push({ key: key, value: map[key] }); - } - return array; -}; - -/** - * Returns all of the values (attribute values) of the specified object (a - * map). The order of the returned array is not defined. - * - * @param map an object. - * @returns {array} an array of objects corresponding to the values. - * @see #entries - */ -pv.values = function(map) { - var array = []; - for (var key in map) { - array.push(map[key]); - } - return array; -}; - -/** - * Returns a map constructed from the specified keys, using the - * function f to compute the value for each key. The single argument to - * the value function is the key. The callback is invoked only for indexes of - * the array which have assigned values; it is not invoked for indexes which - * have been deleted or which have never been assigned values. - * - *

For example, this expression creates a map from strings to string length: - * - *

pv.dict(["one", "three", "seventeen"], function(s) s.length)
- * - * The returned value is {one: 3, three: 5, seventeen: 9}. Accessor - * functions can refer to this.index. - * - * @param {array} keys an array. - * @param {function} f a value function. - * @returns a map from keys to values. - */ -pv.dict = function(keys, f) { - var m = {}, o = {}; - for (var i = 0; i < keys.length; i++) { - if (i in keys) { - var k = keys[i]; - o.index = i; - m[k] = f.call(o, k); - } - } - return m; -}; diff --git a/lib/protovis/src/data/OrdinalScale.js b/lib/protovis/src/data/OrdinalScale.js deleted file mode 100644 index 917ec18c..00000000 --- a/lib/protovis/src/data/OrdinalScale.js +++ /dev/null @@ -1,267 +0,0 @@ -/** - * Returns an ordinal scale for the specified domain. The arguments to this - * constructor are optional, and equivalent to calling {@link #domain}. - * - * @class Represents an ordinal scale. An ordinal scale represents a - * pairwise mapping from n discrete values in the input domain to - * n discrete values in the output range. For example, an ordinal scale - * might map a domain of species ["setosa", "versicolor", "virginica"] to colors - * ["red", "green", "blue"]. Thus, saying - * - *
    .fillStyle(function(d) {
- *         switch (d.species) {
- *           case "setosa": return "red";
- *           case "versicolor": return "green";
- *           case "virginica": return "blue";
- *         }
- *       })
- * - * is equivalent to - * - *
    .fillStyle(pv.Scale.ordinal("setosa", "versicolor", "virginica")
- *         .range("red", "green", "blue")
- *         .by(function(d) d.species))
- * - * If the mapping from species to color does not need to be specified - * explicitly, the domain can be omitted. In this case it will be inferred - * lazily from the data: - * - *
    .fillStyle(pv.colors("red", "green", "blue")
- *         .by(function(d) d.species))
- * - * When the domain is inferred, the first time the scale is invoked, the first - * element from the range will be returned. Subsequent calls with unique values - * will return subsequent elements from the range. If the inferred domain grows - * larger than the range, range values will be reused. However, it is strongly - * recommended that the domain and the range contain the same number of - * elements. - * - *

A range can be discretized from a continuous interval (e.g., for pixel - * positioning) by using {@link #split}, {@link #splitFlush} or - * {@link #splitBanded} after the domain has been set. For example, if - * states is an array of the fifty U.S. state names, the state name can - * be encoded in the left position: - * - *

    .left(pv.Scale.ordinal(states)
- *         .split(0, 640)
- *         .by(function(d) d.state))
- * - *

N.B.: ordinal scales are not invertible (at least not yet), since the - * domain and range and discontinuous. A workaround is to use a linear scale. - * - * @param {...} domain... optional domain values. - * @extends pv.Scale - * @see pv.colors - */ -pv.Scale.ordinal = function() { - var d = [], i = {}, r = [], band = 0; - - /** @private */ - function scale(x) { - if (!(x in i)) i[x] = d.push(x) - 1; - return r[i[x] % r.length]; - } - - /** - * Sets or gets the input domain. This method can be invoked several ways: - * - *

1. domain(values...) - * - *

Specifying the domain as a series of values is the most explicit and - * recommended approach. However, if the domain values are derived from data, - * you may find the second method more appropriate. - * - *

2. domain(array, f) - * - *

Rather than enumerating the domain values as explicit arguments to this - * method, you can specify a single argument of an array. In addition, you can - * specify an optional accessor function to extract the domain values from the - * array. - * - *

3. domain() - * - *

Invoking the domain method with no arguments returns the - * current domain as an array. - * - * @function - * @name pv.Scale.ordinal.prototype.domain - * @param {...} domain... domain values. - * @returns {pv.Scale.ordinal} this, or the current domain. - */ - scale.domain = function(array, f) { - if (arguments.length) { - array = (array instanceof Array) - ? ((arguments.length > 1) ? pv.map(array, f) : array) - : Array.prototype.slice.call(arguments); - - /* Filter the specified ordinals to their unique values. */ - d = []; - var seen = {}; - for (var j = 0; j < array.length; j++) { - var o = array[j]; - if (!(o in seen)) { - seen[o] = true; - d.push(o); - } - } - - i = pv.numerate(d); - return this; - } - return d; - }; - - /** - * Sets or gets the output range. This method can be invoked several ways: - * - *

1. range(values...) - * - *

Specifying the range as a series of values is the most explicit and - * recommended approach. However, if the range values are derived from data, - * you may find the second method more appropriate. - * - *

2. range(array, f) - * - *

Rather than enumerating the range values as explicit arguments to this - * method, you can specify a single argument of an array. In addition, you can - * specify an optional accessor function to extract the range values from the - * array. - * - *

3. range() - * - *

Invoking the range method with no arguments returns the - * current range as an array. - * - * @function - * @name pv.Scale.ordinal.prototype.range - * @param {...} range... range values. - * @returns {pv.Scale.ordinal} this, or the current range. - */ - scale.range = function(array, f) { - if (arguments.length) { - r = (array instanceof Array) - ? ((arguments.length > 1) ? pv.map(array, f) : array) - : Array.prototype.slice.call(arguments); - if (typeof r[0] == "string") r = r.map(pv.color); - return this; - } - return r; - }; - - /** - * Sets the range from the given continuous interval. The interval - * [min, max] is subdivided into n equispaced points, - * where n is the number of (unique) values in the domain. The first - * and last point are offset from the edge of the range by half the distance - * between points. - * - *

This method must be called after the domain is set. - * - * @function - * @name pv.Scale.ordinal.prototype.split - * @param {number} min minimum value of the output range. - * @param {number} max maximum value of the output range. - * @returns {pv.Scale.ordinal} this. - * @see #splitFlush - * @see #splitBanded - */ - scale.split = function(min, max) { - var step = (max - min) / this.domain().length; - r = pv.range(min + step / 2, max, step); - return this; - }; - - /** - * Sets the range from the given continuous interval. The interval - * [min, max] is subdivided into n equispaced points, - * where n is the number of (unique) values in the domain. The first - * and last point are exactly on the edge of the range. - * - *

This method must be called after the domain is set. - * - * @function - * @name pv.Scale.ordinal.prototype.splitFlush - * @param {number} min minimum value of the output range. - * @param {number} max maximum value of the output range. - * @returns {pv.Scale.ordinal} this. - * @see #split - */ - scale.splitFlush = function(min, max) { - var n = this.domain().length, step = (max - min) / (n - 1); - r = (n == 1) ? [(min + max) / 2] - : pv.range(min, max + step / 2, step); - return this; - }; - - /** - * Sets the range from the given continuous interval. The interval - * [min, max] is subdivided into n equispaced bands, - * where n is the number of (unique) values in the domain. The first - * and last band are offset from the edge of the range by the distance between - * bands. - * - *

The band width argument, band, is typically in the range [0, 1] - * and defaults to 1. This fraction corresponds to the amount of space in the - * range to allocate to the bands, as opposed to padding. A value of 0.5 means - * that the band width will be equal to the padding width. The computed - * absolute band width can be retrieved from the range as - * scale.range().band. - * - *

If the band width argument is negative, this method will allocate bands - * of a fixed width -band, rather than a relative fraction of - * the available space. - * - *

Tip: to inset the bands by a fixed amount p, specify a minimum - * value of min + p (or simply p, if min is - * 0). Then set the mark width to scale.range().band - p. - * - *

This method must be called after the domain is set. - * - * @function - * @name pv.Scale.ordinal.prototype.splitBanded - * @param {number} min minimum value of the output range. - * @param {number} max maximum value of the output range. - * @param {number} [band] the fractional band width in [0, 1]; defaults to 1. - * @returns {pv.Scale.ordinal} this. - * @see #split - */ - scale.splitBanded = function(min, max, band) { - if (arguments.length < 3) band = 1; - if (band < 0) { - var n = this.domain().length, - total = -band * n, - remaining = max - min - total, - padding = remaining / (n + 1); - r = pv.range(min + padding, max, padding - band); - r.band = -band; - } else { - var step = (max - min) / (this.domain().length + (1 - band)); - r = pv.range(min + step * (1 - band), max, step); - r.band = step * band; - } - return this; - }; - - /** - * Returns a view of this scale by the specified accessor function f. - * Given a scale y, y.by(function(d) d.foo) is equivalent to - * function(d) y(d.foo). This method should be used judiciously; it - * is typically more clear to invoke the scale directly, passing in the value - * to be scaled. - * - * @function - * @name pv.Scale.ordinal.prototype.by - * @param {function} f an accessor function. - * @returns {pv.Scale.ordinal} a view of this scale by the specified accessor - * function. - */ - scale.by = function(f) { - function by() { return scale(f.apply(this, arguments)); } - for (var method in scale) by[method] = scale[method]; - return by; - }; - - scale.domain.apply(scale, arguments); - return scale; -}; diff --git a/lib/protovis/src/data/QuantileScale.js b/lib/protovis/src/data/QuantileScale.js deleted file mode 100644 index 9eede71b..00000000 --- a/lib/protovis/src/data/QuantileScale.js +++ /dev/null @@ -1,180 +0,0 @@ -/** - * Constructs a default quantile scale. The arguments to this constructor are - * optional, and equivalent to calling {@link #domain}. The default domain is - * the empty set, and the default range is [0,1]. - * - * @class Represents a quantile scale; a function that maps from a value within - * a sortable domain to a quantized numeric range. Typically, the domain is a - * set of numbers, but any sortable value (such as strings) can be used as the - * domain of a quantile scale. The range defaults to [0,1], with 0 corresponding - * to the smallest value in the domain, 1 the largest, .5 the median, etc. - * - *

By default, the number of quantiles in the range corresponds to the number - * of values in the domain. The {@link #quantiles} method can be used to specify - * an explicit number of quantiles; for example, quantiles(4) produces - * a standard quartile scale. A quartile scale's range is a set of four discrete - * values, such as [0, 1/3, 2/3, 1]. Calling the {@link #range} method will - * scale these discrete values accordingly, similar to {@link - * pv.Scale.ordinal#splitFlush}. - * - *

For example, given the strings ["c", "a", "b"], a default quantile scale: - * - *

pv.Scale.quantile("c", "a", "b")
- * - * will return 0 for "a", .5 for "b", and 1 for "c". - * - * @extends pv.Scale - */ -pv.Scale.quantile = function() { - var n = -1, // number of quantiles - j = -1, // max quantile index - q = [], // quantile boundaries - d = [], // domain - y = pv.Scale.linear(); // range - - /** @private */ - function scale(x) { - return y(Math.max(0, Math.min(j, pv.search.index(q, x) - 1)) / j); - } - - /** - * Sets or gets the quantile boundaries. By default, each element in the - * domain is in its own quantile. If the argument to this method is a number, - * it specifies the number of equal-sized quantiles by which to divide the - * domain. - * - *

If no arguments are specified, this method returns the quantile - * boundaries; the first element is always the minimum value of the domain, - * and the last element is the maximum value of the domain. Thus, the length - * of the returned array is always one greater than the number of quantiles. - * - * @function - * @name pv.Scale.quantile.prototype.quantiles - * @param {number} x the number of quantiles. - */ - scale.quantiles = function(x) { - if (arguments.length) { - n = Number(x); - if (n < 0) { - q = [d[0]].concat(d); - j = d.length - 1; - } else { - q = []; - q[0] = d[0]; - for (var i = 1; i <= n; i++) { - q[i] = d[~~(i * (d.length - 1) / n)]; - } - j = n - 1; - } - return this; - } - return q; - }; - - /** - * Sets or gets the input domain. This method can be invoked several ways: - * - *

1. domain(values...) - * - *

Specifying the domain as a series of values is the most explicit and - * recommended approach. However, if the domain values are derived from data, - * you may find the second method more appropriate. - * - *

2. domain(array, f) - * - *

Rather than enumerating the domain values as explicit arguments to this - * method, you can specify a single argument of an array. In addition, you can - * specify an optional accessor function to extract the domain values from the - * array. - * - *

3. domain() - * - *

Invoking the domain method with no arguments returns the - * current domain as an array. - * - * @function - * @name pv.Scale.quantile.prototype.domain - * @param {...} domain... domain values. - * @returns {pv.Scale.quantile} this, or the current domain. - */ - scale.domain = function(array, f) { - if (arguments.length) { - d = (array instanceof Array) - ? pv.map(array, f) - : Array.prototype.slice.call(arguments); - d.sort(pv.naturalOrder); - scale.quantiles(n); // recompute quantiles - return this; - } - return d; - }; - - /** - * Sets or gets the output range. This method can be invoked several ways: - * - *

1. range(min, ..., max) - * - *

The range may be specified as a series of numbers or colors. Most - * commonly, two numbers are specified: the minimum and maximum pixel values. - * For a color scale, values may be specified as {@link pv.Color}s or - * equivalent strings. For a diverging scale, or other subdivided non-uniform - * scales, multiple values can be specified. For example: - * - *

    .range("red", "white", "green")
- * - *

Currently, only numbers and colors are supported as range values. The - * number of range values must exactly match the number of domain values, or - * the behavior of the scale is undefined. - * - *

2. range() - * - *

Invoking the range method with no arguments returns the current - * range as an array of numbers or colors. - * - * @function - * @name pv.Scale.quantile.prototype.range - * @param {...} range... range values. - * @returns {pv.Scale.quantile} this, or the current range. - */ - scale.range = function() { - if (arguments.length) { - y.range.apply(y, arguments); - return this; - } - return y.range(); - }; - - /** - * Returns a view of this scale by the specified accessor function f. - * Given a scale y, y.by(function(d) d.foo) is equivalent to - * function(d) y(d.foo). - * - *

This method is provided for convenience, such that scales can be - * succinctly defined inline. For example, given an array of data elements - * that have a score attribute with the domain [0, 1], the height - * property could be specified as: - * - *

.height(pv.Scale.linear().range(0, 480).by(function(d) d.score))
- * - * This is equivalent to: - * - *
.height(function(d) d.score * 480)
- * - * This method should be used judiciously; it is typically more clear to - * invoke the scale directly, passing in the value to be scaled. - * - * @function - * @name pv.Scale.quantile.prototype.by - * @param {function} f an accessor function. - * @returns {pv.Scale.quantile} a view of this scale by the specified - * accessor function. - */ - scale.by = function(f) { - function by() { return scale(f.apply(this, arguments)); } - for (var method in scale) by[method] = scale[method]; - return by; - }; - - scale.domain.apply(scale, arguments); - return scale; -}; diff --git a/lib/protovis/src/data/QuantitativeScale.js b/lib/protovis/src/data/QuantitativeScale.js deleted file mode 100644 index 48f49796..00000000 --- a/lib/protovis/src/data/QuantitativeScale.js +++ /dev/null @@ -1,440 +0,0 @@ -/** - * Returns a default quantitative, linear, scale for the specified domain. The - * arguments to this constructor are optional, and equivalent to calling - * {@link #domain}. The default domain and range are [0,1]. - * - *

This constructor is typically not used directly; see one of the - * quantitative scale implementations instead. - * - * @class Represents an abstract quantitative scale; a function that performs a - * numeric transformation. This class is typically not used directly; see one of - * the quantitative scale implementations (linear, log, root, etc.) - * instead. A quantitative - * scale represents a 1-dimensional transformation from a numeric domain of - * input data [d0, d1] to a numeric range of - * pixels [r0, r1]. In addition to - * readability, scales offer several useful features: - * - *

1. The range can be expressed in colors, rather than pixels. For example: - * - *

    .fillStyle(pv.Scale.linear(0, 100).range("red", "green"))
- * - * will fill the marks "red" on an input value of 0, "green" on an input value - * of 100, and some color in-between for intermediate values. - * - *

2. The domain and range can be subdivided for a non-uniform - * transformation. For example, you may want a diverging color scale that is - * increasingly red for negative values, and increasingly green for positive - * values: - * - *

    .fillStyle(pv.Scale.linear(-1, 0, 1).range("red", "white", "green"))
- * - * The domain can be specified as a series of n monotonically-increasing - * values; the range must also be specified as n values, resulting in - * n - 1 contiguous linear scales. - * - *

3. Quantitative scales can be inverted for interaction. The - * {@link #invert} method takes a value in the output range, and returns the - * corresponding value in the input domain. This is frequently used to convert - * the mouse location (see {@link pv.Mark#mouse}) to a value in the input - * domain. Note that inversion is only supported for numeric ranges, and not - * colors. - * - *

4. A scale can be queried for reasonable "tick" values. The {@link #ticks} - * method provides a convenient way to get a series of evenly-spaced rounded - * values in the input domain. Frequently these are used in conjunction with - * {@link pv.Rule} to display tick marks or grid lines. - * - *

5. A scale can be "niced" to extend the domain to suitable rounded - * numbers. If the minimum and maximum of the domain are messy because they are - * derived from data, you can use {@link #nice} to round these values down and - * up to even numbers. - * - * @param {number...} domain... optional domain values. - * @see pv.Scale.linear - * @see pv.Scale.log - * @see pv.Scale.root - * @extends pv.Scale - */ -pv.Scale.quantitative = function() { - var d = [0, 1], // default domain - l = [0, 1], // default transformed domain - r = [0, 1], // default range - i = [pv.identity], // default interpolators - type = Number, // default type - n = false, // whether the domain is negative - f = pv.identity, // default forward transform - g = pv.identity, // default inverse transform - tickFormat = String; // default tick formatting function - - /** @private */ - function newDate(x) { - return new Date(x); - } - - /** @private */ - function scale(x) { - var j = pv.search(d, x); - if (j < 0) j = -j - 2; - j = Math.max(0, Math.min(i.length - 1, j)); - return i[j]((f(x) - l[j]) / (l[j + 1] - l[j])); - } - - /** @private */ - scale.transform = function(forward, inverse) { - /** @ignore */ f = function(x) { return n ? -forward(-x) : forward(x); }; - /** @ignore */ g = function(y) { return n ? -inverse(-y) : inverse(y); }; - l = d.map(f); - return this; - }; - - /** - * Sets or gets the input domain. This method can be invoked several ways: - * - *

1. domain(min, ..., max) - * - *

Specifying the domain as a series of numbers is the most explicit and - * recommended approach. Most commonly, two numbers are specified: the minimum - * and maximum value. However, for a diverging scale, or other subdivided - * non-uniform scales, multiple values can be specified. Values can be derived - * from data using {@link pv.min} and {@link pv.max}. For example: - * - *

    .domain(0, pv.max(array))
- * - * An alternative method for deriving minimum and maximum values from data - * follows. - * - *

2. domain(array, minf, maxf) - * - *

When both the minimum and maximum value are derived from data, the - * arguments to the domain method can be specified as the array of - * data, followed by zero, one or two accessor functions. For example, if the - * array of data is just an array of numbers: - * - *

    .domain(array)
- * - * On the other hand, if the array elements are objects representing stock - * values per day, and the domain should consider the stock's daily low and - * daily high: - * - *
    .domain(array, function(d) d.low, function(d) d.high)
- * - * The first method of setting the domain is preferred because it is more - * explicit; setting the domain using this second method should be used only - * if brevity is required. - * - *

3. domain() - * - *

Invoking the domain method with no arguments returns the - * current domain as an array of numbers. - * - * @function - * @name pv.Scale.quantitative.prototype.domain - * @param {number...} domain... domain values. - * @returns {pv.Scale.quantitative} this, or the current domain. - */ - scale.domain = function(array, min, max) { - if (arguments.length) { - var o; // the object we use to infer the domain type - if (array instanceof Array) { - if (arguments.length < 2) min = pv.identity; - if (arguments.length < 3) max = min; - o = array.length && min(array[0]); - d = array.length ? [pv.min(array, min), pv.max(array, max)] : []; - } else { - o = array; - d = Array.prototype.slice.call(arguments).map(Number); - } - if (!d.length) d = [-Infinity, Infinity]; - else if (d.length == 1) d = [d[0], d[0]]; - n = (d[0] || d[d.length - 1]) < 0; - l = d.map(f); - type = (o instanceof Date) ? newDate : Number; - return this; - } - return d.map(type); - }; - - /** - * Sets or gets the output range. This method can be invoked several ways: - * - *

1. range(min, ..., max) - * - *

The range may be specified as a series of numbers or colors. Most - * commonly, two numbers are specified: the minimum and maximum pixel values. - * For a color scale, values may be specified as {@link pv.Color}s or - * equivalent strings. For a diverging scale, or other subdivided non-uniform - * scales, multiple values can be specified. For example: - * - *

    .range("red", "white", "green")
- * - *

Currently, only numbers and colors are supported as range values. The - * number of range values must exactly match the number of domain values, or - * the behavior of the scale is undefined. - * - *

2. range() - * - *

Invoking the range method with no arguments returns the current - * range as an array of numbers or colors. - * - * @function - * @name pv.Scale.quantitative.prototype.range - * @param {...} range... range values. - * @returns {pv.Scale.quantitative} this, or the current range. - */ - scale.range = function() { - if (arguments.length) { - r = Array.prototype.slice.call(arguments); - if (!r.length) r = [-Infinity, Infinity]; - else if (r.length == 1) r = [r[0], r[0]]; - i = []; - for (var j = 0; j < r.length - 1; j++) { - i.push(pv.Scale.interpolator(r[j], r[j + 1])); - } - return this; - } - return r; - }; - - /** - * Inverts the specified value in the output range, returning the - * corresponding value in the input domain. This is frequently used to convert - * the mouse location (see {@link pv.Mark#mouse}) to a value in the input - * domain. Inversion is only supported for numeric ranges, and not colors. - * - *

Note that this method does not do any rounding or bounds checking. If - * the input domain is discrete (e.g., an array index), the returned value - * should be rounded. If the specified y value is outside the range, - * the returned value may be equivalently outside the input domain. - * - * @function - * @name pv.Scale.quantitative.prototype.invert - * @param {number} y a value in the output range (a pixel location). - * @returns {number} a value in the input domain. - */ - scale.invert = function(y) { - var j = pv.search(r, y); - if (j < 0) j = -j - 2; - j = Math.max(0, Math.min(i.length - 1, j)); - return type(g(l[j] + (y - r[j]) / (r[j + 1] - r[j]) * (l[j + 1] - l[j]))); - }; - - /** - * Returns an array of evenly-spaced, suitably-rounded values in the input - * domain. This method attempts to return between 5 and 10 tick values. These - * values are frequently used in conjunction with {@link pv.Rule} to display - * tick marks or grid lines. - * - * @function - * @name pv.Scale.quantitative.prototype.ticks - * @param {number} [m] optional number of desired ticks. - * @returns {number[]} an array input domain values to use as ticks. - */ - scale.ticks = function(m) { - var start = d[0], - end = d[d.length - 1], - reverse = end < start, - min = reverse ? end : start, - max = reverse ? start : end, - span = max - min; - - /* Special case: empty, invalid or infinite span. */ - if (!span || !isFinite(span)) { - if (type == newDate) tickFormat = pv.Format.date("%x"); - return [type(min)]; - } - - /* Special case: dates. */ - if (type == newDate) { - /* Floor the date d given the precision p. */ - function floor(d, p) { - switch (p) { - case 31536e6: d.setMonth(0); - case 2592e6: d.setDate(1); - case 6048e5: if (p == 6048e5) d.setDate(d.getDate() - d.getDay()); - case 864e5: d.setHours(0); - case 36e5: d.setMinutes(0); - case 6e4: d.setSeconds(0); - case 1e3: d.setMilliseconds(0); - } - } - - var precision, format, increment, step = 1; - if (span >= 3 * 31536e6) { - precision = 31536e6; - format = "%Y"; - /** @ignore */ increment = function(d) { d.setFullYear(d.getFullYear() + step); }; - } else if (span >= 3 * 2592e6) { - precision = 2592e6; - format = "%m/%Y"; - /** @ignore */ increment = function(d) { d.setMonth(d.getMonth() + step); }; - } else if (span >= 3 * 6048e5) { - precision = 6048e5; - format = "%m/%d"; - /** @ignore */ increment = function(d) { d.setDate(d.getDate() + 7 * step); }; - } else if (span >= 3 * 864e5) { - precision = 864e5; - format = "%m/%d"; - /** @ignore */ increment = function(d) { d.setDate(d.getDate() + step); }; - } else if (span >= 3 * 36e5) { - precision = 36e5; - format = "%I:%M %p"; - /** @ignore */ increment = function(d) { d.setHours(d.getHours() + step); }; - } else if (span >= 3 * 6e4) { - precision = 6e4; - format = "%I:%M %p"; - /** @ignore */ increment = function(d) { d.setMinutes(d.getMinutes() + step); }; - } else if (span >= 3 * 1e3) { - precision = 1e3; - format = "%I:%M:%S"; - /** @ignore */ increment = function(d) { d.setSeconds(d.getSeconds() + step); }; - } else { - precision = 1; - format = "%S.%Qs"; - /** @ignore */ increment = function(d) { d.setTime(d.getTime() + step); }; - } - tickFormat = pv.Format.date(format); - - var date = new Date(min), dates = []; - floor(date, precision); - - /* If we'd generate too many ticks, skip some!. */ - var n = span / precision; - if (n > 10) { - switch (precision) { - case 36e5: { - step = (n > 20) ? 6 : 3; - date.setHours(Math.floor(date.getHours() / step) * step); - break; - } - case 2592e6: { - step = 3; // seasons - date.setMonth(Math.floor(date.getMonth() / step) * step); - break; - } - case 6e4: { - step = (n > 30) ? 15 : ((n > 15) ? 10 : 5); - date.setMinutes(Math.floor(date.getMinutes() / step) * step); - break; - } - case 1e3: { - step = (n > 90) ? 15 : ((n > 60) ? 10 : 5); - date.setSeconds(Math.floor(date.getSeconds() / step) * step); - break; - } - case 1: { - step = (n > 1000) ? 250 : ((n > 200) ? 100 : ((n > 100) ? 50 : ((n > 50) ? 25 : 5))); - date.setMilliseconds(Math.floor(date.getMilliseconds() / step) * step); - break; - } - default: { - step = pv.logCeil(n / 15, 10); - if (n / step < 2) step /= 5; - else if (n / step < 5) step /= 2; - date.setFullYear(Math.floor(date.getFullYear() / step) * step); - break; - } - } - } - - while (true) { - increment(date); - if (date > max) break; - dates.push(new Date(date)); - } - return reverse ? dates.reverse() : dates; - } - - /* Normal case: numbers. */ - if (!arguments.length) m = 10; - var step = pv.logFloor(span / m, 10), - err = m / (span / step); - if (err <= .15) step *= 10; - else if (err <= .35) step *= 5; - else if (err <= .75) step *= 2; - var start = Math.ceil(min / step) * step, - end = Math.floor(max / step) * step; - tickFormat = pv.Format.number() - .fractionDigits(Math.max(0, -Math.floor(pv.log(step, 10) + .01))); - var ticks = pv.range(start, end + step, step); - return reverse ? ticks.reverse() : ticks; - }; - - /** - * Formats the specified tick value using the appropriate precision, based on - * the step interval between tick marks. If {@link #ticks} has not been called, - * the argument is converted to a string, but no formatting is applied. - * - * @function - * @name pv.Scale.quantitative.prototype.tickFormat - * @param {number} t a tick value. - * @returns {string} a formatted tick value. - */ - scale.tickFormat = function (t) { return tickFormat(t); }; - - /** - * "Nices" this scale, extending the bounds of the input domain to - * evenly-rounded values. Nicing is useful if the domain is computed - * dynamically from data, and may be irregular. For example, given a domain of - * [0.20147987687960267, 0.996679553296417], a call to nice() might - * extend the domain to [0.2, 1]. - * - *

This method must be invoked each time after setting the domain. - * - * @function - * @name pv.Scale.quantitative.prototype.nice - * @returns {pv.Scale.quantitative} this. - */ - scale.nice = function() { - if (d.length != 2) return this; // TODO support non-uniform domains - var start = d[0], - end = d[d.length - 1], - reverse = end < start, - min = reverse ? end : start, - max = reverse ? start : end, - span = max - min; - - /* Special case: empty, invalid or infinite span. */ - if (!span || !isFinite(span)) return this; - - var step = Math.pow(10, Math.round(Math.log(span) / Math.log(10)) - 1); - d = [Math.floor(min / step) * step, Math.ceil(max / step) * step]; - if (reverse) d.reverse(); - l = d.map(f); - return this; - }; - - /** - * Returns a view of this scale by the specified accessor function f. - * Given a scale y, y.by(function(d) d.foo) is equivalent to - * function(d) y(d.foo). - * - *

This method is provided for convenience, such that scales can be - * succinctly defined inline. For example, given an array of data elements - * that have a score attribute with the domain [0, 1], the height - * property could be specified as: - * - *

    .height(pv.Scale.linear().range(0, 480).by(function(d) d.score))
- * - * This is equivalent to: - * - *
    .height(function(d) d.score * 480)
- * - * This method should be used judiciously; it is typically more clear to - * invoke the scale directly, passing in the value to be scaled. - * - * @function - * @name pv.Scale.quantitative.prototype.by - * @param {function} f an accessor function. - * @returns {pv.Scale.quantitative} a view of this scale by the specified - * accessor function. - */ - scale.by = function(f) { - function by() { return scale(f.apply(this, arguments)); } - for (var method in scale) by[method] = scale[method]; - return by; - }; - - scale.domain.apply(scale, arguments); - return scale; -}; diff --git a/lib/protovis/src/data/RootScale.js b/lib/protovis/src/data/RootScale.js deleted file mode 100644 index 7dea8d6c..00000000 --- a/lib/protovis/src/data/RootScale.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Returns a root scale for the specified domain. The arguments to this - * constructor are optional, and equivalent to calling {@link #domain}. - * The default domain and range are [0,1]. - * - * @class Represents a root scale; a function that performs a power - * transformation. Most - * commonly, a root scale represents a 1-dimensional root transformation from a - * numeric domain of input data [d0, d1] to - * a numeric range of pixels [r0, r1]. - * - *

Note that the scale is itself a function, and thus can be used as a - * property directly, assuming that the data associated with a mark is a - * number. While this is convenient for single-use scales, frequently it is - * desirable to define scales globally: - * - *

var y = pv.Scale.root(0, 100).range(0, 640);
- * - * The y scale can now be equivalently referenced within a property: - * - *
    .height(function(d) y(d))
- * - * Alternatively, if the data are not simple numbers, the appropriate value can - * be passed to the y scale (e.g., d.foo). The {@link #by} - * method similarly allows the data to be mapped to a numeric value before - * performing the root transformation. - * - * @param {number...} domain... optional domain values. - * @extends pv.Scale.quantitative - */ -pv.Scale.root = function() { - var scale = pv.Scale.quantitative(); - - /** - * Sets or gets the exponent; defaults to 2. - * - * @function - * @name pv.Scale.root.prototype.power - * @param {number} [v] the new exponent. - * @returns {pv.Scale.root} this, or the current base. - */ - scale.power = function(v) { - if (arguments.length) { - var b = Number(v), p = 1 / b; - scale.transform( - function(x) { return Math.pow(x, p); }, - function(y) { return Math.pow(y, b); }); - return this; - } - return b; - }; - - scale.domain.apply(scale, arguments); - return scale.power(2); -}; diff --git a/lib/protovis/src/data/Scale.js b/lib/protovis/src/data/Scale.js deleted file mode 100644 index 13ca6eb8..00000000 --- a/lib/protovis/src/data/Scale.js +++ /dev/null @@ -1,86 +0,0 @@ -/** - * Abstract; see the various scale implementations. - * - * @class Represents a scale; a function that performs a transformation from - * data domain to visual range. For quantitative and quantile scales, the domain - * is expressed as numbers; for ordinal scales, the domain is expressed as - * strings (or equivalently objects with unique string representations). The - * "visual range" may correspond to pixel space, colors, font sizes, and the - * like. - * - *

Note that scales are functions, and thus can be used as properties - * directly, assuming that the data associated with a mark is a number. While - * this is convenient for single-use scales, frequently it is desirable to - * define scales globally: - * - *

var y = pv.Scale.linear(0, 100).range(0, 640);
- * - * The y scale can now be equivalently referenced within a property: - * - *
    .height(function(d) y(d))
- * - * Alternatively, if the data are not simple numbers, the appropriate value can - * be passed to the y scale (e.g., d.foo). The {@link #by} - * method similarly allows the data to be mapped to a numeric value before - * performing the linear transformation. - * - * @see pv.Scale.quantitative - * @see pv.Scale.quantile - * @see pv.Scale.ordinal - * @extends function - */ -pv.Scale = function() {}; - -/** - * @private Returns a function that interpolators from the start value to the - * end value, given a parameter t in [0, 1]. - * - * @param start the start value. - * @param end the end value. - */ -pv.Scale.interpolator = function(start, end) { - if (typeof start == "number") { - return function(t) { - return t * (end - start) + start; - }; - } - - /* For now, assume color. */ - start = pv.color(start).rgb(); - end = pv.color(end).rgb(); - return function(t) { - var a = start.a * (1 - t) + end.a * t; - if (a < 1e-5) a = 0; // avoid scientific notation - return (start.a == 0) ? pv.rgb(end.r, end.g, end.b, a) - : ((end.a == 0) ? pv.rgb(start.r, start.g, start.b, a) - : pv.rgb( - Math.round(start.r * (1 - t) + end.r * t), - Math.round(start.g * (1 - t) + end.g * t), - Math.round(start.b * (1 - t) + end.b * t), a)); - }; -}; - -/** - * Returns a view of this scale by the specified accessor function f. - * Given a scale y, y.by(function(d) d.foo) is equivalent to - * function(d) y(d.foo). - * - *

This method is provided for convenience, such that scales can be - * succinctly defined inline. For example, given an array of data elements that - * have a score attribute with the domain [0, 1], the height property - * could be specified as: - * - *

    .height(pv.Scale.linear().range(0, 480).by(function(d) d.score))
- * - * This is equivalent to: - * - *
    .height(function(d) d.score * 480)
- * - * This method should be used judiciously; it is typically more clear to invoke - * the scale directly, passing in the value to be scaled. - * - * @function - * @name pv.Scale.prototype.by - * @param {function} f an accessor function. - * @returns {pv.Scale} a view of this scale by the specified accessor function. - */ diff --git a/lib/protovis/src/data/Transform.js b/lib/protovis/src/data/Transform.js deleted file mode 100644 index 4fc83d1e..00000000 --- a/lib/protovis/src/data/Transform.js +++ /dev/null @@ -1,109 +0,0 @@ -/** - * Returns a new identity transform. - * - * @class Represents a transformation matrix. The transformation matrix is - * limited to expressing translate and uniform scale transforms only; shearing, - * rotation, general affine, and other transforms are not supported. - * - *

The methods on this class treat the transform as immutable, returning a - * copy of the transformation matrix with the specified transform applied. Note, - * alternatively, that the matrix fields can be get and set directly. - */ -pv.Transform = function() {}; -pv.Transform.prototype = {k: 1, x: 0, y: 0}; - -/** - * The scale magnitude; defaults to 1. - * - * @type number - * @name pv.Transform.prototype.k - */ - -/** - * The x-offset; defaults to 0. - * - * @type number - * @name pv.Transform.prototype.x - */ - -/** - * The y-offset; defaults to 0. - * - * @type number - * @name pv.Transform.prototype.y - */ - -/** - * @private The identity transform. - * - * @type pv.Transform - */ -pv.Transform.identity = new pv.Transform(); - -// k 0 x 1 0 a k 0 ka+x -// 0 k y * 0 1 b = 0 k kb+y -// 0 0 1 0 0 1 0 0 1 - -/** - * Returns a translated copy of this transformation matrix. - * - * @param {number} x the x-offset. - * @param {number} y the y-offset. - * @returns {pv.Transform} the translated transformation matrix. - */ -pv.Transform.prototype.translate = function(x, y) { - var v = new pv.Transform(); - v.k = this.k; - v.x = this.k * x + this.x; - v.y = this.k * y + this.y; - return v; -}; - -// k 0 x d 0 0 kd 0 x -// 0 k y * 0 d 0 = 0 kd y -// 0 0 1 0 0 1 0 0 1 - -/** - * Returns a scaled copy of this transformation matrix. - * - * @param {number} k - * @returns {pv.Transform} the scaled transformation matrix. - */ -pv.Transform.prototype.scale = function(k) { - var v = new pv.Transform(); - v.k = this.k * k; - v.x = this.x; - v.y = this.y; - return v; -}; - -/** - * Returns the inverse of this transformation matrix. - * - * @returns {pv.Transform} the inverted transformation matrix. - */ -pv.Transform.prototype.invert = function() { - var v = new pv.Transform(), k = 1 / this.k; - v.k = k; - v.x = -this.x * k; - v.y = -this.y * k; - return v; -}; - -// k 0 x d 0 a kd 0 ka+x -// 0 k y * 0 d b = 0 kd kb+y -// 0 0 1 0 0 1 0 0 1 - -/** - * Returns this matrix post-multiplied by the specified matrix m. - * - * @param {pv.Transform} m - * @returns {pv.Transform} the post-multiplied transformation matrix. - */ -pv.Transform.prototype.times = function(m) { - var v = new pv.Transform(); - v.k = this.k * m.k; - v.x = this.k * m.x + this.x; - v.y = this.k * m.y + this.y; - return v; -}; diff --git a/lib/protovis/src/data/Tree.js b/lib/protovis/src/data/Tree.js deleted file mode 100644 index 299b4225..00000000 --- a/lib/protovis/src/data/Tree.js +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Returns a {@link pv.Tree} operator for the specified array. This is a - * convenience factory method, equivalent to new pv.Tree(array). - * - * @see pv.Tree - * @param {array} array an array from which to construct a tree. - * @returns {pv.Tree} a tree operator for the specified array. - */ -pv.tree = function(array) { - return new pv.Tree(array); -}; - -/** - * Constructs a tree operator for the specified array. This constructor should - * not be invoked directly; use {@link pv.tree} instead. - * - * @class Represents a tree operator for the specified array. The tree operator - * allows a hierarchical map to be constructed from an array; it is similar to - * the {@link pv.Nest} operator, except the hierarchy is derived dynamically - * from the array elements. - * - *

For example, given an array of size information for ActionScript classes: - * - *

{ name: "flare.flex.FlareVis", size: 4116 },
- * { name: "flare.physics.DragForce", size: 1082 },
- * { name: "flare.physics.GravityForce", size: 1336 }, ...
- * - * To facilitate visualization, it may be useful to nest the elements by their - * package hierarchy: - * - *
var tree = pv.tree(classes)
- *     .keys(function(d) d.name.split("."))
- *     .map();
- * - * The resulting tree is: - * - *
{ flare: {
- *     flex: {
- *       FlareVis: {
- *         name: "flare.flex.FlareVis",
- *         size: 4116 } },
- *     physics: {
- *       DragForce: {
- *         name: "flare.physics.DragForce",
- *         size: 1082 },
- *       GravityForce: {
- *         name: "flare.physics.GravityForce",
- *         size: 1336 } },
- *     ... } }
- * - * By specifying a value function, - * - *
var tree = pv.tree(classes)
- *     .keys(function(d) d.name.split("."))
- *     .value(function(d) d.size)
- *     .map();
- * - * we can further eliminate redundant data: - * - *
{ flare: {
- *     flex: {
- *       FlareVis: 4116 },
- *     physics: {
- *       DragForce: 1082,
- *       GravityForce: 1336 },
- *   ... } }
- * - * For visualizations with large data sets, performance improvements may be seen - * by storing the data in a tree format, and then flattening it into an array at - * runtime with {@link pv.Flatten}. - * - * @param {array} array an array from which to construct a tree. - */ -pv.Tree = function(array) { - this.array = array; -}; - -/** - * Assigns a keys function to this operator; required. The keys function - * returns an array of strings for each element in the associated - * array; these keys determine how the elements are nested in the tree. The - * returned keys should be unique for each element in the array; otherwise, the - * behavior of this operator is undefined. - * - * @param {function} k the keys function. - * @returns {pv.Tree} this. - */ -pv.Tree.prototype.keys = function(k) { - this.k = k; - return this; -}; - -/** - * Assigns a value function to this operator; optional. The value - * function specifies an optional transformation of the element in the array - * before it is inserted into the map. If no value function is specified, it is - * equivalent to using the identity function. - * - * @param {function} k the value function. - * @returns {pv.Tree} this. - */ -pv.Tree.prototype.value = function(v) { - this.v = v; - return this; -}; - -/** - * Returns a hierarchical map of values. The hierarchy is determined by the keys - * function; the values in the map are determined by the value function. - * - * @returns a hierarchical map of values. - */ -pv.Tree.prototype.map = function() { - var map = {}, o = {}; - for (var i = 0; i < this.array.length; i++) { - o.index = i; - var value = this.array[i], keys = this.k.call(o, value), node = map; - for (var j = 0; j < keys.length - 1; j++) { - node = node[keys[j]] || (node[keys[j]] = {}); - } - node[keys[j]] = this.v ? this.v.call(o, value) : value; - } - return map; -}; diff --git a/lib/protovis/src/data/Vector.js b/lib/protovis/src/data/Vector.js deleted file mode 100644 index 97cb9a09..00000000 --- a/lib/protovis/src/data/Vector.js +++ /dev/null @@ -1,118 +0,0 @@ -/** - * Returns a {@link pv.Vector} for the specified x and y - * coordinate. This is a convenience factory method, equivalent to new - * pv.Vector(x, y). - * - * @see pv.Vector - * @param {number} x the x coordinate. - * @param {number} y the y coordinate. - * @returns {pv.Vector} a vector for the specified coordinates. - */ -pv.vector = function(x, y) { - return new pv.Vector(x, y); -}; - -/** - * Constructs a {@link pv.Vector} for the specified x and y - * coordinate. This constructor should not be invoked directly; use - * {@link pv.vector} instead. - * - * @class Represents a two-dimensional vector; a 2-tuple ⟨x, - * y⟩. The intent of this class is to simplify vector math. Note that - * in performance-sensitive cases it may be more efficient to represent 2D - * vectors as simple objects with x and y attributes, rather - * than using instances of this class. - * - * @param {number} x the x coordinate. - * @param {number} y the y coordinate. - */ -pv.Vector = function(x, y) { - this.x = x; - this.y = y; -}; - -/** - * Returns a vector perpendicular to this vector: ⟨-y, x⟩. - * - * @returns {pv.Vector} a perpendicular vector. - */ -pv.Vector.prototype.perp = function() { - return new pv.Vector(-this.y, this.x); -}; - -/** - * Returns a normalized copy of this vector: a vector with the same direction, - * but unit length. If this vector has zero length this method returns a copy of - * this vector. - * - * @returns {pv.Vector} a unit vector. - */ -pv.Vector.prototype.norm = function() { - var l = this.length(); - return this.times(l ? (1 / l) : 1); -}; - -/** - * Returns the magnitude of this vector, defined as sqrt(x * x + y * y). - * - * @returns {number} a length. - */ -pv.Vector.prototype.length = function() { - return Math.sqrt(this.x * this.x + this.y * this.y); -}; - -/** - * Returns a scaled copy of this vector: ⟨x * k, y * k⟩. - * To perform the equivalent divide operation, use 1 / k. - * - * @param {number} k the scale factor. - * @returns {pv.Vector} a scaled vector. - */ -pv.Vector.prototype.times = function(k) { - return new pv.Vector(this.x * k, this.y * k); -}; - -/** - * Returns this vector plus the vector v: ⟨x + v.x, y + - * v.y⟩. If only one argument is specified, it is interpreted as the - * vector v. - * - * @param {number} x the x coordinate to add. - * @param {number} y the y coordinate to add. - * @returns {pv.Vector} a new vector. - */ -pv.Vector.prototype.plus = function(x, y) { - return (arguments.length == 1) - ? new pv.Vector(this.x + x.x, this.y + x.y) - : new pv.Vector(this.x + x, this.y + y); -}; - -/** - * Returns this vector minus the vector v: ⟨x - v.x, y - - * v.y⟩. If only one argument is specified, it is interpreted as the - * vector v. - * - * @param {number} x the x coordinate to subtract. - * @param {number} y the y coordinate to subtract. - * @returns {pv.Vector} a new vector. - */ -pv.Vector.prototype.minus = function(x, y) { - return (arguments.length == 1) - ? new pv.Vector(this.x - x.x, this.y - x.y) - : new pv.Vector(this.x - x, this.y - y); -}; - -/** - * Returns the dot product of this vector and the vector v: x * v.x + - * y * v.y. If only one argument is specified, it is interpreted as the - * vector v. - * - * @param {number} x the x coordinate to dot. - * @param {number} y the y coordinate to dot. - * @returns {number} a dot product. - */ -pv.Vector.prototype.dot = function(x, y) { - return (arguments.length == 1) - ? this.x * x.x + this.y * x.y - : this.x * x + this.y * y; -}; diff --git a/lib/protovis/src/geo/Geo.js b/lib/protovis/src/geo/Geo.js deleted file mode 100644 index 76abd2ac..00000000 --- a/lib/protovis/src/geo/Geo.js +++ /dev/null @@ -1,5 +0,0 @@ -/** - * @ignore - * @namespace - */ -pv.Geo = function() {}; diff --git a/lib/protovis/src/geo/GeoScale.js b/lib/protovis/src/geo/GeoScale.js deleted file mode 100644 index 3e0a4094..00000000 --- a/lib/protovis/src/geo/GeoScale.js +++ /dev/null @@ -1,307 +0,0 @@ -/** - * Returns a geographic scale. The arguments to this constructor are optional, - * and equivalent to calling {@link #projection}. - * - * @class Represents a geographic scale; a mapping between latitude-longitude - * coordinates and screen pixel coordinates. By default, the domain is inferred - * from the geographic coordinates, so that the domain fills the output range. - * - *

Note that geographic scales are two-dimensional transformations, rather - * than the one-dimensional bidrectional mapping typical of other scales. - * Rather than mapping (for example) between a numeric domain and a numeric - * range, geographic scales map between two coordinate objects: {@link - * pv.Geo.LatLng} and {@link pv.Vector}. - * - * @param {pv.Geo.Projection} [p] optional projection. - * @see pv.Geo.scale#ticks - */ -pv.Geo.scale = function(p) { - var rmin = {x: 0, y: 0}, // default range minimum - rmax = {x: 1, y: 1}, // default range maximum - d = [], // default domain - j = pv.Geo.projections.identity, // domain <-> normalized range - x = pv.Scale.linear(-1, 1).range(0, 1), // normalized <-> range - y = pv.Scale.linear(-1, 1).range(1, 0), // normalized <-> range - c = {lng: 0, lat: 0}, // Center Point - lastLatLng, // cached latlng - lastPoint; // cached point - - /** @private */ - function scale(latlng) { - if (!lastLatLng - || (latlng.lng != lastLatLng.lng) - || (latlng.lat != lastLatLng.lat)) { - lastLatLng = latlng; - var p = project(latlng); - lastPoint = {x: x(p.x), y: y(p.y)}; - } - return lastPoint; - } - - /** @private */ - function project(latlng) { - var offset = {lng: latlng.lng - c.lng, lat: latlng.lat}; - return j.project(offset); - } - - /** @private */ - function invert(xy) { - var latlng = j.invert(xy); - latlng.lng += c.lng; - return latlng; - } - - /** Returns the projected x-coordinate. */ - scale.x = function(latlng) { - return scale(latlng).x; - }; - - /** Returns the projected y-coordinate. */ - scale.y = function(latlng) { - return scale(latlng).y; - }; - - /** - * Abstract; this is a local namespace on a given geographic scale. - * - * @namespace Tick functions for geographic scales. Because geographic scales - * represent two-dimensional transformations (as opposed to one-dimensional - * transformations typical of other scales), the tick values are similarly - * represented as two-dimensional coordinates in the input domain, i.e., - * {@link pv.Geo.LatLng} objects. - * - *

Also, note that non-rectilinear projections, such as sinsuoidal and - * aitoff, may not produce straight lines for constant longitude or constant - * latitude. Therefore the returned array of ticks is a two-dimensional array, - * sampling various latitudes as constant longitude, and vice versa. - * - *

The tick lines can therefore be approximated as polylines, either with - * "linear" or "cardinal" interpolation. This is not as accurate as drawing - * the true curve through the projection space, but is usually sufficient. - * - * @name pv.Geo.scale.prototype.ticks - * @see pv.Geo.scale - * @see pv.Geo.LatLng - * @see pv.Line#interpolate - */ - scale.ticks = { - - /** - * Returns longitude ticks. - * - * @function - * @param {number} [m] the desired number of ticks. - * @returns {array} a nested array of pv.Geo.LatLng ticks. - * @name pv.Geo.scale.prototype.ticks.prototype.lng - */ - lng: function(m) { - var lat, lng; - if (d.length > 1) { - var s = pv.Scale.linear(); - if (m == undefined) m = 10; - lat = s.domain(d, function(d) { return d.lat; }).ticks(m); - lng = s.domain(d, function(d) { return d.lng; }).ticks(m); - } else { - lat = pv.range(-80, 81, 10); - lng = pv.range(-180, 181, 10); - } - return lng.map(function(lng) { - return lat.map(function(lat) { - return {lat: lat, lng: lng}; - }); - }); - }, - - /** - * Returns latitude ticks. - * - * @function - * @param {number} [m] the desired number of ticks. - * @returns {array} a nested array of pv.Geo.LatLng ticks. - * @name pv.Geo.scale.prototype.ticks.prototype.lat - */ - lat: function(m) { - return pv.transpose(scale.ticks.lng(m)); - } - }; - - /** - * Inverts the specified value in the output range, returning the - * corresponding value in the input domain. This is frequently used to convert - * the mouse location (see {@link pv.Mark#mouse}) to a value in the input - * domain. Inversion is only supported for numeric ranges, and not colors. - * - *

Note that this method does not do any rounding or bounds checking. If - * the input domain is discrete (e.g., an array index), the returned value - * should be rounded. If the specified y value is outside the range, - * the returned value may be equivalently outside the input domain. - * - * @function - * @name pv.Geo.scale.prototype.invert - * @param {number} y a value in the output range (a pixel location). - * @returns {number} a value in the input domain. - */ - scale.invert = function(p) { - return invert({x: x.invert(p.x), y: y.invert(p.y)}); - }; - - /** - * Sets or gets the input domain. Note that unlike quantitative scales, the - * domain cannot be reduced to a simple rectangle (i.e., minimum and maximum - * values for latitude and longitude). Instead, the domain values must be - * projected to normalized space, effectively finding the domain in normalized - * space rather than in terms of latitude and longitude. Thus, changing the - * projection requires recomputing the normalized domain. - * - *

This method can be invoked several ways: - * - *

1. domain(values...) - * - *

Specifying the domain as a series of {@link pv.Geo.LatLng}s is the most - * explicit and recommended approach. However, if the domain values are - * derived from data, you may find the second method more appropriate. - * - *

2. domain(array, f) - * - *

Rather than enumerating the domain explicitly, you can specify a single - * argument of an array. In addition, you can specify an optional accessor - * function to extract the domain values (as {@link pv.Geo.LatLng}s) from the - * array. If the specified array has fewer than two elements, this scale will - * default to the full normalized domain. - * - *

2. domain() - * - *

Invoking the domain method with no arguments returns the - * current domain as an array. - * - * @function - * @name pv.Geo.scale.prototype.domain - * @param {...} domain... domain values. - * @returns {pv.Geo.scale} this, or the current domain. - */ - scale.domain = function(array, f) { - if (arguments.length) { - d = (array instanceof Array) - ? ((arguments.length > 1) ? pv.map(array, f) : array) - : Array.prototype.slice.call(arguments); - if (d.length > 1) { - var lngs = d.map(function(c) { return c.lng; }); - var lats = d.map(function(c) { return c.lat; }); - c = { - lng: (pv.max(lngs) + pv.min(lngs)) / 2, - lat: (pv.max(lats) + pv.min(lats)) / 2 - }; - var n = d.map(project); // normalized domain - x.domain(n, function(p) { return p.x; }); - y.domain(n, function(p) { return p.y; }); - } else { - c = {lng: 0, lat: 0}; - x.domain(-1, 1); - y.domain(-1, 1); - } - lastLatLng = null; // invalidate the cache - return this; - } - return d; - }; - - /** - * Sets or gets the output range. This method can be invoked several ways: - * - *

1. range(min, max) - * - *

If two objects are specified, the arguments should be {@link pv.Vector}s - * which specify the minimum and maximum values of the x- and y-coordinates - * explicitly. - * - *

2. range(width, height) - * - *

If two numbers are specified, the arguments specify the maximum values - * of the x- and y-coordinates explicitly; the minimum values are implicitly - * zero. - * - *

3. range() - * - *

Invoking the range method with no arguments returns the current - * range as an array of two {@link pv.Vector}s: the minimum (top-left) and - * maximum (bottom-right) values. - * - * @function - * @name pv.Geo.scale.prototype.range - * @param {...} range... range values. - * @returns {pv.Geo.scale} this, or the current range. - */ - scale.range = function(min, max) { - if (arguments.length) { - if (typeof min == "object") { - rmin = {x: Number(min.x), y: Number(min.y)}; - rmax = {x: Number(max.x), y: Number(max.y)}; - } else { - rmin = {x: 0, y: 0}; - rmax = {x: Number(min), y: Number(max)}; - } - x.range(rmin.x, rmax.x); - y.range(rmax.y, rmin.y); // XXX flipped? - lastLatLng = null; // invalidate the cache - return this; - } - return [rmin, rmax]; - }; - - /** - * Sets or gets the projection. This method can be invoked several ways: - * - *

1. projection(string) - * - *

Specifying a string sets the projection to the given named projection in - * {@link pv.Geo.projections}. If no such projection is found, the identity - * projection is used. - * - *

2. projection(object) - * - *

Specifying an object sets the projection to the given custom projection, - * which must implement the forward and inverse methods per the - * {@link pv.Geo.Projection} interface. - * - *

3. projection() - * - *

Invoking the projection method with no arguments returns the - * current object that defined the projection. - * - * @function - * @name pv.Scale.geo.prototype.projection - * @param {...} range... range values. - * @returns {pv.Scale.geo} this, or the current range. - */ - scale.projection = function(p) { - if (arguments.length) { - j = typeof p == "string" - ? pv.Geo.projections[p] || pv.Geo.projections.identity - : p; - return this.domain(d); // recompute normalized domain - } - return p; - }; - - /** - * Returns a view of this scale by the specified accessor function f. - * Given a scale g, g.by(function(d) d.foo) is equivalent to - * function(d) g(d.foo). This method should be used judiciously; it - * is typically more clear to invoke the scale directly, passing in the value - * to be scaled. - * - * @function - * @name pv.Geo.scale.prototype.by - * @param {function} f an accessor function. - * @returns {pv.Geo.scale} a view of this scale by the specified accessor - * function. - */ - scale.by = function(f) { - function by() { return scale(f.apply(this, arguments)); } - for (var method in scale) by[method] = scale[method]; - return by; - }; - - if (arguments.length) scale.projection(p); - return scale; -}; diff --git a/lib/protovis/src/geo/LatLng.js b/lib/protovis/src/geo/LatLng.js deleted file mode 100644 index 722bcd14..00000000 --- a/lib/protovis/src/geo/LatLng.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Abstract; not implemented. There is no explicit constructor; this class - * merely serves to document the representation used by {@link pv.Geo.scale}. - * - * @class Represents a pair of geographic coordinates. - * - * @name pv.Geo.LatLng - * @see pv.Geo.scale - */ - -/** - * The latitude coordinate in degrees; positive is North. - * - * @type number - * @name pv.Geo.LatLng.prototype.lat - */ - -/** - * The longitude coordinate in degrees; positive is East. - * - * @type number - * @name pv.Geo.LatLng.prototype.lng - */ diff --git a/lib/protovis/src/geo/Projection.js b/lib/protovis/src/geo/Projection.js deleted file mode 100644 index 8d94d464..00000000 --- a/lib/protovis/src/geo/Projection.js +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Abstract; not implemented. There is no explicit constructor; this class - * merely serves to document the representation used by {@link pv.Geo.scale}. - * - * @class Represents a geographic projection. This class provides the core - * implementation for {@link pv.Geo.scale}s, mapping between geographic - * coordinates (latitude and longitude) and normalized screen space in the range - * [-1,1]. The remaining mapping between normalized screen space and actual - * pixels is performed by pv.Geo.scale. - * - *

Many geographic projections have a point around which the projection is - * centered. Rather than have each implementation add support for a - * user-specified center point, the pv.Geo.scale translates the - * geographic coordinates relative to the center point for both the forward and - * inverse projection. - * - *

In general, this class should not be used directly, unless the desire is - * to implement a new geographic projection. Instead, use pv.Geo.scale. - * Implementations are not required to implement inverse projections, but are - * needed for some forms of interactivity. Also note that some inverse - * projections are ambiguous, such as the connecting points in Dymaxian maps. - * - * @name pv.Geo.Projection - * @see pv.Geo.scale - */ - -/** - * The forward projection. - * - * @function - * @name pv.Geo.Projection.prototype.project - * @param {pv.Geo.LatLng} latlng the latitude and longitude to project. - * @returns {pv.Vector} the xy-coordinates of the given point. - */ - -/** - * The inverse projection; optional. - * - * @function - * @name pv.Geo.Projection.prototype.invert - * @param {pv.Vector} xy the x- and y-coordinates to invert. - * @returns {pv.Geo.LatLng} the latitude and longitude of the given point. - */ diff --git a/lib/protovis/src/geo/Projections.js b/lib/protovis/src/geo/Projections.js deleted file mode 100644 index 4580ca3d..00000000 --- a/lib/protovis/src/geo/Projections.js +++ /dev/null @@ -1,117 +0,0 @@ -/** - * The built-in projections. - * - * @see pv.Geo.Projection - * @namespace - */ -pv.Geo.projections = { - - /** @see http://en.wikipedia.org/wiki/Mercator_projection */ - mercator: { - project: function(latlng) { - return { - x: latlng.lng / 180, - y: latlng.lat > 85 ? 1 : latlng.lat < -85 ? -1 - : Math.log(Math.tan(Math.PI / 4 - + pv.radians(latlng.lat) / 2)) / Math.PI - }; - }, - invert: function(xy) { - return { - lng: xy.x * 180, - lat: pv.degrees(2 * Math.atan(Math.exp(xy.y * Math.PI)) - Math.PI / 2) - }; - } - }, - - /** @see http://en.wikipedia.org/wiki/Gall-Peters_projection */ - "gall-peters": { - project: function(latlng) { - return { - x: latlng.lng / 180, - y: Math.sin(pv.radians(latlng.lat)) - }; - }, - invert: function(xy) { - return { - lng: xy.x * 180, - lat: pv.degrees(Math.asin(xy.y)) - }; - } - }, - - /** @see http://en.wikipedia.org/wiki/Sinusoidal_projection */ - sinusoidal: { - project: function(latlng) { - return { - x: pv.radians(latlng.lng) * Math.cos(pv.radians(latlng.lat)) / Math.PI, - y: latlng.lat / 90 - }; - }, - invert: function(xy) { - return { - lng: pv.degrees((xy.x * Math.PI) / Math.cos(xy.y * Math.PI / 2)), - lat: xy.y * 90 - }; - } - }, - - /** @see http://en.wikipedia.org/wiki/Aitoff_projection */ - aitoff: { - project: function(latlng) { - var l = pv.radians(latlng.lng), - f = pv.radians(latlng.lat), - a = Math.acos(Math.cos(f) * Math.cos(l / 2)); - return { - x: 2 * (a ? (Math.cos(f) * Math.sin(l / 2) * a / Math.sin(a)) : 0) / Math.PI, - y: 2 * (a ? (Math.sin(f) * a / Math.sin(a)) : 0) / Math.PI - }; - }, - invert: function(xy) { - var x = xy.x * Math.PI / 2, - y = xy.y * Math.PI / 2; - return { - lng: pv.degrees(x / Math.cos(y)), - lat: pv.degrees(y) - }; - } - }, - - /** @see http://en.wikipedia.org/wiki/Hammer_projection */ - hammer: { - project: function(latlng) { - var l = pv.radians(latlng.lng), - f = pv.radians(latlng.lat), - c = Math.sqrt(1 + Math.cos(f) * Math.cos(l / 2)); - return { - x: 2 * Math.SQRT2 * Math.cos(f) * Math.sin(l / 2) / c / 3, - y: Math.SQRT2 * Math.sin(f) / c / 1.5 - }; - }, - invert: function(xy) { - var x = xy.x * 3, - y = xy.y * 1.5, - z = Math.sqrt(1 - x * x / 16 - y * y / 4); - return { - lng: pv.degrees(2 * Math.atan2(z * x, 2 * (2 * z * z - 1))), - lat: pv.degrees(Math.asin(z * y)) - }; - } - }, - - /** The identity or "none" projection. */ - identity: { - project: function(latlng) { - return { - x: latlng.lng / 180, - y: latlng.lat / 90 - }; - }, - invert: function(xy) { - return { - lng: xy.x * 180, - lat: xy.y * 90 - }; - } - } -}; diff --git a/lib/protovis/src/lang/Array.js b/lib/protovis/src/lang/Array.js deleted file mode 100644 index fcbd83fe..00000000 --- a/lib/protovis/src/lang/Array.js +++ /dev/null @@ -1,112 +0,0 @@ -/** - * @class The built-in Array class. - * @name Array - */ - -/** - * Creates a new array with the results of calling a provided function on every - * element in this array. Implemented in Javascript 1.6. - * - * @function - * @name Array.prototype.map - * @see map - * documentation. - * @param {function} f function that produces an element of the new Array from - * an element of the current one. - * @param [o] object to use as this when executing f. - */ -if (!Array.prototype.map) Array.prototype.map = function(f, o) { - var n = this.length; - var result = new Array(n); - for (var i = 0; i < n; i++) { - if (i in this) { - result[i] = f.call(o, this[i], i, this); - } - } - return result; -}; - -/** - * Creates a new array with all elements that pass the test implemented by the - * provided function. Implemented in Javascript 1.6. - * - * @function - * @name Array.prototype.filter - * @see filter - * documentation. - * @param {function} f function to test each element of the array. - * @param [o] object to use as this when executing f. - */ -if (!Array.prototype.filter) Array.prototype.filter = function(f, o) { - var n = this.length; - var result = new Array(); - for (var i = 0; i < n; i++) { - if (i in this) { - var v = this[i]; - if (f.call(o, v, i, this)) result.push(v); - } - } - return result; -}; - -/** - * Executes a provided function once per array element. Implemented in - * Javascript 1.6. - * - * @function - * @name Array.prototype.forEach - * @see forEach - * documentation. - * @param {function} f function to execute for each element. - * @param [o] object to use as this when executing f. - */ -if (!Array.prototype.forEach) Array.prototype.forEach = function(f, o) { - var n = this.length >>> 0; - for (var i = 0; i < n; i++) { - if (i in this) f.call(o, this[i], i, this); - } -}; - -/** - * Apply a function against an accumulator and each value of the array (from - * left-to-right) as to reduce it to a single value. Implemented in Javascript - * 1.8. - * - * @function - * @name Array.prototype.reduce - * @see reduce - * documentation. - * @param {function} f function to execute on each value in the array. - * @param [v] object to use as the first argument to the first call of - * t. - */ -if (!Array.prototype.reduce) Array.prototype.reduce = function(f, v) { - var len = this.length; - if (!len && (arguments.length == 1)) { - throw new Error("reduce: empty array, no initial value"); - } - - var i = 0; - if (arguments.length < 2) { - while (true) { - if (i in this) { - v = this[i++]; - break; - } - if (++i >= len) { - throw new Error("reduce: no values, no initial value"); - } - } - } - - for (; i < len; i++) { - if (i in this) { - v = f(v, this[i], i, this); - } - } - return v; -}; diff --git a/lib/protovis/src/lang/init.js b/lib/protovis/src/lang/init.js deleted file mode 100644 index 1b541724..00000000 --- a/lib/protovis/src/lang/init.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Parses the Protovis specifications on load, allowing the use of JavaScript - * 1.8 function expressions on browsers that only support JavaScript 1.6. - * - * @see pv.parse - */ -pv.listen(window, "load", function() { - /* - * Note: in Firefox any variables declared here are visible to the eval'd - * script below. Even worse, any global variables declared by the script - * could overwrite local variables here (such as the index, `i`)! To protect - * against this, all variables are explicitly scoped on a pv.$ object. - */ - pv.$ = {i:0, x:document.getElementsByTagName("script")}; - for (; pv.$.i < pv.$.x.length; pv.$.i++) { - pv.$.s = pv.$.x[pv.$.i]; - if (pv.$.s.type == "text/javascript+protovis") { - try { - window.eval(pv.parse(pv.$.s.text)); - } catch (e) { - pv.error(e); - } - } - } - delete pv.$; - }); diff --git a/lib/protovis/src/layout/Arc.js b/lib/protovis/src/layout/Arc.js deleted file mode 100644 index 92a157e9..00000000 --- a/lib/protovis/src/layout/Arc.js +++ /dev/null @@ -1,178 +0,0 @@ -/** - * Constructs a new, empty arc layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a layout for arc diagrams. An arc diagram is a network - * visualization with a one-dimensional layout of nodes, using circular arcs to - * render links between nodes. For undirected networks, arcs are rendering on a - * single side; this makes arc diagrams useful as annotations to other - * two-dimensional network layouts, such as rollup, matrix or table layouts. For - * directed networks, links in opposite directions can be rendered on opposite - * sides using directed(true). - * - *

Arc layouts are particularly sensitive to node ordering; for best results, - * order the nodes such that related nodes are close to each other. A poor - * (e.g., random) order may result in large arcs with crossovers that impede - * visual processing. A future improvement to this layout may include automatic - * reordering using, e.g., spectral graph layout or simulated annealing. - * - *

This visualization technique is related to that developed by - * M. Wattenberg, "Arc - * Diagrams: Visualizing Structure in Strings" in IEEE InfoVis, 2002. - * However, this implementation is limited to simple node-link networks, as - * opposed to structures with hierarchical self-similarity (such as strings). - * - *

As with other network layouts, three mark prototypes are provided:

    - * - *
  • node - for rendering nodes; typically a {@link pv.Dot}. - *
  • link - for rendering links; typically a {@link pv.Line}. - *
  • label - for rendering node labels; typically a {@link pv.Label}. - * - *
For more details on how this layout is structured and can be customized, - * see {@link pv.Layout.Network}. - * - * @extends pv.Layout.Network - **/ -pv.Layout.Arc = function() { - pv.Layout.Network.call(this); - var interpolate, // cached interpolate - directed, // cached directed - reverse, // cached reverse - buildImplied = this.buildImplied; - - /** @private Cache layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - directed = s.directed; - interpolate = s.orient == "radial" ? "linear" : "polar"; - reverse = s.orient == "right" || s.orient == "top"; - }; - - /* Override link properties to handle directedness and orientation. */ - this.link - .data(function(p) { - var s = p.sourceNode, t = p.targetNode; - return reverse != (directed || (s.breadth < t.breadth)) ? [s, t] : [t, s]; - }) - .interpolate(function() { return interpolate; }); -}; - -pv.Layout.Arc.prototype = pv.extend(pv.Layout.Network) - .property("orient", String) - .property("directed", Boolean); - -/** - * Default properties for arc layouts. By default, the orientation is "bottom". - * - * @type pv.Layout.Arc - */ -pv.Layout.Arc.prototype.defaults = new pv.Layout.Arc() - .extend(pv.Layout.Network.prototype.defaults) - .orient("bottom"); - -/** - * Specifies an optional sort function. The sort function follows the same - * comparator contract required by {@link pv.Dom.Node#sort}. Specifying a sort - * function provides an alternative to sort the nodes as they are specified by - * the nodes property; the main advantage of doing this is that the - * comparator function can access implicit fields populated by the network - * layout, such as the linkDegree. - * - *

Note that arc diagrams are particularly sensitive to order. This is - * referred to as the seriation problem, and many different techniques exist to - * find good node orders that emphasize clusters, such as spectral layout and - * simulated annealing. - * - * @param {function} f comparator function for nodes. - * @returns {pv.Layout.Arc} this. - */ -pv.Layout.Arc.prototype.sort = function(f) { - this.$sort = f; - return this; -}; - -/** @private Populates the x, y and angle attributes on the nodes. */ -pv.Layout.Arc.prototype.buildImplied = function(s) { - if (pv.Layout.Network.prototype.buildImplied.call(this, s)) return; - - var nodes = s.nodes, - orient = s.orient, - sort = this.$sort, - index = pv.range(nodes.length), - w = s.width, - h = s.height, - r = Math.min(w, h) / 2; - - /* Sort the nodes. */ - if (sort) index.sort(function(a, b) { return sort(nodes[a], nodes[b]); }); - - /** @private Returns the mid-angle, given the breadth. */ - function midAngle(b) { - switch (orient) { - case "top": return -Math.PI / 2; - case "bottom": return Math.PI / 2; - case "left": return Math.PI; - case "right": return 0; - case "radial": return (b - .25) * 2 * Math.PI; - } - } - - /** @private Returns the x-position, given the breadth. */ - function x(b) { - switch (orient) { - case "top": - case "bottom": return b * w; - case "left": return 0; - case "right": return w; - case "radial": return w / 2 + r * Math.cos(midAngle(b)); - } - } - - /** @private Returns the y-position, given the breadth. */ - function y(b) { - switch (orient) { - case "top": return 0; - case "bottom": return h; - case "left": - case "right": return b * h; - case "radial": return h / 2 + r * Math.sin(midAngle(b)); - } - } - - /* Populate the x, y and mid-angle attributes. */ - for (var i = 0; i < nodes.length; i++) { - var n = nodes[index[i]], b = n.breadth = (i + .5) / nodes.length; - n.x = x(b); - n.y = y(b); - n.midAngle = midAngle(b); - } -}; - -/** - * The orientation. The default orientation is "left", which means that nodes - * will be positioned from left-to-right in the order they are specified in the - * nodes property. The following orientations are supported:

    - * - *
  • left - left-to-right. - *
  • right - right-to-left. - *
  • top - top-to-bottom. - *
  • bottom - bottom-to-top. - *
  • radial - radially, starting at 12 o'clock and proceeding clockwise.
- * - * @type string - * @name pv.Layout.Arc.prototype.orient - */ - -/** - * Whether this arc digram is directed (bidirectional); only applies to - * non-radial orientations. By default, arc digrams are undirected, such that - * all arcs appear on one side. If the arc digram is directed, then forward - * links are drawn on the conventional side (the same as as undirected - * links--right, left, bottom and top for left, right, top and bottom, - * respectively), while reverse links are drawn on the opposite side. - * - * @type boolean - * @name pv.Layout.Arc.prototype.directed - */ diff --git a/lib/protovis/src/layout/Bullet.js b/lib/protovis/src/layout/Bullet.js deleted file mode 100644 index e0e7dfd1..00000000 --- a/lib/protovis/src/layout/Bullet.js +++ /dev/null @@ -1,164 +0,0 @@ -// ranges (bad, satisfactory, good) -// measures (actual, forecast) -// markers (previous, goal) - -/* - * Chart design based on the recommendations of Stephen Few. Implementation - * based on the work of Clint Ivy, Jamie Love, and Jason Davies. - * http://projects.instantcognition.com/protovis/bulletchart/ - */ - -/** - * Constructs a new, empty bullet layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class - * @extends pv.Layout - */ -pv.Layout.Bullet = function() { - pv.Layout.call(this); - var that = this, - buildImplied = that.buildImplied, - scale = that.x = pv.Scale.linear(), - orient, - horizontal, - rangeColor, - measureColor, - x; - - /** @private Cache layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, x = s); - orient = s.orient; - horizontal = /^left|right$/.test(orient); - rangeColor = pv.ramp("#bbb", "#eee") - .domain(0, Math.max(1, x.ranges.length - 1)); - measureColor = pv.ramp("steelblue", "lightsteelblue") - .domain(0, Math.max(1, x.measures.length - 1)); - }; - - /** - * The range prototype. - * - * @type pv.Mark - * @name pv.Layout.Bullet.prototype.range - */ - (this.range = new pv.Mark()) - .data(function() { return x.ranges; }) - .reverse(true) - .left(function() { return orient == "left" ? 0 : null; }) - .top(function() { return orient == "top" ? 0 : null; }) - .right(function() { return orient == "right" ? 0 : null; }) - .bottom(function() { return orient == "bottom" ? 0 : null; }) - .width(function(d) { return horizontal ? scale(d) : null; }) - .height(function(d) { return horizontal ? null : scale(d); }) - .fillStyle(function() { return rangeColor(this.index); }) - .antialias(false) - .parent = that; - - /** - * The measure prototype. - * - * @type pv.Mark - * @name pv.Layout.Bullet.prototype.measure - */ - (this.measure = new pv.Mark()) - .extend(this.range) - .data(function() { return x.measures; }) - .left(function() { return orient == "left" ? 0 : horizontal ? null : this.parent.width() / 3.25; }) - .top(function() { return orient == "top" ? 0 : horizontal ? this.parent.height() / 3.25 : null; }) - .right(function() { return orient == "right" ? 0 : horizontal ? null : this.parent.width() / 3.25; }) - .bottom(function() { return orient == "bottom" ? 0 : horizontal ? this.parent.height() / 3.25 : null; }) - .fillStyle(function() { return measureColor(this.index); }) - .parent = that; - - /** - * The marker prototype. - * - * @type pv.Mark - * @name pv.Layout.Bullet.prototype.marker - */ - (this.marker = new pv.Mark()) - .data(function() { return x.markers; }) - .left(function(d) { return orient == "left" ? scale(d) : horizontal ? null : this.parent.width() / 2; }) - .top(function(d) { return orient == "top" ? scale(d) : horizontal ? this.parent.height() / 2 : null; }) - .right(function(d) { return orient == "right" ? scale(d) : null; }) - .bottom(function(d) { return orient == "bottom" ? scale(d) : null; }) - .strokeStyle("black") - .shape("bar") - .angle(function() { return horizontal ? 0 : Math.PI / 2; }) - .parent = that; - - (this.tick = new pv.Mark()) - .data(function() { return scale.ticks(7); }) - .left(function(d) { return orient == "left" ? scale(d) : null; }) - .top(function(d) { return orient == "top" ? scale(d) : null; }) - .right(function(d) { return orient == "right" ? scale(d) : horizontal ? null : -6; }) - .bottom(function(d) { return orient == "bottom" ? scale(d) : horizontal ? -8 : null; }) - .height(function() { return horizontal ? 6 : null; }) - .width(function() { return horizontal ? null : 6; }) - .parent = that; -}; - -pv.Layout.Bullet.prototype = pv.extend(pv.Layout) - .property("orient", String) // left, right, top, bottom - .property("ranges") - .property("markers") - .property("measures") - .property("maximum", Number); - -/** - * Default properties for bullet layouts. - * - * @type pv.Layout.Bullet - */ -pv.Layout.Bullet.prototype.defaults = new pv.Layout.Bullet() - .extend(pv.Layout.prototype.defaults) - .orient("left") - .ranges([]) - .markers([]) - .measures([]); - -/** - * The orientation. - * - * @type string - * @name pv.Layout.Bullet.prototype.orient - */ - -/** - * The array of range values. - * - * @type array - * @name pv.Layout.Bullet.prototype.ranges - */ - -/** - * The array of marker values. - * - * @type array - * @name pv.Layout.Bullet.prototype.markers - */ - -/** - * The array of measure values. - * - * @type array - * @name pv.Layout.Bullet.prototype.measures - */ - -/** - * Optional; the maximum range value. - * - * @type number - * @name pv.Layout.Bullet.prototype.maximum - */ - -/** @private */ -pv.Layout.Bullet.prototype.buildImplied = function(s) { - pv.Layout.prototype.buildImplied.call(this, s); - var size = this.parent[/^left|right$/.test(s.orient) ? "width" : "height"](); - s.maximum = s.maximum || pv.max([].concat(s.ranges, s.markers, s.measures)); - this.x.domain(0, s.maximum).range(0, size); -}; diff --git a/lib/protovis/src/layout/Cluster.js b/lib/protovis/src/layout/Cluster.js deleted file mode 100644 index 41834892..00000000 --- a/lib/protovis/src/layout/Cluster.js +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Constructs a new, empty cluster layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a hierarchical layout using the cluster (or dendrogram) - * algorithm. This layout provides both node-link and space-filling - * implementations of cluster diagrams. In many ways it is similar to - * {@link pv.Layout.Partition}, except that leaf nodes are positioned at maximum - * depth, and the depth of internal nodes is based on their distance from their - * deepest descendant, rather than their distance from the root. - * - *

The cluster layout supports a "group" property, which if true causes - * siblings to be positioned closer together than unrelated nodes at the same - * depth. Unlike the partition layout, this layout does not support dynamic - * sizing for leaf nodes; all leaf nodes are the same size. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @see pv.Layout.Cluster.Fill - * @extends pv.Layout.Hierarchy - */ -pv.Layout.Cluster = function() { - pv.Layout.Hierarchy.call(this); - var interpolate, // cached interpolate - buildImplied = this.buildImplied; - - /** @private Cache layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - interpolate - = /^(top|bottom)$/.test(s.orient) ? "step-before" - : /^(left|right)$/.test(s.orient) ? "step-after" - : "linear"; - }; - - this.link.interpolate(function() { return interpolate; }); -}; - -pv.Layout.Cluster.prototype = pv.extend(pv.Layout.Hierarchy) - .property("group", Number) - .property("orient", String) - .property("innerRadius", Number) - .property("outerRadius", Number); - -/** - * The group parameter; defaults to 0, disabling grouping of siblings. If this - * parameter is set to a positive number (or true, which is equivalent to 1), - * then additional space will be allotted between sibling groups. In other - * words, siblings (nodes that share the same parent) will be positioned more - * closely than nodes at the same depth that do not share a parent. - * - * @type number - * @name pv.Layout.Cluster.prototype.group - */ - -/** - * The orientation. The default orientation is "top", which means that the root - * node is placed on the top edge, leaf nodes appear on the bottom edge, and - * internal nodes are in-between. The following orientations are supported:

    - * - *
  • left - left-to-right. - *
  • right - right-to-left. - *
  • top - top-to-bottom. - *
  • bottom - bottom-to-top. - *
  • radial - radially, with the root at the center.
- * - * @type string - * @name pv.Layout.Cluster.prototype.orient - */ - -/** - * The inner radius; defaults to 0. This property applies only to radial - * orientations, and can be used to compress the layout radially. Note that for - * the node-link implementation, the root node is always at the center, - * regardless of the value of this property; this property only affects internal - * and leaf nodes. For the space-filling implementation, a non-zero value of - * this property will result in the root node represented as a ring rather than - * a circle. - * - * @type number - * @name pv.Layout.Cluster.prototype.innerRadius - */ - -/** - * The outer radius; defaults to fill the containing panel, based on the height - * and width of the layout. If the layout has no height and width specified, it - * will extend to fill the enclosing panel. - * - * @type number - * @name pv.Layout.Cluster.prototype.outerRadius - */ - -/** - * Defaults for cluster layouts. The default group parameter is 0 and the - * default orientation is "top". - * - * @type pv.Layout.Cluster - */ -pv.Layout.Cluster.prototype.defaults = new pv.Layout.Cluster() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .group(0) - .orient("top"); - -/** @private */ -pv.Layout.Cluster.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var root = s.nodes[0], - group = s.group, - breadth, - depth, - leafCount = 0, - leafIndex = .5 - group / 2; - - /* Count the leaf nodes and compute the depth of descendants. */ - var p = undefined; - root.visitAfter(function(n) { - if (n.firstChild) { - n.depth = 1 + pv.max(n.childNodes, function(n) { return n.depth; }); - } else { - if (group && (p != n.parentNode)) { - p = n.parentNode; - leafCount += group; - } - leafCount++; - n.depth = 0; - } - }); - breadth = 1 / leafCount; - depth = 1 / root.depth; - - /* Compute the unit breadth and depth of each node. */ - var p = undefined; - root.visitAfter(function(n) { - if (n.firstChild) { - n.breadth = pv.mean(n.childNodes, function(n) { return n.breadth; }); - } else { - if (group && (p != n.parentNode)) { - p = n.parentNode; - leafIndex += group; - } - n.breadth = breadth * leafIndex++; - } - n.depth = 1 - n.depth * depth; - }); - - /* Compute breadth and depth ranges for space-filling layouts. */ - root.visitAfter(function(n) { - n.minBreadth = n.firstChild - ? n.firstChild.minBreadth - : (n.breadth - breadth / 2); - n.maxBreadth = n.firstChild - ? n.lastChild.maxBreadth - : (n.breadth + breadth / 2); - }); - root.visitBefore(function(n) { - n.minDepth = n.parentNode - ? n.parentNode.maxDepth - : 0; - n.maxDepth = n.parentNode - ? (n.depth + root.depth) - : (n.minDepth + 2 * root.depth); - }); - root.minDepth = -depth; - - pv.Layout.Hierarchy.NodeLink.buildImplied.call(this, s); -}; - -/** - * Constructs a new, empty space-filling cluster layout. Layouts are not - * typically constructed directly; instead, they are added to an existing panel - * via {@link pv.Mark#add}. - * - * @class A variant of cluster layout that is space-filling. The meaning of the - * exported mark prototypes changes slightly in the space-filling - * implementation:
    - * - *
  • node - for rendering nodes; typically a {@link pv.Bar} for - * non-radial orientations, and a {@link pv.Wedge} for radial orientations. - * - *

  • link - unsupported; undefined. Links are encoded implicitly - * in the arrangement of the space-filling nodes. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. - * - *
For more details on how to use this layout, see - * {@link pv.Layout.Cluster}. - * - * @extends pv.Layout.Cluster - */ -pv.Layout.Cluster.Fill = function() { - pv.Layout.Cluster.call(this); - pv.Layout.Hierarchy.Fill.constructor.call(this); -}; - -pv.Layout.Cluster.Fill.prototype = pv.extend(pv.Layout.Cluster); - -/** @private */ -pv.Layout.Cluster.Fill.prototype.buildImplied = function(s) { - if (pv.Layout.Cluster.prototype.buildImplied.call(this, s)) return; - pv.Layout.Hierarchy.Fill.buildImplied.call(this, s); -}; diff --git a/lib/protovis/src/layout/Force.js b/lib/protovis/src/layout/Force.js deleted file mode 100644 index 9bd00f17..00000000 --- a/lib/protovis/src/layout/Force.js +++ /dev/null @@ -1,309 +0,0 @@ -/** - * Constructs a new, empty force-directed layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements force-directed network layout as a node-link diagram. This - * layout uses the Fruchterman-Reingold algorithm, which applies an attractive - * spring force between neighboring nodes, and a repulsive electrical charge - * force between all nodes. An additional drag force improves stability of the - * simulation. See {@link pv.Force.spring}, {@link pv.Force.drag} and {@link - * pv.Force.charge} for more details; note that the n-body charge force is - * approximated using the Barnes-Hut algorithm. - * - *

This layout is implemented on top of {@link pv.Simulation}, which can be - * used directly for more control over simulation parameters. The simulation - * uses Position Verlet integration, which does not compute velocities - * explicitly, but allows for easy geometric constraints, such as bounding the - * nodes within the layout panel. Many of the configuration properties supported - * by this layout are simply passed through to the underlying forces and - * constraints of the simulation. - * - *

Force layouts are typically interactive. The gradual movement of the nodes - * as they stabilize to a local stress minimum can help reveal the structure of - * the network, as can {@link pv.Behavior.drag}, which allows the user to pick - * up nodes and reposition them while the physics simulation continues. This - * layout can also be used with pan & zoom behaviors for interaction. - * - *

To facilitate interaction, this layout by default automatically re-renders - * using a setInterval every 42 milliseconds. This can be disabled via - * the iterations property, which if non-null specifies the number of - * simulation iterations to run before the force-directed layout is finalized. - * Be careful not to use too high an iteration count, as this can lead to an - * annoying delay on page load. - * - *

As with other network layouts, the network data can be updated - * dynamically, provided the property cache is reset. See - * {@link pv.Layout.Network} for details. New nodes are initialized with random - * positions near the center. Alternatively, positions can be specified manually - * by setting the x and y attributes on nodes. - * - * @extends pv.Layout.Network - * @see "Graph Drawing by Force-directed Placement" by T. Fruchterman & - * E. Reingold, Software--Practice & Experience, November 1991. - */ -pv.Layout.Force = function() { - pv.Layout.Network.call(this); - - /* Force-directed graphs can be messy, so reduce the link width. */ - this.link.lineWidth(function(d, p) { return Math.sqrt(p.linkValue) * 1.5; }); - this.label.textAlign("center"); -}; - -pv.Layout.Force.prototype = pv.extend(pv.Layout.Network) - .property("bound", Boolean) - .property("iterations", Number) - .property("dragConstant", Number) - .property("chargeConstant", Number) - .property("chargeMinDistance", Number) - .property("chargeMaxDistance", Number) - .property("chargeTheta", Number) - .property("springConstant", Number) - .property("springDamping", Number) - .property("springLength", Number); - -/** - * The bound parameter; true if nodes should be constrained within the layout - * panel. Bounding is disabled by default. Currently the layout does not observe - * the radius of the nodes; strictly speaking, only the center of the node is - * constrained to be within the panel, with an additional 6-pixel offset for - * padding. A future enhancement could extend the bound constraint to observe - * the node's radius, which would also support bounding for variable-size nodes. - * - *

Note that if this layout is used in conjunction with pan & zoom - * behaviors, those behaviors should have their bound parameter set to the same - * value. - * - * @type boolean - * @name pv.Layout.Force.prototype.bound - */ - -/** - * The number of simulation iterations to run, or null if this layout is - * interactive. Force-directed layouts are interactive by default, using a - * setInterval to advance the physics simulation and re-render - * automatically. - * - * @type number - * @name pv.Layout.Force.prototype.iterations - */ - -/** - * The drag constant, in the range [0,1]. A value of 0 means no drag (a - * perfectly frictionless environment), while a value of 1 means friction - * immediately cancels all momentum. The default value is 0.1, which provides a - * minimum amount of drag that helps stabilize bouncy springs; lower values may - * result in excessive bounciness, while higher values cause the simulation to - * take longer to converge. - * - * @type number - * @name pv.Layout.Force.prototype.dragConstant - * @see pv.Force.drag#constant - */ - -/** - * The charge constant, which should be a negative number. The default value is - * -40; more negative values will result in a stronger repulsive force, which - * may lead to faster convergence at the risk of instability. Too strong - * repulsive charge forces can cause comparatively weak springs to be stretched - * well beyond their rest length, emphasizing global structure over local - * structure. A nonnegative value will break the Fruchterman-Reingold algorithm, - * and is for entertainment purposes only. - * - * @type number - * @name pv.Layout.Force.prototype.chargeConstant - * @see pv.Force.charge#constant - */ - -/** - * The minimum distance at which charge forces are applied. The default minimum - * distance of 2 avoids applying forces that are two strong; because the physics - * simulation is run at discrete time intervals, it is possible for two same- - * charged particles to become very close or even a singularity! Since the - * charge force is inversely proportional to the square of the distance, very - * small distances can break the simulation. - * - *

In rare cases, two particles can become stuck on top of each other, as a - * minimum distance threshold will prevent the charge force from repelling them. - * However, this occurs very rarely because other forces and momentum typically - * cause the particles to become separated again, at which point the repulsive - * charge force kicks in. - * - * @type number - * @name pv.Layout.Force.prototype.chargeMinDistance - * @see pv.Force.charge#domain - */ - -/** - * The maximum distance at which charge forces are applied. This improves - * performance by ignoring weak charge forces at great distances. Note that this - * parameter is partly redundant, as the Barnes-Hut algorithm for n-body forces - * already improves performance for far-away particles through approximation. - * - * @type number - * @name pv.Layout.Force.prototype.chargeMaxDistance - * @see pv.Force.charge#domain - */ - -/** - * The Barnes-Hut approximation factor. The Barnes-Hut approximation criterion - * is the ratio of the size of the quadtree node to the distance from the point - * to the node's center of mass is beneath some threshold. The default value is - * 0.9. - * - * @type number - * @name pv.Layout.Force.prototype.chargeTheta - * @see pv.Force.charge#theta - */ - -/** - * The spring constant, which should be a positive number. The default value is - * 0.1; greater values will result in a stronger attractive force, which may - * lead to faster convergence at the risk of instability. Too strong spring - * forces can cause comparatively weak charge forces to be ignored, emphasizing - * local structure over global structure. A nonpositive value will break the - * Fruchterman-Reingold algorithm, and is for entertainment purposes only. - * - *

The spring tension is automatically normalized using the inverse square - * root of the maximum link degree of attached nodes. - * - * @type number - * @name pv.Layout.Force.prototype.springConstant - * @see pv.Force.spring#constant - */ - -/** - * The spring damping factor, in the range [0,1]. Damping functions identically - * to drag forces, damping spring bounciness by applying a force in the opposite - * direction of attached nodes' velocities. The default value is 0.3. - * - *

The spring damping is automatically normalized using the inverse square - * root of the maximum link degree of attached nodes. - * - * @type number - * @name pv.Layout.Force.prototype.springDamping - * @see pv.Force.spring#damping - */ - -/** - * The spring rest length. The default value is 20 pixels. Larger values may be - * appropriate if the layout panel is larger, or if the nodes are rendered - * larger than the default dot size of 20. - * - * @type number - * @name pv.Layout.Force.prototype.springLength - * @see pv.Force.spring#length - */ - -/** - * Default properties for force-directed layouts. The default drag constant is - * 0.1, the default charge constant is -40 (with a domain of [2, 500] and theta - * of 0.9), and the default spring constant is 0.1 (with a damping of 0.3 and a - * rest length of 20). - * - * @type pv.Layout.Force - */ -pv.Layout.Force.prototype.defaults = new pv.Layout.Force() - .extend(pv.Layout.Network.prototype.defaults) - .dragConstant(.1) - .chargeConstant(-40) - .chargeMinDistance(2) - .chargeMaxDistance(500) - .chargeTheta(.9) - .springConstant(.1) - .springDamping(.3) - .springLength(20); - -/** @private Initialize the physics simulation. */ -pv.Layout.Force.prototype.buildImplied = function(s) { - - /* Any cached interactive layouts need to be rebound for the timer. */ - if (pv.Layout.Network.prototype.buildImplied.call(this, s)) { - var f = s.$force; - if (f) { - f.next = this.binds.$force; - this.binds.$force = f; - } - return; - } - - var that = this, - nodes = s.nodes, - links = s.links, - k = s.iterations, - w = s.width, - h = s.height; - - /* Initialize positions randomly near the center. */ - for (var i = 0, n; i < nodes.length; i++) { - n = nodes[i]; - if (isNaN(n.x)) n.x = w / 2 + 40 * Math.random() - 20; - if (isNaN(n.y)) n.y = h / 2 + 40 * Math.random() - 20; - } - - /* Initialize the simulation. */ - var sim = pv.simulation(nodes); - - /* Drag force. */ - sim.force(pv.Force.drag(s.dragConstant)); - - /* Charge (repelling) force. */ - sim.force(pv.Force.charge(s.chargeConstant) - .domain(s.chargeMinDistance, s.chargeMaxDistance) - .theta(s.chargeTheta)); - - /* Spring (attracting) force. */ - sim.force(pv.Force.spring(s.springConstant) - .damping(s.springDamping) - .length(s.springLength) - .links(links)); - - /* Position constraint (for interactive dragging). */ - sim.constraint(pv.Constraint.position()); - - /* Optionally add bound constraint. TODO: better padding. */ - if (s.bound) { - sim.constraint(pv.Constraint.bound().x(6, w - 6).y(6, h - 6)); - } - - /** @private Returns the speed of the given node, to determine cooling. */ - function speed(n) { - return n.fix ? 1 : n.vx * n.vx + n.vy * n.vy; - } - - /* - * If the iterations property is null (the default), the layout is - * interactive. The simulation is run until the fastest particle drops below - * an arbitrary minimum speed. Although the timer keeps firing, this speed - * calculation is fast so there is minimal CPU overhead. Note: if a particle - * is fixed for interactivity, treat this as a high speed and resume - * simulation. - */ - if (k == null) { - sim.step(); // compute initial previous velocities - sim.step(); // compute initial velocities - - /* Add the simulation state to the bound list. */ - var force = s.$force = this.binds.$force = { - next: this.binds.$force, - nodes: nodes, - min: 1e-4 * (links.length + 1), - sim: sim - }; - - /* Start the timer, if not already started. */ - if (!this.$timer) this.$timer = setInterval(function() { - var render = false; - for (var f = that.binds.$force; f; f = f.next) { - if (pv.max(f.nodes, speed) > f.min) { - f.sim.step(); - render = true; - } - } - if (render) that.render(); - }, 42); - } else for (var i = 0; i < k; i++) { - sim.step(); - } -}; diff --git a/lib/protovis/src/layout/Grid.js b/lib/protovis/src/layout/Grid.js deleted file mode 100644 index 13064a8c..00000000 --- a/lib/protovis/src/layout/Grid.js +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Constructs a new, empty grid layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a grid layout with regularly-sized rows and columns. The - * number of rows and columns are determined from their respective - * properties. For example, the 2×3 array: - * - *

1 2 3
- * 4 5 6
- * - * can be represented using the rows property as: - * - *
[[1, 2, 3], [4, 5, 6]]
- * - * If your data is in column-major order, you can equivalently use the - * columns property. If the rows property is an array, it - * takes priority over the columns property. The data is implicitly - * transposed, as if the {@link pv.transpose} operator were applied. - * - *

This layout exports a single cell mark prototype, which is - * intended to be used with a bar, panel, layout, or subclass thereof. The data - * property of the cell prototype is defined as the elements in the array. For - * example, if the array is a two-dimensional array of values in the range - * [0,1], a simple heatmap can be generated as: - * - *

vis.add(pv.Layout.Grid)
- *     .rows(arrays)
- *   .cell.add(pv.Bar)
- *     .fillStyle(pv.ramp("white", "black"))
- * - * The grid subdivides the full width and height of the parent panel into equal - * rectangles. Note, however, that for large, interactive, or animated heatmaps, - * you may see significantly better performance through dynamic {@link pv.Image} - * generation. - * - *

For irregular grids using value-based spatial partitioning, see {@link - * pv.Layout.Treemap}. - * - * @extends pv.Layout - */ -pv.Layout.Grid = function() { - pv.Layout.call(this); - var that = this; - - /** - * The cell prototype. This prototype is intended to be used with a bar, - * panel, or layout (or subclass thereof) to render the grid cells. - * - * @type pv.Mark - * @name pv.Layout.Grid.prototype.cell - */ - (this.cell = new pv.Mark() - .data(function() { - return that.scene[that.index].$grid; - }) - .width(function() { - return that.width() / that.cols(); - }) - .height(function() { - return that.height() / that.rows(); - }) - .left(function() { - return this.width() * (this.index % that.cols()); - }) - .top(function() { - return this.height() * Math.floor(this.index / that.cols()); - })).parent = this; -}; - -pv.Layout.Grid.prototype = pv.extend(pv.Layout) - .property("rows") - .property("cols"); - -/** - * Default properties for grid layouts. By default, there is one row and one - * column, and the data is the propagated to the child cell. - * - * @type pv.Layout.Grid - */ -pv.Layout.Grid.prototype.defaults = new pv.Layout.Grid() - .extend(pv.Layout.prototype.defaults) - .rows(1) - .cols(1); - -/** @private */ -pv.Layout.Grid.prototype.buildImplied = function(s) { - pv.Layout.prototype.buildImplied.call(this, s); - var r = s.rows, c = s.cols; - if (typeof c == "object") r = pv.transpose(c); - if (typeof r == "object") { - s.$grid = pv.blend(r); - s.rows = r.length; - s.cols = r[0] ? r[0].length : 0; - } else { - s.$grid = pv.repeat([s.data], r * c); - } -}; - -/** - * The number of rows. This property can also be specified as the data in - * row-major order; in this case, the rows property is implicitly set to the - * length of the array, and the cols property is set to the length of the first - * element in the array. - * - * @type number - * @name pv.Layout.Grid.prototype.rows - */ - -/** - * The number of columns. This property can also be specified as the data in - * column-major order; in this case, the cols property is implicitly set to the - * length of the array, and the rows property is set to the length of the first - * element in the array. - * - * @type number - * @name pv.Layout.Grid.prototype.cols - */ diff --git a/lib/protovis/src/layout/Hierarchy.js b/lib/protovis/src/layout/Hierarchy.js deleted file mode 100644 index a01e34d4..00000000 --- a/lib/protovis/src/layout/Hierarchy.js +++ /dev/null @@ -1,249 +0,0 @@ -/** - * Constructs a new, empty hierarchy layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Represents an abstract layout for hierarchy diagrams. This class is a - * specialization of {@link pv.Layout.Network}, providing the basic structure - * for both hierarchical node-link diagrams (such as Reingold-Tilford trees) and - * space-filling hierarchy diagrams (such as sunbursts and treemaps). - * - *

Unlike general network layouts, the links property need not be - * defined explicitly. Instead, the links are computed implicitly from the - * parentNode attribute of the node objects, as defined by the - * nodes property. This implementation is also available as - * {@link #links}, for reuse with non-hierarchical layouts; for example, to - * render a tree using force-directed layout. - * - *

Correspondingly, the nodes property is represented as a union of - * {@link pv.Layout.Network.Node} and {@link pv.Dom.Node}. To construct a node - * hierarchy from a simple JSON map, use the {@link pv.Dom} operator; this - * operator also provides an easy way to sort nodes before passing them to the - * layout. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Network}. - * - * @see pv.Layout.Cluster - * @see pv.Layout.Partition - * @see pv.Layout.Tree - * @see pv.Layout.Treemap - * @see pv.Layout.Indent - * @see pv.Layout.Pack - * @extends pv.Layout.Network - */ -pv.Layout.Hierarchy = function() { - pv.Layout.Network.call(this); - this.link.strokeStyle("#ccc"); -}; - -pv.Layout.Hierarchy.prototype = pv.extend(pv.Layout.Network); - -/** @private Compute the implied links. (Links are null by default.) */ -pv.Layout.Hierarchy.prototype.buildImplied = function(s) { - if (!s.links) s.links = pv.Layout.Hierarchy.links.call(this); - pv.Layout.Network.prototype.buildImplied.call(this, s); -}; - -/** The implied links; computes links using the parentNode attribute. */ -pv.Layout.Hierarchy.links = function() { - return this.nodes() - .filter(function(n) { return n.parentNode; }) - .map(function(n) { - return { - sourceNode: n, - targetNode: n.parentNode, - linkValue: 1 - }; - }); -}; - -/** @private Provides standard node-link layout based on breadth & depth. */ -pv.Layout.Hierarchy.NodeLink = { - - /** @private */ - buildImplied: function(s) { - var nodes = s.nodes, - orient = s.orient, - horizontal = /^(top|bottom)$/.test(orient), - w = s.width, - h = s.height; - - /* Compute default inner and outer radius. */ - if (orient == "radial") { - var ir = s.innerRadius, or = s.outerRadius; - if (ir == null) ir = 0; - if (or == null) or = Math.min(w, h) / 2; - } - - /** @private Returns the radius of the given node. */ - function radius(n) { - return n.parentNode ? (n.depth * (or - ir) + ir) : 0; - } - - /** @private Returns the angle of the given node. */ - function midAngle(n) { - return (n.parentNode ? (n.breadth - .25) * 2 * Math.PI : 0); - } - - /** @private */ - function x(n) { - switch (orient) { - case "left": return n.depth * w; - case "right": return w - n.depth * w; - case "top": return n.breadth * w; - case "bottom": return w - n.breadth * w; - case "radial": return w / 2 + radius(n) * Math.cos(n.midAngle); - } - } - - /** @private */ - function y(n) { - switch (orient) { - case "left": return n.breadth * h; - case "right": return h - n.breadth * h; - case "top": return n.depth * h; - case "bottom": return h - n.depth * h; - case "radial": return h / 2 + radius(n) * Math.sin(n.midAngle); - } - } - - for (var i = 0; i < nodes.length; i++) { - var n = nodes[i]; - n.midAngle = orient == "radial" ? midAngle(n) - : horizontal ? Math.PI / 2 : 0; - n.x = x(n); - n.y = y(n); - if (n.firstChild) n.midAngle += Math.PI; - } - } -}; - -/** @private Provides standard space-filling layout based on breadth & depth. */ -pv.Layout.Hierarchy.Fill = { - - /** @private */ - constructor: function() { - this.node - .strokeStyle("#fff") - .fillStyle("#ccc") - .width(function(n) { return n.dx; }) - .height(function(n) { return n.dy; }) - .innerRadius(function(n) { return n.innerRadius; }) - .outerRadius(function(n) { return n.outerRadius; }) - .startAngle(function(n) { return n.startAngle; }) - .angle(function(n) { return n.angle; }); - - this.label - .textAlign("center") - .left(function(n) { return n.x + (n.dx / 2); }) - .top(function(n) { return n.y + (n.dy / 2); }); - - /* Hide unsupported link. */ - delete this.link; - }, - - /** @private */ - buildImplied: function(s) { - var nodes = s.nodes, - orient = s.orient, - horizontal = /^(top|bottom)$/.test(orient), - w = s.width, - h = s.height, - depth = -nodes[0].minDepth; - - /* Compute default inner and outer radius. */ - if (orient == "radial") { - var ir = s.innerRadius, or = s.outerRadius; - if (ir == null) ir = 0; - if (ir) depth *= 2; // use full depth step for root - if (or == null) or = Math.min(w, h) / 2; - } - - /** @private Scales the specified depth for a space-filling layout. */ - function scale(d, depth) { - return (d + depth) / (1 + depth); - } - - /** @private */ - function x(n) { - switch (orient) { - case "left": return scale(n.minDepth, depth) * w; - case "right": return (1 - scale(n.maxDepth, depth)) * w; - case "top": return n.minBreadth * w; - case "bottom": return (1 - n.maxBreadth) * w; - case "radial": return w / 2; - } - } - - /** @private */ - function y(n) { - switch (orient) { - case "left": return n.minBreadth * h; - case "right": return (1 - n.maxBreadth) * h; - case "top": return scale(n.minDepth, depth) * h; - case "bottom": return (1 - scale(n.maxDepth, depth)) * h; - case "radial": return h / 2; - } - } - - /** @private */ - function dx(n) { - switch (orient) { - case "left": - case "right": return (n.maxDepth - n.minDepth) / (1 + depth) * w; - case "top": - case "bottom": return (n.maxBreadth - n.minBreadth) * w; - case "radial": return n.parentNode ? (n.innerRadius + n.outerRadius) * Math.cos(n.midAngle) : 0; - } - } - - /** @private */ - function dy(n) { - switch (orient) { - case "left": - case "right": return (n.maxBreadth - n.minBreadth) * h; - case "top": - case "bottom": return (n.maxDepth - n.minDepth) / (1 + depth) * h; - case "radial": return n.parentNode ? (n.innerRadius + n.outerRadius) * Math.sin(n.midAngle) : 0; - } - } - - /** @private */ - function innerRadius(n) { - return Math.max(0, scale(n.minDepth, depth / 2)) * (or - ir) + ir; - } - - /** @private */ - function outerRadius(n) { - return scale(n.maxDepth, depth / 2) * (or - ir) + ir; - } - - /** @private */ - function startAngle(n) { - return (n.parentNode ? n.minBreadth - .25 : 0) * 2 * Math.PI; - } - - /** @private */ - function angle(n) { - return (n.parentNode ? n.maxBreadth - n.minBreadth : 1) * 2 * Math.PI; - } - - for (var i = 0; i < nodes.length; i++) { - var n = nodes[i]; - n.x = x(n); - n.y = y(n); - if (orient == "radial") { - n.innerRadius = innerRadius(n); - n.outerRadius = outerRadius(n); - n.startAngle = startAngle(n); - n.angle = angle(n); - n.midAngle = n.startAngle + n.angle / 2; - } else { - n.midAngle = horizontal ? -Math.PI / 2 : 0; - } - n.dx = dx(n); - n.dy = dy(n); - } - } -}; diff --git a/lib/protovis/src/layout/Horizon.js b/lib/protovis/src/layout/Horizon.js deleted file mode 100644 index e0bd1c67..00000000 --- a/lib/protovis/src/layout/Horizon.js +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Constructs a new, empty horizon layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a horizon layout, which is a variation of a single-series - * area chart where the area is folded into multiple bands. Color is used to - * encode band, allowing the size of the chart to be reduced significantly - * without impeding readability. This layout algorithm is based on the work of - * J. Heer, N. Kong and M. Agrawala in "Sizing - * the Horizon: The Effects of Chart Size and Layering on the Graphical - * Perception of Time Series Visualizations", CHI 2009. - * - *

This layout exports a single band mark prototype, which is - * intended to be used with an area mark. The band mark is contained in a panel - * which is replicated per band (and for negative/positive bands). For example, - * to create a simple horizon graph given an array of numbers: - * - *

vis.add(pv.Layout.Horizon)
- *     .bands(n)
- *   .band.add(pv.Area)
- *     .data(data)
- *     .left(function() this.index * 35)
- *     .height(function(d) d * 40);
- * - * The layout can be further customized by changing the number of bands, and - * toggling whether the negative bands are mirrored or offset. (See the - * above-referenced paper for guidance.) - * - *

The fillStyle of the area can be overridden, though typically it - * is easier to customize the layout's behavior through the custom - * backgroundStyle, positiveStyle and negativeStyle - * properties. By default, the background is white, positive bands are blue, and - * negative bands are red. For the most accurate presentation, use fully-opaque - * colors of equal intensity for the negative and positive bands. - * - * @extends pv.Layout - */ -pv.Layout.Horizon = function() { - pv.Layout.call(this); - var that = this, - bands, // cached bands - mode, // cached mode - size, // cached height - fill, // cached background style - red, // cached negative color (ramp) - blue, // cached positive color (ramp) - buildImplied = this.buildImplied; - - /** @private Cache the layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - bands = s.bands; - mode = s.mode; - size = Math.round((mode == "color" ? .5 : 1) * s.height); - fill = s.backgroundStyle; - red = pv.ramp(fill, s.negativeStyle).domain(0, bands); - blue = pv.ramp(fill, s.positiveStyle).domain(0, bands); - }; - - var bands = new pv.Panel() - .data(function() { return pv.range(bands * 2); }) - .overflow("hidden") - .height(function() { return size; }) - .top(function(i) { return mode == "color" ? (i & 1) * size : 0; }) - .fillStyle(function(i) { return i ? null : fill; }); - - /** - * The band prototype. This prototype is intended to be used with an Area - * mark to render the horizon bands. - * - * @type pv.Mark - * @name pv.Layout.Horizon.prototype.band - */ - this.band = new pv.Mark() - .top(function(d, i) { - return mode == "mirror" && i & 1 - ? (i + 1 >> 1) * size - : null; - }) - .bottom(function(d, i) { - return mode == "mirror" - ? (i & 1 ? null : (i + 1 >> 1) * -size) - : ((i & 1 || -1) * (i + 1 >> 1) * size); - }) - .fillStyle(function(d, i) { - return (i & 1 ? red : blue)((i >> 1) + 1); - }); - - this.band.add = function(type) { - return that.add(pv.Panel).extend(bands).add(type).extend(this); - }; -}; - -pv.Layout.Horizon.prototype = pv.extend(pv.Layout) - .property("bands", Number) - .property("mode", String) - .property("backgroundStyle", pv.color) - .property("positiveStyle", pv.color) - .property("negativeStyle", pv.color); - -/** - * Default properties for horizon layouts. By default, there are two bands, the - * mode is "offset", the background style is "white", the positive style is - * blue, negative style is red. - * - * @type pv.Layout.Horizon - */ -pv.Layout.Horizon.prototype.defaults = new pv.Layout.Horizon() - .extend(pv.Layout.prototype.defaults) - .bands(2) - .mode("offset") - .backgroundStyle("white") - .positiveStyle("#1f77b4") - .negativeStyle("#d62728"); - -/** - * The horizon mode: offset, mirror, or color. The default is "offset". - * - * @type string - * @name pv.Layout.Horizon.prototype.mode - */ - -/** - * The number of bands. Must be at least one. The default value is two. - * - * @type number - * @name pv.Layout.Horizon.prototype.bands - */ - -/** - * The positive band color; if non-null, the interior of positive bands are - * filled with the specified color. The default value of this property is blue. - * For accurate blending, this color should be fully opaque. - * - * @type pv.Color - * @name pv.Layout.Horizon.prototype.positiveStyle - */ - -/** - * The negative band color; if non-null, the interior of negative bands are - * filled with the specified color. The default value of this property is red. - * For accurate blending, this color should be fully opaque. - * - * @type pv.Color - * @name pv.Layout.Horizon.prototype.negativeStyle - */ - -/** - * The background color. The panel background is filled with the specified - * color, and the negative and positive bands are filled with an interpolated - * color between this color and the respective band color. The default value of - * this property is white. For accurate blending, this color should be fully - * opaque. - * - * @type pv.Color - * @name pv.Layout.Horizon.prototype.backgroundStyle - */ diff --git a/lib/protovis/src/layout/Indent.js b/lib/protovis/src/layout/Indent.js deleted file mode 100644 index 12ca7f3f..00000000 --- a/lib/protovis/src/layout/Indent.js +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Constructs a new, empty indent layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a hierarchical layout using the indent algorithm. This - * layout implements a node-link diagram where the nodes are presented in - * preorder traversal, and nodes are indented based on their depth from the - * root. This technique is used ubiquitously by operating systems to represent - * file directories; although it requires much vertical space, indented trees - * allow efficient interactive exploration of trees to find a specific - * node. In addition they allow rapid scanning of node labels, and multivariate - * data such as file sizes can be displayed adjacent to the hierarchy. - * - *

The indent layout can be configured using the depth and - * breadth properties, which control the increments in pixel space for - * each indent and row in the layout. This layout does not support multiple - * orientations; the root node is rendered in the top-left, while - * breadth is a vertical offset from the top, and depth is a - * horizontal offset from the left. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @extends pv.Layout.Hierarchy - */ -pv.Layout.Indent = function() { - pv.Layout.Hierarchy.call(this); - this.link.interpolate("step-after"); -}; - -pv.Layout.Indent.prototype = pv.extend(pv.Layout.Hierarchy) - .property("depth", Number) - .property("breadth", Number); - -/** - * The horizontal offset between different levels of the tree; defaults to 15. - * - * @type number - * @name pv.Layout.Indent.prototype.depth - */ - -/** - * The vertical offset between nodes; defaults to 15. - * - * @type number - * @name pv.Layout.Indent.prototype.breadth - */ - -/** - * Default properties for indent layouts. By default the depth and breadth - * offsets are 15 pixels. - * - * @type pv.Layout.Indent - */ -pv.Layout.Indent.prototype.defaults = new pv.Layout.Indent() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .depth(15) - .breadth(15); - -/** @private */ -pv.Layout.Indent.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var nodes = s.nodes, - bspace = s.breadth, - dspace = s.depth, - ax = 0, - ay = 0; - - /** @private */ - function position(n, breadth, depth) { - n.x = ax + depth++ * dspace; - n.y = ay + breadth++ * bspace; - n.midAngle = 0; - for (var c = n.firstChild; c; c = c.nextSibling) { - breadth = position(c, breadth, depth); - } - return breadth; - } - - position(nodes[0], 1, 1); -}; diff --git a/lib/protovis/src/layout/Layout.js b/lib/protovis/src/layout/Layout.js deleted file mode 100644 index c5de3326..00000000 --- a/lib/protovis/src/layout/Layout.js +++ /dev/null @@ -1,56 +0,0 @@ -/** - * Constructs a new, empty layout with default properties. Layouts are not - * typically constructed directly; instead, a concrete subclass is added to an - * existing panel via {@link pv.Mark#add}. - * - * @class Represents an abstract layout, encapsulating a visualization technique - * such as a streamgraph or treemap. Layouts are themselves containers, - * extending from {@link pv.Panel}, and defining a set of mark prototypes as - * children. These mark prototypes provide default properties that together - * implement the given visualization technique. - * - *

Layouts do not initially contain any marks; any exported marks (such as a - * network layout's link and node) are intended to be used as - * prototypes. By adding a concrete mark, such as a {@link pv.Bar}, to the - * appropriate mark prototype, the mark is added to the layout and inherits the - * given properties. This approach allows further customization of the layout, - * either by choosing a different mark type to add, or more simply by overriding - * some of the layout's defined properties. - * - *

Each concrete layout, such as treemap or circle-packing, has different - * behavior and may export different mark prototypes, depending on what marks - * are typically needed to render the desired visualization. Therefore it is - * important to understand how each layout is structured, such that the provided - * mark prototypes are used appropriately. - * - *

In addition to the mark prototypes, layouts may define custom properties - * that affect the overall behavior of the layout. For example, a treemap layout - * might use a property to specify which layout algorithm to use. These - * properties are just like other mark properties, and can be defined as - * constants or as functions. As with panels, the data property can be used to - * replicate layouts, and properties can be defined to in terms of layout data. - * - * @extends pv.Panel - */ -pv.Layout = function() { - pv.Panel.call(this); -}; - -pv.Layout.prototype = pv.extend(pv.Panel); - -/** - * @private Defines a local property with the specified name and cast. Note that - * although the property method is only defined locally, the cast function is - * global, which is necessary since properties are inherited! - * - * @param {string} name the property name. - * @param {function} [cast] the cast function for this property. - */ -pv.Layout.prototype.property = function(name, cast) { - if (!this.hasOwnProperty("properties")) { - this.properties = pv.extend(this.properties); - } - this.properties[name] = true; - this.propertyMethod(name, false, pv.Mark.cast[name] = cast); - return this; -}; diff --git a/lib/protovis/src/layout/Matrix.js b/lib/protovis/src/layout/Matrix.js deleted file mode 100644 index 53692d44..00000000 --- a/lib/protovis/src/layout/Matrix.js +++ /dev/null @@ -1,177 +0,0 @@ -/** - * Constructs a new, empty matrix network layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a network visualization using a matrix view. This is, in - * effect, a visualization of the graph's adjacency matrix: the cell at - * row i, column j, corresponds to the link from node i to - * node j. The fill color of each cell is binary by default, and - * corresponds to whether a link exists between the two nodes. If the underlying - * graph has links with variable values, the fillStyle property can be - * substited to use an appropriate color function, such as {@link pv.ramp}. - * - *

For undirected networks, the matrix is symmetric around the diagonal. For - * directed networks, links in opposite directions can be rendered on opposite - * sides of the diagonal using directed(true). The graph is assumed to - * be undirected by default. - * - *

The mark prototypes for this network layout are slightly different than - * other implementations:

    - * - *
  • node - unsupported; undefined. No mark is needed to visualize - * nodes directly, as the nodes are implicit in the location (rows and columns) - * of the links. - * - *

  • link - for rendering links; typically a {@link pv.Bar}. The - * link mark is added directly to the layout, with the data property defined as - * all possible pairs of nodes. Each pair is represented as a - * {@link pv.Network.Layout.Link}, though the linkValue attribute may - * be 0 if no link exists in the graph. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. The label mark is added directly to the layout, with the - * data property defined via the layout's nodes property; note, - * however, that the nodes are duplicated so as to provide a label across the - * top and down the side. Properties such as strokeStyle and - * fillStyle can be overridden to compute properties from node data - * dynamically. - * - *
For more details on how to use this layout, see - * {@link pv.Layout.Network}. - * - * @extends pv.Layout.Network - */ -pv.Layout.Matrix = function() { - pv.Layout.Network.call(this); - var that = this, - n, // cached matrix size - dx, // cached cell width - dy, // cached cell height - labels, // cached labels (array of strings) - pairs, // cached pairs (array of links) - buildImplied = that.buildImplied; - - /** @private Cache layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - n = s.nodes.length; - dx = s.width / n; - dy = s.height / n; - labels = s.$matrix.labels; - pairs = s.$matrix.pairs; - }; - - /* Links are all pairs of nodes. */ - this.link - .data(function() { return pairs; }) - .left(function() { return dx * (this.index % n); }) - .top(function() { return dy * Math.floor(this.index / n); }) - .width(function() { return dx; }) - .height(function() { return dy; }) - .lineWidth(1.5) - .strokeStyle("#fff") - .fillStyle(function(l) { return l.linkValue ? "#555" : "#eee"; }) - .parent = this; - - /* No special add for links! */ - delete this.link.add; - - /* Labels are duplicated for top & left. */ - this.label - .data(function() { return labels; }) - .left(function() { return this.index & 1 ? dx * ((this.index >> 1) + .5) : 0; }) - .top(function() { return this.index & 1 ? 0 : dy * ((this.index >> 1) + .5); }) - .textMargin(4) - .textAlign(function() { return this.index & 1 ? "left" : "right"; }) - .textAngle(function() { return this.index & 1 ? -Math.PI / 2 : 0; }); - - /* The node mark is unused. */ - delete this.node; -}; - -pv.Layout.Matrix.prototype = pv.extend(pv.Layout.Network) - .property("directed", Boolean); - -/** - * Whether this matrix visualization is directed (bidirectional). By default, - * the graph is assumed to be undirected, such that the visualization is - * symmetric across the matrix diagonal. If the network is directed, then - * forward links are drawn above the diagonal, while reverse links are drawn - * below. - * - * @type boolean - * @name pv.Layout.Matrix.prototype.directed - */ - -/** - * Specifies an optional sort function. The sort function follows the same - * comparator contract required by {@link pv.Dom.Node#sort}. Specifying a sort - * function provides an alternative to sort the nodes as they are specified by - * the nodes property; the main advantage of doing this is that the - * comparator function can access implicit fields populated by the network - * layout, such as the linkDegree. - * - *

Note that matrix visualizations are particularly sensitive to order. This - * is referred to as the seriation problem, and many different techniques exist - * to find good node orders that emphasize clusters, such as spectral layout and - * simulated annealing. - * - * @param {function} f comparator function for nodes. - * @returns {pv.Layout.Matrix} this. - */ -pv.Layout.Matrix.prototype.sort = function(f) { - this.$sort = f; - return this; -}; - -/** @private */ -pv.Layout.Matrix.prototype.buildImplied = function(s) { - if (pv.Layout.Network.prototype.buildImplied.call(this, s)) return; - - var nodes = s.nodes, - links = s.links, - sort = this.$sort, - n = nodes.length, - index = pv.range(n), - labels = [], - pairs = [], - map = {}; - - s.$matrix = {labels: labels, pairs: pairs}; - - /* Sort the nodes. */ - if (sort) index.sort(function(a, b) { return sort(nodes[a], nodes[b]); }); - - /* Create pairs. */ - for (var i = 0; i < n; i++) { - for (var j = 0; j < n; j++) { - var a = index[i], - b = index[j], - p = { - row: i, - col: j, - sourceNode: nodes[a], - targetNode: nodes[b], - linkValue: 0 - }; - pairs.push(map[a + "." + b] = p); - } - } - - /* Create labels. */ - for (var i = 0; i < n; i++) { - var a = index[i]; - labels.push(nodes[a], nodes[a]); - } - - /* Accumulate link values. */ - for (var i = 0; i < links.length; i++) { - var l = links[i], - source = l.sourceNode.index, - target = l.targetNode.index, - value = l.linkValue; - map[source + "." + target].linkValue += value; - if (!s.directed) map[target + "." + source].linkValue += value; - } -}; diff --git a/lib/protovis/src/layout/Network.js b/lib/protovis/src/layout/Network.js deleted file mode 100644 index 6a9ff188..00000000 --- a/lib/protovis/src/layout/Network.js +++ /dev/null @@ -1,302 +0,0 @@ -/** - * Constructs a new, empty network layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Represents an abstract layout for network diagrams. This class - * provides the basic structure for both node-link diagrams (such as - * force-directed graph layout) and space-filling network diagrams (such as - * sunbursts and treemaps). Note that "network" here is a general term that - * includes hierarchical structures; a tree is represented using links from - * child to parent. - * - *

Network layouts require the graph data structure to be defined using two - * properties:

    - * - *
  • nodes - an array of objects representing nodes. Objects in this - * array must conform to the {@link pv.Layout.Network.Node} interface; which is - * to say, be careful to avoid naming collisions with automatic attributes such - * as index and linkDegree. If the nodes property is defined - * as an array of primitives, such as numbers or strings, these primitives are - * automatically wrapped in an object; the resulting object's nodeValue - * attribute points to the original primitive value. - * - *

  • links - an array of objects representing links. Objects in - * this array must conform to the {@link pv.Layout.Network.Link} interface; at a - * minimum, either source and target indexes or - * sourceNode and targetNode references must be set. Note that - * if the links property is defined after the nodes property, the links can be - * defined in terms of this.nodes(). - * - *
- * - *

Three standard mark prototypes are provided:

    - * - *
  • node - for rendering nodes; typically a {@link pv.Dot}. The node - * mark is added directly to the layout, with the data property defined via the - * layout's nodes property. Properties such as strokeStyle and - * fillStyle can be overridden to compute properties from node data - * dynamically. - * - *

  • link - for rendering links; typically a {@link pv.Line}. The - * link mark is added to a child panel, whose data property is defined as - * layout's links property. The link's data property is then a - * two-element array of the source node and target node. Thus, poperties such as - * strokeStyle and fillStyle can be overridden to compute - * properties from either the node data (the first argument) or the link data - * (the second argument; the parent panel data) dynamically. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. The label mark is added directly to the layout, with the - * data property defined via the layout's nodes property. Properties - * such as strokeStyle and fillStyle can be overridden to - * compute properties from node data dynamically. - * - *
Note that some network implementations may not support all three - * standard mark prototypes; for example, space-filling hierarchical layouts - * typically do not use a link prototype, as the parent-child links are - * implied by the structure of the space-filling node marks. Check the - * specific network layout for implementation details. - * - *

Network layout properties, including nodes and links, - * are typically cached rather than re-evaluated with every call to render. This - * is a performance optimization, as network layout algorithms can be - * expensive. If the network structure changes, call {@link #reset} to clear the - * cache before rendering. Note that although the network layout properties are - * cached, child mark properties, such as the marks used to render the nodes and - * links, are not. Therefore, non-structural changes to the network - * layout, such as changing the color of a mark on mouseover, do not need to - * reset the layout. - * - * @see pv.Layout.Hierarchy - * @see pv.Layout.Force - * @see pv.Layout.Matrix - * @see pv.Layout.Arc - * @see pv.Layout.Rollup - * @extends pv.Layout - */ -pv.Layout.Network = function() { - pv.Layout.call(this); - var that = this; - - /* @private Version tracking to cache layout state, improving performance. */ - this.$id = pv.id(); - - /** - * The node prototype. This prototype is intended to be used with a Dot mark - * in conjunction with the link prototype. - * - * @type pv.Mark - * @name pv.Layout.Network.prototype.node - */ - (this.node = new pv.Mark() - .data(function() { return that.nodes(); }) - .strokeStyle("#1f77b4") - .fillStyle("#fff") - .left(function(n) { return n.x; }) - .top(function(n) { return n.y; })).parent = this; - - /** - * The link prototype, which renders edges between source nodes and target - * nodes. This prototype is intended to be used with a Line mark in - * conjunction with the node prototype. - * - * @type pv.Mark - * @name pv.Layout.Network.prototype.link - */ - this.link = new pv.Mark() - .extend(this.node) - .data(function(p) { return [p.sourceNode, p.targetNode]; }) - .fillStyle(null) - .lineWidth(function(d, p) { return p.linkValue * 1.5; }) - .strokeStyle("rgba(0,0,0,.2)"); - - this.link.add = function(type) { - return that.add(pv.Panel) - .data(function() { return that.links(); }) - .add(type) - .extend(this); - }; - - /** - * The node label prototype, which renders the node name adjacent to the node. - * This prototype is provided as an alternative to using the anchor on the - * node mark; it is primarily intended to be used with radial node-link - * layouts, since it provides a convenient mechanism to set the text angle. - * - * @type pv.Mark - * @name pv.Layout.Network.prototype.label - */ - (this.label = new pv.Mark() - .extend(this.node) - .textMargin(7) - .textBaseline("middle") - .text(function(n) { return n.nodeName || n.nodeValue; }) - .textAngle(function(n) { - var a = n.midAngle; - return pv.Wedge.upright(a) ? a : (a + Math.PI); - }) - .textAlign(function(n) { - return pv.Wedge.upright(n.midAngle) ? "left" : "right"; - })).parent = this; -}; - -/** - * @class Represents a node in a network layout. There is no explicit - * constructor; this class merely serves to document the attributes that are - * used on nodes in network layouts. (Note that hierarchical nodes place - * additional requirements on node representation, vis {@link pv.Dom.Node}.) - * - * @see pv.Layout.Network - * @name pv.Layout.Network.Node - */ - -/** - * The node index, zero-based. This attribute is populated automatically based - * on the index in the array returned by the nodes property. - * - * @type number - * @name pv.Layout.Network.Node.prototype.index - */ - -/** - * The link degree; the sum of link values for all incoming and outgoing links. - * This attribute is populated automatically. - * - * @type number - * @name pv.Layout.Network.Node.prototype.linkDegree - */ - -/** - * The node name; optional. If present, this attribute will be used to provide - * the text for node labels. If not present, the label text will fallback to the - * nodeValue attribute. - * - * @type string - * @name pv.Layout.Network.Node.prototype.nodeName - */ - -/** - * The node value; optional. If present, and no nodeName attribute is - * present, the node value will be used as the label text. This attribute is - * also automatically populated if the nodes are specified as an array of - * primitives, such as strings or numbers. - * - * @type object - * @name pv.Layout.Network.Node.prototype.nodeValue - */ - -/** - * @class Represents a link in a network layout. There is no explicit - * constructor; this class merely serves to document the attributes that are - * used on links in network layouts. For hierarchical layouts, this class is - * used to represent the parent-child links. - * - * @see pv.Layout.Network - * @name pv.Layout.Network.Link - */ - -/** - * The link value, or weight; optional. If not specified (or not a number), the - * default value of 1 is used. - * - * @type number - * @name pv.Layout.Network.Link.prototype.linkValue - */ - -/** - * The link's source node. If not set, this value will be derived from the - * source attribute index. - * - * @type pv.Layout.Network.Node - * @name pv.Layout.Network.Link.prototype.sourceNode - */ - -/** - * The link's target node. If not set, this value will be derived from the - * target attribute index. - * - * @type pv.Layout.Network.Node - * @name pv.Layout.Network.Link.prototype.targetNode - */ - -/** - * Alias for sourceNode, as expressed by the index of the source node. - * This attribute is not populated automatically, but may be used as a more - * convenient identification of the link's source, for example in a static JSON - * representation. - * - * @type number - * @name pv.Layout.Network.Link.prototype.source - */ - -/** - * Alias for targetNode, as expressed by the index of the target node. - * This attribute is not populated automatically, but may be used as a more - * convenient identification of the link's target, for example in a static JSON - * representation. - * - * @type number - * @name pv.Layout.Network.Link.prototype.target - */ - -/** - * Alias for linkValue. This attribute is not populated automatically, - * but may be used instead of the linkValue attribute when specifying - * links. - * - * @type number - * @name pv.Layout.Network.Link.prototype.value - */ - -/** @private Transform nodes and links on cast. */ -pv.Layout.Network.prototype = pv.extend(pv.Layout) - .property("nodes", function(v) { - return v.map(function(d, i) { - if (typeof d != "object") d = {nodeValue: d}; - d.index = i; - return d; - }); - }) - .property("links", function(v) { - return v.map(function(d) { - if (isNaN(d.linkValue)) d.linkValue = isNaN(d.value) ? 1 : d.value; - return d; - }); - }); - -/** - * Resets the cache, such that changes to layout property definitions will be - * visible on subsequent render. Unlike normal marks (and normal layouts), - * properties associated with network layouts are not automatically re-evaluated - * on render; the properties are cached, and any expensive layout algorithms are - * only run after the layout is explicitly reset. - * - * @returns {pv.Layout.Network} this. - */ -pv.Layout.Network.prototype.reset = function() { - this.$id = pv.id(); - return this; -}; - -/** @private Skip evaluating properties if cached. */ -pv.Layout.Network.prototype.buildProperties = function(s, properties) { - if ((s.$id || 0) < this.$id) { - pv.Layout.prototype.buildProperties.call(this, s, properties); - } -}; - -/** @private Compute link degrees; map source and target indexes to nodes. */ -pv.Layout.Network.prototype.buildImplied = function(s) { - pv.Layout.prototype.buildImplied.call(this, s); - if (s.$id >= this.$id) return true; - s.$id = this.$id; - s.nodes.forEach(function(d) { - d.linkDegree = 0; - }); - s.links.forEach(function(d) { - var v = d.linkValue; - (d.sourceNode || (d.sourceNode = s.nodes[d.source])).linkDegree += v; - (d.targetNode || (d.targetNode = s.nodes[d.target])).linkDegree += v; - }); -}; diff --git a/lib/protovis/src/layout/Pack.js b/lib/protovis/src/layout/Pack.js deleted file mode 100644 index f0079ea6..00000000 --- a/lib/protovis/src/layout/Pack.js +++ /dev/null @@ -1,323 +0,0 @@ -/** - * Constructs a new, empty circle-packing layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a hierarchical layout using circle-packing. The meaning of - * the exported mark prototypes changes slightly in the space-filling - * implementation:

    - * - *
  • node - for rendering nodes; typically a {@link pv.Dot}. - * - *

  • link - unsupported; undefined. Links are encoded implicitly - * in the arrangement of the space-filling nodes. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. - * - *
The pack layout support dynamic sizing for leaf nodes, if a - * {@link #size} psuedo-property is specified. The default size function returns - * 1, causing all leaf nodes to be sized equally, and all internal nodes to be - * sized by the number of leaf nodes they have as descendants. - * - *

The size function can be used in conjunction with the order property, - * which allows the nodes to the sorted by the computed size. Note: for sorting - * based on other data attributes, simply use the default null for the - * order property, and sort the nodes beforehand using the {@link pv.Dom} - * operator. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @extends pv.Layout.Hierarchy - * @see "Visualization of large hierarchical data by circle packing" by W. Wang, - * H. Wang, G. Dai, and H. Wang, ACM CHI 2006. - */ -pv.Layout.Pack = function() { - pv.Layout.Hierarchy.call(this); - - this.node - .radius(function(n) { return n.radius; }) - .strokeStyle("rgb(31, 119, 180)") - .fillStyle("rgba(31, 119, 180, .25)"); - - this.label - .textAlign("center"); - - /* Hide unsupported link. */ - delete this.link; -}; - -pv.Layout.Pack.prototype = pv.extend(pv.Layout.Hierarchy) - .property("spacing", Number) - .property("order", String); // ascending, descending, reverse, null - -/** - * Default properties for circle-packing layouts. The default spacing parameter - * is 1 and the default order is "ascending". - * - * @type pv.Layout.Pack - */ -pv.Layout.Pack.prototype.defaults = new pv.Layout.Pack() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .spacing(1) - .order("ascending"); - -/** - * The spacing parameter; defaults to 1, which provides a little bit of padding - * between sibling nodes and the enclosing circle. Larger values increase the - * spacing, by making the sibling nodes smaller; a value of zero makes the leaf - * nodes as large as possible, with no padding on enclosing circles. - * - * @type number - * @name pv.Layout.Pack.prototype.spacing - */ - -/** - * The sibling node order. The default order is null, which means to - * use the sibling order specified by the nodes property as-is. A value of - * "ascending" will sort siblings in ascending order of size, while "descending" - * will do the reverse. For sorting based on data attributes other than size, - * use the default null for the order property, and sort the nodes - * beforehand using the {@link pv.Dom} operator. - * - * @see pv.Dom.Node#sort - * @type string - * @name pv.Layout.Pack.prototype.order - */ - -/** @private The default size function. */ -pv.Layout.Pack.prototype.$radius = function() { return 1; }; - -// TODO is it possible for spacing to operate in pixel space? -// Right now it appears to be multiples of the smallest radius. - -/** - * Specifies the sizing function. By default, a sizing function is disabled and - * all nodes are given constant size. The sizing function is invoked for each - * leaf node in the tree (passed to the constructor). - * - *

For example, if the tree data structure represents a file system, with - * files as leaf nodes, and each file has a bytes attribute, you can - * specify a size function as: - * - *

    .size(function(d) d.bytes)
- * - * As with other properties, a size function may specify additional arguments to - * access the data associated with the layout and any enclosing panels. - * - * @param {function} f the new sizing function. - * @returns {pv.Layout.Pack} this. - */ -pv.Layout.Pack.prototype.size = function(f) { - this.$radius = typeof f == "function" - ? function() { return Math.sqrt(f.apply(this, arguments)); } - : (f = Math.sqrt(f), function() { return f; }); - return this; -}; - -/** @private */ -pv.Layout.Pack.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var that = this, - nodes = s.nodes, - root = nodes[0]; - - /** @private Compute the radii of the leaf nodes. */ - function radii(nodes) { - var stack = pv.Mark.stack; - stack.unshift(null); - for (var i = 0, n = nodes.length; i < n; i++) { - var c = nodes[i]; - if (!c.firstChild) { - c.radius = that.$radius.apply(that, (stack[0] = c, stack)); - } - } - stack.shift(); - } - - /** @private */ - function packTree(n) { - var nodes = []; - for (var c = n.firstChild; c; c = c.nextSibling) { - if (c.firstChild) c.radius = packTree(c); - c.n = c.p = c; - nodes.push(c); - } - - /* Sort. */ - switch (s.order) { - case "ascending": { - nodes.sort(function(a, b) { return a.radius - b.radius; }); - break; - } - case "descending": { - nodes.sort(function(a, b) { return b.radius - a.radius; }); - break; - } - case "reverse": nodes.reverse(); break; - } - - return packCircle(nodes); - } - - /** @private */ - function packCircle(nodes) { - var xMin = Infinity, - xMax = -Infinity, - yMin = Infinity, - yMax = -Infinity, - a, b, c, j, k; - - /** @private */ - function bound(n) { - xMin = Math.min(n.x - n.radius, xMin); - xMax = Math.max(n.x + n.radius, xMax); - yMin = Math.min(n.y - n.radius, yMin); - yMax = Math.max(n.y + n.radius, yMax); - } - - /** @private */ - function insert(a, b) { - var c = a.n; - a.n = b; - b.p = a; - b.n = c; - c.p = b; - } - - /** @private */ - function splice(a, b) { - a.n = b; - b.p = a; - } - - /** @private */ - function intersects(a, b) { - var dx = b.x - a.x, - dy = b.y - a.y, - dr = a.radius + b.radius; - return (dr * dr - dx * dx - dy * dy) > .001; // within epsilon - } - - /* Create first node. */ - a = nodes[0]; - a.x = -a.radius; - a.y = 0; - bound(a); - - /* Create second node. */ - if (nodes.length > 1) { - b = nodes[1]; - b.x = b.radius; - b.y = 0; - bound(b); - - /* Create third node and build chain. */ - if (nodes.length > 2) { - c = nodes[2]; - place(a, b, c); - bound(c); - insert(a, c); - a.p = c; - insert(c, b); - b = a.n; - - /* Now iterate through the rest. */ - for (var i = 3; i < nodes.length; i++) { - place(a, b, c = nodes[i]); - - /* Search for the closest intersection. */ - var isect = 0, s1 = 1, s2 = 1; - for (j = b.n; j != b; j = j.n, s1++) { - if (intersects(j, c)) { - isect = 1; - break; - } - } - if (isect == 1) { - for (k = a.p; k != j.p; k = k.p, s2++) { - if (intersects(k, c)) { - if (s2 < s1) { - isect = -1; - j = k; - } - break; - } - } - } - - /* Update node chain. */ - if (isect == 0) { - insert(a, c); - b = c; - bound(c); - } else if (isect > 0) { - splice(a, j); - b = j; - i--; - } else if (isect < 0) { - splice(j, b); - a = j; - i--; - } - } - } - } - - /* Re-center the circles and return the encompassing radius. */ - var cx = (xMin + xMax) / 2, - cy = (yMin + yMax) / 2, - cr = 0; - for (var i = 0; i < nodes.length; i++) { - var n = nodes[i]; - n.x -= cx; - n.y -= cy; - cr = Math.max(cr, n.radius + Math.sqrt(n.x * n.x + n.y * n.y)); - } - return cr + s.spacing; - } - - /** @private */ - function place(a, b, c) { - var da = b.radius + c.radius, - db = a.radius + c.radius, - dx = b.x - a.x, - dy = b.y - a.y, - dc = Math.sqrt(dx * dx + dy * dy), - cos = (db * db + dc * dc - da * da) / (2 * db * dc), - theta = Math.acos(cos), - x = cos * db, - h = Math.sin(theta) * db; - dx /= dc; - dy /= dc; - c.x = a.x + x * dx + h * dy; - c.y = a.y + x * dy - h * dx; - } - - /** @private */ - function transform(n, x, y, k) { - for (var c = n.firstChild; c; c = c.nextSibling) { - c.x += n.x; - c.y += n.y; - transform(c, x, y, k); - } - n.x = x + k * n.x; - n.y = y + k * n.y; - n.radius *= k; - } - - radii(nodes); - - /* Recursively compute the layout. */ - root.x = 0; - root.y = 0; - root.radius = packTree(root); - - var w = this.width(), - h = this.height(), - k = 1 / Math.max(2 * root.radius / w, 2 * root.radius / h); - transform(root, w / 2, h / 2, k); -}; diff --git a/lib/protovis/src/layout/Partition.js b/lib/protovis/src/layout/Partition.js deleted file mode 100644 index 306e6a82..00000000 --- a/lib/protovis/src/layout/Partition.js +++ /dev/null @@ -1,203 +0,0 @@ -/** - * Constructs a new, empty partition layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implemeents a hierarchical layout using the partition (or sunburst, - * icicle) algorithm. This layout provides both node-link and space-filling - * implementations of partition diagrams. In many ways it is similar to - * {@link pv.Layout.Cluster}, except that leaf nodes are positioned based on - * their distance from the root. - * - *

The partition layout support dynamic sizing for leaf nodes, if a - * {@link #size} psuedo-property is specified. The default size function returns - * 1, causing all leaf nodes to be sized equally, and all internal nodes to be - * sized by the number of leaf nodes they have as descendants. - * - *

The size function can be used in conjunction with the order property, - * which allows the nodes to the sorted by the computed size. Note: for sorting - * based on other data attributes, simply use the default null for the - * order property, and sort the nodes beforehand using the {@link pv.Dom} - * operator. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @see pv.Layout.Partition.Fill - * @extends pv.Layout.Hierarchy - */ -pv.Layout.Partition = function() { - pv.Layout.Hierarchy.call(this); -}; - -pv.Layout.Partition.prototype = pv.extend(pv.Layout.Hierarchy) - .property("order", String) // null, ascending, descending? - .property("orient", String) // top, left, right, bottom, radial - .property("innerRadius", Number) - .property("outerRadius", Number); - -/** - * The sibling node order. The default order is null, which means to - * use the sibling order specified by the nodes property as-is. A value of - * "ascending" will sort siblings in ascending order of size, while "descending" - * will do the reverse. For sorting based on data attributes other than size, - * use the default null for the order property, and sort the nodes - * beforehand using the {@link pv.Dom} operator. - * - * @see pv.Dom.Node#sort - * @type string - * @name pv.Layout.Partition.prototype.order - */ - -/** - * The orientation. The default orientation is "top", which means that the root - * node is placed on the top edge, leaf nodes appear at the bottom, and internal - * nodes are in-between. The following orientations are supported:

    - * - *
  • left - left-to-right. - *
  • right - right-to-left. - *
  • top - top-to-bottom. - *
  • bottom - bottom-to-top. - *
  • radial - radially, with the root at the center.
- * - * @type string - * @name pv.Layout.Partition.prototype.orient - */ - -/** - * The inner radius; defaults to 0. This property applies only to radial - * orientations, and can be used to compress the layout radially. Note that for - * the node-link implementation, the root node is always at the center, - * regardless of the value of this property; this property only affects internal - * and leaf nodes. For the space-filling implementation, a non-zero value of - * this property will result in the root node represented as a ring rather than - * a circle. - * - * @type number - * @name pv.Layout.Partition.prototype.innerRadius - */ - -/** - * The outer radius; defaults to fill the containing panel, based on the height - * and width of the layout. If the layout has no height and width specified, it - * will extend to fill the enclosing panel. - * - * @type number - * @name pv.Layout.Partition.prototype.outerRadius - */ - -/** - * Default properties for partition layouts. The default orientation is "top". - * - * @type pv.Layout.Partition - */ -pv.Layout.Partition.prototype.defaults = new pv.Layout.Partition() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .orient("top"); - -/** @private */ -pv.Layout.Partition.prototype.$size = function() { return 1; }; - -/** - * Specifies the sizing function. By default, a sizing function is disabled and - * all nodes are given constant size. The sizing function is invoked for each - * leaf node in the tree (passed to the constructor). - * - *

For example, if the tree data structure represents a file system, with - * files as leaf nodes, and each file has a bytes attribute, you can - * specify a size function as: - * - *

    .size(function(d) d.bytes)
- * - * As with other properties, a size function may specify additional arguments to - * access the data associated with the layout and any enclosing panels. - * - * @param {function} f the new sizing function. - * @returns {pv.Layout.Partition} this. - */ -pv.Layout.Partition.prototype.size = function(f) { - this.$size = f; - return this; -}; - -/** @private */ -pv.Layout.Partition.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var that = this, - root = s.nodes[0], - stack = pv.Mark.stack, - maxDepth = 0; - - /* Recursively compute the tree depth and node size. */ - stack.unshift(null); - root.visitAfter(function(n, i) { - if (i > maxDepth) maxDepth = i; - n.size = n.firstChild - ? pv.sum(n.childNodes, function(n) { return n.size; }) - : that.$size.apply(that, (stack[0] = n, stack)); - }); - stack.shift(); - - /* Order */ - switch (s.order) { - case "ascending": root.sort(function(a, b) { return a.size - b.size; }); break; - case "descending": root.sort(function(b, a) { return a.size - b.size; }); break; - } - - /* Compute the unit breadth and depth of each node. */ - var ds = 1 / maxDepth; - root.minBreadth = 0; - root.breadth = .5; - root.maxBreadth = 1; - root.visitBefore(function(n) { - var b = n.minBreadth, s = n.maxBreadth - b; - for (var c = n.firstChild; c; c = c.nextSibling) { - c.minBreadth = b; - c.maxBreadth = b += (c.size / n.size) * s; - c.breadth = (b + c.minBreadth) / 2; - } - }); - root.visitAfter(function(n, i) { - n.minDepth = (i - 1) * ds; - n.maxDepth = n.depth = i * ds; - }); - - pv.Layout.Hierarchy.NodeLink.buildImplied.call(this, s); -}; - -/** - * Constructs a new, empty space-filling partition layout. Layouts are not - * typically constructed directly; instead, they are added to an existing panel - * via {@link pv.Mark#add}. - * - * @class A variant of partition layout that is space-filling. The meaning of - * the exported mark prototypes changes slightly in the space-filling - * implementation:
    - * - *
  • node - for rendering nodes; typically a {@link pv.Bar} for - * non-radial orientations, and a {@link pv.Wedge} for radial orientations. - * - *

  • link - unsupported; undefined. Links are encoded implicitly - * in the arrangement of the space-filling nodes. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. - * - *
For more details on how to use this layout, see - * {@link pv.Layout.Partition}. - * - * @extends pv.Layout.Partition - */ -pv.Layout.Partition.Fill = function() { - pv.Layout.Partition.call(this); - pv.Layout.Hierarchy.Fill.constructor.call(this); -}; - -pv.Layout.Partition.Fill.prototype = pv.extend(pv.Layout.Partition); - -/** @private */ -pv.Layout.Partition.Fill.prototype.buildImplied = function(s) { - if (pv.Layout.Partition.prototype.buildImplied.call(this, s)) return; - pv.Layout.Hierarchy.Fill.buildImplied.call(this, s); -}; diff --git a/lib/protovis/src/layout/Rollup.js b/lib/protovis/src/layout/Rollup.js deleted file mode 100644 index e2598208..00000000 --- a/lib/protovis/src/layout/Rollup.js +++ /dev/null @@ -1,203 +0,0 @@ -/** - * Constructs a new, empty rollup network layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a network visualization using a node-link diagram where - * nodes are rolled up along two dimensions. This implementation is based on the - * "PivotGraph" designed by Martin Wattenberg: - * - *
The method is designed for graphs that are "multivariate", i.e., - * where each node is associated with several attributes. Unlike visualizations - * which emphasize global graph topology, PivotGraph uses a simple grid-based - * approach to focus on the relationship between node attributes & - * connections.
- * - * This layout requires two psuedo-properties to be specified, which assign node - * positions along the two dimensions {@link #x} and {@link #y}, corresponding - * to the left and top properties, respectively. Typically, these functions are - * specified using an {@link pv.Scale.ordinal}. Nodes that share the same - * position in x and y are "rolled up" into a meta-node, and - * similarly links are aggregated between meta-nodes. For example, to construct - * a rollup to analyze links by gender and affiliation, first define two ordinal - * scales: - * - *
var x = pv.Scale.ordinal(nodes, function(d) d.gender).split(0, w),
- *     y = pv.Scale.ordinal(nodes, function(d) d.aff).split(0, h);
- * - * Next, define the position psuedo-properties: - * - *
    .x(function(d) x(d.gender))
- *     .y(function(d) y(d.aff))
- * - * Linear and other quantitative scales can alternatively be used to position - * the nodes along either dimension. Note, however, that the rollup requires - * that the positions match exactly, and thus ordinal scales are recommended to - * avoid precision errors. - * - *

Note that because this layout provides a visualization of the rolled up - * graph, the data properties for the mark prototypes (node, - * link and label) are different from most other network - * layouts: they reference the rolled-up nodes and links, rather than the nodes - * and links of the full network. The underlying nodes and links for each - * rolled-up node and link can be accessed via the nodes and - * links attributes, respectively. The aggregated link values for - * rolled-up links can similarly be accessed via the linkValue - * attribute. - * - *

For undirected networks, links are duplicated in both directions. For - * directed networks, use directed(true). The graph is assumed to be - * undirected by default. - * - * @extends pv.Layout.Network - * @see "Visual Exploration of Multivariate Graphs" by M. Wattenberg, CHI 2006. - */ -pv.Layout.Rollup = function() { - pv.Layout.Network.call(this); - var that = this, - nodes, // cached rollup nodes - links, // cached rollup links - buildImplied = that.buildImplied; - - /** @private Cache layout state to optimize properties. */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - nodes = s.$rollup.nodes; - links = s.$rollup.links; - }; - - /* Render rollup nodes. */ - this.node - .data(function() { return nodes; }) - .size(function(d) { return d.nodes.length * 20; }); - - /* Render rollup links. */ - this.link - .interpolate("polar") - .eccentricity(.8); - - this.link.add = function(type) { - return that.add(pv.Panel) - .data(function() { return links; }) - .add(type) - .extend(this); - }; -}; - -pv.Layout.Rollup.prototype = pv.extend(pv.Layout.Network) - .property("directed", Boolean); - -/** - * Whether the underlying network is directed. By default, the graph is assumed - * to be undirected, and links are rendered in both directions. If the network - * is directed, then forward links are drawn above the diagonal, while reverse - * links are drawn below. - * - * @type boolean - * @name pv.Layout.Rollup.prototype.directed - */ - -/** - * Specifies the x-position function used to rollup nodes. The rolled up - * nodes are positioned horizontally using the return values from the given - * function. Typically the function is specified as an ordinal scale. For - * single-dimension rollups, a constant value can be specified. - * - * @param {function} f the x-position function. - * @returns {pv.Layout.Rollup} this. - * @see pv.Scale.ordinal - */ -pv.Layout.Rollup.prototype.x = function(f) { - this.$x = pv.functor(f); - return this; -}; - -/** - * Specifies the y-position function used to rollup nodes. The rolled up - * nodes are positioned vertically using the return values from the given - * function. Typically the function is specified as an ordinal scale. For - * single-dimension rollups, a constant value can be specified. - * - * @param {function} f the y-position function. - * @returns {pv.Layout.Rollup} this. - * @see pv.Scale.ordinal - */ -pv.Layout.Rollup.prototype.y = function(f) { - this.$y = pv.functor(f); - return this; -}; - -/** @private */ -pv.Layout.Rollup.prototype.buildImplied = function(s) { - if (pv.Layout.Network.prototype.buildImplied.call(this, s)) return; - - var nodes = s.nodes, - links = s.links, - directed = s.directed, - n = nodes.length, - x = [], - y = [], - rnindex = 0, - rnodes = {}, - rlinks = {}; - - /** @private */ - function id(i) { - return x[i] + "," + y[i]; - } - - /* Iterate over the data, evaluating the x and y functions. */ - var stack = pv.Mark.stack, o = {parent: this}; - stack.unshift(null); - for (var i = 0; i < n; i++) { - o.index = i; - stack[0] = nodes[i]; - x[i] = this.$x.apply(o, stack); - y[i] = this.$y.apply(o, stack); - } - stack.shift(); - - /* Compute rollup nodes. */ - for (var i = 0; i < nodes.length; i++) { - var nodeId = id(i), - rn = rnodes[nodeId]; - if (!rn) { - rn = rnodes[nodeId] = pv.extend(nodes[i]); - rn.index = rnindex++; - rn.x = x[i]; - rn.y = y[i]; - rn.nodes = []; - } - rn.nodes.push(nodes[i]); - } - - /* Compute rollup links. */ - for (var i = 0; i < links.length; i++) { - var source = links[i].sourceNode, - target = links[i].targetNode, - rsource = rnodes[id(source.index)], - rtarget = rnodes[id(target.index)], - reverse = !directed && rsource.index > rtarget.index, - linkId = reverse - ? rtarget.index + "," + rsource.index - : rsource.index + "," + rtarget.index, - rl = rlinks[linkId]; - if (!rl) { - rl = rlinks[linkId] = { - sourceNode: rsource, - targetNode: rtarget, - linkValue: 0, - links: [] - }; - } - rl.links.push(links[i]); - rl.linkValue += links[i].linkValue; - } - - /* Export the rolled up nodes and links to the scene. */ - s.$rollup = { - nodes: pv.values(rnodes), - links: pv.values(rlinks) - }; -}; diff --git a/lib/protovis/src/layout/Stack.js b/lib/protovis/src/layout/Stack.js deleted file mode 100644 index 54d9eed6..00000000 --- a/lib/protovis/src/layout/Stack.js +++ /dev/null @@ -1,391 +0,0 @@ -/** - * Constructs a new, empty stack layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a layout for stacked visualizations, ranging from simple - * stacked bar charts to more elaborate "streamgraphs" composed of stacked - * areas. Stack layouts uses length as a visual encoding, as opposed to - * position, as the layers do not share an aligned axis. - * - *

Marks can be stacked vertically or horizontally. For example, - * - *

vis.add(pv.Layout.Stack)
- *     .layers([[1, 1.2, 1.7, 1.5, 1.7],
- *              [.5, 1, .8, 1.1, 1.3],
- *              [.2, .5, .8, .9, 1]])
- *     .x(function() this.index * 35)
- *     .y(function(d) d * 40)
- *   .layer.add(pv.Area);
- * - * specifies a vertically-stacked area chart, using the default "bottom-left" - * orientation with "zero" offset. This visualization can be easily changed into - * a streamgraph using the "wiggle" offset, which attempts to minimize change in - * slope weighted by layer thickness. See the {@link #offset} property for more - * supported streamgraph algorithms. - * - *

In the simplest case, the layer data can be specified as a two-dimensional - * array of numbers. The x and y psuedo-properties are used to - * define the thickness of each layer at the given position, respectively; in - * the above example of the "bottom-left" orientation, the x and - * y psuedo-properties are equivalent to the left and - * height properties that you might use if you implemented a stacked - * area by hand. - * - *

The advantage of using the stack layout is that the baseline, i.e., the - * bottom property is computed automatically using the specified offset - * algorithm. In addition, the order of layers can be computed using a built-in - * algorithm via the order property. - * - *

With the exception of the "expand" offset, the stack layout does - * not perform any automatic scaling of data; the values returned from - * x and y specify pixel sizes. To simplify scaling math, use - * this layout in conjunction with {@link pv.Scale.linear} or similar. - * - *

In other cases, the values psuedo-property can be used to define - * the data more flexibly. As with a typical panel & area, the - * layers property corresponds to the data in the enclosing panel, - * while the values psuedo-property corresponds to the data for the - * area within the panel. For example, given an array of data values: - * - *

var crimea = [
- *  { date: "4/1854", wounds: 0, other: 110, disease: 110 },
- *  { date: "5/1854", wounds: 0, other: 95, disease: 105 },
- *  { date: "6/1854", wounds: 0, other: 40, disease: 95 },
- *  ...
- * - * and a corresponding array of series names: - * - *
var causes = ["wounds", "other", "disease"];
- * - * Separate layers can be defined for each cause like so: - * - *
vis.add(pv.Layout.Stack)
- *     .layers(causes)
- *     .values(crimea)
- *     .x(function(d) x(d.date))
- *     .y(function(d, p) y(d[p]))
- *   .layer.add(pv.Area)
- *     ...
- * - * As with the panel & area case, the datum that is passed to the - * psuedo-properties x and y are the values (an element in - * crimea); the second argument is the layer data (a string in - * causes). Additional arguments specify the data of enclosing panels, - * if any. - * - * @extends pv.Layout - */ -pv.Layout.Stack = function() { - pv.Layout.call(this); - var that = this, - /** @ignore */ none = function() { return null; }, - prop = {t: none, l: none, r: none, b: none, w: none, h: none}, - values, - buildImplied = that.buildImplied; - - /** @private Proxy the given property on the layer. */ - function proxy(name) { - return function() { - return prop[name](this.parent.index, this.index); - }; - } - - /** @private Compute the layout! */ - this.buildImplied = function(s) { - buildImplied.call(this, s); - - var data = s.layers, - n = data.length, - m, - orient = s.orient, - horizontal = /^(top|bottom)\b/.test(orient), - h = this.parent[horizontal ? "height" : "width"](), - x = [], - y = [], - dy = []; - - /* - * Iterate over the data, evaluating the values, x and y functions. The - * context in which the x and y psuedo-properties are evaluated is a - * pseudo-mark that is a grandchild of this layout. - */ - var stack = pv.Mark.stack, o = {parent: {parent: this}}; - stack.unshift(null); - values = []; - for (var i = 0; i < n; i++) { - dy[i] = []; - y[i] = []; - o.parent.index = i; - stack[0] = data[i]; - values[i] = this.$values.apply(o.parent, stack); - if (!i) m = values[i].length; - stack.unshift(null); - for (var j = 0; j < m; j++) { - stack[0] = values[i][j]; - o.index = j; - if (!i) x[j] = this.$x.apply(o, stack); - dy[i][j] = this.$y.apply(o, stack); - } - stack.shift(); - } - stack.shift(); - - /* order */ - var index; - switch (s.order) { - case "inside-out": { - var max = dy.map(function(v) { return pv.max.index(v); }), - map = pv.range(n).sort(function(a, b) { return max[a] - max[b]; }), - sums = dy.map(function(v) { return pv.sum(v); }), - top = 0, - bottom = 0, - tops = [], - bottoms = []; - for (var i = 0; i < n; i++) { - var j = map[i]; - if (top < bottom) { - top += sums[j]; - tops.push(j); - } else { - bottom += sums[j]; - bottoms.push(j); - } - } - index = bottoms.reverse().concat(tops); - break; - } - case "reverse": index = pv.range(n - 1, -1, -1); break; - default: index = pv.range(n); break; - } - - /* offset */ - switch (s.offset) { - case "silohouette": { - for (var j = 0; j < m; j++) { - var o = 0; - for (var i = 0; i < n; i++) o += dy[i][j]; - y[index[0]][j] = (h - o) / 2; - } - break; - } - case "wiggle": { - var o = 0; - for (var i = 0; i < n; i++) o += dy[i][0]; - y[index[0]][0] = o = (h - o) / 2; - for (var j = 1; j < m; j++) { - var s1 = 0, s2 = 0, dx = x[j] - x[j - 1]; - for (var i = 0; i < n; i++) s1 += dy[i][j]; - for (var i = 0; i < n; i++) { - var s3 = (dy[index[i]][j] - dy[index[i]][j - 1]) / (2 * dx); - for (var k = 0; k < i; k++) { - s3 += (dy[index[k]][j] - dy[index[k]][j - 1]) / dx; - } - s2 += s3 * dy[index[i]][j]; - } - y[index[0]][j] = o -= s1 ? s2 / s1 * dx : 0; - } - break; - } - case "expand": { - for (var j = 0; j < m; j++) { - y[index[0]][j] = 0; - var k = 0; - for (var i = 0; i < n; i++) k += dy[i][j]; - if (k) { - k = h / k; - for (var i = 0; i < n; i++) dy[i][j] *= k; - } else { - k = h / n; - for (var i = 0; i < n; i++) dy[i][j] = k; - } - } - break; - } - default: { - for (var j = 0; j < m; j++) y[index[0]][j] = 0; - break; - } - } - - /* Propagate the offset to the other series. */ - for (var j = 0; j < m; j++) { - var o = y[index[0]][j]; - for (var i = 1; i < n; i++) { - o += dy[index[i - 1]][j]; - y[index[i]][j] = o; - } - } - - /* Find the property definitions for dynamic substitution. */ - var i = orient.indexOf("-"), - pdy = horizontal ? "h" : "w", - px = i < 0 ? (horizontal ? "l" : "b") : orient.charAt(i + 1), - py = orient.charAt(0); - for (var p in prop) prop[p] = none; - prop[px] = function(i, j) { return x[j]; }; - prop[py] = function(i, j) { return y[i][j]; }; - prop[pdy] = function(i, j) { return dy[i][j]; }; - }; - - /** - * The layer prototype. This prototype is intended to be used with an area, - * bar or panel mark (or subclass thereof). Other mark types may be possible, - * though note that the stack layout is not currently designed to support - * radial stacked visualizations using wedges. - * - *

The layer is not a direct child of the stack layout; a hidden panel is - * used to replicate layers. - * - * @type pv.Mark - * @name pv.Layout.Stack.prototype.layer - */ - this.layer = new pv.Mark() - .data(function() { return values[this.parent.index]; }) - .top(proxy("t")) - .left(proxy("l")) - .right(proxy("r")) - .bottom(proxy("b")) - .width(proxy("w")) - .height(proxy("h")); - - this.layer.add = function(type) { - return that.add(pv.Panel) - .data(function() { return that.layers(); }) - .add(type) - .extend(this); - }; -}; - -pv.Layout.Stack.prototype = pv.extend(pv.Layout) - .property("orient", String) - .property("offset", String) - .property("order", String) - .property("layers"); - -/** - * Default properties for stack layouts. The default orientation is - * "bottom-left", the default offset is "zero", and the default layers is - * [[]]. - * - * @type pv.Layout.Stack - */ -pv.Layout.Stack.prototype.defaults = new pv.Layout.Stack() - .extend(pv.Layout.prototype.defaults) - .orient("bottom-left") - .offset("zero") - .layers([[]]); - -/** @private */ -pv.Layout.Stack.prototype.$x - = /** @private */ pv.Layout.Stack.prototype.$y - = function() { return 0; }; - -/** - * The x psuedo-property; determines the position of the value within the layer. - * This typically corresponds to the independent variable. For example, with the - * default "bottom-left" orientation, this function defines the "left" property. - * - * @param {function} f the x function. - * @returns {pv.Layout.Stack} this. - */ -pv.Layout.Stack.prototype.x = function(f) { - /** @private */ this.$x = pv.functor(f); - return this; -}; - -/** - * The y psuedo-property; determines the thickness of the layer at the given - * value. This typically corresponds to the dependent variable. For example, - * with the default "bottom-left" orientation, this function defines the - * "height" property. - * - * @param {function} f the y function. - * @returns {pv.Layout.Stack} this. - */ -pv.Layout.Stack.prototype.y = function(f) { - /** @private */ this.$y = pv.functor(f); - return this; -}; - -/** @private The default value function; identity. */ -pv.Layout.Stack.prototype.$values = pv.identity; - -/** - * The values function; determines the values for a given layer. The default - * value is the identity function, which assumes that the layers property is - * specified as a two-dimensional (i.e., nested) array. - * - * @param {function} f the values function. - * @returns {pv.Layout.Stack} this. - */ -pv.Layout.Stack.prototype.values = function(f) { - this.$values = pv.functor(f); - return this; -}; - -/** - * The layer data in row-major order. The value of this property is typically a - * two-dimensional (i.e., nested) array, but any array can be used, provided the - * values psuedo-property is defined accordingly. - * - * @type array[] - * @name pv.Layout.Stack.prototype.layers - */ - -/** - * The layer orientation. The following values are supported:

    - * - *
  • bottom-left == bottom - *
  • bottom-right - *
  • top-left == top - *
  • top-right - *
  • left-top - *
  • left-bottom == left - *
  • right-top - *
  • right-bottom == right - * - *
. The default value is "bottom-left", which means that the layers will - * be built from the bottom-up, and the values within layers will be laid out - * from left-to-right. - * - *

Note that with non-zero baselines, some orientations may give similar - * results. For example, offset("silohouette") centers the layers, resulting in - * a streamgraph. Thus, the orientations "bottom-left" and "top-left" will - * produce similar results, differing only in the layer order. - * - * @type string - * @name pv.Layout.Stack.prototype.orient - */ - -/** - * The layer order. The following values are supported:

    - * - *
  • null - use given layer order. - *
  • inside-out - sort by maximum value, with balanced order. - *
  • reverse - use reverse of given layer order. - * - *
For details on the inside-out order algorithm, refer to "Stacked Graphs - * -- Geometry & Aesthetics" by L. Byron and M. Wattenberg, IEEE TVCG - * November/December 2008. - * - * @type string - * @name pv.Layout.Stack.prototype.order - */ - -/** - * The layer offset; the y-position of the bottom of the lowest layer. The - * following values are supported:
    - * - *
  • zero - use a zero baseline, i.e., the y-axis. - *
  • silohouette - center the stream, i.e., ThemeRiver. - *
  • wiggle - minimize weighted change in slope. - *
  • expand - expand layers to fill the enclosing layout dimensions. - * - *
For details on these offset algorithms, refer to "Stacked Graphs -- - * Geometry & Aesthetics" by L. Byron and M. Wattenberg, IEEE TVCG - * November/December 2008. - * - * @type string - * @name pv.Layout.Stack.prototype.offset - */ diff --git a/lib/protovis/src/layout/Tree.js b/lib/protovis/src/layout/Tree.js deleted file mode 100644 index d450167b..00000000 --- a/lib/protovis/src/layout/Tree.js +++ /dev/null @@ -1,282 +0,0 @@ -/** - * Constructs a new, empty tree layout. Layouts are not typically constructed - * directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a node-link tree diagram using the Reingold-Tilford "tidy" - * tree layout algorithm. The specific algorithm used by this layout is based on - * "Improving - * Walker's Algorithm to Run in Linear Time" by C. Buchheim, M. Jünger - * & S. Leipert, Graph Drawing 2002. This layout supports both cartesian and - * radial orientations orientations for node-link diagrams. - * - *

The tree layout supports a "group" property, which if true causes siblings - * to be positioned closer together than unrelated nodes at the same depth. The - * layout can be configured using the depth and breadth - * properties, which control the increments in pixel space between nodes in both - * dimensions, similar to the indent layout. - * - *

For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @extends pv.Layout.Hierarchy - */ -pv.Layout.Tree = function() { - pv.Layout.Hierarchy.call(this); -}; - -pv.Layout.Tree.prototype = pv.extend(pv.Layout.Hierarchy) - .property("group", Number) - .property("breadth", Number) - .property("depth", Number) - .property("orient", String); - -/** - * Default properties for tree layouts. The default orientation is "top", the - * default group parameter is 1, and the default breadth and depth offsets are - * 15 and 60 respectively. - * - * @type pv.Layout.Tree - */ -pv.Layout.Tree.prototype.defaults = new pv.Layout.Tree() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .group(1) - .breadth(15) - .depth(60) - .orient("top"); - -/** @private */ -pv.Layout.Tree.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var nodes = s.nodes, - orient = s.orient, - depth = s.depth, - breadth = s.breadth, - group = s.group, - w = s.width, - h = s.height; - - /** @private */ - function firstWalk(v) { - var l, r, a; - if (!v.firstChild) { - if (l = v.previousSibling) { - v.prelim = l.prelim + distance(v.depth, true); - } - } else { - l = v.firstChild; - r = v.lastChild; - a = l; // default ancestor - for (var c = l; c; c = c.nextSibling) { - firstWalk(c); - a = apportion(c, a); - } - executeShifts(v); - var midpoint = .5 * (l.prelim + r.prelim); - if (l = v.previousSibling) { - v.prelim = l.prelim + distance(v.depth, true); - v.mod = v.prelim - midpoint; - } else { - v.prelim = midpoint; - } - } - } - - /** @private */ - function secondWalk(v, m, depth) { - v.breadth = v.prelim + m; - m += v.mod; - for (var c = v.firstChild; c; c = c.nextSibling) { - secondWalk(c, m, depth); - } - } - - /** @private */ - function apportion(v, a) { - var w = v.previousSibling; - if (w) { - var vip = v, - vop = v, - vim = w, - vom = v.parentNode.firstChild, - sip = vip.mod, - sop = vop.mod, - sim = vim.mod, - som = vom.mod, - nr = nextRight(vim), - nl = nextLeft(vip); - while (nr && nl) { - vim = nr; - vip = nl; - vom = nextLeft(vom); - vop = nextRight(vop); - vop.ancestor = v; - var shift = (vim.prelim + sim) - (vip.prelim + sip) + distance(vim.depth, false); - if (shift > 0) { - moveSubtree(ancestor(vim, v, a), v, shift); - sip += shift; - sop += shift; - } - sim += vim.mod; - sip += vip.mod; - som += vom.mod; - sop += vop.mod; - nr = nextRight(vim); - nl = nextLeft(vip); - } - if (nr && !nextRight(vop)) { - vop.thread = nr; - vop.mod += sim - sop; - } - if (nl && !nextLeft(vom)) { - vom.thread = nl; - vom.mod += sip - som; - a = v; - } - } - return a; - } - - /** @private */ - function nextLeft(v) { - return v.firstChild || v.thread; - } - - /** @private */ - function nextRight(v) { - return v.lastChild || v.thread; - } - - /** @private */ - function moveSubtree(wm, wp, shift) { - var subtrees = wp.number - wm.number; - wp.change -= shift / subtrees; - wp.shift += shift; - wm.change += shift / subtrees; - wp.prelim += shift; - wp.mod += shift; - } - - /** @private */ - function executeShifts(v) { - var shift = 0, change = 0; - for (var c = v.lastChild; c; c = c.previousSibling) { - c.prelim += shift; - c.mod += shift; - change += c.change; - shift += c.shift + change; - } - } - - /** @private */ - function ancestor(vim, v, a) { - return (vim.ancestor.parentNode == v.parentNode) ? vim.ancestor : a; - } - - /** @private */ - function distance(depth, siblings) { - return (siblings ? 1 : (group + 1)) / ((orient == "radial") ? depth : 1); - } - - /* Initialize temporary layout variables. TODO: store separately. */ - var root = nodes[0]; - root.visitAfter(function(v, i) { - v.ancestor = v; - v.prelim = 0; - v.mod = 0; - v.change = 0; - v.shift = 0; - v.number = v.previousSibling ? (v.previousSibling.number + 1) : 0; - v.depth = i; - }); - - /* Compute the layout using Buchheim et al.'s algorithm. */ - firstWalk(root); - secondWalk(root, -root.prelim, 0); - - /** @private Returns the angle of the given node. */ - function midAngle(n) { - return (orient == "radial") ? n.breadth / depth : 0; - } - - /** @private */ - function x(n) { - switch (orient) { - case "left": return n.depth; - case "right": return w - n.depth; - case "top": - case "bottom": return n.breadth + w / 2; - case "radial": return w / 2 + n.depth * Math.cos(midAngle(n)); - } - } - - /** @private */ - function y(n) { - switch (orient) { - case "left": - case "right": return n.breadth + h / 2; - case "top": return n.depth; - case "bottom": return h - n.depth; - case "radial": return h / 2 + n.depth * Math.sin(midAngle(n)); - } - } - - /* Clear temporary layout variables; transform depth and breadth. */ - root.visitAfter(function(v) { - v.breadth *= breadth; - v.depth *= depth; - v.midAngle = midAngle(v); - v.x = x(v); - v.y = y(v); - if (v.firstChild) v.midAngle += Math.PI; - delete v.breadth; - delete v.depth; - delete v.ancestor; - delete v.prelim; - delete v.mod; - delete v.change; - delete v.shift; - delete v.number; - delete v.thread; - }); -}; - -/** - * The offset between siblings nodes; defaults to 15. - * - * @type number - * @name pv.Layout.Tree.prototype.breadth - */ - -/** - * The offset between parent and child nodes; defaults to 60. - * - * @type number - * @name pv.Layout.Tree.prototype.depth - */ - -/** - * The orientation. The default orientation is "top", which means that the root - * node is placed on the top edge, leaf nodes appear at the bottom, and internal - * nodes are in-between. The following orientations are supported:

    - * - *
  • left - left-to-right. - *
  • right - right-to-left. - *
  • top - top-to-bottom. - *
  • bottom - bottom-to-top. - *
  • radial - radially, with the root at the center.
- * - * @type string - * @name pv.Layout.Tree.prototype.orient - */ - -/** - * The sibling grouping, i.e., whether differentiating space is placed between - * sibling groups. The default is 1 (or true), causing sibling leaves to be - * separated by one breadth offset. Setting this to false (or 0) causes - * non-siblings to be adjacent. - * - * @type number - * @name pv.Layout.Tree.prototype.group - */ diff --git a/lib/protovis/src/layout/Treemap.js b/lib/protovis/src/layout/Treemap.js deleted file mode 100644 index c9df86b6..00000000 --- a/lib/protovis/src/layout/Treemap.js +++ /dev/null @@ -1,347 +0,0 @@ -/** - * Constructs a new, empty treemap layout. Layouts are not typically - * constructed directly; instead, they are added to an existing panel via - * {@link pv.Mark#add}. - * - * @class Implements a space-filling rectangular layout, with the hierarchy - * represented via containment. Treemaps represent nodes as boxes, with child - * nodes placed within parent boxes. The size of each box is proportional to the - * size of the node in the tree. This particular algorithm is taken from Bruls, - * D.M., C. Huizing, and J.J. van Wijk, "Squarified Treemaps" in - * Data Visualization 2000, Proceedings of the Joint Eurographics and IEEE - * TCVG Sumposium on Visualization, 2000, pp. 33-42. - * - *

The meaning of the exported mark prototypes changes slightly in the - * space-filling implementation:

    - * - *
  • node - for rendering nodes; typically a {@link pv.Bar}. The node - * data is populated with dx and dy attributes, in addition to - * the standard x and y position attributes. - * - *

  • leaf - for rendering leaf nodes only, with no fill or stroke - * style by default; typically a {@link pv.Panel} or another layout! - * - *

  • link - unsupported; undefined. Links are encoded implicitly - * in the arrangement of the space-filling nodes. - * - *

  • label - for rendering node labels; typically a - * {@link pv.Label}. - * - *
For more details on how to use this layout, see - * {@link pv.Layout.Hierarchy}. - * - * @extends pv.Layout.Hierarchy - */ -pv.Layout.Treemap = function() { - pv.Layout.Hierarchy.call(this); - - this.node - .strokeStyle("#fff") - .fillStyle("rgba(31, 119, 180, .25)") - .width(function(n) { return n.dx; }) - .height(function(n) { return n.dy; }); - - this.label - .visible(function(n) { return !n.firstChild; }) - .left(function(n) { return n.x + (n.dx / 2); }) - .top(function(n) { return n.y + (n.dy / 2); }) - .textAlign("center") - .textAngle(function(n) { return n.dx > n.dy ? 0 : -Math.PI / 2; }); - - (this.leaf = new pv.Mark() - .extend(this.node) - .fillStyle(null) - .strokeStyle(null) - .visible(function(n) { return !n.firstChild; })).parent = this; - - /* Hide unsupported link. */ - delete this.link; -}; - -pv.Layout.Treemap.prototype = pv.extend(pv.Layout.Hierarchy) - .property("round", Boolean) - .property("paddingLeft", Number) - .property("paddingRight", Number) - .property("paddingTop", Number) - .property("paddingBottom", Number) - .property("mode", String) - .property("order", String); - -/** - * Default propertiess for treemap layouts. The default mode is "squarify" and - * the default order is "ascending". - * - * @type pv.Layout.Treemap - */ -pv.Layout.Treemap.prototype.defaults = new pv.Layout.Treemap() - .extend(pv.Layout.Hierarchy.prototype.defaults) - .mode("squarify") // squarify, slice-and-dice, slice, dice - .order("ascending"); // ascending, descending, reverse, null - -/** - * Whether node sizes should be rounded to integer values. This has a similar - * effect to setting antialias(false) for node values, but allows the - * treemap algorithm to accumulate error related to pixel rounding. - * - * @type boolean - * @name pv.Layout.Treemap.prototype.round - */ - -/** - * The left inset between parent add child in pixels. Defaults to 0. - * - * @type number - * @name pv.Layout.Treemap.prototype.paddingLeft - * @see #padding - */ - -/** - * The right inset between parent add child in pixels. Defaults to 0. - * - * @type number - * @name pv.Layout.Treemap.prototype.paddingRight - * @see #padding - */ - -/** - * The top inset between parent and child in pixels. Defaults to 0. - * - * @type number - * @name pv.Layout.Treemap.prototype.paddingTop - * @see #padding - */ - -/** - * The bottom inset between parent and child in pixels. Defaults to 0. - * - * @type number - * @name pv.Layout.Treemap.prototype.paddingBottom - * @see #padding - */ - -/** - * The treemap algorithm. The default value is "squarify". The "slice-and-dice" - * algorithm may also be used, which alternates between horizontal and vertical - * slices for different depths. In addition, the "slice" and "dice" algorithms - * may be specified explicitly to control whether horizontal or vertical slices - * are used, which may be useful for nested treemap layouts. - * - * @type string - * @name pv.Layout.Treemap.prototype.mode - * @see "Ordered Treemap Layouts" by B. Shneiderman & M. Wattenberg, IEEE - * InfoVis 2001. - */ - -/** - * The sibling node order. A null value means to use the sibling order - * specified by the nodes property as-is; "reverse" will reverse the given - * order. The default value "ascending" will sort siblings in ascending order of - * size, while "descending" will do the reverse. For sorting based on data - * attributes other than size, use the default null for the order - * property, and sort the nodes beforehand using the {@link pv.Dom} operator. - * - * @type string - * @name pv.Layout.Treemap.prototype.order - */ - -/** - * Alias for setting the left, right, top and bottom padding properties - * simultaneously. - * - * @see #paddingLeft - * @see #paddingRight - * @see #paddingTop - * @see #paddingBottom - * @returns {pv.Layout.Treemap} this. - */ -pv.Layout.Treemap.prototype.padding = function(n) { - return this.paddingLeft(n).paddingRight(n).paddingTop(n).paddingBottom(n); -}; - -/** @private The default size function. */ -pv.Layout.Treemap.prototype.$size = function(d) { - return Number(d.nodeValue); -}; - -/** - * Specifies the sizing function. By default, the size function uses the - * nodeValue attribute of nodes as a numeric value: function(d) - * Number(d.nodeValue). - * - *

The sizing function is invoked for each leaf node in the tree, per the - * nodes property. For example, if the tree data structure represents a - * file system, with files as leaf nodes, and each file has a bytes - * attribute, you can specify a size function as: - * - *

    .size(function(d) d.bytes)
- * - * @param {function} f the new sizing function. - * @returns {pv.Layout.Treemap} this. - */ -pv.Layout.Treemap.prototype.size = function(f) { - this.$size = pv.functor(f); - return this; -}; - -/** @private */ -pv.Layout.Treemap.prototype.buildImplied = function(s) { - if (pv.Layout.Hierarchy.prototype.buildImplied.call(this, s)) return; - - var that = this, - nodes = s.nodes, - root = nodes[0], - stack = pv.Mark.stack, - left = s.paddingLeft, - right = s.paddingRight, - top = s.paddingTop, - bottom = s.paddingBottom, - /** @ignore */ size = function(n) { return n.size; }, - round = s.round ? Math.round : Number, - mode = s.mode; - - /** @private */ - function slice(row, sum, horizontal, x, y, w, h) { - for (var i = 0, d = 0; i < row.length; i++) { - var n = row[i]; - if (horizontal) { - n.x = x + d; - n.y = y; - d += n.dx = round(w * n.size / sum); - n.dy = h; - } else { - n.x = x; - n.y = y + d; - n.dx = w; - d += n.dy = round(h * n.size / sum); - } - } - if (n) { // correct on-axis rounding error - if (horizontal) { - n.dx += w - d; - } else { - n.dy += h - d; - } - } - } - - /** @private */ - function ratio(row, l) { - var rmax = -Infinity, rmin = Infinity, s = 0; - for (var i = 0; i < row.length; i++) { - var r = row[i].size; - if (r < rmin) rmin = r; - if (r > rmax) rmax = r; - s += r; - } - s = s * s; - l = l * l; - return Math.max(l * rmax / s, s / (l * rmin)); - } - - /** @private */ - function layout(n, i) { - var x = n.x + left, - y = n.y + top, - w = n.dx - left - right, - h = n.dy - top - bottom; - - /* Assume squarify by default. */ - if (mode != "squarify") { - slice(n.childNodes, n.size, - mode == "slice" ? true - : mode == "dice" ? false - : i & 1, x, y, w, h); - return; - } - - var row = [], - mink = Infinity, - l = Math.min(w, h), - k = w * h / n.size; - - /* Abort if the size is nonpositive. */ - if (n.size <= 0) return; - - /* Scale the sizes to fill the current subregion. */ - n.visitBefore(function(n) { n.size *= k; }); - - /** @private Position the specified nodes along one dimension. */ - function position(row) { - var horizontal = w == l, - sum = pv.sum(row, size), - r = l ? round(sum / l) : 0; - slice(row, sum, horizontal, x, y, horizontal ? w : r, horizontal ? r : h); - if (horizontal) { - y += r; - h -= r; - } else { - x += r; - w -= r; - } - l = Math.min(w, h); - return horizontal; - } - - var children = n.childNodes.slice(); // copy - while (children.length) { - var child = children[children.length - 1]; - if (!child.size) { - children.pop(); - continue; - } - row.push(child); - - var k = ratio(row, l); - if (k <= mink) { - children.pop(); - mink = k; - } else { - row.pop(); - position(row); - row.length = 0; - mink = Infinity; - } - } - - /* correct off-axis rounding error */ - if (position(row)) for (var i = 0; i < row.length; i++) { - row[i].dy += h; - } else for (var i = 0; i < row.length; i++) { - row[i].dx += w; - } - } - - /* Recursively compute the node depth and size. */ - stack.unshift(null); - root.visitAfter(function(n, i) { - n.depth = i; - n.x = n.y = n.dx = n.dy = 0; - n.size = n.firstChild - ? pv.sum(n.childNodes, function(n) { return n.size; }) - : that.$size.apply(that, (stack[0] = n, stack)); - }); - stack.shift(); - - /* Sort. */ - switch (s.order) { - case "ascending": { - root.sort(function(a, b) { return a.size - b.size; }); - break; - } - case "descending": { - root.sort(function(a, b) { return b.size - a.size; }); - break; - } - case "reverse": root.reverse(); break; - } - - /* Recursively compute the layout. */ - root.x = 0; - root.y = 0; - root.dx = s.width; - root.dy = s.height; - root.visitBefore(layout); -}; diff --git a/lib/protovis/src/mark/Anchor.js b/lib/protovis/src/mark/Anchor.js deleted file mode 100644 index 1dbf74d2..00000000 --- a/lib/protovis/src/mark/Anchor.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Constructs a new mark anchor with default properties. - * - * @class Represents an anchor on a given mark. An anchor is itself a mark, but - * without a visual representation. It serves only to provide useful default - * properties that can be inherited by other marks. Each type of mark can define - * any number of named anchors for convenience. If the concrete mark type does - * not define an anchor implementation specifically, one will be inherited from - * the mark's parent class. - * - *

For example, the bar mark provides anchors for its four sides: left, - * right, top and bottom. Adding a label to the top anchor of a bar, - * - *

bar.anchor("top").add(pv.Label);
- * - * will render a text label on the top edge of the bar; the top anchor defines - * the appropriate position properties (top and left), as well as text-rendering - * properties for convenience (textAlign and textBaseline). - * - *

Note that anchors do not inherit from their targets; the positional - * properties are copied from the scene graph, which guarantees that the anchors - * are positioned correctly, even if the positional properties are not defined - * deterministically. (In addition, it also improves performance by avoiding - * re-evaluating expensive properties.) If you want the anchor to inherit from - * the target, use {@link pv.Mark#extend} before adding. For example: - * - *

bar.anchor("top").extend(bar).add(pv.Label);
- * - * The anchor defines it's own positional properties, but other properties (such - * as the title property, say) can be inherited using the above idiom. Also note - * that you can override positional properties in the anchor for custom - * behavior. - * - * @extends pv.Mark - * @param {pv.Mark} target the anchor target. - */ -pv.Anchor = function(target) { - pv.Mark.call(this); - this.target = target; - this.parent = target.parent; -}; - -pv.Anchor.prototype = pv.extend(pv.Mark) - .property("name", String); - -/** - * The anchor name. The set of supported anchor names is dependent on the - * concrete mark type; see the mark type for details. For example, bars support - * left, right, top and bottom anchors. - * - *

While anchor names are typically constants, the anchor name is a true - * property, which means you can specify a function to compute the anchor name - * dynamically. For instance, if you wanted to alternate top and bottom anchors, - * saying - * - *

m.anchor(function() (this.index % 2) ? "top" : "bottom").add(pv.Dot);
- * - * would have the desired effect. - * - * @type string - * @name pv.Anchor.prototype.name - */ - -/** - * Sets the prototype of this anchor to the specified mark. Any properties not - * defined on this mark may be inherited from the specified prototype mark, or - * its prototype, and so on. The prototype mark need not be the same type of - * mark as this mark. (Note that for inheritance to be useful, properties with - * the same name on different mark types should have equivalent meaning.) - * - *

This method differs slightly from the normal mark behavior in that the - * anchor's target is preserved. - * - * @param {pv.Mark} proto the new prototype. - * @returns {pv.Anchor} this anchor. - * @see pv.Mark#add - */ -pv.Anchor.prototype.extend = function(proto) { - this.proto = proto; - return this; -}; diff --git a/lib/protovis/src/mark/Area.js b/lib/protovis/src/mark/Area.js deleted file mode 100644 index 0a91a93f..00000000 --- a/lib/protovis/src/mark/Area.js +++ /dev/null @@ -1,267 +0,0 @@ -/** - * Constructs a new area mark with default properties. Areas are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents an area mark: the solid area between two series of - * connected line segments. Unsurprisingly, areas are used most frequently for - * area charts. - * - *

Just as a line represents a polyline, the Area mark type - * represents a polygon. However, an area is not an arbitrary polygon; - * vertices are paired either horizontally or vertically into parallel - * spans, and each span corresponds to an associated datum. Either the - * width or the height must be specified, but not both; this determines whether - * the area is horizontally-oriented or vertically-oriented. Like lines, areas - * can be stroked and filled with arbitrary colors. - * - *

See also the Area guide. - * - * @extends pv.Mark - */ -pv.Area = function() { - pv.Mark.call(this); -}; - -pv.Area.prototype = pv.extend(pv.Mark) - .property("width", Number) - .property("height", Number) - .property("lineWidth", Number) - .property("strokeStyle", pv.color) - .property("fillStyle", pv.color) - .property("segmented", Boolean) - .property("interpolate", String) - .property("tension", Number); - -pv.Area.prototype.type = "area"; - -/** - * The width of a given span, in pixels; used for horizontal spans. If the width - * is specified, the height property should be 0 (the default). Either the top - * or bottom property should be used to space the spans vertically, typically as - * a multiple of the index. - * - * @type number - * @name pv.Area.prototype.width - */ - -/** - * The height of a given span, in pixels; used for vertical spans. If the height - * is specified, the width property should be 0 (the default). Either the left - * or right property should be used to space the spans horizontally, typically - * as a multiple of the index. - * - * @type number - * @name pv.Area.prototype.height - */ - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the perimeter of the area. Unlike the - * {@link Line} mark type, the entire perimeter is stroked, rather than just one - * edge. The default value of this property is 1.5, but since the default stroke - * style is null, area marks are not stroked by default. - * - *

This property is fixed for non-segmented areas. See - * {@link pv.Mark}. - * - * @type number - * @name pv.Area.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the perimeter of the area. Unlike the {@link Line} mark type, the - * entire perimeter is stroked, rather than just one edge. The default value of - * this property is null, meaning areas are not stroked by default. - * - *

This property is fixed for non-segmented areas. See - * {@link pv.Mark}. - * - * @type string - * @name pv.Area.prototype.strokeStyle - * @see pv.color - */ - -/** - * The area fill style; if non-null, the interior of the polygon forming the - * area is filled with the specified color. The default value of this property - * is a categorical color. - * - *

This property is fixed for non-segmented areas. See - * {@link pv.Mark}. - * - * @type string - * @name pv.Area.prototype.fillStyle - * @see pv.color - */ - -/** - * Whether the area is segmented; whether variations in fill style, stroke - * style, and the other properties are treated as fixed. Rendering segmented - * areas is noticeably slower than non-segmented areas. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type boolean - * @name pv.Area.prototype.segmented - */ - -/** - * How to interpolate between values. Linear interpolation ("linear") is the - * default, producing a straight line between points. For piecewise constant - * functions (i.e., step functions), either "step-before" or "step-after" can be - * specified. To draw open uniform b-splines, specify "basis". To draw cardinal - * splines, specify "cardinal"; see also {@link #tension}. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type string - * @name pv.Area.prototype.interpolate - */ - -/** - * The tension of cardinal splines; used in conjunction with - * interpolate("cardinal"). A value between 0 and 1 draws cardinal splines with - * the given tension. In some sense, the tension can be interpreted as the - * "length" of the tangent; a tension of 1 will yield all zero tangents (i.e., - * linear interpolation), and a tension of 0 yields a Catmull-Rom spline. The - * default value is 0.7. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type number - * @name pv.Area.prototype.tension - */ - -/** - * Default properties for areas. By default, there is no stroke and the fill - * style is a categorical color. - * - * @type pv.Area - */ -pv.Area.prototype.defaults = new pv.Area() - .extend(pv.Mark.prototype.defaults) - .lineWidth(1.5) - .fillStyle(pv.Colors.category20().by(pv.parent)) - .interpolate("linear") - .tension(.7); - -/** @private Sets width and height to zero if null. */ -pv.Area.prototype.buildImplied = function(s) { - if (s.height == null) s.height = 0; - if (s.width == null) s.width = 0; - pv.Mark.prototype.buildImplied.call(this, s); -}; - -/** @private Records which properties may be fixed. */ -pv.Area.fixed = { - lineWidth: 1, - lineJoin: 1, - strokeStyle: 1, - fillStyle: 1, - segmented: 1, - interpolate: 1, - tension: 1 -}; - -/** - * @private Make segmented required, such that this fixed property is always - * evaluated, even if the first segment is not visible. Also cache which - * properties are normally fixed. - */ -pv.Area.prototype.bind = function() { - pv.Mark.prototype.bind.call(this); - var binds = this.binds, - required = binds.required, - optional = binds.optional; - for (var i = 0, n = optional.length; i < n; i++) { - var p = optional[i]; - p.fixed = p.name in pv.Area.fixed; - if (p.name == "segmented") { - required.push(p); - optional.splice(i, 1); - i--; - n--; - } - } - - /* Cache the original arrays so they can be restored on build. */ - this.binds.$required = required; - this.binds.$optional = optional; -}; - -/** - * @private Override the default build behavior such that fixed properties are - * determined dynamically, based on the value of the (always) fixed segmented - * property. Any fixed properties are only evaluated on the first instance, - * although their values are propagated to subsequent instances, so that they - * are available for property chaining and the like. - */ -pv.Area.prototype.buildInstance = function(s) { - var binds = this.binds; - - /* Handle fixed properties on secondary instances. */ - if (this.index) { - var fixed = binds.fixed; - - /* Determine which properties are fixed. */ - if (!fixed) { - fixed = binds.fixed = []; - function f(p) { return !p.fixed || (fixed.push(p), false); } - binds.required = binds.required.filter(f); - if (!this.scene[0].segmented) binds.optional = binds.optional.filter(f); - } - - /* Copy fixed property values from the first instance. */ - for (var i = 0, n = fixed.length; i < n; i++) { - var p = fixed[i].name; - s[p] = this.scene[0][p]; - } - } - - /* Evaluate all properties on the first instance. */ - else { - binds.required = binds.$required; - binds.optional = binds.$optional; - binds.fixed = null; - } - - pv.Mark.prototype.buildInstance.call(this, s); -}; - -/** - * Constructs a new area anchor with default properties. Areas support five - * different anchors:

    - * - *
  • top - *
  • left - *
  • center - *
  • bottom - *
  • right - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline). Text - * is rendered to appear inside the area. The area anchor also propagates the - * interpolate, eccentricity, and tension properties such that an anchored area - * or line will match positions between control points. - * - *

For consistency with the other mark types, the anchor positions are - * defined in terms of their opposite edge. For example, the top anchor defines - * the bottom property, such that an area added to the top anchor grows upward. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} - */ -pv.Area.prototype.anchor = function(name) { - return pv.Mark.prototype.anchor.call(this, name) - .interpolate(function() { - return this.scene.target[this.index].interpolate; - }) - .eccentricity(function() { - return this.scene.target[this.index].eccentricity; - }) - .tension(function() { - return this.scene.target[this.index].tension; - }); -}; diff --git a/lib/protovis/src/mark/Bar.js b/lib/protovis/src/mark/Bar.js deleted file mode 100644 index b1b7e1fa..00000000 --- a/lib/protovis/src/mark/Bar.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Constructs a new bar mark with default properties. Bars are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a bar: an axis-aligned rectangle that can be stroked and - * filled. Bars are used for many chart types, including bar charts, histograms - * and Gantt charts. Bars can also be used as decorations, for example to draw a - * frame border around a panel; in fact, a panel is a special type (a subclass) - * of bar. - * - *

Bars can be positioned in several ways. Most commonly, one of the four - * corners is fixed using two margins, and then the width and height properties - * determine the extent of the bar relative to this fixed location. For example, - * using the bottom and left properties fixes the bottom-left corner; the width - * then extends to the right, while the height extends to the top. As an - * alternative to the four corners, a bar can be positioned exclusively using - * margins; this is convenient as an inset from the containing panel, for - * example. See {@link pv.Mark} for details on the prioritization of redundant - * positioning properties. - * - *

See also the Bar guide. - * - * @extends pv.Mark - */ -pv.Bar = function() { - pv.Mark.call(this); -}; - -pv.Bar.prototype = pv.extend(pv.Mark) - .property("width", Number) - .property("height", Number) - .property("lineWidth", Number) - .property("strokeStyle", pv.color) - .property("fillStyle", pv.color); - -pv.Bar.prototype.type = "bar"; - -/** - * The width of the bar, in pixels. If the left position is specified, the bar - * extends rightward from the left edge; if the right position is specified, the - * bar extends leftward from the right edge. - * - * @type number - * @name pv.Bar.prototype.width - */ - -/** - * The height of the bar, in pixels. If the bottom position is specified, the - * bar extends upward from the bottom edge; if the top position is specified, - * the bar extends downward from the top edge. - * - * @type number - * @name pv.Bar.prototype.height - */ - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the bar's border. - * - * @type number - * @name pv.Bar.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the bar's border. The default value of this property is null, meaning - * bars are not stroked by default. - * - * @type string - * @name pv.Bar.prototype.strokeStyle - * @see pv.color - */ - -/** - * The bar fill style; if non-null, the interior of the bar is filled with the - * specified color. The default value of this property is a categorical color. - * - * @type string - * @name pv.Bar.prototype.fillStyle - * @see pv.color - */ - -/** - * Default properties for bars. By default, there is no stroke and the fill - * style is a categorical color. - * - * @type pv.Bar - */ -pv.Bar.prototype.defaults = new pv.Bar() - .extend(pv.Mark.prototype.defaults) - .lineWidth(1.5) - .fillStyle(pv.Colors.category20().by(pv.parent)); diff --git a/lib/protovis/src/mark/Dot.js b/lib/protovis/src/mark/Dot.js deleted file mode 100644 index cdd5a43d..00000000 --- a/lib/protovis/src/mark/Dot.js +++ /dev/null @@ -1,202 +0,0 @@ -/** - * Constructs a new dot mark with default properties. Dots are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a dot; a dot is simply a sized glyph centered at a given - * point that can also be stroked and filled. The size property is - * proportional to the area of the rendered glyph to encourage meaningful visual - * encodings. Dots can visually encode up to eight dimensions of data, though - * this may be unwise due to integrality. See {@link pv.Mark} for details on the - * prioritization of redundant positioning properties. - * - *

See also the Dot guide. - * - * @extends pv.Mark - */ -pv.Dot = function() { - pv.Mark.call(this); -}; - -pv.Dot.prototype = pv.extend(pv.Mark) - .property("size", Number) - .property("radius", Number) - .property("shape", String) - .property("angle", Number) - .property("lineWidth", Number) - .property("strokeStyle", pv.color) - .property("fillStyle", pv.color); - -pv.Dot.prototype.type = "dot"; - -/** - * The size of the dot, in square pixels. Square pixels are used such that the - * area of the dot is linearly proportional to the value of the size property, - * facilitating representative encodings. - * - * @see #radius - * @type number - * @name pv.Dot.prototype.size - */ - -/** - * The radius of the dot, in pixels. This is an alternative to using - * {@link #size}. - * - * @see #size - * @type number - * @name pv.Dot.prototype.radius - */ - -/** - * The shape name. Several shapes are supported:

    - * - *
  • cross - *
  • triangle - *
  • diamond - *
  • square - *
  • circle - *
  • tick - *
  • bar - * - *
These shapes can be further changed using the {@link #angle} property; - * for instance, a cross can be turned into a plus by rotating. Similarly, the - * tick, which is vertical by default, can be rotated horizontally. Note that - * some shapes (cross and tick) do not have interior areas, and thus do not - * support fill style meaningfully. - * - *

Note: it may be more natural to use the {@link pv.Rule} mark for - * horizontal and vertical ticks. The tick shape is only necessary if angled - * ticks are needed. - * - * @type string - * @name pv.Dot.prototype.shape - */ - -/** - * The rotation angle, in radians. Used to rotate shapes, such as to turn a - * cross into a plus. - * - * @type number - * @name pv.Dot.prototype.angle - */ - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the dot's shape. - * - * @type number - * @name pv.Dot.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the dot's shape. The default value of this property is a categorical - * color. - * - * @type string - * @name pv.Dot.prototype.strokeStyle - * @see pv.color - */ - -/** - * The fill style; if non-null, the interior of the dot is filled with the - * specified color. The default value of this property is null, meaning dots are - * not filled by default. - * - * @type string - * @name pv.Dot.prototype.fillStyle - * @see pv.color - */ - -/** - * Default properties for dots. By default, there is no fill and the stroke - * style is a categorical color. The default shape is "circle" with size 20. - * - * @type pv.Dot - */ -pv.Dot.prototype.defaults = new pv.Dot() - .extend(pv.Mark.prototype.defaults) - .size(20) - .shape("circle") - .lineWidth(1.5) - .strokeStyle(pv.Colors.category10().by(pv.parent)); - -/** - * Constructs a new dot anchor with default properties. Dots support five - * different anchors:

    - * - *
  • top - *
  • left - *
  • center - *
  • bottom - *
  • right - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline). Text is - * rendered to appear outside the dot. Note that this behavior is different from - * other mark anchors, which default to rendering text inside the mark. - * - *

For consistency with the other mark types, the anchor positions are - * defined in terms of their opposite edge. For example, the top anchor defines - * the bottom property, such that a bar added to the top anchor grows upward. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} - */ -pv.Dot.prototype.anchor = function(name) { - return pv.Mark.prototype.anchor.call(this, name) - .left(function() { - var s = this.scene.target[this.index]; - switch (this.name()) { - case "bottom": - case "top": - case "center": return s.left; - case "left": return null; - } - return s.left + s.radius; - }) - .right(function() { - var s = this.scene.target[this.index]; - return this.name() == "left" ? s.right + s.radius : null; - }) - .top(function() { - var s = this.scene.target[this.index]; - switch (this.name()) { - case "left": - case "right": - case "center": return s.top; - case "top": return null; - } - return s.top + s.radius; - }) - .bottom(function() { - var s = this.scene.target[this.index]; - return this.name() == "top" ? s.bottom + s.radius : null; - }) - .textAlign(function() { - switch (this.name()) { - case "left": return "right"; - case "bottom": - case "top": - case "center": return "center"; - } - return "left"; - }) - .textBaseline(function() { - switch (this.name()) { - case "right": - case "left": - case "center": return "middle"; - case "bottom": return "top"; - } - return "bottom"; - }); -}; - -/** @private Sets radius based on size or vice versa. */ -pv.Dot.prototype.buildImplied = function(s) { - if (s.radius == null) s.radius = Math.sqrt(s.size); - else if (s.size == null) s.size = s.radius * s.radius; - pv.Mark.prototype.buildImplied.call(this, s); -}; diff --git a/lib/protovis/src/mark/Image.js b/lib/protovis/src/mark/Image.js deleted file mode 100644 index 130b8b93..00000000 --- a/lib/protovis/src/mark/Image.js +++ /dev/null @@ -1,154 +0,0 @@ -/** - * Constructs a new image with default properties. Images are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents an image, either a static resource or a dynamically- - * generated pixel buffer. Images share the same layout and style properties as - * bars. The external image resource is specified via the {@link #url} - * property. The optional fill, if specified, appears beneath the image, while - * the optional stroke appears above the image. - * - *

Dynamic images such as heatmaps are supported using the {@link #image} - * psuedo-property. This function is passed the x and y index, in - * addition to the current data stack. The return value is a {@link pv.Color}, - * or null for transparent. A string can also be returned, which will be parsed - * into a color; however, it is typically much faster to return an object with - * r, g, b and a attributes, to avoid the - * cost of parsing and object instantiation. - * - *

See {@link pv.Bar} for details on positioning properties. - * - * @extends pv.Bar - */ -pv.Image = function() { - pv.Bar.call(this); -}; - -pv.Image.prototype = pv.extend(pv.Bar) - .property("url", String) - .property("imageWidth", Number) - .property("imageHeight", Number); - -pv.Image.prototype.type = "image"; - -/** - * The URL of the image to display. The set of supported image types is - * browser-dependent; PNG and JPEG are recommended. - * - * @type string - * @name pv.Image.prototype.url - */ - -/** - * The width of the image in pixels. For static images, this property is - * computed implicitly from the loaded image resources. For dynamic images, this - * property can be used to specify the width of the pixel buffer; otherwise, the - * value is derived from the width property. - * - * @type number - * @name pv.Image.prototype.imageWidth - */ - -/** - * The height of the image in pixels. For static images, this property is - * computed implicitly from the loaded image resources. For dynamic images, this - * property can be used to specify the height of the pixel buffer; otherwise, the - * value is derived from the height property. - * - * @type number - * @name pv.Image.prototype.imageHeight - */ - -/** - * Default properties for images. By default, there is no stroke or fill style. - * - * @type pv.Image - */ -pv.Image.prototype.defaults = new pv.Image() - .extend(pv.Bar.prototype.defaults) - .fillStyle(null); - -/** - * Specifies the dynamic image function. By default, no image function is - * specified and the url property is used to load a static image - * resource. If an image function is specified, it will be invoked for each - * pixel in the image, based on the related imageWidth and - * imageHeight properties. - * - *

For example, given a two-dimensional array heatmap, containing - * numbers in the range [0, 1] in row-major order, a simple monochrome heatmap - * image can be specified as: - * - *

vis.add(pv.Image)
- *     .imageWidth(heatmap[0].length)
- *     .imageHeight(heatmap.length)
- *     .image(pv.ramp("white", "black").by(function(x, y) heatmap[y][x]));
- * - * For fastest performance, use an ordinal scale which caches the fixed color - * palette, or return an object literal with r, g, b - * and a attributes. A {@link pv.Color} or string can also be returned, - * though this typically results in slower performance. - * - * @param {function} f the new sizing function. - * @returns {pv.Layout.Pack} this. - */ -pv.Image.prototype.image = function(f) { - /** @private */ - this.$image = function() { - var c = f.apply(this, arguments); - return c == null ? pv.Color.transparent - : typeof c == "string" ? pv.color(c) - : c; - }; - return this; -}; - -/** @private Scan the proto chain for an image function. */ -pv.Image.prototype.bind = function() { - pv.Bar.prototype.bind.call(this); - var binds = this.binds, mark = this; - do { - binds.image = mark.$image; - } while (!binds.image && (mark = mark.proto)); -}; - -/** @private */ -pv.Image.prototype.buildImplied = function(s) { - pv.Bar.prototype.buildImplied.call(this, s); - if (!s.visible) return; - - /* Compute the implied image dimensions. */ - if (s.imageWidth == null) s.imageWidth = s.width; - if (s.imageHeight == null) s.imageHeight = s.height; - - /* Compute the pixel values. */ - if ((s.url == null) && this.binds.image) { - - /* Cache the canvas element to reuse across renders. */ - var canvas = this.$canvas || (this.$canvas = document.createElement("canvas")), - context = canvas.getContext("2d"), - w = s.imageWidth, - h = s.imageHeight, - stack = pv.Mark.stack, - data; - - /* Evaluate the image function, storing into a CanvasPixelArray. */ - canvas.width = w; - canvas.height = h; - data = (s.image = context.createImageData(w, h)).data; - stack.unshift(null, null); - for (var y = 0, p = 0; y < h; y++) { - stack[1] = y; - for (var x = 0; x < w; x++) { - stack[0] = x; - var color = this.binds.image.apply(this, stack); - data[p++] = color.r; - data[p++] = color.g; - data[p++] = color.b; - data[p++] = 255 * color.a; - } - } - stack.splice(0, 2); - } -}; diff --git a/lib/protovis/src/mark/Label.js b/lib/protovis/src/mark/Label.js deleted file mode 100644 index 56c18510..00000000 --- a/lib/protovis/src/mark/Label.js +++ /dev/null @@ -1,155 +0,0 @@ -/** - * Constructs a new label mark with default properties. Labels are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a text label, allowing textual annotation of other marks or - * arbitrary text within the visualization. The character data must be plain - * text (unicode), though the text can be styled using the {@link #font} - * property. If rich text is needed, external HTML elements can be overlaid on - * the canvas by hand. - * - *

Labels are positioned using the box model, similarly to {@link Dot}. Thus, - * a label has no width or height, but merely a text anchor location. The text - * is positioned relative to this anchor location based on the - * {@link #textAlign}, {@link #textBaseline} and {@link #textMargin} properties. - * Furthermore, the text may be rotated using {@link #textAngle}. - * - *

Labels ignore events, so as to not interfere with event handlers on - * underlying marks, such as bars. In the future, we may support event handlers - * on labels. - * - *

See also the Label guide. - * - * @extends pv.Mark - */ -pv.Label = function() { - pv.Mark.call(this); -}; - -pv.Label.prototype = pv.extend(pv.Mark) - .property("text", String) - .property("font", String) - .property("textAngle", Number) - .property("textStyle", pv.color) - .property("textAlign", String) - .property("textBaseline", String) - .property("textMargin", Number) - .property("textDecoration", String) - .property("textShadow", String); - -pv.Label.prototype.type = "label"; - -/** - * The character data to render; a string. The default value of the text - * property is the identity function, meaning the label's associated datum will - * be rendered using its toString. - * - * @type string - * @name pv.Label.prototype.text - */ - -/** - * The font format, per the CSS Level 2 specification. The default font is "10px - * sans-serif", for consistency with the HTML 5 canvas element specification. - * Note that since text is not wrapped, any line-height property will be - * ignored. The other font-style, font-variant, font-weight, font-size and - * font-family properties are supported. - * - * @see CSS2 fonts - * @type string - * @name pv.Label.prototype.font - */ - -/** - * The rotation angle, in radians. Text is rotated clockwise relative to the - * anchor location. For example, with the default left alignment, an angle of - * Math.PI / 2 causes text to proceed downwards. The default angle is zero. - * - * @type number - * @name pv.Label.prototype.textAngle - */ - -/** - * The text color. The name "textStyle" is used for consistency with "fillStyle" - * and "strokeStyle", although it might be better to rename this property (and - * perhaps use the same name as "strokeStyle"). The default color is black. - * - * @type string - * @name pv.Label.prototype.textStyle - * @see pv.color - */ - -/** - * The horizontal text alignment. One of:

    - * - *
  • left - *
  • center - *
  • right - * - *
The default horizontal alignment is left. - * - * @type string - * @name pv.Label.prototype.textAlign - */ - -/** - * The vertical text alignment. One of:
    - * - *
  • top - *
  • middle - *
  • bottom - * - *
The default vertical alignment is bottom. - * - * @type string - * @name pv.Label.prototype.textBaseline - */ - -/** - * The text margin; may be specified in pixels, or in font-dependent units (such - * as ".1ex"). The margin can be used to pad text away from its anchor location, - * in a direction dependent on the horizontal and vertical alignment - * properties. For example, if the text is left- and middle-aligned, the margin - * shifts the text to the right. The default margin is 3 pixels. - * - * @type number - * @name pv.Label.prototype.textMargin - */ - -/** - * A list of shadow effects to be applied to text, per the CSS Text Level 3 - * text-shadow property. An example specification is "0.1em 0.1em 0.1em - * rgba(0,0,0,.5)"; the first length is the horizontal offset, the second the - * vertical offset, and the third the blur radius. - * - * @see CSS3 text - * @type string - * @name pv.Label.prototype.textShadow - */ - -/** - * A list of decoration to be applied to text, per the CSS Text Level 3 - * text-decoration property. An example specification is "underline". - * - * @see CSS3 text - * @type string - * @name pv.Label.prototype.textDecoration - */ - -/** - * Default properties for labels. See the individual properties for the default - * values. - * - * @type pv.Label - */ -pv.Label.prototype.defaults = new pv.Label() - .extend(pv.Mark.prototype.defaults) - .events("none") - .text(pv.identity) - .font("10px sans-serif") - .textAngle(0) - .textStyle("black") - .textAlign("left") - .textBaseline("bottom") - .textMargin(3); diff --git a/lib/protovis/src/mark/Line.js b/lib/protovis/src/mark/Line.js deleted file mode 100644 index 1b265669..00000000 --- a/lib/protovis/src/mark/Line.js +++ /dev/null @@ -1,195 +0,0 @@ -/** - * Constructs a new line mark with default properties. Lines are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a series of connected line segments, or polyline, - * that can be stroked with a configurable color and thickness. Each - * articulation point in the line corresponds to a datum; for n points, - * n-1 connected line segments are drawn. The point is positioned using - * the box model. Arbitrary paths are also possible, allowing radar plots and - * other custom visualizations. - * - *

Like areas, lines can be stroked and filled with arbitrary colors. In most - * cases, lines are only stroked, but the fill style can be used to construct - * arbitrary polygons. - * - *

See also the Line guide. - * - * @extends pv.Mark - */ -pv.Line = function() { - pv.Mark.call(this); -}; - -pv.Line.prototype = pv.extend(pv.Mark) - .property("lineWidth", Number) - .property("lineJoin", String) - .property("strokeStyle", pv.color) - .property("fillStyle", pv.color) - .property("segmented", Boolean) - .property("interpolate", String) - .property("eccentricity", Number) - .property("tension", Number); - -pv.Line.prototype.type = "line"; - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the line. - * - * @type number - * @name pv.Line.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the line. The default value of this property is a categorical color. - * - * @type string - * @name pv.Line.prototype.strokeStyle - * @see pv.color - */ - -/** - * The type of corners where two lines meet. Accepted values are "bevel", - * "round" and "miter". The default value is "miter". - * - *

For segmented lines, only "miter" joins and "linear" interpolation are - * currently supported. Any other value, including null, will disable joins, - * producing disjoint line segments. Note that the miter joins must be computed - * manually (at least in the current SVG renderer); since this calculation may - * be expensive and unnecessary for small lines, specifying null can improve - * performance significantly. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type string - * @name pv.Line.prototype.lineJoin - */ - -/** - * The line fill style; if non-null, the interior of the line is closed and - * filled with the specified color. The default value of this property is a - * null, meaning that lines are not filled by default. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type string - * @name pv.Line.prototype.fillStyle - * @see pv.color - */ - -/** - * Whether the line is segmented; whether variations in stroke style, line width - * and the other properties are treated as fixed. Rendering segmented lines is - * noticeably slower than non-segmented lines. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type boolean - * @name pv.Line.prototype.segmented - */ - -/** - * How to interpolate between values. Linear interpolation ("linear") is the - * default, producing a straight line between points. For piecewise constant - * functions (i.e., step functions), either "step-before" or "step-after" can be - * specified. To draw a clockwise circular arc between points, specify "polar"; - * to draw a counterclockwise circular arc between points, specify - * "polar-reverse". To draw open uniform b-splines, specify "basis". To draw - * cardinal splines, specify "cardinal"; see also {@link #tension}. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type string - * @name pv.Line.prototype.interpolate - */ - -/** - * The eccentricity of polar line segments; used in conjunction with - * interpolate("polar"). The default value of 0 means that line segments are - * drawn as circular arcs. A value of 1 draws a straight line. A value between 0 - * and 1 draws an elliptical arc with the given eccentricity. - * - * @type number - * @name pv.Line.prototype.eccentricity - */ - -/** - * The tension of cardinal splines; used in conjunction with - * interpolate("cardinal"). A value between 0 and 1 draws cardinal splines with - * the given tension. In some sense, the tension can be interpreted as the - * "length" of the tangent; a tension of 1 will yield all zero tangents (i.e., - * linear interpolation), and a tension of 0 yields a Catmull-Rom spline. The - * default value is 0.7. - * - *

This property is fixed. See {@link pv.Mark}. - * - * @type number - * @name pv.Line.prototype.tension - */ - -/** - * Default properties for lines. By default, there is no fill and the stroke - * style is a categorical color. The default interpolation is linear. - * - * @type pv.Line - */ -pv.Line.prototype.defaults = new pv.Line() - .extend(pv.Mark.prototype.defaults) - .lineJoin("miter") - .lineWidth(1.5) - .strokeStyle(pv.Colors.category10().by(pv.parent)) - .interpolate("linear") - .eccentricity(0) - .tension(.7); - -/** @private Reuse Area's implementation for segmented bind & build. */ -pv.Line.prototype.bind = pv.Area.prototype.bind; -pv.Line.prototype.buildInstance = pv.Area.prototype.buildInstance; - -/** - * Constructs a new line anchor with default properties. Lines support five - * different anchors:

    - * - *
  • top - *
  • left - *
  • center - *
  • bottom - *
  • right - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline). Text is - * rendered to appear outside the line. Note that this behavior is different - * from other mark anchors, which default to rendering text inside the - * mark. - * - *

For consistency with the other mark types, the anchor positions are - * defined in terms of their opposite edge. For example, the top anchor defines - * the bottom property, such that a bar added to the top anchor grows upward. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} - */ -pv.Line.prototype.anchor = function(name) { - return pv.Area.prototype.anchor.call(this, name) - .textAlign(function(d) { - switch (this.name()) { - case "left": return "right"; - case "bottom": - case "top": - case "center": return "center"; - case "right": return "left"; - } - }) - .textBaseline(function(d) { - switch (this.name()) { - case "right": - case "left": - case "center": return "middle"; - case "top": return "bottom"; - case "bottom": return "top"; - } - }); -}; diff --git a/lib/protovis/src/mark/Mark.js b/lib/protovis/src/mark/Mark.js deleted file mode 100644 index ee022062..00000000 --- a/lib/protovis/src/mark/Mark.js +++ /dev/null @@ -1,1216 +0,0 @@ -/** - * Constructs a new mark with default properties. Marks, with the exception of - * the root panel, are not typically constructed directly; instead, they are - * added to a panel or an existing mark via {@link pv.Mark#add}. - * - * @class Represents a data-driven graphical mark. The Mark class is - * the base class for all graphical marks in Protovis; it does not provide any - * specific rendering functionality, but together with {@link Panel} establishes - * the core framework. - * - *

Concrete mark types include familiar visual elements such as bars, lines - * and labels. Although a bar mark may be used to construct a bar chart, marks - * know nothing about charts; it is only through their specification and - * composition that charts are produced. These building blocks permit many - * combinatorial possibilities. - * - *

Marks are associated with data: a mark is generated once per - * associated datum, mapping the datum to visual properties such as - * position and color. Thus, a single mark specification represents a set of - * visual elements that share the same data and visual encoding. The type of - * mark defines the names of properties and their meaning. A property may be - * static, ignoring the associated datum and returning a constant; or, it may be - * dynamic, derived from the associated datum or index. Such dynamic encodings - * can be specified succinctly using anonymous functions. Special properties - * called event handlers can be registered to add interactivity. - * - *

Protovis uses inheritance to simplify the specification of related - * marks: a new mark can be derived from an existing mark, inheriting its - * properties. The new mark can then override properties to specify new - * behavior, potentially in terms of the old behavior. In this way, the old mark - * serves as the prototype for the new mark. Most mark types share the - * same basic properties for consistency and to facilitate inheritance. - * - *

The prioritization of redundant properties is as follows:

    - * - *
  1. If the width property is not specified (i.e., null), its value - * is the width of the parent panel, minus this mark's left and right margins; - * the left and right margins are zero if not specified. - * - *
  2. Otherwise, if the right margin is not specified, its value is - * the width of the parent panel, minus this mark's width and left margin; the - * left margin is zero if not specified. - * - *
  3. Otherwise, if the left property is not specified, its value is - * the width of the parent panel, minus this mark's width and the right margin. - * - *
This prioritization is then duplicated for the height, - * bottom and top properties, respectively. - * - *

While most properties are variable, some mark types, such as lines - * and areas, generate a single visual element rather than a distinct visual - * element per datum. With these marks, some properties may be fixed. - * Fixed properties can vary per mark, but not per datum! These - * properties are evaluated solely for the first (0-index) datum, and typically - * are specified as a constant. However, it is valid to use a function if the - * property varies between panels or is dynamically generated. - * - *

See also the Protovis guide. - */ -pv.Mark = function() { - /* - * TYPE 0 constant defs - * TYPE 1 function defs - * TYPE 2 constant properties - * TYPE 3 function properties - * in order of evaluation! - */ - this.$properties = []; - this.$handlers = {}; -}; - -/** @private Records which properties are defined on this mark type. */ -pv.Mark.prototype.properties = {}; - -/** @private Records the cast function for each property. */ -pv.Mark.cast = {}; - -/** - * @private Defines and registers a property method for the property with the - * given name. This method should be called on a mark class prototype to define - * each exposed property. (Note this refers to the JavaScript - * prototype, not the Protovis mark prototype, which is the {@link - * #proto} field.) - * - *

The created property method supports several modes of invocation:

    - * - *
  1. If invoked with a Function argument, this function is evaluated - * for each associated datum. The return value of the function is used as the - * computed property value. The context of the function (this) is this - * mark. The arguments to the function are the associated data of this mark and - * any enclosing panels. For example, a linear encoding of numerical data to - * height is specified as - * - *
    m.height(function(d) d * 100);
    - * - * The expression d * 100 will be evaluated for the height property of - * each mark instance. The return value of the property method (e.g., - * m.height) is this mark (m)).

    - * - *

  2. If invoked with a non-function argument, the property is treated as a - * constant. The return value of the property method (e.g., m.height) - * is this mark.

    - * - *

  3. If invoked with no arguments, the computed property value for the current - * mark instance in the scene graph is returned. This facilitates property - * chaining, where one mark's properties are defined in terms of another's. - * For example, to offset a mark's location from its prototype, you might say - * - *
    m.top(function() this.proto.top() + 10);
    - * - * Note that the index of the mark being evaluated (in the above example, - * this.proto) is inherited from the Mark class and set by - * this mark. So, if the fifth element's top property is being evaluated, the - * fifth instance of this.proto will similarly be queried for the value - * of its top property. If the mark being evaluated has a different number of - * instances, or its data is unrelated, the behavior of this method is - * undefined. In these cases it may be better to index the scene - * explicitly to specify the exact instance. - * - *

Property names should follow standard JavaScript method naming - * conventions, using lowerCamel-style capitalization. - * - *

In addition to creating the property method, every property is registered - * in the {@link #properties} map on the prototype. Although this is an - * instance field, it is considered immutable and shared by all instances of a - * given mark type. The properties map can be queried to see if a mark - * type defines a particular property, such as width or height. - * - * @param {string} name the property name. - * @param {function} [cast] the cast function for this property. - */ -pv.Mark.prototype.property = function(name, cast) { - if (!this.hasOwnProperty("properties")) { - this.properties = pv.extend(this.properties); - } - this.properties[name] = true; - - /* - * Define the setter-getter globally, since the default behavior should be the - * same for all properties, and since the Protovis inheritance chain is - * independent of the JavaScript inheritance chain. For example, anchors - * define a "name" property that is evaluated on derived marks, even though - * those marks don't normally have a name. - */ - pv.Mark.prototype.propertyMethod(name, false, pv.Mark.cast[name] = cast); - return this; -}; - -/** - * @private Defines a setter-getter for the specified property. - * - *

If a cast function has been assigned to the specified property name, the - * property function is wrapped by the cast function, or, if a constant is - * specified, the constant is immediately cast. Note, however, that if the - * property value is null, the cast function is not invoked. - * - * @param {string} name the property name. - * @param {boolean} [def] whether is a property or a def. - * @param {function} [cast] the cast function for this property. - */ -pv.Mark.prototype.propertyMethod = function(name, def, cast) { - if (!cast) cast = pv.Mark.cast[name]; - this[name] = function(v) { - - /* If this is a def, use it rather than property. */ - if (def && this.scene) { - var defs = this.scene.defs; - if (arguments.length) { - defs[name] = { - id: (v == null) ? 0 : pv.id(), - value: ((v != null) && cast) ? cast(v) : v - }; - return this; - } - return defs[name] ? defs[name].value : null; - } - - /* If arguments are specified, set the property value. */ - if (arguments.length) { - var type = !def << 1 | (typeof v == "function"); - this.propertyValue(name, (type & 1 && cast) ? function() { - var x = v.apply(this, arguments); - return (x != null) ? cast(x) : null; - } : (((v != null) && cast) ? cast(v) : v)).type = type; - return this; - } - - return this.instance()[name]; - }; -}; - -/** @private Sets the value of the property name to v. */ -pv.Mark.prototype.propertyValue = function(name, v) { - var properties = this.$properties, p = {name: name, id: pv.id(), value: v}; - for (var i = 0; i < properties.length; i++) { - if (properties[i].name == name) { - properties.splice(i, 1); - break; - } - } - properties.push(p); - return p; -}; - -/* Define all global properties. */ -pv.Mark.prototype - .property("data") - .property("visible", Boolean) - .property("left", Number) - .property("right", Number) - .property("top", Number) - .property("bottom", Number) - .property("cursor", String) - .property("title", String) - .property("reverse", Boolean) - .property("antialias", Boolean) - .property("events", String); - -/** - * The mark type; a lower camelCase name. The type name controls rendering - * behavior, and unless the rendering engine is extended, must be one of the - * built-in concrete mark types: area, bar, dot, image, label, line, panel, - * rule, or wedge. - * - * @type string - * @name pv.Mark.prototype.type - */ - -/** - * The mark prototype, possibly undefined, from which to inherit property - * functions. The mark prototype is not necessarily of the same type as this - * mark. Any properties defined on this mark will override properties inherited - * either from the prototype or from the type-specific defaults. - * - * @type pv.Mark - * @name pv.Mark.prototype.proto - */ - -/** - * The mark anchor target, possibly undefined. - * - * @type pv.Mark - * @name pv.Mark.prototype.target - */ - -/** - * The enclosing parent panel. The parent panel is generally undefined only for - * the root panel; however, it is possible to create "offscreen" marks that are - * used only for inheritance purposes. - * - * @type pv.Panel - * @name pv.Mark.prototype.parent - */ - -/** - * The child index. -1 if the enclosing parent panel is null; otherwise, the - * zero-based index of this mark into the parent panel's children array. - * - * @type number - */ -pv.Mark.prototype.childIndex = -1; - -/** - * The mark index. The value of this field depends on which instance (i.e., - * which element of the data array) is currently being evaluated. During the - * build phase, the index is incremented over each datum; when handling events, - * the index is set to the instance that triggered the event. - * - * @type number - */ -pv.Mark.prototype.index = -1; - -/** - * The current scale factor, based on any enclosing transforms. The current - * scale can be used to create scale-independent graphics. For example, to - * define a dot that has a radius of 10 irrespective of any zooming, say: - * - *

dot.radius(function() 10 / this.scale)
- * - * Note that the stroke width and font size are defined irrespective of scale - * (i.e., in screen space) already. Also note that when a transform is applied - * to a panel, the scale affects only the child marks, not the panel itself. - * - * @type number - * @see pv.Panel#transform - */ -pv.Mark.prototype.scale = 1; - -/** - * @private The scene graph. The scene graph is an array of objects; each object - * (or "node") corresponds to an instance of this mark and an element in the - * data array. The scene graph can be traversed to lookup previously-evaluated - * properties. - * - * @name pv.Mark.prototype.scene - */ - -/** - * The root parent panel. This may be undefined for "offscreen" marks that are - * created for inheritance purposes only. - * - * @type pv.Panel - * @name pv.Mark.prototype.root - */ - -/** - * The data property; an array of objects. The size of the array determines the - * number of marks that will be instantiated; each element in the array will be - * passed to property functions to compute the property values. Typically, the - * data property is specified as a constant array, such as - * - *
m.data([1, 2, 3, 4, 5]);
- * - * However, it is perfectly acceptable to define the data property as a - * function. This function might compute the data dynamically, allowing - * different data to be used per enclosing panel. For instance, in the stacked - * area graph example (see {@link #scene}), the data function on the area mark - * dereferences each series. - * - * @type array - * @name pv.Mark.prototype.data - */ - -/** - * The visible property; a boolean determining whether or not the mark instance - * is visible. If a mark instance is not visible, its other properties will not - * be evaluated. Similarly, for panels no child marks will be rendered. - * - * @type boolean - * @name pv.Mark.prototype.visible - */ - -/** - * The left margin; the distance, in pixels, between the left edge of the - * enclosing panel and the left edge of this mark. Note that in some cases this - * property may be redundant with the right property, or with the conjunction of - * right and width. - * - * @type number - * @name pv.Mark.prototype.left - */ - -/** - * The right margin; the distance, in pixels, between the right edge of the - * enclosing panel and the right edge of this mark. Note that in some cases this - * property may be redundant with the left property, or with the conjunction of - * left and width. - * - * @type number - * @name pv.Mark.prototype.right - */ - -/** - * The top margin; the distance, in pixels, between the top edge of the - * enclosing panel and the top edge of this mark. Note that in some cases this - * property may be redundant with the bottom property, or with the conjunction - * of bottom and height. - * - * @type number - * @name pv.Mark.prototype.top - */ - -/** - * The bottom margin; the distance, in pixels, between the bottom edge of the - * enclosing panel and the bottom edge of this mark. Note that in some cases - * this property may be redundant with the top property, or with the conjunction - * of top and height. - * - * @type number - * @name pv.Mark.prototype.bottom - */ - -/** - * The cursor property; corresponds to the CSS cursor property. This is - * typically used in conjunction with event handlers to indicate interactivity. - * - * @type string - * @name pv.Mark.prototype.cursor - * @see CSS2 cursor - */ - -/** - * The title property; corresponds to the HTML/SVG title property, allowing the - * general of simple plain text tooltips. - * - * @type string - * @name pv.Mark.prototype.title - */ - -/** - * The events property; corresponds to the SVG pointer-events property, - * specifying how the mark should participate in mouse events. The default value - * is "painted". Supported values are: - * - *

"painted": The given mark may receive events when the mouse is over a - * "painted" area. The painted areas are the interior (i.e., fill) of the mark - * if a 'fillStyle' is specified, and the perimeter (i.e., stroke) of the mark - * if a 'strokeStyle' is specified. - * - *

"all": The given mark may receive events when the mouse is over either the - * interior (i.e., fill) or the perimeter (i.e., stroke) of the mark, regardless - * of the specified fillStyle and strokeStyle. - * - *

"none": The given mark may not receive events. - * - * @type string - * @name pv.Mark.prototype.events - */ - -/** - * The reverse property; a boolean determining whether marks are ordered from - * front-to-back or back-to-front. SVG does not support explicit z-ordering; - * shapes are rendered in the order they appear. Thus, by default, marks are - * rendered in data order. Setting the reverse property to false reverses the - * order in which they are rendered; however, the properties are still evaluated - * (i.e., built) in forward order. - * - * @type boolean - * @name pv.Mark.prototype.reverse - */ - -/** - * Default properties for all mark types. By default, the data array is the - * parent data as a single-element array; if the data property is not specified, - * this causes each mark to be instantiated as a singleton with the parents - * datum. The visible property is true by default, and the reverse property is - * false. - * - * @type pv.Mark - */ -pv.Mark.prototype.defaults = new pv.Mark() - .data(function(d) { return [d]; }) - .visible(true) - .antialias(true) - .events("painted"); - -/** - * Sets the prototype of this mark to the specified mark. Any properties not - * defined on this mark may be inherited from the specified prototype mark, or - * its prototype, and so on. The prototype mark need not be the same type of - * mark as this mark. (Note that for inheritance to be useful, properties with - * the same name on different mark types should have equivalent meaning.) - * - * @param {pv.Mark} proto the new prototype. - * @returns {pv.Mark} this mark. - * @see #add - */ -pv.Mark.prototype.extend = function(proto) { - this.proto = proto; - this.target = proto.target; - return this; -}; - -/** - * Adds a new mark of the specified type to the enclosing parent panel, whilst - * simultaneously setting the prototype of the new mark to be this mark. - * - * @param {function} type the type of mark to add; a constructor, such as - * pv.Bar. - * @returns {pv.Mark} the new mark. - * @see #extend - */ -pv.Mark.prototype.add = function(type) { - return this.parent.add(type).extend(this); -}; - -/** - * Defines a custom property on this mark. Custom properties are currently - * fixed, in that they are initialized once per mark set (i.e., per parent panel - * instance). Custom properties can be used to store local state for the mark, - * such as data needed by other properties (e.g., a custom scale) or interaction - * state. - * - *

WARNING We plan on changing this feature in a future release to define - * standard properties, as opposed to fixed properties that behave - * idiosyncratically within event handlers. Furthermore, we recommend storing - * state in an external data structure, rather than tying it to the - * visualization specification as with defs. - * - * @param {string} name the name of the local variable. - * @param {function} [v] an optional initializer; may be a constant or a - * function. - */ -pv.Mark.prototype.def = function(name, v) { - this.propertyMethod(name, true); - return this[name](arguments.length > 1 ? v : null); -}; - -/** - * Returns an anchor with the specified name. All marks support the five - * standard anchor names:

    - * - *
  • top - *
  • left - *
  • center - *
  • bottom - *
  • right - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline). Text is - * rendered to appear inside the mark by default. - * - *

To facilitate stacking, anchors are defined in terms of their opposite - * edge. For example, the top anchor defines the bottom property, such that the - * mark extends upwards; the bottom anchor instead defines the top property, - * such that the mark extends downwards. See also {@link pv.Layout.Stack}. - * - *

While anchor names are typically constants, the anchor name is a true - * property, which means you can specify a function to compute the anchor name - * dynamically. See the {@link pv.Anchor#name} property for details. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} the new anchor. - */ -pv.Mark.prototype.anchor = function(name) { - if (!name) name = "center"; // default anchor name - return new pv.Anchor(this) - .name(name) - .data(function() { - return this.scene.target.map(function(s) { return s.data; }); - }) - .visible(function() { - return this.scene.target[this.index].visible; - }) - .left(function() { - var s = this.scene.target[this.index], w = s.width || 0; - switch (this.name()) { - case "bottom": - case "top": - case "center": return s.left + w / 2; - case "left": return null; - } - return s.left + w; - }) - .top(function() { - var s = this.scene.target[this.index], h = s.height || 0; - switch (this.name()) { - case "left": - case "right": - case "center": return s.top + h / 2; - case "top": return null; - } - return s.top + h; - }) - .right(function() { - var s = this.scene.target[this.index]; - return this.name() == "left" ? s.right + (s.width || 0) : null; - }) - .bottom(function() { - var s = this.scene.target[this.index]; - return this.name() == "top" ? s.bottom + (s.height || 0) : null; - }) - .textAlign(function() { - switch (this.name()) { - case "bottom": - case "top": - case "center": return "center"; - case "right": return "right"; - } - return "left"; - }) - .textBaseline(function() { - switch (this.name()) { - case "right": - case "left": - case "center": return "middle"; - case "top": return "top"; - } - return "bottom"; - }); -}; - -/** @deprecated Replaced by {@link #target}. */ -pv.Mark.prototype.anchorTarget = function() { - return this.target; -}; - -/** - * Alias for setting the left, right, top and bottom properties simultaneously. - * - * @see #left - * @see #right - * @see #top - * @see #bottom - * @returns {pv.Mark} this. - */ -pv.Mark.prototype.margin = function(n) { - return this.left(n).right(n).top(n).bottom(n); -}; - -/** - * @private Returns the current instance of this mark in the scene graph. This - * is typically equivalent to this.scene[this.index], however if the - * scene or index is unset, the default instance of the mark is returned. If no - * default is set, the default is the last instance. Similarly, if the scene or - * index of the parent panel is unset, the default instance of this mark in the - * last instance of the enclosing panel is returned, and so on. - * - * @returns a node in the scene graph. - */ -pv.Mark.prototype.instance = function(defaultIndex) { - var scene = this.scene || this.parent.instance(-1).children[this.childIndex], - index = !arguments.length || this.hasOwnProperty("index") ? this.index : defaultIndex; - return scene[index < 0 ? scene.length - 1 : index]; -}; - -/** - * @private Find the instances of this mark that match source. - * - * @see pv.Anchor - */ -pv.Mark.prototype.instances = function(source) { - var mark = this, index = [], scene; - - /* Mirrored descent. */ - while (!(scene = mark.scene)) { - source = source.parent; - index.push({index: source.index, childIndex: mark.childIndex}); - mark = mark.parent; - } - while (index.length) { - var i = index.pop(); - scene = scene[i.index].children[i.childIndex]; - } - - /* - * When the anchor target is also an ancestor, as in the case of adding - * to a panel anchor, only generate one instance per panel. Also, set - * the margins to zero, since they are offset by the enclosing panel. - */ - if (this.hasOwnProperty("index")) { - var s = pv.extend(scene[this.index]); - s.right = s.top = s.left = s.bottom = 0; - return [s]; - } - return scene; -}; - -/** - * @private Returns the first instance of this mark in the scene graph. This - * method can only be called when the mark is bound to the scene graph (for - * example, from an event handler, or within a property function). - * - * @returns a node in the scene graph. - */ -pv.Mark.prototype.first = function() { - return this.scene[0]; -}; - -/** - * @private Returns the last instance of this mark in the scene graph. This - * method can only be called when the mark is bound to the scene graph (for - * example, from an event handler, or within a property function). In addition, - * note that mark instances are built sequentially, so the last instance of this - * mark may not yet be constructed. - * - * @returns a node in the scene graph. - */ -pv.Mark.prototype.last = function() { - return this.scene[this.scene.length - 1]; -}; - -/** - * @private Returns the previous instance of this mark in the scene graph, or - * null if this is the first instance. - * - * @returns a node in the scene graph, or null. - */ -pv.Mark.prototype.sibling = function() { - return (this.index == 0) ? null : this.scene[this.index - 1]; -}; - -/** - * @private Returns the current instance in the scene graph of this mark, in the - * previous instance of the enclosing parent panel. May return null if this - * instance could not be found. - * - * @returns a node in the scene graph, or null. - */ -pv.Mark.prototype.cousin = function() { - var p = this.parent, s = p && p.sibling(); - return (s && s.children) ? s.children[this.childIndex][this.index] : null; -}; - -/** - * Renders this mark, including recursively rendering all child marks if this is - * a panel. This method finds all instances of this mark and renders them. This - * method descends recursively to the level of the mark to be rendered, finding - * all visible instances of the mark. After the marks are rendered, the scene - * and index attributes are removed from the mark to restore them to a clean - * state. - * - *

If an enclosing panel has an index property set (as is the case inside in - * an event handler), then only instances of this mark inside the given instance - * of the panel will be rendered; otherwise, all visible instances of the mark - * will be rendered. - */ -pv.Mark.prototype.render = function() { - var parent = this.parent, - stack = pv.Mark.stack; - - /* For the first render, take it from the top. */ - if (parent && !this.root.scene) { - this.root.render(); - return; - } - - /* Record the path to this mark. */ - var indexes = []; - for (var mark = this; mark.parent; mark = mark.parent) { - indexes.unshift(mark.childIndex); - } - - /** @private */ - function render(mark, depth, scale) { - mark.scale = scale; - if (depth < indexes.length) { - stack.unshift(null); - if (mark.hasOwnProperty("index")) { - renderInstance(mark, depth, scale); - } else { - for (var i = 0, n = mark.scene.length; i < n; i++) { - mark.index = i; - renderInstance(mark, depth, scale); - } - delete mark.index; - } - stack.shift(); - } else { - mark.build(); - - /* - * In the update phase, the scene is rendered by creating and updating - * elements and attributes in the SVG image. No properties are evaluated - * during the update phase; instead the values computed previously in the - * build phase are simply translated into SVG. The update phase is - * decoupled (see pv.Scene) to allow different rendering engines. - */ - pv.Scene.scale = scale; - pv.Scene.updateAll(mark.scene); - } - delete mark.scale; - } - - /** - * @private Recursively renders the current instance of the specified mark. - * This is slightly tricky because `index` and `scene` properties may or may - * not already be set; if they are set, it means we are rendering only a - * specific instance; if they are unset, we are rendering all instances. - * Furthermore, we must preserve the original context of these properties when - * rendering completes. - * - *

Another tricky aspect is that the `scene` attribute should be set for - * any preceding children, so as to allow property chaining. This is - * consistent with first-pass rendering. - */ - function renderInstance(mark, depth, scale) { - var s = mark.scene[mark.index], i; - if (s.visible) { - var childIndex = indexes[depth], - child = mark.children[childIndex]; - - /* Set preceding child scenes. */ - for (i = 0; i < childIndex; i++) { - mark.children[i].scene = s.children[i]; - } - - /* Set current child scene, if necessary. */ - stack[0] = s.data; - if (child.scene) { - render(child, depth + 1, scale * s.transform.k); - } else { - child.scene = s.children[childIndex]; - render(child, depth + 1, scale * s.transform.k); - delete child.scene; - } - - /* Clear preceding child scenes. */ - for (i = 0; i < childIndex; i++) { - delete mark.children[i].scene; - } - } - } - - /* Bind this mark's property definitions. */ - this.bind(); - - /* The render context is the first ancestor with an explicit index. */ - while (parent && !parent.hasOwnProperty("index")) parent = parent.parent; - - /* Recursively render all instances of this mark. */ - this.context( - parent ? parent.scene : undefined, - parent ? parent.index : -1, - function() { render(this.root, 0, 1); }); -}; - -/** @private Stores the current data stack. */ -pv.Mark.stack = []; - -/** - * @private In the bind phase, inherited property definitions are cached so they - * do not need to be queried during build. - */ -pv.Mark.prototype.bind = function() { - var seen = {}, types = [[], [], [], []], data, visible; - - /** Scans the proto chain for the specified mark. */ - function bind(mark) { - do { - var properties = mark.$properties; - for (var i = properties.length - 1; i >= 0 ; i--) { - var p = properties[i]; - if (!(p.name in seen)) { - seen[p.name] = p; - switch (p.name) { - case "data": data = p; break; - case "visible": visible = p; break; - default: types[p.type].push(p); break; - } - } - } - } while (mark = mark.proto); - } - - /* Scan the proto chain for all defined properties. */ - bind(this); - bind(this.defaults); - types[1].reverse(); - types[3].reverse(); - - /* Any undefined properties are null. */ - var mark = this; - do for (var name in mark.properties) { - if (!(name in seen)) { - types[2].push(seen[name] = {name: name, type: 2, value: null}); - } - } while (mark = mark.proto); - - /* Define setter-getter for inherited defs. */ - var defs = types[0].concat(types[1]); - for (var i = 0; i < defs.length; i++) { - this.propertyMethod(defs[i].name, true); - } - - /* Setup binds to evaluate constants before functions. */ - this.binds = { - properties: seen, - data: data, - defs: defs, - required: [visible], - optional: pv.blend(types) - }; -}; - -/** - * @private Evaluates properties and computes implied properties. Properties are - * stored in the {@link #scene} array for each instance of this mark. - * - *

As marks are built recursively, the {@link #index} property is updated to - * match the current index into the data array for each mark. Note that the - * index property is only set for the mark currently being built and its - * enclosing parent panels. The index property for other marks is unset, but is - * inherited from the global Mark class prototype. This allows mark - * properties to refer to properties on other marks in the same panel - * conveniently; however, in general it is better to reference mark instances - * specifically through the scene graph rather than depending on the magical - * behavior of {@link #index}. - * - *

The root scene array has a special property, data, which stores - * the current data stack. The first element in this stack is the current datum, - * followed by the datum of the enclosing parent panel, and so on. The data - * stack should not be accessed directly; instead, property functions are passed - * the current data stack as arguments. - * - *

The evaluation of the data and visible properties is - * special. The data property is evaluated first; unlike the other - * properties, the data stack is from the parent panel, rather than the current - * mark, since the data is not defined until the data property is evaluated. - * The visisble property is subsequently evaluated for each instance; - * only if true will the {@link #buildInstance} method be called, evaluating - * other properties and recursively building the scene graph. - * - *

If this mark is being re-built, any old instances of this mark that no - * longer exist (because the new data array contains fewer elements) will be - * cleared using {@link #clearInstance}. - * - * @param parent the instance of the parent panel from the scene graph. - */ -pv.Mark.prototype.build = function() { - var scene = this.scene, stack = pv.Mark.stack; - if (!scene) { - scene = this.scene = []; - scene.mark = this; - scene.type = this.type; - scene.childIndex = this.childIndex; - if (this.parent) { - scene.parent = this.parent.scene; - scene.parentIndex = this.parent.index; - } - } - - /* Resolve anchor target. */ - if (this.target) scene.target = this.target.instances(scene); - - /* Evaluate defs. */ - if (this.binds.defs.length) { - var defs = scene.defs; - if (!defs) scene.defs = defs = {}; - for (var i = 0; i < this.binds.defs.length; i++) { - var p = this.binds.defs[i], d = defs[p.name]; - if (!d || (p.id > d.id)) { - defs[p.name] = { - id: 0, // this def will be re-evaluated on next build - value: (p.type & 1) ? p.value.apply(this, stack) : p.value - }; - } - } - } - - /* Evaluate special data property. */ - var data = this.binds.data; - data = data.type & 1 ? data.value.apply(this, stack) : data.value; - - /* Create, update and delete scene nodes. */ - stack.unshift(null); - scene.length = data.length; - for (var i = 0; i < data.length; i++) { - pv.Mark.prototype.index = this.index = i; - var s = scene[i]; - if (!s) scene[i] = s = {}; - s.data = stack[0] = data[i]; - this.buildInstance(s); - } - pv.Mark.prototype.index = -1; - delete this.index; - stack.shift(); - - return this; -}; - -/** - * @private Evaluates the specified array of properties for the specified - * instance s in the scene graph. - * - * @param s a node in the scene graph; the instance of the mark to build. - * @param properties an array of properties. - */ -pv.Mark.prototype.buildProperties = function(s, properties) { - for (var i = 0, n = properties.length; i < n; i++) { - var p = properties[i], v = p.value; // assume case 2 (constant) - switch (p.type) { - case 0: - case 1: v = this.scene.defs[p.name].value; break; - case 3: v = v.apply(this, pv.Mark.stack); break; - } - s[p.name] = v; - } -}; - -/** - * @private Evaluates all of the properties for this mark for the specified - * instance s in the scene graph. The set of properties to evaluate is - * retrieved from the {@link #properties} array for this mark type (see {@link - * #type}). After these properties are evaluated, any implied properties - * may be computed by the mark and set on the scene graph; see - * {@link #buildImplied}. - * - *

For panels, this method recursively builds the scene graph for all child - * marks as well. In general, this method should not need to be overridden by - * concrete mark types. - * - * @param s a node in the scene graph; the instance of the mark to build. - */ -pv.Mark.prototype.buildInstance = function(s) { - this.buildProperties(s, this.binds.required); - if (s.visible) { - this.buildProperties(s, this.binds.optional); - this.buildImplied(s); - } -}; - -/** - * @private Computes the implied properties for this mark for the specified - * instance s in the scene graph. Implied properties are those with - * dependencies on multiple other properties; for example, the width property - * may be implied if the left and right properties are set. This method can be - * overridden by concrete mark types to define new implied properties, if - * necessary. - * - * @param s a node in the scene graph; the instance of the mark to build. - */ -pv.Mark.prototype.buildImplied = function(s) { - var l = s.left; - var r = s.right; - var t = s.top; - var b = s.bottom; - - /* Assume width and height are zero if not supported by this mark type. */ - var p = this.properties; - var w = p.width ? s.width : 0; - var h = p.height ? s.height : 0; - - /* Compute implied width, right and left. */ - var width = this.parent ? this.parent.width() : (w + l + r); - if (w == null) { - w = width - (r = r || 0) - (l = l || 0); - } else if (r == null) { - if (l == null) { - l = r = (width - w) / 2; - } else { - r = width - w - (l = l || 0); - } - } else if (l == null) { - l = width - w - r; - } - - /* Compute implied height, bottom and top. */ - var height = this.parent ? this.parent.height() : (h + t + b); - if (h == null) { - h = height - (t = t || 0) - (b = b || 0); - } else if (b == null) { - if (t == null) { - b = t = (height - h) / 2; - } else { - b = height - h - (t = t || 0); - } - } else if (t == null) { - t = height - h - b; - } - - s.left = l; - s.right = r; - s.top = t; - s.bottom = b; - - /* Only set width and height if they are supported by this mark type. */ - if (p.width) s.width = w; - if (p.height) s.height = h; - - /* Set any null colors to pv.Color.transparent. */ - if (p.textStyle && !s.textStyle) s.textStyle = pv.Color.transparent; - if (p.fillStyle && !s.fillStyle) s.fillStyle = pv.Color.transparent; - if (p.strokeStyle && !s.strokeStyle) s.strokeStyle = pv.Color.transparent; -}; - -/** - * Returns the current location of the mouse (cursor) relative to this mark's - * parent. The x coordinate corresponds to the left margin, while the - * y coordinate corresponds to the top margin. - * - * @returns {pv.Vector} the mouse location. - */ -pv.Mark.prototype.mouse = function() { - - /* Compute xy-coordinates relative to the panel. */ - var x = pv.event.pageX || 0, - y = pv.event.pageY || 0, - n = this.root.canvas(); - do { - x -= n.offsetLeft; - y -= n.offsetTop; - } while (n = n.offsetParent); - - /* Compute the inverse transform of all enclosing panels. */ - var t = pv.Transform.identity, - p = this.properties.transform ? this : this.parent, - pz = []; - do { pz.push(p); } while (p = p.parent); - while (p = pz.pop()) t = t.translate(p.left(), p.top()).times(p.transform()); - t = t.invert(); - - return pv.vector(x * t.k + t.x, y * t.k + t.y); -}; - -/** - * Registers an event handler for the specified event type with this mark. When - * an event of the specified type is triggered, the specified handler will be - * invoked. The handler is invoked in a similar method to property functions: - * the context is this mark instance, and the arguments are the full - * data stack. Event handlers can use property methods to manipulate the display - * properties of the mark: - * - *

m.event("click", function() this.fillStyle("red"));
- * - * Alternatively, the external data can be manipulated and the visualization - * redrawn: - * - *
m.event("click", function(d) {
- *     data = all.filter(function(k) k.name == d);
- *     vis.render();
- *   });
- * - * The return value of the event handler determines which mark gets re-rendered. - * Use defs ({@link #def}) to set temporary state from event handlers. - * - *

The complete set of event types is defined by SVG; see the reference - * below. The set of supported event types is:

    - * - *
  • click - *
  • mousedown - *
  • mouseup - *
  • mouseover - *
  • mousemove - *
  • mouseout - * - *
Since Protovis does not specify any concept of focus, it does not - * support key events; these should be handled outside the visualization using - * standard JavaScript. In the future, support for interaction may be extended - * to support additional event types, particularly those most relevant to - * interactive visualization, such as selection. - * - *

TODO In the current implementation, event handlers are not inherited from - * prototype marks. They must be defined explicitly on each interactive mark. In - * addition, only one event handler for a given event type can be defined; when - * specifying multiple event handlers for the same type, only the last one will - * be used. - * - * @see SVG events - * @param {string} type the event type. - * @param {function} handler the event handler. - * @returns {pv.Mark} this. - */ -pv.Mark.prototype.event = function(type, handler) { - this.$handlers[type] = pv.functor(handler); - return this; -}; - -/** @private Evaluates the function f with the specified context. */ -pv.Mark.prototype.context = function(scene, index, f) { - var proto = pv.Mark.prototype, - stack = pv.Mark.stack, - oscene = pv.Mark.scene, - oindex = proto.index; - - /** @private Sets the context. */ - function apply(scene, index) { - pv.Mark.scene = scene; - proto.index = index; - if (!scene) return; - - var that = scene.mark, - mark = that, - ancestors = []; - - /* Set ancestors' scene and index; populate data stack. */ - do { - ancestors.push(mark); - stack.push(scene[index].data); - mark.index = index; - mark.scene = scene; - index = scene.parentIndex; - scene = scene.parent; - } while (mark = mark.parent); - - /* Set ancestors' scale; requires top-down. */ - for (var i = ancestors.length - 1, k = 1; i > 0; i--) { - mark = ancestors[i]; - mark.scale = k; - k *= mark.scene[mark.index].transform.k; - } - - /* Set children's scene and scale. */ - if (that.children) for (var i = 0, n = that.children.length; i < n; i++) { - mark = that.children[i]; - mark.scene = that.scene[that.index].children[i]; - mark.scale = k; - } - } - - /** @private Clears the context. */ - function clear(scene, index) { - if (!scene) return; - var that = scene.mark, - mark; - - /* Reset children. */ - if (that.children) for (var i = 0, n = that.children.length; i < n; i++) { - mark = that.children[i]; - delete mark.scene; - delete mark.scale; - } - - /* Reset ancestors. */ - mark = that; - do { - stack.pop(); - if (mark.parent) { - delete mark.scene; - delete mark.scale; - } - delete mark.index; - } while (mark = mark.parent); - } - - /* Context switch, invoke the function, then switch back. */ - clear(oscene, oindex); - apply(scene, index); - try { - f.apply(this, stack); - } finally { - clear(scene, index); - apply(oscene, oindex); - } -}; - -/** @private Execute the event listener, then re-render. */ -pv.Mark.dispatch = function(type, scene, index) { - var m = scene.mark, p = scene.parent, l = m.$handlers[type]; - if (!l) return p && pv.Mark.dispatch(type, p, scene.parentIndex); - m.context(scene, index, function() { - m = l.apply(m, pv.Mark.stack); - if (m && m.render) m.render(); - }); - return true; -}; diff --git a/lib/protovis/src/mark/Panel.js b/lib/protovis/src/mark/Panel.js deleted file mode 100644 index d0408832..00000000 --- a/lib/protovis/src/mark/Panel.js +++ /dev/null @@ -1,273 +0,0 @@ -/** - * Constructs a new, empty panel with default properties. Panels, with the - * exception of the root panel, are not typically constructed directly; instead, - * they are added to an existing panel or mark via {@link pv.Mark#add}. - * - * @class Represents a container mark. Panels allow repeated or nested - * structures, commonly used in small multiple displays where a small - * visualization is tiled to facilitate comparison across one or more - * dimensions. Other types of visualizations may benefit from repeated and - * possibly overlapping structure as well, such as stacked area charts. Panels - * can also offset the position of marks to provide padding from surrounding - * content. - * - *

All Protovis displays have at least one panel; this is the root panel to - * which marks are rendered. The box model properties (four margins, width and - * height) are used to offset the positions of contained marks. The data - * property determines the panel count: a panel is generated once per associated - * datum. When nested panels are used, property functions can declare additional - * arguments to access the data associated with enclosing panels. - * - *

Panels can be rendered inline, facilitating the creation of sparklines. - * This allows designers to reuse browser layout features, such as text flow and - * tables; designers can also overlay HTML elements such as rich text and - * images. - * - *

All panels have a children array (possibly empty) containing the - * child marks in the order they were added. Panels also have a root - * field which points to the root (outermost) panel; the root panel's root field - * points to itself. - * - *

See also the Protovis guide. - * - * @extends pv.Bar - */ -pv.Panel = function() { - pv.Bar.call(this); - - /** - * The child marks; zero or more {@link pv.Mark}s in the order they were - * added. - * - * @see #add - * @type pv.Mark[] - */ - this.children = []; - this.root = this; - - /** - * The internal $dom field is set by the Protovis loader; see lang/init.js. It - * refers to the script element that contains the Protovis specification, so - * that the panel knows where in the DOM to insert the generated SVG element. - * - * @private - */ - this.$dom = pv.$ && pv.$.s; -}; - -pv.Panel.prototype = pv.extend(pv.Bar) - .property("transform") - .property("overflow", String) - .property("canvas", function(c) { - return (typeof c == "string") - ? document.getElementById(c) - : c; // assume that c is the passed-in element - }); - -pv.Panel.prototype.type = "panel"; - -/** - * The canvas element; either the string ID of the canvas element in the current - * document, or a reference to the canvas element itself. If null, a canvas - * element will be created and inserted into the document at the location of the - * script element containing the current Protovis specification. This property - * only applies to root panels and is ignored on nested panels. - * - *

Note: the "canvas" element here refers to a div (or other suitable - * HTML container element), not a canvas element. The name of - * this property is a historical anachronism from the first implementation that - * used HTML 5 canvas, rather than SVG. - * - * @type string - * @name pv.Panel.prototype.canvas - */ - -/** - * Specifies whether child marks are clipped when they overflow this panel. - * This affects the clipping of all this panel's descendant marks. - * - * @type string - * @name pv.Panel.prototype.overflow - * @see CSS2 - */ - -/** - * The transform to be applied to child marks. The default transform is - * identity, which has no effect. Note that the panel's own fill and stroke are - * not affected by the transform, and panel's transform only affects the - * scale of child marks, not the panel itself. - * - * @type pv.Transform - * @name pv.Panel.prototype.transform - * @see pv.Mark#scale - */ - -/** - * Default properties for panels. By default, the margins are zero, the fill - * style is transparent. - * - * @type pv.Panel - */ -pv.Panel.prototype.defaults = new pv.Panel() - .extend(pv.Bar.prototype.defaults) - .fillStyle(null) // override Bar default - .overflow("visible"); - -/** - * Returns an anchor with the specified name. This method is overridden such - * that adding to a panel's anchor adds to the panel, rather than to the panel's - * parent. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} the new anchor. - */ -pv.Panel.prototype.anchor = function(name) { - var anchor = pv.Bar.prototype.anchor.call(this, name); - anchor.parent = this; - return anchor; -}; - -/** - * Adds a new mark of the specified type to this panel. Unlike the normal - * {@link Mark#add} behavior, adding a mark to a panel does not cause the mark - * to inherit from the panel. Since the contained marks are offset by the panel - * margins already, inheriting properties is generally undesirable; of course, - * it is always possible to change this behavior by calling {@link Mark#extend} - * explicitly. - * - * @param {function} type the type of the new mark to add. - * @returns {pv.Mark} the new mark. - */ -pv.Panel.prototype.add = function(type) { - var child = new type(); - child.parent = this; - child.root = this.root; - child.childIndex = this.children.length; - this.children.push(child); - return child; -}; - -/** @private Bind this panel, then any child marks recursively. */ -pv.Panel.prototype.bind = function() { - pv.Mark.prototype.bind.call(this); - for (var i = 0; i < this.children.length; i++) { - this.children[i].bind(); - } -}; - -/** - * @private Evaluates all of the properties for this panel for the specified - * instance s in the scene graph, including recursively building the - * scene graph for child marks. - * - * @param s a node in the scene graph; the instance of the panel to build. - * @see Mark#scene - */ -pv.Panel.prototype.buildInstance = function(s) { - pv.Bar.prototype.buildInstance.call(this, s); - if (!s.visible) return; - if (!s.children) s.children = []; - - /* - * Multiply the current scale factor by this panel's transform. Also clear the - * default index as we recurse into child marks; it will be reset to the - * current index when the next panel instance is built. - */ - var scale = this.scale * s.transform.k, child, n = this.children.length; - pv.Mark.prototype.index = -1; - - /* - * Build each child, passing in the parent (this panel) scene graph node. The - * child mark's scene is initialized from the corresponding entry in the - * existing scene graph, such that properties from the previous build can be - * reused; this is largely to facilitate the recycling of SVG elements. - */ - for (var i = 0; i < n; i++) { - child = this.children[i]; - child.scene = s.children[i]; // possibly undefined - child.scale = scale; - child.build(); - } - - /* - * Once the child marks have been built, the new scene graph nodes are removed - * from the child marks and placed into the scene graph. The nodes cannot - * remain on the child nodes because this panel (or a parent panel) may be - * instantiated multiple times! - */ - for (var i = 0; i < n; i++) { - child = this.children[i]; - s.children[i] = child.scene; - delete child.scene; - delete child.scale; - } - - /* Delete any expired child scenes. */ - s.children.length = n; -}; - -/** - * @private Computes the implied properties for this panel for the specified - * instance s in the scene graph. Panels have two implied - * properties:

    - * - *
  • The canvas property references the DOM element, typically a DIV, - * that contains the SVG element that is used to display the visualization. This - * property may be specified as a string, referring to the unique ID of the - * element in the DOM. The string is converted to a reference to the DOM - * element. The width and height of the SVG element is inferred from this DOM - * element. If no canvas property is specified, a new SVG element is created and - * inserted into the document, using the panel dimensions; see - * {@link #createCanvas}. - * - *
  • The children array, while not a property per se, contains the - * scene graph for each child mark. This array is initialized to be empty, and - * is populated above in {@link #buildInstance}. - * - *
The current implementation creates the SVG element, if necessary, during - * the build phase; in the future, it may be preferrable to move this to the - * update phase, although then the canvas property would be undefined. In - * addition, DOM inspection is necessary to define the implied width and height - * properties that may be inferred from the DOM. - * - * @param s a node in the scene graph; the instance of the panel to build. - */ -pv.Panel.prototype.buildImplied = function(s) { - if (!this.parent) { - var c = s.canvas; - if (c) { - /* Clear the container if it's not associated with this panel. */ - if (c.$panel != this) { - c.$panel = this; - while (c.lastChild) c.removeChild(c.lastChild); - } - - /* If width and height weren't specified, inspect the container. */ - var w, h; - if (s.width == null) { - w = parseFloat(pv.css(c, "width")); - s.width = w - s.left - s.right; - } - if (s.height == null) { - h = parseFloat(pv.css(c, "height")); - s.height = h - s.top - s.bottom; - } - } else { - var cache = this.$canvas || (this.$canvas = []); - if (!(c = cache[this.index])) { - c = cache[this.index] = document.createElement("span"); - if (this.$dom) { // script element for text/javascript+protovis - this.$dom.parentNode.insertBefore(c, this.$dom); - } else { // find the last element in the body - var n = document.body; - while (n.lastChild && n.lastChild.tagName) n = n.lastChild; - if (n != document.body) n = n.parentNode; - n.appendChild(c); - } - } - } - s.canvas = c; - } - if (!s.transform) s.transform = pv.Transform.identity; - pv.Mark.prototype.buildImplied.call(this, s); -}; diff --git a/lib/protovis/src/mark/Rule.js b/lib/protovis/src/mark/Rule.js deleted file mode 100644 index b7c622fd..00000000 --- a/lib/protovis/src/mark/Rule.js +++ /dev/null @@ -1,143 +0,0 @@ -/** - * Constructs a new rule with default properties. Rules are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a horizontal or vertical rule. Rules are frequently used - * for axes and grid lines. For example, specifying only the bottom property - * draws horizontal rules, while specifying only the left draws vertical - * rules. Rules can also be used as thin bars. The visual style is controlled in - * the same manner as lines. - * - *

Rules are positioned exclusively the standard box model properties. The - * following combinations of properties are supported: - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
PropertiesOrientation
leftvertical
rightvertical
left, bottom, topvertical
right, bottom, topvertical
tophorizontal
bottomhorizontal
top, left, righthorizontal
bottom, left, righthorizontal
left, top, heightvertical
left, bottom, heightvertical
right, top, heightvertical
right, bottom, heightvertical
left, top, widthhorizontal
left, bottom, widthhorizontal
right, top, widthhorizontal
right, bottom, widthhorizontal
- * - *

Small rules can be used as tick marks; alternatively, a {@link Dot} with - * the "tick" shape can be used. - * - *

See also the Rule guide. - * - * @see pv.Line - * @extends pv.Mark - */ -pv.Rule = function() { - pv.Mark.call(this); -}; - -pv.Rule.prototype = pv.extend(pv.Mark) - .property("width", Number) - .property("height", Number) - .property("lineWidth", Number) - .property("strokeStyle", pv.color); - -pv.Rule.prototype.type = "rule"; - -/** - * The width of the rule, in pixels. If the left position is specified, the rule - * extends rightward from the left edge; if the right position is specified, the - * rule extends leftward from the right edge. - * - * @type number - * @name pv.Rule.prototype.width - */ - -/** - * The height of the rule, in pixels. If the bottom position is specified, the - * rule extends upward from the bottom edge; if the top position is specified, - * the rule extends downward from the top edge. - * - * @type number - * @name pv.Rule.prototype.height - */ - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the rule. The default value is 1 pixel. - * - * @type number - * @name pv.Rule.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the rule. The default value of this property is black. - * - * @type string - * @name pv.Rule.prototype.strokeStyle - * @see pv.color - */ - -/** - * Default properties for rules. By default, a single-pixel black line is - * stroked. - * - * @type pv.Rule - */ -pv.Rule.prototype.defaults = new pv.Rule() - .extend(pv.Mark.prototype.defaults) - .lineWidth(1) - .strokeStyle("black") - .antialias(false); - -/** - * Constructs a new rule anchor with default properties. Rules support five - * different anchors:

    - * - *
  • top - *
  • left - *
  • center - *
  • bottom - *
  • right - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline). Text is - * rendered to appear outside the rule. Note that this behavior is different - * from other mark anchors, which default to rendering text inside the - * mark. - * - *

For consistency with the other mark types, the anchor positions are - * defined in terms of their opposite edge. For example, the top anchor defines - * the bottom property, such that a bar added to the top anchor grows upward. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} - */ -pv.Rule.prototype.anchor = pv.Line.prototype.anchor; - -/** @private Sets width or height based on orientation. */ -pv.Rule.prototype.buildImplied = function(s) { - var l = s.left, r = s.right, t = s.top, b = s.bottom; - - /* Determine horizontal or vertical orientation. */ - if ((s.width != null) - || ((l == null) && (r == null)) - || ((r != null) && (l != null))) { - s.height = 0; - } else { - s.width = 0; - } - - pv.Mark.prototype.buildImplied.call(this, s); -}; diff --git a/lib/protovis/src/mark/Wedge.js b/lib/protovis/src/mark/Wedge.js deleted file mode 100644 index 0908f46d..00000000 --- a/lib/protovis/src/mark/Wedge.js +++ /dev/null @@ -1,244 +0,0 @@ -/** - * Constructs a new wedge with default properties. Wedges are not typically - * constructed directly, but by adding to a panel or an existing mark via - * {@link pv.Mark#add}. - * - * @class Represents a wedge, or pie slice. Specified in terms of start and end - * angle, inner and outer radius, wedges can be used to construct donut charts - * and polar bar charts as well. If the {@link #angle} property is used, the end - * angle is implied by adding this value to start angle. By default, the start - * angle is the previously-generated wedge's end angle. This design allows - * explicit control over the wedge placement if desired, while offering - * convenient defaults for the construction of radial graphs. - * - *

The center point of the circle is positioned using the standard box model. - * The wedge can be stroked and filled, similar to {@link pv.Bar}. - * - *

See also the Wedge guide. - * - * @extends pv.Mark - */ -pv.Wedge = function() { - pv.Mark.call(this); -}; - -pv.Wedge.prototype = pv.extend(pv.Mark) - .property("startAngle", Number) - .property("endAngle", Number) - .property("angle", Number) - .property("innerRadius", Number) - .property("outerRadius", Number) - .property("lineWidth", Number) - .property("strokeStyle", pv.color) - .property("fillStyle", pv.color); - -pv.Wedge.prototype.type = "wedge"; - -/** - * The start angle of the wedge, in radians. The start angle is measured - * clockwise from the 3 o'clock position. The default value of this property is - * the end angle of the previous instance (the {@link Mark#sibling}), or -PI / 2 - * for the first wedge; for pie and donut charts, typically only the - * {@link #angle} property needs to be specified. - * - * @type number - * @name pv.Wedge.prototype.startAngle - */ - -/** - * The end angle of the wedge, in radians. If not specified, the end angle is - * implied as the start angle plus the {@link #angle}. - * - * @type number - * @name pv.Wedge.prototype.endAngle - */ - -/** - * The angular span of the wedge, in radians. This property is used if end angle - * is not specified. - * - * @type number - * @name pv.Wedge.prototype.angle - */ - -/** - * The inner radius of the wedge, in pixels. The default value of this property - * is zero; a positive value will produce a donut slice rather than a pie slice. - * The inner radius can vary per-wedge. - * - * @type number - * @name pv.Wedge.prototype.innerRadius - */ - -/** - * The outer radius of the wedge, in pixels. This property is required. For - * pies, only this radius is required; for donuts, the inner radius must be - * specified as well. The outer radius can vary per-wedge. - * - * @type number - * @name pv.Wedge.prototype.outerRadius - */ - -/** - * The width of stroked lines, in pixels; used in conjunction with - * strokeStyle to stroke the wedge's border. - * - * @type number - * @name pv.Wedge.prototype.lineWidth - */ - -/** - * The style of stroked lines; used in conjunction with lineWidth to - * stroke the wedge's border. The default value of this property is null, - * meaning wedges are not stroked by default. - * - * @type string - * @name pv.Wedge.prototype.strokeStyle - * @see pv.color - */ - -/** - * The wedge fill style; if non-null, the interior of the wedge is filled with - * the specified color. The default value of this property is a categorical - * color. - * - * @type string - * @name pv.Wedge.prototype.fillStyle - * @see pv.color - */ - -/** - * Default properties for wedges. By default, there is no stroke and the fill - * style is a categorical color. - * - * @type pv.Wedge - */ -pv.Wedge.prototype.defaults = new pv.Wedge() - .extend(pv.Mark.prototype.defaults) - .startAngle(function() { - var s = this.sibling(); - return s ? s.endAngle : -Math.PI / 2; - }) - .innerRadius(0) - .lineWidth(1.5) - .strokeStyle(null) - .fillStyle(pv.Colors.category20().by(pv.index)); - -/** - * Returns the mid-radius of the wedge, which is defined as half-way between the - * inner and outer radii. - * - * @see #innerRadius - * @see #outerRadius - * @returns {number} the mid-radius, in pixels. - */ -pv.Wedge.prototype.midRadius = function() { - return (this.innerRadius() + this.outerRadius()) / 2; -}; - -/** - * Returns the mid-angle of the wedge, which is defined as half-way between the - * start and end angles. - * - * @see #startAngle - * @see #endAngle - * @returns {number} the mid-angle, in radians. - */ -pv.Wedge.prototype.midAngle = function() { - return (this.startAngle() + this.endAngle()) / 2; -}; - -/** - * Constructs a new wedge anchor with default properties. Wedges support five - * different anchors:

    - * - *
  • outer - *
  • inner - *
  • center - *
  • start - *
  • end - * - *
In addition to positioning properties (left, right, top bottom), the - * anchors support text rendering properties (text-align, text-baseline, - * textAngle). Text is rendered to appear inside the wedge. - * - * @param {string} name the anchor name; either a string or a property function. - * @returns {pv.Anchor} - */ -pv.Wedge.prototype.anchor = function(name) { - function partial(s) { return s.innerRadius || s.angle < 2 * Math.PI; } - function midRadius(s) { return (s.innerRadius + s.outerRadius) / 2; } - function midAngle(s) { return (s.startAngle + s.endAngle) / 2; } - return pv.Mark.prototype.anchor.call(this, name) - .left(function() { - var s = this.scene.target[this.index]; - if (partial(s)) switch (this.name()) { - case "outer": return s.left + s.outerRadius * Math.cos(midAngle(s)); - case "inner": return s.left + s.innerRadius * Math.cos(midAngle(s)); - case "start": return s.left + midRadius(s) * Math.cos(s.startAngle); - case "center": return s.left + midRadius(s) * Math.cos(midAngle(s)); - case "end": return s.left + midRadius(s) * Math.cos(s.endAngle); - } - return s.left; - }) - .top(function() { - var s = this.scene.target[this.index]; - if (partial(s)) switch (this.name()) { - case "outer": return s.top + s.outerRadius * Math.sin(midAngle(s)); - case "inner": return s.top + s.innerRadius * Math.sin(midAngle(s)); - case "start": return s.top + midRadius(s) * Math.sin(s.startAngle); - case "center": return s.top + midRadius(s) * Math.sin(midAngle(s)); - case "end": return s.top + midRadius(s) * Math.sin(s.endAngle); - } - return s.top; - }) - .textAlign(function() { - var s = this.scene.target[this.index]; - if (partial(s)) switch (this.name()) { - case "outer": return pv.Wedge.upright(midAngle(s)) ? "right" : "left"; - case "inner": return pv.Wedge.upright(midAngle(s)) ? "left" : "right"; - } - return "center"; - }) - .textBaseline(function() { - var s = this.scene.target[this.index]; - if (partial(s)) switch (this.name()) { - case "start": return pv.Wedge.upright(s.startAngle) ? "top" : "bottom"; - case "end": return pv.Wedge.upright(s.endAngle) ? "bottom" : "top"; - } - return "middle"; - }) - .textAngle(function() { - var s = this.scene.target[this.index], a = 0; - if (partial(s)) switch (this.name()) { - case "center": - case "inner": - case "outer": a = midAngle(s); break; - case "start": a = s.startAngle; break; - case "end": a = s.endAngle; break; - } - return pv.Wedge.upright(a) ? a : (a + Math.PI); - }); -}; - -/** - * Returns true if the specified angle is considered "upright", as in, text - * rendered at that angle would appear upright. If the angle is not upright, - * text is rotated 180 degrees to be upright, and the text alignment properties - * are correspondingly changed. - * - * @param {number} angle an angle, in radius. - * @returns {boolean} true if the specified angle is upright. - */ -pv.Wedge.upright = function(angle) { - angle = angle % (2 * Math.PI); - angle = (angle < 0) ? (2 * Math.PI + angle) : angle; - return (angle < Math.PI / 2) || (angle >= 3 * Math.PI / 2); -}; - -/** @private Sets angle based on endAngle or vice versa. */ -pv.Wedge.prototype.buildImplied = function(s) { - if (s.angle == null) s.angle = s.endAngle - s.startAngle; - else if (s.endAngle == null) s.endAngle = s.startAngle + s.angle; - pv.Mark.prototype.buildImplied.call(this, s); -}; diff --git a/lib/protovis/src/physics/BoundConstraint.js b/lib/protovis/src/physics/BoundConstraint.js deleted file mode 100644 index 2627cb98..00000000 --- a/lib/protovis/src/physics/BoundConstraint.js +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Constructs a new bound constraint. Before the constraint can be used, the - * {@link #x} and {@link #y} methods must be call to specify the bounds. - * - * @class Constrains particles to within fixed rectangular bounds. For example, - * this constraint can be used to constrain particles in a physics simulation - * within the bounds of an enclosing panel. - * - *

Note that the current implementation treats particles as points, with no - * area. If the particles are rendered as dots, be sure to include some - * additional padding to inset the bounds such that the edges of the dots do not - * get clipped by the panel bounds. If the particles have different radii, this - * constraint would need to be extended using a radius function, similar to - * {@link pv.Constraint.collision}. - * - * @see pv.Layout.Force - * @extends pv.Constraint - */ -pv.Constraint.bound = function() { - var constraint = {}, - x, - y; - - /** - * Sets or gets the bounds on the x-coordinate. - * - * @function - * @name pv.Constraint.bound.prototype.x - * @param {number} min the minimum allowed x-coordinate. - * @param {number} max the maximum allowed x-coordinate. - * @returns {pv.Constraint.bound} this. - */ - constraint.x = function(min, max) { - if (arguments.length) { - x = {min: Math.min(min, max), max: Math.max(min, max)}; - return this; - } - return x; - }; - - /** - * Sets or gets the bounds on the y-coordinate. - * - * @function - * @name pv.Constraint.bound.prototype.y - * @param {number} min the minimum allowed y-coordinate. - * @param {number} max the maximum allowed y-coordinate. - * @returns {pv.Constraint.bound} this. - */ - constraint.y = function(min, max) { - if (arguments.length) { - y = {min: Math.min(min, max), max: Math.max(min, max)}; - return this; - } - return y; - }; - - /** - * Applies this constraint to the specified particles. - * - * @function - * @name pv.Constraint.bound.prototype.apply - * @param {pv.Particle} particles particles to which to apply this constraint. - */ - constraint.apply = function(particles) { - if (x) for (var p = particles; p; p = p.next) { - p.x = p.x < x.min ? x.min : (p.x > x.max ? x.max : p.x); - } - if (y) for (var p = particles; p; p = p.next) { - p.y = p.y < y.min ? y.min : (p.y > y.max ? y.max : p.y); - } - }; - - return constraint; -}; diff --git a/lib/protovis/src/physics/ChargeForce.js b/lib/protovis/src/physics/ChargeForce.js deleted file mode 100644 index 53a36fc5..00000000 --- a/lib/protovis/src/physics/ChargeForce.js +++ /dev/null @@ -1,184 +0,0 @@ -/** - * Constructs a new charge force, with an optional charge constant. The charge - * constant can be negative for repulsion (e.g., particles with electrical - * charge of equal sign), or positive for attraction (e.g., massive particles - * with mutual gravity). The default charge constant is -40. - * - * @class An n-body force, as defined by Coulomb's law or Newton's law of - * gravitation, inversely proportional to the square of the distance between - * particles. Note that the force is independent of the mass of the - * associated particles, and that the particles do not have charges of varying - * magnitude; instead, the attraction or repulsion of all particles is globally - * specified as the charge {@link #constant}. - * - *

This particular implementation uses the Barnes-Hut algorithm. For details, - * see "A - * hierarchical O(N log N) force-calculation algorithm", J. Barnes & - * P. Hut, Nature 1986. - * - * @name pv.Force.charge - * @param {number} [k] the charge constant. - */ -pv.Force.charge = function(k) { - var min = 2, // minimum distance at which to observe forces - min1 = 1 / min, - max = 500, // maximum distance at which to observe forces - max1 = 1 / max, - theta = .9, // Barnes-Hut theta approximation constant - force = {}; - - if (!arguments.length) k = -40; // default charge constant (repulsion) - - /** - * Sets or gets the charge constant. If an argument is specified, it is the - * new charge constant. The charge constant can be negative for repulsion - * (e.g., particles with electrical charge of equal sign), or positive for - * attraction (e.g., massive particles with mutual gravity). The default - * charge constant is -40. - * - * @function - * @name pv.Force.charge.prototype.constant - * @param {number} x the charge constant. - * @returns {pv.Force.charge} this. - */ - force.constant = function(x) { - if (arguments.length) { - k = Number(x); - return force; - } - return k; - }; - - /** - * Sets or gets the domain; specifies the minimum and maximum domain within - * which charge forces are applied. A minimum distance threshold avoids - * applying forces that are two strong (due to granularity of the simulation's - * numeric integration). A maximum distance threshold improves performance by - * skipping force calculations for particles that are far apart. - * - *

The default domain is [2, 500]. - * - * @function - * @name pv.Force.charge.prototype.domain - * @param {number} a - * @param {number} b - * @returns {pv.Force.charge} this. - */ - force.domain = function(a, b) { - if (arguments.length) { - min = Number(a); - min1 = 1 / min; - max = Number(b); - max1 = 1 / max; - return force; - } - return [min, max]; - }; - - /** - * Sets or gets the Barnes-Hut approximation factor. The Barnes-Hut - * approximation criterion is the ratio of the size of the quadtree node to - * the distance from the point to the node's center of mass is beneath some - * threshold. - * - * @function - * @name pv.Force.charge.prototype.theta - * @param {number} x the new Barnes-Hut approximation factor. - * @returns {pv.Force.charge} this. - */ - force.theta = function(x) { - if (arguments.length) { - theta = Number(x); - return force; - } - return theta; - }; - - /** - * @ignore Recursively computes the center of charge for each node in the - * quadtree. This is equivalent to the center of mass, assuming that all - * particles have unit weight. - */ - function accumulate(n) { - var cx = 0, cy = 0; - n.cn = 0; - function accumulateChild(c) { - accumulate(c); - n.cn += c.cn; - cx += c.cn * c.cx; - cy += c.cn * c.cy; - } - if (!n.leaf) { - if (n.c1) accumulateChild(n.c1); - if (n.c2) accumulateChild(n.c2); - if (n.c3) accumulateChild(n.c3); - if (n.c4) accumulateChild(n.c4); - } - if (n.p) { - n.cn += k; - cx += k * n.p.x; - cy += k * n.p.y; - } - n.cx = cx / n.cn; - n.cy = cy / n.cn; - } - - /** - * @ignore Recursively computes forces on the given particle using the given - * quadtree node. The Barnes-Hut approximation criterion is the ratio of the - * size of the quadtree node to the distance from the point to the node's - * center of mass is beneath some threshold. - */ - function forces(n, p, x1, y1, x2, y2) { - var dx = n.cx - p.x, - dy = n.cy - p.y, - dn = 1 / Math.sqrt(dx * dx + dy * dy); - - /* Barnes-Hut criterion. */ - if ((n.leaf && (n.p != p)) || ((x2 - x1) * dn < theta)) { - if (dn < max1) return; - if (dn > min1) dn = min1; - var kc = n.cn * dn * dn * dn, - fx = dx * kc, - fy = dy * kc; - p.fx += fx; - p.fy += fy; - } else if (!n.leaf) { - var sx = (x1 + x2) * .5, sy = (y1 + y2) * .5; - if (n.c1) forces(n.c1, p, x1, y1, sx, sy); - if (n.c2) forces(n.c2, p, sx, y1, x2, sy); - if (n.c3) forces(n.c3, p, x1, sy, sx, y2); - if (n.c4) forces(n.c4, p, sx, sy, x2, y2); - if (dn < max1) return; - if (dn > min1) dn = min1; - if (n.p && (n.p != p)) { - var kc = k * dn * dn * dn, - fx = dx * kc, - fy = dy * kc; - p.fx += fx; - p.fy += fy; - } - } - } - - /** - * Applies this force to the specified particles. The force is applied between - * all pairs of particles within the domain, using the specified quadtree to - * accelerate n-body force calculation using the Barnes-Hut approximation - * criterion. - * - * @function - * @name pv.Force.charge.prototype.apply - * @param {pv.Particle} particles particles to which to apply this force. - * @param {pv.Quadtree} q a quadtree for spatial acceleration. - */ - force.apply = function(particles, q) { - accumulate(q.root); - for (var p = particles; p; p = p.next) { - forces(q.root, p, q.xMin, q.yMin, q.xMax, q.yMax); - } - }; - - return force; -}; diff --git a/lib/protovis/src/physics/CollisionConstraint.js b/lib/protovis/src/physics/CollisionConstraint.js deleted file mode 100644 index f08bc23f..00000000 --- a/lib/protovis/src/physics/CollisionConstraint.js +++ /dev/null @@ -1,113 +0,0 @@ -/** - * Constructs a new collision constraint. The default search radius is 10, and - * the default repeat count is 1. A radius function must be specified to compute - * the radius of particles. - * - * @class Constraints circles to avoid overlap. Each particle is treated as a - * circle, with the radius of the particle computed using a specified function. - * For example, if the particle has an r attribute storing the radius, - * the radius function(d) d.r specifies a collision constraint using - * this radius. The radius function is passed each {@link pv.Particle} as the - * first argument. - * - *

To accelerate collision detection, this implementation uses a quadtree and - * a search radius. The search radius is computed as the maximum radius of all - * particles in the simulation. - * - * @see pv.Constraint - * @param {function} radius the radius function. - */ -pv.Constraint.collision = function(radius) { - var n = 1, // number of times to repeat the constraint - r1, - px1, - py1, - px2, - py2, - constraint = {}; - - if (!arguments.length) r1 = 10; // default search radius - - /** - * Sets or gets the repeat count. If the repeat count is greater than 1, the - * constraint will be applied repeatedly; this is a form of the Gauss-Seidel - * method for constraints relaxation. Repeating the collision constraint makes - * the constraint have more of an effect when there is a potential for many - * co-occurring collisions. - * - * @function - * @name pv.Constraint.collision.prototype.repeat - * @param {number} x the number of times to repeat this constraint. - * @returns {pv.Constraint.collision} this. - */ - constraint.repeat = function(x) { - if (arguments.length) { - n = Number(x); - return constraint; - } - return n; - }; - - /** @private */ - function constrain(n, p, x1, y1, x2, y2) { - if (!n.leaf) { - var sx = (x1 + x2) * .5, - sy = (y1 + y2) * .5, - top = sy > py1, - bottom = sy < py2, - left = sx > px1, - right = sx < px2; - if (top) { - if (n.c1 && left) constrain(n.c1, p, x1, y1, sx, sy); - if (n.c2 && right) constrain(n.c2, p, sx, y1, x2, sy); - } - if (bottom) { - if (n.c3 && left) constrain(n.c3, p, x1, sy, sx, y2); - if (n.c4 && right) constrain(n.c4, p, sx, sy, x2, y2); - } - } - if (n.p && (n.p != p)) { - var dx = p.x - n.p.x, - dy = p.y - n.p.y, - l = Math.sqrt(dx * dx + dy * dy), - d = r1 + radius(n.p); - if (l < d) { - var k = (l - d) / l * .5; - dx *= k; - dy *= k; - p.x -= dx; - p.y -= dy; - n.p.x += dx; - n.p.y += dy; - } - } - } - - /** - * Applies this constraint to the specified particles. - * - * @function - * @name pv.Constraint.collision.prototype.apply - * @param {pv.Particle} particles particles to which to apply this constraint. - * @param {pv.Quadtree} q a quadtree for spatial acceleration. - */ - constraint.apply = function(particles, q) { - var p, r, max = -Infinity; - for (p = particles; p; p = p.next) { - r = radius(p); - if (r > max) max = r; - } - for (var i = 0; i < n; i++) { - for (p = particles; p; p = p.next) { - r = (r1 = radius(p)) + max; - px1 = p.x - r; - px2 = p.x + r; - py1 = p.y - r; - py2 = p.y + r; - constrain(q.root, p, q.xMin, q.yMin, q.xMax, q.yMax); - } - } - }; - - return constraint; -}; diff --git a/lib/protovis/src/physics/Constraint.js b/lib/protovis/src/physics/Constraint.js deleted file mode 100644 index 94f18422..00000000 --- a/lib/protovis/src/physics/Constraint.js +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Abstract; see an implementing class. - * - * @class Represents a constraint that acts on particles. Note that this - * interface does not specify how to bind a constraint to specific particles; in - * general, constraints are applied globally to all particles. However, some - * constraints may be applied to specific particles or between particles, such - * as position constraints, through additional specialization. - * - * @see pv.Simulation - * @see pv.Particle - * @see pv.Constraint.bound - * @see pv.Constraint.collision - * @see pv.Constraint.position - */ -pv.Constraint = {}; - -/** - * Applies this constraint to the specified particles. - * - * @function - * @name pv.Constraint.prototype.apply - * @param {pv.Particle} particles particles to which to apply this constraint. - * @param {pv.Quadtree} q a quadtree for spatial acceleration. - * @returns {pv.Constraint} this. - */ diff --git a/lib/protovis/src/physics/DragForce.js b/lib/protovis/src/physics/DragForce.js deleted file mode 100644 index 0ad62318..00000000 --- a/lib/protovis/src/physics/DragForce.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Constructs a new drag force with the specified constant. - * - * @class Implements a drag force, simulating friction. The drag force is - * applied in the opposite direction of the particle's velocity. Since Position - * Verlet integration does not track velocities explicitly, the error term with - * this estimate of velocity is fairly high, so the drag force may be - * inaccurate. - * - * @extends pv.Force - * @param {number} k the drag constant. - * @see #constant - */ -pv.Force.drag = function(k) { - var force = {}; - - if (!arguments.length) k = .1; // default drag constant - - /** - * Sets or gets the drag constant, in the range [0,1]. The default drag - * constant is 0.1. The drag forces scales linearly with the particle's - * velocity based on the given drag constant. - * - * @function - * @name pv.Force.drag.prototype.constant - * @param {number} x the new drag constant. - * @returns {pv.Force.drag} this, or the current drag constant. - */ - force.constant = function(x) { - if (arguments.length) { k = x; return force; } - return k; - }; - - /** - * Applies this force to the specified particles. - * - * @function - * @name pv.Force.drag.prototype.apply - * @param {pv.Particle} particles particles to which to apply this force. - */ - force.apply = function(particles) { - if (k) for (var p = particles; p; p = p.next) { - p.fx -= k * p.vx; - p.fy -= k * p.vy; - } - }; - - return force; -}; diff --git a/lib/protovis/src/physics/Force.js b/lib/protovis/src/physics/Force.js deleted file mode 100644 index f67943b3..00000000 --- a/lib/protovis/src/physics/Force.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Abstract; see an implementing class. - * - * @class Represents a force that acts on particles. Note that this interface - * does not specify how to bind a force to specific particles; in general, - * forces are applied globally to all particles. However, some forces may be - * applied to specific particles or between particles, such as spring forces, - * through additional specialization. - * - * @see pv.Simulation - * @see pv.Particle - * @see pv.Force.charge - * @see pv.Force.drag - * @see pv.Force.spring - */ -pv.Force = {}; - -/** - * Applies this force to the specified particles. - * - * @function - * @name pv.Force.prototype.apply - * @param {pv.Particle} particles particles to which to apply this force. - * @param {pv.Quadtree} q a quadtree for spatial acceleration. - */ diff --git a/lib/protovis/src/physics/Particle.js b/lib/protovis/src/physics/Particle.js deleted file mode 100644 index e41c864a..00000000 --- a/lib/protovis/src/physics/Particle.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Abstract; not implemented. There is no explicit constructor; this class - * merely serves to document the attributes that are used on particles in - * physics simulations. - * - * @class A weighted particle that can participate in a force simulation. - * - * @name pv.Particle - */ - -/** - * The next particle in the simulation. Particles form a singly-linked list. - * - * @field - * @type pv.Particle - * @name pv.Particle.prototype.next - */ - -/** - * The x-position of the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.x - */ - -/** - * The y-position of the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.y - */ - -/** - * The x-velocity of the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.vx - */ - -/** - * The y-velocity of the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.vy - */ - -/** - * The x-position of the particle at -dt. - * - * @field - * @type number - * @name pv.Particle.prototype.px - */ - -/** - * The y-position of the particle at -dt. - * - * @field - * @type number - * @name pv.Particle.prototype.py - */ - -/** - * The x-force on the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.fx - */ - -/** - * The y-force on the particle. - * - * @field - * @type number - * @name pv.Particle.prototype.fy - */ diff --git a/lib/protovis/src/physics/PositionConstraint.js b/lib/protovis/src/physics/PositionConstraint.js deleted file mode 100644 index f7fa8d7d..00000000 --- a/lib/protovis/src/physics/PositionConstraint.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Constructs a default position constraint using the fix attribute. - * An optional position function can be specified to determine how the fixed - * position per-particle is determined. - * - * @class Constraints particles to a fixed position. The fixed position per - * particle is determined using a given position function, which defaults to - * function(d) d.fix. - * - *

If the position function returns null, then no position constraint is - * applied to the given particle. Otherwise, the particle's position is set to - * the returned position, as expressed by a {@link pv.Vector}. (Note: the - * position does not need to be an instance of pv.Vector, but simply an - * object with x and y attributes.) - * - *

This constraint also supports a configurable alpha parameter, which - * defaults to 1. If the alpha parameter is in the range [0,1], then rather than - * setting the particle's new position directly to the position returned by the - * supplied position function, the particle's position is interpolated towards - * the fixed position. This results is a smooth (exponential) drift towards the - * fixed position, which can increase the stability of the physics simulation. - * In addition, the alpha parameter can be decayed over time, relaxing the - * position constraint, which helps to stabilize on an optimal solution. - * - * @param {function} [f] the position function. - */ -pv.Constraint.position = function(f) { - var a = 1, // default alpha - constraint = {}; - - if (!arguments.length) /** @ignore */ f = function(p) { return p.fix; }; - - /** - * Sets or gets the alpha parameter for position interpolation. If the alpha - * parameter is in the range [0,1], then rather than setting the particle's - * new position directly to the position returned by the supplied position - * function, the particle's position is interpolated towards the fixed - * position. - * - * @function - * @name pv.Constraint.position.prototype.alpha - * @param {number} x the new alpha parameter, in the range [0,1]. - * @returns {pv.Constraint.position} this. - */ - constraint.alpha = function(x) { - if (arguments.length) { - a = Number(x); - return constraint; - } - return a; - }; - - /** - * Applies this constraint to the specified particles. - * - * @function - * @name pv.Constraint.position.prototype.apply - * @param {pv.Particle} particles particles to which to apply this constraint. - */ - constraint.apply = function(particles) { - for (var p = particles; p; p = p.next) { - var v = f(p); - if (v) { - p.x += (v.x - p.x) * a; - p.y += (v.y - p.y) * a; - p.fx = p.fy = p.vx = p.vy = 0; - } - } - }; - - return constraint; -}; diff --git a/lib/protovis/src/physics/Quadtree.js b/lib/protovis/src/physics/Quadtree.js deleted file mode 100644 index 64642551..00000000 --- a/lib/protovis/src/physics/Quadtree.js +++ /dev/null @@ -1,195 +0,0 @@ -/** - * Constructs a new quadtree for the specified array of particles. - * - * @class Represents a quadtree: a two-dimensional recursive spatial - * subdivision. This particular implementation uses square partitions, dividing - * each square into four equally-sized squares. Each particle exists in a unique - * node; if multiple particles are in the same position, some particles may be - * stored on internal nodes rather than leaf nodes. - * - *

This quadtree can be used to accelerate various spatial operations, such - * as the Barnes-Hut approximation for computing n-body forces, or collision - * detection. - * - * @see pv.Force.charge - * @see pv.Constraint.collision - * @param {pv.Particle} particles the linked list of particles. - */ -pv.Quadtree = function(particles) { - var p; - - /* Compute bounds. */ - var x1 = Number.POSITIVE_INFINITY, y1 = x1, - x2 = Number.NEGATIVE_INFINITY, y2 = x2; - for (p = particles; p; p = p.next) { - if (p.x < x1) x1 = p.x; - if (p.y < y1) y1 = p.y; - if (p.x > x2) x2 = p.x; - if (p.y > y2) y2 = p.y; - } - - /* Squarify the bounds. */ - var dx = x2 - x1, dy = y2 - y1; - if (dx > dy) y2 = y1 + dx; - else x2 = x1 + dy; - this.xMin = x1; - this.yMin = y1; - this.xMax = x2; - this.yMax = y2; - - /** - * @ignore Recursively inserts the specified particle p at the node - * n or one of its descendants. The bounds are defined by [x1, - * x2] and [y1, y2]. - */ - function insert(n, p, x1, y1, x2, y2) { - if (isNaN(p.x) || isNaN(p.y)) return; // ignore invalid particles - if (n.leaf) { - if (n.p) { - /* - * If the particle at this leaf node is at the same position as the new - * particle we are adding, we leave the particle associated with the - * internal node while adding the new particle to a child node. This - * avoids infinite recursion. - */ - if ((Math.abs(n.p.x - p.x) + Math.abs(n.p.y - p.y)) < .01) { - insertChild(n, p, x1, y1, x2, y2); - } else { - var v = n.p; - n.p = null; - insertChild(n, v, x1, y1, x2, y2); - insertChild(n, p, x1, y1, x2, y2); - } - } else { - n.p = p; - } - } else { - insertChild(n, p, x1, y1, x2, y2); - } - } - - /** - * @ignore Recursively inserts the specified particle p into a - * descendant of node n. The bounds are defined by [x1, - * x2] and [y1, y2]. - */ - function insertChild(n, p, x1, y1, x2, y2) { - /* Compute the split point, and the quadrant in which to insert p. */ - var sx = (x1 + x2) * .5, - sy = (y1 + y2) * .5, - right = p.x >= sx, - bottom = p.y >= sy; - - /* Recursively insert into the child node. */ - n.leaf = false; - switch ((bottom << 1) + right) { - case 0: n = n.c1 || (n.c1 = new pv.Quadtree.Node()); break; - case 1: n = n.c2 || (n.c2 = new pv.Quadtree.Node()); break; - case 2: n = n.c3 || (n.c3 = new pv.Quadtree.Node()); break; - case 3: n = n.c4 || (n.c4 = new pv.Quadtree.Node()); break; - } - - /* Update the bounds as we recurse. */ - if (right) x1 = sx; else x2 = sx; - if (bottom) y1 = sy; else y2 = sy; - insert(n, p, x1, y1, x2, y2); - } - - /* Insert all particles. */ - this.root = new pv.Quadtree.Node(); - for (p = particles; p; p = p.next) insert(this.root, p, x1, y1, x2, y2); -}; - -/** - * The root node of the quadtree. - * - * @type pv.Quadtree.Node - * @name pv.Quadtree.prototype.root - */ - -/** - * The minimum x-coordinate value of all contained particles. - * - * @type number - * @name pv.Quadtree.prototype.xMin - */ - -/** - * The maximum x-coordinate value of all contained particles. - * - * @type number - * @name pv.Quadtree.prototype.xMax - */ - -/** - * The minimum y-coordinate value of all contained particles. - * - * @type number - * @name pv.Quadtree.prototype.yMin - */ - -/** - * The maximum y-coordinate value of all contained particles. - * - * @type number - * @name pv.Quadtree.prototype.yMax - */ - -/** - * Constructs a new node. - * - * @class A node in a quadtree. - * - * @see pv.Quadtree - */ -pv.Quadtree.Node = function() { - /* - * Prepopulating all attributes significantly increases performance! Also, - * letting the language interpreter manage garbage collection was moderately - * faster than creating a cache pool. - */ - this.leaf = true; - this.c1 = null; - this.c2 = null; - this.c3 = null; - this.c4 = null; - this.p = null; -}; - -/** - * True if this node is a leaf node; i.e., it has no children. Note that both - * leaf nodes and non-leaf (internal) nodes may have associated particles. If - * this is a non-leaf node, then at least one of {@link #c1}, {@link #c2}, - * {@link #c3} or {@link #c4} is guaranteed to be non-null. - * - * @type boolean - * @name pv.Quadtree.Node.prototype.leaf - */ - -/** - * The particle associated with this node, if any. - * - * @type pv.Particle - * @name pv.Quadtree.Node.prototype.p - */ - -/** - * The child node for the second quadrant, if any. - * - * @type pv.Quadtree.Node - * @name pv.Quadtree.Node.prototype.c2 - */ - -/** - * The child node for the third quadrant, if any. - * - * @type pv.Quadtree.Node - * @name pv.Quadtree.Node.prototype.c3 - */ - -/** - * The child node for the fourth quadrant, if any. - * - * @type pv.Quadtree.Node - * @name pv.Quadtree.Node.prototype.c4 - */ diff --git a/lib/protovis/src/physics/Simulation.js b/lib/protovis/src/physics/Simulation.js deleted file mode 100644 index 994b5b86..00000000 --- a/lib/protovis/src/physics/Simulation.js +++ /dev/null @@ -1,159 +0,0 @@ -/** - * Constructs a new empty simulation. - * - * @param {array} particles - * @returns {pv.Simulation} a new simulation for the specified particles. - * @see pv.Simulation - */ -pv.simulation = function(particles) { - return new pv.Simulation(particles); -}; - -/** - * Constructs a new simulation for the specified particles. - * - * @class Represents a particle simulation. Particles are massive points in - * two-dimensional space. Forces can be applied to these particles, causing them - * to move. Constraints can also be applied to restrict particle movement, for - * example, constraining particles to a fixed position, or simulating collision - * between circular particles with area. - * - *

The simulation uses Position Verlet - * integration, due to the ease with which geometric constraints can be - * implemented. For each time step, Verlet integration is performed, new forces - * are accumulated, and then constraints are applied. - * - *

The simulation makes two simplifying assumptions: all particles are - * equal-mass, and the time step of the simulation is fixed. It would be easy to - * incorporate variable-mass particles as a future enhancement. Variable time - * steps are also possible, but are likely to introduce instability in the - * simulation. - * - *

This class can be used directly to simulate particle interaction. - * Alternatively, for network diagrams, see {@link pv.Layout.Force}. - * - * @param {array} particles an array of {@link pv.Particle}s to simulate. - * @see pv.Layout.Force - * @see pv.Force - * @see pv.Constraint - */ -pv.Simulation = function(particles) { - for (var i = 0; i < particles.length; i++) this.particle(particles[i]); -}; - -/** - * The particles in the simulation. Particles are stored as a linked list; this - * field represents the first particle in the simulation. - * - * @field - * @type pv.Particle - * @name pv.Simulation.prototype.particles - */ - -/** - * The forces in the simulation. Forces are stored as a linked list; this field - * represents the first force in the simulation. - * - * @field - * @type pv.Force - * @name pv.Simulation.prototype.forces - */ - -/** - * The constraints in the simulation. Constraints are stored as a linked list; - * this field represents the first constraint in the simulation. - * - * @field - * @type pv.Constraint - * @name pv.Simulation.prototype.constraints - */ - -/** - * Adds the specified particle to the simulation. - * - * @param {pv.Particle} p the new particle. - * @returns {pv.Simulation} this. - */ -pv.Simulation.prototype.particle = function(p) { - p.next = this.particles; - /* Default velocities and forces to zero if unset. */ - if (isNaN(p.px)) p.px = p.x; - if (isNaN(p.py)) p.py = p.y; - if (isNaN(p.fx)) p.fx = 0; - if (isNaN(p.fy)) p.fy = 0; - this.particles = p; - return this; -}; - -/** - * Adds the specified force to the simulation. - * - * @param {pv.Force} f the new force. - * @returns {pv.Simulation} this. - */ -pv.Simulation.prototype.force = function(f) { - f.next = this.forces; - this.forces = f; - return this; -}; - -/** - * Adds the specified constraint to the simulation. - * - * @param {pv.Constraint} c the new constraint. - * @returns {pv.Simulation} this. - */ -pv.Simulation.prototype.constraint = function(c) { - c.next = this.constraints; - this.constraints = c; - return this; -}; - -/** - * Apply constraints, and then set the velocities to zero. - * - * @returns {pv.Simulation} this. - */ -pv.Simulation.prototype.stabilize = function(n) { - var c; - if (!arguments.length) n = 3; // TODO use cooling schedule - for (var i = 0; i < n; i++) { - var q = new pv.Quadtree(this.particles); - for (c = this.constraints; c; c = c.next) c.apply(this.particles, q); - } - for (var p = this.particles; p; p = p.next) { - p.px = p.x; - p.py = p.y; - } - return this; -}; - -/** - * Advances the simulation one time-step. - */ -pv.Simulation.prototype.step = function() { - var p, f, c; - - /* - * Assumptions: - * - The mass (m) of every particles is 1. - * - The time step (dt) is 1. - */ - - /* Position Verlet integration. */ - for (p = this.particles; p; p = p.next) { - var px = p.px, py = p.py; - p.px = p.x; - p.py = p.y; - p.x += p.vx = ((p.x - px) + p.fx); - p.y += p.vy = ((p.y - py) + p.fy); - } - - /* Apply constraints, then accumulate new forces. */ - var q = new pv.Quadtree(this.particles); - for (c = this.constraints; c; c = c.next) c.apply(this.particles, q); - for (p = this.particles; p; p = p.next) p.fx = p.fy = 0; - for (f = this.forces; f; f = f.next) f.apply(this.particles, q); -}; diff --git a/lib/protovis/src/physics/SpringForce.js b/lib/protovis/src/physics/SpringForce.js deleted file mode 100644 index d28902c9..00000000 --- a/lib/protovis/src/physics/SpringForce.js +++ /dev/null @@ -1,141 +0,0 @@ -/** - * Constructs a new spring force with the specified constant. The links - * associated with this spring force must be specified before the spring force - * can be applied. - * - * @class Implements a spring force, per Hooke's law. The spring force can be - * configured with a tension constant, rest length, and damping factor. The - * tension and damping will automatically be normalized using the inverse square - * root of the maximum link degree of attached nodes; this makes springs weaker - * between nodes of high link degree. - * - *

Unlike other forces (such as charge and drag forces) which may be applied - * globally, spring forces are only applied between linked particles. Therefore, - * an array of links must be specified before this force can be applied; the - * links should be an array of {@link pv.Layout.Network.Link}s. See also - * {@link pv.Layout.Force} for an example of using spring and charge forces for - * network layout. - * - * @extends pv.Force - * @param {number} k the spring constant. - * @see #constant - * @see #links - */ -pv.Force.spring = function(k) { - var d = .1, // default damping factor - l = 20, // default rest length - links, // links on which to apply spring forces - kl, // per-spring normalization - force = {}; - - if (!arguments.length) k = .1; // default spring constant (tension) - - /** - * Sets or gets the links associated with this spring force. Unlike other - * forces (such as charge and drag forces) which may be applied globally, - * spring forces are only applied between linked particles. Therefore, an - * array of links must be specified before this force can be applied; the - * links should be an array of {@link pv.Layout.Network.Link}s. - * - * @function - * @name pv.Force.spring.prototype.links - * @param {array} x the new array of links. - * @returns {pv.Force.spring} this, or the current array of links. - */ - force.links = function(x) { - if (arguments.length) { - links = x; - kl = x.map(function(l) { - return 1 / Math.sqrt(Math.max( - l.sourceNode.linkDegree, - l.targetNode.linkDegree)); - }); - return force; - } - return links; - }; - - /** - * Sets or gets the spring constant. The default value is 0.1; greater values - * will result in stronger tension. The spring tension is automatically - * normalized using the inverse square root of the maximum link degree of - * attached nodes. - * - * @function - * @name pv.Force.spring.prototype.constant - * @param {number} x the new spring constant. - * @returns {pv.Force.spring} this, or the current spring constant. - */ - force.constant = function(x) { - if (arguments.length) { - k = Number(x); - return force; - } - return k; - }; - - /** - * The spring damping factor, in the range [0,1]. Damping functions - * identically to drag forces, damping spring bounciness by applying a force - * in the opposite direction of attached nodes' velocities. The default value - * is 0.1. The spring damping is automatically normalized using the inverse - * square root of the maximum link degree of attached nodes. - * - * @function - * @name pv.Force.spring.prototype.damping - * @param {number} x the new spring damping factor. - * @returns {pv.Force.spring} this, or the current spring damping factor. - */ - force.damping = function(x) { - if (arguments.length) { - d = Number(x); - return force; - } - return d; - }; - - /** - * The spring rest length. The default value is 20 pixels. - * - * @function - * @name pv.Force.spring.prototype.length - * @param {number} x the new spring rest length. - * @returns {pv.Force.spring} this, or the current spring rest length. - */ - force.length = function(x) { - if (arguments.length) { - l = Number(x); - return force; - } - return l; - }; - - /** - * Applies this force to the specified particles. - * - * @function - * @name pv.Force.spring.prototype.apply - * @param {pv.Particle} particles particles to which to apply this force. - */ - force.apply = function(particles) { - for (var i = 0; i < links.length; i++) { - var a = links[i].sourceNode, - b = links[i].targetNode, - dx = a.x - b.x, - dy = a.y - b.y, - dn = Math.sqrt(dx * dx + dy * dy), - dd = dn ? (1 / dn) : 1, - ks = k * kl[i], // normalized tension - kd = d * kl[i], // normalized damping - kk = (ks * (dn - l) + kd * (dx * (a.vx - b.vx) + dy * (a.vy - b.vy)) * dd) * dd, - fx = -kk * (dn ? dx : (.01 * (.5 - Math.random()))), - fy = -kk * (dn ? dy : (.01 * (.5 - Math.random()))); - a.fx += fx; - a.fy += fy; - b.fx -= fx; - b.fy -= fy; - } - }; - - return force; -}; diff --git a/lib/protovis/src/pv-internals.js b/lib/protovis/src/pv-internals.js deleted file mode 100644 index 15d7aba1..00000000 --- a/lib/protovis/src/pv-internals.js +++ /dev/null @@ -1,154 +0,0 @@ -/** - * @private Returns a prototype object suitable for extending the given class - * f. Rather than constructing a new instance of f to serve as - * the prototype (which unnecessarily runs the constructor on the created - * prototype object, potentially polluting it), an anonymous function is - * generated internally that shares the same prototype: - * - *

function g() {}
- * g.prototype = f.prototype;
- * return new g();
- * - * For more details, see Douglas Crockford's essay on prototypal inheritance. - * - * @param {function} f a constructor. - * @returns a suitable prototype object. - * @see Douglas Crockford's essay on prototypal - * inheritance. - */ -pv.extend = function(f) { - function g() {} - g.prototype = f.prototype || f; - return new g(); -}; - -try { - eval("pv.parse = function(x) x;"); // native support -} catch (e) { - -/** - * @private Parses a Protovis specification, which may use JavaScript 1.8 - * function expresses, replacing those function expressions with proper - * functions such that the code can be run by a JavaScript 1.6 interpreter. This - * hack only supports function expressions (using clumsy regular expressions, no - * less), and not other JavaScript 1.8 features such as let expressions. - * - * @param {string} s a Protovis specification (i.e., a string of JavaScript 1.8 - * source code). - * @returns {string} a conformant JavaScript 1.6 source code. - */ - pv.parse = function(js) { // hacky regex support - var re = new RegExp("function\\s*(\\b\\w+)?\\s*\\([^)]*\\)\\s*", "mg"), m, d, i = 0, s = ""; - while (m = re.exec(js)) { - var j = m.index + m[0].length; - if (js.charAt(j) != '{') { - s += js.substring(i, j) + "{return "; - i = j; - for (var p = 0; p >= 0 && j < js.length; j++) { - var c = js.charAt(j); - switch (c) { - case '"': case '\'': { - while (++j < js.length && (d = js.charAt(j)) != c) { - if (d == '\\') j++; - } - break; - } - case '[': case '(': p++; break; - case ']': case ')': p--; break; - case ';': - case ',': if (p == 0) p--; break; - } - } - s += pv.parse(js.substring(i, --j)) + ";}"; - i = j; - } - re.lastIndex = j; - } - s += js.substring(i); - return s; - }; -} - -/** - * @private Computes the value of the specified CSS property p on the - * specified element e. - * - * @param {string} p the name of the CSS property. - * @param e the element on which to compute the CSS property. - */ -pv.css = function(e, p) { - return window.getComputedStyle - ? window.getComputedStyle(e, null).getPropertyValue(p) - : e.currentStyle[p]; -}; - -/** - * @private Reports the specified error to the JavaScript console. Mozilla only - * allows logging to the console for privileged code; if the console is - * unavailable, the alert dialog box is used instead. - * - * @param e the exception that triggered the error. - */ -pv.error = function(e) { - (typeof console == "undefined") ? alert(e) : console.error(e); -}; - -/** - * @private Registers the specified listener for events of the specified type on - * the specified target. For standards-compliant browsers, this method uses - * addEventListener; for Internet Explorer, attachEvent. - * - * @param target a DOM element. - * @param {string} type the type of event, such as "click". - * @param {function} the event handler callback. - */ -pv.listen = function(target, type, listener) { - listener = pv.listener(listener); - return target.addEventListener - ? target.addEventListener(type, listener, false) - : target.attachEvent("on" + type, listener); -}; - -/** - * @private Returns a wrapper for the specified listener function such that the - * {@link pv.event} is set for the duration of the listener's invocation. The - * wrapper is cached on the returned function, such that duplicate registrations - * of the wrapped event handler are ignored. - * - * @param {function} f an event handler. - * @returns {function} the wrapped event handler. - */ -pv.listener = function(f) { - return f.$listener || (f.$listener = function(e) { - try { - pv.event = e; - return f.call(this, e); - } finally { - delete pv.event; - } - }); -}; - -/** - * @private Returns true iff a is an ancestor of e. This is useful - * for ignoring mouseout and mouseover events that are contained within the - * target element. - */ -pv.ancestor = function(a, e) { - while (e) { - if (e == a) return true; - e = e.parentNode; - } - return false; -}; - -/** @private Returns a locally-unique positive id. */ -pv.id = function() { - var id = 1; return function() { return id++; }; -}(); - -/** @private Returns a function wrapping the specified constant. */ -pv.functor = function(v) { - return typeof v == "function" ? v : function() { return v; }; -}; diff --git a/lib/protovis/src/pv.js b/lib/protovis/src/pv.js deleted file mode 100644 index 0caf97a9..00000000 --- a/lib/protovis/src/pv.js +++ /dev/null @@ -1,80 +0,0 @@ -/** - * The top-level Protovis namespace. All public methods and fields should be - * registered on this object. Note that core Protovis source is surrounded by an - * anonymous function, so any other declared globals will not be visible outside - * of core methods. This also allows multiple versions of Protovis to coexist, - * since each version will see their own pv namespace. - * - * @namespace The top-level Protovis namespace, pv. - */ -var pv = {}; - -/** - * Protovis version number. See semver.org. - * - * @type string - * @constant - */ -pv.version = "3.3.1"; - -/** - * Returns the passed-in argument, x; the identity function. This method - * is provided for convenience since it is used as the default behavior for a - * number of property functions. - * - * @param x a value. - * @returns the value x. - */ -pv.identity = function(x) { return x; }; - -/** - * Returns this.index. This method is provided for convenience for use - * with scales. For example, to color bars by their index, say: - * - *
.fillStyle(pv.Colors.category10().by(pv.index))
- * - * This method is equivalent to function() this.index, but more - * succinct. Note that the index property is also supported for - * accessor functions with {@link pv.max}, {@link pv.min} and other array - * utility methods. - * - * @see pv.Scale - * @see pv.Mark#index - */ -pv.index = function() { return this.index; }; - -/** - * Returns this.childIndex. This method is provided for convenience for - * use with scales. For example, to color bars by their child index, say: - * - *
.fillStyle(pv.Colors.category10().by(pv.child))
- * - * This method is equivalent to function() this.childIndex, but more - * succinct. - * - * @see pv.Scale - * @see pv.Mark#childIndex - */ -pv.child = function() { return this.childIndex; }; - -/** - * Returns this.parent.index. This method is provided for convenience - * for use with scales. This method is provided for convenience for use with - * scales. For example, to color bars by their parent index, say: - * - *
.fillStyle(pv.Colors.category10().by(pv.parent))
- * - * Tthis method is equivalent to function() this.parent.index, but more - * succinct. - * - * @see pv.Scale - * @see pv.Mark#index - */ -pv.parent = function() { return this.parent.index; }; - -/** - * Stores the current event. This field is only set within event handlers. - * - * @type Event - * @name pv.event - */ diff --git a/lib/protovis/src/scene/SvgArea.js b/lib/protovis/src/scene/SvgArea.js deleted file mode 100644 index 5c7c563c..00000000 --- a/lib/protovis/src/scene/SvgArea.js +++ /dev/null @@ -1,172 +0,0 @@ -pv.SvgScene.area = function(scenes) { - var e = scenes.$g.firstChild; - if (!scenes.length) return e; - var s = scenes[0]; - - /* segmented */ - if (s.segmented) return this.areaSegment(scenes); - - /* visible */ - if (!s.visible) return e; - var fill = s.fillStyle, stroke = s.strokeStyle; - if (!fill.opacity && !stroke.opacity) return e; - - /** @private Computes the straight path for the range [i, j]. */ - function path(i, j) { - var p1 = [], p2 = []; - for (var k = j; i <= k; i++, j--) { - var si = scenes[i], - sj = scenes[j], - pi = si.left + "," + si.top, - pj = (sj.left + sj.width) + "," + (sj.top + sj.height); - - /* interpolate */ - if (i < k) { - var sk = scenes[i + 1], sl = scenes[j - 1]; - switch (s.interpolate) { - case "step-before": { - pi += "V" + sk.top; - pj += "H" + (sl.left + sl.width); - break; - } - case "step-after": { - pi += "H" + sk.left; - pj += "V" + (sl.top + sl.height); - break; - } - } - } - - p1.push(pi); - p2.push(pj); - } - return p1.concat(p2).join("L"); - } - - /** @private Computes the curved path for the range [i, j]. */ - function pathCurve(i, j) { - var pointsT = [], pointsB = [], pathT, pathB; - - for (var k = j; i <= k; i++, j--) { - var sj = scenes[j]; - pointsT.push(scenes[i]); - pointsB.push({left: sj.left + sj.width, top: sj.top + sj.height}); - } - - if (s.interpolate == "basis") { - pathT = pv.SvgScene.curveBasis(pointsT); - pathB = pv.SvgScene.curveBasis(pointsB); - } else if (s.interpolate == "cardinal") { - pathT = pv.SvgScene.curveCardinal(pointsT, s.tension); - pathB = pv.SvgScene.curveCardinal(pointsB, s.tension); - } else { // monotone - pathT = pv.SvgScene.curveMonotone(pointsT); - pathB = pv.SvgScene.curveMonotone(pointsB); - } - - return pointsT[0].left + "," + pointsT[0].top + pathT - + "L" + pointsB[0].left + "," + pointsB[0].top + pathB; - } - - /* points */ - var d = [], si, sj; - for (var i = 0; i < scenes.length; i++) { - si = scenes[i]; if (!si.width && !si.height) continue; - for (var j = i + 1; j < scenes.length; j++) { - sj = scenes[j]; if (!sj.width && !sj.height) break; - } - if (i && (s.interpolate != "step-after")) i--; - if ((j < scenes.length) && (s.interpolate != "step-before")) j++; - d.push(((j - i > 2 - && (s.interpolate == "basis" - || s.interpolate == "cardinal" - || s.interpolate == "monotone")) - ? pathCurve : path)(i, j - 1)); - i = j - 1; - } - if (!d.length) return e; - - e = this.expect(e, "path", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "d": "M" + d.join("ZM") + "Z", - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null - }); - return this.append(e, scenes, 0); -}; - -pv.SvgScene.areaSegment = function(scenes) { - var e = scenes.$g.firstChild, s = scenes[0], pathsT, pathsB; - if (s.interpolate == "basis" - || s.interpolate == "cardinal" - || s.interpolate == "monotone") { - var pointsT = [], pointsB = []; - - for (var i = 0, n = scenes.length; i < n; i++) { - var sj = scenes[n - i - 1]; - pointsT.push(scenes[i]); - pointsB.push({left: sj.left + sj.width, top: sj.top + sj.height}); - } - - if (s.interpolate == "basis") { - pathsT = this.curveBasisSegments(pointsT); - pathsB = this.curveBasisSegments(pointsB); - } else if (s.interpolate == "cardinal") { - pathsT = this.curveCardinalSegments(pointsT, s.tension); - pathsB = this.curveCardinalSegments(pointsB, s.tension); - } else { // monotone - pathsT = this.curveMonotoneSegments(pointsT); - pathsB = this.curveMonotoneSegments(pointsB); - } - } - - for (var i = 0, n = scenes.length - 1; i < n; i++) { - var s1 = scenes[i], s2 = scenes[i + 1]; - - /* visible */ - if (!s1.visible || !s2.visible) continue; - var fill = s1.fillStyle, stroke = s1.strokeStyle; - if (!fill.opacity && !stroke.opacity) continue; - - var d; - if (pathsT) { - var pathT = pathsT[i], - pathB = "L" + pathsB[n - i - 1].substr(1); - - d = pathT + pathB + "Z"; - } else { - /* interpolate */ - var si = s1, sj = s2; - switch (s1.interpolate) { - case "step-before": si = s2; break; - case "step-after": sj = s1; break; - } - - /* path */ - d = "M" + s1.left + "," + si.top - + "L" + s2.left + "," + sj.top - + "L" + (s2.left + s2.width) + "," + (sj.top + sj.height) - + "L" + (s1.left + s1.width) + "," + (si.top + si.height) - + "Z"; - } - - e = this.expect(e, "path", { - "shape-rendering": s1.antialias ? null : "crispEdges", - "pointer-events": s1.events, - "cursor": s1.cursor, - "d": d, - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s1.lineWidth / this.scale : null - }); - e = this.append(e, scenes, i); - } - return e; -}; diff --git a/lib/protovis/src/scene/SvgBar.js b/lib/protovis/src/scene/SvgBar.js deleted file mode 100644 index f60ae2dd..00000000 --- a/lib/protovis/src/scene/SvgBar.js +++ /dev/null @@ -1,28 +0,0 @@ -pv.SvgScene.bar = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - var fill = s.fillStyle, stroke = s.strokeStyle; - if (!fill.opacity && !stroke.opacity) continue; - - e = this.expect(e, "rect", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "x": s.left, - "y": s.top, - "width": Math.max(1E-10, s.width), - "height": Math.max(1E-10, s.height), - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null - }); - e = this.append(e, scenes, i); - } - return e; -}; diff --git a/lib/protovis/src/scene/SvgCurve.js b/lib/protovis/src/scene/SvgCurve.js deleted file mode 100644 index 9013e137..00000000 --- a/lib/protovis/src/scene/SvgCurve.js +++ /dev/null @@ -1,354 +0,0 @@ -/** - * @private Converts the specified b-spline curve segment to a bezier curve - * compatible with SVG "C". - * - * @param p0 the first control point. - * @param p1 the second control point. - * @param p2 the third control point. - * @param p3 the fourth control point. - */ -pv.SvgScene.pathBasis = (function() { - - /** - * Matrix to transform basis (b-spline) control points to bezier control - * points. Derived from FvD 11.2.8. - */ - var basis = [ - [ 1/6, 2/3, 1/6, 0 ], - [ 0, 2/3, 1/3, 0 ], - [ 0, 1/3, 2/3, 0 ], - [ 0, 1/6, 2/3, 1/6 ] - ]; - - /** - * Returns the point that is the weighted sum of the specified control points, - * using the specified weights. This method requires that there are four - * weights and four control points. - */ - function weight(w, p0, p1, p2, p3) { - return { - x: w[0] * p0.left + w[1] * p1.left + w[2] * p2.left + w[3] * p3.left, - y: w[0] * p0.top + w[1] * p1.top + w[2] * p2.top + w[3] * p3.top - }; - } - - var convert = function(p0, p1, p2, p3) { - var b1 = weight(basis[1], p0, p1, p2, p3), - b2 = weight(basis[2], p0, p1, p2, p3), - b3 = weight(basis[3], p0, p1, p2, p3); - return "C" + b1.x + "," + b1.y - + "," + b2.x + "," + b2.y - + "," + b3.x + "," + b3.y; - }; - - convert.segment = function(p0, p1, p2, p3) { - var b0 = weight(basis[0], p0, p1, p2, p3), - b1 = weight(basis[1], p0, p1, p2, p3), - b2 = weight(basis[2], p0, p1, p2, p3), - b3 = weight(basis[3], p0, p1, p2, p3); - return "M" + b0.x + "," + b0.y - + "C" + b1.x + "," + b1.y - + "," + b2.x + "," + b2.y - + "," + b3.x + "," + b3.y; - }; - - return convert; -})(); - -/** - * @private Interpolates the given points using the basis spline interpolation. - * Returns an SVG path without the leading M instruction to allow path - * appending. - * - * @param points the array of points. - */ -pv.SvgScene.curveBasis = function(points) { - if (points.length <= 2) return ""; - var path = "", - p0 = points[0], - p1 = p0, - p2 = p0, - p3 = points[1]; - path += this.pathBasis(p0, p1, p2, p3); - for (var i = 2; i < points.length; i++) { - p0 = p1; - p1 = p2; - p2 = p3; - p3 = points[i]; - path += this.pathBasis(p0, p1, p2, p3); - } - /* Cycle through to get the last point. */ - path += this.pathBasis(p1, p2, p3, p3); - path += this.pathBasis(p2, p3, p3, p3); - return path; -}; - -/** - * @private Interpolates the given points using the basis spline interpolation. - * If points.length == tangents.length then a regular Hermite interpolation is - * performed, if points.length == tangents.length + 2 then the first and last - * segments are filled in with cubic bazier segments. Returns an array of path - * strings. - * - * @param points the array of points. - */ -pv.SvgScene.curveBasisSegments = function(points) { - if (points.length <= 2) return ""; - var paths = [], - p0 = points[0], - p1 = p0, - p2 = p0, - p3 = points[1], - firstPath = this.pathBasis.segment(p0, p1, p2, p3); - - p0 = p1; - p1 = p2; - p2 = p3; - p3 = points[2]; - paths.push(firstPath + this.pathBasis(p0, p1, p2, p3)); // merge first & second path - for (var i = 3; i < points.length; i++) { - p0 = p1; - p1 = p2; - p2 = p3; - p3 = points[i]; - paths.push(this.pathBasis.segment(p0, p1, p2, p3)); - } - - // merge last & second-to-last path - paths.push(this.pathBasis.segment(p1, p2, p3, p3) + this.pathBasis(p2, p3, p3, p3)); - return paths; -}; - -/** - * @private Interpolates the given points with respective tangents using the cubic - * Hermite spline interpolation. If points.length == tangents.length then a regular - * Hermite interpolation is performed, if points.length == tangents.length + 2 then - * the first and last segments are filled in with cubic bazier segments. - * Returns an SVG path without the leading M instruction to allow path appending. - * - * @param points the array of points. - * @param tangents the array of tangent vectors. - */ -pv.SvgScene.curveHermite = function(points, tangents) { - if (tangents.length < 1 - || (points.length != tangents.length - && points.length != tangents.length + 2)) return ""; - var quad = points.length != tangents.length, - path = "", - p0 = points[0], - p = points[1], - t0 = tangents[0], - t = t0, - pi = 1; - - if (quad) { - path += "Q" + (p.left - t0.x * 2 / 3) + "," + (p.top - t0.y * 2 / 3) - + "," + p.left + "," + p.top; - p0 = points[1]; - pi = 2; - } - - if (tangents.length > 1) { - t = tangents[1]; - p = points[pi]; - pi++; - path += "C" + (p0.left + t0.x) + "," + (p0.top + t0.y) - + "," + (p.left - t.x) + "," + (p.top - t.y) - + "," + p.left + "," + p.top; - for (var i = 2; i < tangents.length; i++, pi++) { - p = points[pi]; - t = tangents[i]; - path += "S" + (p.left - t.x) + "," + (p.top - t.y) - + "," + p.left + "," + p.top; - } - } - - if (quad) { - var lp = points[pi]; - path += "Q" + (p.left + t.x * 2 / 3) + "," + (p.top + t.y * 2 / 3) + "," - + lp.left + "," + lp.top; - } - - return path; -}; - -/** - * @private Interpolates the given points with respective tangents using the - * cubic Hermite spline interpolation. Returns an array of path strings. - * - * @param points the array of points. - * @param tangents the array of tangent vectors. - */ -pv.SvgScene.curveHermiteSegments = function(points, tangents) { - if (tangents.length < 1 - || (points.length != tangents.length - && points.length != tangents.length + 2)) return []; - var quad = points.length != tangents.length, - paths = [], - p0 = points[0], - p = p0, - t0 = tangents[0], - t = t0, - pi = 1; - - if (quad) { - p = points[1]; - paths.push("M" + p0.left + "," + p0.top - + "Q" + (p.left - t.x * 2 / 3) + "," + (p.top - t.y * 2 / 3) - + "," + p.left + "," + p.top); - pi = 2; - } - - for (var i = 1; i < tangents.length; i++, pi++) { - p0 = p; - t0 = t; - p = points[pi]; - t = tangents[i]; - paths.push("M" + p0.left + "," + p0.top - + "C" + (p0.left + t0.x) + "," + (p0.top + t0.y) - + "," + (p.left - t.x) + "," + (p.top - t.y) - + "," + p.left + "," + p.top); - } - - if (quad) { - var lp = points[pi]; - paths.push("M" + p.left + "," + p.top - + "Q" + (p.left + t.x * 2 / 3) + "," + (p.top + t.y * 2 / 3) + "," - + lp.left + "," + lp.top); - } - - return paths; -}; - -/** - * @private Computes the tangents for the given points needed for cardinal - * spline interpolation. Returns an array of tangent vectors. Note: that for n - * points only the n-2 well defined tangents are returned. - * - * @param points the array of points. - * @param tension the tension of hte cardinal spline. - */ -pv.SvgScene.cardinalTangents = function(points, tension) { - var tangents = [], - a = (1 - tension) / 2, - p0 = points[0], - p1 = points[1], - p2 = points[2]; - - for (var i = 3; i < points.length; i++) { - tangents.push({x: a * (p2.left - p0.left), y: a * (p2.top - p0.top)}); - p0 = p1; - p1 = p2; - p2 = points[i]; - } - - tangents.push({x: a * (p2.left - p0.left), y: a * (p2.top - p0.top)}); - return tangents; -}; - -/** - * @private Interpolates the given points using cardinal spline interpolation. - * Returns an SVG path without the leading M instruction to allow path - * appending. - * - * @param points the array of points. - * @param tension the tension of hte cardinal spline. - */ -pv.SvgScene.curveCardinal = function(points, tension) { - if (points.length <= 2) return ""; - return this.curveHermite(points, this.cardinalTangents(points, tension)); -}; - -/** - * @private Interpolates the given points using cardinal spline interpolation. - * Returns an array of path strings. - * - * @param points the array of points. - * @param tension the tension of hte cardinal spline. - */ -pv.SvgScene.curveCardinalSegments = function(points, tension) { - if (points.length <= 2) return ""; - return this.curveHermiteSegments(points, this.cardinalTangents(points, tension)); -}; - -/** - * @private Interpolates the given points using Fritsch-Carlson Monotone cubic - * Hermite interpolation. Returns an array of tangent vectors. - * - * @param points the array of points. - */ -pv.SvgScene.monotoneTangents = function(points) { - var tangents = [], - d = [], - m = [], - dx = [], - k = 0; - - /* Compute the slopes of the secant lines between successive points. */ - for (k = 0; k < points.length-1; k++) { - d[k] = (points[k+1].top - points[k].top)/(points[k+1].left - points[k].left); - } - - /* Initialize the tangents at every point as the average of the secants. */ - m[0] = d[0]; - dx[0] = points[1].left - points[0].left; - for (k = 1; k < points.length - 1; k++) { - m[k] = (d[k-1]+d[k])/2; - dx[k] = (points[k+1].left - points[k-1].left)/2; - } - m[k] = d[k-1]; - dx[k] = (points[k].left - points[k-1].left); - - /* Step 3. Very important, step 3. Yep. Wouldn't miss it. */ - for (k = 0; k < points.length - 1; k++) { - if (d[k] == 0) { - m[ k ] = 0; - m[k+1] = 0; - } - } - - /* Step 4 + 5. Out of 5 or more steps. */ - for (k = 0; k < points.length - 1; k++) { - if ((Math.abs(m[k]) < 1e-5) || (Math.abs(m[k+1]) < 1e-5)) continue; - var ak = m[k] / d[k], - bk = m[k + 1] / d[k], - s = ak * ak + bk * bk; // monotone constant (?) - if (s > 9) { - var tk = 3 / Math.sqrt(s); - m[k] = tk * ak * d[k]; - m[k + 1] = tk * bk * d[k]; - } - } - - var len; - for (var i = 0; i < points.length; i++) { - len = 1 + m[i] * m[i]; // pv.vector(1, m[i]).norm().times(dx[i]/3) - tangents.push({x: dx[i] / 3 / len, y: m[i] * dx[i] / 3 / len}); - } - - return tangents; -}; - -/** - * @private Interpolates the given points using Fritsch-Carlson Monotone cubic - * Hermite interpolation. Returns an SVG path without the leading M instruction - * to allow path appending. - * - * @param points the array of points. - */ -pv.SvgScene.curveMonotone = function(points) { - if (points.length <= 2) return ""; - return this.curveHermite(points, this.monotoneTangents(points)); -} - -/** - * @private Interpolates the given points using Fritsch-Carlson Monotone cubic - * Hermite interpolation. - * Returns an array of path strings. - * - * @param points the array of points. - */ -pv.SvgScene.curveMonotoneSegments = function(points) { - if (points.length <= 2) return ""; - return this.curveHermiteSegments(points, this.monotoneTangents(points)); -}; diff --git a/lib/protovis/src/scene/SvgDot.js b/lib/protovis/src/scene/SvgDot.js deleted file mode 100644 index e857469f..00000000 --- a/lib/protovis/src/scene/SvgDot.js +++ /dev/null @@ -1,81 +0,0 @@ -pv.SvgScene.dot = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - var fill = s.fillStyle, stroke = s.strokeStyle; - if (!fill.opacity && !stroke.opacity) continue; - - /* points */ - var radius = s.radius, path = null; - switch (s.shape) { - case "cross": { - path = "M" + -radius + "," + -radius - + "L" + radius + "," + radius - + "M" + radius + "," + -radius - + "L" + -radius + "," + radius; - break; - } - case "triangle": { - var h = radius, w = radius * 1.1547; // 2 / Math.sqrt(3) - path = "M0," + h - + "L" + w +"," + -h - + " " + -w + "," + -h - + "Z"; - break; - } - case "diamond": { - radius *= Math.SQRT2; - path = "M0," + -radius - + "L" + radius + ",0" - + " 0," + radius - + " " + -radius + ",0" - + "Z"; - break; - } - case "square": { - path = "M" + -radius + "," + -radius - + "L" + radius + "," + -radius - + " " + radius + "," + radius - + " " + -radius + "," + radius - + "Z"; - break; - } - case "tick": { - path = "M0,0L0," + -s.size; - break; - } - case "bar": { - path = "M0," + (s.size / 2) + "L0," + -(s.size / 2); - break; - } - } - - /* Use for circles, for everything else. */ - var svg = { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null - }; - if (path) { - svg.transform = "translate(" + s.left + "," + s.top + ")"; - if (s.angle) svg.transform += " rotate(" + 180 * s.angle / Math.PI + ")"; - svg.d = path; - e = this.expect(e, "path", svg); - } else { - svg.cx = s.left; - svg.cy = s.top; - svg.r = radius; - e = this.expect(e, "circle", svg); - } - e = this.append(e, scenes, i); - } - return e; -}; diff --git a/lib/protovis/src/scene/SvgImage.js b/lib/protovis/src/scene/SvgImage.js deleted file mode 100644 index 88630012..00000000 --- a/lib/protovis/src/scene/SvgImage.js +++ /dev/null @@ -1,45 +0,0 @@ -pv.SvgScene.image = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - - /* fill */ - e = this.fill(e, scenes, i); - - /* image */ - if (s.image) { - e = this.expect(e, "foreignObject", { - "cursor": s.cursor, - "x": s.left, - "y": s.top, - "width": s.width, - "height": s.height - }); - var c = e.firstChild || e.appendChild(document.createElementNS(this.xhtml, "canvas")); - c.$scene = {scenes:scenes, index:i}; - c.style.width = s.width; - c.style.height = s.height; - c.width = s.imageWidth; - c.height = s.imageHeight; - c.getContext("2d").putImageData(s.image, 0, 0); - } else { - e = this.expect(e, "image", { - "preserveAspectRatio": "none", - "cursor": s.cursor, - "x": s.left, - "y": s.top, - "width": s.width, - "height": s.height - }); - e.setAttributeNS(this.xlink, "href", s.url); - } - e = this.append(e, scenes, i); - - /* stroke */ - e = this.stroke(e, scenes, i); - } - return e; -}; diff --git a/lib/protovis/src/scene/SvgLabel.js b/lib/protovis/src/scene/SvgLabel.js deleted file mode 100644 index b39c99fb..00000000 --- a/lib/protovis/src/scene/SvgLabel.js +++ /dev/null @@ -1,46 +0,0 @@ -pv.SvgScene.label = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - var fill = s.textStyle; - if (!fill.opacity || !s.text) continue; - - /* text-baseline, text-align */ - var x = 0, y = 0, dy = 0, anchor = "start"; - switch (s.textBaseline) { - case "middle": dy = ".35em"; break; - case "top": dy = ".71em"; y = s.textMargin; break; - case "bottom": y = "-" + s.textMargin; break; - } - switch (s.textAlign) { - case "right": anchor = "end"; x = "-" + s.textMargin; break; - case "center": anchor = "middle"; break; - case "left": x = s.textMargin; break; - } - - e = this.expect(e, "text", { - "pointer-events": s.events, - "cursor": s.cursor, - "x": x, - "y": y, - "dy": dy, - "transform": "translate(" + s.left + "," + s.top + ")" - + (s.textAngle ? " rotate(" + 180 * s.textAngle / Math.PI + ")" : "") - + (this.scale != 1 ? " scale(" + 1 / this.scale + ")" : ""), - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "text-anchor": anchor - }, { - "font": s.font, - "text-shadow": s.textShadow, - "text-decoration": s.textDecoration - }); - if (e.firstChild) e.firstChild.nodeValue = s.text; - else e.appendChild(document.createTextNode(s.text)); - e = this.append(e, scenes, i); - } - return e; -}; diff --git a/lib/protovis/src/scene/SvgLine.js b/lib/protovis/src/scene/SvgLine.js deleted file mode 100644 index e4f198e0..00000000 --- a/lib/protovis/src/scene/SvgLine.js +++ /dev/null @@ -1,159 +0,0 @@ -pv.SvgScene.line = function(scenes) { - var e = scenes.$g.firstChild; - if (scenes.length < 2) return e; - var s = scenes[0]; - - /* segmented */ - if (s.segmented) return this.lineSegment(scenes); - - /* visible */ - if (!s.visible) return e; - var fill = s.fillStyle, stroke = s.strokeStyle; - if (!fill.opacity && !stroke.opacity) return e; - - /* points */ - var d = "M" + s.left + "," + s.top; - - if (scenes.length > 2 && (s.interpolate == "basis" || s.interpolate == "cardinal" || s.interpolate == "monotone")) { - switch (s.interpolate) { - case "basis": d += this.curveBasis(scenes); break; - case "cardinal": d += this.curveCardinal(scenes, s.tension); break; - case "monotone": d += this.curveMonotone(scenes); break; - } - } else { - for (var i = 1; i < scenes.length; i++) { - d += this.pathSegment(scenes[i - 1], scenes[i]); - } - } - - e = this.expect(e, "path", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "d": d, - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null, - "stroke-linejoin": s.lineJoin - }); - return this.append(e, scenes, 0); -}; - -pv.SvgScene.lineSegment = function(scenes) { - var e = scenes.$g.firstChild; - - var s = scenes[0]; - var paths; - switch (s.interpolate) { - case "basis": paths = this.curveBasisSegments(scenes); break; - case "cardinal": paths = this.curveCardinalSegments(scenes, s.tension); break; - case "monotone": paths = this.curveMonotoneSegments(scenes); break; - } - - for (var i = 0, n = scenes.length - 1; i < n; i++) { - var s1 = scenes[i], s2 = scenes[i + 1]; - - /* visible */ - if (!s1.visible || !s2.visible) continue; - var stroke = s1.strokeStyle, fill = pv.Color.transparent; - if (!stroke.opacity) continue; - - /* interpolate */ - var d; - if ((s1.interpolate == "linear") && (s1.lineJoin == "miter")) { - fill = stroke; - stroke = pv.Color.transparent; - d = this.pathJoin(scenes[i - 1], s1, s2, scenes[i + 2]); - } else if(paths) { - d = paths[i]; - } else { - d = "M" + s1.left + "," + s1.top + this.pathSegment(s1, s2); - } - - e = this.expect(e, "path", { - "shape-rendering": s1.antialias ? null : "crispEdges", - "pointer-events": s1.events, - "cursor": s1.cursor, - "d": d, - "fill": fill.color, - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s1.lineWidth / this.scale : null, - "stroke-linejoin": s1.lineJoin - }); - e = this.append(e, scenes, i); - } - return e; -}; - -/** @private Returns the path segment for the specified points. */ -pv.SvgScene.pathSegment = function(s1, s2) { - var l = 1; // sweep-flag - switch (s1.interpolate) { - case "polar-reverse": - l = 0; - case "polar": { - var dx = s2.left - s1.left, - dy = s2.top - s1.top, - e = 1 - s1.eccentricity, - r = Math.sqrt(dx * dx + dy * dy) / (2 * e); - if ((e <= 0) || (e > 1)) break; // draw a straight line - return "A" + r + "," + r + " 0 0," + l + " " + s2.left + "," + s2.top; - } - case "step-before": return "V" + s2.top + "H" + s2.left; - case "step-after": return "H" + s2.left + "V" + s2.top; - } - return "L" + s2.left + "," + s2.top; -}; - -/** @private Line-line intersection, per Akenine-Moller 16.16.1. */ -pv.SvgScene.lineIntersect = function(o1, d1, o2, d2) { - return o1.plus(d1.times(o2.minus(o1).dot(d2.perp()) / d1.dot(d2.perp()))); -} - -/** @private Returns the miter join path for the specified points. */ -pv.SvgScene.pathJoin = function(s0, s1, s2, s3) { - /* - * P1-P2 is the current line segment. V is a vector that is perpendicular to - * the line segment, and has length lineWidth / 2. ABCD forms the initial - * bounding box of the line segment (i.e., the line segment if we were to do - * no joins). - */ - var p1 = pv.vector(s1.left, s1.top), - p2 = pv.vector(s2.left, s2.top), - p = p2.minus(p1), - v = p.perp().norm(), - w = v.times(s1.lineWidth / (2 * this.scale)), - a = p1.plus(w), - b = p2.plus(w), - c = p2.minus(w), - d = p1.minus(w); - - /* - * Start join. P0 is the previous line segment's start point. We define the - * cutting plane as the average of the vector perpendicular to P0-P1, and - * the vector perpendicular to P1-P2. This insures that the cross-section of - * the line on the cutting plane is equal if the line-width is unchanged. - * Note that we don't implement miter limits, so these can get wild. - */ - if (s0 && s0.visible) { - var v1 = p1.minus(s0.left, s0.top).perp().norm().plus(v); - d = this.lineIntersect(p1, v1, d, p); - a = this.lineIntersect(p1, v1, a, p); - } - - /* Similarly, for end join. */ - if (s3 && s3.visible) { - var v2 = pv.vector(s3.left, s3.top).minus(p2).perp().norm().plus(v); - c = this.lineIntersect(p2, v2, c, p); - b = this.lineIntersect(p2, v2, b, p); - } - - return "M" + a.x + "," + a.y - + "L" + b.x + "," + b.y - + " " + c.x + "," + c.y - + " " + d.x + "," + d.y; -}; diff --git a/lib/protovis/src/scene/SvgPanel.js b/lib/protovis/src/scene/SvgPanel.js deleted file mode 100644 index 45c5c0ad..00000000 --- a/lib/protovis/src/scene/SvgPanel.js +++ /dev/null @@ -1,126 +0,0 @@ -pv.SvgScene.panel = function(scenes) { - var g = scenes.$g, e = g && g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - - /* svg */ - if (!scenes.parent) { - s.canvas.style.display = "inline-block"; - if (g && (g.parentNode != s.canvas)) { - g = s.canvas.firstChild; - e = g && g.firstChild; - } - if (!g) { - g = s.canvas.appendChild(this.create("svg")); - g.setAttribute("font-size", "10px"); - g.setAttribute("font-family", "sans-serif"); - g.setAttribute("fill", "none"); - g.setAttribute("stroke", "none"); - g.setAttribute("stroke-width", 1.5); - for (var j = 0; j < this.events.length; j++) { - g.addEventListener(this.events[j], this.dispatch, false); - } - e = g.firstChild; - } - scenes.$g = g; - g.setAttribute("width", s.width + s.left + s.right); - g.setAttribute("height", s.height + s.top + s.bottom); - } - - /* clip (nest children) */ - if (s.overflow == "hidden") { - var id = pv.id().toString(36), - c = this.expect(e, "g", {"clip-path": "url(#" + id + ")"}); - if (!c.parentNode) g.appendChild(c); - scenes.$g = g = c; - e = c.firstChild; - - e = this.expect(e, "clipPath", {"id": id}); - var r = e.firstChild || e.appendChild(this.create("rect")); - r.setAttribute("x", s.left); - r.setAttribute("y", s.top); - r.setAttribute("width", s.width); - r.setAttribute("height", s.height); - if (!e.parentNode) g.appendChild(e); - e = e.nextSibling; - } - - /* fill */ - e = this.fill(e, scenes, i); - - /* transform (push) */ - var k = this.scale, - t = s.transform, - x = s.left + t.x, - y = s.top + t.y; - this.scale *= t.k; - - /* children */ - for (var j = 0; j < s.children.length; j++) { - s.children[j].$g = e = this.expect(e, "g", { - "transform": "translate(" + x + "," + y + ")" - + (t.k != 1 ? " scale(" + t.k + ")" : "") - }); - this.updateAll(s.children[j]); - if (!e.parentNode) g.appendChild(e); - e = e.nextSibling; - } - - /* transform (pop) */ - this.scale = k; - - /* stroke */ - e = this.stroke(e, scenes, i); - - /* clip (restore group) */ - if (s.overflow == "hidden") { - scenes.$g = g = c.parentNode; - e = c.nextSibling; - } - } - return e; -}; - -pv.SvgScene.fill = function(e, scenes, i) { - var s = scenes[i], fill = s.fillStyle; - if (fill.opacity || s.events == "all") { - e = this.expect(e, "rect", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "x": s.left, - "y": s.top, - "width": s.width, - "height": s.height, - "fill": fill.color, - "fill-opacity": fill.opacity, - "stroke": null - }); - e = this.append(e, scenes, i); - } - return e; -}; - -pv.SvgScene.stroke = function(e, scenes, i) { - var s = scenes[i], stroke = s.strokeStyle; - if (stroke.opacity || s.events == "all") { - e = this.expect(e, "rect", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events == "all" ? "stroke" : s.events, - "cursor": s.cursor, - "x": s.left, - "y": s.top, - "width": Math.max(1E-10, s.width), - "height": Math.max(1E-10, s.height), - "fill": null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity, - "stroke-width": s.lineWidth / this.scale - }); - e = this.append(e, scenes, i); - } - return e; -}; diff --git a/lib/protovis/src/scene/SvgRule.js b/lib/protovis/src/scene/SvgRule.js deleted file mode 100644 index 98fc7982..00000000 --- a/lib/protovis/src/scene/SvgRule.js +++ /dev/null @@ -1,26 +0,0 @@ -pv.SvgScene.rule = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - var stroke = s.strokeStyle; - if (!stroke.opacity) continue; - - e = this.expect(e, "line", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "x1": s.left, - "y1": s.top, - "x2": s.left + s.width, - "y2": s.top + s.height, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity, - "stroke-width": s.lineWidth / this.scale - }); - e = this.append(e, scenes, i); - } - return e; -}; diff --git a/lib/protovis/src/scene/SvgScene.js b/lib/protovis/src/scene/SvgScene.js deleted file mode 100644 index 177c51ae..00000000 --- a/lib/protovis/src/scene/SvgScene.js +++ /dev/null @@ -1,185 +0,0 @@ -/** - * @private - * @namespace - */ -pv.Scene = pv.SvgScene = { - /* Various namespaces. */ - svg: "http://www.w3.org/2000/svg", - xmlns: "http://www.w3.org/2000/xmlns", - xlink: "http://www.w3.org/1999/xlink", - xhtml: "http://www.w3.org/1999/xhtml", - - /** The pre-multipled scale, based on any enclosing transforms. */ - scale: 1, - - /** The set of supported events. */ - events: [ - "DOMMouseScroll", // for Firefox - "mousewheel", - "mousedown", - "mouseup", - "mouseover", - "mouseout", - "mousemove", - "click", - "dblclick" - ], - - /** Implicit values for SVG and CSS properties. */ - implicit: { - svg: { - "shape-rendering": "auto", - "pointer-events": "painted", - "x": 0, - "y": 0, - "dy": 0, - "text-anchor": "start", - "transform": "translate(0,0)", - "fill": "none", - "fill-opacity": 1, - "stroke": "none", - "stroke-opacity": 1, - "stroke-width": 1.5, - "stroke-linejoin": "miter" - }, - css: { - "font": "10px sans-serif" - } - } -}; - -/** - * Updates the display for the specified array of scene nodes. - * - * @param scenes {array} an array of scene nodes. - */ -pv.SvgScene.updateAll = function(scenes) { - if (scenes.length - && scenes[0].reverse - && (scenes.type != "line") - && (scenes.type != "area")) { - var reversed = pv.extend(scenes); - for (var i = 0, j = scenes.length - 1; j >= 0; i++, j--) { - reversed[i] = scenes[j]; - } - scenes = reversed; - } - this.removeSiblings(this[scenes.type](scenes)); -}; - -/** - * Creates a new SVG element of the specified type. - * - * @param type {string} an SVG element type, such as "rect". - * @returns a new SVG element. - */ -pv.SvgScene.create = function(type) { - return document.createElementNS(this.svg, type); -}; - -/** - * Expects the element e to be the specified type. If the element does - * not exist, a new one is created. If the element does exist but is the wrong - * type, it is replaced with the specified element. - * - * @param e the current SVG element. - * @param type {string} an SVG element type, such as "rect". - * @param attributes an optional attribute map. - * @param style an optional style map. - * @returns a new SVG element. - */ -pv.SvgScene.expect = function(e, type, attributes, style) { - if (e) { - if (e.tagName == "a") e = e.firstChild; - if (e.tagName != type) { - var n = this.create(type); - e.parentNode.replaceChild(n, e); - e = n; - } - } else { - e = this.create(type); - } - for (var name in attributes) { - var value = attributes[name]; - if (value == this.implicit.svg[name]) value = null; - if (value == null) e.removeAttribute(name); - else e.setAttribute(name, value); - } - for (var name in style) { - var value = style[name]; - if (value == this.implicit.css[name]) value = null; - if (value == null) e.style.removeProperty(name); - else e.style[name] = value; - } - return e; -}; - -/** TODO */ -pv.SvgScene.append = function(e, scenes, index) { - e.$scene = {scenes:scenes, index:index}; - e = this.title(e, scenes[index]); - if (!e.parentNode) scenes.$g.appendChild(e); - return e.nextSibling; -}; - -/** - * Applies a title tooltip to the specified element e, using the - * title property of the specified scene node s. Note that - * this implementation does not create an SVG title element as a child - * of e; although this is the recommended standard, it is only - * supported in Opera. Instead, an anchor element is created around the element - * e, and the xlink:title attribute is set accordingly. - * - * @param e an SVG element. - * @param s a scene node. - */ -pv.SvgScene.title = function(e, s) { - var a = e.parentNode; - if (a && (a.tagName != "a")) a = null; - if (s.title) { - if (!a) { - a = this.create("a"); - if (e.parentNode) e.parentNode.replaceChild(a, e); - a.appendChild(e); - } - a.setAttributeNS(this.xlink, "title", s.title); - return a; - } - if (a) a.parentNode.replaceChild(e, a); - return e; -}; - -/** TODO */ -pv.SvgScene.dispatch = pv.listener(function(e) { - var t = e.target.$scene; - if (t) { - var type = e.type; - - /* Fixes for mousewheel support on Firefox & Opera. */ - switch (type) { - case "DOMMouseScroll": { - type = "mousewheel"; - e.wheel = -480 * e.detail; - break; - } - case "mousewheel": { - e.wheel = (window.opera ? 12 : 1) * e.wheelDelta; - break; - } - } - - if (pv.Mark.dispatch(type, t.scenes, t.index)) e.preventDefault(); - } -}); - -/** @private Remove siblings following element e. */ -pv.SvgScene.removeSiblings = function(e) { - while (e) { - var n = e.nextSibling; - e.parentNode.removeChild(e); - e = n; - } -}; - -/** @private Do nothing when rendering undefined mark types. */ -pv.SvgScene.undefined = function() {}; diff --git a/lib/protovis/src/scene/SvgWedge.js b/lib/protovis/src/scene/SvgWedge.js deleted file mode 100644 index d8ed9a8e..00000000 --- a/lib/protovis/src/scene/SvgWedge.js +++ /dev/null @@ -1,66 +0,0 @@ -pv.SvgScene.wedge = function(scenes) { - var e = scenes.$g.firstChild; - for (var i = 0; i < scenes.length; i++) { - var s = scenes[i]; - - /* visible */ - if (!s.visible) continue; - var fill = s.fillStyle, stroke = s.strokeStyle; - if (!fill.opacity && !stroke.opacity) continue; - - /* points */ - var r1 = s.innerRadius, r2 = s.outerRadius, a = Math.abs(s.angle), p; - if (a >= 2 * Math.PI) { - if (r1) { - p = "M0," + r2 - + "A" + r2 + "," + r2 + " 0 1,1 0," + (-r2) - + "A" + r2 + "," + r2 + " 0 1,1 0," + r2 - + "M0," + r1 - + "A" + r1 + "," + r1 + " 0 1,1 0," + (-r1) - + "A" + r1 + "," + r1 + " 0 1,1 0," + r1 - + "Z"; - } else { - p = "M0," + r2 - + "A" + r2 + "," + r2 + " 0 1,1 0," + (-r2) - + "A" + r2 + "," + r2 + " 0 1,1 0," + r2 - + "Z"; - } - } else { - var sa = Math.min(s.startAngle, s.endAngle), - ea = Math.max(s.startAngle, s.endAngle), - c1 = Math.cos(sa), c2 = Math.cos(ea), - s1 = Math.sin(sa), s2 = Math.sin(ea); - if (r1) { - p = "M" + r2 * c1 + "," + r2 * s1 - + "A" + r2 + "," + r2 + " 0 " - + ((a < Math.PI) ? "0" : "1") + ",1 " - + r2 * c2 + "," + r2 * s2 - + "L" + r1 * c2 + "," + r1 * s2 - + "A" + r1 + "," + r1 + " 0 " - + ((a < Math.PI) ? "0" : "1") + ",0 " - + r1 * c1 + "," + r1 * s1 + "Z"; - } else { - p = "M" + r2 * c1 + "," + r2 * s1 - + "A" + r2 + "," + r2 + " 0 " - + ((a < Math.PI) ? "0" : "1") + ",1 " - + r2 * c2 + "," + r2 * s2 + "L0,0Z"; - } - } - - e = this.expect(e, "path", { - "shape-rendering": s.antialias ? null : "crispEdges", - "pointer-events": s.events, - "cursor": s.cursor, - "transform": "translate(" + s.left + "," + s.top + ")", - "d": p, - "fill": fill.color, - "fill-rule": "evenodd", - "fill-opacity": fill.opacity || null, - "stroke": stroke.color, - "stroke-opacity": stroke.opacity || null, - "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null - }); - e = this.append(e, scenes, i); - } - return e; -}; diff --git a/lib/protovis/src/text/DateFormat.js b/lib/protovis/src/text/DateFormat.js deleted file mode 100644 index 5a3851e1..00000000 --- a/lib/protovis/src/text/DateFormat.js +++ /dev/null @@ -1,262 +0,0 @@ -/** - * Constructs a new date format with the specified string pattern. - * - * @class The format string is in the same format expected by the - * strftime function in C. The following conversion specifications are - * supported:
    - * - *
  • %a - abbreviated weekday name.
  • - *
  • %A - full weekday name.
  • - *
  • %b - abbreviated month names.
  • - *
  • %B - full month names.
  • - *
  • %c - locale's appropriate date and time.
  • - *
  • %C - century number.
  • - *
  • %d - day of month [01,31] (zero padded).
  • - *
  • %D - same as %m/%d/%y.
  • - *
  • %e - day of month [ 1,31] (space padded).
  • - *
  • %h - same as %b.
  • - *
  • %H - hour (24-hour clock) [00,23] (zero padded).
  • - *
  • %I - hour (12-hour clock) [01,12] (zero padded).
  • - *
  • %m - month number [01,12] (zero padded).
  • - *
  • %M - minute [0,59] (zero padded).
  • - *
  • %n - newline character.
  • - *
  • %p - locale's equivalent of a.m. or p.m.
  • - *
  • %r - same as %I:%M:%S %p.
  • - *
  • %R - same as %H:%M.
  • - *
  • %S - second [00,61] (zero padded).
  • - *
  • %t - tab character.
  • - *
  • %T - same as %H:%M:%S.
  • - *
  • %x - same as %m/%d/%y.
  • - *
  • %X - same as %I:%M:%S %p.
  • - *
  • %y - year with century [00,99] (zero padded).
  • - *
  • %Y - year including century.
  • - *
  • %% - %.
  • - * - *
The following conversion specifications are currently unsupported - * for formatting:
    - * - *
  • %j - day number [1,366].
  • - *
  • %u - weekday number [1,7].
  • - *
  • %U - week number [00,53].
  • - *
  • %V - week number [01,53].
  • - *
  • %w - weekday number [0,6].
  • - *
  • %W - week number [00,53].
  • - *
  • %Z - timezone name or abbreviation.
  • - * - *
In addition, the following conversion specifications are currently - * unsupported for parsing:
    - * - *
  • %a - day of week, either abbreviated or full name.
  • - *
  • %A - same as %a.
  • - *
  • %c - locale's appropriate date and time.
  • - *
  • %C - century number.
  • - *
  • %D - same as %m/%d/%y.
  • - *
  • %I - hour (12-hour clock) [1,12].
  • - *
  • %n - any white space.
  • - *
  • %p - locale's equivalent of a.m. or p.m.
  • - *
  • %r - same as %I:%M:%S %p.
  • - *
  • %R - same as %H:%M.
  • - *
  • %t - same as %n.
  • - *
  • %T - same as %H:%M:%S.
  • - *
  • %x - locale's equivalent to %m/%d/%y.
  • - *
  • %X - locale's equivalent to %I:%M:%S %p.
  • - * - *
- * - * @see strftime - * documentation. - * @see strptime - * documentation. - * @extends pv.Format - * @param {string} pattern the format pattern. - */ -pv.Format.date = function(pattern) { - var pad = pv.Format.pad; - - /** @private */ - function format(d) { - return pattern.replace(/%[a-zA-Z0-9]/g, function(s) { - switch (s) { - case '%a': return [ - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" - ][d.getDay()]; - case '%A': return [ - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", - "Saturday" - ][d.getDay()]; - case '%h': - case '%b': return [ - "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", - "Oct", "Nov", "Dec" - ][d.getMonth()]; - case '%B': return [ - "January", "February", "March", "April", "May", "June", "July", - "August", "September", "October", "November", "December" - ][d.getMonth()]; - case '%c': return d.toLocaleString(); - case '%C': return pad("0", 2, Math.floor(d.getFullYear() / 100) % 100); - case '%d': return pad("0", 2, d.getDate()); - case '%x': - case '%D': return pad("0", 2, d.getMonth() + 1) - + "/" + pad("0", 2, d.getDate()) - + "/" + pad("0", 2, d.getFullYear() % 100); - case '%e': return pad(" ", 2, d.getDate()); - case '%H': return pad("0", 2, d.getHours()); - case '%I': { - var h = d.getHours() % 12; - return h ? pad("0", 2, h) : 12; - } - // TODO %j: day of year as a decimal number [001,366] - case '%m': return pad("0", 2, d.getMonth() + 1); - case '%M': return pad("0", 2, d.getMinutes()); - case '%n': return "\n"; - case '%p': return d.getHours() < 12 ? "AM" : "PM"; - case '%T': - case '%X': - case '%r': { - var h = d.getHours() % 12; - return (h ? pad("0", 2, h) : 12) - + ":" + pad("0", 2, d.getMinutes()) - + ":" + pad("0", 2, d.getSeconds()) - + " " + (d.getHours() < 12 ? "AM" : "PM"); - } - case '%R': return pad("0", 2, d.getHours()) + ":" + pad("0", 2, d.getMinutes()); - case '%S': return pad("0", 2, d.getSeconds()); - case '%Q': return pad("0", 3, d.getMilliseconds()); - case '%t': return "\t"; - case '%u': { - var w = d.getDay(); - return w ? w : 1; - } - // TODO %U: week number (sunday first day) [00,53] - // TODO %V: week number (monday first day) [01,53] ... with weirdness - case '%w': return d.getDay(); - // TODO %W: week number (monday first day) [00,53] ... with weirdness - case '%y': return pad("0", 2, d.getFullYear() % 100); - case '%Y': return d.getFullYear(); - // TODO %Z: timezone name or abbreviation - case '%%': return "%"; - } - return s; - }); - } - - /** - * Converts a date to a string using the associated formatting pattern. - * - * @function - * @name pv.Format.date.prototype.format - * @param {Date} date a date to format. - * @returns {string} the formatted date as a string. - */ - format.format = format; - - /** - * Parses a date from a string using the associated formatting pattern. - * - * @function - * @name pv.Format.date.prototype.parse - * @param {string} s the string to parse as a date. - * @returns {Date} the parsed date. - */ - format.parse = function(s) { - var year = 1970, month = 0, date = 1, hour = 0, minute = 0, second = 0; - var fields = [function() {}]; - - /* Register callbacks for each field in the format pattern. */ - var re = pv.Format.re(pattern).replace(/%[a-zA-Z0-9]/g, function(s) { - switch (s) { - // TODO %a: day of week, either abbreviated or full name - // TODO %A: same as %a - case '%b': { - fields.push(function(x) { month = { - Jan: 0, Feb: 1, Mar: 2, Apr: 3, May: 4, Jun: 5, Jul: 6, Aug: 7, - Sep: 8, Oct: 9, Nov: 10, Dec: 11 - }[x]; }); - return "([A-Za-z]+)"; - } - case '%h': - case '%B': { - fields.push(function(x) { month = { - January: 0, February: 1, March: 2, April: 3, May: 4, June: 5, - July: 6, August: 7, September: 8, October: 9, November: 10, - December: 11 - }[x]; }); - return "([A-Za-z]+)"; - } - // TODO %c: locale's appropriate date and time - // TODO %C: century number[0,99] - case '%e': - case '%d': { - fields.push(function(x) { date = x; }); - return "([0-9]+)"; - } - // TODO %D: same as %m/%d/%y - case '%I': - case '%H': { - fields.push(function(x) { hour = x; }); - return "([0-9]+)"; - } - // TODO %j: day number [1,366] - case '%m': { - fields.push(function(x) { month = x - 1; }); - return "([0-9]+)"; - } - case '%M': { - fields.push(function(x) { minute = x; }); - return "([0-9]+)"; - } - // TODO %n: any white space - // TODO %p: locale's equivalent of a.m. or p.m. - case '%p': { // TODO this is a hack - fields.push(function(x) { - if (hour == 12) { - if (x == "am") hour = 0; - } else if (x == "pm") { - hour = Number(hour) + 12; - } - }); - return "(am|pm)"; - } - // TODO %r: %I:%M:%S %p - // TODO %R: %H:%M - case '%S': { - fields.push(function(x) { second = x; }); - return "([0-9]+)"; - } - // TODO %t: any white space - // TODO %T: %H:%M:%S - // TODO %U: week number [00,53] - // TODO %w: weekday [0,6] - // TODO %W: week number [00, 53] - // TODO %x: locale date (%m/%d/%y) - // TODO %X: locale time (%I:%M:%S %p) - case '%y': { - fields.push(function(x) { - x = Number(x); - year = x + (((0 <= x) && (x < 69)) ? 2000 - : (((x >= 69) && (x < 100) ? 1900 : 0))); - }); - return "([0-9]+)"; - } - case '%Y': { - fields.push(function(x) { year = x; }); - return "([0-9]+)"; - } - case '%%': { - fields.push(function() {}); - return "%"; - } - } - return s; - }); - - var match = s.match(re); - if (match) match.forEach(function(m, i) { fields[i](m); }); - return new Date(year, month, date, hour, minute, second); - }; - - return format; -}; diff --git a/lib/protovis/src/text/Format.js b/lib/protovis/src/text/Format.js deleted file mode 100644 index dadee4a2..00000000 --- a/lib/protovis/src/text/Format.js +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Abstract; see an implementing class. - * - * @class Represents an abstract text formatter and parser. A format is a - * function that converts an object of a given type, such as a Date, to - * a human-readable string representation. The format may also have a - * {@link #parse} method for converting a string representation back to the - * given object type. - * - *

Because formats are themselves functions, they can be used directly as - * mark properties. For example, if the data associated with a label are dates, - * a date format can be used as label text: - * - *

    .text(pv.Format.date("%m/%d/%y"))
- * - * And as with scales, if the format is used in multiple places, it can be - * convenient to declare it as a global variable and then reference it from the - * appropriate property functions. For example, if the data has a date - * attribute, and format references a given date format: - * - *
    .text(function(d) format(d.date))
- * - * Similarly, to parse a string into a date: - * - *
var date = format.parse("4/30/2010");
- * - * Not all format implementations support parsing. See the implementing class - * for details. - * - * @see pv.Format.date - * @see pv.Format.number - * @see pv.Format.time - */ -pv.Format = {}; - -/** - * Formats the specified object, returning the string representation. - * - * @function - * @name pv.Format.prototype.format - * @param {object} x the object to format. - * @returns {string} the formatted string. - */ - -/** - * Parses the specified string, returning the object representation. - * - * @function - * @name pv.Format.prototype.parse - * @param {string} x the string to parse. - * @returns {object} the parsed object. - */ - -/** - * @private Given a string that may be used as part of a regular expression, - * this methods returns an appropriately quoted version of the specified string, - * with any special characters escaped. - * - * @param {string} s a string to quote. - * @returns {string} the quoted string. - */ -pv.Format.re = function(s) { - return s.replace(/[\\\^\$\*\+\?\[\]\(\)\.\{\}]/g, "\\$&"); -}; - -/** - * @private Optionally pads the specified string s so that it is at least - * n characters long, using the padding character c. - * - * @param {string} c the padding character. - * @param {number} n the minimum string length. - * @param {string} s the string to pad. - * @returns {string} the padded string. - */ -pv.Format.pad = function(c, n, s) { - var m = n - String(s).length; - return (m < 1) ? s : new Array(m + 1).join(c) + s; -}; diff --git a/lib/protovis/src/text/NumberFormat.js b/lib/protovis/src/text/NumberFormat.js deleted file mode 100644 index 863d2c08..00000000 --- a/lib/protovis/src/text/NumberFormat.js +++ /dev/null @@ -1,227 +0,0 @@ -/** - * Returns a default number format. - * - * @class Represents a number format, converting between a number and a - * string. This class allows numbers to be formatted with variable - * precision (both for the integral and fractional part of the number), optional - * thousands grouping, and optional padding. The thousands (",") and decimal - * (".") separator can be customized. - * - * @returns {pv.Format.number} a number format. - */ -pv.Format.number = function() { - var mini = 0, // default minimum integer digits - maxi = Infinity, // default maximum integer digits - mins = 0, // mini, including group separators - minf = 0, // default minimum fraction digits - maxf = 0, // default maximum fraction digits - maxk = 1, // 10^maxf - padi = "0", // default integer pad - padf = "0", // default fraction pad - padg = true, // whether group separator affects integer padding - decimal = ".", // default decimal separator - group = ",", // default group separator - np = "\u2212", // default negative prefix - ns = ""; // default negative suffix - - /** @private */ - function format(x) { - /* Round the fractional part, and split on decimal separator. */ - if (Infinity > maxf) x = Math.round(x * maxk) / maxk; - var s = String(Math.abs(x)).split("."); - - /* Pad, truncate and group the integral part. */ - var i = s[0]; - if (i.length > maxi) i = i.substring(i.length - maxi); - if (padg && (i.length < mini)) i = new Array(mini - i.length + 1).join(padi) + i; - if (i.length > 3) i = i.replace(/\B(?=(?:\d{3})+(?!\d))/g, group); - if (!padg && (i.length < mins)) i = new Array(mins - i.length + 1).join(padi) + i; - s[0] = x < 0 ? np + i + ns : i; - - /* Pad the fractional part. */ - var f = s[1] || ""; - if (f.length < minf) s[1] = f + new Array(minf - f.length + 1).join(padf); - - return s.join(decimal); - } - - /** - * @function - * @name pv.Format.number.prototype.format - * @param {number} x - * @returns {string} - */ - format.format = format; - - /** - * Parses the specified string as a number. Before parsing, leading and - * trailing padding is removed. Group separators are also removed, and the - * decimal separator is replaced with the standard point ("."). The integer - * part is truncated per the maximum integer digits, and the fraction part is - * rounded per the maximum fraction digits. - * - * @function - * @name pv.Format.number.prototype.parse - * @param {string} x the string to parse. - * @returns {number} the parsed number. - */ - format.parse = function(x) { - var re = pv.Format.re; - - /* Remove leading and trailing padding. Split on the decimal separator. */ - var s = String(x) - .replace(new RegExp("^(" + re(padi) + ")*"), "") - .replace(new RegExp("(" + re(padf) + ")*$"), "") - .split(decimal); - - /* Remove grouping and truncate the integral part. */ - var i = s[0].replace(new RegExp(re(group), "g"), ""); - if (i.length > maxi) i = i.substring(i.length - maxi); - - /* Round the fractional part. */ - var f = s[1] ? Number("0." + s[1]) : 0; - if (Infinity > maxf) f = Math.round(f * maxk) / maxk; - - return Math.round(i) + f; - }; - - /** - * Sets or gets the minimum and maximum number of integer digits. This - * controls the number of decimal digits to display before the decimal - * separator for the integral part of the number. If the number of digits is - * smaller than the minimum, the digits are padded; if the number of digits is - * larger, the digits are truncated, showing only the lower-order digits. The - * default range is [0, Infinity]. - * - *

If only one argument is specified to this method, this value is used as - * both the minimum and maximum number. If no arguments are specified, a - * two-element array is returned containing the minimum and the maximum. - * - * @function - * @name pv.Format.number.prototype.integerDigits - * @param {number} [min] the minimum integer digits. - * @param {number} [max] the maximum integer digits. - * @returns {pv.Format.number} this, or the current integer digits. - */ - format.integerDigits = function(min, max) { - if (arguments.length) { - mini = Number(min); - maxi = (arguments.length > 1) ? Number(max) : mini; - mins = mini + Math.floor(mini / 3) * group.length; - return this; - } - return [mini, maxi]; - }; - - /** - * Sets or gets the minimum and maximum number of fraction digits. The - * controls the number of decimal digits to display after the decimal - * separator for the fractional part of the number. If the number of digits is - * smaller than the minimum, the digits are padded; if the number of digits is - * larger, the fractional part is rounded, showing only the higher-order - * digits. The default range is [0, 0]. - * - *

If only one argument is specified to this method, this value is used as - * both the minimum and maximum number. If no arguments are specified, a - * two-element array is returned containing the minimum and the maximum. - * - * @function - * @name pv.Format.number.prototype.fractionDigits - * @param {number} [min] the minimum fraction digits. - * @param {number} [max] the maximum fraction digits. - * @returns {pv.Format.number} this, or the current fraction digits. - */ - format.fractionDigits = function(min, max) { - if (arguments.length) { - minf = Number(min); - maxf = (arguments.length > 1) ? Number(max) : minf; - maxk = Math.pow(10, maxf); - return this; - } - return [minf, maxf]; - }; - - /** - * Sets or gets the character used to pad the integer part. The integer pad is - * used when the number of integer digits is smaller than the minimum. The - * default pad character is "0" (zero). - * - * @param {string} [x] the new pad character. - * @returns {pv.Format.number} this or the current pad character. - */ - format.integerPad = function(x) { - if (arguments.length) { - padi = String(x); - padg = /\d/.test(padi); - return this; - } - return padi; - }; - - /** - * Sets or gets the character used to pad the fration part. The fraction pad - * is used when the number of fraction digits is smaller than the minimum. The - * default pad character is "0" (zero). - * - * @param {string} [x] the new pad character. - * @returns {pv.Format.number} this or the current pad character. - */ - format.fractionPad = function(x) { - if (arguments.length) { - padf = String(x); - return this; - } - return padf; - }; - - /** - * Sets or gets the character used as the decimal point, separating the - * integer and fraction parts of the number. The default decimal point is ".". - * - * @param {string} [x] the new decimal separator. - * @returns {pv.Format.number} this or the current decimal separator. - */ - format.decimal = function(x) { - if (arguments.length) { - decimal = String(x); - return this; - } - return decimal; - }; - - /** - * Sets or gets the character used as the group separator, grouping integer - * digits by thousands. The default decimal point is ",". Grouping can be - * disabled by using "" for the separator. - * - * @param {string} [x] the new group separator. - * @returns {pv.Format.number} this or the current group separator. - */ - format.group = function(x) { - if (arguments.length) { - group = x ? String(x) : ""; - mins = mini + Math.floor(mini / 3) * group.length; - return this; - } - return group; - }; - - /** - * Sets or gets the negative prefix and suffix. The default negative prefix is - * "−", and the default negative suffix is the empty string. - * - * @param {string} [x] the negative prefix. - * @param {string} [y] the negative suffix. - * @returns {pv.Format.number} this or the current negative format. - */ - format.negativeAffix = function(x, y) { - if (arguments.length) { - np = String(x || ""); - ns = String(y || ""); - return this; - } - return [np, ns]; - }; - - return format; -}; diff --git a/lib/protovis/src/text/TimeFormat.js b/lib/protovis/src/text/TimeFormat.js deleted file mode 100644 index 045a05b2..00000000 --- a/lib/protovis/src/text/TimeFormat.js +++ /dev/null @@ -1,115 +0,0 @@ -/** - * Returns a time format of the given type, either "short" or "long". - * - * @class Represents a time format, converting between a number - * representing a duration in milliseconds, and a string. Two types of - * time formats are supported: "short" and "long". The short format type - * returns a string such as "3.3 days" or "12.1 minutes", while the long - * format returns "13:04:12" or similar. - * - * @extends pv.Format - * @param {string} type the type; "short" or "long". - */ -pv.Format.time = function(type) { - var pad = pv.Format.pad; - - /* - * MILLISECONDS = 1 - * SECONDS = 1e3 - * MINUTES = 6e4 - * HOURS = 36e5 - * DAYS = 864e5 - * WEEKS = 6048e5 - * MONTHS = 2592e6 - * YEARS = 31536e6 - */ - - /** @private */ - function format(t) { - t = Number(t); // force conversion from Date - switch (type) { - case "short": { - if (t >= 31536e6) { - return (t / 31536e6).toFixed(1) + " years"; - } else if (t >= 6048e5) { - return (t / 6048e5).toFixed(1) + " weeks"; - } else if (t >= 864e5) { - return (t / 864e5).toFixed(1) + " days"; - } else if (t >= 36e5) { - return (t / 36e5).toFixed(1) + " hours"; - } else if (t >= 6e4) { - return (t / 6e4).toFixed(1) + " minutes"; - } - return (t / 1e3).toFixed(1) + " seconds"; - } - case "long": { - var a = [], - s = ((t % 6e4) / 1e3) >> 0, - m = ((t % 36e5) / 6e4) >> 0; - a.push(pad("0", 2, s)); - if (t >= 36e5) { - var h = ((t % 864e5) / 36e5) >> 0; - a.push(pad("0", 2, m)); - if (t >= 864e5) { - a.push(pad("0", 2, h)); - a.push(Math.floor(t / 864e5).toFixed()); - } else { - a.push(h.toFixed()); - } - } else { - a.push(m.toFixed()); - } - return a.reverse().join(":"); - } - } - } - - /** - * Formats the specified time, returning the string representation. - * - * @function - * @name pv.Format.time.prototype.format - * @param {number} t the duration in milliseconds. May also be a Date. - * @returns {string} the formatted string. - */ - format.format = format; - - /** - * Parses the specified string, returning the time in milliseconds. - * - * @function - * @name pv.Format.time.prototype.parse - * @param {string} s a formatted string. - * @returns {number} the parsed duration in milliseconds. - */ - format.parse = function(s) { - switch (type) { - case "short": { - var re = /([0-9,.]+)\s*([a-z]+)/g, a, t = 0; - while (a = re.exec(s)) { - var f = parseFloat(a[0].replace(",", "")), u = 0; - switch (a[2].toLowerCase()) { - case "year": case "years": u = 31536e6; break; - case "week": case "weeks": u = 6048e5; break; - case "day": case "days": u = 864e5; break; - case "hour": case "hours": u = 36e5; break; - case "minute": case "minutes": u = 6e4; break; - case "second": case "seconds": u = 1e3; break; - } - t += f * u; - } - return t; - } - case "long": { - var a = s.replace(",", "").split(":").reverse(), t = 0; - if (a.length) t += parseFloat(a[0]) * 1e3; - if (a.length > 1) t += parseFloat(a[1]) * 6e4; - if (a.length > 2) t += parseFloat(a[2]) * 36e5; - if (a.length > 3) t += parseFloat(a[3]) * 864e5; - return t; - } - } - } - - return format; -}; diff --git a/lib/protovis/tests/behavior/drag-events.html b/lib/protovis/tests/behavior/drag-events.html deleted file mode 100644 index 13876a76..00000000 --- a/lib/protovis/tests/behavior/drag-events.html +++ /dev/null @@ -1,47 +0,0 @@ - - - Drag - - - - -

- Drag events -
- - diff --git a/lib/protovis/tests/behavior/drag.html b/lib/protovis/tests/behavior/drag.html deleted file mode 100644 index c9b64a63..00000000 --- a/lib/protovis/tests/behavior/drag.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Drag - - - - - - diff --git a/lib/protovis/tests/behavior/drag2.html b/lib/protovis/tests/behavior/drag2.html deleted file mode 100644 index 8231b310..00000000 --- a/lib/protovis/tests/behavior/drag2.html +++ /dev/null @@ -1,33 +0,0 @@ - - - Drag - - - - - - diff --git a/lib/protovis/tests/behavior/point-area-stacked.html b/lib/protovis/tests/behavior/point-area-stacked.html deleted file mode 100644 index 8919b875..00000000 --- a/lib/protovis/tests/behavior/point-area-stacked.html +++ /dev/null @@ -1,73 +0,0 @@ - - - Stacked Area Chart - - - - - - diff --git a/lib/protovis/tests/behavior/point-area-stacked2.html b/lib/protovis/tests/behavior/point-area-stacked2.html deleted file mode 100644 index 18301711..00000000 --- a/lib/protovis/tests/behavior/point-area-stacked2.html +++ /dev/null @@ -1,70 +0,0 @@ - - - Stacked Area Chart - - - - - - diff --git a/lib/protovis/tests/behavior/point-area.html b/lib/protovis/tests/behavior/point-area.html deleted file mode 100644 index 3adb660a..00000000 --- a/lib/protovis/tests/behavior/point-area.html +++ /dev/null @@ -1,67 +0,0 @@ - - - Area Chart - - - - - - diff --git a/lib/protovis/tests/behavior/point-bar.html b/lib/protovis/tests/behavior/point-bar.html deleted file mode 100644 index e58e1a52..00000000 --- a/lib/protovis/tests/behavior/point-bar.html +++ /dev/null @@ -1,62 +0,0 @@ - - - - Bar Chart - - - -
- - diff --git a/lib/protovis/tests/behavior/point-dot.html b/lib/protovis/tests/behavior/point-dot.html deleted file mode 100644 index 7f7524e3..00000000 --- a/lib/protovis/tests/behavior/point-dot.html +++ /dev/null @@ -1,60 +0,0 @@ - - - Scatterplot - - - - - - diff --git a/lib/protovis/tests/behavior/point-line.html b/lib/protovis/tests/behavior/point-line.html deleted file mode 100644 index e6e6132d..00000000 --- a/lib/protovis/tests/behavior/point-line.html +++ /dev/null @@ -1,62 +0,0 @@ - - - Line Chart - - - - - - diff --git a/lib/protovis/tests/behavior/point-lines-grid.html b/lib/protovis/tests/behavior/point-lines-grid.html deleted file mode 100644 index 9e79f458..00000000 --- a/lib/protovis/tests/behavior/point-lines-grid.html +++ /dev/null @@ -1,65 +0,0 @@ - - - Line Charts - - - - - - diff --git a/lib/protovis/tests/behavior/point-lines.html b/lib/protovis/tests/behavior/point-lines.html deleted file mode 100644 index 631a2dea..00000000 --- a/lib/protovis/tests/behavior/point-lines.html +++ /dev/null @@ -1,61 +0,0 @@ - - - Line Charts - - - - - - diff --git a/lib/protovis/tests/behavior/point-wedge.html b/lib/protovis/tests/behavior/point-wedge.html deleted file mode 100644 index 12515153..00000000 --- a/lib/protovis/tests/behavior/point-wedge.html +++ /dev/null @@ -1,43 +0,0 @@ - - - Donut - - - - - - diff --git a/lib/protovis/tests/behavior/resize.html b/lib/protovis/tests/behavior/resize.html deleted file mode 100644 index ca6bd714..00000000 --- a/lib/protovis/tests/behavior/resize.html +++ /dev/null @@ -1,69 +0,0 @@ - - - Resize - - - - - - diff --git a/lib/protovis/tests/behavior/select.html b/lib/protovis/tests/behavior/select.html deleted file mode 100644 index d06953a0..00000000 --- a/lib/protovis/tests/behavior/select.html +++ /dev/null @@ -1,37 +0,0 @@ - - - Select - - - - - - diff --git a/lib/protovis/tests/bzr.js b/lib/protovis/tests/bzr.js deleted file mode 100644 index c3e37de4..00000000 --- a/lib/protovis/tests/bzr.js +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Simulation of a Belousov-Zhabotinsky reaction using a two-dimensional - * cellular automaton. This algorithm is based on the work of Nitori Kawashiro; - * see http://www.nitorijournal.org/?p=2109. - */ - -var bzr = {}; - -bzr.color = function(x, y) { - var p = y * bzr.size + x; - return {r: bzr.a[p] * 255, g: bzr.b[p] * 255, b: bzr.c[p] * 255, a: 255}; -}; - -bzr.reset = function(n) { - if (!arguments.length) n = bzr.size; - var a = bzr.a = [], - b = bzr.b = [], - c = bzr.c = []; - bzr.size = n; - for (var y = 0, p = 0; y < n; y++) { - for (var x = 0; x < n; x++, p++) { - a[p] = Math.random(); - b[p] = Math.random(); - c[p] = Math.random(); - } - } -}; - -bzr.update = function() { - var a = bzr.a.slice(), - b = bzr.b.slice(), - c = bzr.c.slice(), - n = bzr.size; - for (var y = 0, p = 0; y < n; y++) { - for (var x = 0; x < n; x++, p++) { - - /* Compute neighbor averages, with wrap-around. */ - var sa = 0, sb = 0, sc = 0; - for (var j = y - 1; j < y + 2; j++) { - for (var i = x - 1; i < x + 2; i++) { - var q = (j < 0 ? j + n : j >= n ? j - n : j) * n - + (i < 0 ? i + n : i >= n ? i - n : i); - sa += a[q]; - sb += b[q]; - sc += c[q]; - } - } - sa /= 9; - sb /= 9; - sc /= 9; - - var ta = sa + sa * (sb - sc); - var tb = sb + sb * (sc - sa); - var tc = sc + sc * (sa - sb); - bzr.a[p] = ta < 1 ? ta : 1; - bzr.b[p] = tb < 1 ? tb : 1; - bzr.c[p] = tc < 1 ? tc : 1; - } - } -}; - -bzr.reset(100); diff --git a/lib/protovis/tests/center.js b/lib/protovis/tests/center.js deleted file mode 100644 index bd71ea0d..00000000 --- a/lib/protovis/tests/center.js +++ /dev/null @@ -1,13 +0,0 @@ -(function() { - function center() { - var svgs = document.getElementsByTagName("svg"); - for (var i = 0; i < svgs.length; i++) { - var span = svgs[i].parentNode; - span.style.position = "absolute"; - span.style.left = (window.innerWidth - span.offsetWidth) / 2; - span.style.top = (window.innerHeight - span.offsetHeight) / 2; - } - } - pv.listen(window, "load", center); - pv.listen(window, "resize", center); -})(); diff --git a/lib/protovis/tests/data/deviation.html b/lib/protovis/tests/data/deviation.html deleted file mode 100644 index 4bd31cf8..00000000 --- a/lib/protovis/tests/data/deviation.html +++ /dev/null @@ -1,54 +0,0 @@ - - - Deviation - - - - - - - - - diff --git a/lib/protovis/tests/data/histogram-discrete.html b/lib/protovis/tests/data/histogram-discrete.html deleted file mode 100644 index 28c98536..00000000 --- a/lib/protovis/tests/data/histogram-discrete.html +++ /dev/null @@ -1,50 +0,0 @@ - - - Histogram - - - - - - diff --git a/lib/protovis/tests/data/histogram.html b/lib/protovis/tests/data/histogram.html deleted file mode 100644 index 63d1f86b..00000000 --- a/lib/protovis/tests/data/histogram.html +++ /dev/null @@ -1,56 +0,0 @@ - - - Histogram - - - - - - diff --git a/lib/protovis/tests/data/log-adjusted.html b/lib/protovis/tests/data/log-adjusted.html deleted file mode 100644 index 030d6ed7..00000000 --- a/lib/protovis/tests/data/log-adjusted.html +++ /dev/null @@ -1,48 +0,0 @@ - - - Log Adjusted - - - - - - - - - diff --git a/lib/protovis/tests/data/log-ceil.html b/lib/protovis/tests/data/log-ceil.html deleted file mode 100644 index 55ef34f9..00000000 --- a/lib/protovis/tests/data/log-ceil.html +++ /dev/null @@ -1,48 +0,0 @@ - - - Log Ceiling - - - - - - - - - diff --git a/lib/protovis/tests/data/log-floor.html b/lib/protovis/tests/data/log-floor.html deleted file mode 100644 index 3f5e5933..00000000 --- a/lib/protovis/tests/data/log-floor.html +++ /dev/null @@ -1,48 +0,0 @@ - - - Log Floor - - - - - - - - - diff --git a/lib/protovis/tests/data/log-symmetric.html b/lib/protovis/tests/data/log-symmetric.html deleted file mode 100644 index 888b6069..00000000 --- a/lib/protovis/tests/data/log-symmetric.html +++ /dev/null @@ -1,48 +0,0 @@ - - - Log Symmetric - - - - - - - - - diff --git a/lib/protovis/tests/data/log.html b/lib/protovis/tests/data/log.html deleted file mode 100644 index 90e36607..00000000 --- a/lib/protovis/tests/data/log.html +++ /dev/null @@ -1,48 +0,0 @@ - - - Log - - - - - - - - - diff --git a/lib/protovis/tests/data/max-index.html b/lib/protovis/tests/data/max-index.html deleted file mode 100644 index 09baa610..00000000 --- a/lib/protovis/tests/data/max-index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - Max Index - - - - - - - - - diff --git a/lib/protovis/tests/data/max.html b/lib/protovis/tests/data/max.html deleted file mode 100644 index 42b18e7e..00000000 --- a/lib/protovis/tests/data/max.html +++ /dev/null @@ -1,36 +0,0 @@ - - - Max - - - - - - - - - diff --git a/lib/protovis/tests/data/min-index.html b/lib/protovis/tests/data/min-index.html deleted file mode 100644 index 2be213f3..00000000 --- a/lib/protovis/tests/data/min-index.html +++ /dev/null @@ -1,36 +0,0 @@ - - - Min Index - - - - - - - - - diff --git a/lib/protovis/tests/data/min.html b/lib/protovis/tests/data/min.html deleted file mode 100644 index cf9fca5e..00000000 --- a/lib/protovis/tests/data/min.html +++ /dev/null @@ -1,36 +0,0 @@ - - - Min - - - - - - - - - diff --git a/lib/protovis/tests/data/ordinal-split-banded.html b/lib/protovis/tests/data/ordinal-split-banded.html deleted file mode 100644 index 467d4293..00000000 --- a/lib/protovis/tests/data/ordinal-split-banded.html +++ /dev/null @@ -1,45 +0,0 @@ - - - Ordinal Split Banded - - - - - - diff --git a/lib/protovis/tests/data/ordinal-split-banded2.html b/lib/protovis/tests/data/ordinal-split-banded2.html deleted file mode 100644 index ef0345a0..00000000 --- a/lib/protovis/tests/data/ordinal-split-banded2.html +++ /dev/null @@ -1,45 +0,0 @@ - - - Ordinal Split Banded - - - - - - diff --git a/lib/protovis/tests/data/ordinal-split-flush.html b/lib/protovis/tests/data/ordinal-split-flush.html deleted file mode 100644 index 968c7bed..00000000 --- a/lib/protovis/tests/data/ordinal-split-flush.html +++ /dev/null @@ -1,51 +0,0 @@ - - - Ordinal Split Flush - - - - - - diff --git a/lib/protovis/tests/data/ordinal-split.html b/lib/protovis/tests/data/ordinal-split.html deleted file mode 100644 index f2a61745..00000000 --- a/lib/protovis/tests/data/ordinal-split.html +++ /dev/null @@ -1,51 +0,0 @@ - - - Ordinal Split - - - - - - diff --git a/lib/protovis/tests/data/range.html b/lib/protovis/tests/data/range.html deleted file mode 100644 index ff06b9f8..00000000 --- a/lib/protovis/tests/data/range.html +++ /dev/null @@ -1,105 +0,0 @@ - - - Range - - - - - - - - - diff --git a/lib/protovis/tests/data/scale-date.html b/lib/protovis/tests/data/scale-date.html deleted file mode 100644 index 70be6734..00000000 --- a/lib/protovis/tests/data/scale-date.html +++ /dev/null @@ -1,46 +0,0 @@ - - - Date Test - - - -
- -
- diff --git a/lib/protovis/tests/data/scale-date2.html b/lib/protovis/tests/data/scale-date2.html deleted file mode 100644 index 1a581e90..00000000 --- a/lib/protovis/tests/data/scale-date2.html +++ /dev/null @@ -1,38 +0,0 @@ - - - Date Test - - - - - - diff --git a/lib/protovis/tests/data/scale-date3.html b/lib/protovis/tests/data/scale-date3.html deleted file mode 100644 index a622bdb2..00000000 --- a/lib/protovis/tests/data/scale-date3.html +++ /dev/null @@ -1,38 +0,0 @@ - - - Date Test - - - - - - diff --git a/lib/protovis/tests/data/scale-date4.html b/lib/protovis/tests/data/scale-date4.html deleted file mode 100644 index 724b9497..00000000 --- a/lib/protovis/tests/data/scale-date4.html +++ /dev/null @@ -1,38 +0,0 @@ - - - Date Test - - - - - - diff --git a/lib/protovis/tests/data/scale-degenerate.html b/lib/protovis/tests/data/scale-degenerate.html deleted file mode 100644 index af62742b..00000000 --- a/lib/protovis/tests/data/scale-degenerate.html +++ /dev/null @@ -1,143 +0,0 @@ - - - Degenerate Scales - - - - - - - - - diff --git a/lib/protovis/tests/data/scale-linear.html b/lib/protovis/tests/data/scale-linear.html deleted file mode 100644 index d7a19300..00000000 --- a/lib/protovis/tests/data/scale-linear.html +++ /dev/null @@ -1,59 +0,0 @@ - - - Linear Scale - - - - - - diff --git a/lib/protovis/tests/data/scale-log.html b/lib/protovis/tests/data/scale-log.html deleted file mode 100644 index eedbf7a7..00000000 --- a/lib/protovis/tests/data/scale-log.html +++ /dev/null @@ -1,60 +0,0 @@ - - - Log Scale - - - - - - diff --git a/lib/protovis/tests/data/scale-log2.html b/lib/protovis/tests/data/scale-log2.html deleted file mode 100644 index 5563a0c1..00000000 --- a/lib/protovis/tests/data/scale-log2.html +++ /dev/null @@ -1,60 +0,0 @@ - - - Log Scale - - - - - - diff --git a/lib/protovis/tests/data/scale-log3.html b/lib/protovis/tests/data/scale-log3.html deleted file mode 100644 index 08e1b718..00000000 --- a/lib/protovis/tests/data/scale-log3.html +++ /dev/null @@ -1,60 +0,0 @@ - - - Log Scale - - - - - - diff --git a/lib/protovis/tests/data/scale-log4.html b/lib/protovis/tests/data/scale-log4.html deleted file mode 100644 index 37a8e3bb..00000000 --- a/lib/protovis/tests/data/scale-log4.html +++ /dev/null @@ -1,60 +0,0 @@ - - - Log Scale - - - - - - diff --git a/lib/protovis/tests/data/scale-log5.html b/lib/protovis/tests/data/scale-log5.html deleted file mode 100644 index b3d919cd..00000000 --- a/lib/protovis/tests/data/scale-log5.html +++ /dev/null @@ -1,60 +0,0 @@ - - - Log Scale - - - - - - diff --git a/lib/protovis/tests/data/scale-log6.html b/lib/protovis/tests/data/scale-log6.html deleted file mode 100644 index d7bbbfb7..00000000 --- a/lib/protovis/tests/data/scale-log6.html +++ /dev/null @@ -1,60 +0,0 @@ - - - Log Scale - - - - - - diff --git a/lib/protovis/tests/data/scale-quantile.html b/lib/protovis/tests/data/scale-quantile.html deleted file mode 100644 index 4451f2ea..00000000 --- a/lib/protovis/tests/data/scale-quantile.html +++ /dev/null @@ -1,47 +0,0 @@ - - - Quantile Plot - - - - - - diff --git a/lib/protovis/tests/data/scale-quantile2.html b/lib/protovis/tests/data/scale-quantile2.html deleted file mode 100644 index 212ff54d..00000000 --- a/lib/protovis/tests/data/scale-quantile2.html +++ /dev/null @@ -1,50 +0,0 @@ - - - Quantile-Quantile Plot - - - - - - diff --git a/lib/protovis/tests/data/scale-quantile3.html b/lib/protovis/tests/data/scale-quantile3.html deleted file mode 100644 index 311b0945..00000000 --- a/lib/protovis/tests/data/scale-quantile3.html +++ /dev/null @@ -1,48 +0,0 @@ - - - Undecile Scale - - - - - - diff --git a/lib/protovis/tests/data/scale-root.html b/lib/protovis/tests/data/scale-root.html deleted file mode 100644 index aabfb39a..00000000 --- a/lib/protovis/tests/data/scale-root.html +++ /dev/null @@ -1,60 +0,0 @@ - - - Root Scale - - - - - - diff --git a/lib/protovis/tests/data/scale-root2.html b/lib/protovis/tests/data/scale-root2.html deleted file mode 100644 index 2cb6b741..00000000 --- a/lib/protovis/tests/data/scale-root2.html +++ /dev/null @@ -1,39 +0,0 @@ - - - Root Scale - - - - - - diff --git a/lib/protovis/tests/data/scale-tick-format.html b/lib/protovis/tests/data/scale-tick-format.html deleted file mode 100644 index d4e52b4f..00000000 --- a/lib/protovis/tests/data/scale-tick-format.html +++ /dev/null @@ -1,54 +0,0 @@ - - - Tick Format Test - - - - - - diff --git a/lib/protovis/tests/data/scale-ticks.html b/lib/protovis/tests/data/scale-ticks.html deleted file mode 100644 index 78f1b2b1..00000000 --- a/lib/protovis/tests/data/scale-ticks.html +++ /dev/null @@ -1,45 +0,0 @@ - - - Ticks Test - - - - - - diff --git a/lib/protovis/tests/data/sum.html b/lib/protovis/tests/data/sum.html deleted file mode 100644 index 5557eb7d..00000000 --- a/lib/protovis/tests/data/sum.html +++ /dev/null @@ -1,42 +0,0 @@ - - - Sum - - - - - - - - - diff --git a/lib/protovis/tests/data/variance.html b/lib/protovis/tests/data/variance.html deleted file mode 100644 index 91993c5c..00000000 --- a/lib/protovis/tests/data/variance.html +++ /dev/null @@ -1,42 +0,0 @@ - - - Variance - - - - - - - - - diff --git a/lib/protovis/tests/diamond.js b/lib/protovis/tests/diamond.js deleted file mode 100644 index 2a4fb117..00000000 --- a/lib/protovis/tests/diamond.js +++ /dev/null @@ -1,40 +0,0 @@ -function diamond(b, d1, d2) { - var k = 1; - - function right(map) { - var keys = pv.keys(map); - return keys.length ? right(map[keys[keys.length - 1]]) : map; - } - - function left(map) { - var keys = pv.keys(map); - return keys.length ? left(map[keys[0]]) : map; - } - - function deep(n, b, d, left) { - var c = n[k++] = {}; - if (left && (d > 0)) deep(c, b, d - 1, left); - for (var i = 1; i < b; i++) c = n[k++] = {}; - if (!left && (d > 0)) deep(c, b, d - 1, left); - } - - function fix(map) { - for (var key in map) { - var c = map[key]; - if (pv.keys(c).length) fix(c); - else map[key] = 1; - } - } - - var tree = {}, - l = tree[k++] = {}, - r = tree[k++] = {}; - deep(l, b, d1 - 2, true); - deep(r, b, d1 - 2, false); - l = left(l); - r = right(r); - deep(l, b, d2 - 1, false); - deep(r, b, d2 - 1, true); - fix(tree); - return tree; -} diff --git a/lib/protovis/tests/flare-imports.js b/lib/protovis/tests/flare-imports.js deleted file mode 100644 index fbb57edf..00000000 --- a/lib/protovis/tests/flare-imports.js +++ /dev/null @@ -1,222 +0,0 @@ -var imports = [ -{"name":"flare.analytics.cluster.AgglomerativeCluster","size":3938,"imports":["flare.animate.Transitioner","flare.vis.data.DataList","flare.util.math.IMatrix","flare.analytics.cluster.MergeEdge","flare.analytics.cluster.HierarchicalCluster","flare.vis.data.Data"]}, -{"name":"flare.analytics.cluster.CommunityStructure","size":3812,"imports":["flare.analytics.cluster.HierarchicalCluster","flare.animate.Transitioner","flare.vis.data.DataList","flare.analytics.cluster.MergeEdge","flare.util.math.IMatrix"]}, -{"name":"flare.analytics.cluster.HierarchicalCluster","size":6714,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.vis.data.DataList","flare.vis.data.Tree","flare.util.Arrays","flare.analytics.cluster.MergeEdge","flare.util.Sort","flare.vis.operator.Operator","flare.util.Property","flare.vis.data.Data"]}, -{"name":"flare.analytics.cluster.MergeEdge","size":743,"imports":[]}, -{"name":"flare.analytics.graph.BetweennessCentrality","size":3534,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.DataList","flare.util.Arrays","flare.vis.data.Data","flare.util.Property","flare.vis.operator.Operator"]}, -{"name":"flare.analytics.graph.LinkDistance","size":5731,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.EdgeSprite","flare.analytics.graph.ShortestPaths","flare.vis.data.Data","flare.util.Property","flare.vis.operator.Operator"]}, -{"name":"flare.analytics.graph.MaxFlowMinCut","size":7840,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.EdgeSprite","flare.vis.data.Data","flare.util.Property","flare.vis.operator.Operator"]}, -{"name":"flare.analytics.graph.ShortestPaths","size":5914,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.animate.Transitioner","flare.vis.operator.Operator","flare.util.heap.HeapNode","flare.util.heap.FibonacciHeap","flare.util.Property","flare.vis.data.Data"]}, -{"name":"flare.analytics.graph.SpanningTree","size":3416,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.operator.IOperator","flare.vis.Visualization","flare.vis.data.TreeBuilder","flare.vis.operator.Operator"]}, -{"name":"flare.analytics.optimization.AspectRatioBanker","size":7074,"imports":["flare.animate.Transitioner","flare.util.Arrays","flare.vis.data.DataSprite","flare.scale.Scale","flare.vis.axis.CartesianAxes","flare.vis.Visualization","flare.util.Property","flare.vis.operator.Operator"]}, -{"name":"flare.animate.Easing","size":17010,"imports":["flare.animate.Transition"]}, -{"name":"flare.animate.FunctionSequence","size":5842,"imports":["flare.util.Maths","flare.animate.Transition","flare.util.Arrays","flare.animate.Sequence","flare.animate.Transitioner"]}, -{"name":"flare.animate.interpolate.ArrayInterpolator","size":1983,"imports":["flare.util.Arrays","flare.animate.interpolate.Interpolator"]}, -{"name":"flare.animate.interpolate.ColorInterpolator","size":2047,"imports":["flare.animate.interpolate.Interpolator"]}, -{"name":"flare.animate.interpolate.DateInterpolator","size":1375,"imports":["flare.animate.interpolate.Interpolator"]}, -{"name":"flare.animate.interpolate.Interpolator","size":8746,"imports":["flare.animate.interpolate.NumberInterpolator","flare.animate.interpolate.ColorInterpolator","flare.animate.interpolate.PointInterpolator","flare.animate.interpolate.ObjectInterpolator","flare.animate.interpolate.MatrixInterpolator","flare.animate.interpolate.RectangleInterpolator","flare.animate.interpolate.DateInterpolator","flare.util.Property","flare.animate.interpolate.ArrayInterpolator"]}, -{"name":"flare.animate.interpolate.MatrixInterpolator","size":2202,"imports":["flare.animate.interpolate.Interpolator"]}, -{"name":"flare.animate.interpolate.NumberInterpolator","size":1382,"imports":["flare.animate.interpolate.Interpolator"]}, -{"name":"flare.animate.interpolate.ObjectInterpolator","size":1629,"imports":["flare.animate.interpolate.Interpolator"]}, -{"name":"flare.animate.interpolate.PointInterpolator","size":1675,"imports":["flare.animate.interpolate.Interpolator"]}, -{"name":"flare.animate.interpolate.RectangleInterpolator","size":2042,"imports":["flare.animate.interpolate.Interpolator"]}, -{"name":"flare.animate.ISchedulable","size":1041,"imports":["flare.animate.Scheduler"]}, -{"name":"flare.animate.Parallel","size":5176,"imports":["flare.animate.Easing","flare.animate.Transition","flare.util.Arrays"]}, -{"name":"flare.animate.Pause","size":449,"imports":["flare.animate.Transition"]}, -{"name":"flare.animate.Scheduler","size":5593,"imports":["flare.animate.ISchedulable","flare.animate.Pause","flare.animate.Transition"]}, -{"name":"flare.animate.Sequence","size":5534,"imports":["flare.animate.Easing","flare.util.Maths","flare.animate.Transition","flare.util.Arrays"]}, -{"name":"flare.animate.Transition","size":9201,"imports":["flare.animate.Transitioner","flare.animate.TransitionEvent","flare.animate.Scheduler","flare.animate.Pause","flare.animate.Parallel","flare.animate.Easing","flare.animate.Sequence","flare.animate.ISchedulable","flare.util.Maths","flare.animate.Tween"]}, -{"name":"flare.animate.Transitioner","size":19975,"imports":["flare.util.IValueProxy","flare.animate.Parallel","flare.animate.Easing","flare.animate.Sequence","flare.animate.Transition","flare.animate.Tween","flare.util.Property"]}, -{"name":"flare.animate.TransitionEvent","size":1116,"imports":["flare.animate.Transition"]}, -{"name":"flare.animate.Tween","size":6006,"imports":["flare.animate.Transitioner","flare.animate.Transition","flare.animate.interpolate.Interpolator","flare.util.Property"]}, -{"name":"flare.data.converters.Converters","size":721,"imports":["flare.data.converters.IDataConverter","flare.data.converters.GraphMLConverter","flare.data.converters.JSONConverter","flare.data.converters.DelimitedTextConverter"]}, -{"name":"flare.data.converters.DelimitedTextConverter","size":4294,"imports":["flare.data.DataSet","flare.data.DataUtil","flare.data.DataTable","flare.data.converters.IDataConverter","flare.data.DataSchema","flare.data.DataField"]}, -{"name":"flare.data.converters.GraphMLConverter","size":9800,"imports":["flare.data.DataSet","flare.data.DataUtil","flare.data.DataTable","flare.data.converters.IDataConverter","flare.data.DataSchema","flare.data.DataField"]}, -{"name":"flare.data.converters.IDataConverter","size":1314,"imports":["flare.data.DataSet","flare.data.DataSchema"]}, -{"name":"flare.data.converters.JSONConverter","size":2220,"imports":["flare.data.DataSet","flare.data.DataUtil","flare.data.DataTable","flare.data.converters.IDataConverter","flare.data.DataSchema","flare.data.DataField","flare.util.Property"]}, -{"name":"flare.data.DataField","size":1759,"imports":["flare.data.DataUtil"]}, -{"name":"flare.data.DataSchema","size":2165,"imports":["flare.data.DataField","flare.util.Arrays"]}, -{"name":"flare.data.DataSet","size":586,"imports":["flare.data.DataTable"]}, -{"name":"flare.data.DataSource","size":3331,"imports":["flare.data.converters.IDataConverter","flare.data.converters.Converters","flare.data.DataSchema"]}, -{"name":"flare.data.DataTable","size":772,"imports":["flare.data.DataSchema"]}, -{"name":"flare.data.DataUtil","size":3322,"imports":["flare.data.DataField","flare.data.DataSchema"]}, -{"name":"flare.display.DirtySprite","size":8833,"imports":[]}, -{"name":"flare.display.LineSprite","size":1732,"imports":["flare.display.DirtySprite"]}, -{"name":"flare.display.RectSprite","size":3623,"imports":["flare.util.Colors","flare.display.DirtySprite"]}, -{"name":"flare.display.TextSprite","size":10066,"imports":["flare.display.DirtySprite"]}, -{"name":"flare.flex.FlareVis","size":4116,"imports":["flare.display.DirtySprite","flare.data.DataSet","flare.vis.Visualization","flare.vis.axis.CartesianAxes","flare.vis.axis.Axes","flare.vis.data.Data"]}, -{"name":"flare.physics.DragForce","size":1082,"imports":["flare.physics.Simulation","flare.physics.Particle","flare.physics.IForce"]}, -{"name":"flare.physics.GravityForce","size":1336,"imports":["flare.physics.Simulation","flare.physics.Particle","flare.physics.IForce"]}, -{"name":"flare.physics.IForce","size":319,"imports":["flare.physics.Simulation"]}, -{"name":"flare.physics.NBodyForce","size":10498,"imports":["flare.physics.Simulation","flare.physics.Particle","flare.physics.IForce"]}, -{"name":"flare.physics.Particle","size":2822,"imports":[]}, -{"name":"flare.physics.Simulation","size":9983,"imports":["flare.physics.Particle","flare.physics.NBodyForce","flare.physics.DragForce","flare.physics.GravityForce","flare.physics.Spring","flare.physics.SpringForce","flare.physics.IForce"]}, -{"name":"flare.physics.Spring","size":2213,"imports":["flare.physics.Particle"]}, -{"name":"flare.physics.SpringForce","size":1681,"imports":["flare.physics.Simulation","flare.physics.Particle","flare.physics.Spring","flare.physics.IForce"]}, -{"name":"flare.query.AggregateExpression","size":1616,"imports":["flare.query.Expression"]}, -{"name":"flare.query.And","size":1027,"imports":["flare.query.CompositeExpression","flare.query.Expression"]}, -{"name":"flare.query.Arithmetic","size":3891,"imports":["flare.query.BinaryExpression","flare.query.Expression"]}, -{"name":"flare.query.Average","size":891,"imports":["flare.query.Expression","flare.query.AggregateExpression"]}, -{"name":"flare.query.BinaryExpression","size":2893,"imports":["flare.query.Expression"]}, -{"name":"flare.query.Comparison","size":5103,"imports":["flare.query.Not","flare.query.BinaryExpression","flare.query.Expression","flare.query.Or"]}, -{"name":"flare.query.CompositeExpression","size":3677,"imports":["flare.query.Expression","flare.query.If"]}, -{"name":"flare.query.Count","size":781,"imports":["flare.query.Expression","flare.query.AggregateExpression"]}, -{"name":"flare.query.DateUtil","size":4141,"imports":["flare.query.Fn"]}, -{"name":"flare.query.Distinct","size":933,"imports":["flare.query.Expression","flare.query.AggregateExpression"]}, -{"name":"flare.query.Expression","size":5130,"imports":["flare.query.Variable","flare.query.IsA","flare.query.ExpressionIterator","flare.util.IPredicate","flare.query.Literal","flare.util.IEvaluable","flare.query.If"]}, -{"name":"flare.query.ExpressionIterator","size":3617,"imports":["flare.query.Expression"]}, -{"name":"flare.query.Fn","size":3240,"imports":["flare.query.DateUtil","flare.query.CompositeExpression","flare.query.Expression","flare.query.StringUtil"]}, -{"name":"flare.query.If","size":2732,"imports":["flare.query.Expression"]}, -{"name":"flare.query.IsA","size":2039,"imports":["flare.query.Expression","flare.query.If"]}, -{"name":"flare.query.Literal","size":1214,"imports":["flare.query.Expression"]}, -{"name":"flare.query.Match","size":3748,"imports":["flare.query.BinaryExpression","flare.query.Expression","flare.query.StringUtil"]}, -{"name":"flare.query.Maximum","size":843,"imports":["flare.query.Expression","flare.query.AggregateExpression"]}, -{"name":"flare.query.methods.add","size":593,"imports":["flare.query.methods.or","flare.query.Arithmetic"]}, -{"name":"flare.query.methods.and","size":330,"imports":["flare.query.And","flare.query.methods.or"]}, -{"name":"flare.query.methods.average","size":287,"imports":["flare.query.Average","flare.query.methods.or"]}, -{"name":"flare.query.methods.count","size":277,"imports":["flare.query.Count","flare.query.methods.or"]}, -{"name":"flare.query.methods.distinct","size":292,"imports":["flare.query.Distinct","flare.query.methods.or"]}, -{"name":"flare.query.methods.div","size":595,"imports":["flare.query.methods.or","flare.query.Arithmetic"]}, -{"name":"flare.query.methods.eq","size":594,"imports":["flare.query.Comparison","flare.query.methods.or"]}, -{"name":"flare.query.methods.fn","size":460,"imports":["flare.query.methods.or","flare.query.Fn"]}, -{"name":"flare.query.methods.gt","size":603,"imports":["flare.query.Comparison","flare.query.methods.or"]}, -{"name":"flare.query.methods.gte","size":625,"imports":["flare.query.Comparison","flare.query.methods.gt","flare.query.methods.eq","flare.query.methods.or"]}, -{"name":"flare.query.methods.iff","size":748,"imports":["flare.query.methods.or","flare.query.If"]}, -{"name":"flare.query.methods.isa","size":461,"imports":["flare.query.IsA","flare.query.methods.or"]}, -{"name":"flare.query.methods.lt","size":597,"imports":["flare.query.Comparison","flare.query.methods.or"]}, -{"name":"flare.query.methods.lte","size":619,"imports":["flare.query.Comparison","flare.query.methods.lt","flare.query.methods.eq","flare.query.methods.or"]}, -{"name":"flare.query.methods.max","size":283,"imports":["flare.query.Maximum","flare.query.methods.or"]}, -{"name":"flare.query.methods.min","size":283,"imports":["flare.query.Minimum","flare.query.methods.or"]}, -{"name":"flare.query.methods.mod","size":591,"imports":["flare.query.methods.or","flare.query.Arithmetic"]}, -{"name":"flare.query.methods.mul","size":603,"imports":["flare.query.methods.lt","flare.query.methods.or","flare.query.Arithmetic"]}, -{"name":"flare.query.methods.neq","size":599,"imports":["flare.query.Comparison","flare.query.methods.eq","flare.query.methods.or"]}, -{"name":"flare.query.methods.not","size":386,"imports":["flare.query.Not","flare.query.methods.or"]}, -{"name":"flare.query.methods.or","size":323,"imports":["flare.query.Or"]}, -{"name":"flare.query.methods.orderby","size":307,"imports":["flare.query.Query","flare.query.methods.or"]}, -{"name":"flare.query.methods.range","size":772,"imports":["flare.query.methods.max","flare.query.Range","flare.query.methods.or","flare.query.methods.min"]}, -{"name":"flare.query.methods.select","size":296,"imports":["flare.query.Query"]}, -{"name":"flare.query.methods.stddev","size":363,"imports":["flare.query.methods.and","flare.query.Variance","flare.query.methods.or"]}, -{"name":"flare.query.methods.sub","size":600,"imports":["flare.query.methods.or","flare.query.Arithmetic"]}, -{"name":"flare.query.methods.sum","size":280,"imports":["flare.query.Sum","flare.query.methods.or"]}, -{"name":"flare.query.methods.update","size":307,"imports":["flare.query.Query"]}, -{"name":"flare.query.methods.variance","size":335,"imports":["flare.query.Variance","flare.query.methods.or"]}, -{"name":"flare.query.methods.where","size":299,"imports":["flare.query.Query","flare.query.methods.lt","flare.query.methods.lte"]}, -{"name":"flare.query.methods.xor","size":354,"imports":["flare.query.Xor","flare.query.methods.or"]}, -{"name":"flare.query.methods._","size":264,"imports":["flare.query.Literal","flare.query.methods.or"]}, -{"name":"flare.query.Minimum","size":843,"imports":["flare.query.Expression","flare.query.AggregateExpression"]}, -{"name":"flare.query.Not","size":1554,"imports":["flare.query.Expression"]}, -{"name":"flare.query.Or","size":970,"imports":["flare.query.CompositeExpression","flare.query.Expression"]}, -{"name":"flare.query.Query","size":13896,"imports":["flare.query.Variable","flare.query.Sum","flare.query.Expression","flare.util.Sort","flare.query.Not","flare.query.AggregateExpression","flare.query.Literal","flare.util.Filter","flare.util.Property","flare.query.If"]}, -{"name":"flare.query.Range","size":1594,"imports":["flare.query.And","flare.query.Comparison","flare.query.Expression"]}, -{"name":"flare.query.StringUtil","size":4130,"imports":["flare.query.Fn"]}, -{"name":"flare.query.Sum","size":791,"imports":["flare.query.Expression","flare.query.AggregateExpression"]}, -{"name":"flare.query.Variable","size":1124,"imports":["flare.query.Expression","flare.util.Property"]}, -{"name":"flare.query.Variance","size":1876,"imports":["flare.query.Expression","flare.query.AggregateExpression"]}, -{"name":"flare.query.Xor","size":1101,"imports":["flare.query.CompositeExpression","flare.query.Expression"]}, -{"name":"flare.scale.IScaleMap","size":2105,"imports":["flare.scale.Scale"]}, -{"name":"flare.scale.LinearScale","size":1316,"imports":["flare.util.Maths","flare.util.Strings","flare.scale.Scale","flare.scale.QuantitativeScale","flare.scale.ScaleType"]}, -{"name":"flare.scale.LogScale","size":3151,"imports":["flare.util.Maths","flare.util.Strings","flare.scale.Scale","flare.scale.QuantitativeScale","flare.scale.ScaleType"]}, -{"name":"flare.scale.OrdinalScale","size":3770,"imports":["flare.scale.ScaleType","flare.util.Arrays","flare.scale.Scale"]}, -{"name":"flare.scale.QuantileScale","size":2435,"imports":["flare.util.Maths","flare.util.Strings","flare.scale.Scale","flare.scale.ScaleType"]}, -{"name":"flare.scale.QuantitativeScale","size":4839,"imports":["flare.util.Maths","flare.util.Strings","flare.scale.Scale"]}, -{"name":"flare.scale.RootScale","size":1756,"imports":["flare.util.Maths","flare.util.Strings","flare.scale.Scale","flare.scale.QuantitativeScale","flare.scale.ScaleType"]}, -{"name":"flare.scale.Scale","size":4268,"imports":["flare.scale.ScaleType","flare.util.Strings"]}, -{"name":"flare.scale.ScaleType","size":1821,"imports":["flare.scale.Scale"]}, -{"name":"flare.scale.TimeScale","size":5833,"imports":["flare.util.Maths","flare.util.Dates","flare.scale.Scale","flare.scale.ScaleType"]}, -{"name":"flare.util.Arrays","size":8258,"imports":["flare.util.IValueProxy","flare.util.Property","flare.util.IEvaluable"]}, -{"name":"flare.util.Colors","size":10001,"imports":["flare.util.Filter"]}, -{"name":"flare.util.Dates","size":8217,"imports":["flare.util.Maths"]}, -{"name":"flare.util.Displays","size":12555,"imports":["flare.util.IValueProxy","flare.util.Filter","flare.util.Property","flare.util.IEvaluable","flare.util.Sort"]}, -{"name":"flare.util.Filter","size":2324,"imports":["flare.util.IPredicate","flare.util.Property"]}, -{"name":"flare.util.Geometry","size":10993,"imports":[]}, -{"name":"flare.util.heap.FibonacciHeap","size":9354,"imports":["flare.util.heap.HeapNode"]}, -{"name":"flare.util.heap.HeapNode","size":1233,"imports":["flare.util.heap.FibonacciHeap"]}, -{"name":"flare.util.IEvaluable","size":335,"imports":[]}, -{"name":"flare.util.IPredicate","size":383,"imports":[]}, -{"name":"flare.util.IValueProxy","size":874,"imports":[]}, -{"name":"flare.util.math.DenseMatrix","size":3165,"imports":["flare.util.math.IMatrix"]}, -{"name":"flare.util.math.IMatrix","size":2815,"imports":[]}, -{"name":"flare.util.math.SparseMatrix","size":3366,"imports":["flare.util.math.IMatrix"]}, -{"name":"flare.util.Maths","size":17705,"imports":["flare.util.Arrays"]}, -{"name":"flare.util.Orientation","size":1486,"imports":[]}, -{"name":"flare.util.palette.ColorPalette","size":6367,"imports":["flare.util.palette.Palette","flare.util.Colors"]}, -{"name":"flare.util.palette.Palette","size":1229,"imports":[]}, -{"name":"flare.util.palette.ShapePalette","size":2059,"imports":["flare.util.palette.Palette","flare.util.Shapes"]}, -{"name":"flare.util.palette.SizePalette","size":2291,"imports":["flare.util.palette.Palette"]}, -{"name":"flare.util.Property","size":5559,"imports":["flare.util.IPredicate","flare.util.IValueProxy","flare.util.IEvaluable"]}, -{"name":"flare.util.Shapes","size":19118,"imports":["flare.util.Arrays"]}, -{"name":"flare.util.Sort","size":6887,"imports":["flare.util.Arrays","flare.util.Property"]}, -{"name":"flare.util.Stats","size":6557,"imports":["flare.util.Arrays","flare.util.Property"]}, -{"name":"flare.util.Strings","size":22026,"imports":["flare.util.Dates","flare.util.Property"]}, -{"name":"flare.vis.axis.Axes","size":1302,"imports":["flare.animate.Transitioner","flare.vis.Visualization"]}, -{"name":"flare.vis.axis.Axis","size":24593,"imports":["flare.animate.Transitioner","flare.scale.LinearScale","flare.util.Arrays","flare.scale.ScaleType","flare.util.Strings","flare.display.TextSprite","flare.scale.Scale","flare.util.Stats","flare.scale.IScaleMap","flare.vis.axis.AxisLabel","flare.vis.axis.AxisGridLine"]}, -{"name":"flare.vis.axis.AxisGridLine","size":652,"imports":["flare.vis.axis.Axis","flare.display.LineSprite"]}, -{"name":"flare.vis.axis.AxisLabel","size":636,"imports":["flare.vis.axis.Axis","flare.display.TextSprite"]}, -{"name":"flare.vis.axis.CartesianAxes","size":6703,"imports":["flare.animate.Transitioner","flare.display.RectSprite","flare.vis.axis.Axis","flare.display.TextSprite","flare.vis.axis.Axes","flare.vis.Visualization","flare.vis.axis.AxisGridLine"]}, -{"name":"flare.vis.controls.AnchorControl","size":2138,"imports":["flare.vis.controls.Control","flare.vis.Visualization","flare.vis.operator.layout.Layout"]}, -{"name":"flare.vis.controls.ClickControl","size":3824,"imports":["flare.vis.events.SelectionEvent","flare.vis.controls.Control"]}, -{"name":"flare.vis.controls.Control","size":1353,"imports":["flare.vis.controls.IControl","flare.util.Filter"]}, -{"name":"flare.vis.controls.ControlList","size":4665,"imports":["flare.vis.controls.IControl","flare.util.Arrays","flare.vis.Visualization","flare.vis.controls.Control"]}, -{"name":"flare.vis.controls.DragControl","size":2649,"imports":["flare.vis.controls.Control","flare.vis.data.DataSprite"]}, -{"name":"flare.vis.controls.ExpandControl","size":2832,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.controls.Control","flare.vis.Visualization"]}, -{"name":"flare.vis.controls.HoverControl","size":4896,"imports":["flare.vis.events.SelectionEvent","flare.vis.controls.Control"]}, -{"name":"flare.vis.controls.IControl","size":763,"imports":["flare.vis.controls.Control"]}, -{"name":"flare.vis.controls.PanZoomControl","size":5222,"imports":["flare.util.Displays","flare.vis.controls.Control"]}, -{"name":"flare.vis.controls.SelectionControl","size":7862,"imports":["flare.vis.events.SelectionEvent","flare.vis.controls.Control"]}, -{"name":"flare.vis.controls.TooltipControl","size":8435,"imports":["flare.animate.Tween","flare.display.TextSprite","flare.vis.controls.Control","flare.vis.events.TooltipEvent"]}, -{"name":"flare.vis.data.Data","size":20544,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.util.Arrays","flare.vis.data.DataSprite","flare.vis.data.Tree","flare.vis.events.DataEvent","flare.data.DataSet","flare.vis.data.TreeBuilder","flare.vis.data.DataList","flare.data.DataSchema","flare.util.Sort","flare.data.DataField","flare.util.Property"]}, -{"name":"flare.vis.data.DataList","size":19788,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.util.Arrays","flare.util.math.DenseMatrix","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite","flare.vis.events.DataEvent","flare.util.Stats","flare.util.math.IMatrix","flare.util.Sort","flare.util.Filter","flare.util.Property","flare.util.IEvaluable","flare.vis.data.Data"]}, -{"name":"flare.vis.data.DataSprite","size":10349,"imports":["flare.util.Colors","flare.vis.data.Data","flare.display.DirtySprite","flare.vis.data.render.IRenderer","flare.vis.data.render.ShapeRenderer"]}, -{"name":"flare.vis.data.EdgeSprite","size":3301,"imports":["flare.vis.data.render.EdgeRenderer","flare.vis.data.DataSprite","flare.vis.data.NodeSprite","flare.vis.data.render.ArrowType","flare.vis.data.Data"]}, -{"name":"flare.vis.data.NodeSprite","size":19382,"imports":["flare.animate.Transitioner","flare.util.Arrays","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite","flare.vis.data.Tree","flare.util.Sort","flare.util.Filter","flare.util.IEvaluable","flare.vis.data.Data"]}, -{"name":"flare.vis.data.render.ArrowType","size":698,"imports":[]}, -{"name":"flare.vis.data.render.EdgeRenderer","size":5569,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.vis.data.DataSprite","flare.vis.data.render.IRenderer","flare.util.Shapes","flare.util.Geometry","flare.vis.data.render.ArrowType"]}, -{"name":"flare.vis.data.render.IRenderer","size":353,"imports":["flare.vis.data.DataSprite"]}, -{"name":"flare.vis.data.render.ShapeRenderer","size":2247,"imports":["flare.util.Shapes","flare.vis.data.render.IRenderer","flare.vis.data.DataSprite"]}, -{"name":"flare.vis.data.ScaleBinding","size":11275,"imports":["flare.scale.TimeScale","flare.scale.ScaleType","flare.scale.LinearScale","flare.scale.LogScale","flare.scale.OrdinalScale","flare.scale.RootScale","flare.scale.Scale","flare.scale.QuantileScale","flare.util.Stats","flare.scale.QuantitativeScale","flare.vis.events.DataEvent","flare.vis.data.Data"]}, -{"name":"flare.vis.data.Tree","size":7147,"imports":["flare.vis.data.EdgeSprite","flare.vis.events.DataEvent","flare.vis.data.NodeSprite","flare.vis.data.Data"]}, -{"name":"flare.vis.data.TreeBuilder","size":9930,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.vis.data.Tree","flare.util.heap.HeapNode","flare.util.heap.FibonacciHeap","flare.util.Property","flare.util.IEvaluable","flare.vis.data.Data"]}, -{"name":"flare.vis.events.DataEvent","size":2313,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite","flare.vis.data.DataList","flare.vis.data.DataSprite"]}, -{"name":"flare.vis.events.SelectionEvent","size":1880,"imports":["flare.vis.events.DataEvent"]}, -{"name":"flare.vis.events.TooltipEvent","size":1701,"imports":["flare.vis.data.EdgeSprite","flare.vis.data.NodeSprite"]}, -{"name":"flare.vis.events.VisualizationEvent","size":1117,"imports":["flare.animate.Transitioner"]}, -{"name":"flare.vis.legend.Legend","size":20859,"imports":["flare.animate.Transitioner","flare.vis.data.ScaleBinding","flare.util.palette.SizePalette","flare.scale.ScaleType","flare.vis.legend.LegendItem","flare.display.RectSprite","flare.display.TextSprite","flare.scale.Scale","flare.vis.legend.LegendRange","flare.util.Displays","flare.util.Orientation","flare.util.palette.ShapePalette","flare.util.palette.Palette","flare.util.palette.ColorPalette"]}, -{"name":"flare.vis.legend.LegendItem","size":4614,"imports":["flare.util.Shapes","flare.display.TextSprite","flare.vis.legend.Legend","flare.display.RectSprite"]}, -{"name":"flare.vis.legend.LegendRange","size":10530,"imports":["flare.util.Colors","flare.vis.legend.Legend","flare.display.RectSprite","flare.display.TextSprite","flare.scale.Scale","flare.util.Stats","flare.scale.IScaleMap","flare.util.Orientation","flare.util.palette.ColorPalette"]}, -{"name":"flare.vis.operator.distortion.BifocalDistortion","size":4461,"imports":["flare.vis.operator.distortion.Distortion"]}, -{"name":"flare.vis.operator.distortion.Distortion","size":6314,"imports":["flare.animate.Transitioner","flare.vis.data.DataSprite","flare.vis.events.VisualizationEvent","flare.vis.axis.Axis","flare.vis.axis.CartesianAxes","flare.vis.operator.layout.Layout","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.distortion.FisheyeDistortion","size":3444,"imports":["flare.vis.operator.distortion.Distortion"]}, -{"name":"flare.vis.operator.encoder.ColorEncoder","size":3179,"imports":["flare.animate.Transitioner","flare.scale.ScaleType","flare.vis.operator.encoder.Encoder","flare.util.palette.Palette","flare.util.palette.ColorPalette","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.encoder.Encoder","size":4060,"imports":["flare.animate.Transitioner","flare.vis.data.DataSprite","flare.vis.operator.Operator","flare.vis.data.ScaleBinding","flare.util.palette.Palette","flare.util.Filter","flare.util.Property","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.encoder.PropertyEncoder","size":4138,"imports":["flare.animate.Transitioner","flare.vis.data.DataList","flare.vis.data.Data","flare.vis.operator.encoder.Encoder","flare.util.Filter","flare.vis.operator.Operator"]}, -{"name":"flare.vis.operator.encoder.ShapeEncoder","size":1690,"imports":["flare.util.palette.Palette","flare.scale.ScaleType","flare.util.palette.ShapePalette","flare.vis.operator.encoder.Encoder","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.encoder.SizeEncoder","size":1830,"imports":["flare.util.palette.Palette","flare.scale.ScaleType","flare.vis.operator.encoder.Encoder","flare.util.palette.SizePalette","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.filter.FisheyeTreeFilter","size":5219,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite","flare.vis.data.Tree","flare.vis.operator.Operator","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.filter.GraphDistanceFilter","size":3165,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.operator.Operator","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite"]}, -{"name":"flare.vis.operator.filter.VisibilityFilter","size":3509,"imports":["flare.vis.operator.Operator","flare.animate.Transitioner","flare.util.Filter","flare.vis.data.DataSprite","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.IOperator","size":1286,"imports":["flare.animate.Transitioner","flare.vis.Visualization","flare.vis.operator.Operator"]}, -{"name":"flare.vis.operator.label.Labeler","size":9956,"imports":["flare.animate.Transitioner","flare.vis.data.DataSprite","flare.display.TextSprite","flare.vis.operator.Operator","flare.util.Shapes","flare.util.Filter","flare.util.Property","flare.util.IEvaluable","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.label.RadialLabeler","size":3899,"imports":["flare.vis.operator.label.Labeler","flare.util.Shapes","flare.display.TextSprite","flare.vis.data.DataSprite","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.label.StackedAreaLabeler","size":3202,"imports":["flare.vis.operator.label.Labeler","flare.display.TextSprite","flare.vis.data.DataSprite","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.layout.AxisLayout","size":6725,"imports":["flare.scale.ScaleType","flare.vis.data.DataSprite","flare.vis.axis.CartesianAxes","flare.vis.data.ScaleBinding","flare.util.Property","flare.vis.operator.layout.Layout","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.layout.BundledEdgeRouter","size":3727,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.util.Arrays","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite","flare.util.Shapes","flare.vis.operator.layout.Layout","flare.vis.operator.Operator"]}, -{"name":"flare.vis.operator.layout.CircleLayout","size":9317,"imports":["flare.vis.data.NodeSprite","flare.vis.data.DataList","flare.vis.data.ScaleBinding","flare.util.Property","flare.vis.operator.layout.Layout","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.layout.CirclePackingLayout","size":12003,"imports":["flare.vis.data.NodeSprite","flare.vis.data.render.ShapeRenderer","flare.util.Shapes","flare.util.Sort","flare.vis.operator.layout.Layout","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.layout.DendrogramLayout","size":4853,"imports":["flare.util.Property","flare.vis.data.NodeSprite","flare.util.Orientation","flare.vis.operator.layout.Layout","flare.vis.data.EdgeSprite"]}, -{"name":"flare.vis.operator.layout.ForceDirectedLayout","size":8411,"imports":["flare.physics.Simulation","flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.DataSprite","flare.physics.Particle","flare.physics.Spring","flare.vis.operator.layout.Layout","flare.vis.data.EdgeSprite","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.layout.IcicleTreeLayout","size":4864,"imports":["flare.vis.data.NodeSprite","flare.util.Orientation","flare.vis.operator.layout.Layout"]}, -{"name":"flare.vis.operator.layout.IndentedTreeLayout","size":3174,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.util.Arrays","flare.vis.operator.layout.Layout","flare.vis.data.EdgeSprite"]}, -{"name":"flare.vis.operator.layout.Layout","size":7881,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.vis.data.DataList","flare.vis.data.DataSprite","flare.vis.data.EdgeSprite","flare.vis.Visualization","flare.vis.axis.CartesianAxes","flare.vis.axis.Axes","flare.animate.TransitionEvent","flare.vis.operator.Operator"]}, -{"name":"flare.vis.operator.layout.NodeLinkTreeLayout","size":12870,"imports":["flare.vis.data.NodeSprite","flare.util.Arrays","flare.util.Orientation","flare.vis.operator.layout.Layout"]}, -{"name":"flare.vis.operator.layout.PieLayout","size":2728,"imports":["flare.vis.data.DataList","flare.vis.data.DataSprite","flare.util.Shapes","flare.util.Property","flare.vis.operator.layout.Layout","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.layout.RadialTreeLayout","size":12348,"imports":["flare.vis.data.NodeSprite","flare.util.Arrays","flare.vis.operator.layout.Layout"]}, -{"name":"flare.vis.operator.layout.RandomLayout","size":870,"imports":["flare.vis.operator.layout.Layout","flare.vis.data.DataSprite","flare.vis.data.Data"]}, -{"name":"flare.vis.operator.layout.StackedAreaLayout","size":9121,"imports":["flare.scale.TimeScale","flare.scale.LinearScale","flare.util.Arrays","flare.scale.OrdinalScale","flare.vis.data.NodeSprite","flare.scale.Scale","flare.vis.axis.CartesianAxes","flare.util.Stats","flare.util.Orientation","flare.scale.QuantitativeScale","flare.util.Maths","flare.vis.operator.layout.Layout"]}, -{"name":"flare.vis.operator.layout.TreeMapLayout","size":9191,"imports":["flare.animate.Transitioner","flare.vis.data.NodeSprite","flare.util.Property","flare.vis.operator.layout.Layout"]}, -{"name":"flare.vis.operator.Operator","size":2490,"imports":["flare.animate.Transitioner","flare.vis.operator.IOperator","flare.util.Property","flare.util.IEvaluable","flare.vis.Visualization"]}, -{"name":"flare.vis.operator.OperatorList","size":5248,"imports":["flare.animate.Transitioner","flare.util.Arrays","flare.vis.operator.IOperator","flare.vis.Visualization","flare.vis.operator.Operator"]}, -{"name":"flare.vis.operator.OperatorSequence","size":4190,"imports":["flare.animate.Transitioner","flare.util.Arrays","flare.vis.operator.IOperator","flare.vis.operator.OperatorList","flare.animate.FunctionSequence","flare.vis.operator.Operator"]}, -{"name":"flare.vis.operator.OperatorSwitch","size":2581,"imports":["flare.animate.Transitioner","flare.vis.operator.OperatorList","flare.vis.operator.IOperator","flare.vis.operator.Operator"]}, -{"name":"flare.vis.operator.SortOperator","size":2023,"imports":["flare.vis.operator.Operator","flare.animate.Transitioner","flare.util.Arrays","flare.vis.data.Data"]}, -{"name":"flare.vis.Visualization","size":16540,"imports":["flare.animate.Transitioner","flare.vis.operator.IOperator","flare.animate.Scheduler","flare.vis.events.VisualizationEvent","flare.vis.data.Tree","flare.vis.events.DataEvent","flare.vis.axis.Axes","flare.vis.axis.CartesianAxes","flare.util.Displays","flare.vis.operator.OperatorList","flare.vis.controls.ControlList","flare.animate.ISchedulable","flare.vis.data.Data"]} -]; diff --git a/lib/protovis/tests/flare.js b/lib/protovis/tests/flare.js deleted file mode 100644 index b6baef1c..00000000 --- a/lib/protovis/tests/flare.js +++ /dev/null @@ -1,284 +0,0 @@ -var flare = { - analytics: { - cluster: { - AgglomerativeCluster: 3938, - CommunityStructure: 3812, - HierarchicalCluster: 6714, - MergeEdge: 743 - }, - graph: { - BetweennessCentrality: 3534, - LinkDistance: 5731, - MaxFlowMinCut: 7840, - ShortestPaths: 5914, - SpanningTree: 3416 - }, - optimization: { - AspectRatioBanker: 7074 - } - }, - animate: { - Easing: 17010, - FunctionSequence: 5842, - interpolate: { - ArrayInterpolator: 1983, - ColorInterpolator: 2047, - DateInterpolator: 1375, - Interpolator: 8746, - MatrixInterpolator: 2202, - NumberInterpolator: 1382, - ObjectInterpolator: 1629, - PointInterpolator: 1675, - RectangleInterpolator: 2042 - }, - ISchedulable: 1041, - Parallel: 5176, - Pause: 449, - Scheduler: 5593, - Sequence: 5534, - Transition: 9201, - Transitioner: 19975, - TransitionEvent: 1116, - Tween: 6006 - }, - data: { - converters: { - Converters: 721, - DelimitedTextConverter: 4294, - GraphMLConverter: 9800, - IDataConverter: 1314, - JSONConverter: 2220 - }, - DataField: 1759, - DataSchema: 2165, - DataSet: 586, - DataSource: 3331, - DataTable: 772, - DataUtil: 3322 - }, - display: { - DirtySprite: 8833, - LineSprite: 1732, - RectSprite: 3623, - TextSprite: 10066 - }, - flex: { - FlareVis: 4116 - }, - physics: { - DragForce: 1082, - GravityForce: 1336, - IForce: 319, - NBodyForce: 10498, - Particle: 2822, - Simulation: 9983, - Spring: 2213, - SpringForce: 1681 - }, - query: { - AggregateExpression: 1616, - And: 1027, - Arithmetic: 3891, - Average: 891, - BinaryExpression: 2893, - Comparison: 5103, - CompositeExpression: 3677, - Count: 781, - DateUtil: 4141, - Distinct: 933, - Expression: 5130, - ExpressionIterator: 3617, - Fn: 3240, - If: 2732, - IsA: 2039, - Literal: 1214, - Match: 3748, - Maximum: 843, - methods: { - add: 593, - and: 330, - average: 287, - count: 277, - distinct: 292, - div: 595, - eq: 594, - fn: 460, - gt: 603, - gte: 625, - iff: 748, - isa: 461, - lt: 597, - lte: 619, - max: 283, - min: 283, - mod: 591, - mul: 603, - neq: 599, - not: 386, - or: 323, - orderby: 307, - range: 772, - select: 296, - stddev: 363, - sub: 600, - sum: 280, - update: 307, - variance: 335, - where: 299, - xor: 354, - _: 264 - }, - Minimum: 843, - Not: 1554, - Or: 970, - Query: 13896, - Range: 1594, - StringUtil: 4130, - Sum: 791, - Variable: 1124, - Variance: 1876, - Xor: 1101 - }, - scale: { - IScaleMap: 2105, - LinearScale: 1316, - LogScale: 3151, - OrdinalScale: 3770, - QuantileScale: 2435, - QuantitativeScale: 4839, - RootScale: 1756, - Scale: 4268, - ScaleType: 1821, - TimeScale: 5833 - }, - util: { - Arrays: 8258, - Colors: 10001, - Dates: 8217, - Displays: 12555, - Filter: 2324, - Geometry: 10993, - heap: { - FibonacciHeap: 9354, - HeapNode: 1233 - }, - IEvaluable: 335, - IPredicate: 383, - IValueProxy: 874, - math: { - DenseMatrix: 3165, - IMatrix: 2815, - SparseMatrix: 3366 - }, - Maths: 17705, - Orientation: 1486, - palette: { - ColorPalette: 6367, - Palette: 1229, - ShapePalette: 2059, - SizePalette: 2291 - }, - Property: 5559, - Shapes: 19118, - Sort: 6887, - Stats: 6557, - Strings: 22026 - }, - vis: { - axis: { - Axes: 1302, - Axis: 24593, - AxisGridLine: 652, - AxisLabel: 636, - CartesianAxes: 6703 - }, - controls: { - AnchorControl: 2138, - ClickControl: 3824, - Control: 1353, - ControlList: 4665, - DragControl: 2649, - ExpandControl: 2832, - HoverControl: 4896, - IControl: 763, - PanZoomControl: 5222, - SelectionControl: 7862, - TooltipControl: 8435 - }, - data: { - Data: 20544, - DataList: 19788, - DataSprite: 10349, - EdgeSprite: 3301, - NodeSprite: 19382, - render: { - ArrowType: 698, - EdgeRenderer: 5569, - IRenderer: 353, - ShapeRenderer: 2247 - }, - ScaleBinding: 11275, - Tree: 7147, - TreeBuilder: 9930 - }, - events: { - DataEvent: 2313, - SelectionEvent: 1880, - TooltipEvent: 1701, - VisualizationEvent: 1117 - }, - legend: { - Legend: 20859, - LegendItem: 4614, - LegendRange: 10530 - }, - operator: { - distortion: { - BifocalDistortion: 4461, - Distortion: 6314, - FisheyeDistortion: 3444 - }, - encoder: { - ColorEncoder: 3179, - Encoder: 4060, - PropertyEncoder: 4138, - ShapeEncoder: 1690, - SizeEncoder: 1830 - }, - filter: { - FisheyeTreeFilter: 5219, - GraphDistanceFilter: 3165, - VisibilityFilter: 3509 - }, - IOperator: 1286, - label: { - Labeler: 9956, - RadialLabeler: 3899, - StackedAreaLabeler: 3202 - }, - layout: { - AxisLayout: 6725, - BundledEdgeRouter: 3727, - CircleLayout: 9317, - CirclePackingLayout: 12003, - DendrogramLayout: 4853, - ForceDirectedLayout: 8411, - IcicleTreeLayout: 4864, - IndentedTreeLayout: 3174, - Layout: 7881, - NodeLinkTreeLayout: 12870, - PieLayout: 2728, - RadialTreeLayout: 12348, - RandomLayout: 870, - StackedAreaLayout: 9121, - TreeMapLayout: 9191 - }, - Operator: 2490, - OperatorList: 5248, - OperatorSequence: 4190, - OperatorSwitch: 2581, - SortOperator: 2023 - }, - Visualization: 16540 - } -}; diff --git a/lib/protovis/tests/geo/countries-hires.js b/lib/protovis/tests/geo/countries-hires.js deleted file mode 100644 index 3b470557..00000000 --- a/lib/protovis/tests/geo/countries-hires.js +++ /dev/null @@ -1,257 +0,0 @@ -var countries = [ -{code:"AG", name:"Antigua and Barbuda", lng:-61.783, lat:17.078, borders:[[[-61.68662302,17.024441],[-61.88719206,17.105274],[-61.79441819,17.16333],[-61.68662302,17.024441]],[[-61.72914099,17.608608],[-61.85305772,17.583054],[-61.87303175,17.703888],[-61.72914099,17.608608]]]}, -{code:"DZ", name:"Algeria", lng:2.632, lat:28.163, borders:[[[2.96361,36.802216],[4.785832,36.894722],[5.328055,36.640274],[6.398333,37.086388],[8.62203,36.941368],[8.183611,36.524162],[8.251665,34.64444],[7.492499,33.887497],[8.34861,32.533333],[9.055277,32.099998],[9.537113,30.23439],[9.303888,30.122498],[9.766388,29.427776],[9.948332,27.824444],[9.871666,26.514164],[9.398333,26.153332],[10.252222,24.605831],[11.558887,24.302498],[11.986475,23.522305],[7.450807,20.852863],[5.812499,19.44611],[4.245277,19.146664],[3.331944,18.976387],[3.233055,19.820274],[1.795833,20.308331],[1.1675,20.741108],[1.169662,21.102543],[-4.80610976,25.000275],[-6.66277589,26.129166],[-8.66678239,27.290459],[-8.66666025,27.666664],[-8.66721914,28.709442],[-7.12388322,29.636944],[-5.53833379,29.902496],[-4.92055423,30.508053],[-3.62666323,30.970554],[-3.81833134,31.695553],[-2.85388612,32.088333],[-1.18055469,32.11055],[-1.0102775,32.508331],[-1.66805507,33.261108],[-1.74722189,34.747215],[-2.20944309,35.085831],[0.95,36.450272],[2.96361,36.802216]]]}, -{code:"AZ", name:"Azerbaijan", lng:47.395, lat:40.430, borders:[[[45.08332253,39.76804543],[45.81998634,39.54972267],[46.17824745,38.84115028],[45.00443459,39.41638374],[44.81304359,39.63081551],[44.77886391,39.70638466],[45.08332253,39.76804543]],[[45.51305199,40.6072216],[45.51749229,40.6655407],[45.57305336,40.63249016],[45.51305199,40.6072216]],[[45.24527168,40.97694206],[45.22916222,40.96915245],[45.19582176,40.99777031],[45.24527168,40.97694206]],[[45.04527092,41.0352726],[45.0099926,41.03305244],[45.00111198,41.08888054],[45.04527092,41.0352726]],[[46.57138252,41.87193489],[47.76693153,41.19609261],[48.58395576,41.83577156],[49.52804756,40.66276741],[50.37499428,40.26221657],[49.48804665,40.15053749],[48.88828468,38.44240761],[48.02082253,38.83554268],[48.35978889,39.38521767],[47.97666359,39.71923256],[46.54037666,38.87558937],[46.54138374,39.56443977],[45.59581947,39.97804451],[46.00193977,40.2255497],[45.15387154,41.19860268],[45.0229435,41.29705238],[45.33665657,41.4624958],[46.52082253,41.0499897],[46.69387245,41.31220436],[46.1944294,41.68582344],[46.45175362,41.89705849],[46.57138252,41.87193489]]]}, -{code:"AL", name:"Albania", lng:20.068, lat:41.143, borders:[[[19.436214,41.021065],[19.600555,41.796661],[19.367771,41.848999],[19.645832,42.61805],[20.071423,42.560913],[20.589642,41.882187],[20.492775,41.331108],[20.82111,40.908882],[20.98349,40.855888],[20.671944,40.098053],[20.010029,39.6912],[19.863052,40.039719],[19.288609,40.417496],[19.478611,40.350273],[19.436214,41.021065]]]}, -{code:"AM", name:"Armenia", lng:44.563, lat:40.534, borders:[[[45.15387154,41.19860268],[46.00193977,40.2255497],[45.59581947,39.97804451],[46.54138374,39.56443977],[46.54037666,38.87558937],[46.17824745,38.84115028],[45.81998634,39.54972267],[45.08332253,39.76804543],[44.77886391,39.70638466],[44.34721565,40.02388954],[43.6574955,40.10859871],[43.75193977,40.73999977],[43.46077156,41.11296272],[45.0229435,41.29705238],[45.15387154,41.19860268]],[[45.0099926,41.03305244],[45.04527092,41.0352726],[45.00111198,41.08888054],[45.0099926,41.03305244]],[[45.19582176,40.99777031],[45.22916222,40.96915245],[45.24527168,40.97694206],[45.19582176,40.99777031]],[[45.57305336,40.63249016],[45.51749229,40.6655407],[45.51305199,40.6072216],[45.57305336,40.63249016]]]}, -{code:"AO", name:"Angola", lng:17.544, lat:-12.296, borders:[[[11.75083351,-16.75527954],[11.69360924,-16.53554916],[11.77499962,-16.80471039],[11.75083351,-16.75527954]],[[13.99749947,-5.84860802],[16.57972145,-5.90083313],[16.94166756,-7.19860649],[17.62416649,-8.09804916],[19.37305641,-7.9961071],[19.53894997,-6.99661064],[20.62974739,-6.91387749],[20.54871559,-7.28361511],[21.78296089,-7.28084183],[21.79055595,-9.40555573],[22.31222343,-10.3644371],[22.25388908,-11.20971107],[23.98620796,-10.87046051],[24.0205555,-13.00638199],[21.99833488,-13.00416374],[22.00015068,-16.17166138],[23.47611046,-17.62581253],[23.28472328,-17.6624794],[20.85416603,-18.01638412],[18.91583443,-17.81554794],[18.45153999,-17.38982773],[13.99321938,-17.42392349],[13.16055489,-16.95277023],[11.75278282,-17.25481033],[11.82083321,-16.50304794],[11.81083488,-15.99305725],[11.73139,-15.84666061],[12.50972176,-13.4252758],[13.79250145,-11.79166031],[13.77361107,-10.6847229],[12.98444557,-9.08750153],[13.39138985,-8.38722229],[12.24500084,-6.09805107],[13.17888069,-5.85632515],[13.99749947,-5.84860802]],[[13.08888817,-4.66249657],[12.56555367,-5.02555466],[12.52666664,-5.72416687],[12.21455193,-5.76855469],[12.02613258,-5.01499557],[12.77904701,-4.38898659],[13.09139061,-4.63305092],[13.08888817,-4.66249657]]]}, -{code:"AS", name:"American Samoa", lng:-170.730, lat:-14.318, borders:[[[-170.54244994,-14.29749822],[-170.56076003,-14.28778052],[-170.53979498,-14.28388754],[-170.54244994,-14.29749822]],[[-170.63714606,-14.28944194],[-170.82598861,-14.3249909],[-170.55984505,-14.26582499],[-170.63714606,-14.28944194]],[[-169.44442702,-14.26166369],[-169.51306105,-14.275818],[-169.53613263,-14.23166513],[-169.44442702,-14.26166369]],[[-169.62539656,-14.18971831],[-169.64456164,-14.17610763],[-169.62170434,-14.16860724],[-169.62539656,-14.18971831]],[[-169.68551675,-14.19193662],[-169.6907348,-14.16749046],[-169.66198775,-14.17498984],[-169.68551675,-14.19193662]]]}, -{code:"AR", name:"Argentina", lng:-65.167, lat:-35.377, borders:[[[-68.60855109,-54.89137988],[-68.64302081,-54.88861068],[-68.6360928,-54.80472607],[-68.60855109,-54.89137988]],[[-63.81358327,-54.73137655],[-64.67834445,-54.90722613],[-64.75521805,-54.83497591],[-63.81358327,-54.73137655]],[[-68.26185571,-52.98801422],[-68.5435332,-53.2294163],[-67.35908472,-54.02884626],[-65.13806105,-54.65161169],[-65.35386667,-54.9291684],[-66.44609091,-55.05165852],[-68.63577245,-54.78832216],[-68.61752342,-52.64144898],[-68.26185571,-52.98801422]],[[-61.87886046,-39.24248535],[-62.09526776,-39.08911169],[-61.89051089,-39.13915231],[-61.87886046,-39.24248535]],[[-61.99688745,-39.0669021],[-62.13278196,-39.01882973],[-61.98137655,-39.02688601],[-61.99688745,-39.0669021]],[[-65.74803175,-22.11165964],[-65.19017009,-22.09472312],[-64.59046927,-22.21471836],[-64.32469206,-22.87358138],[-63.94108615,-22.00081295],[-62.81195037,-21.99691797],[-62.64370759,-22.2388802],[-61.00778196,-23.81331295],[-57.75609603,-25.17693684],[-57.57665231,-25.54943095],[-58.60460652,-27.31689858],[-55.736114,-27.43943073],[-54.69833348,-26.43831295],[-54.59889994,-25.57320034],[-53.86328854,-25.68109913],[-53.80775455,-27.1291623],[-55.76523558,-28.22609747],[-57.60800142,-30.18491753],[-57.80633593,-30.74821044],[-58.1991955,-32.45026373],[-58.14720959,-33.05165852],[-58.42693284,-33.09690066],[-58.53195181,-33.51692951],[-58.38386523,-34.0557933],[-58.46972613,-34.53968074],[-57.18830895,-35.32055628],[-57.3766249,-35.96275311],[-56.7416684,-36.31832171],[-56.66304784,-36.90052843],[-57.57163955,-38.13305628],[-58.30111689,-38.4849697],[-61.09445181,-38.99580418],[-62.38136335,-38.798614],[-62.01997403,-39.37804452],[-62.27721436,-39.33525123],[-62.06777908,-39.5055464],[-62.48943284,-40.29943095],[-62.18384582,-40.62967641],[-62.38996126,-40.90188601],[-63.76583825,-41.16582504],[-65.13435383,-40.84771761],[-65.01359568,-42.09216321],[-64.45185859,-42.4458236],[-63.74688745,-42.09053031],[-63.58051278,-42.6238477],[-64.08688312,-42.89023558],[-64.39796451,-42.51583825],[-64.96046451,-42.66637467],[-64.29495282,-42.99193572],[-65.32250953,-43.65303031],[-65.24945037,-44.31304163],[-65.69161978,-44.71688889],[-65.60461459,-45.01637988],[-66.94935571,-45.2555464],[-67.58435017,-46.00025132],[-67.50608803,-46.45889264],[-66.81695513,-46.9916684],[-65.77938889,-47.18940021],[-65.87182641,-47.75805628],[-66.24356062,-47.86023702],[-65.78710982,-47.96248579],[-67.57936048,-49.03412634],[-67.89720159,-49.98583969],[-69.0110928,-50.01191675],[-68.37019352,-50.14660693],[-68.94108615,-50.38806105],[-69.40885902,-51.07773558],[-69.1835635,-50.97054307],[-68.96797216,-51.57387511],[-69.6138912,-51.62580895],[-68.98800622,-51.62466465],[-68.44166585,-52.37771616],[-69.99824503,-51.99634582],[-71.91047692,-51.99580418],[-72.40046739,-51.51360368],[-72.29408284,-50.64971148],[-73.16603132,-50.75331883],[-73.58349626,-49.53804784],[-72.5641179,-48.80443572],[-72.28710982,-48.34188889],[-72.53636191,-47.92137944],[-72.36029005,-47.46994041],[-71.86856062,-47.22162634],[-71.94020116,-46.81554452],[-71.66941819,-46.6791684],[-71.78047216,-45.64883449],[-71.29779005,-45.29333492],[-72.07849149,-44.76943239],[-71.28222613,-44.8002399],[-71.10800145,-44.53968074],[-71.85494994,-44.37167317],[-71.7326661,-43.18804163],[-72.13685571,-43.00913955],[-72.13183595,-42.28886379],[-71.72602844,-42.09662634],[-71.95056105,-40.73273514],[-71.69555628,-39.58443428],[-71.40133638,-38.92023514],[-70.82414243,-38.5680464],[-71.1851964,-36.84216321],[-70.42419474,-36.13599369],[-70.56750477,-35.24776443],[-69.8125,-34.23551134],[-69.77438312,-33.38109603],[-70.09886191,-33.1724697],[-70.53297404,-31.18804163],[-69.83165008,-30.19054752],[-70.03134114,-29.30636945],[-69.65528895,-28.40091737],[-68.81074503,-27.12053287],[-68.28710982,-26.91525689],[-68.58349626,-26.50527908],[-68.35189842,-25.11721004],[-68.56488081,-24.77444416],[-67.33578486,-24.02163744],[-67.00074791,-23.0027732],[-67.1835635,-22.82164355],[-66.22291585,-21.78051416],[-65.74803175,-22.11165964]]]}, -{code:"AU", name:"Australia", lng:136.189, lat:-24.973, borders:[[[158.88217354,-54.71134186],[158.8333149,-54.74972534],[158.9574604,-54.47468567],[158.88217354,-54.71134186]],[[147.36273384,-43.39802551],[147.12301826,-43.42192841],[147.29193306,-43.26191711],[147.36273384,-43.39802551]],[[147.42968941,-43.25358582],[147.29193306,-43.16441345],[147.35995674,-43.07360077],[147.42968941,-43.25358582]],[[148.17053413,-42.66387177],[148.01416206,-42.75304413],[148.02108955,-42.61802673],[148.17053413,-42.66387177]],[[148.3333149,-42.35887909],[148.23108101,-42.30194092],[148.31912422,-42.31277466],[148.3333149,-42.35887909]],[[145.10772896,-40.82164001],[146.586092,-41.18663025],[148.22329903,-40.85082245],[148.36551094,-42.21498871],[148.18387032,-41.9430542],[147.84301949,-42.8694458],[147.99524117,-43.22969055],[147.31747627,-42.84663391],[146.91670418,-43.61781311],[146.03830147,-43.49803925],[146.23636055,-43.32719421],[145.49691963,-42.95774841],[145.20523262,-42.2569046],[145.55191231,-42.34413147],[144.68246651,-41.22332764],[144.70135689,-40.75914001],[145.10772896,-40.82164001]],[[144.92636299,-40.72245026],[144.92413521,-40.61524963],[145.01608467,-40.69550323],[144.92636299,-40.72245026]],[[148.20025826,-40.59413147],[148.09720039,-40.53385925],[148.2157917,-40.50190163],[148.20025826,-40.59413147]],[[144.75555611,-40.59663391],[144.71747017,-40.50386047],[144.77969551,-40.40940857],[144.75555611,-40.59663391]],[[144.94134712,-40.45889282],[144.83218575,-40.43357849],[144.94970894,-40.38719177],[144.94134712,-40.45889282]],[[148.3546772,-40.31555176],[148.47580147,-40.44387054],[147.9935627,-40.42050934],[148.3546772,-40.31555176]],[[148.17746162,-40.2569046],[147.88189888,-39.7541275],[148.27942085,-39.96580505],[148.17746162,-40.2569046]],[[143.95773506,-40.10997009],[143.97302437,-39.57333374],[144.14749336,-39.92720795],[143.95773506,-40.10997009]],[[147.35357857,-39.49939728],[147.30746651,-39.48747253],[147.34442329,-39.44800568],[147.35357857,-39.49939728]],[[147.2999897,-39.48220062],[147.28524971,-39.47386932],[147.31552315,-39.4319458],[147.2999897,-39.48220062]],[[146.65555,-38.76970673],[146.54471016,-38.80024719],[146.46774483,-38.75805664],[146.65555,-38.76970673]],[[145.31164742,-38.46777344],[145.36136055,-38.56913757],[145.11358833,-38.52885437],[145.31164742,-38.46777344]],[[145.49273872,-38.37439728],[145.27108955,-38.36328888],[145.30581856,-38.29692078],[145.49273872,-38.37439728]],[[137.58496284,-35.65080261],[138.11273384,-35.86972046],[136.53442574,-35.9124527],[137.58496284,-35.65080261]],[[136.49524117,-35.17551422],[136.43441963,-35.15805054],[136.46664619,-35.13861084],[136.49524117,-35.17551422]],[[136.2027607,-35.07691956],[136.08664131,-34.94718933],[136.19580269,-35.0263443],[136.2027607,-35.07691956]],[[118.47191811,-34.93831635],[118.42469978,-34.90777588],[118.4763813,-34.9180603],[118.47191811,-34.93831635]],[[137.35800362,-34.5402832],[137.33441353,-34.51551056],[137.3657856,-34.4777298],[137.35800362,-34.5402832]],[[122.24693489,-34.15161896],[122.22998238,-34.11220551],[122.25554848,-34.12439728],[122.24693489,-34.15161896]],[[123.20749092,-34.11193085],[123.16776466,-34.0943985],[123.21582222,-34.0860672],[123.20749092,-34.11193085]],[[134.48663521,-33.77999878],[134.48025703,-33.71411896],[134.54025459,-33.69664764],[134.48663521,-33.77999878]],[[133.58941841,-32.31162262],[133.53360176,-32.30444336],[133.6749897,-32.24052429],[133.58941841,-32.31162262]],[[115.68026924,-32.22833252],[115.66081429,-32.23361206],[115.64888191,-32.15222168],[115.68026924,-32.22833252]],[[159.07080269,-31.52359772],[159.1019001,-31.57109833],[159.07080269,-31.59998322],[159.07080269,-31.52359772]],[[153.45135689,-27.72914886],[153.43359566,-27.41610336],[153.53857613,-27.41664886],[153.45135689,-27.72914886]],[[153.41497993,-27.24803925],[153.45413399,-27.01777267],[153.42526436,-27.36277771],[153.41497993,-27.24803925]],[[113.20915413,-26.14081192],[112.95332527,-25.78693771],[112.95110512,-25.48859406],[113.20915413,-26.14081192]],[[153.00360298,-25.33999252],[152.94885445,-25.27248001],[152.99246407,-25.30776215],[153.00360298,-25.33999252]],[[113.07361031,-25.23358536],[113.06165504,-25.27860641],[113.10164833,-25.09720612],[113.07361031,-25.23358536]],[[113.13971138,-24.92666626],[113.11499214,-24.99580765],[113.1472187,-24.75998688],[113.13971138,-24.92666626]],[[153.07718086,-25.7985878],[152.94302559,-25.55833435],[153.28164864,-24.69915009],[153.07718086,-25.7985878]],[[151.38217354,-23.88275528],[151.3305378,-23.81331253],[151.3269062,-23.75304794],[151.38217354,-23.88275528]],[[151.2694416,-23.78054047],[151.01999092,-23.45442963],[151.20303535,-23.52888107],[151.2694416,-23.78054047]],[[150.98217964,-23.19552994],[150.9472065,-23.19552994],[150.97830391,-23.15053177],[150.98217964,-23.19552994]],[[149.73550606,-22.42304611],[149.73358345,-22.34053421],[149.76080513,-22.3638649],[149.73550606,-22.42304611]],[[150.49164009,-22.35472107],[150.48996162,-22.21303177],[150.56024361,-22.30443954],[150.49164009,-22.35472107]],[[149.90081978,-22.22833252],[149.8657856,-22.17388916],[149.9083271,-22.0469265],[149.90081978,-22.22833252]],[[150.33691597,-21.77555847],[150.2944355,-21.7444191],[150.35885811,-21.73331451],[150.33691597,-21.77555847]],[[150.28692818,-21.6875],[150.25387764,-21.63803864],[150.30523872,-21.65997696],[150.28692818,-21.6875]],[[115.45498848,-20.78250122],[115.30386543,-20.8727684],[115.43525887,-20.66722107],[115.45498848,-20.78250122]],[[149.0666523,-20.52664566],[149.03692818,-20.50165939],[149.0749836,-20.48693466],[149.0666523,-20.52664566]],[[149.00638008,-20.31832504],[148.9555378,-20.29137421],[148.97552681,-20.15499878],[149.00638008,-20.31832504]],[[148.93579292,-20.17192841],[148.88189888,-20.13027954],[148.97024727,-20.0485878],[148.93579292,-20.17192841]],[[148.4713459,-20.0463829],[148.44970894,-19.97081757],[148.48217964,-20.00609589],[148.4713459,-20.0463829]],[[146.86773872,-19.16498566],[146.77609444,-19.13109589],[146.86969185,-19.10665131],[146.86773872,-19.16498566]],[[146.29940987,-18.48944092],[146.0833149,-18.25609589],[146.26971626,-18.30833435],[146.29940987,-18.48944092]],[[139.57608223,-17.09581757],[139.39886665,-17.09138107],[139.50277901,-16.9966507],[139.57608223,-17.09581757]],[[139.11218452,-16.86220551],[139.0907917,-16.82665253],[139.13998604,-16.81053543],[139.11218452,-16.86220551]],[[139.73636055,-16.4971962],[139.1402607,-16.75497818],[139.30664253,-16.46249008],[139.73636055,-16.4971962]],[[136.66720772,-15.77666283],[136.63498116,-15.67610741],[136.7130146,-15.69777489],[136.66720772,-15.77666283]],[[136.74191475,-15.75221634],[136.73413277,-15.64805603],[136.80941963,-15.65027428],[136.74191475,-15.75221634]],[[137.06720161,-15.82944489],[136.93441963,-15.69887733],[137.00305367,-15.59138107],[137.06720161,-15.82944489]],[[136.52997017,-15.64527893],[136.57940865,-15.51110458],[136.59774971,-15.6160984],[136.52997017,-15.64527893]],[[136.85135078,-15.63415909],[136.84192085,-15.54971886],[136.87857246,-15.50193214],[136.85135078,-15.63415909]],[[124.62164497,-15.41221046],[124.52249336,-15.44527054],[124.45942879,-15.36694336],[124.54221535,-15.26166344],[124.62164497,-15.41221046]],[[124.42637825,-15.31498909],[124.33664894,-15.29611206],[124.43747902,-15.24944305],[124.42637825,-15.31498909]],[[124.81609535,-15.28111267],[124.79749489,-15.23970985],[124.84999275,-15.24720955],[124.81609535,-15.28111267]],[[128.19192696,-15.18860054],[128.11468697,-15.13194275],[128.12051582,-15.04305077],[128.19192696,-15.18860054]],[[124.94331551,-15.02999687],[124.8746891,-14.95221138],[124.92442513,-14.94499969],[124.94331551,-15.02999687]],[[128.44107246,-15.03749657],[128.35717964,-14.95999908],[128.35635567,-14.8702774],[128.44107246,-15.03749657]],[[135.76498604,-14.90416718],[135.69940376,-14.90777397],[135.72830391,-14.83665848],[135.76498604,-14.90416718]],[[129.62994576,-14.87943649],[129.5805378,-14.8027668],[129.63080025,-14.85082817],[129.62994576,-14.87943649]],[[129.58941841,-14.90777397],[129.59247017,-14.96665382],[129.50192451,-14.78861237],[129.58941841,-14.90777397]],[[125.13832283,-14.64859962],[125.0847187,-14.6172142],[125.15941811,-14.4383297],[125.13832283,-14.64859962]],[[126.60637093,-13.89555359],[126.51193428,-13.90943336],[126.50248909,-13.8777771],[126.60637093,-13.89555359]],[[136.71164131,-13.83582878],[136.91247749,-13.77444458],[136.69940376,-14.120821],[136.9416523,-14.27777863],[136.37802315,-14.21638107],[136.71164131,-13.83582878]],[[136.28830147,-13.73332787],[136.10553169,-13.81805229],[136.19885445,-13.66471481],[136.28830147,-13.73332787]],[[136.15081978,-13.48583221],[136.16165352,-13.53111267],[136.09884834,-13.36110306],[136.15081978,-13.48583221]],[[132.40469551,-12.14082718],[132.34024239,-12.08972168],[132.40219307,-12.07221794],[132.40469551,-12.14082718]],[[136.82052803,-12.14055634],[136.80053902,-12.09415817],[136.82608223,-12.07221794],[136.82052803,-12.14055634]],[[134.90997505,-12.1211071],[134.86691475,-12.06666565],[134.9277668,-12.07277679],[134.90997505,-12.1211071]],[[134.98578072,-12.03416252],[134.94497871,-12.06138229],[134.91137886,-12.02221107],[134.98578072,-12.03416252]],[[136.28192329,-12.03554916],[136.1583271,-12.07138824],[136.30636787,-11.97694397],[136.28192329,-12.03554916]],[[135.11551094,-11.9344368],[135.04748726,-11.94554329],[135.06497383,-11.91361237],[135.11551094,-11.9344368]],[[136.47357368,-11.91110802],[136.46942329,-11.84055138],[136.49496651,-11.80305481],[136.47357368,-11.91110802]],[[136.58941841,-11.78055573],[136.51608467,-11.79860306],[136.62466621,-11.74026871],[136.58941841,-11.78055573]],[[136.01275826,-11.71915817],[135.95996284,-11.68416595],[136.05386543,-11.65999222],[136.01275826,-11.71915817]],[[132.56024361,-11.72443962],[132.51388741,-11.64389038],[132.6430378,-11.64805603],[132.56024361,-11.72443962]],[[133.38388252,-11.66749191],[133.36691475,-11.61470985],[133.4824543,-11.58694458],[133.38388252,-11.66749191]],[[136.47052193,-11.51916313],[136.17831612,-11.68777084],[136.47885323,-11.46611023],[136.47052193,-11.51916313]],[[133.50555611,-11.50387764],[133.39135933,-11.54387856],[133.46942329,-11.46082878],[133.50555611,-11.50387764]],[[130.49106026,-11.68860054],[130.01638985,-11.77971077],[130.34247017,-11.32360649],[130.49106026,-11.68860054]],[[130.57330513,-11.34943962],[131.2749958,-11.18915939],[131.53915596,-11.46165848],[130.95886421,-11.93888855],[130.37744331,-11.17055511],[130.57330513,-11.34943962]],[[132.62384224,-11.27916718],[132.5124836,-11.14304543],[132.57885933,-11.02249718],[132.62384224,-11.27916718]],[[136.5361042,-11.45498848],[136.77191353,-11.01972198],[136.72497749,-11.20693588],[136.5361042,-11.45498848]],[[142.51275826,-10.86694336],[143.42914009,-12.6144371],[143.78219795,-14.41332626],[144.51053047,-14.16832161],[145.31579781,-14.94554329],[145.40359688,-16.46221924],[145.96051216,-16.89527893],[145.87802315,-17.06277084],[146.10663033,-17.68360901],[146.00943184,-18.23805237],[146.33691597,-18.53666687],[146.27527046,-18.88387299],[148.77746773,-20.23249817],[148.93551826,-20.53277206],[148.6916523,-20.6244278],[149.21469307,-21.08000183],[149.6611042,-22.4966507],[150.04330635,-22.65083313],[150.03415108,-22.14971542],[150.59301949,-22.58609772],[150.63720894,-22.34388351],[150.86718941,-23.50497818],[151.53857613,-24.08914566],[151.68387032,-23.9888649],[151.93719673,-24.22166443],[153.18191719,-25.94942093],[153.03387642,-27.17944336],[153.62552071,-28.66664886],[153.05246162,-31.03497696],[152.52969551,-32.40357971],[151.4527607,-33.31913757],[150.84051704,-35.08274841],[150.16247749,-35.94055176],[149.97384834,-37.52052307],[147.76443672,-37.97996521],[146.87356758,-38.65161896],[146.22302437,-38.71248627],[146.39413643,-39.14720917],[145.41607857,-38.5458374],[145.55719185,-38.37635803],[145.44134712,-38.22610474],[144.89886665,-38.50440216],[145.1324482,-38.1402359],[144.92914009,-37.86911774],[143.54385567,-38.85997009],[142.38888741,-38.36470795],[141.57135201,-38.41719055],[140.52997017,-38.00026703],[139.81442451,-37.29969788],[139.82052803,-36.5458374],[139.07734871,-35.68259811],[139.66775703,-36.23078156],[139.09674263,-35.6158638],[139.33719063,-35.6941452],[139.35522652,-35.37249756],[138.09301949,-35.62080383],[138.51416206,-35.02803802],[138.09802437,-34.13719177],[137.74469185,-35.13861084],[136.8305378,-35.25467682],[137.01999092,-34.90107727],[137.43774605,-34.9347229],[137.4499836,-34.1513443],[137.95025826,-33.55939484],[137.77331734,-32.5235672],[137.77832222,-32.99248505],[137.20996284,-33.66610718],[135.93274117,-34.54191589],[135.95413399,-35.01028442],[135.10580635,-34.5999527],[135.5069294,-34.61802673],[134.70913887,-33.1791687],[134.26913643,-33.1596756],[134.18414497,-32.48666382],[133.8519001,-32.54496002],[133.95218086,-32.39470673],[133.62219429,-32.09832001],[133.41720772,-32.21330261],[132.76443672,-31.95080948],[132.20385933,-32.03162384],[131.15219307,-31.47416687],[128.98745918,-31.69414139],[127.26776314,-32.27830505],[125.96832466,-32.26611328],[124.28193855,-32.98551178],[123.54081917,-33.90581512],[120.00499153,-33.92884064],[117.93441963,-35.12581635],[116.46331978,-35.00080872],[115.00804329,-34.26306152],[114.98872566,-33.52250671],[115.36360359,-33.63305664],[115.71111488,-33.26998138],[115.7394352,-31.86525345],[115.04553413,-30.50693893],[114.8855381,-29.20111084],[113.22442818,-26.23916626],[113.27916145,-26.01831818],[113.64137459,-26.65276337],[113.85582161,-26.50748062],[113.39166451,-25.71804047],[113.46943855,-25.5408287],[113.71193123,-26.19525528],[113.87886238,-26.02888107],[114.06609535,-26.46194458],[114.22083473,-26.3063736],[114.25916481,-25.84666061],[113.38971138,-24.42944336],[114.01805305,-21.85082626],[114.15387154,-22.52776337],[114.65109444,-21.83999252],[116.70749092,-20.64914322],[117.68802834,-20.67582321],[119.08249092,-19.96749878],[121.02748299,-19.59222412],[122.35331917,-18.10553551],[122.1749897,-17.24333191],[122.91776466,-16.41553116],[123.57527351,-17.59747696],[123.59665108,-16.9899826],[123.91832161,-17.20442963],[123.42442513,-16.50250244],[123.70887947,-16.43025589],[123.56971931,-16.17192841],[123.72943306,-16.13888168],[123.89137459,-16.37886429],[123.96443367,-16.2455368],[124.23858833,-16.40665817],[124.89943123,-16.41498566],[124.40054512,-16.32942963],[124.72831917,-15.8105526],[124.40138435,-15.8711071],[124.44774818,-15.48637581],[124.65637398,-15.47972107],[124.70221138,-15.25248909],[125.18181038,-15.52068138],[124.82554817,-15.15582657],[125.433321,-15.13860893],[125.1355381,-14.74138451],[125.58888435,-14.54943275],[125.6069355,-14.22305107],[125.63720894,-14.63498878],[125.71887398,-14.40027428],[126.03720284,-14.51665878],[126.0194416,-13.91916656],[126.28777504,-14.23305511],[126.86276436,-13.74915695],[127.42082405,-13.94972229],[128.1694355,-14.70277023],[128.01361275,-15.5],[128.12924385,-15.21287727],[128.28997993,-15.40526772],[128.19412422,-15.0566597],[128.31497383,-14.90777397],[128.35080147,-15.04472351],[128.45245552,-15.04638481],[128.38189888,-14.80249596],[128.53027534,-14.75915909],[129.7324543,-15.19721794],[129.64386177,-14.83721733],[129.9444294,-14.76777458],[129.37024117,-14.33332443],[129.88611031,-13.44527054],[130.26443672,-13.32526588],[130.14081001,-12.92416],[130.69525337,-12.70249939],[130.58304024,-12.39527893],[130.89636421,-12.64027023],[131.02719307,-12.14555359],[132.38360786,-12.37999535],[132.75442696,-12.13277245],[132.62774849,-12.04193306],[132.69107246,-11.65499687],[132.48996162,-11.47694397],[132.09247017,-11.52639008],[131.76693916,-11.31637764],[131.97995186,-11.12554359],[132.19970894,-11.41276741],[132.14331245,-11.13332939],[132.33746529,-11.12916565],[133.18304634,-11.71665382],[135.23135567,-12.29443741],[135.90802193,-11.76305199],[135.66971016,-12.19665909],[136.02304268,-12.11193275],[136.03970528,-12.47166252],[136.56219673,-11.9344368],[136.98190498,-12.35693932],[136.49441719,-12.77916718],[136.45800972,-13.25248909],[136.35052681,-13.05249596],[135.92386055,-13.28138542],[136.02026558,-13.76249313],[135.45663643,-14.9411068],[136.76581001,-15.90443802],[137.73080635,-16.24610901],[138.19024849,-16.70497513],[139.01748848,-16.90303802],[139.26053047,-17.34249878],[140.49496651,-17.64081192],[141.42691231,-16.07915878],[141.58386421,-12.98916626],[141.79858589,-12.68582535],[141.94079781,-12.8758316],[141.75247383,-12.46721077],[141.58941841,-12.54694176],[142.02887154,-12.0622139],[142.14193916,-10.95666313],[142.51275826,-10.86694336]],[[142.26581001,-10.6836071],[142.183321,-10.77027893],[142.11523628,-10.66054916],[142.26581001,-10.6836071]],[[142.27804756,-10.64360428],[142.24969673,-10.58748817],[142.31414986,-10.58415413],[142.27804756,-10.64360428]],[[142.23080635,-10.56888199],[142.19134712,-10.56583405],[142.22662544,-10.52527428],[142.23080635,-10.56888199]],[[142.32107735,-10.54860306],[142.29220772,-10.53388977],[142.31802559,-10.51388168],[142.32107735,-10.54860306]],[[142.28552437,-10.26471138],[142.22580147,-10.14610863],[142.3305378,-10.17194176],[142.28552437,-10.26471138]],[[142.15774727,-10.18971825],[142.08969307,-10.13388634],[142.14358711,-10.05166626],[142.15774727,-10.18971825]]]}, -{code:"BH", name:"Bahrain", lng:50.562, lat:26.019, borders:[[[50.812492,25.64222],[50.782219,25.659443],[50.821388,25.651943],[50.812492,25.64222]],[[50.813332,25.678608],[50.804161,25.680553],[50.807777,25.68972],[50.813332,25.678608]],[[50.76194,25.595276],[50.741661,25.683052],[50.796661,25.728333],[50.76194,25.595276]],[[50.769722,25.746944],[50.760551,25.750275],[50.764717,25.754719],[50.769722,25.746944]],[[50.532219,26.234444],[50.57333,25.809723],[50.461662,25.965275],[50.532219,26.234444]],[[50.65361,26.247498],[50.604439,26.267776],[50.62722,26.288887],[50.65361,26.247498]]]}, -{code:"BB", name:"Barbados", lng:-59.559, lat:13.153, borders:[[[-59.53304307,13.050554],[-59.64105253,13.331388],[-59.4291684,13.164999],[-59.53304307,13.050554]]]}, -{code:"BM", name:"Bermuda", lng:-64.709, lat:32.336, borders:[[[-64.85583492,32.27861],[-64.87445037,32.293053],[-64.83796739,32.314163],[-64.85583492,32.27861]],[[-64.64328009,32.354439],[-64.68574503,32.357216],[-64.65525788,32.370827],[-64.64328009,32.354439]],[[-64.78331039,32.270554],[-64.85816166,32.266796],[-64.67158472,32.379997],[-64.78331039,32.270554]]]}, -{code:"BS", name:"Bahamas", lng:-78.014, lat:24.628, borders:[[[-73.03723145,21.13944435],[-73.68574524,20.93555641],[-73.02438354,21.33249855],[-73.03723145,21.13944435]],[[-72.92463684,21.48361015],[-73.03797913,21.43499947],[-73.06750488,21.50777626],[-72.92463684,21.48361015]],[[-72.82914734,22.38222313],[-72.78134155,22.28416634],[-73.16473389,22.37083244],[-72.82914734,22.38222313]],[[-73.61029053,22.57972145],[-73.62052917,22.59972191],[-73.59831238,22.6147213],[-73.61029053,22.57972145]],[[-73.4627533,22.60194588],[-73.5513916,22.61222267],[-73.49769592,22.61889076],[-73.4627533,22.60194588]],[[-74.37770081,22.53888893],[-74.37945557,22.57638741],[-74.27992249,22.66250038],[-74.37770081,22.53888893]],[[-73.847229,22.72361183],[-73.86747742,22.46944618],[-74.28134155,22.17305565],[-73.847229,22.72361183]],[[-74.07359314,22.66333199],[-74.34384155,22.83500099],[-74.01773071,22.71639061],[-74.07359314,22.66333199]],[[-73.72886658,23.07055473],[-73.81358337,23.09694481],[-73.66494751,23.08888817],[-73.72886658,23.07055473]],[[-75.55105591,23.43139076],[-75.5249176,23.40444374],[-75.65078735,23.45583153],[-75.55105591,23.43139076]],[[-75.02133179,23.10639],[-75.30747986,23.66777611],[-74.83056641,22.86083412],[-75.02133179,23.10639]],[[-75.77186584,23.49972343],[-75.99105835,23.59944344],[-76.02850533,23.6724987],[-75.77186584,23.49972343]],[[-74.78189087,23.68388939],[-74.81967163,23.63944435],[-74.94859314,23.68527794],[-74.78189087,23.68388939]],[[-76.3638916,24.07222176],[-76.32164001,23.97277641],[-76.39828491,24.11333275],[-76.3638916,24.07222176]],[[-74.4901886,23.95444298],[-74.52688599,24.10083199],[-74.46078491,24.1427784],[-74.4901886,23.95444298]],[[-77.94664001,24.14999962],[-77.97167969,24.19360924],[-77.80029297,24.25333214],[-77.94664001,24.14999962]],[[-77.93661499,24.22583199],[-78.0193634,24.25083351],[-77.93106079,24.27944374],[-77.93661499,24.22583199]],[[-76.46884155,24.21000099],[-76.50358582,24.21777916],[-76.54528809,24.29027748],[-76.46884155,24.21000099]],[[-77.73550415,24.02861214],[-77.60658264,24.21388817],[-77.56695557,23.73916817],[-77.87661743,24.07305717],[-77.6763916,24.29611015],[-77.73550415,24.02861214]],[[-77.68695068,24.33722115],[-77.80661011,24.31972313],[-77.70327759,24.36972237],[-77.68695068,24.33722115]],[[-75.31466675,24.21388817],[-75.51501465,24.13972282],[-75.73942566,24.6950016],[-75.31466675,24.21388817]],[[-77.43640137,25.00805473],[-77.56140137,25.02749825],[-77.2585907,25.0494442],[-77.43640137,25.00805473]],[[-78.19195557,25.20361137],[-77.7166748,24.50666618],[-78.02133179,24.27277946],[-78.4405365,24.61361122],[-78.19271851,24.59750175],[-78.19195557,25.20361137]],[[-76.53330994,25.3983326],[-76.34963989,25.3432827],[-76.11877632,25.13110924],[-76.16833496,24.69000053],[-76.17158508,25.1408329],[-76.35583496,25.31833458],[-76.71580505,25.44166756],[-76.73529053,25.55916786],[-76.53330994,25.3983326]],[[-77.82185364,25.70222282],[-77.88806152,25.78500175],[-77.85636902,25.77527809],[-77.82185364,25.70222282]],[[-77.56324768,26.26888847],[-77.57250977,26.33611107],[-77.53723145,26.30694389],[-77.56324768,26.26888847]],[[-77.91723633,26.74527931],[-78.70861816,26.4897213],[-78.97886658,26.69527626],[-77.91723633,26.74527931]],[[-77.73497009,26.91444588],[-77.04223633,26.50889015],[-77.20469666,25.88083458],[-77.39796448,26.02638817],[-77.14883423,26.54888725],[-77.95022583,26.89777946],[-77.73497009,26.91444588]]]}, -{code:"BD", name:"Bangladesh", lng:89.941, lat:24.218, borders:[[[91.89749336,21.47666359],[91.88109016,21.75527763],[91.98221016,21.62388802],[91.89749336,21.47666359]],[[90.49054146,21.80360985],[90.46748543,21.82055473],[90.49275398,21.81444359],[90.49054146,21.80360985]],[[90.43248177,21.81999779],[90.41276741,21.82361031],[90.45277596,21.85027504],[90.43248177,21.81999779]],[[89.12664986,21.71416283],[89.05053902,21.91472054],[89.14637947,21.7488842],[89.12664986,21.71416283]],[[90.75305367,21.89194298],[90.74443245,21.9224987],[90.76220894,21.90638542],[90.75305367,21.89194298]],[[91.83276558,21.72221947],[91.86303902,21.9280529],[91.88638496,21.84277534],[91.83276558,21.72221947]],[[90.64387703,21.90610695],[90.63333321,21.93055153],[90.66554451,21.95555305],[90.64387703,21.90610695]],[[90.69914436,21.95471764],[90.67526436,21.94999886],[90.69053841,21.9727726],[90.69914436,21.95471764]],[[90.52249336,21.85583305],[90.51971626,21.9355526],[90.58831978,21.98138618],[90.52249336,21.85583305]],[[90.41081429,21.89944267],[90.43026924,22.04222298],[90.48498726,21.96499825],[90.41081429,21.89944267]],[[90.37414742,22.01000023],[90.34166145,21.9663868],[90.38026619,22.05055428],[90.37414742,22.01000023]],[[90.52360725,21.99110603],[90.48692513,22.07888603],[90.61219978,22.16388512],[90.52360725,21.99110603]],[[90.51693916,22.16221809],[90.51220894,22.17111015],[90.5277729,22.17944145],[90.51693916,22.16221809]],[[90.93748665,22.1127758],[90.91470528,22.13194084],[90.95221138,22.20944023],[90.93748665,22.1127758]],[[90.98498726,22.18249702],[90.97192574,22.24083138],[90.99165535,22.25916481],[90.98498726,22.18249702]],[[90.94941902,22.22138405],[90.9763813,22.35777473],[90.98858833,22.28694344],[90.94941902,22.22138405]],[[91.00583076,22.36805534],[90.98526192,22.38527489],[90.98997688,22.41416359],[91.00583076,22.36805534]],[[90.66026497,22.35638618],[90.64027596,22.30833244],[90.61026192,22.45194054],[90.66026497,22.35638618]],[[91.0361042,22.40499687],[91.01805305,22.41472054],[91.04054451,22.45360756],[91.0361042,22.40499687]],[[91.21054268,22.41221809],[91.18553352,22.39249611],[91.16859627,22.46138573],[91.21054268,22.41221809]],[[91.00749397,22.42499733],[90.98776436,22.44083214],[91.00915718,22.47638512],[91.00749397,22.42499733]],[[90.66304207,22.43499565],[90.64749336,22.42777443],[90.65555,22.47860909],[90.66304207,22.43499565]],[[91.03166389,22.08416557],[91.08804512,22.52583122],[91.17469978,22.21860695],[91.03166389,22.08416557]],[[91.52971077,22.34777641],[91.4083271,22.47221947],[91.43165779,22.62388802],[91.52971077,22.34777641]],[[91.33943367,22.62999916],[91.31776619,22.60888863],[91.30470467,22.62833214],[91.33943367,22.62999916]],[[90.76388741,22.06444359],[90.60109138,22.03416634],[90.68470955,22.39249611],[90.64276314,22.5530529],[90.55693245,22.60527611],[90.58777046,22.77194405],[90.87747383,22.45722008],[90.76388741,22.06444359]],[[90.5472126,22.71944237],[90.46971321,22.86888695],[90.69108772,22.84694481],[90.54162025,22.7831974],[90.5472126,22.71944237]],[[90.66220284,22.95638466],[90.63275337,22.94916344],[90.65609932,22.91221809],[90.50915718,22.95110893],[90.57083321,23.04027748],[90.66220284,22.95638466]],[[90.47747993,23.00777626],[90.46331978,23.05916405],[90.51082039,23.06194496],[90.47747993,23.00777626]],[[90.52971077,23.04722023],[90.52192879,23.05471992],[90.54498482,23.06527519],[90.52971077,23.04722023]],[[90.54081917,23.34388924],[90.5902729,23.30249977],[90.42164803,23.38305473],[90.54081917,23.34388924]],[[90.57361031,23.56472206],[90.56442451,23.57694435],[90.58415413,23.5838871],[90.57361031,23.56472206]],[[88.43304634,26.55138969],[89.34277534,26.01703072],[89.73915291,26.15638542],[89.84526253,25.28861046],[92.40637398,25.03055382],[92.12137032,24.39333153],[91.37329292,24.10194206],[91.15942574,23.64055443],[91.61360359,22.94305229],[91.94999886,23.73221779],[92.2833271,23.70527458],[92.60081673,21.98221779],[92.66934395,21.29698372],[92.26082039,21.41444206],[92.26193428,21.05431175],[92.32361031,20.73805046],[91.69999886,22.48832893],[91.45582771,22.78999901],[90.83360481,22.6855526],[90.5938282,23.59796715],[90.30887032,23.41444206],[90.6124897,23.22221947],[90.57859993,23.08999825],[90.44664192,23.06500053],[90.42440224,22.77018929],[90.61775398,22.35388756],[90.44053841,22.07166481],[90.40138435,22.26055717],[90.27249336,21.84916496],[90.02470589,21.8599987],[90.07304573,22.16277504],[89.93220711,21.99777412],[90.00000191,22.4837513],[89.58110237,21.70166206],[89.620821,22.32444191],[89.24914742,21.64249611],[89.06300545,22.11547661],[88.98610115,23.20833015],[88.5638752,23.65221977],[88.75053596,24.22098351],[88.04332161,24.68416405],[88.45082283,25.18777657],[89.00943184,25.28833199],[88.11053658,25.83555412],[88.43304634,26.55138969]],[[90.23776436,22.19277382],[90.06137276,21.99177361],[90.21609688,22.11444283],[90.23776436,22.19277382]],[[90.68498421,23.48277473],[90.69192696,23.49721718],[90.65027046,23.50416756],[90.68498421,23.48277473]]]}, -{code:"BZ", name:"Belize", lng:-88.602, lat:17.219, borders:[[[-87.80334445,17.294167],[-87.82489034,17.291664],[-87.82685859,17.400276],[-87.80334445,17.294167]],[[-87.82055628,17.426941],[-87.92658948,17.275555],[-87.81933595,17.549999],[-87.82055628,17.426941]],[[-88.04495282,17.552776],[-88.07022093,17.638332],[-88.05355873,17.613052],[-88.04495282,17.552776]],[[-88.13238558,17.667221],[-88.16744994,17.66972],[-88.07272381,17.733887],[-88.13238558,17.667221]],[[-87.89219683,18.0425],[-88.00608803,17.901943],[-87.85299669,18.164719],[-87.89219683,18.0425]],[[-88.37770116,18.482777],[-88.29949902,18.482929],[-88.07772858,18.215553],[-88.28134114,17.636108],[-88.20849626,16.968609],[-88.91047692,15.89361],[-89.21607998,15.889851],[-89.14186048,17.818886],[-88.37770116,18.482777]]]}, -{code:"BA", name:"Bosnia and Herzegovina", lng:17.786, lat:44.169, borders:[[[17.649841,42.889076],[17.578526,42.943825],[16.143055,44.19944],[15.786665,45.171944],[18.251942,45.138885],[19.039719,44.861382],[19.371387,44.88916],[19.104443,44.355827],[19.620476,44.048454],[19.237019,44.011009],[19.51083,43.679718],[19.228809,43.513214],[18.699997,43.255554],[18.455555,42.565826],[17.649841,42.889076]]]}, -{code:"BO", name:"Bolivia", lng:-64.671, lat:-16.715, borders:[[[-65.19017009,-22.09472312],[-65.74803175,-22.11165964],[-66.22291585,-21.78051416],[-67.1835635,-22.82164355],[-67.87640362,-22.82804141],[-68.18858327,-21.29692507],[-68.75683595,-20.40692529],[-68.4375,-19.43025567],[-68.90776076,-19.05525567],[-69.07163955,-18.03886779],[-69.48355109,-17.63552865],[-69.49966465,-17.50527908],[-69.6187749,-17.21471836],[-68.82250953,-16.33971836],[-69.42192107,-15.61804224],[-69.13685571,-15.24581944],[-69.36627202,-14.80249373],[-68.85299669,-14.19916369],[-68.97439554,-12.86971892],[-68.67387432,-12.50113882],[-69.56840482,-10.9510839],[-68.58342012,-11.10612701],[-66.63435383,-9.90694255],[-65.38183595,-9.69777459],[-65.39273046,-11.26638588],[-64.99160737,-12.00805628],[-64.39415008,-12.46165658],[-63.07495838,-12.65000105],[-61.83389264,-13.54472302],[-61.03896289,-13.49310331],[-60.47081039,-13.80721892],[-60.25886523,-15.09361234],[-60.57136523,-15.09749007],[-60.16021761,-16.26303453],[-58.32746126,-16.27915209],[-58.39747591,-17.24915353],[-57.74302698,-17.59304019],[-57.52105729,-18.20388388],[-58.1210705,-19.74136757],[-57.84870173,-19.97878657],[-58.15885902,-20.16803409],[-58.15134437,-19.82804141],[-59.09581039,-19.34886191],[-61.74248535,-19.64497803],[-62.64370759,-22.2388802],[-62.81195037,-21.99691797],[-63.94108615,-22.00081295],[-64.32469206,-22.87358138],[-64.59046927,-22.21471836],[-65.19017009,-22.09472312]]]}, -{code:"MM", name:"Burma", lng:96.041, lat:21.718, borders:[[[98.035812,9.786386],[98.024994,9.838331],[98.060257,9.81361],[98.035812,9.786386]],[[98.29332,10.010277],[98.116089,9.852497],[98.178589,10.017776],[98.29332,10.010277]],[[98.186646,10.040276],[98.198593,10.189999],[98.238876,10.165833],[98.186646,10.040276]],[[97.907486,10.396944],[97.903595,10.490831],[97.942749,10.442776],[97.907486,10.396944]],[[98.216385,10.481386],[98.18248,10.5075],[98.238876,10.529999],[98.216385,10.481386]],[[98.523605,10.781666],[98.486923,10.883053],[98.550812,10.850275],[98.523605,10.781666]],[[97.919708,10.858332],[97.885818,10.843609],[97.916092,10.929443],[97.919708,10.858332]],[[98.212204,10.947777],[98.264435,10.68972],[98.075546,10.88611],[98.212204,10.947777]],[[98.437195,10.961943],[98.429977,10.995831],[98.452774,11.007776],[98.437195,10.961943]],[[98.533875,10.950554],[98.470535,10.983887],[98.524994,11.087219],[98.533875,10.950554]],[[98.256104,11.212498],[98.231094,11.262499],[98.277771,11.276388],[98.256104,11.212498]],[[98.207489,11.443609],[98.289154,11.798609],[98.280823,11.481665],[98.207489,11.443609]],[[98.498322,11.566109],[98.371368,11.78611],[98.548874,11.788332],[98.498322,11.566109]],[[97.487198,11.774443],[97.437759,11.803331],[97.461655,11.803053],[97.487198,11.774443]],[[98.089981,11.631109],[98.033051,11.683054],[98.007217,11.858332],[98.089981,11.631109]],[[97.66832,11.836943],[97.633881,11.876108],[97.664429,11.90111],[97.66832,11.836943]],[[98.271103,11.84972],[98.260269,11.907221],[98.28804,11.887499],[98.271103,11.84972]],[[98.256378,11.92111],[98.226379,11.94972],[98.251663,11.980276],[98.256378,11.92111]],[[98.5,11.884443],[98.438583,12.111387],[98.664993,11.941942],[98.5,11.884443]],[[98.141937,12.141943],[98.055542,12.281111],[98.124695,12.27861],[98.141937,12.141943]],[[98.640823,12.372219],[98.619141,12.378885],[98.639709,12.380552],[98.640823,12.372219]],[[98.617805,12.352951],[98.68248,12.340553],[98.559708,12.328886],[98.540817,12.370552],[98.57193,12.409164],[98.617805,12.352951]],[[98.09166,12.360554],[98.005554,12.281942],[97.937485,12.337498],[98.09166,12.360554]],[[98.501099,12.402222],[98.471924,12.417776],[98.498871,12.513887],[98.501099,12.402222]],[[98.285812,12.502499],[98.243317,12.49222],[98.229706,12.548054],[98.285812,12.502499]],[[97.853592,12.539999],[97.817764,12.583332],[97.837494,12.598053],[97.853592,12.539999]],[[98.349426,12.316942],[98.32193,12.67111],[98.466934,12.570831],[98.349426,12.316942]],[[97.872208,12.764166],[97.83728,12.772419],[97.844147,12.819443],[97.872208,12.764166]],[[98.304153,13.041666],[98.298035,12.941387],[98.239426,13.213331],[98.304153,13.041666]],[[97.921097,13.783054],[97.921921,13.861664],[97.934708,13.851664],[97.921097,13.783054]],[[97.924423,13.905832],[97.923035,13.894444],[97.91835,13.939081],[97.924423,13.905832]],[[93.380539,14.064165],[93.386383,14.151665],[93.400818,14.096109],[93.380539,14.064165]],[[97.806366,14.134443],[97.789154,14.155277],[97.814148,14.179998],[97.806366,14.134443]],[[93.722488,14.904444],[93.679153,14.848331],[93.6922,14.890833],[93.722488,14.904444]],[[97.669708,15.521387],[97.66304,15.497219],[97.65416,15.578331],[97.669708,15.521387]],[[94.79776,15.791666],[94.728043,15.815275],[94.820541,15.948053],[94.79776,15.791666]],[[94.583328,16.00972],[94.415817,15.868053],[94.386658,15.995831],[94.649429,16.245274],[94.583328,16.00972]],[[97.569153,16.233604],[97.515549,16.506107],[97.616653,16.465271],[97.569153,16.233604]],[[93.671097,18.867496],[93.703049,18.668053],[93.484421,18.869717],[93.671097,18.867496]],[[93.790924,19.231342],[93.9422,18.862495],[93.49054,19.400829],[93.790924,19.231342]],[[93.801651,19.268608],[93.682755,19.560555],[93.968323,19.42083],[93.801651,19.268608]],[[93.513046,19.744438],[93.395828,19.955273],[93.498596,19.88055],[93.513046,19.744438]],[[93.024429,19.827774],[92.912491,20.086662],[92.954437,20.06361],[93.024429,19.827774]],[[97.806641,28.344162],[98.316376,27.541943],[98.699707,27.539165],[98.77832,26.636383],[98.710815,25.855553],[97.552475,24.74305],[97.759995,24.257496],[97.535538,23.939716],[98.890732,24.160069],[98.6772,23.968052],[98.927475,23.189163],[99.566376,22.938049],[99.162766,22.159161],[99.964432,22.048885],[100.212753,21.432552],[101.105263,21.771385],[101.148239,21.572636],[100.09137,20.348606],[100.081322,20.348841],[99.522766,20.352776],[98.995529,19.780552],[98.049988,19.807499],[97.774704,18.569996],[97.346375,18.562496],[98.689697,16.284996],[98.92804,16.38583],[98.201096,15.074999],[99.173965,13.727781],[99.112198,13.055832],[99.661652,11.826942],[98.742752,10.348608],[98.546646,9.981665],[98.460266,10.734442],[98.710815,10.918331],[98.743591,11.666943],[98.890549,11.700275],[98.597488,11.751665],[98.721924,11.976109],[98.705872,12.224465],[98.533165,12.245721],[98.70359,12.340046],[98.583328,13.172775],[98.185532,14.059164],[98.138885,13.539721],[97.797256,14.881962],[97.737488,16.563885],[97.378036,16.494995],[96.878036,17.449997],[96.777771,16.703884],[96.3797,16.501389],[96.241928,16.803734],[96.268326,16.389717],[95.428589,15.729719],[95.360809,16.144718],[95.216385,15.782776],[95.137207,16.137218],[94.848877,15.77972],[94.990814,16.246662],[94.650543,15.854164],[94.793045,16.153606],[94.560257,15.941942],[94.679703,16.115829],[94.631088,16.342773],[94.245529,15.959997],[94.6147,17.546387],[93.991928,19.457218],[93.599152,19.719715],[93.728592,19.931664],[93.128311,20.085552],[93.129974,19.835552],[93.081665,20.548607],[92.860809,20.121109],[92.261932,21.05431],[92.260818,21.41444],[92.669342,21.296982],[92.600815,21.982216],[93.19664,22.256386],[93.33873,24.077915],[94.151093,23.855274],[94.734421,25.024719],[94.625534,25.397774],[95.17804,26.058887],[95.141373,26.612495],[96.194138,27.270832],[97.136658,27.085831],[96.886658,27.606106],[97.348877,28.222771],[97.555252,28.548054],[97.806641,28.344162]]]}, -{code:"BJ", name:"Benin", lng:2.469, lat:10.541, borders:[[[2.484418,6.340486],[1.635404,6.218721],[1.398542,9.429901],[1.355,9.995277],[0.776667,10.376665],[0.91797,10.996399],[1.435278,11.458887],[2.014722,11.422499],[2.397925,11.896152],[2.378054,12.240274],[2.83862,12.396658],[3.604459,11.693274],[3.855,10.584999],[3.095,9.090555],[2.789444,9.043888],[2.719606,6.365505],[2.484418,6.340486]]]}, -{code:"SB", name:"Solomon Islands", lng:160.109, lat:-9.611, borders:[[[166.85052681,-11.69694519],[166.76138496,-11.57944489],[166.93191719,-11.66721916],[166.85052681,-11.69694519]],[[160.08081245,-11.4980545],[160.52746773,-11.80804825],[159.96078682,-11.52165413],[160.08081245,-11.4980545]],[[159.85330391,-11.32472229],[159.77664375,-11.28861237],[159.84164619,-11.30388451],[159.85330391,-11.32472229]],[[166.53524971,-11.36388016],[166.5180378,-11.27110863],[166.5805378,-11.32416344],[166.53524971,-11.36388016]],[[162.47497749,-10.85555077],[162.48135567,-10.8074894],[162.50055122,-10.83999252],[162.47497749,-10.85555077]],[[166.13998604,-10.76110458],[165.77746773,-10.80500031],[165.90414619,-10.67360306],[166.13998604,-10.76110458]],[[161.54525948,-10.27666283],[162.39081001,-10.84193993],[161.2833271,-10.33193588],[161.54525948,-10.27666283]],[[161.7513752,-10.29443741],[161.71997261,-10.21472168],[161.77191353,-10.25443459],[161.7513752,-10.29443741]],[[167.20385933,-9.96360397],[167.18829536,-9.9422226],[167.20800972,-9.95082474],[167.20385933,-9.96360397]],[[167.12774849,-9.88082504],[167.10800362,-9.86916161],[167.12634468,-9.8672142],[167.12774849,-9.88082504]],[[167.10330391,-9.85165977],[167.08941841,-9.84749222],[167.10858345,-9.84082222],[167.10330391,-9.85165977]],[[161.97467232,-9.85304642],[161.94470406,-9.6902771],[161.974123,-9.68971825],[161.97467232,-9.85304642]],[[161.56912422,-9.72416687],[161.3972187,-9.66943741],[161.34997749,-9.33887672],[161.56912422,-9.72416687]],[[161.3874836,-9.46859932],[161.38553047,-9.45444489],[161.38134956,-9.46944427],[161.3874836,-9.46859932]],[[159.93829536,-9.4336071],[160.38638496,-9.42666626],[160.83108711,-9.86193275],[159.82803535,-9.79694176],[159.6019001,-9.3172226],[159.93829536,-9.4336071]],[[159.82858467,-9.17250061],[159.81137276,-9.11083221],[159.84579659,-9.13805199],[159.82858467,-9.17250061]],[[160.4111042,-9.13666344],[160.21246529,-9.17055511],[160.31857491,-9.06026649],[160.4111042,-9.13666344]],[[159.20440865,-9.13332939],[159.16803169,-9.10277557],[159.22830391,-9.02554512],[159.20440865,-9.13332939]],[[159.14749336,-9.10888481],[159.03247261,-9.06026649],[159.13720894,-8.99443245],[159.14749336,-9.10888481]],[[160.11218452,-8.99720955],[160.06579781,-9.01748848],[160.07330513,-8.94777489],[160.11218452,-8.99720955]],[[160.0472126,-8.91527557],[160.00833321,-8.88471603],[160.02942085,-8.88026619],[160.0472126,-8.91527557]],[[161.06079292,-8.7480545],[161.0444355,-8.77249718],[161.00943184,-8.75416374],[161.06079292,-8.7480545]],[[157.63388252,-8.7480545],[157.61996651,-8.8008213],[157.44384956,-8.71499252],[157.63388252,-8.7480545]],[[158.20523262,-8.83332443],[158.14972115,-8.78138542],[158.21359444,-8.68110085],[158.20523262,-8.83332443]],[[158.00305367,-8.77110863],[157.87552071,-8.60998726],[158.11691475,-8.53333282],[158.00305367,-8.77110863]],[[157.4083271,-8.5008297],[157.38443184,-8.73444366],[157.1991291,-8.56583405],[157.4083271,-8.5008297]],[[159.683321,-8.54694176],[159.53747749,-8.46832848],[159.56884956,-8.37887955],[159.683321,-8.54694176]],[[162.74106026,-8.3738842],[162.76165962,-8.37804794],[162.72525215,-8.3813839],[162.74106026,-8.3738842]],[[160.97439766,-8.84749222],[161.37802315,-9.63498878],[160.58026314,-8.32998848],[160.97439766,-8.84749222]],[[157.12466621,-8.25527954],[157.15136909,-8.34276962],[157.02304268,-8.19083405],[157.12466621,-8.25527954]],[[157.2074604,-8.27027893],[157.09247017,-8.16583061],[157.18081856,-8.17055511],[157.2074604,-8.27027893]],[[156.84497261,-8.11833191],[156.7833271,-8.09805107],[156.78274727,-8.05527115],[156.84497261,-8.11833191]],[[157.63162422,-8.23637581],[157.81192207,-8.620821],[157.21441841,-8.2430439],[157.49746895,-7.96555138],[157.63162422,-8.23637581]],[[156.59884834,-8.20304298],[156.53192329,-8.09193993],[156.54220772,-7.94472122],[156.59884834,-8.20304298]],[[157.15609932,-8.15027428],[156.96774483,-8.04638481],[157.02719307,-7.86527634],[157.15609932,-8.15027428]],[[158.57190132,-7.70360756],[158.53219795,-7.69138718],[158.5499897,-7.6641655],[158.57190132,-7.70360756]],[[158.53082466,-7.65416718],[158.35940742,-7.64055634],[158.31274605,-7.58083344],[158.53082466,-7.65416718]],[[156.70663643,-7.8972187],[156.55441475,-7.57860756],[156.80859566,-7.7266655],[156.70663643,-7.8972187]],[[159.85244942,-8.33388138],[159.88693428,-8.56637764],[158.48745918,-7.55416298],[159.85244942,-8.33388138]],[[158.42941475,-7.5297184],[158.37051582,-7.55277634],[158.26275826,-7.47749519],[158.42941475,-7.5297184]],[[157.78164864,-7.47610664],[157.68359566,-7.41555214],[157.74939156,-7.39388466],[157.78164864,-7.47610664]],[[155.58746529,-7.39055634],[155.51080513,-7.35110664],[155.58468819,-7.33194351],[155.58746529,-7.39055634]],[[155.85885811,-7.10027695],[155.66971016,-7.08805466],[155.74023628,-6.96749878],[155.85885811,-7.10027695]],[[156.1102314,-6.9411068],[156.08496284,-6.98943901],[156.07467842,-6.81916237],[156.1102314,-6.9411068]],[[156.01999092,-6.82472229],[156.00000191,-6.80360603],[156.04525948,-6.78860664],[156.01999092,-6.82472229]],[[157.42886543,-7.32444382],[156.9360981,-7.2191658],[156.43857002,-6.64361191],[157.42886543,-7.32444382]],[[159.71273994,-5.51666641],[159.71414375,-5.48388481],[159.72384834,-5.48999596],[159.71273994,-5.51666641]],[[159.52859688,-5.4988842],[159.4963398,-5.46693993],[159.50998116,-5.47083282],[159.52859688,-5.4988842]],[[159.40387154,-5.44832802],[159.37161446,-5.44082832],[159.34884834,-5.41583252],[159.40387154,-5.44832802]],[[159.25219917,-5.31277847],[159.25027657,-5.32416344],[159.24884224,-5.29305077],[159.25219917,-5.31277847]]]}, -{code:"BR", name:"Brazil", lng:-53.089, lat:-10.772, borders:[[[-48.55051422,-27.82136917],[-48.51719666,-27.43082809],[-48.41833496,-27.38888168],[-48.55051422,-27.82136917]],[[-48.58111572,-26.39165497],[-48.70774841,-26.3097229],[-48.53778076,-26.16721725],[-48.58111572,-26.39165497]],[[-48.28250122,-25.4861145],[-48.33301544,-25.41305161],[-48.25663757,-25.33887482],[-48.28250122,-25.4861145]],[[-47.87776947,-25.02694702],[-47.8166275,-24.89998627],[-47.60664368,-24.78358841],[-47.87776947,-25.02694702]],[[-46.28276825,-23.98916245],[-46.41637421,-23.95026398],[-46.32360077,-23.92998505],[-46.28276825,-23.98916245]],[[-45.1263504,-23.82136917],[-45.13637543,-23.79777145],[-45.10495758,-23.80636978],[-45.1263504,-23.82136917]],[[-45.22080994,-23.77942276],[-45.2183075,-23.95581818],[-45.44136047,-23.92886734],[-45.22080994,-23.77942276]],[[-44.0888443,-23.17443085],[-44.36917114,-23.17222595],[-44.22859955,-23.07109833],[-44.0888443,-23.17443085]],[[-29.83999252,-20.49637604],[-29.84889221,-20.50081253],[-29.85221481,-20.4910965],[-29.83999252,-20.49637604]],[[-30.2952652,-20.50582314],[-30.31943893,-20.51997757],[-30.33413887,-20.48222351],[-30.2952652,-20.50582314]],[[-38.91163635,-13.6752758],[-38.99193573,-13.59305573],[-38.91278076,-13.58750153],[-38.91163635,-13.6752758]],[[-38.93695068,-13.5625],[-38.98442078,-13.5625],[-38.9643898,-13.49883652],[-39.04109955,-13.46221542],[-39.03859711,-13.39776802],[-38.90804291,-13.38554573],[-38.93695068,-13.5625]],[[-38.75467682,-13.11304855],[-38.64328766,-12.89221573],[-38.5916214,-12.9874897],[-38.75467682,-13.11304855]],[[-37.13250732,-11.12943459],[-37.14639282,-11.10861206],[-37.03690338,-10.95249748],[-37.13250732,-11.12943459]],[[-34.87384796,-7.07333374],[-34.88887787,-7.07194519],[-34.8666687,-7.04861069],[-34.87384796,-7.07333374]],[[-34.85414124,-7.00527382],[-34.86301422,-7.01388931],[-34.85969543,-6.99444008],[-34.85414124,-7.00527382]],[[-32.45083618,-3.88360977],[-32.42415619,-3.84583282],[-32.38664246,-3.84027672],[-32.45083618,-3.88360977]],[[-44.61023712,-3.00805473],[-44.65608215,-2.97360992],[-44.61165619,-2.88722229],[-44.61023712,-3.00805473]],[[-44.58639526,-3.05249977],[-44.57746124,-2.80194473],[-44.48387909,-2.70999908],[-44.58639526,-3.05249977]],[[-42.05078888,-2.76166725],[-42.18444824,-2.67749977],[-42.0694046,-2.68583298],[-42.05078888,-2.76166725]],[[-43.69332314,-2.32694435],[-43.73915863,-2.35027695],[-43.61524963,-2.26249886],[-43.69332314,-2.32694435]],[[-50.8638916,-1.91083336],[-50.98801422,-1.99361038],[-51.14829254,-1.82861137],[-50.8638916,-1.91083336]],[[-49.02416992,-1.82916641],[-49.1569519,-1.85805511],[-49.05552673,-1.7211113],[-49.02416992,-1.82916641]],[[-48.9610672,-1.79583168],[-49.04611206,-1.7052784],[-48.90276337,-1.57722092],[-48.9610672,-1.79583168]],[[-44.65276337,-1.62388802],[-44.66217804,-1.66194534],[-44.77884674,-1.66805458],[-44.78330994,-1.61916733],[-44.71302795,-1.56111145],[-44.65276337,-1.62388802]],[[-52.02471161,-1.5802784],[-52.20083618,-1.64666557],[-52.02944946,-1.43972206],[-51.91440582,-1.51638794],[-52.02471161,-1.5802784]],[[-52.41833496,-1.52750015],[-52.43106842,-1.4663887],[-52.16860199,-1.40833282],[-52.41833496,-1.52750015]],[[-48.63359833,-1.48472214],[-48.69664001,-1.44916725],[-48.65750122,-1.37583351],[-48.63359833,-1.48472214]],[[-48.52579498,-1.52499962],[-48.59249115,-1.44222069],[-48.55329132,-1.36610985],[-48.52579498,-1.52499962]],[[-44.98747253,-1.40194511],[-44.97554779,-1.26166725],[-44.88109589,-1.28305626],[-44.98747253,-1.40194511]],[[-45.63414001,-1.34638786],[-45.68940163,-1.36083221],[-45.62690163,-1.12694359],[-45.63414001,-1.34638786]],[[-48.34026337,-1.21277809],[-48.4655304,-1.16277695],[-48.41217804,-1.07499886],[-48.32245636,-1.07694435],[-48.34026337,-1.21277809]],[[-46.49884796,-1.02027702],[-46.53330994,-1.01749992],[-46.54833984,-0.97222137],[-46.45665741,-0.88861084],[-46.44000244,-1.00638771],[-46.49884796,-1.02027702]],[[-50.98719788,-0.86638832],[-50.9208374,-0.86972237],[-51.0125885,-0.91950226],[-51.01943207,-0.99166679],[-51.07003784,-1.03779411],[-51.18248749,-1.09166718],[-50.98719788,-0.86638832]],[[-51.37526703,-1.2136097],[-51.4002533,-1.20194435],[-51.36361694,-1.12944412],[-51.24884796,-1.02472115],[-51.20301056,-0.84166718],[-51.23943329,-1.14388847],[-51.37526703,-1.2136097]],[[-50.92023468,-0.84499931],[-50.92273712,-0.72916603],[-50.84276581,-0.72777748],[-50.92023468,-0.84499931]],[[-47.93498993,-0.72722244],[-47.95165253,-0.73194504],[-47.97080994,-0.68000031],[-47.93248749,-0.63666725],[-47.87608337,-0.67305565],[-47.93498993,-0.72722244]],[[-47.6680603,-0.70916557],[-47.69664001,-0.71472168],[-47.71884918,-0.64055634],[-47.6652832,-0.57361031],[-47.63719177,-0.62083244],[-47.6680603,-0.70916557]],[[-51.1319046,-0.95944405],[-51.07028198,-0.69444466],[-50.81581879,-0.57222176],[-51.1319046,-0.95944405]],[[-51.05111694,-0.65916634],[-51.09832001,-0.63388824],[-51.0252533,-0.56055641],[-51.05111694,-0.65916634]],[[-51.9013443,-1.4766674],[-51.95219421,-1.43083191],[-51.88495636,-1.17888832],[-51.66217804,-1.08333206],[-51.60969543,-0.73388863],[-51.3819046,-0.54138947],[-51.19969177,-0.52916718],[-51.14829254,-0.6697216],[-51.27160835,-1.01416588],[-51.4833374,-1.24027824],[-51.9013443,-1.4766674]],[[-51.40330505,-0.54083252],[-51.41136169,-0.49972153],[-51.23943329,-0.45444298],[-51.40330505,-0.54083252]],[[-50.95861816,-0.56749916],[-50.87831879,-0.38527679],[-50.77694702,-0.38388824],[-50.95861816,-0.56749916]],[[-51.10773468,-0.53999901],[-51.034729,-0.28305626],[-50.94664001,-0.35388947],[-51.10773468,-0.53999901]],[[-50.90722656,-0.3358326],[-51.02498627,-0.24888802],[-50.88860321,-0.29138947],[-50.90722656,-0.3358326]],[[-49.71329498,-0.22777748],[-48.37303162,-0.2891674],[-48.62722778,-1.06444359],[-49.16637421,-1.61388779],[-50.57801056,-1.80083275],[-50.80356598,-1.44055557],[-50.78108215,-1.15194511],[-50.54997253,-1.06916618],[-50.79692078,-0.9719429],[-50.65776825,-0.27916718],[-49.71329498,-0.22777748]],[[-50.80329132,-0.35888863],[-50.90804291,-0.35833168],[-50.74884796,-0.2266674],[-50.80329132,-0.35888863]],[[-51.38054657,-0.48472214],[-51.10305786,-0.12138939],[-51.1374588,-0.28527832],[-51.38054657,-0.48472214]],[[-50.5569458,-0.0625],[-50.85773468,-0.28305626],[-51.02721405,-0.22416687],[-50.5569458,-0.0625]],[[-50.90167236,-0.0474987],[-50.82969666,0.06083488],[-50.69745636,0.02388954],[-50.90167236,-0.0474987]],[[-49.52552795,-0.13444328],[-49.85245514,-0.06444359],[-49.50162506,0.07055855],[-49.52552795,-0.13444328]],[[-50.455513,-0.02277756],[-50.64328766,0.17111015],[-50.46498871,0.14666939],[-50.455513,-0.02277756]],[[-49.63610077,0.22750282],[-49.98469543,-0.07222176],[-50.39247131,0.10944557],[-49.63610077,0.22750282]],[[-50.24302673,0.2294445],[-50.18417358,0.32416725],[-50.08361816,0.3200016],[-50.24302673,0.2294445]],[[-50.41637421,0.2108326],[-50.53636169,0.22611046],[-50.37384796,0.62138939],[-50.41637421,0.2108326]],[[-50.23747253,0.3508358],[-50.30802917,0.50639153],[-50.06358337,0.64611244],[-50.23747253,0.3508358]],[[-50.00717926,0.88166618],[-50.26773834,0.75166893],[-50.20056152,0.87916756],[-50.00717926,0.88166618]],[[-50.0375061,0.88444328],[-50.09384918,0.92083549],[-50.04218292,0.9180584],[-50.0375061,0.88444328]],[[-50.00941467,0.93527794],[-50.07441711,0.98111153],[-49.94778442,1.05444527],[-50.00941467,0.93527794]],[[-50.39660835,1.88139153],[-50.50500488,2.02499962],[-50.35610199,2.11694527],[-50.39660835,1.88139153]],[[-50.47528076,2.11972237],[-50.51719666,2.20305443],[-50.40554047,2.19361305],[-50.47528076,2.11972237]],[[-60.09832001,5.21722221],[-60.1474762,4.51749992],[-59.67578888,4.38888741],[-59.56859589,3.89944649],[-59.98943329,2.69361305],[-59.64273834,1.73111153],[-58.8069458,1.18555641],[-57.32469177,1.97527885],[-56.47058868,1.94449806],[-55.9041214,1.89305687],[-55.96580505,2.53277779],[-54.60373688,2.32919502],[-52.909729,2.19583321],[-51.68403625,4.03416252],[-51.44778442,3.97250175],[-51.5375061,4.39138985],[-51.08856964,3.91166878],[-50.67971039,2.16472435],[-50.44528198,1.82583427],[-49.92998505,1.7080555],[-50.12194824,1.21416664],[-49.90384674,1.17027855],[-51.25859833,-0.1427784],[-51.6999588,-0.75249863],[-51.71248627,-1.02666664],[-51.91996002,-1.16638947],[-51.92829132,-1.33777809],[-52.06750488,-1.42000008],[-52.23246002,-1.34527779],[-52.7127533,-1.60333252],[-52.20846176,-1.69207764],[-51.25717926,-1.21833229],[-50.99275208,-0.99861145],[-51.00914001,-0.94916725],[-50.99221039,-0.92527771],[-50.8583374,-0.91361046],[-50.8166275,-1.43972206],[-50.66386414,-1.7677784],[-51.33694458,-1.64694405],[-51.45191956,-2.27361107],[-51.30748749,-1.76361084],[-50.84608459,-2.50860977],[-50.98387909,-2.06611061],[-50.70639038,-2.22055626],[-50.67794037,-1.81044388],[-49.28968048,-1.70833206],[-49.48997688,-2.56499863],[-48.69718361,-1.4691658],[-48.43052673,-1.66166687],[-48.41359711,-1.49944305],[-48.18444824,-1.47194481],[-48.50304413,-1.45833206],[-48.47914124,-1.30194283],[-48.33165741,-1.30833244],[-48.29218292,-0.94499969],[-48.06053162,-0.7108326],[-47.95693207,-0.77527809],[-47.74945068,-0.63527679],[-47.72690582,-0.75805473],[-47.54245758,-0.63666725],[-47.39389038,-0.81277847],[-47.43133736,-0.58250046],[-46.95469666,-0.70444489],[-46.95110321,-0.90805626],[-46.82164001,-0.71277809],[-46.60414124,-1.02944374],[-46.55775452,-0.99916649],[-46.53582001,-1.03222084],[-46.44833374,-1.04305458],[-46.19190216,-0.95750046],[-46.25968361,-1.18361092],[-46.04333496,-1.21027756],[-45.97467804,-1.07499886],[-45.85190582,-1.27194405],[-45.73551178,-1.18000031],[-45.69609833,-1.3702774],[-45.44691467,-1.31083298],[-45.46221161,-1.54555511],[-45.32665253,-1.31333351],[-45.34750366,-1.74027824],[-44.86023712,-1.42527771],[-44.95137787,-1.6016674],[-44.82055664,-1.5783329],[-44.79915619,-1.70499992],[-44.69500732,-1.81777763],[-44.53886414,-1.83222198],[-44.49051666,-1.98083305],[-44.65634918,-2.33111],[-44.35997009,-2.33888817],[-44.5821991,-2.55694389],[-44.78636169,-3.2974987],[-44.42056274,-2.93000031],[-44.35691833,-2.52666664],[-44.06330872,-2.4058342],[-44.33971405,-2.8302784],[-43.34750366,-2.36583328],[-41.24802399,-3.02355385],[-39.99694824,-2.84638786],[-37.17443085,-4.91860771],[-35.41745758,-5.21472168],[-34.80078888,-7.63111115],[-35.29273224,-9.18000031],[-36.39328766,-10.49250031],[-37.02160835,-10.93582344],[-37.15330505,-10.74861145],[-38.04137421,-12.63305664],[-38.48861694,-13.01999283],[-38.6916275,-12.57777023],[-38.90106964,-12.70554543],[-38.72528076,-12.87444115],[-38.95665741,-13.37999344],[-39.05633736,-13.37748909],[-39.08023834,-13.53832626],[-38.96302795,-13.68138695],[-39.03886414,-14.17583466],[-38.92056274,-13.91554451],[-39.06690216,-14.64389038],[-38.87194824,-15.8741684],[-39.20665741,-17.14748001],[-39.13082314,-17.68387604],[-39.64361572,-18.22332001],[-39.8013916,-19.63248062],[-40.96052551,-21.23581314],[-40.97162628,-21.98804855],[-41.76306152,-22.34608841],[-42.03440094,-22.91914749],[-43.09194946,-22.95470047],[-43.07583618,-22.66833496],[-43.2183075,-22.99694824],[-44.6625061,-23.0480423],[-44.57719421,-23.3561058],[-45.41833496,-23.83081818],[-46.38278198,-23.86832809],[-48.02606964,-25.01499557],[-48.20861816,-25.46166992],[-48.13136292,-25.27220917],[-48.71858215,-25.42470169],[-48.36138916,-25.57638168],[-48.77051544,-25.87997818],[-48.58193207,-26.17998505],[-48.80247688,-26.06720734],[-48.48523712,-27.21136856],[-48.77471161,-28.52220917],[-49.75250244,-29.36971664],[-50.74945068,-31.08108902],[-52.07245636,-32.17415619],[-52.08639526,-31.82360458],[-51.2513504,-31.47166061],[-50.56717682,-30.45720291],[-50.60887909,-30.19054794],[-50.92829132,-30.41942215],[-51.28162384,-30.00998688],[-51.27111816,-30.79553604],[-51.96526337,-31.33944702],[-52.63664246,-33.12940216],[-53.3742981,-33.74065399],[-53.52275085,-33.14775085],[-53.09304047,-32.72968292],[-53.87967682,-31.96776581],[-55.58193207,-30.84581375],[-56.00889969,-31.07978249],[-56.81134796,-30.10526276],[-57.60800171,-30.18491745],[-55.7652359,-28.22609711],[-53.80775452,-27.12916183],[-53.86328888,-25.68109894],[-54.59889984,-25.57320023],[-54.330513,-24.67943764],[-54.40722656,-23.91664505],[-55.41163635,-23.95639038],[-55.84967804,-22.28886795],[-57.98510742,-22.09182739],[-57.81440163,-20.97193146],[-58.15885925,-20.16803551],[-57.84870148,-19.97878647],[-58.12107086,-19.74136734],[-57.52111816,-18.20388412],[-57.74302673,-17.59304047],[-58.3974762,-17.24915314],[-58.32746124,-16.27915192],[-60.16027832,-16.26303482],[-60.57136536,-15.09749031],[-60.25886536,-15.09361267],[-60.47080994,-13.80721855],[-61.03896332,-13.49311829],[-61.83389282,-13.54472351],[-63.0749588,-12.65000153],[-64.39414978,-12.46165657],[-64.99160767,-12.00805664],[-65.39273071,-11.26638603],[-65.38195801,-9.69777489],[-66.63435364,-9.90694237],[-68.5834198,-11.10612679],[-69.56840515,-10.95108414],[-70.63130188,-11.00915909],[-70.51463318,-9.4280014],[-71.29888916,-9.99637794],[-72.14382935,-10.0047226],[-72.36639404,-9.4944458],[-73.20523071,-9.40721512],[-72.96417236,-8.98332596],[-74.01055908,-7.54138947],[-73.74411011,-6.87693977],[-73.12390137,-6.44721794],[-72.85189819,-5.12472153],[-70.76577759,-4.14638901],[-69.95689392,-4.23687363],[-69.3780365,-1.33805466],[-69.60745239,-0.51749992],[-70.05802917,-0.15749931],[-70.04408264,0.59083366],[-69.12466431,0.64500237],[-69.26991272,1.0383358],[-69.84222412,1.07222176],[-69.84603882,1.71045494],[-68.15296936,1.72416878],[-68.19630432,1.97750282],[-67.91473389,1.74527931],[-67.42408752,2.14388847],[-67.0766449,1.17333412],[-66.87188721,1.22164345],[-66.31195068,0.75055885],[-65.58970642,0.98916817],[-65.51882935,0.64972115],[-63.393013,2.15138817],[-63.3611145,2.41916847],[-64.04495239,2.48250008],[-64.19108582,3.59444618],[-64.79528809,4.28138924],[-64.01773071,3.88611031],[-63.34304047,3.96111107],[-62.875,3.56027794],[-62.74580383,4.03249931],[-60.98497009,4.5205555],[-60.57969666,4.94666862],[-60.73032379,5.20480156],[-60.09832001,5.21722221]]]}, -{code:"BG", name:"Bulgaria", lng:25.231, lat:42.761, borders:[[[27.879166,42.841103],[27.44833,42.469994],[28.013054,41.982216],[27.394997,42.008041],[26.361095,41.711052],[26.294167,41.708054],[26.066109,41.697495],[26.139996,41.354713],[25.285,41.24305],[24.263885,41.570549],[22.935604,41.342125],[23.014721,41.762215],[22.365276,42.323883],[22.442219,42.821663],[23.004997,43.192772],[22.367222,43.826942],[22.681435,44.224701],[23.044167,44.076111],[22.875275,43.842499],[24.179996,43.684715],[25.430229,43.626778],[27.036427,44.147339],[28.583244,43.747765],[27.879166,42.841103]]]}, -{code:"BN", name:"Brunei Darussalam", lng:114.591, lat:4.468, borders:[[[115.223038,4.804998],[115.343323,4.311943],[115.029129,4.82021],[115.145782,4.90324],[115.223038,4.804998]],[[114.981369,4.892499],[115.018433,4.895795],[114.641098,4.018888],[114.095078,4.590538],[114.981369,4.892499]]]}, -{code:"CA", name:"Canada", lng:-109.433, lat:59.081, borders:[[[-65.61355591,43.42027473],[-65.63305664,43.47471046],[-65.56610107,43.50833321],[-65.61355591,43.42027473]],[[-59.81690216,43.92833138],[-60.12995148,43.94193459],[-59.72468567,43.99110603],[-59.81690216,43.92833138]],[[-66.28277588,44.28972054],[-66.32217407,44.25277901],[-66.20632935,44.39527321],[-66.28277588,44.28972054]],[[-66.88609314,44.61444283],[-66.77241516,44.80916023],[-66.7401886,44.70777321],[-66.88609314,44.61444283]],[[-60.99384308,45.45777321],[-61.10441589,45.54638863],[-60.87995148,45.56054878],[-60.99384308,45.45777321]],[[-61.19996643,45.55832863],[-61.22413635,45.56415749],[-61.21411896,45.56888771],[-61.19996643,45.55832863]],[[-63.24634552,46.43554878],[-63.28500366,46.45083046],[-63.24580383,46.44276619],[-63.24634552,46.43554878]],[[-60.44522858,46.86166573],[-60.60915375,46.20193672],[-60.41996765,46.27999306],[-61.14916992,45.69971657],[-60.40913391,45.97999001],[-60.78968048,45.93443489],[-60.34777832,46.31054878],[-59.84053802,45.93832588],[-61.33694458,45.57332802],[-61.44773102,46.14943886],[-60.60915375,47.02443886],[-60.44522858,46.86166573]],[[-64.03962708,46.74332619],[-63.74221039,46.43943214],[-63.64720917,46.56721687],[-63.21634674,46.41221046],[-61.96498871,46.45332527],[-62.76110077,45.95416451],[-62.96276093,46.31999397],[-63.59189606,46.21193886],[-64.41549683,46.67054939],[-64.02078247,47.03860664],[-64.03962708,46.74332619]],[[-55.876091,47.26055336],[-55.96831512,47.25777626],[-55.88109589,47.29332924],[-55.876091,47.26055336]],[[-61.3805542,47.62027168],[-62.01306152,47.22582436],[-61.92802429,47.40721321],[-61.3805542,47.62027168]],[[-54.26137543,47.39027596],[-54.36552429,47.41166115],[-54.1288681,47.67054939],[-54.26137543,47.39027596]],[[-54.07746887,47.47943306],[-54.10191345,47.50139046],[-54.07137299,47.68554878],[-54.07746887,47.47943306]],[[-55.90189362,47.60249519],[-56.11361694,47.64471626],[-55.93385315,47.68832588],[-55.90189362,47.60249519]],[[-64.48268127,47.91777229],[-64.69055176,47.75305367],[-64.66746521,47.86693764],[-64.48268127,47.91777229]],[[-64.56750488,47.89943886],[-64.50108337,48.02749062],[-64.4704895,47.95332527],[-64.56750488,47.89943886]],[[-53.71276093,48.14888191],[-53.9358139,48.18249702],[-53.50968361,48.19832802],[-53.71276093,48.14888191]],[[-123.47441101,48.70916176],[-123.59658051,48.94693947],[-123.37020874,48.76832771],[-123.47441101,48.70916176]],[[-123.32273102,48.86110878],[-123.54049683,48.94499397],[-123.70240784,49.10555458],[-123.32273102,48.86110878]],[[-125.81610107,49.12582588],[-125.93302917,49.21805],[-125.79911041,49.20833015],[-125.81610107,49.12582588]],[[-126.1318512,49.39332771],[-126.06468201,49.25083351],[-126.23910522,49.28972054],[-126.1318512,49.39332771]],[[-123.37934875,49.32694435],[-123.42018127,49.38166237],[-123.31217957,49.41499519],[-123.37934875,49.32694435]],[[-54.70524788,49.40054512],[-54.75914001,49.43776894],[-54.67301178,49.49249458],[-54.64083862,49.46388435],[-54.70524788,49.40054512]],[[-124.17910767,49.44110298],[-124.38110352,49.51194191],[-124.24465942,49.50139046],[-124.17910767,49.44110298]],[[-123.33274841,49.44110298],[-123.4593811,49.46721077],[-123.43663025,49.5222187],[-123.35495758,49.53193855],[-123.33274841,49.44110298]],[[-55.69550323,49.50694466],[-55.72272491,49.55777168],[-55.65303802,49.55526924],[-55.69550323,49.50694466]],[[-124.68934631,49.48027229],[-124.82359314,49.53943825],[-124.83164978,49.61055183],[-124.68934631,49.48027229]],[[-55.6930542,49.56749916],[-55.6596756,49.63555336],[-55.56750488,49.60000038],[-55.6930542,49.56749916]],[[-54.57665253,49.55860329],[-54.89443207,49.58526802],[-54.53608704,49.66415596],[-54.57665253,49.55860329]],[[-54.00440216,49.64749336],[-54.29888916,49.60999489],[-54.14192963,49.75000191],[-54.00440216,49.64749336]],[[-124.12969208,49.65082741],[-124.19937134,49.70610237],[-124.01611328,49.77555275],[-124.12969208,49.65082741]],[[-124.44609833,49.72332191],[-124.12271118,49.49360847],[-124.65657043,49.79694557],[-124.44609833,49.72332191]],[[-62.08972168,49.38638496],[-61.66163635,49.1444416],[-63.08999634,49.22804451],[-64.5138092,49.86361122],[-62.08972168,49.38638496]],[[-126.67607117,49.58360481],[-126.94055176,49.83138466],[-126.7774353,49.87971687],[-126.67803192,49.82527351],[-126.61323547,49.6483326],[-126.67607117,49.58360481]],[[-124.92411041,50.05860329],[-125.06694794,50.10750008],[-124.98323059,50.2255497],[-124.92411041,50.05860329]],[[-63.85942841,50.19777107],[-63.93052673,50.22943306],[-63.88969421,50.24221992],[-63.85942841,50.19777107]],[[-125.16767883,49.98082161],[-125.3399353,50.26888466],[-125.25466919,50.29361153],[-125.16712952,50.2136097],[-125.16767883,49.98082161]],[[-124.8125,50.11138344],[-124.91822052,50.29972267],[-124.75663757,50.17833138],[-124.8125,50.11138344]],[[-124.73072052,50.30221748],[-124.65940857,50.25833321],[-124.69577026,50.1574955],[-124.79496765,50.22887611],[-124.73072052,50.30221748]],[[-125.16549683,50.37443733],[-125.14022827,50.12166023],[-125.15602112,50.23916054],[-125.21362305,50.31666756],[-125.4002533,50.32083321],[-125.16549683,50.37443733]],[[-125.80715942,50.41360664],[-125.95111084,50.43387794],[-125.73802185,50.42804909],[-125.80715942,50.41360664]],[[-125.54376984,50.39388466],[-125.76358795,50.39749336],[-125.5238266,50.43443489],[-125.54376984,50.39388466]],[[-125.42607117,50.35555458],[-125.52796936,50.38166237],[-125.33187103,50.43554878],[-125.42607117,50.35555458]],[[-126.22583008,50.55526924],[-126.62378693,50.53388405],[-126.286026,50.59832954],[-126.22583008,50.55526924]],[[-126.46633911,50.57583046],[-126.55410767,50.60277748],[-126.36138916,50.61583138],[-126.46633911,50.57583046]],[[-59.34581757,50.53388405],[-59.37189484,50.6527729],[-59.30024719,50.5819416],[-59.34581757,50.53388405]],[[-126.8732605,50.66332436],[-126.83110809,50.62915993],[-127.1446991,50.63388252],[-126.8732605,50.66332436]],[[-126.64382935,50.69193459],[-126.68554688,50.75889015],[-126.53636169,50.76361275],[-126.64382935,50.69193459]],[[-127.22692108,50.63611031],[-125.44969177,50.32361031],[-124.78942108,49.46415901],[-123.69937134,49.14388466],[-123.85048676,49.14554787],[-123.28962708,48.41332436],[-125.1138916,48.7311039],[-124.80770874,49.24054909],[-125.48355103,48.9158268],[-125.90461159,49.43582344],[-126.54212952,49.37443733],[-126.0874176,49.66221046],[-126.58491516,49.70110512],[-126.67965698,49.87887764],[-126.80444336,49.90915871],[-127.12107086,49.8522892],[-127.24128723,49.96193886],[-127.15830994,50.09638405],[-127.89578247,50.10888863],[-127.92388916,50.46277046],[-127.44684601,50.37276649],[-127.41136169,50.5874958],[-128.05136108,50.44669533],[-128.41659737,50.76915932],[-127.22692108,50.63611031]],[[-55.56467438,50.69971657],[-55.62467194,50.78721809],[-55.45050812,50.79833412],[-55.56467438,50.69971657]],[[-126.73126984,50.77193642],[-126.9058075,50.82277107],[-126.56304932,50.79999733],[-126.73126984,50.77193642]],[[-126.27295685,50.6527729],[-126.61749268,50.66777229],[-126.26631165,50.82777596],[-126.27295685,50.6527729]],[[-127.65461159,50.83777046],[-127.83851624,50.88166237],[-127.72637177,50.90860176],[-127.65461159,50.83777046]],[[-55.55552673,50.88638496],[-55.63523102,50.96138191],[-55.53527832,50.98137856],[-55.55552673,50.88638496]],[[-58.41333008,51.23888588],[-58.56500244,51.23333168],[-58.41941833,51.27471352],[-58.41333008,51.23888588]],[[-53.75632858,48.50326347],[-54.0943985,48.42582893],[-54.13800812,48.35916328],[-53.75632858,48.50326347],[-52.97800446,48.60444069],[-53.94522858,48.17888069],[-53.60773468,48.05110359],[-53.85055542,47.76055336],[-53.55052185,47.52916145],[-53.27444458,48.01333046],[-52.83139038,48.10166359],[-53.26720428,47.6061039],[-53.12189484,47.41332436],[-52.77939606,47.80304909],[-52.61443329,47.51666451],[-53.10245514,46.63665962],[-53.6177597,46.64415932],[-53.59135437,47.15609932],[-54.18777466,46.81916237],[-53.86748505,47.4027729],[-54.19522858,47.85750008],[-54.48274231,47.39166451],[-54.41833496,47.60360909],[-55.68967438,46.85833168],[-55.98300934,46.95249367],[-54.84581757,47.55694008],[-54.93608093,47.78166389],[-55.58776093,47.39860725],[-56.17247009,47.49721718],[-55.62831879,47.67471504],[-55.91745758,47.6574955],[-55.7735672,47.9569416],[-56.84080505,47.52137947],[-59.13555908,47.55638313],[-59.4068985,47.88971901],[-58.41833496,48.4866581],[-59.26110077,48.47665596],[-58.77471924,48.77887917],[-58.95856476,48.61388588],[-58.70944214,48.57083321],[-58.39606476,49.13138008],[-57.88163757,48.96888161],[-58.22332764,49.39027596],[-57.69637299,49.4636097],[-57.94833374,49.67416573],[-57.14802551,50.62193489],[-57.37859344,50.68776894],[-55.89802551,51.62860298],[-55.40527344,51.56166267],[-56.08552551,51.36832619],[-55.73246765,51.07999611],[-56.15527344,50.88555336],[-56.84886932,49.54444313],[-56.15385437,50.15054512],[-55.49169922,50.00731087],[-56.12913513,49.42555428],[-55.3152771,49.31443977],[-55.14111328,49.54527473],[-55.3833313,49.04083443],[-55.07801056,49.35694313],[-54.82441711,49.26915932],[-54.52885437,49.53333473],[-54.48693085,49.25972176],[-53.77498627,49.39610481],[-53.48856354,49.22054482],[-54.09609413,48.81221199],[-53.60191345,48.68971443],[-53.95606232,48.54388618],[-53.75632858,48.50326347]],[[-56.80356598,49.76333046],[-56.78217316,49.78694344],[-56.83803558,49.76749611],[-56.80356598,49.76333046]],[[-55.99384308,51.20027351],[-55.96777344,51.22665596],[-55.99803925,51.20749855],[-55.99384308,51.20027351]],[[-58.34222412,49.06610298],[-58.33356476,49.07777596],[-58.35610962,49.06582832],[-58.34222412,49.06610298]],[[-127.91442108,51.41082191],[-128.14544678,51.65360451],[-128.,51.72054482],[-127.91442108,51.41082191]],[[-55.36748505,51.87416267],[-55.43052673,51.89666176],[-55.26998138,52.00055122],[-55.36748505,51.87416267]],[[-128.05377197,51.75361061],[-128.25302124,51.87221718],[-127.98323059,52.06193733],[-128.05377197,51.75361061]],[[-79.25270081,52.07138252],[-79.37663269,51.93610573],[-79.6541748,51.9866581],[-79.25270081,52.07138252]],[[-131.01870728,51.94610023],[-131.11019897,52.15110207],[-131.00933838,52.10277748],[-131.01870728,51.94610023]],[[-127.9627533,52.07471657],[-128.12063599,52.14193916],[-127.88110352,52.17222023],[-127.9627533,52.07471657]],[[-128.21188354,52.01555061],[-128.29397583,52.11361122],[-128.15307617,52.19526863],[-128.21188354,52.01555061]],[[-128.29986572,52.13360786],[-128.37719727,52.22387886],[-128.22714233,52.21888161],[-128.29986572,52.13360786]],[[-128.42834473,52.13749886],[-128.51107788,52.16999245],[-128.41635132,52.2263813],[-128.42834473,52.13749886]],[[-127.9246521,52.17416573],[-128.16983032,52.24971962],[-127.97277832,52.29527473],[-127.9246521,52.17416573]],[[-81.47691345,52.24916267],[-81.70991516,52.26249886],[-81.55160522,52.29805183],[-81.47691345,52.24916267]],[[-127.72441101,51.97693825],[-127.78907776,52.22193336],[-127.23462677,52.41694069],[-127.72441101,51.97693825]],[[-128.18444824,52.27860451],[-128.10430908,52.421381],[-128.05661011,52.32888222],[-128.18444824,52.27860451]],[[-128.66854858,52.26638985],[-128.74716187,52.47165871],[-128.6156311,52.45360756],[-128.66854858,52.26638985]],[[-128.47192383,52.49276924],[-128.81378174,52.5249958],[-128.73236084,52.59054756],[-128.57806396,52.5936451],[-128.53527832,52.6472187],[-128.47192383,52.49276924]],[[-131.46426392,52.62748909],[-131.7097168,52.70527077],[-131.47515869,52.7366581],[-131.46426392,52.62748909]],[[-128.43029785,52.36805153],[-128.38327026,52.79749489],[-128.27502441,52.48999214],[-128.43029785,52.36805153]],[[-128.9743042,52.45332527],[-129.27722168,52.82305336],[-128.92333984,52.60666084],[-128.9743042,52.45332527]],[[-128.26956177,52.59694099],[-128.32489014,52.77610207],[-128.17767334,52.82610512],[-128.26956177,52.59694099]],[[-131.63955688,52.82805061],[-131.73300171,52.80860329],[-131.83120728,52.84193611],[-131.63955688,52.82805061]],[[-128.50521851,52.64110756],[-128.506073,52.87304878],[-128.45077515,52.80526924],[-128.50521851,52.64110756]],[[-129.6104126,52.95499611],[-129.65066528,53.01888466],[-129.55749512,53.00666237],[-129.6104126,52.95499611]],[[-129.53155518,53.01055336],[-129.64001465,53.04416084],[-129.56271362,53.05304909],[-129.53155518,53.01055336]],[[-55.76306152,53.02943611],[-55.87635803,53.02749062],[-55.80052185,53.09360695],[-55.76306152,53.02943611]],[[-129.60235596,53.05721474],[-129.73825073,53.12721443],[-129.65438843,53.13276863],[-129.60235596,53.05721474]],[[-129.43249512,53.15138435],[-129.28939819,52.97193336],[-129.54724121,53.13305092],[-129.43249512,53.15138435]],[[-79.90907288,53.0819416],[-79.89775085,53.17444038],[-79.78712463,53.10193825],[-79.90907288,53.0819416]],[[-81.10604858,53.19971657],[-80.69969177,52.69610023],[-82.06326294,53.02665901],[-81.10604858,53.19971657]],[[-131.76217651,53.19665718],[-131.59472656,53.0352726],[-131.96472168,53.04638863],[-131.61541748,52.92027473],[-131.98236084,52.87971687],[-131.03024292,52.17388344],[-132.56356812,53.13916206],[-132.54898071,53.15110207],[-132.41351318,53.12748909],[-132.07077026,53.15387917],[-131.8109436,53.25361061],[-131.76217651,53.19665718]],[[-128.68945313,53.16443825],[-128.51828003,52.9111042],[-128.59210205,52.61388588],[-128.74868774,52.59721565],[-128.64697266,52.96332741],[-128.88433838,52.64805031],[-129.12173462,52.86305428],[-128.84341431,53.04416084],[-129.19119263,53.01333046],[-129.07510376,53.10305214],[-129.06665039,53.30082893],[-128.68945313,53.16443825]],[[-55.77803802,53.28972054],[-55.79719543,53.29554939],[-55.78500366,53.30360603],[-55.77803802,53.28972054]],[[-129.15307617,53.09832954],[-129.33230591,53.13749886],[-129.26806641,53.3319416],[-129.16854858,53.29610634],[-129.15307617,53.09832954]],[[-79.94273376,53.26693916],[-80.08525085,53.32694435],[-79.94468689,53.36805153],[-79.94273376,53.26693916]],[[-129.35821533,53.30416298],[-129.39501953,53.41082191],[-129.30334473,53.33111],[-129.35821533,53.30416298]],[[-55.7875061,53.39415932],[-55.97914886,53.45916176],[-55.72914886,53.45527077],[-55.7875061,53.39415932]],[[-128.94250488,53.31749916],[-129.14328003,53.34971809],[-128.99935913,53.53943825],[-128.90112305,53.38665962],[-128.94250488,53.31749916]],[[-79.70970154,53.50805092],[-79.77362061,53.53166389],[-79.76130676,53.54610634],[-79.70970154,53.50805092]],[[-129.93466187,53.48416328],[-130.02111816,53.50527382],[-129.9418335,53.55110359],[-129.88650513,53.54222298],[-129.93466187,53.48416328]],[[-129.87936401,53.39277077],[-129.76217651,53.15888405],[-130.52023315,53.62471199],[-129.87936401,53.39277077]],[[-129.08621216,53.44610023],[-129.15307617,53.63860512],[-128.81881714,53.70916176],[-129.08535767,53.50499916],[-129.08621216,53.44610023]],[[-56.86721802,53.7650013],[-57.01441956,53.78555489],[-56.8443985,53.79249763],[-56.86721802,53.7650013]],[[-130.09103394,53.56944466],[-130.40328979,53.68249702],[-130.26150513,53.79638863],[-130.09103394,53.56944466]],[[-129.82598877,53.72416115],[-129.50650024,53.21666145],[-129.80703735,53.38416481],[-129.88391113,53.57972145],[-130.05615425,53.60388374],[-129.92799377,53.63960457],[-130.28634644,53.8374958],[-129.82598877,53.72416115]],[[-79.86410522,53.90638161],[-79.90602112,53.9138813],[-79.9263916,53.93526649],[-79.86410522,53.90638161]],[[-130.14956665,53.98916054],[-130.19360352,54.07972145],[-130.13241577,54.04999733],[-130.14956665,53.98916054]],[[-130.25912476,54.00471687],[-130.71276855,53.86110878],[-130.41113281,54.10083199],[-130.25912476,54.00471687]],[[-58.51828766,54.05166054],[-58.56135559,54.06388283],[-58.37385559,54.10416603],[-58.51828766,54.05166054]],[[-132.80792236,54.12027168],[-132.15023804,53.99276924],[-132.66333008,53.67943764],[-132.4178772,53.6061039],[-131.66287231,54.15221596],[-131.98214722,53.25166512],[-132.27261353,53.21027565],[-132.12173462,53.18943214],[-132.18682861,53.16054726],[-132.45730591,53.14527321],[-132.53656006,53.17888069],[-132.59646606,53.24749184],[-132.68356323,53.25666237],[-132.54333496,53.33055305],[-132.73388672,53.33721352],[-132.40655518,53.33971596],[-132.97232056,53.55582619],[-133.07165527,54.16888618],[-132.80792236,54.12027168]],[[-130.19555664,54.11805153],[-130.25280762,54.18554878],[-130.15176392,54.15443611],[-130.19555664,54.11805153]],[[-79.46972656,54.16749763],[-79.47549438,54.19137764],[-79.41299438,54.19165993],[-79.46972656,54.16749763]],[[-130.64849854,54.11444283],[-130.78482056,54.1499958],[-130.78155518,54.2116642],[-130.64849854,54.11444283]],[[-130.3553772,54.25777626],[-130.46710205,54.30860329],[-130.41766357,54.32638741],[-130.3553772,54.25777626]],[[-130.26629639,54.26055336],[-130.35015869,54.30555153],[-130.27261353,54.32972145],[-130.26629639,54.26055336]],[[-130.70404053,54.35666084],[-130.76760864,54.38499641],[-130.69924927,54.40665627],[-130.70404053,54.35666084]],[[-57.32469177,54.49888039],[-57.26720428,54.58555031],[-57.24024963,54.51777077],[-57.32469177,54.49888039]],[[-130.95166016,54.45471382],[-130.92550659,54.61944008],[-130.74758911,54.62610054],[-130.95166016,54.45471382]],[[-79.66712952,54.76388741],[-79.72691345,54.75249672],[-79.58721924,54.79916573],[-79.66712952,54.76388741]],[[-130.51828003,54.70249367],[-130.61148071,54.75805092],[-130.4692688,54.80777168],[-130.51828003,54.70249367]],[[-130.26828003,54.71499825],[-130.37869263,54.69526863],[-130.20925903,54.80777168],[-130.26828003,54.71499825]],[[-57.94081879,54.91193581],[-57.8416214,54.81249428],[-58.22468567,54.83526802],[-57.94081879,54.91193581]],[[-79.12576294,54.8972187],[-79.77688599,54.77804756],[-79.01501465,54.93832588],[-79.12576294,54.8972187]],[[-58.67524719,54.91415596],[-58.76055908,54.92054939],[-58.66027832,55.00860786],[-58.67524719,54.91415596]],[[-130.38522339,54.76999092],[-130.45993042,54.8283329],[-130.16833496,55.01971626],[-130.38522339,54.76999092]],[[-82.96472168,55.26361275],[-83.03527832,55.27887917],[-82.98083496,55.27887917],[-82.96472168,55.26361275]],[[-77.59277344,55.43526649],[-77.64416504,55.42582893],[-77.1999054,55.65027046],[-77.59277344,55.43526649]],[[-60.97081757,55.86944008],[-61.07055664,55.93860054],[-60.90831757,55.8983326],[-60.97081757,55.86944008]],[[-60.85861206,55.86471748],[-60.86497688,55.95277596],[-60.68635559,55.92193794],[-60.85861206,55.86471748]],[[-79.12304688,55.78999519],[-78.95741272,56.08360481],[-78.93968201,56.02527046],[-79.12304688,55.78999519]],[[-60.94332886,56.00666237],[-61.23274231,56.09110451],[-61.08911896,56.16999245],[-60.94332886,56.00666237]],[[-61.62358093,56.3999958],[-61.41218567,56.32666206],[-61.79611206,56.4130497],[-61.62358093,56.3999958]],[[-78.8399353,56.12999153],[-78.66712952,56.43971443],[-78.6763916,56.18110847],[-78.8399353,56.12999153]],[[-79.61999512,56.38527107],[-80.1096344,56.19777107],[-79.54333496,56.5277729],[-79.61999512,56.38527107]],[[-61.4358139,56.54138374],[-61.14884186,56.44110298],[-61.64219666,56.48638344],[-61.4358139,56.54138374]],[[-79.02154732,56.42694283],[-78.9246521,56.41944313],[-78.94326782,56.28499794],[-79.19523621,55.89193916],[-78.97712708,56.38860512],[-79.2833252,55.86444283],[-79.15046692,56.23304939],[-79.47996521,55.86388588],[-79.78189087,55.7880497],[-79.51306152,56.13499641],[-79.98573303,55.89805031],[-79.46601868,56.54833412],[-79.51435852,56.18638039],[-79.28636169,56.57027626],[-79.02154732,56.42694283]],[[-79.62684631,56.26527596],[-79.56108093,56.29916573],[-79.49215698,56.44693947],[-79.62684631,56.26527596]],[[-79.14186096,56.61666298],[-79.28025818,56.65499306],[-79.20883179,56.68387794],[-79.14186096,56.61666298]],[[-61.1875,56.58610725],[-61.16583252,56.68443489],[-61.0777359,56.67499733],[-61.1875,56.58610725]],[[-79.5607605,56.61776924],[-79.56750488,56.81777382],[-79.47462463,56.68915749],[-79.5607605,56.61776924]],[[-79.8818512,56.74360847],[-79.95861816,56.81138039],[-79.81945801,56.8402729],[-79.8818512,56.74360847]],[[-79.75053406,56.90582466],[-79.75750732,56.78193855],[-79.82369232,56.89500618],[-79.89741516,56.88499641],[-79.75053406,56.90582466]],[[-61.42918777,56.92970848],[-61.40909958,56.61561012],[-61.6443634,56.73477745],[-61.42918777,56.92970848]],[[-76.62107849,57.0755558],[-76.70861816,57.18832588],[-76.66996765,57.20249367],[-76.62107849,57.0755558]],[[-61.62162018,57.33555031],[-61.76856232,57.32499886],[-61.72691345,57.37443733],[-61.62162018,57.33555031]],[[-76.71492004,57.29277229],[-76.82164001,57.42943764],[-76.73104858,57.38193703],[-76.71492004,57.29277229]],[[-61.65527344,57.39138222],[-61.90026093,57.43749428],[-61.64802551,57.53027534],[-61.65527344,57.39138222]],[[-61.87831879,57.46305275],[-62.02024841,57.54027748],[-61.78358459,57.55054665],[-61.87831879,57.46305275]],[[-79.79747009,57.41888618],[-79.82685852,57.5380497],[-79.7277832,57.6172123],[-79.79747009,57.41888618]],[[-61.688591,57.71305275],[-61.89606476,57.76971626],[-61.7110672,57.83416176],[-61.688591,57.71305275]],[[-61.94746399,57.78721809],[-62.1083374,57.82471657],[-62.00914001,57.90443611],[-61.92829132,57.90860176],[-61.94746399,57.78721809]],[[-67.59602356,58.28416634],[-67.67660522,58.30138588],[-67.61999512,58.37221718],[-67.51741028,58.33526802],[-67.59602356,58.28416634]],[[-78.4538269,58.53999519],[-78.67247009,58.61055183],[-78.6986084,58.68860054],[-78.4538269,58.53999519]],[[-69.1943512,59.06471443],[-69.35549927,58.94971657],[-69.35713196,59.13971901],[-69.1943512,59.06471443]],[[-80.53440857,59.36944008],[-80.54943848,59.44693947],[-80.47549438,59.4811039],[-80.53440857,59.36944008]],[[-80.2774353,59.61860085],[-80.34385681,59.61915779],[-80.14524841,59.70555305],[-80.2774353,59.61860085]],[[-80.08972168,59.75193977],[-80.18466187,59.75277901],[-79.8788147,59.85471535],[-80.08972168,59.75193977]],[[-64.0196991,59.71471596],[-64.20436096,59.73443794],[-64.06129456,59.86444283],[-64.0196991,59.71471596]],[[-64.42767334,60.37293434],[-64.4486084,60.28416634],[-64.86802673,60.4588871],[-64.42767334,60.37293434]],[[-68.25140381,60.23082161],[-68.11912537,60.57721901],[-67.79855347,60.45749855],[-68.25140381,60.23082161]],[[-64.68989563,60.58443642],[-64.71080017,60.60277748],[-64.59277344,60.68554878],[-64.68989563,60.58443642]],[[-78.65635681,60.70277596],[-78.57359314,60.78416634],[-78.21939087,60.82388496],[-78.65635681,60.70277596]],[[-69.97712708,60.93305397],[-70.0249176,61.00193977],[-69.94360352,61.03138161],[-69.97712708,60.93305397]],[[-64.72386169,61.53833199],[-64.87521362,61.32249641],[-65.48693848,61.61082649],[-64.72386169,61.53833199]],[[-65.69523621,61.77665901],[-65.94795227,61.79027748],[-65.77796936,61.86554909],[-65.69523621,61.77665901]],[[-64.91604614,61.71943855],[-65.25500488,61.90165901],[-64.98083496,61.88582802],[-64.91604614,61.71943855]],[[-92.96383667,61.87915993],[-93.07022095,61.82527351],[-93.2260437,61.9083271],[-92.96383667,61.87915993]],[[-65.85246277,62.0847187],[-66.02024841,62.12443733],[-65.90438843,62.1527729],[-65.85246277,62.0847187]],[[-92.223526,62.35555458],[-92.37249756,62.39193916],[-92.13969421,62.39972115],[-92.223526,62.35555458]],[[-79.54049683,62.4111042],[-79.26130676,62.16360664],[-79.65689087,61.64249611],[-80.2752533,61.80665779],[-80.01741028,62.35860634],[-79.54049683,62.4111042]],[[-92.411026,62.39388466],[-92.60049438,62.38694191],[-92.53102112,62.43138313],[-92.411026,62.39388466]],[[-64.65385437,62.54083443],[-64.38273621,62.51138496],[-64.96580505,62.46582985],[-64.65385437,62.54083443]],[[-64.98300171,62.52804756],[-65.14164734,62.54694557],[-64.83938599,62.57777596],[-64.98300171,62.52804756]],[[-77.8052063,62.59249306],[-77.62129211,62.58443642],[-77.74520874,62.53416634],[-77.8052063,62.59249306]],[[-78.008255,62.59360695],[-77.8377533,62.55694008],[-78.11302185,62.56221199],[-78.008255,62.59360695]],[[-91.57272339,62.62748909],[-91.66799927,62.6491642],[-91.68554688,62.66694069],[-91.57272339,62.62748909]],[[-90.97996521,62.65777016],[-91.27111816,62.67999458],[-91.08023071,62.68693733],[-90.97996521,62.65777016]],[[-74.34777832,62.67943764],[-73.95796204,62.61249733],[-74.65133667,62.71693611],[-74.34777832,62.67943764]],[[-70.71166992,62.81499672],[-70.21112061,62.57916451],[-71.24128723,62.88138008],[-70.71166992,62.81499672]],[[-66.36824036,62.83526802],[-66.60157776,62.90665627],[-66.54768372,62.91054726],[-66.36824036,62.83526802]],[[-81.87107849,62.92833138],[-83.0877533,62.17888069],[-83.7038269,62.14166451],[-83.94523621,62.42721748],[-83.3107605,62.92444038],[-81.87107849,62.92833138]],[[-66.82556152,62.98416328],[-67.06945801,63.10750008],[-66.94610596,63.07499886],[-66.82556152,62.98416328]],[[-67.76435852,63.16249275],[-67.875,63.22304726],[-67.8318634,63.24415779],[-67.76435852,63.16249275]],[[-67.92497253,63.18332863],[-67.96688843,63.18387794],[-68.1121521,63.31360817],[-67.92497253,63.18332863]],[[-78.07969666,63.46943855],[-77.49499512,63.2658329],[-77.94665527,63.09110451],[-78.57272339,63.44027138],[-78.07969666,63.46943855]],[[-90.65385437,63.44110298],[-90.75717163,63.49444008],[-90.59799194,63.45443916],[-90.65385437,63.44110298]],[[-78.55749512,63.45749855],[-78.51577759,63.53166389],[-78.46166992,63.5075016],[-78.55749512,63.45749855]],[[-90.79354858,63.49415779],[-90.9683075,63.55027199],[-90.6746521,63.51388741],[-90.79354858,63.49415779]],[[-72.18249512,63.51999092],[-72.28657532,63.58333015],[-72.12913513,63.55888557],[-72.18249512,63.51999092]],[[-64.09243774,63.48166084],[-64.2127533,63.62360573],[-64.0933075,63.56833076],[-64.09243774,63.48166084]],[[-76.81054688,63.60110664],[-76.54191589,63.4624958],[-77.4571991,63.64332771],[-76.81054688,63.60110664]],[[-64.06108093,63.27054787],[-64.4790802,63.63694191],[-64.3288269,63.6444416],[-64.06108093,63.27054787]],[[-68.65635681,63.62638283],[-68.82164001,63.65249062],[-68.67694092,63.671381],[-68.65635681,63.62638283]],[[-72.59472656,63.64249611],[-72.7833252,63.66443825],[-72.45970154,63.67916298],[-72.59472656,63.64249611]],[[-71.79910278,63.61554909],[-71.86323547,63.61944008],[-71.86410522,63.66944313],[-71.77938843,63.68832588],[-71.79910278,63.61554909]],[[-64.03244019,63.68971443],[-64.2124176,63.71221352],[-64.07522583,63.75805092],[-64.03244019,63.68971443]],[[-72.66767883,63.69582558],[-72.71972656,63.76388741],[-72.62663269,63.73221016],[-72.66767883,63.69582558]],[[-64.28440857,63.70860481],[-64.38110352,63.80749702],[-64.27851868,63.77083015],[-64.28440857,63.70860481]],[[-64.57611084,63.78082466],[-64.38609314,63.70166206],[-64.92018127,63.82471657],[-64.57611084,63.78082466]],[[-64.17018127,63.85638618],[-64.23443604,63.77137947],[-64.39916992,63.84943581],[-64.17018127,63.85638618]],[[-77.74378967,63.92666054],[-77.98246765,63.98304939],[-77.54441833,64.02192879],[-77.74378967,63.92666054]],[[-89.80879211,64.05636787],[-89.86105347,64.07165718],[-89.8677063,64.0958271],[-89.80879211,64.05636787]],[[-64.9627533,64.11081123],[-64.86999512,64.09332466],[-65.05749512,64.11303902],[-64.9627533,64.11081123]],[[-64.49107361,64.10914803],[-64.59580994,64.15664864],[-64.45327759,64.14694405],[-64.49107361,64.10914803]],[[-73.17694092,64.20027351],[-73.28277588,64.14332771],[-73.40167236,64.16554451],[-73.17694092,64.20027351]],[[-81.47135925,64.1888752],[-81.53799438,64.21805],[-81.37576294,64.2208271],[-81.47135925,64.1888752]],[[-64.52024841,64.22026253],[-64.64775085,64.25000191],[-64.46221924,64.2374897],[-64.52024841,64.22026253]],[[-64.93859863,64.23553658],[-65.11247253,64.33970833],[-64.88467407,64.28776741],[-64.93859863,64.23553658]],[[-75.5513916,64.30386543],[-75.70578003,64.34193611],[-75.49357605,64.31637764],[-75.5513916,64.30386543]],[[-73.876297,64.30137825],[-73.97244263,64.30970955],[-73.95666504,64.36831856],[-73.876297,64.30137825]],[[-73.69773865,64.26999092],[-73.83361816,64.33166695],[-73.78135681,64.40555],[-73.69773865,64.26999092]],[[-64.84973145,64.30748177],[-64.95861816,64.40582466],[-64.7718811,64.34887886],[-64.84973145,64.30748177]],[[-74.2718811,64.41360664],[-74.43934631,64.45332527],[-74.17323303,64.43914986],[-74.2718811,64.41360664]],[[-73.74499512,64.42608833],[-73.78135681,64.43193245],[-73.77330017,64.50332832],[-73.66854858,64.46443367],[-73.74499512,64.42608833]],[[-74.2127533,64.48304939],[-74.35768127,64.55108833],[-74.16963196,64.52388191],[-74.2127533,64.48304939]],[[-73.55749512,64.31276131],[-73.68249512,64.50972176],[-73.52775574,64.56694221],[-73.55749512,64.31276131]],[[-65.4927063,64.51776314],[-65.69021606,64.52415657],[-65.20796204,64.63971138],[-65.4927063,64.51776314]],[[-63.35333252,64.99498177],[-63.25886536,64.92109871],[-63.42023468,64.97609138],[-63.35333252,64.99498177]],[[-63.24356842,65.25499153],[-63.31162262,65.29803658],[-63.16637421,65.2861042],[-63.24356842,65.25499153]],[[-66.9246521,65.28442574],[-67.01055908,65.33333015],[-66.91082764,65.3569355],[-66.9246521,65.28442574]],[[-88.43019104,65.45526314],[-88.51219177,65.46971321],[-88.39416504,65.46582222],[-88.43019104,65.45526314]],[[-62.79496002,65.51999092],[-62.88441467,65.60554695],[-62.75080872,65.55137825],[-62.79496002,65.51999092]],[[-83.88273621,65.66693306],[-83.94218445,65.68692207],[-83.87271118,65.71220589],[-83.88273621,65.66693306]],[[-62.26828766,65.70166206],[-62.13191223,65.65721321],[-62.48442841,65.72693062],[-62.26828766,65.70166206]],[[-67.47244263,65.70526314],[-67.71580505,65.70166206],[-67.42443848,65.73526192],[-67.47244263,65.70526314]],[[-85.48049927,65.79193306],[-85.15635681,65.77665901],[-85.31184387,65.53776741],[-84.9246521,65.2097187],[-84.44021606,65.45665169],[-81.76306152,64.50110054],[-81.60246277,64.12997627],[-81.98693848,63.99415779],[-80.89077759,64.11554146],[-80.17160034,63.77110481],[-81.0763092,63.45138741],[-82.472229,63.68027687],[-82.36138916,63.90526772],[-83.09886169,63.95916176],[-83.07272339,64.18664742],[-85.26631165,63.11749458],[-85.58917236,63.17471504],[-85.71743774,63.71610451],[-87.18804932,63.58999062],[-86.18934631,64.10165596],[-86.40167236,64.43664742],[-86.09777832,65.52916145],[-85.48049927,65.79193306]],[[-83.28385925,65.83415413],[-83.48518372,65.80081367],[-83.58612061,65.8541584],[-83.28385925,65.83415413]],[[-65.64578247,65.81303596],[-65.64775085,65.87997627],[-65.51130676,65.90304756],[-65.64578247,65.81303596]],[[-62.13665009,65.8513813],[-62.29665375,65.93858528],[-62.13773346,65.92581367],[-62.13665009,65.8513813]],[[-67.13827515,65.92692757],[-67.21188354,65.98275948],[-67.15385437,65.97859383],[-67.13827515,65.92692757]],[[-84.72277832,65.54609871],[-85.17301941,65.99470711],[-84.58666992,65.69220161],[-84.72277832,65.54609871]],[[-83.57685852,65.98304939],[-83.60441589,65.98776436],[-83.49302673,66.01277351],[-83.57685852,65.98304939]],[[-83.60855103,66.04414558],[-83.65351868,66.04136848],[-83.60713196,66.07748604],[-83.570755,66.05636787],[-83.60855103,66.04414558]],[[-85.01916504,66.05720711],[-85.14916992,66.05053902],[-85.09973145,66.08970833],[-85.01916504,66.05720711]],[[-83.64938354,66.08360481],[-83.68521118,66.12109566],[-83.5877533,66.11720467],[-83.64938354,66.08360481]],[[-83.92138672,66.00972176],[-83.69415283,65.92469978],[-83.72746277,65.79971504],[-83.21080017,65.70582771],[-83.84277344,65.64915657],[-83.68270874,65.74942207],[-84.14361572,65.76416206],[-84.12358093,65.90027046],[-84.47027588,66.13333321],[-83.92138672,66.00972176]],[[-84.57969666,66.14137459],[-84.63990784,66.14055061],[-84.67857361,66.18248177],[-84.57969666,66.14137459]],[[-84.26522827,66.1777668],[-84.36355591,66.20942879],[-84.27296448,66.19664192],[-84.26522827,66.1777668]],[[-62.18385315,66.23719978],[-62.42998505,66.2291584],[-62.26164246,66.28027534],[-62.18385315,66.23719978]],[[-83.06716919,66.25555611],[-83.29833984,66.3138752],[-82.9024353,66.27165413],[-83.06716919,66.25555611]],[[-66.6232605,66.28082466],[-66.95828247,66.41192818],[-66.57501221,66.3138752],[-66.6232605,66.28082466]],[[-66.99824524,66.4930439],[-66.86878967,66.46443367],[-67.03657532,66.45610237],[-66.99824524,66.4930439]],[[-107.92301941,66.85054207],[-107.79496765,66.99720955],[-107.82380676,66.90109444],[-107.92301941,66.85054207]],[[-63.05912018,66.95776558],[-63.16610718,67.00499153],[-63.,66.98442268],[-63.05912018,66.95776558]],[[-108.01435852,66.89776802],[-108.10653687,67.02600288],[-107.93827057,66.94693184],[-108.01435852,66.89776802]],[[-62.91833496,67.00972176],[-63.13800812,67.06526375],[-63.00222778,67.06944466],[-62.91833496,67.00972176]],[[-62.64416504,67.05748177],[-62.89944458,67.058321],[-62.37527466,67.16581917],[-62.64416504,67.05748177]],[[-107.40776825,67.0830555],[-107.52775574,67.07805061],[-107.62663269,67.20027351],[-107.40776825,67.0830555]],[[-95.36160278,67.19775581],[-95.5526886,67.23526192],[-95.30715942,67.25248909],[-95.36160278,67.19775581]],[[-107.66278076,67.22026253],[-107.72493744,67.31303596],[-107.65994263,67.29887581],[-107.66278076,67.22026253]],[[-63.36639404,67.28776741],[-63.82969666,67.28415108],[-63.58580017,67.35331917],[-63.36639404,67.28776741]],[[-107.91082764,67.31053352],[-108.07380676,67.43081856],[-107.8946991,67.48553658],[-107.91082764,67.31053352]],[[-108.36824036,67.46721077],[-108.49128723,67.56303596],[-108.29747009,67.55720711],[-108.36824036,67.46721077]],[[-108.14111328,67.44999886],[-108.2718811,67.47137642],[-108.21907043,67.57110786],[-108.14111328,67.44999886]],[[-108.32273102,67.58998299],[-108.48388672,67.63665962],[-108.39022827,67.63109016],[-108.32273102,67.58998299]],[[-63.88191223,67.50332832],[-64.02972412,67.51388741],[-63.97691345,67.64943123],[-63.75805664,67.52054024],[-63.88191223,67.50332832]],[[-108.05999756,67.47526741],[-108.11355591,67.67526436],[-107.92138672,67.54664803],[-108.05999756,67.47526741]],[[-97.50270081,67.62442207],[-97.56054688,67.69275093],[-97.3377533,67.72415352],[-97.50270081,67.62442207]],[[-109.1121521,67.76332283],[-109.20774841,67.78387642],[-109.03907776,67.79332161],[-109.1121521,67.76332283]],[[-96.17051888,67.77304268],[-96.07719421,67.83888435],[-95.99749756,67.82083321],[-96.17051888,67.77304268]],[[-114.11496735,67.88388252],[-114.29692078,67.89526558],[-113.92138672,67.87803841],[-114.11496735,67.88388252]],[[-113.39022827,67.89776802],[-113.60333252,67.90304756],[-113.24694824,67.91443062],[-113.39022827,67.89776802]],[[-112.93052673,67.9166584],[-113.14741516,67.91220284],[-112.88719177,67.92720222],[-112.93052673,67.9166584]],[[-108.64686584,67.86943245],[-108.54463196,67.92831612],[-108.35942841,67.8999958],[-108.64686584,67.86943245]],[[-114.21907043,67.94525337],[-114.31716919,67.94970894],[-114.12107849,67.96193123],[-114.21907043,67.94525337]],[[-108.13806152,67.87248421],[-108.25553894,67.88720894],[-108.05444336,67.96331978],[-108.13806152,67.87248421]],[[-113.71994019,67.97331429],[-113.99302673,67.96110725],[-113.77220154,67.98027229],[-113.71994019,67.97331429]],[[-109.19523621,67.98997688],[-108.95111084,67.97331429],[-108.86608315,67.90027046],[-109.19523621,67.98997688]],[[-110.3343811,68.01165962],[-110.4208374,68.02083015],[-110.31739044,68.04971504],[-110.3343811,68.01165962]],[[-98.9513092,67.97998238],[-99.07861328,68.04559517],[-98.97549438,68.07721138],[-98.9513092,67.97998238]],[[-108.50608826,68.03471565],[-108.5402832,68.03997993],[-108.44741058,68.08777046],[-108.50608826,68.03471565]],[[-65.39720154,68.03997993],[-65.5196991,68.06749153],[-65.38630676,68.08831978],[-65.39720154,68.03997993]],[[-109.32164001,67.98109627],[-109.54299927,68.05220222],[-109.44718933,68.09221077],[-109.32164001,67.98109627]],[[-108.36051941,68.04971504],[-108.4079895,68.06971931],[-108.29441833,68.09721565],[-108.36051941,68.04971504]],[[-74.21546936,68.11775398],[-73.348526,67.82805061],[-74.77722168,67.97387886],[-74.21546936,68.11775398]],[[-110.21362305,68.03804207],[-110.2585907,68.04193306],[-109.87718201,68.12692451],[-110.21362305,68.03804207]],[[-65.64219666,68.15942574],[-65.49554443,68.12831306],[-65.70970154,68.10609627],[-65.64219666,68.15942574]],[[-112.7804718,68.13109016],[-112.92212677,68.14665413],[-112.75161743,68.16470528],[-112.7804718,68.13109016]],[[-107.473526,68.14471626],[-107.55410767,68.16609383],[-107.4679718,68.18858528],[-107.473526,68.14471626]],[[-104.45294952,68.10220528],[-104.55378723,68.16165352],[-104.37718201,68.19970894],[-104.45294952,68.10220528]],[[-107.3888092,68.1722126],[-107.44523621,68.20166206],[-107.2915802,68.20277596],[-107.3888092,68.1722126]],[[-98.6502533,68.18026924],[-98.70436096,68.17608833],[-98.69326782,68.2136097],[-98.6502533,68.18026924]],[[-111.83329773,68.18193245],[-111.86553192,68.18803596],[-111.75489044,68.21582222],[-111.83329773,68.18193245]],[[-96.38414001,68.20082283],[-96.4627533,68.21609688],[-96.31750488,68.2319355],[-96.38414001,68.20082283]],[[-74.06271362,68.15165901],[-74.1763916,68.20416451],[-74.07969666,68.23248482],[-74.06271362,68.15165901]],[[-108.59025574,68.21443367],[-108.67749023,68.16887093],[-108.55966187,68.23610115],[-108.59025574,68.21443367]],[[-66.31358337,68.14776802],[-66.60713196,68.21721077],[-66.22190857,68.24109077],[-66.31358337,68.14776802]],[[-109.78385925,68.13749886],[-109.8565979,68.14776802],[-109.56803894,68.24720955],[-109.78385925,68.13749886]],[[-78.57164001,68.20027351],[-78.66212463,68.18914986],[-78.54801941,68.26304817],[-78.57164001,68.20027351]],[[-111.71025085,68.22053719],[-111.77722168,68.25305367],[-111.49933624,68.29693794],[-111.71025085,68.22053719]],[[-75.58274841,68.30026436],[-75.0030365,68.13220406],[-75.1986084,67.44331551],[-76.66352844,67.21998787],[-77.24694824,67.45193672],[-77.25195313,67.82638741],[-76.7260437,68.23887825],[-75.58274841,68.30026436]],[[-86.4263916,68.06915474],[-86.58361816,67.72526741],[-86.9927063,68.06666756],[-86.67497253,68.30609322],[-86.4263916,68.06915474]],[[-79.02046204,68.16914558],[-79.19110107,68.31944466],[-78.80160522,68.27916145],[-79.02046204,68.16914558]],[[-100.07469177,68.34971809],[-100.09941101,68.27859688],[-100.23072052,68.31971931],[-100.07469177,68.34971809]],[[-82.05999756,68.30609322],[-82.3454895,68.36775398],[-81.99716187,68.34137154],[-82.05999756,68.30609322]],[[-111.11444092,68.40582466],[-111.14916992,68.43997383],[-111.08242035,68.44470406],[-111.11444092,68.40582466]],[[-74.16212463,68.24609566],[-74.39306641,68.44525337],[-74.07936096,68.33859444],[-74.16212463,68.24609566]],[[-99.04518127,68.42387581],[-99.05499268,68.4083271],[-99.15907288,68.45109749],[-99.04518127,68.42387581]],[[-100.71045685,68.40248299],[-100.88970184,68.45277596],[-100.79322052,68.46887398],[-100.71045685,68.40248299]],[[-110.86247253,68.47415352],[-111.09744263,68.48275948],[-110.69609833,68.48637581],[-110.86247253,68.47415352]],[[-110.58689117,68.52415657],[-110.76185608,68.56164742],[-110.51828003,68.53915596],[-110.58689117,68.52415657]],[[-104.54518127,68.39610481],[-105.08164978,68.54637337],[-104.68248749,68.57388496],[-104.54518127,68.39610481]],[[-105.13913727,68.53637886],[-105.05879211,68.50416756],[-105.29212952,68.58221626],[-105.13913727,68.53637886]],[[-113.786026,68.58276558],[-113.96601868,68.61110115],[-113.76185608,68.59221077],[-113.786026,68.58276558]],[[-100.74053192,68.59637642],[-100.88240051,68.61137581],[-100.813797,68.61914253],[-100.74053192,68.59637642]],[[-78.46885681,68.5638752],[-78.95970154,68.47470284],[-78.8638916,68.65971565],[-78.46885681,68.5638752]],[[-74.81129456,68.32054329],[-75.39686584,68.61110115],[-75.,68.67224312],[-74.81129456,68.32054329]],[[-74.76882935,68.67387581],[-74.51828003,68.55859566],[-74.89022827,68.62498665],[-74.76882935,68.67387581]],[[-114.04712677,68.61360359],[-114.18989563,68.68026924],[-114.14186096,68.67692757],[-114.04712677,68.61360359]],[[-101.83110809,68.56694221],[-102.31629944,68.6722126],[-101.69381714,68.76805305],[-101.83110809,68.56694221]],[[-68.11018372,68.78276253],[-67.66136169,68.70193672],[-68.4593811,68.79109383],[-68.11018372,68.78276253]],[[-102.60083008,68.81331062],[-102.7071991,68.81666756],[-102.61268616,68.84305],[-102.60083008,68.81331062]],[[-89.9443512,68.66220284],[-89.9443512,68.84749031],[-89.78167725,68.76666451],[-89.9443512,68.66220284]],[[-114.35083008,68.87164497],[-114.47158051,68.89248848],[-114.32327271,68.88304329],[-114.35083008,68.87164497]],[[-67.84777832,68.85193062],[-67.96046448,68.92997932],[-67.876297,68.94941902],[-67.84777832,68.85193062]],[[-100.17552185,68.79471016],[-100.62304688,68.76193428],[-100.59996033,69.00055122],[-100.17552185,68.79471016]],[[-85.3416748,68.98359871],[-85.45306396,69.00583076],[-85.36999512,69.00193977],[-85.3416748,68.98359871]],[[-89.90830994,68.91775703],[-90.07055664,68.9819355],[-89.9208374,69.01027107],[-89.90830994,68.91775703]],[[-85.1194458,69.01471138],[-85.17018127,69.03581429],[-85.06129456,69.03665352],[-85.1194458,69.01471138]],[[-85.26522827,69.07249641],[-85.39883423,69.08610725],[-85.24194336,69.09137154],[-85.26522827,69.07249641]],[[-99.99934387,68.94359016],[-100.2585907,69.04193306],[-100.05303192,69.10247993],[-99.99934387,68.94359016]],[[-90.12467957,69.04942513],[-90.27633667,69.12581062],[-90.14720154,69.10359383],[-90.12467957,69.04942513]],[[-101.66407776,69.08360481],[-101.69523621,69.2069416],[-101.49498749,69.16554451],[-101.66407776,69.08360481]],[[-90.51251221,69.20248604],[-90.77580261,69.32998848],[-90.58241272,69.3597126],[-90.51251221,69.20248604]],[[-78.41212463,69.37970161],[-78.21080017,69.2944355],[-78.83023071,68.91304207],[-79.4002533,68.87191963],[-78.41212463,69.37970161]],[[-135.28872681,69.30941963],[-135.56555176,69.39055061],[-135.33776855,69.38859749],[-135.28872681,69.30941963]],[[-76.95077515,69.39526558],[-76.64654732,69.33693123],[-77.3818512,69.24748421],[-76.95077515,69.39526558]],[[-90.32936096,69.23581123],[-90.51435852,69.36387825],[-90.20077515,69.4444294],[-90.32936096,69.23581123]],[[-135.59210205,69.48221016],[-135.57424927,69.44664192],[-135.81555176,69.50248909],[-135.59210205,69.48221016]],[[-101.05303192,69.50444221],[-101.23027802,69.36859322],[-101.38719177,69.53776741],[-101.05303192,69.50444221]],[[-96.66299438,69.56971931],[-96.09602356,69.46805],[-96.23388672,69.3597126],[-96.66299438,69.56971931]],[[-67.31054688,69.54915047],[-67.74966431,69.52110481],[-67.48443604,69.5902729],[-67.31054688,69.54915047]],[[-95.4888916,69.56553841],[-95.51577759,69.33082771],[-95.73693848,69.32443428],[-95.6690979,69.50749397],[-95.81576538,69.56276131],[-95.99073792,69.35331917],[-95.91996765,69.59526253],[-95.4888916,69.56553841]],[[-96.76055908,69.54553413],[-96.88380432,69.55914497],[-96.90222168,69.59776497],[-96.76055908,69.54553413]],[[-91.10997009,69.54942513],[-91.10888672,69.60220528],[-90.9190979,69.60609627],[-91.10997009,69.54942513]],[[-133.93203735,69.56025887],[-134.01654053,69.57609749],[-133.93356323,69.61609077],[-133.84472656,69.60081673],[-133.93203735,69.56025887]],[[-135.5171814,69.56915474],[-135.58926392,69.59610176],[-135.39761353,69.64694405],[-135.5171814,69.56915474]],[[-138.86715698,69.58831978],[-139.33230591,69.56608772],[-139.12020874,69.6499958],[-138.86715698,69.58831978]],[[-67.92018127,69.52192879],[-68.24879456,69.59665108],[-67.88969421,69.70833015],[-67.92018127,69.52192879]],[[-134.26040649,68.73353767],[-134.49542236,68.75221443],[-134.82577515,68.97886848],[-134.91461182,68.96666145],[-134.96099854,68.89248848],[-135.14196777,68.90138435],[-135.20166016,68.93275642],[-135.39196777,68.92665291],[-135.46081543,68.94275093],[-135.90567017,68.91137886],[-135.97821045,69.04081917],[-135.51760864,69.02388191],[-135.96710205,69.21470833],[-135.48693848,69.11331367],[-135.85409737,69.29081917],[-135.17050171,69.25776863],[-135.28723145,69.41914558],[-135.15066528,69.47693062],[-134.43814087,69.45471382],[-134.49108887,69.72221565],[-134.11325073,69.5388813],[-133.77828979,69.57638741],[-134.67355347,69.01776314],[-134.26040649,68.73353767]],[[-102.14524841,69.64860725],[-102.24128723,69.71026802],[-102.13466644,69.72470284],[-102.14524841,69.64860725]],[[-77.94665527,69.64665413],[-78.88021851,69.47693062],[-78.18052673,69.75221443],[-77.94665527,69.64665413]],[[-82.50772095,69.70498848],[-82.87934875,69.77859688],[-82.46025085,69.76165962],[-82.50772095,69.70498848]],[[-79.42301941,69.78499031],[-80.01185608,69.49165535],[-80.80934143,69.68304634],[-79.42301941,69.78499031]],[[-83.67443848,69.71998787],[-83.91712952,69.77859688],[-83.5291748,69.78665352],[-83.70861816,69.75943184],[-83.67443848,69.71998787]],[[-82.42944336,69.78221321],[-82.68859863,69.85081673],[-82.51719666,69.8541584],[-82.42944336,69.78221321]],[[-91.81913757,69.82165718],[-91.86410522,69.84414864],[-91.63969421,69.85498238],[-91.81913757,69.82165718]],[[-91.51991272,69.73137093],[-91.73551941,69.78915596],[-91.40907288,69.87498665],[-91.51991272,69.73137093]],[[-97.39775085,69.68553352],[-95.2068634,68.85026741],[-96.5304718,68.44497871],[-99.59635925,69.02054024],[-98.39328003,69.30803108],[-98.55662537,69.58082771],[-98.00379944,69.43580818],[-98.3677063,69.60109138],[-98.01219177,69.88582039],[-97.39775085,69.68553352]],[[-97.32501221,69.88916206],[-97.48857117,69.94386482],[-97.22691345,69.8735981],[-97.32501221,69.88916206]],[[-100.84973145,69.92553902],[-100.85855103,69.97776985],[-100.80693817,69.98581123],[-100.84973145,69.92553902]],[[-87.09135437,70.15027046],[-86.45666504,70.00749397],[-87.37826538,70.09610176],[-87.09135437,70.15027046]],[[-125.05693817,70.11831856],[-125.1232605,70.13546944],[-124.95491028,70.16415596],[-125.05693817,70.11831856]],[[-124.67944336,70.16165352],[-124.76185608,70.19192696],[-124.50521851,70.19832039],[-124.67944336,70.16165352]],[[-112.96972656,70.28137398],[-113.20361328,70.29248238],[-112.94544983,70.28665352],[-112.96972656,70.28137398]],[[-112.65527344,70.26609993],[-112.76130676,70.29860115],[-112.6875,70.30636787],[-112.65527344,70.26609993]],[[-100.76522827,70.25000191],[-100.85192108,70.32388496],[-100.74804688,70.31694221],[-100.76522827,70.25000191]],[[-116.8052063,70.50943184],[-116.5682621,70.47387886],[-116.71907043,70.47026253],[-116.8052063,70.50943184]],[[-116.28778076,70.55331612],[-116.12739563,70.53581429],[-116.49575043,70.52276802],[-116.28778076,70.55331612]],[[-116.56304932,70.53442574],[-116.77439117,70.54525948],[-116.50934601,70.55609322],[-116.56304932,70.53442574]],[[-115.92051888,70.54136848],[-116.06108093,70.54832649],[-115.80792999,70.57054329],[-115.92051888,70.54136848]],[[-116.87934875,70.54748726],[-117.30160522,70.56192207],[-117.19937134,70.59166145],[-116.87934875,70.54748726]],[[-128.08599854,70.60554695],[-128.3416748,70.54220772],[-128.23410034,70.65609932],[-128.08599854,70.60554695]],[[-100.23072052,70.45166206],[-100.6708374,70.55887032],[-100.65188599,70.66971016],[-100.23072052,70.45166206]],[[-103.1776886,70.62248421],[-103.28135681,70.63804817],[-103.20991516,70.67665291],[-103.1776886,70.62248421]],[[-103.35083008,70.68719673],[-103.4627533,70.73221016],[-103.34101868,70.72026253],[-103.35083008,70.68719673]],[[-71.47157288,71.01277351],[-71.95556641,70.81833076],[-72.22636414,70.9305439],[-71.47157288,71.01277351]],[[-96.56326294,71.29220772],[-96.47244263,71.23221016],[-96.48083496,71.20887947],[-96.63861084,71.22609138],[-96.56326294,71.29220772]],[[-98.89546204,71.2777729],[-99.00880432,71.3138752],[-98.95578003,71.35220528],[-98.89546204,71.2777729]],[[-73.12054443,71.47970772],[-73.37989807,71.51971626],[-72.81750488,71.44497871],[-73.12054443,71.47970772]],[[-72.76077271,71.53193855],[-73.03996277,71.57998848],[-72.69577026,71.65109444],[-72.76077271,71.53193855]],[[-73.37020874,71.55443001],[-73.44795227,71.59414864],[-73.14883423,71.67997932],[-73.37020874,71.55443001]],[[-96.95883179,71.70443916],[-97.05018616,71.70416451],[-96.84439087,71.74414253],[-96.95883179,71.70443916]],[[-95.3399353,71.73137093],[-95.48802185,71.74553108],[-95.26577759,71.83665657],[-95.3399353,71.73137093]],[[-134.49542236,68.75221443],[-134.3399353,68.67886543],[-134.22692871,68.69413948],[-134.26040649,68.73353767],[-134.56204224,69.08276558],[-130.5428772,70.16832161],[-129.40328979,70.11775398],[-130.92855835,69.56331062],[-131.05288696,69.63720894],[-131.99716187,69.53137398],[-133.4906311,68.82165718],[-132.47015381,68.80693245],[-132.86932373,69.06276131],[-131.65222168,69.47192574],[-131.32470703,69.31999397],[-131.16650391,69.40493202],[-131.25370789,69.57184792],[-131.1104126,69.48533058],[-131.13565063,69.35998726],[-131.06373596,69.51239204],[-131.19598389,69.58998299],[-131.08294678,69.60054207],[-131.02761841,69.46388435],[-131.10888672,69.32165718],[-130.95272827,69.54332161],[-130.93704224,69.13443184],[-130.36608887,69.68637276],[-128.90066528,69.97192574],[-129.16940308,69.82470894],[-128.92483521,69.68081856],[-127.51490021,70.22165108],[-128.19665527,70.39193916],[-127.99662781,70.59054756],[-125.4263916,69.31218147],[-125.08938599,69.44970894],[-125.62249756,69.41859627],[-125.11802673,69.48579597],[-125.36553192,69.69026375],[-124.82184601,69.71499825],[-125.27633667,69.80824471],[-124.79518127,70.00888252],[-125.19741058,70.00450325],[-124.43608093,70.15109444],[-124.50054169,69.72581673],[-124.04083252,69.70138741],[-124.44664764,69.36720467],[-123.46601868,69.38388252],[-122.95904732,69.83360481],[-121.68379211,69.79359627],[-117.153862,68.88554573],[-115.5929718,68.97165108],[-114.07055664,68.47747993],[-114.02330017,68.24136543],[-115.54245758,67.92164803],[-115.10354614,67.79664803],[-112.39578247,67.67915535],[-111.0057621,67.7650013],[-110.08383179,68.00694466],[-109.06576538,67.71415901],[-108.82501221,67.34942818],[-108.65527344,67.62831306],[-108.48410034,67.34942818],[-108.36694336,67.44497871],[-108.01522827,67.29304695],[-107.88043976,67.04832649],[-108.62271118,67.1499958],[-107.24804688,66.34999275],[-107.74662781,66.92276192],[-107.08361816,66.82054329],[-108.00695801,67.70749092],[-107.65101624,67.94053841],[-107.89044952,68.08166695],[-106.43193817,68.15304756],[-106.46492004,68.33581734],[-105.73964691,68.41526985],[-105.64492035,68.63388252],[-106.54376984,68.51193428],[-106.54322052,68.29136848],[-106.8026886,68.41443062],[-107.88523102,68.26887703],[-107.60299683,68.16526985],[-108.81913757,68.26666451],[-108.31413269,68.61137581],[-106.2290802,68.94081306],[-105.48693848,68.72943306],[-105.38076782,68.48665047],[-105.54104614,68.41276741],[-104.60962677,68.24136543],[-104.67018127,68.13859749],[-104.5,68.03193855],[-103.42160034,68.1666584],[-102.251091,67.72526741],[-98.35441589,67.79609871],[-98.61552429,68.07470894],[-98.09439087,67.76609993],[-97.50967407,67.59915352],[-97.11912537,67.79248238],[-97.68302917,68.01860237],[-98.02993774,67.94192696],[-98.07861328,67.8302784],[-98.5874176,68.14943123],[-98.32611084,68.17137337],[-98.71438599,68.37220955],[-96.4041748,68.31137276],[-96.70828247,68.00860786],[-95.98028564,68.25471687],[-96.46472168,67.47804451],[-96.097229,67.46470833],[-96.11444092,67.21331978],[-95.56576538,67.37664986],[-95.83329773,67.16276741],[-95.32611084,67.02720833],[-95.9024353,66.94664192],[-96.46046448,67.06219673],[-95.62968445,66.67553902],[-95.9024353,66.94664192],[-95.22080994,66.96832466],[-95.16333008,67.28720284],[-95.70904732,67.72776985],[-95.47277832,68.06053352],[-94.722229,68.05497932],[-93.55323792,68.58638191],[-93.66691589,68.97221565],[-94.625,68.76138496],[-94.07272339,69.12664986],[-94.30323792,69.30497932],[-93.36268616,69.37164497],[-95.96080017,69.77804756],[-96.53167725,70.13109016],[-96.23268127,70.56219673],[-95.78941345,70.53665352],[-96.61193848,70.7944355],[-96.36999512,71.08998299],[-96.56054688,71.1263752],[-96.46722412,71.16526985],[-96.46211243,71.2555027],[-96.50379944,71.27720833],[-95.53527832,71.29081917],[-95.9430542,71.55359077],[-94.6065979,71.86331367],[-95.21743774,71.94497871],[-93.71166992,71.76138496],[-92.97386169,71.34082222],[-93.0274353,70.85276985],[-91.51359558,70.16720772],[-92.26828003,70.20887947],[-92.45022583,70.07110786],[-91.93968201,70.02026558],[-92.92018127,69.66971016],[-90.30770874,69.45027351],[-91.44718933,69.35276985],[-90.43629456,68.87442207],[-90.6065979,68.44609261],[-90.27133179,68.23887825],[-89.30662537,69.25139046],[-88.05215454,68.82304573],[-87.79212952,68.33442879],[-88.39219666,68.28749275],[-88.3707428,67.95915413],[-87.35768127,67.26220894],[-87.51022339,67.11219978],[-86.52362061,67.35220528],[-85.66352844,68.72693062],[-84.78712463,68.73359871],[-85.1943512,68.86720467],[-84.52830505,69.01748848],[-85.47332764,69.27192879],[-85.3318634,69.77916145],[-85.57185364,69.85609627],[-85.06434631,69.76999092],[-84.37576294,69.85748482],[-83.70491028,69.70359993],[-82.26327515,69.63804817],[-83.22799683,69.53859138],[-81.33241272,69.18248177],[-82.05715942,68.87387276],[-81.26741028,68.63304329],[-82.6388092,68.49720955],[-81.24302673,67.47499275],[-81.5030365,66.99971199],[-83.40222168,66.34749031],[-83.97746277,66.58221626],[-83.91636658,66.88109016],[-84.14022827,66.70193672],[-84.43629456,66.81833076],[-84.3707428,66.97137642],[-84.91494751,67.06080818],[-84.63969421,66.97804451],[-85.22833252,66.87831306],[-84.60212708,66.93580818],[-84.74629211,66.89749336],[-84.50575256,66.82777596],[-84.69055176,66.83998299],[-84.46688843,66.78776741],[-84.44239807,66.71081734],[-84.1443634,66.68136787],[-83.6930542,66.19081306],[-86.7752533,66.52609444],[-85.89720154,66.16832161],[-87.39578247,65.32138252],[-89.67160034,65.93942451],[-91.42910767,65.95109749],[-86.93325806,65.13804817],[-88.11323547,64.13611031],[-90.12413025,64.12858772],[-89.81358337,63.93721199],[-90.2791748,64.00360298],[-89.96417236,63.81193733],[-90.20524788,63.61221504],[-92.48268127,63.81193733],[-92.10157776,63.69693947],[-92.48083496,63.52721596],[-91.76327515,63.71332741],[-90.74194336,63.36082649],[-90.62739563,63.05943489],[-92.4208374,62.83138466],[-91.88500977,62.59916115],[-92.70991516,62.46582985],[-92.46992683,62.14661598],[-93.12216187,62.33499336],[-92.76469421,62.21943855],[-93.61607361,61.93998909],[-93.23768616,61.77721596],[-93.9846344,61.45610237],[-94.67323303,60.52249336],[-94.81913757,59.63638496],[-94.78962708,59.0922184],[-94.22888184,58.78499794],[-94.36323547,58.21888161],[-94.14382935,58.76361275],[-93.15222168,58.73777199],[-92.41888428,57.3374958],[-92.87609863,56.9074955],[-90.81521606,57.25583076],[-85.71438599,55.63166237],[-85.12184143,55.33777046],[-85.42388916,54.99054909],[-85.00195313,55.29666328],[-82.30770874,55.14888191],[-82.29660034,53.01860237],[-81.54998779,52.44110298],[-81.8835907,52.18749428],[-80.9944458,52.01138496],[-80.43629456,51.46415901],[-81.01501465,51.02832985],[-80.12020874,51.29638863],[-79.3321991,50.72387886],[-79.75216675,51.18443489],[-79.32217407,51.66276741],[-78.85333252,51.16554451],[-79.03549194,51.77027321],[-78.50695801,52.46055031],[-79.11018372,53.50249672],[-79.04888916,54.18332863],[-79.76435852,54.65221596],[-77.74858093,55.30082893],[-77.13719177,55.65416145],[-76.53833008,56.29777718],[-76.52972412,57.10582924],[-76.86193848,57.71915627],[-78.57469177,58.63527107],[-78.57055664,58.96138191],[-77.67715454,59.3999958],[-77.91027832,59.40555],[-77.77383423,59.7097187],[-77.313797,59.56499672],[-77.42749023,59.91471291],[-76.75880432,60.15915871],[-77.59222412,60.06415749],[-77.74772644,60.40813637],[-77.41333008,60.54416084],[-77.83383179,60.63943672],[-77.51164246,60.83638191],[-78.19273376,60.79083443],[-77.47462463,61.54166603],[-77.99249268,61.71471596],[-78.1558075,62.27832985],[-77.508255,62.56166267],[-74.57164001,62.10305214],[-74.75967407,62.20638466],[-73.67878723,62.47999001],[-72.00996399,61.67527199],[-72.30323792,61.56721687],[-71.57501221,61.60860634],[-71.88751221,61.42804909],[-71.38990784,61.13777351],[-70.14611816,61.0847187],[-69.92749023,60.80777168],[-69.5196991,61.07332802],[-69.37184143,60.80443764],[-69.82611084,60.52555275],[-69.62467957,60.06749916],[-70.94577026,60.06305122],[-69.60049438,59.8330555],[-69.758255,59.32027626],[-69.2346344,59.233881],[-69.5304718,59.18221474],[-69.54747009,58.80804634],[-69.86912537,59.05304909],[-69.81576538,58.82388496],[-70.15351868,58.77749062],[-69.81880188,58.58860207],[-69.2791748,58.88804817],[-68.36051941,58.78193855],[-68.34407043,58.12748909],[-69.36898804,57.76525307],[-68.4041748,58.03972054],[-68.00325012,58.57638741],[-67.89382935,58.49666023],[-67.85746765,58.32027626],[-68.12826538,58.07361031],[-67.8013916,58.29666328],[-67.81326294,58.41610146],[-67.72386169,58.4588871],[-67.71383667,57.92305183],[-66.38861084,58.8505497],[-65.9357605,58.60972023],[-66.05879211,58.32027626],[-65.87989807,58.62721443],[-66.10388184,58.77360725],[-65.78941345,58.86194038],[-65.98857117,58.90360451],[-65.31750488,59.04138374],[-65.7179718,59.15304756],[-65.35713196,59.27721596],[-65.56129456,59.48610878],[-64.98323059,59.37638283],[-65.52775574,59.71693611],[-64.98388672,59.76277351],[-65.23191833,59.88582802],[-64.85441589,60.36110878],[-64.46691895,60.27860451],[-64.82740784,59.98638344],[-64.16691589,60.0249958],[-64.2666626,59.77916145],[-64.05770874,59.62526894],[-64.11694336,59.51749611],[-63.72245026,59.51388741],[-64.06217957,59.38249397],[-63.35637665,59.20499611],[-64.04388428,59.01527596],[-63.13414001,59.05832863],[-63.3249588,58.85582924],[-62.84745026,58.69054604],[-63.58939362,58.30082893],[-62.55748749,58.48249245],[-62.82801056,58.25222206],[-62.58444214,58.2144413],[-63.34080505,57.97999001],[-62.4527359,58.17527199],[-62.3069458,58.03110695],[-62.67274475,57.92999458],[-62.12744904,57.96805],[-62.0597229,57.89777565],[-62.13800812,57.83582497],[-62.12527466,57.80694008],[-61.88441467,57.62693977],[-62.54523468,57.50110817],[-61.3583374,57.0874958],[-61.90635681,56.79527473],[-61.67247009,56.6199894],[-62.57387543,56.79277229],[-61.65831757,56.53750038],[-62.143013,56.44915962],[-61.66136932,56.27027321],[-62.01164246,56.23582649],[-61.35082245,56.22221565],[-61.45219421,56.05694008],[-61.23747253,56.04277229],[-61.50358582,56.00694466],[-61.1177597,55.96610451],[-61.07665253,55.90693855],[-61.20165253,55.88416481],[-61.10441589,55.84554482],[-60.72969055,55.82943916],[-60.87940979,55.73276711],[-60.60191345,55.81471443],[-60.6680603,55.58943367],[-60.32888794,55.78166389],[-60.47833252,55.34749031],[-60.19550323,55.43138313],[-60.68331146,54.99499702],[-59.7791214,55.32972145],[-59.96356964,55.11027718],[-59.42774963,55.13582802],[-59.938591,54.74638557],[-59.16136932,55.23694038],[-59.38861084,54.97665596],[-59.0235672,55.15665627],[-58.9041214,54.84471321],[-57.34745026,54.57943916],[-59.57556152,54.04944038],[-58.37189484,54.22804451],[-60.13387299,53.52832985],[-60.85691833,53.79277229],[-60.10359955,53.50055122],[-60.41833496,53.2694416],[-57.78636169,54.07166481],[-58.41833496,54.13971901],[-58.17774963,54.23694038],[-57.38414001,54.15054512],[-57.07637787,53.82305336],[-57.54998016,53.59193611],[-57.33694458,53.44027138],[-56.46469116,53.78227425],[-56.68025208,53.67276955],[-55.8080368,53.34054756],[-56.16691589,53.02943611],[-55.75750732,52.61444283],[-56.49684143,52.59414864],[-55.6485672,52.43971443],[-56.19691467,52.43998909],[-55.70165253,52.08221626],[-56.94969177,51.42471504],[-58.62805176,51.27555275],[-60.00500488,50.24888039],[-66.46972656,50.26194191],[-67.375,49.32721901],[-69.0607605,48.76749611],[-71.29910278,46.74221992],[-68.21112061,48.63665962],[-66.30607605,49.18693733],[-64.99694824,49.22027016],[-64.22157288,48.8983326],[-64.54888916,48.87832832],[-64.24629211,48.48804665],[-65.30574036,48.00555611],[-65.9041748,48.20582771],[-66.84243774,47.99221992],[-66.3565979,48.07332802],[-65.63467407,47.62082863],[-64.7971344,47.80638313],[-65.36999512,47.08665657],[-64.79855347,47.07999611],[-64.50411987,46.24027443],[-62.46194458,45.61249733],[-61.91745758,45.88555336],[-61.25995636,45.5102787],[-61.4638443,45.34694099],[-60.96472168,45.31305122],[-63.65831757,44.71499825],[-63.63109589,44.43582344],[-64.20077515,44.57638741],[-65.48138428,43.4644413],[-66.16691589,43.85860634],[-65.84439087,44.5783329],[-66.19110107,44.42332649],[-64.48910522,45.33526802],[-64.15635681,44.9783268],[-63.36078644,45.36082649],[-64.93717957,45.32694435],[-64.27546692,45.79999733],[-64.74749756,46.09054756],[-64.77830505,45.60721779],[-65.90351868,45.20555305],[-66.00250244,45.4616642],[-66.4276886,45.08499336],[-67.20654297,45.18303871],[-67.79910278,45.70110512],[-67.79496765,47.06999397],[-69.23246765,47.47137642],[-70.87860107,45.23860359],[-74.99073792,44.9866581],[-76.80194092,43.63360786],[-78.72462463,43.62943459],[-79.18466187,43.46554756],[-78.98693848,42.81999397],[-82.69665527,41.68387794],[-83.16854858,42.04610634],[-82.52133179,42.61888313],[-82.13021851,43.58526802],[-82.54299927,45.35582924],[-83.59777832,45.82721901],[-83.57740784,46.10527229],[-83.95883179,46.07166481],[-84.126297,46.53193855],[-84.56500244,46.4663868],[-84.85691833,46.90221596],[-88.36802673,48.31221199],[-89.3565979,47.97971535],[-90.86857605,48.23749733],[-91.41833496,48.04110909],[-92.95306396,48.62332344],[-94.60583496,48.72443581],[-95.07806396,49.35916328],[-95.1541748,48.99943733],[-122.76020813,48.99943733],[-123.0342865,48.99943733],[-123.09375,48.99943733],[-123.24878693,49.27360725],[-122.8527832,49.43610573],[-123.23638916,49.33888435],[-123.159729,49.69915962],[-123.49249268,49.50972176],[-123.53549194,49.38138008],[-124.06803894,49.63388252],[-123.53351593,49.68971443],[-123.93499756,49.76832771],[-123.82129669,50.15221596],[-123.9263916,49.82583046],[-124.41352844,49.76361275],[-124.82969666,50.06193733],[-124.70327759,49.99554634],[-124.60137177,50.23888588],[-124.71492004,50.32749367],[-124.34777832,50.50249672],[-125.07827759,50.32249641],[-124.80574036,50.92083168],[-125.11943817,50.43277168],[-125.54808044,50.49205208],[-125.44360352,50.71415901],[-125.70578003,50.42777443],[-126.27471924,50.63166237],[-125.62249756,50.75000191],[-125.63379669,51.09694099],[-125.73104858,50.73555183],[-126.13095856,50.67865944],[-126.19882202,50.85582924],[-126.55966187,50.84388161],[-126.1776886,50.95138741],[-127.53833008,51.00555611],[-126.66243744,51.19499397],[-127.78996277,51.16554451],[-127.13305664,51.3255558],[-127.778862,51.32471657],[-127.48802185,51.61944008],[-126.61998749,51.67999458],[-127.43215942,51.66832924],[-127.35105133,51.86361122],[-127.70632935,51.45638466],[-127.87805176,51.67388344],[-127.17160034,52.31249428],[-126.66941833,51.98360634],[-126.94076538,52.30388069],[-126.73246765,52.37388039],[-127.18628693,52.38082314],[-127.01774788,52.84554482],[-127.61824036,52.29194069],[-128.01239014,52.34110451],[-127.87969208,52.57972145],[-128.39370728,52.29138374],[-128.22192383,52.4652729],[-128.13153076,52.87638283],[-128.440979,52.82277107],[-128.53961182,53.13193703],[-128.85888672,53.28360939],[-128.88789368,53.42496681],[-128.97277832,53.55304909],[-127.8677063,53.23971748],[-128.81292725,53.61915779],[-128.47125244,53.83249855],[-128.60037231,54.03166389],[-129.23236084,53.62582588],[-129.27261353,53.37915993],[-130.05029297,53.88694191],[-130.04660034,54.15332222],[-129.46994019,54.23721504],[-130.48104858,54.36471748],[-130.41659737,54.63027382],[-129.95904732,54.31610298],[-130.37414551,54.65499306],[-129.91027832,54.60555458],[-130.17376709,54.84665871],[-129.62237549,54.99777412],[-129.99630737,55.0241642],[-129.47146606,55.46721077],[-129.78677368,55.56666756],[-129.81750488,55.28333473],[-130.11343384,54.99638557],[-129.94381714,55.28221321],[-130.12869263,55.72221565],[-130.01495361,55.90918159],[-131.82403564,56.59694099],[-133.42987061,58.45916176],[-135.47341919,59.8019352],[-137.47799683,58.90721321],[-137.59082031,59.23860359],[-139.18878174,60.08888435],[-139.06793213,60.35222054],[-140.99542236,60.30721474],[-141.00286865,69.64236641],[-139.14306641,69.51082039],[-138.60498047,69.24748421],[-135.4067688,68.67997932],[-135.14633179,68.6638813],[-135.506073,68.83249092],[-135.33798218,68.83499336],[-135.62347412,68.88611031],[-135.2414856,68.92692757],[-135.18682861,68.90027046],[-134.97735596,68.87831306],[-134.84536743,68.92943001],[-134.49542236,68.75221443]],[[-89.00553894,65.38554573],[-89.03189087,65.40721321],[-89.09996033,65.40582466],[-89.00553894,65.38554573]],[[-93.5196991,63.83943367],[-92.50750732,63.81638527],[-93.77972412,64.18969917],[-93.5196991,63.83943367]],[[-70.78297424,48.38054848],[-69.82827759,48.16638374],[-71.04855347,48.44526863],[-70.78297424,48.38054848]],[[-71.11105347,46.8505497],[-70.9041748,46.91360664],[-70.80912781,47.01527596],[-71.11105347,46.8505497]],[[-77.67823792,58.23555183],[-77.80749512,58.30526924],[-77.95077515,58.32416725],[-77.67823792,58.23555183]],[[-91.32914734,63.55971718],[-91.54049683,63.60666084],[-91.43629456,63.5519352],[-91.32914734,63.55971718]],[[-84.80804443,68.76388741],[-84.85583496,68.81080818],[-84.93913269,68.79359627],[-84.80804443,68.76388741]],[[-108.1388092,71.98166084],[-108.19969177,72.05053902],[-108.06413269,72.03027534],[-108.1388092,71.98166084]],[[-85.847229,72.29414558],[-85.8891449,72.21805],[-86.10997009,72.28970528],[-85.847229,72.29414558]],[[-78.73497009,72.36554146],[-78.95022583,72.33499336],[-79.07501221,72.40971565],[-78.73497009,72.36554146]],[[-79.50805664,72.3486042],[-79.68325806,72.4305439],[-79.42965698,72.41165352],[-79.50805664,72.3486042]],[[-79.99357605,72.41331673],[-80.13327026,72.5194416],[-79.91636658,72.45804024],[-79.99357605,72.41331673]],[[-110.46907043,72.56915474],[-110.5440979,72.56915474],[-110.59385681,72.59414864],[-110.46907043,72.56915474]],[[-110.35572052,72.60193062],[-110.49465942,72.61914253],[-110.34494019,72.61192513],[-110.35572052,72.60193062]],[[-108.51055908,72.60276985],[-108.61355591,72.63665962],[-108.49662781,72.64137459],[-108.51055908,72.60276985]],[[-110.30715942,72.63081551],[-110.41082764,72.63943672],[-110.2808075,72.64221382],[-110.30715942,72.63081551]],[[-95.73497009,72.79887581],[-95.8540802,72.85359383],[-95.76916504,72.87803841],[-95.73497009,72.79887581]],[[-96.75411987,72.72137642],[-97.01109314,72.77581978],[-96.71330261,72.89332771],[-96.75411987,72.72137642]],[[-95.75695801,72.89248848],[-95.78657532,73.01249886],[-95.70240784,72.93359566],[-95.75695801,72.89248848]],[[-96.8082428,72.92637825],[-97.14111328,73.08554268],[-96.57501221,73.07499886],[-96.8082428,72.92637825]],[[-95.73388672,73.12886238],[-95.74554443,73.04942513],[-95.89328003,73.0958271],[-95.73388672,73.12886238]],[[-96.9058075,73.2208271],[-97.1177063,73.24914742],[-96.96777344,73.27331734],[-96.9058075,73.2208271]],[[-113.99749756,72.79942513],[-114.60462952,72.60165596],[-113.65744019,72.61137581],[-113.02796936,73.00943184],[-111.21994019,72.71832466],[-111.9054718,72.34971809],[-111.66387177,72.27638435],[-110.7013092,72.57554817],[-109.78276825,72.42943001],[-110.29104614,72.67109871],[-109.77024841,72.72221565],[-110.75663757,72.97137642],[-109.65940857,72.9249897],[-109.75466919,72.87858772],[-109.2277832,72.76165962],[-109.04322052,72.56749153],[-108.62129211,72.5499897],[-108.2427063,71.71859932],[-107.8288269,71.60443306],[-107.25250244,71.89554024],[-107.778862,72.13665962],[-108.29191589,73.15359688],[-106.76130676,73.29304695],[-105.32611084,72.74637032],[-104.35517883,71.57443428],[-104.58580017,71.06666756],[-103.55628967,70.60081673],[-100.99965668,70.17276192],[-100.86998749,69.78831673],[-103.47692108,69.69359016],[-103.02330017,69.49386787],[-103.19490051,69.11442757],[-102.31304932,69.49832344],[-101.75466919,69.17581367],[-102.8946991,68.7999897],[-105.1446991,68.89915657],[-104.91494751,69.07054329],[-106.40602112,69.1805439],[-106.60212708,69.49887276],[-107.34211159,69.01887703],[-109.10462952,68.71054268],[-113.26937103,68.45387459],[-113.03385925,68.49498177],[-113.67694092,68.8110981],[-113.52111816,69.17859077],[-116.52580261,69.40748787],[-117.43608093,69.9930439],[-115.16745758,70.2777729],[-112.56468201,70.19832039],[-111.4871521,70.33693123],[-113.93827057,70.7152729],[-117.55934143,70.59721565],[-118.41941833,70.99193001],[-115.05748749,71.52304268],[-118.1121521,71.3735981],[-118.30934143,71.46582222],[-117.69631958,71.66609383],[-119.13434601,71.76527596],[-118.10801888,72.23776436],[-118.53691101,72.49386787],[-117.35354614,72.91638374],[-114.56163025,73.37553596],[-113.96166992,73.15304756],[-113.99749756,72.79942513]],[[-107.89546204,73.54136848],[-108.08329773,73.59721565],[-107.58242035,73.59776497],[-107.89546204,73.54136848]],[[-95.66963196,73.60498238],[-95.71166992,73.61219978],[-95.6554718,73.61665535],[-95.66963196,73.60498238]],[[-124.30748749,73.55636787],[-124.35855103,73.63026619],[-124.1138916,73.56414986],[-124.30748749,73.55636787]],[[-124.58470154,73.67915535],[-124.73355103,73.70054817],[-124.56434631,73.68719673],[-124.58470154,73.67915535]],[[-105.08938599,73.73526192],[-104.48300171,73.53442574],[-105.27546692,72.84553719],[-107.03549194,73.48082161],[-105.08938599,73.73526192]],[[-80.14219666,73.69664192],[-77.42443848,73.55470467],[-76.05934143,72.90081978],[-79.42910767,72.73581123],[-80.87609863,73.32777596],[-80.85768127,73.74193001],[-80.14219666,73.69664192]],[[-73.35467529,68.32921791],[-73.21166992,68.37692451],[-73.31803894,68.39305305],[-73.35467529,68.32921791],[-73.85157776,68.34221077],[-73.76130676,68.68637276],[-74.09407043,68.71998787],[-73.9901886,68.49275398],[-74.91767883,68.80137825],[-74.820755,69.08221626],[-76.66082764,68.69941902],[-76.62554932,69.01832771],[-75.5916748,69.22165108],[-76.64111328,69.55415535],[-76.18771362,69.66526985],[-77.20056152,69.64610481],[-76.79388428,69.71859932],[-77.31054688,69.83581734],[-76.98049927,69.93803596],[-77.626297,69.74498177],[-77.67823792,70.18776131],[-78.40167236,70.2124958],[-79.07055664,70.46971321],[-78.71885681,70.54776192],[-79.00935364,70.67970467],[-79.58883667,70.39943123],[-78.92160034,70.30081367],[-78.79191589,69.89109993],[-81.76327515,70.12303352],[-80.95240784,69.71388435],[-82.1010437,70.10803413],[-83.00695801,70.30470467],[-81.71080017,69.93414497],[-82.14328003,69.78137398],[-83.06663513,70.01082039],[-85.66636658,70.10470772],[-85.87805176,70.07693672],[-85.23605347,69.98915291],[-85.82327271,70.00027657],[-86.55194092,70.23498726],[-86.37467957,70.52527046],[-87.92301941,70.24275398],[-89.54963684,71.08859444],[-87.00270081,70.99414253],[-89.82991028,71.32887459],[-90.04855347,71.95387459],[-89.57469177,72.16360664],[-89.95666504,72.32165718],[-89.22833252,73.12581062],[-88.40907288,73.52360725],[-85.06945801,73.80192757],[-84.8377533,73.74165535],[-86.73268127,72.71609688],[-86.24073792,72.42025948],[-86.42051888,72.01277351],[-84.83383179,71.27415657],[-86.82000732,70.98858833],[-84.96166992,71.18858528],[-85.14686584,71.08276558],[-84.79888916,70.92164803],[-84.625,71.66581917],[-86.05073547,72.01111031],[-85.4871521,72.26027107],[-84.16462708,72.02110481],[-84.93521118,72.28943062],[-84.44218445,72.38304329],[-85.53527832,72.46971321],[-85.68804932,72.89360237],[-83.95306396,72.75248909],[-85.44773865,73.12025642],[-83.63435364,72.98248482],[-85.18859863,73.22886848],[-81.55378723,73.71721077],[-80.24749756,72.73054695],[-81.37934875,72.24165535],[-80.51631165,72.50387764],[-80.9054718,72.1805439],[-80.56716919,72.07277107],[-81.08023071,72.05165291],[-80.79267883,72.0277729],[-80.97157288,71.88165474],[-80.38500977,72.04832649],[-80.48660278,72.18942451],[-80.26077271,72.29498482],[-79.67443848,72.12664986],[-80.16636658,72.32222176],[-79.79910278,72.50139046],[-79.75,72.21554756],[-79.01272583,72.27388191],[-79.20306396,71.96193123],[-78.50358582,71.86886787],[-78.85441589,72.17303658],[-77.78549194,71.78749275],[-78.8707428,72.22665596],[-76.9957428,72.12886238],[-78.55912781,72.43803596],[-77.6138916,72.75166512],[-75.19239807,72.49193001],[-74.94740295,72.24971199],[-76.34799194,71.89166451],[-75.21939087,72.07443428],[-76.08525085,71.69192696],[-75.03582764,72.12581062],[-74.12216187,71.98359871],[-75.38990784,71.68109322],[-74.6318512,71.66249275],[-75.15188599,71.47165108],[-74.69937134,71.39082527],[-75.08132935,71.17943001],[-73.74804688,71.77693367],[-74.24073792,71.20082283],[-73.62184143,71.58333015],[-73.38021851,71.38527107],[-73.89828491,71.05748177],[-73.04943848,71.26832771],[-73.37739563,70.98054695],[-72.53799438,71.66081429],[-71.11965942,71.26416206],[-72.65351868,70.82777596],[-72.16352844,70.83638191],[-72.56945801,70.60998726],[-70.60157776,71.05386543],[-70.74694824,70.74553108],[-71.80302429,70.42831612],[-71.16244507,70.52527046],[-71.53582764,70.01971626],[-70.99716187,70.62581062],[-69.90472412,70.88136482],[-70.49607849,70.47943306],[-69.4513092,70.79193306],[-68.313797,70.56303596],[-70.46852112,69.84276009],[-68.64241028,70.14943123],[-69.99052429,69.61499214],[-67.79463196,70.25888252],[-67.12771606,69.72693062],[-67.99607849,69.77443123],[-68.32936096,69.62776375],[-70.0308075,69.5361042],[-66.79551888,69.34109688],[-66.7585907,69.12803841],[-69.01501465,69.35498238],[-69.25772095,69.27026558],[-68.07740784,69.21748543],[-68.96777344,69.22110176],[-68.50250244,69.19859505],[-69.02580261,68.96859932],[-68.17823792,69.14665413],[-67.70578003,69.01638985],[-68.55607605,68.96415901],[-67.77133179,68.78137398],[-69.39796448,68.86219978],[-67.61247253,68.37942696],[-66.7068634,68.44470406],[-67.87826538,68.26527596],[-67.23246765,68.35748482],[-67.01164246,68.31608772],[-67.59831238,68.16276741],[-67.01130676,68.29498482],[-66.76577759,68.23858833],[-66.94665527,68.01361275],[-66.6943512,68.14305305],[-66.69718933,67.9874897],[-66.54191589,68.1483326],[-66.18412781,68.01887703],[-66.73213196,67.86720467],[-66.3565979,67.82138252],[-65.91191101,68.15887642],[-66.0085907,67.62553596],[-65.80770874,67.97110176],[-65.44360352,67.99220467],[-65.61573792,67.7861042],[-65.34635925,67.59332466],[-65.42355347,67.89804268],[-64.723526,67.99054146],[-65.20414734,67.6483326],[-64.50695801,67.80720711],[-64.0385437,67.52859688],[-64.44055176,67.47499275],[-63.9041214,67.30581856],[-64.79747009,67.35664558],[-63.96276093,67.27249336],[-64.69184875,67.00055122],[-63.45050812,67.22249031],[-63.77248383,66.95887947],[-63.11023712,67.32998848],[-63.24079132,66.96165657],[-63.77133942,66.8110981],[-62.84690094,66.96193123],[-62.89971161,66.63665962],[-62.10136414,67.05470467],[-61.2624588,66.62942696],[-62.12385559,66.6263752],[-61.46248627,66.36914253],[-61.87744904,66.2833271],[-62.89497375,66.32971382],[-61.95442963,66.01915169],[-62.97055054,66.14804268],[-62.31717682,65.80803108],[-63.72359467,65.68026924],[-63.31995392,65.59332466],[-63.65554047,65.4708271],[-63.33552551,65.30053902],[-63.54692078,64.88720894],[-64.38076782,65.18109322],[-64.2371521,65.42997932],[-64.55552673,65.09221077],[-64.91212463,65.33804512],[-64.41833496,65.48275948],[-65.14993286,65.43414497],[-64.70991516,65.65220833],[-65.33851624,65.57554817],[-64.79496765,65.72804451],[-65.50553894,65.74331856],[-64.35638428,66.34971809],[-65.91604614,65.95109749],[-65.473526,66.38582039],[-66.07359314,66.12053108],[-67.04888916,66.64471626],[-67.7427063,66.56833076],[-67.14862061,66.44386482],[-67.28222656,66.27527046],[-67.9927063,66.50694466],[-67.1943512,65.90971565],[-67.82414246,65.88081551],[-67.93859863,65.90803719],[-68.0304718,65.99803352],[-68.02580261,66.06581306],[-68.24465942,66.18275642],[-68.85136414,66.18997383],[-68.41462708,66.15942574],[-68.23768616,66.06999397],[-68.24694824,66.11276436],[-68.15744019,66.11747932],[-68.0471344,66.06498909],[-68.05357361,65.99109077],[-68.12379456,65.96304512],[-68.30444336,66.02804756],[-68.33361816,65.93193245],[-67.8210907,65.76805305],[-68.02580261,65.48109627],[-67.2804718,65.64248848],[-67.45883179,65.49803352],[-67.0582428,65.42665291],[-67.41604614,65.33915901],[-66.92878723,65.22970772],[-67.09602356,65.05609322],[-66.7260437,65.18026924],[-66.69795227,64.76193428],[-66.68865967,65.03877449],[-66.21221924,64.68553352],[-65.71777344,64.8402729],[-65.72157288,64.49414253],[-65.07164001,64.44081306],[-65.65830994,64.3027668],[-65.04943848,64.07222176],[-65.21417236,64.02554512],[-64.661026,64.02859688],[-64.98747253,63.82305336],[-64.52241516,63.67276955],[-64.53102112,63.24971962],[-65.30378723,63.80694008],[-64.62718201,62.90416145],[-65.25466919,62.98526955],[-64.94882202,62.64860725],[-65.1875,62.56221199],[-65.83830261,63.03333473],[-66.4443512,63.02054787],[-66.64274788,63.37249184],[-66.54660034,62.99138069],[-67.91462708,63.75943947],[-67.68521118,63.36888313],[-68.54267883,63.73249245],[-68.99694824,63.75361061],[-68.14611816,63.15027046],[-67.59996033,63.08443642],[-67.7696991,62.95833015],[-67.55302429,63.04860878],[-67.67268372,62.92332649],[-67.39796448,62.96721077],[-66.35157776,62.44499397],[-66.46994019,62.33221626],[-65.99302673,62.24415779],[-66.13240051,62.08943367],[-65.94665527,61.8991642],[-66.06610107,61.86860085],[-71.15657043,62.98916054],[-70.90885925,63.17083168],[-71.40046692,63.05166054],[-72.14546204,63.44610023],[-71.22962952,63.60471535],[-71.57685852,63.58166695],[-71.58111572,63.71499825],[-71.90438843,63.80999184],[-71.93379211,63.64943886],[-72.32414246,63.67666054],[-72.2388916,63.95249367],[-72.52633667,63.78777504],[-72.66462708,64.08055305],[-72.71994019,63.96110725],[-72.91157532,64.16887093],[-73.3805542,64.26860237],[-73.3026886,64.65887642],[-73.46330261,64.50248909],[-73.46722412,64.61276436],[-73.92944336,64.60220528],[-73.84472656,64.50193977],[-74.06271362,64.33442879],[-74.05378723,64.72859383],[-74.39022827,64.56971931],[-74.63990784,64.90359688],[-74.98518372,64.79582405],[-74.46994019,64.55748177],[-74.6857605,64.37109566],[-75.82414246,64.61165047],[-75.72691345,64.36720467],[-76.67051888,64.18414497],[-78.18325806,64.57249641],[-78.14524841,64.95749092],[-77.31576538,65.19053841],[-77.42160034,65.46138191],[-75.76916504,65.21887398],[-75.42443848,65.04387093],[-75.66746521,64.94081306],[-75.37304688,64.71499825],[-75.56750488,64.88360786],[-75.18684387,65.10165596],[-75.95022583,65.31833076],[-73.50053406,65.47442818],[-74.46601868,66.15193367],[-72.258255,67.24803352],[-73.35467529,68.32921791]],[[-99.80445099,73.88910103],[-99.23497009,73.73776436],[-97.76185608,73.91192818],[-96.96221924,73.73858833],[-97.66833496,73.48332405],[-97.17193604,73.35276985],[-98.45056152,72.87498665],[-97.84689331,73.04860115],[-97.22494507,72.93997383],[-97.19665527,72.60443306],[-96.51741028,72.71470833],[-96.29833984,72.41581917],[-96.87184143,72.32110786],[-96.48300171,72.11303902],[-96.86694336,72.04109383],[-96.49302673,71.91415596],[-97.50500488,71.61165047],[-98.2179718,71.64972115],[-98.26719666,71.90416145],[-98.49378967,71.71388435],[-98.03744507,71.52665901],[-98.72962952,71.27054024],[-100.63434601,72.18553352],[-102.74160767,72.72415352],[-102.13719177,73.08693123],[-101.29747009,72.70999336],[-100.41212463,72.74193001],[-100.45185852,73.02054024],[-100.03135681,72.93498421],[-100.57991028,73.17303658],[-99.77154732,73.20804024],[-101.62129211,73.4902668],[-100.43052673,73.40693855],[-101.11998749,73.72720528],[-99.80445099,73.88910103]],[[-124.43052673,73.87858772],[-124.5526886,73.91693306],[-124.42018127,73.90915108],[-124.43052673,73.87858772]],[[-89.9888916,73.98831367],[-90.28494263,74.02971077],[-89.90188599,74.03776741],[-89.9888916,73.98831367]],[[-98.91854858,73.80609322],[-99.4375,73.89694405],[-97.63772583,74.07554817],[-98.91854858,73.80609322]],[[-92.63806152,74.10304451],[-90.1943512,73.89972115],[-92.09580994,72.7430439],[-94.31555176,72.76304817],[-93.46330261,72.46220589],[-94.06304932,71.97831917],[-95.21330261,71.99443245],[-94.75216675,72.15332222],[-95.17105103,72.13916206],[-95.13327026,72.46026802],[-95.67355347,72.8138752],[-95.68325806,73.07582283],[-95.57501221,73.16499519],[-95.68379211,73.45027351],[-95.70022583,73.55386543],[-95.61253357,73.61097908],[-95.67301941,73.72331429],[-94.61802673,73.65138435],[-95.32772827,73.90915108],[-94.73213196,74.09526253],[-92.63806152,74.10304451]],[[-98.65722656,74.29942513],[-98.86465454,74.30470467],[-98.51109314,74.31833076],[-98.65722656,74.29942513]],[[-120.14994049,74.27249336],[-119.60910034,74.23332405],[-119.74481201,74.0255146],[-119.14862061,74.21220589],[-119.16745758,73.98719978],[-117.42212677,74.22693062],[-115.31500244,73.47970772],[-119.13751221,72.63247871],[-119.31108093,72.35220528],[-120.251091,72.25860786],[-120.54322052,71.51666451],[-122.78102112,71.08610725],[-125.25358582,71.95025826],[-124.94827271,71.96110725],[-125.99771118,71.9736042],[-125.02601624,72.82109261],[-124.47583008,72.92720222],[-124.86878967,73.08055305],[-123.77471924,73.76443672],[-124.77078247,74.3402729],[-121.56413269,74.55108833],[-120.14994049,74.27249336]],[[-97.65275574,74.45582771],[-97.79246521,74.48581123],[-97.25695801,74.59054756],[-97.65275574,74.45582771]],[[-95.31108093,74.49775887],[-95.86639404,74.57415962],[-95.51741028,74.63026619],[-95.31108093,74.49775887]],[[-97.17573547,75.24414253],[-97.2752533,75.34749031],[-97.15296936,75.31526375],[-97.17573547,75.24414253]],[[-103.91745758,75.05497932],[-104.85713196,75.16470528],[-104.18215942,75.43553352],[-103.58306885,75.16470528],[-103.91745758,75.05497932]],[[-95.90994263,75.56025887],[-96.8510437,75.35026741],[-97.05302429,75.49220467],[-95.90994263,75.56025887]],[[-94.3638916,75.59082222],[-93.48747253,75.25665474],[-93.46777344,74.70305061],[-96.61694336,74.99109077],[-95.74966431,75.51332283],[-94.3638916,75.59082222]],[[-100.17212677,75.6013813],[-100.45414734,75.54637337],[-101.03942108,75.56721687],[-100.17212677,75.6013813]],[[-96.95436096,75.59553719],[-97.00500488,75.60443306],[-96.71580505,75.65999031],[-96.95436096,75.59553719]],[[-96.57914734,75.73692513],[-96.71722412,75.73970222],[-96.45578003,75.81776619],[-96.57914734,75.73692513]],[[-111.79998779,75.83915901],[-111.92247009,75.85276985],[-111.57861328,75.87997627],[-111.79998779,75.83915901]],[[-122.34079742,75.86276436],[-122.69544983,75.90803719],[-122.35299683,75.91443062],[-122.34079742,75.86276436]],[[-121.0929718,75.72609138],[-121.28833008,75.75277901],[-120.87771606,75.9360981],[-121.0929718,75.72609138]],[[-103.13772583,75.74275398],[-103.38273621,75.76555061],[-101.98323059,75.94581795],[-103.13772583,75.74275398]],[[-95.79267883,75.89972115],[-95.89993286,75.95387459],[-95.73573303,75.96832466],[-95.79267883,75.89972115]],[[-94.4054718,75.75082588],[-94.90438843,75.93692207],[-94.48191833,75.97442818],[-94.4054718,75.75082588]],[[-122.81913757,76.06053352],[-122.63076782,76.04664803],[-122.89241028,76.01361275],[-122.81913757,76.06053352]],[[-118.31629944,75.57249641],[-119.4079895,75.60582161],[-117.46383667,76.0830555],[-118.31629944,75.57249641]],[[-102.38990784,76.08360481],[-102.31945801,76.02470589],[-103.97158051,75.93831062],[-102.38990784,76.08360481]],[[-78.9263916,75.87581062],[-79.75216675,75.87858772],[-78.80574036,76.09305],[-79.1763916,75.95277596],[-78.9263916,75.87581062]],[[-94.84352112,76.12220955],[-95.00663757,76.04748726],[-95.14720154,76.11693001],[-94.84352112,76.12220955]],[[-81.32772827,76.1472187],[-81.4624176,76.15887642],[-81.2013092,76.1777668],[-81.32772827,76.1472187]],[[-102.5308075,76.22331429],[-103.34211159,76.03665352],[-104.48268127,76.14221382],[-102.5308075,76.22331429]],[[-89.39883423,76.43553352],[-89.62554932,76.44497871],[-89.53297424,76.47665596],[-89.39883423,76.43553352]],[[-83.9627533,76.42637825],[-84.13935852,76.50721931],[-83.9079895,76.46499825],[-83.9627533,76.42637825]],[[-104.05378723,76.56303596],[-103.00444794,76.42997932],[-104.33491516,76.31860542],[-104.66583252,76.55165291],[-104.05378723,76.56303596]],[[-98.41799927,76.66832161],[-97.50914001,76.1888752],[-97.93859863,75.74136543],[-97.38664246,75.68275642],[-97.2808075,75.39694405],[-97.74412537,75.57110786],[-98.1652832,75.33415413],[-97.58241272,75.13749886],[-100.14578247,74.99109077],[-100.54692078,75.19941902],[-99.98768616,75.23610115],[-100.778862,75.35054207],[-98.95022583,75.70999336],[-102.88379669,75.61914253],[-101.18215942,75.77971077],[-101.90722656,76.07859993],[-101.38772583,76.25193977],[-102.16583252,76.23831367],[-101.88577271,76.44497871],[-99.88827515,75.88638496],[-99.43934631,75.97053719],[-100.15275574,76.13247871],[-99.41441345,76.1583271],[-100.98246765,76.50499153],[-99.68434143,76.63333321],[-99.07969666,76.3972187],[-98.41799927,76.66832161]],[[-99.99694824,76.73442268],[-99.43052673,76.69941902],[-100.12860107,76.72192574],[-99.99694824,76.73442268]],[[-101.38043976,76.55359077],[-101.68827057,76.58638191],[-100.24878693,76.7347126],[-101.38043976,76.55359077]],[[-120.8835907,76.73970222],[-120.96994019,76.71666145],[-121.18466187,76.73109627],[-120.8835907,76.73970222]],[[-89.93434143,76.47665596],[-90.59996033,76.74664497],[-89.67388916,76.7374897],[-89.93434143,76.47665596]],[[-108.65101624,76.81360054],[-108.55792999,76.40860176],[-108.07740784,76.28055],[-108.39611816,76.04609871],[-107.63240051,75.99109077],[-108.02024841,75.78082466],[-106.89654732,75.72026253],[-106.33666992,76.05470467],[-105.39186096,75.63888741],[-106.01109314,75.05081367],[-108.83242035,75.06999397],[-112.7530365,74.40138435],[-114.44773865,74.67469978],[-110.91278076,75.23387337],[-113.91745758,75.05359077],[-113.34046936,75.41331673],[-114.06500244,75.46609688],[-115.05073547,74.96110725],[-117.68379211,75.25305367],[-114.99965668,75.69081306],[-117.251091,75.59749031],[-114.81739044,75.88081551],[-116.73410034,75.92248726],[-116.29605103,76.18858528],[-114.66243744,76.16053963],[-115.92497253,76.28665352],[-114.89971161,76.51693916],[-112.4538269,76.17637825],[-111.7277832,75.92164803],[-112.22548676,75.8110981],[-111.45185852,75.83665657],[-111.24716187,75.51805305],[-108.89939117,75.4763813],[-108.82685852,75.68664742],[-110.05552673,75.89055061],[-109.313591,76.10914803],[-110.39306641,76.39193916],[-108.65101624,76.81360054]],[[-97.04518127,76.79776192],[-97.20077515,76.85748482],[-96.99716187,76.81331062],[-97.04518127,76.79776192]],[[-113.46601868,76.76638985],[-114.87577057,76.77083015],[-113.88555908,76.89166451],[-113.46601868,76.76638985]],[[-109.06610107,76.90054512],[-109.30770874,76.92804146],[-109.17944336,76.93248177],[-109.06610107,76.90054512]],[[-97.25630188,76.96748543],[-97.47299194,76.98054695],[-97.09222412,77.01082039],[-97.25630188,76.96748543]],[[-95.659729,77.05887032],[-93.17965698,76.74109077],[-93.54833984,76.38611031],[-91.41049194,76.68914986],[-90.4679718,76.47303963],[-91.56663513,76.49887276],[-89.29246521,76.29609871],[-91.61355591,76.26220894],[-90.19055176,76.0610981],[-91.12989807,75.83915901],[-90.01501465,76.01027107],[-89.17268372,75.78055],[-89.76522827,75.57554817],[-88.95056152,75.42970467],[-88.7388916,75.67943001],[-86.54463196,75.35914803],[-83.87807465,75.818964],[-81.53691101,75.80941963],[-79.57469177,75.44999886],[-79.5710907,75.19914436],[-80.44055176,75.03804207],[-79.33361816,74.8944416],[-80.32164001,74.93776131],[-80.23158264,74.57805061],[-81.8107605,74.4569416],[-83.51130676,74.90165901],[-83.47441101,74.57971382],[-84.28549194,74.50360298],[-88.49694824,74.49775887],[-88.54768372,74.90776253],[-89.48965454,74.54553413],[-91.02471924,74.70277596],[-90.77220154,74.88499641],[-91.53996277,74.64637947],[-92.49073792,75.2136097],[-92.00500488,75.59498787],[-92.10855103,75.85887337],[-93.08361816,76.35803413],[-95.37609863,76.23442268],[-94.80073547,76.32165718],[-96.96438599,76.73332405],[-96.30552673,76.75387764],[-96.81021118,76.9791584],[-95.659729,77.05887032]],[[-113.3288269,77.07998848],[-113.49749756,77.08831978],[-113.34472656,77.12776375],[-113.3288269,77.07998848]],[[-113.77851868,77.1041584],[-113.93128967,77.12970161],[-113.65776825,77.1291523],[-113.77851868,77.1041584]],[[-104.25250244,77.07277107],[-104.43161011,77.09887886],[-104.001091,77.13582039],[-104.25250244,77.07277107]],[[-95.22441101,77.16720772],[-95.63990784,77.23776436],[-95.35604858,77.23637581],[-95.22441101,77.16720772]],[[-90.93302917,77.25444221],[-90.71362305,77.20082283],[-91.29910278,77.21776009],[-90.93302917,77.25444221]],[[-116.35105133,77.53915596],[-115.39022827,77.30636787],[-116.2804718,77.18359566],[-115.73126984,76.94970894],[-116.3651886,76.92637825],[-115.89654732,76.6916523],[-117.05378723,76.53305244],[-117.0954895,76.29525948],[-118.05999756,76.40915108],[-117.84211159,76.82388496],[-118.9679718,76.50526619],[-118.56739044,76.33665657],[-119.07576752,76.08333015],[-119.65493774,76.30304146],[-119.80499268,76.10887337],[-119.48104858,75.9708271],[-119.86998749,75.85748482],[-120.45436096,75.81581306],[-120.85713196,76.19664192],[-120.99933624,75.93969917],[-123.03778076,76.0847187],[-122.59886169,76.34832954],[-121.53296661,76.43719673],[-121.2124176,76.64972115],[-120.40167236,76.7972126],[-119.15329742,77.32582283],[-116.35105133,77.53915596]],[[-85.28527832,77.5874958],[-84.813797,77.49720955],[-85.53833008,77.53997993],[-85.28527832,77.5874958]],[[-90.60299683,77.62831306],[-89.63609314,77.33915901],[-91.20883179,77.41499519],[-90.60299683,77.62831306]],[[-105.01023102,77.40803719],[-104.36553192,77.23027229],[-105.24694824,77.19386482],[-106.09472656,77.72415352],[-105.01023102,77.40803719]],[[-95.4058075,77.76388741],[-93.10191345,77.66249275],[-93.57055664,77.43776131],[-96.3288269,77.60498238],[-95.4058075,77.76388741]],[[-77.85191345,77.77443123],[-77.95491028,77.8302784],[-77.56858826,77.84971809],[-77.85191345,77.77443123]],[[-101.7113266,77.90165901],[-100.92552185,77.73719978],[-102.52961159,77.83415413],[-101.7113266,77.90165901]],[[-114.07305908,77.98166084],[-113.57611084,77.81414986],[-115.11608315,77.95833015],[-114.07305908,77.98166084]],[[-109.58796692,78.06469917],[-110.90461159,77.84387398],[-110.09025574,77.76915169],[-110.20327759,77.51138496],[-112.03102112,77.32470894],[-113.1979599,77.52388191],[-113.31967163,77.79553413],[-109.58796692,78.06469917]],[[-103.05693817,78.11970711],[-103.28222656,78.15776253],[-102.78222656,78.23858833],[-103.05693817,78.11970711]],[[-94.36662292,78.15915108],[-94.69415283,78.25860786],[-94.48191833,78.26832771],[-94.36662292,78.15915108]],[[-88.28712463,78.24331856],[-88.409729,78.29220772],[-88.04333496,78.43664742],[-88.28712463,78.24331856]],[[-74.3069458,78.67665291],[-74.71025085,78.73109627],[-74.16352844,78.71609688],[-74.3069458,78.67665291]],[[-109.64795685,78.58804512],[-109.26055908,78.45582771],[-113.33404732,78.33276558],[-110.63751221,78.7485981],[-109.64795685,78.58804512]],[[-96.76806641,78.68414497],[-94.87771606,78.39137459],[-95.39916992,78.23109627],[-94.88685608,78.10276985],[-97.09689331,77.80331612],[-97.77546692,78.03499031],[-96.87054443,78.13333321],[-98.41136169,78.49525642],[-98.02220154,78.53637886],[-98.37162781,78.71998787],[-98.1443634,78.81666756],[-96.76806641,78.68414497]],[[-86.31945801,78.88360786],[-86.48443604,78.89276314],[-85.16712952,79.02083015],[-86.31945801,78.88360786]],[[-103.59385681,79.32582283],[-102.5607605,78.86970711],[-101.6488266,79.07582283],[-99.95240784,78.72554207],[-99.52972412,78.57805061],[-99.79388428,78.2972126],[-98.94577026,78.05581856],[-99.90689087,77.77859688],[-101.03549194,78.19609261],[-102.61857605,78.24136543],[-102.80607605,78.37776375],[-104.46743774,78.26527596],[-105.0513916,78.49443245],[-103.52362061,78.49609566],[-104.04212952,78.62997627],[-103.31629944,78.73442268],[-104.19882202,78.77026558],[-103.82164001,78.8983326],[-104.20361328,78.99165535],[-104.98823547,78.79832649],[-104.68107605,79.01666451],[-105.62860107,79.16137886],[-103.59385681,79.32582283]],[[-99.47157288,80.1097126],[-98.64416504,79.79414558],[-100.17749023,79.90999031],[-99.47157288,80.1097126]],[[-99.1554718,80.17469978],[-99.1138916,80.1638813],[-99.41799927,80.15721321],[-99.1554718,80.17469978]],[[-95.0308075,80.67025948],[-94.9704895,80.63527107],[-96.14916992,80.66470528],[-95.0308075,80.67025948]],[[-92.7277832,81.3055439],[-90.76631165,80.56553841],[-89.24499512,80.51721382],[-88.77667236,80.13136482],[-88.14546204,80.09387398],[-88.6151886,80.40387154],[-87.68379211,80.41026497],[-87.56271362,80.17915535],[-88.06555176,80.120821],[-86.95774841,79.90359688],[-87.4624176,79.53471565],[-86.33404732,79.64554024],[-86.04605103,79.56888008],[-86.070755,79.43414497],[-85.6819458,79.61331367],[-84.9041748,79.26776314],[-86.98323059,79.05664253],[-87.61573792,78.64526558],[-88.00325012,78.80720711],[-87.72462463,79.07582283],[-88.16244507,78.99054146],[-87.90830994,78.54860115],[-88.80410767,78.6097126],[-88.53549194,78.41304207],[-88.81771851,78.15443611],[-89.98049927,78.6097126],[-89.45240784,78.16249275],[-92.0582428,78.20887947],[-92.98747253,78.46554756],[-91.63522339,78.54609871],[-93.27111816,78.58415413],[-93.81358337,78.76582527],[-93.03778076,78.76582527],[-94.2885437,78.98637581],[-90.36317444,79.24681282],[-92.2388916,79.20555305],[-92.69468689,79.25721931],[-91.11999512,79.38638496],[-93.09046936,79.48221016],[-95.0874939,79.27075386],[-95.77938843,79.42581367],[-94.28277588,79.75749397],[-95.85333252,79.64610481],[-96.8026886,80.09082222],[-94.3835907,79.98248482],[-94.74879456,80.07998848],[-94.08383179,80.17553902],[-96.68161011,80.34221077],[-93.78636169,80.52554512],[-95.53407288,80.81888008],[-93.0916748,81.15999031],[-94.26861572,81.34610176],[-92.7277832,81.3055439]],[[-91.7183075,81.54915047],[-91.96046448,81.59498787],[-91.5821991,81.57805061],[-91.7183075,81.54915047]],[[-78.36573792,82.88360786],[-78.41462708,82.94192696],[-78.11694336,82.94220161],[-78.36573792,82.88360786]],[[-70.11193848,83.10942268],[-66.29943848,82.92943001],[-68.64241028,82.62858772],[-64.72962952,82.90416145],[-64.93684387,82.87137032],[-62.92606354,82.57609749],[-63.36999512,82.4388752],[-61.07637787,82.32083321],[-64.35517883,81.7263813],[-69.29138184,81.71887398],[-66.60855103,81.51277351],[-70.20991516,81.17387581],[-64.43629456,81.47943306],[-69.42749023,80.38275337],[-70.82522583,80.55859566],[-70.14546204,80.19359016],[-72.4208374,80.21110725],[-70.49749756,80.08276558],[-71.46046448,79.90138435],[-70.91027832,79.88582039],[-71.18379211,79.77748299],[-74.2388916,79.88720894],[-74.84635925,79.84721565],[-73.12576294,79.558321],[-78.0513916,79.35470772],[-74.43663025,79.05775642],[-78.8913269,79.06331062],[-77.70327759,79.00694466],[-78.24804688,78.77026558],[-76.71046448,79.02832222],[-74.71972656,78.70749092],[-76.69360352,78.50972176],[-75.0625,78.30970955],[-76.91212463,78.20109749],[-75.57556152,78.10775948],[-75.92268372,77.95665169],[-78.26077271,77.99525642],[-77.71852112,77.60582161],[-78.69055176,77.31553841],[-80.45611572,77.29609871],[-81.93019104,77.68498421],[-81.16583252,77.33720589],[-82.16604614,77.29248238],[-81.83404732,77.16249275],[-79.25500488,77.21859932],[-79.00500488,77.09694099],[-79.38685608,76.92747688],[-77.77938843,76.79136848],[-78.37739563,76.45804024],[-81.05323792,76.12803841],[-80.77154732,76.41914558],[-82.72494507,76.81915474],[-82.12718201,76.4416523],[-83.00358582,76.42915535],[-83.40080261,76.75999641],[-83.18826294,76.4194355],[-84.3107605,76.6583271],[-84.19544983,76.45637703],[-85.02830505,76.57499886],[-84.37609863,76.31776619],[-84.92823792,76.28637886],[-86.59407043,76.63499641],[-86.34222412,76.51220894],[-88.38990784,76.38971138],[-88.49465942,76.81721687],[-88.60801888,76.3999958],[-89.67944336,76.57165718],[-88.5458374,77.10026741],[-86.73999023,77.17415047],[-87.71188354,77.35998726],[-88.21472168,77.65054512],[-88.06803894,77.82026863],[-86.4221344,77.83082771],[-85.79441833,77.41971016],[-84.47941589,77.2944355],[-83.46472168,77.34832954],[-83.83546448,77.45526314],[-82.31858826,78.07083321],[-83.89828491,77.49054146],[-85.4024353,77.81999397],[-84.32501221,77.89610481],[-85.67878723,77.92943001],[-84.12771606,78.17109871],[-84.96852112,78.20248604],[-84.57556152,78.34637642],[-84.86694336,78.36914253],[-84.63861084,78.59414864],[-85.48605347,78.10247993],[-86.28833008,78.07638741],[-85.83306885,78.37997627],[-87.5385437,78.13804817],[-87.08938599,78.20193672],[-87.52471924,78.41638374],[-86.85691833,78.73498726],[-85.06413269,78.91914558],[-82.3377533,78.56666756],[-82.59439087,78.70305061],[-82.2204895,78.73221016],[-83.25466919,78.83499336],[-81.47712708,79.0472126],[-84.74804688,79.03193855],[-83.35855103,79.05081367],[-84.32685852,79.18858528],[-84.4846344,79.40637398],[-85.06880188,79.62608528],[-86.48638916,79.76361275],[-85.25500488,79.92082405],[-86.48268127,80.00860786],[-86.51469421,80.29915047],[-83.78189087,80.245821],[-81.70666504,79.58665657],[-79.90472412,79.64694405],[-81.5196991,79.73082161],[-81.66299438,79.90304756],[-81.4002533,79.93776131],[-83.2038269,80.31805611],[-78.03799438,80.56721687],[-79.96046448,80.60803413],[-76.4846344,80.86554146],[-78.93499756,80.87553596],[-76.74520874,81.43914986],[-79.50161743,81.19359016],[-79.06358337,81.08554268],[-80.91941833,80.65555],[-83.56945801,80.73915291],[-83.25695801,80.83859444],[-85.06695557,80.50526619],[-86.74499512,80.60304451],[-85.60583496,80.97581673],[-82.36444092,81.17943001],[-85.68161011,81.04942513],[-87.59472656,80.62858772],[-89.46601868,80.91415596],[-84.73388672,81.28109932],[-89.820755,81.01082039],[-90.35191345,81.16748238],[-87.24465942,81.4902668],[-90.4430542,81.36665535],[-90.8565979,81.44413948],[-89.58491516,81.62581062],[-91.95666504,81.65860176],[-88.07556152,82.10498238],[-84.60496521,81.88998604],[-86.87609863,82.20221138],[-85.04692078,82.4819355],[-79.2290802,81.81608772],[-82.73213196,82.40165901],[-81.5415802,82.49609566],[-82.21525574,82.66859627],[-80.57806396,82.54609871],[-81.47299194,82.82499886],[-78.50270081,82.68109322],[-80.43019104,82.88749886],[-79.79333496,82.95749092],[-75.89219666,82.59193611],[-76.23083496,82.44470406],[-75.39611816,82.61470222],[-77.38131714,82.99443245],[-74.4357605,83.02720833],[-72.63380432,82.6944294],[-73.65046692,82.92581367],[-70.11193848,83.10942268]],[[-92.95414734,63.87110329],[-93.09439087,63.90499306],[-92.97833252,63.9083271],[-92.95414734,63.87110329]]]}, -{code:"KH", name:"Cambodia", lng:104.564, lat:12.714, borders:[[[103.7752552,10.44249916],[103.74858284,10.47638893],[103.75581551,10.51166725],[103.79886055,10.50000191],[103.7752552,10.44249916]],[[103.31414986,10.72305489],[103.26970863,10.6697216],[103.19331551,10.75638771],[103.31414986,10.72305489]],[[107.48915291,14.44861031],[107.54749489,12.35360909],[106.42024422,11.97360802],[106.45821571,11.66586494],[105.8510685,11.65999794],[106.20331001,10.7705555],[105.10191536,10.95555305],[104.44532967,10.42273903],[104.24774361,10.56749916],[103.92691231,10.59027672],[103.62330818,10.49555397],[103.55523872,11.15694237],[103.12970161,10.88305473],[102.91609383,11.63585091],[102.37719917,13.57388878],[103.1805439,14.32972145],[105.21060371,14.34964943],[106.05664253,13.9299984],[106.00470924,14.3730526],[106.54074287,14.59872627],[106.85359383,14.3030529],[107.54660225,14.70862007],[107.48915291,14.44861031]],[[103.0327549,11.43194389],[103.04551888,11.46972084],[103.00940895,11.52499962],[103.0327549,11.43194389]],[[103.0280323,11.24638557],[103.04192543,11.37555504],[102.98636055,11.42222023],[103.0280323,11.24638557]]]}, -{code:"LK", name:"Sri Lanka", lng:80.704, lat:7.612, borders:[[[81.714996,7.681388],[81.708328,7.674166],[81.70166,7.68111],[81.712769,7.704999],[81.714996,7.681388]],[[81.806931,7.477777],[81.723312,7.73861],[81.804153,7.600554],[81.806931,7.477777]],[[79.912491,9.018055],[79.85054,9.00111],[79.693039,9.092497],[79.912491,9.018055]],[[79.716385,9.477221],[79.658035,9.499165],[79.657486,9.555832],[79.716385,9.477221]],[[79.974426,9.615274],[79.871918,9.634443],[79.854706,9.750832],[79.974426,9.615274]],[[80.274704,9.775],[80.824432,9.261944],[80.914703,8.943054],[81.231094,8.65111],[81.130539,8.5],[81.361374,8.487219],[81.391937,8.149443],[81.881653,7.288054],[81.661102,6.439999],[80.587204,5.917777],[80.046097,6.239721],[79.702484,8.079443],[80.051926,9.594442],[80.612198,9.443054],[79.925812,9.74472],[80.444138,9.571665],[80.274704,9.775]]]}, -{code:"CG", name:"Congo", lng:15.986, lat:-0.055, borders:[[[12.779047,-4.38898599],[12.026131,-5.01499415],[11.140661,-3.92527461],[11.496944,-3.50694431],[11.925833,-3.63694263],[11.574165,-2.33333112],[12.478054,-2.32721983],[12.65,-1.82249855],[13.001507,-2.36767193],[13.482777,-2.43749619],[13.76222,-2.08888734],[14.110832,-2.49305469],[14.429722,-1.89166582],[14.51861,-0.60916624],[13.848331,-0.1986108],[14.487221,0.913611],[14.188889,1.391389],[13.186785,1.222476],[13.293888,2.163611],[14.564999,2.169444],[16.07222,1.654166],[16.207222,2.220833],[16.659721,3.533333],[17.475277,3.713055],[18.624958,3.479444],[18.091942,2.224166],[17.714996,-0.53722182],[16.195831,-2.1758315],[16.226944,-3.3283328],[15.890505,-3.94300785],[14.661388,-4.9094408],[14.418888,-4.88721495],[14.400833,-4.27749268],[13.729443,-4.4458286],[13.413887,-4.88249839],[13.091389,-4.63304965],[12.779047,-4.38898599]]]}, -{code:"CD", name:"Democratic Republic of the Congo", lng:23.654, lat:-2.876, borders:[[[25.89166832,5.19249916],[27.4552784,5.01638985],[28.36305428,4.29000282],[29.64333153,4.64361382],[30.85881996,3.49339485],[30.72972298,2.44805717],[31.30277824,2.12138939],[29.96055412,0.8255558],[29.59694481,-1.38583374],[28.86833382,-2.39444351],[29.02444267,-2.74472237],[29.22989845,-3.75096321],[29.42388725,-4.44805527],[29.55027962,-6.29527473],[30.77124214,-8.19224358],[28.90166664,-8.47860146],[28.37222099,-9.26083374],[28.69972038,-10.65332222],[28.36333275,-11.55083466],[29.03138924,-12.38305664],[29.49361229,-12.45804977],[29.8050518,-12.15523911],[29.80138969,-13.45415688],[29.58944511,-13.22193336],[29.0158329,-13.39776802],[28.44194603,-12.51972008],[27.66000175,-12.29665565],[27.19925117,-11.5678978],[26.86861229,-11.97360802],[26.00472069,-11.90249252],[25.35972404,-11.64165688],[25.33222389,-11.19332314],[24.44833183,-11.46360397],[23.98620796,-10.87046051],[22.25388908,-11.20971107],[22.31222343,-10.3644371],[21.79055595,-9.40555573],[21.78296089,-7.28084183],[20.54871559,-7.28361511],[20.62974739,-6.91387749],[19.53894997,-6.99661064],[19.37305641,-7.9961071],[17.62416649,-8.09804916],[16.94166756,-7.19860649],[16.57972145,-5.90083313],[13.99749947,-5.84860802],[13.17888069,-5.85632515],[12.43583488,-6.01666641],[12.21455193,-5.76855469],[12.52666664,-5.72416687],[12.56555367,-5.02555466],[13.08888817,-4.66249657],[13.09139061,-4.63305092],[13.41388893,-4.88249969],[13.7294445,-4.44582939],[14.40083504,-4.27750015],[14.41889,-4.88722229],[14.6613903,-4.90944099],[15.89050484,-3.94300842],[16.22694588,-3.3283329],[16.19583321,-2.17583275],[17.71499825,-0.53722191],[18.09194374,2.22416878],[18.62495995,3.4794445],[18.5419445,4.33555412],[19.42138863,5.13416862],[20.58555412,4.41000175],[22.37916756,4.12750053],[22.89583397,4.82111168],[23.42027855,4.59111214],[24.39416695,5.11555672],[24.73444557,4.91083336],[25.54222298,5.38139153],[25.89166832,5.19249916]],[[12.95305443,-5.87610817],[12.84416771,-5.85055542],[12.73722267,-5.94361115],[12.95305443,-5.87610817]]]}, -{code:"BI", name:"Burundi", lng:29.887, lat:-3.356, borders:[[[29.229897,-3.75096242],[29.024441,-2.74471892],[29.85083,-2.75972151],[29.952221,-2.30944385],[30.57333,-2.39916521],[30.4175,-2.8619434],[30.843662,-2.97879038],[30.834999,-3.25694431],[30.026108,-4.26944302],[29.423885,-4.44805453],[29.229897,-3.75096242]]]}, -{code:"CN", name:"China", lng:106.514, lat:33.420, borders:[[[110.72054482,20.06333351],[111.03109932,19.63999748],[110.04776192,18.38055229],[109.56667519,18.16888618],[108.68553352,18.50527763],[108.62831306,19.28027916],[109.25943184,19.90166283],[110.72054482,20.06333351]],[[110.52414894,19.13444328],[110.51027107,19.13916588],[110.5150013,19.13277626],[110.52414894,19.13444328]],[[116.71887398,20.70944023],[116.70526314,20.71138573],[116.70192909,20.7199955],[116.71887398,20.70944023]],[[110.59721565,20.87944221],[110.54802895,20.91388512],[110.59665108,20.95833015],[110.59721565,20.87944221]],[[109.12191963,21.05527687],[109.07277107,21.0102787],[109.07193184,21.0502758],[109.12191963,21.05527687]],[[110.54886818,21.05916405],[110.49803352,20.95583153],[110.24887276,20.97722054],[110.54886818,21.05916405]],[[110.49942207,21.19333076],[110.61415291,21.19333076],[110.53665352,21.09694481],[110.49942207,21.19333076]],[[111.83611488,21.56527519],[111.84055519,21.64305305],[112.00248909,21.6519413],[111.83611488,21.56527519]],[[112.53386879,21.59083366],[112.64804268,21.70277596],[112.64694405,21.63860893],[112.53386879,21.59083366]],[[112.80581856,21.65332985],[112.70332527,21.68777657],[112.8688755,21.76638985],[112.80581856,21.65332985]],[[113.38333321,22.00889015],[113.30748177,22.01972008],[113.37803841,22.08472252],[113.38333321,22.00889015]],[[113.29665565,22.06388664],[113.26776314,22.11361122],[113.36026192,22.15360832],[113.29665565,22.06388664]],[[113.5949955,22.65221977],[113.48610115,22.72027397],[113.54358864,22.73638344],[113.5949955,22.65221977]],[[113.58804512,22.75055504],[113.38720894,22.89749718],[113.48387337,22.90083122],[113.58804512,22.75055504]],[[117.1180439,23.3991642],[116.94470406,23.43888664],[117.09803963,23.4905529],[117.1180439,23.3991642]],[[117.40471077,23.77111244],[117.50749397,23.72638512],[117.31165504,23.57972145],[117.40471077,23.77111244]],[[118.12692451,24.42582893],[118.0621891,24.45722008],[118.09108925,24.54972267],[118.1888752,24.49388695],[118.12692451,24.42582893]],[[119.30165291,25.41944313],[119.27748299,25.50305367],[119.33387947,25.57027626],[119.30165291,25.41944313]],[[119.82666206,25.58277702],[119.69637489,25.4280529],[119.72303963,25.63888741],[119.82666206,25.58277702]],[[119.2777729,26.03527641],[119.21132851,26.07193184],[119.40833473,25.98360634],[119.2777729,26.03527641]],[[121.17082405,28.04694557],[121.11914253,28.13388634],[121.24193001,28.20055199],[121.17082405,28.04694557]],[[121.94109535,29.05277824],[121.8735981,29.1491642],[121.94136238,29.16499901],[121.94109535,29.05277824]],[[122.11192513,29.78777885],[122.16609383,29.65249825],[122.03082466,29.71610832],[122.11192513,29.78777885]],[[122.41137886,29.93305397],[122.39082527,29.82944298],[122.31860542,29.94166374],[122.41137886,29.93305397]],[[121.86580849,29.9699955],[121.86110115,30.08166695],[121.90664864,30.03222084],[121.86580849,29.9699955]],[[122.32527351,30.01861],[122.00804329,30.00444603],[121.96164894,30.13916588],[122.32527351,30.01861]],[[122.21111488,30.24110603],[122.07470894,30.28722191],[122.21219826,30.33916664],[122.21111488,30.24110603]],[[122.42025948,30.41361046],[122.27554512,30.43221855],[122.27277565,30.47499657],[122.42025948,30.41361046]],[[121.8449955,31.28805351],[121.79193306,31.36999702],[121.87886238,31.35666466],[121.8449955,31.28805351]],[[121.48776436,31.71777534],[121.86831856,31.48916435],[121.20385933,31.80053902],[121.48776436,31.71777534]],[[119.89943123,32.07110786],[119.71608925,32.27193642],[119.82388496,32.26805305],[119.89943123,32.07110786]],[[121.4360981,39.39166451],[121.25583076,39.40943336],[121.39305305,39.4791584],[121.4360981,39.39166451]],[[123.38220406,53.52665901],[126.09554482,52.76444435],[127.58606911,50.20856667],[127.52942848,49.78916359],[130.67163277,48.86499977],[130.52163887,48.60777473],[130.98855782,47.68860054],[132.52108955,47.71027565],[133.08856392,48.10166359],[134.74075508,48.2671299],[134.76721382,47.70749855],[134.18246651,47.32332802],[133.90017891,46.25031471],[133.12219429,45.12860298],[131.86468697,45.34554482],[130.9499836,44.84110451],[131.31137276,43.39222145],[131.12329292,42.91082191],[130.40524483,42.71805],[130.60437202,42.42186165],[129.90753365,43.00582314],[129.71191597,42.44415474],[128.92581367,42.02443886],[128.05887032,42.00332832],[128.15582466,41.38249397],[126.91304207,41.79610634],[126.01693916,40.8999958],[124.3735981,40.09362221],[121.14694405,38.72276497],[121.75110054,39.35166359],[121.22886848,39.53833199],[122.29971504,40.51166725],[121.17746925,40.92193794],[120.45526314,40.20054817],[119.51970863,39.86805153],[118.92442513,39.12804604],[117.7438755,39.10499763],[117.6722126,38.38665962],[118.84192848,38.15054512],[118.95665169,37.30054665],[119.23275948,37.14361],[119.76721382,37.15138435],[120.74054146,37.83526802],[121.57054329,37.42471504],[122.5621891,37.3963871],[122.50470924,36.89361],[121.94914436,37.00000191],[120.78333473,36.62193489],[120.68081856,36.12748146],[120.08885384,36.1999836],[120.23776436,35.95943642],[119.17608833,34.88499641],[120.25388527,34.30999184],[120.83582497,32.6408329],[121.89554024,31.74694252],[120.60193062,32.09360695],[120.10608864,31.94388771],[119.82666206,32.30638313],[119.62970161,32.26082802],[120.1291523,31.90555382],[120.71443367,31.98360634],[121.88472176,30.97499657],[120.14610481,30.19471931],[121.28441811,30.30444527],[121.67775917,29.96305275],[122.12664986,29.88888741],[121.44832039,29.51166725],[121.97971535,29.58527565],[121.93359566,29.19527626],[121.41192818,29.16333199],[121.61026192,28.72499657],[121.13860512,28.84055519],[121.57859993,28.26916695],[120.59082222,28.07944298],[120.84305,27.87694359],[120.47747993,27.17749596],[120.19359016,27.29027748],[120.4222126,27.14527702],[120.03386879,26.89972115],[120.12719917,26.64166451],[119.54915047,26.75361061],[119.65804482,26.3386097],[119.93942451,26.35416603],[119.42526436,25.99694252],[119.09276009,26.14249611],[119.3449955,25.9383297],[119.70555305,25.99360847],[119.45110512,25.68027687],[119.65220833,25.3572216],[119.30887032,25.60694313],[119.10220528,25.40805244],[119.35304451,25.25027657],[118.87191963,25.24388695],[119.01609993,24.95416451],[118.57388496,24.88416481],[118.62275887,24.54389],[118.23970222,24.53638649],[118.16053963,24.68860817],[118.01805305,24.4363842],[117.79202461,24.46132088],[118.12330818,24.25610924],[116.52137947,23.42083168],[116.78749275,23.23388481],[116.48082161,22.93805122],[114.22259712,22.55055046],[114.03333092,22.50913811],[113.52443123,23.01111031],[113.82971382,23.11721992],[113.47747993,23.05277824],[113.35915565,22.88333321],[113.56581306,22.5502758],[113.55443001,22.21273232],[113.53166389,22.19473839],[113.16526985,22.57138634],[113.38804817,22.17666435],[113.29915047,22.17555428],[113.22415352,22.03750038],[113.08638191,22.2069416],[112.93914986,21.86860847],[111.89248848,21.92027473],[111.63720894,21.52111244],[110.39824867,21.38067055],[110.15804482,20.84555244],[110.52916145,20.47332954],[110.27887154,20.2461071],[109.92442513,20.23360634],[109.66192818,20.91888618],[109.94109535,21.44694328],[109.57332039,21.72332954],[109.14276314,21.39666557],[108.4758091,21.94027519],[108.51138496,21.58916664],[107.99002266,21.54241371],[106.69331551,22.03083229],[106.70720863,22.86499977],[105.57747841,23.05916405],[105.35386848,23.33472252],[103.96443367,22.49911308],[103.33638191,22.79638863],[103.03055,22.4355526],[102.47971535,22.77388954],[102.14074898,22.39628792],[101.73803902,22.49694252],[101.57443428,22.20916176],[101.78720284,21.14416313],[101.28193855,21.18027687],[101.14824104,21.57263756],[101.10526466,21.7713871],[100.2127552,21.43255424],[99.96443367,22.04888725],[99.16276741,22.15916252],[99.56637764,22.93805122],[98.92747688,23.18916512],[98.67720222,23.96805382],[98.89073372,24.16007042],[97.53553963,23.93971825],[97.75999641,24.25749779],[97.55247688,24.74305153],[98.71081734,25.85555458],[98.77832222,26.63638496],[98.69970894,27.5391674],[98.31637764,27.5419445],[97.80664253,28.34416389],[97.55525398,28.54805565],[97.34887886,28.2227726],[96.40193367,28.35111046],[96.61581612,28.79027748],[96.4708271,29.05666542],[96.16914558,28.90360832],[96.39526558,29.25527763],[96.07748604,29.46860695],[95.38777351,29.03527641],[94.64750862,29.33345985],[92.54498482,27.86194038],[91.65776253,27.76472282],[91.30137825,28.08111],[90.4663868,28.07166481],[90.01748848,28.32527733],[89.5902729,28.14333153],[88.91772652,27.32032585],[88.83166695,28.01333427],[88.14279366,27.86605644],[87.19275093,27.82305336],[86.68637276,28.11221886],[86.44497871,27.90805244],[86.18359566,28.16388512],[86.01443672,27.88277626],[85.72137642,28.27916527],[85.10664558,28.30944252],[85.18997383,28.60333061],[84.48109627,28.73666191],[84.11914253,29.26000023],[83.5527668,29.18583107],[82.10054207,30.34222221],[81.42109871,30.38527489],[81.2236042,30.0102787],[81.02536201,30.20435524],[79.09248543,31.43749809],[78.76721382,31.30999947],[78.39776802,32.54860878],[78.76054573,32.63555336],[78.97110176,32.35083199],[79.53027534,32.75416756],[78.81164742,33.52582741],[78.98535347,34.35001564],[78.30914497,34.64249611],[78.07554817,35.44582558],[77.82393074,35.50132942],[76.16638374,35.81971931],[75.86442757,36.65967751],[74.81749153,37.02176857],[74.56543159,37.02781868],[74.39221382,37.17507362],[74.91574287,37.23732948],[75.18748665,37.4065876],[74.9027729,37.64715767],[74.85664558,38.47048378],[73.81776619,38.6077137],[73.65568733,39.45482826],[73.99443245,40.0460453],[74.86026192,40.5193882],[75.57805061,40.6479969],[75.6972065,40.29911232],[76.3458271,40.35022163],[76.87387276,41.01410866],[78.08082771,41.04078865],[80.23402596,42.19622231],[80.17192268,42.66050911],[80.57859993,42.89107704],[80.37664986,43.02523994],[80.81721687,43.1560688],[80.36276436,44.12524605],[80.52083015,44.73247719],[79.87109566,44.9049778],[81.68831062,45.35081673],[82.56164742,45.12941933],[82.64943123,45.43026161],[82.31776619,45.57053566],[83.04054451,47.21221352],[84.75943184,46.82638741],[85.52931404,47.06016731],[85.75915718,48.38777351],[86.59610176,48.53611183],[86.87469673,49.11082649],[87.34820747,49.09262276],[87.84070015,49.17295265],[87.97331429,48.57694435],[88.65332222,48.18277168],[90.07443428,47.88638496],[91.02025032,46.60011101],[90.68193245,45.57972145],[90.89694405,45.25305367],[93.55470467,44.95721626],[95.4166584,44.29388618],[95.33610725,44.02083015],[96.38304329,42.7311039],[100.83554268,42.67804909],[105.01220894,41.58138466],[107.47191811,42.46610451],[109.31360054,42.42999458],[110.44053841,42.7777729],[111.95833015,43.69221687],[111.42137337,44.38249397],[111.98082161,45.09166145],[113.63804817,44.74527168],[114.54525948,45.38943672],[115.70192909,45.45860481],[116.58554268,46.29583168],[117.42109871,46.5783329],[119.89749336,46.67555428],[119.72998238,47.16415596],[118.53933907,47.99475288],[117.80108833,48.01055336],[117.37219429,47.65359688],[115.59219551,47.91944313],[116.71138191,49.83046913],[117.87471199,49.52057838],[119.21415901,50.01527596],[119.36136818,50.33693886],[119.13860512,50.39471626],[120.77665901,52.11499977],[120.7136097,52.54471779],[120.02916145,52.76805305],[120.86387825,53.2797184],[123.38220406,53.52665901]],[[108.32971382,21.65416527],[108.32887459,21.67860985],[108.32083321,21.66583061],[108.32971382,21.65416527]]]}, -{code:"AF", name:"Afghanistan", lng:65.216, lat:33.677, borders:[[[74.915741,37.237328],[74.392212,37.175072],[74.56543,37.027817],[72.556641,36.821266],[71.243576,36.129715],[71.649429,35.424995],[70.987488,34.551102],[71.08194,34.055824],[69.906372,34.035271],[70.326935,33.33194],[69.505264,33.034164],[69.328247,31.940365],[68.833054,31.603886],[68.166092,31.833054],[67.575546,31.53194],[67.778046,31.332218],[66.723038,31.212215],[66.395538,30.94083],[66.256653,29.85194],[62.484436,29.406105],[60.868599,29.863884],[61.851105,31.021111],[61.713608,31.383331],[60.84388,31.498329],[60.582497,33.066101],[60.943047,33.51944],[60.527771,33.644157],[60.508331,34.140274],[60.878876,34.319717],[60.721657,34.522217],[61.276558,35.607246],[62.309158,35.141663],[62.722214,35.254715],[63.10527,35.450829],[63.119438,35.861938],[64.503601,36.280548],[64.798035,37.124992],[65.708878,37.538605],[66.537735,37.366379],[67.779877,37.185822],[68.058014,36.932526],[68.887772,37.3386],[69.315262,37.115273],[69.515823,37.580826],[70.155823,37.536232],[70.161377,37.933372],[70.967209,38.472115],[71.363037,38.248497],[71.252777,37.922035],[71.591934,37.902618],[71.429428,37.075829],[71.6772,36.67601],[73.307205,37.462753],[74.915741,37.237328]]]}, -{code:"BT", name:"Bhutan", lng:90.429, lat:27.415, borders:[[[90.466385,28.071663],[91.301376,28.081108],[91.657761,27.764721],[92.113602,27.297497],[92.069992,26.861942],[89.643051,26.715271],[88.893875,26.975552],[88.917725,27.320324],[89.590271,28.14333],[90.017487,28.325275],[90.466385,28.071663]]]}, -{code:"CL", name:"Chile", lng:-69.433, lat:-23.389, borders:[[[-67.49302673,-55.82915497],[-67.61192322,-55.90221405],[-67.85745239,-55.84913635],[-67.49302673,-55.82915497]],[[-67.2127533,-55.89361572],[-67.41386414,-55.8321991],[-67.24694824,-55.82801056],[-67.2127533,-55.89361572]],[[-67.08525085,-55.91745758],[-67.17158508,-55.87412262],[-67.10583496,-55.80193329],[-67.08525085,-55.91745758]],[[-67.16723633,-55.78636169],[-67.24139404,-55.7902832],[-67.17388916,-55.75968361],[-67.16723633,-55.78636169]],[[-67.26806641,-55.72135925],[-67.55627632,-55.71221161],[-67.35658264,-55.57469177],[-67.26806641,-55.72135925]],[[-67.72853088,-55.62445068],[-67.68803406,-55.50162506],[-67.58970642,-55.54055786],[-67.72853088,-55.62445068]],[[-69.6905365,-55.4125061],[-69.76469421,-55.3377533],[-69.63751221,-55.38250732],[-69.6905365,-55.4125061]],[[-69.98529053,-55.36415863],[-70.10603333,-55.2958374],[-69.94216919,-55.28717804],[-69.98529053,-55.36415863]],[[-66.87466431,-55.3321991],[-67.07359314,-55.27606964],[-66.87858582,-55.22887421],[-66.87466431,-55.3321991]],[[-66.57130432,-55.284729],[-66.62608337,-55.19969177],[-66.42050171,-55.19467926],[-66.57130432,-55.284729]],[[-66.81661987,-55.11856842],[-67.07217407,-55.00276947],[-66.86213684,-55.0263443],[-66.81661987,-55.11856842]],[[-68.39654732,-54.95943451],[-69.06108093,-55.05721283],[-68.21046448,-55.26496124],[-68.74497986,-55.27111816],[-68.15939331,-55.3985672],[-68.05355835,-55.71248627],[-68.93911743,-55.45970917],[-68.80355835,-55.18858337],[-69.42997742,-55.16190338],[-69.17408752,-55.51219177],[-70.03330994,-55.15634918],[-68.39654732,-54.95943451]],[[-67.7804718,-54.91941833],[-67.05355835,-55.13637543],[-68.09526062,-55.23693085],[-68.36442566,-54.9444046],[-67.7804718,-54.91941833]],[[-70.50869751,-54.97000885],[-70.73408508,-55.0152359],[-70.26435852,-55.11606598],[-71.01577759,-54.9666214],[-70.31161499,-54.90472412],[-70.50869751,-54.97000885]],[[-69.76219177,-55.03859711],[-69.9319458,-54.89916992],[-69.16636658,-54.9582901],[-69.76219177,-55.03859711]],[[-71.10691833,-54.87194824],[-70.91223145,-54.92443085],[-71.45664978,-54.88495636],[-71.10691833,-54.87194824]],[[-70.60908508,-54.90472412],[-70.74552917,-54.87445068],[-70.39361572,-54.87167358],[-70.60908508,-54.90472412]],[[-72.02111816,-54.63468361],[-71.93106079,-54.74471283],[-72.10136414,-54.65634918],[-72.02111816,-54.63468361]],[[-72.3082428,-54.36917114],[-72.46328735,-54.42998505],[-72.54049683,-54.34134674],[-72.3082428,-54.36917114]],[[-70.28134155,-54.27552795],[-70.51109314,-54.16082001],[-70.21884155,-54.22663879],[-70.28134155,-54.27552795]],[[-71.25750732,-54.07610321],[-71.00967407,-54.1027832],[-71.11639404,-54.38468361],[-71.69935608,-54.16108704],[-71.25750732,-54.07610321]],[[-72.32217407,-54.25805664],[-72.51109314,-54.2027359],[-72.30158997,-54.07164001],[-72.2068634,-54.14829254],[-72.32217407,-54.25805664]],[[-73.19413757,-54.12886047],[-73.47047424,-54.07278442],[-73.24661255,-54.03582001],[-73.19413757,-54.12886047]],[[-71.67105103,-53.94386292],[-71.95361328,-54.01943207],[-71.84667969,-54.33971405],[-72.25750732,-53.94108582],[-71.67105103,-53.94386292]],[[-70.44195557,-53.86051178],[-70.67442322,-53.92665863],[-70.52438354,-54.22859955],[-70.87858582,-54.05078888],[-70.53439331,-53.56080627],[-70.44195557,-53.86051178]],[[-73.8318634,-53.59026337],[-73.85713196,-53.45333862],[-73.6875,-53.52160835],[-73.8318634,-53.59026337]],[[-72.911026,-53.42943573],[-72.87825012,-53.6819458],[-72.84384155,-53.45801544],[-72.13935852,-53.80165863],[-72.8707428,-54.13664246],[-72.73213196,-53.83971405],[-73.13250732,-54.01164246],[-73.25,-53.7071991],[-73.5877533,-53.75554657],[-72.911026,-53.42943573]],[[-73.46383667,-53.4750061],[-73.49464417,-53.57441711],[-73.80192566,-53.4291687],[-73.46383667,-53.4750061]],[[-74.19161987,-53.33193207],[-74.24356079,-53.29969788],[-74.05944824,-53.24302673],[-74.19161987,-53.33193207]],[[-73.41297913,-52.87858582],[-73.39111328,-52.95361328],[-73.75216675,-52.89328766],[-73.41297913,-52.87858582]],[[-70.72581482,-52.89361572],[-70.7808075,-52.87776947],[-70.61877632,-52.82136536],[-70.72581482,-52.89361572]],[[-74.36050415,-52.94887543],[-74.74497986,-52.75663757],[-73.08992004,-53.35468292],[-74.36050415,-52.94887543]],[[-70.91723633,-54.70861816],[-70.77133179,-54.68106842],[-70.87019348,-54.68634796],[-70.91723633,-54.70861816],[-72.0030365,-54.46356964],[-70.13075256,-54.54888916],[-70.88021851,-54.13386536],[-70.14273071,-54.42829132],[-70.20077515,-54.31608582],[-70.05519104,-54.24912262],[-69.76991272,-54.55748749],[-69.85908508,-54.28304291],[-69.24105835,-54.44636536],[-69.37640381,-54.68662262],[-69.17747688,-54.58078766],[-68.99160767,-54.4319458],[-70.18444824,-53.81358337],[-69.35636902,-53.35109711],[-70.44664001,-53.36802673],[-70.44445801,-53.01273346],[-70.09973145,-52.9041214],[-70.42463684,-52.77302551],[-69.91723633,-52.82583618],[-69.42050171,-52.45801544],[-68.61752319,-52.64151001],[-68.63577271,-54.78832245],[-68.63609314,-54.80472565],[-68.64302063,-54.88861084],[-70.91723633,-54.70861816]],[[-73.80747986,-52.69833374],[-74.07772827,-52.60664368],[-73.74214172,-52.40357208],[-73.80747986,-52.69833374]],[[-74.73942566,-52.31690216],[-74.82055664,-52.22941589],[-74.61997986,-52.20774841],[-74.73942566,-52.31690216]],[[-73.80802917,-52.39720917],[-74.09275818,-52.16190338],[-73.78907776,-52.26415253],[-73.80802917,-52.39720917]],[[-74.19413757,-52.13664246],[-73.9349823,-52.33721161],[-74.41853333,-52.13969421],[-74.19413757,-52.13664246]],[[-74.76251221,-52.18830872],[-74.78527832,-52.12134552],[-74.59602356,-52.07360077],[-74.76251221,-52.18830872]],[[-74.36050415,-52.07719421],[-74.4058075,-52.04719543],[-74.3540802,-52.05606842],[-74.36050415,-52.07719421]],[[-74.71722412,-52.08721161],[-74.55192566,-51.92747688],[-74.48779297,-51.9571991],[-74.71722412,-52.08721161]],[[-73.69467163,-52.2416687],[-74.09526062,-51.92273712],[-73.76806641,-52.06832314],[-73.69467163,-52.2416687]],[[-74.86355591,-52.13915253],[-74.74694824,-51.83389282],[-74.59907532,-51.8405304],[-74.86355591,-52.13915253]],[[-75.08970642,-51.90167236],[-75.070755,-51.74024963],[-74.97244263,-51.72358704],[-75.08970642,-51.90167236]],[[-74.1446991,-51.95137787],[-74.50521851,-51.71417236],[-74.09222412,-51.875],[-74.1446991,-51.95137787]],[[-73.79658508,-51.81913757],[-73.94000244,-51.66304779],[-73.79333496,-51.72859955],[-73.79658508,-51.81913757]],[[-74.78102112,-51.82164001],[-74.96972656,-52.11802673],[-74.93247986,-51.64361572],[-74.78102112,-51.82164001]],[[-74.05497742,-51.55356598],[-73.94000244,-51.78582001],[-74.23800659,-51.70137787],[-74.05497742,-51.55356598]],[[-75.00019836,-51.39551544],[-75.31019592,-51.63414001],[-75.20523071,-51.29915619],[-75.00019836,-51.39551544]],[[-74.11769104,-51.45442963],[-74.26130676,-51.30051422],[-74.17105103,-51.28582001],[-74.11769104,-51.45442963]],[[-73.78134155,-51.37134552],[-73.91439819,-51.29997253],[-73.79136658,-51.26110077],[-73.78134155,-51.37134552]],[[-74.0458374,-51.3791275],[-74.097229,-51.22582245],[-73.9679718,-51.24417114],[-74.0458374,-51.3791275]],[[-74.536026,-51.2791214],[-75.02111816,-51.4683075],[-74.79386902,-51.20943451],[-74.536026,-51.2791214]],[[-74.99552917,-51.17720795],[-74.94000244,-51.09858704],[-74.85713196,-51.13528442],[-74.99552917,-51.17720795]],[[-74.41157532,-51.2082901],[-74.60299683,-51.07746124],[-74.4666748,-51.02830505],[-74.41157532,-51.2082901]],[[-74.26327515,-51.24776459],[-74.32217407,-50.91969299],[-74.19129944,-51.19555664],[-74.26327515,-51.24776459]],[[-74.39654732,-50.86051178],[-74.4054718,-51.08971405],[-74.48213196,-50.99776459],[-74.72047424,-51.11193085],[-74.96470642,-50.96580505],[-74.39654732,-50.86051178]],[[-74.68911743,-50.89083862],[-74.95469666,-50.73110199],[-74.74890137,-50.70191956],[-74.68911743,-50.89083862]],[[-74.99377632,-50.8138504],[-75.070755,-50.65221405],[-74.97973633,-50.66440582],[-74.99377632,-50.8138504]],[[-74.65133667,-50.58856964],[-74.68574524,-50.52160835],[-74.58164978,-50.53222656],[-74.65133667,-50.58856964]],[[-75.09635925,-50.51638031],[-75.28886414,-50.78582001],[-75.51501465,-50.66304779],[-75.09635925,-50.51638031]],[[-74.3638916,-50.49139404],[-74.19325256,-50.84832001],[-74.51501465,-50.73306274],[-74.42355347,-50.5235672],[-74.66995239,-50.47941589],[-74.3638916,-50.49139404]],[[-74.73834229,-50.5],[-74.7530365,-50.38833618],[-74.54353333,-50.38136292],[-74.73834229,-50.5]],[[-75.04855347,-50.16691589],[-74.78973389,-50.14944458],[-75.45861816,-50.36415863],[-75.14361572,-50.24634552],[-75.39970589,-50.03663635],[-75.04855347,-50.16691589]],[[-75.3069458,-49.67192078],[-75.17388916,-49.9030304],[-75.59188843,-49.78385925],[-75.3069458,-49.67192078]],[[-75.48049927,-49.54719543],[-75.57881165,-49.46471405],[-75.48442078,-49.48110199],[-75.48049927,-49.54719543]],[[-74.29408264,-49.56053162],[-74.41941833,-49.62776947],[-74.43574524,-49.42747688],[-74.29408264,-49.56053162]],[[-74.92050171,-49.29496002],[-75.2401886,-49.1502533],[-74.97244263,-49.03108215],[-74.92050171,-49.29496002]],[[-75.28581238,-49.10028076],[-75.65634155,-49.21694946],[-75.35887146,-48.98551178],[-75.28581238,-49.10028076]],[[-75.28134155,-48.88996124],[-75.25772095,-49.08193207],[-75.32250977,-48.95442963],[-75.5,-49.04637909],[-75.65667725,-48.9388504],[-75.28134155,-48.88996124]],[[-75.17605591,-48.99972534],[-75.3125,-48.79997253],[-75.0821991,-48.88915253],[-75.17605591,-48.99972534]],[[-74.97941589,-48.74248505],[-74.99139404,-48.64889526],[-74.82556152,-48.66163635],[-74.97941589,-48.74248505]],[[-75.28167725,-48.71329498],[-75.65472412,-48.768013],[-75.34797668,-48.63555908],[-75.28167725,-48.71329498]],[[-75.12052917,-48.83361816],[-75.24824524,-48.77139282],[-75.07130432,-48.63441467],[-75.12052917,-48.83361816]],[[-75.32250977,-48.60414124],[-75.60102844,-48.69190216],[-75.65046692,-48.48191833],[-75.32250977,-48.60414124]],[[-74.41136169,-48.52999115],[-74.49769592,-48.39916992],[-74.30192566,-48.47582245],[-74.41136169,-48.52999115]],[[-74.04908752,-48.44609833],[-74.07414246,-48.49106598],[-74.24890137,-48.3763504],[-74.04908752,-48.44609833]],[[-74.26435852,-48.46694946],[-74.49160767,-48.35109711],[-74.30627632,-48.28663635],[-74.26435852,-48.46694946]],[[-74.41886902,-48.30471039],[-74.53723145,-48.33389282],[-74.59973145,-48.15167236],[-74.41886902,-48.30471039]],[[-74.6083374,-48.45578766],[-74.41278076,-49.73246002],[-74.77111816,-50.05498505],[-74.91995239,-49.68302917],[-74.64633179,-49.3555603],[-75.00500488,-49.50805664],[-75.01719666,-49.89944458],[-75.47102356,-49.33165741],[-74.91799927,-49.3360672],[-74.82719421,-49.09580994],[-75.0513916,-48.79833984],[-74.61105347,-48.69664001],[-75.02850533,-48.49498749],[-74.70861816,-48.45415497],[-74.73497009,-48.12303162],[-74.6083374,-48.45578766]],[[-75.23942566,-48.27051544],[-75.23442078,-48.71139526],[-75.58241272,-48.08666992],[-75.23942566,-48.27051544]],[[-74.92497253,-48.1558075],[-75.04408264,-48.44359589],[-75.25695801,-48.07333374],[-74.92497253,-48.1558075]],[[-74.80519104,-47.89802551],[-74.86964417,-48.06913757],[-75.26664734,-48.0319519],[-74.80519104,-47.89802551]],[[-73.92442322,-47.88610077],[-73.79963684,-47.88773346],[-74.49890137,-47.92301178],[-73.92442322,-47.88610077]],[[-75.13195801,-47.84886169],[-75.30355835,-47.77329254],[-75.13435364,-47.69833374],[-75.13195801,-47.84886169]],[[-74.95469666,-47.78304291],[-75.07522583,-47.6944046],[-74.9513092,-47.70639038],[-74.95469666,-47.78304291]],[[-74.45523071,-47.17693329],[-74.48408508,-47.0832901],[-74.31303406,-47.06276703],[-74.45523071,-47.17693329]],[[-74.15438843,-47.17247009],[-74.18356323,-47.0252533],[-73.97528076,-47.04747009],[-74.15438843,-47.17247009]],[[-73.76501465,-46.2110672],[-73.91223145,-46.02024841],[-73.6832428,-46.07665253],[-73.76501465,-46.2110672]],[[-73.68106079,-46.02830505],[-73.81945801,-45.99884796],[-73.77796936,-45.90499115],[-73.68106079,-46.02830505]],[[-74.71546936,-45.85190582],[-75.08306885,-46.08856964],[-75.10189819,-45.87412262],[-74.71546936,-45.85190582]],[[-73.70381165,-45.84276581],[-73.92889404,-45.97582245],[-73.88414001,-45.85861206],[-73.70381165,-45.84276581]],[[-74.01501465,-45.91773224],[-74.10691833,-45.78832245],[-74.03852844,-45.73638916],[-74.01501465,-45.91773224]],[[-74.75270081,-45.70774841],[-74.87661743,-45.64971161],[-74.86911011,-45.60583496],[-74.75270081,-45.70774841]],[[-74.62019348,-45.7569046],[-74.68247986,-45.63691711],[-74.54855347,-45.57746124],[-74.62019348,-45.7569046]],[[-73.98692322,-45.72467804],[-74.10997009,-45.59276581],[-74.01185608,-45.5375061],[-73.89611816,-45.62052917],[-73.98692322,-45.72467804]],[[-74.45861816,-45.7791214],[-74.39022827,-45.44386292],[-74.20991516,-45.63610077],[-74.45861816,-45.7791214]],[[-73.64556885,-45.75941467],[-73.78189087,-45.67023468],[-73.70056152,-45.44386292],[-73.64556885,-45.75941467]],[[-74.01773071,-45.43302917],[-73.81575012,-45.47582245],[-74.1446991,-45.57637787],[-74.01773071,-45.43302917]],[[-74.50445557,-45.53940582],[-74.57000732,-45.5291214],[-74.43803406,-45.42388916],[-74.50445557,-45.53940582]],[[-73.89686584,-45.43417358],[-74.02416992,-45.4002533],[-73.82556152,-45.37303162],[-73.89686584,-45.43417358]],[[-74.34133911,-45.40608215],[-74.52775574,-45.30525208],[-74.38719177,-45.28804779],[-74.34133911,-45.40608215]],[[-73.97657776,-45.26747131],[-73.78297424,-45.33525085],[-74.16603088,-45.25054169],[-73.97657776,-45.26747131]],[[-74.30889893,-45.30579376],[-74.3946991,-45.15444946],[-74.27056885,-45.21417236],[-74.30889893,-45.30579376]],[[-73.84667969,-45.00276947],[-73.73136902,-45.28440094],[-74.23583984,-45.16027832],[-73.84667969,-45.00276947]],[[-73.98028564,-44.98442078],[-74.36660767,-45.01055908],[-74.16833496,-44.8666687],[-73.98028564,-44.98442078]],[[-74.02612305,-44.85691833],[-74.18661499,-44.8125],[-73.95774841,-44.78358459],[-74.02612305,-44.85691833]],[[-73.79353333,-44.96498871],[-73.92408752,-44.89219666],[-73.91778564,-44.78162384],[-73.79353333,-44.96498871]],[[-75.06945801,-44.92551422],[-75.11158752,-44.77830505],[-75.02296448,-44.84635925],[-75.06945801,-44.92551422]],[[-73.65112305,-44.8444519],[-73.74890137,-44.75636292],[-73.6083374,-44.74106598],[-73.65112305,-44.8444519]],[[-74.37695313,-44.85942078],[-74.52633667,-44.74193573],[-74.4294281,-44.7194519],[-74.37695313,-44.85942078]],[[-74.20970154,-44.78440094],[-74.409729,-44.63441467],[-73.87324524,-44.68695068],[-74.20970154,-44.78440094]],[[-74.45556641,-44.69386292],[-74.67355347,-44.66860199],[-74.57827759,-44.61998749],[-74.45556641,-44.69386292]],[[-74.77720642,-44.6875],[-74.80410767,-44.54915619],[-74.72602844,-44.59777832],[-74.77720642,-44.6875]],[[-73.74552917,-44.74356842],[-73.68858337,-44.54441833],[-73.58970642,-44.70970917],[-73.74552917,-44.74356842]],[[-74.29528809,-44.57719421],[-74.36834717,-44.53276825],[-74.1391449,-44.55051422],[-74.29528809,-44.57719421]],[[-74.41244507,-44.51273346],[-74.54747009,-44.46804047],[-74.21775818,-44.46804047],[-74.41244507,-44.51273346]],[[-74.0196991,-44.55667114],[-74.12945557,-44.44833374],[-73.95936584,-44.48273468],[-74.0196991,-44.55667114]],[[-73.84417725,-44.46444702],[-73.89883423,-44.37167358],[-73.78852844,-44.42247009],[-73.84417725,-44.46444702]],[[-72.72277832,-44.54915619],[-72.81913757,-44.64051056],[-72.9833374,-44.60610199],[-72.82827759,-44.69054413],[-73.13827515,-44.91304779],[-73.28025818,-44.94000244],[-73.40776062,-44.82055664],[-73.2071991,-44.7986145],[-73.46470642,-44.64443207],[-72.99803162,-44.36721039],[-72.72277832,-44.54915619]],[[-73.68890381,-44.43972778],[-73.78797913,-44.3819046],[-73.65275574,-44.3527832],[-73.68890381,-44.43972778]],[[-73.9294281,-44.44805908],[-74.10549927,-44.32278442],[-73.93084717,-44.3555603],[-73.9294281,-44.44805908]],[[-73.2419281,-44.38833618],[-73.30334473,-44.36328888],[-73.24966431,-44.31080627],[-73.16886902,-44.36998749],[-73.2419281,-44.38833618]],[[-73.84689331,-44.33802795],[-73.97386169,-44.2819519],[-73.80213928,-44.2707901],[-73.84689331,-44.33802795]],[[-73.71133423,-44.3041687],[-73.76109314,-44.25386047],[-73.66549683,-44.2513504],[-73.71133423,-44.3041687]],[[-74.2915802,-44.30633736],[-74.42137146,-44.26273346],[-74.32719421,-44.24634552],[-74.2915802,-44.30633736]],[[-74.32000732,-44.19500732],[-74.38555908,-44.15444946],[-74.25914001,-44.15940094],[-74.32000732,-44.19500732]],[[-74.01164246,-44.28412628],[-74.12608337,-44.20774841],[-74.06716919,-44.15194702],[-74.01164246,-44.28412628]],[[-73.8527832,-44.19582367],[-74.01109314,-44.14192963],[-73.9221344,-44.09886169],[-73.8527832,-44.19582367]],[[-74.29333496,-44.0319519],[-74.31945801,-44.01719666],[-74.20469666,-44.01915741],[-74.29333496,-44.0319519]],[[-73.64611816,-44.13136292],[-73.72853088,-43.9388504],[-73.63435364,-44.00995636],[-73.64611816,-44.13136292]],[[-73.15492249,-44.02275085],[-73.2693634,-43.9208374],[-73.14796448,-43.88833618],[-73.15492249,-44.02275085]],[[-73.85549927,-43.76583862],[-73.76501465,-43.89328766],[-74.17247009,-43.87776947],[-73.85549927,-43.76583862]],[[-74.64611816,-43.61247253],[-74.79386902,-43.64775085],[-74.86247253,-43.5625],[-74.64611816,-43.61247253]],[[-73.59744263,-42.61802673],[-73.75140381,-42.61721039],[-73.61877632,-42.57028198],[-73.59744263,-42.61802673]],[[-73.4165802,-42.55633736],[-73.6541748,-42.3874588],[-73.53581238,-42.38495636],[-73.4165802,-42.55633736]],[[-73.10603333,-42.31134796],[-73.18966675,-42.2513504],[-73.06913757,-42.26028442],[-73.10603333,-42.31134796]],[[-72.51306152,-42.15248871],[-72.6169281,-42.09777832],[-72.50935364,-42.06080627],[-72.51306152,-42.15248871]],[[-73.88522339,-41.81554413],[-73.50108337,-41.8433075],[-73.36856079,-42.25054169],[-73.6721344,-42.36193085],[-73.61802673,-42.51719666],[-73.82022095,-42.50750732],[-73.80029297,-42.61775208],[-73.49890137,-42.80078888],[-73.65383911,-42.93330383],[-73.48942566,-43.11470795],[-73.85908508,-43.39998627],[-74.40776062,-43.24356842],[-73.88522339,-41.81554413]],[[-73.01577759,-41.86443329],[-73.08970642,-41.84412384],[-73.07751465,-41.73997688],[-73.01577759,-41.86443329]],[[-80.73779297,-33.77944946],[-80.77470589,-33.74193573],[-80.73529053,-33.68940163],[-80.73779297,-33.77944946]],[[-78.77241516,-33.62358093],[-78.99160767,-33.6680603],[-78.88827515,-33.580513],[-78.77241516,-33.62358093]],[[-109.2412796,-27.13305664],[-109.44914246,-27.19305038],[-109.39077759,-27.06666183],[-109.2412796,-27.13305664]],[[-105.45632935,-26.46055603],[-105.45936584,-26.46471977],[-105.47407532,-26.45304108],[-105.45632935,-26.46055603]],[[-79.88250732,-26.34693146],[-79.90689087,-26.34638977],[-79.8694458,-26.34083557],[-79.88250732,-26.34693146]],[[-80.07685852,-26.26164627],[-80.09973145,-26.26137543],[-80.08056641,-26.25138474],[-80.07685852,-26.26164627]],[[-69.48355103,-17.63555908],[-69.07164001,-18.03886795],[-68.90776062,-19.05525589],[-68.4375,-19.43025589],[-68.75695801,-20.4069252],[-68.18858337,-21.2969265],[-67.87640381,-22.82804108],[-67.18356323,-22.82164383],[-67.00074768,-23.00277328],[-67.33578491,-24.02163887],[-68.56500244,-24.77444458],[-68.35189819,-25.11721039],[-68.58361816,-26.50527954],[-68.28723145,-26.9152565],[-68.81074524,-27.12053299],[-69.6552887,-28.40091705],[-70.03134155,-29.30636978],[-69.83164978,-30.19054794],[-70.53297424,-31.18804169],[-70.09886169,-33.17247009],[-69.77438354,-33.38109589],[-69.8125,-34.23551178],[-70.56750488,-35.24776459],[-70.42431641,-36.13599396],[-71.18519592,-36.84222412],[-70.82414246,-38.56804657],[-71.40133667,-38.92023468],[-71.69555664,-39.58443451],[-71.95056152,-40.73273468],[-71.72602844,-42.09662628],[-72.13195801,-42.28886414],[-72.13685608,-43.00914001],[-71.73278809,-43.18804169],[-71.85494995,-44.37167358],[-71.10800171,-44.53968048],[-71.28222656,-44.80023956],[-72.07861328,-44.76943207],[-71.29779053,-45.29333496],[-71.7804718,-45.64889526],[-71.66941833,-46.6791687],[-71.94020081,-46.81554413],[-71.86856079,-47.22162628],[-72.36029053,-47.47000122],[-72.53636169,-47.92137909],[-72.28723145,-48.34194946],[-72.56411743,-48.80443573],[-73.58361816,-49.53804779],[-73.16603088,-50.75331879],[-72.29408264,-50.64971161],[-72.40046692,-51.51360321],[-71.91047668,-51.99580383],[-69.99824524,-51.99634552],[-68.44166565,-52.3777771],[-69.26109314,-52.20639038],[-70.81161499,-52.73246002],[-70.973526,-53.75554657],[-71.284729,-53.88637543],[-72.45381165,-53.4013443],[-71.86442566,-53.22162628],[-72.00717163,-53.56304169],[-71.80300903,-53.51638031],[-71.17050171,-52.80802917],[-72.5526886,-53.07469177],[-72.18858337,-53.18384552],[-72.6541748,-53.32387543],[-72.4002533,-53.5402832],[-73.21775818,-53.23110199],[-72.70611572,-53.2930603],[-72.79299927,-53.17829132],[-72.65296936,-53.14693451],[-72.93695068,-53.10664368],[-72.95828247,-52.85746002],[-72.71939087,-52.74607086],[-71.47528076,-52.63332367],[-72.79908752,-52.53968048],[-72.89883423,-52.62554169],[-72.67529297,-52.65885925],[-73.00575256,-52.85414124],[-72.98083496,-53.06608582],[-73.45109558,-53.00663757],[-73.23497009,-52.88969421],[-73.56269836,-52.79360199],[-72.88500977,-52.51551056],[-73.69000244,-52.7250061],[-73.54779053,-52.53886414],[-73.72331238,-52.02471161],[-73.32751465,-52.22358704],[-72.98855591,-52.06859589],[-72.86192322,-52.26415253],[-72.69827271,-51.9833374],[-72.57055664,-52.31581879],[-72.89938354,-52.45861816],[-72.49084473,-52.31886292],[-72.46884155,-51.78913879],[-73.24356079,-51.46221161],[-72.56074524,-51.78162384],[-73.28134155,-51.61023712],[-72.92408752,-51.86328888],[-73.23692322,-52.08998871],[-73.38664246,-51.65554047],[-73.28352356,-52.15499115],[-73.54528809,-52.05633736],[-73.46166992,-51.68722534],[-73.9058075,-51.62248993],[-73.89414978,-51.36998749],[-73.59797668,-51.61829376],[-73.71166992,-51.159729],[-74.25270081,-50.94081879],[-73.52850533,-50.71444702],[-73.56629944,-50.40167236],[-74.04833984,-50.82746124],[-74.29299927,-50.48219299],[-73.88467407,-50.53886414],[-74.69358826,-50.20333862],[-73.86584473,-50.29387665],[-74.3724823,-49.99139404],[-73.88500977,-50.0694046],[-74.32522583,-49.62722778],[-73.7124176,-49.75717926],[-74.11158752,-49.48023224],[-73.83404732,-49.0291214],[-74.37390137,-49.42747688],[-74.44969177,-48.81222534],[-74.06074524,-48.74139404],[-74.4002533,-48.61443329],[-74.04658508,-48.54773712],[-74.02111816,-48.41359711],[-74.65438843,-48.02389526],[-73.55334473,-48.24580383],[-73.27416992,-48.08721161],[-73.6541748,-47.90357208],[-73.22080994,-48.00108337],[-73.71917725,-47.52830505],[-73.93444824,-47.84690094],[-74.74160767,-47.71580505],[-74.04103088,-47.61802673],[-74.5291748,-47.43776703],[-73.93444824,-47.03608704],[-74.26501465,-46.78554535],[-75.0138092,-46.75026703],[-74.94216919,-46.44000244],[-75.65472412,-46.76496124],[-75.41297913,-46.93384552],[-75.71742249,-46.72528076],[-74.36105347,-45.79109955],[-74.14077759,-45.80579376],[-73.97439575,-46.09472656],[-74.08361816,-46.18608093],[-74.31161499,-46.24912262],[-74.4944458,-46.19026947],[-74.34080505,-46.26638031],[-74.04963684,-46.19555664],[-73.85386658,-46.347229],[-73.88272095,-46.14111328],[-73.76806641,-46.30274963],[-73.99497986,-46.56134796],[-73.84100533,-46.5888443],[-73.42550659,-46.07441711],[-73.69075012,-46.31913757],[-73.66331482,-45.97332001],[-73.18214417,-45.66745758],[-73.58720589,-45.77972412],[-73.51556396,-45.45497131],[-72.82719421,-45.42247009],[-73.44685364,-45.28527832],[-73.39164734,-44.9805603],[-73.14241028,-44.9444046],[-72.76611328,-44.75331879],[-72.6138916,-44.47277832],[-73.28939819,-44.14361572],[-72.84580994,-43.77667236],[-73.11639404,-43.43972778],[-72.74519348,-43.04833984],[-72.86083984,-42.57441711],[-72.53494263,-42.55917358],[-72.84744263,-42.27999115],[-72.42137146,-42.45301056],[-72.4627533,-41.97108459],[-72.85942078,-41.9069519],[-72.35047913,-41.65248871],[-72.3099823,-41.43580627],[-72.57130432,-41.70774841],[-72.94664001,-41.4833374],[-73.20361328,-41.79245758],[-73.75019836,-41.75467682],[-73.4919281,-41.5207901],[-73.86877632,-41.48246002],[-73.99497986,-40.97000122],[-73.22244263,-39.41468048],[-73.64328003,-37.20861816],[-73.19000244,-37.13806152],[-71.44250488,-32.63996124],[-71.70327759,-30.76164627],[-71.2877655,-29.89693832],[-71.52154732,-28.97000122],[-70.91081238,-27.62194824],[-70.44914246,-25.36470795],[-70.39111328,-23.56192398],[-70.6224823,-23.49275589],[-70.05334473,-21.42563629],[-70.40542603,-18.34853745],[-69.95109558,-18.24275589],[-69.49966431,-17.50527954],[-69.48355103,-17.63555908]],[[-74.06945801,-46.00609589],[-74.16439819,-46.13664246],[-74.07217407,-46.09777832],[-74.06945801,-46.00609589]],[[-73.38522339,-52.73997688],[-73.32806396,-52.69941711],[-73.39796448,-52.73246002],[-73.38522339,-52.73997688]]]}, -{code:"KY", name:"Cayman Islands", lng:-81.198, lat:19.314, borders:[[[-81.09710694,19.308887],[-81.40100102,19.28833],[-81.25445513,19.353886],[-81.09710694,19.308887]],[[-80.09744229,19.654163],[-80.07577533,19.697498],[-79.96667461,19.707222],[-80.09744229,19.654163]],[[-79.86627202,19.686943],[-79.89328009,19.693333],[-79.7326661,19.748608],[-79.86627202,19.686943]]]}, -{code:"CM", name:"Cameroon", lng:12.277, lat:5.133, borders:[[[9.687222,3.574722],[9.62611,3.551111],[9.6425,3.578611],[9.687222,3.574722]],[[14.577221,12.738609],[15.042597,12.078888],[15.061666,10.789999],[15.68185,9.989649],[14.194769,9.98175],[13.957499,9.638611],[15.201944,8.485832],[15.499008,7.526609],[14.419167,6.035277],[14.732777,4.623055],[16.103054,2.898333],[16.207222,2.220833],[16.07222,1.654166],[14.564999,2.169444],[13.293888,2.163611],[12.523611,2.283333],[11.339764,2.168611],[10.02611,2.168056],[9.811764,2.343698],[9.7225,3.865278],[8.975832,4.096666],[8.845833,4.638055],[8.504166,4.527778],[8.591738,4.810932],[8.865276,5.841944],[9.795555,6.801666],[10.615,7.06861],[11.340277,6.440833],[11.864166,7.084722],[12.253887,8.408054],[12.796944,8.769722],[13.80722,11.055832],[14.646387,11.575832],[14.645277,12.188332],[14.174444,12.396666],[14.07472,13.081665],[14.500875,13.001314],[14.577221,12.738609]]]}, -{code:"TD", name:"Chad", lng:18.665, lat:15.361, borders:[[[14.500875,13.001314],[14.07472,13.081665],[13.62512,13.718338],[13.468887,14.461111],[15.489166,16.914165],[15.996666,20.353054],[15.202499,21.495831],[14.997889,23.000591],[16.000832,23.450554],[24.002747,19.499065],[23.999603,15.698709],[22.937222,15.561943],[22.935833,15.11611],[22.384163,14.554165],[22.554996,14.125555],[22.084442,13.779165],[22.294167,13.35861],[21.827774,12.797499],[22.466942,12.621666],[22.866505,10.922447],[21.719444,10.639444],[21.715553,10.290554],[20.371666,9.108332],[18.988888,8.964167],[19.058792,8.578382],[18.588886,8.040277],[15.499008,7.526609],[15.201944,8.485832],[13.957499,9.638611],[14.194769,9.98175],[15.68185,9.989649],[15.061666,10.789999],[15.042597,12.078888],[14.577221,12.738609],[14.500875,13.001314]]]}, -{code:"KM", name:"Comoros", lng:43.337, lat:-11.758, borders:[[[43.86055,-12.35610724],[43.66861,-12.35749634],[43.622772,-12.2583276],[43.86055,-12.35610724]],[[44.487495,-12.09305545],[44.513611,-12.38027908],[44.206665,-12.16193806],[44.487495,-12.09305545]],[[43.459717,-11.93555301],[43.219162,-11.7611048],[43.281387,-11.37972219],[43.459717,-11.93555301]]]}, -{code:"CO", name:"Colombia", lng:-73.076, lat:3.900, borders:[[[-78.12139893,2.50083351],[-78.21546936,2.57777977],[-78.18911743,2.64055443],[-78.12770081,2.64305687],[-78.0916748,2.53944588],[-78.12139893,2.50083351]],[[-77.98638916,2.54250145],[-78.04550171,2.5830555],[-77.97744751,2.65194511],[-77.94827271,2.62777901],[-77.96025085,2.55722237],[-77.98638916,2.54250145]],[[-77.85745239,2.57333565],[-77.92105103,2.69389153],[-77.78689575,2.59277916],[-77.85745239,2.57333565]],[[-77.7696991,2.59139061],[-77.83970642,2.64027977],[-77.88467407,2.71722221],[-77.82772827,2.70388985],[-77.74966431,2.61499977],[-77.7696991,2.59139061]],[[-77.56880188,3.06916618],[-77.66278076,3.07583427],[-77.5304718,3.20944405],[-77.56880188,3.06916618]],[[-77.44827271,4.07416725],[-77.53547668,4.16722298],[-77.49411011,4.20416832],[-77.44827271,4.07416725]],[[-77.54299927,4.19333458],[-77.42605591,4.33472252],[-77.31967163,4.25166512],[-77.54299927,4.19333458]],[[-71.56358337,12.45361137],[-71.11584473,12.10111046],[-71.32469177,11.85305595],[-71.97723389,11.66499901],[-72.20935059,11.25000191],[-72.49302673,11.12111092],[-73.3780365,9.17138863],[-72.77972412,9.0802784],[-72.32522583,8.09555626],[-72.47167969,7.49194527],[-72.,7.01888847],[-70.11911011,6.9758358],[-69.24519348,6.08138847],[-67.45436096,6.19305611],[-67.8596344,4.55861092],[-67.29049683,3.39750099],[-67.82827759,2.82500267],[-67.19250488,2.39249992],[-66.87188721,1.22164345],[-67.0766449,1.17333412],[-67.42408752,2.14388847],[-67.91473389,1.74527931],[-68.19630432,1.97750282],[-68.15296936,1.72416878],[-69.84603882,1.71045494],[-69.84222412,1.07222176],[-69.26991272,1.0383358],[-69.12466431,0.64500237],[-70.04408264,0.59083366],[-70.05802917,-0.15749931],[-69.60745239,-0.51749992],[-69.3780365,-1.33805466],[-69.95689392,-4.23687363],[-70.72407532,-3.77972221],[-70.06750488,-2.75555611],[-70.28831482,-2.50499916],[-71.69805908,-2.14694405],[-72.88195801,-2.50638771],[-73.55627632,-1.37083244],[-74.22723389,-1.02777672],[-74.77688599,-0.20416641],[-75.28581238,-0.11972237],[-76.24302673,0.3955555],[-77.37945557,0.38472176],[-78.5916748,1.24305534],[-78.80966187,1.43778038],[-79.05334473,1.62833214],[-78.58404732,1.76888847],[-78.56520081,2.42916679],[-78.4405365,2.50944328],[-78.34352112,2.43666649],[-78.26501465,2.51916695],[-78.12553406,2.4869442],[-77.98692322,2.52250099],[-77.94859314,2.55944633],[-77.94000244,2.65500069],[-77.86714172,2.56027794],[-77.79244995,2.56749916],[-77.74084473,2.60472298],[-77.02850533,3.91777992],[-77.43411255,4.02833366],[-77.23908997,4.26000023],[-77.38414001,4.34194374],[-77.34777832,5.24055672],[-77.53222656,5.51888847],[-77.24084473,5.75139046],[-77.4901886,6.19083214],[-77.33992004,6.56777763],[-77.88969421,7.22889137],[-77.74661255,7.72222328],[-77.57380676,7.52527809],[-77.21546936,7.93722343],[-77.36660767,8.67500114],[-76.75521851,7.91889],[-76.92834473,8.56833458],[-75.62945557,9.45361137],[-75.2696991,10.79833412],[-74.86074829,11.12548637],[-74.28852844,11.00250053],[-74.59222412,10.87805367],[-74.39056396,10.74305534],[-74.15492249,11.33138847],[-73.28439331,11.29555702],[-71.56358337,12.45361137]],[[-78.54528809,2.4161129],[-78.54408264,2.43250084],[-78.55029297,2.43333244],[-78.55355835,2.40666771],[-78.54528809,2.4161129]],[[-81.71025085,12.49083519],[-81.71972656,12.55000114],[-81.68824768,12.59111214],[-81.71025085,12.49083519]],[[-81.36550903,13.32305717],[-81.38935852,13.33500099],[-81.35386658,13.37861061],[-81.36550903,13.32305717]]]}, -{code:"CR", name:"Costa Rica", lng:-83.946, lat:9.971, borders:[[[-85.11584445,10.07361],[-85.17605585,10.077499],[-85.19793709,10.110554],[-85.16189554,10.122499],[-85.10908472,10.105833],[-85.11584445,10.07361]],[[-85.08775311,11.009998],[-83.91549669,10.708611],[-83.64570591,10.924847],[-82.5635072,9.562876],[-82.93466177,9.471666],[-82.71078486,8.93111],[-82.89875842,8.025669],[-83.34167461,8.726944],[-83.29103132,8.370277],[-83.73083492,8.583055],[-83.62411502,9.035276],[-84.61518875,9.575832],[-84.74018875,9.966665],[-85.24302698,10.204166],[-85.22853132,10.088888],[-84.89720159,9.807499],[-85.14219683,9.589443],[-85.66439842,9.908609],[-85.8615876,10.368332],[-85.63183595,10.626389],[-85.91136191,10.891109],[-85.69238263,11.076061],[-85.08775311,11.009998]]]}, -{code:"CF", name:"Central African Republic", lng:20.483, lat:6.571, borders:[[[19.058792,8.578382],[18.988888,8.964167],[20.371666,9.108332],[21.715553,10.290554],[21.719444,10.639444],[22.866505,10.922447],[23.669167,9.866943],[23.517776,8.714167],[24.201111,8.686943],[24.192497,8.30361],[25.25333,7.850555],[25.206944,7.497499],[26.404999,6.646388],[26.437496,6.077777],[27.142776,5.771944],[27.455276,5.016388],[25.891666,5.192499],[25.542221,5.381389],[24.734444,4.910832],[24.394165,5.115555],[23.420277,4.59111],[22.895832,4.821111],[22.379166,4.1275],[20.585552,4.41],[19.421387,5.134166],[18.541943,4.335555],[18.624958,3.479444],[17.475277,3.713055],[16.659721,3.533333],[16.207222,2.220833],[16.103054,2.898333],[14.732777,4.623055],[14.419167,6.035277],[15.499008,7.526609],[18.588886,8.040277],[19.058792,8.578382]]]}, -{code:"CU", name:"Cuba", lng:-77.781, lat:21.297, borders:[[[-78.32772827,20.51361275],[-78.45828247,20.60555458],[-78.34580994,20.56944466],[-78.32772827,20.51361275]],[[-78.38195801,20.63777733],[-78.41223145,20.64722252],[-78.40275574,20.67583275],[-78.38195801,20.63777733]],[[-78.44161987,20.71055412],[-78.54747009,20.70361137],[-78.45861816,20.73166847],[-78.44161987,20.71055412]],[[-78.76741028,20.70611],[-78.82185364,20.75694466],[-78.76359558,20.73055458],[-78.76741028,20.70611]],[[-75.48713684,20.72888756],[-75.57806396,20.78111076],[-75.51501465,20.7919445],[-75.48713684,20.72888756]],[[-78.84744263,20.77166557],[-78.96580505,20.80999947],[-78.93161011,20.83416557],[-78.84744263,20.77166557]],[[-78.9777832,20.83944511],[-79.07751465,20.89388847],[-78.96972656,20.87416649],[-78.9777832,20.83944511]],[[-79.08436584,20.8983326],[-79.22547913,21.00055504],[-79.17658997,21.00861168],[-79.08436584,20.8983326]],[[-79.30213928,21.06444359],[-79.38414001,21.11972237],[-79.34133911,21.12111092],[-79.30213928,21.06444359]],[[-79.40634155,21.10472298],[-79.45109558,21.12277794],[-79.40242004,21.12111092],[-79.40634155,21.10472298]],[[-81.5308075,21.60027885],[-81.5569458,21.62277794],[-81.3669281,21.71194267],[-81.5308075,21.60027885]],[[-82.54528809,21.57111168],[-82.89720154,21.43277931],[-83.19303894,21.62138939],[-82.93716431,21.57999992],[-83.08938599,21.78555489],[-82.97439575,21.94277763],[-82.54528809,21.57111168]],[[-77.9150238,22.09469795],[-77.65330505,22.06972313],[-77.63827515,21.95305443],[-77.9150238,22.09469795]],[[-77.84635925,22.10639],[-78.04408264,22.18666649],[-77.9974823,22.28527641],[-77.84635925,22.10639]],[[-77.77720642,22.1950016],[-77.77154732,22.16805458],[-77.84994507,22.2947216],[-77.77720642,22.1950016]],[[-78.11856079,22.41388893],[-78.0193634,22.26194572],[-78.31140137,22.40389061],[-78.11856079,22.41388893]],[[-78.34133911,22.53388786],[-78.42529297,22.41250038],[-78.69664001,22.51472282],[-78.34133911,22.53388786]],[[-78.97636414,22.63749886],[-79.0544281,22.66527748],[-78.96884155,22.66916847],[-78.97636414,22.63749886]],[[-79.32305908,22.6147213],[-79.63250732,22.80000114],[-79.57609558,22.80999947],[-79.32305908,22.6147213]],[[-79.89186096,22.92833519],[-79.95861816,22.94750023],[-79.88305664,22.96527672],[-79.89186096,22.92833519]],[[-80.23278809,22.99500084],[-80.23408508,22.95638847],[-80.34939575,22.98166847],[-80.23278809,22.99500084]],[[-80.04942322,23.0261097],[-80.07719421,23.0419445],[-80.0766449,23.07444572],[-80.04942322,23.0261097]],[[-80.14633179,23.07027626],[-80.22407532,23.09944344],[-80.19935608,23.12194633],[-80.14633179,23.07027626]],[[-80.92747688,23.12555504],[-80.7971344,23.15055656],[-80.973526,23.10750008],[-80.92747688,23.12555504]],[[-82.00379944,23.18638802],[-81.58056641,23.15555382],[-81.50074768,23.05555534],[-81.22689819,23.16166496],[-81.28547668,23.11972237],[-81.13467407,23.02305412],[-80.63305664,23.09833336],[-80.54441833,22.99110985],[-80.27850533,22.90527916],[-80.03330994,22.95111275],[-77.34100533,21.63611031],[-77.54299927,21.91861153],[-76.89611816,21.30639076],[-75.7071991,21.12194633],[-75.73658752,20.69694328],[-74.14131165,20.25222206],[-75.08525085,19.89304161],[-75.13967896,19.96287346],[-75.15917969,19.96069527],[-75.22366333,19.90155602],[-77.72244263,19.83277702],[-77.11584473,20.36499977],[-77.23638916,20.66305733],[-78.05029297,20.69972038],[-78.75019836,21.63916588],[-79.98779297,21.72361183],[-80.4919281,22.1772213],[-81.82305908,22.18361092],[-82.16297913,22.3983326],[-81.64883423,22.49138832],[-81.88500977,22.68083382],[-82.7638092,22.7005558],[-84.02612305,21.91499901],[-84.95327759,21.8599987],[-84.33796692,22.01222038],[-84.07685852,22.66055489],[-82.00379944,23.18638802]],[[-80.49302673,23.18805504],[-80.57969666,23.17611122],[-80.55856323,23.20361137],[-80.49302673,23.18805504]]]}, -{code:"CV", name:"Cape Verde", lng:-23.634, lat:15.071, borders:[[[-24.36832782,14.812222],[-24.52525711,14.92111],[-24.38163766,15.047499],[-24.36832782,14.812222]],[[-23.44664355,14.982777],[-23.68136945,14.935555],[-23.7666552,15.253054],[-23.44664355,14.982777]],[[-22.70608893,16.036388],[-22.95777886,16.089443],[-22.798614,16.235275],[-22.70608893,16.036388]],[[-24.03416086,16.594166],[-24.32136923,16.482777],[-24.43221692,16.644165],[-24.03416086,16.594166]],[[-24.92609037,16.799999],[-25.09331151,16.83083],[-24.93303287,16.921387],[-24.92609037,16.799999]],[[-25.28138366,16.91333],[-25.33027298,17.096386],[-24.97443806,17.112778],[-25.28138366,16.91333]]]}, -{code:"CK", name:"Cook Islands", lng:-159.782, lat:-21.219, borders:[[[-157.89044186,-21.93804563],[-157.96273811,-21.90415209],[-157.921783,-21.88027608],[-157.89044186,-21.93804563]],[[-159.74105873,-21.2541623],[-159.83383161,-21.19580108],[-159.75238081,-21.19302388],[-159.74105873,-21.2541623]],[[-157.3163755,-20.18804563],[-157.33209264,-20.13305328],[-157.30899006,-20.14775123],[-157.3163755,-20.18804563]],[[-158.0981752,-20.01608304],[-158.11846955,-19.97304896],[-158.08184836,-19.98693495],[-158.0981752,-20.01608304]],[[-158.27935789,-19.81777608],[-158.26239034,-19.83664333],[-158.29138167,-19.83332449],[-158.27935789,-19.81777608]],[[-157.70858733,-19.85303121],[-157.74130202,-19.81415942],[-157.71380638,-19.77027486],[-157.70858733,-19.85303121]],[[-158.92852773,-19.27027486],[-158.94378631,-19.27193428],[-158.95187359,-19.24248935],[-158.92852773,-19.27027486]],[[-159.78808602,-18.89054141],[-159.80334445,-18.8613588],[-159.78414937,-18.84137678],[-159.78808602,-18.89054141]],[[-163.16308602,-18.08942053],[-163.17025717,-18.07942551],[-163.15460217,-18.05664477],[-163.16308602,-18.08942053]],[[-165.42199728,-11.54833043],[-165.43484505,-11.53749695],[-165.41418414,-11.53778052],[-165.42199728,-11.54833043]],[[-165.82641617,-10.8883231],[-165.85015845,-10.88415681],[-165.83096337,-10.87693073],[-165.82641617,-10.8883231]],[[-161.02258316,-10.43138671],[-161.04333492,-10.41972302],[-161.04855297,-10.39277498],[-161.02258316,-10.43138671]],[[-160.97558588,-10.39555218],[-161.01239034,-10.35277415],[-160.97341948,-10.37804652],[-160.97558588,-10.39555218]],[[-161.08425917,-10.04193256],[-161.0903322,-10.01831861],[-161.07226525,-10.00805428],[-161.08425917,-10.04193256]],[[-157.94161978,-8.98249434],[-157.97207594,-8.98193945],[-158.00823956,-8.951382],[-157.94161978,-8.98249434]]]}, -{code:"CY", name:"Cyprus", lng:33.219, lat:35.043, borders:[[[33.652618,35.354103],[34.590271,35.690277],[33.921387,35.272774],[34.083328,34.959442],[33.030838,34.56255],[32.274162,35.043884],[33.652618,35.354103]]]}, -{code:"DK", name:"Denmark", lng:9.264, lat:56.058, borders:[[[11.513887,54.82972],[11.85611,54.683327],[10.989891,54.790848],[11.513887,54.82972]],[[12.038055,54.892494],[11.964443,54.561661],[11.708611,54.936661],[12.038055,54.892494]],[[10.432777,54.84166],[10.248333,54.90416],[10.184166,54.97361],[10.432777,54.84166]],[[12.557499,54.964165],[12.115833,54.90416],[12.311943,55.035271],[12.557499,54.964165]],[[10.615,54.950272],[10.49861,55.006386],[10.631943,55.043327],[10.615,54.950272]],[[9.7925,55.074997],[10.07111,54.87471],[9.630554,55.049438],[9.7925,55.074997]],[[10.756943,54.777222],[10.681944,54.908607],[10.949165,55.16111],[10.756943,54.777222]],[[15.051666,54.994995],[14.679722,55.099716],[14.746387,55.295555],[15.051666,54.994995]],[[8.46361,55.33416],[8.360277,55.457771],[8.458332,55.426384],[8.46361,55.33416]],[[10.745277,55.482216],[10.782776,55.122498],[10.497776,55.028885],[10.152777,55.084442],[10.11861,55.178886],[10.005833,55.193329],[9.896944,55.279716],[9.810833,55.436661],[9.675554,55.499161],[9.74861,55.540276],[9.813055,55.547493],[9.904999,55.505829],[10.309721,55.616943],[10.478611,55.438049],[10.619165,55.619164],[10.745277,55.482216]],[[12.579443,55.551384],[12.60611,55.696106],[12.67861,55.590553],[12.579443,55.551384]],[[10.630554,55.865555],[10.527498,55.765831],[10.523611,55.981384],[10.630554,55.865555]],[[12.567221,55.992218],[12.190832,55.478607],[12.461666,55.286385],[12.071943,54.968605],[11.246666,55.199715],[10.87361,55.732498],[11.763887,55.964722],[12.05722,55.653328],[11.859444,55.96666],[12.567221,55.992218]],[[11.565832,56.67083],[11.503332,56.707771],[11.648054,56.723328],[11.565832,56.67083]],[[8.924721,56.91861],[8.766943,56.692215],[8.509722,56.741661],[8.924721,56.91861]],[[9.974274,57.071732],[10.311891,56.981304],[10.305277,56.748055],[9.866388,56.650276],[10.963055,56.439438],[10.24679,56.178551],[9.992777,55.704994],[9.549999,55.705826],[9.819166,55.604721],[9.704166,55.531105],[9.588333,55.421661],[9.68861,55.196938],[9.459166,55.123886],[9.768055,54.891106],[9.445358,54.825401],[8.664545,54.913094],[8.623888,55.427498],[8.087221,55.548882],[8.127222,55.98555],[8.397221,55.897499],[8.108332,56.017776],[8.165277,56.653328],[8.728333,56.482216],[9.075567,56.807449],[9.321665,56.525551],[9.1782,56.916031],[9.309444,57.001938],[9.974274,57.071732]],[[11.195833,57.310829],[10.997499,57.223328],[10.854443,57.263054],[11.195833,57.310829]],[[10.432499,57.592216],[10.336616,56.991665],[10.006666,57.089989],[9.243889,56.995552],[9.115549,57.052773],[8.670832,56.945274],[8.415797,56.678127],[8.591389,56.686104],[8.554998,56.582497],[8.240276,56.707222],[8.617222,57.121666],[10.645953,57.736267],[10.432499,57.592216]]]}, -{code:"DJ", name:"Djibouti", lng:42.516, lat:11.900, borders:[[[42.866806,11.585428],[43.249222,11.469534],[42.944092,11.002438],[41.789719,11.008055],[41.828606,11.74],[42.399719,12.469721],[43.121384,12.708332],[43.413887,12.056944],[42.508606,11.567221],[42.866806,11.585428]]]}, -{code:"DM", name:"Dominica", lng:-61.356, lat:15.475, borders:[[[-61.36361689,15.198055],[-61.45219395,15.631943],[-61.25331883,15.461388],[-61.36361689,15.198055]]]}, -{code:"DO", name:"Dominican Republic", lng:-70.729, lat:19.015, borders:[[[-71.53222612,17.540276],[-71.52220159,17.615276],[-71.46296739,17.581944],[-71.53222612,17.540276]],[[-68.57435571,18.129444],[-68.73191819,18.119999],[-68.78385902,18.195],[-68.57435571,18.129444]],[[-70.78352367,19.846664],[-69.93627966,19.671108],[-69.75358615,19.289444],[-69.22167938,19.362221],[-69.63163766,19.101665],[-68.72907995,18.952774],[-68.32556105,18.616665],[-68.44969206,18.355831],[-69.88163766,18.469444],[-70.51077245,18.194721],[-70.68988081,18.433887],[-71.07969683,18.301109],[-71.4224697,17.601944],[-71.76777653,18.038502],[-72.00303652,18.60083],[-71.71580463,18.749722],[-71.75411978,19.70583],[-70.78352367,19.846664]]]}, -{code:"EC", name:"Ecuador", lng:-78.497, lat:-1.385, borders:[[[-80.19325256,-3.03472137],[-80.20664978,-2.72416687],[-79.90296936,-2.71972084],[-80.19325256,-3.03472137]],[[-79.83862305,-2.64194489],[-79.88685608,-2.62694359],[-79.85658264,-2.46666718],[-79.83862305,-2.64194489]],[[-89.62106323,-1.4066658],[-89.75195313,-1.36083221],[-89.64828491,-1.34388924],[-89.62106323,-1.4066658]],[[-90.43444824,-1.35527802],[-90.48158264,-1.2191658],[-90.36584473,-1.26916695],[-90.43444824,-1.35527802]],[[-90.04333496,-0.83888817],[-90.0821991,-0.80111122],[-90.03973389,-0.80944443],[-90.04333496,-0.83888817]],[[-89.44358826,-0.93666649],[-89.62945557,-0.9272213],[-89.2585907,-0.6875],[-89.44358826,-0.93666649]],[[-90.26055908,-0.75111008],[-90.53527832,-0.58388901],[-90.1905365,-0.54277802],[-90.26055908,-0.75111008]],[[-91.49890137,-0.49611092],[-91.66386414,-0.31611061],[-91.47102356,-0.24805641],[-91.49890137,-0.49611092]],[[-90.54747009,-0.30500031],[-90.87445068,-0.27000046],[-90.79333496,-0.14944267],[-90.54747009,-0.30500031]],[[-91.21884155,-0.01111031],[-90.81074524,-0.73250008],[-91.37608337,-1.02666664],[-91.08056641,-0.58722115],[-91.60583496,-0.00499916],[-91.21884155,-0.01111031]],[[-90.45904732,0.26638985],[-90.53244019,0.34666634],[-90.40830994,0.32694435],[-90.45904732,0.26638985]],[[-90.75108337,0.54750252],[-90.79963684,0.56333351],[-90.79223633,0.65166664],[-90.75108337,0.54750252]],[[-78.5916748,1.24305534],[-77.37945557,0.38472176],[-76.24302673,0.3955555],[-75.28581238,-0.11972237],[-75.62789917,-0.10885811],[-75.21604919,-0.96533585],[-75.55911255,-1.53416634],[-76.66053772,-2.57213402],[-78.3374176,-3.42277718],[-78.7089386,-4.58478355],[-79.05479431,-5.00913239],[-79.64970589,-4.4327774],[-80.46775818,-4.43888664],[-80.46722412,-3.9869442],[-80.15330505,-3.88422775],[-80.34036255,-3.38051605],[-79.94805908,-3.19833374],[-79.72744751,-2.60277748],[-79.84580994,-2.37638855],[-79.76359558,-2.00916672],[-80.25630188,-2.73638916],[-80.89001465,-2.32055473],[-80.911026,-1.03111076],[-80.26469421,-0.62722206],[-80.50195313,-0.36750031],[-80.06825256,0.06278038],[-80.05966187,0.82861137],[-78.80966187,1.43778038],[-78.5916748,1.24305534]],[[-78.91223145,1.23916817],[-78.90330505,1.36778069],[-78.99890137,1.27499962],[-78.91223145,1.23916817]]]}, -{code:"EG", name:"Egypt", lng:29.872, lat:26.494, borders:[[[34.02638435,27.49833488],[34.04194069,27.44222069],[33.91749763,27.52638817],[34.02638435,27.49833488]],[[32.04722023,31.14333153],[32.04277229,31.15805626],[32.04999733,31.15333366],[32.04722023,31.14333153]],[[33.47666359,31.13749886],[33.26666451,31.21527672],[33.40055275,31.18166542],[33.47666359,31.13749886]],[[33.19527626,31.23277855],[33.26138496,31.21499825],[33.10166359,31.22722054],[32.97666359,31.16833305],[33.09610939,31.23250008],[33.19527626,31.23277855]],[[25.31666756,31.50111198],[27.33111,31.37499809],[29.06944466,30.82166481],[31.02777672,31.60055733],[31.92148018,31.52988625],[32.20499611,31.28999901],[31.89999962,31.53111076],[31.77388954,31.27166557],[32.14306831,31.07416725],[32.21055031,31.28805733],[32.7172184,31.03249931],[33.11166573,31.19305611],[33.14972115,31.1016674],[33.14361,31.05833244],[33.41055489,31.15472221],[33.53277779,31.11694527],[33.74389076,31.13333321],[34.21666145,31.32333183],[34.26758003,31.2165432],[34.90380287,29.48670769],[34.25444221,27.7286129],[33.24277687,28.55444527],[32.57499886,30.00527763],[32.34082985,29.59694481],[33.55888557,27.88305473],[35.13861275,24.51749992],[35.81305122,23.9161129],[35.48305702,23.93833351],[35.67055702,22.96583366],[36.88846779,22.00011253],[31.45388985,21.99833488],[31.45555687,22.2322216],[31.27111244,21.99833488],[25.00142479,21.99969673],[24.99777794,29.24888802],[24.70666695,30.16861153],[25.15166664,31.64694405],[25.31666756,31.50111198]],[[34.00139046,26.70722389],[33.99472237,26.74972343],[33.96000099,26.78833199],[34.00139046,26.70722389]]]}, -{code:"IE", name:"Ireland", lng:-8.152, lat:53.177, borders:[[[-9.65638542,53.22222328],[-9.72472382,53.26805305],[-9.66082191,53.28000069],[-9.65638542,53.22222328]],[[-9.96416092,54.01861],[-9.95500183,53.87666512],[-10.26860428,53.97500038],[-9.96416092,54.01861]],[[-8.51860428,54.96416664],[-8.54694176,55.01194191],[-8.4905529,54.99472237],[-8.51860428,54.96416664]],[[-7.40638542,54.9533329],[-8.15943336,54.44194221],[-7.55944443,54.12693977],[-7.0308342,54.41777229],[-6.2669754,54.09983253],[-6.01305199,52.9450016],[-6.36111069,52.17749977],[-6.99471855,52.28277779],[-9.23415565,51.48055458],[-9.81749344,51.44555092],[-9.53554916,51.75000191],[-10.13249779,51.59333229],[-9.57749748,51.87221718],[-10.33859253,51.78292274],[-9.75777054,52.14860725],[-10.46082687,52.18222237],[-8.81832314,52.66555214],[-9.93638229,52.55583382],[-8.94110489,53.26416206],[-10.17583466,53.40777779],[-9.56138229,53.85972023],[-9.94054794,53.86694527],[-9.78776741,53.94194221],[-10.00611115,54.21888924],[-10.12444115,54.09638405],[-10.11221886,54.22999763],[-8.47166061,54.27388954],[-8.66833496,54.34944344],[-8.1883297,54.63360786],[-8.80083466,54.69166756],[-8.31749344,55.10888863],[-7.6574955,55.27443886],[-7.68138885,54.94832802],[-7.39388466,55.37944221],[-6.93166733,55.23583412],[-7.25250626,55.07059669],[-7.40638542,54.9533329]],[[-8.43694115,54.94444466],[-8.43860054,54.9552784],[-8.45388603,54.95499611],[-8.43694115,54.94444466]]]}, -{code:"GQ", name:"Equatorial Guinea", lng:10.488, lat:1.607, borders:[[[5.641388,-1.47472182],[5.615277,-1.46916651],[5.633888,-1.42055423],[5.641388,-1.47472182]],[[10.02611,2.168056],[11.339764,2.168611],[11.353888,1.001944],[9.803976,1.002608],[9.356943,1.167222],[9.811764,2.343698],[10.02611,2.168056]],[[8.856667,3.499444],[8.44611,3.274444],[8.68611,3.741666],[8.958887,3.703888],[8.856667,3.499444]]]}, -{code:"EE", name:"Estonia", lng:25.793, lat:58.674, borders:[[[23.990829,58.099998],[23.947773,58.147217],[24.022186,58.142746],[23.990829,58.099998]],[[22.990829,58.597771],[23.332775,58.441658],[21.99416,57.922768],[22.201385,58.144714],[21.83194,58.504997],[22.990829,58.597771]],[[23.364998,58.529991],[23.057774,58.60833],[23.247459,58.671051],[23.364998,58.529991]],[[23.277222,58.963051],[23.110828,59.024712],[23.391663,58.998047],[23.277222,58.963051]],[[22.749718,59.],[23.045277,58.83638],[22.042221,58.939987],[22.749718,59.]],[[25.780277,59.628876],[28.015831,59.4786],[28.170359,59.30978],[27.426105,58.813606],[27.823051,57.873878],[27.372059,57.535637],[26.511387,57.5261],[25.294998,58.084435],[24.31498,57.871826],[24.555553,58.327217],[23.728607,58.370827],[23.495548,58.694153],[23.874996,58.7686],[23.483051,58.80999],[23.464161,59.206383],[25.780277,59.628876]]]}, -{code:"ER", name:"Eritrea", lng:38.219, lat:16.045, borders:[[[40.087219,15.851665],[40.419441,15.573889],[39.977776,15.605],[40.087219,15.851665]],[[40.113327,16.055832],[39.979721,16.012218],[40.030273,16.095276],[40.113327,16.055832]],[[38.797775,17.653332],[39.721107,15.084166],[39.881386,15.489443],[40.17083,14.97361],[41.170555,14.6325],[43.121384,12.708332],[42.399719,12.469721],[40.228058,14.443506],[39.024021,14.655162],[38.44944,14.4175],[37.911385,14.88361],[37.572212,14.102253],[37.291664,14.451944],[36.542816,14.262053],[36.443283,15.149952],[36.973053,16.269444],[36.995827,17.073887],[37.423286,17.034214],[38.600693,17.994881],[38.797775,17.653332]]]}, -{code:"SV", name:"El Salvador", lng:-88.866, lat:13.736, borders:[[[-87.68627966,13.168333],[-87.72167938,13.168055],[-87.72297692,13.214722],[-87.68627966,13.168333]],[[-89.33970636,14.416111],[-88.47081039,13.855276],[-87.75019828,13.864166],[-87.81552152,13.405386],[-87.93769828,13.156387],[-88.53852844,13.194166],[-90.09635902,13.745832],[-89.3482212,14.431982],[-89.33970636,14.416111]]]}, -{code:"ET", name:"Ethiopia", lng:39.616, lat:8.626, borders:[[[36.542816,14.262053],[37.291664,14.451944],[37.572212,14.102253],[37.911385,14.88361],[38.44944,14.4175],[39.024021,14.655162],[40.228058,14.443506],[42.399719,12.469721],[41.828606,11.74],[41.789719,11.008055],[42.944092,11.002438],[42.663055,10.6325],[42.848053,10.22361],[44.010551,9.007221],[47.01194,8.00111],[47.988243,8.004107],[44.950829,4.902499],[43.686386,4.891944],[41.905167,3.980322],[41.171387,3.9425],[40.783768,4.287975],[39.524437,3.406389],[38.121109,3.611666],[37.039719,4.375555],[35.940552,4.622499],[35.821663,5.32861],[35.301941,5.378055],[34.70472,6.677777],[33.711388,7.660277],[32.991104,7.924999],[33.252777,8.458611],[34.120552,8.577221],[34.28611,10.554165],[34.594444,10.887777],[34.864441,10.734999],[35.096939,11.826944],[35.70108,12.666115],[36.142693,12.706923],[36.542816,14.262053]]]}, -{code:"AT", name:"Austria", lng:14.912, lat:47.683, borders:[[[13.833611,48.773605],[14.70028,48.581379],[15.025833,49.018883],[16.946182,48.619064],[17.166386,48.012497],[17.053886,47.709442],[16.450554,47.698051],[16.713886,47.543884],[16.510555,47.00666],[16.111805,46.86972],[14.544998,46.407494],[13.718655,46.526611],[12.440554,46.690826],[12.127777,47.001663],[10.471235,46.871353],[9.598635,47.063835],[9.533569,47.274544],[9.566724,47.540451],[10.173332,47.274719],[10.478054,47.591942],[11.095554,47.396111],[12.735554,47.684166],[13.016666,47.470276],[12.758333,48.123886],[13.833611,48.773605]]]}, -{code:"CZ", name:"Czech Republic", lng:15.338, lat:49.743, borders:[[[14.70028,48.581379],[13.833611,48.773605],[12.674444,49.424995],[12.093704,50.322533],[14.309721,51.053604],[14.828333,50.865829],[16.341942,50.66111],[16.20583,50.423882],[16.641941,50.10833],[17.00222,50.216942],[16.890274,50.439438],[17.722775,50.319717],[17.657776,50.108055],[18.577221,49.914444],[18.851246,49.517357],[16.946182,48.619064],[15.025833,49.018883],[14.70028,48.581379]]]}, -{code:"GF", name:"French Guiana", lng:-53.241, lat:3.924, borders:[[[-53.49430846,5.572342],[-52.28521761,4.937499],[-52.03995505,4.331388],[-51.85054784,4.653333],[-51.68403603,4.034163],[-52.90966797,2.195833],[-54.60373653,2.329195],[-54.00108327,3.448333],[-54.47745505,4.747777],[-54.1669163,5.346944],[-53.93972757,5.744721],[-53.49430846,5.572342]]]}, -{code:"FI", name:"Finland", lng:26.272, lat:64.504, borders:[[[22.83361244,59.95638466],[23.07250023,59.95111275],[22.91750145,59.8983326],[22.83361244,59.95638466]],[[22.43888664,59.99582863],[22.35194588,60.06694221],[22.44055367,60.07249641],[22.43888664,59.99582863]],[[21.59805489,60.09805489],[21.48527718,60.11388588],[21.65555382,60.15555],[21.59805489,60.09805489]],[[21.74888802,60.11138344],[21.71555519,60.18305397],[21.8852787,60.17721748],[21.74888802,60.11138344]],[[21.39666557,60.17860603],[21.3852787,60.15666389],[21.26833153,60.18805122],[21.39666557,60.17860603]],[[22.00083351,60.12944221],[21.93749809,60.17000008],[22.06083488,60.20388985],[22.00083351,60.12944221]],[[25.84861183,60.19555092],[25.81055641,60.20416451],[25.87499809,60.21110725],[25.84861183,60.19555092]],[[22.82444572,60.22722054],[22.46946526,60.00000191],[22.44972038,60.21833229],[22.58777809,60.2025013],[22.82444572,60.22722054]],[[22.24222374,60.18110847],[22.21777916,60.21860695],[22.29444313,60.24860573],[22.24222374,60.18110847]],[[22.34222221,60.28305244],[22.06888771,60.26861],[22.09610939,60.30777931],[22.34222221,60.28305244]],[[22.38333321,60.28833199],[22.32527733,60.3347187],[22.47694588,60.32361031],[22.38333321,60.28833199]],[[21.98277855,60.32416725],[21.78999901,60.37249947],[21.80750084,60.46555519],[21.98277855,60.32416725]],[[21.75166512,60.49833107],[21.68444633,60.45277596],[21.73000145,60.52027321],[21.76333427,60.52250099],[21.75166512,60.49833107]],[[21.48333168,60.52027321],[21.43250084,60.46972084],[21.32194328,60.54305458],[21.48333168,60.52027321]],[[21.32888985,60.48111153],[21.27583504,60.47805214],[21.22694588,60.55249977],[21.32888985,60.48111153]],[[21.29027748,60.61222267],[21.2891674,60.56138802],[21.21416664,60.61972237],[21.29027748,60.61222267]],[[21.3275013,60.87722206],[21.25416756,60.9588871],[21.3572216,60.92194557],[21.3275013,60.87722206]],[[21.0802784,63.28138924],[21.4272213,63.19693947],[21.24694633,63.14472389],[21.0802784,63.28138924]],[[22.18083382,63.26527596],[22.04083443,63.30694008],[22.19249916,63.32193947],[22.18083382,63.26527596]],[[21.32333183,63.28916359],[21.23194313,63.3255558],[21.38110924,63.34111214],[21.32333183,63.28916359]],[[22.87360954,63.79999733],[22.67138863,63.79444313],[22.80611229,63.87693977],[22.87360954,63.79999733]],[[24.7349987,64.94444466],[24.55166817,65.0249958],[25.03500175,65.0361042],[24.7349987,64.94444466]],[[24.46222115,65.76388741],[24.43694496,65.76971626],[24.50305367,65.78055],[24.46222115,65.76388741]],[[28.16583443,69.91221809],[29.17611122,69.63527107],[28.78416634,69.16055489],[28.95734215,69.05162239],[28.43194389,68.89694405],[28.82055473,68.84443855],[28.45749855,68.53193855],[28.69333458,68.19749641],[30.02861214,67.69471931],[29.07499886,66.89583015],[30.13416481,65.71916389],[29.81888771,65.65332222],[29.63666725,64.92805672],[30.57805443,64.22137642],[29.99333382,63.74360847],[31.58893013,62.91441536],[27.80783272,60.54640388],[26.49722099,60.44693947],[26.65916634,60.64750099],[25.92000008,60.24166298],[22.90972328,59.80499458],[23.33833504,60.01999855],[22.87444496,60.1455555],[23.08694267,60.34694099],[23.05583382,60.35333443],[22.66277885,60.22222328],[22.57499886,60.21055031],[22.44722176,60.24444008],[22.63222313,60.39193916],[21.35861015,60.65361214],[21.66805458,61.54694557],[21.06472206,62.61222267],[21.68610954,63.0249958],[21.49777794,63.21000099],[22.33722115,63.27360725],[22.18805504,63.46305275],[23.31888771,63.89666176],[24.34333229,64.52360725],[24.54222298,64.80249214],[25.44722176,64.95471382],[25.31083488,65.51111031],[24.66916847,65.65471077],[24.68916512,65.89610481],[24.16700935,65.81402779],[23.66194344,66.31221199],[24.00777626,66.80055428],[23.57166481,67.15666389],[23.7677784,67.41610909],[23.43111229,67.46554756],[23.6661129,67.94166756],[21.80916786,68.57054329],[20.58093071,69.06030464],[21.32083321,69.32611275],[22.3983326,68.71110725],[23.97638893,68.83249092],[24.93491936,68.58081245],[25.76111031,68.98916817],[25.94583321,69.67332649],[26.44999886,69.92721748],[28.16583443,69.91221809]],[[25.6772213,60.23499489],[25.56110954,60.2658329],[25.59805489,60.20777321],[25.6772213,60.23499489]],[[23.70582771,59.92721748],[23.53832817,59.96027565],[23.37000084,59.91138649],[23.70582771,59.92721748]]]}, -{code:"FJ", name:"Fiji", lng:177.974, lat:-17.819, borders:[[[-178.70776334,-20.67443495],[-178.73715223,-20.66609936],[-178.7303775,-20.64609181],[-178.70776334,-20.67443495]],[[-178.21142556,-19.85248157],[-178.20968659,-19.826382],[-178.19790609,-19.83582338],[-178.21142556,-19.85248157]],[[-178.39651489,-19.18499412],[-178.42504866,-19.17747847],[-178.39849814,-19.1291623],[-178.39651489,-19.18499412]],[[179.779694,-19.19525545],[179.740234,-19.18804563],[179.773041,-19.12331007],[179.779694,-19.19525545]],[[-178.53854344,-19.1819456],[-178.59689366,-19.15581151],[-178.58578486,-19.11359037],[-178.53854344,-19.1819456]],[[178.498291,-18.98998247],[177.95108,-19.13136635],[178.306915,-18.93553875],[178.498291,-18.98998247]],[[-178.93658402,-18.98943684],[-178.96710217,-18.97832904],[-178.94924964,-18.92581905],[-178.93658402,-18.98943684]],[[-179.78350867,-18.94637323],[-179.86865283,-19.00527608],[-179.84494041,-18.92249722],[-179.78350867,-18.94637323]],[[178.528046,-18.91082427],[178.476624,-18.88305628],[178.521637,-18.85969939],[178.528046,-18.91082427]],[[-178.49844331,-18.67470127],[-178.50650059,-18.63525733],[-178.47299192,-18.65052843],[-178.49844331,-18.67470127]],[[179.91275,-18.64192951],[179.837463,-18.576382],[179.963867,-18.54055772],[179.91275,-18.64192951]],[[177.6633,-18.59026299],[177.61911,-18.53832616],[177.630798,-18.4919132],[177.6633,-18.59026299]],[[178.132721,-18.41749146],[178.109406,-18.40747092],[178.139709,-18.35194394],[178.132721,-18.41749146]],[[-178.77828963,-18.24969517],[-178.82836942,-18.18997237],[-178.74734505,-18.201382],[-178.77828963,-18.24969517]],[[179.351898,-18.12110502],[179.245789,-18.03636591],[179.266663,-17.93608138],[179.351898,-18.12110502]],[[-179.0117185,-17.99526255],[-179.06811561,-17.93248723],[-178.99105873,-17.95080985],[-179.0117185,-17.99526255]],[[-178.28674347,-17.96607994],[-178.34774764,-17.89413456],[-178.24429353,-17.91776277],[-178.28674347,-17.96607994]],[[179.421906,-17.84832027],[179.392761,-17.78636591],[179.421082,-17.79719939],[179.421906,-17.84832027]],[[-179.29244994,-17.78388254],[-179.33096338,-17.77193028],[-179.31903059,-17.72750809],[-179.29244994,-17.78388254]],[[178.820251,-17.74275967],[178.747742,-17.71970361],[178.791931,-17.62110502],[178.820251,-17.74275967]],[[-179.14193755,-17.47693594],[-179.17877202,-17.43305538],[-179.14328009,-17.43109913],[-179.14193755,-17.47693594]],[[178.280823,-17.40303831],[178.67804,-18.07831173],[177.299133,-18.07858304],[177.510254,-17.50941486],[178.280823,-17.40303831]],[[177.112457,-17.31443073],[177.10025,-17.27109181],[177.141937,-17.24776843],[177.112457,-17.31443073]],[[-179.12844808,-17.28358871],[-179.16262845,-17.25081295],[-179.12124678,-17.25859491],[-179.12844808,-17.28358871]],[[179.399414,-17.39443539],[179.357178,-17.25941486],[179.433044,-17.24221404],[179.399414,-17.39443539]],[[-178.92529294,-17.25720981],[-178.98583969,-17.3180504],[-179.01998906,-17.15303831],[-178.92529294,-17.25720981]],[[177.263611,-17.12358138],[177.177185,-17.16359747],[177.281097,-17.05193684],[177.263611,-17.12358138]],[[178.333038,-16.83582638],[178.282196,-16.83386613],[178.277191,-16.78944394],[178.333038,-16.83582638]],[[179.947479,-17.0027732],[179.882446,-16.96414921],[180.,-16.78737307],[179.947479,-17.0027732]],[[-179.99325527,-16.95524646],[-179.86151153,-16.68030522],[-179.82098384,-16.78107031],[-179.99325527,-16.95524646]],[[177.443024,-16.83775711],[177.559967,-16.67748247],[177.593018,-16.68777132],[177.443024,-16.83775711]],[[179.929413,-16.65913434],[179.914154,-16.66193806],[179.88443,-16.65747092],[179.916656,-16.62581595],[179.947754,-16.61304874],[179.929413,-16.65913434]],[[180.,-16.53788766],[179.981079,-16.52444416],[180.,-16.49425139],[180.,-16.53788766]],[[-179.97598244,-16.53524812],[-179.98843378,-16.47693594],[-179.89630161,-16.43110313],[-179.97598244,-16.53524812]],[[179.958008,-16.19749101],[179.478577,-16.70111068],[179.932465,-16.46083038],[179.950256,-16.51303453],[179.871338,-16.66498557],[179.951904,-16.7419132],[179.902191,-16.76943239],[179.265808,-16.69054752],[178.747192,-17.01194726],[178.478851,-16.78165397],[179.958008,-16.19749101]],[[-179.968628,-16.16759508],[-180.,-16.15471624],[-179.94094808,-16.12833835],[-179.968628,-16.16759508]],[[177.119415,-12.51443889],[177.026917,-12.50721181],[177.11911,-12.48471465],[177.119415,-12.51443889]]]}, -{code:"FK", name:"Falkland Islands", lng:-58.694, lat:-51.665, borders:[[[-59.69162778,-52.24275167],[-59.7611008,-52.27356718],[-59.75331883,-52.16995982],[-59.68384582,-52.17273702],[-59.69162778,-52.24275167]],[[-58.43499012,-52.09384914],[-58.53385902,-52.02444416],[-58.43248723,-51.99024979],[-58.43499012,-52.09384914]],[[-61.22440354,-51.86470815],[-61.31385058,-51.82469206],[-61.21498868,-51.79719539],[-61.22440354,-51.86470815]],[[-61.03440066,-51.8694456],[-60.86775167,-51.90330463],[-61.14944416,-51.84886191],[-60.94054452,-51.8002399],[-61.03440066,-51.8694456]],[[-61.1958236,-51.69941675],[-61.31581883,-51.73355109],[-61.30498535,-51.6930464],[-61.1958236,-51.69941675]],[[-59.21052554,-51.41054496],[-60.36802698,-52.15912634],[-60.98083492,-52.06195037],[-60.18052698,-51.75886523],[-60.63827533,-51.72216797],[-60.16359747,-51.66136191],[-60.64219683,-51.35549957],[-60.1321793,-51.49471292],[-60.01943239,-51.38000477],[-59.21052554,-51.41054496]],[[-58.69663955,-51.33666984],[-58.22690542,-51.65438889],[-58.27938889,-51.41745794],[-57.91190354,-51.37635058],[-57.76164243,-51.53832216],[-58.14273846,-51.55383305],[-57.73137655,-51.69217641],[-58.94054452,-51.80193284],[-58.64693428,-52.06717641],[-59.28968074,-52.00412778],[-59.03521761,-52.14382973],[-59.44914243,-52.14083825],[-59.34804496,-52.34304019],[-59.71804019,-52.1210705],[-58.69663955,-51.33666984]],[[-59.93553175,-51.35082216],[-60.02525311,-51.29773702],[-59.90608182,-51.3030171],[-59.93553175,-51.35082216]],[[-60.11051134,-51.40526588],[-60.3002399,-51.27139264],[-60.0680464,-51.30748723],[-60.11051134,-51.40526588]],[[-59.5083236,-51.33748579],[-59.81108138,-51.26969871],[-59.47914099,-51.26469395],[-59.5083236,-51.33748579]]]}, -{code:"FM", name:"Micronesia, Federated States of", lng:158.235, lat:6.883, borders:[[[153.674408,5.286943],[153.659973,5.291666],[153.711365,5.319721],[153.674408,5.286943]],[[163.007477,5.263055],[162.904144,5.307221],[163.016388,5.378332],[163.007477,5.263055]],[[143.063599,6.707222],[143.054688,6.714722],[143.063599,6.719443],[143.063599,6.707222]],[[149.320251,6.698332],[149.313293,6.702499],[149.324982,6.721944],[149.320251,6.698332]],[[157.9422,6.71861],[157.931915,6.721944],[157.952454,6.734444],[157.9422,6.71861]],[[157.973572,6.738332],[157.964142,6.74111],[157.992737,6.751944],[157.973572,6.738332]],[[158.29776,6.78611],[158.120789,6.929721],[158.318848,6.930277],[158.29776,6.78611]],[[158.253876,6.983333],[158.241638,6.992777],[158.259979,7.000278],[158.253876,6.983333]],[[151.860504,7.31861],[151.839966,7.370276],[151.866638,7.35861],[151.860504,7.31861]],[[149.20163,7.363333],[149.194702,7.361388],[149.203033,7.376388],[149.20163,7.363333]],[[149.191345,7.375554],[149.177765,7.382499],[149.188019,7.384444],[149.191345,7.375554]],[[143.920258,7.379721],[143.911926,7.382499],[143.914154,7.391388],[143.920258,7.379721]],[[151.63916,7.326666],[151.5672,7.34111],[151.608307,7.395277],[151.63916,7.326666]],[[151.911652,7.444999],[151.85495,7.423888],[151.866638,7.463888],[151.911652,7.444999]],[[146.193298,7.504167],[146.179688,7.510833],[146.187195,7.515555],[146.193298,7.504167]],[[149.674988,8.575554],[149.659424,8.590275],[149.688873,8.617496],[149.674988,8.575554]],[[150.378021,8.617496],[150.373291,8.612776],[150.366638,8.626387],[150.378021,8.617496]],[[150.130249,8.978331],[150.118286,8.976387],[150.128021,8.992496],[150.130249,8.978331]],[[138.209137,9.523888],[138.060242,9.415276],[138.133606,9.571943],[138.209137,9.523888]]]}, -{code:"PF", name:"French Polynesia", lng:-149.462, lat:-17.626, borders:[[[-143.48236075,-27.91443994],[-143.50866713,-27.89083825],[-143.48385644,-27.90026111],[-143.48236075,-27.91443994]],[[-144.30746423,-27.64274646],[-144.32467606,-27.55332594],[-144.28549192,-27.57746926],[-144.30746423,-27.64274646]],[[-147.68963653,-23.88163766],[-147.72012369,-23.86525379],[-147.64849814,-23.85332904],[-147.68963653,-23.88163766]],[[-149.48321573,-23.40192053],[-149.52520711,-23.37387822],[-149.45709264,-23.36165664],[-149.48321573,-23.40192053]],[[-135.05181877,-23.16387179],[-135.06289656,-23.15611234],[-135.03152442,-23.14331861],[-135.05181877,-23.16387179]],[[-134.98541227,-23.13942763],[-135.01544186,-23.12164665],[-134.94116236,-23.08582338],[-134.98541227,-23.13942763]],[[-152.8599547,-22.65635714],[-152.84536697,-22.60498846],[-152.82617189,-22.63417006],[-152.8599547,-22.65635714]],[[-151.36538703,-22.51861545],[-151.38757363,-22.42581905],[-151.35015845,-22.46471836],[-151.36538703,-22.51861545]],[[-138.71472136,-22.27163744],[-138.79660072,-22.22027176],[-138.74346955,-22.20442551],[-138.71472136,-22.27163744]],[[-140.609283,-21.71915397],[-140.6685182,-21.70832449],[-140.66656495,-21.65581151],[-140.609283,-21.71915397]],[[-144.95596338,-19.92331717],[-144.96490464,-19.9291684],[-144.95815991,-19.89527486],[-144.95596338,-19.92331717]],[[-150.64782744,-17.66248369],[-150.66940319,-17.64527486],[-150.64523334,-17.64247514],[-150.64782744,-17.66248369]],[[-149.21142556,-17.73388244],[-149.1789553,-17.87080418],[-149.63238558,-17.54997659],[-149.21142556,-17.73388244]],[[-149.84841948,-17.5736048],[-149.93725572,-17.48415775],[-149.78613263,-17.46915397],[-149.84841948,-17.5736048]],[[-149.53219612,-16.97443806],[-149.5428775,-16.97498369],[-149.54394577,-16.96442053],[-149.53219612,-16.97443806]],[[-149.57226525,-16.96969961],[-149.59185789,-16.97998846],[-149.58599814,-16.95609293],[-149.57226525,-16.96969961]],[[-150.99826003,-16.82414643],[-151.03979498,-16.78611711],[-150.99429353,-16.7624889],[-150.99826003,-16.82414643]],[[-151.40020711,-16.88830985],[-151.476471,-16.89527486],[-151.47491417,-16.74025379],[-151.40020711,-16.88830985]],[[-151.03808602,-16.76970271],[-151.03741417,-16.69302388],[-151.0071713,-16.7446904],[-151.03808602,-16.76970271]],[[-151.45815991,-16.67331717],[-151.53219613,-16.58942053],[-151.44097908,-16.59916274],[-151.45815991,-16.67331717]],[[-151.74844331,-16.53442717],[-151.77587881,-16.47332427],[-151.742126,-16.49082594],[-151.74844331,-16.53442717]],[[-146.33578486,-16.16471526],[-146.38433883,-16.11027154],[-146.33493088,-16.11304874],[-146.33578486,-16.16471526]],[[-148.23519898,-15.84860785],[-148.26519758,-15.84694643],[-148.28350867,-15.80083431],[-148.23519898,-15.84860785]],[[-144.62170434,-15.74859764],[-144.64633161,-15.73887794],[-144.63366698,-15.70805218],[-144.62170434,-15.74859764]],[[-138.65652442,-10.54971653],[-138.69552628,-10.43110113],[-138.61822527,-10.46555157],[-138.65652442,-10.54971653]],[[-139.10736075,-9.97805772],[-139.12564084,-9.90611234],[-139.04766798,-9.91415636],[-139.10736075,-9.97805772]],[[-138.95513939,-9.74304424],[-138.80941748,-9.74499123],[-139.1724247,-9.78026588],[-138.95513939,-9.74304424]],[[-140.07705688,-9.45055179],[-140.14758316,-9.3805524],[-140.08599814,-9.32472058],[-140.07705688,-9.45055179]],[[-139.58251906,-8.87359764],[-139.50411978,-8.91721714],[-139.61190795,-8.9563755],[-139.58251906,-8.87359764]],[[-140.02630638,-8.90110358],[-140.18920911,-8.9541592],[-140.24975572,-8.80276704],[-140.02630638,-8.90110358]],[[-140.70471183,-8.04416513],[-140.70968659,-7.96555057],[-140.63757363,-7.95944591],[-140.70471183,-8.04416513]],[[-140.58493088,-7.92388832],[-140.6060182,-7.9136061],[-140.56289656,-7.88833173],[-140.58493088,-7.92388832]]]}, -{code:"FR", name:"France", lng:2.550, lat:46.565, borders:[[[9.485832,42.615273],[9.49472,42.603607],[9.457777,42.643326],[9.485832,42.615273]],[[9.446665,42.678886],[9.553333,42.115555],[9.180832,41.364716],[8.789165,41.558052],[8.575832,42.383606],[9.293888,42.675552],[9.353054,43.003883],[9.446665,42.678886]],[[-1.19444431,45.822495],[-1.40166628,46.050552],[-1.23305423,45.964722],[-1.19444431,45.822495]],[[-1.26083348,46.156387],[-1.55305553,46.244995],[-1.47444378,46.255829],[-1.26083348,46.156387]],[[-2.27083112,46.693329],[-2.36388657,46.698051],[-2.38499664,46.725555],[-2.27083112,46.693329]],[[-2.19694157,47.01722],[-2.1449971,46.90583],[-2.28472075,47.020554],[-2.19694157,47.01722]],[[-3.0666643,47.306664],[-3.21583333,47.302498],[-3.25860854,47.376106],[-3.0666643,47.306664]],[[-5.05499298,48.454163],[-5.1347167,48.458328],[-5.06471731,48.483055],[-5.05499298,48.454163]],[[-3.57666476,48.803886],[-3.5755556,48.812492],[-3.56333302,48.808609],[-3.57666476,48.803886]],[[2.541667,51.09111],[4.165,50.283051],[4.149238,49.978371],[4.832503,50.16861],[4.873055,49.797218],[5.80788,49.545044],[6.36217,49.459389],[8.226078,48.964417],[7.578888,48.11972],[7.588268,47.58448],[6.990555,47.497215],[5.966666,46.209442],[6.791389,46.434166],[7.038054,45.931938],[6.79897,45.78067],[7.127777,45.257774],[6.61976,45.110138],[7.031666,44.831383],[6.976388,44.284164],[7.662222,44.17083],[7.528055,43.788605],[7.439293,43.757523],[7.416111,43.770554],[7.387777,43.748604],[7.391609,43.727547],[6.165277,43.050552],[5.031388,43.556664],[3.964722,43.540833],[3.081388,43.069443],[3.177655,42.436806],[1.723611,42.509438],[1.78172,42.569962],[1.445833,42.601944],[-0.56222105,42.781387],[-1.78087532,43.359924],[-1.03611076,44.675278],[-1.25027704,44.662498],[-1.08388711,45.564438],[-0.53666674,44.895554],[-0.77666628,45.461105],[-1.24083256,45.70166],[-1.06777727,45.908882],[-1.11463403,46.316582],[-2.13083134,46.838333],[-1.98416529,47.034439],[-2.17083318,47.126663],[-2.13416644,47.278053],[-1.72861098,47.210831],[-2.00333028,47.31916],[-2.28916399,47.238884],[-2.54027696,47.296661],[-2.36111037,47.504166],[-2.69805453,47.637215],[-3.10638718,47.472221],[-4.36638383,47.804161],[-4.72613614,48.040581],[-4.18610427,48.299995],[-4.77777825,48.509438],[-3.22083165,48.870552],[-2.68527788,48.501663],[-1.36888871,48.643608],[-1.94166621,49.723885],[-1.26416666,49.684166],[-1.11388848,49.365273],[0.424722,49.45166],[0.074167,49.526665],[1.461111,50.124161],[1.625,50.877777],[2.541667,51.09111]]]}, -{code:"GM", name:"Gambia", lng:-15.386, lat:13.453, borders:[[[-16.73164787,13.44972],[-16.20080585,13.251665],[-16.16220837,13.425278],[-15.29582555,13.491665],[-16.14386024,13.454166],[-16.39470271,13.330555],[-16.56564714,13.589998],[-15.07027071,13.826387],[-13.79860075,13.406387],[-14.35109747,13.237778],[-15.11165964,13.595833],[-15.28499007,13.374443],[-15.80361151,13.347776],[-15.8097228,13.159721],[-16.7508655,13.059977],[-16.73164787,13.44972]]]}, -{code:"GA", name:"Gabon", lng:11.797, lat:-0.591, borders:[[[9.00777626,-0.7677784],[8.94666481,-0.65833282],[9.00666618,-0.5988884],[9.00777626,-0.7677784]],[[12.52361107,2.28333473],[13.29389,2.16361046],[13.18678474,1.22247505],[14.18889046,1.39138985],[14.48722267,0.91361046],[13.84833336,-0.19861031],[14.51861,-0.6091671],[14.42972374,-1.89166641],[14.11083412,-2.49305534],[13.76222038,-2.08888817],[13.48277855,-2.4375],[13.00150871,-2.36767197],[12.64999962,-1.82250023],[12.47805595,-2.32722092],[11.57416725,-2.33333206],[11.92583275,-3.63694382],[11.49694633,-3.50694466],[11.14066124,-3.9252758],[9.70083427,-2.44555473],[10.13055611,-2.52000046],[9.61527824,-2.37666702],[8.98305702,-1.2341671],[9.51388741,-1.59666634],[8.71000099,-0.64111137],[9.01388741,-0.81916618],[9.29833412,-0.37166595],[9.34750175,0.36305809],[9.92111015,0.18527794],[9.30360985,0.52833366],[9.60000038,0.48111153],[9.56472206,0.98305702],[9.80397606,1.00260735],[11.35388756,1.00194359],[11.33976555,2.16861153],[12.52361107,2.28333473]],[[9.55444527,0.27444649],[9.54444313,0.28500175],[9.53805733,0.27083397],[9.55444527,0.27444649]]]}, -{code:"GE", name:"Georgia", lng:43.518, lat:42.176, borders:[[[41.547623,42.405777],[41.428596,42.738045],[40.002968,43.379265],[40.253387,43.58252],[42.849991,43.179153],[43.911934,42.583321],[44.934708,42.760277],[46.451752,41.897057],[46.194427,41.685822],[46.693871,41.312202],[46.520821,41.049988],[45.336655,41.462494],[45.022942,41.29705],[43.46077,41.112961],[42.827492,41.584991],[41.531559,41.523876],[41.776093,41.841927],[41.547623,42.405777]]]}, -{code:"GH", name:"Ghana", lng:-1.207, lat:7.960, borders:[[[0.63953,5.845486],[0.662222,5.754167],[0.255833,5.757777],[-0.79555518,5.208055],[-1.6133325,5.020833],[-2.05888596,4.730833],[-3.10304039,5.085022],[-3.10226825,5.109545],[-2.92812658,5.100222],[-2.7644437,5.579166],[-3.24916598,6.611388],[-2.48777742,8.197777],[-2.68555945,9.481817],[-2.83404664,11.002007],[-0.61833273,10.911665],[-0.14976183,11.13854],[0.368333,10.259443],[0.2175,9.457222],[0.550833,9.411388],[0.382735,8.760756],[0.727222,8.321388],[0.525,6.947778],[1.198891,6.100546],[0.692222,5.748055],[0.634444,5.948055],[0.51209,6.055245],[0.208197,6.089699],[0.488889,6.043611],[0.63953,5.845486]]]}, -{code:"GD", name:"Grenada", lng:-61.678, lat:12.118, borders:[[[-61.74688745,11.997499],[-61.61193095,12.23111],[-61.62858615,12.048054],[-61.74688745,11.997499]],[[-61.57997114,12.295555],[-61.58911169,12.298054],[-61.57887988,12.323055],[-61.57997114,12.295555]],[[-61.42829142,12.453609],[-61.49688745,12.443609],[-61.43438745,12.529165],[-61.42829142,12.453609]]]}, -{code:"GL", name:"Greenland", lng:-41.391, lat:74.719, borders:[[[-43.64802551,59.84749031],[-44.11552429,59.82916451],[-43.95802307,59.97971535],[-43.64802551,59.84749031]],[[-43.29496002,59.92083168],[-43.3277359,59.99721718],[-43.20415497,59.96832466],[-43.29496002,59.92083168]],[[-44.31385803,59.87193489],[-44.24411774,60.01166725],[-43.99221039,60.00833321],[-44.31385803,59.87193489]],[[-43.3999939,59.92610359],[-43.50914001,59.91249275],[-43.45328522,60.0380497],[-43.3999939,59.92610359]],[[-43.35414124,60.08443642],[-43.13109589,60.05526924],[-44.13272858,60.1408329],[-43.35414124,60.08443642]],[[-44.40940857,59.94777107],[-44.49749756,60.00860786],[-44.43439484,60.14138222],[-44.20165253,60.04610634],[-44.40940857,59.94777107]],[[-45.23246765,60.14332771],[-45.29998016,60.14583015],[-45.26611328,60.18749428],[-45.23246765,60.14332771]],[[-45.36497688,60.18526649],[-45.35387421,60.38249397],[-45.15222168,60.37638283],[-45.36497688,60.18526649]],[[-45.95470428,60.61554909],[-45.99694824,60.62665749],[-45.98274231,60.67276955],[-45.96134186,60.68387794],[-45.78331757,60.66082191],[-45.95470428,60.61554909]],[[-45.88861084,60.69582558],[-45.98519516,60.69222832],[-46.09189606,60.63555336],[-46.20470428,60.67276955],[-46.0069046,60.70638466],[-45.88861084,60.69582558]],[[-46.34555054,60.66805458],[-46.49939728,60.69915962],[-46.27722168,60.7722187],[-46.34555054,60.66805458]],[[-47.7541275,60.8047123],[-47.90276337,60.67638588],[-48.2388916,60.79554939],[-47.7541275,60.8047123]],[[-46.98023224,60.77276802],[-47.04943085,60.80526924],[-47.01110077,60.80804634],[-46.98023224,60.77276802]],[[-47.16136932,60.79805183],[-47.22691345,60.81805611],[-47.15276337,60.81666756],[-47.16136932,60.79805183]],[[-47.23138428,60.84193611],[-47.25859833,60.85582924],[-47.17829132,60.87193489],[-47.23138428,60.84193611]],[[-47.10191345,60.82277107],[-47.19245148,60.83582497],[-47.08356476,60.87471199],[-47.10191345,60.82277107]],[[-46.75358582,60.75027657],[-46.84500122,60.76055336],[-46.16441345,60.92249489],[-46.75358582,60.75027657]],[[-47.02939606,60.8972187],[-47.05024719,60.89527321],[-46.95802307,60.92555428],[-47.02939606,60.8972187]],[[-47.14083862,60.87915993],[-47.17165375,60.88360786],[-47.07333374,60.92666054],[-47.14083862,60.87915993]],[[-46.46634674,60.92222023],[-46.51415253,60.93055153],[-46.52661896,60.98888588],[-46.51856232,60.99360847],[-46.42944336,60.97582436],[-46.46634674,60.92222023]],[[-48.07360077,61.05388069],[-48.3705368,61.07860756],[-48.24330139,61.0986042],[-48.07360077,61.05388069]],[[-48.93439484,61.24916267],[-48.87412262,61.30138588],[-48.72413635,61.29138374],[-48.93439484,61.24916267]],[[-48.58329773,61.31276894],[-48.83301544,61.33499336],[-48.52330017,61.36110878],[-48.58329773,61.31276894]],[[-42.45301056,61.44137764],[-42.49662018,61.45499611],[-42.38969421,61.48888588],[-42.45301056,61.44137764]],[[-49.08972168,61.63333321],[-49.19441223,61.66221046],[-49.14944458,61.70054817],[-49.08972168,61.63333321]],[[-49.39219666,61.7069416],[-49.48524475,61.75139046],[-49.3499527,61.74305153],[-49.39219666,61.7069416]],[[-42.26916504,61.75027657],[-42.08444214,61.87499428],[-42.12107849,61.77276802],[-42.26916504,61.75027657]],[[-49.44055176,61.87471199],[-49.63414001,61.93082619],[-49.41941833,61.93055153],[-49.44055176,61.87471199]],[[-49.66333008,62.18027687],[-49.79833984,62.21388435],[-49.65026093,62.23777199],[-49.66333008,62.18027687]],[[-42.27722168,62.57721901],[-42.13109589,62.56471443],[-42.12554169,62.49638557],[-42.27722168,62.57721901]],[[-41.99607849,62.7749958],[-41.86193085,62.73472023],[-42.44773102,62.75139046],[-41.99607849,62.7749958]],[[-41.56135559,62.87360573],[-41.58857727,63.00249672],[-41.4582901,63.01638985],[-41.56135559,62.87360573]],[[-50.63665009,63.07388496],[-50.67023468,63.02527046],[-50.75500488,63.06193733],[-50.63665009,63.07388496]],[[-41.33383942,63.05027199],[-41.5263443,63.08138466],[-41.3733139,63.10999489],[-41.33383942,63.05027199]],[[-41.20944214,63.15777016],[-41.18439484,63.12276649],[-41.46634674,63.171381],[-41.20944214,63.15777016]],[[-50.79969788,63.08166695],[-50.78805542,63.18665504],[-50.68276215,63.11666298],[-50.79969788,63.08166695]],[[-50.61802673,63.11471748],[-50.61220551,63.20166206],[-50.46858978,63.15332222],[-50.61802673,63.11471748]],[[-41.09581757,63.22110176],[-41.43080139,63.23137856],[-41.87189484,63.46666145],[-41.09581757,63.22110176]],[[-51.2735672,63.47693825],[-51.35800934,63.48333168],[-51.20470428,63.49916267],[-51.2735672,63.47693825]],[[-52.00080872,64.12776375],[-52.06358337,64.1638813],[-51.90581512,64.1888752],[-52.00080872,64.12776375]],[[-40.67415619,64.29136848],[-40.67944336,64.20860481],[-41.05274963,64.23275948],[-40.67415619,64.29136848]],[[-41.12554169,64.28831673],[-41.37412262,64.28499031],[-41.29692078,64.31721687],[-41.12554169,64.28831673]],[[-51.56717682,64.25610542],[-51.43967438,64.3624897],[-51.32137299,64.32638741],[-51.56717682,64.25610542]],[[-51.23970795,64.21470833],[-51.34189606,64.25332832],[-51.02498627,64.54942513],[-50.81913757,64.5416584],[-51.23970795,64.21470833]],[[-51.32360077,64.3735981],[-51.42138672,64.41331673],[-51.09189606,64.56666756],[-51.32360077,64.3735981]],[[-52.08301544,64.59137154],[-52.14192963,64.59776497],[-52.14916992,64.62719917],[-52.11999512,64.6291523],[-52.08301544,64.59137154]],[[-40.17998505,64.43109322],[-40.86470795,64.90860176],[-40.54273224,64.84414864],[-40.17998505,64.43109322]],[[-40.49580383,65.01527596],[-40.62527466,65.03859138],[-40.55634308,65.07388496],[-40.49580383,65.01527596]],[[-52.39660835,65.10942268],[-52.36138916,65.18692207],[-52.24498749,65.18165779],[-52.39660835,65.10942268]],[[-39.4944458,65.31999397],[-39.56440163,65.26582527],[-39.80444336,65.33387947],[-39.4944458,65.31999397]],[[-39.27776337,65.46138191],[-39.38691711,65.50193977],[-39.2388916,65.50860786],[-39.27776337,65.46138191]],[[-52.92829132,65.42526436],[-53.08776093,65.49247932],[-52.87189484,65.51361275],[-52.92829132,65.42526436]],[[-38.84913635,65.51860237],[-38.95856476,65.51776314],[-38.76110077,65.5416584],[-38.84913635,65.51860237]],[[-37.0375061,65.53276253],[-37.19152069,65.5326252],[-37.21330261,65.57805061],[-37.0375061,65.53276253]],[[-52.99498749,65.54887581],[-53.23246765,65.59832954],[-52.84805298,65.64415169],[-52.99498749,65.54887581]],[[-36.9955368,65.58442879],[-37.21248627,65.68441963],[-36.99221039,65.70109749],[-36.9955368,65.58442879]],[[-37.39416504,65.81360054],[-37.48497009,65.60721016],[-37.98916626,65.69832039],[-37.39416504,65.81360054]],[[-36.79833984,65.75055122],[-36.94272614,65.81971931],[-36.77694702,65.86387825],[-36.79833984,65.75055122]],[[-36.31967926,65.82193184],[-36.37107849,65.87747383],[-36.18302917,65.87803841],[-36.31967926,65.82193184]],[[-36.61999512,65.79525948],[-36.73666382,65.80165291],[-36.74830627,65.90971565],[-36.50717926,65.9569416],[-36.61999512,65.79525948]],[[-53.52526093,66.04248238],[-53.67971039,66.0819416],[-53.42301178,66.08442879],[-53.52526093,66.04248238]],[[-35.49972534,66.17415047],[-35.5375061,66.22554207],[-35.38495636,66.24081612],[-35.49972534,66.17415047]],[[-33.86193085,66.79387093],[-33.97055054,66.83970833],[-33.88441467,66.87248421],[-33.86193085,66.79387093]],[[-53.07082367,66.86609077],[-52.86821747,66.8972187],[-53.46411896,66.79887581],[-53.07082367,66.86609077]],[[-33.43106842,67.14221382],[-33.47610474,67.1805439],[-33.34222412,67.20471382],[-33.43106842,67.14221382]],[[-33.25222778,67.29525948],[-33.3277359,67.33610725],[-33.2569046,67.37608528],[-33.25222778,67.29525948]],[[-53.65885925,67.67581367],[-53.76306152,67.77693367],[-53.58776093,67.73359871],[-53.65885925,67.67581367]],[[-53.3471756,68.00999641],[-53.47305298,68.06915474],[-53.22522736,68.05859566],[-53.3471756,68.00999641]],[[-51.29333496,68.10081673],[-52.00750732,68.07666206],[-51.20524788,68.12164497],[-51.29333496,68.10081673]],[[-29.83803177,68.14082527],[-30.01164627,68.20749092],[-29.69471359,68.20860481],[-29.83803177,68.14082527]],[[-52.07082367,68.1152668],[-52.31581879,68.16887093],[-51.45415497,68.25776863],[-52.07082367,68.1152668]],[[-52.9888916,68.35775948],[-53.21194458,68.40138435],[-53.01970673,68.49443245],[-52.85414124,68.433321],[-52.9888916,68.35775948]],[[-52.64165497,68.52998543],[-52.69468689,68.54609871],[-52.43940735,68.56080818],[-52.64165497,68.52998543]],[[-52.74972534,68.4847126],[-52.88414001,68.54887581],[-52.80939484,68.56860542],[-52.74972534,68.4847126]],[[-51.94190979,68.59443855],[-52.42138672,68.57138252],[-51.80329895,68.62719917],[-51.94190979,68.59443855]],[[-51.03527832,68.63943672],[-51.23274231,68.6666584],[-51.12940979,68.68275642],[-51.03527832,68.63943672]],[[-52.13468361,68.70109749],[-53.1205368,68.56414986],[-52.63414001,68.71026802],[-52.13468361,68.70109749]],[[-23.28666687,69.64109993],[-23.59304047,69.71304512],[-23.28944397,69.73831367],[-23.28666687,69.64109993]],[[-50.50527954,69.81053352],[-50.60637665,69.85637093],[-50.4096756,69.86110115],[-50.50527954,69.81053352]],[[-50.92328644,69.89276314],[-50.65385437,69.83665657],[-50.9582901,69.55053902],[-51.38800812,69.70526314],[-50.92328644,69.89276314]],[[-52.6930542,69.91748238],[-51.83329773,69.62608528],[-53.57469177,69.22943306],[-54.26916504,69.40220833],[-53.34745026,69.57971382],[-54.9944458,69.69470406],[-54.38942719,69.67526436],[-54.93608093,69.84553719],[-54.22942352,69.91304207],[-54.82969666,70.07832527],[-54.4291687,70.30970955],[-52.6930542,69.91748238]],[[-54.66136932,70.37248421],[-54.9347229,70.37553596],[-55.02776337,70.48304939],[-54.66136932,70.37248421]],[[-51.51273346,70.65387154],[-51.86165619,70.72221565],[-51.69245148,70.72776985],[-51.51273346,70.65387154]],[[-27.6852684,70.73387337],[-27.73693466,70.88220406],[-27.27610397,70.87498665],[-27.6852684,70.73387337]],[[-25.39470673,70.91165352],[-25.29442215,70.65971565],[-26.02972412,70.52110481],[-28.13665009,70.45471382],[-27.14957428,70.87439156],[-25.39470673,70.91165352]],[[-51.56581879,70.86470222],[-52.16218567,70.88665962],[-52.02302551,70.9791584],[-51.56581879,70.86470222]],[[-25.30887604,71.01443672],[-25.57915878,71.10220528],[-25.46055603,71.1041584],[-25.30887604,71.01443672]],[[-25.28250122,71.1319294],[-25.47275162,71.15054512],[-25.35969925,71.20526314],[-25.28250122,71.1319294]],[[-53.64916992,71.02415657],[-53.99024963,71.13136482],[-53.59805298,71.31331062],[-53.37635803,71.11499214],[-53.64916992,71.02415657]],[[-52.57137299,71.34610176],[-52.32833862,71.28776741],[-53.18439484,71.32138252],[-52.57137299,71.34610176]],[[-53.13359833,71.66192818],[-52.75609589,71.66026497],[-53.47441101,71.65248299],[-53.13359833,71.66192818]],[[-55.55912018,71.81915474],[-55.80552673,71.87886238],[-55.40995026,71.89027596],[-55.55912018,71.81915474]],[[-55.79611206,72.07054329],[-55.938591,72.07943916],[-55.72522736,72.12608528],[-55.79611206,72.07054329]],[[-55.37412262,72.15971565],[-55.68885803,72.19859505],[-55.0152359,72.37719917],[-55.37412262,72.15971565]],[[-55.06500244,72.52527046],[-55.3833313,72.54525948],[-55.03054047,72.58888435],[-55.06500244,72.52527046]],[[-55.65026093,72.58249092],[-55.99472046,72.55748177],[-55.9430542,72.59359932],[-55.65026093,72.58249092]],[[-55.13191223,72.60081673],[-55.26219177,72.59776497],[-54.94664764,72.6722126],[-55.13191223,72.60081673]],[[-54.83247375,72.69552803],[-55.0625,72.71832466],[-54.87249756,72.75694466],[-54.83247375,72.69552803]],[[-55.70415497,72.71499825],[-56.22610474,72.70610237],[-55.63942719,72.7777729],[-55.70415497,72.71499825]],[[-55.28554535,72.68109322],[-55.84941101,72.61137581],[-54.96472168,72.81137276],[-55.28554535,72.68109322]],[[-55.94664764,72.82361031],[-55.80166626,72.79248238],[-55.99221039,72.78665352],[-55.94664764,72.82361031]],[[-23.60861206,72.83499336],[-21.9324913,72.39915657],[-22.75693893,72.44136238],[-22.13414383,72.27165413],[-22.56277084,72.13888741],[-24.48442841,72.82582283],[-23.60861206,72.83499336]],[[-55.58634186,72.89027596],[-55.35245514,72.85220528],[-55.53663635,72.82249641],[-55.58634186,72.89027596]],[[-24.89663887,72.7777729],[-25.21083069,72.85165596],[-24.77136612,72.91081429],[-24.89663887,72.7777729]],[[-22.54916,73.00721931],[-21.86582565,72.71388435],[-24.58887482,72.95749092],[-22.54916,73.00721931]],[[-55.75331879,73.01138496],[-55.88969421,73.02581978],[-55.69387054,73.03221321],[-55.75331879,73.01138496]],[[-55.07556152,72.96554756],[-55.68913269,72.99359322],[-55.51856232,73.04582405],[-55.07556152,72.96554756]],[[-21.35333252,73.09137154],[-21.46276093,73.11859322],[-21.17304611,73.13443184],[-21.35333252,73.09137154]],[[-56.20192719,73.15555],[-56.33165741,73.1722126],[-56.27330017,73.21887398],[-56.20192719,73.15555]],[[-56.09777832,73.08638191],[-56.01720428,73.22859383],[-55.81555176,73.22470284],[-56.09777832,73.08638191]],[[-55.68635559,73.28276253],[-55.87162018,73.32777596],[-55.6541214,73.35637093],[-55.68635559,73.28276253]],[[-55.95388794,73.29915047],[-56.15331268,73.30415535],[-55.83078766,73.37330818],[-55.95388794,73.29915047]],[[-55.53162384,73.31805611],[-55.59385681,73.34414864],[-55.32833862,73.39499092],[-55.53162384,73.31805611]],[[-24.36000061,73.41192818],[-23.20998383,73.23359871],[-25.01025772,73.30941963],[-22.93858719,73.13472176],[-25.71276093,73.18637276],[-25.2908287,73.32777596],[-25.24303055,73.40582466],[-24.36000061,73.41192818]],[[-55.58972168,73.38109016],[-56.11579132,73.55664253],[-55.47081757,73.43193245],[-55.58972168,73.38109016]],[[-56.41027832,73.54193306],[-56.55857849,73.55636787],[-56.188591,73.62747383],[-56.41027832,73.54193306]],[[-56.34413147,73.67248726],[-56.83329773,73.61137581],[-56.96553802,73.65803719],[-56.34413147,73.67248726]],[[-56.36857605,73.76609993],[-56.205513,73.71832466],[-56.43689728,73.76805305],[-56.36857605,73.76609993]],[[-55.95666504,73.8347187],[-56.32333374,73.7833271],[-56.77722168,73.87581062],[-55.95666504,73.8347187]],[[-20.01611328,73.88443184],[-20.23469925,73.92637825],[-20.11359024,73.93275642],[-20.01611328,73.88443184]],[[-20.9269371,74.41998482],[-20.12388229,74.20109749],[-21.99082565,74.22720528],[-20.9269371,74.41998482]],[[-56.53081512,74.53055],[-56.46276093,74.50416756],[-57.55661774,74.48831367],[-56.53081512,74.53055]],[[-56.98274231,74.55359077],[-57.09555054,74.55748177],[-56.83857727,74.59166145],[-56.98274231,74.55359077]],[[-57.18527222,74.57609749],[-57.2818985,74.58166695],[-57.08301544,74.61303902],[-57.18527222,74.57609749]],[[-18.83860397,74.53831673],[-19.21997452,74.58110237],[-18.75277328,74.65609932],[-18.83860397,74.53831673]],[[-18.52999496,74.71220589],[-18.30054855,74.70526314],[-18.38305664,74.62025642],[-18.52999496,74.71220589]],[[-57.47637177,74.70610237],[-57.72718811,74.72192574],[-57.43106842,74.71748543],[-57.47637177,74.70610237]],[[-20.16691971,74.89749336],[-19.72914886,74.85859871],[-20.08443832,74.70277596],[-20.68777084,74.81164742],[-20.49303055,75.03082466],[-19.96055603,74.99247932],[-20.16691971,74.89749336]],[[-17.80833435,75.30609322],[-18.21526718,75.22526741],[-17.31971359,75.13109016],[-18.91553116,75.00416756],[-18.83914566,75.32832527],[-17.80833435,75.30609322]],[[-65.04943848,76.01388741],[-65.22102356,76.04553413],[-64.95556641,76.05497932],[-65.04943848,76.01388741]],[[-64.05552673,76.05941963],[-64.14611816,76.09305],[-64.01469421,76.11053658],[-64.05552673,76.05941963]],[[-61.89944458,76.12970161],[-61.96221924,76.17859077],[-61.88163757,76.18664742],[-61.89944458,76.12970161]],[[-20.34304047,76.26416206],[-20.66082382,76.33888435],[-20.15858841,76.34694099],[-20.34304047,76.26416206]],[[-69.9760437,76.39415169],[-70.18826294,76.43914986],[-69.8943634,76.43692207],[-69.9760437,76.39415169]],[[-20.38803864,76.45166206],[-20.49610901,76.47499275],[-20.26777267,76.49525642],[-20.38803864,76.45166206]],[[-21.35303116,76.47249031],[-21.48971176,76.48970222],[-21.2494278,76.49971199],[-21.35303116,76.47249031]],[[-20.79333496,76.38998604],[-21.14108658,76.44748116],[-20.72081757,76.51388741],[-20.79333496,76.38998604]],[[-69.66941833,76.53055],[-70.03636169,76.56331062],[-69.46472168,76.57943916],[-69.66941833,76.53055]],[[-20.71276093,76.56080818],[-20.93943405,76.52331734],[-20.62554169,76.57943916],[-20.71276093,76.56080818]],[[-21.08304977,76.56915474],[-21.54750061,76.6152668],[-20.96387863,76.6291523],[-21.08304977,76.56915474]],[[-19.64805603,76.69832039],[-19.85722351,76.7319355],[-19.60553551,76.7263813],[-19.64805603,76.69832039]],[[-18.65303802,76.60165596],[-18.63526154,75.88998604],[-19.14192963,76.52943611],[-18.76303482,76.58777046],[-19.01916122,76.75943184],[-18.65303802,76.60165596]],[[-19.69193649,76.78193855],[-19.8091507,76.78859138],[-19.58999252,76.81164742],[-19.69193649,76.78193855]],[[-20.19275284,76.82249641],[-20.38942719,76.84721565],[-20.21055603,76.86859322],[-20.19275284,76.82249641]],[[-71.94218445,77.30443001],[-72.57380676,77.4138813],[-71.34580994,77.37581062],[-71.94218445,77.30443001]],[[-70.66767883,77.45776558],[-70.05628967,77.39915657],[-71.29943848,77.44775581],[-70.66767883,77.45776558]],[[-66.19631958,77.50444221],[-66.66082764,77.48858833],[-66.73138428,77.50721931],[-66.19631958,77.50444221]],[[-19.83443832,77.50555611],[-20.04164505,77.56581306],[-19.83027267,77.55470467],[-19.83443832,77.50555611]],[[-66.90046692,77.59166145],[-66.97080994,77.59942818],[-66.62576294,77.63638496],[-66.90046692,77.59166145]],[[-18.03720856,77.66609383],[-18.2422142,77.67997932],[-17.58413887,77.83777046],[-18.03720856,77.66609383]],[[-19.94054794,77.96666145],[-19.22914886,77.82971382],[-19.77583313,77.83055305],[-20.49082565,77.95471382],[-19.94054794,77.96666145]],[[-19.54221725,77.91609383],[-19.69972229,77.96499825],[-19.61359024,77.97192574],[-19.54221725,77.91609383]],[[-21.31026459,77.88554573],[-21.42805481,77.92360115],[-21.1110878,78.01220894],[-21.31026459,77.88554573]],[[-20.53609085,78.01582527],[-20.63194275,78.03248787],[-20.36277771,78.05165291],[-20.53609085,78.01582527]],[[-19.27664566,78.11775398],[-19.3833313,78.12719917],[-19.29888916,78.17581367],[-19.27664566,78.11775398]],[[-19.04333496,78.07693672],[-19.19193649,78.11775398],[-18.82970047,78.17637825],[-19.04333496,78.07693672]],[[-20.91583252,78.14610481],[-21.04303551,78.18136787],[-20.85553551,78.16526985],[-20.91583252,78.14610481]],[[-20.52664566,78.16137886],[-20.78331757,78.19136238],[-20.30220795,78.21331978],[-20.52664566,78.16137886]],[[-19.49055481,78.24136543],[-19.59500122,78.24720955],[-19.42277527,78.27665901],[-19.49055481,78.24136543]],[[-19.15888977,78.2402668],[-19.35333252,78.2833271],[-18.88553238,78.29525948],[-19.15888977,78.2402668]],[[-19.6333313,78.27665901],[-19.6774826,78.38638496],[-19.49055481,78.33055305],[-19.6333313,78.27665901]],[[-19.28832626,78.3138752],[-19.40249252,78.3944416],[-19.08193588,78.36303902],[-19.28832626,78.3138752]],[[-18.96997452,78.39248848],[-19.09777832,78.42526436],[-18.88109589,78.42886543],[-18.96997452,78.39248848]],[[-19.12608719,78.45526314],[-19.25416183,78.44581795],[-18.96414948,78.47499275],[-19.12608719,78.45526314]],[[-18.57194519,78.57805061],[-18.7388649,78.60609627],[-18.31470108,78.67360115],[-18.57194519,78.57805061]],[[-18.24303055,78.75082588],[-18.29719925,78.85609627],[-18.07553482,78.81776619],[-18.24303055,78.75082588]],[[-19.34693146,78.81137276],[-19.75666809,78.79525948],[-19.19081879,78.95305061],[-19.34693146,78.81137276]],[[-18.03720856,78.99275398],[-17.84998322,79.21554756],[-17.5563736,79.16415596],[-18.03720856,78.99275398]],[[-19.375,79.1263752],[-19.4966507,79.19581795],[-19.31443214,79.23137093],[-19.375,79.1263752]],[[-19.90831757,80.05914497],[-20.01415253,80.09665108],[-19.75693893,80.24136543],[-19.01889038,80.16360664],[-19.90831757,80.05914497]],[[-66.59527588,80.60859871],[-66.89611816,80.67109871],[-66.53167725,80.61693001],[-66.59527588,80.60859871]],[[-20.59720612,81.67248726],[-20.97108841,81.71443367],[-20.16444397,81.68193245],[-20.59720612,81.67248726]],[[-18.58555603,81.64665413],[-19.24580765,81.7777729],[-18.30443954,81.66220284],[-18.58555603,81.64665413]],[[-19.77776337,81.87025642],[-20.78192902,82.13388252],[-20.30664444,82.13054085],[-19.77776337,81.87025642]],[[-18.8583107,81.97442818],[-19.41387177,82.20555305],[-18.79221725,81.99193001],[-18.8583107,81.97442818]],[[-51.46885681,81.96832466],[-53.35746002,82.22499275],[-51.19190979,81.99359322],[-51.46885681,81.96832466]],[[-51.88861084,82.20887947],[-52.29387665,82.27748299],[-51.79523468,82.21415901],[-51.88861084,82.20887947]],[[-48.21248627,82.39583015],[-48.86443329,82.53915596],[-48.034729,82.46443367],[-48.21248627,82.39583015]],[[-46.00304413,82.6444416],[-44.41887665,82.36609077],[-45.06717682,82.21666145],[-44.73720551,82.0958271],[-45.07665253,82.05581856],[-47.74912262,82.62498665],[-46.00304413,82.6444416]],[[-40.17443085,82.66026497],[-40.47245026,82.68637276],[-40.28913879,82.69803047],[-40.17443085,82.66026497]],[[-49.95470428,82.76999092],[-50.06717682,82.77554512],[-49.72305298,82.77998543],[-49.95470428,82.76999092]],[[-47.56859589,82.78248787],[-48.41550446,82.84803963],[-47.44245148,82.80386543],[-47.56859589,82.78248787]],[[-46.44387054,82.83249092],[-47.2624588,82.93081856],[-46.40750122,82.83610725],[-46.44387054,82.83249092]],[[-39.57055664,82.99664497],[-40.54611206,83.15332222],[-39.27749634,83.08137703],[-39.57055664,82.99664497]],[[-38.31859589,83.13360786],[-38.6596756,83.16470528],[-38.00914001,83.15248299],[-38.31859589,83.13360786]],[[-39.90499878,82.99887276],[-41.48274231,83.16499519],[-40.83694458,83.16360664],[-39.90499878,82.99887276]],[[-40.15777588,83.20332527],[-40.57915497,83.21971321],[-40.08694458,83.21165657],[-40.15777588,83.20332527]],[[-41.03717804,83.20860481],[-41.60637665,83.22442818],[-41.00162506,83.21220589],[-41.03717804,83.20860481]],[[-42.09777832,83.24220467],[-42.4180603,83.25387764],[-41.95944214,83.25166512],[-42.09777832,83.24220467]],[[-39.64606476,83.26220894],[-38.63969421,83.11581612],[-40.67328644,83.28027534],[-39.64606476,83.26220894]],[[-41.2444458,83.28776741],[-41.68439484,83.31360054],[-41.45639038,83.32721138],[-41.2444458,83.28776741]],[[-38.90276337,83.29054451],[-39.62189484,83.33693123],[-39.22386932,83.39694405],[-38.90276337,83.29054451]],[[-32.30024719,83.57026863],[-25.65053177,83.2916584],[-35.6177597,82.90109444],[-25.14220047,83.16276741],[-24.75111389,83.00082588],[-25.90110397,82.77748299],[-23.9927597,82.91165352],[-21.31415939,82.60803413],[-25.06886673,82.15248299],[-31.6188736,82.20749092],[-29.90469742,82.09332466],[-33.09832001,81.77388191],[-25.20249939,81.98942757],[-27.63082504,81.48610115],[-27.32861328,81.38081551],[-24.21055603,81.70833015],[-24.00220108,82.00972176],[-22.01692963,81.93304634],[-22.23110962,81.46582222],[-24.51164627,80.54081917],[-19.94081879,81.68304634],[-20.30555725,81.45109749],[-18.01720047,81.46805],[-17.35387421,81.70193672],[-17.5347023,81.85359383],[-16.70053864,81.93193245],[-12.15499687,81.60331917],[-16.00497818,80.72859383],[-21.24749756,80.57554817],[-16.1138649,80.50248909],[-17.1138649,80.23692513],[-19.70080948,80.28581429],[-20.5547142,80.10582161],[-20.75497818,79.86499214],[-20.32692337,79.76054573],[-19.28944397,80.10331917],[-17.44915009,80.05581856],[-19.63136673,79.66137886],[-19.8688736,79.15304756],[-19.57360458,79.33110237],[-19.07888794,79.20054817],[-19.37831879,79.2749958],[-20.09111023,79.06360054],[-19.91471481,78.96415901],[-20.01804352,78.87719917],[-21.1824913,78.80998421],[-20.9263649,78.68997383],[-21.4269371,78.6444416],[-20.90638733,78.62414742],[-22.03944397,77.68831062],[-21.57831192,77.56414986],[-20.86636734,78.01527596],[-20.31192398,77.870821],[-19.2399826,77.76304817],[-18.95666504,77.62886238],[-21.0535965,77.54387093],[-18.39582443,77.34276009],[-18.12053299,76.94832039],[-18.30525589,76.80609322],[-20.72305298,76.98831367],[-21.72887802,76.88360786],[-20.93943405,76.84248543],[-21.60499191,76.64471626],[-22.7388649,76.70443916],[-21.81443214,76.5902729],[-22.50693893,76.44803047],[-21.57303238,76.43664742],[-21.68222046,76.23915291],[-19.80582809,76.22859383],[-21.98219681,75.99193001],[-19.82499313,75.90915108],[-19.33555603,75.40498543],[-19.88275528,75.14583015],[-22.25111389,75.66415596],[-21.40638733,75.45555305],[-22.51137543,75.53082466],[-20.51499557,75.14082527],[-22.43553925,75.1638813],[-20.63888168,75.06192207],[-20.76276398,74.84694099],[-20.60610962,74.73692513],[-21.11972046,74.66165352],[-18.97776031,74.48166084],[-19.68499756,74.2374897],[-22.08277893,74.59832954],[-21.76499557,74.4194355],[-22.47914886,74.31192207],[-22.05305481,74.28387642],[-22.49249077,74.07443428],[-21.98053741,73.99803352],[-21.82164383,73.65109444],[-21.74858475,74.058321],[-20.28304291,73.87997627],[-20.50111389,73.45277596],[-22.37916565,73.25055122],[-24.03219986,73.70248604],[-22.17832565,73.62469673],[-24.04415131,73.81469917],[-24.46303177,73.53581429],[-25.6869278,73.95248604],[-24.67416,73.51332283],[-25.31500244,73.46165657],[-25.72136307,73.26361275],[-26.01249313,73.24220467],[-27.33748627,73.49247932],[-26.38749313,73.24136543],[-27.72860336,73.12970161],[-27.49749756,72.92442513],[-26.44915009,73.19359016],[-25.05386734,73.08276558],[-27.38830948,72.83665657],[-26.3047142,72.72776985],[-26.46276093,72.57222176],[-24.84249878,72.71943855],[-24.60942841,72.52331734],[-25.90831757,72.4138813],[-25.28916931,72.38443184],[-25.52664566,72.12137032],[-24.58833313,72.42109871],[-22.4944191,71.89276314],[-23.12554169,71.62608528],[-21.89582443,71.74081612],[-22.50636673,71.54971504],[-22.47332382,71.26304817],[-21.80555725,71.50943184],[-21.60360336,71.32304573],[-21.96164322,71.26388741],[-21.6875,71.14915657],[-22.33386612,71.05359077],[-21.68110275,71.06833076],[-21.929142,70.80220222],[-21.47471237,70.53997993],[-22.37720108,70.4416523],[-22.50693893,70.85054207],[-22.6227684,70.44664192],[-23.34581757,70.43914986],[-24.7399826,71.33221626],[-28.63969803,72.12442207],[-27.32499313,71.7097187],[-28.46692657,71.55247688],[-25.41136551,71.34915352],[-26.47887802,70.96026802],[-28.40916443,70.97581673],[-27.91414452,70.86720467],[-29.20693588,70.39415169],[-26.32221603,70.37303352],[-28.54276276,70.04471016],[-27.34192276,69.9624958],[-25.22914886,70.41443062],[-22.07915878,70.12970161],[-23.93053055,69.75526619],[-23.57915878,69.6235981],[-24.34331131,69.60443306],[-24.07276154,69.47804451],[-26.3633194,68.66748238],[-29.37804794,68.19886971],[-29.86220551,68.41360664],[-30.19694519,68.24247932],[-30.03026581,68.11165047],[-31.57164383,68.06694221],[-31.74580765,68.21081734],[-31.53582001,68.23942757],[-32.00717926,68.26193428],[-32.48497009,68.61998177],[-32.1333313,68.19609261],[-32.40026093,68.19941902],[-31.99915695,68.09526253],[-32.12277222,67.85775948],[-33.1986084,67.68803596],[-33.60055542,67.37137032],[-33.36579132,67.24693489],[-33.97305298,66.99054146],[-34.26720428,66.57582283],[-34.42971039,66.74136543],[-34.4068985,66.54081917],[-34.71994781,66.33831978],[-35.85163879,66.43359566],[-35.58748627,66.11026192],[-36.33193207,65.90721321],[-36.34304047,66.07998848],[-36.56663513,66.07666206],[-36.52106476,65.9847126],[-36.98023224,65.8374958],[-37.07746887,66.06219673],[-37.1930542,65.76915169],[-37.81135559,66.03055],[-37.1847229,66.34166145],[-38.10610962,66.38693428],[-37.69163513,66.25972176],[-38.05194092,65.91249275],[-38.48361206,66.01027107],[-38.10082245,65.80304146],[-38.24194336,65.62942696],[-40.09635925,65.56721687],[-39.75554657,65.24275398],[-41.15554047,64.96443367],[-40.35887909,64.34832954],[-40.78805542,64.38443184],[-41.0916214,64.30220222],[-41.32583618,64.34137154],[-41.5069046,64.32582283],[-41.5694046,64.26555061],[-40.56777954,64.10914803],[-40.83857727,63.94554329],[-40.518013,63.69721413],[-41.6177597,63.79222298],[-40.74830627,63.50916481],[-41.17063904,63.51360512],[-40.99885559,63.4074955],[-41.11328888,63.38527107],[-41.39416504,63.55221748],[-41.23828888,63.40443611],[-41.58078766,63.48777199],[-41.11328888,63.30721474],[-41.68717194,63.5249958],[-41.90750122,63.46471596],[-41.4291687,63.12638283],[-42.17443085,63.20166206],[-41.61524963,62.98749733],[-41.75554657,62.83943367],[-43.14720917,62.75777626],[-42.16218567,62.38388252],[-42.97914886,62.51527596],[-42.26110077,62.24249458],[-42.54082489,61.94360542],[-42.11579132,62.00666237],[-42.8694458,61.77305031],[-42.4347229,61.55721474],[-43.07915497,61.59360695],[-42.50750732,61.35527229],[-43.24607849,61.33915901],[-42.62995148,61.09832954],[-43.61274719,61.12777138],[-42.70470428,61.05777168],[-43.48442841,60.93332863],[-42.79082489,60.80110359],[-43.52661896,60.83721352],[-42.74939728,60.68360329],[-44.20246887,60.59332466],[-43.16860962,60.39749336],[-43.1374588,60.07943916],[-44.10082245,60.38416481],[-44.080513,60.28638649],[-44.45666504,60.1483326],[-44.60414124,59.98249245],[-45.15276337,60.07416725],[-44.47081757,60.55721474],[-45.18994904,60.12915993],[-44.626091,60.73333168],[-45.20328522,60.43526649],[-45.09913635,60.64583015],[-45.49194336,60.48999214],[-45.31331635,60.69999886],[-45.97833252,60.57388496],[-45.67173004,60.67632866],[-45.84967804,60.69748878],[-45.25304413,60.90193367],[-46.22136688,60.75361061],[-45.19969177,61.18998909],[-46.06555176,60.92110634],[-45.65357971,61.14222145],[-45.76970673,61.33360481],[-46.00968361,61.22304726],[-45.83999634,61.16499519],[-45.91495514,61.0902729],[-46.22942352,60.97471046],[-46.40608978,61.08416176],[-46.38027954,61.04110909],[-46.44217682,60.99916267],[-46.52330017,61.01527596],[-46.58165741,60.90582466],[-46.83525848,60.93027687],[-46.70524788,60.88138008],[-46.85719299,60.79749489],[-46.95856476,60.86332893],[-46.91441345,60.93332863],[-47.02302551,60.97609901],[-47.80939484,60.87915993],[-47.3194046,60.86776924],[-47.44773102,60.82027626],[-48.2388916,60.81971931],[-47.68940735,61.00499916],[-48.40635681,60.98832893],[-47.83356476,61.04194069],[-48.21885681,61.18499184],[-47.91719055,61.32416725],[-48.41027832,61.13221169],[-48.63719177,61.23804665],[-48.37859344,61.36388588],[-49.06609344,61.39805031],[-48.34413147,61.60499763],[-49.29747009,61.55749702],[-48.59921265,61.63633919],[-49.14884186,61.71859932],[-48.76306152,61.98472023],[-49.4402771,61.8422184],[-48.84053802,62.07694435],[-49.66941833,61.99554634],[-49.29387665,62.17222023],[-50.31777954,62.49527168],[-49.94746399,62.82721901],[-50.28026581,62.70471382],[-50.31717682,62.74305153],[-50.15080261,62.93082619],[-49.70137787,63.05749702],[-50.19149399,62.93366051],[-50.37995148,62.78444099],[-50.1499939,63.01527596],[-50.60637665,63.09443855],[-50.05984497,63.22875404],[-51.10773468,63.33943367],[-50.27607727,63.40138435],[-51.22136688,63.43943214],[-50.50467682,63.66721535],[-51.55939484,63.70916176],[-50.92415619,63.93249702],[-51.44332886,63.80499458],[-51.60191345,64.03471565],[-50.04833984,64.19413948],[-51.76137543,64.18193245],[-50.95083618,64.21805],[-50.84304047,64.25416756],[-51.04191589,64.27554512],[-50.85637665,64.41554451],[-50.35218048,64.38275337],[-50.17301178,64.44832039],[-50.85665131,64.63304329],[-49.58428192,64.33764839],[-50.06555176,64.52916145],[-49.99885559,64.86914253],[-50.56053925,64.76805305],[-50.97860718,65.21971321],[-50.63665009,64.75305367],[-51.22413635,64.76220894],[-52.0069046,64.20359993],[-52.03913879,64.39915657],[-52.1055603,64.38720894],[-52.05748749,64.59908485],[-52.12026215,64.72026253],[-51.24694824,65.01748848],[-52.21134186,64.80664253],[-52.09967804,65.23915291],[-52.55884552,65.32748604],[-51.72081757,65.58221626],[-51.90107727,65.62387276],[-51.69441223,65.69859505],[-51.24384308,65.75972176],[-50.5458374,65.7069416],[-51.20910835,65.79609871],[-51.48469543,65.76304817],[-51.94800568,65.65887642],[-51.93439484,65.54637337],[-52.49776459,65.38720894],[-52.46913147,65.64082527],[-52.80194092,65.5388813],[-52.68885803,65.8055439],[-53.26828766,65.74693489],[-51.83193207,66.05581856],[-53.46221924,66.03415108],[-51.27133942,66.84387398],[-50.32915497,66.8330555],[-50.95639038,66.93470955],[-49.99776459,66.98082161],[-50.63218689,67.01582527],[-50.33470917,67.07193184],[-51.18940735,66.91775703],[-53.47664642,66.09887886],[-53.11830139,66.28581429],[-53.61972046,66.24331856],[-53.6333313,66.50444221],[-52.41637421,66.54637337],[-53.45192719,66.63749886],[-52.22888184,66.83998299],[-53.96553802,67.07470894],[-53.81663513,67.17886543],[-53.37995148,67.20221138],[-53.5888443,67.21499825],[-53.47718811,67.23915291],[-52.1513443,67.36998177],[-51.52471924,67.32304573],[-51.18940735,67.1235981],[-50.35109711,67.1805439],[-51.52580261,67.35109138],[-51.15161896,67.42331123],[-53.25222778,67.32054329],[-53.79833984,67.20277596],[-53.88109589,67.26388741],[-52.49607849,67.76971626],[-51.80939484,67.62581062],[-51.33023834,67.67581367],[-50.70050812,67.49165535],[-50.07191467,67.50999641],[-50.85218048,67.59082222],[-50.27444458,67.73109627],[-49.93663025,67.69386482],[-50.28859711,67.74498177],[-50.65026093,67.65165901],[-50.96967316,67.62220955],[-51.23078156,67.6972065],[-50.41745758,67.84443855],[-51.33111572,67.86886787],[-51.05999756,67.97415352],[-53.75358582,67.60109138],[-52.95455933,67.97898293],[-53.18717194,68.04332161],[-52.05999756,67.97526741],[-53.32109833,68.18441963],[-52.41441345,68.06276131],[-52.80220795,68.16887093],[-51.85773468,68.04193306],[-51.188591,68.06360054],[-50.5694046,67.90081978],[-50.15303802,67.933321],[-51.43412018,68.19832039],[-50.95666504,68.18275642],[-51.18357849,68.39888191],[-50.81995392,68.50360298],[-52.41915131,68.1805439],[-53.38915253,68.32777596],[-53.07969666,68.32304573],[-52.46166992,68.54498482],[-50.86579132,68.61470222],[-50.65635681,68.82554817],[-51.29245758,68.74832344],[-51.06967926,69.13109016],[-50.20944214,68.96081734],[-50.68777466,69.11775398],[-50.13861084,69.17747688],[-50.38082886,69.33888435],[-51.12277222,69.20138741],[-50.20470428,69.52192879],[-50.88305664,69.49136543],[-50.19163513,69.75749397],[-50.31358337,69.87330818],[-50.58911896,69.92192268],[-50.21411896,70.02165413],[-52.31277466,70.04664803],[-54.62635803,70.65193367],[-54.06331635,70.82971382],[-52.7221756,70.74470711],[-50.6763916,70.32277107],[-50.49052429,70.50972176],[-51.03717804,70.43081856],[-50.93967438,70.46776009],[-51.34500122,70.56666756],[-50.61884308,70.62858772],[-51.438591,70.74775887],[-50.63305664,70.7402668],[-51.95246887,71.02110481],[-50.92884064,70.98858833],[-51.48524475,71.06303596],[-51.22664642,71.14166451],[-52.24939728,71.12330818],[-51.64552307,71.36137581],[-52.55552673,71.17137337],[-51.34805298,71.48610115],[-52.98361206,71.41526985],[-51.64051056,71.71110725],[-53.25054169,71.70277596],[-52.68439484,72.00166512],[-53.32191467,71.82222176],[-53.85746002,72.32165718],[-53.56026459,72.35803413],[-53.95497131,72.32249641],[-53.39660835,71.85193062],[-54.10028076,71.70749092],[-53.91550446,71.44192696],[-55.32360077,71.38693428],[-55.90581512,71.67859077],[-54.38441467,72.22249031],[-55.29833984,71.92859077],[-55.57997131,71.99887276],[-54.68276215,72.36638069],[-55.62635803,72.45749092],[-54.29637909,72.47998238],[-55.01638031,72.51999092],[-54.62717438,72.62164497],[-54.8705368,72.64248848],[-54.60469055,72.82805061],[-54.85055542,73.01443672],[-55.69773102,73.06666756],[-55.08580017,73.36276436],[-56.07583618,73.64860725],[-55.60773468,73.72026253],[-56.4096756,74.06608772],[-56.12913513,74.27832222],[-57.3249588,74.10775948],[-56.30912018,74.28720284],[-56.71330261,74.34082222],[-56.13109589,74.38388252],[-56.79719543,74.44331551],[-56.19245148,74.55165291],[-58.69773102,75.34637642],[-58.20889282,75.44192696],[-58.40805054,75.7152729],[-60.87859344,76.15248299],[-63.44081879,76.37330818],[-65.47962952,76.01860237],[-65.88827515,76.09832954],[-65.55323792,76.23387337],[-65.7693634,76.27554512],[-67.30607605,76.16748238],[-66.45861816,75.90971565],[-68.50053406,76.08693123],[-69.63327026,76.38081551],[-67.98213196,76.67943001],[-71.37521362,77.05609322],[-66.4486084,77.13388252],[-66.1708374,77.19331551],[-69.10157776,77.27192879],[-66.23823547,77.2485981],[-66.65907288,77.41443062],[-66.05552673,77.49136543],[-66.72583008,77.68081856],[-68.34472656,77.4985981],[-68.69937134,77.6638813],[-69.25019836,77.45305061],[-70.28996277,77.56360054],[-69.48355103,77.75360298],[-70.6027832,77.67804146],[-69.96852112,77.83360481],[-71.32000732,77.76361275],[-73.05357361,78.15721321],[-72.45666504,78.28637886],[-72.84941101,78.31414986],[-72.55215454,78.52110481],[-65.97657776,79.10165596],[-64.82327271,79.53360176],[-65.06880188,80.00915718],[-63.78443909,80.1483326],[-67.04963684,80.05748177],[-67.48083496,80.32554817],[-63.68052673,81.14387703],[-62.79441833,80.75110054],[-63.37162018,81.15582466],[-61.05661774,81.11970711],[-61.31331635,81.35582161],[-60.7707901,81.50055122],[-61.45219421,81.75305367],[-60.80661774,81.87997627],[-58.89944458,81.86470222],[-56.47833252,81.33249092],[-59.46689606,81.99693489],[-54.50527954,82.36554146],[-53.5597229,82.11609077],[-53.82360077,81.69359016],[-53.63441467,81.51332283],[-52.89916992,82.03415108],[-49.61470795,81.64027596],[-51.06555176,81.93220711],[-49.43222046,81.9277668],[-51.11884308,82.49414253],[-50.31750488,82.51832771],[-44.63996887,81.75416756],[-44.18331146,81.83415413],[-44.92524719,81.98970222],[-44.50250244,82.08970833],[-44.79523468,82.18997383],[-44.19055176,82.31248665],[-42.29915619,82.21666145],[-45.76583862,82.76443672],[-42.14274788,82.76165962],[-41.68276215,82.47804451],[-41.89802551,82.73275948],[-41.55024719,82.73665047],[-39.75276947,82.39888191],[-40.13523102,82.71443367],[-46.88996887,82.96110725],[-43.38665009,82.91443062],[-45.52471924,83.12220955],[-42.69495392,83.27443123],[-38.57441711,82.74414253],[-39.15026093,82.98027229],[-36.87744904,83.1472187],[-38.85637665,83.43165779],[-32.30024719,83.57026863]],[[-20.1133194,77.65332222],[-20.43831635,77.62886238],[-20.00832748,77.6069355],[-20.1133194,77.65332222]]]}, -{code:"DE", name:"Germany", lng:9.851, lat:51.110, borders:[[[8.71025658,47.69680977],[8.67859459,47.69334602],[8.67055702,47.71110725],[8.71025658,47.69680977]],[[6.80639076,53.60222054],[6.74694633,53.56027412],[6.65833473,53.58610725],[6.80639076,53.60222054]],[[6.93944359,53.66944313],[6.87639046,53.67027473],[7.08833504,53.68416786],[6.93944359,53.66944313]],[[7.2424984,53.70443916],[7.13583565,53.70611],[7.34694481,53.72110939],[7.2424984,53.70443916]],[[8.19111061,53.72471809],[8.12000084,53.71305275],[8.1427784,53.73360634],[8.19111061,53.72471809]],[[7.62222481,53.75444221],[7.46777916,53.73305702],[7.48583412,53.7575016],[7.62222481,53.75444221]],[[7.75889015,53.76055336],[7.66444588,53.76166725],[7.81278038,53.77555275],[7.75889015,53.76055336]],[[8.42527962,53.92805672],[8.41166496,53.95555305],[8.45499992,53.96305275],[8.42527962,53.92805672]],[[13.94027901,54.0249958],[13.92583275,54.01832771],[13.93444633,54.0277729],[13.94027901,54.0249958]],[[8.69555473,54.04110909],[8.67138863,54.07777596],[8.69333458,54.08249855],[8.69555473,54.04110909]],[[14.00131798,54.06536293],[14.22555733,53.92860603],[14.21888924,53.86902046],[13.82343102,53.85374641],[14.05600548,53.98486519],[13.75916481,54.15999794],[14.00131798,54.06536293]],[[10.9794445,54.38055611],[11.0177784,54.38027382],[11.00305367,54.37693977],[10.9794445,54.38055611]],[[8.89305687,54.46193886],[8.81500053,54.50083351],[8.96055412,54.51916695],[8.89305687,54.46193886]],[[11.31277657,54.40694618],[11.00638771,54.4616642],[11.18416786,54.51999855],[11.31277657,54.40694618]],[[8.66277885,54.49416542],[8.59111214,54.5277729],[8.7108326,54.55166817],[8.66277885,54.49416542]],[[13.07361031,54.48861122],[13.09666634,54.59055519],[13.15138817,54.60277748],[13.07361031,54.48861122]],[[13.38305473,54.63888741],[13.73083305,54.27583504],[13.11833382,54.3338871],[13.26749992,54.3825016],[13.14696312,54.54560661],[13.50309181,54.49309731],[13.24472237,54.55916786],[13.38305473,54.63888741]],[[8.36444283,54.61332893],[8.29444313,54.66666603],[8.35388756,54.7116642],[8.36444283,54.61332893]],[[8.56777763,54.68527412],[8.39694405,54.71388435],[8.55111122,54.75388527],[8.56777763,54.68527412]],[[10.9794445,54.38055611],[10.81853676,53.8900547],[12.52694511,54.47416115],[12.92416573,54.42694283],[12.36972237,54.2650013],[13.02388954,54.39972115],[13.45583153,54.09610939],[13.71833229,54.16971779],[13.81305504,53.84527779],[14.27562904,53.69906807],[14.14916801,52.86277962],[14.64027596,52.57249641],[14.59944344,51.81860542],[15.0363903,51.28555489],[14.8283329,50.86583138],[14.30972099,51.05360603],[12.09370613,50.32253456],[12.6744442,49.42499733],[13.83361244,48.77360725],[12.75833321,48.12388802],[13.01666832,47.47027779],[12.73555565,47.68416786],[11.09555626,47.39611244],[10.47805595,47.59194374],[10.17333412,47.27472115],[9.56672478,47.54045296],[8.56611061,47.80694008],[8.57642174,47.59137154],[7.69722557,47.54332924],[7.58827019,47.58448219],[7.57888985,48.11972237],[8.22607994,48.96441841],[6.36216927,49.45939064],[6.52444649,49.80861092],[6.13441658,50.12784767],[6.39820671,50.32317543],[6.01180077,50.75727272],[5.8647213,51.04610634],[6.22222328,51.46582985],[5.96249962,51.80777931],[6.82888985,51.96555519],[7.06555748,52.38582802],[6.68889046,52.54916573],[7.05166817,52.64361],[7.20836449,53.24280739],[7.01555443,53.41472054],[7.29583549,53.68527412],[8.00833321,53.71000099],[8.50305367,53.35416603],[8.66555595,53.89388466],[9.83249855,53.53638649],[8.89972115,53.94082832],[8.88361168,54.29416847],[8.59944344,54.3338871],[9.01694298,54.49833107],[8.58054924,54.86787987],[8.28111076,54.74694252],[8.39333153,55.05305672],[8.66454506,54.91309547],[9.44536018,54.82540321],[9.97277641,54.76111031],[9.87027931,54.45443916],[10.9794445,54.38055611]],[[11.45916557,53.96110725],[11.48861122,54.02305031],[11.37388802,53.98861122],[11.45916557,53.96110725]],[[11.54416847,54.06138802],[11.61242104,54.10458565],[11.51111031,54.04860878],[11.54416847,54.06138802]],[[12.72972298,54.41666603],[12.70277596,54.42833138],[12.68610954,54.41832924],[12.72972298,54.41666603]]]}, -{code:"GU", name:"Guam", lng:144.707, lat:13.385, borders:[[[144.709412,13.234997],[144.655243,13.427776],[144.875244,13.65361],[144.709412,13.234997]]]}, -{code:"GR", name:"Greece", lng:21.766, lat:39.666, borders:[[[24.128609,34.856667],[24.128609,34.808884],[24.04472,34.849998],[24.128609,34.856667]],[[26.900555,35.358887],[26.898052,35.419998],[27.019997,35.430832],[26.900555,35.358887]],[[23.858608,35.52166],[26.290554,35.131104],[24.752777,34.942215],[23.521111,35.288055],[23.606388,35.613327],[23.858608,35.52166]],[[27.157497,35.445831],[27.066109,35.604996],[27.228054,35.826385],[27.157497,35.445831]],[[23.332222,35.825272],[23.273052,35.899994],[23.325832,35.872215],[23.332222,35.825272]],[[23.049442,36.13694],[22.929443,36.37944],[23.10722,36.243889],[23.049442,36.13694]],[[25.838882,36.348053],[25.73027,36.369713],[25.771111,36.401932],[25.838882,36.348053]],[[25.399162,36.39444],[25.391388,36.408051],[25.406666,36.410553],[25.399162,36.39444]],[[27.786663,35.890549],[27.719719,36.1661],[28.225826,36.453049],[27.786663,35.890549]],[[27.400272,36.372498],[27.297771,36.464432],[27.445827,36.4086],[27.400272,36.372498]],[[25.457771,36.333611],[25.371941,36.472488],[25.486382,36.408051],[25.457771,36.333611]],[[26.342216,36.506386],[26.262497,36.59166],[26.460548,36.598053],[26.342216,36.506386]],[[27.854717,36.527222],[27.764996,36.574997],[27.859718,36.650269],[27.854717,36.527222]],[[24.950275,36.590553],[24.840832,36.658882],[24.938332,36.632774],[24.950275,36.590553]],[[25.089722,36.633881],[25.102219,36.693329],[25.187775,36.71666],[25.089722,36.633881]],[[21.785831,36.736938],[21.774998,36.697777],[21.750553,36.712494],[21.760555,36.754997],[21.785831,36.736938]],[[24.413609,36.660271],[24.349163,36.746109],[24.548054,36.759438],[24.413609,36.660271]],[[25.385551,36.651665],[25.275829,36.78138],[25.407219,36.717766],[25.385551,36.651665]],[[24.662777,36.747498],[24.609722,36.778328],[24.665276,36.776382],[24.662777,36.747498]],[[21.698608,36.739166],[21.704441,36.796661],[21.728333,36.79277],[21.698608,36.739166]],[[24.558609,36.775551],[24.521111,36.823883],[24.562496,36.84861],[24.558609,36.775551]],[[25.459995,36.82222],[25.42083,36.83194],[25.474159,36.869164],[25.459995,36.82222]],[[25.826664,36.779709],[25.736938,36.784431],[25.976662,36.874161],[25.826664,36.779709]],[[26.965832,36.681664],[27.064159,36.838875],[27.352776,36.872208],[26.965832,36.681664]],[[25.680832,36.878052],[25.609161,36.886658],[25.651939,36.906097],[25.680832,36.878052]],[[25.076664,36.951935],[25.023605,36.999146],[25.083881,37.04248],[25.076664,36.951935]],[[24.711941,36.903053],[24.641109,37.042221],[24.765274,36.958328],[24.711941,36.903053]],[[26.975552,36.924431],[26.890831,37.076378],[27.048328,36.993607],[26.975552,36.924431]],[[25.834438,37.09304],[25.782494,37.119987],[25.825554,37.125542],[25.834438,37.09304]],[[25.250275,37.008324],[25.098328,37.027489],[25.268604,37.138611],[25.250275,37.008324]],[[26.886662,37.096657],[26.769161,37.176384],[26.85833,37.181107],[26.886662,37.096657]],[[25.461388,36.919434],[25.341106,37.074997],[25.54472,37.198044],[25.461388,36.919434]],[[24.535,37.182495],[24.509163,37.112778],[24.414719,37.12722],[24.535,37.182495]],[[26.767494,37.186935],[26.772221,37.206657],[26.787495,37.20694],[26.767494,37.186935]],[[23.156666,37.240273],[23.096943,37.277496],[23.150555,37.272774],[23.156666,37.240273]],[[23.410831,37.300827],[23.373886,37.299721],[23.583332,37.364166],[23.410831,37.300827]],[[24.379444,37.305832],[24.442776,37.481667],[24.48333,37.398048],[24.379444,37.305832]],[[25.359161,37.407776],[25.313889,37.488045],[25.463608,37.469719],[25.359161,37.407776]],[[24.952499,37.385551],[24.884441,37.363609],[24.889721,37.512497],[24.952499,37.385551]],[[23.497776,37.504715],[23.432777,37.526665],[23.522499,37.524162],[23.497776,37.504715]],[[25.228333,37.534431],[24.97583,37.675552],[25.238888,37.621941],[25.228333,37.534431]],[[24.298611,37.526382],[24.298332,37.654999],[24.394165,37.673332],[24.298611,37.526382]],[[26.020828,37.514435],[26.06805,37.631943],[26.361111,37.686661],[26.020828,37.514435]],[[23.513054,37.691666],[23.425552,37.762497],[23.563889,37.762772],[23.513054,37.691666]],[[27.069443,37.711937],[26.571663,37.730553],[26.748608,37.811378],[27.069443,37.711937]],[[20.898052,37.805275],[20.831108,37.646385],[20.621944,37.860832],[20.898052,37.805275]],[[24.791664,37.998329],[24.960278,37.685555],[24.713333,37.872772],[24.791664,37.998329]],[[23.462498,37.878609],[23.437496,37.985832],[23.538887,37.985832],[23.462498,37.878609]],[[20.612499,38.394165],[20.7925,38.060272],[20.341389,38.177216],[20.612499,38.394165]],[[20.735554,38.309998],[20.644722,38.398048],[20.648888,38.500275],[20.735554,38.309998]],[[26.025555,38.176941],[25.861664,38.583611],[26.159443,38.544434],[26.025555,38.176941]],[[20.903053,38.545555],[20.899166,38.566383],[20.938889,38.60527],[20.903053,38.545555]],[[25.599995,38.531937],[25.52916,38.599709],[25.613331,38.589989],[25.599995,38.531937]],[[20.643608,38.581108],[20.557777,38.683884],[20.701385,38.834717],[20.643608,38.581108]],[[24.683052,38.79805],[24.553333,38.768326],[24.458332,38.962776],[24.683052,38.79805]],[[23.461941,38.853333],[24.153889,38.64666],[24.564163,37.987221],[22.829998,38.829163],[23.461941,38.853333]],[[23.736664,39.074715],[23.590832,39.204437],[23.786663,39.124161],[23.736664,39.074715]],[[23.50861,39.159721],[23.392498,39.152222],[23.461388,39.208328],[23.50861,39.159721]],[[20.19833,39.174438],[20.136665,39.200554],[20.123608,39.236382],[20.19833,39.174438]],[[23.862499,39.136665],[23.953609,39.289719],[23.978054,39.260277],[23.862499,39.136665]],[[26.377216,39.273598],[26.614441,39.012497],[25.832222,39.183601],[26.377216,39.273598]],[[24.992496,39.466385],[25.006386,39.563309],[25.053608,39.530823],[24.992496,39.466385]],[[19.926109,39.794441],[19.846664,39.649162],[20.111664,39.363052],[19.641388,39.744438],[19.926109,39.794441]],[[19.404163,39.843605],[19.378887,39.868607],[19.430553,39.867493],[19.404163,39.843605]],[[25.441666,40.004715],[25.355827,39.786385],[25.05444,39.86055],[25.441666,40.004715]],[[25.601662,40.398041],[25.443886,40.475822],[25.694717,40.466103],[25.601662,40.398041]],[[24.773331,40.63166],[24.509441,40.658051],[24.645275,40.797775],[24.773331,40.63166]],[[26.294167,41.708054],[26.361095,41.711052],[26.633884,41.354439],[26.04472,40.735825],[25.138054,41.011375],[23.735275,40.754997],[24.398331,40.151939],[23.727776,40.350555],[23.93222,39.943054],[23.353611,40.245277],[23.709999,39.911942],[22.941387,40.630554],[22.59111,40.476662],[22.594997,40.012215],[23.344997,39.178055],[22.937775,39.358604],[23.072777,39.036942],[22.523331,38.857216],[24.073887,38.196938],[24.034443,37.651665],[23.515553,38.04055],[22.991386,37.880554],[23.513611,37.429443],[22.72583,37.568329],[23.19833,36.431938],[22.634163,36.804443],[22.488888,36.386108],[22.152775,37.02166],[21.704441,36.815277],[21.649719,37.44194],[21.106388,37.854439],[21.85833,38.340828],[22.868053,37.938049],[23.226109,38.153053],[22.403332,38.448051],[21.147778,38.304161],[20.989441,38.669998],[20.73222,38.801109],[21.149998,39.001938],[20.731941,38.952499],[20.010029,39.6912],[20.671944,40.098053],[20.98349,40.855888],[22.935604,41.342125],[24.263885,41.570549],[25.285,41.24305],[26.139996,41.354713],[26.066109,41.697495],[26.294167,41.708054]]]}, -{code:"GT", name:"Guatemala", lng:-90.398, lat:15.256, borders:[[[-90.62762402,13.930555],[-91.38467418,13.978888],[-92.24675027,14.550547],[-91.72907995,16.074997],[-90.44195513,16.088333],[-90.40634114,16.416386],[-91.43737793,17.241108],[-90.98387144,17.256107],[-90.98242175,17.820652],[-89.14186048,17.818886],[-89.21607998,15.889851],[-88.91047692,15.89361],[-88.21470636,15.724443],[-89.15028418,15.073481],[-89.3482212,14.431982],[-90.09635902,13.745832],[-90.62762402,13.930555]]]}, -{code:"GN", name:"Guinea", lng:-10.942, lat:10.439, borders:[[[-13.60276815,9.734441],[-14.66444194,10.476665],[-14.6930524,11.035276],[-15.01684341,10.956451],[-14.68694111,11.509722],[-13.7091527,11.715277],[-13.97102738,12.154758],[-13.71313053,12.677221],[-12.3453919,12.301748],[-11.37305101,12.407774],[-11.31554752,12.022774],[-10.92888283,12.224442],[-10.65273296,11.892609],[-10.32388837,12.224997],[-9.70193889,12.029163],[-9.15555545,12.486111],[-8.53386902,11.49391],[-8.35776665,11.305555],[-8.68054224,10.966389],[-8.28971526,11.007776],[-7.97398353,10.165611],[-8.14360419,9.533888],[-7.73277428,9.088055],[-7.95777223,8.813332],[-7.64653193,8.378416],[-8.19804591,8.496666],[-7.94683113,8.018505],[-8.46973464,7.561325],[-8.66054896,7.695],[-9.10693745,7.198889],[-9.48516066,7.361989],[-9.48363516,8.346931],[-10.26664368,8.488377],[-10.6958276,8.298611],[-10.57152515,9.059532],[-11.21443378,9.997499],[-12.45610419,9.888332],[-13.29560704,9.032143],[-13.60276815,9.734441]]]}, -{code:"GY", name:"Guyana", lng:-58.974, lat:4.792, borders:[[[-58.45056105,6.896944],[-58.41332216,6.969166],[-58.32801089,6.956666],[-58.45056105,6.896944]],[[-59.78913911,8.34111],[-58.47271761,7.349999],[-58.64605729,6.42611],[-58.31472757,6.894722],[-57.19969206,6.147499],[-57.24850428,5.486111],[-57.32719395,5.026111],[-57.92333969,4.821944],[-58.04719539,4.008333],[-57.64219683,3.356389],[-57.3013912,3.3775],[-56.47058914,1.944499],[-57.32469206,1.975278],[-58.8069456,1.185555],[-59.64273846,1.731111],[-59.98943284,2.693611],[-59.56859603,3.899444],[-59.67578854,4.388888],[-60.14747591,4.5175],[-60.09832027,5.217222],[-60.73032336,5.204799],[-61.38969395,5.94],[-61.13397937,6.711042],[-60.28859747,7.057221],[-60.71912346,7.535555],[-59.82556105,8.236111],[-59.99024979,8.535276],[-59.78913911,8.34111]]]}, -{code:"HT", name:"Haiti", lng:-72.278, lat:19.142, borders:[[[-73.58470154,18.05694389],[-73.66744995,18.05722237],[-73.70611572,18.10138893],[-73.58470154,18.05694389]],[[-72.8155365,18.69888878],[-73.29997253,18.9272213],[-72.85713196,18.83500099],[-72.8155365,18.69888878]],[[-72.67355347,19.91666603],[-71.75411987,19.70583153],[-71.71580505,18.74972343],[-72.0030365,18.60083199],[-71.76777649,18.03850365],[-73.38630676,18.26194572],[-73.88163757,18.02277946],[-74.44664001,18.34193993],[-74.26806641,18.66583443],[-72.34994507,18.53027916],[-72.80029297,19.03305626],[-72.72331238,19.45499992],[-73.46525574,19.68777657],[-72.67355347,19.91666603]],[[-73.73942566,18.58416557],[-73.71525574,18.62444496],[-73.79800415,18.62472343],[-73.73942566,18.58416557]],[[-72.62825012,19.9869442],[-72.95632935,20.05666542],[-72.81195068,20.09222221],[-72.62825012,19.9869442]]]}, -{code:"HN", name:"Honduras", lng:-86.863, lat:14.819, borders:[[[-87.62248212,13.246387],[-87.66963147,13.278332],[-87.61463912,13.28611],[-87.62248212,13.246387]],[[-87.57185383,13.36861],[-87.58165008,13.30361],[-87.65831039,13.335833],[-87.57185383,13.36861]],[[-85.84188889,16.010555],[-84.26469395,15.828609],[-83.85549957,15.459999],[-84.20849626,15.549999],[-84.0775143,15.351387],[-83.13182087,14.992979],[-83.23963912,14.982498],[-84.4826661,14.617777],[-84.90655542,14.808611],[-85.73228461,13.829235],[-86.01577721,14.065832],[-86.76298498,13.751621],[-86.69488558,13.296944],[-87.3013912,12.986599],[-87.39633161,13.410831],[-87.81552152,13.405386],[-87.75019828,13.864166],[-88.47081039,13.855276],[-89.33970636,14.416111],[-89.3482212,14.431982],[-89.15028418,15.073481],[-88.21470636,15.724443],[-85.84188889,16.010555]],[[-86.88359091,16.086666],[-86.99160737,16.087219],[-86.87608327,16.121666],[-86.88359091,16.086666]],[[-86.59960982,16.296108],[-86.41015657,16.421665],[-86.26327533,16.423332],[-86.59960982,16.296108]],[[-85.9446713,16.409721],[-85.90025311,16.49472],[-85.83546451,16.498886],[-85.9446713,16.409721]],[[-83.94663955,17.405277],[-83.95523046,17.417774],[-83.94433595,17.414165],[-83.94663955,17.405277]],[[-83.91047692,17.409721],[-83.9263912,17.416664],[-83.90994229,17.41861],[-83.91047692,17.409721]]]}, -{code:"HR", name:"Croatia", lng:16.693, lat:45.723, borders:[[[16.90389061,42.72610664],[16.81389046,42.76805305],[16.93972206,42.76832771],[16.90389061,42.72610664]],[[17.74500084,42.69194221],[17.32166481,42.78805733],[17.39944267,42.79777718],[17.74500084,42.69194221]],[[16.82055473,42.96000099],[17.18361092,42.91861153],[16.63305473,42.98111153],[16.82055473,42.96000099]],[[17.29888725,43.00694466],[17.64984322,42.88907814],[18.45555687,42.56582832],[18.50319862,42.44944191],[17.00416756,43.04666328],[17.29888725,43.00694466]],[[16.20833397,43.0222187],[16.05055428,43.06305122],[16.25194359,43.07249641],[16.20833397,43.0222187]],[[16.56203651,43.23085213],[17.19008446,43.12605476],[16.37305641,43.19416237],[16.56203651,43.23085213]],[[16.8516674,43.26916695],[16.40472221,43.32972145],[16.75305367,43.36277962],[16.8516674,43.26916695]],[[16.39055443,43.33277321],[16.19833183,43.41166115],[16.32638741,43.39416695],[16.39055443,43.33277321]],[[15.68749809,43.63083076],[15.60666847,43.67499733],[15.66222191,43.66583443],[15.68749809,43.63083076]],[[15.34638786,43.80888557],[15.37666893,43.77592659],[15.22500038,43.87305641],[15.34638786,43.80888557]],[[15.44666481,43.88721657],[15.26083183,44.00666237],[15.37694359,43.96805],[15.44666481,43.88721657]],[[15.25055504,44.01666451],[15.06249809,44.15722084],[15.24305534,44.05305672],[15.25055504,44.01666451]],[[14.85527611,44.17527962],[15.22638893,43.9011097],[15.13749886,43.8963871],[14.85527611,44.17527962]],[[14.83865547,44.60950279],[14.73277855,44.69805336],[15.24888802,44.32777596],[14.83865547,44.60950279]],[[14.52194405,44.47416115],[14.3674984,44.5902729],[14.33749962,44.71027565],[14.52194405,44.47416115]],[[14.75731087,44.80375481],[14.86527824,44.70666695],[14.65925407,44.79473686],[14.75731087,44.80375481]],[[14.45507622,44.90970039],[14.49333382,44.60638618],[14.29413795,44.90724754],[14.40027809,44.91527748],[14.31527901,45.17499733],[14.45507622,44.90970039]],[[14.75583458,44.94138527],[14.42888832,45.0783329],[14.5391674,45.23944283],[14.75583458,44.94138527]],[[16.57250023,46.47527504],[16.60787392,46.47623634],[17.66944313,45.83500099],[18.81702232,45.91296577],[18.9803257,45.37862587],[19.42388725,45.22583199],[19.03972054,44.86138344],[18.25194359,45.13888741],[15.78666496,45.17194557],[16.14305687,44.19944191],[17.57852745,42.94382668],[16.88444328,43.40305519],[15.98833275,43.50444221],[14.48277855,45.31110573],[14.29277611,45.32499886],[13.89916801,44.77443886],[13.59174156,45.48169899],[14.60138893,45.67527962],[15.17445946,45.4258213],[15.6977787,45.84416389],[15.65472221,46.21944618],[16.57250023,46.47527504]]]}, -{code:"HU", name:"Hungary", lng:19.134, lat:47.070, borders:[[[18.81702,45.912964],[17.669441,45.834999],[16.607872,46.476234],[16.111805,46.86972],[16.510555,47.00666],[16.713886,47.543884],[16.450554,47.698051],[17.053886,47.709442],[17.166386,48.012497],[17.251656,48.024994],[18.655277,47.758606],[20.660553,48.563332],[22.151442,48.411919],[22.894804,47.95454],[22.032497,47.530273],[21.176666,46.295555],[20.726955,46.17556],[20.261024,46.114853],[18.81702,45.912964]]]}, -{code:"IS", name:"Iceland", lng:-18.480, lat:64.764, borders:[[[-15.0708276,66.1436],[-14.61888671,65.994431],[-14.84832227,65.731384],[-14.33665658,65.783051],[-14.56360052,65.494995],[-13.61137406,65.509995],[-13.57027071,65.25943],[-14.03471975,65.193054],[-13.49944111,65.069153],[-14.5111048,64.797485],[-14.53915636,64.406097],[-14.92498984,64.26416],[-15.3833276,64.371933],[-18.70997991,63.391106],[-21.05359625,63.945],[-22.68915942,63.80555],[-22.70331173,64.080826],[-21.36277542,64.384987],[-22.10248557,64.314438],[-21.50805628,64.645554],[-22.17081029,64.453888],[-22.40719961,64.812485],[-24.05951707,64.890884],[-21.83582638,65.030273],[-22.56138222,65.171097],[-21.6986048,65.449158],[-24.54221714,65.497772],[-23.80552698,65.530548],[-24.10583492,65.806656],[-23.22636779,65.741653],[-23.87303575,65.866653],[-23.21332926,65.837494],[-23.81886635,66.013321],[-23.37110502,65.986664],[-23.66555772,66.111099],[-23.47359059,66.199158],[-22.42470127,65.847488],[-22.97220249,66.221375],[-22.43414665,66.267776],[-23.18861378,66.349716],[-22.9375,66.466385],[-21.39944416,66.027222],[-21.60305772,65.953323],[-21.33775711,65.733322],[-21.77776299,65.765823],[-21.08443828,65.159164],[-20.92720815,65.588882],[-20.44664355,65.494995],[-20.42443095,66.083054],[-20.1791684,66.12944],[-19.45165231,65.72583],[-19.45304141,66.056381],[-18.78416086,66.191101],[-18.0694385,65.643326],[-18.29943095,66.174713],[-16.59469961,66.09111],[-16.52776299,66.508041],[-15.3819405,66.142776],[-14.71082638,66.367218],[-15.0708276,66.1436]]]}, -{code:"IN", name:"India", lng:78.500, lat:21.000, borders:[[[93.91276741,7.02861214],[93.82386971,6.74555397],[93.67109871,7.18194389],[93.91276741,7.02861214]],[[93.66220284,7.40583229],[93.65443611,7.41750145],[93.66415596,7.41472054],[93.66220284,7.40583229]],[[93.63943672,7.24722099],[93.69359016,7.43889046],[93.72831917,7.32472038],[93.63943672,7.24722099]],[[93.45471382,7.86889076],[93.34942818,7.87999916],[93.31749153,7.99749947],[93.45471382,7.86889076]],[[93.57361031,7.92777824],[93.50277901,7.97722054],[93.54054451,8.01555443],[93.57361031,7.92777824]],[[93.48803902,7.98888969],[93.44304085,8.15361214],[93.51332283,8.22638893],[93.48803902,7.98888969]],[[73.03221321,8.24666405],[73.02083015,8.26861],[73.07887459,8.31027794],[73.03221321,8.24666405]],[[93.16914558,8.20138741],[93.05998421,8.27166557],[93.07388496,8.34805489],[93.16914558,8.20138741]],[[93.60942268,8.4299984],[93.60193062,8.56527519],[93.62608528,8.50805473],[93.60942268,8.4299984]],[[92.77443123,9.12471962],[92.70887947,9.16361046],[92.76165962,9.26361275],[92.77443123,9.12471962]],[[73.63749886,10.05277824],[73.63026619,10.07111168],[73.64554024,10.09749794],[73.63749886,10.05277824]],[[72.63360786,10.55083275],[72.62469673,10.55277824],[72.65054512,10.57749748],[72.63360786,10.55083275]],[[73.68414497,10.82305336],[73.66220284,10.82777596],[73.68525887,10.82999992],[73.68414497,10.82305336]],[[72.17997932,10.81749916],[72.17053413,10.80972099],[72.19748116,10.87277412],[72.17997932,10.81749916]],[[92.49275398,10.51833153],[92.34665108,10.69416618],[92.49498177,10.9011097],[92.49275398,10.51833153]],[[72.29915047,10.93805504],[72.28943062,10.94277763],[72.30137825,10.95416451],[72.29915047,10.93805504]],[[72.74942207,11.10888863],[72.73665047,11.1072216],[72.74720955,11.12055397],[72.74942207,11.10888863]],[[72.10748482,11.20277596],[72.09971809,11.20110893],[72.10803413,11.21555519],[72.10748482,11.20277596]],[[72.77832222,11.18888664],[72.77083015,11.20110893],[72.78915596,11.25694466],[72.77832222,11.18888664]],[[73.00694466,11.47666359],[73.00444221,11.5075016],[73.01332283,11.50222206],[73.00694466,11.47666359]],[[92.63304329,11.35416603],[92.64360237,11.51416588],[92.70332527,11.38555717],[92.63304329,11.35416603]],[[92.27137947,11.52444267],[92.21693611,11.59472084],[92.27581978,11.58222008],[92.27137947,11.52444267]],[[72.7124958,11.68861198],[72.70082283,11.68638802],[72.7152729,11.69999886],[72.7124958,11.68861198]],[[93.058321,11.88861275],[92.94331551,11.98277473],[92.97859383,12.03360939],[93.058321,11.88861275]],[[93.13611031,12.13194084],[93.12553596,12.13389015],[93.13136482,12.14916801],[93.13611031,12.13194084]],[[92.71705818,12.18280602],[92.71859932,11.49110985],[92.52443123,11.85416603],[92.71705818,12.18280602]],[[93.09387398,12.08805275],[93.06080818,12.14388847],[93.08665657,12.20722008],[93.09387398,12.08805275]],[[93.86554146,12.25916481],[93.8486042,12.27583122],[93.87330818,12.27749825],[93.86554146,12.25916481]],[[92.78253365,12.28767967],[92.77415657,12.29055595],[92.7833271,12.29389],[92.78253365,12.28767967]],[[92.83161354,12.31652641],[92.90165901,12.2658329],[92.75427437,12.07133675],[92.83161354,12.31652641]],[[92.90498543,12.38083076],[92.87275887,12.40583229],[92.91081429,12.40416527],[92.90498543,12.38083076]],[[92.92859077,12.90916634],[92.9874897,12.50861168],[92.75888252,12.3049984],[92.92859077,12.90916634]],[[92.69108772,12.79611015],[92.66887093,12.85527611],[92.71443367,12.98999977],[92.69108772,12.79611015]],[[92.87581062,13.39138985],[92.86665535,13.40055656],[92.87608528,13.4038868],[92.87581062,13.39138985]],[[94.27693367,13.41361046],[94.26388741,13.43027687],[94.28415108,13.44416618],[94.27693367,13.41361046]],[[93.06442451,13.23749733],[92.81341743,12.89792061],[93.00387764,13.57111168],[93.06442451,13.23749733]],[[93.04942513,13.63944435],[92.9930439,13.66166496],[93.03637886,13.6799984],[93.04942513,13.63944435]],[[80.94803047,15.73666573],[80.87858772,15.84333229],[80.99193001,15.7658329],[80.94803047,15.73666573]],[[82.37086678,16.86777687],[82.370821,16.85833168],[82.36886787,16.87111092],[82.37086678,16.86777687]],[[88.8972187,21.52499962],[88.84498787,21.52694511],[88.82554817,21.55944252],[88.83638191,21.60583305],[88.90860176,21.56860924],[88.8972187,21.52499962]],[[72.71805,21.60638618],[72.60331917,21.64361],[72.76609993,21.65527534],[72.71805,21.60638618]],[[88.13472176,21.61999702],[88.04498482,21.66082954],[88.13247871,21.87610817],[88.13472176,21.61999702]],[[88.64637947,21.8255558],[88.64499092,21.78472328],[88.59359932,21.79777718],[88.57916451,21.82694435],[88.64193916,21.92166328],[88.64637947,21.8255558]],[[88.08859444,21.84944344],[88.11303902,21.94860649],[88.13527107,21.90749931],[88.08859444,21.84944344]],[[78.07554817,35.44582558],[78.30914497,34.64249611],[78.98535347,34.35001564],[78.81164742,33.52582741],[79.53027534,32.75416756],[78.97110176,32.35083199],[78.76054573,32.63555336],[78.39776802,32.54860878],[78.76721382,31.30999947],[79.09248543,31.43749809],[81.02536201,30.20435524],[80.37692451,29.74860573],[80.05581856,28.83611107],[82.06640053,27.91415596],[83.29136848,27.33777809],[84.1472187,27.51138878],[85.85554695,26.57027626],[88.01471138,26.3647213],[88.14279366,27.86605644],[88.83166695,28.01333427],[88.91772652,27.32032585],[88.89387703,26.97555351],[89.64305305,26.7152729],[92.06999397,26.8619442],[92.11360359,27.2974987],[91.65776253,27.76472282],[92.54498482,27.86194038],[94.64750862,29.33345985],[95.38777351,29.03527641],[96.07748604,29.46860695],[96.39526558,29.25527763],[96.16914558,28.90360832],[96.4708271,29.05666542],[96.61581612,28.79027748],[96.40193367,28.35111046],[97.34887886,28.2227726],[96.88665962,27.60610771],[97.13665962,27.0858326],[96.19413948,27.27083397],[95.14137459,26.61249733],[95.17804146,26.05888939],[94.62553596,25.39777565],[94.73442268,25.02472115],[94.15109444,23.85527611],[93.33873177,24.0779171],[93.19664192,22.25638771],[92.60081673,21.98221779],[92.2833271,23.70527458],[91.94999886,23.73221779],[91.61360359,22.94305229],[91.15942574,23.64055443],[91.37329292,24.10194206],[92.12137032,24.39333153],[92.40637398,25.03055382],[89.84526253,25.28861046],[89.73915291,26.15638542],[89.34277534,26.01703072],[88.43304634,26.55138969],[88.11053658,25.83555412],[89.00943184,25.28833199],[88.45082283,25.18777657],[88.04332161,24.68416405],[88.75053596,24.22098351],[88.5638752,23.65221977],[88.98610115,23.20833015],[89.06300545,22.11547661],[89.00555611,21.90360832],[89.08888435,21.62805367],[89.00749397,21.60000038],[88.85554695,21.63277626],[88.78442574,21.55694389],[88.70721626,21.56638908],[88.66775703,22.20221901],[88.55693245,21.81333351],[88.62858772,21.74916267],[88.57222176,21.55999947],[88.49609566,21.95027351],[88.25416756,21.54860878],[88.19941902,22.15527534],[87.90776253,22.42166328],[88.16804695,22.09166527],[87.79637337,21.69888496],[86.96331978,21.38194084],[87.02556038,20.67482948],[86.42025948,19.98277473],[85.45138741,19.66027641],[85.43488503,19.88701057],[84.10637093,18.29222298],[82.36442757,17.10083199],[82.30169868,16.5830555],[81.31337166,16.36333275],[81.01727486,15.77555656],[80.89193916,16.0261097],[80.82527351,15.75194359],[80.27943611,15.69916725],[80.04887581,15.04888725],[80.31303596,13.43916512],[80.04942513,13.61777687],[80.34971809,13.33416557],[79.76304817,11.64888954],[79.8597126,10.28888893],[79.32499886,10.28083229],[78.90803719,9.47971916],[79.45138741,9.14999962],[78.39665413,9.08971977],[78.06053352,8.36416435],[77.5361042,8.07194328],[76.57582283,8.87694359],[75.6888752,11.43527794],[74.81025887,12.8647213],[74.41192818,14.48333168],[73.44775581,16.05583382],[72.85386848,18.66055489],[73.0555439,19.01194572],[72.76999092,18.94305229],[72.78055,19.31249809],[73.04722786,19.21725655],[72.66415596,19.87083244],[72.93441963,20.77472115],[72.56414986,21.37805367],[73.13081551,21.75361061],[72.5416584,21.66388512],[72.73442268,21.98638344],[72.50082588,21.97666359],[72.91914558,22.2677784],[72.15193367,22.28388786],[72.11053658,21.20194054],[70.81888008,20.69749641],[68.9444294,22.29416466],[70.16554451,22.54833412],[70.50694466,23.10222054],[69.21582222,22.84027672],[68.43304634,23.4299984],[68.74136543,23.84416389],[68.32138252,23.58083153],[68.19780159,23.76668739],[68.74720955,23.9699955],[68.78305244,24.33277702],[70.01471138,24.16971779],[71.10582161,24.41638756],[70.66638374,25.69833183],[70.08804512,25.98277473],[70.18359566,26.53611183],[69.50610542,26.75444603],[69.5802784,27.17333031],[70.36831856,28.02083397],[70.82943916,27.70638466],[71.89694405,27.96194267],[73.39749336,29.94277382],[73.93340492,30.13600349],[73.87249947,30.39010048],[74.69458961,31.0539608],[74.6053257,31.87711906],[75.38128853,32.21424294],[74.01638985,33.18860054],[73.99054146,33.74388313],[74.29582405,33.97748756],[73.91331673,34.06860542],[73.9416523,34.6463871],[76.86998177,34.65888405],[77.04248238,35.09916115],[77.82393074,35.50132942],[78.07554817,35.44582558]],[[86.28360176,20.03805351],[86.27609444,20.05000114],[86.25139046,20.04500008],[86.28360176,20.03805351]]]}, -{code:"IR", name:"Iran", lng:54.301, lat:32.565, borders:[[[54.034439,26.484718],[53.903603,26.53611],[54.018883,26.554165],[54.034439,26.484718]],[[53.318054,26.797775],[53.203323,26.802498],[53.151657,26.846386],[53.318054,26.797775]],[[56.346657,26.82222],[56.34388,26.884163],[56.4086,26.885551],[56.346657,26.82222]],[[55.734993,26.838051],[55.632767,26.79472],[55.688599,26.929161],[55.734993,26.838051]],[[56.24527,26.927494],[55.283607,26.558609],[55.769989,26.792774],[55.75222,26.951939],[56.24527,26.927494]],[[56.470825,27.037777],[56.434715,27.086941],[56.469986,27.108608],[56.509163,27.071663],[56.470825,27.037777]],[[50.32888,29.20805],[50.291382,29.278053],[50.338326,29.268887],[50.32888,29.20805]],[[45.004433,39.416382],[46.178246,38.841148],[46.540375,38.875587],[47.976662,39.719231],[48.359787,39.385216],[48.020821,38.835541],[48.888283,38.442406],[49.102486,37.643044],[50.191376,37.38916],[51.101105,36.728874],[53.943321,36.799995],[53.90564,37.350853],[54.681107,37.443604],[55.442764,38.086105],[57.212212,38.281937],[57.450272,37.939156],[59.338882,37.539162],[60.333054,36.656097],[61.157211,36.649994],[61.276558,35.607246],[60.721657,34.522217],[60.878876,34.319717],[60.508331,34.140274],[60.527771,33.644157],[60.943047,33.51944],[60.582497,33.066101],[60.84388,31.498329],[61.713608,31.383331],[61.851105,31.021111],[60.868599,29.863884],[61.905548,28.554996],[62.78138,28.266941],[62.782494,27.260555],[63.341934,27.122498],[63.176384,26.631107],[61.858047,26.234718],[61.611031,25.197647],[57.318054,25.770832],[56.690544,27.148331],[56.132767,27.160275],[54.794716,26.489994],[53.747772,26.70916],[52.440269,27.640831],[51.430275,27.937775],[50.048607,30.207222],[49.551384,30.0075],[48.984993,30.513054],[48.920547,30.043053],[48.545555,29.96303],[48.032494,30.491383],[48.036385,30.997494],[47.693878,31.00111],[47.864441,31.798607],[47.434158,32.397774],[46.107216,32.967491],[46.181938,33.260277],[45.401054,33.979568],[45.797733,34.91404],[46.171364,35.113411],[45.979988,35.584717],[46.346939,35.817215],[45.405823,35.990829],[44.787338,37.149712],[44.61805,37.727768],[44.223969,37.899151],[44.484154,38.345543],[44.034157,39.384995],[44.4161,39.425262],[44.60582,39.78054],[44.813042,39.630814],[45.004433,39.416382]]]}, -{code:"IL", name:"Israel", lng:34.851, lat:31.026, borders:[[[35.25972,31.78722],[35.251663,31.788055],[35.248886,31.808887],[35.25972,31.78722]],[[35.623634,33.245728],[35.648888,32.685272],[35.552567,32.394196],[35.282494,32.516937],[34.884995,31.391388],[35.478195,31.497322],[34.97998,29.545753],[34.903801,29.486706],[34.267578,31.216541],[34.33416,31.25972],[34.490547,31.596096],[35.10083,33.093605],[35.623634,33.245728]]]}, -{code:"IT", name:"Italy", lng:12.800, lat:42.700, borders:[[[12.127777,47.001663],[12.440554,46.690826],[13.718655,46.526611],[13.383055,46.297218],[13.669167,46.177498],[13.48,46.011108],[13.919167,45.637497],[13.716944,45.596107],[13.193333,45.778053],[12.281387,45.468048],[12.16111,45.263885],[12.539165,44.961105],[12.245554,44.715828],[12.368332,44.246666],[13.621666,43.553886],[14.016666,42.669998],[14.739721,42.085548],[16.141941,41.914162],[15.932499,41.47805],[18.011665,40.64444],[18.512218,40.136665],[18.349442,39.791939],[17.859165,40.283607],[16.913609,40.445549],[16.486664,39.767494],[17.151108,39.389999],[17.169167,38.963333],[16.594997,38.800827],[16.062496,37.924164],[15.631666,38.011665],[16.2225,38.910828],[15.666666,40.03083],[11.098888,42.393051],[10.107498,44.0075],[8.748888,44.429161],[7.528055,43.788605],[7.662222,44.17083],[6.976388,44.284164],[7.031666,44.831383],[6.61976,45.110138],[7.127777,45.257774],[6.79897,45.78067],[7.038054,45.931938],[7.855742,45.919052],[8.436388,46.463333],[9.036665,45.837776],[9.281944,46.495827],[10.129999,46.227219],[10.050278,46.539993],[10.465277,46.546387],[10.471235,46.871353],[12.127777,47.001663]],[[12.459166,43.896111],[12.509998,43.986938],[12.415798,43.957954],[12.459166,43.896111]],[[12.44509033,41.90311752],[12.45666017,41.90142602],[12.45165334,41.90798903],[12.44509033,41.90311752]],[[12.422777,45.420555],[12.32361,45.343887],[12.373333,45.428055],[12.422777,45.420555]],[[9.844166,43.034439],[9.806944,43.00972],[9.804165,43.063889],[9.831665,43.075554],[9.844166,43.034439]],[[10.441111,42.844444],[10.423054,42.708885],[10.101944,42.772499],[10.441111,42.844444]],[[10.088333,42.57222],[10.081944,42.618889],[10.101665,42.593605],[10.088333,42.57222]],[[10.915833,42.325272],[10.866388,42.358604],[10.877777,42.388054],[10.915833,42.325272]],[[10.316666,42.317497],[10.293055,42.349998],[10.326111,42.34333],[10.316666,42.317497]],[[9.513332,41.14666],[9.825832,40.526108],[9.569166,39.150551],[9.018332,39.266388],[8.859165,38.879166],[8.406944,38.958611],[8.556665,39.866104],[8.192499,40.913605],[9.513332,41.14666]],[[8.339167,41.062492],[8.215277,40.992493],[8.32111,41.121384],[8.339167,41.062492]],[[12.964167,40.883888],[12.950277,40.91777],[12.988054,40.931389],[12.964167,40.883888]],[[13.951387,40.701385],[13.853888,40.734718],[13.948055,40.742493],[13.951387,40.701385]],[[14.210554,40.560555],[14.261944,40.55555],[14.197222,40.536659],[14.210554,40.560555]],[[8.292221,39.093605],[8.223888,39.164719],[8.302776,39.189995],[8.292221,39.093605]],[[15.21361,38.770554],[15.190277,38.79055],[15.239166,38.806107],[15.21361,38.770554]],[[13.173332,38.690277],[13.162222,38.714439],[13.198332,38.711388],[13.173332,38.690277]],[[14.868332,38.531387],[14.794722,38.567772],[14.86861,38.578049],[14.868332,38.531387]],[[14.955276,38.445549],[14.912222,38.516663],[14.963888,38.517494],[14.955276,38.445549]],[[14.988888,38.364166],[14.941111,38.399437],[14.958887,38.431107],[14.988888,38.364166]],[[15.528889,38.13694],[15.086666,37.479439],[15.316666,37.008888],[15.081388,36.649162],[12.422222,37.796104],[13.316666,38.21833],[13.768888,37.970551],[15.528889,38.13694]],[[12.073889,37.953606],[12.029999,37.986938],[12.059166,37.989166],[12.073889,37.953606]],[[12.354166,37.906105],[12.271387,37.936386],[12.339167,37.934441],[12.354166,37.906105]],[[12.015833,36.738327],[11.930832,36.82972],[12.048332,36.796944],[12.015833,36.738327]]]}, -{code:"CI", name:"Cote d'Ivoire", lng:-5.556, lat:7.632, borders:[[[-3.10226825,5.109545],[-3.10304039,5.085022],[-3.16833211,5.117222],[-3.10226825,5.109545]],[[-4.78727644,5.168312],[-4.14638139,5.277222],[-4.00444324,5.231667],[-4.78727644,5.168312]],[[-4.78727644,5.168312],[-5.31971944,5.230833],[-5.00292275,5.129237],[-7.52539451,4.352806],[-7.42333043,5.839444],[-8.6063693,6.507815],[-8.30831944,6.860833],[-8.46973464,7.561325],[-7.94683113,8.018505],[-8.19804591,8.496666],[-7.64653193,8.378416],[-7.95777223,8.813332],[-7.73277428,9.088055],[-8.14360419,9.533888],[-7.97398353,10.165611],[-7.63555453,10.448332],[-6.98804874,10.147499],[-6.24339915,10.735256],[-6.11138169,10.197777],[-5.51984574,10.436272],[-4.70444477,9.698055],[-3.63360854,9.954443],[-2.68555945,9.481817],[-2.48777742,8.197777],[-3.24916598,6.611388],[-2.7644437,5.579166],[-2.92812658,5.100222],[-3.14249985,5.367777],[-3.29722127,5.118055],[-4.0041633,5.253611],[-3.80777681,5.375555],[-4.78727644,5.168312]]]}, -{code:"IQ", name:"Iraq", lng:43.772, lat:33.048, borders:[[[45.797733,34.91404],[45.401054,33.979568],[46.181938,33.260277],[46.107216,32.967491],[47.434158,32.397774],[47.864441,31.798607],[47.693878,31.00111],[48.036385,30.997494],[48.032494,30.491383],[48.545555,29.96303],[48.54332,29.926662],[48.443047,29.927498],[48.158875,30.038052],[47.943474,30.017555],[47.931099,30.018887],[47.169991,30.01527],[46.546944,29.104198],[44.721661,29.19833],[42.084999,31.11166],[40.41333,31.94833],[39.196743,32.154942],[38.794701,33.377594],[41.003876,34.419434],[41.290276,36.355553],[42.355614,37.106926],[42.790825,37.38472],[44.116379,37.316376],[44.317215,36.970543],[44.787338,37.149712],[45.405823,35.990829],[46.346939,35.817215],[45.979988,35.584717],[46.171364,35.113411],[45.797733,34.91404]]]}, -{code:"JP", name:"Japan", lng:139.068, lat:36.491, borders:[[[153.95858955,24.29500008],[153.93969917,24.30083275],[153.9527607,24.32138634],[153.95858955,24.29500008]],[[123.870821,24.25250053],[123.67886543,24.31611061],[123.92192268,24.37111092],[123.870821,24.25250053]],[[122.99693489,24.43888664],[122.93525887,24.45805168],[123.00943184,24.46693993],[122.99693489,24.43888664]],[[131.26416206,24.45499611],[131.24301338,24.48444176],[131.273592,24.47582817],[131.26416206,24.45499611]],[[124.26165962,24.45749855],[124.21914864,24.33527565],[124.07582283,24.42471886],[124.32443428,24.58749962],[124.26165962,24.45749855]],[[141.30914497,24.7480526],[141.29025459,24.77805519],[141.3574543,24.78888893],[141.30914497,24.7480526]],[[125.35637093,24.77666664],[125.45110512,24.73971748],[125.25721931,24.72916222],[125.26332283,24.88416481],[125.35637093,24.77666664]],[[141.29358101,25.41832924],[141.26831245,25.44527626],[141.29358101,25.45138741],[141.29358101,25.41832924]],[[131.24383736,25.81666756],[131.20800972,25.83333397],[131.25082588,25.87222099],[131.24383736,25.81666756]],[[126.76193428,26.38694191],[126.78720284,26.29694557],[126.69220161,26.36055565],[126.76193428,26.38694191]],[[142.1777668,26.62249947],[142.11136055,26.7152729],[142.15304756,26.68721962],[142.1777668,26.62249947]],[[128.25277901,26.63888741],[127.6527729,26.0830555],[127.88388252,26.66749763],[128.28720284,26.85499763],[128.25277901,26.63888741]],[[142.2324543,27.03333473],[142.17831612,27.07527733],[142.23330879,27.08916664],[142.2324543,27.03333473]],[[142.19470406,27.1483326],[142.17859077,27.15666389],[142.19412422,27.1911068],[142.19470406,27.1483326]],[[140.87802315,27.22582817],[140.86413765,27.21944237],[140.87219429,27.24305153],[140.87802315,27.22582817]],[[128.60913277,27.35888863],[128.523592,27.41361046],[128.7019062,27.44582939],[128.60913277,27.35888863]],[[142.19552803,27.59916496],[142.16998482,27.62471962],[142.19330025,27.61777687],[142.19552803,27.59916496]],[[142.08914375,27.71777534],[142.06884956,27.72666359],[142.08691597,27.73221779],[142.08914375,27.71777534]],[[128.95108223,27.67582893],[128.94748116,27.90749931],[129.02997017,27.77444267],[128.95108223,27.67582893]],[[129.336092,28.07527733],[129.21911812,28.09777641],[129.19107246,28.18860817],[129.336092,28.07527733]],[[129.99218941,28.28166771],[129.91497993,28.29611015],[130.02746773,28.36638832],[129.99218941,28.28166771]],[[129.71551704,28.45110893],[129.37552071,28.11527443],[129.14358711,28.25027657],[129.71551704,28.45110893]],[[129.73303413,29.60972023],[129.70608711,29.64749718],[129.74133492,29.66333199],[129.73303413,29.60972023]],[[129.89636421,29.87416649],[129.92190742,29.81971931],[129.8519001,29.85222054],[129.89636421,29.87416649]],[[129.9630146,29.95722008],[129.92746162,29.97443962],[129.92859077,30.00000191],[129.9630146,29.95722008]],[[130.55859566,30.23638344],[130.38272285,30.39388847],[130.66638374,30.38194084],[130.55859566,30.23638344]],[[140.33026314,30.4624958],[140.30304146,30.47527504],[140.32913399,30.47916222],[140.33026314,30.4624958]],[[130.90609932,30.35471916],[130.86941719,30.46971703],[131.05359077,30.84027672],[130.90609932,30.35471916]],[[129.7213459,31.63221931],[129.67053413,31.65833092],[129.78274727,31.79333305],[129.7213459,31.63221931]],[[140.02554512,31.93305397],[139.99939156,31.94249535],[140.0097065,31.94666481],[140.02554512,31.93305397]],[[130.15774727,32.10888863],[130.11636543,32.21666145],[130.19552803,32.17694283],[130.15774727,32.10888863]],[[130.36941719,32.37471199],[130.20941353,32.44304848],[130.44803047,32.50527382],[130.36941719,32.37471199]],[[130.02997017,32.19499397],[130.15719795,32.54361153],[130.20858955,32.33499336],[130.02997017,32.19499397]],[[128.90081978,32.64305305],[128.60107613,32.61860085],[128.66079903,32.78193855],[128.90081978,32.64305305]],[[139.84164619,33.03499794],[139.7435627,33.13804817],[139.86413765,33.10166359],[139.84164619,33.03499794]],[[129.10052681,32.97860146],[129.0555439,32.81638527],[129.11773872,33.14554787],[129.10052681,32.97860146]],[[129.39221382,33.16471291],[129.45413399,33.33166695],[129.56469917,33.38694191],[129.39221382,33.16471291]],[[132.27609444,33.75943947],[132.18551826,33.78333473],[132.23053169,33.79527473],[132.27609444,33.75943947]],[[129.75470161,33.72693825],[129.65887642,33.74499702],[129.70163155,33.85694313],[129.75470161,33.72693825]],[[139.61828804,33.83221626],[139.58273506,33.84360695],[139.60107613,33.88777351],[139.61828804,33.83221626]],[[132.32608223,33.89471626],[132.18441963,33.9074955],[132.45163155,33.92276955],[132.32608223,33.89471626]],[[131.21414375,33.59554482],[131.66971016,33.64749336],[131.51638985,33.26555061],[131.9027729,33.25694466],[131.98941231,32.83055305],[131.34301949,31.37388802],[130.66638374,30.99666405],[130.80859566,31.68416405],[130.53442574,31.5288868],[130.63553047,31.17888451],[130.22802925,31.2488842],[130.16247749,32.00694466],[130.56970406,32.44249153],[130.58746529,32.63193703],[130.44607735,32.62054634],[130.60553169,32.79138374],[130.211092,33.17083168],[130.34607124,32.66443825],[129.74606514,32.56110573],[129.67553902,33.06999397],[129.94412422,32.99249458],[129.57885933,33.35360909],[130.69079781,33.93582344],[131.21414375,33.59554482]],[[129.8333149,33.34110451],[129.86108589,33.37555122],[129.81360054,33.39777565],[129.8333149,33.34110451]],[[139.52609444,34.0324955],[139.48217964,34.06999397],[139.56051826,34.1061039],[139.52609444,34.0324955]],[[132.54553413,34.11110878],[132.55746651,34.06110573],[132.45663643,34.08693886],[132.52887154,34.18249702],[132.54553413,34.11110878]],[[132.44885445,34.11554909],[132.38553047,34.24360847],[132.48190498,34.27916145],[132.44885445,34.11554909]],[[132.97107124,34.18582344],[133.02969551,34.29110909],[133.05053902,34.2097187],[132.97107124,34.18582344]],[[129.23690987,34.08221626],[129.21747017,34.32193947],[129.34939766,34.27999306],[129.23690987,34.08221626]],[[134.22357368,34.34443855],[134.75305367,33.82610512],[134.18774605,33.23832893],[133.59884834,33.50139046],[132.80304146,32.73555183],[132.37246895,33.4663868],[132.01581001,33.33721352],[132.89914131,34.10777473],[133.52414131,33.96138191],[134.22357368,34.34443855]],[[139.27887154,34.32110786],[139.24856758,34.35083199],[139.29608345,34.41971779],[139.27887154,34.32110786]],[[134.35080147,34.43443489],[134.19275093,34.50999641],[134.3685627,34.55027199],[134.35080147,34.43443489]],[[134.79025459,34.19332314],[134.66693306,34.29694557],[135.0180378,34.59276772],[134.79025459,34.19332314]],[[129.33996773,34.29471779],[129.30026436,34.55694008],[129.46386909,34.68943214],[129.33996773,34.29471779]],[[139.45331001,34.67249489],[139.36996651,34.69249153],[139.37161446,34.78166389],[139.45331001,34.67249489]],[[133.07052803,35.99027443],[133.0222187,35.99138069],[133.01080513,36.01444435],[133.07052803,35.99027443]],[[133.09884834,36.02999306],[133.07467842,36.07999611],[133.13189888,36.10000038],[133.09884834,36.02999306]],[[133.00219917,36.03305244],[132.95303535,36.06638527],[133.08664131,36.12388039],[133.00219917,36.03305244]],[[133.29193306,36.32499886],[133.37857246,36.20054817],[133.25247383,36.15249062],[133.29193306,36.32499886]],[[137.05746651,37.14305305],[136.95413399,37.08943367],[136.9111042,37.14332771],[137.05746651,37.14305305]],[[138.43524361,38.04749489],[138.21829414,37.80082893],[138.51638985,38.32027626],[138.43524361,38.04749489]],[[141.2708149,41.34249306],[142.06970406,39.54666328],[141.52581978,38.26638985],[140.95358467,38.14805031],[140.97552681,36.98777199],[140.56552315,36.24749184],[140.83719063,35.74332619],[140.33468819,35.13138008],[139.77026558,34.95332527],[139.9685688,35.66082191],[139.67663765,35.13527107],[139.17108345,35.23610878],[138.84747505,34.59249306],[138.74496651,35.12276649],[138.21414375,34.59916115],[137.0361042,34.56471443],[137.34747505,34.72221565],[136.87774849,34.72027016],[136.84692574,35.0783329],[136.5194416,34.69249153],[136.89914131,34.26693916],[136.34384346,34.18971443],[135.7722187,33.45499611],[135.06329536,33.87777138],[135.33358955,34.71832466],[132.36773872,34.35860634],[132.05053902,33.77249336],[131.74579048,34.05360603],[130.89331245,33.92166328],[130.94635201,34.41638374],[131.40555,34.41944313],[133.0880146,35.58166695],[136.07275581,35.64860725],[135.95941353,35.97332191],[136.71246529,36.75139046],[136.78692818,37.36221504],[137.35635567,37.50471687],[137.35522652,37.43138313],[137.03747749,37.18194008],[136.92135811,37.19721413],[136.86328316,37.08777046],[137.30246162,36.74638557],[138.5805378,37.39860725],[139.42440987,38.15165901],[140.02276802,39.37860298],[140.03830147,39.80304909],[139.70245552,39.93194008],[140.02054024,40.23082161],[139.85275459,40.60110664],[140.26886177,40.80665779],[140.34857368,41.24804878],[140.72497749,40.82916451],[141.14941597,40.86221504],[141.22885323,41.22999001],[140.76303291,41.17276955],[140.91885567,41.53027534],[141.2708149,41.34249306]],[[139.56302071,42.22860146],[139.42831612,42.06166267],[139.433321,42.20193672],[139.56302071,42.22860146]],[[145.29086494,43.53866005],[145.22000313,43.60255241],[145.36108589,43.55555153],[145.29086494,43.53866005]],[[143.97024727,44.14110756],[143.87774849,44.14777565],[143.81192207,44.16805458],[143.97024727,44.14110756]],[[141.25943184,45.09804726],[141.1347065,45.21388435],[141.308321,45.18888283],[141.25943184,45.09804726]],[[142.04831123,45.40471077],[143.7722187,44.09415627],[144.77942085,43.91332436],[145.34247017,44.34415627],[145.06997871,43.77471352],[145.25610542,43.31499672],[145.8222065,43.36944008],[143.98968697,42.90665627],[143.23996162,41.92416573],[141.79052925,42.60638618],[140.98608589,42.29500008],[140.46164131,42.56777382],[140.28497505,42.25305367],[141.1991291,41.79833412],[140.06970406,41.41916084],[139.83636665,42.61527443],[140.52887154,43.00055122],[140.46774483,43.3672123],[141.40719795,43.29138374],[141.7972126,44.62499428],[141.57803535,45.23249245],[142.04831123,45.40471077]],[[141.03943062,45.26693916],[140.97357368,45.4652729],[141.07440376,45.41415596],[141.03943062,45.26693916]]]}, -{code:"JM", name:"Jamaica", lng:-77.320, lat:18.151, borders:[[[-77.13183595,17.878887],[-77.73321573,17.84861],[-78.33970636,18.362499],[-76.94522093,18.394444],[-76.22102367,17.904163],[-77.13183595,17.878887]]]}, -{code:"JO", name:"Jordan", lng:36.319, lat:30.703, borders:[[[34.961388,29.360832],[34.97998,29.545753],[35.478195,31.497322],[35.552567,32.394196],[35.648888,32.685272],[36.837776,32.313606],[38.794701,33.377594],[39.196743,32.154942],[37.005272,31.505554],[38.001389,30.504166],[37.502777,30.00222],[36.743607,29.864719],[36.07,29.188889],[34.961388,29.360832]]]}, -{code:"KE", name:"Kenya", lng:37.858, lat:0.530, borders:[[[41.138054,-2.12444211],[40.950272,-2.17361037],[41.063889,-2.04416613],[41.138054,-2.12444211]],[[35.940552,4.622499],[37.039719,4.375555],[38.121109,3.611666],[39.524437,3.406389],[40.783768,4.287975],[41.171387,3.9425],[41.905167,3.980322],[40.986595,2.829956],[40.998329,-0.8661106],[41.558159,-1.67486726],[41.315277,-1.95805499],[40.891663,-2.01916689],[40.963608,-2.29888551],[40.854996,-2.23611037],[40.638054,-2.54999847],[40.236664,-2.66333097],[39.203026,-4.6696154],[37.613609,-3.5041643],[37.602776,-2.99583189],[33.920273,-1.00110915],[33.907219,0.103056],[35.00972,1.895278],[34.463333,3.671389],[33.996666,4.222777],[34.388191,4.609682],[35.940552,4.622499]]]}, -{code:"KG", name:"Kyrgyzstan", lng:74.555, lat:41.465, borders:[[[80.234024,42.19622],[78.080826,41.040787],[76.873871,41.014107],[76.345825,40.35022],[75.697205,40.29911],[75.578049,40.647995],[74.86026,40.519386],[73.994431,40.046043],[73.655685,39.454826],[72.248596,39.191856],[71.473038,39.6213],[70.997757,39.40094],[69.306091,39.539436],[69.540817,40.131378],[70.498032,39.90683],[70.98204,40.244843],[71.710541,40.145767],[73.173035,40.822998],[72.19548,41.006592],[71.69136,41.556335],[71.418045,41.118553],[70.187195,41.52829],[71.276382,42.195511],[70.97081,42.254669],[71.171097,42.691353],[71.747208,42.823586],[73.519714,42.408005],[73.583878,43.038574],[74.293594,43.216904],[75.664429,42.807457],[79.194702,42.795792],[80.234024,42.19622]]]}, -{code:"KP", name:"Korea, Democratic People's Republic of", lng:126.451, lat:39.778, borders:[[[124.8461,39.497215],[124.88916,39.605553],[124.934143,39.60833],[124.8461,39.497215]],[[130.638885,42.406937],[130.697418,42.292206],[129.699402,41.648605],[129.709412,40.829994],[127.506943,39.724709],[127.393051,39.200829],[128.363556,38.625244],[128.079956,38.311935],[127.106087,38.287498],[126.688492,37.833908],[125.589157,38.027214],[125.724426,37.91082],[125.342758,37.671379],[125.512207,37.88694],[124.980553,37.924438],[125.268051,38.072769],[124.664703,38.121101],[124.993591,38.588326],[125.65332,38.627213],[125.139977,38.796387],[125.448318,39.576385],[125.123032,39.557213],[124.744431,39.776939],[124.624153,39.594994],[124.373596,40.09362],[126.016937,40.899994],[126.91304,41.796104],[128.155823,41.382492],[128.058868,42.003326],[128.925812,42.024437],[129.711914,42.444153],[129.907532,43.005821],[130.60437,42.42186],[130.638885,42.406937]]]}, -{code:"KI", name:"Kiribati", lng:175.036, lat:-1.508, borders:[[[-151.78350867,-11.46637878],[-151.8079228,-11.44970732],[-151.81420911,-11.39250166],[-151.78350867,-11.46637878]],[[-152.39129684,-10.10526277],[-152.40652442,-10.09720649],[-152.39541663,-10.09583065],[-152.39129684,-10.10526277]],[[-150.22409019,-9.9541592],[-150.23300145,-9.93861378],[-150.22036697,-9.92388732],[-150.22409019,-9.9541592]],[[-150.22515845,-9.91583104],[-150.22888167,-9.89082699],[-150.21905542,-9.90138815],[-150.22515845,-9.91583104]],[[-155.87805152,-5.63999878],[-155.92788703,-5.61888771],[-155.8560182,-5.61943897],[-155.87805152,-5.63999878]],[[-172.1875,-4.5316636],[-172.23126248,-4.50444224],[-172.19619712,-4.49194272],[-172.1875,-4.5316636]],[[-171.23144577,-4.46138527],[-171.26431259,-4.44638086],[-171.23541227,-4.43805126],[-171.23144577,-4.46138527]],[[-154.93920897,-4.0455476],[-154.95620766,-4.10250083],[-155.01586942,-4.06083195],[-154.93920897,-4.0455476]],[[-171.07794186,-3.14166582],[-171.08972136,-3.13750053],[-171.08642556,-3.10888825],[-171.07794186,-3.14166582]],[[-171.62780723,-2.8324971],[-171.62631255,-2.86944279],[-171.72558588,-2.77277711],[-171.62780723,-2.8324971]],[[176.848297,-2.66944126],[176.774139,-2.60777528],[176.833313,-2.63388749],[176.848297,-2.66944126]],[[175.971893,-2.50499832],[175.960236,-2.50583134],[175.964417,-2.48110824],[175.971893,-2.50499832]],[[175.58609,-1.91972121],[175.54776,-1.82166644],[175.592743,-1.88333151],[175.58609,-1.91972121]],[[175.531372,-1.80610976],[175.493561,-1.76972197],[175.519714,-1.77777734],[175.531372,-1.80610976]],[[175.041931,-1.55249954],[175.001648,-1.52860946],[175.046082,-1.43472189],[175.041931,-1.55249954]],[[174.873291,-1.40805461],[174.857452,-1.40860969],[174.853577,-1.39916521],[174.873291,-1.40805461]],[[176.464691,-1.43527788],[176.390533,-1.32444454],[176.421356,-1.34833181],[176.464691,-1.43527788]],[[175.954681,-1.27916544],[176.018311,-1.3894428],[175.934143,-1.30249954],[175.954681,-1.27916544]],[[174.767761,-1.25583234],[174.71637,-1.13999878],[174.767212,-1.20722197],[174.767761,-1.25583234]],[[174.489685,-0.81666621],[174.458008,-0.65361041],[174.495789,-0.77027795],[174.489685,-0.81666621]],[[174.458862,-0.65166628],[174.377167,-0.59749969],[174.392487,-0.59472159],[174.458862,-0.65166628]],[[173.618011,0.133611],[173.604126,0.2125],[173.631622,0.216667],[173.618011,0.133611]],[[173.409698,0.203611],[173.402191,0.233056],[173.425537,0.215278],[173.409698,0.203611]],[[173.384979,0.244167],[173.371338,0.250278],[173.376617,0.266111],[173.384979,0.244167]],[[173.931915,0.298055],[173.923584,0.302222],[173.939423,0.320833],[173.931915,0.298055]],[[173.830536,0.448333],[173.921631,0.379722],[173.804962,0.431111],[173.830536,0.448333]],[[173.021912,1.006667],[173.084137,0.951944],[172.981354,0.821667],[173.021912,1.006667]],[[172.939697,1.336111],[172.914154,1.346389],[172.943573,1.345833],[172.939697,1.336111]],[[173.126617,1.349166],[173.098572,1.351389],[173.11911,1.373333],[173.126617,1.349166]],[[173.062195,1.410278],[173.039703,1.417778],[173.034698,1.444444],[173.062195,1.410278]],[[173.012756,1.4725],[173.016388,1.465],[172.997192,1.500556],[173.012756,1.4725]],[[172.981903,1.529444],[172.960785,1.553333],[172.955231,1.619166],[172.981903,1.529444]],[[172.884705,1.838333],[172.834137,1.863611],[172.858002,1.861666],[172.884705,1.838333]],[[173.014984,1.706111],[172.929962,1.936111],[173.027191,1.821111],[173.014984,1.706111]],[[172.891663,1.93],[172.882721,1.932777],[172.885529,1.943889],[172.891663,1.93]],[[173.328857,1.940278],[173.311096,1.958055],[173.349396,1.965833],[173.328857,1.940278]],[[173.343018,1.982777],[173.313599,1.973889],[173.325256,2.015833],[173.343018,1.982777]],[[-157.43161025,2.021388],[-157.17919958,1.714444],[-157.57119713,1.858888],[-157.43161025,2.021388]],[[172.870239,3.064444],[172.774994,3.002222],[172.749115,3.024166],[172.870239,3.064444]],[[172.968292,3.24861],[172.957458,3.281388],[172.976624,3.296389],[172.968292,3.24861]],[[-159.33990464,3.920833],[-159.27151489,3.789722],[-159.40435789,3.864166],[-159.33990464,3.920833]],[[-160.39456164,4.685554],[-160.40542616,4.725276],[-160.37954734,4.718332],[-160.39456164,4.685554]]]}, -{code:"KR", name:"Korea, Republic of", lng:128.103, lat:36.504, borders:[[[126.622208,33.23999],[126.158333,33.314713],[126.898041,33.523323],[126.622208,33.23999]],[[126.765549,34.280823],[126.651382,34.316101],[126.701393,34.38694],[126.765549,34.280823]],[[127.213608,34.418884],[127.111366,34.460274],[127.222717,34.483627],[127.213608,34.418884]],[[127.790817,34.476379],[127.711929,34.526657],[127.770828,34.53833],[127.790817,34.476379]],[[126.186653,34.351387],[126.243317,34.573326],[126.380257,34.494713],[126.186653,34.351387]],[[127.803864,34.575554],[127.734421,34.613327],[127.768051,34.664154],[127.803864,34.575554]],[[125.991364,34.668053],[125.914993,34.692215],[125.981369,34.716934],[125.991364,34.668053]],[[125.993042,34.791939],[126.009163,34.759995],[125.890549,34.728043],[125.993042,34.791939]],[[128.085785,34.830276],[127.974152,34.85833],[128.024139,34.913879],[128.085785,34.830276]],[[126.063599,34.854439],[125.983597,34.864998],[126.062759,34.928329],[126.063599,34.854439]],[[127.9561,34.800827],[128.060791,34.701103],[127.857208,34.723877],[127.879967,34.929436],[127.9561,34.800827]],[[128.754425,34.876938],[128.594116,34.697769],[128.488556,34.856384],[128.754425,34.876938]],[[126.106087,35.046944],[126.059982,35.090828],[126.162201,35.143326],[126.106087,35.046944]],[[126.428307,36.399719],[126.335823,36.438599],[126.346939,36.591103],[126.428307,36.399719]],[[126.169434,36.825829],[126.161102,36.838043],[126.172447,36.836838],[126.169434,36.825829]],[[130.887482,37.453323],[130.807465,37.518326],[130.919434,37.545273],[130.887482,37.453323]],[[126.501389,37.594437],[126.373032,37.621658],[126.400543,37.818886],[126.501389,37.594437]],[[124.695534,37.9161],[124.615257,37.968597],[124.72554,37.981659],[124.695534,37.9161]],[[128.532471,38.330551],[129.433594,37.058884],[129.439423,35.475822],[129.136932,35.112213],[127.593323,34.941658],[127.640823,34.616936],[127.493874,34.851662],[127.389427,34.4711],[127.124687,34.537216],[127.328598,34.74305],[126.889427,34.412491],[126.772491,34.582771],[126.556374,34.300545],[126.266937,34.683327],[126.659714,34.812767],[126.249153,35.116661],[126.431374,35.023323],[126.687759,35.533333],[126.474701,35.635826],[126.872993,36.054718],[126.544418,36.136406],[126.497208,36.723877],[126.123596,36.70916],[126.502487,37.052773],[126.992203,36.91082],[126.661102,37.156097],[126.865807,37.266937],[126.688492,37.833908],[127.106087,38.287498],[128.079956,38.311935],[128.363556,38.625244],[128.532471,38.330551]]]}, -{code:"KW", name:"Kuwait", lng:47.376, lat:29.476, borders:[[[48.362488,29.450272],[48.388329,29.395554],[48.26693,29.441109],[48.362488,29.450272]],[[48.224709,29.594719],[48.152222,29.99194],[48.359444,29.744999],[48.224709,29.594719]],[[48.032219,29.968052],[48.008606,29.973885],[48.037766,30.011105],[48.111664,30.023048],[48.032219,29.968052]],[[47.931099,30.018887],[47.943474,30.017555],[48.167213,29.553055],[47.707222,29.375832],[48.028603,29.344994],[48.416588,28.545277],[47.688881,28.538883],[47.459991,28.999439],[46.546944,29.104198],[47.169991,30.01527],[47.931099,30.018887]]]}, -{code:"KZ", name:"Kazakhstan", lng:67.301, lat:48.160, borders:[[[50.116104,44.838043],[49.978867,44.956383],[50.11277,45.077492],[50.116104,44.838043]],[[50.291664,44.949997],[50.265549,45.036659],[50.342766,45.083054],[50.291664,44.949997]],[[53.024994,46.2286],[52.960274,46.266388],[53.046387,46.367493],[53.097488,46.296661],[53.024994,46.2286]],[[69.185532,55.34388],[70.843323,55.301933],[71.27887,54.690269],[70.996933,54.339157],[71.185532,54.103325],[72.196091,54.137497],[72.051651,54.387772],[72.468597,53.908882],[72.613312,54.145271],[73.763885,54.065544],[73.238586,53.64444],[73.437195,53.436104],[74.429153,53.4786],[76.811646,54.447769],[76.521652,53.993881],[77.908035,53.271103],[80.077957,50.758087],[80.687836,51.31472],[81.468048,50.742218],[83.456375,51.002495],[84.363037,50.212212],[85.014435,50.075829],[85.258606,49.591377],[86.191086,49.472488],[86.774994,49.788887],[86.616653,49.587212],[87.348206,49.092621],[86.874695,49.110825],[86.5961,48.53611],[85.759155,48.387772],[85.529312,47.060165],[84.75943,46.826385],[83.040543,47.212212],[82.317764,45.570534],[82.649429,45.43026],[82.561646,45.129417],[81.688309,45.350815],[79.871094,44.904976],[80.520828,44.732475],[80.362762,44.125244],[80.817215,43.156067],[80.376648,43.025238],[80.578598,42.891075],[80.171921,42.660507],[80.234024,42.19622],[79.194702,42.795792],[75.664429,42.807457],[74.293594,43.216904],[73.583878,43.038574],[73.519714,42.408005],[71.747208,42.823586],[71.171097,42.691353],[70.97081,42.254669],[69.056366,41.379433],[68.455261,40.597771],[67.935532,41.183327],[66.719986,41.174995],[66.526382,42.003052],[66.02916,42.003052],[66.123871,42.996941],[65.82193,42.877213],[64.931366,43.73777],[62.025108,43.484787],[58.569717,45.571106],[55.99749,45.001106],[56.000961,41.328453],[55.45694,41.286659],[54.17305,42.337212],[53.014999,42.138885],[52.440071,41.740936],[52.738327,42.710274],[51.265549,43.153046],[50.839989,44.193047],[50.239433,44.576385],[51.570274,44.513885],[50.953049,44.861938],[51.405266,45.370544],[53.228043,45.337769],[52.733047,45.549438],[53.085823,46.007217],[53.164154,46.317215],[52.996658,46.488045],[53.194153,46.714996],[51.189987,47.114716],[49.222527,46.346306],[48.560547,46.564995],[49.027206,46.776093],[48.20443,47.704987],[47.383324,47.688881],[47.122765,48.27166],[46.499161,48.417496],[47.062767,49.142769],[46.79583,49.339714],[46.929436,49.863609],[47.520828,50.436378],[48.251663,49.869713],[48.796944,49.941933],[48.697487,50.591934],[50.7733,51.76918],[51.303047,51.479713],[52.338326,51.782211],[52.603325,51.45694],[53.428604,51.491661],[54.506386,50.856941],[54.523933,50.528839],[54.647217,51.036942],[55.69249,50.532494],[56.510826,51.083328],[57.481934,50.864716],[58.337769,51.156097],[59.542496,50.478325],[60.04361,50.863327],[61.381378,50.783607],[61.685822,51.265831],[60.00222,51.958328],[61.061935,52.342491],[60.694153,52.680824],[61.099159,52.981659],[62.118324,53.004166],[61.184715,53.306656],[61.577492,53.513329],[60.905548,53.62027],[61.226936,53.811935],[61.01416,53.947487],[62.547493,53.879433],[63.172218,54.186378],[65.216385,54.318886],[65.483322,54.638046],[69.185532,55.34388]]]}, -{code:"LA", name:"Lao People's Democratic Republic", lng:102.471, lat:19.905, borders:[[[107.5466,14.708618],[106.853592,14.303053],[106.540741,14.598724],[106.004707,14.373053],[106.056641,13.929998],[105.210602,14.349648],[105.536102,14.563332],[105.637772,15.659721],[104.747208,16.528332],[104.718323,17.50333],[103.985527,18.321663],[103.397217,18.434994],[102.683594,17.819996],[102.089394,18.214983],[101.162773,17.459995],[100.921371,17.567219],[101.281097,19.562218],[100.503601,19.526665],[100.58046,20.157768],[100.09137,20.348606],[101.148239,21.572636],[101.281937,21.180275],[101.787201,21.144161],[101.574432,22.20916],[101.738037,22.496941],[102.140747,22.396286],[102.676651,21.65583],[102.976089,21.739437],[103.170532,20.846664],[103.693588,20.657219],[104.109154,20.977219],[104.6436,20.660275],[104.381927,20.444717],[104.979156,20.004997],[104.640266,19.611942],[104.037247,19.692944],[103.879433,19.29361],[105.193863,18.642494],[105.183319,18.334442],[106.561096,16.996941],[106.685532,16.45805],[107.464706,16.078609],[107.175537,15.784164],[107.695251,15.270832],[107.5466,14.708618]]]}, -{code:"LB", name:"Lebanon", lng:35.888, lat:33.920, borders:[[[35.623634,33.245728],[35.10083,33.093605],[35.972771,34.647499],[36.459999,34.635277],[36.623741,34.204994],[35.623634,33.245728]]]}, -{code:"LV", name:"Latvia", lng:25.641, lat:56.858, borders:[[[21.068607,56.435547],[21.053608,56.83638],[21.73333,57.576942],[22.610275,57.756386],[23.785831,56.970268],[24.407497,57.25666],[24.31498,57.871826],[25.294998,58.084435],[26.511387,57.5261],[27.372059,57.535637],[27.861107,57.302216],[27.70166,56.914711],[28.168011,56.150154],[26.613209,55.674835],[25.,56.295547],[22.139439,56.423607],[21.051685,56.077309],[21.068607,56.435547]]]}, -{code:"BY", name:"Belarus", lng:28.047, lat:53.540, borders:[[[26.613209,55.674835],[28.168011,56.150154],[30.926247,55.60257],[31.02972,55.043327],[30.781387,54.79361],[31.844162,54.064438],[31.764225,53.80262],[32.741104,53.463051],[31.266941,53.024712],[31.783886,52.108047],[30.943096,52.073792],[30.551414,51.251846],[25.775829,51.939156],[24.396664,51.886658],[23.604633,51.527695],[23.638607,52.079437],[23.1654,52.282276],[23.94083,52.732208],[23.50404,53.947044],[25.785275,54.160545],[25.547497,54.332771],[25.788887,54.87027],[26.819717,55.281105],[26.45583,55.341377],[26.613209,55.674835]]]}, -{code:"LT", name:"Lithuania", lng:23.897, lat:55.336, borders:[[[21.044441,55.326385],[20.984814,55.27655],[20.942833,55.287201],[21.089996,55.719986],[21.044441,55.326385]],[[25.,56.295547],[26.613209,55.674835],[26.45583,55.341377],[26.819717,55.281105],[25.788887,54.87027],[25.547497,54.332771],[25.785275,54.160545],[23.50404,53.947044],[22.785885,54.363838],[22.842495,54.896942],[21.431385,55.251938],[21.263935,55.248985],[21.051685,56.077309],[22.139439,56.423607],[25.,56.295547]]]}, -{code:"LR", name:"Liberia", lng:-9.657, lat:6.682, borders:[[[-10.80606284,6.403],[-11.49231866,6.927091],[-10.26664368,8.488377],[-9.48363516,8.346931],[-9.48516066,7.361989],[-9.10693745,7.198889],[-8.66054896,7.695],[-8.46973464,7.561325],[-8.30831944,6.860833],[-8.6063693,6.507815],[-7.42333043,5.839444],[-7.52539451,4.352806],[-9.14277498,5.055555],[-10.80606284,6.403]]]}, -{code:"SK", name:"Slovakia", lng:19.491, lat:48.707, borders:[[[17.251656,48.024994],[17.166386,48.012497],[16.946182,48.619064],[18.851246,49.517357],[19.475555,49.599998],[20.074444,49.175278],[21.618889,49.436386],[22.558052,49.079437],[22.151442,48.411919],[20.660553,48.563332],[18.655277,47.758606],[17.251656,48.024994]]]}, -{code:"LI", name:"Liechtenstein", lng:9.555, lat:47.153, borders:[[[9.533569,47.274544],[9.598635,47.063835],[9.474637,47.057457],[9.533569,47.274544]]]}, -{code:"LY", name:"Libya", lng:18.023, lat:27.044, borders:[[[9.948332,27.824444],[9.766388,29.427776],[9.303888,30.122498],[9.537113,30.23439],[10.21361,30.730831],[10.287222,31.694164],[11.567499,32.442215],[11.526081,33.171135],[15.165833,32.398605],[15.761665,31.385555],[17.370831,31.081665],[19.001389,30.266941],[20.060555,30.855274],[20.084442,32.184715],[21.621387,32.933609],[23.112499,32.6325],[23.247196,32.216225],[24.973888,31.969997],[25.151665,31.646942],[24.706665,30.16861],[24.997776,29.248886],[25.001423,21.999695],[25.000832,19.999119],[24.000832,20.001942],[24.002747,19.499065],[16.000832,23.450554],[14.997889,23.000591],[14.234999,22.614166],[13.543888,23.16861],[11.986475,23.522305],[11.558887,24.302498],[10.252222,24.605831],[9.398333,26.153332],[9.871666,26.514164],[9.948332,27.824444]]]}, -{code:"MG", name:"Madagascar", lng:46.706, lat:-19.374, borders:[[[49.83361244,-17.08971977],[49.86055183,-16.91386795],[50.01055336,-16.72555161],[49.83361244,-17.08971977]],[[47.21972084,-15.4366684],[47.20777321,-15.43443489],[47.2005558,-15.42749405],[47.20666695,-15.42055321],[47.21944618,-15.42082596],[47.21972084,-15.4366684]],[[48.34250069,-13.41805077],[48.20555305,-13.39138603],[48.28138924,-13.19665909],[48.34250069,-13.41805077]],[[49.35694313,-12.09082222],[49.94333076,-13.03944206],[50.43361092,-15.58000183],[50.17277718,-15.97971916],[49.86610603,-15.4324894],[49.63360786,-15.5574894],[49.78860664,-16.83027267],[47.13305092,-24.92805099],[45.21472359,-25.58832932],[44.01722145,-24.98527145],[43.23888588,-22.28250122],[43.50055122,-21.33386612],[44.48221779,-19.97027206],[43.93721962,-17.47944641],[44.45916176,-16.18444824],[46.15138435,-15.70359993],[46.47722054,-15.96610832],[46.33833504,-15.62471199],[46.94722176,-15.19889069],[46.95944405,-15.55804825],[47.22361946,-15.44846153],[47.2356472,-15.41291618],[47.11194038,-15.30555725],[47.05832863,-15.18499374],[47.45499611,-14.66527176],[47.42721748,-15.1105442],[47.81127739,-14.60388947],[48.00166512,-14.76555634],[47.69944191,-14.42055321],[48.04833412,-14.15555573],[47.90527534,-13.59638977],[48.28721809,-13.80804825],[48.73971748,-13.42722321],[48.95944405,-12.82221603],[48.73082924,-12.43416405],[49.35694313,-12.09082222]],[[49.60444069,-12.62638664],[49.59583473,-12.61000061],[49.59444618,-12.62361145],[49.60444069,-12.62638664]]]}, -{code:"MQ", name:"Martinique", lng:-61.021, lat:14.653, borders:[[[-60.86083969,14.402777],[-61.17469827,14.876944],[-60.94081883,14.740833],[-60.86083969,14.402777]]]}, -{code:"MN", name:"Mongolia", lng:102.876, lat:46.056, borders:[[[91.020248,46.600109],[90.074432,47.886383],[88.65332,48.18277],[87.973312,48.576942],[87.840698,49.172951],[92.322769,50.814995],[94.274994,50.569443],[94.635269,50.024437],[97.34082,49.734436],[98.289703,50.293884],[97.827774,51.001106],[98.930267,52.143608],[102.218872,51.333603],[102.327766,50.569717],[102.918587,50.315269],[106.66304,50.3386],[107.977127,49.943626],[107.949142,49.678047],[108.57222,49.333603],[110.788589,49.149437],[113.09082,49.598602],[114.313026,50.284164],[116.71138,49.830467],[115.592194,47.919441],[117.372192,47.653595],[117.801086,48.010551],[118.539337,47.994751],[119.72998,47.164154],[119.897491,46.675552],[117.421097,46.578331],[116.585541,46.29583],[115.701927,45.458603],[114.545258,45.389435],[113.638046,44.74527],[111.98082,45.09166],[111.421371,44.382492],[111.958328,43.692215],[110.440536,42.777771],[109.313599,42.429993],[107.471916,42.466103],[105.012207,41.581383],[100.835541,42.678047],[96.383041,42.731102],[95.336105,44.020828],[95.416656,44.293884],[93.554703,44.957214],[90.896942,45.253052],[90.681931,45.57972],[91.020248,46.600109]]]}, -{code:"MS", name:"Montserrat", lng:-62.187, lat:16.736, borders:[[[-62.17137944,16.671387],[-62.23665664,16.711941],[-62.20191963,16.81361],[-62.17137944,16.671387]]]}, -{code:"MK", name:"Macedonia", lng:21.698, lat:41.600, borders:[[[20.82111,40.908882],[20.492775,41.331108],[20.589642,41.882187],[22.365276,42.323883],[23.014721,41.762215],[22.935604,41.342125],[20.98349,40.855888],[20.82111,40.908882]]]}, -{code:"ML", name:"Mali", lng:-3.524, lat:17.350, borders:[[[-8.53386902,11.49391],[-9.15555545,12.486111],[-9.70193889,12.029163],[-10.32388837,12.224997],[-10.65273296,11.892609],[-10.92888283,12.224442],[-11.31554752,12.022774],[-11.37305101,12.407774],[-11.37804752,12.988054],[-12.05721892,13.664721],[-12.24482154,14.764385],[-11.84137878,14.863054],[-11.49416003,15.646387],[-10.89963363,15.106874],[-10.71638278,15.438902],[-9.41110785,15.443888],[-9.33804468,15.704721],[-9.33360907,15.499722],[-5.49504705,15.498371],[-5.33499817,16.328053],[-5.60138505,16.507774],[-6.57721883,24.999165],[-4.80610976,25.000275],[1.169662,21.102543],[1.1675,20.741108],[1.795833,20.308331],[3.233055,19.820274],[3.331944,18.976387],[4.245277,19.146664],[4.245,18.645275],[4.200833,16.393887],[3.523981,15.358152],[1.3125,15.286665],[0.235048,14.915068],[-0.7252778,15.082777],[-1.98083211,14.474722],[-2.00694431,14.187777],[-2.47472182,14.287498],[-2.8791643,13.655554],[-3.25749939,13.696665],[-3.43767214,13.166498],[-3.96425194,13.50383],[-4.33721548,13.121666],[-4.41749908,12.300831],[-5.27304843,11.843887],[-5.51984574,10.436272],[-6.11138169,10.197777],[-6.24339915,10.735256],[-6.98804874,10.147499],[-7.63555453,10.448332],[-7.97398353,10.165611],[-8.28971526,11.007776],[-8.68054224,10.966389],[-8.35776665,11.305555],[-8.53386902,11.49391]]]}, -{code:"MA", name:"Morocco", lng:-5.758, lat:32.706, borders:[[[-9.05315424,32.734802],[-6.84305545,34.018608],[-5.91874227,35.790649],[-5.39555018,35.916336],[-5.34583165,35.84166],[-4.6958286,35.208885],[-2.94694157,35.329163],[-2.92527742,35.266663],[-2.91471907,35.273605],[-2.20944309,35.085831],[-1.74722189,34.747215],[-1.66805507,33.261108],[-1.0102775,32.508331],[-1.18055469,32.11055],[-2.85388612,32.088333],[-3.81833134,31.695553],[-3.62666323,30.970554],[-4.92055423,30.508053],[-5.53833379,29.902496],[-7.12388322,29.636944],[-8.66721914,28.709442],[-8.66666025,27.666664],[-13.17495355,27.666958],[-11.45805018,28.334442],[-10.13805179,29.428055],[-9.6402701,30.168053],[-9.80916391,31.446663],[-9.05315424,32.734802]]]}, -{code:"MU", name:"Mauritius", lng:57.583, lat:-20.255, borders:[[[57.572495,-20.51415231],[57.304718,-20.44914643],[57.624443,-19.9863588],[57.572495,-20.51415231]],[[63.466385,-19.73581317],[63.328606,-19.73804874],[63.461105,-19.67304185],[63.466385,-19.73581317]],[[56.564438,-10.39721059],[56.511665,-10.34666086],[56.513611,-10.3166633],[56.564438,-10.39721059]]]}, -{code:"MR", name:"Mauritania", lng:-10.332, lat:20.260, borders:[[[-16.42747847,19.603611],[-16.45997991,19.699718],[-16.34442529,19.866386],[-16.42747847,19.603611]],[[-6.66277589,26.129166],[-4.80610976,25.000275],[-6.57721883,24.999165],[-5.60138505,16.507774],[-5.33499817,16.328053],[-5.49504705,15.498371],[-9.33360907,15.499722],[-9.33804468,15.704721],[-9.41110785,15.443888],[-10.71638278,15.438902],[-10.89963363,15.106874],[-11.49416003,15.646387],[-11.84137878,14.863054],[-12.24482154,14.764385],[-14.34527376,16.638611],[-16.28081151,16.519722],[-16.52764937,16.060249],[-16.03943994,17.728054],[-16.51164643,19.352219],[-16.19636923,20.223053],[-16.91972302,21.161663],[-17.05231478,20.764095],[-16.95304141,21.338333],[-15.74199653,21.338284],[-12.99971242,21.338055],[-13.10526277,22.893055],[-12.00027132,23.454441],[-12.00055689,26.],[-8.66693256,26.000275],[-8.66678239,27.290459],[-6.66277589,26.129166]]]}, -{code:"MT", name:"Malta", lng:14.442, lat:35.890, borders:[[[14.562222,35.820274],[14.374998,35.847496],[14.326387,35.978882],[14.562222,35.820274]],[[14.2675,36.011383],[14.18111,36.060829],[14.34111,36.033882],[14.2675,36.011383]]]}, -{code:"OM", name:"Oman", lng:57.407, lat:21.656, borders:[[[55.874718,17.490833],[55.829163,17.49361],[55.859718,17.516666],[55.874718,17.490833]],[[56.024162,17.484165],[55.957497,17.519165],[56.093605,17.514721],[56.024162,17.484165]],[[58.842773,20.441109],[58.649719,20.168888],[58.899719,20.693054],[58.842773,20.441109]],[[56.037498,24.938889],[56.104164,24.734722],[56.373528,24.979382],[57.164993,23.937775],[58.609444,23.633053],[59.811386,22.226665],[58.515831,20.411663],[58.210831,20.612499],[57.829437,20.218887],[57.803886,18.969444],[56.814484,18.747684],[56.353333,17.934166],[55.436943,17.828888],[55.039993,17.018608],[53.114441,16.642778],[51.99929,18.999344],[55.,20.],[55.666107,21.999722],[55.199165,22.699718],[55.510277,23.972775],[56.024719,24.076111],[55.779442,24.563889],[56.037498,24.938889]],[[56.365368,26.382389],[56.269722,25.636015],[56.183331,25.654989],[56.079941,26.065559],[56.365368,26.382389]]]}, -{code:"MV", name:"Maldives", lng:72.920, lat:3.548, borders:[[[73.176376,-0.68972117],[73.156372,-0.68388882],[73.171921,-0.6816667],[73.176376,-0.68972117]],[[73.201385,-0.68083273],[73.188309,-0.68472189],[73.201935,-0.66722109],[73.201385,-0.68083273]],[[73.12915,-0.66888814],[73.125259,-0.66888814],[73.121368,-0.65333242],[73.12915,-0.66888814]],[[73.23082,-0.64805511],[73.226089,-0.63249939],[73.242203,-0.61777765],[73.23082,-0.64805511]],[[73.116379,-0.63583257],[73.09082,-0.60666613],[73.09137,-0.58249996],[73.116379,-0.63583257]],[[73.248032,-0.60527708],[73.235809,-0.58555511],[73.249146,-0.57611068],[73.248032,-0.60527708]],[[73.44693,-0.29944392],[73.428314,-0.28638875],[73.442474,-0.28527769],[73.44693,-0.29944392]],[[73.106934,0.211944],[73.095535,0.228056],[73.103317,0.228889],[73.106934,0.211944]],[[73.214706,0.230833],[73.209152,0.24],[73.220261,0.239167],[73.214706,0.230833]],[[73.044983,0.259444],[73.034424,0.261389],[73.033051,0.272778],[73.044983,0.259444]],[[73.375809,0.28],[73.367203,0.281389],[73.3797,0.291944],[73.375809,0.28]],[[73.513046,0.378333],[73.504715,0.383889],[73.508881,0.3925],[73.513046,0.378333]],[[72.943039,0.488611],[72.938034,0.485555],[72.937195,0.499722],[72.943039,0.488611]],[[73.498032,0.499722],[73.493042,0.496944],[73.487762,0.508055],[73.498032,0.499722]],[[73.374695,1.781667],[73.361374,1.788611],[73.374695,1.795278],[73.374695,1.781667]],[[73.399155,1.793889],[73.397766,1.806389],[73.407761,1.805833],[73.399155,1.793889]],[[73.287201,1.831944],[73.297211,1.819166],[73.284424,1.823055],[73.287201,1.831944]],[[73.506943,1.826667],[73.49498,1.823055],[73.516663,1.847222],[73.506943,1.826667]],[[73.250549,1.889166],[73.241928,1.886111],[73.247757,1.898333],[73.250549,1.889166]],[[73.549988,1.896389],[73.539978,1.891944],[73.549713,1.937222],[73.549988,1.896389]],[[73.55304,1.965],[73.548325,1.964166],[73.547211,1.978333],[73.55304,1.965]],[[73.323044,1.985],[73.313873,1.986388],[73.322495,1.995555],[73.323044,1.985]],[[73.588882,2.1075],[73.559143,2.09611],[73.567764,2.11],[73.588882,2.1075]],[[73.123871,2.190555],[73.11026,2.196944],[73.121918,2.196944],[73.123871,2.190555]],[[72.930817,2.314444],[72.919983,2.3225],[72.92276,2.328888],[72.930817,2.314444]],[[73.366653,2.384444],[73.350266,2.440833],[73.368591,2.409721],[73.366653,2.384444]],[[73.319717,2.492499],[73.313599,2.491944],[73.311096,2.504722],[73.319717,2.492499]],[[72.876083,2.681388],[72.866379,2.684999],[72.866379,2.69611],[72.876083,2.681388]],[[73.025269,2.734444],[73.018875,2.736944],[73.034988,2.747499],[73.025269,2.734444]],[[73.356644,2.771666],[73.348877,2.770833],[73.349426,2.781944],[73.356644,2.771666]],[[73.017761,2.946944],[73.005829,2.946944],[73.012207,2.954722],[73.017761,2.946944]],[[73.579987,2.948888],[73.574432,2.950555],[73.585541,2.967499],[73.579987,2.948888]],[[72.982208,3.101944],[72.973877,3.108055],[72.982758,3.110833],[72.982208,3.101944]],[[73.587204,3.367777],[73.581665,3.372221],[73.59082,3.376944],[73.587204,3.367777]],[[73.753326,3.446388],[73.747757,3.451111],[73.751389,3.452499],[73.753326,3.446388]],[[72.802765,3.510278],[72.78804,3.511111],[72.798599,3.516944],[72.802765,3.510278]],[[72.92276,3.544167],[72.908035,3.537777],[72.9272,3.559721],[72.92276,3.544167]],[[72.697479,3.714166],[72.687759,3.724721],[72.699417,3.724166],[72.697479,3.714166]],[[73.473877,3.933055],[73.465546,3.932222],[73.48027,3.940555],[73.473877,3.933055]],[[72.709717,3.995555],[72.697754,4.000833],[72.707764,4.003611],[72.709717,3.995555]],[[73.512207,4.093611],[73.501938,4.096388],[73.503052,4.106943],[73.512207,4.093611]],[[73.503601,4.164165],[73.491089,4.174999],[73.505264,4.17861],[73.503601,4.164165]],[[73.5186,4.191387],[73.51915,4.176388],[73.511383,4.182221],[73.5186,4.191387]],[[72.959717,4.26861],[72.977768,4.261666],[72.962494,4.262221],[72.959717,4.26861]],[[72.969711,4.877776],[72.970261,4.898055],[72.98027,4.901111],[72.969711,4.877776]],[[73.589706,5.27361],[73.56694,5.277499],[73.589706,5.286943],[73.589706,5.27361]],[[73.320267,5.36111],[73.314987,5.365276],[73.333603,5.366666],[73.320267,5.36111]],[[73.635269,5.385555],[73.620255,5.420833],[73.637497,5.412777],[73.635269,5.385555]],[[73.384155,5.709722],[73.387772,5.741943],[73.392761,5.72861],[73.384155,5.709722]],[[72.991364,5.76111],[72.981659,5.758888],[72.981659,5.771666],[72.991364,5.76111]],[[73.436371,5.827222],[73.429703,5.827222],[73.451096,5.849166],[73.436371,5.827222]],[[72.968872,5.850832],[72.964996,5.847499],[72.961105,5.867777],[72.968872,5.850832]],[[73.433044,5.902222],[73.423599,5.90361],[73.422211,5.911666],[73.433044,5.902222]],[[73.398331,5.955277],[73.379425,5.971388],[73.393326,5.96861],[73.398331,5.955277]],[[72.933319,5.960833],[72.928314,5.954999],[72.926086,5.971944],[72.933319,5.960833]],[[73.270538,6.185276],[73.2686,6.175277],[73.269989,6.193054],[73.270538,6.185276]],[[73.248032,6.231943],[73.2397,6.227499],[73.234711,6.23611],[73.248032,6.231943]],[[73.204437,6.317499],[73.190811,6.324721],[73.20166,6.327499],[73.204437,6.317499]],[[73.050262,6.429166],[73.040817,6.429999],[73.041367,6.444165],[73.050262,6.429166]],[[73.06749,6.661388],[73.059982,6.657499],[73.068054,6.672776],[73.06749,6.661388]],[[73.101089,6.696943],[73.093323,6.697221],[73.102478,6.715555],[73.101089,6.696943]],[[73.136932,6.726388],[73.12915,6.733888],[73.161926,6.784165],[73.136932,6.726388]],[[73.181366,6.8325],[73.20166,6.828888],[73.184143,6.81861],[73.181366,6.8325]],[[73.205261,6.883611],[73.195526,6.889443],[73.209991,6.926388],[73.205261,6.883611]],[[73.198868,6.947498],[73.19165,6.951111],[73.193588,6.97861],[73.198868,6.947498]],[[72.985535,7.012221],[72.97998,7.011666],[72.974991,7.029444],[72.985535,7.012221]],[[72.916092,7.081666],[72.902771,7.093055],[72.911926,7.094999],[72.916092,7.081666]]]}, -{code:"MX", name:"Mexico", lng:-102.535, lat:23.951, borders:[[[-114.74269104,18.3227787],[-114.80300903,18.33277702],[-114.72386169,18.35333443],[-114.74269104,18.3227787]],[[-87.37269592,18.40027809],[-87.33164978,18.50305367],[-87.32685852,18.4533329],[-87.37269592,18.40027809]],[[-87.25161743,18.64138985],[-87.25935364,18.62777901],[-87.26501465,18.73388863],[-87.25161743,18.64138985]],[[-91.82861328,18.63916588],[-91.64611816,18.75361061],[-91.52383423,18.7705555],[-91.82861328,18.63916588]],[[-110.92605591,18.72110939],[-111.07129669,18.76833153],[-111.00325012,18.86499977],[-110.92605591,18.72110939]],[[-110.78852844,19.30805397],[-110.83577728,19.2713871],[-110.81324768,19.34166527],[-110.78852844,19.30805397]],[[-86.73278809,20.58555412],[-87.,20.25638771],[-86.93890381,20.53944588],[-86.73278809,20.58555412]],[[-86.7013092,21.19722176],[-86.7388916,21.23999977],[-86.74911499,21.2863903],[-86.7013092,21.19722176]],[[-106.19555664,21.25527763],[-106.26490021,21.33666801],[-106.19750977,21.3386097],[-106.19555664,21.25527763]],[[-106.38664246,21.42083168],[-106.51130676,21.45027733],[-106.33545685,21.49888802],[-106.38664246,21.42083168]],[[-106.51490021,21.5130558],[-106.64578247,21.68833351],[-106.52993011,21.69083214],[-106.51490021,21.5130558]],[[-106.65634155,21.75250053],[-106.67529297,21.74138832],[-106.67050171,21.81638908],[-106.65634155,21.75250053]],[[-97.81880188,22.68250084],[-97.83078003,22.69722176],[-97.78417969,22.77416801],[-97.81880188,22.68250084]],[[-97.77296448,22.79138756],[-97.78134155,22.8049984],[-97.76022339,22.83416557],[-97.77296448,22.79138756]],[[-109.78440094,24.13500023],[-109.87139893,24.18749809],[-109.91549683,24.36889076],[-109.78440094,24.13500023]],[[-111.53244019,24.37805367],[-111.49463654,24.35138893],[-111.67028809,24.37194633],[-111.53244019,24.37805367]],[[-111.70578003,24.33166695],[-112.01664734,24.53249931],[-111.83689117,24.5411129],[-111.70578003,24.33166695]],[[-110.32794952,24.40083504],[-110.40188599,24.57999992],[-110.29997253,24.48444557],[-110.32794952,24.40083504]],[[-110.53689575,24.88222313],[-110.70491028,25.09388924],[-110.57881165,25.03388786],[-110.53689575,24.88222313]],[[-112.04605103,24.51916695],[-112.25270081,24.80999947],[-112.1335907,25.28111076],[-112.20240021,24.84499931],[-112.04605103,24.51916695]],[[-108.84275818,25.42860985],[-108.78907776,25.37222099],[-109.01109314,25.43833351],[-108.84275818,25.42860985]],[[-110.79692078,25.59499931],[-110.82522583,25.64249992],[-110.80825043,25.69583321],[-110.79692078,25.59499931]],[[-111.19750977,25.84499931],[-111.19129944,26.03888893],[-111.08666992,26.07444572],[-111.19750977,25.84499931]],[[-110.54605103,27.30999947],[-110.59744263,27.33611107],[-110.59025574,27.41527748],[-110.54605103,27.30999947]],[[-114.21994019,27.73833275],[-114.32380676,27.81666756],[-114.24497986,27.81444359],[-114.21994019,27.73833275]],[[-115.17388916,28.02749825],[-115.32663727,28.13833427],[-115.24073029,28.37055397],[-115.17388916,28.02749825]],[[-112.76000977,28.59361076],[-112.88577271,28.68388939],[-112.79637146,28.64416695],[-112.76000977,28.59361076]],[[-112.58164978,28.67027855],[-112.60353088,28.72722054],[-112.54081726,28.73583412],[-112.58164978,28.67027855]],[[-118.28907776,28.88166618],[-118.40406036,29.14777946],[-118.3099823,29.19527626],[-118.28907776,28.88166618]],[[-112.26185608,28.7733326],[-112.56411743,28.87833214],[-112.34580994,29.23361015],[-112.26185608,28.7733326]],[[-113.13555908,29.01972389],[-113.59211159,29.42583275],[-113.58862305,29.58361244],[-113.13555908,29.01972389]],[[-114.65078735,31.69055367],[-114.76358795,31.71249962],[-114.7902832,31.7994442],[-114.65078735,31.69055367]],[[-113.05282593,31.97107124],[-111.0458374,31.3330555],[-108.20828247,31.3330555],[-108.20861816,31.78333473],[-106.40078735,31.75027657],[-104.90046692,30.5727787],[-104.53994751,29.67111015],[-103.375,29.02361107],[-102.30584717,29.88944435],[-101.40492249,29.77277946],[-99.50500488,27.57027626],[-99.10473633,26.43499947],[-97.14063263,25.96642876],[-97.88969421,22.60083199],[-97.17605591,20.68499947],[-95.91136169,18.82527733],[-94.80213928,18.52250099],[-94.47886658,18.14666557],[-91.99497986,18.72777748],[-91.81466675,18.38305473],[-91.47494507,18.43944359],[-90.45469666,19.97527885],[-90.32751465,21.03138924],[-88.4513092,21.56888771],[-87.02775574,21.59027672],[-86.77275085,21.15138817],[-87.7388916,19.67472267],[-87.41157532,19.57888985],[-87.84744263,18.19083214],[-88.03744507,18.86944389],[-88.29949951,18.48293114],[-88.37770081,18.48277855],[-89.14186096,17.81888771],[-90.98242188,17.82065392],[-90.98387146,17.25610924],[-91.4375,17.24110985],[-90.40634155,16.41638756],[-90.44195557,16.08833504],[-91.7290802,16.07499886],[-92.24674988,14.55054665],[-92.77275085,15.1744442],[-94.36802673,16.29444313],[-94.05769348,16.04083443],[-94.72473145,16.19666481],[-94.57806396,16.31833458],[-94.78973389,16.25777626],[-94.86192322,16.42749977],[-96.47602844,15.64361],[-97.78494263,15.96861076],[-101.01109314,17.26527596],[-101.95001221,17.97749901],[-103.45001221,18.31361198],[-104.98355103,19.33944511],[-105.67997742,20.38638878],[-105.24411011,20.57416725],[-105.54441833,20.78500175],[-105.18945313,21.43749809],[-105.81694794,22.66027641],[-107.99910736,24.65249825],[-108.04244995,25.07361031],[-108.39414978,25.14111137],[-108.76773071,25.54222298],[-109.10887146,25.5261097],[-108.82794952,25.79833412],[-109.38806152,25.75610924],[-109.10386658,26.28360939],[-110.52961159,27.37111092],[-110.50966644,27.86638832],[-111.10549927,27.93833351],[-112.16461945,28.97250175],[-113.08666992,31.22722054],[-115.03167725,31.96805382],[-114.54528809,30.00111198],[-112.86279297,28.43333244],[-111.85855103,26.66194344],[-111.84211159,26.90305519],[-111.56074524,26.72361183],[-110.66047668,24.33777809],[-110.3540802,24.11583519],[-110.21362305,24.35194588],[-109.41081238,23.46833229],[-110.00489044,22.88611031],[-110.31661987,23.56749916],[-112.0874176,24.75610924],[-112.070755,25.61305428],[-112.10604095,25.51833153],[-112.39654732,26.27277946],[-113.22026062,26.70555687],[-113.12825012,26.9588871],[-113.59744263,26.7369442],[-114.9888916,27.72110939],[-113.98300171,27.7025013],[-114.31053162,27.86555672],[-114.063591,28.52722359],[-115.69380188,29.76833153],[-117.12225533,32.53533363],[-114.71901703,32.71845818],[-114.80979919,32.50699043],[-113.05282593,31.97107124]],[[-109.94880676,27.02444267],[-109.98136902,27.07638741],[-110.03440094,27.09139061],[-109.94880676,27.02444267]],[[-97.60778809,21.73666573],[-97.68553162,21.8599987],[-97.67408752,21.79027748],[-97.60778809,21.73666573]]]}, -{code:"MY", name:"Malaysia", lng:102.195, lat:4.201, borders:[[[104.12024117,2.31889153],[104.15497017,2.28777885],[104.1010685,2.29416847],[104.12024117,2.31889153]],[[111.370821,2.36027718],[111.30359077,2.44805717],[111.32747841,2.78138924],[111.38388252,2.68000221],[111.37692451,2.49527931],[111.4138813,2.37611198],[111.370821,2.36027718]],[[104.17108345,2.7052784],[104.17191505,2.89500237],[104.22162819,2.72972298],[104.17108345,2.7052784]],[[117.72664833,4.1697216],[117.90355873,4.17404366],[117.68692207,4.16833687],[117.72664833,4.1697216]],[[118.68193245,4.49972343],[118.76277351,4.46361351],[118.68942451,4.44111061],[118.68193245,4.49972343]],[[118.50972176,4.55444527],[118.51748848,4.53611183],[118.49942207,4.52916527],[118.50972176,4.55444527]],[[118.57026863,4.60083199],[118.34387398,4.67055321],[118.47886848,4.68916512],[118.57026863,4.60083199]],[[115.23304939,5.25972176],[115.15833473,5.25777626],[115.24193001,5.38472176],[115.23304939,5.25972176]],[[100.28885841,5.25610924],[100.18385506,5.46249962],[100.32025337,5.42777824],[100.28885841,5.25610924]],[[115.6722126,5.70722389],[115.62776375,5.72833443],[115.65442848,5.73583412],[115.6722126,5.70722389]],[[118.17192268,5.81222343],[118.17886543,5.8488903],[118.23304939,5.84833336],[118.17192268,5.81222343]],[[116.05941963,6.00305748],[116.01693916,6.03583336],[116.05664253,6.03999901],[116.05941963,6.00305748]],[[115.60915565,6.19527626],[115.59274483,6.20472145],[115.60775948,6.22110939],[115.60915565,6.19527626]],[[99.87329292,6.41610909],[99.81302071,6.15666771],[99.64082527,6.4197216],[99.87329292,6.41610909]],[[100.65497017,6.44833183],[101.11551857,6.24888802],[101.13968849,5.63194466],[101.56997871,5.91666603],[101.83386421,5.74333382],[102.09523201,6.2361393],[103.40997505,4.85805321],[103.43579292,2.93388939],[104.27580452,1.36555672],[103.95941353,1.64694405],[103.51214027,1.26952934],[101.28497505,2.84111214],[101.29442024,3.26888847],[100.69719124,3.90389061],[100.12711525,6.42494774],[100.21498299,6.71111107],[100.65497017,6.44833183]],[[117.49359322,6.7424984],[117.46692848,6.64249992],[117.33719826,6.65138817],[117.49359322,6.7424984]],[[116.78914833,6.57916832],[117.17830849,6.99027824],[117.29081917,6.63583565],[117.73887825,6.3900013],[117.50305367,5.89611244],[118.00888252,6.06166649],[117.96027565,5.68139076],[118.3735981,5.80750084],[119.27581978,5.34499931],[118.14055061,4.88833427],[118.55220222,4.3516674],[117.59205818,4.16982079],[116.04942513,4.27944374],[115.68525887,4.17194557],[115.49553108,3.04000282],[115.13971138,2.90611076],[115.23719978,2.52250099],[114.80470467,2.24888802],[114.56276131,1.43361092],[113.65833473,1.22472191],[112.47276497,1.56805611],[111.82721138,0.99861336],[110.55525398,0.85389137],[109.66998482,1.61305428],[109.64856911,2.07340813],[109.92830849,1.68916512],[110.33333015,1.8022213],[111.37692451,1.34388924],[111.00000191,1.5755558],[111.37275887,2.15083504],[111.16858864,2.15222359],[111.22331429,2.42111015],[111.36811256,2.33909416],[111.45027351,2.36861229],[111.44470406,2.69166756],[113.0105381,3.16055489],[114.09507942,4.59053993],[114.64109993,4.01888847],[115.01843452,4.89579582],[115.02913094,4.82021141],[115.34332466,4.31194496],[115.22303963,4.8049984],[115.14578438,4.90324211],[115.54609871,5.05305672],[115.37886238,5.39888954],[115.84887886,5.56389046],[116.76249886,7.02361107],[116.78914833,6.57916832]],[[117.28333473,7.31472206],[117.06667519,7.10194206],[117.07415962,7.28750038],[117.28333473,7.31472206]],[[116.87248421,7.21999931],[117.00332832,7.35333443],[117.01888466,7.26638985],[116.87248421,7.21999931]]]}, -{code:"MZ", name:"Mozambique", lng:37.923, lat:-14.422, borders:[[[32.954437,-26.05860502],[32.895271,-26.04082904],[32.980553,-25.97274812],[32.954437,-26.05860502]],[[35.488327,-21.68499412],[35.435555,-21.78331339],[35.479439,-21.52386901],[35.488327,-21.68499412]],[[39.901382,-16.41332616],[39.810829,-16.36304874],[39.861382,-16.27803431],[39.901382,-16.41332616]],[[40.500832,-11.03194255],[40.646942,-12.76083348],[40.409996,-12.96194416],[40.846107,-14.69777459],[40.587776,-15.47971914],[39.094444,-16.9863588],[36.841385,-17.87720105],[36.943886,-18.1085816],[36.252777,-18.89138388],[34.899162,-19.85722302],[34.619164,-19.61775567],[35.312492,-22.41803409],[35.545273,-22.23249434],[35.497215,-24.10526277],[35.012215,-24.65415209],[32.813889,-25.60776565],[32.576111,-25.97555184],[32.837494,-26.29303409],[32.952499,-26.08386613],[32.890427,-26.8471299],[32.1334,-26.83960374],[31.96851,-25.95783993],[32.016106,-24.45943828],[31.297504,-22.41473429],[32.488876,-21.34442529],[32.50222,-20.59859059],[33.018883,-19.94332171],[32.699165,-18.9444385],[33.073051,-18.34886191],[32.987808,-17.26499578],[32.98114,-16.70903782],[31.276665,-16.01858893],[30.422775,-16.00914355],[30.415756,-15.63186091],[30.213017,-14.98170868],[33.222229,-14.01256523],[33.633331,-14.53971526],[34.522217,-14.57165881],[34.589722,-15.28277376],[34.255554,-15.89915658],[35.290054,-17.13425817],[35.1353,-16.55334497],[35.814438,-16.01943239],[35.924164,-14.88554591],[34.566383,-13.34220898],[34.375275,-12.15582677],[34.626106,-11.5758231],[34.966728,-11.57209982],[35.838333,-11.41471526],[36.18972,-11.70666308],[37.462044,-11.72732188],[37.941383,-11.28499007],[39.268051,-11.16804935],[40.436813,-10.4781706],[40.500832,-11.03194255]],[[34.602776,-12.011934],[34.623886,-12.03666674],[34.629997,-12.0124929],[34.602776,-12.011934]],[[34.723885,-12.03277376],[34.732216,-12.09554507],[34.754715,-12.04416513],[34.723885,-12.03277376]]]}, -{code:"MW", name:"Malawi", lng:33.808, lat:-13.400, borders:[[[34.732216,-12.09554507],[34.723885,-12.03277376],[34.754715,-12.04416513],[34.732216,-12.09554507]],[[34.623886,-12.03666674],[34.602776,-12.011934],[34.629997,-12.0124929],[34.623886,-12.03666674]],[[33.13472,-9.49416003],[34.325272,-9.73276665],[34.966728,-11.57209982],[34.626106,-11.5758231],[34.375275,-12.15582677],[34.566383,-13.34220898],[35.924164,-14.88554591],[35.814438,-16.01943239],[35.1353,-16.55334497],[35.290054,-17.13425817],[34.255554,-15.89915658],[34.589722,-15.28277376],[34.522217,-14.57165881],[33.633331,-14.53971526],[33.222229,-14.01256523],[32.678886,-13.60637855],[33.046387,-12.60387467],[33.54583,-12.35944133],[33.273331,-12.14443439],[33.250549,-10.88666369],[33.702278,-10.561846],[32.940399,-9.40507315],[33.13472,-9.49416003]]]}, -{code:"NC", name:"New Caledonia", lng:165.447, lat:-21.359, borders:[[[167.534424,-22.69386635],[167.508026,-22.68831595],[167.531372,-22.65110358],[167.534424,-22.69386635]],[[167.501648,-22.67219939],[167.434692,-22.54303409],[167.553864,-22.61247659],[167.501648,-22.67219939]],[[166.816071,-22.46330274],[166.772491,-22.45609293],[166.811646,-22.39497803],[166.816071,-22.46330274]],[[171.313873,-22.33136024],[171.300812,-22.33498391],[171.304962,-22.3277701],[171.313873,-22.33136024]],[[166.050537,-22.07942951],[166.027191,-22.05471404],[166.050537,-22.03666674],[166.050537,-22.07942951]],[[166.450256,-21.70442951],[166.415527,-21.69136446],[166.440796,-21.68858727],[166.450256,-21.70442951]],[[168.002197,-21.45192763],[168.120239,-21.63109603],[167.808868,-21.38583348],[168.002197,-21.45192763]],[[167.842743,-21.14386024],[167.801361,-21.1194456],[167.80246,-21.10025401],[167.842743,-21.14386024]],[[166.448029,-20.73415775],[166.38858,-20.72579964],[166.459137,-20.71970361],[166.448029,-20.73415775]],[[167.287201,-20.75636635],[167.398041,-21.17775379],[167.059692,-20.98859437],[167.287201,-20.75636635]],[[166.624664,-20.40608582],[166.625793,-20.60164311],[166.499115,-20.71776987],[166.624664,-20.40608582]],[[164.288025,-20.2555504],[164.275269,-20.2488557],[164.270264,-20.21970361],[164.288025,-20.2555504]],[[163.943848,-20.17053997],[163.922485,-20.1696965],[163.906921,-20.14386024],[163.943848,-20.17053997]],[[164.31665,-20.32722446],[167.014709,-22.32137323],[166.451904,-22.3166653],[166.116364,-21.94637323],[165.259979,-21.55803287],[163.98941,-20.08721548],[164.31665,-20.32722446]],[[164.234131,-20.16193806],[164.161102,-20.11331905],[164.1633,-20.06524668],[164.234131,-20.16193806]],[[163.821625,-20.08277886],[163.796936,-20.04082904],[163.817749,-20.04082904],[163.821625,-20.08277886]],[[163.977173,-20.08166108],[163.939972,-20.0680504],[163.949402,-20.00220105],[163.977173,-20.08166108]],[[163.671906,-19.78582027],[163.61969,-19.62581595],[163.700806,-19.76638388],[163.671906,-19.78582027]],[[163.607452,-19.60414499],[163.568024,-19.57303265],[163.57663,-19.54943095],[163.607452,-19.60414499]],[[159.949402,-19.34331151],[159.95108,-19.11443684],[159.978851,-19.17165775],[159.949402,-19.34331151]]]}, -{code:"NU", name:"Niue", lng:-169.869, lat:-19.052, borders:[[[-169.89370766,-19.14555018],[-169.93161025,-19.0166592],[-169.81750477,-18.96831551],[-169.89370766,-19.14555018]]]}, -{code:"NE", name:"Niger", lng:9.398, lat:17.426, borders:[[[4.245,18.645275],[4.245277,19.146664],[5.812499,19.44611],[7.450807,20.852863],[11.986475,23.522305],[13.543888,23.16861],[14.234999,22.614166],[14.997889,23.000591],[15.202499,21.495831],[15.996666,20.353054],[15.489166,16.914165],[13.468887,14.461111],[13.62512,13.718338],[12.459166,13.066111],[10.724165,13.386389],[9.634932,12.802435],[7.815,13.352777],[6.933332,12.997221],[6.423055,13.605276],[5.874722,13.749443],[4.1425,13.476944],[3.604459,11.693274],[2.83862,12.396658],[2.378054,12.240274],[2.397925,11.896152],[2.1425,12.694443],[1.578333,12.629999],[0.989167,13.047222],[0.991667,13.371666],[1.285306,13.349957],[0.602222,13.703888],[0.235048,14.915068],[1.3125,15.286665],[3.523981,15.358152],[4.200833,16.393887],[4.245,18.645275]]]}, -{code:"AW", name:"Aruba", lng:-69.977, lat:12.517, borders:[[[-69.8821713,12.41111],[-70.05932641,12.538055],[-70.06303363,12.628611],[-69.8821713,12.41111]]]}, -{code:"AI", name:"Anguilla", lng:-63.032, lat:18.237, borders:[[[-63.16773225,18.164444],[-62.96994041,18.272221],[-62.99302698,18.227219],[-63.16773225,18.164444]]]}, -{code:"BE", name:"Belgium", lng:4.664, lat:50.643, borders:[[[4.302375,51.263184],[4.252368,51.375145],[5.041389,51.486664],[5.849171,51.15638],[5.640833,50.839722],[6.011798,50.757271],[6.398204,50.323174],[6.134414,50.127846],[6.026256,50.181252],[5.80788,49.545044],[4.873055,49.797218],[4.832503,50.16861],[4.149238,49.978371],[4.165,50.283051],[2.541667,51.09111],[3.370866,51.373856],[4.238898,51.350426],[4.302375,51.263184]]]}, -{code:"HK", name:"Hong Kong", lng:114.129, lat:22.423, borders:[[[114.246094,22.203327],[114.124977,22.279999],[114.201103,22.290554],[114.246094,22.203327]],[[113.896652,22.195827],[113.825272,22.232216],[114.04776,22.339996],[113.896652,22.195827]],[[114.314148,22.342773],[114.295258,22.345829],[114.296097,22.368053],[114.314148,22.342773]],[[114.219437,22.474438],[114.296104,22.260561],[114.0333304,22.50913815],[114.22259578,22.55054825],[114.219437,22.474438]]]}, -{code:"MP", name:"Northern Mariana Islands", lng:145.623, lat:15.005, borders:[[[145.281647,14.158333],[145.119965,14.122498],[145.237183,14.194998],[145.281647,14.158333]],[[145.535248,14.828331],[145.529694,14.848331],[145.570251,14.844997],[145.535248,14.828331]],[[145.624115,14.908054],[145.572205,15.009998],[145.633026,15.083887],[145.624115,14.908054]],[[145.736084,15.13361],[145.679138,15.105276],[145.818024,15.265833],[145.736084,15.13361]],[[145.655823,16.334721],[145.63443,16.376106],[145.714691,16.355831],[145.655823,16.334721]],[[145.798309,16.680275],[145.774994,16.705273],[145.801636,16.70055],[145.798309,16.680275]],[[145.860779,17.28722],[145.84024,17.317219],[145.867462,17.304165],[145.860779,17.28722]],[[145.860779,17.567776],[145.824402,17.577496],[145.833862,17.604996],[145.860779,17.567776]],[[145.736084,18.043888],[145.779144,18.17083],[145.824402,18.163052],[145.736084,18.043888]],[[145.679138,18.721382],[145.6633,18.810276],[145.71051,18.76833],[145.679138,18.721382]],[[145.405823,19.652775],[145.38916,19.688885],[145.415253,19.677219],[145.405823,19.652775]],[[145.256927,20.01083],[145.242188,20.052219],[145.27359,20.036385],[145.256927,20.01083]],[[144.921082,20.51833],[144.899139,20.526108],[144.913605,20.556385],[144.921082,20.51833]]]}, -{code:"FO", name:"Faroe Islands", lng:-6.864, lat:62.050, borders:[[[-6.65527725,61.38944435],[-6.96277428,61.61916542],[-6.72444534,61.57332802],[-6.65527725,61.38944435]],[[-6.60416222,61.82166481],[-6.65222168,61.74277687],[-6.90833282,61.9047184],[-6.60416222,61.82166481]],[[-7.04971886,62.06777382],[-7.20166206,62.01861],[-7.43499565,62.14027596],[-7.04971886,62.06777382]],[[-6.70694351,61.93749428],[-7.23221779,62.17249489],[-7.21082878,62.28472328],[-6.70694351,61.93749428]],[[-6.6574955,62.09250069],[-7.06027412,62.31360817],[-6.60110664,62.19693947],[-6.6574955,62.09250069]],[[-6.61999702,62.22972298],[-6.68583298,62.24499702],[-6.72083282,62.33138466],[-6.61999702,62.22972298]],[[-6.41860771,62.18388557],[-6.57249641,62.2116642],[-6.57440186,62.34987831],[-6.41860771,62.18388557]],[[-6.40610695,62.28444099],[-6.48027802,62.29777718],[-6.54527473,62.38694191],[-6.40610695,62.28444099]]]}, -{code:"AD", name:"Andorra", lng:1.576, lat:42.549, borders:[[[1.78172,42.569962],[1.723611,42.509438],[1.445833,42.601944],[1.78172,42.569962]]]}, -{code:"GI", name:"Gibraltar", lng:-5.345, lat:36.138, borders:[[[-5.33450598,36.16256],[-5.33822264,36.112175],[-5.35579463,36.163307],[-5.33450598,36.16256]]]}, -{code:"IM", name:"Isle of Man", lng:-4.527, lat:54.229, borders:[[[-4.77777825,54.05555],[-4.35416125,54.410828],[-4.39444302,54.186386],[-4.77777825,54.05555]]]}, -{code:"LU", name:"Luxembourg", lng:6.088, lat:49.771, borders:[[[6.026256,50.181252],[6.134414,50.127846],[6.524444,49.808609],[6.36217,49.459389],[5.80788,49.545044],[6.026256,50.181252]]]}, -{code:"MO", name:"Macau", lng:113.545, lat:22.200, borders:[[[113.531662,22.194736],[113.554428,22.21273],[113.552467,22.183052],[113.531662,22.194736]]]}, -{code:"MC", name:"Monaco", lng:7.412, lat:43.750, borders:[[[7.439293,43.757523],[7.391609,43.727547],[7.387777,43.748604],[7.416111,43.770554],[7.439293,43.757523]]]}, -{code:"PS", name:"Palestine", lng:35.278, lat:32.037, borders:[[[34.33416,31.25972],[34.267578,31.216541],[34.21666,31.32333],[34.490547,31.596096],[34.33416,31.25972]],[[35.282494,32.516937],[35.552567,32.394196],[35.478195,31.497322],[34.884995,31.391388],[35.282494,32.516937]],[[35.251663,31.788055],[35.25972,31.78722],[35.248886,31.808887],[35.251663,31.788055]]]}, -{code:"ME", name:"Montenegro", lng:19.254, lat:42.792, borders:[[[18.455555,42.565826],[18.699997,43.255554],[19.228809,43.513214],[20.348888,42.886383],[20.071423,42.560913],[19.645832,42.61805],[19.367771,41.848999],[18.503197,42.44944],[18.455555,42.565826]]]}, -{code:"YT", name:"Mayotte", lng:45.155, lat:-12.777, borders:[[[45.282494,-12.80415514],[45.262497,-12.7688755],[45.283051,-12.74749412],[45.282494,-12.80415514]],[[45.204994,-12.84972363],[45.097496,-12.98583043],[45.078888,-12.66249695],[45.204994,-12.84972363]]]}, -{code:"AX", name:"land Islands", lng:19.952, lat:60.198, borders:[[[20.210831,59.979996],[19.999165,60.055275],[20.205276,60.063606],[20.210831,59.979996]],[[20.270554,60.057495],[20.215553,60.13916],[20.292221,60.125275],[20.270554,60.057495]],[[19.676666,60.156944],[19.510555,60.175278],[19.601944,60.255829],[19.676666,60.156944]],[[20.397221,60.195],[20.366108,60.265549],[20.441109,60.253052],[20.397221,60.195]],[[20.084721,60.350273],[20.277496,60.274162],[19.943886,60.04277],[19.648331,60.25666],[20.084721,60.350273]]]}, -{code:"NF", name:"Norfolk Island", lng:167.953, lat:-29.037, borders:[[[167.964966,-29.08108893],[167.912476,-29.00527908],[167.997742,-29.02498579],[167.964966,-29.08108893]]]}, -{code:"CC", name:"Cocos (Keeling) Islands", lng:96.839, lat:-12.173, borders:[[[96.914154,-12.19804791],[96.902481,-12.1999949],[96.914703,-12.15193378],[96.914154,-12.19804791]],[[96.862762,-12.19609991],[96.819443,-12.17805262],[96.826385,-12.12832083],[96.862762,-12.19609991]]]}, -{code:"AQ", name:"Antarctica", lng:21.304, lat:-80.446, borders:[[[-60.22000122,-80.28581238],[-60.90858459,-80.74824524],[-61.84384918,-80.83633423],[-67.03189087,-80.16636658],[-62.54997253,-80.25880432],[-60.69500732,-79.60997009],[-60.1736145,-79.71166992],[-60.22000122,-80.28581238]],[[162.15973091,-79.06161499],[161.94778633,-79.0308075],[161.92584419,-78.98158264],[162.15973091,-79.06161499]],[[-162.13323975,-78.74105835],[-158.53244019,-79.71383667],[-161.08578491,-79.83525085],[-163.81640625,-79.20741272],[-162.13323975,-78.74105835]],[[-39.97250366,-78.55464172],[-37.45943451,-78.64022827],[-41.93052673,-78.59188843],[-39.97250366,-78.55464172]],[[-70.94555664,-79.6499176],[-71.85528564,-79.42028809],[-70.30410767,-78.80519104],[-67.31716919,-78.50358582],[-70.94555664,-79.6499176]],[[167.31555367,-78.25358582],[166.87164497,-78.20805359],[167.67749214,-78.11746216],[167.31555367,-78.25358582]],[[166.35220528,-78.31356812],[166.06555367,-78.11474609],[166.77417183,-78.22102356],[166.35220528,-78.31356812]],[[-44.11443329,-78.69880676],[-45.57523346,-78.85189819],[-43.79333496,-79.00358582],[-44.5832901,-79.33383179],[-43.46607208,-79.47026062],[-43.35441589,-79.77972412],[-44.57245636,-80.09222412],[-44.0666275,-80.25750732],[-44.28636169,-80.33970642],[-52.05552673,-80.90275574],[-54.90885925,-80.71852112],[-50.66609955,-79.58862305],[-50.18357086,-78.65046692],[-48.27275085,-78.05627632],[-44.84194946,-78.10136414],[-43.89111328,-78.36192322],[-44.11443329,-78.69880676]],[[-148.76107788,-77.44216919],[-149.03527832,-77.41691589],[-148.82946777,-77.40133667],[-148.76107788,-77.44216919]],[[-150.20751953,-77.36997986],[-151.19378662,-77.27186584],[-150.07641602,-77.34046936],[-150.20751953,-77.36997986]],[[-148.85842896,-77.35473633],[-149.51934814,-77.29081726],[-149.16156006,-77.25880432],[-148.85842896,-77.35473633]],[[167.71695137,-77.4058075],[169.45111275,-77.49659729],[166.77664375,-77.85778809],[166.54776192,-77.70664978],[166.88250923,-77.67192078],[166.2133503,-77.53863525],[166.63165474,-77.17277527],[167.71695137,-77.4058075]],[[-147.25216675,-77.16549683],[-147.53262329,-77.15188599],[-147.0625,-77.17388916],[-147.25216675,-77.16549683]],[[-147.89697266,-77.42964172],[-148.86407471,-77.27078247],[-148.46426392,-77.07055664],[-147.70883179,-77.18945313],[-147.59078979,-77.33164978],[-147.89697266,-77.42964172]],[[-147.63345337,-77.10331726],[-147.83511353,-77.034729],[-147.65460205,-77.03994751],[-147.63345337,-77.10331726]],[[-148.51150513,-76.90776062],[-148.20663452,-76.97799683],[-149.19467163,-76.95056152],[-148.51150513,-76.90776062]],[[-149.47817993,-76.89828491],[-149.07250977,-77.10081482],[-150.73626709,-76.95109558],[-149.47817993,-76.89828491]],[[-146.71078491,-76.9790802],[-146.9914856,-76.85136414],[-146.22317505,-76.89741516],[-146.71078491,-76.9790802]],[[-148.53372192,-76.72244263],[-148.15722656,-76.76522827],[-149.16918945,-76.73213196],[-148.53372192,-76.72244263]],[[-149.83184814,-76.66439819],[-150.32073975,-76.78167725],[-150.70141602,-76.71939087],[-149.83184814,-76.66439819]],[[-148.40939331,-76.68945313],[-148.77456665,-76.65275574],[-148.61911011,-76.61802673],[-148.40939331,-76.68945313]],[[-147.43356323,-76.68858337],[-147.95401001,-76.59100533],[-147.59121704,-76.59384155],[-147.43356323,-76.68858337]],[[-146.77218628,-76.71417236],[-147.25128174,-76.57685852],[-146.76065063,-76.57055664],[-146.77218628,-76.71417236]],[[-147.34710693,-76.6138916],[-147.61801147,-76.5569458],[-147.47473145,-76.55747986],[-147.34710693,-76.6138916]],[[168.60333443,-76.23278809],[168.36108589,-76.16244507],[168.49081612,-76.15852356],[168.60333443,-76.23278809]],[[-146.58557129,-76.30552673],[-147.27807617,-76.11334229],[-146.77612305,-76.08720589],[-146.57293701,-76.22026062],[-146.58557129,-76.30552673]],[[-146.79049683,-75.85583496],[-147.00344849,-75.81945801],[-146.85928345,-75.80552673],[-146.79049683,-75.85583496]],[[-145.15371704,-75.73658752],[-145.86709595,-75.60455322],[-145.57162476,-75.5526886],[-145.15371704,-75.73658752]],[[-143.00128174,-75.52612305],[-143.28067017,-75.49160767],[-143.08206177,-75.46525574],[-143.00128174,-75.52612305]],[[-132.37194824,-74.46417236],[-132.66177368,-74.41908264],[-132.20510864,-74.39241028],[-132.37194824,-74.46417236]],[[-131.38955688,-74.34689331],[-130.74475098,-74.41494751],[-132.00759888,-74.42910767],[-131.38955688,-74.34689331]],[[-127.39111328,-74.58023071],[-128.16067505,-74.25411987],[-127.036026,-74.39219666],[-127.39111328,-74.58023071]],[[-117.11408997,-74.33404732],[-117.19827271,-74.32827759],[-116.75161743,-74.24716187],[-117.11408997,-74.33404732]],[[-20.46749496,-74.33023071],[-20.1194458,-74.85047913],[-21.60359955,-74.45077515],[-20.3694458,-74.12161255],[-20.46749496,-74.33023071]],[[-115.93019104,-73.96188354],[-116.27362061,-74.15350533],[-117.24105835,-74.1875],[-115.93019104,-73.96188354]],[[-122.14971161,-73.61442566],[-118.54942322,-73.92889404],[-122.13217163,-74.36802673],[-122.62989044,-74.320755],[-122.41439819,-73.87052917],[-123.15933228,-73.73397827],[-122.14971161,-73.61442566]],[[169.82443428,-73.59558105],[169.38803291,-73.53308105],[169.86859322,-73.28907776],[169.82443428,-73.59558105]],[[-78.04800415,-73.44216919],[-78.34602356,-73.25270081],[-77.63630676,-73.29997253],[-78.04800415,-73.44216919]],[[-126.11834717,-73.24716187],[-125.13414001,-73.7179718],[-124.23049927,-73.68911743],[-123.72407532,-74.10047913],[-125.25270081,-74.06390381],[-127.39241028,-73.41778564],[-126.11834717,-73.24716187]],[[-73.89111328,-73.42497253],[-74.06411743,-73.32556152],[-73.49890137,-73.15350533],[-73.89111328,-73.42497253]],[[-104.86496735,-73.2388916],[-105.24105835,-73.05464172],[-104.55029297,-73.18661499],[-104.86496735,-73.2388916]],[[-89.74497986,-72.87553406],[-89.45664978,-72.91352844],[-90.37945557,-73.04779053],[-89.74497986,-72.87553406]],[[-74.22277832,-72.97602844],[-74.46546936,-73.64828491],[-76.09352112,-73.20936584],[-75.39524841,-73.0599823],[-75.72026062,-72.94555664],[-75.38609314,-72.81803894],[-74.22277832,-72.97602844]],[[-93.75935364,-72.91157532],[-94.13806152,-72.83917236],[-93.80584717,-72.81500244],[-93.75935364,-72.91157532]],[[-98.14796448,-72.72994995],[-98.34352112,-72.69935608],[-97.82522583,-72.66331482],[-98.14796448,-72.72994995]],[[-99.74084473,-72.62358093],[-98.93019104,-72.67355347],[-100.85855103,-72.66549683],[-99.74084473,-72.62358093]],[[-95.33132935,-72.67192078],[-95.51828003,-72.64938354],[-94.69667053,-72.61419678],[-95.33132935,-72.67192078]],[[-91.33720589,-73.15689087],[-91.61714172,-72.60473633],[-90.80627632,-72.59275818],[-91.33720589,-73.15689087]],[[-93.3651886,-72.65438843],[-93.46142578,-72.58442688],[-93.17028809,-72.57556152],[-93.3651886,-72.65438843]],[[-61.03859711,-72.55966187],[-61.13495636,-72.54495239],[-60.97000122,-72.52742004],[-61.03859711,-72.55966187]],[[-78.41995239,-72.56771851],[-77.43911743,-72.58862305],[-77.59439087,-72.90994263],[-78.80630493,-73.18162537],[-79.42158508,-72.95991516],[-78.8416748,-72.77133179],[-79.46133423,-72.56629944],[-79.2474823,-72.40242004],[-78.41995239,-72.56771851]],[[-68.81608582,-72.47439575],[-68.97744751,-72.46046448],[-68.59797668,-72.38577271],[-68.81608582,-72.47439575]],[[-60.33694458,-72.25750732],[-60.50190163,-72.19969177],[-60.34358215,-72.19413757],[-60.33694458,-72.25750732]],[[68.4820118,-72.27775574],[68.6931324,-72.08882141],[68.82002449,-72.1652832],[68.4820118,-72.27775574]],[[69.79756355,-72.03308105],[69.77308846,-71.92353821],[69.95729256,-71.91864014],[69.79756355,-72.03308105]],[[-98.80300903,-71.88664246],[-98.29747009,-71.87194824],[-98.56053162,-72.13108826],[-98.19664001,-72.19914246],[-98.13627625,-71.89286804],[-97.68640137,-72.1819458],[-97.34939575,-71.86247253],[-96.65046692,-71.87324524],[-96.34254456,-72.00219727],[-97.25805664,-72.222229],[-95.99508667,-72.07991028],[-95.82164001,-72.18945313],[-96.59602356,-72.28657532],[-95.67584229,-72.36050415],[-98.61605835,-72.56880188],[-102.56269836,-72.12466431],[-100.41439819,-71.88130188],[-100.06163025,-71.93510437],[-100.51055908,-72.02362061],[-100.23497009,-72.13075256],[-98.83306885,-72.13130188],[-99.30747986,-71.94380188],[-98.80300903,-71.88664246]],[[0.45202827,-71.10058594],[0.23980904,-71.03352356],[0.58673286,-71.06445313],[0.45202827,-71.10058594]],[[-60.53551483,-71.05632019],[-60.95910835,-70.94522095],[-60.62472534,-70.88500977],[-60.53551483,-71.05632019]],[[-7.87944412,-70.73387146],[-8.04360771,-70.70001221],[-7.72527695,-70.71025085],[-7.87944412,-70.73387146]],[[-2.38999939,-70.75195313],[-1.98277664,-70.81629944],[-2.79638863,-71.03973389],[-3.45499992,-70.69303894],[-2.38999939,-70.75195313]],[[-73.68519592,-70.68019104],[-74.30606079,-71.01022339],[-76.63500977,-71.06019592],[-73.68519592,-70.68019104]],[[2.05065727,-70.69969177],[1.89593315,-70.64611816],[2.21673393,-70.63630676],[2.05065727,-70.69969177]],[[-60.8194046,-70.66223145],[-61.15912628,-70.57577515],[-60.63136292,-70.54833984],[-60.8194046,-70.66223145]],[[2.95757866,-70.625],[2.61315727,-70.50498962],[3.32732964,-70.46882629],[2.95757866,-70.625]],[[-6.04027367,-70.57914734],[-6.37668228,-70.47607422],[-5.96985245,-70.41786385],[-6.04027367,-70.57914734]],[[-3.12805557,-70.50411987],[-3.32972145,-70.4833374],[-2.64416695,-70.4152832],[-3.12805557,-70.50411987]],[[163.38614082,-70.38053894],[163.30529976,-70.34918213],[163.48333931,-70.35386658],[163.38614082,-70.38053894]],[[72.22700691,-70.61299133],[71.68812752,-70.33828735],[71.93007088,-70.29408264],[72.22700691,-70.61299133]],[[-1.79027748,-70.23191833],[-1.97305489,-70.18161011],[-1.89722061,-70.16886902],[-1.79027748,-70.23191833]],[[13.10955238,-70.05725098],[13.22118568,-70.13751221],[12.48174477,-70.11050415],[13.10955238,-70.05725098]],[[15.99284935,-70.17224121],[15.36034584,-70.02883911],[16.36205482,-70.01751709],[15.99284935,-70.17224121]],[[-61.38495636,-70.01522827],[-61.5280304,-69.96525574],[-61.29245758,-69.93411255],[-61.38495636,-70.01522827]],[[-74.84222412,-69.81575012],[-74.45251465,-70.02154732],[-75.86138916,-70.05519104],[-74.84222412,-69.81575012]],[[38.23148537,-69.67800903],[38.0561924,-69.6366272],[38.23148537,-69.64654732],[38.23148537,-69.67800903]],[[-72.35528564,-69.75750732],[-72.94522095,-69.60081482],[-72.04441833,-69.69303894],[-72.35528564,-69.75750732]],[[-62.04218292,-69.71994019],[-62.32719421,-69.10745239],[-61.7155304,-69.46852112],[-62.04218292,-69.71994019]],[[155.87362862,-69.15112305],[155.5258503,-69.0005188],[155.88369942,-69.0589447],[155.87362862,-69.15112305]],[[155.20083809,-69.04605103],[154.95392036,-69.01719666],[155.30890083,-68.98114014],[155.20083809,-69.04605103]],[[-70.15689087,-68.848526],[-70.08404732,-69.26359558],[-68.37716675,-70.64938354],[-68.07130432,-71.63827515],[-68.39164734,-72.23387146],[-69.26000977,-72.56411743],[-72.37608337,-72.7277832],[-73.19445801,-72.43127632],[-70.52186584,-72.20774841],[-72.04495239,-72.19445801],[-70.94717407,-72.03886414],[-72.26741028,-71.64611816],[-72.86660767,-71.93411255],[-73.87911987,-71.82055664],[-73.58111572,-72.0471344],[-74.04333496,-72.20883179],[-75.46600533,-71.85102844],[-75.14186096,-71.57772827],[-74.43574524,-71.69303894],[-74.3891449,-71.43411255],[-73.5291748,-71.64328003],[-73.67910767,-71.35800171],[-72.41189575,-71.33633423],[-73.159729,-71.1849823],[-72.9263916,-71.11584473],[-70.6138916,-71.16636658],[-71.02078247,-70.80334473],[-72.46078491,-70.60189819],[-71.3891449,-70.22994995],[-71.81500244,-69.98408508],[-71.64578247,-69.51741028],[-72.25325012,-69.2071991],[-70.15689087,-68.848526]],[[-90.59439087,-68.92584229],[-90.75140381,-68.79908752],[-90.48692322,-68.82772827],[-90.59439087,-68.92584229]],[[-63.44691467,-68.85136414],[-63.62776947,-68.79692078],[-63.41332245,-68.83720589],[-63.44691467,-68.85136414]],[[-60.71804047,-68.75466919],[-61.08165741,-68.6794281],[-60.82969666,-68.661026],[-60.71804047,-68.75466919]],[[-67.50750732,-67.8099823],[-67.81520081,-67.68911743],[-67.08404732,-67.63130188],[-67.50750732,-67.8099823]],[[47.67118263,-67.58665466],[47.89804268,-67.5941925],[47.40786934,-67.62466431],[47.67118263,-67.58665466]],[[59.35531044,-67.33164978],[59.2692585,-67.2902832],[59.41646767,-67.32054138],[59.35531044,-67.33164978]],[[164.78723335,-67.59526062],[164.56167793,-67.27154732],[164.84002876,-67.42353821],[164.78723335,-67.59526062]],[[58.64254951,-67.12638855],[58.52865028,-67.11779785],[58.67147255,-67.11997986],[58.64254951,-67.12638855]],[[58.8606205,-67.12194824],[58.77419472,-67.10855103],[58.82480049,-67.10221863],[58.8606205,-67.12194824]],[[50.34646797,-67.11639404],[50.13064766,-67.0741272],[50.25009346,-67.06770325],[50.34646797,-67.11639404]],[[48.79397774,-66.756073],[48.39731789,-66.89022827],[48.2914753,-66.82000732],[48.79397774,-66.756073]],[[86.06532478,-67.00106812],[85.3728199,-66.74659729],[85.87196541,-66.77383423],[86.18390083,-66.92245483],[86.06532478,-67.00106812]],[[86.49279976,-66.77470589],[86.30169868,-66.71110535],[86.7320118,-66.71220589],[86.49279976,-66.77470589]],[[-67.24411011,-66.74769592],[-67.54191589,-66.86964417],[-67.45970154,-66.69717407],[-67.24411011,-66.74769592]],[[-68.10028076,-67.39328003],[-68.56500244,-67.74803162],[-69.22886658,-67.54136658],[-67.58546448,-66.6138916],[-67.91081238,-66.84886169],[-67.67463684,-67.15917969],[-68.10028076,-67.39328003]],[[99.29449654,-66.74858093],[99.21588326,-66.72297668],[99.52087593,-66.59002686],[99.29449654,-66.74858093]],[[163.10696602,-66.756073],[162.94919014,-66.57217407],[163.11834908,-66.62303162],[163.10696602,-66.756073]],[[85.33284187,-66.62858582],[85.15199471,-66.59025574],[85.28419685,-66.52023315],[85.33284187,-66.62858582]],[[98.77197456,-66.49191284],[98.60199165,-66.4332428],[98.86279488,-66.45446777],[98.77197456,-66.49191284]],[[97.22918892,-66.46633911],[97.08838081,-66.4152832],[97.35310555,-66.42388916],[97.22918892,-66.46633911]],[[162.56808662,-66.43496704],[162.30029488,-66.18888855],[162.60141182,-66.35058594],[162.56808662,-66.43496704]],[[100.2730732,-66.19270325],[100.22973824,-66.14883423],[100.35167885,-66.14360046],[100.2730732,-66.19270325]],[[96.767519,-66.25967407],[96.26001167,-66.18888855],[96.84779549,-66.12159729],[96.767519,-66.25967407]],[[-66.73213196,-66.31053162],[-66.74302673,-66.11769104],[-66.57556152,-66.08796692],[-66.73213196,-66.31053162]],[[100.55475044,-66.14720154],[100.61865425,-66.04692078],[100.7564106,-66.07913208],[100.55475044,-66.14720154]],[[100.82141304,-66.02688599],[100.77282906,-66.01327515],[100.81726265,-65.99746704],[100.82141304,-66.02688599]],[[100.92755318,-66.00553894],[100.84362984,-65.98298645],[100.95892525,-65.9683075],[100.92755318,-66.00553894]],[[100.77057076,-65.86138916],[100.70807076,-65.83273315],[100.99810982,-65.80888367],[100.77057076,-65.86138916]],[[92.69893074,-65.79832458],[92.26892281,-65.7641449],[92.49505806,-65.67224121],[92.69893074,-65.79832458]],[[-65.66691589,-65.68716431],[-66.161026,-65.86877632],[-65.91833496,-65.52972412],[-65.66691589,-65.68716431]],[[100.75499916,-65.67855835],[100.24695015,-65.58361816],[101.25665474,-65.50367737],[100.75499916,-65.67855835]],[[103.24279976,-65.2958374],[103.47252846,-65.45001221],[102.77393532,-65.14022827],[103.24279976,-65.2958374]],[[-59.43608093,-65.25575256],[-59.81304169,-65.10713196],[-59.53304291,-65.10942078],[-59.43608093,-65.25575256]],[[-63.14415741,-64.78134155],[-63.32441711,-64.91189575],[-63.55498505,-64.89306641],[-63.14415741,-64.78134155]],[[-57.2791214,-64.55247688],[-57.48861694,-64.49639893],[-56.85495758,-64.33862305],[-57.2791214,-64.55247688]],[[-63.30667114,-64.42855835],[-62.76028442,-64.56019592],[-63.63996124,-64.83383179],[-64.22047424,-64.67333984],[-63.08944702,-64.29658508],[-63.30667114,-64.42855835]],[[-56.81500244,-64.31695557],[-56.75832367,-64.23779297],[-56.57556152,-64.21972656],[-56.81500244,-64.31695557]],[[-62.29997253,-64.43444824],[-62.70469666,-64.46600533],[-62.4805603,-64.04333496],[-62.01164246,-64.21417236],[-62.29997253,-64.43444824]],[[-57.81581879,-63.96139526],[-57.03330994,-64.17247009],[-57.91278076,-64.44522095],[-58.23943329,-64.32501221],[-58.08078766,-64.08470154],[-58.42856598,-64.11334229],[-57.81581879,-63.96139526]],[[-57.57055664,-63.78778076],[-57.04556274,-63.82278442],[-57.69467926,-63.81636047],[-57.57055664,-63.78778076]],[[-60.73828888,-63.86829376],[-60.76415253,-63.66054535],[-60.53134918,-63.65167236],[-60.73828888,-63.86829376]],[[-55.97663879,-63.58139038],[-56.205513,-63.4527359],[-55.70774841,-63.45246124],[-55.97663879,-63.58139038]],[[-62.1541214,-63.32414246],[-62.26028442,-63.25386047],[-61.94332314,-63.28162384],[-62.1541214,-63.32414246]],[[-56.94636536,-63.45056152],[-56.72135925,-63.59472656],[-57.38000488,-63.46052551],[-58.60082245,-63.94887543],[-58.77861023,-64.53572083],[-59.49302673,-64.31608582],[-59.50527954,-64.53723145],[-59.91887665,-64.41223145],[-61.95943451,-65.18019104],[-62.08971405,-65.44020081],[-61.68302917,-65.53852844],[-62.45970917,-65.90472412],[-61.87276459,-66.17192078],[-60.55748749,-65.94522095],[-60.93695068,-66.26000977],[-61.41664124,-66.12519836],[-61.7138443,-66.46917725],[-62.18133736,-66.18019104],[-62.88528442,-66.26272583],[-62.44359589,-66.43019104],[-62.60887909,-66.72831726],[-63.67551422,-66.2183075],[-64.19664001,-66.72026062],[-63.74356842,-66.89164734],[-64.8377533,-66.9513092],[-64.77056885,-67.31716919],[-65.6138916,-67.55911255],[-65.2902832,-67.67333984],[-65.61769104,-67.88000488],[-65.32914734,-67.97473145],[-65.723526,-68.14796448],[-64.76828003,-68.12269592],[-65.59667969,-68.34744263],[-65.0916748,-68.44195557],[-65.31324768,-68.71133423],[-63.85773468,-68.84275818],[-64.39001465,-68.51327515],[-62.72832489,-68.40994263],[-63.97413635,-68.53636169],[-63.21052551,-68.78689575],[-63.70665741,-68.74247742],[-63.36802673,-69.04997253],[-63.63887787,-69.22723389],[-62.47582245,-69.45306396],[-62.63495636,-69.85331726],[-61.94081879,-70.2290802],[-62.49079132,-70.38053894],[-61.48442078,-70.52024841],[-62.12886047,-70.86550903],[-61.38027954,-70.81520081],[-60.94250488,-71.15830994],[-61.92971039,-71.65634155],[-60.9041214,-71.73638916],[-62.55247688,-72.04747009],[-60.86579132,-72.0030365],[-61.07469177,-72.16352844],[-60.85245514,-72.3888092],[-61.54969788,-72.42279053],[-61.2707901,-72.70022583],[-60.61606598,-72.64328003],[-60.61721039,-73.02850533],[-59.77416992,-72.9002533],[-59.84940338,-73.23300171],[-60.59967804,-73.36029053],[-61.91941833,-73.14306641],[-61.43634796,-73.34352112],[-61.83666992,-73.36639404],[-61.60915375,-73.54605103],[-60.5877533,-73.70611572],[-61.7624588,-73.91386414],[-61.03636169,-74.09831238],[-61.75527954,-74.30627632],[-61.8874588,-74.8321991],[-62.53134918,-74.98245239],[-63.24580383,-74.6040802],[-63.0513916,-74.89524841],[-63.98943329,-75.00805664],[-63.09580994,-75.13075256],[-64.44772339,-75.29779053],[-63.09472656,-75.32556152],[-63.4291687,-75.45056152],[-69.38522339,-76.29605103],[-70.47636414,-76.70774841],[-75.44445801,-76.54637146],[-76.38053894,-76.06500244],[-77.77154732,-75.91886902],[-78.47657776,-76.40722656],[-75.63272095,-77.5085907],[-72.83970642,-77.64001465],[-74.85331726,-78.14111328],[-81.49694824,-77.65776062],[-80.60549927,-77.88630676],[-81.46994019,-77.89720154],[-77.48747253,-78.52667236],[-78.95741272,-78.81324768],[-84.10778809,-78.36083984],[-80.63555908,-79.61911011],[-80.20272827,-79.22886658],[-77.02938843,-79.27938843],[-76.08361816,-79.64578247],[-77.32185364,-80.01130676],[-79.84939575,-79.95436096],[-76.08938599,-80.19717407],[-74.69380188,-80.69717407],[-59.64802551,-82.43389893],[-58.78304291,-82.64491272],[-59.07969666,-82.96580505],[-58.21079254,-83.03330994],[-53.72582245,-82.1502533],[-43.08443451,-81.85136414],[-41.4888916,-81.383255],[-28.31943893,-80.27688599],[-28.0625,-80.00466919],[-30.21055603,-79.6665802],[-27.08555603,-79.01327515],[-33.00108337,-79.45381165],[-36.30274963,-78.7791748],[-33.88610077,-77.66047668],[-28.30525589,-76.56520081],[-17.75805664,-75.72973633],[-18.25636673,-75.4957428],[-17.14720917,-74.784729],[-13.70471573,-73.94195557],[-16.32610703,-74.06390381],[-16.91914749,-73.97602844],[-16.06916809,-73.7474823],[-16.89886856,-73.77296448],[-16.02359772,-73.32022095],[-13.73110771,-73.02078247],[-14.46915627,-72.79658508],[-13.40611267,-72.82305908],[-11.65777397,-72.32685852],[-11.32582283,-71.96492004],[-12.27693367,-71.37750244],[-11.55649948,-71.27879333],[-11.59276772,-71.56195068],[-11.01943398,-71.65722656],[-10.04860115,-71.11138916],[-10.43000031,-70.98692322],[-9.87870216,-70.90090942],[-8.93083,-71.23355103],[-8.36694145,-71.82577515],[-7.33777428,-71.69195557],[-7.72332954,-71.42910767],[-6.02111053,-70.69969177],[-5.4411068,-70.88250732],[-6.10388947,-71.1443634],[-6.00916672,-71.41886902],[-2.26166725,-71.1708374],[-2.09388924,-71.48605347],[-1.05333328,-71.27667236],[-0.77722168,-71.3891449],[-0.92305565,-71.58917236],[-0.2974987,-71.65885925],[2.80315971,-70.84689331],[6.69952202,-70.58633423],[7.5573101,-70.1683197],[8.48064613,-70.47721863],[9.09038734,-70.31825256],[8.68285561,-70.07446289],[11.27062416,-70.71025085],[12.04674721,-70.71742249],[12.74035072,-70.28112793],[14.16564369,-70.15884399],[15.7059269,-70.27850533],[18.03648949,-69.96917725],[23.2467556,-70.5463562],[31.08342171,-69.77383423],[32.90232277,-69.27688599],[33.44504738,-68.95718384],[33.42423439,-68.65132141],[34.14035988,-68.48278809],[36.4145298,-69.31445313],[36.12644386,-69.53352356],[36.72257423,-69.72798157],[37.91617775,-69.25138855],[37.85093117,-69.53384399],[37.14505959,-69.66471863],[38.23923683,-69.99279785],[38.56449318,-69.5005188],[38.65036964,-69.98854065],[39.70176125,-69.64860535],[39.760355,-68.95446777],[41.10312843,-68.52383423],[46.30893135,-67.64163208],[46.24643135,-67.35745239],[46.55143166,-67.27719116],[47.44895363,-67.41777039],[47.0095005,-67.55027771],[47.3956089,-67.72242737],[48.21701241,-67.63435364],[49.16726875,-67.38336182],[48.26285744,-67.16743469],[49.16397285,-66.86277771],[49.15170479,-67.08862305],[50.68948555,-67.18127632],[50.16977119,-66.74302673],[50.41311836,-66.44194031],[53.77896309,-65.84002686],[55.61923409,-66.00695801],[57.31197548,-66.56324768],[56.72952461,-66.90112305],[59.1106205,-67.41223145],[69.64479256,-67.75390625],[70.10200691,-68.52383423],[69.29200935,-69.1027832],[69.74312019,-69.36299133],[68.87117195,-69.37944031],[69.34004402,-69.63859558],[69.20533943,-69.86387634],[68.09474373,-69.87944031],[67.64613533,-70.38630676],[68.59395027,-70.77055359],[68.85029793,-70.5322113],[68.6616993,-70.36779785],[69.14479256,-70.33132935],[69.24391365,-70.67048645],[67.60530281,-71.58305359],[67.90114021,-71.64447021],[67.33755684,-72.06324768],[68.93641853,-72.42497253],[70.86494637,-71.93008423],[71.44978523,-71.54605103],[71.24812508,-71.38935852],[71.50447273,-70.95381165],[72.86311531,-70.43269348],[72.61561775,-70.20361328],[72.90114021,-70.02186584],[77.74727058,-69.11691284],[78.11641121,-68.45970154],[82.05726814,-67.67224121],[81.46974373,-67.50520325],[82.0144825,-67.25161743],[82.66504097,-67.39382935],[83.40339851,-67.15667725],[85.79168892,-67.1776886],[87.50251961,-66.89468384],[88.10949898,-66.65252686],[88.22723579,-66.03636169],[88.96722603,-66.76130676],[92.00531197,-66.53384399],[97.56445503,-66.74050903],[98.2619648,-66.51611328],[99.28308296,-66.88075256],[100.95392036,-66.08078003],[102.62616158,-65.90112305],[107.80478096,-66.39826965],[108.82422066,-66.83110046],[110.62976265,-66.48658752],[110.89172554,-66.06356812],[113.31534004,-65.71328735],[114.43142891,-66.17941284],[114.51835823,-66.47277832],[116.18004036,-66.36659241],[117.7670002,-66.98974609],[122.18335915,-66.54777527],[125.19001961,-66.73419189],[126.35616493,-66.27972412],[126.98835945,-66.45352173],[126.92865181,-66.83436584],[128.83477974,-67.14251709],[130.35199165,-66.22581482],[134.2453022,-66.20109558],[134.43640327,-66.00138855],[134.10061836,-65.12303162],[134.4378376,-64.92604065],[135.27224922,-65.43640137],[134.94778633,-66.0929718],[142.56640816,-66.99411011],[143.40002632,-66.85113525],[144.5855732,-67.24519348],[145.40445137,-67.01719666],[145.87530708,-67.19586182],[145.31500435,-67.61334229],[146.64279366,-67.70936584],[147.1508503,-67.99082947],[146.95334053,-68.14163208],[148.02945137,-67.84437561],[148.6480732,-67.98919678],[148.21722603,-68.12715149],[148.8133564,-68.33525085],[150.9925251,-68.39076233],[151.18502998,-68.97993469],[153.76861763,-68.92224121],[153.77835274,-68.34362793],[154.68585396,-68.61497688],[154.28668404,-68.86299133],[154.85669136,-69.10243225],[156.33612251,-69.24050903],[157.23639107,-68.94248962],[160.9689045,-70.25553894],[162.75390816,-70.28024292],[163.52084541,-70.67497253],[163.78528023,-70.6280365],[163.55389595,-70.46525574],[166.77166939,-70.61158752],[166.46304512,-70.70185852],[167.767519,-70.7808075],[170.27224922,-71.65992737],[170.2152729,-71.28276062],[170.45303535,-71.35157776],[170.99444771,-71.86419678],[170.12997627,-72.05137634],[169.87164497,-72.37910461],[170.30417061,-72.30084229],[170.32223701,-72.58021545],[169.26642036,-73.08381653],[169.07916451,-73.52752686],[167.56167793,-73.40328979],[165.54858589,-73.93247986],[166.1291523,-74.12715149],[164.78085518,-74.13696289],[165.3333149,-74.67277527],[164.142519,-74.61605835],[163.65667915,-74.77436829],[163.87167549,-74.95326233],[162.53973579,-75.1088562],[163.1369648,-75.93661499],[162.33780098,-76.16723633],[162.87558174,-76.24769592],[162.93225288,-76.58305359],[162.62362862,-76.61943054],[163.06973457,-76.7308197],[162.3327961,-76.95141602],[163.23834419,-77.04136658],[163.89697456,-77.46665955],[163.61084175,-77.6960907],[164.56500435,-77.73638916],[164.20669746,-78.14382935],[165.54001045,-78.00335693],[165.68359566,-78.39163208],[167.2694416,-78.6558075],[164.49444771,-78.56965637],[160.49417305,-79.02076721],[160.04055977,-79.1558075],[160.73806953,-79.45304871],[159.09280586,-79.97102356],[160.52444649,-80.04136658],[158.05725288,-80.2804718],[160.89196968,-80.37750244],[159.75695992,-80.56965637],[161.1744709,-80.63555908],[160.01556587,-80.78024292],[160.8439045,-80.89306641],[160.50308418,-80.95272827],[160.83944893,-81.07804871],[160.62613106,-81.20501709],[162.1939106,-81.29777527],[160.39111519,-81.52131653],[162.2758503,-81.66223145],[163.85946846,-82.17408752],[163.44613838,-82.26499939],[168.69247627,-83.14631653],[167.46972847,-83.43911743],[169.25082588,-83.33001709],[172.31860542,-83.597229],[171.9050312,-83.80169678],[180.00000191,-84.30224609],[180.00000191,-90.],[-180.,-90.],[-180.,-84.30525208],[-157.48321533,-85.44859314],[-150.23928833,-85.46362305],[-148.13827515,-85.09080505],[-139.66134644,-85.24497986],[-138.58926392,-84.9846344],[-149.2946167,-84.56195068],[-153.05288696,-84.01272583],[-153.00738525,-83.0874176],[-151.79418945,-82.57772827],[-154.89129639,-81.90492249],[-153.98907471,-81.62911987],[-154.20489502,-81.55213928],[-156.9598999,-81.25161743],[-154.92156982,-81.00195313],[-148.41329956,-81.35745239],[-145.52416992,-80.46046448],[-146.81182861,-79.88751221],[-155.90634155,-78.71972656],[-153.75018311,-78.3082428],[-157.91027832,-78.00195313],[-158.17572021,-77.8596344],[-157.69683838,-77.57130432],[-157.75302124,-77.10800171],[-156.48321533,-77.35855103],[-155.86126709,-77.08436584],[-153.7902832,-77.17463684],[-153.08361816,-77.28657532],[-153.10623169,-77.49716187],[-152.0609436,-77.32522583],[-149.66223145,-77.76109314],[-149.08706665,-77.6960907],[-149.41418457,-77.570755],[-148.73278809,-77.62553406],[-148.58557129,-77.59439087],[-148.58099365,-77.50445557],[-147.59121704,-77.4221344],[-147.49301147,-77.29692078],[-147.07162476,-77.37269592],[-147.03222656,-77.22080994],[-146.26849365,-77.46633911],[-145.87890625,-77.30627632],[-146.22732544,-77.16494751],[-145.84274292,-77.11408997],[-146.3013916,-76.99911499],[-145.29876709,-77.0291748],[-146.10211182,-76.83992004],[-145.45620728,-76.76022339],[-146.93225098,-76.45185852],[-149.506073,-76.38751221],[-148.10110474,-76.09562683],[-146.4914856,-76.36747742],[-145.47927856,-76.44325256],[-146.29528809,-76.03973389],[-134.30377197,-74.53276062],[-133.26239014,-74.847229],[-121.47831726,-74.74247742],[-118.53167725,-74.61355591],[-117.74302673,-74.30856323],[-117.39686584,-74.5308075],[-114.69773102,-74.46917725],[-114.8099823,-74.10473633],[-114.00358582,-73.8891449],[-113.18640137,-74.16886902],[-113.43357086,-74.472229],[-112.93019104,-74.45491028],[-113.55552673,-74.63435364],[-112.65406036,-74.85855103],[-111.3429718,-74.75935364],[-111.72439575,-74.58720589],[-111.38577271,-74.46220589],[-111.50379944,-74.19161987],[-110.15461159,-74.28417969],[-109.9287796,-74.76130676],[-110.96166992,-75.15776062],[-110.38305664,-75.30606079],[-99.51022339,-75.09242249],[-100.85157776,-74.81466675],[-100.15112305,-74.76077271],[-100.51544952,-74.67105103],[-100.24803162,-74.49084473],[-101.33187103,-74.48049927],[-101.65830994,-73.99890137],[-102.90133667,-73.87574768],[-103.01326752,-73.62911987],[-99.17550659,-73.61911011],[-103.036026,-73.3263092],[-103.60331726,-72.89186096],[-103.17605591,-72.7333374],[-102.09907532,-73.08470154],[-90.86105347,-73.3266449],[-89.3210907,-73.05410767],[-89.53723145,-72.6335907],[-89.26109314,-72.63935852],[-88.33578491,-72.81608582],[-88.70904732,-73.1794281],[-86.84080505,-73.33633423],[-85.9666748,-73.04136658],[-85.47080994,-73.34973145],[-85.59973145,-73.5582428],[-82.13414001,-73.94325256],[-81.04136658,-73.71546936],[-81.2752533,-73.3694458],[-80.51914978,-73.44630432],[-80.69555664,-73.05050659],[-78.95883179,-73.39241028],[-78.78973389,-73.69303894],[-76.61834717,-73.5766449],[-76.9627533,-73.87303162],[-69.42834473,-73.19717407],[-66.7971344,-72.40776062],[-66.85908508,-71.89556885],[-67.53723145,-71.45469666],[-67.4002533,-71.03994751],[-67.70381165,-70.5929718],[-68.83796692,-69.41723633],[-66.65776062,-69.01773071],[-67.4944458,-68.8155365],[-66.93214417,-68.77383423],[-67.16549683,-68.29333496],[-66.58970642,-68.23800659],[-67.15722656,-68.01055908],[-66.42713928,-67.53330994],[-67.62390137,-67.55355835],[-67.48583984,-67.07719421],[-66.40472412,-66.88555908],[-66.49716187,-66.6224823],[-65.68966675,-66.125],[-64.45327759,-65.98158264],[-64.659729,-65.7401886],[-63.7127533,-65.50250244],[-64.05300903,-65.42192078],[-63.87940216,-65.01828003],[-63.0905304,-65.13380432],[-62.93804169,-64.79747009],[-62.3194046,-64.85887146],[-62.61775208,-64.75500488],[-62.45361328,-64.58917236],[-61.93526459,-64.6905365],[-60.94190216,-64.27742004],[-60.9916687,-64.03581238],[-59.44582367,-63.893013],[-58.91082001,-63.53304291],[-57.20497131,-63.205513],[-56.94636536,-63.45056152]],[[-55.47000122,-63.14328766],[-55.00276947,-63.28385925],[-56.54333496,-63.36443329],[-55.47000122,-63.14328766]],[[-56.26496124,-63.16941833],[-56.58470917,-63.03500366],[-55.97080994,-63.05443573],[-56.26496124,-63.16941833]],[[-60.47182465,-62.90085983],[-60.57997131,-63.00805664],[-60.74244308,-62.97394562],[-60.47182465,-62.90085983]],[[-62.69136047,-63.09500122],[-62.48943329,-62.92111206],[-62.26055908,-62.88163757],[-62.69136047,-63.09500122]],[[-61.35861206,-62.81358337],[-61.47914124,-62.75386047],[-61.15052795,-62.70861816],[-61.35861206,-62.81358337]],[[-60.51665497,-62.55389404],[-59.81690216,-62.61415863],[-61.17247009,-62.5749588],[-60.51665497,-62.55389404]],[[-59.66555786,-62.5569458],[-59.97914124,-62.45083618],[-59.54218292,-62.49858093],[-59.66555786,-62.5569458]],[[-59.43912506,-62.44718361],[-59.67829132,-62.3638916],[-59.32746124,-62.37134552],[-59.43912506,-62.44718361]],[[-58.99248505,-62.34777832],[-59.20889282,-62.28554535],[-58.81636047,-62.29801178],[-58.99248505,-62.34777832]],[[-57.62194824,-61.909729],[-58.98638916,-62.21444702],[-58.4002533,-61.93858337],[-57.62194824,-61.909729]],[[-55.09222412,-61.09804535],[-54.64639282,-61.09276581],[-55.4944458,-61.12662506],[-55.09222412,-61.09804535]],[[-54.04692078,-61.26943207],[-54.20056152,-61.2361145],[-54.03222656,-61.08802795],[-54.04692078,-61.26943207]],[[-44.42801666,-60.72332001],[-44.784729,-60.73442078],[-44.53134918,-60.67551422],[-44.42801666,-60.72332001]],[[-45.00527954,-60.72528076],[-45.07109833,-60.63109589],[-45.02579498,-60.64192963],[-45.00527954,-60.72528076]],[[-45.55078888,-60.54719543],[-45.14524841,-60.76611328],[-46.0235672,-60.61083984],[-45.55078888,-60.54719543]]]}, -{code:"BV", name:"Bouvet Island", lng:3.412, lat:-54.422, borders:[[[3.361389,-54.46275311],[3.366944,-54.39971148],[3.483611,-54.40221436],[3.361389,-54.46275311]]]}, -{code:"TF", name:"French Southern and Antarctic Lands", lng:69.117, lat:-49.302, borders:[[[69.81277657,-49.67801666],[69.76193428,-49.65885925],[69.79500008,-49.64720917],[69.81277657,-49.67801666]],[[68.78915596,-49.36165619],[68.6444416,-49.34358215],[68.80166817,-49.32833862],[68.78915596,-49.36165619]],[[69.60666084,-49.20774841],[69.53305244,-49.19664001],[69.67833138,-49.1530304],[69.60666084,-49.20774841]],[[69.26471138,-49.09107208],[69.2163868,-48.96722412],[69.36888313,-48.88637543],[69.26471138,-49.09107208]],[[69.15222359,-48.98801422],[69.22221565,-48.85610199],[69.24249458,-48.89247131],[69.15222359,-48.98801422]],[[69.49110603,-48.88278198],[69.40193367,-48.83443451],[69.51721382,-48.86023712],[69.49110603,-48.88278198]],[[69.00110054,-48.79747009],[69.06305122,-49.11971283],[69.10388374,-48.99580383],[69.21721077,-49.12554169],[69.62193489,-48.97805786],[69.28248787,-49.18634796],[69.58276558,-49.30443573],[70.32388496,-49.05078888],[70.56666756,-49.24498749],[69.77472115,-49.39415741],[70.25360298,-49.69108582],[69.64332771,-49.5013504],[68.79777718,-49.72190094],[69.00110054,-48.79747009]],[[69.90443611,-49.47718048],[69.82527351,-49.42578888],[69.84305,-49.45943451],[69.90443611,-49.47718048]],[[70.01193428,-49.57191467],[69.92109871,-49.51306152],[69.83554268,-49.50805664],[70.01193428,-49.57191467]],[[68.67555428,-48.64389038],[68.60611153,-48.63969421],[68.66861153,-48.62804413],[68.67555428,-48.64389038]],[[68.79777718,-48.61497688],[68.78721809,-48.57719421],[68.82470894,-48.57055664],[68.79777718,-48.61497688]],[[52.25444221,-46.45747375],[52.08833504,-46.41108704],[52.25721931,-46.37804413],[52.25444221,-46.45747375]],[[51.81944466,-46.45361328],[51.6519413,-46.37412262],[51.78000069,-46.34107208],[51.81944466,-46.45361328]],[[50.2722187,-46.13136292],[50.17694283,-46.0625],[50.27388954,-46.05078888],[50.2722187,-46.13136292]],[[77.52943611,-38.73773956],[77.49971199,-38.73110199],[77.50610542,-38.70388031],[77.52943611,-38.73773956]],[[77.55415535,-37.90276337],[77.48388863,-37.83525085],[77.55444527,-37.82245636],[77.55415535,-37.90276337]],[[42.75777626,-17.07499313],[42.72110939,-17.05555725],[42.75694466,-17.0597229],[42.75777626,-17.07499313]]]}, -{code:"HM", name:"Heard Island and McDonald Islands", lng:73.507, lat:-53.111, borders:[[[73.77388,-53.12503004],[73.474442,-53.19413766],[73.234436,-52.9877399],[73.77388,-53.12503004]]]}, -{code:"IO", name:"British Indian Ocean Territory", lng:72.416, lat:-7.335, borders:[[[72.487198,-7.3819415],[72.359146,-7.26527773],[72.448868,-7.23444233],[72.487198,-7.3819415]],[[71.348328,-6.65888291],[71.343323,-6.6566646],[71.365265,-6.65166247],[71.348328,-6.65888291]],[[71.266388,-6.39194477],[71.258606,-6.38222044],[71.266098,-6.36666377],[71.266388,-6.39194477]],[[71.347763,-6.20694302],[71.338593,-6.1958296],[71.360809,-6.17416064],[71.347763,-6.20694302]],[[71.782486,-5.44026957],[71.759995,-5.43138871],[71.766388,-5.42972166],[71.782486,-5.44026957]],[[72.216385,-5.36221953],[72.207764,-5.35444019],[72.208603,-5.34804996],[72.216385,-5.36221953]],[[72.232483,-5.31972044],[72.2211,-5.33554843],[72.228043,-5.31582746],[72.232483,-5.31972044]],[[71.742203,-5.29111098],[71.74054,-5.27111007],[71.748596,-5.26554904],[71.742203,-5.29111098]],[[71.869431,-5.25777071],[71.870255,-5.24972105],[71.882202,-5.25610366],[71.869431,-5.25777071]]]}, -{code:"CX", name:"Christmas Island", lng:105.704, lat:-10.444, borders:[[[105.701401,-10.51095688],[105.628998,-10.43730853],[105.736603,-10.38407796],[105.701401,-10.51095688]]]}, -{code:"UM", name:"United States Minor Outlying Islands", lng:-160.027, lat:-0.385, borders:[[[-160.02108733,-0.39805558],[-160.04855297,-0.38361093],[-160.01760839,-0.37472153],[-160.02108733,-0.39805558]],[[-176.45596338,0.215833],[-176.46820044,0.222222],[-176.45379684,0.226111],[-176.45596338,0.215833]],[[-176.63195816,0.793055],[-176.64434836,0.795555],[-176.64303581,0.812778],[-176.63195816,0.793055]],[[-169.52239987,16.728882],[-169.54376248,16.726379],[-169.53152442,16.732491],[-169.52239987,16.728882]],[[166.646362,19.279442],[166.607452,19.304996],[166.627594,19.324577],[166.646362,19.279442]],[[-177.33425917,28.194157],[-177.32162455,28.213608],[-177.31750477,28.200829],[-177.33425917,28.194157]],[[-177.38806105,28.186378],[-177.38977002,28.212769],[-177.35778831,28.219162],[-177.38806105,28.186378]]]}, -{code:"VU", name:"Vanuatu", lng:166.899, lat:-15.376, borders:[[[169.846069,-20.25220105],[169.745514,-20.14944416],[169.886658,-20.17053997],[169.846069,-20.25220105]],[[170.217468,-19.55942197],[170.205231,-19.52498579],[170.232452,-19.52416984],[170.217468,-19.55942197]],[[169.498291,-19.54499434],[169.349701,-19.63692075],[169.232452,-19.35025401],[169.498291,-19.54499434]],[[169.594971,-19.27359769],[169.578583,-19.2624929],[169.594971,-19.23138055],[169.594971,-19.27359769]],[[169.305237,-18.97887767],[168.989136,-18.88082471],[169.018585,-18.63996926],[169.305237,-18.97887767]],[[168.574677,-17.69275256],[168.148041,-17.71970361],[168.311096,-17.53138366],[168.574677,-17.69275256]],[[168.399139,-16.78277176],[168.168579,-16.80525567],[168.148315,-16.58054729],[168.399139,-16.78277176]],[[168.231079,-16.51608304],[168.201355,-16.50054163],[168.242462,-16.42914188],[168.231079,-16.51608304]],[[168.21524,-16.17415964],[168.304138,-16.33942053],[167.917755,-16.26025733],[168.21524,-16.17415964]],[[167.416656,-16.11000022],[167.772491,-16.53497681],[167.41748,-16.53219961],[167.177765,-15.89915658],[167.416656,-16.11000022]],[[167.209137,-15.7555524],[167.077454,-15.6402701],[167.227173,-15.63776421],[167.209137,-15.7555524]],[[167.258606,-15.58804668],[167.239136,-15.574436],[167.276917,-15.54609686],[167.258606,-15.58804668]],[[167.202454,-15.60859886],[167.110229,-15.58999268],[167.16275,-15.53582227],[167.190521,-15.52915209],[167.21051,-15.58027498],[167.202454,-15.60859886]],[[168.210785,-15.99805401],[168.15332,-15.49221404],[168.266663,-15.87082144],[168.210785,-15.99805401]],[[167.855804,-15.48581717],[167.668304,-15.44693012],[168.002197,-15.29000083],[167.855804,-15.48581717]],[[167.175262,-15.2666592],[167.163605,-15.2541633],[167.179413,-15.25665292],[167.175262,-15.2666592]],[[167.14444,-14.97137628],[167.096344,-14.93248923],[167.151093,-14.9577656],[167.14444,-14.97137628]],[[168.169128,-15.39582249],[168.105804,-14.91999634],[168.190247,-15.21472136],[168.169128,-15.39582249]],[[166.802765,-15.15748618],[167.058868,-14.94499939],[167.237717,-15.52424969],[167.151154,-15.52033693],[167.071625,-15.59805096],[166.902771,-15.5827656],[166.814697,-15.66304058],[166.761932,-15.64277498],[166.592743,-14.62442785],[166.802765,-15.15748618]],[[167.527466,-14.32665431],[167.413605,-14.17888483],[167.588287,-14.17277354],[167.527466,-14.32665431]],[[167.479126,-13.94833348],[167.476624,-13.70666308],[167.577759,-13.84720649],[167.479126,-13.94833348]],[[167.705536,-13.67498984],[167.623566,-13.69193662],[167.687744,-13.62166591],[167.705536,-13.67498984]],[[167.347198,-13.56138222],[167.293304,-13.52637489],[167.322205,-13.48693295],[167.347198,-13.56138222]],[[166.67746,-13.45248452],[166.650818,-13.40971975],[166.694122,-13.41583104],[166.67746,-13.45248452]],[[166.631622,-13.38138361],[166.596069,-13.3341537],[166.641357,-13.35693945],[166.631622,-13.38138361]],[[166.620239,-13.27138139],[166.587463,-13.22305096],[166.638306,-13.22166286],[166.620239,-13.27138139]],[[166.559692,-13.18638422],[166.521362,-13.07054302],[166.564972,-13.09193967],[166.559692,-13.18638422]]]}, -{code:"NG", name:"Nigeria", lng:8.105, lat:9.594, borders:[[[7.466389,4.445277],[7.335833,4.443055],[7.411944,4.488055],[7.466389,4.445277]],[[7.20361,4.380555],[7.22611,4.52],[7.316667,4.4725],[7.20361,4.380555]],[[5.874722,13.749443],[6.423055,13.605276],[6.933332,12.997221],[7.815,13.352777],[9.634932,12.802435],[10.724165,13.386389],[12.459166,13.066111],[13.62512,13.718338],[14.07472,13.081665],[14.174444,12.396666],[14.645277,12.188332],[14.646387,11.575832],[13.80722,11.055832],[12.796944,8.769722],[12.253887,8.408054],[11.864166,7.084722],[11.340277,6.440833],[10.615,7.06861],[9.795555,6.801666],[8.865276,5.841944],[8.591738,4.810932],[7.676944,4.496388],[7.071666,4.753888],[7.073055,4.434722],[6.962222,4.725277],[7.005555,4.369444],[6.768055,4.774722],[6.848611,4.348332],[6.727221,4.605],[6.694166,4.33],[6.104166,4.272778],[5.451944,4.923055],[5.345277,5.33],[5.639722,5.536111],[5.257222,5.435555],[5.501111,5.620555],[5.175278,5.575555],[4.525833,6.304999],[3.388611,6.443333],[3.807222,6.612778],[2.719606,6.365505],[2.789444,9.043888],[3.095,9.090555],[3.855,10.584999],[3.604459,11.693274],[4.1425,13.476944],[5.874722,13.749443]]]}, -{code:"NL", name:"Netherlands", lng:5.389, lat:52.077, borders:[[[3.76416588,51.34527779],[3.37086678,51.3738575],[4.23889732,51.35042763],[3.76416588,51.34527779]],[[5.76388741,52.41527748],[5.57305717,52.36805153],[5.53416634,52.28333473],[5.42861366,52.26416206],[5.13555717,52.38027382],[5.64361382,52.60110664],[5.8555584,52.54416847],[5.8555584,52.49249458],[5.76388741,52.41527748]],[[5.42333412,52.63638496],[5.05179405,52.39411736],[5.03949547,52.63365364],[5.42333412,52.63638496]],[[4.76472282,52.99027443],[4.71388817,53.05610847],[4.88333321,53.18416786],[4.76472282,52.99027443]],[[4.95722389,53.23777962],[4.87999916,53.2144413],[5.10639,53.30333138],[4.95722389,53.23777962]],[[6.87166786,53.41610909],[7.20836449,53.24280739],[7.05166817,52.64361],[6.68889046,52.54916573],[7.06555748,52.38582802],[6.82888985,51.96555519],[5.96249962,51.80777931],[6.22222328,51.46582985],[5.8647213,51.04610634],[6.01180077,50.75727272],[5.6408329,50.83972359],[5.84917259,51.15638161],[5.04139137,51.48666573],[4.25237083,51.37514687],[3.44083214,51.53582954],[4.28611183,51.44861031],[3.68750191,51.7097187],[4.16775322,51.68557167],[3.86555672,51.81499672],[4.5844326,52.46150398],[5.4244442,52.24860573],[5.53360939,52.26722145],[5.62472343,52.35416603],[5.77416801,52.40527534],[5.87805748,52.50943947],[5.85500145,52.60691261],[5.59944344,52.65860939],[5.59916878,52.75777626],[5.71835136,52.83802223],[5.36861229,52.87777901],[5.42055702,52.9644413],[5.36416817,53.07027626],[5.10027885,52.94805336],[5.30416679,52.7069416],[5.03333473,52.63416481],[5.02833366,52.37583351],[4.57999992,52.47166634],[4.7341671,52.95555305],[6.87166786,53.41610909]],[[5.21305656,53.35000038],[5.16889,53.37388802],[5.58194542,53.4477787],[5.21305656,53.35000038]],[[5.69916725,53.46277809],[5.95611382,53.46277809],[5.63305473,53.44166756],[5.69916725,53.46277809]],[[6.13500023,53.45360756],[6.14888954,53.49749947],[6.34111214,53.50277901],[6.13500023,53.45360756]]]}, -{code:"NO", name:"Norway", lng:8.740, lat:61.152, borders:[[[8.74361229,58.40972328],[8.72694588,58.41277504],[8.73750114,58.43499947],[8.76138878,58.43666267],[8.76138878,58.42138863],[8.74361229,58.40972328]],[[5.96194649,58.97222328],[5.9450016,58.97749519],[5.9588871,58.98388863],[5.96194649,58.97222328]],[[5.72638893,59.07805061],[5.54833412,59.13055611],[5.68889046,59.12916756],[5.72638893,59.07805061]],[[5.95277977,59.22833443],[5.90972328,59.2741642],[6.05916786,59.26082802],[5.95277977,59.22833443]],[[5.28777885,59.21888924],[5.15527916,59.14694405],[5.18361092,59.41194344],[5.28777885,59.21888924]],[[5.26333427,59.79860878],[5.14888954,59.58111],[5.10750008,59.86444283],[5.26333427,59.79860878]],[[5.41305733,59.75166512],[5.27638817,59.96694374],[5.46833229,59.88638496],[5.41305733,59.75166512]],[[5.52499962,59.89332771],[5.36083412,59.99221992],[5.65805626,60.07527351],[5.52499962,59.89332771]],[[5.26805687,60.00499916],[5.1680584,60.03138924],[5.17277718,60.12166786],[5.26805687,60.00499916]],[[5.95472145,60.0894413],[5.92416573,60.14527321],[6.01694679,60.14666176],[5.95472145,60.0894413]],[[5.21694374,60.24194527],[5.19972038,60.25110817],[5.23333549,60.25471687],[5.21694374,60.24194527]],[[5.1119442,60.18583107],[4.94694328,60.24916267],[4.94249916,60.42749977],[5.1119442,60.18583107]],[[5.19527626,60.40888405],[5.00083351,60.53110695],[5.17944527,60.48277473],[5.19527626,60.40888405]],[[5.18527794,60.50610542],[4.92694664,60.60527229],[5.12166786,60.57805061],[5.18527794,60.50610542]],[[5.55000114,60.43139076],[5.36000252,60.52388954],[5.67583275,60.68305397],[5.55000114,60.43139076]],[[5.15833473,60.58166695],[4.8544445,60.73250008],[4.98000145,60.71472359],[5.15833473,60.58166695]],[[4.69639015,60.98722267],[4.63083458,61.00666237],[4.62805748,61.06443977],[4.69639015,60.98722267]],[[4.98638725,61.10444069],[4.80472374,61.04444313],[4.78805733,61.1463871],[4.98638725,61.10444069]],[[4.93416786,61.7741642],[4.80416679,61.84055519],[5.22194481,61.84555244],[4.93416786,61.7741642]],[[5.06805611,61.92305183],[5.00972176,62.01361275],[5.12722206,61.99249458],[5.06805611,61.92305183]],[[5.64777946,62.18749428],[5.50610924,62.22444344],[5.80805779,62.27305031],[5.64777946,62.18749428]],[[5.84055519,62.23999977],[5.8049984,62.36694527],[5.97750282,62.41111183],[5.84055519,62.23999977]],[[6.25388908,62.39166451],[6.02305412,62.43555641],[6.33361244,62.41333199],[6.25388908,62.39166451]],[[6.73666573,62.66722298],[6.64972115,62.68139076],[6.91944313,62.70916176],[6.73666573,62.66722298]],[[6.88638878,62.7769413],[6.77583504,62.84555244],[6.94055748,62.84444618],[6.88638878,62.7769413]],[[7.54833412,62.94832802],[7.36555672,62.99638557],[7.71194649,63.00249672],[7.54833412,62.94832802]],[[7.80972481,63.0233326],[7.67944527,63.05610847],[7.91527748,63.07916451],[7.80972481,63.0233326]],[[8.06027794,63.14166451],[7.92638969,63.17194557],[8.18638802,63.15305519],[8.06027794,63.14166451]],[[8.39111137,63.15916634],[8.26972389,63.26610756],[8.43749809,63.28388405],[8.57611275,63.18943977],[8.39111137,63.15916634]],[[8.51194572,63.31916237],[8.43111229,63.3319416],[8.67583275,63.34666634],[8.51194572,63.31916237]],[[8.16222191,63.36138344],[7.77833366,63.40583229],[8.09166527,63.46666145],[8.16222191,63.36138344]],[[8.49416542,63.42833138],[8.28000069,63.46472359],[9.17638969,63.56472206],[8.49416542,63.42833138]],[[8.80833244,63.81027412],[8.79444313,63.69749641],[8.26999855,63.67888832],[8.80833244,63.81027412]],[[11.45361137,64.51416206],[11.17555428,64.50694466],[11.03861046,64.62887764],[11.45361137,64.51416206]],[[11.35138893,64.6499958],[11.31083488,64.59666634],[11.17611122,64.6444416],[11.35138893,64.6499958]],[[11.26166725,64.88472176],[10.82499886,64.84498787],[11.10611153,64.95027351],[11.26166725,64.88472176]],[[11.11083412,64.96582222],[10.73139,64.86027718],[10.77777672,64.91888618],[11.11083412,64.96582222]],[[11.63666725,65.06527901],[11.53138924,65.06082344],[11.77277946,65.11360359],[11.63666725,65.06527901]],[[12.15638924,65.05137825],[11.98166847,65.07638741],[12.18361092,65.20833015],[12.31527901,65.10998726],[12.28500175,65.08444405],[12.15638924,65.05137825]],[[12.07527733,65.21138191],[12.25805473,65.57611275],[12.50277901,65.39193916],[12.07527733,65.21138191]],[[11.97416496,65.62693977],[11.75861168,65.61694527],[11.89444542,65.70443916],[11.97416496,65.62693977]],[[12.54250145,65.89694405],[12.41499901,65.89360237],[12.57388878,66.01054573],[12.90361214,66.00860786],[12.54250145,65.89694405]],[[12.35249901,66.02249336],[12.56333351,66.21777534],[12.65722084,66.10472298],[12.35249901,66.02249336]],[[12.7966671,66.21443367],[12.71583366,66.24749947],[12.87083244,66.27749825],[12.7966671,66.21443367]],[[12.98666573,66.22833443],[12.93083382,66.2263813],[13.15833473,66.27749825],[12.98666573,66.22833443]],[[14.25777626,67.13304329],[14.19194603,66.99943733],[13.99110985,67.07859993],[14.25777626,67.13304329]],[[14.25305367,67.35859871],[14.21666527,67.35832405],[14.37499809,67.4222126],[14.25305367,67.35859871]],[[15.20222282,67.90027046],[14.93166542,67.92387581],[15.30360985,67.92027473],[15.20222282,67.90027046]],[[15.90333366,67.97888374],[15.49888802,67.98777962],[15.85111046,68.01361275],[15.90333366,67.97888374]],[[12.84194374,67.80861092],[13.15583229,68.08110237],[13.13444328,67.9525013],[12.84194374,67.80861092]],[[13.43805504,68.11277962],[13.16305733,68.01138496],[13.29916573,68.14972115],[13.43805504,68.11277962]],[[13.96833229,68.23832893],[14.13583183,68.23944283],[13.44972038,68.06749153],[13.96833229,68.23832893]],[[14.87055397,68.21165657],[14.82611275,68.25444221],[14.94055367,68.26805305],[14.87055397,68.21165657]],[[14.20361137,68.23916817],[14.0494442,68.30333138],[14.21416664,68.30110359],[14.20361137,68.23916817]],[[13.97333336,68.25332832],[13.88333321,68.30221748],[13.99055672,68.30999947],[13.97333336,68.25332832]],[[15.02638817,68.35499763],[14.19972038,68.15222359],[15.16889,68.45054817],[15.02638817,68.35499763]],[[16.40555382,68.4111042],[16.09444618,68.39665413],[16.32694435,68.53360176],[16.40555382,68.4111042]],[[17.11638832,68.75248909],[16.81305504,68.72833443],[17.00055504,68.85443306],[17.11638832,68.75248909]],[[17.24166679,68.78860664],[17.08361244,68.91026497],[17.43777657,68.8652668],[17.24166679,68.78860664]],[[14.95444298,68.87277412],[14.83916664,68.88194466],[14.8852787,68.933321],[14.95444298,68.87277412]],[[15.98805428,68.75193977],[15.73944283,68.5261097],[16.17888832,68.85165596],[16.56500053,68.65193367],[14.98666573,68.24749947],[15.7136097,68.69861031],[15.45166588,68.76220894],[15.63611031,68.94665718],[15.98805428,68.75193977]],[[16.53722191,68.87971687],[16.26111031,68.96666145],[16.6016674,68.94554329],[16.53722191,68.87971687]],[[15.38277626,68.84527779],[15.05916786,68.57249641],[14.37111092,68.68361092],[15.14861107,68.81221199],[15.08777809,69.00804329],[15.38277626,68.84527779]],[[17.4169445,68.995821],[17.35277748,69.02415657],[17.56138802,69.09498787],[17.4169445,68.995821]],[[15.52250099,68.90609932],[15.56027794,69.09471321],[16.14805412,69.28637886],[15.52250099,68.90609932]],[[17.63661003,69.51604652],[18.07416725,69.43083382],[18.00361061,69.19027901],[16.77527809,69.06443977],[17.17388725,69.19583321],[16.93083382,69.39248848],[17.63661003,69.51604652]],[[30.15555382,69.78166389],[30.11055565,69.78721809],[30.12611198,69.79748726],[30.15555382,69.78166389]],[[18.8900013,69.69194221],[17.99694633,69.58833504],[18.75139046,69.68277168],[18.69305611,69.88443184],[18.8900013,69.69194221]],[[20.68027687,69.80861092],[20.55639076,69.85110664],[20.73916817,69.90527534],[20.68027687,69.80861092]],[[29.82666588,69.75694466],[29.84194374,69.91026497],[30.04805565,69.8275013],[29.82666588,69.75694466]],[[21.73027611,69.93110847],[21.66861153,69.94194221],[21.71722221,69.94970894],[21.73027611,69.93110847]],[[19.56722069,69.85165596],[19.45944405,69.84250069],[19.89777946,69.97221565],[19.56722069,69.85165596]],[[19.95916557,70.00555611],[19.89916801,70.01609993],[19.99611092,70.01277351],[19.95916557,70.00555611]],[[19.30055428,70.0261097],[19.69194603,69.99472237],[18.72110939,69.93416023],[19.30055428,70.0261097]],[[20.89256859,70.03081703],[21.10249901,70.00471687],[20.75777626,69.98999214],[20.89256859,70.03081703]],[[21.00083351,70.01971626],[20.95194435,70.02583504],[21.04916573,70.04971504],[21.00083351,70.01971626]],[[18.78500175,70.11137581],[19.00277901,70.08415413],[18.68444633,69.99666023],[18.78500175,70.11137581]],[[20.9197216,70.07943916],[20.81472206,70.11610603],[20.86138725,70.14915657],[20.9197216,70.07943916]],[[19.60750008,70.10194588],[19.34972191,70.13138008],[19.43139076,70.1777668],[19.60750008,70.10194588]],[[20.83194542,70.19388008],[20.78388786,70.05638313],[20.3852787,70.09887886],[20.83194542,70.19388008]],[[20.11277962,70.10472298],[19.76999855,70.06527901],[19.53611183,70.24832344],[20.11277962,70.10472298]],[[19.18527794,70.12249947],[19.03360939,70.1611042],[19.23361015,70.25444221],[19.18527794,70.12249947]],[[22.83472252,70.33221626],[23.02277946,70.25943184],[22.36861229,70.33444405],[22.83472252,70.33221626]],[[21.77277946,70.26666451],[21.6977787,70.38194466],[21.84139061,70.35026741],[21.77277946,70.26666451]],[[23.59583473,70.57805061],[23.23055458,70.27832222],[22.85111046,70.40582466],[23.59583473,70.57805061]],[[23.87111092,70.51220894],[23.63416481,70.69638252],[24.12583351,70.6152668],[23.87111092,70.51220894]],[[23.45166588,70.78360176],[22.78416634,70.51971626],[21.94972038,70.64610481],[23.45166588,70.78360176]],[[24.06194496,70.90887642],[23.88083458,70.99360847],[24.24389076,70.95193672],[24.06194496,70.90887642]],[[24.7994442,71.02388191],[24.63944435,71.06082344],[24.8536129,71.08998299],[24.7994442,71.02388191]],[[25.82805443,71.0986042],[26.21972084,71.03360176],[25.28611183,71.02083015],[25.82805443,71.0986042]],[[5.33694649,61.59277534],[5.27683449,61.58799934],[5.34533501,61.58633232],[5.33694649,61.59277534],[4.93805504,61.67638588],[6.76361275,61.86805153],[5.14805412,61.89222145],[5.40361214,62.01610756],[5.15027809,62.21193886],[6.3572216,62.05527687],[5.9180584,62.21582985],[6.30666542,62.37166786],[6.53805733,62.10472298],[6.38833427,62.36972237],[6.87611198,62.41499519],[7.0430584,62.08638954],[7.41555595,62.23250008],[6.78138924,62.47833443],[6.25722313,62.44888496],[6.64983559,62.49838448],[6.24694633,62.57471657],[8.14527702,62.68999672],[6.9588871,62.72249794],[7.0363903,62.96750069],[8.54833412,62.6538868],[7.87916756,63.01055336],[8.53083229,62.8413868],[8.15916634,63.12027931],[8.93833351,63.20666695],[8.47777748,63.29361153],[8.76361275,63.34527779],[8.65277672,63.40916634],[9.00499916,63.46750069],[9.42777824,63.37693977],[9.14972115,63.48416328],[9.64750099,63.62388802],[10.25666618,63.26111031],[10.04722404,63.40610695],[10.91027641,63.45111275],[10.65888786,63.54999733],[11.45583153,63.78721809],[11.09055519,63.87832832],[11.49277687,64.0194416],[11.31888771,64.03221321],[11.35833168,64.11055183],[11.30583382,64.11638069],[11.18027687,64.00804329],[10.57416725,63.80499458],[10.90416527,63.89416695],[11.07722282,63.8374958],[10.94194603,63.73805428],[10.04777718,63.49611092],[9.7891674,63.66250038],[10.09833336,63.76194191],[9.54389,63.76361275],[10.18972206,63.93055153],[9.9822216,63.99055672],[10.49529076,64.42381477],[10.97222328,64.6013813],[11.22166634,64.31610298],[11.72805595,64.57971382],[11.43833351,64.71110725],[12.22444344,64.93721199],[11.29722404,64.88360786],[11.97500038,65.06582832],[12.01944542,65.0261097],[12.0474987,65.05583382],[12.14888954,65.03915596],[12.62472343,65.13360786],[12.93972206,65.308321],[12.24888802,65.22860909],[12.6380558,65.41888618],[12.36083412,65.64776802],[12.78861046,65.63638496],[12.66750145,65.91693306],[13.17500114,65.84915352],[13.12194633,65.94027901],[12.93194389,65.97499275],[12.95944405,66.04222298],[12.67388725,66.06694221],[14.14666557,66.32165718],[13.02722359,66.1860981],[13.5363903,66.30360603],[12.96999931,66.51832771],[13.72555733,66.60194588],[13.22805595,66.7124958],[13.99083519,66.78360176],[13.54694557,66.92666817],[15.7397213,67.17248726],[14.36166573,67.23388863],[15.03583336,67.57054329],[15.6400013,67.26638985],[15.5411129,67.47694588],[15.89916801,67.55888557],[14.75805473,67.80526924],[15.87111092,67.92332649],[15.96111107,68.01304817],[15.28305626,68.03555489],[15.97222328,68.24554634],[16.21722221,67.88804817],[16.49583244,67.79416084],[16.20749855,68.00166512],[16.71527672,68.06666756],[16.10333443,68.27693367],[16.80583382,68.13138008],[16.31722069,68.36694527],[17.35472298,68.17387581],[17.20083427,68.36694527],[17.55277824,68.52388191],[16.45944405,68.50804329],[17.68027687,68.65443611],[17.23611259,68.75471687],[17.79250145,68.75694466],[17.42583275,68.90500069],[18.15222359,69.15222359],[18.25694466,69.48637581],[19.44055367,69.22583199],[18.94416618,69.61305428],[19.75889015,69.81027412],[19.67916679,69.42944527],[20.30416679,69.96832466],[19.94694328,69.25610542],[20.85305595,69.48916817],[20.48139,69.63888741],[21.30722237,70.01971626],[22.1016674,69.74083138],[21.79722404,70.03360176],[22.09666634,70.11332893],[21.30000114,70.24693489],[22.9505558,70.20555305],[22.28777885,70.0388813],[23.31194496,69.94082832],[23.66000175,70.42000008],[24.72916603,70.62193489],[24.24555397,70.77722359],[24.59194374,70.96304512],[25.90777779,70.88665962],[25.07361031,70.50000191],[25.27305412,70.39888191],[24.94249916,70.08777046],[25.23472404,70.08972359],[26.57027626,70.93889046],[26.50499916,70.36305428],[27.02944374,70.47415352],[27.56555367,70.80471992],[27.13611031,70.95833015],[27.65166664,71.11305428],[28.55083275,70.96832466],[27.64750099,70.60527229],[28.29500008,70.71277046],[27.8516674,70.47888374],[28.33555412,70.50555611],[28.03888893,70.06193733],[28.52749825,70.72665596],[29.03611183,70.87416267],[31.07805443,70.28915596],[28.61250114,70.10777473],[29.6716671,69.96750069],[29.36555672,69.85527229],[29.73750114,69.90527534],[29.48666573,69.65555],[30.85484123,69.79231453],[30.91000175,69.54887581],[30.10333443,69.66305733],[28.95734215,69.05162239],[28.78416634,69.16055489],[29.17611122,69.63527107],[28.16583443,69.91221809],[26.44999886,69.92721748],[25.94583321,69.67332649],[25.76111031,68.98916817],[24.93491936,68.58081245],[23.97638893,68.83249092],[22.3983326,68.71110725],[21.32083321,69.32611275],[20.58093071,69.06030464],[20.09694481,69.04222298],[20.35027885,68.78665352],[19.93777657,68.3374958],[18.09083366,68.50776863],[17.88416481,67.94554329],[16.72694588,67.89915657],[16.0858326,67.41165352],[16.35388756,67.0177784],[15.36277962,66.47999763],[15.46805382,66.28387642],[14.50499916,66.13249397],[14.49305534,65.31360054],[13.66250038,64.58276558],[14.11638832,64.47055244],[13.98833275,64.01805305],[12.93805504,64.05333138],[12.13944435,63.58416176],[11.93638802,63.2722187],[12.29583168,62.26166725],[12.12444496,61.72860909],[12.85611153,61.36249733],[12.21000099,61.00249672],[12.59444618,60.51693916],[12.49416542,60.11110878],[11.81596184,59.84610176],[11.75111198,59.0902729],[11.4291935,58.98764229],[10.7974987,59.18638802],[10.55777931,59.72860909],[10.74833488,59.88694191],[10.52749825,59.87527657],[10.55805397,59.54305458],[10.22222328,59.72749519],[10.51638985,59.31083107],[10.23111153,59.03860664],[9.54083443,59.11471748],[9.69305611,58.98305702],[9.40944481,58.8413868],[9.19111061,58.65833473],[8.99583244,58.59832954],[8.71264458,58.4419384],[8.69194603,58.37722206],[8.5102787,58.27027321],[8.24805641,58.20194435],[8.21111107,58.11555672],[6.59777641,58.07027626],[6.76722145,58.23832893],[5.45777702,58.74444008],[5.55277824,59.03277779],[6.16861153,58.83222389],[6.62333488,59.05166817],[5.86638832,59.07222176],[6.46888924,59.55527687],[5.51111031,59.2749958],[5.17805672,59.50833321],[6.30639076,59.84333229],[5.69833565,59.83277321],[6.20472145,60.29555702],[6.64055443,60.4102726],[6.52111244,60.07666206],[7.10805702,60.49416542],[6.22083473,60.41250038],[5.74722481,59.98666573],[5.73444557,60.38694191],[5.41111183,60.12971687],[5.14222145,60.34638405],[5.7025013,60.45443916],[5.70083427,60.69416237],[5.26138878,60.55305672],[4.92888832,60.79888344],[5.43361092,60.62722206],[5.23638725,60.77388954],[5.53360939,60.87249947],[5.00777626,61.03721809],[5.41944313,61.02555275],[5.92083549,61.12305641],[6.37222481,61.06194496],[6.59055519,61.15138435],[7.11388969,60.86027718],[7.00083351,61.09610939],[7.42861366,61.18139076],[7.30388832,61.29444313],[7.57444572,61.47944069],[7.30916786,61.36249733],[7.27305412,61.2788868],[7.35389137,61.18999672],[7.27805519,61.15860939],[6.95555687,61.10999489],[6.56416512,61.21833229],[6.70361137,61.40138435],[6.52040672,61.24620247],[6.49833488,61.13027382],[5.74916649,61.1527729],[5.39722252,61.06860542],[4.9533329,61.25860786],[5.63416862,61.36055183],[4.94888878,61.41277504],[5.8049984,61.45277596],[5.13083458,61.52666664],[5.27388954,61.5577755],[5.14861107,61.59305],[5.33694649,61.59277534]],[[5.77833366,58.94749641],[5.75499916,58.95638466],[5.76083565,58.94583321],[5.77833366,58.94749641]]]}, -{code:"NP", name:"Nepal", lng:83.939, lat:28.253, borders:[[[82.066399,27.914154],[80.055817,28.836109],[80.376923,29.748604],[81.02536,30.204353],[81.223602,30.010277],[81.421097,30.385273],[82.10054,30.34222],[83.552765,29.185829],[84.119141,29.259998],[84.481094,28.73666],[85.189972,28.603329],[85.106644,28.309441],[85.721375,28.279163],[86.014435,27.882774],[86.183594,28.163883],[86.444977,27.908051],[86.686371,28.112217],[87.192749,27.823051],[88.142792,27.866055],[88.014709,26.364719],[85.855545,26.570274],[84.147217,27.511387],[83.291367,27.337776],[82.066399,27.914154]]]}, -{code:"NR", name:"Nauru", lng:166.930, lat:-0.522, borders:[[[166.929138,-0.55222155],[166.930542,-0.49333273],[166.958588,-0.50638833],[166.929138,-0.55222155]]]}, -{code:"SR", name:"Suriname", lng:-55.912, lat:4.127, borders:[[[-55.12795241,5.822173],[-54.02999156,5.821111],[-54.1669163,5.346944],[-54.47745505,4.747777],[-54.00108327,3.448333],[-54.60373653,2.329195],[-55.96580463,2.532777],[-55.90412157,1.893055],[-56.47058914,1.944499],[-57.3013912,3.3775],[-57.64219683,3.356389],[-58.04719539,4.008333],[-57.92333969,4.821944],[-57.32719395,5.026111],[-57.24850428,5.486111],[-56.97250332,5.996944],[-55.89951327,5.671908],[-55.83633449,5.956666],[-55.12795241,5.822173]]]}, -{code:"NI", name:"Nicaragua", lng:-85.034, lat:12.840, borders:[[[-83.71241776,11.868332],[-83.73191819,11.903332],[-83.71438601,11.988054],[-83.71241776,11.868332]],[[-83.04876725,12.145555],[-83.05748023,12.183611],[-83.02133161,12.184166],[-83.04876725,12.145555]],[[-82.96470636,12.286943],[-82.98321573,12.313055],[-82.97135902,12.312498],[-82.96470636,12.286943]],[[-82.75074791,14.353888],[-82.78973377,14.374998],[-82.73355109,14.418888],[-82.75074791,14.353888]],[[-83.23963912,14.982498],[-83.13182087,14.992979],[-83.42137144,14.80611],[-83.18695037,14.323889],[-83.55105585,13.450554],[-83.4826661,12.403889],[-83.6044163,12.819443],[-83.83165008,11.874722],[-83.64570591,10.924847],[-83.91549669,10.708611],[-85.08775311,11.009998],[-85.69238263,11.076061],[-87.69250477,12.912222],[-87.3013912,12.986599],[-86.69488558,13.296944],[-86.76298498,13.751621],[-86.01577721,14.065832],[-85.73228461,13.829235],[-84.90655542,14.808611],[-84.4826661,14.617777],[-83.23963912,14.982498]]]}, -{code:"NZ", name:"New Zealand", lng:172.235, lat:-42.634, borders:[[[169.185516,-52.57691963],[169.000824,-52.5071793],[169.205231,-52.44136846],[169.185516,-52.57691963]],[[166.096619,-50.92301134],[165.923584,-50.85637655],[166.22052,-50.88745838],[166.096619,-50.92301134]],[[165.995544,-50.60363739],[165.969421,-50.60495794],[166.003601,-50.59494041],[165.995544,-50.60363739]],[[166.250824,-50.82691963],[165.886932,-50.80438268],[166.199402,-50.52722136],[166.250824,-50.82691963]],[[166.321899,-50.50690498],[166.284973,-50.50527908],[166.331909,-50.49465988],[166.321899,-50.50690498]],[[178.816376,-49.72386891],[178.71524,-49.6852114],[178.814972,-49.61361689],[178.816376,-49.72386891]],[[166.632172,-48.04082504],[166.563873,-48.03941342],[166.622192,-47.99553687],[166.632172,-48.04082504]],[[179.076904,-47.68055002],[179.049133,-47.67551422],[179.069702,-47.66163622],[179.076904,-47.68055002]],[[167.434967,-47.24858138],[167.426636,-47.22245029],[167.486908,-47.21411869],[167.434967,-47.24858138]],[[167.685791,-46.79665375],[167.663605,-46.7599565],[167.718842,-46.77133961],[167.685791,-46.79665375]],[[168.191925,-46.90521284],[167.519135,-47.27416984],[167.775818,-46.7002337],[168.191925,-46.90521284]],[[166.71637,-45.7416684],[166.504974,-45.71913146],[166.710785,-45.61524979],[166.71637,-45.7416684]],[[167.009979,-45.31026443],[166.891357,-45.25026732],[166.962189,-45.15331263],[167.009979,-45.31026443]],[[-176.16198775,-44.32469206],[-176.23583969,-44.23468739],[-176.11563131,-44.26327533],[-176.16198775,-44.32469206]],[[-176.45205688,-43.736107],[-176.6053775,-44.11911025],[-176.53414938,-43.87026255],[-176.84799192,-43.81216465],[-176.45205688,-43.736107]],[[174.399414,-41.11579142],[174.37439,-41.20301089],[174.193298,-41.23246782],[174.344421,-41.18302887],[174.371887,-41.14856718],[174.322754,-41.13245361],[174.399414,-41.11579142]],[[173.805817,-40.92774979],[173.823303,-40.76245838],[173.963867,-40.71052554],[173.805817,-40.92774979]],[[172.861359,-40.50778196],[172.656921,-40.65331263],[173.013306,-40.79665375],[173.10553,-41.31331595],[174.323853,-41.00331883],[174.026642,-41.236114],[174.20636,-41.26943239],[174.326904,-41.22272461],[174.044434,-41.44245173],[174.289154,-41.74830607],[172.760803,-43.23910548],[173.091644,-43.85637655],[172.424988,-43.73355109],[171.293579,-44.34358182],[170.554413,-45.88800801],[170.783051,-45.87831883],[169.008026,-46.6808013],[166.484406,-46.01441963],[166.987183,-45.70970959],[166.775818,-45.66272749],[167.041351,-45.50135058],[166.704407,-45.57441675],[166.821625,-45.32055628],[167.211914,-45.47522749],[166.996918,-45.14578998],[167.507202,-45.00135058],[168.374969,-44.03778052],[170.794128,-42.90134438],[172.064972,-41.40357994],[172.108856,-40.88549813],[172.861359,-40.50778196]],[[177.001373,-37.87053687],[176.964691,-37.86361689],[176.97995,-37.84805296],[177.001373,-37.87053687]],[[176.438568,-37.65026111],[176.44693,-37.60469062],[176.459412,-37.6227114],[176.438568,-37.65026111]],[[175.166077,-36.83383961],[175.002472,-36.79273225],[175.193848,-36.72746305],[175.166077,-36.83383961]],[[175.827179,-36.63082871],[175.770264,-36.58078809],[175.80246,-36.57611068],[175.827179,-36.63082871]],[[174.863861,-36.45970959],[174.869965,-36.388878],[174.907196,-36.45165231],[174.863861,-36.45970959]],[[175.149414,-36.21330274],[175.079681,-36.20077533],[175.121887,-36.17050945],[175.149414,-36.21330274]],[[175.544708,-36.34771761],[175.358856,-36.2294233],[175.371887,-36.07055628],[175.544708,-36.34771761]],[[173.038879,-34.43689733],[173.269135,-35.01970671],[173.450806,-34.80776255],[174.319977,-35.23274214],[174.854401,-36.84771761],[175.579132,-37.2444456],[175.353577,-36.48192619],[175.84079,-36.75412778],[175.994415,-37.638878],[177.159424,-38.01327533],[178.018005,-37.55079254],[178.565521,-37.71330274],[177.909973,-39.25690498],[177.054962,-39.20442951],[176.834137,-40.18161025],[175.323029,-41.61443284],[174.591919,-41.27857994],[175.127747,-40.71357006],[175.155548,-40.09581739],[173.751923,-39.28859747],[174.594421,-38.81581883],[174.974976,-37.75],[174.549713,-37.0736008],[174.887482,-37.05912013],[174.502472,-37.03744517],[174.187744,-36.49688745],[174.453033,-36.65107706],[174.268585,-36.34216321],[174.505249,-36.23132352],[173.913879,-35.86965988],[174.080811,-36.40940866],[173.398865,-35.57387511],[173.655548,-35.31331595],[173.380524,-35.52803831],[173.087463,-35.21134149],[172.722473,-34.49526255],[173.038879,-34.43689733]],[[172.157196,-34.17382829],[172.133331,-34.15331263],[172.18692,-34.15243564],[172.157196,-34.17382829]],[[-178.60516322,-30.58111545],[-178.61300622,-30.58721548],[-178.61233552,-30.57444726],[-178.60516322,-30.58111545]],[[-177.84600867,-29.27860646],[-177.92355297,-29.28470249],[-177.95230116,-29.22609747],[-177.84600867,-29.27860646]]]}, -{code:"PY", name:"Paraguay", lng:-58.391, lat:-23.236, borders:[[[-54.33051278,-24.67943772],[-54.59889994,-25.57320034],[-54.69833348,-26.43831295],[-55.736114,-27.43943073],[-58.60460652,-27.31689858],[-57.57665231,-25.54943095],[-57.75609603,-25.17693684],[-61.00778196,-23.81331295],[-62.64370759,-22.2388802],[-61.74248535,-19.64497803],[-59.09581039,-19.34886191],[-58.15134437,-19.82804141],[-58.15885902,-20.16803409],[-57.81440021,-20.97193117],[-57.98504681,-22.09179727],[-55.84967786,-22.28886779],[-55.41163622,-23.95636024],[-54.40722612,-23.91664499],[-54.33051278,-24.67943772]]]}, -{code:"PE", name:"Peru", lng:-75.552, lat:-9.326, borders:[[[-78.70893875,-4.58478392],[-78.33741776,-3.42277635],[-76.66053799,-2.57213304],[-75.55911213,-1.53416567],[-75.21604891,-0.96533569],[-75.62789938,-0.10885889],[-75.28581227,-0.1197219],[-74.77688601,-0.20416678],[-74.22723377,-1.02777734],[-73.5562749,-1.37083189],[-72.88183595,-2.50638642],[-71.69793709,-2.14694309],[-70.28831516,-2.50499832],[-70.06750477,-2.7555524],[-70.72407519,-3.77972143],[-69.95689436,-4.23687325],[-70.76577721,-4.14638139],[-72.85189842,-5.12472105],[-73.12377966,-6.4472167],[-73.74411025,-6.87693836],[-74.01043709,-7.5413823],[-72.96405066,-8.98332555],[-73.20523046,-9.40721487],[-72.36627202,-9.4944456],[-72.14382973,-10.00472219],[-71.29876725,-9.99637833],[-70.51463288,-9.42798655],[-70.63130231,-11.00915881],[-69.56840482,-10.9510839],[-68.67387432,-12.50113882],[-68.97439554,-12.86971892],[-68.85299669,-14.19916369],[-69.36627202,-14.80249373],[-69.13685571,-15.24581944],[-69.42192107,-15.61804224],[-68.82250953,-16.33971836],[-69.6187749,-17.21471836],[-69.49966465,-17.50527908],[-69.95109568,-18.24275567],[-70.40542609,-18.34853752],[-71.49748212,-17.29692507],[-75.0474697,-15.46915597],[-75.93324315,-14.65804507],[-76.39382973,-13.8980408],[-76.19685383,-13.41833492],[-77.65241964,-11.29221914],[-78.98963912,-8.22694194],[-79.9826661,-6.76443989],[-81.17463723,-6.08666521],[-80.87139885,-5.65222036],[-81.28973377,-4.30999512],[-80.34036213,-3.3805151],[-80.15330463,-3.88422751],[-80.46710217,-3.9869434],[-80.46775788,-4.4388871],[-79.64970448,-4.43277681],[-79.05479414,-5.00912514],[-78.70893875,-4.58478392]]]}, -{code:"PK", name:"Pakistan", lng:69.386, lat:29.967, borders:[[[67.449417,24.002777],[67.411926,24.005833],[67.379425,24.051662],[67.458878,24.056942],[67.481659,24.042774],[67.458878,24.007221],[67.449417,24.002777]],[[74.81749,37.021767],[75.864426,36.659676],[76.166382,35.819717],[77.823929,35.501328],[77.04248,35.099159],[76.86998,34.658882],[73.94165,34.646385],[73.913315,34.068604],[74.295822,33.977486],[73.99054,33.743881],[74.016388,33.188599],[75.381287,32.214241],[74.605324,31.877119],[74.694588,31.053961],[73.872498,30.390099],[73.933403,30.136002],[73.397491,29.942772],[71.896942,27.961941],[70.829437,27.706383],[70.368317,28.020832],[69.580276,27.173328],[69.506104,26.754444],[70.183594,26.53611],[70.088043,25.982773],[70.666382,25.69833],[71.10582,24.416386],[70.014709,24.169716],[68.783051,24.332775],[68.747208,23.969994],[68.1978,23.766685],[67.493591,23.890831],[67.53804,23.938129],[67.500671,23.974043],[67.486649,24.045277],[67.461197,24.065355],[67.338043,24.089718],[67.27388,24.425827],[67.151657,24.610554],[67.254166,24.746105],[66.645538,24.829163],[66.732758,25.197495],[66.359421,25.613609],[66.141602,25.503941],[66.506378,25.402496],[64.651932,25.162773],[64.113876,25.453327],[61.611031,25.197647],[61.858047,26.234718],[63.176384,26.631107],[63.341934,27.122498],[62.782494,27.260555],[62.78138,28.266941],[61.905548,28.554996],[60.868599,29.863884],[62.484436,29.406105],[66.256653,29.85194],[66.395538,30.94083],[66.723038,31.212215],[67.778046,31.332218],[67.575546,31.53194],[68.166092,31.833054],[68.833054,31.603886],[69.328247,31.940365],[69.505264,33.034164],[70.326935,33.33194],[69.906372,34.035271],[71.08194,34.055824],[70.987488,34.551102],[71.649429,35.424995],[71.243576,36.129715],[72.556641,36.821266],[74.56543,37.027817],[74.81749,37.021767]]]}, -{code:"PL", name:"Poland", lng:19.401, lat:52.125, borders:[[[18.851246,49.517357],[18.577221,49.914444],[17.657776,50.108055],[17.722775,50.319717],[16.890274,50.439438],[17.00222,50.216942],[16.641941,50.10833],[16.20583,50.423882],[16.341942,50.66111],[14.828333,50.865829],[15.036388,51.285553],[14.599443,51.818604],[14.640276,52.572495],[14.149166,52.862778],[14.275627,53.699066],[14.614166,53.816383],[14.218887,53.869019],[14.225555,53.928604],[17.918888,54.82666],[18.334999,54.836662],[18.739998,54.685272],[18.405277,54.74305],[18.582775,54.435272],[18.836388,54.353333],[19.627258,54.463272],[19.651108,54.455826],[19.226662,54.32888],[19.797007,54.43755],[22.785885,54.363838],[23.50404,53.947044],[23.94083,52.732208],[23.1654,52.282276],[23.638607,52.079437],[23.604633,51.527695],[24.111385,50.56694],[22.680828,49.572495],[22.886074,49.002914],[22.558052,49.079437],[21.618889,49.436386],[20.074444,49.175278],[19.475555,49.599998],[18.851246,49.517357]]]}, -{code:"PA", name:"Panama", lng:-80.920, lat:8.384, borders:[[[-81.77850533,7.27638817],[-81.79747009,7.2258358],[-81.81858826,7.29000282],[-81.77850533,7.27638817]],[[-81.20578003,7.48666573],[-81.24966431,7.48833275],[-81.03352356,7.57083321],[-81.20578003,7.48666573]],[[-81.64938354,7.38416862],[-81.87411499,7.49111366],[-81.7585907,7.63416862],[-81.64938354,7.38416862]],[[-81.10386658,7.71777916],[-81.14916992,7.74166679],[-81.12411499,7.75889015],[-81.10386658,7.71777916]],[[-81.1652832,7.8227787],[-81.17355347,7.81805611],[-81.16136169,7.84166527],[-81.1652832,7.8227787]],[[-82.34046936,8.08749962],[-82.36639404,8.08888817],[-82.31967163,8.13666725],[-82.34046936,8.08749962]],[[-82.21328735,8.19750023],[-82.29528809,8.19360924],[-82.31324768,8.21888924],[-82.21328735,8.19750023]],[[-82.33241272,8.23361015],[-82.40350533,8.25305367],[-82.33612061,8.29250145],[-82.31411743,8.27166557],[-82.33241272,8.23361015]],[[-79.10691833,8.20111275],[-79.09744263,8.30916786],[-79.05584717,8.25139046],[-79.10691833,8.20111275]],[[-79.0763092,8.36972237],[-79.11442566,8.41527748],[-79.07577515,8.40860939],[-79.0763092,8.36972237]],[[-78.85136414,8.28861046],[-78.95904732,8.29222298],[-78.96025085,8.44722176],[-78.85136414,8.28861046]],[[-82.01501465,9.12639046],[-82.04908752,9.14416695],[-82.0458374,9.17638969],[-82.01501465,9.12639046]],[[-82.07914734,9.28444481],[-82.12445068,9.27194405],[-82.20632935,9.34833336],[-82.07914734,9.28444481]],[[-82.22439575,9.33500099],[-82.22941589,9.33749962],[-82.22473145,9.35249901],[-82.22439575,9.33500099]],[[-82.23908997,9.3302784],[-82.31445313,9.42472267],[-82.258255,9.42916679],[-82.23908997,9.3302784]],[[-79.46296692,9.56805611],[-78.03547668,9.23000145],[-77.36660767,8.67500114],[-77.21546936,7.93722343],[-77.57380676,7.52527809],[-77.74661255,7.72222328],[-77.88969421,7.22889137],[-78.43302917,8.05194283],[-78.25717163,8.10194588],[-78.1391449,8.40389061],[-77.7791748,8.15500069],[-78.10745239,8.45583153],[-78.41407776,8.34416771],[-78.97853088,9.1427784],[-80.473526,8.21277809],[-79.98963928,7.51611137],[-80.4332428,7.24444389],[-80.92529297,7.25000191],[-81.05802917,7.87333488],[-81.17880249,7.85499382],[-81.21775818,7.6072216],[-81.49694824,7.69861031],[-81.73855591,8.16250038],[-82.19195557,8.19444466],[-82.28723145,8.31333351],[-82.72167969,8.31722069],[-82.89875984,8.02567101],[-82.71078491,8.93111229],[-82.93466187,9.47166634],[-82.56350708,9.56287575],[-82.23692322,8.99777794],[-81.81629944,8.94527626],[-81.88380432,9.1744442],[-81.1960907,8.78027916],[-79.46296692,9.56805611]],[[-77.98692322,8.24222374],[-77.99214172,8.25055504],[-78.0030365,8.25111198],[-77.98692322,8.24222374]]]}, -{code:"PT", name:"Portugal", lng:-8.058, lat:40.309, borders:[[[-17.10248566,32.82332802],[-16.71553421,32.75889015],[-16.94359589,32.63749886],[-17.10248566,32.82332802]],[[-16.28582001,33.09416389],[-16.40055847,33.03860664],[-16.32553482,33.10805702],[-16.28582001,33.09416389]],[[-25.01638412,36.96972084],[-25.20053482,36.98583412],[-25.08636856,37.02360725],[-25.01638412,36.96972084]],[[-25.58498001,37.82666206],[-25.86470795,37.85055733],[-25.13027954,37.81166267],[-25.58498001,37.82666206]],[[-28.14111328,38.44988441],[-28.03778076,38.40694618],[-28.54943085,38.52722359],[-28.14111328,38.44988441]],[[-27.08694458,38.63138771],[-27.38498688,38.76333046],[-27.06581879,38.76416206],[-27.08694458,38.63138771]],[[-31.21553421,39.35333443],[-31.21387482,39.52194405],[-31.12303543,39.44888496],[-31.21553421,39.35333443]],[[-8.20471573,41.87471962],[-6.5941658,41.95360756],[-6.18722153,41.57972145],[-6.93166733,41.01805305],[-7.01721764,39.67499733],[-7.53250504,39.66942024],[-6.95479202,39.02638435],[-7.32110786,38.44944191],[-6.93916702,38.17805672],[-7.44694519,37.69944191],[-7.43185425,37.25319099],[-8.9902668,37.02305031],[-8.67333031,38.41388893],[-9.18387794,38.41971779],[-8.98444176,38.9477787],[-9.48444176,38.71000099],[-8.66082191,40.68721962],[-8.74499702,41.9525013],[-8.20121193,42.15274239],[-8.20471573,41.87471962]]]}, -{code:"PG", name:"Papua New Guinea", lng:143.459, lat:-5.949, borders:[[[153.7708149,-11.61638451],[153.37607002,-11.5672226],[153.19803047,-11.32416344],[153.7708149,-11.61638451]],[[154.29776192,-11.39194489],[154.00332832,-11.38388634],[154.15387154,-11.31415939],[154.29776192,-11.39194489]],[[153.24106026,-11.26889038],[153.21051216,-11.28582191],[153.09106636,-11.19721794],[153.24106026,-11.26889038]],[[152.87329292,-10.66221046],[152.74441719,-10.71665382],[152.54080391,-10.6305542],[152.87329292,-10.66221046]],[[151.06970406,-10.61110306],[151.04220772,-10.6769371],[150.90997505,-10.65471077],[151.06970406,-10.61110306]],[[150.89221382,-10.65083313],[150.79080391,-10.54221916],[150.90027046,-10.55305481],[150.89221382,-10.65083313]],[[151.11606026,-10.04665565],[151.28137398,-9.92333031],[151.22912788,-10.20111084],[150.95858955,-10.11027336],[150.75998116,-9.70776558],[151.11606026,-10.04665565]],[[150.6666584,-9.4383297],[150.92163277,-9.67082596],[150.42190742,-9.38944054],[150.6666584,-9.4383297]],[[150.33914375,-9.52471542],[150.10830879,-9.36860275],[150.18914986,-9.21109962],[150.33914375,-9.52471542]],[[152.81497383,-8.97276497],[152.99719429,-9.1730442],[152.49774361,-9.02165413],[152.81497383,-8.97276497]],[[151.12497139,-8.42554855],[151.1444416,-8.83054733],[150.99691963,-8.52860832],[151.12497139,-8.42554855]],[[143.63803291,-8.73305511],[143.18359566,-8.41999626],[143.46719551,-8.52777863],[143.63803291,-8.73305511]],[[143.57275581,-8.49388885],[143.31442451,-8.3766613],[143.57831001,-8.3738842],[143.57275581,-8.49388885]],[[143.68719673,-8.43971825],[143.60717964,-8.33276558],[143.6722126,-8.35443306],[143.68719673,-8.43971825]],[[143.69748116,-8.2452774],[143.65164375,-8.19972229],[143.73330879,-8.17471886],[143.69748116,-8.2452774]],[[143.6777668,-8.17471886],[143.60495186,-8.10888481],[143.70025826,-8.10610962],[143.6777668,-8.17471886]],[[143.73108101,-8.07165909],[143.58856392,-8.07165909],[143.56524849,-8.01999283],[143.73108101,-8.07165909]],[[145.19357491,-7.86722183],[145.1805439,-7.86111069],[145.18246651,-7.82777786],[145.19357491,-7.86722183]],[[143.99969673,-7.82444382],[143.87716866,-7.7097187],[143.96692085,-7.74833298],[143.99969673,-7.82444382]],[[154.8824482,-5.54332924],[155.91858101,-6.8077774],[155.23996162,-6.62249565],[154.74438667,-5.93977547],[154.8824482,-5.54332924]],[[148.06149483,-5.77711296],[147.86511421,-5.74775314],[147.78027534,-5.49416161],[148.06149483,-5.77711296]],[[148.12079048,-5.46832848],[148.07162666,-5.42444038],[148.09970284,-5.37749863],[148.12079048,-5.46832848]],[[147.60217476,-5.36194038],[147.56051826,-5.31888962],[147.60913277,-5.28805542],[147.60217476,-5.36194038]],[[147.15332222,-5.44971657],[147.00802803,-5.35027695],[147.12106514,-5.1911068],[147.15332222,-5.44971657]],[[154.67553902,-5.44082832],[154.53027534,-5.13388824],[154.63916206,-5.01638794],[154.67553902,-5.44082832]],[[149.15692329,-4.92305183],[149.11801338,-4.88944054],[149.16192818,-4.86638451],[149.15692329,-4.92305183]],[[146.24661446,-4.85749626],[146.19940376,-4.83361053],[146.21997261,-4.78832817],[146.24661446,-4.85749626]],[[149.55719185,-4.71888542],[149.45581245,-4.67916298],[149.54025459,-4.6538887],[149.55719185,-4.71888542]],[[159.51693916,-4.57805634],[159.51138496,-4.57666206],[159.51886177,-4.5363884],[159.51693916,-4.57805634]],[[145.95135689,-4.76444054],[145.87246895,-4.67249489],[145.98163033,-4.52750015],[145.95135689,-4.76444054]],[[154.15524483,-4.43805122],[154.13272285,-4.37166595],[154.1527729,-4.37944412],[154.15524483,-4.43805122]],[[152.2352314,-4.20722198],[152.40582466,-4.68888855],[151.97079659,-4.99333191],[152.09607124,-5.45722198],[151.45941353,-5.53582954],[150.4685688,-6.2761116],[149.05691719,-6.1641655],[148.32309151,-5.67537689],[148.42859077,-5.45111084],[149.88080025,-5.53499985],[150.08886909,-5.00777817],[150.16443062,-5.55138779],[150.92440987,-5.48722076],[151.67608833,-4.90805435],[151.51165962,-4.20444489],[152.2352314,-4.20722198]],[[149.05359077,-6.0941658],[149.05414009,-6.08388901],[149.04385567,-6.0886116],[149.05359077,-6.0941658]],[[145.05774117,-4.13527679],[145.06884956,-4.04499626],[145.10995674,-4.09832954],[145.05774117,-4.13527679]],[[153.64554024,-4.14027786],[153.58441353,-4.09583282],[153.65860176,-4.01916313],[153.64554024,-4.14027786]],[[153.25833321,-3.49888802],[153.19384956,-3.46861076],[153.23358345,-3.44666672],[153.25833321,-3.49888802]],[[154.83304024,-3.51027679],[154.81857491,-3.53027725],[154.79940987,-3.42499924],[154.83304024,-3.51027679]],[[153.34524727,-3.41194344],[153.2624836,-3.40444374],[153.33358955,-3.37138939],[153.34524727,-3.41194344]],[[152.64636421,-3.22861099],[152.5388813,-3.10610962],[152.59970284,-3.04805565],[152.64636421,-3.22861099]],[[150.94134712,-2.92194366],[151.02163887,-2.9719429],[150.76608467,-2.9794426],[150.94134712,-2.92194366]],[[152.06997871,-3.00138855],[151.97357368,-2.84805489],[152.07885933,-2.92833328],[152.06997871,-3.00138855]],[[152.00219917,-2.82888794],[151.93164253,-2.83250046],[151.93246651,-2.70833206],[152.00219917,-2.82888794]],[[150.90652657,-2.63594437],[152.05581856,-3.24777794],[152.98968697,-4.07583237],[152.97467232,-4.76666641],[152.73550606,-4.66082954],[152.6916523,-4.18055153],[152.28247261,-3.57277679],[150.7296772,-2.74055481],[150.90652657,-2.63594437]],[[141.88998604,-2.96999931],[144.51165962,-3.82083321],[145.73550606,-4.80277634],[145.76638985,-5.48527336],[147.47686958,-5.97418785],[147.86941719,-6.66082954],[146.96136665,-6.74721718],[147.17859077,-7.46388435],[148.13525581,-8.0661068],[148.60412788,-9.08249283],[149.31469917,-9.01889038],[149.21997261,-9.47471046],[150.00888252,-9.6313839],[149.71747017,-9.82665443],[149.91415596,-10.04888916],[150.87829781,-10.23166656],[150.36911201,-10.32194519],[150.69134712,-10.56111145],[150.20968819,-10.70055199],[149.74774361,-10.34276962],[147.95245552,-10.14582253],[147.05523872,-9.46665382],[146.97247505,-9.02916718],[146.58664131,-8.99915695],[146.08969307,-8.09111023],[144.52054024,-7.50193977],[144.2130146,-7.79527664],[143.66482735,-7.46764565],[143.95800972,-7.97862244],[143.35830879,-7.90250015],[143.61190987,-8.24388885],[142.13720894,-8.22555542],[143.1102314,-8.47027397],[143.33163643,-9.02832222],[142.63888741,-9.33471107],[141.00702095,-9.12845993],[141.00247383,-2.60708427],[141.88998604,-2.96999931]],[[152.0222187,-2.66749954],[151.95773506,-2.66472244],[151.98385811,-2.5961113],[152.0222187,-2.66749954]],[[150.4583149,-2.65361023],[149.94857979,-2.47166634],[150.21637154,-2.3777771],[150.4583149,-2.65361023]],[[147.81247139,-2.34972191],[147.81524849,-2.24361038],[147.87912178,-2.29361153],[147.81247139,-2.34972191]],[[147.30081367,-2.02527809],[146.5249958,-2.19083214],[146.63858223,-1.97861099],[147.30081367,-2.02527809]],[[142.86636543,-1.69777679],[142.81360054,-1.73277664],[142.82107735,-1.69583321],[142.86636543,-1.69777679]],[[149.71969795,-1.43333244],[149.73190498,-1.60333252],[149.5277729,-1.45444298],[149.71969795,-1.43333244]],[[144.52191353,-1.39555359],[144.50555611,-1.38055611],[144.51638985,-1.38194275],[144.52191353,-1.39555359]],[[144.52054024,-1.12083244],[144.51443672,-1.11610985],[144.51721382,-1.09833336],[144.52054024,-1.12083244]]]}, -{code:"GW", name:"Guinea-Bissau", lng:-14.651, lat:12.125, borders:[[[-15.88583348,11.052221],[-15.98110724,11.049444],[-15.94638649,11.195],[-15.88583348,11.052221]],[[-16.00582171,11.068333],[-16.06138222,11.163055],[-15.98054935,11.202499],[-16.00582171,11.068333]],[[-16.08802843,11.025555],[-16.24414477,11.100555],[-16.08247803,11.206944],[-16.08802843,11.025555]],[[-15.86221853,11.199999],[-15.90638566,11.224998],[-15.83027498,11.300833],[-15.86221853,11.199999]],[[-15.73999373,11.166943],[-15.77637489,11.225832],[-15.66749046,11.306389],[-15.73999373,11.166943]],[[-16.17774979,11.215277],[-16.26442363,11.281666],[-16.16082027,11.290277],[-16.17774979,11.215277]],[[-15.67971204,11.439444],[-15.74304224,11.458332],[-15.66583104,11.502222],[-15.67971204,11.439444]],[[-16.21275711,11.439722],[-16.30054874,11.449444],[-16.16443994,11.514999],[-16.21275711,11.439722]],[[-16.25054163,11.536665],[-16.41942219,11.482777],[-16.39386024,11.545832],[-16.25054163,11.536665]],[[-15.95249778,11.423054],[-16.06497237,11.44972],[-15.95832249,11.594166],[-15.95249778,11.423054]],[[-15.55305262,11.517221],[-15.63359991,11.535276],[-15.47221975,11.631109],[-15.55305262,11.517221]],[[-16.03192529,11.755833],[-16.16220837,11.86861],[-15.97833104,11.905832],[-16.03192529,11.755833]],[[-16.2363588,11.836943],[-16.30166252,11.971666],[-16.1847228,11.876665],[-16.2363588,11.836943]],[[-14.51694477,12.679722],[-13.71313053,12.677221],[-13.97102738,12.154758],[-13.7091527,11.715277],[-14.68694111,11.509722],[-15.01684341,10.956451],[-15.02276849,11.195276],[-15.40721487,11.184999],[-15.2652681,11.425913],[-15.50915881,11.338055],[-15.02721936,11.594166],[-15.55666003,11.723331],[-14.9319456,11.750832],[-15.00387772,11.974165],[-15.96333126,11.734165],[-15.70444477,12.004444],[-15.85277215,12.016666],[-16.12804752,11.881943],[-16.33389264,11.996664],[-16.33443828,12.15111],[-16.11054185,12.330832],[-16.71774636,12.322426],[-14.51694477,12.679722]]]}, -{code:"QA", name:"Qatar", lng:51.191, lat:25.316, borders:[[[51.51759,25.383415],[51.611664,25.010277],[51.215164,24.620888],[50.830956,24.749966],[51.042496,26.049442],[51.568054,25.908333],[51.51759,25.383415]]]}, -{code:"RE", name:"Reunion", lng:55.538, lat:-21.122, borders:[[[55.709999,-20.99803575],[55.674164,-21.37388222],[55.219719,-21.02776299],[55.709999,-20.99803575]]]}, -{code:"RO", name:"Romania", lng:24.969, lat:45.844, borders:[[[20.726955,46.17556],[21.176666,46.295555],[22.032497,47.530273],[22.894804,47.95454],[24.919441,47.711662],[26.634995,48.257164],[28.119717,46.854404],[28.21484,45.448647],[29.664331,45.211803],[29.549438,44.820267],[28.868324,44.943047],[28.583244,43.747765],[27.036427,44.147339],[25.430229,43.626778],[24.179996,43.684715],[22.875275,43.842499],[23.044167,44.076111],[22.681435,44.224701],[22.457333,44.474358],[22.764893,44.559006],[22.479164,44.710274],[22.146385,44.479164],[21.400398,44.780823],[21.513611,45.151108],[20.261024,46.114853],[20.726955,46.17556]]]}, -{code:"MD", name:"Republic of Moldova", lng:28.599, lat:47.193, borders:[[[28.119717,46.854404],[26.634995,48.257164],[27.755554,48.451385],[29.141937,47.986092],[29.184441,47.443047],[29.949997,46.814156],[30.11694,46.386101],[28.994434,46.478325],[28.971935,46.006653],[28.21484,45.448647],[28.119717,46.854404]]]}, -{code:"PH", name:"Philippines", lng:122.466, lat:11.118, borders:[[[119.47221565,4.64805412],[119.45583534,4.90888786],[119.5105381,4.76388741],[119.47221565,4.64805412]],[[120.01915169,5.03027916],[120.01888466,5.02861214],[120.01471138,5.03083229],[120.01915169,5.03027916]],[[119.94719887,5.07694435],[119.93414497,5.07583427],[119.94109535,5.08361244],[119.94719887,5.07694435]],[[120.24414253,5.30083275],[120.22664833,5.30639076],[120.23108864,5.32500267],[120.24414253,5.30083275]],[[120.25360298,5.23333549],[119.83110237,5.05916405],[120.17775917,5.34361076],[120.25360298,5.23333549]],[[125.41470528,5.36111259],[125.32998848,5.38722038],[125.40582466,5.43027687],[125.41470528,5.36111259]],[[125.47831917,5.38833427],[125.45027351,5.42194557],[125.47943306,5.49194527],[125.47831917,5.38833427]],[[120.86971474,5.49138832],[120.84332466,5.58500099],[120.90999031,5.53611183],[120.86971474,5.49138832]],[[121.18387032,5.78750038],[121.13916206,5.78527641],[121.14637947,5.8488903],[121.18387032,5.78750038]],[[121.18525887,6.03999901],[121.42581367,5.9525013],[120.87552834,5.92111015],[121.18525887,6.03999901]],[[121.86303902,6.01638985],[121.76277351,6.09083366],[121.95332527,6.05111122],[121.86303902,6.01638985]],[[120.56833076,6.24472237],[120.47776985,6.26416588],[120.59971809,6.39611244],[120.56833076,6.24472237]],[[122.23027229,6.66083336],[122.03386879,6.41111183],[121.79471016,6.59361076],[122.23027229,6.66083336]],[[118.53360176,7.03500175],[118.54026985,6.96527672],[118.41721535,7.02222252],[118.53360176,7.03500175]],[[125.79498482,6.9327755],[125.66998482,7.07500267],[125.69914436,7.19166756],[125.79498482,6.9327755]],[[117.0222187,7.80888939],[116.94999886,8.03222084],[117.06553841,8.07861137],[117.0222187,7.80888939]],[[117.29886818,8.18222237],[117.26805305,8.30610847],[117.31804848,8.33111],[117.29886818,8.18222237]],[[126.23665047,9.00833321],[126.23166084,8.9980526],[126.22943306,9.0130558],[126.23665047,9.00833321]],[[126.26361275,8.99722099],[126.24664497,9.01361275],[126.2605381,9.00666618],[126.26361275,8.99722099]],[[123.6749897,9.22638893],[123.60942268,9.09222221],[123.45720863,9.19055367],[123.6749897,9.22638893]],[[124.77858925,9.0755558],[124.64360237,9.15527916],[124.67276192,9.25305367],[124.77858925,9.0755558]],[[123.77361488,9.54416466],[123.74471474,9.59527779],[123.8449955,9.63611031],[123.77361488,9.54416466]],[[125.95247841,9.55750084],[125.90054512,9.61694145],[125.93831062,9.75638771],[125.95247841,9.55750084]],[[126.04860115,9.23194313],[126.58582497,7.28500175],[126.16526985,6.88166618],[126.1916523,6.27222252],[125.85555458,7.34972191],[125.65220833,7.23666573],[125.37719917,6.71972084],[125.70332527,6.02722359],[125.40555,5.56333351],[125.26361275,6.09166527],[124.9569416,5.85138893],[124.18580818,6.21055412],[123.94859505,6.82333565],[124.26860237,7.37444496],[123.67665291,7.81249809],[123.45471382,7.3674984],[123.11638069,7.7294445],[122.83276558,7.27527809],[122.62387276,7.77305412],[122.14998817,6.90527916],[121.92109871,6.99416542],[122.22331429,7.96222115],[122.92302895,8.15083122],[123.3791523,8.72722054],[123.81804848,8.47694206],[123.67109871,7.95388985],[124.43221474,8.61527443],[124.72747993,8.48638725],[124.80386543,9.00166512],[125.51471138,9.00666618],[125.44026375,9.80916405],[126.04860115,9.23194313]],[[124.57415962,9.85471916],[124.56609535,9.84944344],[124.56553841,9.8619442],[124.57415962,9.86333275],[124.57415962,9.85471916]],[[123.38443184,9.87888527],[123.37220955,9.88055229],[123.37970161,9.8880558],[123.38443184,9.87888527]],[[126.11303902,9.74444389],[125.94553566,9.83083153],[126.06025887,10.05416679],[126.11303902,9.74444389]],[[124.48387337,10.05083275],[124.36554146,9.62694359],[123.79332161,9.7294445],[124.14888191,10.14694405],[124.48387337,10.05083275]],[[125.28692818,9.90916634],[125.12664986,10.15583229],[125.21748543,10.12222099],[125.28692818,9.90916634]],[[125.65941811,9.82472038],[125.47527504,10.13110924],[125.64526558,10.46888924],[125.65941811,9.82472038]],[[119.82721138,10.43972206],[119.75833321,10.55694389],[120.00248909,10.5913868],[119.82721138,10.43972206]],[[124.36720467,10.60777473],[124.27581978,10.58777809],[124.32054329,10.7069416],[124.36720467,10.60777473]],[[124.43747902,10.62499809],[124.45139503,10.71499825],[124.51748848,10.65944481],[124.43747902,10.62499809]],[[122.63527107,10.44360924],[122.47971535,10.4877758],[122.65941811,10.74833107],[122.63527107,10.44360924]],[[125.80246925,10.68888664],[125.66249275,10.75083351],[125.69220161,10.82361031],[125.80246925,10.68888664]],[[123.5638752,10.79416466],[123.13638496,9.83611107],[123.29637337,9.22971916],[123.01471138,9.03388786],[122.45276833,9.97333336],[122.85832405,10.09749794],[122.95247841,10.89444542],[123.5638752,10.79416466]],[[121.04054451,10.7919445],[121.00388527,10.83611107],[121.08110237,10.90527916],[121.04054451,10.7919445]],[[124.01987648,11.11894417],[124.02693367,10.38194084],[123.31025887,9.41194344],[124.01987648,11.11894417]],[[123.75081825,11.14750099],[123.69275093,11.22138786],[123.73304939,11.30055428],[123.75081825,11.14750099]],[[119.50857735,11.33560753],[119.71248817,10.49749947],[117.18580818,8.3255558],[119.31247902,10.58249855],[119.21692848,10.95999718],[119.45610237,10.72360802],[119.50857735,11.33560753]],[[119.53386879,11.36249733],[119.5222187,11.36666679],[119.54026985,11.3730526],[119.53386879,11.36249733]],[[119.83249092,11.37694359],[119.71470833,11.47611046],[119.87137032,11.50666618],[119.83249092,11.37694359]],[[124.63889503,11.29333305],[124.94748116,11.42500114],[125.02998543,11.19583321],[125.27165413,10.2974987],[124.98027229,10.37916374],[125.01471138,10.02777672],[124.28970528,11.54138756],[124.63889503,11.29333305]],[[124.5847187,11.47249794],[124.33888435,11.68083382],[124.53137398,11.67971992],[124.5847187,11.47249794]],[[124.83167458,11.5288868],[124.71805,11.72722054],[124.84276009,11.59166527],[124.83167458,11.5288868]],[[122.22943306,11.79777718],[122.88081551,11.42916679],[123.15305519,11.60027504],[123.12859535,11.1744442],[121.94331551,10.41638756],[122.09887886,11.69999886],[121.84803963,11.76000023],[122.22943306,11.79777718]],[[119.9652729,11.65694237],[119.88498878,11.97611046],[120.07054329,11.86499977],[119.9652729,11.65694237]],[[120.04637337,11.82333183],[120.04609871,11.82638741],[120.04387093,11.82444191],[120.04637337,11.82333183]],[[120.26805305,11.82694435],[120.20276833,11.94611168],[120.25444221,11.9822216],[120.26805305,11.82694435]],[[120.0847187,11.95860863],[120.06553841,11.96416664],[120.06165504,11.9924984],[120.0847187,11.95860863]],[[119.95358467,12.02166557],[119.95025826,12.03055382],[119.95941353,12.03694344],[119.95358467,12.02166557]],[[121.13749886,12.15749931],[121.04276466,12.2294445],[121.04582405,12.29055595],[121.13749886,12.15749931]],[[120.16829872,12.11833],[120.33998299,11.99277687],[119.87387276,12.31444359],[120.16829872,12.11833]],[[122.68109322,12.30805397],[122.43248177,12.46111107],[122.6694355,12.48361015],[122.68109322,12.30805397]],[[124.46388435,12.52083397],[125.29694557,12.45749855],[125.76027107,11.01166725],[125.2694416,11.12805367],[124.9699955,11.44750023],[124.84359932,11.4663868],[125.04248238,11.74722099],[124.38693428,12.19027519],[124.25804329,12.55555534],[124.46388435,12.52083397]],[[125.67249489,11.08999825],[125.68193245,11.10360909],[125.66470528,11.10277748],[125.67249489,11.08999825]],[[123.6694355,12.34694481],[124.07639503,11.71833229],[123.53027534,12.20860863],[123.15776253,11.90860939],[123.24165535,12.60694313],[123.6694355,12.34694481]],[[122.30693245,12.48638725],[122.24803352,12.56110954],[122.28305244,12.63333321],[122.30693245,12.48638725]],[[123.79221535,12.34499931],[123.58554268,12.66055489],[123.72776985,12.60166359],[123.79221535,12.34499931]],[[122.04860115,12.17666435],[121.91748238,12.30416679],[122.12275887,12.67694283],[122.04860115,12.17666435]],[[123.38247871,12.69194221],[122.93193245,13.1099987],[123.04860115,13.13472176],[123.38247871,12.69194221]],[[124.21805,13.1724987],[124.07832527,13.21111107],[124.1633091,13.2322216],[124.21805,13.1724987]],[[124.04609871,13.22055244],[123.95610237,13.23250008],[123.91499519,13.28638649],[124.09887886,13.26055717],[124.04609871,13.22055244]],[[123.91304207,13.24305534],[123.8791523,13.2294445],[123.85386848,13.26722145],[123.85109138,13.35194206],[123.93081856,13.32444191],[123.89048195,13.27877998],[123.91304207,13.24305534]],[[122.15138435,13.3955555],[122.13165474,13.40083122],[122.12608528,13.42194557],[122.15138435,13.3955555]],[[122.12343788,13.40410423],[122.00332832,13.20222282],[121.81331062,13.44861031],[122.12343788,13.40410423]],[[120.72165108,13.47777748],[121.50221443,13.14888954],[121.558321,12.60111046],[121.22054482,12.23055458],[120.30330849,13.44360924],[120.72165108,13.47777748]],[[120.28193855,13.75416756],[120.27469826,13.66833305],[120.07998848,13.84916496],[120.28193855,13.75416756]],[[124.28736305,13.94617653],[124.20804024,13.51527596],[124.03055,13.66388893],[124.28736305,13.94617653]],[[124.30108833,13.95222282],[124.29414558,13.9580555],[124.30304146,13.9636097],[124.30108833,13.95222282]],[[124.34221077,13.94222069],[124.31276131,13.95499992],[124.32527351,13.98194313],[124.34221077,13.94222069]],[[122.17109871,13.99860954],[121.91748238,14.18527794],[122.12442207,14.08888817],[122.17109871,13.99860954]],[[122.25417519,14.72249794],[122.0986042,14.83777809],[122.21304512,14.83916664],[122.25417519,14.72249794]],[[122.05081367,14.99666405],[121.93081856,14.62916374],[121.81915474,14.99166679],[122.05081367,14.99666405]],[[120.00026894,16.22555351],[119.92442513,16.2994442],[119.97415352,16.34666634],[120.00277901,16.34055519],[120.00026894,16.22555351]],[[121.25665474,18.56611061],[121.93665504,18.26944542],[122.24165535,18.51277733],[122.17025948,17.6072216],[122.53333473,17.09944344],[121.37886238,15.33222008],[121.73387337,14.17083168],[122.23332405,13.89722252],[122.16554451,14.15805626],[122.71331978,14.33833122],[123.09999275,13.66749763],[123.34305,14.08694267],[123.9249897,13.7891674],[123.53193855,13.5755558],[123.76277351,13.06166649],[124.19582558,13.0577755],[124.08276558,12.54055595],[123.84887886,12.73194313],[124.02858925,12.96305275],[123.32222176,13.00861168],[122.56099892,13.93656731],[122.60748482,13.16388893],[121.75470924,13.96444511],[121.27942848,13.59388924],[120.6611042,13.76833153],[120.59221077,14.23111153],[120.95665169,14.63694572],[120.55165291,14.82694435],[120.49331856,14.42971992],[120.08611488,14.78527641],[119.78692818,16.32305336],[119.92886543,16.38499641],[119.91914558,16.29027748],[119.93525887,16.24277306],[120.15664864,16.03611183],[120.42192268,16.15583229],[120.57054329,18.49083138],[121.25665474,18.56611061]],[[122.73526192,13.77416801],[122.74498177,13.78166771],[122.72747993,13.77722359],[122.73526192,13.77416801]],[[121.40054512,18.84721947],[121.27942848,18.86610985],[121.48442268,18.88277626],[121.40054512,18.84721947]],[[121.88275337,18.83333397],[121.8330555,18.88055229],[121.94609261,19.00444603],[121.88275337,18.83333397]],[[121.25139046,19.01194572],[121.20192909,19.06527519],[121.22026253,19.17277336],[121.25139046,19.01194572]],[[121.53970528,19.26666832],[121.37275887,19.36444283],[121.53055,19.38971901],[121.53970528,19.26666832]],[[121.97470284,19.47999763],[121.90305519,19.5502758],[121.99359322,19.56527519],[121.97470284,19.47999763]],[[121.88693428,20.28333473],[121.84192848,20.28249931],[121.84636879,20.35277748],[121.88693428,20.28333473]],[[121.95443916,20.34860802],[121.92386818,20.40722084],[122.02665901,20.48333168],[121.95443916,20.34860802]],[[121.8121891,20.68666267],[121.870821,20.83472252],[121.88333321,20.76527596],[121.8121891,20.68666267]],[[121.9569416,21.10360909],[121.94941902,21.10610771],[121.94970894,21.11805534],[121.9569416,21.10360909]]]}, -{code:"PR", name:"Puerto Rico", lng:-66.466, lat:18.221, borders:[[[-67.8805394,18.048332],[-67.93072527,18.109722],[-67.84667938,18.107498],[-67.8805394,18.048332]],[[-65.44129943,18.090275],[-65.58023046,18.114719],[-65.30105585,18.147778],[-65.44129943,18.090275]],[[-65.24269063,18.302219],[-65.27525311,18.276943],[-65.33883638,18.346664],[-65.24269063,18.302219]],[[-66.99661213,18.504997],[-65.60299669,18.232498],[-67.18716465,17.932499],[-67.26599149,18.368053],[-66.99661213,18.504997]]]}, -{code:"RU", name:"Russia", lng:96.689, lat:61.988, borders:[[[131.87329292,42.9569416],[131.77997017,43.04944038],[131.91720772,43.02110481],[131.87329292,42.9569416]],[[146.1374836,43.4588871],[146.07608223,43.51333046],[146.22607613,43.52555275],[146.1374836,43.4588871]],[[146.66998482,43.70443916],[146.6046772,43.80388069],[146.90497017,43.83999062],[146.66998482,43.70443916]],[[47.73971748,43.93221474],[47.62803841,43.97443581],[47.78555489,43.95887947],[47.73971748,43.93221474]],[[146.14804268,44.50999641],[146.56802559,44.43832588],[145.43747139,43.71693611],[146.14804268,44.50999641]],[[148.82525826,45.33499336],[146.84051704,44.41554451],[147.93274117,45.421381],[148.82525826,45.33499336]],[[47.9624958,45.50499153],[47.96027565,45.65304756],[47.9938755,45.53665352],[47.9624958,45.50499153]],[[48.46888161,45.67388344],[48.33777046,45.7972126],[48.40442848,45.79499245],[48.46888161,45.67388344]],[[48.72331429,45.69832039],[48.59192848,45.74749184],[48.49582863,45.88221169],[48.72331429,45.69832039]],[[150.06637764,45.84749031],[149.43747139,45.58360481],[150.49856758,46.19249153],[150.06637764,45.84749031]],[[150.8741169,46.44082832],[150.79852486,46.4499836],[150.84192085,46.47110176],[150.8741169,46.44082832]],[[150.76498604,46.70388222],[150.73080635,46.72276497],[150.76220894,46.72748756],[150.76498604,46.70388222]],[[152.22552681,47.17471504],[152.01303291,46.88888741],[151.71219063,46.80110359],[152.22552681,47.17471504]],[[152.51913643,47.30721474],[152.38803291,47.34415627],[152.50387764,47.37721443],[152.51913643,47.30721474]],[[153.01608467,47.69304848],[153.0741291,47.80832863],[153.08026314,47.71415901],[153.01608467,47.69304848]],[[153.29052925,48.05360603],[153.13775826,48.10110664],[153.22329903,48.13305092],[153.29052925,48.05360603]],[[154.0194416,48.72332191],[154.11218452,48.89499855],[154.22885323,48.90249062],[154.0194416,48.72332191]],[[153.98190498,48.92666054],[153.90191841,48.96998787],[154.00470161,48.9636097],[153.98190498,48.92666054]],[[154.4546833,49.16916084],[154.59884834,49.11194038],[154.50055122,49.07444191],[154.4546833,49.16916084]],[[154.7157917,49.26388741],[154.60244942,49.37360573],[154.90442085,49.62416267],[154.7157917,49.26388741]],[[154.4249897,49.73360634],[154.37497139,49.82499886],[154.45996284,49.81388283],[154.4249897,49.73360634]],[[155.78552437,50.18499184],[155.20858955,50.08082771],[156.10412788,50.76111031],[155.78552437,50.18499184]],[[156.40382576,50.65339851],[156.16443062,50.72860146],[156.46386909,50.86944008],[156.40382576,50.65339851]],[[155.62079048,50.80610085],[155.44775581,50.89777565],[155.63916206,50.92083168],[155.62079048,50.80610085]],[[143.66192818,49.31221199],[143.24606514,49.37915993],[143.32025337,49.31360817],[143.66192818,49.31221199],[143.01776314,49.13971901],[142.53470039,48.00277901],[143.08828926,46.80166054],[143.49164009,46.80860329],[143.47384834,46.09276772],[143.37857246,46.54833412],[142.70968819,46.74415779],[142.07745552,45.89138222],[141.81274605,46.58610725],[142.1888752,47.97526741],[141.85244942,48.75027657],[142.26721382,51.12027168],[141.63803291,52.31582832],[141.76693916,53.37137794],[142.79831123,53.69748878],[142.39386177,54.23749733],[142.69662666,54.42471504],[143.29080391,53.13027382],[143.22079659,51.52137947],[144.75164986,48.64193916],[143.66192818,49.31221199]],[[137.77997017,54.36638832],[137.7083149,54.36860085],[137.9138813,54.50777626],[137.77997017,54.36638832]],[[137.63217354,54.4130497],[137.54886055,54.50499916],[137.6185627,54.56527138],[137.63217354,54.4130497]],[[19.6977787,54.47944069],[19.6511097,54.45582771],[19.62726021,54.463274],[19.8982029,54.6259594],[19.6977787,54.47944069]],[[167.85580635,54.68138313],[168.11691475,54.50777626],[167.43298531,54.86307716],[167.85580635,54.68138313]],[[137.18829536,55.10222054],[137.04608345,54.91749763],[136.66726875,54.90506172],[137.18829536,55.10222054]],[[137.99133492,54.88555336],[137.70718575,54.61832619],[137.22131538,54.77372169],[137.57831001,55.19054604],[138.20413399,55.04388618],[137.99133492,54.88555336]],[[21.43138695,55.25193977],[22.84249687,54.89694405],[22.78588676,54.3638401],[19.79700661,54.4375515],[20.40500069,54.67916298],[19.87271309,54.64055061],[19.96944237,54.95749855],[20.94283485,55.28720284],[20.9848156,55.2765522],[20.53805351,54.94943428],[21.22249794,54.93194008],[21.263937,55.2489872],[21.43138695,55.25193977]],[[166.11911201,55.32860756],[166.66302681,54.67416573],[165.8380146,55.26444435],[166.11911201,55.32860756]],[[164.65692329,59.08443642],[163.38553047,58.55940437],[163.69940376,59.01444435],[164.65692329,59.08443642]],[[150.59051704,59.01971626],[150.45456123,59.01780128],[150.74383736,59.11194038],[150.59051704,59.01971626]],[[149.1046772,59.18776894],[148.94101143,59.14167213],[149.00525093,59.21110725],[149.1046772,59.18776894]],[[155.55581856,59.32193947],[155.47830391,59.31721687],[155.55581856,59.35916328],[155.55581856,59.32193947]],[[28.69305229,60.26777077],[28.55111122,60.34943581],[28.71499825,60.31138039],[28.69305229,60.26777077]],[[35.99110603,64.32582283],[35.85444069,64.40582466],[36.04749489,64.35554695],[35.99110603,64.32582283]],[[-172.54440308,64.61331367],[-172.75802612,64.66079903],[-172.48825073,64.63360786],[-172.54440308,64.61331367]],[[40.41249275,64.65359688],[40.47137642,64.56608772],[39.97471046,64.68275642],[40.41249275,64.65359688]],[[-172.59057617,64.70331001],[-172.53109741,64.84303474],[-172.17092896,64.79525948],[-172.59057617,64.70331001]],[[35.79083443,64.97331429],[35.52469826,65.15887642],[35.83443642,65.16832161],[35.79083443,64.97331429]],[[36.06166267,65.19026375],[36.30082893,65.20109749],[35.94332314,65.18193245],[36.06166267,65.19026375]],[[-169.05334473,65.74914742],[-169.07489014,65.81552315],[-168.98974609,65.80885506],[-169.05334473,65.74914742]],[[69.33499336,66.65443611],[69.24331856,66.69331551],[69.33333015,66.71887398],[69.33499336,66.65443611]],[[70.03387642,66.72387886],[69.78915596,66.78027534],[69.95359993,66.76111031],[70.03387642,66.72387886]],[[42.70665932,66.68637276],[42.43249702,66.75860786],[42.62276649,66.78221321],[42.70665932,66.68637276]],[[69.25221443,66.78997993],[70.05525398,66.70332527],[70.10443306,66.53109932],[69.84109688,66.47831917],[69.4194355,66.76971626],[69.12664986,66.78859138],[69.25221443,66.78997993]],[[54.21193886,68.24971199],[54.28305244,68.33665657],[54.33693886,68.30386543],[54.21193886,68.24971199]],[[53.94971657,68.29275703],[53.86888313,68.34610176],[54.01333046,68.36219978],[53.94971657,68.29275703]],[[50.81415749,68.37220955],[51.1638813,68.49525642],[51.45665932,68.47693062],[50.81415749,68.37220955]],[[57.92083168,68.80331612],[57.86471748,68.76193428],[57.19999886,68.71887398],[57.92083168,68.80331612]],[[67.38304329,68.77748299],[67.14888191,68.82193184],[67.33859444,68.81915474],[67.38304329,68.77748299]],[[55.47231483,68.90904427],[55.22456551,68.90986824],[55.50842476,68.91211128],[55.47231483,68.90904427]],[[-179.62606812,68.90635872],[-175.46362305,67.70747566],[-175.190979,67.51080513],[-175.38018799,67.34498787],[-174.83010864,67.38273811],[-174.74279785,66.77304268],[-175.00015259,66.67109871],[-174.46188354,66.30107307],[-173.75866699,66.44803047],[-174.30288696,66.5777607],[-173.99584961,66.69134712],[-174.12521362,66.98913765],[-174.65240479,67.06360054],[-173.66677856,67.13165474],[-173.17657471,67.06331062],[-173.35232544,66.83886909],[-171.7260437,66.95524788],[-170.64434814,66.23719978],[-169.690979,66.07249641],[-170.58773804,65.86360359],[-170.63540649,65.61053658],[-171.54418945,65.83360481],[-171.11538696,65.47636604],[-172.80029297,65.68165779],[-172.19055176,65.44662666],[-172.69335938,65.23275948],[-172.12606812,65.08636665],[-173.20074463,64.78608894],[-172.35583496,64.4583149],[-173.19140625,64.25442696],[-173.41333008,64.61998177],[-173.68161011,64.34721565],[-175.44882202,64.78442574],[-176.07794189,65.47026253],[-178.56289673,65.51638985],[-178.46035767,65.73637581],[-178.90939331,65.99386787],[-178.51693726,66.4027729],[-179.69552612,66.18303108],[-179.79830933,65.87051582],[-179.31488037,65.53608894],[-180.,65.0689106],[-180.,68.98010445],[-179.62606812,68.90635872]],[[54.65416145,68.95582771],[54.56777382,68.95582771],[54.69415474,68.99136543],[54.65416145,68.95582771]],[[66.17192268,69.08777046],[66.53776741,68.94359016],[65.95193672,69.09387398],[66.17192268,69.08777046]],[[59.2394352,69.17581367],[58.76055336,69.33360481],[59.19388008,69.23387337],[59.2394352,69.17581367]],[[34.40471077,69.33943367],[33.97304726,69.36609077],[34.21337318,69.40272713],[34.40471077,69.33943367]],[[67.13109016,69.36137581],[66.93803596,69.44359016],[67.21054268,69.42581367],[67.13109016,69.36137581]],[[50.30526924,69.16192818],[48.91276741,68.73610115],[48.21610451,68.89499092],[48.31276894,69.27916145],[48.94332314,69.50694466],[50.30526924,69.16192818]],[[161.44330025,68.88998604],[161.45800972,68.99553108],[161.13443184,69.08970833],[161.0963459,69.47053719],[161.37774849,69.53221321],[161.38888741,69.45915413],[161.28933907,69.41586494],[161.36136055,69.35859871],[161.31997871,69.24109077],[161.38611031,69.10247993],[161.5152607,68.98719978],[161.50915718,68.91554451],[161.44330025,68.88998604]],[[67.25248909,69.44470406],[67.02110481,69.48610115],[67.33831978,69.58888435],[67.25248909,69.44470406]],[[161.43774605,69.40803719],[161.39499092,69.59082222],[161.62219429,69.58859444],[161.43774605,69.40803719]],[[170.15109444,69.73414803],[169.98495674,69.74803352],[170.20331001,69.78831673],[170.15109444,69.73414803]],[[169.44748116,69.80887032],[168.86828804,69.56776619],[167.75192451,69.82748604],[169.44748116,69.80887032]],[[83.09694099,70.12498665],[82.76860237,70.20887947],[82.86387825,70.25166512],[83.08276558,70.21859932],[83.11360359,70.19331551],[83.09694099,70.12498665]],[[59.46110725,70.27665901],[60.54610634,69.79915047],[59.60166359,69.7124958],[58.40860176,70.25027657],[59.03305244,70.47886848],[59.46110725,70.27665901]],[[83.55026436,70.4636097],[83.61276436,70.43776131],[83.53360176,70.37719917],[83.37970161,70.36499214],[83.41249275,70.44026375],[83.62442207,70.52415657],[83.55026436,70.4636097]],[[57.20471382,70.50888252],[56.96582985,70.51748848],[56.84166145,70.59915352],[57.20471382,70.50888252]],[[162.38189888,70.67915535],[162.48495674,70.65109444],[162.23663521,70.65915108],[162.38189888,70.67915535]],[[83.37220955,70.6860981],[83.06971931,70.39776802],[83.21415901,70.80720711],[83.37220955,70.6860981]],[[161.69384956,70.75027657],[161.46328926,70.80359077],[161.65774727,70.80859566],[161.69384956,70.75027657]],[[160.61911201,70.81469917],[160.40802193,70.91914558],[160.71978951,70.81851387],[160.61911201,70.81469917]],[[53.59527016,71.11026192],[53.43249702,71.13693428],[53.54249763,71.18387032],[53.59527016,71.11026192]],[[53.36055183,71.29220772],[53.20416451,71.3110981],[53.12915993,71.35859871],[53.36055183,71.29220772]],[[52.85860634,71.37831306],[53.20749855,71.25110054],[53.14193916,70.97831917],[52.2088871,71.3055439],[52.85860634,71.37831306]],[[-175.62084961,71.37776375],[-175.92355347,71.42581367],[-175.76412964,71.42440987],[-175.62084961,71.37776375]],[[137.961092,71.50305367],[137.67691231,71.41165352],[136.99133492,71.51555061],[137.961092,71.50305367]],[[180.00000191,71.53586006],[180.00000191,70.99720955],[178.79101753,70.79640388],[178.61773872,71.03553963],[180.00000191,71.53586006]],[[-178.56860352,71.56414986],[-177.43945313,71.22693062],[-180.,70.99720955],[-180.,71.5358448],[-178.56860352,71.56414986]],[[138.51608467,71.85609627],[138.27386665,71.85998726],[138.36245918,71.88554573],[138.51608467,71.85609627]],[[128.1430378,72.57887459],[129.5610981,72.22526741],[128.76361275,72.07415962],[127.54971504,72.433321],[126.65027046,72.4360981],[128.1430378,72.57887459]],[[77.76249886,72.29525948],[76.85470772,72.32998848],[77.62025642,72.63054085],[78.39305305,72.48915291],[77.76249886,72.29525948]],[[128.83886909,72.57666206],[128.10052681,72.63195992],[128.97220039,72.59082222],[128.83886909,72.57666206]],[[72.9930439,72.60247993],[72.84054756,72.6749897],[72.98498726,72.67608833],[72.9930439,72.60247993]],[[129.35580635,72.70277596],[127.31414986,72.65332222],[128.30191231,72.78776741],[129.35580635,72.70277596]],[[129.23025703,72.8319416],[129.29803658,72.80026436],[128.29052925,72.86609077],[129.23025703,72.8319416]],[[122.95583534,72.86331367],[123.60582161,72.7777729],[122.30246925,72.93748665],[122.95583534,72.86331367]],[[74.86276436,73.08970833],[74.65443611,72.85582161],[74.08970833,73.02054024],[74.86276436,73.08970833]],[[79.57083321,72.73027229],[78.57859993,72.84553719],[79.19470406,73.0958271],[79.57083321,72.73027229]],[[120.21388435,73.04248238],[119.62970161,73.11470222],[120.08693123,73.15248299],[120.21388435,73.04248238]],[[76.45277596,73.19053841],[76.7374897,73.15359688],[76.12275887,73.20721626],[76.45277596,73.19053841]],[[71.34109688,73.32499886],[71.13998604,73.28970528],[71.26277351,73.41415596],[71.34109688,73.32499886]],[[55.33166695,73.32998848],[56.58860207,73.13749886],[55.61527443,72.96138191],[56.26221657,72.96081734],[55.42943764,72.78415108],[55.94554329,72.6666584],[55.11805153,72.44803047],[55.57583046,72.19581795],[55.22101784,71.92561531],[56.22804451,71.19413948],[57.63999367,70.7263813],[55.18631935,70.5520649],[53.4636097,70.8138752],[53.74332619,70.94304085],[53.50833321,71.08610725],[54.24499702,71.12664986],[53.45332527,71.26111031],[53.92943764,71.46693611],[53.48054695,71.2916584],[53.35582924,71.56721687],[51.79722023,71.47499275],[51.41610146,71.73776436],[51.57444191,72.07083321],[52.3972187,72.07609749],[53.09749031,72.59471321],[52.74888039,72.63304329],[53.21943855,72.6472187],[52.37638283,72.72470284],[53.38193703,72.88109016],[53.15332222,73.15582466],[54.91443825,73.4222126],[55.33166695,73.32998848]],[[71.04693794,73.50000191],[71.2650013,73.43637276],[70.99914742,73.2888813],[71.67665291,73.17692757],[69.86638069,73.03276253],[69.97442818,73.40721321],[71.04693794,73.50000191]],[[127.29637337,73.51721382],[129.11828804,73.09471321],[126.58943367,72.53581429],[126.52693367,72.40054512],[126.30246925,72.50110054],[126.44999886,72.78553963],[126.33387947,72.8972187],[126.77192879,73.07638741],[126.65941811,73.41693306],[127.29637337,73.51721382]],[[76.39027596,73.52083015],[76.76609993,73.43387032],[76.07415962,73.52137947],[76.39027596,73.52083015]],[[128.0555439,73.48304939],[127.38804817,73.52026558],[127.70776558,73.53553963],[128.0555439,73.48304939]],[[80.36053658,73.50027657],[80.05664253,73.55581856],[80.40359688,73.54609871],[80.36053658,73.50027657]],[[76.07777596,73.55803108],[75.3063221,73.41833687],[75.62109566,73.5499897],[76.07777596,73.55803108]],[[124.60443306,73.72859383],[125.56025887,73.40304756],[126.30887032,73.54582405],[126.15664864,73.37442207],[126.71499825,73.08442879],[126.27805519,72.87997627],[126.38582039,72.79275703],[126.24443245,72.51887703],[126.34832954,72.37997627],[126.12552834,72.30053902],[124.7650013,72.67082405],[122.42804146,72.9819355],[123.65886879,73.16804695],[123.21914864,73.40471077],[123.37692451,73.66249275],[124.60443306,73.72859383]],[[142.15497017,73.88998604],[143.43191719,73.52249336],[143.50583076,73.23027229],[139.65359688,73.40220833],[142.15497017,73.88998604]],[[124.54525948,73.85331917],[124.28777504,73.88443184],[124.65999031,73.89804268],[124.54525948,73.85331917]],[[86.48719978,73.90887642],[86.22331429,73.9663868],[86.30137825,73.97720528],[86.48719978,73.90887642]],[[84.41914558,74.03193855],[84.38943672,73.95555305],[83.87942696,74.00665474],[84.41914558,74.03193855]],[[82.6097126,74.04860115],[82.31469917,74.11442757],[82.73637581,74.09887886],[82.6097126,74.04860115]],[[83.61581612,74.09305],[82.81581306,74.09109688],[83.20277596,74.14972115],[83.61581612,74.09305]],[[85.53442574,74.12747383],[85.40887642,74.18969917],[85.73278999,74.16862679],[85.53442574,74.12747383]],[[135.6499958,74.20359993],[136.27249336,73.93580818],[135.35357857,74.25277901],[135.6499958,74.20359993]],[[141.02054024,73.99275398],[140.07275581,74.09776497],[140.87439156,74.27110481],[141.02054024,73.99275398]],[[116.06888008,74.28692818],[115.88582039,74.32026863],[116.06749153,74.36914253],[116.06888008,74.28692818]],[[59.03388405,74.34276009],[58.93499184,74.35832405],[59.08111,74.40915108],[59.03388405,74.34276009]],[[84.94525337,74.47776985],[84.74443245,74.39526558],[84.37303352,74.44859505],[84.94525337,74.47776985]],[[112.71331978,74.49887276],[113.433321,74.39387703],[112.78777504,74.09193611],[111.45555305,74.31666756],[112.71331978,74.49887276]],[[85.43942451,74.45359993],[85.14499092,74.54026985],[85.65332222,74.52943611],[85.43942451,74.45359993]],[[86.2124958,74.51832771],[85.65942574,74.47053719],[85.82361031,74.57026863],[86.2124958,74.51832771]],[[79.38611031,74.61720467],[79.61219978,74.59498787],[79.14915657,74.60304451],[79.38611031,74.61720467]],[[85.65555,74.7916584],[85.70027351,74.72165108],[85.09553719,74.74775887],[85.65555,74.7916584]],[[87.04971504,74.9791584],[86.83526802,74.82638741],[86.21110725,74.89860725],[87.04971504,74.9791584]],[[82.15193367,75.11554146],[82.02720833,75.12831306],[82.10748482,75.1583271],[82.15193367,75.11554146]],[[82.10582161,75.41220284],[82.29193306,75.33055305],[82.01193428,75.1722126],[81.4930439,75.35832405],[82.10582161,75.41220284]],[[147.01831245,75.3347187],[150.95303535,75.13943672],[148.70440865,74.75999641],[146.07025337,75.22665596],[146.41497993,75.58610725],[147.01831245,75.3347187]],[[140.74594307,75.65185738],[140.5194416,75.70582771],[140.76999092,75.67720222],[140.74594307,75.65185738]],[[135.65387154,75.36499214],[135.44412422,75.44081306],[135.70800972,75.84999275],[136.1777668,75.61914253],[135.65387154,75.36499214]],[[59.19249153,75.88804817],[58.99360847,75.89109993],[59.27832985,75.9083271],[59.19249153,75.88804817]],[[81.60026741,75.93525887],[82.25694466,75.86943245],[81.55081367,75.92360115],[81.60026741,75.93525887]],[[82.97303963,75.96914864],[83.30247688,75.94136238],[82.25721931,75.95860481],[82.97303963,75.96914864]],[[58.75471687,75.89694405],[58.69471169,75.89943123],[59.26693916,75.96943855],[58.75471687,75.89694405]],[[96.76693916,75.97526741],[96.69581795,76.01138496],[97.33728218,76.10208321],[96.76693916,75.97526741]],[[140.91079903,76.06694221],[140.84720039,76.09553719],[141.07940865,76.10942268],[140.91079903,76.06694221]],[[60.47249031,76.15999031],[59.86610603,76.1041584],[60.04110909,76.15693855],[60.47249031,76.15999031]],[[139.19079781,76.07222176],[140.47912788,75.63611031],[141.06079292,75.64526558],[140.97189522,76.03915596],[141.61969185,76.01249886],[141.35663033,76.1805439],[145.39471626,75.51748848],[143.94970894,75.02693367],[142.90359688,75.13388252],[142.50604439,75.453722],[143.04052925,75.66971016],[142.44748116,75.71110725],[142.15524483,75.37553596],[142.61245918,75.09971809],[143.70691109,74.93858528],[139.64694405,74.9791584],[139.09607124,74.6472187],[136.86136055,75.34915352],[137.40497017,75.35220528],[136.95855904,75.60421944],[137.74469185,75.74832344],[137.4499836,75.95471382],[139.19079781,76.07222176]],[[152.74133492,76.10775948],[152.45523262,76.15693855],[152.75665474,76.21193123],[152.74133492,76.10775948]],[[95.19941902,76.15776253],[95.00277901,76.17248726],[95.08450508,76.22079659],[95.19941902,76.15776253]],[[94.99748421,76.26915169],[94.8402729,76.17943001],[94.40803719,76.20498848],[94.99748421,76.26915169]],[[96.36638069,76.30108833],[96.64943123,76.24887276],[95.26361275,76.21304512],[96.36638069,76.30108833]],[[96.75694466,76.32277107],[96.66470528,76.29248238],[96.38304329,76.3319416],[96.75694466,76.32277107]],[[96.99748421,76.27720833],[96.71110725,76.2136097],[96.83442879,76.34694099],[96.99748421,76.27720833]],[[113.43997383,76.36053658],[113.11876106,76.36999702],[113.25888252,76.43637276],[113.43997383,76.36053658]],[[94.35721016,76.57443428],[93.86998177,76.58499336],[93.95181465,76.60981941],[94.35721016,76.57443428]],[[112.52192879,76.62248421],[112.71388435,76.51054573],[111.95665169,76.5986042],[112.52192879,76.62248421]],[[95.59887886,76.66998482],[95.41276741,76.69970894],[95.8319416,76.68553352],[95.59887886,76.66998482]],[[95.13304329,76.70277596],[95.32693672,76.6611042],[94.81303596,76.64888191],[95.13304329,76.70277596]],[[96.46408272,76.70601082],[96.24220467,76.6097126],[95.88916206,76.62137032],[96.46408272,76.70601082]],[[97.54637337,76.58221626],[97.31637764,76.60664558],[97.44053841,76.71499825],[97.54637337,76.58221626]],[[149.31442451,76.75360298],[149.16885567,76.65054512],[148.39221382,76.64360237],[149.31442451,76.75360298]],[[97.86998177,76.77026558],[97.72943306,76.81833076],[97.9194355,76.83831978],[97.86998177,76.77026558]],[[68.26609993,76.95860481],[68.93136787,76.78276253],[68.86110115,76.54193306],[61.28777504,75.32609749],[59.92555428,74.99914742],[60.68027687,74.933321],[60.31860542,74.76054573],[59.50999641,74.79498482],[59.77332497,74.59109688],[59.16944313,74.71971321],[59.1472187,74.43858528],[58.18335152,74.57353401],[58.74276924,74.26693916],[58.13582802,73.98526192],[57.2575016,74.07609749],[57.91166115,73.91554451],[57.7152729,73.71304512],[56.55582619,73.88220406],[57.61361122,73.66220284],[56.72304726,73.67360115],[57.25332832,73.48776436],[56.75889015,73.24693489],[55.90777016,73.44026375],[55.97748756,73.31749153],[54.97165871,73.44220161],[54.22054482,73.32304573],[55.17610359,73.70610237],[53.63054848,73.75526619],[55.86638832,74.10247993],[55.07332802,74.26443672],[56.29055214,74.49136543],[55.57166481,74.65971565],[56.9845829,74.68715096],[55.82972145,74.79609871],[56.67860603,74.95221138],[55.79777718,75.14637947],[57.73721504,75.32304573],[57.50332832,75.49247932],[58.19471169,75.58831978],[58.00139046,75.67415047],[60.75000191,76.00610542],[61.06638527,76.27388191],[64.1097126,76.31137276],[68.26609993,76.95860481]],[[88.66470528,77.09637642],[88.95721626,77.12581062],[88.78305244,77.00499153],[88.66470528,77.09637642]],[[96.57554817,77.13026619],[96.16609383,76.98915291],[95.2291584,76.99331856],[96.57554817,77.13026619]],[[156.61773872,77.10386848],[156.43414497,77.13527107],[156.73217964,77.12581062],[156.61773872,77.10386848]],[[90.18026924,77.11581612],[89.96721077,77.11303902],[89.82971382,77.14082527],[90.18026924,77.11581612]],[[105.88472176,77.26138496],[105.78055,77.27415657],[106.00776863,77.28248787],[105.88472176,77.26138496]],[[89.68165779,77.28442574],[89.48526192,77.17997932],[89.13582039,77.20498848],[89.68165779,77.28442574]],[[106.40248299,77.30359077],[106.33167458,77.31805611],[106.45833015,77.31526375],[106.40248299,77.30359077]],[[107.56192207,77.25499153],[107.20027351,77.23387337],[107.6666584,77.33082771],[107.56192207,77.25499153]],[[106.64665413,77.37608528],[106.50417519,77.38998604],[106.90081978,77.45915413],[106.64665413,77.37608528]],[[82.56025887,77.46193123],[82.12025642,77.50638008],[82.44386482,77.51027107],[82.56025887,77.46193123]],[[91.9663868,77.59999275],[91.73970222,77.6472187],[92.03776741,77.63081551],[91.9663868,77.59999275]],[[104.26748848,77.67581367],[106.29193306,77.36276436],[104.11720467,77.09082222],[107.50360298,76.9222126],[106.40109444,76.50972176],[111.10386848,76.75526619],[112.74275398,76.32832527],[112.56667519,76.04054451],[113.24275398,76.26220894],[113.89248848,75.84999275],[113.50943184,75.53248787],[112.33719826,75.84665108],[113.71748543,75.40860176],[108.18969917,73.67025948],[107.14248848,73.61470222],[105.21193123,72.76471138],[106.33387947,73.18719673],[110.91432381,73.6966877],[109.52916145,73.77026558],[110.20041084,74.02444649],[111.54332161,74.04498482],[111.20139503,73.96748543],[112.24832344,73.7069416],[112.88777351,73.96499825],[113.49942207,73.33415413],[113.48636818,72.95833015],[113.10443306,72.85359383],[113.17859077,72.7236042],[114.04471016,72.59721565],[113.15109444,72.83943367],[113.53082466,72.96026802],[113.54694557,73.24220467],[114.03386879,73.34193611],[113.47527504,73.50416756],[118.63443184,73.57165718],[118.9938755,73.48915291],[118.39221382,73.23581123],[119.81775856,72.93580818],[121.86580849,72.96805],[124.72971535,72.6263752],[126.11775398,72.26693916],[126.37248421,72.35331917],[127.1294117,71.85109138],[127.22054482,71.39248848],[127.32608223,71.89804268],[126.71914864,72.38888741],[127.65860176,72.34749031],[128.71164131,71.77054024],[129.17993355,71.80026436],[129.07248116,72.00193977],[129.53994942,71.72221565],[128.84744453,71.6013813],[131.13025093,70.73109627],[132.18469429,71.21470833],[131.94662666,71.28915596],[132.72802925,71.94192696],[133.67914009,71.433321],[135.86496162,71.63971138],[137.85412788,71.11137581],[138.2213459,71.26220894],[137.8241291,71.38388252],[138.06607246,71.57361031],[139.93246651,71.48498726],[139.33664131,71.94552803],[140.19830513,72.20332527],[139.0852375,72.23332405],[141.02414131,72.58581734],[140.74884224,72.88943672],[146.84802437,72.34749031],[144.13858223,72.27083015],[144.39193916,72.17192268],[145.08636665,72.25915718],[146.93026924,72.30941963],[145.96466255,71.84694099],[145.98855782,72.02554512],[146.33996773,72.12803841],[145.98550606,72.06137276],[145.89831734,72.20610237],[145.71164131,72.25221443],[145.60830879,72.24359322],[145.7491169,72.20721626],[145.61496162,72.08055305],[145.80240059,71.92553902],[144.95691109,71.95833015],[145.21634102,71.82721138],[144.91330147,71.69581795],[145.31884956,71.65803719],[146.08828926,71.79387093],[147.13971138,72.31721687],[149.18524361,72.22249031],[150.07525826,71.88388252],[148.82357979,71.66998482],[150.66775703,71.48942757],[150.023592,71.20749092],[151.45331001,71.34332466],[152.14108467,70.99748421],[151.66360664,70.98082161],[152.53830147,70.83777046],[155.93719673,71.09443855],[159.05386543,70.86914253],[160.03802681,70.40555],[159.7296772,69.8347187],[160.99524117,69.58831978],[160.96386909,69.10359383],[161.41165352,68.97970772],[161.06607246,68.56331062],[160.84607124,68.52276802],[161.12774849,68.55525398],[161.3194294,68.79248238],[161.5796833,68.91499519],[161.44607735,69.38554573],[164.01443672,69.76748848],[166.86050606,69.49054146],[167.78692818,69.77609444],[168.2833271,69.24165535],[170.61194038,68.7563343],[171.03192329,69.04220772],[170.60913277,69.5802784],[170.12384224,69.60998726],[170.56720161,69.77804756],[170.47189522,70.13415718],[173.19192696,69.77971077],[176.11190987,69.89055061],[180.00000191,68.98010445],[180.00000191,65.0689106],[178.5222187,64.58804512],[178.75555611,64.68220711],[177.60940742,64.71805],[176.89972115,65.08360481],[176.3027668,65.0499897],[177.30331612,64.82777596],[174.43664742,64.68831062],[177.48608589,64.76138496],[177.63189888,64.31888008],[178.36746407,64.27388191],[178.75747871,63.63999367],[178.26165962,63.56249428],[178.68802071,63.38305092],[178.7722187,63.5949955],[179.40860176,63.14277077],[179.23663521,62.99415779],[179.5610981,62.62137794],[179.06137276,62.28472328],[176.97552681,62.86554909],[177.26553535,62.57471657],[172.71078682,61.42999458],[172.95608711,61.30277443],[170.64193916,60.41749763],[170.24884224,59.90943336],[169.2102375,60.62276649],[167.05026436,60.32388496],[166.13775826,59.81527138],[166.34857368,60.48638344],[164.99719429,60.12943459],[165.18246651,59.9811039],[164.83218575,59.78110695],[164.4685688,60.11138344],[164.15555,59.85277748],[163.63553047,60.04554939],[163.17303658,59.55916023],[163.19357491,59.05360603],[162.87634468,59.12804604],[163.04477119,59.01031685],[161.9388752,58.07444191],[162.34607124,57.68471718],[162.57107735,57.95110512],[163.21359444,57.83610725],[162.73690987,57.35777473],[162.79135323,56.79110909],[163.21386909,56.74054909],[163.3546772,56.19860268],[162.64526558,56.19193459],[163.08914375,56.53416634],[162.39358711,56.3999958],[162.5722065,56.26721382],[162.03692818,56.06166267],[161.71246529,55.49694252],[162.11218452,54.76194191],[160.00583076,54.13916206],[159.7916584,53.51471901],[160.05523872,53.09360695],[158.4305439,53.02193642],[158.64471626,52.89471626],[158.27581978,51.93665504],[156.66830635,50.88166237],[155.54413033,55.30360603],[155.94885445,56.66610146],[156.97775459,57.41443825],[156.74884224,57.7283268],[158.23330879,58.0194416],[161.91443062,60.42276955],[163.6583271,60.87193489],[164.12774849,62.28277016],[165.64248848,62.45277596],[164.35940742,62.71221352],[163.26361275,62.54500008],[162.95025826,61.80638313],[163.28802681,61.66443825],[162.40332222,61.67249489],[160.13775826,60.58360481],[160.39135933,61.02582741],[159.78055,60.94082832],[159.82718086,61.26138496],[160.35495186,61.94748878],[159.53109932,61.66276741],[159.24746895,61.92222023],[157.48663521,61.80332375],[154.23272896,59.88193703],[154.11413765,59.4597187],[155.19052315,59.35780525],[154.74164009,59.12693977],[153.3685627,59.24305153],[152.87716866,58.91749763],[151.30941963,58.83693886],[151.07357979,59.11055183],[152.28775215,59.22693825],[149.59857368,59.77137947],[148.74301338,59.49166298],[148.89804268,59.23916054],[143.92636299,59.41332436],[142.15970039,59.06916237],[140.68857002,58.233881],[140.4963398,57.82332802],[135.15442085,54.85943794],[135.73663521,54.57055092],[136.81607246,54.65138435],[136.76080513,53.76860237],[137.17248726,53.8347187],[137.28912544,54.03360939],[137.06189156,54.1408329],[137.18716621,54.21471596],[137.73886299,54.31721687],[137.30798531,54.11444283],[137.85913277,53.96138191],[137.31079292,53.53277016],[138.55386543,53.9894352],[138.23941231,53.56249428],[138.44412422,53.51055336],[138.64193916,54.29527473],[139.7463398,54.30888557],[141.41913033,53.29027748],[141.1999836,52.98638344],[140.7055378,53.11305428],[141.51416206,52.21332741],[140.46051216,50.70665932],[140.69580269,50.0874958],[140.40747261,49.87166023],[140.17581367,48.44860268],[135.1296711,43.49888039],[133.15136909,42.68221474],[132.31051826,42.84443855],[132.35217476,43.29277229],[131.94302559,43.06388283],[132.05636787,43.31332588],[131.81051826,43.3255558],[131.2213459,42.55582619],[130.6999836,42.67916298],[130.69742012,42.29220772],[130.63888741,42.40693855],[130.60437202,42.42186165],[130.40524483,42.71805],[131.12329292,42.91082191],[131.31137276,43.39222145],[130.9499836,44.84110451],[131.86468697,45.34554482],[133.12219429,45.12860298],[133.90017891,46.25031471],[134.18246651,47.32332802],[134.76721382,47.70749855],[134.74075508,48.2671299],[133.08856392,48.10166359],[132.52108955,47.71027565],[130.98855782,47.68860054],[130.52163887,48.60777473],[130.67163277,48.86499977],[127.52942848,49.78916359],[127.58606911,50.20856667],[126.09554482,52.76444435],[123.38220406,53.52665901],[120.86387825,53.2797184],[120.02916145,52.76805305],[120.7136097,52.54471779],[120.77665901,52.11499977],[119.13860512,50.39471626],[119.36136818,50.33693886],[119.21415901,50.01527596],[117.87471199,49.52057838],[116.71138191,49.83046913],[114.31302834,50.28416634],[113.09082222,49.5986042],[110.78859138,49.14943886],[108.57222176,49.33360481],[107.94914436,49.67804909],[107.97712898,49.94362831],[106.66304207,50.33860207],[102.91858864,50.31527138],[102.32776833,50.56971931],[102.21887398,51.33360481],[98.93026924,52.14361],[97.82777596,51.00110817],[98.28970528,50.29388618],[97.34082222,49.73443794],[94.63527107,50.02443886],[94.2749958,50.56944466],[92.32277107,50.81499672],[87.84070015,49.17295265],[87.34820747,49.09262276],[86.61665535,49.58721352],[86.7749958,49.78888893],[86.19108772,49.47249031],[85.25860786,49.59137917],[85.01443672,50.07583046],[84.36303902,50.21221352],[83.45637703,51.00249672],[81.46805,50.74221992],[80.6878376,51.31472206],[80.07795906,50.75808907],[77.90803719,53.27110481],[76.52165413,53.99388313],[76.81164742,54.44777107],[74.42915535,53.47860146],[73.43719673,53.43610573],[73.23858833,53.6444416],[73.76388741,54.06554604],[72.61331367,54.14527321],[72.46859932,53.90888405],[72.05165291,54.38777351],[72.19609261,54.13749886],[71.18553352,54.1033268],[70.99693489,54.33915901],[71.27887154,54.69027138],[70.84332466,55.3019352],[69.18553352,55.34388161],[65.48332405,54.63804817],[65.2163868,54.31888771],[63.17222023,54.18638039],[62.54749489,53.87943459],[61.01416206,53.94748878],[61.22693825,53.81193733],[60.90555,53.62027168],[61.57749367,53.51333046],[61.18471718,53.30665779],[62.11832619,53.00416756],[61.09916115,52.98166084],[60.69415474,52.68082619],[61.06193733,52.34249306],[60.00222206,51.95833015],[61.68582344,51.2658329],[61.38138008,50.78360939],[60.04361153,50.86332893],[59.54249763,50.4783268],[58.33777046,51.15609932],[57.4819355,50.86471748],[56.51082802,51.08333015],[55.69249153,50.5324955],[54.6472187,51.03694344],[54.52393532,50.52884102],[54.50638771,50.85694313],[53.42860603,51.49166298],[52.6033268,51.4569416],[52.33832741,51.78221321],[51.30304909,51.47971535],[50.77330208,51.76918221],[48.69748878,50.59193611],[48.79694557,49.94193459],[48.25166512,49.86971474],[47.52083015,50.43638039],[46.92943764,49.86361122],[46.79583168,49.33971596],[47.06276894,49.14277077],[46.49916267,48.41749763],[47.12276649,48.27166176],[47.38332558,47.68888283],[48.20443153,47.70498848],[49.02720833,46.77609444],[48.56054878,46.56499672],[49.22252846,46.34630775],[48.62776375,46.08276558],[48.71332741,45.83027077],[48.56582069,45.96582985],[47.83054543,45.65582466],[47.55221748,45.7694416],[47.63721657,45.55304146],[47.38027382,45.74471474],[47.56915474,45.5574894],[46.6797123,44.52304268],[47.35026741,44.02665138],[47.40720558,43.50110054],[47.69832039,43.8688755],[47.46221352,43.01915169],[48.58395576,41.83577156],[47.76693153,41.19609261],[46.57138252,41.87193489],[46.45175362,41.89705849],[44.93470955,42.7602787],[43.91193581,42.58332253],[42.84999275,43.17915535],[40.25338936,43.58252144],[40.00296974,43.37926674],[38.7602787,44.27026558],[36.57527351,45.18470955],[36.96054268,45.2749958],[36.83082771,45.43664742],[37.73720741,45.29916573],[37.59137154,45.62748146],[37.94026375,46.02582741],[38.57443428,46.08970833],[37.73499489,46.66916084],[38.58165932,46.65082741],[38.41081429,46.82805061],[39.2999897,47.07693672],[38.23582649,47.10943031],[38.30332375,47.55859566],[38.85360146,47.86082649],[39.79638863,47.85721779],[39.99888039,48.29722023],[39.65693855,48.61666298],[40.07666206,48.87499428],[39.69665718,49.01082802],[40.16694069,49.24860573],[40.13976479,49.60105324],[38.30777168,50.07388496],[38.02422523,49.90308571],[37.45860481,50.43971443],[35.60665321,50.36944008],[35.37188911,51.04143715],[34.38221169,51.26361275],[34.09804726,51.65387917],[34.41971779,51.80888557],[33.83888435,52.36055183],[33.41770363,52.35540199],[31.78388786,52.10804939],[31.26694298,53.02471352],[32.74110603,53.46305275],[31.76422691,53.80262184],[31.84416389,54.06443977],[30.78138924,54.79361153],[31.02972221,55.04332924],[30.92624855,55.60257149],[28.16801262,56.15015602],[27.70166206,56.91471291],[27.86110878,57.30221748],[27.37206078,57.53563881],[27.82305336,57.87388039],[27.42610741,58.81360817],[28.17035866,59.30978203],[28.0158329,59.47860146],[28.0802784,59.79638863],[30.24582863,59.97526741],[28.60194206,60.38443947],[28.68666267,60.73582649],[27.80783272,60.54640388],[31.58893013,62.91441536],[29.99333382,63.74360847],[30.57805443,64.22137642],[29.63666725,64.92805672],[29.81888771,65.65332222],[30.13416481,65.71916389],[29.07499886,66.89583015],[30.02861214,67.69471931],[28.69333458,68.19749641],[28.45749855,68.53193855],[28.82055473,68.84443855],[28.43194389,68.89694405],[28.95734215,69.05162239],[30.10333443,69.66305733],[30.91000175,69.54887581],[30.85484123,69.79231453],[33.09360695,69.74748421],[32.0263958,69.63653755],[33.02941704,69.4718647],[32.80999184,69.29609871],[33.52166176,69.42192268],[33.02276802,68.95332527],[33.71915627,69.33137703],[35.97499275,69.17303658],[40.99221992,67.71609688],[41.39055061,67.12275887],[41.21971321,66.83777046],[40.07332802,66.2777729],[38.60777473,66.05220222],[31.85499763,67.15387154],[33.73249245,66.42387581],[33.31276894,66.31608772],[34.84749031,65.90109444],[34.9636097,65.71776009],[34.69082832,65.80386543],[34.68166542,65.45109749],[34.37777138,65.37831306],[34.93610573,64.83831978],[34.78777504,64.54776192],[37.41499519,63.80388069],[38.07749367,64.01721382],[37.97887611,64.31666756],[37.14471626,64.40887642],[36.43971443,64.94275093],[37.03221321,65.20833015],[38.40860176,64.85887337],[38.04694557,64.64109993],[40.50583076,64.53526497],[39.75139046,65.55081367],[42.16832924,66.52276802],[43.29972267,66.4222126],[43.69748878,66.23581123],[43.35471535,66.03859138],[43.85804939,66.17692757],[44.17444038,65.87469673],[44.49638557,66.90748787],[43.75193977,67.31888008],[44.24582863,68.27026558],[43.31166267,68.68498421],[45.90332222,68.48221016],[46.52083015,68.14415169],[46.7069416,67.81303596],[45.38249397,67.73553658],[44.91193581,67.37275887],[46.60083199,66.85331917],[46.38555336,66.73970222],[47.69971657,66.98637581],[47.99499702,67.65027046],[49.10110664,67.62803841],[48.59110451,67.93498421],[52.07471657,68.5444355],[52.26860237,68.30581856],[52.73304939,68.4663868],[52.28833199,68.61415291],[53.78360939,68.96805],[54.56082344,68.99247932],[53.59887886,68.90803719],[54.01915932,68.85525703],[53.71971321,68.65193367],[53.94582558,68.3999958],[53.20999336,68.26138496],[54.79194069,68.16304207],[55.32473183,68.55000496],[57.27610207,68.55581856],[58.8983326,68.99971199],[59.42721748,68.74525642],[59.07332802,68.42137337],[59.83610725,68.36665535],[59.81166267,68.68193245],[60.91443825,68.90471077],[60.14055061,69.57415962],[60.87443733,69.86360359],[64.15054512,69.54193306],[65.00277901,69.29803658],[64.78776741,69.14276314],[67.11609077,68.84276009],[67.03915596,68.78970528],[67.19304085,68.70471382],[68.15942574,68.41137886],[68.2650013,68.18748665],[68.43637276,68.22499275],[69.22026253,68.95721626],[68.4597187,68.97804451],[68.10165596,69.54664803],[67.00055122,69.69970894],[66.95027351,69.52887154],[66.79915047,69.57415962],[66.87330818,70.00110054],[67.32777596,70.09749031],[67.08804512,70.21721077],[67.33970833,70.75027657],[66.6888752,70.76054573],[66.89166451,71.07748604],[66.62303352,71.05165291],[68.46554756,71.81889534],[69.33387947,72.94886971],[71.56053352,72.90971565],[72.83333015,72.70860481],[72.8819294,72.28137398],[71.80247688,71.47249031],[72.84054756,70.8652668],[72.77804756,70.41804695],[72.42469978,70.27026558],[72.68637276,69.84971809],[72.55386543,68.97665596],[73.64804268,68.45776558],[73.09803963,68.21693611],[73.04081917,67.72415352],[72.04054451,67.29693794],[72.23109627,67.16053963],[71.41026497,66.96693611],[71.55859566,66.64526558],[70.69497871,66.50804329],[70.29136848,66.62387276],[70.73082161,66.75721931],[68.96776009,66.80415535],[69.38611031,66.50749397],[72.00000191,66.21943855],[73.84721565,66.98109627],[73.90887642,67.29803658],[74.73997688,67.6916523],[74.73166084,68.14305305],[74.33276558,68.38026619],[74.64055061,68.76915169],[76.59166145,68.96832466],[77.32443428,68.51693916],[77.09193611,67.77859688],[79.04484749,67.56715584],[77.4624958,67.76220894],[77.55859566,68.14387703],[78.17469978,68.2650013],[77.63499641,68.90776253],[76.03720284,69.23719978],[73.74942207,69.16804695],[73.8944416,69.42581367],[73.51638985,69.75555611],[74.31498909,70.67360115],[73.01527596,71.42164803],[73.53219795,71.81915474],[74.95804024,72.10942268],[74.82998848,72.83415413],[75.71582222,72.55664253],[75.24193001,71.37608528],[76.91581917,71.06971931],[79.11276436,71.00248909],[76.27054024,71.57165718],[76.09749031,71.92859077],[78.10473824,71.87614632],[77.36998177,72.09887886],[78.53804207,72.40359688],[81.65304756,71.70804024],[83.26164436,71.7210865],[82.25749397,71.25972176],[82.41443062,70.77110481],[82.08110237,70.56776619],[82.34610176,70.19859505],[82.16026497,70.57748604],[83.11886787,70.88749886],[82.63916206,70.17442513],[83.1069355,70.06860542],[83.19359016,70.12330818],[83.13054085,70.20804024],[82.95166206,70.32054329],[83.53166389,70.33915901],[83.74553108,70.45999336],[83.1483326,71.23610115],[83.62858772,71.62387276],[82.19247627,72.28305244],[80.72137642,72.52609444],[80.81721687,72.96609688],[80.23109627,73.17360115],[80.57249641,73.22053719],[80.2485981,73.31414986],[80.50999641,73.57165718],[87.08693123,73.85942268],[85.77832222,73.4597187],[86.78360176,72.9940815],[85.84803963,73.47526741],[87.66499519,73.89471626],[85.95109749,74.28082466],[87.13275337,74.36914253],[85.78915596,74.63081551],[86.02916145,74.81303596],[86.91304207,74.6124897],[87.38665962,74.94304085],[87.18165779,74.98997688],[87.78581429,75.0222187],[86.99498177,75.15138435],[94.16192818,75.94275093],[92.8652668,75.94832039],[93.15555,76.09776497],[96.19775581,76.08526802],[95.74386787,75.85054207],[99.27693367,76.21415901],[99.76832771,76.03109932],[99.09443855,75.55497932],[100.18625832,75.16853523],[99.17192268,75.56999397],[99.87719917,76.09166145],[98.8138752,76.49275398],[102.23359871,76.37719917],[100.87831306,76.55137825],[101.2347126,76.75305367],[100.84971809,76.87858772],[103.10555458,77.6319294],[104.26748848,77.67581367]],[[86.90220833,73.69748116],[86.39499092,73.58831978],[86.73665047,73.59526253],[86.90220833,73.69748116]],[[40.27443886,64.87414742],[40.27887917,64.94581795],[40.2097187,64.99247932],[40.27443886,64.87414742]],[[107.63527107,78.16609383],[107.4388752,78.04942513],[106.4930439,78.12164497],[107.63527107,78.16609383]],[[93.75055122,78.15582466],[93.51971626,78.18776131],[93.64027596,78.22276497],[93.75055122,78.15582466]],[[106.76138496,78.30359077],[105.99275398,78.21415901],[106.45860481,78.3347187],[106.76138496,78.30359077]],[[92.70221138,79.07138252],[92.18261909,79.12718391],[92.72554207,79.07499886],[92.70221138,79.07138252]],[[102.97276497,79.33137703],[102.39333534,78.82859993],[103.94693184,79.13333321],[105.41443062,78.56469917],[99.34137154,78.01999092],[100.37831306,78.74525642],[101.16805458,78.75833321],[100.89388466,78.97665596],[101.62442207,78.98221016],[100.98887825,79.0610981],[101.55081367,79.34832954],[102.97276497,79.33137703]],[[92.8055439,79.38247871],[92.58221626,79.40693855],[92.98776436,79.41693306],[92.8055439,79.38247871]],[[92.46748543,79.42997932],[92.24359322,79.37997627],[91.80415535,79.41249275],[92.46748543,79.42997932]],[[99.94581795,79.40138435],[99.85054207,79.41554451],[100.01776314,79.43304634],[99.94581795,79.40138435]],[[91.46859932,79.45471382],[90.78193855,79.54915047],[91.16609383,79.52693367],[91.46859932,79.45471382]],[[76.23248482,79.6013813],[76.04193306,79.63472176],[77.61970711,79.51220894],[76.23248482,79.6013813]],[[100.01082039,79.62220955],[100.30664253,79.66470528],[99.90359688,79.59999275],[100.01082039,79.62220955]],[[91.65109444,79.65109444],[91.12442207,79.72249031],[91.85887337,79.66470528],[91.65109444,79.65109444]],[[58.68638039,79.94470406],[58.98804665,79.89554024],[58.27916145,79.92665291],[58.68638039,79.94470406]],[[94.30775642,80.01693916],[93.92747688,79.96832466],[93.98825264,80.00978279],[94.30775642,80.01693916]],[[49.37915993,79.98915291],[49.19360542,80.03221321],[49.43526649,80.00248909],[49.37915993,79.98915291]],[[51.20499611,80.03804207],[51.50193977,79.93165779],[50.04388618,79.97303963],[51.20499611,80.03804207]],[[91.17637825,80.05304146],[93.80859566,79.88832283],[91.92164803,79.67331123],[92.34999275,79.72776985],[90.86442757,80.05720711],[91.17637825,80.05304146]],[[59.42222023,79.92025948],[58.75916481,80.02276802],[59.84471321,80.06833076],[59.42222023,79.92025948]],[[49.59610176,80.07277107],[49.68305397,80.03637886],[49.3302784,80.06192207],[49.59610176,80.07277107]],[[50.25277901,80.14637947],[49.97249031,80.05415535],[49.53221321,80.15220833],[50.25277901,80.14637947]],[[97.61499214,80.16554451],[98.03442574,80.06749153],[97.19304085,79.70221138],[98.52859688,80.05247688],[100.01526833,79.82415962],[99.65915108,79.29582405],[99.03526497,79.29026985],[99.9388752,78.95332527],[97.30470467,78.84526253],[94.77720833,79.08442879],[94.33249092,79.46554756],[93.69886971,79.45610237],[93.87803841,79.6013813],[92.85081673,79.55386543],[94.61609077,79.81192207],[94.22221565,79.89776802],[94.93664742,80.09942818],[95.2694416,80.01638985],[95.5802784,80.11137581],[97.61499214,80.16554451]],[[60.26166725,80.16331673],[59.89777565,80.1916523],[60.28943825,80.16693306],[60.26166725,80.16331673]],[[55.15110207,80.22026253],[54.85750008,80.25248909],[55.54388618,80.29387093],[55.15110207,80.22026253]],[[53.62110329,80.29498482],[53.87166023,80.25665474],[52.18138313,80.27192879],[53.62110329,80.29498482]],[[54.22193336,80.20416451],[54.15138435,80.29942513],[54.43971443,80.29860115],[54.22193336,80.20416451]],[[57.09694099,80.34305],[57.05054665,80.07499886],[55.7136097,80.10109138],[57.09694099,80.34305]],[[52.45249367,80.32110786],[52.16666603,80.35026741],[52.52137947,80.33082771],[52.45249367,80.32110786]],[[55.36693764,80.42886543],[55.16749763,80.36943245],[54.97748756,80.41693306],[55.36693764,80.42886543]],[[56.30804634,80.38136482],[55.78611183,80.40721321],[55.87304878,80.43525887],[56.30804634,80.38136482]],[[54.63721657,80.39360237],[54.37027168,80.40582466],[54.86305428,80.45027351],[54.63721657,80.39360237]],[[57.96832466,80.48942757],[59.27638435,80.33415413],[57.71859932,80.09832954],[56.94638252,80.47442818],[57.96832466,80.48942757]],[[54.30166054,80.41914558],[53.77999306,80.46943855],[54.4588871,80.49803352],[54.30166054,80.41914558]],[[55.0158329,80.55693245],[55.1630497,80.49470711],[54.64110756,80.52804756],[55.0158329,80.55693245]],[[53.44221687,80.48498726],[53.10527229,80.61998177],[53.39860725,80.62664986],[53.44221687,80.48498726]],[[58.85527229,80.64027596],[58.80638313,80.58276558],[58.53777504,80.60582161],[58.85527229,80.64027596]],[[58.01055336,80.64109993],[57.87082863,80.55331612],[57.21305275,80.60359383],[58.01055336,80.64109993]],[[56.77887917,80.73581123],[56.94860268,80.69275093],[55.43249702,80.70833015],[56.77887917,80.73581123]],[[47.89777565,80.80331612],[48.76638985,80.64637947],[47.75166512,80.76638985],[47.30332375,80.65748787],[47.42360878,80.58888435],[46.08416176,80.43692207],[46.03638649,80.57222176],[44.85750008,80.61638069],[47.89777565,80.80331612]],[[62.21832466,80.8110981],[61.06610298,80.40359688],[59.2208271,80.64276314],[62.21832466,80.8110981]],[[55.44999886,80.8513813],[55.98276711,80.79582405],[53.9755497,80.81749153],[55.44999886,80.8513813]],[[58.9866581,80.7916584],[57.81638527,80.80581856],[58.75666237,80.89610481],[58.9866581,80.7916584]],[[50.13305092,80.84665108],[51.74694252,80.71220589],[48.80971718,80.3763752],[48.62276649,80.30026436],[49.11305428,80.18275642],[48.37416267,80.08720589],[46.61638832,80.29081917],[48.18387794,80.33137703],[47.38027382,80.45054817],[49.19221687,80.52137947],[49.68138313,80.71748543],[48.95416451,80.73137093],[50.44137764,80.90387154],[50.13305092,80.84665108]],[[79.97720528,80.95248604],[80.43776131,80.92637825],[78.97276497,80.8374958],[79.97720528,80.95248604]],[[58.53333473,80.95305061],[57.83416176,81.04525948],[58.69887733,81.02554512],[58.53333473,80.95305061]],[[50.59721565,81.04609871],[50.34749031,81.0902729],[50.98333168,81.10054207],[50.59721565,81.04609871]],[[56.24249458,81.10109138],[58.27860451,80.91971016],[56.09638405,81.08915901],[56.24249458,81.10109138]],[[58.75805092,81.07332039],[58.51527596,81.10443306],[58.80804634,81.09749031],[58.75805092,81.07332039]],[[54.74943733,81.1097126],[57.7208271,80.79248238],[54.41832924,81.00610542],[54.74943733,81.1097126]],[[60.98526955,80.91609383],[60.0249958,80.99165535],[61.65416145,81.11081123],[60.98526955,80.91609383]],[[58.44526863,81.11415291],[58.14943886,81.12886238],[58.64860725,81.13499641],[58.44526863,81.11415291]],[[91.25027657,81.06303596],[89.89360237,81.16859627],[91.57721138,81.14305305],[91.25027657,81.06303596]],[[65.45248604,81.0277729],[64.30304146,80.72998238],[62.50416756,80.81833076],[64.48359871,81.19108772],[65.45248604,81.0277729]],[[59.76638985,81.17025948],[59.01082802,81.20721626],[59.84471321,81.17997932],[59.76638985,81.17025948]],[[57.56499672,81.12526131],[56.99471474,81.16554451],[58.08055305,81.2097187],[57.56499672,81.12526131]],[[95.95860481,81.21721077],[97.96943855,80.71554756],[97.1291523,80.66276741],[97.42637825,80.31080818],[97.15887642,80.23359871],[94.80970955,80.13998604],[93.75305367,79.995821],[92.06164742,80.17025948],[93.24664497,80.3055439],[91.42137337,80.30775642],[92.62387276,80.38499641],[91.88943672,80.45776558],[93.32554817,80.80581856],[92.4874897,80.76748848],[93.06860542,80.99443245],[95.95860481,81.21721077]],[[60.63888741,81.2722187],[60.37748909,81.24414253],[59.72221565,81.2833271],[60.63888741,81.2722187]],[[57.45804787,81.31360054],[57.9027729,81.29026985],[55.43166542,81.27165413],[57.45804787,81.31360054]],[[59.05332375,81.28499031],[58.46193886,81.33859444],[59.38166237,81.32415962],[59.05332375,81.28499031]],[[54.29361153,81.33333015],[54.42193794,81.27026558],[54.11471748,81.34721565],[54.29361153,81.33333015]],[[57.79666328,81.52998543],[58.57249641,81.41192818],[56.74138069,81.44859505],[57.79666328,81.52998543]],[[58.49083138,81.55887032],[58.22665596,81.58137703],[58.71971321,81.59971809],[58.49083138,81.55887032]],[[62.08082771,81.54414558],[61.65443611,81.60304451],[62.20360756,81.56498909],[62.08082771,81.54414558]],[[62.79332924,81.70860481],[63.80277443,81.65332222],[62.10416603,81.67248726],[62.79332924,81.70860481]],[[59.28750038,81.74275398],[57.88888741,81.7069416],[59.43776894,81.81666756],[59.28750038,81.74275398]]]}, -{code:"RW", name:"Rwanda", lng:29.917, lat:-1.998, borders:[[[29.952221,-2.30944385],[29.85083,-2.75972151],[29.024441,-2.74471892],[28.868332,-2.39444302],[29.596943,-1.38583348],[29.974998,-1.46444332],[30.48222,-1.06333302],[30.894165,-2.07611068],[30.57333,-2.39916521],[29.952221,-2.30944385]]]}, -{code:"SA", name:"Saudi Arabia", lng:44.585, lat:24.023, borders:[[[41.95777321,16.7088871],[41.75361061,16.87611198],[42.17999458,16.56694603],[41.95777321,16.7088871]],[[41.98666573,16.75333214],[41.83722115,16.86861229],[41.84555244,17.00916481],[41.98666573,16.75333214]],[[37.08055305,24.95916557],[37.03582954,24.96305656],[37.04166603,24.99694633],[37.08055305,24.95916557]],[[35.75471687,27.09472084],[35.75777626,27.07694435],[35.72638893,27.12861061],[35.75471687,27.09472084]],[[49.53721046,27.36360741],[49.63861275,27.31638527],[49.45221138,27.28582954],[49.53721046,27.36360741]],[[34.59360695,27.90916634],[34.49221992,27.99611092],[34.54666328,27.99860954],[34.59360695,27.90916634]],[[44.72166252,29.19833183],[46.54694557,29.10420036],[47.45999336,28.99944115],[47.68888283,28.53888512],[48.41658974,28.54527855],[48.83887672,27.61971855],[50.15916634,26.65666771],[49.99389076,26.01999855],[50.83095741,24.74996758],[51.21516609,24.62088966],[51.58361244,24.25972176],[52.58333015,22.93889046],[55.19916725,22.69972038],[55.66610909,21.99972343],[55.00000191,20.00000191],[51.99929237,18.99934578],[48.76638985,18.26638985],[46.3330555,15.61694527],[46.33333015,16.66666603],[44.46750069,17.41194344],[43.30944252,17.45722389],[43.20611,16.67222404],[42.78968239,16.37750435],[40.75999641,19.7602787],[39.17694283,21.09916496],[39.06277657,22.58333397],[38.45277596,23.78249931],[37.44166756,24.37138939],[37.23555183,25.18250084],[35.16055489,28.05666542],[34.57166481,28.08888817],[34.96138954,29.36083412],[36.0700016,29.18889046],[36.74360847,29.8647213],[37.50277901,30.00222206],[38.00139046,30.50416756],[37.00527382,31.50555611],[39.19674492,32.15494347],[40.41333199,31.94833183],[42.08500099,31.11166191],[44.72166252,29.19833183]]]}, -{code:"BN", name: "Brunei", lng:-62.769, lat:17.340, borders:[[[-62.55274979,17.094166],[-62.62188745,17.111385],[-62.59967786,17.19722],[-62.55274979,17.094166]],[[-62.70165231,17.336941],[-62.62526732,17.220833],[-62.8638912,17.370831],[-62.70165231,17.336941]]]}, -{code:"SC", name:"Seychelles", lng:55.474, lat:-4.647, borders:[[[46.491386,-9.75443462],[46.476105,-9.74416003],[46.508331,-9.71776788],[46.491386,-9.75443462]],[[46.510551,-9.39693828],[46.269165,-9.46304468],[46.204163,-9.38943889],[46.510551,-9.39693828]],[[46.413887,-9.35888244],[46.276665,-9.34610397],[46.426941,-9.34276788],[46.413887,-9.35888244]],[[56.282219,-7.13416644],[56.247215,-7.1944405],[56.27861,-7.11083043],[56.282219,-7.13416644]],[[55.535271,-4.76305179],[55.376106,-4.62721731],[55.45916,-4.55138557],[55.535271,-4.76305179]],[[55.246109,-4.5069405],[55.231667,-4.44805453],[55.26722,-4.48166513],[55.246109,-4.5069405]],[[55.775833,-4.3483299],[55.687218,-4.28749695],[55.77166,-4.31555515],[55.775833,-4.3483299]]]}, -{code:"ZA", name:"South Africa", lng:23.121, lat:-30.558, borders:[[[37.85083,-46.95693239],[37.576385,-46.90940066],[37.781944,-46.83219871],[37.85083,-46.95693239]],[[37.959442,-46.65858471],[37.856941,-46.62690021],[37.942772,-46.60332504],[37.959442,-46.65858471]],[[29.893887,-22.1944385],[31.297504,-22.41473429],[32.016106,-24.45943828],[31.96851,-25.95783993],[31.33083,-25.7513851],[30.902048,-26.30525015],[30.818886,-26.81053575],[31.161663,-27.20304141],[31.987499,-27.31608915],[32.1334,-26.83960374],[32.890427,-26.8471299],[32.390274,-28.53778052],[31.325832,-29.39081173],[30.023888,-31.28111234],[27.899998,-33.04055772],[26.530552,-33.75331883],[25.724998,-33.76719683],[25.701942,-34.03195181],[22.544998,-34.00500477],[20.,-34.82197993],[18.817776,-34.3777692],[18.793331,-34.08666984],[18.40472,-34.30274979],[18.441109,-33.70665708],[17.8475,-32.83078809],[18.292221,-32.62445037],[18.27861,-31.89277298],[16.48959,-28.57816355],[17.06361,-28.02860646],[17.40472,-28.71360358],[18.175831,-28.90858871],[19.123055,-28.96221548],[19.99612,-28.42144751],[20.000942,-24.76538424],[20.811386,-25.8833276],[20.642498,-26.82804141],[21.667221,-26.86443684],[22.624809,-26.11154901],[23.014832,-25.29970127],[24.6772,-25.82781565],[25.50972,-25.67774979],[25.871387,-24.7444456],[26.845276,-24.26442363],[26.95919,-23.75204487],[28.298332,-22.60942507],[29.373623,-22.19238614],[29.893887,-22.1944385]],[[28.565552,-28.61000022],[27.011108,-29.62527132],[27.564617,-30.40490345],[28.079937,-30.65052791],[28.377777,-30.16027664],[29.168888,-29.91386779],[29.430832,-29.27860646],[28.565552,-28.61000022]]]}, -{code:"LS", name:"Lesotho", lng:28.243, lat:-29.581, borders:[[[27.564617,-30.40490345],[27.011108,-29.62527132],[28.565552,-28.61000022],[29.430832,-29.27860646],[29.168888,-29.91386779],[28.377777,-30.16027664],[28.079937,-30.65052791],[27.564617,-30.40490345]]]}, -{code:"BW", name:"Botswana", lng:23.815, lat:-22.182, borders:[[[26.95919,-23.75204487],[26.845276,-24.26442363],[25.871387,-24.7444456],[25.50972,-25.67774979],[24.6772,-25.82781565],[23.014832,-25.29970127],[22.624809,-26.11154901],[21.667221,-26.86443684],[20.642498,-26.82804141],[20.811386,-25.8833276],[20.000942,-24.76538424],[19.996666,-22.00497825],[20.991943,-21.99691797],[20.993286,-18.3183933],[23.297108,-17.99593332],[23.615578,-18.48505429],[24.362499,-17.9486048],[25.264431,-17.80224219],[26.166111,-19.52776299],[27.219997,-20.09165209],[27.287453,-20.4949642],[27.713165,-20.5064159],[28.015831,-21.56608915],[29.060555,-21.79804185],[29.373623,-22.19238614],[28.298332,-22.60942507],[26.95919,-23.75204487]]]}, -{code:"SN", name:"Senegal", lng:-14.881, lat:15.013, borders:[[[-17.14829234,14.61392],[-17.53720837,14.756109],[-16.87831883,15.224998],[-16.52764937,16.060249],[-16.28081151,16.519722],[-14.34527376,16.638611],[-12.24482154,14.764385],[-12.05721892,13.664721],[-11.37804752,12.988054],[-11.37305101,12.407774],[-12.3453919,12.301748],[-13.71313053,12.677221],[-14.51694477,12.679722],[-16.71774636,12.322426],[-16.58694416,12.632776],[-15.62693073,12.531111],[-15.38999778,12.831944],[-15.65000105,12.555555],[-16.59804896,12.791666],[-16.75609603,12.564999],[-16.7508655,13.059977],[-15.8097228,13.159721],[-15.80361151,13.347776],[-15.28499007,13.374443],[-15.11165964,13.595833],[-14.35109747,13.237778],[-13.79860075,13.406387],[-15.07027071,13.826387],[-16.56564714,13.589998],[-16.49082194,13.958055],[-16.7472228,13.951944],[-16.36304874,14.166111],[-16.77582926,14.012499],[-17.14829234,14.61392]]]}, -{code:"SI", name:"Slovenia", lng:14.827, lat:46.124, borders:[[[13.718655,46.526611],[14.544998,46.407494],[16.111805,46.86972],[16.607872,46.476234],[16.572498,46.475273],[15.654722,46.219444],[15.697777,45.844162],[15.174458,45.425819],[14.601387,45.675278],[13.59174,45.481697],[13.716944,45.596107],[13.919167,45.637497],[13.48,46.011108],[13.669167,46.177498],[13.383055,46.297218],[13.718655,46.526611]]]}, -{code:"SL", name:"Sierra Leone", lng:-11.792, lat:8.560, borders:[[[-12.52527437,7.431389],[-12.9527701,7.568333],[-12.59110846,7.634444],[-12.52527437,7.431389]],[[-11.21443378,9.997499],[-10.57152515,9.059532],[-10.6958276,8.298611],[-10.26664368,8.488377],[-11.49231866,6.927091],[-12.95860907,7.9],[-13.28805384,8.496111],[-13.05137794,8.36861],[-13.12027581,8.461666],[-12.89749717,8.567778],[-13.16527215,8.51861],[-13.24248535,8.8025],[-13.13221181,8.861944],[-13.29560704,9.032143],[-12.45610419,9.888332],[-11.21443378,9.997499]]]}, -{code:"SG", name:"Singapore", lng:103.808, lat:1.351, borders:[[[103.99054,1.383291],[103.640808,1.315555],[103.713593,1.429444],[103.99054,1.383291]]]}, -{code:"SO", name:"Somalia", lng:48.316, lat:9.774, borders:[[[42.944092,11.002438],[43.249222,11.469534],[44.278328,10.447777],[44.898331,10.420555],[45.759995,10.875277],[46.448051,10.688889],[47.398888,11.179998],[50.085548,11.511944],[50.76944,11.979166],[51.277222,11.836666],[51.01416,10.442778],[51.412636,10.451515],[50.896942,10.319721],[50.83625,9.432688],[47.954437,4.463888],[46.014717,2.427778],[43.488609,0.649999],[41.558159,-1.67486726],[40.998329,-0.8661106],[40.986595,2.829956],[41.905167,3.980322],[43.686386,4.891944],[44.950829,4.902499],[47.988243,8.004107],[47.01194,8.00111],[44.010551,9.007221],[42.848053,10.22361],[42.663055,10.6325],[42.944092,11.002438]]]}, -{code:"ES", name:"Spain", lng:-3.649, lat:40.227, borders:[[[-17.91278076,27.77166557],[-17.9827652,27.63749886],[-18.17053604,27.73722267],[-17.91278076,27.77166557]],[[-15.55415535,27.75583458],[-15.70249748,28.15611076],[-15.3655529,28.0102787],[-15.55415535,27.75583458]],[[-17.17500305,28.01694298],[-17.31693268,28.17222404],[-17.10194016,28.13472176],[-17.17500305,28.01694298]],[[-16.34110641,28.37027931],[-16.6713829,27.9841671],[-16.91278076,28.34139061],[-16.1569252,28.57222176],[-16.34110641,28.37027931]],[[-14.32721138,28.04638863],[-13.86971855,28.75139046],[-13.9230442,28.24916649],[-14.32721138,28.04638863]],[[-17.83193207,28.45388985],[-17.90442276,28.84944344],[-17.71637726,28.74611092],[-17.83193207,28.45388985]],[[-13.6097126,28.92638969],[-13.85221481,28.90638924],[-13.44249344,29.23166847],[-13.6097126,28.92638969]],[[-2.92527771,35.26666451],[-2.94694519,35.32916451],[-2.91472244,35.27360725],[-2.92527771,35.26666451]],[[-5.31944084,35.87693977],[-5.34583282,35.84166145],[-5.3955574,35.91633797],[-5.31944084,35.87693977]],[[-3.03610992,35.91277504],[-3.05111122,35.91583443],[-3.02722168,35.92444038],[-3.03610992,35.91277504]],[[1.57777977,38.68777657],[1.39027977,38.64332771],[1.38305473,38.72055244],[1.57777977,38.68777657]],[[1.53166771,38.95194435],[1.21194649,38.8983326],[1.51972389,39.11833382],[1.53166771,38.95194435]],[[3.24777794,39.73472023],[3.47972298,39.71110725],[3.06361198,39.26361275],[2.36416817,39.55583382],[2.98777962,39.91111183],[3.24777794,39.73472023]],[[4.2733326,39.96138954],[4.27638817,39.80639076],[3.79694557,40.01722145],[4.2733326,39.96138954]],[[-7.85555077,43.75999641],[-7.04481888,43.49040413],[-1.78087616,43.35992622],[-0.56222153,42.78138924],[1.44583321,42.60194588],[1.72361183,42.50943947],[3.17765617,42.43680763],[3.17527962,41.86749458],[0.96444511,41.03277779],[0.04889107,40.0361042],[-0.33805466,39.43555641],[0.20722389,38.73221016],[-0.51166725,38.32499886],[-0.71555519,37.60694313],[-1.64361,37.37277412],[-2.12916565,36.73138618],[-4.39832878,36.72222328],[-5.33450699,36.16256142],[-5.35579491,36.1633091],[-6.03749657,36.18027687],[-6.35555077,36.86083412],[-7.43185425,37.25319099],[-7.44694519,37.69944191],[-6.93916702,38.17805672],[-7.32110786,38.44944191],[-6.95479202,39.02638435],[-7.53250504,39.66942024],[-7.01721764,39.67499733],[-6.93166733,41.01805305],[-6.18722153,41.57972145],[-6.5941658,41.95360756],[-8.20471573,41.87471962],[-8.20121193,42.15274239],[-8.74499702,41.9525013],[-8.89861298,42.10805702],[-8.57971573,42.35166359],[-8.8691597,42.25139046],[-8.71944237,42.69583321],[-9.04138947,42.5288868],[-9.20943832,43.1527729],[-7.85555077,43.75999641]],[[-6.92499924,37.17083168],[-6.97305107,37.21027565],[-6.95416641,37.18027687],[-6.92499924,37.17083168]]]}, -{code:"LC", name:"St. Lucia", lng:-60.969, lat:13.898, borders:[[[-60.95469683,13.709444],[-61.07942951,13.879999],[-60.93025167,14.109444],[-60.95469683,13.709444]]]}, -{code:"SD", name:"Sudan", lng:30.050, lat:13.832, borders:[[[37.268608,20.75111],[37.242218,20.785831],[37.263855,20.849724],[37.268608,20.75111]],[[31.453888,21.998333],[36.888466,22.000111],[37.309441,21.060276],[37.10527,21.212219],[37.433327,18.858055],[38.600693,17.994881],[37.423286,17.034214],[36.995827,17.073887],[36.973053,16.269444],[36.443283,15.149952],[36.542816,14.262053],[36.142693,12.706923],[35.70108,12.666115],[35.096939,11.826944],[34.864441,10.734999],[34.594444,10.887777],[34.28611,10.554165],[34.120552,8.577221],[33.252777,8.458611],[32.991104,7.924999],[33.711388,7.660277],[34.70472,6.677777],[35.301941,5.378055],[35.821663,5.32861],[35.940552,4.622499],[34.388191,4.609682],[33.996666,4.222777],[33.516937,3.752222],[33.016663,3.888611],[32.193329,3.511389],[31.176666,3.795278],[30.858818,3.493394],[29.64333,4.643611],[28.363052,4.29],[27.455276,5.016388],[27.142776,5.771944],[26.437496,6.077777],[26.404999,6.646388],[25.206944,7.497499],[25.25333,7.850555],[24.192497,8.30361],[24.201111,8.686943],[23.517776,8.714167],[23.669167,9.866943],[22.866505,10.922447],[22.466942,12.621666],[21.827774,12.797499],[22.294167,13.35861],[22.084442,13.779165],[22.554996,14.125555],[22.384163,14.554165],[22.935833,15.11611],[22.937222,15.561943],[23.999603,15.698709],[24.002747,19.499065],[24.000832,20.001942],[25.000832,19.999119],[25.001423,21.999695],[31.271111,21.998333],[31.455555,22.23222],[31.453888,21.998333]]]}, -{code:"SE", name:"Sweden", lng:15.270, lat:62.011, borders:[[[16.836666,56.826942],[16.42083,56.211105],[17.105553,57.348328],[16.836666,56.826942]],[[18.206108,56.911942],[18.119164,57.531105],[19.004719,57.908607],[18.206108,56.911942]],[[19.334442,57.955826],[19.12611,57.839722],[19.034443,57.901108],[19.334442,57.955826]],[[11.594444,57.932495],[11.501944,58.036659],[11.735884,58.041714],[11.594444,57.932495]],[[16.816666,58.116104],[16.77861,58.100555],[16.801109,58.123329],[16.816666,58.116104]],[[11.806389,58.120552],[11.40111,58.130272],[11.6775,58.286659],[11.806389,58.120552]],[[19.236942,58.337219],[19.186665,58.391388],[19.331108,58.366104],[19.236942,58.337219]],[[17.691387,58.916939],[17.639164,58.971107],[17.675831,59.054718],[17.691387,58.916939]],[[18.40583,59.023888],[18.35722,59.034996],[18.479164,59.119995],[18.40583,59.023888]],[[18.53722,59.223885],[18.389442,59.284721],[18.610275,59.254166],[18.53722,59.223885]],[[17.786942,59.310555],[17.605553,59.416664],[17.773888,59.372772],[17.786942,59.310555]],[[17.734722,59.296104],[17.817497,59.277771],[17.622776,59.305275],[17.520275,59.418327],[17.734722,59.296104]],[[17.266388,59.374443],[17.07,59.459442],[17.266941,59.44416],[17.266388,59.374443]],[[18.575554,59.448326],[18.570274,59.526382],[18.746944,59.544998],[18.575554,59.448326]],[[18.57,60.307777],[18.401108,60.365273],[18.374165,60.499718],[18.57,60.307777]],[[17.509163,62.363327],[17.367222,62.471664],[17.472221,62.458328],[17.509163,62.363327]],[[18.060833,62.67083],[18.039165,62.73555],[18.153053,62.728882],[18.060833,62.67083]],[[20.885555,63.751663],[20.838055,63.773331],[20.928608,63.773331],[20.885555,63.751663]],[[21.809166,68.570541],[23.666111,67.941666],[23.43111,67.465546],[23.767776,67.416107],[23.571663,67.156662],[24.007774,66.800552],[23.661942,66.31221],[24.167007,65.814026],[22.644722,65.905548],[22.329166,65.829712],[22.40583,65.535263],[21.766941,65.722488],[22.199165,65.545273],[21.260555,65.337494],[21.621387,65.142212],[21.03611,64.824432],[21.584999,64.439713],[20.777775,63.869164],[19.428055,63.549438],[18.208611,62.77861],[17.696663,62.991943],[18.048054,62.601387],[17.328888,62.486938],[17.65472,62.23111],[17.34972,61.945274],[17.498886,61.635826],[17.140274,61.719719],[17.150555,60.945],[19.081944,59.75972],[17.941109,59.335548],[17.764442,59.400551],[17.845276,59.533051],[17.71722,59.66333],[17.59222,59.656105],[17.648331,59.665833],[17.654163,59.718048],[17.594166,59.806938],[17.444721,59.676109],[17.543152,59.573006],[17.513054,59.706383],[17.618332,59.731384],[17.561171,59.668449],[17.786663,59.535828],[17.73111,59.442772],[17.38361,59.654999],[16.020275,59.494995],[16.889999,59.383331],[16.692776,59.471382],[16.840275,59.489441],[17.375832,59.247498],[17.35083,59.32444],[17.847221,59.264442],[18.289444,59.368607],[18.466663,59.330276],[18.434444,59.433609],[18.640274,59.338882],[18.277222,59.310829],[18.311386,59.1325],[17.894722,58.858887],[17.663887,59.168327],[17.349998,58.75222],[16.193607,58.627495],[16.93861,58.484161],[16.41333,58.474716],[16.824718,58.19944],[16.613888,57.986938],[16.770554,57.884438],[16.495552,57.98555],[16.700706,57.74015],[16.41861,57.893326],[16.693333,57.469162],[15.865555,56.092216],[14.696665,56.16111],[14.217222,55.830276],[14.193546,55.386147],[12.982222,55.400551],[13.059721,55.693054],[12.451666,56.297775],[12.813332,56.232773],[12.622221,56.411942],[12.887499,56.638329],[11.698889,57.69722],[11.88611,58.211937],[11.798054,58.318329],[11.201387,58.399437],[11.113333,59.003609],[11.429192,58.98764],[11.75111,59.090271],[11.81596,59.8461],[12.494165,60.111107],[12.594444,60.516937],[12.209999,61.002495],[12.85611,61.362495],[12.124443,61.728607],[12.295832,62.261665],[11.936388,63.272217],[12.139444,63.58416],[12.938055,64.053329],[13.988333,64.018051],[14.116388,64.470551],[13.662498,64.582764],[14.493055,65.313599],[14.504999,66.132492],[15.468054,66.283875],[15.362778,66.479996],[16.353886,67.017776],[16.085831,67.411652],[16.726944,67.899155],[17.884163,67.945541],[18.090832,68.507767],[19.937775,68.337494],[20.350277,68.786652],[20.096943,69.042221],[20.580929,69.060303],[21.809166,68.570541]]]}, -{code:"SY", name:"Syria", lng:38.506, lat:35.013, borders:[[[42.355614,37.106926],[41.290276,36.355553],[41.003876,34.419434],[38.794701,33.377594],[36.837776,32.313606],[35.648888,32.685272],[35.623634,33.245728],[36.623741,34.204994],[36.459999,34.635277],[35.972771,34.647499],[35.733887,35.581665],[35.92244,35.926994],[36.690269,36.236107],[36.659943,36.83371],[39.229996,36.665276],[40.770821,37.11805],[42.355614,37.106926]]]}, -{code:"CH", name:"Switzerland", lng:7.908, lat:46.861, borders:[[[7.697223,47.543327],[8.57642,47.59137],[8.566111,47.806938],[9.566724,47.540451],[9.533569,47.274544],[9.474637,47.057457],[9.598635,47.063835],[10.471235,46.871353],[10.465277,46.546387],[10.050278,46.539993],[10.129999,46.227219],[9.281944,46.495827],[9.036665,45.837776],[8.436388,46.463333],[7.855742,45.919052],[7.038054,45.931938],[6.791389,46.434166],[5.966666,46.209442],[6.990555,47.497215],[7.588268,47.58448],[7.697223,47.543327]],[[8.710255,47.696808],[8.670555,47.711105],[8.678595,47.693344],[8.710255,47.696808]]]}, -{code:"TT", name:"Trinidad and Tobago", lng:-61.253, lat:10.468, borders:[[[-60.92301134,10.797222],[-61.00805628,10.140554],[-61.91799957,10.042776],[-61.45828998,10.278332],[-61.66217786,10.709166],[-60.92301134,10.797222]],[[-60.63941963,11.203054],[-60.84750332,11.158333],[-60.52661169,11.346109],[-60.63941963,11.203054]]]}, -{code:"TH", name:"Thailand", lng:100.844, lat:15.700, borders:[[[99.219162,6.532499],[99.159988,6.548888],[99.256119,6.571944],[99.219162,6.532499]],[[99.668045,6.496387],[99.594986,6.593888],[99.662811,6.702995],[99.668045,6.496387]],[[100.536087,7.15611],[100.520813,7.154999],[100.534973,7.174166],[100.536087,7.15611]],[[99.38916,7.194721],[99.3936,7.270555],[99.419144,7.234165],[99.38916,7.194721]],[[99.110809,7.468055],[99.04248,7.525832],[99.024155,7.636666],[99.110809,7.468055]],[[99.119705,7.591944],[99.045822,7.669443],[99.121918,7.665277],[99.119705,7.591944]],[[98.434708,7.930554],[98.418045,7.93611],[98.43692,7.94361],[98.434708,7.930554]],[[98.603592,7.901111],[98.526093,8.121386],[98.611923,8.048609],[98.603592,7.901111]],[[98.399841,7.941753],[98.305252,7.757222],[98.282486,8.186386],[98.399841,7.941753]],[[98.616653,8.084442],[98.568329,8.11722],[98.628311,8.189165],[98.616653,8.084442]],[[98.266663,9.030554],[98.280823,9.158054],[98.324432,9.084164],[98.266663,9.030554]],[[97.87915,9.381941],[97.835266,9.402777],[97.847214,9.43222],[97.87915,9.381941]],[[97.89888,9.437498],[97.847488,9.458609],[97.883881,9.475554],[97.89888,9.437498]],[[99.681366,9.506109],[99.664993,9.524443],[99.708603,9.53861],[99.681366,9.506109]],[[98.467484,9.574999],[98.457764,9.573887],[98.464432,9.585554],[98.467484,9.574999]],[[99.976089,9.41361],[99.932205,9.546944],[100.080833,9.58861],[99.976089,9.41361]],[[99.685532,9.606665],[99.676651,9.607498],[99.673599,9.629164],[99.685532,9.606665]],[[98.407211,9.714165],[98.380814,9.732775],[98.408325,9.770832],[98.407211,9.714165]],[[100.081673,9.686665],[99.99054,9.711388],[99.987488,9.796387],[100.081673,9.686665]],[[102.59552,11.56361],[102.531357,11.601387],[102.560226,11.754396],[102.59552,11.56361]],[[102.435791,11.954165],[102.291351,11.974442],[102.250549,12.15],[102.435791,11.954165]],[[102.241089,12.283888],[102.235527,12.285276],[102.2397,12.299442],[102.241089,12.283888]],[[100.688873,12.923609],[100.671654,12.938332],[100.676376,12.952776],[100.688873,12.923609]],[[100.816673,13.129442],[100.807213,13.180277],[100.821381,13.150555],[100.816673,13.129442]],[[100.081322,20.348841],[100.09137,20.348606],[100.58046,20.157768],[100.503601,19.526665],[101.281097,19.562218],[100.921371,17.567219],[101.162773,17.459995],[102.089394,18.214983],[102.683594,17.819996],[103.397217,18.434994],[103.985527,18.321663],[104.718323,17.50333],[104.747208,16.528332],[105.637772,15.659721],[105.536102,14.563332],[105.210602,14.349648],[103.180542,14.32972],[102.377197,13.573887],[102.916092,11.635851],[102.060257,12.567497],[100.853867,12.682775],[100.976349,13.462809],[100.066673,13.419998],[100.021378,12.194164],[99.149155,10.365553],[99.237488,9.254166],[99.847763,9.300831],[100.421082,7.159444],[101.541367,6.851388],[102.09523,6.236138],[101.833862,5.743332],[101.569977,5.916666],[101.139687,5.631943],[101.115517,6.248888],[100.654968,6.448332],[100.214981,6.71111],[100.127113,6.424947],[98.656372,8.38361],[98.274155,8.274443],[98.742752,10.348608],[99.661652,11.826942],[99.112198,13.055832],[99.173965,13.727781],[98.201096,15.074999],[98.92804,16.38583],[98.689697,16.284996],[97.346375,18.562496],[97.774704,18.569996],[98.049988,19.807499],[98.995529,19.780552],[99.522766,20.352776],[100.081322,20.348841]]]}, -{code:"TJ", name:"Tajikistan", lng:69.420, lat:38.665, borders:[[[74.915741,37.237328],[73.307205,37.462753],[71.6772,36.67601],[71.429428,37.075829],[71.591934,37.902618],[71.252777,37.922035],[71.363037,38.248497],[70.967209,38.472115],[70.161377,37.933372],[70.155823,37.536232],[69.515823,37.580826],[69.315262,37.115273],[68.887772,37.3386],[68.058014,36.932526],[67.779877,37.185822],[68.384155,38.195541],[68.123871,38.98555],[67.376373,39.212494],[67.441956,39.483582],[68.540268,39.55471],[69.009995,40.089714],[68.600815,40.178329],[69.308029,40.201385],[69.356094,40.772491],[69.732483,40.638603],[70.423874,41.049118],[70.796799,40.725594],[70.375534,40.376404],[70.98204,40.244843],[70.498032,39.90683],[69.540817,40.131378],[69.306091,39.539436],[70.997757,39.40094],[71.473038,39.6213],[72.248596,39.191856],[73.655685,39.454826],[73.817764,38.607712],[74.856644,38.470482],[74.902771,37.647156],[75.187485,37.406586],[74.915741,37.237328]]]}, -{code:"TK", name:"Tokelau", lng:-171.853, lat:-9.193, borders:[[[-171.21472136,-9.37749062],[-171.22384691,-9.37887772],[-171.22451775,-9.34554507],[-171.21472136,-9.37749062]],[[-171.84295616,-9.20749129],[-171.86041227,-9.20666308],[-171.85388167,-9.16804735],[-171.84295616,-9.20749129]],[[-172.48385644,-8.58721748],[-172.49691748,-8.55388483],[-172.48342902,-8.5666653],[-172.48385644,-8.58721748]]]}, -{code:"TO", name:"Tonga", lng:-175.185, lat:-21.202, borders:[[[-174.91067505,-21.42666626],[-174.97451782,-21.36582565],[-174.91131592,-21.30610275],[-174.91067505,-21.42666626]],[[-175.1456604,-21.17805099],[-175.35928345,-21.09916306],[-175.04724121,-21.13942719],[-175.1456604,-21.17805099]],[[-174.76065063,-20.27637482],[-174.79177856,-20.23469925],[-174.75997925,-20.23720169],[-174.76065063,-20.27637482]],[[-174.41394043,-19.92666626],[-174.42242432,-19.91000366],[-174.39086914,-19.88166809],[-174.41394043,-19.92666626]],[[-174.31860352,-19.82194519],[-174.35498047,-19.81195068],[-174.31573486,-19.76414871],[-174.31860352,-19.82194519]],[[-175.05661011,-19.80081558],[-175.09841919,-19.74972534],[-175.08163452,-19.70639038],[-175.05661011,-19.80081558]],[[-174.2723999,-19.75276947],[-174.30703735,-19.74082565],[-174.256073,-19.6880455],[-174.2723999,-19.75276947]],[[-175.01828003,-19.69136429],[-175.03567505,-19.67666626],[-175.00540161,-19.65249252],[-175.01828003,-19.69136429]],[[-174.24429321,-19.65611267],[-174.2817688,-19.63444519],[-174.29177856,-19.59442902],[-174.24429321,-19.65611267]],[[-174.64697266,-18.83027267],[-174.67504883,-18.80443954],[-174.64978027,-18.78304291],[-174.62301636,-18.80942154],[-174.64697266,-18.83027267]],[[-174.06140137,-18.70470047],[-174.0977478,-18.69637299],[-174.07357788,-18.68110275],[-174.06140137,-18.70470047]],[[-174.01956177,-18.71719742],[-174.04333496,-18.68082809],[-174.01913452,-18.69443893],[-174.01956177,-18.71719742]],[[-174.08972168,-18.67415619],[-174.12805176,-18.70331192],[-174.1156311,-18.6713829],[-174.08972168,-18.67415619]],[[-173.91049194,-18.63803482],[-174.07052612,-18.63248062],[-173.93920898,-18.56889343],[-173.91049194,-18.63803482]],[[-175.64456177,-15.62916374],[-175.68374634,-15.58971977],[-175.62127686,-15.56082344],[-175.64456177,-15.62916374]]]}, -{code:"TG", name:"Togo", lng:1.081, lat:8.799, borders:[[[1.398542,9.429901],[1.635404,6.218721],[1.198891,6.100546],[0.525,6.947778],[0.727222,8.321388],[0.382735,8.760756],[0.550833,9.411388],[0.2175,9.457222],[0.368333,10.259443],[-0.14976183,11.13854],[0.91797,10.996399],[0.776667,10.376665],[1.355,9.995277],[1.398542,9.429901]]]}, -{code:"ST", name:"Sao Tome and Principe", lng:6.629, lat:0.201, borders:[[[6.523889,0.018333],[6.467222,0.259722],[6.687778,0.402222],[6.523889,0.018333]],[[7.423055,1.556111],[7.327222,1.607222],[7.406666,1.701944],[7.423055,1.556111]]]}, -{code:"TN", name:"Tunisia", lng:9.596, lat:35.383, borders:[[[10.99361,33.75],[10.865,33.638611],[10.72611,33.880829],[10.99361,33.75]],[[11.064722,34.640549],[11.035,34.617493],[10.961111,34.655273],[11.064722,34.640549]],[[11.13722,34.675278],[11.230833,34.821106],[11.302221,34.803329],[11.13722,34.675278]],[[10.808611,37.119438],[10.791943,37.126389],[10.814722,37.125275],[10.808611,37.119438]],[[9.845247,37.139351],[10.252499,37.186386],[10.381943,36.723328],[11.067778,37.051384],[10.455276,36.123329],[11.128887,35.235832],[10.005833,34.166939],[10.331944,33.700272],[11.048611,33.616943],[11.17111,33.210831],[11.526081,33.171135],[11.567499,32.442215],[10.287222,31.694164],[10.21361,30.730831],[9.537113,30.23439],[9.055277,32.099998],[8.34861,32.533333],[7.492499,33.887497],[8.251665,34.64444],[8.183611,36.524162],[8.62203,36.941368],[9.672499,37.338051],[9.845247,37.139351]],[[8.917776,37.510826],[8.896111,37.525833],[8.944721,37.538055],[8.917776,37.510826]]]}, -{code:"TR", name:"Turkey", lng:35.179, lat:39.061, borders:[[[26.078053,39.7836],[25.974995,39.829987],[26.075829,39.839722],[26.078053,39.7836]],[[25.824444,40.100266],[25.663883,40.126389],[26.013611,40.157494],[25.824444,40.100266]],[[27.60722,40.57222],[27.531109,40.648331],[27.735271,40.634438],[27.60722,40.57222]],[[35.096931,41.961655],[35.506386,41.638054],[36.051102,41.691933],[36.429153,41.242775],[38.361382,40.909431],[40.149994,40.920273],[41.531559,41.523876],[42.827492,41.584991],[43.46077,41.112961],[43.751938,40.739998],[43.657494,40.108597],[44.347214,40.023888],[44.778862,39.706383],[44.813042,39.630814],[44.60582,39.78054],[44.4161,39.425262],[44.034157,39.384995],[44.484154,38.345543],[44.223969,37.899151],[44.61805,37.727768],[44.787338,37.149712],[44.317215,36.970543],[44.116379,37.316376],[42.790825,37.38472],[42.355614,37.106926],[40.770821,37.11805],[39.229996,36.665276],[36.659943,36.83371],[36.690269,36.236107],[35.92244,35.926994],[35.783875,36.312485],[36.217766,36.654999],[36.021935,36.926384],[35.339989,36.539162],[34.659431,36.805275],[33.988602,36.277771],[32.808884,36.025551],[31.046661,36.849152],[30.623333,36.850822],[30.40694,36.203606],[29.677216,36.118332],[28.454163,36.881386],[27.983887,36.552773],[28.118332,36.800278],[27.37944,36.680832],[28.328606,37.039719],[27.252499,36.967499],[27.595276,37.232491],[27.193886,37.350822],[27.267773,37.955544],[26.275829,38.264435],[26.369999,38.661942],[26.682217,38.307487],[27.161942,38.443886],[26.730827,38.645821],[27.064442,38.874435],[26.644722,39.263054],[26.951664,39.552773],[26.067219,39.483047],[26.707222,40.384995],[28.985271,40.356934],[28.795277,40.551384],[29.938049,40.723885],[29.12944,40.914444],[29.166111,41.226662],[31.23111,41.088875],[33.333878,42.020264],[35.096931,41.961655]],[[27.394997,42.008041],[28.013054,41.982216],[28.090549,41.631386],[29.039162,41.057213],[27.50972,40.983597],[26.181107,40.045273],[26.826939,40.594437],[26.04472,40.735825],[26.633884,41.354439],[26.361095,41.711052],[27.394997,42.008041]]]}, -{code:"TV", name:"Tuvalu", lng:179.219, lat:-8.514, borders:[[[179.222366,-8.55414563],[179.203705,-8.46243798],[179.231094,-8.50490666],[179.222366,-8.55414563]],[[178.366913,-8.06277132],[178.355804,-8.06138222],[178.36969,-8.02749268],[178.366913,-8.06277132]],[[178.397766,-8.0152701],[178.39151,-7.99999237],[178.403046,-7.99138483],[178.397766,-8.0152701]],[[178.700531,-7.48221639],[178.687469,-7.4788823],[178.690796,-7.46444141],[178.700531,-7.48221639]],[[177.158875,-7.18777132],[177.146362,-7.18860915],[177.142212,-7.17361037],[177.158875,-7.18777132]],[[176.310242,-6.28554996],[176.295258,-6.27805057],[176.308868,-6.25749839],[176.310242,-6.28554996]],[[177.295807,-6.11388657],[177.281372,-6.08944241],[177.308868,-6.09888779],[177.295807,-6.11388657]],[[176.139709,-5.69055515],[176.130249,-5.69333234],[176.129395,-5.67499847],[176.139709,-5.69055515]],[[176.08136,-5.66527415],[176.066376,-5.66527415],[176.079407,-5.65777376],[176.08136,-5.66527415]]]}, -{code:"TM", name:"Turkmenistan", lng:59.384, lat:39.122, borders:[[[53.06971931,38.89972115],[53.07860756,39.09388161],[53.10000038,38.75110817],[53.06971931,38.89972115]],[[58.78055,42.65804482],[60.01444435,42.21749306],[60.14027596,41.38110542],[61.87416267,41.12555122],[62.55110359,39.93416023],[64.38302803,38.95312691],[66.64387703,38.00305367],[66.53773689,37.36638069],[65.70887947,37.53860664],[64.79803658,37.12499428],[64.50360298,36.28055],[63.11944008,35.86194038],[63.10527229,35.45083046],[62.72221565,35.25471687],[62.30916023,35.14166451],[61.27655983,35.60724831],[61.15721321,36.6499958],[60.3330555,36.65609932],[59.33888435,37.53916359],[57.45027351,37.93915749],[57.21221352,38.28193855],[55.44276619,38.08610725],[54.68110847,37.44360542],[53.90564156,37.35085487],[53.983881,38.9158268],[53.54138374,39.33582497],[53.16249275,39.17555428],[53.26416206,39.65526772],[53.73443794,39.52388191],[53.4083271,39.6658268],[53.57583046,39.96610451],[52.93471718,39.99054909],[53.00471687,39.76221657],[52.72193336,40.44610023],[52.9186039,41.08166695],[53.74638557,40.61527443],[54.41777229,40.70360756],[54.24471474,40.88027382],[54.733881,41.10222054],[54.07277107,41.4755497],[53.80388069,42.12388039],[52.94665718,41.97304726],[52.81582832,41.69582558],[52.88193703,41.04722023],[52.44007301,41.74093819],[53.0150013,42.13888741],[54.17305183,42.33721352],[55.4569416,41.28666115],[56.00096321,41.32845497],[57.04471779,41.2602787],[56.98694038,41.89305305],[58.02660561,42.50464058],[58.51555061,42.30443764],[58.16443825,42.65193367],[58.78055,42.65804482]]]}, -{code:"TZ", name:"United Republic of Tanzania", lng:34.823, lat:-6.270, borders:[[[39.682495,-7.99332982],[39.591385,-7.9458286],[39.901108,-7.638882],[39.682495,-7.99332982]],[[39.446663,-6.21054843],[39.516106,-6.46860571],[39.201385,-6.22694294],[39.304161,-5.72388779],[39.446663,-6.21054843]],[[39.736107,-5.46277437],[39.676941,-4.94138535],[39.857216,-4.90860397],[39.736107,-5.46277437]],[[31.677219,-0.99972105],[33.920273,-1.00110915],[37.602776,-2.99583189],[37.613609,-3.5041643],[39.203026,-4.6696154],[38.776382,-6.04555423],[39.547882,-6.99431157],[39.274437,-7.57916582],[39.387772,-8.90249268],[39.826385,-9.99304224],[40.436813,-10.4781706],[39.268051,-11.16804935],[37.941383,-11.28499007],[37.462044,-11.72732188],[36.18972,-11.70666308],[35.838333,-11.41471526],[34.966728,-11.57209982],[34.325272,-9.73276665],[33.13472,-9.49416003],[32.940399,-9.40507315],[31.041111,-8.59027825],[30.77124,-8.19224397],[29.550278,-6.29527428],[29.423885,-4.44805453],[30.026108,-4.26944302],[30.834999,-3.25694431],[30.843662,-2.97879038],[30.4175,-2.8619434],[30.57333,-2.39916521],[30.894165,-2.07611068],[30.48222,-1.06333302],[31.677219,-0.99972105]]]}, -{code:"UG", name:"Uganda", lng:32.386, lat:1.280, borders:[[[33.996666,4.222777],[34.463333,3.671389],[35.00972,1.895278],[33.907219,0.103056],[33.920273,-1.00110915],[31.677219,-0.99972105],[30.48222,-1.06333302],[29.974998,-1.46444332],[29.596943,-1.38583348],[29.960552,0.825555],[31.302776,2.121388],[30.729721,2.448055],[30.858818,3.493394],[31.176666,3.795278],[32.193329,3.511389],[33.016663,3.888611],[33.516937,3.752222],[33.996666,4.222777]]]}, -{code:"GB", name:"United Kingdom", lng:-1.600, lat:53.000, borders:[[[-6.29083252,49.91221809],[-6.31749535,49.91527748],[-6.29499626,49.93388557],[-6.29083252,49.91221809]],[[-1.05972099,50.68749428],[-1.56999969,50.66055489],[-1.29694366,50.77194405],[-1.05972099,50.68749428]],[[-0.9383316,50.77749825],[-1.02249908,50.78582954],[-0.97083282,50.83082771],[-0.9383316,50.77749825]],[[-4.65166283,51.15944099],[-4.67333031,51.16138649],[-4.66555214,51.1950016],[-4.65166283,51.15944099]],[[-4.57138824,53.23861122],[-4.69388962,53.30138588],[-4.62166595,53.32139015],[-4.57138824,53.23861122]],[[-4.15332985,53.22555733],[-4.40222168,53.12583351],[-4.56916237,53.3880558],[-4.15332985,53.22555733]],[[-6.35333252,55.23777962],[-5.68805122,54.80610847],[-5.90833282,54.60472298],[-5.42972183,54.48360634],[-6.2669754,54.09983253],[-7.0308342,54.41777229],[-7.55944443,54.12693977],[-8.15943336,54.44194221],[-7.40638542,54.9533329],[-7.25250626,55.07059669],[-6.35333252,55.23777962]],[[-6.17277336,55.29305458],[-6.1883297,55.25972176],[-6.2824955,55.29222298],[-6.17277336,55.29305458]],[[-5.10361099,55.43860817],[-5.38111115,55.66861153],[-5.16027832,55.67916298],[-5.10361099,55.43860817]],[[-6.12166595,55.87888527],[-6.07666206,55.6499958],[-6.50916672,55.68222237],[-6.12166595,55.87888527]],[[-5.01638794,55.72194099],[-5.20638466,55.89943886],[-5.0363884,55.83777809],[-5.01638794,55.72194099]],[[-6.19388962,56.02916145],[-6.26305199,56.03611183],[-6.13083267,56.12082863],[-6.19388962,56.02916145]],[[-5.94694519,55.82999611],[-6.07888794,55.90555],[-5.69444084,56.1472187],[-5.94694519,55.82999611]],[[-5.73500061,56.15805244],[-5.67527771,56.19194221],[-5.67582893,56.16944313],[-5.73500061,56.15805244]],[[-5.62999535,56.19693947],[-5.64194489,56.2602787],[-5.60638809,56.25444221],[-5.62999535,56.19693947]],[[-5.61666298,56.26888466],[-5.64555168,56.30111122],[-5.58388901,56.31971931],[-5.61666298,56.26888466]],[[-6.4047184,56.30360603],[-6.4363842,56.31055641],[-6.38194084,56.34082985],[-6.4047184,56.30360603]],[[-5.54360771,56.38277626],[-5.58777428,56.38916206],[-5.50999641,56.41111183],[-5.54360771,56.38277626]],[[-6.16583252,56.46472359],[-6.25999641,56.48194313],[-6.21555138,56.49777412],[-6.16583252,56.46472359]],[[-6.73916626,56.5158329],[-6.89277458,56.43860817],[-6.99083328,56.49444008],[-6.73916626,56.5158329]],[[-5.7836113,56.50889015],[-5.64832878,56.43583107],[-5.8086071,56.31749916],[-6.36611176,56.30888557],[-6.01777458,56.37471962],[-6.19361115,56.36138344],[-6.0027771,56.49416542],[-6.31999969,56.60305214],[-5.7836113,56.50889015]],[[-6.58916283,56.57999611],[-6.69888496,56.57999611],[-6.45444489,56.68610573],[-6.58916283,56.57999611]],[[-6.14472198,56.86999702],[-6.21305466,56.90694618],[-6.11360741,56.93249702],[-6.14472198,56.86999702]],[[-6.31749535,56.93416786],[-6.45166206,57.00610542],[-6.26166344,57.03777504],[-6.31749535,56.93416786]],[[-7.46693993,56.94082832],[-7.55999565,56.96027565],[-7.43971825,57.05444527],[-7.46693993,56.94082832]],[[-6.49916267,57.05221748],[-6.60250092,57.04638863],[-6.54944038,57.06805611],[-6.49916267,57.05221748]],[[-5.93916702,57.27805519],[-6.01777458,57.31166267],[-5.93388557,57.31166267],[-5.93916702,57.27805519]],[[-7.22305107,57.3374958],[-7.38138962,57.10860634],[-7.42499924,57.38221931],[-7.22305107,57.3374958]],[[-7.26888466,57.39888954],[-7.40638542,57.46416664],[-7.20471764,57.4608326],[-7.26888466,57.39888954]],[[-6.0269413,57.32860756],[-6.07832909,57.39416695],[-5.97999954,57.49582863],[-6.0269413,57.32860756]],[[-6.14388466,57.56805611],[-6.12721825,57.30610847],[-5.66388512,57.20499611],[-6.01194382,57.0222187],[-6.78582954,57.44610786],[-6.14388466,57.56805611]],[[-5.96777725,57.52277565],[-5.99083328,57.54083443],[-5.96166611,57.57499886],[-5.96777725,57.52277565]],[[-7.18860817,57.68721962],[-7.1538887,57.50943947],[-7.54332924,57.59082985],[-7.18860817,57.68721962]],[[-7.19666672,57.70221901],[-7.2191658,57.70777321],[-7.14472198,57.72361183],[-7.19666672,57.70221901]],[[-8.55527115,57.81083107],[-8.58249283,57.79888344],[-8.62137794,57.8227787],[-8.55527115,57.81083107]],[[-7.00638962,57.88138771],[-7.07777786,57.87999916],[-6.99361038,57.91861153],[-7.00638962,57.88138771]],[[-6.20416641,58.35611153],[-6.4738884,57.94027901],[-7.1230526,57.81749916],[-6.83027458,57.90083504],[-7.04055214,58.23333168],[-6.20416641,58.35611153]],[[-6.80221748,58.20305061],[-6.88971901,58.25249672],[-6.86916733,58.20388985],[-6.80221748,58.20305061]],[[-4.15332985,53.22555733],[-2.70249939,53.34638405],[-3.10750008,53.55166817],[-2.81361198,54.2227726],[-3.22611046,54.09861183],[-3.63416672,54.51194191],[-3.02305603,54.97055244],[-4.39305496,54.90805244],[-4.38722229,54.67555428],[-4.85222244,54.86860847],[-4.9411068,54.64888954],[-5.17416191,55.00055122],[-4.61332893,55.49499702],[-4.8797226,55.93610573],[-4.48166466,55.92110634],[-4.82860565,56.1131649],[-5.30333328,55.85055733],[-5.03222275,56.23250008],[-5.77750015,55.29666328],[-5.57360649,56.32471657],[-5.10777473,56.50777626],[-5.39866638,56.47866631],[-5.11999702,56.81666756],[-5.67694473,56.49389076],[-6.00832939,56.63749886],[-5.54694366,56.69194221],[-6.23500061,56.71916389],[-5.39972305,57.10582924],[-5.6496067,57.16161156],[-5.45027351,57.42027473],[-5.81916237,57.36388588],[-5.50860786,57.53472328],[-5.81666374,57.82166481],[-5.10277367,57.85083199],[-5.45527458,58.07638741],[-5.0047226,58.62333107],[-3.02555466,58.64750099],[-3.20861053,58.30444527],[-4.39221764,57.90527534],[-3.77305603,57.85110664],[-4.43583298,57.57499886],[-2.0755558,57.69944191],[-1.7733326,57.4580555],[-2.52722168,56.57860756],[-3.27805519,56.35750008],[-2.58277702,56.26805305],[-3.72527695,56.02749825],[-2.63111115,56.05471992],[-1.63388824,55.58082771],[-1.2974987,54.76361275],[-0.07499886,54.11194038],[0.11805534,53.56443977],[-0.71888924,53.69971657],[0.23555565,53.39943886],[0.34166908,53.09583473],[0.00003624,52.87954903],[1.28222466,52.92749977],[1.74944496,52.45582771],[1.22361183,51.80888557],[0.6997242,51.71944618],[0.9505558,51.60638618],[0.38278008,51.4505558],[1.38555717,51.38777351],[0.97500038,50.93194008],[0.24222374,50.73805428],[-0.25499916,50.82638741],[-0.79638863,50.72527504],[-0.92694283,50.8394413],[-1.15472221,50.84416389],[-2.43445015,50.54179192],[-2.92472267,50.73194313],[-3.71666718,50.20666695],[-4.37999535,50.36388588],[-5.19305229,49.9552784],[-5.7124958,50.05360603],[-4.22638512,51.18916512],[-3.02833366,51.20611],[-2.37999916,51.75555611],[-3.3461113,51.37861061],[-5.24694443,51.73027229],[-4.13083267,52.3347187],[-4.13360786,52.91444588],[-4.76085854,52.78897285],[-4.15332985,53.22555733]],[[0.90472221,51.35805702],[0.90889168,51.41694069],[0.73500252,51.40833473],[0.90472221,51.35805702]],[[-2.91833305,58.73194313],[-3.03694534,58.81805611],[-2.88638878,58.8319416],[-2.91833305,58.73194313]],[[-3.23138809,58.77555275],[-3.41805458,58.90416145],[-3.13472176,58.80082893],[-3.23138809,58.77555275]],[[-2.79305458,58.95138741],[-3.19499969,58.91111183],[-3.35138893,59.10638618],[-2.79305458,58.95138741]],[[-2.68138885,59.19583321],[-2.55555534,59.30305672],[-2.39027786,59.28305244],[-2.68138885,59.19583321]],[[-2.88999939,59.29527473],[-2.87749863,59.22860909],[-3.07638931,59.33138466],[-2.88999939,59.29527473]],[[-1.29611015,60.49110603],[-1.03722191,60.44416237],[-1.26861,59.85110664],[-1.29138947,60.24138832],[-1.69305611,60.2797184],[-1.29611015,60.49110603]],[[-1.02944374,60.49582863],[-1.17027664,60.52722359],[-1.09860992,60.72999763],[-1.02944374,60.49582863]],[[-0.81972122,60.68889046],[-0.96555519,60.68805122],[-0.87833214,60.84444618],[-0.75805473,60.81777382],[-0.81972122,60.68889046]]]}, -{code:"UA", name:"Ukraine", lng:31.388, lat:49.016, borders:[[[33.040276,46.011375],[32.759438,46.03611],[32.965271,46.049431],[33.040276,46.011375]],[[34.227486,46.061928],[34.158043,46.100548],[34.229149,46.187759],[34.227486,46.061928]],[[32.167763,46.145821],[31.584164,46.253319],[31.501106,46.366653],[32.167763,46.145821]],[[33.417702,52.3554],[33.838882,52.36055],[34.419716,51.808884],[34.098045,51.653877],[34.38221,51.263611],[35.371887,51.041435],[35.606651,50.369438],[37.458603,50.439713],[38.024223,49.903084],[38.30777,50.073883],[40.139763,49.601051],[40.166939,49.248604],[39.696655,49.010826],[40.07666,48.874992],[39.656937,48.616661],[39.998878,48.297218],[39.796387,47.857216],[38.8536,47.860825],[38.303322,47.558594],[38.235825,47.109428],[35.907204,46.651093],[34.985268,46.075829],[35.198044,46.443314],[35.05304,46.258041],[34.702492,46.175819],[34.561661,45.984993],[34.401649,46.013878],[34.542496,46.187485],[33.671928,46.220818],[34.633324,45.94165],[34.460541,45.767212],[35.126656,45.326096],[35.34304,45.332497],[35.050262,45.613884],[34.763054,46.015549],[34.666939,46.093597],[34.827209,46.069443],[35.053879,45.65387],[35.311661,45.383041],[35.475266,45.2911],[36.637215,45.376099],[36.439713,45.065536],[35.515266,45.116096],[33.955544,44.381104],[33.366936,44.579163],[33.541939,45.111931],[32.480537,45.395821],[33.771935,45.92054],[33.611382,46.147217],[31.791943,46.283051],[32.059151,46.395821],[31.507771,46.57972],[32.647217,46.641106],[32.019707,46.629433],[31.749435,47.253319],[31.907494,46.648872],[30.832771,46.548325],[30.251659,45.876656],[29.746941,45.619431],[29.633606,45.821106],[29.664331,45.211803],[28.21484,45.448647],[28.971935,46.006653],[28.994434,46.478325],[30.11694,46.386101],[29.949997,46.814156],[29.184441,47.443047],[29.141937,47.986092],[27.755554,48.451385],[26.634995,48.257164],[24.919441,47.711662],[22.894804,47.95454],[22.151442,48.411919],[22.558052,49.079437],[22.886074,49.002914],[22.680828,49.572495],[24.111385,50.56694],[23.604633,51.527695],[24.396664,51.886658],[25.775829,51.939156],[30.551414,51.251846],[30.943096,52.073792],[31.783886,52.108047],[33.417702,52.3554]]]}, -{code:"US", name:"United States", lng:-98.606, lat:39.622, borders:[[[-75.17028809,19.93139076],[-75.22366333,19.90155602],[-75.15917969,19.96069527],[-75.17028809,19.93139076]],[[-75.12139893,19.88749886],[-75.13967896,19.96287346],[-75.08525085,19.89304161],[-75.12139893,19.88749886]],[[-155.00540161,19.32888222],[-155.85928345,19.03277779],[-155.86431885,20.26916313],[-155.1585083,19.9624958],[-154.79263306,19.53861046],[-155.00540161,19.32888222]],[[-156.54724121,20.52527428],[-156.69857788,20.53471947],[-156.58511353,20.6072216],[-156.54724121,20.52527428]],[[-156.89193726,20.74416161],[-157.04830933,20.91805458],[-156.81225586,20.84361076],[-156.89193726,20.74416161]],[[-156.47317505,20.89805031],[-155.98843384,20.7480526],[-156.41983032,20.5886097],[-156.70205688,20.92443657],[-156.47317505,20.89805031]],[[-156.89434814,21.1611042],[-156.70379639,21.15805244],[-157.30462646,21.10055351],[-156.89434814,21.1611042]],[[-160.53042603,21.64388847],[-160.53765869,21.6322155],[-160.5411377,21.64138222],[-160.53042603,21.64388847]],[[-157.73013306,21.41166115],[-158.1036377,21.29527855],[-158.27325439,21.58054924],[-157.97192383,21.6994381],[-157.73013306,21.41166115]],[[-160.11499023,21.88749886],[-160.24758911,21.81360817],[-160.06140137,22.01388359],[-160.11499023,21.88749886]],[[-159.43356323,21.88138771],[-159.7852478,22.0613842],[-159.35147095,22.22138023],[-159.43356323,21.88138771]],[[-161.94161987,23.03943825],[-161.94815063,23.04721642],[-161.93814087,23.04638863],[-161.94161987,23.03943825]],[[-164.69595337,23.56471825],[-164.70751953,23.57666588],[-164.69662476,23.57805443],[-164.69595337,23.56471825]],[[-81.77383423,24.5447216],[-81.81345367,24.54387093],[-81.7290802,24.56055641],[-81.77383423,24.5447216]],[[-82.11444092,24.54583168],[-82.13719177,24.59388924],[-82.09996033,24.5830555],[-82.11444092,24.54583168]],[[-81.71505737,24.55311775],[-81.71064758,24.59572029],[-81.64613342,24.57755089],[-81.71505737,24.55311775]],[[-81.47712708,24.63638496],[-81.51774788,24.68499565],[-81.47854614,24.67777443],[-81.47712708,24.63638496]],[[-81.58830261,24.58999825],[-81.55302429,24.68721962],[-81.508255,24.62999916],[-81.58830261,24.58999825]],[[-81.10855103,24.70610619],[-81.13774109,24.70168114],[-81.05267334,24.71653175],[-81.10855103,24.70610619]],[[-81.34941101,24.62972069],[-81.42802429,24.74860573],[-81.36073303,24.70083046],[-81.34941101,24.62972069]],[[-80.96885681,24.74277306],[-81.0266571,24.71858788],[-80.92346191,24.76920891],[-80.96885681,24.74277306]],[[-80.84602356,24.7974987],[-80.82414246,24.82111168],[-80.78609467,24.82293129],[-80.84602356,24.7974987]],[[-80.6986084,24.86666679],[-80.7457428,24.84249687],[-80.70240784,24.88083076],[-80.6986084,24.86666679]],[[-80.64654732,24.90221977],[-80.66441345,24.89499855],[-80.62379456,24.9327755],[-80.64654732,24.90221977]],[[-167.99038696,25.00250053],[-168.0010376,25.00388527],[-168.00582886,25.01749611],[-167.99038696,25.00250053]],[[-80.57719421,24.94555092],[-80.25750732,25.34638786],[-80.37184143,25.14388847],[-80.57719421,24.94555092]],[[-80.22494507,25.4011097],[-80.23410034,25.40221977],[-80.18859863,25.49416161],[-80.22494507,25.4011097]],[[-80.16212463,25.66944313],[-80.18554688,25.68943977],[-80.15635681,25.73333168],[-80.16212463,25.66944313]],[[-171.72341919,25.76249886],[-171.73126221,25.76083183],[-171.72451782,25.79166222],[-171.72341919,25.76249886]],[[-81.68412781,25.84472084],[-81.71472168,25.88860893],[-81.66407776,25.88860893],[-81.68412781,25.84472084]],[[-173.94595337,26.06333351],[-173.96078491,26.07943916],[-173.94467163,26.08083153],[-173.94595337,26.06333351]],[[-82.126297,26.44999886],[-82.20632935,26.54583168],[-82.02885437,26.44499779],[-82.126297,26.44999886]],[[-82.22157288,26.61249733],[-82.24499512,26.63499641],[-82.25500488,26.69860649],[-82.22157288,26.61249733]],[[-82.07936096,26.4877758],[-82.17965698,26.69916344],[-82.13327026,26.6911068],[-82.07936096,26.4877758]],[[-82.26359558,26.7163868],[-82.28135681,26.80888939],[-82.25521851,26.75944328],[-82.26359558,26.7163868]],[[-97.1776886,26.08472252],[-97.38572693,26.83822441],[-97.3835907,27.20722008],[-97.1776886,26.08472252]],[[-82.5874176,27.32111168],[-82.68052673,27.42582893],[-82.6541748,27.41860771],[-82.5874176,27.32111168]],[[-97.38218689,27.21888542],[-97.31716919,27.49582863],[-97.04551888,27.84388924],[-97.38218689,27.21888542]],[[-96.88772583,28.03055382],[-97.03582764,27.87527657],[-96.8677063,28.13499641],[-96.88772583,28.03055382]],[[-96.55194092,28.26666832],[-96.81358337,28.09249687],[-96.40472412,28.39222145],[-96.55194092,28.26666832]],[[-96.36073303,28.40249825],[-96.31304932,28.45527458],[-96.22996521,28.48555183],[-96.36073303,28.40249825]],[[-80.66386414,28.25833321],[-80.7401886,28.47833061],[-80.62521362,28.59055519],[-80.66386414,28.25833321]],[[-90.87258911,29.04613304],[-90.95036316,29.06000328],[-90.92355347,29.06055641],[-90.87258911,29.04613304]],[[-90.73910522,29.04500008],[-90.758255,29.04860878],[-90.64241028,29.07333183],[-90.73910522,29.04500008]],[[-90.33546448,29.05722237],[-90.28527832,29.0830555],[-90.29833984,29.06694221],[-90.33546448,29.05722237]],[[-89.97528076,29.24277306],[-90.03102112,29.21194267],[-89.95491028,29.26805687],[-89.97528076,29.24277306]],[[-89.92823792,29.27861214],[-89.93521118,29.28750038],[-89.90744019,29.3022213],[-89.92823792,29.27861214]],[[-89.85997009,29.31027794],[-89.89382935,29.32305336],[-89.86965942,29.33527565],[-89.85997009,29.31027794]],[[-95.11105347,29.09805489],[-94.82130432,29.3386097],[-94.784729,29.30805397],[-95.11105347,29.09805489]],[[-89.17051888,29.47305107],[-89.21907043,29.46471977],[-89.15689087,29.49249458],[-89.17051888,29.47305107]],[[-89.6010437,29.51388741],[-89.61824036,29.53833199],[-89.59025574,29.56055641],[-89.56576538,29.55471992],[-89.56217957,29.52111244],[-89.6010437,29.51388741]],[[-89.08023071,29.5213871],[-89.0788269,29.54555321],[-89.03712463,29.57361031],[-89.08023071,29.5213871]],[[-91.78657532,29.48610878],[-92.03440857,29.59166527],[-91.85638428,29.63499641],[-91.78657532,29.48610878]],[[-85.11105347,29.63221931],[-85.19795227,29.68527412],[-85.08164978,29.67916298],[-85.11105347,29.63221931]],[[-89.42857361,29.69277382],[-89.46852112,29.72860909],[-89.42247009,29.7227726],[-89.42857361,29.69277382]],[[-84.97277832,29.60888863],[-85.09494019,29.62388802],[-84.69218445,29.75833321],[-84.97277832,29.60888863]],[[-89.42410278,29.74083138],[-89.4888916,29.73805046],[-89.49107361,29.79305458],[-89.42410278,29.74083138]],[[-89.28527832,29.7713871],[-89.3416748,29.80388832],[-89.27546692,29.80916405],[-89.28527832,29.7713871]],[[-84.6388092,29.77833366],[-84.66712952,29.77694511],[-84.57342529,29.81999779],[-84.6388092,29.77833366]],[[-88.84580994,29.77638817],[-88.86868286,30.060606],[-88.80574036,29.90638542],[-88.84580994,29.77638817]],[[-89.31771851,30.04083443],[-89.34635925,30.05944252],[-89.18499756,30.16666603],[-89.31771851,30.04083443]],[[-88.43771362,30.20610619],[-88.50053406,30.21888542],[-88.42802429,30.21277428],[-88.43771362,30.20610619]],[[-88.55215454,30.21471977],[-88.75411987,30.24471855],[-88.52633667,30.22305107],[-88.55215454,30.21471977]],[[-89.08111572,30.19972038],[-89.0916748,30.21666527],[-89.06045532,30.24667549],[-89.08111572,30.19972038]],[[-88.09472656,30.24110603],[-88.3125,30.23277473],[-88.10768127,30.27361107],[-88.09472656,30.24110603]],[[-86.5291748,30.40083122],[-87.29212952,30.33277702],[-86.76306152,30.40499687],[-86.5291748,30.40083122]],[[-118.40689087,32.81666756],[-118.59243774,33.04694557],[-118.36911774,32.85471535],[-118.40689087,32.81666756]],[[-79.36497688,33.00305367],[-79.36105347,33.04999733],[-79.33612061,33.06721687],[-79.36497688,33.00305367]],[[-119.44415283,33.21666145],[-119.5666275,33.28277016],[-119.48049927,33.27443886],[-119.44415283,33.21666145]],[[-118.30194092,33.30943489],[-118.44882202,33.32749367],[-118.59211159,33.4866581],[-118.30194092,33.30943489]],[[-77.96080017,33.85000038],[-78.01631165,33.87416267],[-77.94969177,33.9130497],[-77.96080017,33.85000038]],[[-120.03527832,34.02388191],[-120.10746765,33.90555],[-120.22605133,34.00610542],[-120.03527832,34.02388191]],[[-120.29767609,34.02860451],[-120.43804932,34.03694344],[-120.3638916,34.06554604],[-120.29767609,34.02860451]],[[-119.86802673,34.08416176],[-119.51358795,34.04277229],[-119.78833008,33.96721077],[-119.86802673,34.08416176]],[[-76.53527832,34.63555336],[-76.65472412,34.68610573],[-76.55912781,34.66499519],[-76.53527832,34.63555336]],[[-76.68249512,34.70221901],[-77.09799194,34.65054512],[-76.93107605,34.69137764],[-76.68249512,34.70221901]],[[-76.53189087,34.58582497],[-76.4208374,34.77582741],[-76.19969177,34.94165993],[-76.53189087,34.58582497]],[[-76.06771851,35.03943825],[-76.13110352,35.00193977],[-76.03941345,35.06110573],[-76.06771851,35.03943825]],[[-76.01077271,35.07416725],[-75.98104858,35.11499977],[-75.76686096,35.19388008],[-76.01077271,35.07416725]],[[-75.52722168,35.23555183],[-75.65351868,35.2255497],[-75.51251221,35.77721596],[-75.52722168,35.23555183]],[[-75.6194458,35.82138252],[-75.72332764,35.94165993],[-75.66583252,35.92694283],[-75.6194458,35.82138252]],[[-75.90602112,37.11249733],[-75.89883423,37.13694191],[-75.87249756,37.1491642],[-75.90602112,37.11249733]],[[-75.78833008,37.23804665],[-75.8374176,37.22776985],[-75.78527832,37.29860878],[-75.78833008,37.23804665]],[[-75.69665527,37.4027729],[-75.71080017,37.39027596],[-75.66833496,37.46027565],[-75.69665527,37.4027729]],[[-121.8013916,38.05526924],[-121.82000732,38.06805611],[-121.79638672,38.06666756],[-121.8013916,38.05526924]],[[-75.3540802,37.86666298],[-75.38414001,37.87221718],[-75.12107849,38.2630558],[-75.3540802,37.86666298]],[[-74.32936096,39.42166328],[-74.3943634,39.38249397],[-74.44415283,39.40693855],[-74.37619019,39.42074394],[-74.34799194,39.47443581],[-74.32936096,39.42166328]],[[-74.24694824,39.52555275],[-74.09996033,39.75083351],[-74.13827515,39.65943336],[-74.24694824,39.52555275]],[[-74.21994019,40.51166725],[-74.17694092,40.64193916],[-74.06271362,40.63943672],[-74.21994019,40.51166725]],[[-73.22332764,40.63527107],[-73.29463196,40.63388252],[-72.7666626,40.76610756],[-73.22332764,40.63527107]],[[-72.26219177,41.12526894],[-72.62107849,40.9130497],[-71.85604858,41.06916237],[-73.58274841,40.59610176],[-74.03244019,40.62582588],[-72.26219177,41.12526894]],[[-69.99499512,41.32805061],[-69.99378967,41.25027657],[-70.23410034,41.28360939],[-69.99499512,41.32805061]],[[-70.50630188,41.35721779],[-70.83796692,41.35999489],[-70.61715698,41.47387886],[-70.50630188,41.35721779]],[[-71.29747009,41.45860481],[-71.3583374,41.45916176],[-71.22244263,41.65416145],[-71.29747009,41.45860481]],[[-68.80323792,44.04805183],[-68.89796448,44.12388039],[-68.76435852,44.0949955],[-68.80323792,44.04805183]],[[-68.65080261,44.16888618],[-68.72135925,44.22887611],[-68.66799927,44.2852726],[-68.65080261,44.16888618]],[[-68.320755,44.23721504],[-68.42823792,44.31999397],[-68.26306152,44.45277596],[-68.16833496,44.34554482],[-68.320755,44.23721504]],[[-123.93804932,46.43110847],[-123.94915771,46.43110847],[-123.98300171,46.46915627],[-123.97244263,46.51527596],[-123.93804932,46.43110847]],[[-122.8429718,47.2069416],[-122.90222168,47.29749489],[-122.8454895,47.31249428],[-122.8429718,47.2069416]],[[-122.48213196,47.34971809],[-122.45056152,47.51832771],[-122.38110352,47.39471626],[-122.48213196,47.34971809]],[[-122.50466919,48.30971718],[-122.37216187,47.91944313],[-122.75772095,48.233881],[-122.50466919,48.30971718]],[[-122.8166275,48.41694069],[-122.93608093,48.45777321],[-122.87663269,48.56415749],[-122.8166275,48.41694069]],[[-123.,48.44610023],[-123.17823792,48.5922184],[-122.99498749,48.5297184],[-123.,48.44610023]],[[-122.92247009,48.7116642],[-122.74913025,48.65138435],[-123.01023102,48.60360909],[-122.92247009,48.7116642]],[[-123.05323792,48.97387886],[-123.09375,48.99943733],[-123.0342865,48.99943733],[-123.05323792,48.97387886]],[[-95.07806396,49.35916328],[-94.60583496,48.72443581],[-92.95306396,48.62332344],[-91.41833496,48.04110909],[-90.86857605,48.23749733],[-89.3565979,47.97971535],[-88.36802673,48.31221199],[-84.85691833,46.90221596],[-84.56500244,46.4663868],[-84.126297,46.53193855],[-83.95883179,46.07166481],[-83.57740784,46.10527229],[-83.59777832,45.82721901],[-82.54299927,45.35582924],[-82.13021851,43.58526802],[-82.52133179,42.61888313],[-83.16854858,42.04610634],[-82.69665527,41.68387794],[-78.98693848,42.81999397],[-79.18466187,43.46554756],[-78.72462463,43.62943459],[-76.80194092,43.63360786],[-74.99073792,44.9866581],[-70.87860107,45.23860359],[-69.23246765,47.47137642],[-67.79496765,47.06999397],[-67.79910278,45.70110512],[-67.20654297,45.18303871],[-66.96885681,44.83111],[-67.18684387,44.66193581],[-67.55107117,44.66610146],[-67.56521606,44.55027199],[-67.7752533,44.54694557],[-68.04747009,44.34694099],[-68.10855103,44.46027565],[-68.32106018,44.46588326],[-68.55912781,44.41888618],[-68.54747009,44.31777382],[-68.61573792,44.30638313],[-68.79518127,44.57972145],[-69.06750488,44.06332588],[-69.72190857,43.78582954],[-69.77330017,44.07916451],[-69.82380676,43.7144413],[-70.17247009,43.78055],[-70.7290802,43.12276649],[-70.58056641,42.65193367],[-71.04441833,42.31110573],[-70.32469177,41.71138191],[-70.01109314,41.79722023],[-70.0788269,42.06221199],[-69.93629456,41.66944313],[-71.1857605,41.46666145],[-71.11105347,41.79500008],[-71.3913269,41.81193733],[-71.50521851,41.36693764],[-72.90635681,41.28611183],[-73.99738312,40.71346092],[-73.95666504,41.30526924],[-74.26916504,40.47471046],[-73.95219421,40.29999733],[-74.0763092,39.7769413],[-74.05378723,40.05749702],[-74.1502533,39.70499611],[-74.4054718,39.51610756],[-74.46257782,39.42106819],[-74.41549683,39.35527229],[-74.95491028,38.92416573],[-74.89274788,39.16777229],[-75.55749512,39.61805153],[-75.02848816,40.01230812],[-75.58851624,39.64888191],[-75.04388428,38.42166328],[-75.96080017,37.15221596],[-75.64404297,37.96117592],[-75.88076782,37.94943428],[-75.83796692,38.39888191],[-76.24249268,38.36693764],[-75.95666504,38.64860725],[-76.35997009,38.85721779],[-75.83164978,39.57749367],[-76.61857605,39.25416756],[-76.37609863,38.36361122],[-76.66604614,38.48054695],[-76.30999756,38.04638863],[-77.2444458,38.3983326],[-77.06108093,38.90526772],[-77.32000732,38.34527016],[-76.24160767,37.90499306],[-76.35354614,37.61860085],[-77.13380432,38.17276955],[-76.28657532,37.56749916],[-76.38110352,37.27388191],[-76.68270874,37.42971992],[-76.26806641,37.07888222],[-77.23213196,37.29638863],[-75.98999023,36.9138813],[-75.5291748,35.80388069],[-75.938797,36.71666145],[-75.78549194,36.06999397],[-76.19544983,36.31999397],[-76.06304932,36.15332222],[-76.65657043,36.03110695],[-76.70611572,36.26416206],[-76.73049927,35.93943214],[-76.070755,35.99193764],[-76.03527832,35.6499958],[-75.85354614,35.97499275],[-75.72027588,35.81443977],[-76.14916992,35.33693886],[-77.05073547,35.53027534],[-76.46885681,35.27166176],[-76.76130676,34.98777199],[-77.0763092,35.15609932],[-76.9443512,34.97748756],[-76.33580017,34.88694191],[-77.42878723,34.74193764],[-77.93074036,33.92777443],[-77.96166992,34.15860176],[-78.01359558,33.89193916],[-78.82740784,33.73027229],[-79.19638062,33.2789402],[-79.18859863,33.43638039],[-79.27133179,33.37332344],[-79.20578003,33.16554451],[-79.37168884,33.05894661],[-79.3818512,33.00972176],[-80.67160034,32.52166176],[-80.46722412,32.31582832],[-80.83688354,32.51666451],[-80.66996765,32.21415901],[-81.49694824,31.12555504],[-81.25521851,29.7966671],[-80.55249023,28.52499962],[-80.44665527,27.86444283],[-80.60212708,28.60750008],[-80.84407043,28.79055595],[-80.75553894,28.41583061],[-80.0333252,26.78666496],[-80.39862061,25.18472099],[-81.08796692,25.1155529],[-80.9152832,25.25139046],[-81.33666992,25.8049984],[-81.73655701,25.95944405],[-81.97000885,26.48283195],[-81.77775574,26.71055412],[-82.06413269,26.54500008],[-82.01719666,26.96471977],[-82.3026886,26.83722115],[-82.65527344,27.4616642],[-82.42247009,27.91749763],[-82.6913147,28.03222084],[-82.72244263,27.65694237],[-82.85333252,27.85527611],[-82.63110352,28.88499641],[-83.66941833,29.90610695],[-84.20741272,30.10555458],[-85.3540802,29.67666435],[-85.63388062,30.10444069],[-85.39219666,30.0494442],[-86.26327515,30.49666405],[-88.02362061,30.21944237],[-87.75630188,30.28527641],[-88.02024841,30.70110893],[-88.13273621,30.31444359],[-90.41963196,30.19833183],[-89.66712952,30.16777611],[-89.6579895,29.87388802],[-89.39938354,30.05083275],[-89.75325012,29.63083076],[-89.6763916,29.52388954],[-89.18717957,29.33971977],[-89.008255,29.17694283],[-89.40493774,28.92666435],[-89.27275085,29.15583229],[-90.17823792,29.57250023],[-90.20666504,29.09194374],[-91.24694824,29.24083138],[-91.8416748,29.8302784],[-92.3082428,29.53972054],[-93.84025574,29.70416451],[-93.84527588,29.98805046],[-93.85746765,29.67610741],[-94.77241516,29.36388588],[-94.47583008,29.56138802],[-95.05934143,29.71888542],[-94.88806152,29.37555504],[-94.90275574,29.31444359],[-95.09385681,29.17777443],[-95.14077759,29.05750084],[-96.2127533,28.48555183],[-95.98573303,28.6491642],[-96.64164734,28.71971703],[-96.39828491,28.43610954],[-96.80357361,28.47305107],[-97.18466187,27.82749748],[-97.52046204,27.86638832],[-97.411026,27.32749748],[-97.77383423,27.4588871],[-97.42388916,27.26749992],[-97.55934143,26.83611107],[-97.14063263,25.96642876],[-99.10473633,26.43499947],[-99.50500488,27.57027626],[-101.40492249,29.77277946],[-102.30584717,29.88944435],[-103.375,29.02361107],[-104.53994751,29.67111015],[-104.90046692,30.5727787],[-106.40078735,31.75027657],[-108.20861816,31.78333473],[-108.20828247,31.3330555],[-111.0458374,31.3330555],[-113.05282593,31.97107124],[-114.80979919,32.50699043],[-114.71901703,32.71845818],[-117.12225533,32.53533363],[-117.48072052,33.32749367],[-118.534729,34.05082893],[-120.62020874,34.57083321],[-120.61410522,35.13582802],[-121.86749268,36.31249428],[-121.79638672,36.87943459],[-122.48802185,37.51832771],[-122.38685608,37.81666756],[-122.0057621,37.47137642],[-122.39328003,37.95777321],[-122.24053192,38.05916023],[-121.41996765,38.01277351],[-121.57663727,38.11583138],[-121.7360611,38.04471779],[-122.01860809,38.14811516],[-122.10962677,38.06138039],[-122.3651886,38.15555],[-122.49128723,37.82777596],[-122.99707031,38.00510979],[-122.96451569,38.23961449],[-122.80358315,38.08804512],[-123.10462952,38.46110725],[-123.70361328,38.93249702],[-123.77580261,39.71721077],[-124.3321991,40.26610756],[-124.03996277,41.43110847],[-124.52439117,42.86610603],[-124.13826752,43.37110329],[-123.95185852,46.18110847],[-123.16357422,46.19519234],[-124.,46.32361031],[-124.04267883,46.65804482],[-124.01577759,46.65443611],[-123.98999023,46.39777565],[-123.9416275,46.39110756],[-123.75256348,46.69307137],[-124.09744263,46.86138344],[-123.79660034,46.97609901],[-124.16191101,46.94110298],[-124.71579742,48.39527321],[-122.751091,48.1611042],[-122.63021851,47.9158268],[-123.14741516,47.36860085],[-122.8363266,47.43915749],[-123.10246277,47.39972115],[-122.56555176,47.93804359],[-122.45469666,47.77443886],[-122.54998779,47.28277016],[-122.61911774,47.42054939],[-122.7585907,47.18971443],[-122.79747009,47.39527321],[-123.06858826,47.15165901],[-122.87860107,47.06415749],[-122.30966187,47.40110207],[-122.3791275,48.29166603],[-122.70436096,48.48610878],[-122.4375,48.59804726],[-122.76020813,48.99943733],[-95.1541748,48.99943733],[-95.07806396,49.35916328]],[[-122.49575043,47.59554482],[-122.50325012,47.7152729],[-122.58164978,47.67166328],[-122.49575043,47.59554482]],[[-123.93859863,45.53666115],[-123.91691589,45.56443977],[-123.93434143,45.55832863],[-123.93859863,45.53666115]],[[-77.85157776,34.11110878],[-77.820755,34.17527199],[-77.85583496,34.1491642],[-77.85157776,34.11110878]],[[-179.10516357,51.21305275],[-179.14193726,51.26859474],[-179.08706665,51.29083443],[-179.10516357,51.21305275]],[[-178.96231079,51.31166267],[-178.94992065,51.39693642],[-178.90020752,51.35499763],[-178.96231079,51.31166267]],[[178.99301338,51.57499886],[179.4713459,51.36749458],[178.63638496,51.63777351],[178.99301338,51.57499886]],[[-178.77697754,51.74553871],[-178.8425293,51.81915474],[-178.74279785,51.80777168],[-178.77697754,51.74553871]],[[178.39221382,51.7630558],[178.22302437,51.83082771],[178.32995796,51.81499672],[178.39221382,51.7630558]],[[-176.01281738,51.83027077],[-176.14328003,51.77443886],[-176.2192688,51.83138466],[-176.01281738,51.83027077]],[[-176.33642578,51.72165871],[-176.41436768,51.85499763],[-176.27697754,51.86026955],[-176.33642578,51.72165871]],[[-177.81378174,51.71970558],[-177.94992065,51.60637856],[-178.21795654,51.87193489],[-177.81378174,51.71970558]],[[-176.55047607,51.90582466],[-176.42962646,51.73026466],[-176.97491455,51.59581947],[-176.55047607,51.90582466]],[[-175.95098877,51.8688755],[-176.09295654,51.88526344],[-176.00195313,51.90887642],[-175.95098877,51.8688755]],[[-177.12216187,51.78443336],[-177.70446777,51.70083046],[-177.15719604,51.93832588],[-177.12216187,51.78443336]],[[-175.72491455,51.93055153],[-175.72906494,51.96610451],[-175.65744019,51.9569416],[-175.72491455,51.93055153]],[[-175.86499023,51.9636097],[-175.94662476,51.97886848],[-175.80181885,51.98220253],[-175.86499023,51.9636097]],[[178.53692818,51.89361],[178.46829414,51.98472023],[178.60608101,51.94777107],[178.53692818,51.89361]],[[179.73745918,51.90304756],[179.48608589,51.97221565],[179.65860176,52.02471352],[179.73745918,51.90304756]],[[177.68469429,52.07999611],[177.60495186,51.92027473],[177.24106026,51.87693977],[177.68469429,52.07999611]],[[-176.03723145,51.96443367],[-176.19073486,52.05999184],[-176.04592896,52.10222054],[-176.03723145,51.96443367]],[[-173.51586914,52.1069355],[-172.95553589,52.08554268],[-174.05679321,52.12027168],[-173.51586914,52.1069355]],[[175.961092,52.33555031],[175.88189888,52.37249184],[175.98773384,52.35360909],[175.961092,52.33555031]],[[-172.38824463,52.28972054],[-172.62805176,52.25832558],[-172.43814087,52.39193153],[-172.38824463,52.28972054]],[[-173.99517822,52.29110146],[-175.33578491,52.01415443],[-174.18441772,52.41694069],[-173.99517822,52.29110146]],[[173.78775215,52.50110817],[173.73550606,52.3533268],[173.37524605,52.39943886],[173.78775215,52.50110817]],[[-171.23519897,52.45083046],[-171.30792236,52.4994297],[-171.21710205,52.51054573],[-171.23519897,52.45083046]],[[-170.6053772,52.59082985],[-170.8416748,52.55415535],[-170.67614746,52.69415474],[-170.6053772,52.59082985]],[[174.1777668,52.70555305],[174.0741291,52.71138191],[174.10217476,52.74110603],[174.1777668,52.70555305]],[[-170.11474609,52.71832466],[-170.17987061,52.78387642],[-170.05487061,52.76526833],[-170.11474609,52.71832466]],[[-169.67504883,52.81777382],[-170.01306152,52.81833076],[-169.78109741,52.88526344],[-169.67504883,52.81777382]],[[-170.04071045,52.85304451],[-170.12741089,52.88859749],[-169.99365425,52.90193367],[-170.04071045,52.85304451]],[[173.2999897,52.88221169],[172.92859077,52.74388313],[172.47635078,52.92444038],[173.2999897,52.88221169]],[[-169.72427368,52.94331551],[-169.75238037,53.02637672],[-169.67657471,53.03166389],[-169.72427368,52.94331551]],[[-168.24346924,53.25110054],[-169.0866394,52.82805061],[-168.35189819,53.4755497],[-167.79525757,53.49553871],[-168.24346924,53.25110054]],[[-166.20993042,53.70527077],[-166.29333496,53.79305458],[-166.08990479,53.83943367],[-166.20993042,53.70527077]],[[-166.60736084,53.82972145],[-166.21490479,53.92832375],[-166.7527771,53.44638252],[-167.84625244,53.30859566],[-166.80377197,53.64887428],[-167.0241394,53.95554543],[-166.60736084,53.82972145]],[[-165.25170898,54.07609749],[-165.29766846,54.03749275],[-165.48193359,54.07443428],[-165.25170898,54.07609749]],[[-164.93920898,54.12693977],[-164.96557617,54.07527351],[-165.22192383,54.08999062],[-164.93920898,54.12693977]],[[-165.69683838,54.0847187],[-166.12301636,54.11638069],[-165.93814087,54.22054482],[-165.69683838,54.0847187]],[[-165.56051636,54.11026955],[-165.68179321,54.23804665],[-165.48623657,54.2880497],[-165.56051636,54.11026955]],[[-162.40045166,54.36944008],[-162.48953247,54.40971565],[-162.36825562,54.38833046],[-162.40045166,54.36944008]],[[-162.54376221,54.38138008],[-162.78634644,54.41471291],[-162.83099365,54.49415779],[-162.54376221,54.38138008]],[[-132.61932373,54.75444221],[-132.78112793,54.92527199],[-132.61868286,54.89610481],[-132.61932373,54.75444221]],[[-159.29483032,54.86693764],[-159.33599854,54.92721748],[-159.20687866,54.92444038],[-159.29483032,54.86693764]],[[-163.41351318,54.89110756],[-163.36999512,54.78499794],[-163.14501953,54.76610756],[-163.04855347,54.66832924],[-164.9520874,54.57583046],[-164.43270874,54.93055153],[-163.41351318,54.89110756]],[[-162.2928772,54.83416176],[-162.43444824,54.93110847],[-162.23257446,54.9652729],[-162.2928772,54.83416176]],[[-131.32577515,54.85694313],[-131.48257446,54.93082619],[-131.23626709,54.99527168],[-131.32577515,54.85694313]],[[-159.43399048,54.94054604],[-159.47909737,55.01416206],[-159.3493042,55.04916573],[-159.43399048,54.94054604]],[[-161.73953247,55.05610085],[-161.9067688,55.15138435],[-161.6413269,55.11332893],[-161.73953247,55.05610085]],[[-132.6746521,55.03305244],[-132.86453247,55.02999306],[-132.85321045,55.15943336],[-132.6746521,55.03305244]],[[-131.42572021,55.21110725],[-131.37216187,55.01361275],[-131.61737061,55.01111031],[-131.42572021,55.21110725]],[[-132.83581543,54.88916206],[-132.67987061,54.66610146],[-133.19555664,55.23027229],[-132.83581543,54.88916206]],[[-159.51934814,55.06415749],[-159.65545654,55.05499458],[-159.53527832,55.24749184],[-159.51934814,55.06415749]],[[-161.56182861,55.21805],[-161.70599365,55.20471382],[-161.5335083,55.25277901],[-161.56182861,55.21805]],[[-159.84320068,55.13249397],[-160.24453735,54.90138435],[-159.88220215,55.29083443],[-159.84320068,55.13249397]],[[-133.24954224,55.20916176],[-133.43945313,55.3019352],[-133.29660034,55.33055305],[-133.24954224,55.20916176]],[[-160.33294678,55.24804878],[-160.52807617,55.32055092],[-160.34689331,55.36860085],[-160.33294678,55.24804878]],[[-160.69555664,55.3999958],[-160.46166992,55.18721199],[-160.81640625,55.11832619],[-160.69555664,55.3999958]],[[-133.59820557,55.233881],[-133.65350533,55.36944008],[-133.44683838,55.4102726],[-133.59820557,55.233881]],[[-131.72494507,55.13472176],[-131.84603882,55.41999245],[-131.61651611,55.28360939],[-131.72494507,55.13472176]],[[-163.14633179,55.39332771],[-163.19467163,55.42193794],[-163.13696289,55.43610573],[-163.14633179,55.39332771]],[[-160.17877197,55.39610481],[-160.34188843,55.41694069],[-160.24954224,55.46305275],[-160.17877197,55.39610481]],[[-133.50500488,55.42721748],[-133.60147095,55.44748878],[-133.42138672,55.48360634],[-133.50500488,55.42721748]],[[-133.57794189,55.49777412],[-133.75805664,55.48721504],[-133.70230103,55.55138588],[-133.57794189,55.49777412]],[[-133.28939819,55.47582436],[-133.43661499,55.52749062],[-133.30834961,55.5547123],[-133.28939819,55.47582436]],[[-133.50540161,55.69332314],[-133.67767334,55.78416634],[-133.29962158,55.79361153],[-133.50540161,55.69332314]],[[-133.24215698,55.77665901],[-133.32904053,55.87748909],[-133.21536255,55.86194038],[-133.24215698,55.77665901]],[[-158.86410522,55.80388069],[-158.83276367,55.89388466],[-158.7097168,55.83138466],[-158.86410522,55.80388069]],[[-134.24954224,55.81944466],[-134.33883667,55.91805458],[-134.09646606,55.91832924],[-134.24954224,55.81944466]],[[-155.58010864,55.77443886],[-155.73999023,55.82860756],[-155.56378174,55.9186039],[-155.58010864,55.77443886]],[[-133.84777832,55.84749031],[-133.92703247,55.91193581],[-133.84777832,55.93526649],[-133.84777832,55.84749031]],[[-131.05050659,55.79972267],[-131.14260864,55.19693947],[-131.46166992,55.28611183],[-131.34887695,55.64499855],[-131.52175903,55.29305458],[-131.822052,55.45027351],[-131.68377686,55.83333015],[-131.26501465,55.96082497],[-131.05050659,55.79972267]],[[-131.51934814,55.91554451],[-131.57687378,55.93194008],[-131.39938354,55.96388435],[-131.51934814,55.91554451]],[[-133.69509888,55.8963871],[-133.67965698,56.06638527],[-133.27807617,56.13971901],[-133.69509888,55.8963871]],[[-133.93093872,56.28833199],[-133.94793701,56.3019352],[-133.92550659,56.29805183],[-133.93093872,56.28833199]],[[-133.48846436,56.33693886],[-132.14416504,55.48054695],[-132.5625,55.56777382],[-131.98846436,55.26416206],[-132.21841431,54.99249458],[-131.96298218,55.02582741],[-132.00390625,54.69054604],[-132.6413269,55.25027657],[-133.22232056,55.28305244],[-132.86737061,55.35388374],[-133.128479,55.49471474],[-132.90829468,55.62804604],[-133.37216187,55.62054634],[-133.13500977,55.88110542],[-133.25823975,56.15249062],[-133.61715698,56.20749855],[-133.48846436,56.33693886]],[[-132.0942688,56.09332466],[-132.31881714,55.91221046],[-132.71688843,56.15138435],[-132.41766357,56.35083199],[-132.0942688,56.09332466]],[[-132.81704712,56.233881],[-133.05770874,56.34749031],[-132.63543701,56.43416023],[-132.81704712,56.233881]],[[-132.50061226,56.3533268],[-132.49368286,56.43582344],[-132.38650513,56.39860725],[-132.50061226,56.3533268]],[[-132.13241577,56.34527016],[-132.05593872,56.11138344],[-132.37368774,56.48443794],[-132.13241577,56.34527016]],[[-153.95883179,56.50277901],[-154.13433838,56.50555611],[-153.87368774,56.55332375],[-153.95883179,56.50277901]],[[-156.996521,56.55555153],[-157.32971191,56.53582954],[-157.25149536,56.58166695],[-156.996521,56.55555153]],[[-132.39807129,56.58360481],[-132.43487549,56.58971596],[-132.37936401,56.6005497],[-132.39807129,56.58360481]],[[-154.48126221,56.60169792],[-154.40261841,56.54666328],[-154.78747559,56.41496849],[-154.48126221,56.60169792]],[[-154.21188354,56.49888039],[-154.35235596,56.54166603],[-154.08493042,56.60804939],[-154.21188354,56.49888039]],[[-169.67330933,56.60859871],[-169.47125244,56.59221077],[-169.78613281,56.61388588],[-169.67330933,56.60859871]],[[-132.77307129,56.49471474],[-132.87347412,56.79610634],[-132.52871704,56.59527016],[-132.77307129,56.49471474]],[[-133.98736572,56.87082863],[-133.90261841,56.75305367],[-134.02459717,56.6472187],[-133.83056641,56.79610634],[-133.69119263,56.59971809],[-133.92050171,56.61416054],[-133.84603882,56.29083443],[-133.9730835,56.3561039],[-133.97320557,56.08166695],[-134.06555176,56.30582619],[-134.12304688,55.99582863],[-134.06509399,56.55054665],[-134.40872192,56.82943916],[-133.98736572,56.87082863]],[[-133.31771851,56.99388313],[-132.92483521,56.64332771],[-133.35192871,56.83860207],[-133.08187866,56.52388191],[-133.57556152,56.43360329],[-133.69683838,56.8319416],[-133.89044189,56.89694405],[-133.73605347,56.89305305],[-134.01806641,57.01471901],[-133.31771851,56.99388313]],[[-153.25323486,56.99833107],[-153.40744019,57.07277107],[-153.23410034,57.20582771],[-152.88305664,57.15027046],[-153.25323486,56.99833107]],[[-170.1661377,57.16331673],[-170.41394043,57.17416573],[-170.15045166,57.2283268],[-170.1661377,57.16331673]],[[-135.79571533,56.98638344],[-135.71035767,57.32361031],[-135.54592896,57.12943459],[-135.79571533,56.98638344]],[[-134.9375,57.35888863],[-134.65350533,56.1630497],[-135.67266846,57.35193825],[-134.9375,57.35888863]],[[-134.79244995,57.30027199],[-134.97451782,57.41526985],[-134.81356812,57.41694069],[-134.79244995,57.30027199]],[[-153.20883179,57.81249428],[-153.53634644,57.93471718],[-153.35321045,57.93638039],[-153.26956177,57.8991642],[-153.20883179,57.81249428]],[[-152.35430908,57.89027596],[-152.50323486,57.93305397],[-152.41723633,57.9763813],[-152.35430908,57.89027596]],[[-153.11694336,57.94999886],[-152.15133667,57.60444069],[-153.02261353,57.4736042],[-152.5958252,57.3699894],[-153.16940308,57.34554482],[-152.95599365,57.25388527],[-153.26022339,57.22776985],[-153.5,57.06388283],[-153.73147583,57.05971718],[-153.54986572,56.98304939],[-153.97952271,56.73860359],[-153.73757935,57.13082314],[-154.47930908,57.12027168],[-154.1010437,57.11638832],[-154.29766846,56.84887886],[-154.80093384,57.28611183],[-154.20709229,57.66666603],[-153.62805176,57.2694416],[-153.88021851,57.64305305],[-153.58099365,57.61249733],[-153.92834473,57.81110573],[-153.49694824,57.62721443],[-153.31509399,57.72582436],[-153.47909737,57.83943367],[-153.21298218,57.78833199],[-153.15045166,57.86388588],[-153.04788208,57.82749367],[-153.29223633,58.00166512],[-153.11694336,57.94999886]],[[-153.18508911,58.09249306],[-152.88760376,57.99110603],[-153.4178772,58.05888557],[-153.18508911,58.09249306]],[[-136.43704224,57.84638405],[-136.48431396,58.09332466],[-136.33056641,58.0102787],[-136.43704224,57.84638405]],[[-135.74258423,58.25610542],[-135.48236084,58.15555],[-135.70776367,57.9783268],[-134.93029785,58.02804756],[-135.20471191,57.94221687],[-135.01043701,57.7769413],[-135.88739014,57.98860359],[-135.29678345,57.73166084],[-134.92160034,57.75694466],[-134.84320068,57.46277046],[-135.8039856,57.76333046],[-135.54266357,57.47221565],[-135.83078003,57.38582802],[-136.41223145,57.81582832],[-136.02960205,57.84916115],[-136.35214233,58.21943855],[-135.74258423,58.25610542]],[[-151.84710693,58.16971779],[-151.89654732,58.19415474],[-151.83535767,58.26860237],[-151.84710693,58.16971779]],[[-134.45425415,58.31332588],[-134.259552,58.19499397],[-134.68377686,58.29833412],[-134.5668335,58.34082985],[-134.45425415,58.31332588]],[[-152.40917969,58.36554909],[-151.97277832,58.23304939],[-153.23126221,58.16916084],[-152.40917969,58.36554909]],[[-134.6746521,58.16054726],[-134.16897583,58.15971565],[-133.87564087,57.67276955],[-134.2885437,58.07721901],[-133.86019897,57.36055183],[-134.48648071,57.02555275],[-134.61325073,57.22499275],[-134.31008911,57.33610725],[-134.57250977,57.48971748],[-134.34973145,57.54277229],[-134.65438843,57.59832954],[-134.95666504,58.40777016],[-134.6746521,58.16054726]],[[-152.49368286,58.47221565],[-152.66049194,58.54332924],[-152.3458252,58.62721443],[-152.49368286,58.47221565]],[[-160.95687866,58.55694008],[-161.11297607,58.65527534],[-160.68704224,58.81833076],[-160.95687866,58.55694008]],[[-152.31314087,58.9083271],[-152.36019897,58.91638374],[-152.16134644,58.94221687],[-152.31314087,58.9083271]],[[-150.69161987,59.30665779],[-150.77655029,59.32888222],[-150.61651611,59.38971901],[-150.69161987,59.30665779]],[[-153.41134644,59.3302784],[-153.55203247,59.36471748],[-153.40307617,59.40693855],[-153.41134644,59.3302784]],[[-150.31140137,59.42054939],[-150.44009399,59.40110207],[-150.29266357,59.46305275],[-150.31140137,59.42054939]],[[-144.58493042,59.81027412],[-144.50390625,59.8944416],[-144.20883179,60.00555611],[-144.58493042,59.81027412]],[[-148.16113281,59.94110298],[-148.24563599,59.94249153],[-147.99215698,60.04027748],[-148.16113281,59.94110298]],[[-148.02761841,59.94665718],[-147.88327026,60.06721687],[-147.81704712,60.06888771],[-148.02761841,59.94665718]],[[-148.11541748,59.99638557],[-147.96710205,60.15304756],[-147.87652588,60.10388374],[-148.11541748,59.99638557]],[[-148.03372192,60.18943214],[-148.15133667,60.04194069],[-148.30966187,60.0297184],[-148.03372192,60.18943214]],[[-147.84997559,59.7769413],[-147.19360352,60.3533268],[-146.92333984,60.30916023],[-147.84997559,59.7769413]],[[-147.71188354,60.37610054],[-147.759552,60.16554451],[-147.90960693,60.23472023],[-147.71188354,60.37610054]],[[-148.07925415,60.28277016],[-148.14239502,60.32055092],[-147.98324585,60.38388252],[-148.07925415,60.28277016]],[[-166.10952759,60.39915657],[-165.68136597,60.29471779],[-165.55966187,59.92360878],[-166.19293213,59.75443459],[-167.4178772,60.18942451],[-166.10952759,60.39915657]],[[-146.35388184,60.4074955],[-146.0788269,60.40526772],[-146.72409058,60.37471199],[-146.35388184,60.4074955]],[[-145.12258911,60.30721474],[-145.2817688,60.32999611],[-145.08688354,60.41666603],[-145.12258911,60.30721474]],[[-172.52023315,60.38833046],[-172.20684814,60.31304359],[-173.05352783,60.49720955],[-172.52023315,60.38833046]],[[-151.95556641,60.42276955],[-151.95098877,60.51221657],[-151.85626221,60.48971748],[-151.95556641,60.42276955]],[[-146.24694824,60.45499611],[-146.32055664,60.49415779],[-145.74954224,60.59471321],[-146.24694824,60.45499611]],[[-147.37258911,60.66166115],[-147.47537231,60.68888283],[-147.31378174,60.67749214],[-147.37258911,60.66166115]],[[-147.92550659,60.66221046],[-148.00411987,60.72693825],[-147.84603882,60.69999886],[-147.92550659,60.66221046]],[[-148.14065552,60.64222145],[-148.21405029,60.75444221],[-148.10842896,60.73638344],[-148.14065552,60.64222145]],[[-164.98825073,60.82249641],[-165.01739502,60.87443733],[-164.90350533,60.85360909],[-164.98825073,60.82249641]],[[-146.75323486,60.80721474],[-146.83187866,60.83638191],[-146.74414063,60.88138008],[-146.75323486,60.80721474]],[[-147.15066528,60.86027718],[-147.31771851,60.88416481],[-147.07510376,60.8991642],[-147.15066528,60.86027718]],[[-147.92877197,60.80694008],[-148.13305664,60.79972267],[-148.10647583,60.91249275],[-147.92877197,60.80694008]],[[-170.31878662,63.25471687],[-170.31573486,63.25387764],[-170.29592896,63.23804665],[-170.31878662,63.25471687]],[[-170.31878662,63.25471687],[-170.3621521,63.2824955],[-170.34170532,63.2711277],[-170.31878662,63.25471687]],[[-170.46658325,63.33418465],[-170.40371704,63.30443764],[-170.48583984,63.34110451],[-170.46658325,63.33418465]],[[-170.54351807,63.3597126],[-170.49020386,63.34192848],[-170.55114746,63.36055183],[-170.54351807,63.3597126]],[[-170.59494019,63.37193489],[-170.58184814,63.36805153],[-170.86306763,63.41851234],[-170.59494019,63.37193489]],[[-162.37741089,63.54444313],[-162.70361328,63.57166481],[-162.42028809,63.63749886],[-162.37741089,63.54444313]],[[-171.46557617,63.60666084],[-170.29983521,63.69415474],[-168.70074463,63.29054451],[-169.6661377,62.94331551],[-170.51870728,63.37803841],[-170.85668945,63.46193886],[-171.46099854,63.31471443],[-171.85083008,63.50860786],[-171.72689819,63.79221535],[-171.46557617,63.60666084]],[[-166.65917969,66.10331917],[-166.44360352,66.18081856],[-166.16940308,66.22137642],[-166.65917969,66.10331917]],[[-165.36431885,66.42637825],[-165.4708252,66.41415596],[-164.76217651,66.53831673],[-165.36431885,66.42637825]],[[-156.44683838,71.26361275],[-155.58688354,71.16276741],[-156.18249512,70.91832161],[-155.97341919,70.75583076],[-155.08731079,71.15138435],[-154.24368286,70.77943611],[-152.25238037,70.83526802],[-152.49847412,70.64943123],[-152.07598877,70.57499886],[-152.62936401,70.55748177],[-151.73236084,70.55720711],[-151.96603394,70.44359016],[-149.1746521,70.49081612],[-144.9520874,69.96832466],[-143.28045654,70.11831856],[-141.00286865,69.64236641],[-140.99542236,60.30721474],[-139.06793213,60.35222054],[-139.18878174,60.08888435],[-137.59082031,59.23860359],[-137.47799683,58.90721321],[-135.47341919,59.8019352],[-133.42987061,58.45916176],[-131.82403564,56.59694099],[-130.01495361,55.90918159],[-130.1746521,55.75444221],[-129.99041748,55.28166389],[-130.6859436,54.76194191],[-131.00845337,55.00416756],[-130.46166992,55.32777596],[-131.05593872,55.12276649],[-130.6138916,55.29610634],[-130.86410522,55.30860329],[-131.01022339,56.10638618],[-131.90045166,55.85527229],[-131.75238037,55.80777168],[-131.95492554,55.50110817],[-132.16027832,55.57860756],[-131.76956177,56.19693947],[-132.79138184,57.08804512],[-133.50823975,57.19360542],[-133.06292725,57.34887886],[-133.64044189,57.69638252],[-133.00039673,57.5150013],[-133.55682373,57.90249062],[-133.12130737,57.85750008],[-134.05487061,58.07193947],[-133.76916504,58.51832771],[-134.1541748,58.19777107],[-134.51000977,58.35388374],[-134.7612915,58.38221169],[-135.33514404,59.46832466],[-135.30465698,59.08360481],[-135.55050659,59.22887611],[-135.08535767,58.23304939],[-135.91549683,58.38305092],[-136.06814575,58.81777382],[-135.76934814,58.90027046],[-136.16223145,59.03360939],[-136.23452759,58.75083351],[-137.05661011,59.06860542],[-137.12542725,58.82193947],[-136.5736084,58.83860207],[-136.0274353,58.38721657],[-136.6541748,58.2152729],[-138.44360352,59.19165993],[-139.71035767,59.49582863],[-139.49368286,59.98221016],[-139.28549194,59.57138252],[-138.89260864,59.80665779],[-139.5,60.03305244],[-140.40328979,59.69804573],[-141.37652588,59.86638832],[-141.39065552,60.13860512],[-143.92333984,59.99415779],[-144.93640137,60.30166054],[-144.61126709,60.71554756],[-145.29397583,60.35027504],[-145.85931396,60.49166298],[-145.62564087,60.67193794],[-146.26107788,60.64805031],[-146.04071045,60.79860878],[-146.65328979,60.69971657],[-146.12414551,60.84332466],[-146.75650024,60.95527077],[-146.30072021,61.13082314],[-147.36694336,60.88777351],[-147.54660034,61.15443611],[-147.86520386,60.83249855],[-148.05203247,60.94971657],[-147.71972656,61.27804756],[-148.69967651,60.78972054],[-148.19750977,60.62610054],[-148.68399048,60.44832802],[-147.93682861,60.46221352],[-148.43093872,60.19276619],[-148.09777832,60.20749855],[-148.31771851,60.16888618],[-148.4357605,59.94887733],[-149.28613281,59.86888313],[-149.41677856,60.11832619],[-149.52566528,59.71666145],[-149.73193359,59.96055031],[-149.74346924,59.65860176],[-150.03417969,59.79638863],[-149.91571045,59.71471596],[-150.01345825,59.62748909],[-150.3493042,59.46554756],[-150.21362305,59.71666145],[-150.47341919,59.4644413],[-150.54156494,59.59166145],[-150.90744019,59.24332619],[-151.9803772,59.28055],[-150.99258423,59.77721596],[-151.87652588,59.75388527],[-151.30377197,60.38555336],[-151.40872192,60.72748756],[-150.39916992,61.03721809],[-149.02807617,60.8477726],[-150.06399536,61.15443611],[-149.41677856,61.50860786],[-151.58361816,60.97693825],[-152.43029785,60.28888893],[-153.10299683,60.28943825],[-152.5770874,60.06471443],[-154.26065063,59.14222145],[-153.26760864,58.8486042],[-154.10321045,58.4819355],[-154.23342896,58.13110542],[-156.48999023,57.33111],[-156.54855347,56.97748756],[-158.42288208,56.44388008],[-158.64981079,56.26444435],[-158.12042236,56.23360634],[-158.50521851,55.98888588],[-158.6010437,56.18804359],[-159.66723633,55.57721901],[-159.84103394,55.85110664],[-161.25411987,55.34694099],[-161.4854126,55.4811039],[-161.14151001,55.53888893],[-161.5625,55.62276649],[-161.96777344,55.10193825],[-162.45404053,55.03833199],[-162.62652588,55.29944038],[-162.5625,54.95527077],[-163.18444824,55.13971901],[-163.04440308,54.93749428],[-163.36019897,54.81193733],[-163.25845337,54.97332191],[-163.32293701,55.12166023],[-161.79986572,55.88665962],[-160.24954224,55.77054787],[-160.57470703,55.9866581],[-160.34689331,56.28555489],[-158.64044189,56.76111031],[-158.64871216,57.05332375],[-157.93792725,57.49193764],[-157.39654732,57.49054909],[-157.70666504,57.64332771],[-157.60998535,58.08971596],[-157.13848877,58.16249275],[-157.55355835,58.38249397],[-156.7791748,59.15138435],[-158.18814087,58.60638618],[-158.49237061,58.99943733],[-157.99258423,58.90499306],[-158.53677368,59.17527199],[-158.8973999,58.39554787],[-160.32666016,59.05971718],[-162.17138672,58.64972115],[-161.56576538,59.10360909],[-161.99215698,59.14415932],[-161.70513916,59.49666023],[-162.15133667,60.24554634],[-162.37216187,60.17610359],[-161.87936401,60.70221901],[-162.56945801,60.31638527],[-162.52154732,59.99276924],[-164.06509399,59.82416725],[-165.42529297,60.55526924],[-164.66482544,60.91166115],[-164.26434326,60.77887917],[-164.4289856,60.55332375],[-163.95776367,60.78027534],[-163.66940308,60.58721352],[-163.40960693,60.75666237],[-163.895401,60.85688591],[-163.5513916,60.90387917],[-165.15023804,60.92804909],[-164.822052,61.11110878],[-165.12042236,61.08387947],[-165.13848877,61.25666237],[-165.16366577,61.17004585],[-165.36999512,61.20083046],[-165.15045166,61.41694069],[-165.0594635,61.41684151],[-164.99839783,61.46977043],[-164.84515381,61.49444008],[-164.71603394,61.62555122],[-165.0171814,61.50000191],[-165.07556152,61.43221474],[-165.16113281,61.43249702],[-165.28744507,61.33387947],[-165.40744019,61.20833015],[-165.34124756,61.15721321],[-165.38650513,61.06860542],[-166.19772339,61.59471321],[-165.24716187,62.44610023],[-164.6362915,62.41749763],[-164.8527832,62.57027626],[-164.47909737,62.74582863],[-164.87759399,62.83555031],[-164.31814575,63.00694466],[-164.41049194,63.21193886],[-163.11148071,63.0519352],[-162.31182861,63.54110909],[-161.15155029,63.51249886],[-160.7774353,63.86860085],[-161.5291748,64.41887093],[-160.78372192,64.72192574],[-161.18249512,64.93748665],[-162.7902832,64.33610725],[-163.16983032,64.65526009],[-163.17572021,64.40748787],[-166.12130737,64.57470894],[-166.96188354,65.1888752],[-166.05877686,65.25610542],[-168.13110352,65.66554451],[-164.35342407,66.59471321],[-163.625,66.56721687],[-164.18814087,66.19609261],[-163.65634155,66.07054329],[-161.00323486,66.20416451],[-161.90982056,66.27443123],[-161.90612793,66.53526497],[-162.63607788,66.86886787],[-162.33688354,66.95833015],[-161.60037231,66.44775581],[-160.2303772,66.39972115],[-160.26412964,66.64749336],[-161.50650024,66.53387642],[-161.89761353,66.72831917],[-161.50106812,66.9791584],[-162.46099854,66.99247932],[-162.35037231,67.16137886],[-163.73236084,67.11360359],[-164.12414551,67.60998726],[-166.82772827,68.35081673],[-166.37251282,68.41676521],[-166.21582031,68.88304329],[-163.64523315,69.1069355],[-161.94204712,70.30720711],[-162.11868286,70.15165901],[-159.9375,70.59332466],[-160.1986084,70.47165108],[-159.83599854,70.26832771],[-159.28549194,70.53055],[-160.12435913,70.6152668],[-159.6678772,70.79803658],[-157.97930908,70.8374958],[-156.44683838,71.26361275]],[[-135.5539856,58.32999611],[-135.62521362,58.38305092],[-135.7260437,58.35943794],[-135.5539856,58.32999611]]]}, -{code:"BF", name:"Burkina Faso", lng:-1.740, lat:12.278, borders:[[[-2.83404664,11.002007],[-2.68555945,9.481817],[-3.63360854,9.954443],[-4.70444477,9.698055],[-5.51984574,10.436272],[-5.27304843,11.843887],[-4.41749908,12.300831],[-4.33721548,13.121666],[-3.96425194,13.50383],[-3.43767214,13.166498],[-3.25749939,13.696665],[-2.8791643,13.655554],[-2.47472182,14.287498],[-2.00694431,14.187777],[-1.98083211,14.474722],[-0.7252778,15.082777],[0.235048,14.915068],[0.602222,13.703888],[1.285306,13.349957],[0.991667,13.371666],[0.989167,13.047222],[1.578333,12.629999],[2.1425,12.694443],[2.397925,11.896152],[2.014722,11.422499],[1.435278,11.458887],[0.91797,10.996399],[-0.14976183,11.13854],[-0.61833273,10.911665],[-2.83404664,11.002007]]]}, -{code:"UY", name:"Uruguay", lng:-56.012, lat:-32.800, borders:[[[-57.80633593,-30.74821044],[-57.60800142,-30.18491753],[-56.8113477,-30.10526277],[-56.00889927,-31.07978242],[-55.58193239,-30.84581339],[-53.87967641,-31.96776588],[-53.09304019,-32.72968262],[-53.52275123,-33.14775123],[-53.37423716,-33.74065424],[-54.14497403,-34.67137944],[-56.32028196,-34.91054496],[-57.11775167,-34.46221148],[-57.84026299,-34.49471292],[-58.40276299,-33.92971004],[-58.36193095,-33.1333236],[-58.14639264,-33.10190542],[-58.04556249,-32.9347228],[-58.1991955,-32.45026373],[-57.80633593,-30.74821044]]]}, -{code:"UZ", name:"Uzbekistan", lng:63.170, lat:41.750, borders:[[[64.383026,38.953125],[62.551102,39.934158],[61.874161,41.125549],[60.140274,41.381104],[60.014442,42.217491],[58.780548,42.658043],[58.164436,42.651932],[58.515549,42.304436],[58.026604,42.504639],[56.986938,41.893051],[57.044716,41.260277],[56.000961,41.328453],[55.99749,45.001106],[58.569717,45.571106],[62.025108,43.484787],[64.931366,43.73777],[65.82193,42.877213],[66.123871,42.996941],[66.02916,42.003052],[66.526382,42.003052],[66.719986,41.174995],[67.935532,41.183327],[68.455261,40.597771],[69.056366,41.379433],[70.97081,42.254669],[71.276382,42.195511],[70.187195,41.52829],[71.418045,41.118553],[71.69136,41.556335],[72.19548,41.006592],[73.173035,40.822998],[71.710541,40.145767],[70.98204,40.244843],[70.375534,40.376404],[70.796799,40.725594],[70.423874,41.049118],[69.732483,40.638603],[69.356094,40.772491],[69.308029,40.201385],[68.600815,40.178329],[69.009995,40.089714],[68.540268,39.55471],[67.441956,39.483582],[67.376373,39.212494],[68.123871,38.98555],[68.384155,38.195541],[67.779877,37.185822],[66.537735,37.366379],[66.643875,38.003052],[64.383026,38.953125]]]}, -{code:"VC", name:"St. Vincent and the Grenadines", lng:-61.194, lat:13.248, borders:[[[-61.4169163,12.590277],[-61.4541552,12.593887],[-61.42578854,12.612499],[-61.4169163,12.590277]],[[-61.32801089,12.687777],[-61.34771761,12.701666],[-61.31053175,12.734999],[-61.32801089,12.687777]],[[-61.21662157,12.998055],[-61.25222757,12.988609],[-61.19969206,13.044722],[-61.21662157,12.998055]],[[-61.17301134,13.1325],[-61.28134914,13.207777],[-61.17720815,13.384165],[-61.17301134,13.1325]]]}, -{code:"VE", name:"Venezuela", lng:-66.166, lat:7.125, borders:[[[-61.00358582,8.54888725],[-61.26638031,8.50916481],[-61.08078766,8.61027718],[-61.00358582,8.54888725]],[[-61.04773712,8.62944603],[-61.18444824,8.59861183],[-61.16718292,8.65194511],[-61.04773712,8.62944603]],[[-61.04191589,8.64027596],[-61.14693451,8.65444374],[-61.17774963,8.67944527],[-60.93444824,8.71833229],[-61.04191589,8.64027596]],[[-60.82719421,8.64944267],[-60.98861694,8.63555717],[-60.84080505,8.72805595],[-60.82719421,8.64944267]],[[-60.97609711,8.72583199],[-61.17023468,8.69333458],[-61.04245758,8.82111168],[-60.86051178,8.85333443],[-60.97609711,8.72583199]],[[-61.07055664,8.89249992],[-61.09967804,8.89111137],[-61.06581879,8.97694588],[-60.84858704,9.09361076],[-61.07055664,8.89249992]],[[-60.87025452,9.10833168],[-60.95861816,9.06694603],[-60.86361694,9.19333458],[-60.87025452,9.10833168]],[[-60.72995758,9.18638802],[-60.84134674,9.11666679],[-60.82278442,9.20166588],[-60.72995758,9.18638802]],[[-62.28859711,9.75555611],[-62.28636169,9.93416786],[-62.24912262,9.85694313],[-62.28859711,9.75555611]],[[-62.6474762,10.30249977],[-62.78804779,10.41499901],[-62.78717804,10.4786129],[-62.6474762,10.30249977]],[[-63.90722656,10.7294445],[-63.99667358,10.8022213],[-63.90662384,10.77749825],[-63.90722656,10.7294445]],[[-65.26861572,10.88110924],[-65.41723633,10.92472267],[-65.21188354,10.95611],[-65.26861572,10.88110924]],[[-63.80471039,11.0213871],[-64.4058075,10.96750069],[-63.88109589,11.17694283],[-63.80471039,11.0213871]],[[-66.64828491,11.75861168],[-66.61050415,11.82111168],[-66.58633423,11.77166557],[-66.64828491,11.75861168]],[[-66.11584473,11.77361107],[-66.19303894,11.81722069],[-66.10855103,11.8255558],[-66.11584473,11.77361107]],[[-64.57217407,11.80555534],[-64.64382935,11.82472038],[-64.61497688,11.8955555],[-64.57217407,11.80555534]],[[-69.77078247,11.69611168],[-68.41833496,11.1799984],[-68.15994263,10.49694633],[-66.23529053,10.64222145],[-65.08132935,10.06055641],[-63.69745636,10.48555565],[-64.25880432,10.66166496],[-61.88278198,10.73333168],[-62.91664124,10.52805519],[-63.00026703,10.27166557],[-62.78208542,10.39969444],[-62.62804413,10.10777855],[-63.01719666,10.09777641],[-62.80525208,10.00861168],[-62.61748505,10.08972359],[-62.61328888,10.22277641],[-62.53527832,10.20222282],[-62.31804657,9.70499992],[-62.20056152,9.90555382],[-62.21079254,9.63444328],[-62.18858337,10.0158329],[-61.73861694,9.59555626],[-61.62248993,9.90611076],[-60.85028076,9.44083214],[-60.78358459,9.3049984],[-61.0821991,9.10222054],[-60.94969177,9.17944527],[-61.09777832,8.96333504],[-61.20889282,8.59555626],[-61.59886169,8.5549984],[-61.07387543,8.40083504],[-60.90221405,8.58222389],[-59.99024963,8.53527641],[-59.82556152,8.23611259],[-60.71912384,7.53555489],[-60.28859711,7.05722237],[-61.1339798,6.7110424],[-61.38969421,5.94000053],[-60.73032379,5.20480156],[-60.57969666,4.94666862],[-60.98497009,4.5205555],[-62.74580383,4.03249931],[-62.875,3.56027794],[-63.34304047,3.96111107],[-64.01773071,3.88611031],[-64.79528809,4.28138924],[-64.19108582,3.59444618],[-64.04495239,2.48250008],[-63.3611145,2.41916847],[-63.393013,2.15138817],[-65.51882935,0.64972115],[-65.58970642,0.98916817],[-66.31195068,0.75055885],[-66.87188721,1.22164345],[-67.19250488,2.39249992],[-67.82827759,2.82500267],[-67.29049683,3.39750099],[-67.8596344,4.55861092],[-67.45436096,6.19305611],[-69.24519348,6.08138847],[-70.11911011,6.9758358],[-72.,7.01888847],[-72.47167969,7.49194527],[-72.32522583,8.09555626],[-72.77972412,9.0802784],[-73.3780365,9.17138863],[-72.49302673,11.12111092],[-72.20935059,11.25000191],[-71.97723389,11.66499901],[-71.32469177,11.85305595],[-71.9683075,11.55583382],[-71.57685852,10.71444511],[-72.12750244,9.81305504],[-71.61802673,9.0419445],[-71.05519104,9.34139061],[-71.4974823,10.96000099],[-69.79855347,11.42777824],[-69.81445313,11.69083214],[-70.23834229,11.63166618],[-70.02688599,12.19527626],[-69.77078247,11.69611168]],[[-61.20665741,9.5858326],[-61.41163635,9.72972298],[-61.32691956,9.64666557],[-61.20665741,9.5858326]]]}, -{code:"VG", name:"British Virgin Islands", lng:-64.390, lat:18.483, borders:[[[-64.66081227,18.383888],[-64.65241964,18.441109],[-64.55824315,18.451942],[-64.66081227,18.383888]],[[-64.4224697,18.43861],[-64.41210982,18.506107],[-64.32217418,18.506107],[-64.4224697,18.43861]],[[-64.31127966,18.746109],[-64.26991299,18.696388],[-64.40797404,18.735832],[-64.31127966,18.746109]]]}, -{code:"VN", name:"Vietnam", lng:105.314, lat:21.491, borders:[[[106.600273,8.647778],[106.555817,8.688887],[106.659378,8.76474],[106.600273,8.647778]],[[103.498596,9.31361],[103.469437,9.279444],[103.467209,9.304443],[103.498596,9.31361]],[[106.262756,9.528887],[106.088058,9.754438],[106.285522,9.586943],[106.262756,9.528887]],[[106.543579,9.82583],[106.418579,9.934443],[106.485786,9.902222],[106.543579,9.82583]],[[106.596626,10.257221],[106.664413,10.243053],[106.586906,10.256943],[106.596626,10.257221]],[[106.637192,10.269999],[106.752472,10.234442],[106.511642,10.29361],[106.637192,10.269999]],[[104.083862,10.361942],[104.026382,10.080276],[103.837196,10.369442],[104.083862,10.361942]],[[107.092468,10.32222],[107.063858,10.383333],[107.20636,10.432775],[107.092468,10.32222]],[[106.895248,10.372219],[106.887482,10.510555],[106.979141,10.408888],[106.895248,10.372219]],[[108.958588,10.504166],[108.930252,10.510277],[108.930252,10.550276],[108.958588,10.504166]],[[106.904694,10.520832],[106.875793,10.530277],[106.851357,10.561943],[106.871384,10.595519],[106.852188,10.625553],[106.87941,10.63722],[106.92746,10.592775],[106.930252,10.544722],[106.904694,10.520832]],[[106.852188,10.40361],[106.755539,10.481386],[106.749977,10.562498],[106.786301,10.578066],[106.753212,10.660968],[106.856476,10.603882],[106.835747,10.569703],[106.87413,10.502499],[106.852188,10.40361]],[[109.332764,12.187777],[109.245247,12.227497],[109.331482,12.221088],[109.332764,12.187777]],[[109.3936,12.350275],[109.387207,12.34972],[109.385269,12.366941],[109.3936,12.350275]],[[107.919434,16.349442],[107.866928,16.35944],[107.661217,16.572613],[107.919434,16.349442]],[[107.73027,20.127773],[107.711647,20.131939],[107.738312,20.14444],[107.73027,20.127773]],[[107.378311,20.799164],[107.334991,20.846664],[107.382477,20.824165],[107.378311,20.799164]],[[107.068047,20.727493],[106.908043,20.832218],[107.033867,20.856106],[107.068047,20.727493]],[[106.752777,20.854164],[106.719147,20.870831],[106.741089,20.871109],[106.752777,20.854164]],[[106.873306,20.78722],[106.770828,20.852497],[106.781372,20.922497],[106.873306,20.78722]],[[106.948029,20.936382],[106.932213,20.936939],[106.927467,20.944717],[106.948029,20.936382]],[[107.488586,20.839165],[107.464706,20.821384],[107.554153,20.966106],[107.488586,20.839165]],[[106.893883,20.965549],[106.916656,20.954441],[106.888046,20.965549],[106.893883,20.965549]],[[107.460823,20.942219],[107.454712,20.943886],[107.454987,20.950272],[107.462196,20.967495],[107.476089,20.972218],[107.478317,20.966106],[107.473312,20.954441],[107.460823,20.942219]],[[106.753601,20.950829],[106.688873,20.956661],[106.679428,20.977493],[106.753601,20.950829]],[[107.746933,20.937218],[107.747757,21.019165],[107.790817,20.981937],[107.746933,20.937218]],[[107.462769,20.903049],[107.394989,20.896664],[107.476723,20.946983],[107.502403,21.012671],[107.554428,21.038052],[107.462769,20.903049]],[[107.859421,21.037777],[107.806931,20.986938],[107.8311,21.034996],[107.859421,21.037777]],[[107.578323,20.977219],[107.567207,21.020554],[107.620743,21.117836],[107.578323,20.977219]],[[107.513321,21.12833],[107.509163,21.133331],[107.532211,21.145828],[107.513321,21.12833]],[[107.383881,21.046387],[107.471947,21.27142],[107.604431,21.218884],[107.383881,21.046387]],[[107.742752,21.308887],[107.708328,21.305275],[107.818047,21.356384],[107.742752,21.308887]],[[107.996643,21.394718],[107.933319,21.364162],[107.828598,21.371384],[107.996643,21.394718]],[[105.577477,23.059162],[106.707207,22.864998],[106.693314,22.03083],[107.990021,21.542412],[107.414703,21.326107],[107.36998,21.022221],[107.154427,20.924995],[106.643883,21.021385],[106.776932,20.699162],[105.954163,19.92083],[105.613876,18.977219],[106.698868,17.399719],[108.830276,15.420832],[109.466377,12.893332],[109.145538,12.435555],[109.269989,11.892498],[109.173309,12.120552],[109.021103,11.353331],[107.997742,10.699165],[107.26619,10.376129],[106.999748,10.657166],[106.961189,10.466075],[106.93219,10.567221],[106.943298,10.593609],[106.904137,10.631386],[106.744133,10.669998],[106.770813,10.591108],[106.738304,10.560613],[106.736359,10.513054],[106.591553,10.429691],[106.738571,10.469442],[106.79274,10.386944],[106.784698,10.277498],[106.424316,10.311384],[106.776367,10.079998],[106.290527,10.250832],[106.618027,9.811388],[106.117188,10.238331],[106.54303,9.583609],[105.820534,10.002499],[106.194122,9.366941],[105.021103,8.592775],[104.742752,8.604998],[105.107468,9.945276],[104.445328,10.422739],[105.101913,10.955553],[106.203308,10.770554],[105.851067,11.659998],[106.458214,11.665863],[106.420242,11.973608],[107.547493,12.353609],[107.489151,14.448608],[107.5466,14.708618],[107.695251,15.270832],[107.175537,15.784164],[107.464706,16.078609],[106.685532,16.45805],[106.561096,16.996941],[105.183319,18.334442],[105.193863,18.642494],[103.879433,19.29361],[104.037247,19.692944],[104.640266,19.611942],[104.979156,20.004997],[104.381927,20.444717],[104.6436,20.660275],[104.109154,20.977219],[103.693588,20.657219],[103.170532,20.846664],[102.976089,21.739437],[102.676651,21.65583],[102.140747,22.396286],[102.479713,22.773888],[103.030548,22.435551],[103.33638,22.796387],[103.964432,22.499111],[105.353867,23.334721],[105.577477,23.059162]]]}, -{code:"VI", name:"United States Virgin Islands", lng:-64.785, lat:17.741, borders:[[[-64.76185571,17.774166],[-64.5601964,17.748333],[-64.89599626,17.676666],[-64.76185571,17.774166]],[[-64.66516134,18.332222],[-64.79016134,18.33083],[-64.73191819,18.371944],[-64.66516134,18.332222]],[[-64.84167461,18.312496],[-65.02688601,18.362778],[-64.90383926,18.364719],[-64.84167461,18.312496]]]}, -{code:"NA", name:"Namibia", lng:17.218, lat:-22.133, borders:[[[23.284721,-17.66247969],[23.476109,-17.62581295],[24.969997,-17.5597228],[25.264431,-17.80224219],[24.362499,-17.9486048],[23.615578,-18.48505429],[23.297108,-17.99593332],[20.993286,-18.3183933],[20.991943,-21.99691797],[19.996666,-22.00497825],[20.000942,-24.76538424],[19.99612,-28.42144751],[19.123055,-28.96221548],[18.175831,-28.90858871],[17.40472,-28.71360358],[17.06361,-28.02860646],[16.48959,-28.57816355],[15.294167,-27.32248701],[14.463333,-24.10915375],[14.511389,-22.55274979],[11.804722,-18.08193239],[11.752783,-17.25481055],[13.160555,-16.9527701],[13.993219,-17.42392387],[18.451538,-17.38982809],[18.915833,-17.81554752],[20.854164,-18.01638388],[23.284721,-17.66247969]]]}, -{code:"WF", name:"Wallis and Futuna Islands", lng:-178.131, lat:-14.289, borders:[[[-178.04244994,-14.3194385],[-178.14044186,-14.31637772],[-178.18920911,-14.23610075],[-178.04244994,-14.3194385]],[[-176.16131591,-13.35277415],[-176.15609786,-13.21360158],[-176.1210935,-13.2633231],[-176.16131591,-13.35277415]]]}, -{code:"WS", name:"Samoa", lng:-172.414, lat:-13.652, borders:[[[-171.429626,-14.01971997],[-172.06463653,-13.87442785],[-171.82226525,-13.80750249],[-171.429626,-14.01971997]],[[-172.2856752,-13.48637606],[-172.21405066,-13.80776255],[-172.78042616,-13.53333065],[-172.2856752,-13.48637606]]]}, -{code:"SZ", name:"Swaziland", lng:31.497, lat:-26.562, borders:[[[30.902048,-26.30525015],[31.33083,-25.7513851],[31.96851,-25.95783993],[32.1334,-26.83960374],[31.987499,-27.31608915],[31.161663,-27.20304141],[30.818886,-26.81053575],[30.902048,-26.30525015]]]}, -{code:"YE", name:"Yemen", lng:48.355, lat:15.807, borders:[[[53.340828,12.108889],[53.25666,12.124998],[53.291664,12.134443],[53.340828,12.108889]],[[53.085831,12.13361],[53.011383,12.158609],[53.096107,12.175554],[53.085831,12.13361]],[[52.234161,12.201111],[52.395828,12.155277],[52.083054,12.222776],[52.234161,12.201111]],[[43.438606,12.631109],[43.396111,12.666388],[43.443886,12.659443],[43.438606,12.631109]],[[53.774719,12.616388],[54.476944,12.557777],[53.753609,12.308054],[53.325829,12.545832],[53.774719,12.616388]],[[42.755829,13.69861],[42.677216,13.666111],[42.793884,13.781111],[42.755829,13.69861]],[[42.787498,13.91],[42.689163,14.013611],[42.766388,14.066944],[42.787498,13.91]],[[42.594719,15.271944],[42.568886,15.3925],[42.642494,15.458332],[42.594719,15.271944]],[[52.231941,15.674166],[49.098885,14.519165],[48.698051,14.039999],[45.666664,13.341665],[45.055443,12.751296],[43.957222,12.592777],[43.467216,12.677776],[43.247498,13.210278],[42.681107,15.208332],[42.78968,16.377502],[43.206108,16.672222],[43.309441,17.457222],[44.467499,17.411942],[46.333328,16.666664],[46.333054,15.616943],[48.766388,18.266388],[51.99929,18.999344],[53.114441,16.642778],[52.298882,16.272221],[52.231941,15.674166]]]}, -{code:"ZM", name:"Zambia", lng:26.320, lat:-14.614, borders:[[[24.969997,-17.5597228],[23.476109,-17.62581295],[22.000149,-16.17163124],[21.998333,-13.0041633],[24.020554,-13.00638161],[23.986206,-10.87046002],[24.44833,-11.46360358],[25.332222,-11.19332271],[25.359722,-11.6416572],[26.004719,-11.90249268],[26.86861,-11.97360785],[27.199249,-11.56789822],[27.66,-12.29665575],[28.441944,-12.51971997],[29.015831,-13.39776849],[29.589443,-13.22193317],[29.801388,-13.4541572],[29.80505,-12.15523884],[29.49361,-12.45805018],[29.031387,-12.38305628],[28.363331,-11.55083431],[28.699718,-10.65332188],[28.372219,-9.26083348],[28.901665,-8.47860136],[30.77124,-8.19224397],[31.041111,-8.59027825],[32.940399,-9.40507315],[33.702278,-10.561846],[33.250549,-10.88666369],[33.273331,-12.14443439],[33.54583,-12.35944133],[33.046387,-12.60387467],[32.678886,-13.60637855],[33.222229,-14.01256523],[30.213017,-14.98170868],[30.415756,-15.63186091],[28.927219,-15.97221975],[28.759441,-16.55220815],[27.825275,-16.95913744],[27.038055,-17.95943828],[25.264431,-17.80224219],[24.969997,-17.5597228]]]}, -{code:"ZW", name:"Zimbabwe", lng:29.872, lat:-19.000, borders:[[[32.987808,-17.26499578],[33.073051,-18.34886191],[32.699165,-18.9444385],[33.018883,-19.94332171],[32.50222,-20.59859059],[32.488876,-21.34442529],[31.297504,-22.41473429],[29.893887,-22.1944385],[29.373623,-22.19238614],[29.060555,-21.79804185],[28.015831,-21.56608915],[27.713165,-20.5064159],[27.287453,-20.4949642],[27.219997,-20.09165209],[26.166111,-19.52776299],[25.264431,-17.80224219],[27.038055,-17.95943828],[27.825275,-16.95913744],[28.759441,-16.55220815],[28.927219,-15.97221975],[30.415756,-15.63186091],[30.422775,-16.00914355],[31.276665,-16.01858893],[32.98114,-16.70903782],[32.987808,-17.26499578]]]}, -{code:"ID", name:"Indonesia", lng:114.252, lat:-0.976, borders:[[[121.85999489,-10.61027336],[121.69081306,-10.56637764],[121.99693489,-10.4411068],[121.85999489,-10.61027336]],[[123.21470833,-10.8122139],[122.80774879,-10.79472351],[123.39026833,-10.43694115],[123.21470833,-10.8122139]],[[123.40054512,-10.34276962],[123.30859566,-10.27666283],[123.45332527,-10.13971138],[123.40054512,-10.34276962]],[[120.02916145,-9.38332939],[120.81025887,-9.97916222],[120.72442818,-10.19972229],[120.16470528,-10.23138046],[118.93109322,-9.56111145],[120.02916145,-9.38332939]],[[125.16404915,-9.06613731],[125.12798882,-9.43594742],[124.43525887,-10.16276741],[123.48831367,-10.31637764],[124.04616356,-9.33996773],[124.34309578,-9.46337891],[124.44572639,-9.18479729],[124.94544792,-8.95402718],[125.16404915,-9.06613731]],[[115.59471321,-8.80415535],[115.4699955,-8.73444366],[115.51249886,-8.66999626],[115.59471321,-8.80415535]],[[119.69053841,-8.8027668],[119.60748482,-8.77359962],[119.63305855,-8.60078812],[119.69053841,-8.8027668]],[[122.96943855,-8.57248878],[122.98803902,-8.45666313],[123.17775917,-8.4422226],[122.96943855,-8.57248878]],[[119.46164894,-8.4402771],[119.58554268,-8.56304359],[119.44719887,-8.75416374],[119.46164894,-8.4402771]],[[113.38889503,-8.49720955],[113.29553413,-8.50055695],[113.28581429,-8.43998909],[113.38889503,-8.49720955]],[[124.29054451,-8.32915878],[124.11525917,-8.5555439],[123.90693855,-8.45249939],[124.29054451,-8.32915878]],[[123.76442909,-8.32721138],[123.21748543,-8.53666687],[123.93914986,-8.24248695],[123.76442909,-8.32721138]],[[123.28109932,-8.40582657],[123.01609993,-8.37804794],[123.22083473,-8.23359871],[123.28109932,-8.40582657]],[[128.21997261,-8.21055603],[128.2083149,-8.28721046],[128.07995796,-8.25944519],[128.21997261,-8.21055603]],[[116.54915047,-8.77500153],[115.84414864,-8.75527954],[116.38749886,-8.20498848],[116.73581123,-8.36305046],[116.54915047,-8.77500153]],[[127.66832161,-8.24443245],[127.60582161,-8.20693588],[127.77110481,-8.18888855],[127.66832161,-8.24443245]],[[129.00802803,-8.26943398],[128.82831001,-8.19887733],[128.96969795,-8.18387794],[129.00802803,-8.26943398]],[[117.54081917,-8.39027023],[117.48137093,-8.19137764],[117.67581367,-8.15609932],[117.54081917,-8.39027023]],[[138.87356758,-8.41471481],[138.54471016,-8.33305359],[138.81414986,-8.15471077],[138.87356758,-8.41471481]],[[118.31192207,-8.3747139],[118.6483326,-8.29443741],[118.66609383,-8.55222321],[118.99693489,-8.31360054],[119.17804146,-8.72027397],[118.45720863,-8.8719368],[118.40637398,-8.58471107],[118.15498543,-8.8719368],[116.75139046,-9.00944519],[117.12275887,-8.3786068],[117.96637917,-8.7485981],[118.28441811,-8.59415817],[117.73552895,-8.15221977],[118.31192207,-8.3747139]],[[122.98108864,-8.14944458],[122.83249092,-8.60165977],[121.76555061,-8.89221573],[119.79623604,-8.72033119],[120.52249336,-8.25721169],[122.2883091,-8.64443398],[122.98108864,-8.14944458]],[[124.57776833,-8.13583374],[125.13971138,-8.32915878],[124.3508091,-8.45444489],[124.57776833,-8.13583374]],[[125.58167458,-8.31749535],[125.49609566,-8.26943398],[125.64137459,-8.13583374],[125.58167458,-8.31749535]],[[119.07248878,-8.26748848],[119.07859993,-8.13388634],[119.13693428,-8.19554329],[119.07248878,-8.26748848]],[[115.50221443,-8.17861176],[115.70776558,-8.40916252],[115.12608528,-8.85416222],[114.44553566,-8.10472107],[115.50221443,-8.17861176]],[[127.84359932,-8.10109901],[128.12744331,-8.17165565],[128.02527046,-8.26748848],[127.84359932,-8.10109901]],[[130.80414009,-8.35221481],[131.01303291,-8.08972168],[131.18026924,-8.12970924],[130.80414009,-8.35221481]],[[127.21388435,-8.1133213],[127.15305519,-8.09916687],[127.18166542,-8.02193832],[127.21388435,-8.1133213]],[[129.76443672,-8.06111145],[129.60690498,-7.80388451],[129.84329414,-7.84055138],[129.76443672,-8.06111145]],[[126.72136879,-7.67305183],[125.7722187,-8.00888634],[125.97221565,-7.6586113],[126.72136879,-7.67305183]],[[130.98913765,-7.72332954],[130.98413277,-7.6641655],[131.12884712,-7.6266613],[130.98913765,-7.72332954]],[[127.38109016,-7.6586113],[127.3680439,-7.51388931],[127.4819355,-7.5288887],[127.38109016,-7.6586113]],[[138.96829414,-7.55611038],[138.44470406,-8.38332939],[137.63525581,-8.43000031],[138.15469551,-7.51388931],[138.96829414,-7.55611038]],[[130.86496162,-7.49416161],[130.98358345,-7.52083015],[130.84442329,-7.54722214],[130.86496162,-7.49416161]],[[131.07275581,-7.51138496],[131.00332832,-7.42499924],[131.17746162,-7.4086113],[131.07275581,-7.51138496]],[[121.77858925,-7.42444038],[121.76193428,-7.35916519],[121.83055305,-7.34277725],[121.77858925,-7.42444038]],[[121.10832405,-7.39444351],[121.09332466,-7.30472183],[121.16858864,-7.35222244],[121.10832405,-7.39444351]],[[131.27276802,-7.37277603],[131.21664619,-7.35916519],[131.26303291,-7.30055046],[131.27276802,-7.37277603]],[[120.9313755,-7.2836113],[121.06360054,-7.30472183],[120.78970528,-7.27750015],[120.9313755,-7.2836113]],[[131.73608589,-7.21416283],[131.10968208,-8.0008297],[131.24328804,-7.47999954],[131.73608589,-7.21416283]],[[131.92718697,-7.10693932],[131.96884346,-7.25444412],[131.72857857,-7.1586113],[131.92718697,-7.10693932]],[[114.40248299,-7.18111038],[114.29332161,-7.08250046],[114.37024879,-7.0661068],[114.40248299,-7.18111038]],[[128.63998604,-7.2191658],[128.52609444,-7.14361191],[128.61523628,-7.06471825],[128.63998604,-7.2191658]],[[120.74165535,-7.07555199],[120.66914558,-7.14555359],[120.63054085,-7.01638794],[120.74165535,-7.07555199]],[[113.99136543,-6.88027382],[113.50388527,-7.22527695],[112.68776131,-7.05110741],[113.99136543,-6.88027382]],[[115.29332924,-6.83878899],[115.57083321,-6.92582893],[115.29109383,-7.00832939],[115.29332924,-6.83878899]],[[138.69052315,-6.76138496],[138.78665352,-6.84082985],[138.61108589,-6.73611069],[138.69052315,-6.76138496]],[[131.59219551,-6.67888451],[131.62634468,-6.70750046],[131.53579903,-6.80138779],[131.59219551,-6.67888451]],[[134.66885567,-6.77416611],[134.62634468,-6.71555138],[134.69775581,-6.58638763],[134.66885567,-6.77416611]],[[105.19304085,-6.68444443],[105.11303902,-6.61166191],[105.25360298,-6.52722168],[105.19304085,-6.68444443]],[[134.68387032,-6.56110573],[134.683321,-6.45166206],[134.74691963,-6.52305603],[134.68387032,-6.56110573]],[[134.586092,-6.39166641],[134.54220772,-6.53582954],[134.34552193,-6.35693932],[134.586092,-6.39166641]],[[134.83191109,-6.47194099],[134.78802681,-6.39305496],[134.85800362,-6.28944397],[134.83191109,-6.47194099]],[[134.34411812,-6.80416298],[134.06720161,-6.82666206],[134.10275459,-6.17305183],[134.51471138,-6.58499908],[134.34411812,-6.80416298]],[[134.15637398,-6.04749489],[134.40359688,-6.28610992],[134.13388252,-6.1547184],[134.15637398,-6.04749489]],[[134.73135567,-6.03666687],[134.60302925,-6.37055016],[134.2680378,-6.11722183],[134.73135567,-6.03666687]],[[106.1633091,-6.01416206],[108.3110981,-6.26027489],[108.73442268,-6.81499863],[110.39082527,-6.97972107],[110.91998482,-6.40999985],[111.1527729,-6.69999504],[112.56025887,-6.91221809],[112.84554482,-7.59971809],[114.44832039,-7.80055046],[114.37164497,-8.52110863],[114.62109566,-8.74666595],[113.23275948,-8.28111267],[111.65109444,-8.36249161],[109.28970528,-7.69944382],[108.16304207,-7.78305435],[106.42331123,-7.37138748],[106.50943184,-6.97916222],[105.24331856,-6.81027412],[106.1633091,-6.01416206]],[[124.058321,-6.02722168],[123.96582222,-5.94805527],[123.97664833,-5.8758316],[124.058321,-6.02722168]],[[120.4819355,-6.48360634],[120.47998238,-5.76666641],[120.56137276,-6.02444458],[120.4819355,-6.48360634]],[[104.83611488,-5.82805634],[104.76888466,-5.74777412],[104.84832954,-5.7749958],[104.83611488,-5.82805634]],[[112.69275093,-5.85277557],[112.58777046,-5.84388542],[112.63498878,-5.73943901],[112.69275093,-5.85277557]],[[132.74133492,-5.95027351],[132.69330025,-5.59638405],[132.808321,-5.80694008],[132.74133492,-5.95027351]],[[132.79553413,-5.6863842],[132.73855782,-5.63916206],[132.78109932,-5.53277397],[132.79553413,-5.6863842]],[[132.34051704,-5.57721901],[132.30191231,-5.51721764],[132.37661934,-5.53832817],[132.34051704,-5.57721901]],[[123.81080818,-5.59916687],[123.68831062,-5.47222137],[123.80275917,-5.5336113],[123.81080818,-5.59916687]],[[134.57718086,-5.43000031],[134.73135567,-5.97471809],[134.30218697,-6.02583313],[134.20633125,-5.70805359],[134.57718086,-5.43000031]],[[102.38498878,-5.48583221],[102.10054207,-5.33250046],[102.38081551,-5.37249565],[102.38498878,-5.48583221]],[[132.84939766,-6.00333405],[133.16885567,-5.29555511],[133.11190987,-5.59166718],[132.84939766,-6.00333405]],[[123.62581062,-5.3766613],[123.52110481,-5.25193977],[123.62719917,-5.2824955],[123.62581062,-5.3766613]],[[122.01693916,-5.47416687],[121.80859566,-5.2722187],[121.9133091,-5.0586071],[122.01693916,-5.47416687]],[[115.7824955,-4.83194351],[115.85304451,-4.74721718],[115.85247993,-4.78555107],[115.7824955,-4.83194351]],[[131.74218941,-4.76860619],[131.72162056,-4.69194412],[131.75442696,-4.72332954],[131.74218941,-4.76860619]],[[122.73776436,-4.6511116],[122.60555458,-5.42027664],[122.28499031,-5.38499641],[122.37109566,-4.75971794],[122.73776436,-4.6511116]],[[129.93441963,-4.56638718],[129.85913277,-4.55666161],[129.93857002,-4.50749969],[129.93441963,-4.56638718]],[[129.87466621,-4.53082848],[129.86108589,-4.52138901],[129.8796711,-4.50555229],[129.87466621,-4.53082848]],[[123.21277046,-4.69749832],[122.97971535,-5.10721779],[123.21555519,-5.29749489],[122.65138435,-5.6863842],[122.90358925,-4.48499489],[123.21277046,-4.69749832]],[[131.67025948,-4.53693962],[131.61050606,-4.42833328],[131.6722126,-4.48722076],[131.67025948,-4.53693962]],[[133.57525826,-4.25193977],[133.61551094,-4.30055046],[133.31414986,-4.10444069],[133.57525826,-4.25193977]],[[131.34274483,-4.11749458],[131.30441475,-4.12416458],[131.27276802,-4.07360649],[131.34274483,-4.11749458]],[[123.08859444,-4.00888824],[123.15387154,-4.24166298],[122.95776558,-4.10027695],[123.08859444,-4.00888824]],[[101.03441811,-4.02583313],[101.02748299,-4.00527382],[101.04860115,-3.99499893],[101.03441811,-4.02583313]],[[131.24469185,-4.04555511],[131.20968819,-3.98333168],[131.24469185,-4.00193977],[131.24469185,-4.04555511]],[[131.43579292,-4.07638931],[131.37884712,-3.9608326],[131.4194355,-3.96027756],[131.43579292,-4.07638931]],[[134.15970039,-3.93499947],[134.19940376,-3.99110985],[134.07275581,-3.93416595],[134.15970039,-3.93499947]],[[127.22831917,-3.90416718],[127.14888191,-3.8302784],[127.23387337,-3.82749939],[127.22831917,-3.90416718]],[[128.77914619,-3.70388794],[128.74829292,-3.64305496],[128.79080391,-3.63888931],[128.77914619,-3.70388794]],[[123.12552834,-3.62666702],[123.05774879,-3.57805634],[123.14777565,-3.54305458],[123.12552834,-3.62666702]],[[128.4027729,-3.6408329],[128.43109322,-3.52249908],[128.56329536,-3.57666588],[128.4027729,-3.6408329]],[[122.35193062,-3.56083298],[122.27998543,-3.57250023],[122.32053566,-3.51491928],[122.35193062,-3.56083298]],[[128.33496284,-3.6258316],[127.91832161,-3.74083328],[128.27331734,-3.51222229],[128.33496284,-3.6258316]],[[128.66470528,-3.53833199],[128.72079659,-3.61916542],[128.55496407,-3.50972176],[128.66470528,-3.53833199]],[[132.70358467,-3.51916504],[132.62329292,-3.42138863],[132.67413521,-3.41860962],[132.70358467,-3.51916504]],[[122.44525337,-3.49055481],[122.41304207,-3.38444519],[122.47191811,-3.45694351],[122.44525337,-3.49055481]],[[116.38275337,-3.64555359],[116.31694221,-3.53750038],[116.41693306,-3.37749863],[116.38275337,-3.64555359]],[[127.63275337,-3.36527824],[127.48108864,-3.29333305],[127.56971931,-3.26388931],[127.63275337,-3.36527824]],[[116.11831856,-4.03610992],[116.00861549,-3.64916611],[116.26776314,-3.22305489],[116.11831856,-4.03610992]],[[127.77026558,-3.25444412],[127.63611031,-3.22583199],[127.75943184,-3.15305519],[127.77026558,-3.25444412]],[[100.52443123,-3.18616676],[100.49080849,-3.16277695],[100.50055122,-3.12722206],[100.52443123,-3.18616676]],[[126.9938755,-3.14500046],[127.23665047,-3.61750031],[126.70082283,-3.83444405],[126.01748848,-3.3544445],[126.10304451,-3.10055542],[126.9938755,-3.14500046]],[[127.88472176,-3.03833199],[127.82054329,-3.02166557],[127.99165535,-2.93000031],[127.88472176,-3.03833199]],[[106.88916206,-3.02444458],[106.72136879,-2.9663887],[106.81247902,-2.89305496],[106.88916206,-3.02444458]],[[129.81247139,-2.9197216],[130.58413887,-3.13333321],[130.82995796,-3.87277603],[129.89749336,-3.3358326],[128.87829781,-3.20777702],[128.46246529,-3.45833206],[128.17386055,-3.06888771],[127.90609932,-3.53750038],[128.17386055,-2.85555458],[129.81247139,-2.9197216]],[[107.42720222,-2.93888855],[107.36136818,-2.87111092],[107.48137093,-2.82333374],[107.42720222,-2.93888855]],[[107.07971382,-2.91166496],[107.03720284,-2.86499977],[107.07277107,-2.81999969],[107.07971382,-2.91166496]],[[100.46277046,-3.13333321],[100.45942879,-3.33388901],[100.17637825,-2.79999924],[100.46277046,-3.13333321]],[[131.5796833,-2.65638924],[131.56524849,-2.65166664],[131.65442085,-2.62138939],[131.5796833,-2.65638924]],[[107.83276558,-2.53499985],[108.26582527,-2.75555611],[108.07332039,-3.23527718],[107.60942268,-3.21138763],[107.83276558,-2.53499985]],[[100.03109932,-2.84194374],[99.98719978,-2.48916626],[100.21415901,-2.71861076],[100.03109932,-2.84194374]],[[133.59497261,-2.52555466],[133.4991169,-2.42555618],[133.61441231,-2.47749901],[133.59497261,-2.52555466]],[[99.74109077,-2.37638855],[99.70359993,-2.34277725],[99.73719978,-2.35027695],[99.74109077,-2.37638855]],[[134.56747627,-2.45305443],[134.51666451,-2.39694405],[134.56884956,-2.29277802],[134.56747627,-2.45305443]],[[123.16693306,-2.19416618],[123.15165901,-2.19416618],[123.16805458,-2.17638779],[123.16693306,-2.19416618]],[[123.44978523,-2.12556839],[123.43802834,-2.11138916],[123.45610237,-2.11555481],[123.44978523,-2.12556839]],[[99.8597126,-2.37083244],[99.56999397,-2.22222137],[99.56860542,-2.02916718],[99.8597126,-2.37083244]],[[123.8855381,-2.0755558],[123.84443855,-2.05388832],[123.86499214,-2.00860977],[123.8855381,-2.0755558]],[[134.36883736,-2.15805435],[134.32553291,-2.0886097],[134.38580513,-2.00388908],[134.36883736,-2.15805435]],[[123.76776314,-2.0474987],[123.75833321,-2.02027702],[123.77748299,-1.99833298],[123.76776314,-2.0474987]],[[126.05664253,-2.48250008],[125.89470863,-2.21333313],[125.91805458,-1.97222137],[126.05664253,-2.48250008]],[[124.36665535,-2.01138878],[124.30081367,-1.97694397],[124.35721016,-1.96611023],[124.36665535,-2.01138878]],[[123.47804451,-1.94610977],[123.46692848,-1.94361115],[123.4847126,-1.93527794],[123.47804451,-1.94610977]],[[123.54498482,-1.92777824],[123.53553963,-1.92499924],[123.54305458,-1.91333199],[123.54498482,-1.92777824]],[[123.65941811,-1.96333313],[123.65138435,-1.95388794],[123.65416145,-1.90166664],[123.65941811,-1.96333313]],[[123.71692848,-1.95583344],[123.70054817,-1.93666649],[123.73221016,-1.89972115],[123.71692848,-1.95583344]],[[123.69109535,-1.9141674],[123.67249489,-1.89972115],[123.67249489,-1.88472176],[123.69109535,-1.9141674]],[[123.82887459,-2.01055527],[123.78276253,-1.87861061],[123.8555088,-1.95444679],[123.82887459,-2.01055527]],[[123.7650013,-1.87722206],[123.75749397,-1.87361145],[123.76721382,-1.86277771],[123.7650013,-1.87722206]],[[123.38690376,-1.88385773],[123.36693001,-1.8758316],[123.36831856,-1.85638809],[123.38690376,-1.88385773]],[[125.43831062,-1.80666733],[126.34915352,-1.82305527],[125.46666145,-1.93999863],[125.43831062,-1.80666733]],[[99.2861042,-1.82638931],[99.25193977,-1.82083321],[99.26915169,-1.78999901],[99.2861042,-1.82638931]],[[123.07916451,-1.90638924],[123.120821,-1.75444412],[123.15416145,-1.83250046],[123.07916451,-1.90638924]],[[134.17608833,-1.94499969],[134.16052437,-1.84555626],[134.23385811,-1.74083328],[134.17608833,-1.94499969]],[[125.00665474,-1.71888924],[125.32332039,-1.88722229],[124.32747841,-1.87972069],[125.00665474,-1.71888924]],[[108.69693184,-1.72305489],[108.68193245,-1.69972229],[108.77971077,-1.70444298],[108.69693184,-1.72305489]],[[130.18857002,-2.06416702],[129.7157917,-1.88583183],[130.35055733,-1.68020439],[130.18857002,-2.06416702]],[[123.29776192,-1.79138947],[123.26748848,-1.76694489],[123.36971474,-1.67305374],[123.29776192,-1.79138947]],[[136.29358101,-1.68861008],[136.90219307,-1.79916573],[135.41803169,-1.6099987],[136.29358101,-1.68861008]],[[108.84915352,-1.67083168],[108.79971504,-1.56805611],[108.9305439,-1.54416656],[108.84915352,-1.67083168]],[[106.09082222,-1.77166557],[106.31833076,-2.43583298],[106.78166389,-2.59194374],[106.60193062,-2.91305542],[106.71776009,-3.09833336],[105.97831917,-2.82277679],[105.74471474,-2.12916565],[105.13220406,-2.06749916],[105.57361031,-1.52916718],[106.09082222,-1.77166557]],[[135.13830757,-1.48527718],[135.33081245,-1.49277687],[135.09442329,-1.51277733],[135.13830757,-1.48527718]],[[127.87943459,-1.42694283],[128.14526558,-1.68055534],[127.37831306,-1.63388824],[127.87943459,-1.42694283]],[[127.32832527,-1.43999863],[127.27277565,-1.41333199],[127.36665535,-1.36610985],[127.32832527,-1.43999863]],[[109.14499092,-1.31666565],[109.10471535,-1.28999901],[109.17189217,-1.25777626],[109.14499092,-1.31666565]],[[123.19497871,-1.2974987],[123.53137398,-1.43472099],[122.86110115,-1.58111],[122.89749336,-1.18666649],[123.19497871,-1.2974987]],[[127.61470222,-1.25777817],[127.45583534,-1.23444366],[127.55053902,-1.1716671],[127.61470222,-1.25777817]],[[109.22859383,-1.23333168],[109.21971321,-1.19277763],[109.25804329,-1.16944313],[109.22859383,-1.23333168]],[[129.92886543,-1.21138763],[129.74051094,-1.20861053],[129.86664009,-1.1427784],[129.92886543,-1.21138763]],[[109.62378883,-0.98483467],[109.77887154,-1.13861084],[109.41858864,-1.26333427],[109.49247932,-0.97972107],[109.62378883,-0.98483467]],[[98.92915535,-0.95027733],[99.23887825,-1.78388786],[98.60304451,-1.22305489],[98.92915535,-0.95027733]],[[134.92248726,-1.1380558],[134.84301949,-0.94194412],[134.99301338,-1.02361107],[134.92248726,-1.1380558]],[[130.93136787,-0.93638802],[130.96441841,-1.3572216],[130.63888741,-0.98388863],[130.93136787,-0.93638802]],[[130.91638374,-0.7947216],[130.39694405,-0.92638779],[130.48663521,-0.83527756],[130.91638374,-0.7947216]],[[135.48773384,-0.67555618],[136.38611031,-1.12083244],[135.89221382,-1.19138908],[135.48773384,-0.67555618]],[[127.28109932,-0.80833244],[127.15358925,-0.77000046],[127.20443916,-0.61916733],[127.28109932,-0.80833244]],[[98.51527596,-0.63222122],[98.48915291,-0.59944344],[98.50972176,-0.60083199],[98.51527596,-0.63222122]],[[130.60608101,-0.54111099],[130.45581245,-0.46861076],[130.66024971,-0.42666626],[130.60608101,-0.54111099]],[[121.9133091,-0.47527695],[121.64333534,-0.54805565],[121.74136543,-0.41860962],[121.9133091,-0.47527695]],[[104.22831917,-0.41722107],[104.19748116,-0.39583206],[104.23166084,-0.39166641],[104.22831917,-0.41722107]],[[133.11190987,-0.5363884],[134.11108589,-0.83527756],[134.15970039,-2.31944466],[134.46664619,-2.86444473],[134.63611031,-2.51388931],[135.0041523,-3.3413887],[135.49191475,-3.35833359],[136.35663033,-2.25388908],[137.19052315,-2.10305405],[137.13107491,-1.79277802],[137.85663033,-1.47166634],[141.00247383,-2.60708427],[141.00702095,-9.12845993],[139.9852314,-8.19361115],[140.14608955,-7.88471794],[138.90860176,-8.29665565],[139.09552193,-7.5641613],[138.6611042,-7.20332909],[139.22247505,-7.16249657],[138.56192207,-6.90888405],[139.18942451,-6.96944427],[138.68191719,-6.72055435],[138.06442451,-5.40610695],[134.64358711,-4.12138748],[134.96551704,-3.93972206],[134.2157917,-3.96305466],[133.6374836,-3.49166679],[133.82885933,-2.96166611],[133.44970894,-3.87138939],[132.90164375,-4.0913887],[132.81802559,-3.30305481],[131.95581245,-2.7836113],[132.72274971,-2.8172226],[133.23886299,-2.41611099],[133.68414497,-2.7163887],[133.93637276,-2.10305405],[132.30136299,-2.26944351],[131.8824482,-1.64222145],[130.96359444,-1.40305519],[131.25555611,-0.82277679],[132.26971626,-0.38416672],[133.11190987,-0.5363884]],[[133.61969185,-3.44944382],[133.62329292,-3.42947388],[133.6102314,-3.43583298],[133.61969185,-3.44944382]],[[104.49609566,-0.62694359],[104.28804207,-0.39388847],[104.53109932,-0.37388802],[104.49609566,-0.62694359]],[[122.01138496,-0.41444397],[121.85443306,-0.36583328],[122.0444355,-0.33277702],[122.01138496,-0.41444397]],[[127.57499886,-0.32333183],[127.81775856,-0.87083244],[127.30359077,-0.51916695],[127.57499886,-0.32333183]],[[104.44413948,-0.32611084],[104.40248299,-0.28555489],[104.48803902,-0.27805519],[104.44413948,-0.32611084]],[[122.08333015,-0.41027832],[122.08693123,-0.26555634],[122.14026833,-0.38222122],[122.08333015,-0.41027832]],[[127.18303871,-0.5288887],[127.10498238,-0.29722214],[127.23387337,-0.25611115],[127.18303871,-0.5288887]],[[98.50166512,-0.53972244],[98.32609749,-0.53972244],[98.43026924,-0.24638939],[98.50166512,-0.53972244]],[[103.61914253,-0.38972092],[103.45471382,-0.36222076],[103.53333473,-0.2341671],[103.75972176,-0.31222153],[103.61914253,-0.38972092]],[[122.36360359,-0.28416634],[122.22387886,-0.2005558],[122.32805061,-0.23083305],[122.36360359,-0.28416634]],[[122.2258091,-0.27805519],[122.14026833,-0.2294426],[122.1888752,-0.19722176],[122.2258091,-0.27805519]],[[103.55330849,-0.19638824],[103.50139046,-0.19499969],[103.53465462,-0.18423271],[103.55330849,-0.19638824]],[[104.74025154,-0.13694382],[104.92943001,-0.33416557],[104.43248177,-0.20194435],[104.74025154,-0.13694382]],[[121.61387825,-0.20666695],[121.56247902,-0.1566658],[121.6319294,-0.12305641],[121.61387825,-0.20666695]],[[97.87664986,-0.10527802],[97.82388496,-0.06777763],[97.86693001,-0.06416702],[97.87664986,-0.10527802]],[[104.8766346,-0.06555557],[104.83191872,-0.06083298],[104.84219551,-0.02444267],[104.8766346,-0.06555557]],[[130.87744331,-0.01916695],[131.25555611,-0.38777733],[130.68829536,-0.07944298],[130.91580391,-0.40888786],[130.21328926,-0.20666695],[130.87744331,-0.01916695]],[[130.66971016,-0.32888794],[130.66638374,-0.31583214],[130.66220284,-0.32527733],[130.66971016,-0.32888794]],[[98.54748726,-0.37055588],[98.29193306,-0.01222229],[98.44413948,-0.06138802],[98.54748726,-0.37055588]],[[129.55468941,-0.2136097],[129.28830147,0.04139137],[129.54052925,-0.13888931],[129.55468941,-0.2136097]],[[127.45720863,-0.01222229],[127.39276314,0.00694466],[127.41053963,0.14416695],[127.45720863,-0.01222229]],[[98.83474922,0.10777855],[98.51335335,0.13305855],[98.76280403,0.1716671],[98.83474922,0.10777855]],[[104.4819355,0.02361107],[104.40721321,0.09000206],[104.40915108,0.1716671],[104.4819355,0.02361107]],[[104.70192909,0.02361107],[104.49135017,0.23722267],[104.54496956,0.22166634],[104.70192909,0.02361107]],[[104.41191292,0.29222298],[104.34276009,0.37083244],[104.42637825,0.32361031],[104.41191292,0.29222298]],[[127.38527107,0.27083397],[127.32776833,0.33666801],[127.38860512,0.37861061],[127.38527107,0.27083397]],[[103.07359505,0.57166862],[103.03801918,0.65472221],[103.06607246,0.64639091],[103.07359505,0.57166862]],[[104.28164864,0.62305641],[104.23719978,0.68944359],[104.28164864,0.66555595],[104.28164864,0.62305641]],[[103.48359871,0.61694527],[103.46555519,0.63055611],[103.51360512,0.69916725],[103.48359871,0.61694527]],[[103.18524361,0.50805473],[103.22302437,0.7033329],[103.29692268,0.55388832],[103.18524361,0.50805473]],[[127.40387154,0.61972237],[127.38388252,0.75194359],[127.44637489,0.71277809],[127.40387154,0.61972237]],[[104.29414558,0.70666695],[104.18997383,0.77527809],[104.27361488,0.79166985],[104.29414558,0.70666695]],[[104.59831429,0.75805473],[104.50859261,0.75611305],[104.55164528,0.79500008],[104.59831429,0.75805473]],[[103.09413338,0.7238903],[103.07718849,0.75055504],[103.10524178,0.79777718],[103.09413338,0.7238903]],[[103.71581459,0.79250145],[103.70414925,0.75944328],[103.66219521,0.83222389],[103.71581459,0.79250145]],[[127.32222176,0.75000191],[127.32415962,0.86416817],[127.37497902,0.81222343],[127.32222176,0.75000191]],[[103.52580452,0.80000114],[103.41913033,0.87111092],[103.4896946,0.84583473],[103.52580452,0.80000114]],[[103.93636513,0.76638985],[103.81997871,0.88611031],[103.88913918,0.85944557],[103.93636513,0.76638985]],[[103.832201,0.75611305],[103.73413277,0.88694572],[103.81997871,0.82583427],[103.832201,0.75611305]],[[103.43692207,0.64722252],[103.37996101,0.89166832],[103.50747871,0.74638939],[103.43692207,0.64722252]],[[103.47857857,0.86833382],[103.40524483,0.90889168],[103.46135902,0.91583443],[103.47857857,0.86833382]],[[104.24273872,0.81972313],[104.17553902,0.79083443],[104.09471321,0.94722176],[104.24273872,0.81972313]],[[102.62423134,0.99413872],[103.04135323,0.71416664],[102.40608406,0.87805748],[102.62423134,0.99413872]],[[103.93496895,0.92611122],[103.83690834,1.0102787],[103.93857002,0.99916649],[103.93496895,0.92611122]],[[104.84305,0.95750237],[104.79358864,1.02472115],[104.83943367,1.01861382],[104.84305,0.95750237]],[[107.55664253,0.96583366],[107.55053902,1.03777885],[107.59636879,1.00805473],[107.55664253,0.96583366]],[[103.03719521,1.03777885],[103.14692879,0.83749962],[102.6577549,1.05416679],[103.03719521,1.03777885]],[[120.67720222,1.03555489],[120.61638069,1.07194328],[120.63889503,1.07611275],[120.67720222,1.03555489]],[[120.38804817,1.02000237],[120.36609077,1.03222466],[120.38611031,1.08083534],[120.38804817,1.02000237]],[[104.66689491,1.02382851],[104.5833149,0.81916618],[104.23026466,1.08416939],[104.66689491,1.02382851]],[[103.43968391,0.98750114],[103.31970406,1.04027748],[103.34163857,1.11972237],[103.43968391,0.98750114]],[[104.03360176,0.9822216],[103.90136909,1.09388924],[104.11942482,1.18361092],[104.03360176,0.9822216]],[[102.39525032,0.92389107],[102.21302986,1.40500069],[102.4760685,1.2266674],[102.39525032,0.92389107]],[[97.52636909,1.41722298],[97.9363575,0.97805595],[97.81079292,0.54972267],[97.11468697,1.39333534],[97.52636909,1.41722298]],[[125.21499825,1.38916588],[125.16638374,1.39528084],[125.29945564,1.52607918],[125.21499825,1.38916588]],[[102.4960804,1.44472313],[102.49191475,1.25972176],[101.99442482,1.61111259],[102.4960804,1.44472313]],[[98.59974861,1.62555504],[98.42746162,1.67888832],[98.55505562,1.68166542],[98.59974861,1.62555504]],[[125.14166451,1.42138863],[124.24609566,0.37500191],[120.24220467,0.34499931],[120.06609535,-0.61305428],[120.66638374,-1.39555359],[121.0830555,-1.42361069],[121.62220955,-0.80500031],[121.92775917,-0.96333313],[123.07083321,-0.55972099],[123.44774818,-0.83527756],[123.33138466,-1.05722237],[122.81999397,-0.91333199],[121.67165565,-1.92222214],[121.29802895,-1.80305481],[122.47747993,-3.15805435],[122.19497871,-3.57110977],[122.89554024,-4.39638901],[122.10471535,-4.5261116],[122.08888435,-4.84082985],[121.55304146,-4.74666595],[121.61470222,-4.06471825],[120.88136482,-3.53694534],[121.07610512,-2.75888824],[120.77192879,-2.61249924],[120.20027351,-2.96500015],[120.46277046,-5.62416458],[119.46499825,-5.56361008],[119.50610542,-3.52722168],[118.9222126,-3.56972122],[118.75916481,-2.77416611],[119.35331917,-1.93888855],[119.51721382,-0.87638855],[119.71859932,-0.65361023],[119.86303902,-0.84388924],[119.62275887,-0.00527763],[119.8330555,-0.08972168],[120.0324955,0.71277809],[120.28720284,0.9897213],[120.5730381,0.77527809],[120.95054817,1.34250069],[123.83915901,0.82944679],[124.97110176,1.69472313],[125.14166451,1.42138863]],[[97.11718941,2.01111031],[97.09274483,2.11250114],[97.14831734,2.06583214],[97.11718941,2.01111031]],[[101.6016407,1.70916557],[101.39803505,1.98916817],[101.64552498,2.12000084],[101.6016407,1.70916557]],[[96.64108467,2.06583214],[96.61079597,2.12194633],[96.66913033,2.10888863],[96.64108467,2.06583214]],[[96.64053535,2.15277672],[96.59802437,2.19111061],[96.648592,2.17888832],[96.64053535,2.15277672]],[[127.89499092,1.7966671],[127.79358864,0.79500008],[128.18829536,1.37805748],[128.72635078,1.55694389],[128.69748116,1.10194588],[128.2102375,0.78472328],[128.90524483,0.20027733],[127.87664986,0.31055641],[128.39526558,-0.89472198],[127.66609383,-0.22583199],[127.39499092,1.05472374],[128.05468941,2.19527626],[127.89499092,1.7966671]],[[97.3277607,2.03222466],[97.10357857,2.21999931],[97.28802681,2.22416878],[97.3277607,2.03222466]],[[127.79498482,2.20555687],[127.75665474,2.2705555],[127.81360054,2.26166725],[127.79498482,2.20555687]],[[118.57138252,2.31638908],[118.64972115,2.17666817],[118.56053352,2.26444435],[118.57138252,2.31638908]],[[125.43081856,2.31305504],[125.36775398,2.36916542],[125.45082283,2.37944603],[125.43081856,2.31305504]],[[128.1611042,2.28222466],[128.11911201,2.33833504],[128.16302681,2.40416527],[128.1611042,2.28222466]],[[109.06749153,2.48500252],[108.97318459,2.54016304],[109.10748482,2.53000069],[109.06749153,2.48500252]],[[128.49801826,2.05000114],[128.23217964,2.30611229],[128.56469917,2.63277626],[128.49801826,2.05000114]],[[125.40637398,2.62666512],[125.35471535,2.72444344],[125.41443062,2.80722237],[125.40637398,2.62666512]],[[106.24498177,2.73666573],[106.19774818,2.81222343],[106.2430439,2.78666878],[106.24498177,2.73666573]],[[96.43219185,2.34305763],[95.69691658,2.81889153],[95.88331795,2.91889],[96.43219185,2.34305763]],[[108.83249092,2.84499931],[108.77361488,2.89138985],[108.88333321,3.00166893],[108.83249092,2.84499931]],[[107.75943184,2.97416878],[107.76555061,3.02166557],[107.8121891,3.00111198],[107.75943184,2.97416878]],[[105.72499275,2.83389091],[105.69832039,3.06055641],[105.84887886,2.97916603],[105.72499275,2.83389091]],[[106.28943062,3.15972328],[106.21277046,3.12138939],[106.20332527,3.2266674],[106.28943062,3.15972328]],[[117.52304268,3.28555489],[117.41137886,3.30277824],[117.46193123,3.34388924],[117.52304268,3.28555489]],[[106.28055,3.23083305],[106.2347126,3.25611305],[106.28749275,3.37333488],[106.28055,3.23083305]],[[117.66414833,3.28416634],[117.53943062,3.42666817],[117.67249489,3.4197216],[117.66414833,3.28416634]],[[117.60748482,3.47722054],[117.433321,3.55916786],[117.58748817,3.52444649],[117.60748482,3.47722054]],[[117.39082527,3.56194496],[117.51748848,3.47444344],[117.21666145,3.54555702],[117.39082527,3.56194496]],[[117.8855381,3.45666695],[117.78970528,3.57777977],[117.86580849,3.54889107],[117.8855381,3.45666695]],[[125.88388252,3.36222267],[125.66359901,3.71833229],[125.91137886,3.49166679],[125.88388252,3.36222267]],[[117.82527351,3.74055672],[117.7883091,3.75000191],[117.81553841,3.75555611],[117.82527351,3.74055672]],[[126.84414864,3.73805428],[126.79221535,3.73333549],[126.73887825,3.84222221],[126.84414864,3.73805428]],[[117.84776497,3.79722404],[117.73082161,3.86361122],[117.8019352,3.85527992],[117.84776497,3.79722404]],[[126.71138191,3.79805565],[126.60803413,4.04110909],[126.7236042,3.91166878],[126.71138191,3.79805565]],[[117.68969917,3.97416878],[117.64637947,4.14027977],[117.75000191,4.06860924],[117.68969917,3.97416878]],[[117.88693428,4.02694511],[117.68692207,4.16833687],[117.72664833,4.1697216],[117.90355873,4.17404366],[117.88693428,4.02694511]],[[108.18166542,3.64750099],[108.18166542,4.19638634],[108.40693855,3.87583351],[108.18166542,3.64750099]],[[116.04942513,4.27944374],[117.59205818,4.16982079],[117.39276314,4.10750008],[117.82805061,3.70222282],[117.03027534,3.59416771],[117.44413948,3.43055534],[117.27304268,3.22277641],[118.09665108,2.30555534],[117.87191963,1.87666893],[119.00861549,0.98083305],[118.34387398,0.84305763],[117.8944416,1.11972237],[118.03499031,0.81027794],[117.46748543,0.1036129],[117.62248421,-0.77972221],[116.92360115,-1.25444412],[116.74331856,-1.02416611],[116.75554848,-1.36750031],[116.22249031,-1.77916718],[116.6041584,-2.22972107],[115.98387337,-3.58888817],[114.70665169,-4.17694473],[114.48108864,-3.49861145],[113.67109871,-3.47611046],[113.06469917,-2.99388885],[111.88942909,-3.57388878],[111.74971199,-2.74194336],[111.55026436,-3.02444458],[110.2374897,-2.9794426],[109.90358925,-1.8283329],[110.05774879,-1.33388901],[109.72971535,-0.95361137],[109.27249336,-0.85499954],[109.51442909,-0.72694397],[109.12024879,-0.50222206],[108.84549141,0.81056404],[109.2650013,1.39333534],[108.9819355,1.21166801],[109.06694221,1.53222466],[109.64856911,2.07340813],[109.66998482,1.61305428],[110.55525398,0.85389137],[111.82721138,0.99861336],[112.47276497,1.56805611],[113.65833473,1.22472191],[114.56276131,1.43361092],[114.80470467,2.24888802],[115.23719978,2.52250099],[115.13971138,2.90611076],[115.49553108,3.04000282],[115.68525887,4.17194557],[116.04942513,4.27944374]],[[117.29553413,-0.87833214],[117.28859138,-0.83166695],[117.2722187,-0.87694359],[117.29553413,-0.87833214]],[[126.75972176,3.98583412],[126.74054146,4.5419445],[126.91609383,4.27361107],[126.75972176,3.98583412]],[[125.49136543,4.73277855],[125.47886848,4.73444557],[125.49193001,4.74555397],[125.49136543,4.73277855]],[[107.96443367,4.67472267],[107.93831062,4.70194435],[108.00470924,4.77222252],[107.96443367,4.67472267]],[[95.73857307,5.58527946],[96.34774971,5.22277641],[97.51886177,5.24666786],[98.27052498,4.14249992],[99.97775459,2.94750023],[100.00164986,2.60194588],[100.20913887,2.7033329],[100.94246101,1.82055473],[100.79720497,2.21444511],[101.05552864,2.2863903],[102.42191505,0.80055428],[102.93245888,0.6950016],[103.08191872,0.44555473],[102.53996468,0.16666985],[103.35109138,0.53611183],[103.7396946,0.28111076],[103.81419563,-0.00102806],[103.26970863,-0.25888824],[103.49080849,-0.21694374],[103.34236336,-0.36409569],[103.59999275,-0.44111061],[103.36081123,-0.70222092],[104.3791523,-1.04138947],[104.4894352,-1.92499924],[104.87943459,-2.14694405],[104.5324955,-2.77277756],[104.86219978,-2.28944397],[105.6124897,-2.39416695],[106.05525398,-3.03138924],[105.73248482,-5.89777565],[105.26860237,-5.44416237],[105.13971138,-5.79610634],[104.54498482,-5.50638962],[104.56077766,-5.92974281],[101.62692451,-3.24611092],[100.29358864,-0.80638885],[99.63582039,0.07694435],[99.13612556,0.26138878],[98.77086067,1.74861336],[97.75192451,2.26916695],[96.88025093,3.67749977],[95.53108406,4.6827755],[95.23080635,5.57083321],[95.73857307,5.58527946]],[[104.21388435,-1.03944397],[104.24331856,-1.02361107],[104.20082283,-1.03722191],[104.21388435,-1.03944397]],[[102.85970497,0.27444649],[102.92691231,0.32222176],[102.83386421,0.28111076],[102.85970497,0.27444649]],[[95.15802193,5.59472466],[95.10885811,5.61250114],[95.14247322,5.66083336],[95.15802193,5.59472466]],[[95.11969185,5.67027855],[95.00802803,5.73527718],[95.06358528,5.74944496],[95.11969185,5.67027855]],[[95.34247017,5.77416801],[95.21774483,5.91305351],[95.38163948,5.84972191],[95.34247017,5.77416801]]]}, -{code:"GP", name:"Guadeloupe", lng:-61.441, lat:16.286, borders:[[[-61.24552887,15.871666],[-61.32942951,15.92861],[-61.26692951,16.014999],[-61.24552887,15.871666]],[[-61.03717786,16.311108],[-61.08666984,16.29583],[-60.98861689,16.346107],[-61.03717786,16.311108]],[[-61.34608471,16.334164],[-61.69494661,15.949165],[-61.78358471,16.333054],[-61.34608471,16.334164]],[[-62.8113477,17.888332],[-62.86911025,17.929722],[-62.79082504,17.912498],[-62.8113477,17.888332]]]}, -{code:"AN", name:"Netherlands Antilles", lng:-68.870, lat:12.123, borders:[[[-68.19522095,12.22110939],[-68.25108337,12.0205555],[-68.41603088,12.25694466],[-68.19522095,12.22110939]],[[-68.96546936,12.19888878],[-69.16352844,12.36638832],[-68.74694824,12.04027748],[-68.96546936,12.19888878]],[[-62.9610672,17.4608326],[-62.99667358,17.5205555],[-62.93858337,17.49027824],[-62.9610672,17.4608326]]]}, -{code:"AE", name:"United Arab Emirates", lng:54.163, lat:23.549, borders:[[[53.965271,24.176666],[53.623886,24.162777],[53.851105,24.269165],[53.965271,24.176666]],[[53.324165,24.267776],[53.243607,24.276665],[53.34111,24.328888],[53.324165,24.267776]],[[53.109718,24.311386],[53.079437,24.325554],[53.085831,24.352776],[53.109718,24.311386]],[[54.264717,24.288887],[54.174438,24.324997],[54.231384,24.35083],[54.264717,24.288887]],[[52.616104,24.268608],[52.572777,24.339722],[52.639717,24.372219],[52.616104,24.268608]],[[53.398048,24.324718],[53.387497,24.368889],[53.428329,24.366943],[53.398048,24.324718]],[[54.472496,24.418888],[54.328331,24.459721],[54.380272,24.502499],[54.472496,24.418888]],[[54.515549,24.504719],[54.48555,24.509163],[54.469719,24.536942],[54.515549,24.504719]],[[54.440826,24.50111],[54.400833,24.514721],[54.465553,24.589996],[54.440826,24.50111]],[[55.617493,25.57],[55.609718,25.569443],[55.620552,25.583611],[55.617493,25.57]],[[56.183331,25.654989],[56.269722,25.636015],[56.373528,24.979382],[56.104164,24.734722],[56.037498,24.938889],[55.779442,24.563889],[56.024719,24.076111],[55.510277,23.972775],[55.199165,22.699718],[52.583328,22.93889],[51.583611,24.25972],[52.080551,23.955555],[54.118607,24.139442],[54.424164,24.281666],[54.650276,24.746944],[55.863609,25.723331],[56.079941,26.065559],[56.183331,25.654989]]]}, -{code:"TL", name:"Timor-Leste", lng:125.878, lat:-8.822, borders:[[[124.4457273,-9.18479693],[124.34309326,-9.46337826],[124.04616117,-9.33996769],[124.4457273,-9.18479693]],[[127.253052,-8.47748757],[125.12798877,-9.43594725],[125.1640499,-9.06613597],[124.94544874,-8.95402648],[125.844147,-8.48166613],[127.253052,-8.47748757]]]}, -{code:"PN", name:"Pitcairn Islands", lng:-128.316, lat:-24.366, borders:[[[-130.07687359,-25.07970083],[-130.10736075,-25.06331295],[-130.06488081,-25.06331295],[-130.07687359,-25.07970083]],[[-124.78079251,-24.67581905],[-124.7958218,-24.66609936],[-124.77252195,-24.6669163],[-124.78079251,-24.67581905]],[[-128.28918414,-24.40970649],[-128.33688312,-24.3291592],[-128.30377202,-24.33027298],[-128.28918414,-24.40970649]]]}, -{code:"PW", name:"Palau", lng:134.570, lat:7.501, borders:[[[132.226624,5.292777],[132.208313,5.31111],[132.230255,5.307221],[132.226624,5.292777]],[[134.166077,6.885277],[134.139435,6.934721],[134.174988,6.923888],[134.166077,6.885277]],[[134.274994,7.010278],[134.227753,6.987777],[134.27832,7.070833],[134.274994,7.010278]],[[134.392761,7.140277],[134.353851,7.168055],[134.381897,7.192498],[134.392761,7.140277]],[[134.377747,7.215833],[134.344116,7.269444],[134.438873,7.278888],[134.377747,7.215833]],[[134.470795,7.36111],[134.517487,7.308054],[134.448303,7.331944],[134.470795,7.36111]],[[134.561371,7.371943],[134.485229,7.438054],[134.634155,7.729444],[134.561371,7.371943]]]}, -{code:"MH", name:"Marshall Islands", lng:168.963, lat:7.595, borders:[[[168.113586,5.600277],[168.094971,5.613333],[168.12439,5.641666],[168.113586,5.600277]],[[168.09024,5.630554],[168.074982,5.631943],[168.077148,5.650265],[168.09024,5.630554]],[[171.751923,6.080555],[171.727173,6.08611],[171.733582,6.096388],[171.751923,6.080555]],[[172.090515,6.219721],[172.074127,6.222221],[172.080261,6.229721],[172.090515,6.219721]],[[171.914154,7.092499],[171.894135,7.101665],[171.929962,7.133888],[171.914154,7.092499]],[[168.768036,7.298332],[168.786377,7.288888],[168.670258,7.328888],[168.768036,7.298332]],[[168.574677,7.398055],[168.554962,7.423055],[168.558594,7.471388],[168.574677,7.398055]],[[168.967194,7.574166],[168.944427,7.615276],[168.974976,7.60111],[168.967194,7.574166]],[[168.251373,7.749443],[168.233582,7.74861],[168.220245,7.766944],[168.251373,7.749443]],[[167.738861,8.725275],[167.724396,8.729719],[167.740784,8.747776],[167.738861,8.725275]],[[170.844971,8.886944],[170.834961,8.893332],[170.846924,8.916109],[170.844971,8.886944]],[[165.536926,9.19722],[165.522491,9.207775],[165.526917,9.218609],[165.536926,9.19722]],[[166.829956,9.32222],[166.811646,9.336943],[166.830261,9.335831],[166.829956,9.32222]],[[170.248016,9.544722],[170.244965,9.533609],[170.233307,9.558887],[170.248016,9.544722]],[[170.15387,9.639442],[170.135529,9.633333],[170.161652,9.645277],[170.15387,9.639442]],[[169.971619,10.436386],[169.963867,10.433332],[169.944122,10.451109],[169.971619,10.436386]],[[166.885254,11.144722],[166.841339,11.153332],[166.900543,11.16861],[166.885254,11.144722]],[[169.866913,11.232775],[169.85553,11.231941],[169.858856,11.241386],[169.866913,11.232775]],[[162.338287,11.351942],[162.323578,11.354164],[162.341644,11.362219],[162.338287,11.351942]],[[167.520813,11.377775],[167.512207,11.393888],[167.526093,11.386665],[167.520813,11.377775]],[[165.556091,11.615831],[165.513031,11.638611],[165.547211,11.634443],[165.556091,11.615831]],[[165.291656,11.700554],[165.271912,11.706387],[165.284698,11.714165],[165.291656,11.700554]],[[168.987732,14.580832],[168.974976,14.58111],[169.003876,14.598053],[168.987732,14.580832]]]}, -{code:"PM", name:"Saint Pierre and Miquelon", lng:-56.325, lat:47.042, borders:[[[-56.15080274,46.758049],[-56.23720527,46.763885],[-56.17382829,46.80999],[-56.15080274,46.758049]],[[-56.27106429,46.994156],[-56.3683013,46.784721],[-56.39023558,47.118881],[-56.27106429,46.994156]]]}, -{code:"SH", name:"Saint Helena", lng:-5.710, lat:-15.953, borders:[[[-9.89221609,-40.39083825],[-10.02860846,-40.30938745],[-9.9522112,-40.30661025],[-9.89221609,-40.39083825]],[[-12.2063755,-37.11247259],[-12.33166308,-37.10745982],[-12.25943012,-37.05274979],[-12.2063755,-37.11247259]],[[-5.662217,-15.98748984],[-5.79304935,-15.99416003],[-5.70416582,-15.90304957],[-5.662217,-15.98748984]],[[-14.36387794,-7.97971914],[-14.3819405,-7.88360754],[-14.29304935,-7.94527071],[-14.36387794,-7.97971914]]]}, -{code:"SM", name:"San Marino", lng:12.460, lat:43.942, borders:[[[12.415798,43.957954],[12.509998,43.986938],[12.459166,43.896111],[12.415798,43.957954]]]}, -{code:"TC", name:"Turks and Caicos Islands", lng:-71.950, lat:21.902, borders:[[[-71.14022858,21.431942],[-71.15046739,21.470833],[-71.13543709,21.511108],[-71.14022858,21.431942]],[[-72.46046451,21.629719],[-72.45665008,21.699718],[-72.4335635,21.713333],[-72.46046451,21.629719]],[[-71.46884114,21.654999],[-71.53331039,21.734444],[-71.46275311,21.720833],[-71.46884114,21.654999]],[[-71.65776076,21.82333],[-71.65885902,21.739719],[-71.8504788,21.845833],[-71.65776076,21.82333]],[[-72.26219206,21.75111],[-72.32719395,21.855831],[-72.2476964,21.795555],[-72.26219206,21.75111]],[[-71.88413955,21.847221],[-72.03331039,21.942776],[-71.91210982,21.943333],[-71.88413955,21.847221]]]}, -{code:"EH", name:"Western Sahara", lng:-13.706, lat:24.554, borders:[[[-15.74199653,21.338284],[-16.95304141,21.338333],[-17.05231478,20.764095],[-16.91721714,21.943054],[-16.71942529,22.26083],[-16.49109625,22.334164],[-16.07553453,23.324444],[-15.7666572,23.781666],[-15.77721836,23.908882],[-16.00636635,23.6675],[-15.83804368,23.896938],[-14.90110358,24.688053],[-14.48026277,26.171108],[-13.57416369,26.731667],[-13.17495355,27.666958],[-8.66666025,27.666664],[-8.66678239,27.290459],[-8.66693256,26.000275],[-12.00055689,26.],[-12.00027132,23.454441],[-13.10526277,22.893055],[-12.99971242,21.338055],[-15.74199653,21.338284]]]}, -{code:"RS", name:"Serbia", lng:20.806, lat:44.032, borders:[[[20.071423,42.560913],[20.348888,42.886383],[19.228809,43.513214],[19.51083,43.679718],[19.237019,44.011009],[19.620476,44.048454],[19.104443,44.355827],[19.371387,44.88916],[19.039719,44.861382],[19.423885,45.22583],[18.980324,45.378624],[18.81702,45.912964],[20.261024,46.114853],[21.513611,45.151108],[21.400398,44.780823],[22.146385,44.479164],[22.479164,44.710274],[22.764893,44.559006],[22.457333,44.474358],[22.681435,44.224701],[22.367222,43.826942],[23.004997,43.192772],[22.442219,42.821663],[22.365276,42.323883],[20.589642,41.882187],[20.071423,42.560913]]]}, -{code:"VA", name:"Holy See (Vatican City)", lng:12.451, lat:41.904, borders:[[[12.44509033,41.90311752],[12.45165334,41.90798903],[12.45666017,41.90142602],[12.44509033,41.90311752]]]}, -{code:"SJ", name:"Svalbard", lng:18.374, lat:78.830, borders:[[[-8.29089165,70.97415352],[-9.12005424,70.85775948],[-7.92700195,71.15081978],[-8.29089165,70.97415352]],[[19.18194008,74.3597126],[18.7919445,74.48166084],[19.29972267,74.47499275],[19.18194008,74.3597126]],[[25.01611137,76.4663868],[24.9363842,76.44886971],[25.58222008,76.70665169],[25.01611137,76.4663868]],[[23.28555489,77.26471138],[23.13527489,77.23526192],[23.03638649,77.25999641],[23.28555489,77.26471138]],[[23.33611107,78.19748116],[23.05972099,78.01609993],[24.91027641,77.74971199],[22.64110756,77.25305367],[22.40749931,77.42082405],[22.77833366,77.54776192],[20.85888863,77.4624958],[21.64499855,77.91249275],[20.90305138,78.11499214],[23.33611107,78.19748116]],[[21.50166512,78.56553841],[22.0288868,78.58082771],[22.27194405,78.26361275],[20.67111015,78.18748665],[20.12471962,78.47221565],[21.50166512,78.56553841]],[[26.84749794,78.70749092],[26.3963871,78.77083015],[27.01749992,78.69304085],[26.84749794,78.70749092]],[[11.27194405,78.6069355],[12.16361046,78.19970894],[10.48861122,78.89637947],[11.27194405,78.6069355]],[[29.03055382,78.91609383],[29.70805168,78.89637947],[28.01972008,78.86747932],[29.03055382,78.91609383]],[[30.20944023,78.9763813],[30.06694221,79.00110054],[30.33611107,78.98887825],[30.20944023,78.9763813]],[[21.22610664,79.03749275],[20.98249626,79.01416206],[20.92360878,79.02998543],[21.22610664,79.03749275]],[[20.8330555,79.05415535],[20.04611015,79.03749275],[20.19972038,79.12469673],[20.8330555,79.05415535]],[[20.0075016,79.24220467],[19.95471764,79.22665596],[20.16888618,79.31915474],[20.0075016,79.24220467]],[[20.10944176,79.36581612],[20.18027687,79.33888435],[19.62833214,79.38832283],[20.10944176,79.36581612]],[[10.92277718,79.65109444],[10.71222115,79.7136097],[11.07610893,79.66276741],[10.92277718,79.65109444]],[[11.00055504,79.7402668],[10.63916588,79.75000191],[10.75610924,79.7833271],[11.00055504,79.7402668]],[[16.81916618,79.87220955],[18.09833336,79.72026253],[17.63555336,79.37248421],[18.35694313,79.62831306],[18.92055321,79.16415596],[21.54916573,78.76776314],[18.96555138,78.45610237],[19.09222221,78.09553719],[18.41082954,78.02165413],[18.29277611,77.50638008],[17.73832893,77.47110176],[16.91916466,76.79971504],[17.19833183,76.69470406],[16.6127758,76.57054329],[15.4980526,76.87997627],[16.51972008,76.9985981],[14.46722221,77.17164803],[13.9141674,77.5277729],[16.22305107,77.43498421],[14.73916435,77.65860176],[17.00610924,77.93136787],[13.94194221,77.71666145],[13.58888817,78.04942513],[17.30166435,78.42025948],[16.32888603,78.45221138],[16.83111,78.67192268],[15.46416664,78.45166206],[15.19333076,78.58804512],[15.37999916,78.84471321],[14.38555717,78.49775887],[14.72638893,78.38388252],[13.00666618,78.19748116],[12.36055565,78.48027229],[13.19861031,78.54081917],[11.33333397,78.96054268],[12.50555611,78.90803719],[11.75527763,79.07582283],[12.11305428,79.29582405],[11.23638725,79.09305],[10.67694283,79.54498482],[13.82472038,79.87526131],[12.4477787,79.56637764],[13.48444176,79.58082771],[13.25722313,79.47137642],[14.05888939,79.26027107],[13.88694572,79.54136848],[14.58499718,79.80415535],[16.44999886,78.90387154],[15.6380558,79.82721138],[16.3077755,80.06276131],[16.81916618,79.87220955]],[[27.83777809,80.11026192],[27.67416573,80.12275887],[28.07444191,80.14415169],[27.83777809,80.11026192]],[[36.84916115,80.13998604],[36.59054756,80.15498543],[36.7602787,80.16081429],[36.84916115,80.13998604]],[[32.36638832,80.09443855],[31.44944191,80.08581734],[33.63749886,80.21331978],[32.36638832,80.09443855]],[[18.55333138,80.24553108],[18.11944389,80.28471565],[18.75861168,80.30192757],[18.55333138,80.24553108]],[[24.3358326,80.38415718],[24.12861061,80.39305305],[24.19694328,80.45416451],[24.3358326,80.38415718]],[[19.93333244,80.47747993],[21.86055565,80.26776314],[21.59860802,80.11831856],[22.22638512,79.9791584],[22.57861137,80.29860115],[22.36110878,80.41026497],[22.88694191,80.4902668],[23.36083031,80.42943001],[23.10138893,80.120821],[24.83638573,80.35081673],[27.24499702,79.90498543],[23.51166725,79.17886543],[19.63555336,79.60386848],[22.31249809,79.79693794],[18.7713871,79.71748543],[18.15416527,79.90999031],[18.80944252,79.99470711],[17.78305626,80.12776375],[19.34055519,80.08638191],[19.58416557,80.15138435],[18.97999763,80.33665657],[19.83777809,80.21388435],[19.46333122,80.45471382],[19.93333244,80.47747993]],[[24.2650013,80.47110176],[23.97443962,80.49054146],[24.17499733,80.50915718],[24.2650013,80.47110176]],[[19.93333244,80.47747993],[19.84472084,80.50305367],[20.13027763,80.51277351],[19.93333244,80.47747993]],[[20.75361061,80.62137032],[20.49916267,80.65776253],[20.79333305,80.64749336],[20.75361061,80.62137032]],[[21.3302784,80.70027351],[21.36499977,80.67886543],[21.02638817,80.68165779],[21.3302784,80.70027351]],[[20.81916618,80.71914864],[20.51833153,80.75999641],[21.00666618,80.70138741],[20.81916618,80.71914864]]]}, -{code:"MF", name:"Saint Martin", lng:-63.041, lat:18.094, borders:[[[-63.00663766,18.080555],[-63.01142918,18.067276],[-63.13982409,18.058601],[-63.00663766,18.080555]]]}, -{code:"BL", name:"Saint Barthelemy", lng:-63.043, lat:18.040, borders:[[[-63.02830463,18.015553],[-63.13982409,18.058601],[-63.01142918,18.067276],[-63.02830463,18.015553]]]}, -{code:"GG", name:"Guernsey", lng:-2.576, lat:49.459, borders:[[[-2.59083333,49.422493],[-2.67027528,49.434166],[-2.50166323,49.507774],[-2.59083333,49.422493]]]}, -{code:"JE", name:"Jersey", lng:-2.129, lat:49.219, borders:[[[-2.01499878,49.214165],[-2.20527498,49.180832],[-2.24721999,49.253052],[-2.01499878,49.214165]]]}, -{code:"GS", name:"South Georgia South Sandwich Islands", lng:-36.891, lat:-54.209, borders:[[[-27.32580585,-59.42720815],[-27.29804185,-59.47304496],[-27.41247969,-59.43438745],[-27.32580585,-59.42720815]],[[-26.58277886,-59.06994661],[-26.66498557,-59.02579474],[-26.50111378,-59.03690354],[-26.58277886,-59.06994661]],[[-26.24637633,-58.40744041],[-26.24888222,-58.49858138],[-26.45913744,-58.42720815],[-26.24637633,-58.40744041]],[[-26.41278052,-57.80802887],[-26.51219206,-57.77105729],[-26.44332171,-57.74383593],[-26.41278052,-57.80802887]],[[-26.66082027,-57.08633449],[-26.72887467,-57.06276732],[-26.67581905,-57.05633593],[-26.66082027,-57.08633449]],[[-27.1085816,-56.71749156],[-27.20970959,-56.69359603],[-27.12943262,-56.68221292],[-27.1085816,-56.71749156]],[[-27.5638851,-56.32055628],[-27.59997969,-56.28108182],[-27.54943095,-56.27416984],[-27.5638851,-56.32055628]],[[-37.03859747,-54.51164243],[-37.08355729,-54.5127337],[-37.10583492,-54.47108471],[-37.03859747,-54.51164243]],[[-37.49498723,-54.01049813],[-36.28804784,-54.26637988],[-35.78244041,-54.76551089],[-36.11579142,-54.88719206],[-37.41136191,-54.26828809],[-37.23943284,-54.14775123],[-38.03304307,-54.04882829],[-37.49498723,-54.01049813]]]}, -{code:"TW", name:"Taiwan", lng:120.946, lat:23.754, borders:[[[121.576393,22.001389],[121.490257,22.078609],[121.546944,22.078053],[121.576393,22.001389]],[[119.669434,23.549999],[119.526703,23.535461],[119.598328,23.606941],[119.669434,23.549999]],[[118.223602,24.404163],[118.207489,24.412495],[118.241364,24.445827],[118.223602,24.404163]],[[118.419144,24.395828],[118.275543,24.399162],[118.401657,24.521664],[118.419144,24.395828]],[[121.734711,25.138885],[122.002213,25.006943],[121.839706,24.476383],[120.716377,21.928051],[120.052757,23.044998],[120.111366,23.620274],[121.009163,25.008888],[121.734711,25.138885]],[[119.929428,26.134995],[119.909416,26.159439],[119.952477,26.159996],[119.929428,26.134995]],[[119.967209,26.187496],[119.956383,26.215549],[120.006104,26.219162],[119.967209,26.187496]]]}, -]; - -/* Convert the country borders to latlng. */ -countries.forEach(function(c) { - c.borders.forEach(function(b) { - b.forEach(function(p, i) { - b[i] = {lat: p[1], lng: p[0]}; - }); - }); -}); diff --git a/lib/protovis/tests/geo/countries-lores.js b/lib/protovis/tests/geo/countries-lores.js deleted file mode 100644 index a36d7819..00000000 --- a/lib/protovis/tests/geo/countries-lores.js +++ /dev/null @@ -1,197 +0,0 @@ -var countries = [ -{code:"TZ", name:"United Republic of Tanzania", borders:[[[31.83601952,-1.62929833],[31.86617088,-1.02735996],[30.76985931,-1.01454854],[30.41909981,-1.13464856],[30.81615067,-1.69892955],[30.75831985,-2.28723812],[30.46966934,-2.41382957],[30.52766037,-2.80761814],[30.74300957,-3.03430867],[30.75223923,-3.35930657],[30.50554085,-3.56857753],[30.11631966,-4.09011698],[29.75351906,-4.45238733],[29.66062927,-4.45118427],[29.59445,-4.91772699],[29.77901077,-5.05294323],[29.75538063,-5.4849391],[29.94697571,-5.90999985],[29.72229958,-6.08973408],[29.91054535,-6.47645903],[30.13589478,-6.47058725],[30.54042053,-6.98102903],[30.64572906,-7.61671638],[31.13756943,-8.40558815],[31.15775108,-8.59456921],[31.55636978,-8.76203823],[32.19187164,-8.93033695],[32.7593689,-9.23060226],[33.73971939,-9.41714001],[33.94083786,-9.69367027],[34.02822876,-9.47815418],[34.51029587,-10.02622986],[34.63737488,-10.89998817],[34.75453949,-11.33744621],[34.93619919,-11.47956657],[35.31240082,-11.43914032],[36.51406097,-11.72091866],[36.77513885,-11.59453678],[37.47129059,-11.56875229],[37.82764053,-11.26877689],[38.42757034,-11.28518867],[39.52099991,-10.8968668],[40.31658936,-10.31708622],[39.94960022,-10.09839249],[39.5357399,-9.11236191],[39.18651962,-8.48549843],[39.25202942,-8.0078001],[39.1946907,-7.70389891],[39.47000122,-7.09999704],[39.43999863,-6.84000015],[38.79977036,-6.47565699],[38.74053955,-5.90894413],[39.20222092,-4.6767683],[37.76689911,-3.67711663],[37.69868851,-3.09698725],[34.07262039,-1.05981839],[33.57941818,-1.50602829],[33.25175095,-1.95795834],[33.64719009,-2.30090809],[33.07672882,-2.54710913],[32.95177841,-2.43043804],[32.37308884,-2.4899466],[31.92654991,-2.71450996],[31.64801025,-2.32920671],[31.83601952,-1.62929833],[31.83601952,-1.62929833]]]}, -{code:"SO", name:"Somalia", borders:[[[42.77682877,10.92687035],[42.5587616,10.57258034],[42.92811966,10.02194023],[43.29698944,9.54047966],[43.67874908,9.1835804],[46.94834137,7.99688005],[47.78942108,8.00300026],[44.96360016,5.00161982],[43.6608696,4.95755005],[42.76966858,4.25259018],[42.1286087,4.23412991],[41.85508347,3.91891193],[40.98104858,2.78451991],[40.99300003,-0.85828942],[41.58512878,-1.683249],[41.81095123,-1.44646859],[42.04156876,-0.91915977],[43.13597107,0.2922],[44.06814957,1.05282998],[45.56399155,2.04575992],[46.5647583,2.85528994],[47.74079132,4.21939993],[48.59455109,5.3391099],[49.45270157,6.80465984],[50.07091904,8.08172989],[50.55239105,9.19874001],[50.83417892,10.27972031],[51.04531097,10.64089966],[51.04153061,11.16650963],[51.13386917,11.74814987],[51.11119843,12.02464008],[50.73202133,12.02190018],[50.25878143,11.6795702],[49.72861862,11.57890034],[49.26776123,11.43033028],[48.37876892,11.37549019],[48.0215683,11.19307041],[47.52565002,11.12724018],[46.645401,10.81655025],[45.55693054,10.69801998],[44.61423111,10.4422102],[44.1178093,10.44552994],[43.66666031,10.86415958],[43.47064972,11.27772045],[43.14527893,11.46205044],[42.77682877,10.92687035],[42.77682877,10.92687035]]]}, -{code:"KE", name:"Kenya", borders:[[[40.98104858,2.78451991],[41.85508347,3.91891193],[41.17179871,3.91909003],[40.76847839,4.25702],[39.85493851,3.83878994],[39.55938339,3.42206001],[38.89250946,3.50074005],[38.67113876,3.61607003],[38.43696976,3.58851004],[38.12091446,3.59860492],[36.85509491,4.44786406],[36.15908051,4.44786406],[35.81744766,4.77696562],[35.81744766,5.33823204],[35.29800797,5.50600004],[34.6201973,4.84712267],[34.00500107,4.24988508],[34.47912979,3.55559993],[34.59606934,3.05374002],[35.03599167,1.90584004],[34.67210007,1.17693996],[33.98500061,0.095],[34.13623047,-0.31930989],[34.07262039,-1.05981839],[37.69868851,-3.09698725],[37.76689911,-3.67711663],[39.20222092,-4.6767683],[39.60488892,-4.34652424],[39.80006027,-3.68115997],[40.12118912,-3.27767897],[40.26303864,-2.57308912],[40.63785172,-2.49978662],[40.88476944,-2.08255005],[41.58512878,-1.683249],[40.99300003,-0.85828942],[40.98104858,2.78451991],[40.98104858,2.78451991]]]}, -{code:"ET", name:"Ethiopia", borders:[[[42.35702896,12.54111958],[42.35155869,12.54222965],[42.,12.10000038],[41.66175842,11.63119984],[41.73958969,11.35511017],[41.75556946,11.05091],[42.31414032,11.03419971],[42.55493164,11.10511017],[42.77682877,10.92687035],[42.5587616,10.57258034],[42.92811966,10.02194023],[43.29698944,9.54047966],[43.67874908,9.1835804],[46.94834137,7.99688005],[47.78942108,8.00300026],[44.96360016,5.00161982],[43.6608696,4.95755005],[42.76966858,4.25259018],[42.1286087,4.23412991],[41.85508347,3.91891193],[41.17179871,3.91909003],[40.76847839,4.25702],[39.85493851,3.83878994],[39.55938339,3.42206001],[38.89250946,3.50074005],[38.67113876,3.61607003],[38.43696976,3.58851004],[38.12091446,3.59860492],[36.85509491,4.44786406],[36.15908051,4.44786406],[35.81744766,4.77696562],[35.81744766,5.33823204],[35.29800797,5.50600004],[34.70701981,6.59422016],[34.25032043,6.82606983],[34.07509995,7.22594976],[33.56829071,7.71333981],[32.95418167,7.78496981],[33.2947998,8.35457993],[33.82550049,8.37915993],[33.9749794,8.68455982],[33.96162033,9.58358002],[34.2574501,10.63008976],[34.73115158,10.9101696],[34.83163071,11.31896019],[35.26049042,12.08285999],[35.86362839,12.57828045],[36.27022171,13.5633297],[36.42950821,14.4221096],[37.59376907,14.21310043],[37.90607071,14.95942974],[38.5129509,14.50547028],[39.09939957,14.74063969],[39.3406105,14.53155041],[40.02624893,14.51959038],[40.89659882,14.11863995],[41.15520096,13.77332973],[41.59856033,13.45209026],[42.00975037,12.86581993],[42.35155869,12.54222965],[42.35702896,12.54111958],[42.35702896,12.54111958]]]}, -{code:"UG", name:"Uganda", borders:[[[31.86617088,-1.02735996],[30.76985931,-1.01454854],[30.41909981,-1.13464856],[29.82151031,-1.44330955],[29.57946968,-1.34130001],[29.58783913,-0.58737987],[29.81949997,-0.20529994],[29.87578011,0.59740001],[30.0861702,1.06231999],[30.46850014,1.58380997],[30.85268021,1.84940004],[31.17416954,2.20445991],[30.77331924,2.33989],[30.83385086,3.50917006],[31.24555969,3.78189993],[31.88145065,3.55826998],[32.68642044,3.79232001],[33.38999939,3.78999996],[34.00500107,4.24988508],[34.47912979,3.55559993],[34.59606934,3.05374002],[35.03599167,1.90584004],[34.67210007,1.17693996],[33.98500061,0.095],[33.33184814,0.32501],[32.90610886,0.08677],[32.27285004,-0.05613995],[31.8151207,-0.6404199],[31.86617088,-1.02735996],[31.86617088,-1.02735996]]]}, -{code:"SD", name:"Sudan", borders:[[[33.38999939,3.78999996],[32.68642044,3.79232001],[31.88145065,3.55826998],[31.24555969,3.78189993],[30.83385086,3.50917006],[29.9534893,4.17369986],[29.71600914,4.60079002],[29.15908051,4.38926983],[28.69668007,4.45509005],[28.42900085,4.28715992],[27.97999001,4.40841007],[27.37424088,5.23396015],[27.21339035,5.55096006],[26.46594048,5.94671011],[26.2134304,6.54659986],[25.79664993,6.97930002],[25.12414932,7.50008011],[25.11491966,7.82508993],[24.56735039,8.22918034],[23.80582047,8.66631031],[23.45903015,8.95429039],[23.3947506,9.26506042],[23.55722046,9.68122005],[23.55429077,10.08924961],[22.97756004,10.71446991],[22.86417007,11.14239979],[22.8762207,11.38461018],[22.50868988,11.67936039],[22.49761963,12.2602396],[22.28800964,12.64605045],[21.93680954,12.58817959],[22.03759003,12.95545959],[22.29657936,13.37232018],[22.18329048,13.78647995],[22.51202011,14.0931797],[22.30351067,14.32682037],[22.5679493,14.94429016],[23.02458954,15.68072033],[23.88689041,15.61083984],[23.83765984,19.58046913],[23.85000038,20.],[25.,20.00304031],[25.,22.],[29.02000046,22.],[32.90000153,22.],[36.86623001,22.],[37.1887207,21.01885033],[36.96940994,20.83744049],[37.11470032,19.80796051],[37.48178864,18.61408997],[37.86275864,18.36786079],[38.41007996,17.99830055],[37.90399933,17.42753983],[37.16746902,17.26313972],[36.85253143,16.9565506],[36.75389099,16.29186058],[36.3232193,14.82248974],[36.42950821,14.4221096],[36.27022171,13.5633297],[35.86362839,12.57828045],[35.26049042,12.08285999],[34.83163071,11.31896019],[34.73115158,10.9101696],[34.2574501,10.63008976],[33.96162033,9.58358002],[33.9749794,8.68455982],[33.82550049,8.37915993],[33.2947998,8.35457993],[32.95418167,7.78496981],[33.56829071,7.71333981],[34.07509995,7.22594976],[34.25032043,6.82606983],[34.70701981,6.59422016],[35.29800797,5.50600004],[34.6201973,4.84712267],[34.00500107,4.24988508],[33.38999939,3.78999996],[33.38999939,3.78999996]]]}, -{code:"CA", name:"Canada", borders:[[[-125.28858948,49.9982605],[-124.77785492,49.49976349],[-123.7462616,49.06631088],[-123.31989288,48.4861412],[-123.83963013,48.34000015],[-125.53665924,48.81691742],[-125.84662628,49.18969727],[-126.77155304,49.55722427],[-126.95761108,49.85649872],[-128.02130127,50.04547119],[-128.41955566,50.61689377],[-128.3303833,50.86000061],[-127.24551392,50.63100815],[-126.61141205,50.47176361],[-125.6399765,50.36053848],[-125.28858948,49.9982605],[-125.28858948,49.9982605]],[[-79.00989532,43.27000046],[-79.36168671,43.20238113],[-79.76039124,43.29719162],[-79.46107483,43.63920975],[-79.15607452,43.75743103],[-78.45046997,43.90317917],[-77.60534668,44.03931046],[-77.16138458,43.85015106],[-76.88269043,44.0694809],[-76.56555176,44.2080307],[-76.375,44.09630966],[-75.31814575,44.81644821],[-74.86688995,45.00048065],[-73.34772491,45.00738144],[-71.50495148,45.0082016],[-71.40493774,45.25500107],[-71.08473206,45.30524063],[-70.65994263,45.45999908],[-70.30498505,45.91500092],[-69.99990845,46.69306946],[-69.2371521,47.44778061],[-68.90493774,47.18500137],[-68.23442841,47.3548584],[-67.79035187,47.06636047],[-67.79129791,45.70280838],[-67.13736725,45.13753128],[-66.0259552,45.25931168],[-64.42546082,45.29204178],[-66.16163635,44.46511841],[-66.12330627,43.61867142],[-65.3639679,43.54523087],[-64.24648285,44.26552963],[-63.25468826,44.67013931],[-61.03983307,45.26525116],[-59.80284119,45.92039871],[-60.44855499,46.28263855],[-60.51810455,47.00793076],[-61.52072144,45.88376999],[-63.17326736,45.7390213],[-64.47214508,46.23849106],[-64.79850769,46.99296951],[-65.11538696,48.07085037],[-64.17092896,48.74248123],[-65.0561676,49.23278046],[-66.5524292,49.1330986],[-68.64992523,48.29999924],[-70.25515747,46.9860611],[-71.10452271,46.82170868],[-69.95360565,47.74488068],[-68.51107788,49.06835938],[-67.23622131,49.51155853],[-66.39904785,50.22896957],[-65.36325073,50.2981987],[-63.8624649,50.29098892],[-61.72360611,50.08045959],[-60.03307343,50.24277115],[-58.77480316,51.06430054],[-57.12687302,51.4197197],[-56.40913773,51.77069855],[-55.68338013,52.14664078],[-55.75631332,53.27035904],[-56.15811157,53.64749146],[-56.93688965,53.78031921],[-57.33318329,54.62649918],[-57.97505569,54.94549179],[-59.56960297,55.20407104],[-60.46848297,55.77547836],[-61.79862976,56.33945084],[-61.3965416,56.96744919],[-62.50233841,58.16707993],[-63.80474854,59.44260025],[-64.58347321,60.33557892],[-65.24506378,59.87070847],[-66.20178223,58.7673111],[-67.64968109,58.21205902],[-68.37447357,58.80105972],[-69.28790283,58.95735931],[-69.62026978,60.22124863],[-69.59036255,61.061409],[-71.37362671,61.13716888],[-71.67704773,61.52534866],[-72.90848541,62.10506821],[-73.8398056,62.44380188],[-74.66810608,62.18111038],[-75.69612122,62.27840042],[-77.41062164,62.55052948],[-78.10687256,62.31964111],[-77.77268982,60.75788116],[-77.33670044,59.85261154],[-78.51681519,58.80458069],[-77.30223083,58.05208969],[-76.62314606,57.20262909],[-76.54127502,56.53422928],[-77.0955658,55.83740997],[-78.22866058,55.13645172],[-79.8294754,54.66772079],[-79.12420654,54.14144897],[-78.6018219,52.56208038],[-79.14299774,51.53393173],[-79.91279602,51.2084198],[-81.4006424,52.15787888],[-82.12497711,53.27703094],[-82.43611145,54.28226852],[-82.27280426,55.14831924],[-83.36051941,55.24488831],[-85.01174927,55.30260086],[-86.07112122,55.72383118],[-87.32410431,55.99914169],[-88.03968811,56.47161865],[-89.0394516,56.8517189],[-90.89759827,57.28467941],[-92.29696655,57.08708954],[-92.76455688,57.84571075],[-93.21491241,58.78211975],[-94.68453979,58.94881821],[-94.62923431,60.11021042],[-94.24150085,60.89865112],[-93.15698242,62.02468872],[-91.93340302,62.83507919],[-90.76999664,62.96020889],[-90.70397949,63.61016846],[-89.91442108,64.0327301],[-88.48285675,64.09896851],[-87.32324219,64.77562714],[-87.03143311,65.21296692],[-86.0675354,66.05625153],[-85.76938629,66.55832672],[-84.73540497,66.25730133],[-83.3445282,66.41153717],[-81.3864212,67.11077881],[-81.25927734,67.59716034],[-81.96434784,68.13253021],[-81.22010803,68.6656723],[-81.28035736,69.16201782],[-82.62253571,69.65825653],[-84.1007309,69.8053894],[-85.52197266,69.8821106],[-85.57656097,68.78456116],[-86.30599213,67.92146301],[-87.35015106,67.19872284],[-88.31739807,67.87338257],[-88.01964569,68.61508179],[-89.21514893,69.25872803],[-90.55151367,68.47499084],[-90.54701996,69.49765778],[-92.40692139,69.69996643],[-91.51954651,70.19129181],[-92.8781662,71.31868744],[-93.88993835,71.76014709],[-95.20880127,71.92053223],[-96.39107513,71.19481659],[-96.47131348,70.08975983],[-95.30407715,69.68570709],[-94.23275757,69.06903076],[-94.68499756,68.06382751],[-95.48932648,68.09069824],[-96.1258316,67.29338074],[-96.1198349,68.23938751],[-97.66938782,68.5786438],[-98.55858612,68.40393829],[-98.44315338,67.78164673],[-99.90188599,67.80565643],[-101.45423889,67.64688873],[-103.22110748,68.0977478],[-104.33786774,68.01799774],[-105.34272766,68.56121826],[-106.14992523,68.80000305],[-106.9499054,68.69999695],[-108.16713715,68.65392303],[-108.81298828,68.31163788],[-107.79232788,67.88735962],[-108.88017273,67.38143921],[-109.9461441,67.98104095],[-110.79795074,67.80612183],[-113.49723816,67.6881485],[-115.30484772,67.90261078],[-113.89783478,68.39890289],[-115.24687195,68.90590668],[-116.22632599,68.84150696],[-117.60264587,69.01127625],[-119.94286346,69.37786102],[-121.47219849,69.7977829],[-122.68344116,69.85552979],[-123.06098938,69.5637207],[-124.28966522,69.39968872],[-124.4247818,70.15840149],[-125.7562561,69.48058319],[-127.44704437,70.37721252],[-128.13795471,70.48384094],[-128.36134338,70.01286316],[-129.10760498,69.77926636],[-129.79464722,70.19368744],[-131.43118286,69.94451141],[-132.92915344,69.50534058],[-134.41445923,69.62743378],[-135.6257019,69.31511688],[-136.50349426,68.89804077],[-137.5461731,68.99002075],[-139.12045288,69.47102356],[-140.9859314,69.71199799],[-140.99237061,66.00003052],[-140.99757385,60.30638885],[-140.01287842,60.27682114],[-139.03887939,60.],[-138.34074402,59.5621109],[-137.45228577,58.90499878],[-136.47950745,59.46389008],[-135.47583008,59.78778076],[-134.94488525,59.27056122],[-134.27088928,58.86111069],[-133.3553772,58.41027832],[-132.73027039,57.69289017],[-131.7077179,56.55212021],[-130.00759888,55.9158287],[-129.97996521,55.28499985],[-130.53590393,54.80278015],[-130.51481628,54.28757095],[-129.30511475,53.56158829],[-129.12973022,52.75537872],[-127.85024261,52.32960892],[-127.99271393,51.71583176],[-127.43560791,50.83060837],[-125.62453461,50.41656113],[-124.9101944,49.98455811],[-122.97415161,49.00253677],[-122.8399353,49.],[-120.,49.],[-117.03116608,49.],[-116.04813385,49.],[-113.,49.],[-110.04997253,49.],[-107.04997253,49.],[-104.048172,48.99985886],[-100.64992523,49.],[-97.22867584,49.0007019],[-95.15904236,49.],[-95.15604401,49.38425064],[-94.81755066,49.38904953],[-94.63990784,48.84000015],[-94.32906342,48.67073822],[-93.63085175,48.60926056],[-92.60997009,48.45000076],[-91.63990784,48.13999939],[-90.82991028,48.27000046],[-89.5999527,48.00999832],[-89.19400024,48.4054718],[-88.62638092,48.5625],[-88.40422821,48.80632019],[-88.17884064,48.93669128],[-87.24900818,48.73508835],[-86.55999756,48.7110672],[-86.32094574,48.57727814],[-86.08039856,48.1268692],[-85.81946564,47.90948868],[-84.86417389,47.86008072],[-85.04055023,47.57569885],[-84.64492035,47.28219986],[-84.81520081,46.90232086],[-84.39554596,46.77682114],[-84.60482025,46.4396019],[-84.3366394,46.40877151],[-84.14865112,46.5557518],[-83.95256805,46.33427048],[-83.20250702,46.21015167],[-82.44193268,46.19963074],[-81.6313324,46.09754181],[-80.73670959,45.90380859],[-80.41048431,45.59012985],[-79.76293945,44.82458878],[-80.08491516,44.49391937],[-80.89759827,44.63164139],[-81.40233612,45.25004959],[-81.27559662,44.62018967],[-81.75260162,44.06464005],[-81.7000885,43.59006882],[-81.78269196,43.31084061],[-82.42998505,42.97999954],[-82.89992523,42.43000031],[-83.11998749,42.08000183],[-82.57121277,42.01702118],[-81.82912445,42.3355217],[-81.39216614,42.6151886],[-81.09485626,42.6607399],[-80.5450592,42.56008148],[-80.27916718,42.71567154],[-79.79128265,42.84202957],[-78.91996765,42.96500015],[-79.00989532,43.27000046],[-79.00989532,43.27000046]],[[-105.49219513,79.3015976],[-103.52918243,79.16535187],[-100.82511139,78.8004837],[-100.06015778,78.32476044],[-99.67086029,77.90753937],[-101.3038559,78.01898193],[-102.94973755,78.34320831],[-105.17603302,78.38034058],[-104.21035767,78.67742157],[-105.41951752,78.91835022],[-105.49219513,79.3015976],[-105.49219513,79.3015976]],[[-132.70991516,54.04000092],[-131.75,54.11999893],[-132.04940796,52.98461914],[-131.17887878,52.18041992],[-131.57769775,52.18236923],[-132.18040466,52.63970947],[-132.54985046,53.09999847],[-133.05451965,53.41147995],[-133.23957825,53.85108185],[-133.17987061,54.16999817],[-132.70991516,54.04000092],[-132.70991516,54.04000092]],[[-78.77062225,72.35218811],[-77.82453918,72.74960327],[-75.6058197,72.24368286],[-74.22852325,71.76715088],[-74.09909058,71.33084106],[-72.24213409,71.55693054],[-71.1999054,70.91999817],[-68.7859726,70.52503204],[-67.91497803,70.12194824],[-66.96895599,69.18608856],[-68.80509949,68.72020721],[-66.44979095,68.06716156],[-64.86228943,67.84754181],[-63.42491531,66.92845917],[-61.85198975,66.86212158],[-62.16312408,66.16024017],[-63.9184227,64.99868011],[-65.14875793,65.42604828],[-66.72116089,66.38804626],[-68.01500702,66.26274109],[-68.14129639,65.68978119],[-67.08956146,65.10845947],[-65.73204041,64.64842987],[-65.32009125,64.38275146],[-64.66933441,63.39291],[-65.01378632,62.67419052],[-66.27498627,62.9450798],[-68.78310394,63.74568176],[-67.36968994,62.88394928],[-66.32820129,62.28005981],[-66.16548157,61.93090057],[-68.87738037,62.33013153],[-71.02342224,62.91070938],[-72.2353363,63.39783859],[-71.88619232,63.68001938],[-73.37828064,64.1939621],[-74.83440399,64.67907715],[-74.81847382,64.38910675],[-77.70994568,64.22953796],[-78.55587006,64.57292175],[-77.89727783,65.30917358],[-76.01824188,65.32698822],[-73.95975494,65.45475769],[-74.29387665,65.81176758],[-73.94487,66.31057739],[-72.65107727,67.28456116],[-72.92597961,67.72692871],[-73.31156158,68.06945038],[-74.84322357,68.55462646],[-76.86904907,68.89473724],[-76.22862244,69.14775848],[-77.28733826,69.76953125],[-78.1685257,69.82647705],[-78.95717621,70.16687775],[-79.49241638,69.87180328],[-81.30538177,69.74317169],[-84.94468689,69.96662903],[-87.05999756,70.26000214],[-88.6816864,70.41072845],[-89.51342773,70.76206207],[-88.46770477,71.21820068],[-89.8881073,71.22254944],[-90.20513153,72.2350769],[-89.43657684,73.12947083],[-88.40815735,73.53787231],[-85.82606506,73.80384064],[-86.56208801,73.15743256],[-85.7743454,72.53411102],[-84.85007477,73.34026337],[-82.31551361,73.7509613],[-80.59998322,72.71653748],[-80.74885559,72.0619278],[-78.77062225,72.35218811],[-78.77062225,72.35218811]],[[-83.88262939,65.10961151],[-82.78748322,64.76669312],[-81.64191437,64.45511627],[-81.55337524,63.97962189],[-80.81728363,64.05747986],[-80.10344696,63.72597122],[-80.99091339,63.41123962],[-82.54706573,63.65171051],[-83.10874176,64.10189056],[-84.1003952,63.56972885],[-85.52334595,63.05239868],[-85.86673737,63.63727951],[-87.22197723,63.54124832],[-86.35268402,64.03582001],[-86.22483063,64.82289886],[-85.8838501,65.73876953],[-85.16120911,65.65730286],[-84.97576904,65.21755219],[-84.46398163,65.37178802],[-83.88262939,65.10961151],[-83.88262939,65.10961151]],[[-55.60017014,51.31708908],[-56.13402557,50.68701172],[-56.79585648,49.81230927],[-56.14309311,50.15013123],[-55.47144318,49.93582153],[-55.82238388,49.5871315],[-54.93510056,49.31301117],[-54.47372818,49.55669022],[-53.47651291,49.24914169],[-53.78600311,48.51676941],[-53.08615112,48.68780899],[-52.95859528,48.15718079],[-52.64810181,47.53554916],[-53.0691452,46.6554985],[-53.52144623,46.6182785],[-54.17892075,46.8070488],[-53.96183777,47.62522125],[-54.24046707,47.7522583],[-55.40074539,46.88499832],[-55.99744415,46.9197197],[-55.29118729,47.38954926],[-56.2507782,47.63254929],[-57.32522202,47.57281113],[-59.26597214,47.6033287],[-59.41949081,47.89947128],[-58.79655838,48.25154114],[-59.23162842,48.5231781],[-58.39178085,49.12561035],[-57.35865784,50.71826935],[-56.73864365,51.28744125],[-55.87096405,51.63209152],[-55.40694427,51.58829117],[-55.60017014,51.31708908],[-55.60017014,51.31708908]],[[-110.96359253,78.80444336],[-109.66314697,78.60195923],[-110.88126373,78.40692139],[-112.54201508,78.40789795],[-112.52587891,78.55056],[-111.5,78.84999847],[-110.96359253,78.80444336],[-110.96359253,78.80444336]],[[-111.26435852,78.15296936],[-109.85440063,77.99633789],[-110.18695068,77.69702911],[-112.05111694,77.40923309],[-113.53420258,77.73220825],[-112.72451782,78.05106354],[-111.26435852,78.15296936],[-111.26435852,78.15296936]],[[-88.15029907,74.39230347],[-89.76470184,74.51557159],[-92.42240143,74.83773804],[-92.76821136,75.3868103],[-92.88986206,75.88263702],[-93.8937912,76.31923676],[-95.96246338,76.44139099],[-97.12128448,76.75108337],[-96.74510193,77.16136932],[-94.6840744,77.09789276],[-93.57390594,76.77629089],[-91.60494995,76.77851868],[-90.74179077,76.44957733],[-90.96955109,76.07401276],[-89.82215881,75.84776306],[-89.18707275,75.6101532],[-87.83824158,75.56620026],[-86.37911987,75.48243713],[-84.78960419,75.69918823],[-82.75339508,75.78431702],[-81.1284256,75.71396637],[-80.05748749,75.33683777],[-79.83390808,74.92311096],[-80.45775604,74.65731049],[-81.94874573,74.44245911],[-83.22888184,74.56404114],[-86.09737396,74.41002655],[-88.15029907,74.39230347],[-88.15029907,74.39230347]],[[-93.8399353,77.51999664],[-94.29556274,77.49134064],[-96.16958618,77.55510712],[-96.43625641,77.83466339],[-94.42251587,77.81999207],[-93.72063446,77.63435364],[-93.8399353,77.51999664],[-93.8399353,77.51999664]],[[-93.61269379,74.98000336],[-94.1568222,74.59234619],[-95.60861206,74.66687775],[-96.82091522,74.92764282],[-96.28855896,75.37780762],[-94.85071564,75.64720917],[-93.97770691,75.29650879],[-93.61269379,74.98000336],[-93.61269379,74.98000336]],[[-121.53780365,74.44892883],[-120.10970306,74.24134827],[-117.55556488,74.18576813],[-116.58440399,73.89607239],[-115.51079559,73.47518921],[-116.7678299,73.22292328],[-119.21994019,72.51999664],[-120.45992279,71.81999969],[-120.45992279,71.40000153],[-123.09213257,70.90164185],[-123.61998749,71.33999634],[-125.92894745,71.86868286],[-125.5927124,72.19451904],[-124.80721283,73.02256012],[-123.94000244,73.68000031],[-124.91770172,74.2927475],[-121.53780365,74.44892883],[-121.53780365,74.44892883],[-121.53780365,74.44892883]],[[-122.8549118,76.11653137],[-121.38990784,76.61467743],[-119.10393524,77.51222229],[-117.57012177,77.49832916],[-116.19850159,77.64528656],[-116.33570099,76.87696075],[-117.10599518,76.5300293],[-118.04039001,76.48116302],[-120.05999756,75.81999969],[-121.92024231,75.85829163],[-122.8549118,76.11653137],[-122.8549118,76.11653137],[-122.8549118,76.11653137]],[[-107.81936646,75.84552002],[-106.9288559,76.01281738],[-105.88096619,75.9693985],[-105.70493317,75.47950745],[-106.31336212,75.00527191],[-109.6999054,74.84999847],[-112.22297668,74.41696167],[-113.74373627,74.39427185],[-113.87132263,74.72029114],[-111.79416656,75.16249847],[-116.31217957,75.04342651],[-117.71037292,75.22219849],[-116.34599304,76.19902802],[-115.4048233,76.47886658],[-112.59046936,76.14134216],[-110.81420135,75.54918671],[-109.06705475,75.4732132],[-110.49724579,76.4298172],[-109.58100891,76.79416656],[-108.54857635,76.67832184],[-108.21131897,76.20168304],[-107.81936646,75.84552002],[-107.81936646,75.84552002],[-107.81936646,75.84552002]],[[-106.52257538,73.07601166],[-105.40235138,72.67259216],[-104.77484131,71.6984024],[-104.46468353,70.99297333],[-102.78530884,70.49775696],[-100.9807663,70.02432251],[-101.08917999,69.58447266],[-102.73111725,69.50402069],[-102.0932312,69.11962128],[-102.43023682,68.75282288],[-104.2399826,68.91000366],[-105.95992279,69.18000031],[-107.12245178,69.11921692],[-109.,68.77999878],[-111.96679688,68.60446167],[-113.31314087,68.53553772],[-113.85488129,69.00743866],[-116.10787964,69.16821289],[-117.3399353,69.95999908],[-116.67463684,70.06655121],[-115.13108826,70.23729706],[-113.72133636,70.19236755],[-112.41605377,70.36637878],[-114.3499527,70.59999847],[-116.48679352,70.52044678],[-117.9047699,70.54055786],[-118.43236542,70.90920258],[-116.11308289,71.30918121],[-117.6556015,71.29519653],[-119.40196228,71.55859375],[-118.56257629,72.3078537],[-117.86637115,72.70594025],[-115.18908691,73.31459045],[-114.16706085,73.12145233],[-114.66629791,72.652771],[-112.44094086,72.95539856],[-111.05031586,72.45040131],[-109.92034912,72.96112823],[-109.00652313,72.63334656],[-108.18824005,71.65088654],[-107.68595886,72.06548309],[-108.39633179,73.08953094],[-107.51638794,73.23597717],[-106.52257538,73.07601166],[-106.52257538,73.07601166],[-106.52257538,73.07601166]],[[-100.43834686,72.70587921],[-101.53995514,73.36000061],[-100.35634613,73.84388733],[-99.16376495,73.63339233],[-97.37989044,73.76000214],[-97.11998749,73.47000122],[-98.05358887,72.99051666],[-96.53995514,72.55999756],[-96.71994019,71.66000366],[-98.35958099,71.27285004],[-99.32276917,71.35639191],[-100.01472473,71.73827362],[-102.5,72.51000214],[-102.47995758,72.83000183],[-100.43834686,72.70587921],[-100.43834686,72.70587921],[-100.43834686,72.70587921]],[[-96.13990784,69.12999725],[-95.53026581,68.74765778],[-96.15207672,68.3970108],[-97.5,68.69999695],[-98.31438446,68.59066772],[-99.67998505,69.04000092],[-98.79997253,69.34999847],[-98.10079956,69.7835083],[-97.03995514,69.5],[-96.44000244,69.31999969],[-96.13990784,69.12999725],[-96.13990784,69.12999725]],[[-106.5999527,73.59999847],[-105.25989532,73.63999939],[-104.5,73.41999817],[-105.37989044,72.76000214],[-106.94000244,73.45999908],[-106.5999527,73.59999847],[-106.5999527,73.59999847]],[[-98.5,76.72000122],[-97.73548126,76.25656128],[-97.70439911,75.74343872],[-98.15994263,75.],[-99.80869293,74.89743805],[-100.88355255,75.05735779],[-100.86290741,75.64074707],[-102.50205994,75.563797],[-102.56546021,76.33660126],[-101.48963928,76.30536652],[-99.98342896,76.64633942],[-98.57694244,76.58859253],[-98.5,76.72000122],[-98.5,76.72000122]],[[-96.01639557,80.60233307],[-95.3234024,80.9072876],[-94.29837036,80.97727203],[-94.73540497,81.20645905],[-92.40973663,81.25739288],[-91.13285828,80.72344971],[-89.4499054,80.50932312],[-87.80999756,80.31999969],[-87.01992035,79.66000366],[-85.8143158,79.3368988],[-87.18756104,79.03929901],[-89.03533173,78.28723145],[-90.80428314,78.21533203],[-92.87660217,78.34333038],[-93.95106506,78.75099182],[-93.93572235,79.11373138],[-93.14516449,79.38009644],[-94.97399902,79.3724823],[-96.07608032,79.70501709],[-96.7097168,80.15776825],[-96.01639557,80.60233307],[-96.01639557,80.60233307]],[[-94.50366211,74.13490295],[-92.41996765,74.09999847],[-90.50972748,73.85671997],[-92.03995514,72.66999817],[-93.19628906,72.77200317],[-94.26904297,72.02458191],[-95.40985107,72.06188202],[-96.03364563,72.9402771],[-96.01822662,73.43743896],[-95.49578857,73.86239624],[-94.50366211,74.13490295],[-94.50366211,74.13490295],[-94.50366211,74.13490295]],[[-91.58692932,81.89428711],[-90.0999527,82.08499908],[-88.93223572,82.11750793],[-86.97019196,82.27960968],[-85.5,82.65227509],[-84.25989532,82.59999847],[-83.17998505,82.31999969],[-82.41996765,82.86000061],[-81.0999527,83.01999664],[-79.30664063,83.13056183],[-76.25,83.17205811],[-75.71871948,83.06404114],[-72.83143616,83.23323822],[-70.66565704,83.16978455],[-68.5,83.10632324],[-65.82731628,83.02800751],[-63.67998505,82.90000153],[-61.8499527,82.62860107],[-61.89384079,82.36164856],[-64.33396912,81.92774963],[-66.75341797,81.72527313],[-67.65751648,81.50141144],[-65.48026276,81.50656891],[-67.8399353,80.90000153],[-69.46962738,80.61682892],[-71.17998505,79.80000305],[-73.24279785,79.63414764],[-73.87989044,79.43016052],[-76.90769958,79.3230896],[-75.52922821,79.19766235],[-76.22045898,79.01907349],[-75.39341736,78.52581024],[-76.34347534,78.18296051],[-77.88846588,77.89990997],[-78.36264801,77.5085907],[-79.75941467,77.20967865],[-79.61960602,76.98336029],[-77.91088867,77.02204132],[-77.88909149,76.7779541],[-80.56118774,76.17812347],[-83.17436218,76.4540329],[-86.11179352,76.29901123],[-87.5999527,76.41999817],[-89.49064636,76.47238922],[-89.61608124,76.95213318],[-87.76728058,77.17832947],[-88.25989532,77.90000153],[-87.64992523,77.97022247],[-84.97629547,77.53872681],[-86.3399353,78.18000031],[-87.96190643,78.37181091],[-87.15197754,78.75866699],[-85.37864685,78.99690247],[-85.09487152,79.34542847],[-86.50730896,79.73623657],[-86.93173218,80.25144958],[-84.19841003,80.20835876],[-83.40868378,80.09999847],[-81.84818268,80.4644165],[-84.0999527,80.58000183],[-87.59892273,80.5162735],[-89.36652374,80.85569],[-90.1999054,81.26000214],[-91.36785889,81.55310059],[-91.58692932,81.89428711],[-91.58692932,81.89428711]],[[-96.75437927,78.76580811],[-94.99940491,78.49972534],[-95.27050781,78.13835144],[-97.30979156,77.85059357],[-98.12424469,78.08286285],[-98.55284119,78.45809174],[-98.63192749,78.87194061],[-97.33721924,78.83200073],[-96.75437927,78.76580811],[-96.75437927,78.76580811],[-96.75437927,78.76580811]],[[-75.21591187,67.44425201],[-75.86580658,67.14885712],[-76.986763,67.09873199],[-77.23638153,67.58808899],[-76.81163025,68.14855957],[-75.89519501,68.28720856],[-75.11450195,68.01036072],[-75.10333252,67.58202362],[-75.21591187,67.44425201],[-75.21591187,67.44425201],[-75.21591187,67.44425201]],[[-79.77580261,72.80290222],[-80.87609863,73.33318329],[-80.83383942,73.6931839],[-80.35299683,73.75971985],[-78.06434631,73.65193176],[-76.3399353,73.10268402],[-76.25140381,72.8263855],[-77.31434631,72.85554504],[-78.39165497,72.87665558],[-79.48616028,72.74220276],[-79.77580261,72.80290222],[-79.77580261,72.80290222]],[[-83.99363708,62.45280075],[-83.25037384,62.9140892],[-81.87691498,62.90457916],[-81.89813995,62.71080017],[-83.06851196,62.15922165],[-83.77457428,62.1823082],[-83.99363708,62.45280075],[-83.99363708,62.45280075]],[[-80.31534576,62.08556366],[-79.92937469,62.38560104],[-79.52001953,62.3637085],[-79.26579285,62.15867615],[-79.65742493,61.63307953],[-80.09953308,61.7181015],[-80.36209106,62.01649094],[-80.31534576,62.08556366],[-80.31534576,62.08556366]],[[-46.76373672,82.62796021],[-43.40642548,83.22515869],[-39.89751434,83.18018341],[-38.62212372,83.54904938],[-35.08784866,83.64512634],[-27.10043716,83.51966095],[-20.84537506,82.7266922],[-22.69181633,82.34165192],[-26.51750374,82.2976532],[-31.89998817,82.19999695],[-31.39644814,82.02153778],[-27.85665703,82.13178253],[-24.84445381,81.78697205],[-22.90326881,82.09317017],[-22.07174301,81.73448944],[-23.16959381,81.15270996],[-20.62362289,81.52462006],[-15.76816654,81.9124527],[-12.77017975,81.71884918],[-12.20854855,81.29154205],[-16.28531837,80.58003998],[-16.84998131,80.34999847],[-20.04622841,80.17707825],[-17.73034286,80.12911987],[-18.89998817,79.40000153],[-19.70498276,78.75128174],[-19.67351532,77.63858795],[-18.47282791,76.98564911],[-20.03500748,76.94434357],[-21.67941666,76.62795258],[-19.83405113,76.0980835],[-19.59894562,75.24838257],[-20.66815376,75.15585327],[-19.3727951,74.29560852],[-21.59419632,74.22382355],[-20.43453979,73.81713104],[-20.76231766,73.4643631],[-22.17221069,73.30954742],[-23.56590652,73.306633],[-22.31311035,72.62928009],[-22.29952049,72.18408966],[-24.27833176,72.5978775],[-24.79294777,72.3302002],[-23.44293404,72.08016205],[-22.13278389,71.46897888],[-21.75355148,70.66368866],[-23.53602219,70.47100067],[-24.30699348,70.85649109],[-25.54338264,71.43093872],[-25.20133018,70.7522583],[-26.36273384,70.22646332],[-23.72741318,70.18401337],[-22.34900856,70.1294632],[-25.02926254,69.25879669],[-27.74735069,68.47045898],[-30.67370224,68.12503052],[-31.77663422,68.12078094],[-32.8110199,67.73547363],[-34.20190811,66.67974091],[-36.35278702,65.97889709],[-37.04374313,65.93768311],[-38.37501144,65.69213104],[-39.81216812,65.45848083],[-40.66896057,64.83997345],[-40.68278885,64.13902283],[-41.18867874,63.48246002],[-42.8193512,62.68233109],[-42.41665268,61.9009285],[-42.86616898,61.07403946],[-43.37837601,60.0977211],[-44.7874527,60.03675842],[-46.26364136,60.85327911],[-48.26293945,60.85842896],[-49.23304367,61.40681076],[-49.90039063,62.38336182],[-51.6332283,63.62691116],[-52.1401329,64.27841949],[-52.27657318,65.17669678],[-53.66164398,66.09957123],[-53.30160141,66.83650208],[-53.96906281,67.18898773],[-52.98035431,68.35758972],[-51.47532272,68.72958374],[-51.0803566,69.14781189],[-50.87121201,69.92910004],[-52.01357651,69.57492828],[-52.55786514,69.42616272],[-53.45624542,69.28362274],[-54.68333817,69.61003113],[-54.74998856,70.2893219],[-54.35881042,70.82131195],[-53.43129349,70.83575439],[-51.3901329,70.56977844],[-53.10931778,71.20484924],[-54.0042038,71.54718781],[-55.,71.40653992],[-55.83463287,71.65444183],[-54.71815109,72.58625031],[-55.3263092,72.95861053],[-56.12002182,73.64977264],[-57.32358551,74.71025848],[-58.59675217,75.09860992],[-58.58512878,75.51727295],[-61.26856232,76.10237885],[-63.39161301,76.17520142],[-66.06427002,76.13485718],[-68.50428772,76.061409],[-69.66474152,76.37975311],[-71.40248108,77.00856781],[-68.77663422,77.32312012],[-66.76386261,77.37595367],[-71.04288483,77.63594818],[-73.29699707,78.04418945],[-73.15934753,78.43270874],[-69.37337494,78.91387939],[-65.71068573,79.3943634],[-65.32380676,79.75814056],[-68.0229187,80.11721039],[-67.15119934,80.51582336],[-63.68922806,81.21395874],[-62.23443222,81.32109833],[-62.65114594,81.77041626],[-60.28245163,82.03363037],[-57.20741653,82.19074249],[-54.13438034,82.19962311],[-53.0432663,81.88832855],[-50.39057922,82.43882751],[-48.00382996,82.06481171],[-46.59980774,81.98594666],[-44.52296066,81.66069794],[-46.90069199,82.19979095],[-46.76373672,82.62796021],[-46.76373672,82.62796021]],[[-64.51908875,49.87303925],[-64.17321777,49.95718002],[-62.85826111,49.70640945],[-61.83555603,49.28855133],[-61.80630493,49.10506058],[-62.29312515,49.08716965],[-63.5892067,49.40068817],[-64.51908875,49.87303925],[-64.51908875,49.87303925]],[[-64.01480103,47.03601074],[-63.6644783,46.55001068],[-62.93930054,46.41587067],[-62.01202774,46.44313812],[-62.50390244,46.03339005],[-62.87432861,45.96818161],[-64.14272308,46.3926506],[-64.39254761,46.7274704],[-64.01480103,47.03601074],[-64.01480103,47.03601074]]]}, -{code:"US", name:"United States", borders:[[[-72.29496765,41.27000046],[-72.87638092,41.22064972],[-73.70992279,40.93110275],[-72.24116516,41.11948013],[-71.94489288,40.93000031],[-73.34494019,40.63000107],[-73.981987,40.62799835],[-73.9522171,40.7507515],[-74.25659943,40.47351074],[-73.9623642,40.42763138],[-74.17830658,39.70925903],[-74.90597534,38.93954086],[-74.98040771,39.19639969],[-75.20000458,39.24845123],[-75.52797699,39.49850082],[-75.31989288,38.95999908],[-75.08345032,38.78120041],[-75.05667114,38.4041214],[-75.37741089,38.01551056],[-75.94013977,37.21688843],[-76.03122711,37.25659943],[-75.72203827,37.93704987],[-76.23282623,38.31921387],[-76.3499527,39.15000153],[-76.54272461,38.71761322],[-76.32923889,38.08325958],[-76.95992279,38.23288345],[-76.30152893,37.91794586],[-76.25871277,36.96640015],[-75.97180176,36.89725876],[-75.86804199,36.55125046],[-75.72746277,35.55073929],[-76.36313629,34.80854034],[-77.3975296,34.51200867],[-78.05490112,33.92546844],[-78.55429077,33.86132813],[-79.06066895,33.49394989],[-79.20353699,33.15839005],[-80.30121613,32.50935364],[-80.86487579,32.03329849],[-81.3361969,31.44049072],[-81.49041748,30.72999001],[-81.31360626,30.03552055],[-80.97995758,29.18000031],[-80.5355835,28.47212982],[-80.52993774,28.04000092],[-80.05649567,26.87999916],[-80.0880127,26.20576477],[-80.13150024,25.81677437],[-80.38093567,25.20615959],[-80.67998505,25.07999992],[-81.17211151,25.20125961],[-81.32991028,25.63999939],[-81.70992279,25.87000084],[-82.2399826,26.72999954],[-82.70513153,27.49504089],[-82.85518646,27.88624001],[-82.64992523,28.54999924],[-82.92998505,29.10000038],[-83.70948029,29.93655968],[-84.0999527,30.09000015],[-85.10871124,29.63615036],[-85.2878418,29.68611908],[-85.77304077,30.15261078],[-86.39992523,30.39999962],[-87.53031158,30.27433014],[-88.4177475,30.38489914],[-89.18047333,30.31598091],[-89.60491943,30.17635918],[-89.41365814,29.89418983],[-89.42998505,29.48863983],[-89.21763611,29.29108047],[-89.40817261,29.15961075],[-89.77919006,29.30714035],[-90.15457153,29.11742973],[-90.88014984,29.14853477],[-91.62675476,29.67700005],[-92.49898529,29.5522995],[-93.22626495,29.78375053],[-93.84835815,29.71363068],[-94.69000244,29.47999954],[-95.60018158,28.73863029],[-96.59394836,28.30747986],[-97.13990784,27.82999992],[-97.36998749,27.37999916],[-97.37989044,26.69000053],[-97.32991028,26.20999908],[-97.13990784,25.87000084],[-97.52993774,25.84000015],[-98.2399826,26.05999947],[-99.01992035,26.37000084],[-99.29997253,26.84000015],[-99.51992035,27.54000092],[-100.10997009,28.11000061],[-100.45578003,28.69611931],[-100.95755768,29.3807106],[-101.66230774,29.77930069],[-102.47995758,29.76000023],[-103.10997009,28.96999931],[-103.94000244,29.27000046],[-104.45697021,29.57196045],[-104.70574951,30.1217308],[-105.03733826,30.64402008],[-105.6315918,31.08382988],[-106.14286804,31.39995003],[-106.50754547,31.75452042],[-108.2399826,31.7548542],[-108.24194336,31.34222031],[-109.03494263,31.34193993],[-111.02350616,31.33472061],[-113.30488586,32.03913879],[-114.81500244,32.52528],[-114.72135925,32.72082901],[-115.99131775,32.61238861],[-117.12773132,32.53533936],[-117.29586029,33.0462265],[-117.94393921,33.62123489],[-118.41056824,33.74090958],[-118.51989746,34.02778244],[-119.08098602,34.07799911],[-119.43884277,34.34847641],[-120.36769104,34.44710922],[-120.62286377,34.60855103],[-120.7443161,35.15686035],[-121.71450806,36.16152954],[-122.54737854,37.55176163],[-122.51191711,37.78339005],[-122.95317841,38.1137085],[-123.72714233,38.95166016],[-123.86517334,39.76699066],[-124.39807129,40.3132019],[-124.17880249,41.14202118],[-124.21366882,41.99964142],[-124.53283691,42.76599121],[-124.14203644,43.70838165],[-123.89891815,45.5234108],[-124.07954407,46.86474991],[-124.39559174,47.72016907],[-124.68717957,48.18443298],[-124.56610107,48.37971497],[-123.11998749,48.04000092],[-122.58732605,47.09600067],[-122.3399353,47.36000061],[-122.5,48.18000031],[-122.8399353,49.],[-120.,49.],[-117.03116608,49.],[-116.04813385,49.],[-113.,49.],[-110.04997253,49.],[-107.04997253,49.],[-104.048172,48.99985886],[-100.64992523,49.],[-97.22867584,49.0007019],[-95.15904236,49.],[-95.15604401,49.38425064],[-94.81755066,49.38904953],[-94.63990784,48.84000015],[-94.32906342,48.67073822],[-93.63085175,48.60926056],[-92.60997009,48.45000076],[-91.63990784,48.13999939],[-90.82991028,48.27000046],[-89.5999527,48.00999832],[-90.42497253,47.73500824],[-90.61998749,47.68000031],[-91.32991028,47.27999878],[-92.00868225,46.85842133],[-92.01187134,46.71168137],[-91.00989532,46.91999817],[-90.33087158,46.49705505],[-89.3114624,46.79362869],[-88.82253265,47.15478134],[-87.93984985,47.48590851],[-88.26123047,46.95856094],[-87.69425964,46.83103943],[-86.9899826,46.45000076],[-86.10259247,46.67266083],[-85.11998749,46.75999832],[-84.90994263,46.47999954],[-84.60482025,46.4396019],[-84.3366394,46.40877151],[-83.8391571,46.01020813],[-84.71994019,45.91999817],[-84.94374084,45.95002747],[-85.53995514,46.02999878],[-86.31989288,45.83000183],[-87.,45.74000168],[-87.53917694,45.17393112],[-87.98823547,44.73331833],[-87.85274506,44.61503983],[-87.11802673,45.25933075],[-86.96744537,45.26287842],[-87.48629761,44.49335098],[-87.71221924,43.79650879],[-87.9020462,43.23051834],[-87.77672577,42.74087143],[-87.79560852,42.23411942],[-87.52606964,41.70851135],[-87.09439087,41.64617157],[-86.62184143,41.89442062],[-86.21595764,42.38169098],[-86.18839264,43.04140854],[-86.51992035,43.65999985],[-86.47026825,44.08422852],[-86.20935059,44.57477188],[-85.95972443,44.91059875],[-85.55999756,45.15000153],[-85.46699524,44.81459045],[-85.29036713,45.30826187],[-85.06989288,45.40999985],[-84.92998505,45.79000092],[-84.07991028,45.59000015],[-83.3399353,45.20000076],[-83.25878906,44.74571991],[-83.3499527,44.29000092],[-83.89992523,43.88999939],[-83.84867859,43.63830948],[-83.64992523,43.63000107],[-83.02993774,44.06999969],[-82.65994263,43.97000122],[-82.47995758,43.38999939],[-82.42998505,42.97999954],[-82.89992523,42.43000031],[-83.11998749,42.08000183],[-83.41996765,41.72999954],[-82.84604645,41.48711014],[-82.34737396,41.43590927],[-81.62343597,41.56893158],[-81.03118896,41.84550858],[-80.45462036,42.00437164],[-79.76209259,42.26961899],[-78.9005661,42.86671829],[-78.91996765,42.96500015],[-79.00989532,43.27000046],[-78.06989288,43.36999893],[-77.5999527,43.24000168],[-76.92998505,43.25999832],[-76.17998505,43.59000015],[-76.23924255,43.97914886],[-76.375,44.09630966],[-75.31814575,44.81644821],[-74.86688995,45.00048065],[-73.34772491,45.00738144],[-71.50495148,45.0082016],[-71.40493774,45.25500107],[-71.08473206,45.30524063],[-70.65994263,45.45999908],[-70.30498505,45.91500092],[-69.99990845,46.69306946],[-69.2371521,47.44778061],[-68.90493774,47.18500137],[-68.23442841,47.3548584],[-67.79035187,47.06636047],[-67.79129791,45.70280838],[-67.13736725,45.13753128],[-66.96466064,44.80970001],[-68.03242493,44.32519913],[-69.05999756,43.97999954],[-70.11612701,43.68405151],[-70.69000244,43.02999878],[-70.81487274,42.86529922],[-70.8249054,42.33499908],[-70.49498749,41.80500031],[-70.07991028,41.77999878],[-70.18499756,42.14500046],[-69.88492584,41.92282867],[-69.96502686,41.63716888],[-70.63990784,41.47499847],[-71.12033081,41.49444962],[-71.85997009,41.31999969],[-72.29496765,41.27000046],[-72.29496765,41.27000046]],[[-140.9859314,69.71199799],[-140.99237061,66.00003052],[-140.99757385,60.30638885],[-140.01287842,60.27682114],[-139.03887939,60.],[-138.34074402,59.5621109],[-137.45228577,58.90499878],[-136.47950745,59.46389008],[-135.47583008,59.78778076],[-134.94488525,59.27056122],[-134.27088928,58.86111069],[-133.3553772,58.41027832],[-132.73027039,57.69289017],[-131.7077179,56.55212021],[-130.00759888,55.9158287],[-129.97996521,55.28499985],[-130.53590393,54.80278015],[-131.08580017,55.17889023],[-131.96710205,55.49777985],[-132.25,56.36999893],[-133.53895569,57.17889023],[-134.07794189,58.12305832],[-135.03797913,58.18769836],[-136.6280365,58.21221924],[-137.79985046,58.5],[-139.86756897,59.53778076],[-140.82510376,59.72750092],[-142.57424927,60.08443832],[-143.95883179,59.9991684],[-145.92550659,60.45861053],[-147.114151,60.8846817],[-148.22418213,60.67301941],[-148.01806641,59.9783287],[-148.57077026,59.91416931],[-149.72770691,59.70563889],[-150.60806274,59.36822128],[-151.7162323,59.15583038],[-151.85931396,59.74499893],[-151.40962219,60.72583008],[-150.34690857,61.0336113],[-150.62107849,61.28443909],[-151.89567566,60.72721863],[-152.57817078,60.0616684],[-154.01916504,59.35028076],[-153.28744507,58.86471939],[-154.23234558,58.14638901],[-155.30749512,57.72777939],[-156.30812073,57.42277908],[-156.55595398,56.97999954],[-158.11715698,56.4636116],[-158.43312073,55.99417114],[-159.60321045,55.56666946],[-160.28962708,55.64360809],[-161.22299194,55.36471939],[-162.23756409,55.02416992],[-163.06922913,54.68972015],[-164.78549194,54.40417099],[-164.94206238,54.57221985],[-163.84820557,55.03944016],[-162.86999512,55.34806061],[-161.8039856,55.89500046],[-160.56358337,56.00806046],[-160.07055664,56.4180603],[-158.68421936,57.01667023],[-158.46101379,57.21694183],[-157.72277832,57.56999969],[-157.55006409,58.32833099],[-157.0415802,58.91889191],[-158.19468689,58.61582947],[-158.51719666,58.78778076],[-159.05857849,58.42417145],[-159.71166992,58.93138885],[-159.98112488,58.57255936],[-160.35516357,59.07110977],[-161.35496521,58.67082977],[-161.96885681,58.67166901],[-162.05487061,59.26694107],[-161.87411499,59.63360977],[-162.51806641,59.98971939],[-163.81814575,59.79806137],[-164.66200256,60.26750183],[-165.34623718,60.50749969],[-165.35083008,61.07389069],[-166.12129211,61.5],[-165.73431396,62.07500076],[-164.91896057,62.63306046],[-164.5625,63.14638901],[-163.75326538,63.21944046],[-163.06706238,63.05944061],[-162.26043701,63.54193878],[-161.53440857,63.45582962],[-160.77241516,63.76610947],[-160.95817566,64.22277832],[-161.51806641,64.40277863],[-160.77763367,64.78861237],[-161.39175415,64.77722168],[-162.45294189,64.55944061],[-162.75759888,64.33860779],[-163.54638672,64.55917358],[-164.96080017,64.44693756],[-166.42506409,64.6866684],[-166.84494019,65.08889008],[-168.11038208,65.66999817],[-166.7051239,66.08833313],[-164.47450256,66.57666779],[-163.6524353,66.57666779],[-163.7885437,66.0772171],[-161.6776886,66.11611176],[-162.48953247,66.73555756],[-163.71972656,67.11638641],[-164.43083191,67.61634827],[-165.39024353,68.04277802],[-166.76437378,68.35888672],[-166.20469666,68.88305664],[-164.43075562,68.9155426],[-163.16854858,69.37110901],[-162.93052673,69.85806274],[-161.90873718,70.33332825],[-160.93460083,70.44767761],[-159.03895569,70.89167023],[-158.11953735,70.82472229],[-156.58079529,71.35778046],[-155.06771851,71.14778137],[-154.34405518,70.69638824],[-153.89981079,70.88999939],[-152.20991516,70.83000183],[-152.26979065,70.59999847],[-150.73997498,70.43000031],[-149.71994019,70.52999878],[-147.61320496,70.2140274],[-145.68988037,70.12000275],[-144.91984558,69.98999786],[-143.58926392,70.15249634],[-142.07228088,69.85193634],[-140.9859314,69.71199799],[-140.9859314,69.71199799]],[[-171.73146057,63.78250122],[-171.11431885,63.59222031],[-170.49107361,63.69499969],[-169.68249512,63.43111038],[-168.68922424,63.29750061],[-168.77175903,63.18861008],[-169.52940369,62.97694016],[-170.29049683,63.19443893],[-170.67138672,63.3758316],[-171.55290222,63.31777954],[-171.79092407,63.40583038],[-171.73146057,63.78250122],[-171.73146057,63.78250122]],[[-153.22853088,57.96900177],[-152.56459045,57.90145111],[-152.14108276,57.59107971],[-153.00613403,57.11584091],[-154.00491333,56.73468018],[-154.51631165,56.99274826],[-154.67080688,57.46118927],[-153.76260376,57.81658173],[-153.22853088,57.96900177],[-153.22853088,57.96900177]],[[-166.46777344,60.38417053],[-165.67443848,60.29360962],[-165.57904053,59.90999985],[-166.19271851,59.75444031],[-166.84820557,59.94139099],[-167.4551239,60.21305847],[-166.46777344,60.38417053],[-166.46777344,60.38417053]],[[-155.40205383,20.07975006],[-155.22445679,19.9930191],[-155.06225586,19.85910034],[-154.80734253,19.50871086],[-154.83137512,19.4532795],[-155.22216797,19.23971939],[-155.54211426,19.08348083],[-155.68804932,18.91618919],[-155.93664551,19.05938911],[-155.90785217,19.33888054],[-156.07325745,19.70293999],[-156.02368164,19.81422043],[-155.84986877,19.9772892],[-155.91906738,20.1739502],[-155.86108398,20.26721001],[-155.78501892,20.24869919],[-155.40205383,20.07975006],[-155.40205383,20.07975006]],[[-155.99554443,20.76403999],[-156.07919312,20.64397049],[-156.41441345,20.57241058],[-156.58660889,20.78300095],[-156.7016449,20.86429977],[-156.71034241,20.92675972],[-156.61251831,21.01248932],[-156.25704956,20.91744995],[-155.99554443,20.76403999],[-155.99554443,20.76403999]],[[-156.75811768,21.17683983],[-156.78927612,21.0687294],[-157.32518005,21.09777069],[-157.25021362,21.2195797],[-156.75811768,21.17683983],[-156.75811768,21.17683983]],[[-158.02508545,21.71696091],[-157.94145203,21.6527195],[-157.65283203,21.32217026],[-157.70703125,21.26441956],[-157.77853394,21.27729034],[-158.12651062,21.31244087],[-158.25376892,21.53919029],[-158.29255676,21.57912064],[-158.02508545,21.71696091],[-158.02508545,21.71696091]],[[-159.36550903,22.21493912],[-159.34506226,21.98200035],[-159.46353149,21.88298988],[-159.80032349,22.06533051],[-159.74855042,22.13820076],[-159.59617615,22.23617935],[-159.36550903,22.21493912],[-159.36550903,22.21493912]]]}, -{code:"MX", name:"Mexico", borders:[[[-97.13990784,25.87000084],[-97.52796173,24.99213982],[-97.70294189,24.27234077],[-97.7759552,22.93258095],[-97.87226868,22.44421959],[-97.69902039,21.89868927],[-97.38887024,21.41101074],[-97.18932343,20.63544083],[-96.52557373,19.89093971],[-96.29209137,19.32037926],[-95.90087891,18.8280201],[-94.8390274,18.56271935],[-94.42569733,18.14438057],[-93.54862976,18.42383957],[-92.78603363,18.5248394],[-92.03734589,18.70457077],[-91.40788269,18.87607956],[-90.7718277,19.28412056],[-90.53356171,19.8674202],[-90.45136261,20.70752907],[-90.27851868,20.99983978],[-89.60131836,21.26173019],[-88.54377747,21.49367905],[-87.65835571,21.45885086],[-87.05187988,21.54355049],[-86.81192017,21.33152008],[-86.84587097,20.84985924],[-87.3832016,20.25542068],[-87.6210022,19.64656067],[-87.43667603,19.47238922],[-87.58652496,19.04013062],[-87.83713531,18.25980949],[-88.09061432,18.51663971],[-88.29995728,18.49999046],[-88.49010468,18.48682976],[-88.84831238,17.88319016],[-89.02984619,18.00152016],[-89.15084839,17.95545959],[-89.14306641,17.80830956],[-90.0679245,17.81932068],[-91.00141907,17.81760025],[-91.0022583,17.25465012],[-91.45391846,17.25218964],[-91.08165741,16.91847038],[-90.71176147,16.68748093],[-90.60082245,16.47076988],[-90.43881226,16.41012001],[-90.46447754,16.0695591],[-91.74788666,16.06657982],[-92.22924805,15.25144005],[-92.0871048,15.06459045],[-92.20314026,14.8301096],[-92.22768402,14.5388298],[-93.35940552,15.61544037],[-93.87518311,15.94017982],[-94.69165039,16.20099068],[-95.25013733,16.12833023],[-96.05329895,15.75207996],[-96.55731964,15.65351009],[-97.26351166,15.91707993],[-98.0129776,16.10732079],[-98.94769287,16.56604004],[-99.69736481,16.70618057],[-100.829422,17.1710701],[-101.6660614,17.64901924],[-101.91850281,17.91609001],[-102.47803497,17.97574997],[-103.5009613,18.29229927],[-103.91744232,18.74856949],[-104.99188995,19.31612968],[-105.49304199,19.94676971],[-105.73136902,20.43411064],[-105.39765167,20.53170967],[-105.50067139,20.81689072],[-105.27064514,21.07629013],[-105.26580811,21.4221096],[-105.60312653,21.87114906],[-105.69330597,22.26907921],[-106.02866364,22.77375984],[-106.90997314,23.7677803],[-107.9153595,24.54891968],[-108.40180969,25.17233086],[-109.26019287,25.58060074],[-109.44408417,25.82489014],[-109.29161072,26.4429493],[-109.80144501,26.67617035],[-110.39172363,27.16210938],[-110.64097595,27.85987091],[-111.17887878,27.94125938],[-111.75956726,28.46795082],[-112.22818756,28.95439911],[-112.27175903,29.26683044],[-112.80953979,30.02109909],[-113.16371155,30.78688049],[-113.14868164,31.17098045],[-113.8717804,31.56760979],[-114.20565033,31.52404976],[-114.77640533,31.79953957],[-114.9365921,31.39348984],[-114.77112579,30.91361046],[-114.67388916,30.16268921],[-114.33088684,29.75041962],[-113.58885193,29.06162071],[-113.42398071,28.82616997],[-113.27196503,28.75477982],[-113.13999939,28.41128922],[-112.96225739,28.42518044],[-112.76148224,27.78021049],[-112.45785522,27.52581024],[-112.24491882,27.17173958],[-111.61643219,26.66282082],[-111.28465271,25.73258972],[-110.98775482,25.29460907],[-110.70992279,24.82600021],[-110.65499878,24.29858971],[-110.17285156,24.26553917],[-109.77173615,23.81118011],[-109.40901184,23.36466026],[-109.43331146,23.18559074],[-109.85414124,22.81826973],[-110.03135681,22.82307053],[-110.29502869,23.43096924],[-110.94942474,24.00094986],[-111.67050171,24.48443031],[-112.18197632,24.73842049],[-112.14887238,25.47014046],[-112.30062103,26.01198959],[-112.77727509,26.32196045],[-113.46465302,26.76819038],[-113.59674072,26.63945007],[-113.84892273,26.90004921],[-114.4656601,27.14208984],[-115.05509186,27.72273064],[-114.98221588,27.79820061],[-114.57026672,27.74148941],[-114.19924164,28.11500931],[-114.16195679,28.56611061],[-114.93180847,29.27947044],[-115.51856995,29.55636024],[-115.88729858,30.18079948],[-116.25826263,30.83646011],[-116.72146606,31.63573074],[-117.12773132,32.53533936],[-115.99131775,32.61238861],[-114.72135925,32.72082901],[-114.81500244,32.52528],[-113.30488586,32.03913879],[-111.02350616,31.33472061],[-109.03494263,31.34193993],[-108.24194336,31.34222031],[-108.2399826,31.7548542],[-106.50754547,31.75452042],[-106.14286804,31.39995003],[-105.6315918,31.08382988],[-105.03733826,30.64402008],[-104.70574951,30.1217308],[-104.45697021,29.57196045],[-103.94000244,29.27000046],[-103.10997009,28.96999931],[-102.47995758,29.76000023],[-101.66230774,29.77930069],[-100.95755768,29.3807106],[-100.45578003,28.69611931],[-100.10997009,28.11000061],[-99.51992035,27.54000092],[-99.29997253,26.84000015],[-99.01992035,26.37000084],[-98.2399826,26.05999947],[-97.52993774,25.84000015],[-97.13990784,25.87000084],[-97.13990784,25.87000084]]]}, -{code:"BS", name:"Bahamas", borders:[[[-78.97995758,26.79000092],[-78.50989532,26.87000084],[-77.8499527,26.84000015],[-77.81989288,26.57999992],[-78.90994263,26.42000008],[-78.97995758,26.79000092],[-78.97995758,26.79000092]],[[-77.78995514,27.04000092],[-77.,26.59000015],[-77.17254639,25.87918091],[-77.35636139,26.00735092],[-77.3399353,26.53000069],[-77.78791046,26.92515945],[-77.78995514,27.04000092],[-77.78995514,27.04000092]],[[-78.19084167,25.21030045],[-77.88990784,25.17000008],[-77.53995514,24.34000015],[-77.53455353,23.75975037],[-77.77993774,23.70999908],[-78.03394318,24.28614998],[-78.40841675,24.57563972],[-78.19084167,25.21030045],[-78.19084167,25.21030045]],[[-77.54997253,25.10000038],[-77.31441498,25.12641716],[-77.25989532,24.95999908],[-77.49531555,24.99514008],[-77.54997253,25.10000038],[-77.54997253,25.10000038]],[[-73.71994019,21.],[-73.4899826,21.22999954],[-72.9499054,21.35000038],[-73.13990784,20.92000008],[-73.65978241,20.90834045],[-73.71994019,21.],[-73.71994019,21.]]]}, -{code:"TT", name:"Trinidad and Tobago", borders:[[[-61.67998505,10.76000023],[-61.1049614,10.89000034],[-60.89497757,10.85499954],[-60.93499374,10.10999966],[-61.76997757,10.],[-61.94996262,10.09000015],[-61.65994644,10.36499977],[-61.67998505,10.76000023],[-61.67998505,10.76000023]],[[-60.62714386,11.3036499],[-60.58170319,11.3240099],[-60.51945877,11.33148956],[-60.52743149,11.26305962],[-60.54525375,11.24407959],[-60.63713074,11.19157982],[-60.71359634,11.17098045],[-60.75773239,11.14824009],[-60.79124069,11.1444397],[-60.84399796,11.15579987],[-60.81676483,11.1842804],[-60.76308441,11.21304035],[-60.72385406,11.2593298],[-60.67376328,11.28092003],[-60.62714386,11.3036499],[-60.62714386,11.3036499]]]}, -{code:"GD", name:"Grenada", borders:[[[-61.69495392,12.27499962],[-61.52999878,12.22999954],[-61.64998627,11.93500042],[-61.86497879,11.97999954],[-61.76496887,12.21500015],[-61.69495392,12.27499962],[-61.69495392,12.27499962]]]}, -{code:"VC", name:"St. Vincent and the Grenadines", borders:[[[-61.2249527,13.39999962],[-61.07997131,13.39999962],[-61.10997009,13.09500027],[-61.25494766,13.04500008],[-61.32997131,13.23999977],[-61.2249527,13.39999962],[-61.2249527,13.39999962]]]}, -{code:"BB", name:"Barbados", borders:[[[-59.6049614,13.35000038],[-59.34500122,13.10999966],[-59.53494644,12.98999977],[-59.70497131,13.07499981],[-59.68499374,13.35000038],[-59.6049614,13.35000038],[-59.6049614,13.35000038]]]}, -{code:"LC", name:"St. Lucia", borders:[[[-61.00996017,14.16499996],[-60.8499527,14.10000038],[-60.89998627,13.68500042],[-61.09500122,13.77499962],[-61.06494522,14.05500031],[-61.00996017,14.16499996],[-61.00996017,14.16499996]]]}, -{code:"MQ", name:"Martinique", borders:[[[-61.17998505,14.90999985],[-60.8549614,14.77999973],[-60.78995514,14.46500015],[-60.86497879,14.35499954],[-61.11497879,14.45499992],[-61.25494766,14.84500027],[-61.17998505,14.90999985],[-61.17998505,14.90999985]]]}, -{code:"DM", name:"Dominica", borders:[[[-61.51496887,15.64999962],[-61.31995392,15.64500046],[-61.25,15.56499958],[-61.20497131,15.24499989],[-61.375,15.19499969],[-61.52999878,15.52499962],[-61.51496887,15.64999962],[-61.51496887,15.64999962]]]}, -{code:"GP", name:"Guadeloupe", borders:[[[-61.77061844,16.37121964],[-61.62494278,16.33366585],[-61.55498505,16.48999977],[-61.44996262,16.54999924],[-61.15499878,16.26499939],[-61.47000122,16.15999985],[-61.69996262,15.93000031],[-61.80498505,16.02499962],[-61.83999252,16.29000092],[-61.77061844,16.37121964],[-61.77061844,16.37121964]]]}, -{code:"AG", name:"Antigua and Barbuda", borders:[[[-61.92497635,17.11000061],[-61.81995392,17.18499947],[-61.63496017,17.09000015],[-61.70497131,16.98500061],[-61.8699913,16.98500061],[-61.92497635,17.11000061],[-61.92497635,17.11000061]],[[-61.79993439,17.58296967],[-61.86922455,17.61264992],[-61.84949493,17.70961952],[-61.83624649,17.74283028],[-61.78576279,17.71640968],[-61.74259949,17.67572021],[-61.72431946,17.62879944],[-61.73457718,17.56144905],[-61.79993439,17.58296967],[-61.79993439,17.58296967]]]}, -{code:"KN", name:"St. Kitts and Nevis", borders:[[[-62.89397812,17.41962051],[-62.85997009,17.47999954],[-62.65994644,17.39999962],[-62.6049614,17.26499939],[-62.66996765,17.22999954],[-62.85997009,17.30999947],[-62.89397812,17.41962051],[-62.89397812,17.41962051]]]}, -{code:"AR", name:"Argentina", borders:[[[-66.95987701,-54.89677048],[-66.4499054,-55.25],[-65.5,-55.19996262],[-65.04997253,-54.69996262],[-66.4499054,-54.44996262],[-67.75,-53.8499527],[-68.25,-53.0999527],[-68.63393402,-52.63633347],[-68.633255,-54.86945343],[-67.56243896,-54.86997986],[-66.95987701,-54.89677048],[-66.95987701,-54.89677048]],[[-67.10657501,-22.73590279],[-66.98522186,-22.98631668],[-67.32842255,-24.02527809],[-68.41756439,-24.51856995],[-68.38596344,-26.18499565],[-68.5947876,-26.50687408],[-68.2955246,-26.89932632],[-69.00119019,-27.52116776],[-69.65611267,-28.45909309],[-70.0135498,-29.36789894],[-69.91900635,-30.33632851],[-70.53501129,-31.36499023],[-70.07440186,-33.0912056],[-69.81472778,-33.27389145],[-69.81721497,-34.19353485],[-70.38796234,-35.16966629],[-70.36472321,-36.00509262],[-71.12177277,-36.65808487],[-71.11857605,-37.57678604],[-70.81461334,-38.55300903],[-71.41351318,-38.91600037],[-71.68070221,-39.80816269],[-71.91570282,-40.83228302],[-71.74671936,-42.05138397],[-72.14881897,-42.25485611],[-71.91538239,-43.40855026],[-71.46405029,-43.78758621],[-71.79354858,-44.20713806],[-71.3297348,-44.40753174],[-71.22277832,-44.78419113],[-71.6592865,-44.97364807],[-71.55200195,-45.56068802],[-71.91721344,-46.88485336],[-72.44729614,-47.73851013],[-72.33106995,-48.24418259],[-72.64814758,-48.87863159],[-73.41538239,-49.31845093],[-73.32794952,-50.37872696],[-72.97567749,-50.74139786],[-72.30990601,-50.67697525],[-72.32929993,-51.42590714],[-71.91478729,-52.00899506],[-69.49835205,-52.1427536],[-68.63407898,-52.2988739],[-68.14992523,-52.3499527],[-68.81554413,-51.77103424],[-69.13845062,-50.73246765],[-68.72864532,-50.26419067],[-67.81598663,-49.86964798],[-67.16609192,-48.69735336],[-65.98500061,-48.13325882],[-65.64095306,-47.2361412],[-66.59703064,-47.03384781],[-67.58046722,-46.30173492],[-67.29374695,-45.55183029],[-66.50992584,-45.03960419],[-65.56521606,-45.03672791],[-65.3287735,-44.5013237],[-65.18172455,-43.49538422],[-64.37876892,-42.87355042],[-63.45801544,-42.56314087],[-63.75590134,-42.04362106],[-64.30329132,-42.35896683],[-64.97846222,-42.05792618],[-65.11793518,-41.06433105],[-64.73201752,-40.80261612],[-63.77046585,-41.16680908],[-62.74576569,-41.02869415],[-62.14595032,-40.67687988],[-62.33048248,-40.17253113],[-62.12570572,-39.42406464],[-62.3359642,-38.82772827],[-61.23741531,-38.92840195],[-59.23182297,-38.72018051],[-57.74913025,-38.18385696],[-56.78826904,-36.90153885],[-56.73747635,-36.41309357],[-57.36231232,-35.97733307],[-57.22583008,-35.28797913],[-58.49540329,-34.43148422],[-58.42704773,-33.90939713],[-58.34959793,-33.26313782],[-58.13261795,-33.04058838],[-58.14241028,-32.04447937],[-57.87488556,-31.01654053],[-57.62506485,-30.21628761],[-56.29083633,-28.85274506],[-55.16224289,-27.88192558],[-54.49066544,-27.47472382],[-53.64868546,-26.9234848],[-53.62831116,-26.12487602],[-54.13003159,-25.54759407],[-54.6252594,-25.73924637],[-54.78878403,-26.62181091],[-55.69581223,-27.38782501],[-56.48667908,-27.54849625],[-57.60972214,-27.3958683],[-58.61815643,-27.12371635],[-57.63361359,-25.60366631],[-57.77721405,-25.16234779],[-58.80712891,-24.77144814],[-60.02896118,-24.0327816],[-60.84654617,-23.88071442],[-62.68500519,-22.24901772],[-62.84645081,-22.03497696],[-63.98679352,-21.99363327],[-64.37700653,-22.79808235],[-64.9648056,-22.07583237],[-66.27329254,-21.83229256],[-67.10657501,-22.73590279],[-67.10657501,-22.73590279]]]}, -{code:"CL", name:"Chile", borders:[[[-68.633255,-54.86945343],[-68.63407898,-52.6362114],[-69.34563446,-52.51826096],[-70.26743317,-52.93119812],[-70.59169006,-53.61579895],[-71.10772705,-54.07429123],[-72.43410492,-53.71538544],[-73.83805084,-53.0474205],[-74.66242218,-52.83743668],[-73.28511047,-53.95751953],[-72.2638092,-54.4950943],[-71.00567627,-55.05377579],[-69.95804596,-55.19842148],[-69.23200989,-55.49904633],[-68.14861298,-55.61180115],[-67.29100037,-55.30123901],[-66.95987701,-54.89677048],[-67.56243896,-54.86997986],[-68.633255,-54.86945343],[-68.633255,-54.86945343]],[[-75.60803223,-48.67371368],[-75.47973633,-50.37834549],[-74.97661591,-51.04334259],[-75.26000977,-51.62927628],[-74.94667816,-52.26274872],[-73.70275116,-52.83502579],[-72.5579071,-53.531353],[-71.42971039,-53.85638809],[-71.0062561,-53.83324432],[-70.84509277,-52.89915085],[-69.94271088,-52.5378952],[-69.46120453,-52.29191208],[-68.63407898,-52.2988739],[-69.49835205,-52.1427536],[-71.91478729,-52.00899506],[-72.32929993,-51.42590714],[-72.30990601,-50.67697525],[-72.97567749,-50.74139786],[-73.32794952,-50.37872696],[-73.41538239,-49.31845093],[-72.64814758,-48.87863159],[-72.33106995,-48.24418259],[-72.44729614,-47.73851013],[-71.91721344,-46.88485336],[-71.55200195,-45.56068802],[-71.6592865,-44.97364807],[-71.22277832,-44.78419113],[-71.3297348,-44.40753174],[-71.79354858,-44.20713806],[-71.46405029,-43.78758621],[-71.91538239,-43.40855026],[-72.14881897,-42.25485611],[-71.74671936,-42.05138397],[-71.91570282,-40.83228302],[-71.68070221,-39.80816269],[-71.41351318,-38.91600037],[-70.81461334,-38.55300903],[-71.11857605,-37.57678604],[-71.12177277,-36.65808487],[-70.36472321,-36.00509262],[-70.38796234,-35.16966629],[-69.81721497,-34.19353485],[-69.81472778,-33.27389145],[-70.07440186,-33.0912056],[-70.53501129,-31.36499023],[-69.91900635,-30.33632851],[-70.0135498,-29.36789894],[-69.65611267,-28.45909309],[-69.00119019,-27.52116776],[-68.2955246,-26.89932632],[-68.5947876,-26.50687408],[-68.38596344,-26.18499565],[-68.41756439,-24.51856995],[-67.32842255,-24.02527809],[-66.98522186,-22.98631668],[-67.10657501,-22.73590279],[-67.82807159,-22.87288857],[-68.21990967,-21.49433708],[-68.7571106,-20.37266159],[-68.44217682,-19.40506935],[-68.96677399,-18.98165703],[-69.10018158,-18.26010323],[-69.59036255,-17.58001328],[-69.85834503,-18.09267426],[-70.37255096,-18.34794235],[-70.1643219,-19.75646973],[-70.09113312,-21.39329147],[-70.09113312,-21.39331055],[-70.40390015,-23.62897491],[-70.72489166,-25.70592499],[-70.90505219,-27.64036179],[-71.48984528,-28.86141968],[-71.37002563,-30.09565544],[-71.66869354,-30.92061806],[-71.43839264,-32.41882706],[-71.86164856,-33.90911865],[-72.55307007,-35.50880051],[-73.16666412,-37.1237793],[-73.58796692,-37.15626144],[-73.50554657,-38.28281403],[-73.21759033,-39.2586441],[-73.67702484,-39.94219971],[-74.01793671,-41.7947998],[-74.33187866,-43.22488785],[-73.70124817,-43.36574554],[-73.3888092,-42.11750793],[-72.71775055,-42.38334274],[-73.24024963,-44.4549408],[-74.35166931,-44.10297394],[-74.69211578,-45.76395416],[-75.64440918,-46.64762878],[-74.12658691,-46.93922043],[-75.18270111,-47.71190643],[-75.60803223,-48.67371368],[-75.60803223,-48.67371368]]]}, -{code:"FK", name:"Falkland Islands", borders:[[[-61.19996262,-51.8499527],[-60.,-51.25],[-59.14998627,-51.5],[-58.54997635,-51.0999527],[-57.75,-51.54997635],[-58.04997635,-51.89998627],[-59.39998627,-52.19996262],[-59.8499527,-51.8499527],[-60.69996262,-52.29997635],[-61.19996262,-51.8499527],[-61.19996262,-51.8499527]]]}, -{code:"PW", name:"Palau", borders:[[[134.52000427,7.3579998],[134.48199463,7.43599987],[134.51400757,7.53399992],[134.55599976,7.59200001],[134.5980072,7.60599995],[134.63999939,7.73500013],[134.664505,7.73050022],[134.67199707,7.546],[134.59100342,7.33599997],[134.52000427,7.3579998],[134.52000427,7.3579998]]]}, -{code:"MU", name:"Mauritius", borders:[[[57.30500031,-20.47999191],[57.41334915,-20.19999313],[57.54999924,-19.9949894],[57.6713295,-20.01499939],[57.79000092,-20.32997322],[57.59000015,-20.50521851],[57.30500031,-20.47999191],[57.30500031,-20.47999191]]]}, -{code:"KM", name:"Comoros", borders:[[[43.25999832,-11.39998817],[43.33000183,-11.35998631],[43.40999985,-11.41999626],[43.51499939,-11.89499283],[43.45000076,-11.9349947],[43.21500015,-11.77498817],[43.25111008,-11.5599947],[43.25999832,-11.39998817],[43.25999832,-11.39998817]]]}, -{code:"ST", name:"Sao Tome and Principe", borders:[[[6.48815012,0.30373999],[6.66039991,0.41154],[6.72692013,0.36230499],[6.75590992,0.23084],[6.52489519,0.022285],[6.48815012,0.30373999],[6.48815012,0.30373999]],[[7.36855984,1.67329001],[7.40679979,1.69839001],[7.45403004,1.69011998],[7.46337986,1.62978005],[7.4300499,1.55615997],[7.40572977,1.53224003],[7.32442999,1.60714996],[7.36855984,1.67329001],[7.36855984,1.67329001]]]}, -{code:"GQ", name:"Equatorial Guinea", borders:[[[8.93010044,3.74489999],[8.96131039,3.65250993],[8.81480026,3.40498996],[8.77760983,3.30537009],[8.69336987,3.2009201],[8.48295975,3.24617004],[8.42385006,3.3448],[8.46310043,3.4519701],[8.61997032,3.56682992],[8.63560009,3.6791501],[8.74991989,3.77311993],[8.93010044,3.74489999],[8.93010044,3.74489999]],[[9.49287033,1.01011002],[9.30564022,1.16094005],[9.64918041,2.28385997],[11.27643013,2.26104999],[11.28509045,1.05764997],[9.83028984,1.06791997],[9.49287033,1.01011002],[9.49287033,1.01011002]]]}, -{code:"CV", name:"Cape Verde", borders:[[[-25.00998878,17.19000053],[-24.92998505,17.0526104],[-25.21248817,16.91749954],[-25.31748009,16.92207909],[-25.3699894,17.08466911],[-25.00998878,17.19000053],[-25.00998878,17.19000053]],[[-23.79997635,15.0616703],[-23.77999687,15.35542011],[-23.69999313,15.375],[-23.3699894,15.00292015],[-23.43997383,14.90499973],[-23.57997322,14.90499973],[-23.79997635,15.0616703],[-23.79997635,15.0616703]]]}, -{code:"CN", name:"China", borders:[[[91.69667816,27.7717495],[91.25888062,28.04060936],[90.7305069,28.0649395],[90.01586151,28.29644012],[89.47579193,28.04276085],[88.81426239,27.29932022],[88.7303009,28.08687973],[88.12045288,27.87655067],[86.95448303,27.97425079],[85.823349,28.20358086],[85.01164246,28.64277077],[84.23458862,28.83987999],[83.8989563,29.32023048],[83.33711243,29.46372986],[82.32749939,30.11527061],[81.52581787,30.42271042],[81.11122894,30.18349075],[79.72135162,30.88273048],[78.73889923,31.51589966],[78.45842743,32.61817932],[79.17611694,32.48377991],[79.20889282,32.99440002],[78.81108856,33.50619125],[78.91227722,34.32192993],[77.83746338,35.49401855],[76.19284058,35.89839935],[75.89691162,36.66680908],[75.15802002,37.13302994],[74.98000336,37.41999817],[74.83000183,37.99000168],[74.86483765,38.37884903],[74.25750732,38.60649872],[73.92886353,38.50582886],[73.67537689,39.43125153],[73.95999908,39.65999985],[73.82225037,39.89397049],[74.77684021,40.36642838],[75.46782684,40.56206894],[76.52635956,40.42795181],[76.90445709,41.06647873],[78.18720245,41.18531036],[78.54369354,41.58224106],[80.11943817,42.12395096],[80.26000214,42.34999847],[80.18012238,42.92007065],[80.86618042,43.18038177],[79.96611023,44.9175415],[81.94705963,45.31700897],[82.4589386,45.53963852],[83.18047333,47.3300209],[85.16428375,47.0009613],[85.72049713,47.45298004],[85.76822662,48.45576859],[86.59879303,48.54917145],[87.36000061,49.21500015],[87.75128937,49.29719925],[88.01381683,48.59947968],[88.85428619,48.06908035],[90.28085327,47.69355011],[90.97080231,46.88813019],[90.58576965,45.71971893],[90.94553375,45.28606033],[92.1339035,45.11508179],[93.48069763,44.9754715],[94.68895721,44.35232925],[95.3068924,44.24132156],[95.76249695,43.31945038],[96.34938812,42.72563171],[97.45175171,42.74887848],[99.51583862,42.52468872],[100.84584045,42.66381073],[101.83305359,42.51488113],[103.31230927,41.90747833],[104.52227783,41.90835953],[104.9650116,41.59741974],[106.12931824,42.13431931],[107.74476624,42.48152161],[109.24362946,42.5194397],[110.412117,42.87123108],[111.12969208,43.40684128],[111.82962036,43.74312973],[111.66770172,44.07318115],[111.34838867,44.45746994],[111.87333679,45.1020813],[112.43609619,45.01165009],[113.46392059,44.80891037],[114.46035004,45.33983994],[115.98510742,45.72721863],[116.71787262,46.38819885],[117.42173767,46.67272949],[118.87431335,46.80540848],[119.66326141,46.69268036],[119.77281952,47.04806137],[118.86663055,47.74705124],[118.06414032,48.0667305],[117.29551697,47.69770813],[116.30893707,47.85340881],[115.74285889,47.72655106],[115.48532104,48.13537979],[116.19178009,49.13460159],[116.6787796,49.88856125],[117.87924194,49.51100159],[119.28842926,50.14287949],[119.27938843,50.58292007],[120.18208313,51.64355087],[120.73819733,51.96411133],[120.72576904,52.51623917],[120.17710114,52.75391006],[121.00306702,53.25139999],[122.24575806,53.43172836],[123.57147217,53.45880127],[125.06820679,53.16104889],[125.94638062,52.79280853],[126.56443024,51.7842598],[126.93914795,51.35388947],[127.2874527,50.73981094],[127.65740204,49.76026917],[129.39782715,49.44060135],[130.58229065,48.72969055],[130.98725891,47.79013062],[132.50668335,47.7889595],[133.37356567,48.18344116],[135.02632141,48.47822952],[134.50080872,47.57844925],[134.11235046,47.21247864],[133.76966858,46.11692047],[133.09712219,45.14408875],[131.88342285,45.32115936],[131.02519226,44.96796036],[131.28858948,44.11151123],[131.14471436,42.92998886],[130.63386536,42.90301132],[130.63999939,42.39500046],[129.99421692,42.98540115],[129.59663391,42.42499161],[128.05221558,41.99428177],[128.20846558,41.46677017],[127.34381866,41.5031395],[126.86907196,41.81655884],[126.18203735,41.10734177],[125.07996368,40.56980896],[124.26566315,39.92850113],[122.86753845,39.63779831],[122.13139343,39.17045975],[121.05451965,38.89746094],[121.58599854,39.36085892],[121.37674713,39.75027084],[122.16858673,40.42245102],[121.64037323,40.94639969],[120.76862335,40.59339905],[119.63960266,39.89805984],[119.02345276,39.25233078],[118.04271698,39.20426941],[117.53266907,38.73764038],[118.0597229,38.06148148],[118.87815094,37.89733124],[118.91166687,37.4484787],[119.70278931,37.1563797],[120.82344818,37.87042999],[121.71125031,37.48112106],[122.3579483,37.45449066],[122.51997375,36.93062973],[121.10420227,36.65132141],[120.63700867,36.11143875],[119.66458893,35.60979843],[119.15122223,34.9098587],[120.2275238,34.36034012],[120.62033844,33.37672043],[121.22904205,32.46031952],[121.90817261,31.69216919],[121.89189911,30.94935036],[121.26428986,30.67626953],[121.50348663,30.14291954],[122.09208679,29.83251953],[121.93843079,29.01802063],[121.68444061,28.22550964],[121.12563324,28.13566971],[120.39543915,27.05319977],[119.58547211,25.74078941],[118.65692902,24.54738045],[117.28160095,23.62450027],[115.89073944,22.78288078],[114.76383972,22.66809082],[114.15255737,22.22377014],[113.80677795,22.54833031],[113.2410965,22.05138016],[111.84359741,21.55048943],[110.78546143,21.39712906],[110.50935364,20.56541061],[110.44403076,20.34102058],[109.88986969,20.28244972],[109.62769318,21.00823021],[109.86448669,21.39505959],[108.52285004,21.7152195],[108.05020905,21.55237007],[107.04341125,21.81189919],[106.56728363,22.21820068],[106.72541809,22.79426956],[105.81121063,22.97689056],[105.32923889,23.35206032],[104.47685242,22.81915092],[103.50453949,22.70375061],[102.70697784,22.70879936],[102.17046356,22.46475029],[101.65200043,22.31818962],[101.80313873,21.17436981],[101.2700119,21.20165062],[101.17999268,21.43655968],[101.15000153,21.85000038],[100.41652679,21.55884933],[99.98348999,21.7429409],[99.24092865,22.11831093],[99.53199768,22.94902992],[98.89875793,23.14273071],[98.66029358,24.06328964],[97.60473633,23.89739037],[97.72460175,25.08365059],[98.67180634,25.91869926],[98.71208954,26.74353981],[98.68270111,27.50881958],[98.24622345,27.74723053],[97.91195679,28.33592987],[97.32714081,28.26157951],[96.2488327,28.41102028],[96.58659363,28.83097076],[96.11768341,29.45280075],[95.40480804,29.03171921],[94.56600189,29.27745056],[93.41332245,28.64065933],[92.50312042,27.8968792],[91.69667816,27.7717495],[91.69667816,27.7717495]],[[109.47521973,18.19771004],[108.65519714,18.50769043],[108.62621307,19.3678894],[109.11907196,19.82102966],[110.21157837,20.10125923],[110.78655243,20.07752037],[111.01006317,19.69593048],[110.57064819,19.25588989],[110.33917999,18.67840004],[109.47521973,18.19771004],[109.47521973,18.19771004]]]}, -{code:"IS", name:"Iceland", borders:[[[-14.50869465,66.45587921],[-14.73961258,65.80873108],[-13.60969067,65.12667847],[-14.909832,64.36408234],[-17.79440689,63.67876053],[-18.65624046,63.4963913],[-19.97272491,63.64363098],[-22.76296043,63.96018982],[-21.7784462,64.4021225],[-23.95501328,64.89112854],[-22.18439484,65.08496857],[-22.22741318,65.3786087],[-24.32616425,65.61116791],[-23.65049553,66.26251221],[-22.13491631,66.4104538],[-20.57626724,65.7321167],[-19.05681801,66.2766037],[-17.79862976,65.99385834],[-16.1678009,66.52680969],[-14.50869465,66.45587921],[-14.50869465,66.45587921]]]}, -{code:"CU", name:"Cuba", borders:[[[-82.26810455,23.18861961],[-81.40436554,23.11727905],[-80.61865997,23.10598946],[-79.67948914,22.76530075],[-79.2813797,22.39920998],[-78.34737396,22.51218033],[-77.99326324,22.27717972],[-77.14642334,21.65785027],[-76.52376556,21.20681953],[-76.19454193,21.22056007],[-75.59818268,21.01663017],[-75.67098999,20.73509026],[-74.93379211,20.69389915],[-74.17803955,20.28462982],[-74.29662323,20.05036926],[-74.96160889,19.92345047],[-75.63462067,19.8737793],[-76.32357025,19.9528904],[-77.75538635,19.85548019],[-77.08505249,20.4133606],[-77.49256897,20.67310905],[-78.13724518,20.73995018],[-78.48273468,21.02861977],[-78.71981812,21.59811974],[-79.28495789,21.55917931],[-80.21746826,21.82732964],[-80.51750183,22.03706932],[-81.82089233,22.19205093],[-82.16996765,22.38710976],[-81.79496765,22.63697052],[-82.77585602,22.68815041],[-83.49443817,22.16851044],[-83.90881348,22.15456963],[-84.05208588,21.91057014],[-84.54696655,21.80121994],[-84.97480011,21.89602089],[-84.44699097,22.20495987],[-84.23034668,22.56574059],[-83.77816772,22.78812027],[-83.26748657,22.98303986],[-82.51042175,23.07876015],[-82.26810455,23.18861961],[-82.26810455,23.18861961]]]}, -{code:"JM", name:"Jamaica", borders:[[[-77.56954956,18.49053001],[-76.89660645,18.40085983],[-76.36535645,18.16069031],[-76.19963074,17.88685989],[-76.90248108,17.86823082],[-77.20624542,17.70111084],[-77.76597595,17.86161041],[-78.33770752,18.22595978],[-78.21768188,18.45451927],[-77.79736328,18.52421951],[-77.56954956,18.49053001],[-77.56954956,18.49053001]]]}, -{code:"PR", name:"Puerto Rico", borders:[[[-66.28237152,18.51477051],[-65.77129364,18.42668915],[-65.59100342,18.22805023],[-65.84715271,17.97588921],[-66.59989929,17.98181915],[-67.18411255,17.94654083],[-67.24242401,18.37446022],[-67.1006012,18.52059937],[-66.28237152,18.51477051],[-66.28237152,18.51477051]]]}, -{code:"PY", name:"Paraguay", borders:[[[-62.68500519,-22.24901772],[-60.84654617,-23.88071442],[-60.02896118,-24.0327816],[-58.80712891,-24.77144814],[-57.77721405,-25.16234779],[-57.63361359,-25.60366631],[-58.61815643,-27.12371635],[-57.60972214,-27.3958683],[-56.48667908,-27.54849625],[-55.69581223,-27.38782501],[-54.78878403,-26.62181091],[-54.6252594,-25.73924637],[-54.42895126,-25.16220093],[-54.29344559,-24.57079124],[-54.29291534,-24.02101326],[-54.65277481,-23.83959961],[-55.02787781,-24.00126266],[-55.40071106,-23.95693016],[-55.51763916,-23.57199287],[-55.61063385,-22.65558815],[-55.79792786,-22.35691643],[-56.47332382,-22.08628654],[-56.88150024,-22.28216171],[-57.93711853,-22.09017944],[-57.87065125,-20.73268318],[-58.16637421,-20.17670441],[-58.18347168,-19.86839676],[-59.11500168,-19.35686493],[-60.0435257,-19.34272575],[-61.78629303,-19.63370514],[-62.26596069,-20.51374626],[-62.29116821,-21.05163193],[-62.68500519,-22.24901772],[-62.68500519,-22.24901772]]]}, -{code:"EC", name:"Ecuador", borders:[[[-80.30254364,-3.40485907],[-79.77024841,-2.6574986],[-79.98657227,-2.220788],[-80.36875916,-2.68515944],[-80.96766663,-2.24694657],[-80.76472473,-1.96504951],[-80.93363953,-1.05744863],[-80.58326721,-0.90665919],[-80.39925385,-0.28369999],[-80.02085876,0.36032999],[-80.0905304,0.76842999],[-79.54268646,0.98290998],[-78.85517883,1.38092995],[-77.85503387,0.80991],[-77.66854095,0.82590997],[-77.42498779,0.39570001],[-76.57633209,0.25692001],[-76.2922821,0.41604],[-75.80144501,0.08478],[-75.37322998,-0.15201995],[-75.23369598,-0.91139966],[-75.54496765,-1.56161952],[-76.63535309,-2.60868669],[-77.83786011,-3.00300956],[-78.45066833,-3.87306952],[-78.63989258,-4.54778337],[-79.20523071,-4.95914698],[-79.62490082,-4.45417595],[-80.02883148,-4.3460741],[-80.4421463,-4.42573881],[-80.46918488,-4.05929899],[-80.18390656,-3.82114959],[-80.30254364,-3.40485907],[-80.30254364,-3.40485907]]]}, -{code:"GF", name:"French Guiana", borders:[[[-53.95803833,5.75654984],[-53.61843872,5.64654016],[-52.88214111,5.40985012],[-51.82331848,4.56578016],[-51.65776062,4.15622997],[-52.24932861,3.24111009],[-52.5563736,2.50469995],[-52.93962097,2.12486005],[-53.41840363,2.05339003],[-53.55482864,2.33490992],[-53.77847672,2.37669992],[-54.08801651,2.10555005],[-54.52473831,2.31184006],[-54.26966858,2.73239994],[-54.18167496,3.18978],[-54.00692368,3.62004995],[-54.39948273,4.21260023],[-54.47858429,4.89675999],[-53.95803833,5.75654984],[-53.95803833,5.75654984]]]}, -{code:"SR", name:"Suriname", borders:[[[-57.14741135,5.97314978],[-55.9493103,5.77287006],[-55.84174347,5.95313978],[-55.03322601,6.02529001],[-53.95803833,5.75654984],[-54.47858429,4.89675999],[-54.39948273,4.21260023],[-54.00692368,3.62004995],[-54.18167496,3.18978],[-54.26966858,2.73239994],[-54.52473831,2.31184006],[-55.0975914,2.52374005],[-55.56970596,2.42149997],[-55.97332382,2.51036],[-56.07331848,2.22078991],[-55.90560913,2.02199006],[-55.99569321,1.81768],[-56.53934479,1.89953005],[-57.15007019,2.76893997],[-57.28142548,3.33347988],[-57.60155487,3.33466005],[-58.04466629,4.06086016],[-57.86019897,4.57679987],[-57.91426086,4.81263018],[-57.30720139,5.07356024],[-57.14741135,5.97314978],[-57.14741135,5.97314978]]]}, -{code:"GY", name:"Guyana", borders:[[[-59.75830078,8.36701965],[-59.10168076,7.99919987],[-58.48293304,7.34770012],[-58.45484924,6.8327899],[-58.07809067,6.80910015],[-57.542202,6.32128],[-57.14741135,5.97314978],[-57.30720139,5.07356024],[-57.91426086,4.81263018],[-57.86019897,4.57679987],[-58.04466629,4.06086016],[-57.60155487,3.33466005],[-57.28142548,3.33347988],[-57.15007019,2.76893997],[-56.53934479,1.89953005],[-56.78271103,1.86371005],[-57.33580017,1.94852996],[-57.66098022,1.68259001],[-58.11341858,1.5072],[-58.42945862,1.46394002],[-58.54000854,1.26811004],[-59.03083801,1.31769001],[-59.64600372,1.78689003],[-59.71848297,2.24961996],[-59.97450638,2.75521994],[-59.8153801,3.6064899],[-59.5379982,3.95880008],[-59.76737976,4.42350006],[-60.11097336,4.57496977],[-59.98090363,5.01407003],[-60.21362686,5.24448013],[-60.73358154,5.20027018],[-61.41030884,5.95906019],[-61.13940048,6.23431015],[-61.1593132,6.69608021],[-60.54396057,6.85658979],[-60.29563904,7.04392004],[-60.63792038,7.41499996],[-60.55055618,7.77960014],[-59.75830078,8.36701965],[-59.75830078,8.36701965]]]}, -{code:"VE", name:"Venezuela", borders:[[[-71.33149719,11.77626991],[-71.35997009,11.53999996],[-71.94699097,11.42327023],[-71.62082672,10.96945953],[-71.63303375,10.44649029],[-72.0741272,9.86565018],[-71.69559479,9.0722599],[-71.26450348,9.13720036],[-71.03995514,9.85999966],[-71.34998322,10.21191978],[-71.40052032,10.9689703],[-70.15525055,11.37549019],[-70.29380798,11.84683037],[-69.94322205,12.16230965],[-69.58428955,11.45962048],[-68.88288116,11.44338989],[-68.23316956,10.88574028],[-68.19405365,10.55465984],[-67.29616547,10.54586029],[-66.22783661,10.64861965],[-65.65519714,10.20079041],[-64.89043427,10.07719994],[-64.32946777,10.38959026],[-64.31797791,10.64142036],[-63.07929993,10.70172024],[-61.88090897,10.71562004],[-62.73009491,10.42026043],[-62.38846588,9.94820023],[-61.58877182,9.87306976],[-60.83054352,9.38134956],[-60.67121887,8.58018017],[-60.15002823,8.60276031],[-59.75830078,8.36701965],[-60.55055618,7.77960014],[-60.63792038,7.41499996],[-60.29563904,7.04392004],[-60.54396057,6.85658979],[-61.1593132,6.69608021],[-61.13940048,6.23431015],[-61.41030884,5.95906019],[-60.73358154,5.20027018],[-60.60116196,4.91808987],[-60.96688843,4.53645992],[-62.0854187,4.16211987],[-62.8045311,4.00696993],[-63.09320068,3.77057004],[-63.88832092,4.02052021],[-64.62866211,4.14848995],[-64.81600189,4.0564599],[-64.36844635,3.79720998],[-64.40880585,3.12678003],[-64.26992035,2.49698997],[-63.42282486,2.41107988],[-63.36875916,2.20091009],[-64.08303833,1.91637003],[-64.19927216,1.49285996],[-64.61102295,1.32872999],[-65.35462952,1.09527004],[-65.548172,0.78926998],[-66.32572174,0.72447002],[-66.87624359,1.25336003],[-67.18125153,2.25063992],[-67.44706726,2.60028005],[-67.80992126,2.82066011],[-67.30314636,3.31845999],[-67.33750153,3.54234004],[-67.62180328,3.83948994],[-67.82297516,4.50394011],[-67.74468231,5.22111988],[-67.5214386,5.55688],[-67.34140778,6.09545994],[-67.6950531,6.26731014],[-68.26496887,6.15327978],[-68.98526001,6.20678997],[-69.38945007,6.09986019],[-70.09321594,6.96038008],[-70.67415619,7.08779001],[-71.9601059,6.99160004],[-72.19824982,7.3404398],[-72.44441223,7.42379999],[-72.47966766,7.63249016],[-72.36090088,8.00263023],[-72.43978119,8.40526962],[-72.66042328,8.62528038],[-72.78866577,9.08504009],[-73.30490112,9.15200043],[-73.02757263,9.73676014],[-72.90527344,10.45034027],[-72.61458588,10.82199001],[-72.22750092,11.10871029],[-71.97383118,11.60867977],[-71.33149719,11.77626991],[-71.33149719,11.77626991]],[[-64.40207672,11.04356956],[-64.2249527,11.06175613],[-64.12989044,11.01500034],[-64.02922821,11.06604958],[-63.90679932,11.17014027],[-63.79912567,11.01224995],[-63.9011879,10.87862968],[-64.06246948,10.86285019],[-64.15620422,10.93998528],[-64.4281311,10.9574604],[-64.40207672,11.04356956],[-64.40207672,11.04356956]]]}, -{code:"BZ", name:"Belize", borders:[[[-89.14306641,17.80830956],[-89.15084839,17.95545959],[-89.02984619,18.00152016],[-88.84831238,17.88319016],[-88.49010468,18.48682976],[-88.29995728,18.49999046],[-88.2963028,18.35327911],[-88.10680389,18.3486805],[-88.12345886,18.07666016],[-88.28533173,17.64413071],[-88.19776917,17.48946953],[-88.30257416,17.13168907],[-88.23949432,17.03606987],[-88.35539246,16.53075981],[-88.55181122,16.2654705],[-88.73241425,16.23365021],[-88.93058777,15.88728046],[-89.22911835,15.88694954],[-89.15071106,17.01556969],[-89.14306641,17.80830956],[-89.14306641,17.80830956]]]}, -{code:"GT", name:"Guatemala", borders:[[[-90.0954895,13.73532963],[-90.60853577,13.90977001],[-91.23231506,13.92784023],[-91.68964386,14.12623024],[-92.22768402,14.5388298],[-92.20314026,14.8301096],[-92.0871048,15.06459045],[-92.22924805,15.25144005],[-91.74788666,16.06657982],[-90.46447754,16.0695591],[-90.43881226,16.41012001],[-90.60082245,16.47076988],[-90.71176147,16.68748093],[-91.08165741,16.91847038],[-91.45391846,17.25218964],[-91.0022583,17.25465012],[-91.00141907,17.81760025],[-90.0679245,17.81932068],[-89.14306641,17.80830956],[-89.15071106,17.01556969],[-89.22911835,15.88694954],[-88.93058777,15.88728046],[-88.60450745,15.70639038],[-88.51837158,15.85538006],[-88.22493744,15.72772026],[-88.68064117,15.34624004],[-89.15476227,15.0664196],[-89.2252121,14.87429047],[-89.14548492,14.67801952],[-89.35332489,14.42413998],[-89.58734131,14.36260033],[-89.53412628,14.24483013],[-89.7219162,14.13422966],[-90.06460571,13.88197041],[-90.0954895,13.73532963],[-90.0954895,13.73532963]]]}, -{code:"SV", name:"El Salvador", borders:[[[-87.7930603,13.38448048],[-87.90400696,13.14902973],[-88.48325348,13.16394997],[-88.84316254,13.25973988],[-89.25669098,13.45853043],[-89.81235504,13.52060986],[-90.0954895,13.73532963],[-90.06460571,13.88197041],[-89.7219162,14.13422966],[-89.53412628,14.24483013],[-89.58734131,14.36260033],[-89.35332489,14.42413998],[-89.05844116,14.34002018],[-88.8429718,14.14050007],[-88.54116821,13.98015976],[-88.5039444,13.84549046],[-88.06528473,13.96463013],[-87.85947418,13.89330959],[-87.72351074,13.78505993],[-87.7930603,13.38448048],[-87.7930603,13.38448048]]]}, -{code:"HN", name:"Honduras", borders:[[[-87.31665039,12.98468971],[-87.48935699,13.2975502],[-87.7930603,13.38448048],[-87.72351074,13.78505993],[-87.85947418,13.89330959],[-88.06528473,13.96463013],[-88.5039444,13.84549046],[-88.54116821,13.98015976],[-88.8429718,14.14050007],[-89.05844116,14.34002018],[-89.35332489,14.42413998],[-89.14548492,14.67801952],[-89.2252121,14.87429047],[-89.15476227,15.0664196],[-88.68064117,15.34624004],[-88.22493744,15.72772026],[-88.12104797,15.68867016],[-87.90177917,15.86445045],[-87.61565399,15.87880039],[-87.5228653,15.79728031],[-87.36771393,15.84694958],[-86.90319824,15.75671005],[-86.44089508,15.78283978],[-86.11917114,15.89344025],[-86.00184631,16.0053997],[-85.68325806,15.95366001],[-85.44394684,15.88574982],[-85.18242645,15.90917015],[-84.98368073,15.99592972],[-84.5268631,15.8572197],[-84.36817932,15.83516026],[-84.06304932,15.64824963],[-83.77398682,15.4240799],[-83.41028595,15.27089977],[-83.14720154,14.99582958],[-83.48987579,15.01626015],[-83.62850189,14.88006973],[-83.97568512,14.74944019],[-84.22831726,14.74874973],[-84.44934082,14.62160969],[-84.64948273,14.66679955],[-84.81997681,14.81958961],[-84.92438507,14.79049015],[-85.0526886,14.55154991],[-85.14873505,14.5601902],[-85.16532898,14.35437012],[-85.51439667,14.07901001],[-85.69866943,13.96008015],[-85.80124664,13.83603954],[-86.09625244,14.03818035],[-86.31212616,13.77136993],[-86.52068329,13.77847958],[-86.75504303,13.75485039],[-86.73381805,13.26309013],[-86.88053894,13.25421047],[-87.00571442,13.02579021],[-87.31665039,12.98468971],[-87.31665039,12.98468971]]]}, -{code:"NI", name:"Nicaragua", borders:[[[-85.71250916,11.08843994],[-86.05845642,11.40344048],[-86.52578735,11.80688953],[-86.74596405,12.14396954],[-87.16744995,12.45825958],[-87.66841125,12.90991974],[-87.55739594,13.06455994],[-87.39228058,12.91401005],[-87.31665039,12.98468971],[-87.00571442,13.02579021],[-86.88053894,13.25421047],[-86.73381805,13.26309013],[-86.75504303,13.75485039],[-86.52068329,13.77847958],[-86.31212616,13.77136993],[-86.09625244,14.03818035],[-85.80124664,13.83603954],[-85.69866943,13.96008015],[-85.51439667,14.07901001],[-85.16532898,14.35437012],[-85.14873505,14.5601902],[-85.0526886,14.55154991],[-84.92438507,14.79049015],[-84.81997681,14.81958961],[-84.64948273,14.66679955],[-84.44934082,14.62160969],[-84.22831726,14.74874973],[-83.97568512,14.74944019],[-83.62850189,14.88006973],[-83.48987579,15.01626015],[-83.14720154,14.99582958],[-83.23319244,14.89986038],[-83.28406525,14.67661953],[-83.18212891,14.31070042],[-83.41243744,13.97006989],[-83.51972198,13.56770992],[-83.5521698,13.1270504],[-83.49842834,12.86929989],[-83.47322083,12.41909981],[-83.626091,12.32085037],[-83.71958923,11.89313984],[-83.65077209,11.62903023],[-83.85546875,11.3732996],[-83.80886078,11.10305023],[-83.65554047,10.93877983],[-83.89498138,10.72682953],[-84.19017792,10.79345989],[-84.35585022,10.99923992],[-84.67298889,11.08265018],[-84.9029007,10.95230007],[-85.56180573,11.21712017],[-85.71250916,11.08843994],[-85.71250916,11.08843994]]]}, -{code:"CR", name:"Costa Rica", borders:[[[-82.96573639,8.22504044],[-83.50841522,8.44692039],[-83.71137238,8.65682983],[-83.59630585,8.83043957],[-83.63262177,9.05138016],[-83.9098053,9.2907896],[-84.30339813,9.48735046],[-84.6475296,9.61553955],[-84.71328735,9.90806007],[-84.97564697,10.08670998],[-84.91126251,9.79599953],[-85.11087036,9.55702972],[-85.33947754,9.8345499],[-85.66073608,9.93334007],[-85.79740143,10.1348896],[-85.79165649,10.4393301],[-85.65929413,10.75432014],[-85.9417038,10.89527988],[-85.71250916,11.08843994],[-85.56180573,11.21712017],[-84.9029007,10.95230007],[-84.67298889,11.08265018],[-84.35585022,10.99923992],[-84.19017792,10.79345989],[-83.89498138,10.72682953],[-83.65554047,10.93877983],[-83.4022522,10.39544964],[-83.01557159,9.99297047],[-82.54620361,9.56614971],[-82.93283081,9.47681999],[-82.92708588,9.07433033],[-82.71917725,8.92570972],[-82.86864471,8.80725956],[-82.82966614,8.62629986],[-82.91311646,8.42352962],[-82.96573639,8.22504044],[-82.96573639,8.22504044]]]}, -{code:"PA", name:"Panama", borders:[[[-77.88148499,7.22378016],[-78.2148819,7.51225996],[-78.4291153,8.05204964],[-78.18203735,8.31917],[-78.43538666,8.38770962],[-78.62213135,8.71813011],[-79.1202774,8.99610043],[-79.55784607,8.9323597],[-79.76052856,8.58452034],[-80.16437531,8.33331966],[-80.38260651,8.29839993],[-80.48061371,8.0903101],[-80.00362396,7.54753017],[-80.27656555,7.41975021],[-80.42112732,7.27158022],[-80.88630676,7.22055006],[-81.05947876,7.81791019],[-81.18967438,7.64792013],[-81.51941681,7.70662022],[-81.72130585,8.10896015],[-82.13137817,8.17539024],[-82.39093018,8.29234982],[-82.82006836,8.29086018],[-82.85094452,8.07382965],[-82.96573639,8.22504044],[-82.91311646,8.42352962],[-82.82966614,8.62629986],[-82.86864471,8.80725956],[-82.71917725,8.92570972],[-82.92708588,9.07433033],[-82.93283081,9.47681999],[-82.54620361,9.56614971],[-82.18713379,9.20744038],[-82.20758057,8.99555969],[-81.80848694,8.95061016],[-81.71407318,9.03195],[-81.4392395,8.78623962],[-80.94722748,8.85851002],[-80.52181244,9.11108017],[-79.91461182,9.31278038],[-79.57330322,9.61159992],[-79.02117157,9.55292988],[-79.05838013,9.45458031],[-78.50081635,9.42047024],[-78.05587769,9.24773026],[-77.72946167,8.9468298],[-77.35329437,8.6704998],[-77.47462463,8.52429962],[-77.24254608,7.93527985],[-77.43106079,7.63806009],[-77.75330353,7.70983982],[-77.88148499,7.22378016],[-77.88148499,7.22378016]]]}, -{code:"CO", name:"Colombia", borders:[[[-75.37322998,-0.15201995],[-75.80144501,0.08478],[-76.2922821,0.41604],[-76.57633209,0.25692001],[-77.42498779,0.39570001],[-77.66854095,0.82590997],[-77.85503387,0.80991],[-78.85517883,1.38092995],[-78.99087524,1.69138002],[-78.61776733,1.76639998],[-78.66210175,2.26734996],[-78.4276123,2.62954998],[-77.93149567,2.69659996],[-77.5103302,3.32501006],[-77.12767792,3.84964991],[-77.49616241,4.08760977],[-77.30752563,4.66798019],[-77.53318787,5.58280993],[-77.3187561,5.8453598],[-77.47657776,6.69113016],[-77.88148499,7.22378016],[-77.75330353,7.70983982],[-77.43106079,7.63806009],[-77.24254608,7.93527985],[-77.47462463,8.52429962],[-77.35329437,8.6704998],[-76.83666229,8.63875008],[-76.08634186,9.33681965],[-75.6745224,9.44326019],[-75.66465759,9.7740097],[-75.48038483,10.61898041],[-74.9068222,11.08306026],[-74.27671051,11.1020298],[-74.1971817,11.31048012],[-73.41471863,11.22700977],[-72.62776184,11.73198032],[-72.23813629,11.9555397],[-71.75397491,12.43729973],[-71.39972687,12.37605],[-71.13743591,12.11299038],[-71.33149719,11.77626991],[-71.97383118,11.60867977],[-72.22750092,11.10871029],[-72.61458588,10.82199001],[-72.90527344,10.45034027],[-73.02757263,9.73676014],[-73.30490112,9.15200043],[-72.78866577,9.08504009],[-72.66042328,8.62528038],[-72.43978119,8.40526962],[-72.36090088,8.00263023],[-72.47966766,7.63249016],[-72.44441223,7.42379999],[-72.19824982,7.3404398],[-71.9601059,6.99160004],[-70.67415619,7.08779001],[-70.09321594,6.96038008],[-69.38945007,6.09986019],[-68.98526001,6.20678997],[-68.26496887,6.15327978],[-67.6950531,6.26731014],[-67.34140778,6.09545994],[-67.5214386,5.55688],[-67.74468231,5.22111988],[-67.82297516,4.50394011],[-67.62180328,3.83948994],[-67.33750153,3.54234004],[-67.30314636,3.31845999],[-67.80992126,2.82066011],[-67.44706726,2.60028005],[-67.18125153,2.25063992],[-66.87624359,1.25336003],[-67.06495667,1.13013005],[-67.25989532,1.72000003],[-67.53775787,2.03716993],[-67.86849213,1.69244003],[-69.81694031,1.7148],[-69.80454254,1.08906996],[-69.21862793,0.98566997],[-69.25244141,0.60267001],[-69.45238495,0.70613003],[-70.01544952,0.54143],[-70.02060699,-0.18513979],[-69.57698059,-0.54999942],[-69.42045593,-1.12261927],[-69.4440918,-1.55628932],[-69.89360046,-4.29816628],[-70.39403534,-3.76656818],[-70.69257355,-3.74284863],[-70.04763794,-2.72517943],[-70.81336975,-2.25686669],[-71.41352081,-2.34280944],[-71.77466583,-2.16980863],[-72.32570648,-2.43420959],[-73.07035065,-2.30893803],[-73.65946198,-1.26049995],[-74.1223526,-1.00284004],[-74.44158173,-0.53080976],[-75.10662842,-0.05717998],[-75.37322998,-0.15201995],[-75.37322998,-0.15201995]]]}, -{code:"PE", name:"Peru", borders:[[[-69.59036255,-17.58001328],[-69.85834503,-18.09267426],[-70.37255096,-18.34794235],[-71.37523651,-17.77376556],[-71.46202087,-17.36347008],[-73.44449615,-16.35936928],[-75.23781586,-15.26568699],[-76.00910187,-14.64924812],[-76.42346191,-13.8231926],[-76.25918579,-13.53505421],[-77.10620117,-12.22268867],[-78.0920639,-10.37768078],[-79.03690338,-8.38656712],[-79.44591522,-7.93080807],[-79.76052856,-7.19435787],[-80.53736115,-6.54163504],[-81.25,-6.13683414],[-80.92632294,-5.69053316],[-81.41083527,-4.73675823],[-81.09955597,-4.03637409],[-80.30254364,-3.40485907],[-80.18390656,-3.82114959],[-80.46918488,-4.05929899],[-80.4421463,-4.42573881],[-80.02883148,-4.3460741],[-79.62490082,-4.45417595],[-79.20523071,-4.95914698],[-78.63989258,-4.54778337],[-78.45066833,-3.87306952],[-77.83786011,-3.00300956],[-76.63535309,-2.60868669],[-75.54496765,-1.56161952],[-75.23369598,-0.91139966],[-75.37322998,-0.15201995],[-75.10662842,-0.05717998],[-74.44158173,-0.53080976],[-74.1223526,-1.00284004],[-73.65946198,-1.26049995],[-73.07035065,-2.30893803],[-72.32570648,-2.43420959],[-71.77466583,-2.16980863],[-71.41352081,-2.34280944],[-70.81336975,-2.25686669],[-70.04763794,-2.72517943],[-70.69257355,-3.74284863],[-70.39403534,-3.76656818],[-69.89360046,-4.29816628],[-70.79470062,-4.25123978],[-70.92881775,-4.40160513],[-71.74841309,-4.59400892],[-72.89189148,-5.27455807],[-72.96444702,-5.74126625],[-73.21961975,-6.08917999],[-73.11997223,-6.62994528],[-73.7244873,-6.91858339],[-73.72338104,-7.34098625],[-73.98723602,-7.52380514],[-73.57103729,-8.42441082],[-73.01537323,-9.03282833],[-73.22666931,-9.46219826],[-72.56293488,-9.52021027],[-72.18486023,-10.05358791],[-71.30231476,-10.07943439],[-70.4818573,-9.49008846],[-70.54859161,-11.00915051],[-70.09374237,-11.12397003],[-69.52963257,-10.95170212],[-68.66498566,-12.56130981],[-68.88005829,-12.89971828],[-68.9291687,-13.60266781],[-68.94882202,-14.45363712],[-69.33942413,-14.95318699],[-69.16031647,-15.32393837],[-69.38977051,-15.6601162],[-68.95954132,-16.50066185],[-69.59036255,-17.58001328],[-69.59036255,-17.58001328]]]}, -{code:"BO", name:"Bolivia", borders:[[[-62.84645081,-22.03497696],[-63.98679352,-21.99363327],[-64.37700653,-22.79808235],[-64.9648056,-22.07583237],[-66.27329254,-21.83229256],[-67.10657501,-22.73590279],[-67.82807159,-22.87288857],[-68.21990967,-21.49433708],[-68.7571106,-20.37266159],[-68.44217682,-19.40506935],[-68.96677399,-18.98165703],[-69.10018158,-18.26010323],[-69.59036255,-17.58001328],[-68.95954132,-16.50066185],[-69.38977051,-15.6601162],[-69.16031647,-15.32393837],[-69.33942413,-14.95318699],[-68.94882202,-14.45363712],[-68.9291687,-13.60266781],[-68.88005829,-12.89971828],[-68.66498566,-12.56130981],[-69.52963257,-10.95170212],[-68.78610229,-11.03634834],[-68.27124023,-11.01449203],[-68.04812622,-10.71206856],[-67.17373657,-10.30680656],[-66.64691162,-9.93130016],[-65.33843994,-9.76195621],[-65.44480896,-10.51142788],[-65.32178497,-10.89583683],[-65.4021759,-11.56627846],[-64.31633759,-12.46199608],[-63.19644547,-12.62703419],[-62.80302811,-13.00065708],[-62.12701797,-13.19876766],[-61.71317291,-13.48919868],[-61.08409119,-13.47938061],[-60.50328064,-13.77597046],[-60.45919418,-14.35398769],[-60.26429367,-14.64595604],[-60.25111008,-15.07721424],[-60.54291534,-15.09391594],[-60.15838242,-16.25827026],[-58.24121094,-16.29956055],[-58.38806152,-16.8771019],[-58.28077316,-17.27167511],[-57.7345047,-17.55249023],[-57.49832535,-18.17416763],[-57.67599106,-18.96182632],[-57.94996262,-19.39998817],[-57.85379028,-19.97001266],[-58.16637421,-20.17670441],[-58.18347168,-19.86839676],[-59.11500168,-19.35686493],[-60.0435257,-19.34272575],[-61.78629303,-19.63370514],[-62.26596069,-20.51374626],[-62.29116821,-21.05163193],[-62.68500519,-22.24901772],[-62.84645081,-22.03497696],[-62.84645081,-22.03497696]]]}, -{code:"BR", name:"Brazil", borders:[[[-57.62506485,-30.21628761],[-56.29083633,-28.85274506],[-55.16224289,-27.88192558],[-54.49066544,-27.47472382],[-53.64868546,-26.9234848],[-53.62831116,-26.12487602],[-54.13003159,-25.54759407],[-54.6252594,-25.73924637],[-54.42895126,-25.16220093],[-54.29344559,-24.57079124],[-54.29291534,-24.02101326],[-54.65277481,-23.83959961],[-55.02787781,-24.00126266],[-55.40071106,-23.95693016],[-55.51763916,-23.57199287],[-55.61063385,-22.65558815],[-55.79792786,-22.35691643],[-56.47332382,-22.08628654],[-56.88150024,-22.28216171],[-57.93711853,-22.09017944],[-57.87065125,-20.73268318],[-58.16637421,-20.17670441],[-57.85379028,-19.97001266],[-57.94996262,-19.39998817],[-57.67599106,-18.96182632],[-57.49832535,-18.17416763],[-57.7345047,-17.55249023],[-58.28077316,-17.27167511],[-58.38806152,-16.8771019],[-58.24121094,-16.29956055],[-60.15838242,-16.25827026],[-60.54291534,-15.09391594],[-60.25111008,-15.07721424],[-60.26429367,-14.64595604],[-60.45919418,-14.35398769],[-60.50328064,-13.77597046],[-61.08409119,-13.47938061],[-61.71317291,-13.48919868],[-62.12701797,-13.19876766],[-62.80302811,-13.00065708],[-63.19644547,-12.62703419],[-64.31633759,-12.46199608],[-65.4021759,-11.56627846],[-65.32178497,-10.89583683],[-65.44480896,-10.51142788],[-65.33843994,-9.76195621],[-66.64691162,-9.93130016],[-67.17373657,-10.30680656],[-68.04812622,-10.71206856],[-68.27124023,-11.01449203],[-68.78610229,-11.03634834],[-69.52963257,-10.95170212],[-70.09374237,-11.12397003],[-70.54859161,-11.00915051],[-70.4818573,-9.49008846],[-71.30231476,-10.07943439],[-72.18486023,-10.05358791],[-72.56293488,-9.52021027],[-73.22666931,-9.46219826],[-73.01537323,-9.03282833],[-73.57103729,-8.42441082],[-73.98723602,-7.52380514],[-73.72338104,-7.34098625],[-73.7244873,-6.91858339],[-73.11997223,-6.62994528],[-73.21961975,-6.08917999],[-72.96444702,-5.74126625],[-72.89189148,-5.27455807],[-71.74841309,-4.59400892],[-70.92881775,-4.40160513],[-70.79470062,-4.25123978],[-69.89360046,-4.29816628],[-69.4440918,-1.55628932],[-69.42045593,-1.12261927],[-69.57698059,-0.54999942],[-70.02060699,-0.18513979],[-70.01544952,0.54143],[-69.45238495,0.70613003],[-69.25244141,0.60267001],[-69.21862793,0.98566997],[-69.80454254,1.08906996],[-69.81694031,1.7148],[-67.86849213,1.69244003],[-67.53775787,2.03716993],[-67.25989532,1.72000003],[-67.06495667,1.13013005],[-66.87624359,1.25336003],[-66.32572174,0.72447002],[-65.548172,0.78926998],[-65.35462952,1.09527004],[-64.61102295,1.32872999],[-64.19927216,1.49285996],[-64.08303833,1.91637003],[-63.36875916,2.20091009],[-63.42282486,2.41107988],[-64.26992035,2.49698997],[-64.40880585,3.12678003],[-64.36844635,3.79720998],[-64.81600189,4.0564599],[-64.62866211,4.14848995],[-63.88832092,4.02052021],[-63.09320068,3.77057004],[-62.8045311,4.00696993],[-62.0854187,4.16211987],[-60.96688843,4.53645992],[-60.60116196,4.91808987],[-60.73358154,5.20027018],[-60.21362686,5.24448013],[-59.98090363,5.01407003],[-60.11097336,4.57496977],[-59.76737976,4.42350006],[-59.5379982,3.95880008],[-59.8153801,3.6064899],[-59.97450638,2.75521994],[-59.71848297,2.24961996],[-59.64600372,1.78689003],[-59.03083801,1.31769001],[-58.54000854,1.26811004],[-58.42945862,1.46394002],[-58.11341858,1.5072],[-57.66098022,1.68259001],[-57.33580017,1.94852996],[-56.78271103,1.86371005],[-56.53934479,1.89953005],[-55.99569321,1.81768],[-55.90560913,2.02199006],[-56.07331848,2.22078991],[-55.97332382,2.51036],[-55.56970596,2.42149997],[-55.0975914,2.52374005],[-54.52473831,2.31184006],[-54.08801651,2.10555005],[-53.77847672,2.37669992],[-53.55482864,2.33490992],[-53.41840363,2.05339003],[-52.93962097,2.12486005],[-52.5563736,2.50469995],[-52.24932861,3.24111009],[-51.65776062,4.15622997],[-51.31713867,4.20349979],[-51.06975555,3.65039992],[-50.50887299,1.90155995],[-49.97404861,1.73649001],[-49.94705582,1.04619002],[-50.69924927,0.22296],[-50.38815689,-0.0784399],[-48.62057114,-0.23546988],[-48.58444595,-1.23782837],[-47.82495117,-0.58162951],[-46.56654739,-0.94102001],[-44.90565109,-1.55173934],[-44.41757584,-2.13774753],[-44.58154678,-2.69130802],[-43.4187355,-2.38311005],[-41.47265244,-2.91199756],[-39.97865677,-2.87305665],[-38.50035095,-3.70066667],[-37.22322083,-4.82091808],[-36.45293427,-5.10938311],[-35.59780884,-5.14952707],[-35.23532486,-5.46495628],[-34.8960228,-6.73817635],[-34.72998047,-7.343225],[-35.12820053,-8.99640274],[-35.63695526,-9.64929962],[-37.04650879,-11.04074764],[-37.68358612,-12.17119217],[-38.42383575,-13.03810787],[-38.67383575,-13.05765629],[-38.95327377,-13.79336071],[-38.88223648,-15.66703606],[-39.16104507,-17.2083683],[-39.26731873,-17.86776543],[-39.58347321,-18.26226616],[-39.76077652,-19.59911156],[-40.77470779,-20.90449142],[-40.94475555,-21.93727303],[-41.75413132,-22.37069321],[-41.98828125,-22.97007561],[-43.07470322,-22.96765327],[-44.64778137,-23.35195923],[-45.35209274,-23.79683876],[-46.47205353,-24.08898926],[-47.64894104,-24.88516617],[-48.49539566,-25.87703896],[-48.64097214,-26.62366486],[-48.47472382,-27.17591667],[-48.66147995,-28.18612289],[-48.88840485,-28.67409515],[-49.58730316,-29.22446442],[-50.69681549,-30.9844532],[-51.57617569,-31.77767944],[-52.25605774,-32.24536133],[-52.71204376,-33.19655609],[-53.37360382,-33.76832199],[-53.65048599,-33.20197296],[-53.20953751,-32.72761154],[-53.78791809,-32.04724121],[-54.57244873,-31.49451447],[-55.60149384,-30.85386276],[-55.97318268,-30.88305283],[-56.97595596,-30.10967064],[-57.62506485,-30.21628761],[-57.62506485,-30.21628761]]]}, -{code:"UY", name:"Uruguay", borders:[[[-57.62506485,-30.21628761],[-56.97595596,-30.10967064],[-55.97318268,-30.88305283],[-55.60149384,-30.85386276],[-54.57244873,-31.49451447],[-53.78791809,-32.04724121],[-53.20953751,-32.72761154],[-53.65048599,-33.20197296],[-53.37360382,-33.76832199],[-53.80642319,-34.39680862],[-54.93584442,-34.95266342],[-55.67404556,-34.75265121],[-56.21525192,-34.85981369],[-57.13965607,-34.430439],[-57.8178215,-34.46250916],[-58.42704773,-33.90939713],[-58.34959793,-33.26313782],[-58.13261795,-33.04058838],[-58.14241028,-32.04447937],[-57.87488556,-31.01654053],[-57.62506485,-30.21628761],[-57.62506485,-30.21628761]]]}, -{code:"HT", name:"Haiti", borders:[[[-73.18972015,19.91567993],[-72.57964325,19.87150955],[-71.71231079,19.71443939],[-71.62487793,19.1698494],[-71.70127869,18.78543091],[-71.94503021,18.61689949],[-71.68763733,18.31665039],[-71.70831299,18.04500008],[-72.37239075,18.21495056],[-72.84442139,18.14559937],[-73.45449066,18.21791077],[-73.92240906,18.03097916],[-74.45797729,18.34254074],[-74.36982727,18.66489983],[-73.4495163,18.5260601],[-72.69483185,18.44578934],[-72.33478546,18.66843033],[-72.79159546,19.10161972],[-72.7840271,19.48360062],[-73.41492462,19.6395607],[-73.18972015,19.91567993],[-73.18972015,19.91567993]]]}, -{code:"DO", name:"Dominican Republic", borders:[[[-71.71231079,19.71443939],[-71.58725739,19.88491058],[-70.80670166,19.88028908],[-70.21434021,19.62289047],[-69.95079041,19.64800072],[-69.76921082,19.29327011],[-69.22209167,19.31321907],[-69.2543335,19.01519012],[-68.80935669,18.9790802],[-68.3179245,18.61220932],[-68.68933105,18.20513916],[-69.1648941,18.42263985],[-69.62392426,18.3807106],[-69.95283508,18.42830086],[-70.13323975,18.2458992],[-70.5170517,18.18428993],[-70.66920471,18.42690086],[-70.99993134,18.28334045],[-71.40019226,17.59857941],[-71.65765381,17.7575798],[-71.70831299,18.04500008],[-71.68763733,18.31665039],[-71.94503021,18.61689949],[-71.70127869,18.78543091],[-71.62487793,19.1698494],[-71.71231079,19.71443939],[-71.71231079,19.71443939]]]}, -{code:"CY", name:"Cyprus", borders:[[[34.00490952,34.97808838],[33.97407532,35.05735016],[33.46287918,35.05735016],[33.24000168,35.17192459],[32.81499863,35.06999969],[32.70884705,35.13824081],[32.25666046,35.10322189],[32.49029922,34.70164108],[32.97982025,34.5718689],[34.00490952,34.97808838],[34.00490952,34.97808838]],[[32.94696045,35.38671112],[32.80244827,35.14548874],[32.70884705,35.13824081],[32.81499863,35.06999969],[33.24000168,35.17192459],[33.46287918,35.05735016],[33.97407532,35.05735016],[33.90077972,35.2457695],[34.57646179,35.67160034],[33.66719818,35.37321091],[32.94696045,35.38671112],[32.94696045,35.38671112]]]}, -{code:"ID", name:"Indonesia", borders:[[[127.93237305,2.17459989],[128.00415039,1.62854004],[128.59454346,1.54082],[128.68826294,1.13240004],[128.63595581,0.25849],[128.12013245,0.35644001],[127.96800995,-0.25206989],[128.38000488,-0.77999949],[128.1000061,-0.89999926],[127.6964798,-0.26660982],[127.39952087,1.01170003],[127.60051727,1.81070006],[127.93237305,2.17459989],[127.93237305,2.17459989]],[[104.36997223,-1.08484876],[104.53946686,-1.78238928],[104.88793945,-2.34041953],[105.62207794,-2.42886853],[106.10856628,-3.0618],[105.85745239,-4.30554914],[105.81768036,-5.85236502],[104.71038818,-5.87331009],[103.86824799,-5.03730011],[102.58425903,-4.22026634],[102.15614319,-3.6141572],[101.39909363,-2.79976678],[100.9025116,-2.05025721],[100.14196777,-0.65033919],[99.26373291,0.18312],[98.96997833,1.04287004],[98.60134125,1.82351995],[97.69962311,2.4532001],[97.17697144,3.30879998],[96.42398834,3.86886001],[95.38091278,4.9707799],[95.29302216,5.47981977],[95.93685913,5.43950987],[97.48487091,5.24632978],[98.36917877,4.26837015],[99.14254761,3.59034991],[99.69403076,3.17434001],[100.64141083,2.09939003],[101.65801239,2.08369994],[102.49825287,1.3987],[103.07682037,0.56136],[103.83840179,0.10457],[103.43768311,-0.71196973],[104.01080322,-1.0592097],[104.36997223,-1.08484876],[104.36997223,-1.08484876]],[[108.48686981,-6.42200708],[108.62345886,-6.77767897],[110.53919983,-6.87733698],[110.75955963,-6.46519709],[112.6147995,-6.94601631],[112.97879028,-7.59418726],[114.47897339,-7.7765379],[115.70555878,-8.37081814],[114.56452179,-8.75180626],[113.46472168,-8.34894085],[112.55967712,-8.37619591],[111.52204895,-8.3021183],[110.58612061,-8.12259865],[109.42765808,-7.74065018],[108.69364166,-7.64160824],[108.27778625,-7.76667023],[106.45413208,-7.35488796],[106.28063202,-6.92487431],[105.3655014,-6.85141516],[106.05162048,-5.8959198],[107.2649765,-5.95497799],[108.07209778,-6.34577894],[108.48686981,-6.42200708],[108.48686981,-6.42200708]],[[118.26061249,-8.36236668],[118.87848663,-8.28070641],[119.12651825,-8.70582199],[117.97039795,-8.9066124],[117.27776337,-9.04088688],[116.74015045,-9.03290653],[117.08376312,-8.45714092],[117.63207245,-8.44929028],[117.89998627,-8.09568024],[118.26061249,-8.36236668],[118.26061249,-8.36236668]],[[121.34169006,-8.53675652],[122.00740814,-8.4606142],[122.90351868,-8.0942421],[122.75701141,-8.64979649],[121.25449371,-8.93367004],[119.92442322,-8.81044006],[119.92092133,-8.44487],[120.71510315,-8.23697281],[121.34169006,-8.53675652],[121.34169006,-8.53675652]],[[120.29501343,-10.25866413],[118.96781158,-9.55797672],[119.90029907,-9.36130619],[120.42575836,-9.66593838],[120.77554321,-9.96966648],[120.71562195,-10.23957634],[120.29501343,-10.25866413],[120.29501343,-10.25866413]],[[122.92756653,0.87516999],[124.07756042,0.91709],[125.06597137,1.64326],[125.24049377,1.41983998],[124.43702698,0.42787001],[123.68554688,0.23560999],[122.72309113,0.43116],[121.0567627,0.38123],[120.18305206,0.23726],[120.04084778,-0.51964998],[120.93592072,-1.40889859],[121.47582245,-0.95596963],[123.34056854,-0.61565942],[123.25839996,-1.07621002],[122.82267761,-0.9309293],[122.38852692,-1.51683998],[121.50830078,-1.90447998],[122.45461273,-3.18603802],[122.27188873,-3.5294981],[123.1709671,-4.68367004],[123.16233063,-5.34057999],[122.62854767,-5.63459015],[122.23642731,-5.28295803],[122.71958923,-4.46418524],[121.73822784,-4.8513298],[121.48944855,-4.57457447],[121.61917114,-4.18847322],[120.89820862,-3.60208797],[120.9723587,-2.62764859],[120.30544281,-2.93161941],[120.39006042,-4.09754896],[120.43068695,-5.52821445],[119.79653168,-5.67338896],[119.36686707,-5.37985992],[119.65364075,-4.45942354],[119.4988327,-3.49440908],[119.07833862,-3.48700809],[118.76779938,-2.80200911],[119.18094635,-2.14712811],[119.32338715,-1.35313976],[119.82598114,0.15428001],[120.03568268,0.56647998],[120.88578033,1.30922997],[121.66678619,1.01392996],[122.92756653,0.87516999],[122.92756653,0.87516999]],[[126.87492371,-3.79096961],[126.18380737,-3.60736704],[125.98906708,-3.17725897],[127.00067139,-3.1293385],[127.2491684,-3.45906663],[126.87492371,-3.79096961],[126.87492371,-3.79096961]],[[129.37101746,-2.80214763],[130.47137451,-3.09375],[130.83479309,-3.85848999],[129.99055481,-3.44631004],[129.15527344,-3.36265898],[128.59068298,-3.42869902],[127.89890289,-3.39344954],[128.13587952,-2.84363866],[129.37101746,-2.80214763],[129.37101746,-2.80214763]],[[109.83022308,1.33813],[110.51405334,0.77311999],[111.15914154,0.97649997],[111.79753113,0.90442997],[112.38028717,1.41012001],[112.85978699,1.49778998],[113.80586243,1.21755004],[114.62135315,1.43068004],[115.13404083,2.82149005],[115.51905823,3.16922998],[115.86547089,4.30657005],[117.01522064,4.30610991],[117.88200378,4.13754988],[117.31323242,3.23442006],[118.04827881,2.28768992],[117.87564087,1.82763004],[118.99674225,0.90222001],[117.81182098,0.78424001],[117.47834778,0.10246],[117.52166748,-0.80372],[116.56006622,-1.48763883],[116.53378296,-2.48353004],[116.14811707,-4.01272917],[116.00086212,-3.65701723],[114.86480713,-4.10695314],[114.46865845,-3.49569798],[113.75566864,-3.43914962],[113.25697327,-3.1187675],[112.06813812,-3.47837663],[111.70327759,-2.9944272],[111.04827881,-3.04942799],[110.22383881,-2.93404007],[110.07092285,-1.59287858],[109.57199097,-1.31487882],[109.09191132,-0.45949966],[108.95262146,0.41536999],[109.06910706,1.34194005],[109.66326141,2.00646996],[109.83022308,1.33813],[109.83022308,1.33813]],[[141.00419617,-5.76999331],[141.01057434,-9.15706825],[140.14341736,-8.29716015],[139.12773132,-8.09604836],[138.88146973,-8.38092041],[137.61448669,-8.41166401],[138.03910828,-7.59788799],[138.66862488,-7.32024527],[138.40791321,-6.23284817],[137.92784119,-5.39336014],[135.98924255,-4.54655695],[135.1645813,-4.46295881],[133.66285706,-3.53887868],[133.36767578,-4.02481699],[132.98396301,-4.11295414],[132.75694275,-3.74625945],[132.7538147,-3.31180906],[131.98977661,-2.82055712],[133.06686401,-2.46039915],[133.7800293,-2.47985673],[133.69621277,-2.21453714],[132.23240662,-2.2125082],[131.83622742,-1.61713958],[130.94285583,-1.43253982],[130.51956177,-0.93769962],[131.86749268,-0.69544965],[132.38012695,-0.36953995],[133.98554993,-0.78022915],[134.1434021,-1.1518786],[134.42260742,-2.76916766],[135.45759583,-3.36773753],[136.29330444,-2.30701661],[137.44076538,-1.70349956],[138.32972717,-1.70265925],[139.18496704,-2.05130911],[139.92666626,-2.40902805],[141.00021362,-2.6001575],[141.00419617,-5.76999331],[141.00419617,-5.76999331]],[[134.21014404,-6.89525986],[134.72460938,-6.2143898],[134.727005,-5.73758411],[134.49960327,-5.44505405],[134.29029846,-5.78307438],[134.11279297,-6.14245987],[134.21014404,-6.89525986],[134.21014404,-6.89525986]],[[124.96868896,-8.89276791],[125.06999969,-9.08999252],[125.08853912,-9.39316082],[124.39399719,-10.18383598],[123.66903687,-10.39213657],[123.68347931,-9.65046406],[124.20195007,-9.21862602],[124.96868896,-8.89276791],[124.96868896,-8.89276791]]]}, -{code:"EG", name:"Egypt", borders:[[[34.92259979,29.50132942],[34.64173889,29.09942055],[34.42655182,28.34399033],[34.1545105,27.82329941],[33.92136002,27.64870071],[33.58811188,27.97135925],[33.13676071,28.41765022],[32.42322922,29.85107994],[32.32046127,29.76042938],[32.73482132,28.70523071],[33.3487587,27.69989014],[34.10454941,26.14226913],[34.47386932,25.59856033],[34.79507065,25.03375053],[35.69240952,23.92671013],[35.49372101,23.75237083],[35.5259819,23.10243988],[36.69068909,22.20484924],[36.86623001,22.],[32.90000153,22.],[29.02000046,22.],[25.,22.],[25.,25.68250084],[25.,29.23865509],[24.70006943,30.04418945],[24.95762062,30.66160011],[24.8028698,31.08929062],[25.16481972,31.56915092],[26.49533081,31.58568001],[27.45762062,31.32126045],[28.45047951,31.02577019],[28.91353035,30.87005043],[29.68342018,31.18685913],[30.09502983,31.47340012],[30.97693062,31.55586052],[31.68795967,31.42959976],[31.96040916,30.93359947],[32.19247055,31.26033974],[32.99391937,31.02407074],[33.77339935,30.96746063],[34.26544189,31.21936035],[34.92259979,29.50132942],[34.92259979,29.50132942]]]}, -{code:"SA", name:"Saudi Arabia", borders:[[[42.77933884,16.34790039],[43.21839142,16.66690063],[43.11579132,17.08843994],[43.38079834,17.57999039],[43.79151917,17.31999016],[44.06259918,17.41036034],[45.21667099,17.43333054],[45.40000153,17.33333015],[46.3666687,17.23332977],[46.75,17.28333092],[47.,16.95000076],[47.46667099,17.11667061],[48.18333054,18.16666985],[49.1166687,18.61667061],[52.,19.],[55.,20.],[55.66666031,22.],[55.20832825,22.70833015],[55.00683212,22.49694824],[52.00071716,23.00114632],[51.61772156,24.01422501],[51.57352066,24.42000008],[51.38959122,24.62738037],[51.11243057,24.55633926],[50.81011963,24.7547493],[50.66056824,24.99988937],[50.52737045,25.32781982],[50.23983002,25.60806084],[50.11330032,25.94397926],[50.21295166,26.27703094],[50.15243149,26.68965912],[49.47092819,27.10998917],[49.2995491,27.46122932],[48.80759811,27.68964005],[48.41611862,28.55203056],[47.70882034,28.52605057],[47.45980835,29.00251961],[46.56871033,29.09902],[44.70949936,29.17888069],[41.88999939,31.19000053],[40.40000153,31.88999939],[39.19549942,32.1609993],[39.00485992,32.01020813],[37.00217819,31.5084095],[37.99882889,30.50849915],[37.66815186,30.33867073],[37.5036087,30.00377083],[36.7405014,29.86528969],[36.5012207,29.50525093],[36.06895828,29.19750977],[34.9560318,29.35656929],[34.8321991,28.95747948],[34.78778839,28.6074295],[34.63235092,28.05853081],[35.1301918,28.06336021],[35.64020157,27.37652969],[36.24913025,26.57012939],[36.63959885,25.82621956],[36.93159866,25.60294914],[37.20948029,25.08453941],[37.15481949,24.85847092],[37.48363876,24.28549004],[38.02383041,24.07868004],[38.49274826,23.6884594],[39.06632996,22.57963943],[39.02368164,21.98686981],[39.13940048,21.29190063],[39.80167007,20.33885002],[40.24766159,20.17462921],[40.93933105,19.48648071],[41.22140884,18.67160034],[41.75437927,17.83304977],[42.27087021,17.47472954],[42.34798813,17.07582092],[42.64955902,16.77462006],[42.77933884,16.34790039],[42.77933884,16.34790039]]]}, -{code:"LY", name:"Libya", borders:[[[14.85130024,22.86294937],[14.14385033,22.4912796],[13.58145046,23.04051018],[11.9995203,23.47166061],[11.5606699,24.09790039],[10.77136993,24.56251907],[10.30385971,24.37931061],[9.94824028,24.93696022],[9.91069031,25.36544991],[9.31941986,26.09431076],[9.71629047,26.5121994],[9.62903976,27.14094925],[9.7560997,27.68825912],[9.68387985,28.14418983],[9.85999966,28.95999908],[9.80566025,29.42462921],[9.4821701,30.30755043],[9.9700098,30.53931999],[10.05659962,30.96183968],[9.95020962,31.37606049],[10.63687992,31.7614193],[10.9448204,32.08179855],[11.43225956,32.3689003],[11.48880005,33.13700104],[12.66331005,32.79278183],[13.08325958,32.87881851],[13.91868019,32.71195984],[15.24563026,32.2650795],[15.71393967,31.37626076],[16.61161995,31.1821804],[18.02108955,30.76357079],[19.08641052,30.26638985],[19.57403946,30.52581978],[20.05335045,30.98575974],[19.82032967,31.75178909],[20.13397026,32.23820114],[20.8545208,32.70679855],[21.54298019,32.84320068],[22.89575958,32.63858032],[23.23679924,32.19149017],[23.60913086,32.18725967],[23.92749977,32.01667023],[24.92114067,31.89936066],[25.16481972,31.56915092],[24.8028698,31.08929062],[24.95762062,30.66160011],[24.70006943,30.04418945],[25.,29.23865509],[25.,25.68250084],[25.,22.],[25.,20.00304031],[23.85000038,20.],[23.83765984,19.58046913],[19.84926033,21.49509048],[15.86085033,23.40971947],[14.85130024,22.86294937],[14.85130024,22.86294937]]]}, -{code:"YE", name:"Yemen", borders:[[[53.10858154,16.6510601],[52.38518906,16.38241959],[52.19171143,15.93844032],[52.16815948,15.59741974],[51.17248917,15.17523956],[49.57455063,14.70876026],[48.67921066,14.00319958],[48.23894882,13.9480896],[47.93891907,14.0072403],[47.35446167,13.59222031],[46.71709061,13.39970016],[45.87760925,13.34776974],[45.62506866,13.29094982],[45.40642929,13.02692032],[45.14437103,12.95394039],[44.98950958,12.69960022],[44.49459839,12.72165012],[44.17509842,12.5859499],[43.48299026,12.63679028],[43.22288895,13.22095966],[43.25146103,13.76758957],[43.08795929,14.06264019],[42.89226151,14.80224037],[42.60485077,15.21331978],[42.80500031,15.26196957],[42.70246124,15.71887016],[42.82363892,15.91174984],[42.77933884,16.34790039],[43.21839142,16.66690063],[43.11579132,17.08843994],[43.38079834,17.57999039],[43.79151917,17.31999016],[44.06259918,17.41036034],[45.21667099,17.43333054],[45.40000153,17.33333015],[46.3666687,17.23332977],[46.75,17.28333092],[47.,16.95000076],[47.46667099,17.11667061],[48.18333054,18.16666985],[49.1166687,18.61667061],[52.,19.],[52.78218079,17.34972954],[53.10858154,16.6510601],[53.10858154,16.6510601]]]}, -{code:"JP", name:"Japan", borders:[[[132.37120056,33.46363831],[132.92437744,34.06031036],[133.4929657,33.94462967],[133.90408325,34.36492157],[134.63844299,34.14921951],[134.7664032,33.80633926],[134.20343018,33.20119858],[133.79295349,33.52199173],[133.2802887,33.2895813],[133.01486206,32.70457077],[132.36308289,32.98939133],[132.37120056,33.46363831],[132.37120056,33.46363831]],[[144.61346436,43.96089935],[145.3208313,44.38476181],[145.5431366,43.26208878],[144.05963135,42.98834991],[143.18388367,41.99522018],[141.61149597,42.67879105],[141.06730652,41.58459091],[139.95507813,41.56954956],[139.81750488,42.56375122],[140.31214905,43.33325958],[141.38053894,43.38883972],[141.67195129,44.77212143],[141.96765137,45.55147934],[143.1428833,44.51037979],[143.91015625,44.17409134],[144.61346436,43.96089935],[144.61346436,43.96089935]],[[141.8846283,39.18085861],[140.95953369,38.17401123],[140.97637939,37.14205933],[140.59977722,36.34397125],[140.77406311,35.84288025],[140.25325012,35.13813019],[138.97549438,34.66759109],[137.21760559,34.60628128],[135.79299927,33.46480179],[135.12098694,33.84907913],[135.07943726,34.59656143],[133.34028625,34.37593842],[132.15678406,33.90493011],[130.9861145,33.88576126],[132.,33.15000153],[131.33282471,31.45034981],[130.68629456,31.02956963],[130.2024231,31.41823959],[130.44770813,32.31946182],[129.81469727,32.61032104],[129.40843201,33.29605865],[130.35391235,33.60414124],[130.87846375,34.23273849],[131.88423157,34.74972153],[132.61767578,35.4333992],[134.60830688,35.73160934],[135.67750549,35.52714157],[136.72383118,37.30498886],[137.39064026,36.82738876],[138.8576355,37.82748032],[139.42640686,38.21596909],[140.05477905,39.43880081],[139.88334656,40.56330109],[140.30578613,41.19501877],[141.36897278,41.37857056],[141.91426086,39.99161911],[141.8846283,39.18085861],[141.8846283,39.18085861]]]}, -{code:"ER", name:"Eritrea", borders:[[[42.35155869,12.54222965],[42.00975037,12.86581993],[41.59856033,13.45209026],[41.15520096,13.77332973],[40.89659882,14.11863995],[40.02624893,14.51959038],[39.3406105,14.53155041],[39.09939957,14.74063969],[38.5129509,14.50547028],[37.90607071,14.95942974],[37.59376907,14.21310043],[36.42950821,14.4221096],[36.3232193,14.82248974],[36.75389099,16.29186058],[36.85253143,16.9565506],[37.16746902,17.26313972],[37.90399933,17.42753983],[38.41007996,17.99830055],[38.9906311,16.8406105],[39.26612091,15.92273045],[39.81428146,15.43564034],[41.17927933,14.49106979],[41.73492813,13.92103004],[42.27684021,13.34397984],[42.58956146,13.00043011],[43.08123016,12.69964981],[42.77962112,12.45541],[42.35155869,12.54222965],[42.35155869,12.54222965]]]}, -{code:"DJ", name:"Djibouti", borders:[[[43.08123016,12.69964981],[43.31785965,12.39015007],[43.28638077,11.9749403],[42.7158699,11.73565006],[43.14527893,11.46205044],[42.77682877,10.92687035],[42.55493164,11.10511017],[42.31414032,11.03419971],[41.75556946,11.05091],[41.73958969,11.35511017],[41.66175842,11.63119984],[42.,12.10000038],[42.35155869,12.54222965],[42.77962112,12.45541],[43.08123016,12.69964981],[43.08123016,12.69964981]]]}, -{code:"CZ", name:"Czech Republic", borders:[[[16.96030045,48.5969696],[16.4993,48.78580856],[16.02964973,48.73389816],[15.25341034,49.03908157],[14.90143967,48.9643898],[14.33887959,48.55530167],[13.59593964,48.87717056],[13.03131008,49.3070488],[12.52105045,49.54740143],[12.41518974,49.96912003],[12.24009991,50.26631927],[12.96683979,50.48408127],[13.33810043,50.73321915],[14.05622959,50.9269104],[14.30700016,51.11727142],[14.57075024,51.00233841],[15.01696968,51.10668182],[15.49094963,50.784729],[16.23863029,50.69773865],[16.17624092,50.42263031],[16.71949005,50.2157402],[16.86874008,50.47399139],[17.55456924,50.36212921],[17.64942932,50.04904175],[18.39289093,49.98865128],[18.85313988,49.49623108],[18.55500031,49.49499893],[18.39999962,49.31499863],[18.1704998,49.27149963],[18.10499954,49.04399872],[17.91349983,48.99649811],[17.8864994,48.9034996],[17.54500008,48.79999924],[17.10199928,48.81700134],[16.96030045,48.5969696],[16.96030045,48.5969696]]]}, -{code:"SK", name:"Slovakia", borders:[[[18.85313988,49.49623108],[18.90957069,49.43585968],[19.32069969,49.57157135],[19.82504082,49.21712875],[20.41583061,49.43146133],[20.88796043,49.32878876],[21.60779953,49.47008896],[22.55816078,49.08573914],[22.28082085,48.82542038],[22.08562088,48.42224884],[21.87223053,48.31996918],[20.80130005,48.62385178],[20.47356987,48.56285095],[20.23904037,48.32757187],[19.76944923,48.20267868],[19.66135979,48.26663971],[19.17436028,48.11138916],[18.77704048,48.08174896],[18.69651031,47.88097],[17.85714912,47.75843048],[17.48848915,47.86748123],[16.9796505,48.12350082],[16.87999916,48.47000122],[16.96030045,48.5969696],[17.10199928,48.81700134],[17.54500008,48.79999924],[17.8864994,48.9034996],[17.91349983,48.99649811],[18.10499954,49.04399872],[18.1704998,49.27149963],[18.39999962,49.31499863],[18.55500031,49.49499893],[18.85313988,49.49623108],[18.85313988,49.49623108]]]}, -{code:"FI", name:"Finland", borders:[[[28.59193993,69.06478882],[28.44594955,68.36463165],[29.97743034,67.69828796],[29.05459976,66.94428253],[30.21764946,65.80597687],[29.54443932,64.94866943],[30.44470024,64.20445251],[30.0358696,63.5528183],[31.51610947,62.8676796],[31.14001083,62.3576889],[30.21110916,61.7800293],[28.06999969,60.50352097],[26.25519943,60.42396164],[24.4966507,60.05731964],[22.86971092,59.84635925],[22.29077911,60.39192963],[21.32222939,60.72018051],[21.54486084,61.70531845],[21.05919075,62.60739136],[21.53602028,63.18973923],[22.44275093,63.8178215],[24.73052979,64.90236664],[25.39809036,65.11144257],[25.29402924,65.5343399],[23.9033699,66.00691223],[23.56587029,66.39607239],[23.53948975,67.93601227],[21.9785099,68.61685181],[20.64558983,69.10624695],[21.2449398,69.37046051],[22.35622978,68.84174347],[23.66205978,68.89124298],[24.73567963,68.64956665],[25.68922043,69.09211731],[26.17959976,69.82527924],[27.73229027,70.16417694],[29.01556015,69.76648712],[28.59193993,69.06478882],[28.59193993,69.06478882]]]}, -{code:"SI", name:"Slovenia", borders:[[[13.80648041,46.50928879],[14.63249016,46.43181992],[15.1370697,46.65869904],[16.01166916,46.68360138],[16.20228004,46.85237885],[16.37047958,46.84130859],[16.56483078,46.50374985],[15.76871967,46.23814011],[15.6715498,45.8341713],[15.32394981,45.73180008],[15.32769012,45.45233917],[14.93523979,45.47171021],[14.59512043,45.63496017],[14.41197968,45.46617889],[13.71506023,45.50032043],[13.93764019,45.59103012],[13.6980896,46.01678848],[13.80648041,46.50928879],[13.80648041,46.50928879]]]}, -{code:"BN", name:"Brunei Darussalam", borders:[[[114.20401764,4.52585983],[114.59999847,4.9000001],[115.45072174,5.44772005],[115.4056778,4.95523024],[115.34745789,4.31664991],[114.86956024,4.34832001],[114.65956879,4.00763988],[114.20401764,4.52585983],[114.20401764,4.52585983]]]}, -{code:"MY", name:"Malaysia", borders:[[[109.66326141,2.00646996],[110.39614105,1.66376996],[111.16887665,1.85063004],[111.37010956,2.69729996],[111.79689789,2.88589001],[112.99564362,3.10240006],[113.71292877,3.8935101],[114.20401764,4.52585983],[114.65956879,4.00763988],[114.86956024,4.34832001],[115.34745789,4.31664991],[115.4056778,4.95523024],[115.45072174,5.44772005],[116.22075653,6.14319992],[116.7250824,6.92477989],[117.12963867,6.92805004],[117.64335632,6.42217016],[117.68907928,5.98750019],[118.34770203,5.70870018],[119.18186951,5.40783978],[119.11071014,5.01613998],[118.43977356,4.96651983],[118.61830902,4.47820997],[117.88200378,4.13754988],[117.01522064,4.30610991],[115.86547089,4.30657005],[115.51905823,3.16922998],[115.13404083,2.82149005],[114.62135315,1.43068004],[113.80586243,1.21755004],[112.85978699,1.49778998],[112.38028717,1.41012001],[111.79753113,0.90442997],[111.15914154,0.97649997],[110.51405334,0.77311999],[109.83022308,1.33813],[109.66326141,2.00646996],[109.66326141,2.00646996]],[[102.14118195,6.2216301],[102.37110901,6.12819004],[102.96172333,5.52448988],[103.38124084,4.85501003],[103.438591,4.18159008],[103.33213806,3.72670007],[103.4294281,3.38285995],[103.50247192,2.7910099],[103.85466766,2.51545],[104.24796295,1.63115001],[104.2288208,1.29304004],[103.51966858,1.22633004],[102.5736618,1.96712005],[101.39060974,2.7608099],[101.27355957,3.27029991],[100.6954422,3.93915009],[100.55741882,4.7672801],[100.1967392,5.3125],[100.30628967,6.04055977],[100.08576202,6.46447992],[100.25959778,6.6428299],[101.0754776,6.20487022],[101.15421295,5.69138002],[101.81430817,5.81080008],[102.14118195,6.2216301],[102.14118195,6.2216301]]]}, -{code:"PH", name:"Philippines", borders:[[[125.50257111,12.1626997],[125.78343201,11.04613018],[125.0118866,11.31147003],[125.03275299,10.97583008],[125.2775116,10.35873032],[124.80184937,10.13469028],[124.76013184,10.83800983],[124.45909119,10.88992977],[124.30249786,11.4953804],[124.89105225,11.41557026],[124.8780365,11.79419041],[124.26674652,12.55776024],[125.22714996,12.53573036],[125.50257111,12.1626997],[125.50257111,12.1626997]],[[122.03835297,11.41584969],[121.88353729,11.89175034],[122.48383331,11.58220005],[123.12020874,11.58366013],[123.10083771,11.16592026],[122.63771057,10.74131012],[122.00260162,10.44102001],[121.96736145,10.9056797],[122.03835297,11.41584969],[122.03835297,11.41584969]],[[122.33698273,18.22488022],[122.17430878,17.81027985],[122.51569366,17.09350967],[122.25228882,16.26244926],[121.66277313,15.93103027],[121.50504303,15.12481022],[121.72882843,14.32837963],[122.25894165,14.21821022],[122.70126343,14.33654976],[123.95025635,13.78213024],[123.85514069,13.23777962],[124.18126678,12.99752998],[124.07739258,12.53668022],[123.29805756,13.02752972],[122.92867279,13.55292034],[122.6713562,13.18583012],[122.03468323,13.78448009],[121.12641907,13.63669968],[120.62863922,13.85766029],[120.67939758,14.27099991],[120.99179077,14.52540016],[120.69333649,14.75667953],[120.56411743,14.39628029],[120.07045746,14.97087955],[119.92092133,15.40633965],[119.88374329,16.36368942],[120.28648376,16.03462982],[120.39006042,17.59907913],[120.71589661,18.50523949],[121.32128906,18.50406075],[121.93762207,18.21855927],[122.24604034,18.4789505],[122.33698273,18.22488022],[122.33698273,18.22488022]],[[118.50457001,9.31637001],[117.17429352,8.36750984],[117.6644516,9.06688976],[118.3868866,9.6844902],[118.98735046,10.37629032],[119.5114975,11.36966038],[119.68968201,10.55430031],[119.02945709,10.0036602],[118.50457001,9.31637001],[118.50457001,9.31637001]],[[126.37684631,8.41471004],[126.47855377,7.75035],[126.53743744,7.18939018],[126.19676208,6.27429008],[125.83144379,7.29370022],[125.36385345,6.78647995],[125.68315887,6.04967022],[125.39650726,5.58100986],[124.21977997,6.16134977],[123.93874359,6.88512993],[124.2436676,7.36061001],[123.61019897,7.83353996],[123.2960968,7.41887999],[122.8254776,7.45737982],[122.08551025,6.89941978],[121.91992188,7.19211006],[122.31233978,8.03495026],[122.94242096,8.31622982],[123.48764801,8.69301987],[123.84117126,8.24030972],[124.60147095,8.51414967],[124.7645874,8.96039963],[125.4713974,8.98698997],[125.41210175,9.7603302],[126.22271729,9.28608036],[126.30660248,8.78248024],[126.37684631,8.41471004],[126.37684631,8.41471004]],[[122.58609009,9.98104],[122.83711243,10.2611599],[122.94741058,10.88185978],[123.49887848,10.94062996],[123.33776855,10.26737976],[124.07797241,11.23272991],[123.98245239,10.27877998],[123.62315369,9.95007992],[123.30991364,9.31826973],[122.99588013,9.02219963],[122.38007355,9.7133503],[122.58609009,9.98104],[122.58609009,9.98104]],[[120.83393097,12.70450974],[120.32343292,13.46640015],[121.18010712,13.42969036],[121.5273819,13.06958961],[121.26222229,12.20557022],[120.83393097,12.70450974],[120.83393097,12.70450974]]]}, -{code:"RU", name:"Russia", borders:[[[142.9145813,53.7045784],[143.26087952,52.74077988],[143.23527527,51.75666046],[143.64802551,50.74763107],[144.65414429,48.97639084],[143.17396545,49.30654144],[142.55865479,47.86156082],[143.53349304,46.83671188],[143.50531006,46.13790131],[142.74768066,46.7407608],[142.09205627,45.96677017],[141.90692139,46.80593872],[142.01841736,47.78012085],[141.90446472,48.85916901],[142.13580322,49.61516953],[142.17999268,50.95233154],[141.59408569,51.93542862],[141.68255615,53.30195999],[142.60690308,53.76213837],[142.20973206,54.22546005],[142.65480042,54.36587906],[142.9145813,53.7045784],[142.9145813,53.7045784]],[[53.50828934,73.74980927],[55.90245819,74.62747192],[55.63195038,75.0814209],[57.86862183,75.60939789],[61.1700592,76.25186157],[64.49838257,76.43904114],[66.21095276,76.80977631],[68.15705109,76.93969727],[68.85221863,76.54480743],[68.18054962,76.23364258],[64.63732147,75.73773956],[61.58351135,75.26087189],[58.47705078,74.30906677],[56.98680115,73.33303833],[55.41934967,72.37126923],[55.62282181,71.54060364],[57.53567886,70.72046661],[56.94501114,70.63275146],[53.67734909,70.76264191],[53.41201019,71.2066803],[51.60189056,71.47476959],[51.45576096,72.01489258],[52.47827911,72.2294693],[52.44414902,72.77474976],[54.42760849,73.62754059],[53.50828934,73.74980927],[53.50828934,73.74980927]],[[19.66064072,54.42610168],[19.88850021,54.86616898],[21.26844025,55.19047928],[22.31571007,55.01530838],[22.75774956,54.8565712],[22.65102005,54.58274078],[22.73109055,54.32754898],[20.89224052,54.31253052],[19.66064072,54.42610168],[19.66064072,54.42610168]],[[44.84695816,80.58984375],[47.0724411,80.5594101],[46.50284958,80.24726105],[47.58610916,80.01017761],[48.75492859,80.17546844],[48.89442062,80.33956909],[49.79365921,80.41542816],[51.13619995,80.54727173],[51.52294922,80.69972992],[50.03974915,80.91887665],[49.09720993,80.75399017],[48.52281952,80.51454926],[48.31848907,80.78401947],[46.79914093,80.77192688],[44.84695816,80.58984375],[44.84695816,80.58984375]],[[93.77765656,81.02459717],[95.94089508,81.25039673],[97.8838501,80.74697876],[100.18665314,79.78013611],[99.9397583,78.8809433],[97.7579422,78.7562027],[94.97258759,79.0447464],[93.31288147,79.42649841],[92.54540253,80.1437912],[91.18106842,80.34146118],[93.77765656,81.02459717],[93.77765656,81.02459717]],[[102.83781433,79.28128815],[105.37242889,78.71334076],[105.07546997,78.3068924],[99.43814087,77.92099762],[101.26490021,79.23399353],[102.08634949,79.34641266],[102.83781433,79.28128815],[102.83781433,79.28128815]],[[138.83106995,76.1367569],[141.47161865,76.09288788],[145.08628845,75.56262207],[144.30000305,74.81999969],[140.61381531,74.84767914],[138.95544434,74.61148071],[136.97439575,75.26167297],[137.51176453,75.94917297],[138.83106995,76.1367569],[138.83106995,76.1367569]],[[148.222229,75.34584808],[150.73167419,75.08406067],[149.57592773,74.68891907],[147.97746277,74.77835846],[146.1191864,75.17298126],[146.35848999,75.49681854],[148.222229,75.34584808],[148.222229,75.34584808]],[[180.97567749,71.55552673],[182.42205811,71.26947784],[182.33642578,71.13276672],[181.30621338,70.89302063],[178.90342712,70.78114319],[178.72529602,71.09880066],[180.12812805,71.55761719],[180.97567749,71.55552673],[180.97567749,71.55552673]],[[139.8631134,73.36982727],[140.81170654,73.76506042],[142.06207275,73.85758209],[143.48283386,73.47525024],[143.60385132,73.21244049],[142.08763123,73.20543671],[140.03816223,73.31691742],[139.8631134,73.36982727],[139.8631134,73.36982727]],[[41.12594986,66.7915802],[40.01583099,66.26618195],[38.38294983,65.99952698],[33.9187088,66.75961304],[33.18444061,66.63253021],[34.81476974,65.90014648],[34.94390869,64.41436768],[36.23128891,64.10945129],[37.01272964,63.84983063],[37.14197159,64.33470917],[36.51760101,64.78014374],[37.17604065,65.14321899],[39.59344864,64.5207901],[40.43560028,64.7644577],[39.76259995,65.49681854],[42.09309006,66.47622681],[43.0160408,66.4185791],[43.94974899,66.06907654],[44.53226089,66.75634003],[43.69839096,67.35244751],[44.18795013,67.95050812],[43.45281982,68.57079315],[46.25,68.25],[46.82133865,67.68997192],[45.55516815,67.56652069],[45.56201935,67.01004791],[46.34915161,66.6676712],[47.89416122,66.884552],[48.13875961,67.52237701],[50.22766113,67.99867249],[53.71743011,68.85738373],[54.47171021,68.80815125],[53.48582077,68.2013092],[54.72628021,68.09702301],[55.44268036,68.43865967],[57.31702042,68.46627808],[58.80199814,68.88082123],[59.94142151,68.27844238],[61.0778389,68.94068909],[60.02999878,69.51999664],[60.54999924,69.84999847],[63.50400162,69.5473938],[64.88811493,69.23483276],[66.76215363,68.64403534],[68.51216125,68.09233093],[69.18067932,68.6156311],[68.16443634,69.1443634],[68.13522339,69.35649109],[66.9300766,69.45461273],[67.259758,69.9287262],[66.72492218,70.70889282],[66.69465637,71.02896881],[68.54006195,71.93450165],[69.19635773,72.8433609],[69.94000244,73.04000092],[72.58753967,72.77629089],[72.79602814,72.22006226],[71.84810638,71.40898132],[72.47010803,71.09018707],[72.79187775,70.3911438],[72.56469727,69.02085114],[73.66786957,68.40789795],[73.23870087,67.74040222],[71.27999878,66.31999969],[72.42301178,66.17266846],[72.82077026,66.53266907],[73.92098999,66.78945923],[74.18650818,67.2842865],[75.05200195,67.76046753],[74.46926117,68.32898712],[74.93583679,68.98918152],[73.84236145,69.07145691],[73.60186768,69.62763214],[74.39980316,70.63175201],[73.10109711,71.44716644],[74.89082336,72.12119293],[74.65926361,72.83226776],[75.15801239,72.85497284],[75.68350983,72.30056],[75.28897858,71.33556366],[76.35910797,71.15287018],[75.90312958,71.87400818],[77.57665253,72.26717377],[79.65202332,72.32010651],[81.5,71.75],[80.61071014,72.5828476],[80.51109314,73.64820099],[82.25,73.84999847],[84.65525818,73.8059082],[86.82230377,73.93688202],[86.00955963,74.45967102],[87.16681671,75.11643219],[88.31571198,75.14392853],[90.26000214,75.63999939],[92.90058136,75.77333069],[93.23420715,76.04720306],[95.86000061,76.13999939],[96.6782074,75.91548157],[98.92253876,76.44689178],[100.75966644,76.43028259],[101.03531647,76.8618927],[101.9908371,77.28753662],[104.35160065,77.69792175],[106.06664276,77.37389374],[104.70500183,77.12740326],[106.97013092,76.97418976],[107.23999786,76.48000336],[108.15380096,76.72335052],[111.07726288,76.70999908],[113.33151245,76.22223663],[114.13417053,75.84764099],[113.88539124,75.32778931],[112.77918243,75.03186035],[110.15125275,74.47673035],[109.40000153,74.18000031],[110.63999939,74.04000092],[112.1191864,73.78774261],[113.01953888,73.97692871],[113.52957916,73.33505249],[113.96881104,73.59487915],[115.56781769,73.75285339],[118.77632904,73.58772278],[119.01999664,73.12000275],[123.20066071,72.97122192],[123.25776672,73.73503113],[125.37999725,73.55999756],[126.97644043,73.56549072],[128.59126282,73.03871155],[129.05157471,72.39871979],[128.46000671,71.98000336],[129.71598816,71.19303894],[131.28857422,70.7869873],[132.25349426,71.83630371],[133.85766602,71.3864212],[135.56193542,71.65525055],[137.49754333,71.34763336],[138.23408508,71.62802887],[139.86982727,71.48783112],[139.14790344,72.4161911],[140.46817017,72.84941101],[149.5,72.19999695],[150.35118103,71.60643005],[152.96890259,70.84221649],[157.00688171,71.03141022],[158.99778748,70.86672211],[159.83030701,70.45323944],[159.70866394,69.72197723],[160.9405365,69.43727875],[162.27906799,69.64203644],[164.05247498,69.66822815],[165.94036865,69.47199249],[167.83566284,69.58268738],[169.57763672,68.69380188],[170.81687927,69.01363373],[170.00819397,69.65276337],[170.45344543,70.09703064],[173.64390564,69.81742859],[175.72402954,69.87725067],[178.6000061,69.40000153],[182.44999695,68.19999695],[185.07174683,67.20588684],[184.98574829,66.58435059],[185.66017151,66.33556366],[185.42817688,67.06218719],[188.14268494,66.91307831],[190.10041809,65.97724152],[189.1089325,65.54138947],[187.46975708,65.43791199],[187.44500732,64.46079254],[187.04466248,64.25269318],[186.1081543,64.2826004],[185.34608459,64.63124847],[184.01646423,64.92288208],[183.79284668,65.35666656],[182.77734375,65.52024078],[181.64007568,65.39051819],[181.09667969,65.74044037],[181.31388855,66.11210632],[180.1162262,65.8745575],[180.56732178,65.40411377],[179.99281311,64.97432709],[178.7071991,64.53492737],[177.4112854,64.6082077],[178.31300354,64.07592773],[178.9082489,63.25196838],[179.37034607,62.98262024],[179.48635864,62.56893921],[179.22825623,62.30410004],[177.36430359,62.52190018],[174.56929016,61.76914978],[173.68013,61.65261078],[172.1499939,60.95000076],[170.69850159,60.33618164],[170.33085632,59.88177109],[168.90046692,60.57355118],[166.29498291,59.78855133],[165.83999634,60.15999985],[164.8767395,59.73160172],[163.53929138,59.86870956],[163.21711731,59.21100998],[162.01733398,58.2432785],[162.05296326,57.83911896],[163.19190979,57.61502838],[163.05793762,56.15924072],[162.12957764,56.12218857],[161.70146179,55.28567886],[162.11749268,54.85514069],[160.36877441,54.34432983],[160.02172852,53.20257187],[158.53094482,52.9586792],[158.23118591,51.9426918],[156.78979492,51.01105118],[156.41999817,51.70000076],[155.99182129,53.15895081],[155.43365479,55.38103104],[155.91441345,56.76792145],[156.75814819,57.36470032],[156.81034851,57.83203888],[158.36433411,58.0557518],[160.15063477,59.31476974],[161.87203979,60.3429985],[163.66969299,61.14089966],[164.47355652,62.55060959],[163.25842285,62.46627045],[162.65791321,61.64250183],[160.12147522,60.54423141],[159.30232239,61.77396011],[156.72067261,61.43442154],[154.21806335,59.75817871],[155.04374695,59.14495087],[152.81184387,58.8838501],[151.26573181,58.78089142],[151.33815002,59.50395966],[149.78370667,59.6557312],[148.54481506,59.1644783],[145.48721313,59.33636856],[142.19781494,59.03998184],[138.95848083,57.08805084],[135.12619019,54.72959137],[136.70170593,54.60354996],[137.19342041,53.97732162],[138.16470337,53.7550087],[138.80462646,54.25455093],[139.90150452,54.18967819],[141.3453064,53.08956909],[141.37922668,52.23876953],[140.59742737,51.2396698],[140.51307678,50.04552841],[140.06193542,48.44670868],[138.55471802,46.99964905],[138.2197113,46.30794907],[136.86231995,45.14350128],[135.51535034,43.98899841],[134.86938477,43.39820862],[133.53686523,42.81147003],[132.90626526,42.79848862],[132.27807617,43.28456116],[130.93586731,42.55273819],[130.77999878,42.22000122],[130.63999939,42.39500046],[130.63386536,42.90301132],[131.14471436,42.92998886],[131.28858948,44.11151123],[131.02519226,44.96796036],[131.88342285,45.32115936],[133.09712219,45.14408875],[133.76966858,46.11692047],[134.11235046,47.21247864],[134.50080872,47.57844925],[135.02632141,48.47822952],[133.37356567,48.18344116],[132.50668335,47.7889595],[130.98725891,47.79013062],[130.58229065,48.72969055],[129.39782715,49.44060135],[127.65740204,49.76026917],[127.2874527,50.73981094],[126.93914795,51.35388947],[126.56443024,51.7842598],[125.94638062,52.79280853],[125.06820679,53.16104889],[123.57147217,53.45880127],[122.24575806,53.43172836],[121.00306702,53.25139999],[120.17710114,52.75391006],[120.72576904,52.51623917],[120.73819733,51.96411133],[120.18208313,51.64355087],[119.27938843,50.58292007],[119.28842926,50.14287949],[117.87924194,49.51100159],[116.6787796,49.88856125],[115.48571014,49.80516815],[114.96209717,50.14027023],[114.36248779,50.24829865],[112.89772797,49.54357147],[111.58123779,49.37794876],[110.6619873,49.13014984],[109.40245056,49.29296112],[108.47518158,49.28255081],[107.86818695,49.79372025],[106.88883209,50.27428055],[105.88661194,50.40602112],[104.62158203,50.27531815],[103.67653656,50.08996964],[102.25588989,50.51055908],[102.06520844,51.25991058],[100.88950348,51.51684952],[99.98175812,51.63401031],[98.86145782,52.04737854],[97.82572937,51.01100922],[98.2317276,50.42238998],[97.259758,49.72605133],[95.81401825,49.97745895],[94.815979,50.0134201],[94.14756775,50.48052979],[93.1042099,50.49528885],[92.23468781,50.80218124],[90.71366119,50.33179855],[88.80554199,49.47053909],[87.75128937,49.29719925],[87.36000061,49.21500015],[86.82935333,49.82667923],[85.54128265,49.69285965],[85.11557007,50.11730957],[84.41638947,50.31142044],[83.935112,50.88925171],[83.38300323,51.06919098],[81.94596863,50.81221008],[80.56846619,51.38835907],[80.03556061,50.86476135],[77.80091095,53.40441132],[76.52520752,54.17702866],[76.89111328,54.49052048],[74.38481903,53.5468483],[73.4256897,53.4897995],[73.50853729,54.0356102],[72.22413635,54.37665176],[71.18015289,54.13330078],[70.86525726,55.16973877],[69.06816864,55.38526154],[68.16909027,54.97040176],[65.66687012,54.60124969],[65.17854309,54.35422897],[61.43659973,54.00624847],[60.97806168,53.66500854],[61.70000076,52.97999954],[60.74000168,52.72000122],[60.92723846,52.44754028],[59.96754074,51.9604187],[61.58797836,51.2726593],[61.33742142,50.79904938],[59.93281937,50.84220123],[59.64226913,50.5454483],[58.3633194,51.06364059],[56.7779808,51.04354858],[55.71694183,50.62171173],[54.53289032,51.02622986],[52.32875061,51.71866989],[50.76663971,51.6927681],[48.70235062,50.60512924],[48.57785034,49.87475967],[47.54949951,50.45468903],[46.75157166,49.35599899],[47.04364014,49.15206909],[46.46644974,48.39416885],[47.31523895,47.71585083],[48.05725098,47.7437706],[48.6947403,47.07564163],[48.59325027,46.56103897],[49.10115814,46.39933014],[48.64540863,45.80628967],[47.67591095,45.64149094],[46.68201065,44.60919952],[47.59093857,43.66016006],[47.49251938,42.9865799],[48.58436966,41.80887985],[47.9872818,41.40581894],[47.81565857,41.15140915],[47.37332916,41.21974182],[46.68606949,41.82712936],[46.40497971,41.86067963],[45.77640152,42.09244156],[45.47026062,42.50276947],[44.53763962,42.7120018],[43.93120956,42.55495834],[43.75598907,42.74082947],[42.39440155,43.22029877],[40.92219162,43.38214874],[40.07693863,43.55308914],[39.95500183,43.43500137],[38.68000031,44.27999878],[37.53911972,44.6572113],[36.67546082,45.24468994],[37.40317154,45.4045105],[38.2329483,46.24087143],[37.67372131,46.63656998],[39.14767075,47.04475021],[39.12120056,47.26335907],[38.22356033,47.10218811],[38.25511169,47.54640961],[38.77056885,47.82561874],[39.73828125,47.8989296],[39.89561844,48.23241043],[39.67464828,48.78382111],[40.08079147,49.30744171],[40.06903839,49.60105133],[38.59500885,49.92646027],[38.01063919,49.91566086],[37.39345932,50.38396835],[36.62614822,50.22558975],[35.35612869,50.57720184],[35.37791061,50.77394104],[35.02220917,51.2075882],[34.22481155,51.25600815],[34.14197922,51.56642914],[34.39175034,51.76887131],[33.75268173,52.33507919],[32.71575928,52.2384491],[32.41207123,52.28871155],[32.15943909,52.06124878],[31.78597069,52.10168076],[31.54000092,52.74208069],[31.30521011,53.07400131],[31.49764061,53.16743088],[32.30455017,53.13272858],[32.69366074,53.35145187],[32.40557861,53.61804962],[31.73127937,53.79402924],[31.79141998,53.97462845],[31.38448906,54.15703964],[30.75754929,54.81177139],[30.97184944,55.0815506],[30.87393951,55.55099869],[29.89631081,55.7894516],[29.37154007,55.67010117],[29.22953033,55.91836929],[28.17670059,56.16913986],[27.85528946,56.75931168],[27.77004051,57.24423981],[27.2881794,57.47452164],[27.7166996,57.79190063],[27.42015076,58.72457123],[28.13170052,59.30083084],[27.98111916,59.4753685],[29.11770058,60.02804947],[28.06999969,60.50352097],[30.21110916,61.7800293],[31.14001083,62.3576889],[31.51610947,62.8676796],[30.0358696,63.5528183],[30.44470024,64.20445251],[29.54443932,64.94866943],[30.21764946,65.80597687],[29.05459976,66.94428253],[29.97743034,67.69828796],[28.44594955,68.36463165],[28.59193993,69.06478882],[29.39954948,69.15692139],[31.10107994,69.5581131],[32.13272095,69.90595245],[33.77547073,69.30142212],[36.51396179,69.06342316],[40.29233932,67.93240356],[41.05987167,67.45713043],[41.12594986,66.7915802],[41.12594986,66.7915802]]]}, -{code:"GE", name:"Georgia", borders:[[[41.55408096,41.53564835],[41.70315933,41.96295166],[41.45346832,42.64513016],[40.87548828,43.01361847],[40.32138824,43.12863159],[39.95500183,43.43500137],[40.07693863,43.55308914],[40.92219162,43.38214874],[42.39440155,43.22029877],[43.75598907,42.74082947],[43.93120956,42.55495834],[44.53763962,42.7120018],[45.47026062,42.50276947],[45.77640152,42.09244156],[46.40497971,41.86067963],[46.145401,41.72280121],[46.63793945,41.18167114],[46.50164032,41.06444168],[45.96260071,41.12387848],[45.21744156,41.41144943],[44.96324921,41.24708939],[43.58274078,41.0921402],[42.61957932,41.58317947],[41.55408096,41.53564835],[41.55408096,41.53564835]]]}, -{code:"AZ", name:"Azerbaijan", borders:[[[46.14360809,38.74119949],[45.45774841,38.87413025],[44.95270157,39.33576965],[44.78858185,39.71701813],[45.0019989,39.74000168],[45.29816818,39.47174835],[45.74000168,39.47399902],[45.73535919,39.31972122],[46.14360809,38.74119949],[46.14360809,38.74119949]],[[46.40497971,41.86067963],[46.68606949,41.82712936],[47.37332916,41.21974182],[47.81565857,41.15140915],[47.9872818,41.40581894],[48.58436966,41.80887985],[49.11027145,41.28227997],[49.61893082,40.57291031],[50.08486176,40.52618027],[50.39281082,40.25656891],[49.56917191,40.17610931],[49.39522934,39.39947891],[49.2232399,39.04920959],[48.85652924,38.81549072],[48.88327026,38.32025909],[48.63436127,38.27037811],[48.01073837,38.79402161],[48.35551071,39.28874969],[48.06008148,39.58224106],[47.68508148,39.50836182],[46.50572968,38.77059937],[46.48350906,39.46414948],[46.0345192,39.62802124],[45.61000061,39.90000153],[45.89191055,40.21847916],[45.35919189,40.56148911],[45.56032181,40.81229019],[45.17947006,40.98537064],[44.96343994,41.2461319],[44.96324921,41.24708939],[45.21744156,41.41144943],[45.96260071,41.12387848],[46.50164032,41.06444168],[46.63793945,41.18167114],[46.145401,41.72280121],[46.40497971,41.86067963],[46.40497971,41.86067963]]]}, -{code:"GB", name:"United Kingdom", borders:[[[-4.21149635,58.55083847],[-3.00499821,58.63499832],[-4.07383442,57.55300903],[-3.05499673,57.68999863],[-1.95928907,57.68479156],[-2.2199986,56.86999893],[-3.11900806,55.97380066],[-2.08499813,55.90999985],[-1.11499953,54.625],[-0.43049958,54.46437836],[0.185,53.32500076],[0.47,52.93000031],[1.68151999,52.73952103],[1.55999994,52.09999847],[1.05058002,51.80678177],[1.44983995,51.28940964],[0.55035001,50.76573181],[-0.78749979,50.77500153],[-2.48999953,50.5],[-2.95624852,50.69688034],[-3.61744761,50.22834015],[-4.54250431,50.34183121],[-5.24499798,49.95999908],[-5.77657413,50.15969086],[-4.30999517,51.20999908],[-3.4148376,51.42599869],[-4.98435926,51.59347153],[-5.26730442,51.99140167],[-4.22232628,52.30136871],[-4.76999331,52.84000015],[-4.57999611,53.49499893],[-3.09204721,53.40446854],[-2.94499946,53.98500061],[-3.62999821,54.61500168],[-4.84414339,54.79098129],[-5.0825243,55.06159973],[-4.71910715,55.50846863],[-5.04799318,55.7840004],[-5.58638,55.31116104],[-5.64499331,56.27500153],[-6.14999533,56.78499985],[-5.78682423,57.81884003],[-5.00999641,58.63000107],[-4.21149635,58.55083847],[-4.21149635,58.55083847]],[[-7.57214451,55.13162994],[-7.36600733,54.59582138],[-7.57214451,54.05997086],[-6.95372534,54.07371902],[-6.19789791,53.86758041],[-5.66193008,54.55459976],[-6.73384714,55.17287064],[-7.57214451,55.13162994],[-7.57214451,55.13162994]]]}, -{code:"DK", name:"Denmark", borders:[[[12.37088966,56.11138916],[12.68999958,55.61000061],[12.09000015,54.79999924],[11.04356003,55.36486816],[10.90390015,55.77996826],[12.37088966,56.11138916],[12.37088966,56.11138916]],[[8.52620983,54.96273041],[8.12032032,55.51771927],[8.09000015,56.54000092],[8.25656033,56.80998993],[8.54343987,57.11000824],[9.42444038,57.17205811],[9.77556038,57.44794083],[10.57999992,57.72999954],[10.54609013,57.21575165],[10.25,56.88999939],[10.36999989,56.61000061],[10.91219044,56.45861053],[10.66781044,56.08139038],[10.36999989,56.18999863],[9.64999962,55.47000122],[9.9218998,54.98308945],[9.28203964,54.83087158],[8.52620983,54.96273041],[8.52620983,54.96273041]]]}, -{code:"FR", name:"France", borders:[[[8.7459898,42.62812042],[9.39000034,43.00999832],[9.56000042,42.15250015],[9.22976971,41.38000107],[8.77573967,41.58361053],[8.54421997,42.25651932],[8.7459898,42.62812042],[8.7459898,42.62812042]],[[6.18628979,49.46382904],[6.65822983,49.20193863],[8.09928036,49.0177803],[7.59368992,48.33301163],[7.46677017,47.62057877],[7.19222021,47.44974899],[6.7365799,47.54182053],[6.76873016,47.28770065],[6.03739023,46.72576141],[6.02258015,46.27297974],[6.50008011,46.42966843],[6.8435998,45.99113846],[6.80234003,45.70861053],[7.09666014,45.33309174],[6.74996996,45.02854919],[7.00756979,44.25476074],[7.5495801,44.12791061],[7.4351902,43.69385147],[6.52924013,43.12891006],[4.55699015,43.39965057],[3.10038996,43.0751915],[2.98598003,42.47299957],[1.82676995,42.34337997],[0.70159,42.79571915],[0.33805001,42.5795517],[-1.50277996,43.03401184],[-1.90135002,43.42279816],[-1.38419831,44.02260971],[-1.19379997,46.01491165],[-2.22572803,47.06438065],[-2.96326661,47.57033157],[-4.49154329,47.95495987],[-4.59232426,48.68416977],[-3.2958076,48.90169144],[-1.61649978,48.6444397],[-1.93347859,49.77632904],[-0.98945999,49.34737015],[1.33876002,50.12717819],[1.63898003,50.9466095],[2.51360011,51.14850998],[2.65841007,50.79682159],[3.12326002,50.78036118],[3.58818007,50.37897873],[4.28602982,49.90752029],[4.79920006,49.98538971],[5.67404985,49.52947998],[5.89773989,49.44268036],[6.18628979,49.46382904],[6.18628979,49.46382904]]]}, -{code:"IT", name:"Italy", borders:[[[8.71000004,40.90000153],[9.21000004,41.20999908],[9.81000042,40.5],[9.66948986,39.17737961],[9.21481037,39.24047089],[8.80692005,38.90663147],[8.42831993,39.1718483],[8.38827991,40.37829971],[8.15999985,40.95000076],[8.71000004,40.90000153],[8.71000004,40.90000153]],[[14.76126003,38.14387131],[15.52035999,38.23117065],[15.16022015,37.44404984],[15.30990028,37.13420868],[15.10000038,36.61999893],[14.33522987,36.99663162],[13.82672977,37.10454178],[12.43097973,37.61294937],[12.57094002,38.12638855],[13.74116039,38.0349617],[14.76126003,38.14387131],[14.76126003,38.14387131]],[[10.44270992,46.89355087],[11.04856014,46.7513504],[11.16483974,46.94158936],[12.15307999,47.11539078],[12.37650013,46.76755905],[13.80648041,46.50928879],[13.6980896,46.01678848],[13.93764019,45.59103012],[13.14159012,45.73667908],[12.32857037,45.38175964],[12.38385963,44.88536835],[12.26144028,44.60047913],[12.58924007,44.09135818],[13.52690983,43.58771896],[14.02982044,42.76100159],[15.14256954,41.95513916],[15.9262104,41.9612999],[16.16991997,41.74028015],[15.88936043,41.5410881],[16.78499031,41.17961884],[17.5191803,40.8771286],[18.37669945,40.35564041],[18.48026085,40.16886902],[18.29338074,39.81077957],[17.73838043,40.27767181],[16.8696003,40.44223022],[16.44874954,39.79539871],[17.17152023,39.42470169],[17.05282974,38.90287018],[16.63505936,38.84355927],[16.10098076,37.98590851],[15.68410015,37.90884018],[15.68795967,38.21458817],[15.8920002,38.75093842],[16.10934067,38.96455002],[15.71881962,39.5440712],[15.41361046,40.04837036],[14.9985199,40.17296982],[14.70326996,40.60456085],[14.06068039,40.78633881],[13.62798977,41.1882782],[12.88809967,41.25310135],[12.10671043,41.70452881],[11.19192982,42.35541916],[10.51198006,42.93146896],[10.19999981,43.91999817],[9.70250034,44.03628159],[8.88893032,44.36632919],[8.42856026,44.23123169],[7.85075998,43.76715851],[7.4351902,43.69385147],[7.5495801,44.12791061],[7.00756979,44.25476074],[6.74996996,45.02854919],[7.09666014,45.33309174],[6.80234003,45.70861053],[6.8435998,45.99113846],[7.27384996,45.77693176],[7.75599003,45.82452011],[8.3166399,46.16366959],[8.48995018,46.00516891],[8.96630001,46.03694916],[9.18288994,46.44020844],[9.92284012,46.31491089],[10.36338997,46.48358154],[10.44270992,46.89355087],[10.44270992,46.89355087]]]}, -{code:"NO", name:"Norway", borders:[[[15.14282036,79.67430878],[15.52254963,80.01608276],[16.99085045,80.05085754],[18.25182915,79.70175171],[21.54383087,78.95610809],[19.02737045,78.56259918],[18.47171974,77.82669067],[17.59440994,77.63796234],[17.1182003,76.8094101],[15.91314983,76.77044678],[13.76259041,77.38034821],[14.66956043,77.73564911],[13.17059994,78.02493286],[11.22231007,78.86930084],[10.44452953,79.65238953],[13.17076969,80.0104599],[13.71852016,79.66039276],[15.14282036,79.67430878],[15.14282036,79.67430878]],[[24.72411919,77.85385132],[22.49032021,77.44493103],[20.72600937,77.6770401],[21.41610909,77.93504333],[20.81189919,78.25463104],[22.88426018,78.4549408],[23.28133965,78.07953644],[24.72411919,77.85385132],[24.72411919,77.85385132]],[[27.40752029,80.05641937],[25.92464066,79.5178299],[23.02446938,79.40003204],[20.07518005,79.56681824],[19.89727974,79.84236145],[18.46224976,79.8598938],[17.3680191,80.31889343],[20.45598984,80.59815216],[21.90796089,80.35767365],[22.9192791,80.6571579],[25.44761086,80.40734863],[27.40752029,80.05641937],[27.40752029,80.05641937]],[[11.02737045,58.85617065],[10.35657024,59.46981049],[8.38201046,58.31328964],[7.04873991,58.07889938],[5.66582012,58.58813858],[5.30825996,59.66323853],[4.9920702,61.97100067],[5.91288996,62.61449051],[8.55338955,63.45399094],[10.52770042,64.4860611],[12.35836983,65.8797226],[14.76113987,67.81063843],[16.43589973,68.56321716],[19.18400955,69.81742859],[21.37841988,70.25517273],[23.02371979,70.20205688],[24.54656982,71.03050232],[26.37004089,70.98626709],[28.16555977,71.18547821],[31.29340935,70.45381165],[30.00542068,70.18624115],[31.10107994,69.5581131],[29.39954948,69.15692139],[28.59193993,69.06478882],[29.01556015,69.76648712],[27.73229027,70.16417694],[26.17959976,69.82527924],[25.68922043,69.09211731],[24.73567963,68.64956665],[23.66205978,68.89124298],[22.35622978,68.84174347],[21.2449398,69.37046051],[20.64558983,69.10624695],[20.02523994,69.06513977],[19.87857056,68.4072113],[17.99386978,68.56741333],[17.72916031,68.01055145],[16.76889038,68.01393127],[16.10869026,67.3024292],[15.10842037,66.19387054],[13.5557003,64.78703308],[13.91991043,64.44542694],[13.57192993,64.04911804],[12.57993984,64.06625366],[11.93056011,63.12831879],[11.99205971,61.80036926],[12.63115978,61.29359055],[12.30039024,60.117939],[11.46823978,59.43239975],[11.02737045,58.85617065],[11.02737045,58.85617065]]]}, -{code:"TW", name:"Taiwan", borders:[[[121.77781677,24.39426994],[121.17563629,22.79085922],[120.74713135,21.97056961],[120.22006989,22.81485939],[120.10616302,23.55625916],[120.69464874,24.53845024],[121.49501038,25.29545021],[121.95127106,24.99757957],[121.77781677,24.39426994],[121.77781677,24.39426994]]]}, -{code:"LK", name:"Sri Lanka", borders:[[[81.78794861,7.52303982],[81.63732147,6.48179007],[81.21803284,6.19714022],[80.3483429,5.96835995],[79.87243652,6.76347017],[79.69516754,8.20083046],[80.14779663,9.82406998],[80.83885193,9.26842022],[81.30432129,8.5642004],[81.78794861,7.52303982],[81.78794861,7.52303982]]]}, -{code:"AU", name:"Australia", borders:[[[126.14868927,-32.21595764],[125.08860016,-32.72875977],[124.2216568,-32.95945358],[124.02897644,-33.48382187],[123.65965271,-33.89016342],[122.81104279,-33.91440582],[122.18302917,-34.00336456],[121.29917145,-33.82102966],[120.58027649,-33.93012238],[119.8936615,-33.97603607],[119.29892731,-34.50932693],[119.00734711,-34.46409225],[118.50572205,-34.74677277],[118.02494812,-35.06471634],[117.29547119,-35.02542496],[116.62509918,-35.02507019],[115.56437683,-34.38640594],[115.02683258,-34.19644547],[115.04866028,-33.62338638],[115.54514313,-33.48723602],[115.71466827,-33.2595253],[115.6794281,-32.90034866],[115.801651,-32.20504379],[115.68958282,-31.61240387],[115.16091156,-30.60158539],[114.99703979,-30.03069115],[115.04006958,-29.46105003],[114.64198303,-28.81018257],[114.61649323,-28.51638603],[114.17359161,-28.11807632],[114.04891205,-27.33474541],[113.47750092,-26.54313278],[113.33895874,-26.11654282],[113.77835846,-26.54903412],[113.44094849,-25.6212635],[113.93689728,-25.91121864],[114.23282623,-26.29845428],[114.21616364,-25.7862606],[113.72123718,-24.99894524],[113.62532806,-24.68395042],[113.39350128,-24.38475037],[113.50202179,-23.80635071],[113.70697021,-23.56018257],[113.84339142,-23.05997467],[113.73658752,-22.47543716],[114.14974976,-21.75585938],[114.22531891,-22.51748276],[114.64777374,-21.8295269],[115.46016693,-21.49517632],[115.94741058,-21.06871033],[116.71161652,-20.70168114],[117.1663208,-20.62358093],[117.44156647,-20.74691582],[118.22955322,-20.37416267],[118.83608246,-20.26328087],[118.98780823,-20.04421997],[119.25251007,-19.95292282],[119.80519104,-19.97647285],[120.85621643,-19.68370056],[121.39984894,-19.23975182],[121.65509796,-18.70530319],[122.24163055,-18.19763374],[122.28661346,-17.79859924],[122.31279755,-17.25493813],[123.01261139,-16.40517426],[123.43379211,-17.26854897],[123.85932159,-17.06904221],[123.50324249,-16.59649277],[123.81710052,-16.11128616],[124.25827026,-16.3279438],[124.37973785,-15.56703854],[124.92617035,-15.07508659],[125.16726685,-14.68036842],[125.67009735,-14.5100565],[125.68579102,-14.23063278],[126.12519073,-14.34735775],[126.14279175,-14.09597588],[126.58260345,-13.9527626],[127.06587982,-13.81797028],[127.80465698,-14.27690792],[128.35968018,-14.86918259],[128.98558044,-14.8759985],[129.62150574,-14.96977997],[129.40963745,-14.42064381],[129.88867188,-13.61867619],[130.33947754,-13.35737705],[130.18351746,-13.1075325],[130.61781311,-12.53640461],[131.22349548,-12.18365002],[131.73509216,-12.30243874],[132.57527161,-12.11403847],[132.55722046,-11.60298824],[131.82470703,-11.27376652],[132.35720825,-11.12850857],[133.01954651,-11.37642384],[133.55085754,-11.78649807],[134.39303589,-12.04235649],[134.6786499,-11.94114876],[135.29847717,-12.24856663],[135.88273621,-11.96226025],[136.25834656,-12.04934883],[136.49247742,-11.85720634],[136.95162964,-12.35193825],[136.68510437,-12.88720894],[136.30545044,-13.29123878],[135.96174622,-13.32451248],[136.07759094,-13.72426701],[135.78382874,-14.22397232],[135.42866516,-14.71541214],[135.50021362,-14.99771786],[136.29519653,-15.55024433],[137.06536865,-15.87075043],[137.58045959,-16.21508598],[138.30319214,-16.80761528],[138.58518982,-16.80660057],[139.10853577,-17.06269646],[139.26060486,-17.37159538],[140.21520996,-17.71079063],[140.87542725,-17.36907959],[141.07110596,-16.83203316],[141.27409363,-16.38887024],[141.39825439,-15.84053612],[141.70220947,-15.04490852],[141.56343079,-14.56131458],[141.63551331,-14.2703867],[141.51989746,-13.69806862],[141.65092468,-12.9446888],[141.84269714,-12.74154282],[141.68702698,-12.40761089],[141.92863464,-11.87747955],[142.11845398,-11.328022],[142.14367676,-11.04274464],[142.51528931,-10.66819],[142.79736328,-11.15734768],[142.86679077,-11.78467655],[143.11592102,-11.9056139],[143.15866089,-12.32564068],[143.52209473,-12.83433628],[143.59715271,-13.40040207],[143.56178284,-13.7636528],[143.9221344,-14.54831409],[144.56373596,-14.17115593],[144.89489746,-14.59443855],[145.3747406,-14.98495007],[145.27201843,-15.42821026],[145.48527527,-16.28565025],[145.63699341,-16.78489304],[145.88887024,-16.90688133],[146.16026306,-17.76165581],[146.06367493,-18.28003883],[146.38746643,-18.95829582],[147.47108459,-19.48072624],[148.17759705,-19.95592499],[148.84840393,-20.39119911],[148.71748352,-20.63342667],[149.28947449,-21.2604866],[149.67834473,-22.34248734],[150.07740784,-22.12277412],[150.48295593,-22.55613327],[150.7272644,-22.40236855],[150.89955139,-23.46224976],[151.60916138,-24.07624626],[152.07354736,-24.4578495],[152.85522461,-25.26747322],[153.13615417,-26.0711441],[153.1619873,-26.64132309],[153.09289551,-27.2602787],[153.56947327,-28.11003304],[153.5120697,-28.99508286],[153.33909607,-29.45817184],[153.06922913,-30.35021019],[153.08956909,-30.92362976],[152.89161682,-31.64045525],[152.44999695,-32.54997635],[151.70909119,-33.04130173],[151.34399414,-33.81600952],[151.01054382,-34.31031799],[150.7141571,-35.17344284],[150.32820129,-35.67185974],[150.07524109,-36.42017365],[149.94615173,-37.10902786],[149.99725342,-37.42525482],[149.42390442,-37.77261734],[148.30462646,-37.80902481],[147.38169861,-38.21920395],[146.9221344,-38.60650253],[146.31790161,-39.03572083],[145.48962402,-38.59373856],[144.87695313,-38.41743851],[145.03218079,-37.89620972],[144.48568726,-38.08529282],[143.60998535,-38.8094368],[142.74545288,-38.53822708],[142.1783905,-38.38000107],[141.60658264,-38.30852509],[140.63856506,-38.01926422],[139.99215698,-37.40286636],[139.80662537,-36.64356232],[139.5741272,-36.13831329],[139.08280945,-35.73271561],[138.12075806,-35.61230087],[138.44952393,-35.12724686],[138.20756531,-34.38468933],[137.71917725,-35.07679367],[136.82943726,-35.26052856],[137.35235596,-34.70728302],[137.50390625,-34.13024902],[137.89009094,-33.64045334],[137.81033325,-32.89996719],[136.99685669,-33.75276566],[136.37203979,-34.09475327],[135.98901367,-34.89008331],[135.20817566,-34.47865677],[135.23918152,-33.94792557],[134.61340332,-33.22276688],[134.0859375,-32.84807587],[134.27386475,-32.6172142],[132.99078369,-32.01119995],[132.28805542,-31.98265076],[131.32633972,-31.49578667],[129.53579712,-31.59040642],[128.24095154,-31.94847298],[127.10283661,-32.28220367],[126.14868927,-32.21595764],[126.14868927,-32.21595764]],[[147.68925476,-40.80820465],[148.28909302,-40.87542343],[148.35992432,-42.06238556],[148.01728821,-42.40698624],[147.91404724,-43.21149445],[147.56460571,-42.93767548],[146.87034607,-43.63457489],[146.66333008,-43.58087158],[146.04838562,-43.54973602],[145.43193054,-42.69373322],[145.29510498,-42.03359985],[144.71807861,-41.16251373],[144.74380493,-40.70393753],[145.39794922,-40.7925148],[146.36413574,-41.13766098],[146.90861511,-41.00054932],[147.68925476,-40.80820465],[147.68925476,-40.80820465]]]}, -{code:"NZ", name:"New Zealand", borders:[[[169.66781616,-43.55532837],[170.52496338,-43.03162384],[171.12507629,-42.51274109],[171.56968689,-41.7673912],[171.94869995,-41.51434708],[172.09727478,-40.95602798],[172.7986145,-40.49394608],[173.02035522,-40.91906357],[173.24725342,-41.33198166],[173.9584198,-40.92669296],[174.24757385,-41.34915161],[174.24855042,-41.76998901],[173.87640381,-42.23313904],[173.22273254,-42.97002411],[172.71130371,-43.37226868],[173.0801239,-43.8532753],[172.30857849,-43.86565399],[171.45292664,-44.24248505],[171.18513489,-44.89703751],[170.61668396,-45.90892029],[169.83145142,-46.35573578],[169.33233643,-46.64123154],[168.41137695,-46.61991882],[167.76376343,-46.29014206],[166.67692566,-46.21986008],[166.50915527,-45.85267258],[167.04641724,-45.11090469],[168.30377197,-44.12395477],[168.94943237,-43.93577194],[169.66781616,-43.55532837],[169.66781616,-43.55532837]],[[176.88581848,-40.06596756],[176.50802612,-40.60474396],[176.01246643,-41.28956223],[175.23953247,-41.68826675],[175.06788635,-41.42581558],[174.65093994,-41.28178024],[175.22763062,-40.45921707],[174.900177,-39.90890121],[173.82411194,-39.5088501],[173.85229492,-39.14657211],[174.57479858,-38.79761505],[174.7434845,-38.02779388],[174.69700623,-37.38109589],[174.29199219,-36.71109009],[174.3190155,-36.53482056],[173.84100342,-36.12195587],[173.0541687,-35.23711395],[172.63601685,-34.52910614],[173.00700378,-34.45059586],[173.55126953,-35.00614929],[174.32940674,-35.26546478],[174.61198425,-36.15631485],[175.33665466,-37.20910263],[175.35757446,-36.52616882],[175.80888367,-36.7989502],[175.95854187,-37.55537796],[176.76321411,-37.88125229],[177.43884277,-37.96123505],[178.01037598,-37.57982635],[178.51708984,-37.69531631],[178.2747345,-38.58273697],[177.97042847,-39.16635132],[177.20701599,-39.14572525],[176.93997192,-39.44968414],[177.03292847,-39.8799057],[176.88581848,-40.06596756],[176.88581848,-40.06596756]]]}, -{code:"SB", name:"Solomon Islands", borders:[[[154.75999451,-5.34000015],[155.0629425,-5.56678009],[155.54771423,-6.20065355],[156.02000427,-6.53999424],[155.88000488,-6.81999922],[155.6000061,-6.91999626],[155.16699219,-6.53593636],[154.72921753,-5.90080309],[154.51411438,-5.13910341],[154.65248108,-5.04240608],[154.75999451,-5.34000015],[154.75999451,-5.34000015]],[[157.14002991,-7.0216341],[157.53846741,-7.347826],[157.3394165,-7.40475702],[156.90202332,-7.17686701],[156.49133301,-6.7659173],[156.54284668,-6.59931898],[157.14002991,-7.0216341],[157.14002991,-7.0216341]],[[159.63999939,-8.01999283],[159.87504578,-8.33729076],[159.91738892,-8.53827858],[159.13369751,-8.11415768],[158.58612061,-7.75481606],[158.21113586,-7.42184639],[158.36000061,-7.31999922],[158.82000732,-7.55999517],[159.63999939,-8.01999283],[159.63999939,-8.01999283]],[[160.85223389,-9.87291431],[160.46255493,-9.89522076],[159.84944153,-9.79400826],[159.63999939,-9.63999844],[159.70294189,-9.24293041],[160.36291504,-9.40029812],[160.68847656,-9.6101408],[160.85223389,-9.87291431],[160.85223389,-9.87291431]],[[161.67999268,-9.59999657],[161.52940369,-9.78431892],[160.78822327,-8.91752243],[160.58000183,-8.31999969],[160.91999817,-8.31999969],[161.27999878,-9.11999035],[161.67999268,-9.59999657],[161.67999268,-9.59999657]],[[162.11903381,-10.48268795],[162.39865112,-10.82635021],[161.69999695,-10.81999969],[161.31976318,-10.20475006],[161.91734314,-10.44667625],[162.11903381,-10.48268795],[162.11903381,-10.48268795]]]}, -{code:"PG", name:"Papua New Guinea", borders:[[[151.30142212,-5.84071445],[150.75442505,-6.08374596],[150.2412262,-6.3177352],[149.7099762,-6.31652641],[148.89007568,-6.02605629],[148.31895447,-5.74712515],[148.40185547,-5.43773317],[149.29841614,-5.58372736],[149.84559631,-5.50551987],[149.99627686,-5.02608728],[150.13975525,-5.001369],[150.23692322,-5.53221798],[150.80747986,-5.45582914],[151.08966064,-5.11370707],[151.64788818,-4.75708008],[151.53782654,-4.16779423],[152.13679504,-4.14880514],[152.33876038,-4.3129735],[152.31871033,-4.86766624],[151.98278809,-5.47808695],[151.45910645,-5.5602541],[151.30142212,-5.84071445],[151.30142212,-5.84071445]],[[152.63999939,-3.65999961],[153.02000427,-3.97999907],[153.13999939,-4.5],[152.82733154,-4.76643515],[152.63865662,-4.17611408],[152.40603638,-3.78974819],[151.95323181,-3.46208906],[151.38427734,-3.03542805],[150.6620636,-2.7414577],[150.94000244,-2.5],[151.47999573,-2.77999759],[151.82000732,-3.],[152.24000549,-3.23999953],[152.63999939,-3.65999961],[152.63999939,-3.65999961]],[[141.00419617,-5.76999331],[141.00021362,-2.6001575],[142.73524475,-3.28917766],[144.58395386,-3.8613975],[145.27316284,-4.37371635],[145.82977295,-4.8764801],[145.98190308,-5.4656291],[147.64813232,-6.08364725],[147.89111328,-6.6140151],[146.97088623,-6.72165346],[147.19189453,-7.38801908],[148.08460999,-8.04410076],[148.7341156,-9.10466003],[149.30683899,-9.07139683],[149.26663208,-9.51438808],[150.03874207,-9.68431664],[149.73880005,-9.87294579],[150.80163574,-10.29370785],[150.69059753,-10.58271027],[150.02842712,-10.65246201],[149.78234863,-10.39325428],[148.92314148,-10.28093433],[147.91300964,-10.13043976],[147.13543701,-9.49244881],[146.56788635,-8.94256687],[146.04849243,-8.06739616],[144.74415588,-7.63012409],[143.89709473,-7.91532803],[143.28637695,-8.24546623],[143.41397095,-8.9830761],[142.62844849,-9.32683086],[142.06825256,-9.15959835],[141.01057434,-9.15706825],[141.00419617,-5.76999331],[141.00419617,-5.76999331]]]}, -{code:"FJ", name:"Fiji", borders:[[[178.12556458,-17.5048027],[178.37359619,-17.33992004],[178.71806335,-17.62843704],[178.55270386,-18.15058708],[177.93266296,-18.28796768],[177.38145447,-18.16429329],[177.28503418,-17.72463036],[177.67086792,-17.38112831],[178.12556458,-17.5048027],[178.12556458,-17.5048027]],[[179.94850159,-16.07580185],[179.95594788,-16.75998878],[179.32408142,-16.8013382],[178.68499756,-17.01203728],[178.55677795,-16.63913918],[179.05654907,-16.43396568],[179.3734436,-16.37903214],[179.94850159,-16.07580185],[179.94850159,-16.07580185]]]}, -{code:"NC", name:"New Caledonia", borders:[[[165.77999878,-21.07997322],[166.6000061,-21.69999313],[167.11999512,-22.15997696],[166.74000549,-22.39998817],[166.18972778,-22.12969971],[165.47439575,-21.67962265],[164.82980347,-21.14981079],[164.16799927,-20.44472504],[164.02963257,-20.1056118],[164.46000671,-20.1199894],[165.02000427,-20.45998383],[165.46000671,-20.79997635],[165.77999878,-21.07997322],[165.77999878,-21.07997322]]]}, -{code:"AQ", name:"Antarctica", borders:[[[-163.71289063,-78.59559631],[-163.1056366,-78.22330475],[-161.24511719,-78.38008118],[-160.24621582,-78.69356537],[-159.48219299,-79.0463028],[-159.20806885,-79.49697876],[-161.12753296,-79.6341095],[-162.43980408,-79.2813797],[-163.02728271,-78.92876434],[-163.06645203,-78.86988068],[-163.71289063,-78.59559631],[-163.71289063,-78.59559631]],[[-127.28314209,-73.46179199],[-126.55847168,-73.24619293],[-125.55957031,-73.48126984],[-124.03182983,-73.87317657],[-124.61942291,-73.83399963],[-125.91217041,-73.7360611],[-127.28314209,-73.46179199],[-127.28314209,-73.46179199]],[[-122.62168121,-73.65766907],[-122.40625,-73.32454681],[-121.2114563,-73.50097656],[-119.9187851,-73.65769196],[-118.72410583,-73.48126984],[-119.29199982,-73.83399963],[-120.23213196,-74.08878326],[-121.62276459,-74.01042175],[-122.62168121,-73.65766907],[-122.62168121,-73.65766907]],[[-102.33065796,-71.89414978],[-101.70388031,-71.71773529],[-100.4309082,-71.85498047],[-98.98146057,-71.93334198],[-97.88466644,-72.07045746],[-96.78787231,-71.95292664],[-96.20027161,-72.52114868],[-96.98365021,-72.44277954],[-98.19802856,-72.48195648],[-99.43199158,-72.44277954],[-100.78344727,-72.5015564],[-101.80187988,-72.30565643],[-102.33065796,-71.89414978],[-102.33065796,-71.89414978]],[[-74.06821442,-71.34552002],[-73.38273621,-71.22786713],[-72.22717285,-71.2670517],[-71.93340302,-70.75760651],[-71.87463379,-70.38527679],[-71.89421844,-69.58197021],[-71.32620239,-69.11161041],[-70.40558624,-68.95488739],[-69.87688446,-69.32720947],[-69.64182281,-69.69941711],[-69.21091461,-70.15009308],[-68.87798309,-70.58129883],[-68.60372925,-71.03197479],[-68.48626709,-71.48265839],[-68.6625061,-71.87456512],[-68.93667603,-72.24688721],[-70.11182404,-72.38401794],[-71.22833252,-72.57991028],[-72.54047394,-72.56031799],[-72.05086517,-72.16841125],[-73.22595978,-72.30565643],[-74.342453,-72.44277954],[-75.10629272,-72.14881897],[-75.16500854,-71.73731995],[-74.06821442,-71.34552002],[-74.06821442,-71.34552002]],[[-66.89974976,-80.06528473],[-64.64746094,-80.10449219],[-62.49300385,-80.20244598],[-61.74874878,-79.79094696],[-61.21990967,-79.43821716],[-60.18182755,-79.84971619],[-60.47559357,-80.35915375],[-60.76942825,-80.80983734],[-62.86512375,-80.67272186],[-65.0978775,-80.73148346],[-66.35144043,-80.39834595],[-66.35144043,-80.35915375],[-66.89974976,-80.06528473],[-66.89974976,-80.06528473]],[[-49.19412613,-78.04699707],[-48.68492126,-78.04694366],[-47.19641113,-77.83146667],[-45.6882782,-78.04694366],[-44.45436096,-78.47808838],[-44.02349854,-79.08547974],[-43.90596008,-79.51657104],[-43.86681366,-80.02602386],[-45.41407776,-80.33956909],[-47.03967667,-80.59436035],[-48.91992569,-80.82943726],[-51.01564026,-81.02544403],[-53.38555908,-80.96656036],[-54.69781113,-80.63353729],[-54.52148819,-80.22203827],[-52.38668823,-79.94765472],[-51.52484512,-79.61452484],[-50.89810562,-79.18343353],[-50.44764328,-78.81111145],[-49.84051132,-78.45844269],[-49.19412613,-78.04699707],[-49.19412613,-78.04699707]],[[166.6000061,-77.],[168.36000061,-77.25894165],[169.44999695,-77.3499527],[169.55000305,-77.5999527],[168.25,-77.79997253],[166.8999939,-77.89992523],[166.1499939,-77.5999527],[166.1499939,-77.25],[166.6000061,-77.],[166.6000061,-77.]],[[180.,-90.],[-180.,-90.],[-180.,-84.71335602],[-179.94250488,-84.72142792],[-179.0585022,-84.13928986],[-177.25665283,-84.45284271],[-176.02278137,-84.08053589],[-174.29908752,-84.41366577],[-172.88896179,-84.06093597],[-169.95111084,-83.88463593],[-169.,-84.11782074],[-168.53010559,-84.23735809],[-167.02207947,-84.57038116],[-164.18212891,-84.82517242],[-161.92959595,-85.13872528],[-158.07121277,-85.37378693],[-155.19226074,-85.09954834],[-150.94192505,-85.29544067],[-148.53285217,-85.6089859],[-145.88891602,-85.31502533],[-143.10760498,-85.04077148],[-142.89215088,-84.57038116],[-146.82887268,-84.53121185],[-150.06060791,-84.29613495],[-150.90274048,-83.90422058],[-153.58616638,-83.68862152],[-153.40968323,-83.2379303],[-153.03767395,-82.82643127],[-152.66542053,-82.45411682],[-152.8613739,-82.0426178],[-154.52618408,-81.76836395],[-155.29014587,-81.41564178],[-156.83735657,-81.1020813],[-154.40858459,-81.16085052],[-152.09765625,-81.00414276],[-150.64808655,-81.33727264],[-148.86592102,-81.04331207],[-147.22065735,-80.67098999],[-146.41769409,-80.33785248],[-146.77023315,-79.92634583],[-148.06278992,-79.65209961],[-149.53181458,-79.35813141],[-151.58834839,-79.29936218],[-153.39021301,-79.16223145],[-155.32931519,-79.06417084],[-155.97550964,-78.69184875],[-157.26831055,-78.37830353],[-158.05174255,-78.02568817],[-158.36509705,-76.88910675],[-157.8752594,-76.98714447],[-156.97441101,-77.30069733],[-155.32931519,-77.2026825],[-153.74275208,-77.06550598],[-152.92007446,-77.49664307],[-151.33369446,-77.39864349],[-150.00195313,-77.1831665],[-148.74833679,-76.90879059],[-147.61236572,-76.57564545],[-146.1043396,-76.47770691],[-146.14334106,-76.1053772],[-146.49586487,-75.73305511],[-146.20222473,-75.38033295],[-144.9094696,-75.20401764],[-144.32199097,-75.53716278],[-142.79426575,-75.34114075],[-141.63858032,-75.08648682],[-140.20895386,-75.06678009],[-138.85751343,-74.96883392],[-137.50601196,-74.73374939],[-136.42875671,-74.51815033],[-135.21437073,-74.30266571],[-134.43112183,-74.36144257],[-133.74555969,-74.43978882],[-132.25700378,-74.30266571],[-130.92527771,-74.47896576],[-129.55410767,-74.4593811],[-128.24183655,-74.32225037],[-126.89051819,-74.42020416],[-125.40200806,-74.51815033],[-124.01145935,-74.47896576],[-122.56212616,-74.49856567],[-121.07349396,-74.51815033],[-119.70246887,-74.47896576],[-118.68414307,-74.18500519],[-117.46977234,-74.02828979],[-116.21619415,-74.24389648],[-115.02153015,-74.06746674],[-113.94432831,-73.71473694],[-113.29795837,-74.02828979],[-112.94541931,-74.38102722],[-112.29905701,-74.71416473],[-111.2610321,-74.42020416],[-110.0662384,-74.79252625],[-108.71479034,-74.91005707],[-107.55930328,-75.18443298],[-106.14907837,-75.12566376],[-104.87599182,-74.94924164],[-103.36789703,-74.98841858],[-102.0164566,-75.12566376],[-100.64548492,-75.30196381],[-100.11658478,-74.87088013],[-100.76295471,-74.53773499],[-101.25267029,-74.18500519],[-102.54523468,-74.10665131],[-103.11325073,-73.73432922],[-103.32872009,-73.36201477],[-103.68125916,-72.61745453],[-102.91748047,-72.75461578],[-101.60520935,-72.81337738],[-100.31246948,-72.75461578],[-99.13739014,-72.91132355],[-98.11889648,-73.20529175],[-97.68795013,-73.55802917],[-96.33649445,-73.61679077],[-95.04393768,-73.47966003],[-93.67290497,-73.28365326],[-92.4389267,-73.16611481],[-91.42050171,-73.40119171],[-90.08864594,-73.32282257],[-89.22692108,-72.55870056],[-88.42383575,-73.00939941],[-87.26828003,-73.18569946],[-86.01472473,-73.0877533],[-85.19216919,-73.47966003],[-83.8799057,-73.51883698],[-82.66564941,-73.63637543],[-81.47085571,-73.85198975],[-80.68741608,-73.47966003],[-80.29576111,-73.12693787],[-79.29685211,-73.51883698],[-77.92581177,-73.42089844],[-76.90732574,-73.63637543],[-76.22184753,-73.9695282],[-74.88999176,-73.8715744],[-73.85195923,-73.65597534],[-72.83346558,-73.40119171],[-71.61920166,-73.26406097],[-70.20893097,-73.14653015],[-68.93590546,-73.00939941],[-67.95658875,-72.79379272],[-67.36898041,-72.48023987],[-67.1340332,-72.04914856],[-67.25151062,-71.63764954],[-67.56493378,-71.24573517],[-67.91747284,-70.85394287],[-68.23082733,-70.46192169],[-68.48536682,-70.10930634],[-68.54418182,-69.71740723],[-68.44618225,-69.32549286],[-67.9761734,-68.95317078],[-67.5844574,-68.54166412],[-67.42774963,-68.14982605],[-67.62363434,-67.71874237],[-67.74111176,-67.326828],[-67.25151062,-66.87613678],[-66.70307922,-66.58217621],[-66.05671692,-66.20986176],[-65.37122345,-65.89631653],[-64.56820679,-65.60246277],[-64.17649078,-65.17137146],[-63.62812805,-64.8970108],[-63.00134659,-64.64222717],[-62.0416832,-64.58345032],[-61.41490555,-64.27001953],[-60.70982742,-64.07401276],[-59.88721466,-63.95646286],[-59.16255569,-63.70174408],[-58.59453583,-63.38818741],[-57.81110382,-63.2706604],[-57.22356415,-63.525383],[-57.59568787,-63.85852051],[-58.61412048,-64.15235901],[-59.04501724,-64.36797333],[-59.78933334,-64.21124268],[-60.61193848,-64.30919647],[-61.2973671,-64.54427338],[-62.02209091,-64.79905701],[-62.51174927,-65.09290314],[-62.64880753,-65.48480988],[-62.59010696,-65.85712433],[-62.12003326,-66.1902771],[-62.80552292,-66.42546082],[-63.74565125,-66.50382996],[-64.29402161,-66.83695984],[-64.88162231,-67.15040588],[-65.50840759,-67.58148956],[-65.66500092,-67.95380402],[-65.31246185,-68.365242],[-64.78368378,-68.6788559],[-63.96107101,-68.91399384],[-63.19724274,-69.22753906],[-62.78593063,-69.61933136],[-62.57052231,-69.99164581],[-62.27668762,-70.38356018],[-61.80667114,-70.71670532],[-61.51290894,-71.0890274],[-61.37578583,-72.00997162],[-61.08195114,-72.38230133],[-61.00365448,-72.77420044],[-60.69023132,-73.16611481],[-60.82735443,-73.69515228],[-61.37578583,-74.10665131],[-61.9633255,-74.43978882],[-63.29518127,-74.57691956],[-63.74565125,-74.92964172],[-64.3527298,-75.26279449],[-65.86094666,-75.63511658],[-67.19280243,-75.79183197],[-68.44618225,-76.00743103],[-69.79763031,-76.22292328],[-70.60070801,-76.6344223],[-72.2066803,-76.67359924],[-73.96943665,-76.6344223],[-75.55594635,-76.71289063],[-77.24034119,-76.71289063],[-76.9269104,-77.10468292],[-75.39929199,-77.28104401],[-74.28279114,-77.55541992],[-73.65601349,-77.90803528],[-74.77251434,-78.22158813],[-76.49608612,-78.12363434],[-77.92581177,-78.37830353],[-77.98458862,-78.78980255],[-78.02370453,-79.18171692],[-76.84862518,-79.5148468],[-76.63314819,-79.88717651],[-75.35999298,-80.25949097],[-73.24476624,-80.41620636],[-71.44290161,-80.69058228],[-70.01309204,-81.00414276],[-68.19165039,-81.31768799],[-65.70417786,-81.47440338],[-63.25599289,-81.7487793],[-61.55202484,-82.0426178],[-59.69138336,-82.37575531],[-58.71212387,-82.84603119],[-58.22246552,-83.21834564],[-57.00811386,-82.86562347],[-55.36285782,-82.57177734],[-53.6197319,-82.25823212],[-51.54362106,-82.00344086],[-49.76129532,-81.72918701],[-47.27391052,-81.70948029],[-44.82566833,-81.84671783],[-42.80834961,-82.08179474],[-42.16201401,-81.65070343],[-40.77136612,-81.35686493],[-38.24479294,-81.33727264],[-36.26660538,-81.12166595],[-34.38635635,-80.90618896],[-32.3102951,-80.76893616],[-30.09708405,-80.59263611],[-28.54979897,-80.33785248],[-29.25488663,-79.98511505],[-29.68578148,-79.63239288],[-29.68578148,-79.26018524],[-31.62479401,-79.29936218],[-33.68128967,-79.45608521],[-35.6398735,-79.45608521],[-35.91407776,-79.08376312],[-35.77700424,-78.3392334],[-35.32653427,-78.12363434],[-33.89675903,-77.88843536],[-32.21237183,-77.65343475],[-30.99804306,-77.35946655],[-29.78371429,-77.06550598],[-28.88276291,-76.67359924],[-27.51173782,-76.49729156],[-26.16031837,-76.36016846],[-25.47481537,-76.28168488],[-23.92752266,-76.24250793],[-22.4585762,-76.1053772],[-21.22468185,-75.90937042],[-20.01036072,-75.67429352],[-18.91353798,-75.43909454],[-17.52293777,-75.12566376],[-16.64158249,-74.79252625],[-15.70147419,-74.49856567],[-15.40767384,-74.10665131],[-16.46531296,-73.8715744],[-16.11275482,-73.46007538],[-15.44684219,-73.14653015],[-14.40879631,-72.95051575],[-13.31198788,-72.71543884],[-12.29351044,-72.40188599],[-11.51007652,-72.00997162],[-11.02043819,-71.539711],[-10.29576778,-71.26533508],[-9.10102654,-71.32410431],[-8.61136246,-71.65723419],[-7.41662979,-71.69642639],[-7.3774662,-71.32410431],[-6.86822796,-70.93231201],[-5.79099321,-71.03025818],[-5.53638697,-71.40257263],[-4.34165907,-71.46134186],[-3.04898667,-71.28491974],[-1.7954886,-71.16738129],[-0.65948927,-71.22615051],[-0.22861987,-71.63764954],[0.86821002,-71.30451202],[1.88668001,-71.12821198],[3.02265,-70.99108124],[4.13905001,-70.85394287],[5.15751982,-70.61875916],[6.27392006,-70.46192169],[7.13569021,-70.24642944],[7.74285984,-69.89370728],[8.48711967,-70.14848328],[9.52515984,-70.01124573],[10.24985981,-70.48151398],[10.81783009,-70.83423615],[11.95382977,-70.63834381],[12.40429974,-70.24642944],[13.42276001,-69.97206116],[14.73501015,-70.03083038],[15.12674046,-70.40314484],[15.94933987,-70.03083038],[17.02656937,-69.91329956],[18.20170975,-69.87412262],[19.2593708,-69.89370728],[20.37574959,-70.01124573],[21.45298004,-70.07001495],[21.92304993,-70.40314484],[22.56937981,-70.69712067],[23.66617966,-70.52081299],[24.84133911,-70.48151398],[25.97731972,-70.48151398],[27.09371948,-70.46192169],[28.09259033,-70.32479858],[29.15023041,-70.20726013],[30.03160095,-69.93288422],[30.97172928,-69.75658417],[31.99019051,-69.65863037],[32.75403976,-69.38425446],[33.30245972,-68.83562469],[33.87044144,-68.50255585],[34.90850067,-68.65921021],[35.30020142,-69.01193237],[36.16199875,-69.24713135],[37.20003891,-69.1686554],[37.90513992,-69.52138519],[38.6493988,-69.77616882],[39.66786957,-69.54096985],[40.02040863,-69.10988617],[40.92137146,-68.93357849],[41.95941162,-68.60044098],[42.93870926,-68.46331787],[44.11386108,-68.26735687],[44.89730835,-68.05187988],[45.71990967,-67.81668091],[46.5033493,-67.60108185],[47.44345856,-67.71874237],[48.34442139,-67.36600494],[48.99074936,-67.09162903],[49.9308815,-67.11122131],[50.75349045,-66.87613678],[50.94932938,-66.52341461],[51.79153061,-66.2490387],[52.61412811,-66.05314636],[53.61302948,-65.89631653],[54.53356934,-65.81794739],[55.41492844,-65.87671661],[56.3550415,-65.97478485],[57.15806961,-66.2490387],[57.25600052,-66.68013],[58.13734818,-67.01326752],[58.74451065,-67.28765106],[59.93930054,-67.40518188],[60.60519028,-67.67955017],[61.4277916,-67.95380402],[62.38748932,-68.01258087],[63.19049835,-67.81668091],[64.05233765,-67.40518188],[64.99243927,-67.62072754],[65.97174072,-67.73832703],[66.9118576,-67.85586548],[67.89115143,-67.93421936],[68.8900528,-67.93421936],[69.71263885,-68.97275543],[69.67344666,-69.22753906],[69.55593872,-69.67822266],[68.59622955,-69.93288422],[67.81276703,-70.3052063],[67.94988251,-70.69712067],[69.06629181,-70.67753601],[68.92917633,-71.06943512],[68.41999817,-71.4417572],[67.94988251,-71.85325623],[68.71375275,-72.16680908],[69.86929321,-72.26474762],[71.02488708,-72.0883255],[71.57327271,-71.69642639],[71.90627289,-71.32410431],[72.45465088,-71.01066589],[73.08141327,-70.71670532],[73.33602905,-70.36397552],[73.86486816,-69.87412262],[74.49156952,-69.77616882],[75.62757111,-69.73699188],[76.62647247,-69.61933136],[77.64489746,-69.4626236],[78.134552,-69.07070923],[78.42835999,-68.69838715],[79.11385345,-68.32613373],[80.09314728,-68.07146454],[80.93534088,-67.87545013],[81.48377991,-67.54230499],[82.05175018,-67.36600494],[82.77642059,-67.20928955],[83.77532196,-67.30724335],[84.67623138,-67.20928955],[85.65553284,-67.09162903],[86.75234985,-67.15040588],[87.47702789,-66.87613678],[87.98626709,-66.20989227],[88.3584137,-66.48423767],[88.82846069,-66.95450592],[89.67064667,-67.15040588],[90.63036346,-67.22887421],[91.59011841,-67.11122131],[92.60855103,-67.18969727],[93.54866028,-67.20928955],[94.17542267,-67.11122131],[95.01760864,-67.16999054],[95.78147888,-67.3855896],[96.68240356,-67.24846649],[97.75961304,-67.24846649],[98.68019104,-67.11122131],[99.71820831,-67.24846649],[100.3841629,-66.91532898],[100.89334869,-66.58217621],[101.57888794,-66.30781555],[102.83241272,-65.5632782],[103.47870636,-65.70041656],[104.2425766,-65.97478485],[104.90846252,-66.32740021],[106.18157959,-66.93482971],[107.16088104,-66.95450592],[108.08139038,-66.95450592],[109.15860748,-66.83695984],[110.23583221,-66.69972992],[111.05847931,-66.42546082],[111.74397278,-66.13150024],[112.86038208,-66.0923233],[113.6046524,-65.87671661],[114.38804626,-66.07273865],[114.89729309,-66.38628387],[115.60237885,-66.69972992],[116.69918823,-66.66053772],[117.38468933,-66.91532898],[118.57946014,-67.16999054],[119.83293152,-67.26805115],[120.87101746,-67.18969727],[121.65441132,-66.87613678],[122.32037354,-66.56259155],[123.22129059,-66.48423767],[124.12226105,-66.62136078],[125.16027832,-66.71930695],[126.10040283,-66.56259155],[127.0014267,-66.56259155],[127.88275146,-66.66053772],[128.80326843,-66.75849152],[129.70423889,-66.58217621],[130.78146362,-66.42546082],[131.79995728,-66.38628387],[132.93588257,-66.38628387],[133.85647583,-66.28821564],[134.75738525,-66.20986176],[135.03161621,-65.72000122],[135.07078552,-65.3085022],[135.69749451,-65.58287811],[135.87379456,-66.03356171],[136.20675659,-66.4450531],[136.61807251,-66.77819824],[137.46026611,-66.95450592],[138.59625244,-66.89573669],[139.90844727,-66.87613678],[140.80943298,-66.81737518],[142.12167358,-66.81737518],[143.06184387,-66.79779053],[144.37408447,-66.83695984],[145.49043274,-66.91532898],[146.1955719,-67.22887421],[145.99967957,-67.60108185],[146.64604187,-67.89503479],[147.72325134,-68.13024139],[148.83966064,-68.38489532],[150.13230896,-68.56125641],[151.48374939,-68.71804047],[152.50224304,-68.87481689],[153.63818359,-68.89446259],[154.2845459,-68.56125641],[155.16592407,-68.83562469],[155.92977905,-69.14913177],[156.81111145,-69.38425446],[158.02549744,-69.48220825],[159.18103027,-69.5997467],[159.67068481,-69.99164581],[160.80662537,-70.22684479],[161.57049561,-70.57958221],[162.68690491,-70.73629761],[163.84243774,-70.71670532],[164.91966248,-70.77547455],[166.11445618,-70.75588226],[167.30912781,-70.83423615],[168.42559814,-70.97149658],[169.46362305,-71.20655823],[170.50164795,-71.40257263],[171.20678711,-71.69642639],[171.08921814,-72.0883255],[170.5604248,-72.44106293],[170.10992432,-72.89173889],[169.75737,-73.24447632],[169.287323,-73.65597534],[167.9750824,-73.81269073],[167.38749695,-74.16542053],[166.0947876,-74.38102722],[165.64439392,-74.77294159],[164.95884705,-75.14524841],[164.23417664,-75.45868683],[163.82286072,-75.87018585],[163.5682373,-76.24250793],[163.4703064,-76.6931839],[163.48991394,-77.06550598],[164.05787659,-77.45735168],[164.27337646,-77.82967377],[164.74342346,-78.18247223],[166.60411072,-78.31952667],[166.99577332,-78.75073242],[165.19387817,-78.90744781],[163.66619873,-79.12294006],[161.76638794,-79.16223145],[160.9241333,-79.73046112],[160.74789429,-80.20072937],[160.31697083,-80.57303619],[159.78819275,-80.94536591],[161.11999512,-81.27850342],[161.62928772,-81.69000244],[162.49101257,-82.06221008],[163.70533752,-82.39533997],[165.09596252,-82.70890808],[166.60411072,-83.02245331],[168.89564514,-83.33588409],[169.40484619,-83.8258667],[172.28393555,-84.04134369],[173.22412109,-84.41366577],[175.98570251,-84.15888214],[177.13999939,-84.31687164],[178.27726746,-84.472435],[180.,-84.71335602],[180.,-90.],[180.,-90.]]]}, -{code:"IE", name:"Ireland", borders:[[[-6.19789791,53.86758041],[-6.03297615,53.15317154],[-6.7888298,52.26012039],[-8.5616045,51.66931915],[-9.97709274,51.82044983],[-9.16629028,52.86463928],[-9.68850422,53.88137054],[-8.32798576,54.66452026],[-7.57214451,55.13162994],[-7.36600733,54.59582138],[-7.57214451,54.05997086],[-6.95372534,54.07371902],[-6.19789791,53.86758041],[-6.19789791,53.86758041]]]}, -{code:"ES", name:"Spain", borders:[[[-9.03482628,41.88056946],[-8.98443699,42.59276962],[-9.39289665,43.02664185],[-7.97817993,43.74832916],[-6.75449514,43.56790924],[-5.4118681,43.57424164],[-4.34783888,43.40346146],[-3.5175271,43.45592117],[-1.90135002,43.42279816],[-1.50277996,43.03401184],[0.33805001,42.5795517],[0.70159,42.79571915],[1.82676995,42.34337997],[2.98598003,42.47299957],[3.0395,41.89213181],[2.09183002,41.22608185],[0.81050003,41.01472855],[0.72136003,40.67831039],[0.10671,40.12393951],[-0.27870977,39.30997849],[0.11129,38.73851013],[-0.46712989,38.2923584],[-0.68337929,37.64234161],[-1.4383986,37.44306183],[-2.14646816,36.67414093],[-3.41576004,36.65888977],[-4.36892414,36.67782974],[-4.99522018,36.3246994],[-5.37715816,35.94684982],[-5.86641407,36.02981949],[-6.23668337,36.36766815],[-6.52018499,36.94292068],[-7.45372534,37.09780121],[-7.5371089,37.4289093],[-7.16651821,37.80390167],[-7.02927542,38.07574844],[-7.37407351,38.37305069],[-7.09800434,39.03007126],[-7.49864912,39.62955856],[-7.06658888,39.7118988],[-7.02642632,40.18453979],[-6.8640151,40.33086014],[-6.85110712,41.11109161],[-6.38908005,41.38180161],[-6.66858339,41.88338089],[-7.25130701,41.91835022],[-7.42249346,41.79206848],[-8.01316643,41.79087067],[-8.26387024,42.28046036],[-8.6719265,42.1346817],[-9.03482628,41.88056946],[-9.03482628,41.88056946]]]}, -{code:"PT", name:"Portugal", borders:[[[-9.03482628,41.88056946],[-8.6719265,42.1346817],[-8.26387024,42.28046036],[-8.01316643,41.79087067],[-7.42249346,41.79206848],[-7.25130701,41.91835022],[-6.66858339,41.88338089],[-6.38908005,41.38180161],[-6.85110712,41.11109161],[-6.8640151,40.33086014],[-7.02642632,40.18453979],[-7.06658888,39.7118988],[-7.49864912,39.62955856],[-7.09800434,39.03007126],[-7.37407351,38.37305069],[-7.02927542,38.07574844],[-7.16651821,37.80390167],[-7.5371089,37.4289093],[-7.45372534,37.09780121],[-7.85560989,36.83827972],[-8.38279438,36.97888184],[-8.89884853,36.86880112],[-8.74608231,37.65134811],[-8.83998775,38.26623154],[-9.2874403,38.35848999],[-9.52656078,38.7374382],[-9.44697666,39.39207077],[-9.04828262,39.75510025],[-8.97735214,40.15929031],[-8.76869965,40.76063919],[-8.79085636,41.18432999],[-8.99076653,41.54346848],[-9.03482628,41.88056946],[-9.03482628,41.88056946]]]}, -{code:"NL", name:"Netherlands", borders:[[[6.07421017,53.51039886],[6.90514994,53.4821701],[7.0920701,53.1440506],[6.84286022,52.2284317],[6.5893898,51.85203171],[5.98865986,51.85160828],[6.15666008,50.80374146],[5.60695982,51.03731155],[4.97396994,51.47502136],[4.04709005,51.26726151],[3.31494999,51.34577179],[3.83030009,51.62054825],[4.70597982,53.09180069],[6.07421017,53.51039886],[6.07421017,53.51039886]]]}, -{code:"BE", name:"Belgium", borders:[[[3.31494999,51.34577942],[4.04709005,51.26726151],[4.97396994,51.47502136],[5.60695982,51.03731155],[6.15666008,50.80374908],[6.04305983,50.12805176],[5.78239012,50.09032822],[5.67404985,49.52947998],[4.79920006,49.98538971],[4.28602982,49.90752029],[3.58818007,50.37897873],[3.12326002,50.78036118],[2.65841007,50.79682159],[2.51360011,51.14850998],[3.31494999,51.34577942],[3.31494999,51.34577942]]]}, -{code:"LU", name:"Luxembourg", borders:[[[6.04305983,50.12805176],[6.24272013,49.90224075],[6.18628979,49.46382904],[5.89773989,49.44268036],[5.67404985,49.52947998],[5.78239012,50.09032822],[6.04305983,50.12805176],[6.04305983,50.12805176]]]}, -{code:"CH", name:"Switzerland", borders:[[[9.59424019,47.52507019],[9.6329298,47.3475914],[9.47998047,47.10282135],[9.93247986,46.92073059],[10.44270992,46.89355087],[10.36338997,46.48358154],[9.92284012,46.31491089],[9.18288994,46.44020844],[8.96630001,46.03694916],[8.48995018,46.00516891],[8.3166399,46.16366959],[7.75599003,45.82452011],[7.27384996,45.77693176],[6.8435998,45.99113846],[6.50008011,46.42966843],[6.02258015,46.27297974],[6.03739023,46.72576141],[6.76873016,47.28770065],[6.7365799,47.54182053],[7.19222021,47.44974899],[7.46677017,47.62057877],[8.31729984,47.61359024],[8.52258015,47.83081818],[9.59424019,47.52507019],[9.59424019,47.52507019]]]}, -{code:"HR", name:"Croatia", borders:[[[18.82982063,45.90887833],[19.07275963,45.52151871],[19.39045906,45.2365303],[19.00547981,44.86022949],[18.55323982,45.08158112],[17.86178017,45.06774902],[17.00213051,45.23376083],[16.53492928,45.21163177],[16.31814957,45.00410843],[15.9593401,45.23376083],[15.75004005,44.8187294],[16.23966026,44.35113144],[16.45643997,44.04124069],[16.91617012,43.66770935],[17.29739952,43.44636154],[17.67490005,43.02856827],[18.55999947,42.65000153],[18.45000076,42.47999954],[17.51000023,42.84999847],[16.93000031,43.20999908],[16.01540947,43.50722885],[15.17444992,44.24322128],[15.37627983,44.31792831],[14.92028999,44.73849106],[14.90159988,45.0760498],[14.25872993,45.23376083],[13.95224953,44.80213165],[13.65697956,45.13692093],[13.67940998,45.48416138],[13.71506023,45.50032043],[14.41197968,45.46617889],[14.59512043,45.63496017],[14.93523979,45.47171021],[15.32769012,45.45233917],[15.32394981,45.73180008],[15.6715498,45.8341713],[15.76871967,46.23814011],[16.56483078,46.50374985],[16.88253021,46.38063049],[17.63005066,45.95175934],[18.45606041,45.75947189],[18.82982063,45.90887833],[18.82982063,45.90887833]]]}, -{code:"BA", name:"Bosnia and Herzegovina", borders:[[[19.00547981,44.86022949],[19.36803055,44.86299896],[19.11761093,44.423069],[19.59976006,44.03847122],[19.45400047,43.56809998],[19.21851921,43.52384186],[19.03165054,43.43252945],[18.70648003,43.20011139],[18.55999947,42.65000153],[17.67490005,43.02856827],[17.29739952,43.44636154],[16.91617012,43.66770935],[16.45643997,44.04124069],[16.23966026,44.35113144],[15.75004005,44.8187294],[15.9593401,45.23376083],[16.31814957,45.00410843],[16.53492928,45.21163177],[17.00213051,45.23376083],[17.86178017,45.06774902],[18.55323982,45.08158112],[19.00547981,44.86022949],[19.00547981,44.86022949]]]}, -{code:"AL", name:"Albania", borders:[[[20.59023094,41.85541153],[20.46315002,41.51509094],[20.60518074,41.08621979],[21.02005005,40.84273911],[21.,40.58000183],[20.67499924,40.43500137],[20.61499977,40.11000061],[20.14999962,39.625],[19.97999954,39.69499969],[19.95999908,39.91500092],[19.40611076,40.25075912],[19.31904984,40.72724152],[19.40354919,41.40954971],[19.54000092,41.72000122],[19.37177086,41.87754822],[19.30448914,42.19573975],[19.73806,42.68824005],[19.80158997,42.50009155],[20.07069969,42.58863068],[20.28373909,42.32025146],[20.52294922,42.2178688],[20.59023094,41.85541153],[20.59023094,41.85541153]]]}, -{code:"TR", name:"Turkey", borders:[[[26.11705971,41.82688904],[27.13570976,42.14149094],[27.9967308,42.00737],[28.11551094,41.6228714],[28.98847008,41.2999382],[28.80644035,41.05495071],[27.61903,40.99982834],[27.19238091,40.69055939],[26.3579998,40.15200043],[26.04335022,40.61774826],[26.05690956,40.82413101],[26.29462051,40.93624878],[26.60417938,41.56212997],[26.11705971,41.82688904],[26.11705971,41.82688904]],[[26.17077065,39.4636116],[27.28000069,40.41999817],[28.81999969,40.45999908],[29.23999977,41.22000122],[31.14595032,41.08761978],[32.34796143,41.73627853],[33.51330185,42.01895905],[35.16772842,42.04021835],[36.91313934,41.33536911],[38.34769058,40.94858932],[39.5125885,41.10277176],[40.37342834,41.01367188],[41.55408096,41.53564835],[42.61957932,41.58317947],[43.58274078,41.0921402],[43.75265884,40.74020004],[43.65642166,40.25357056],[44.40000153,40.00500107],[44.78858185,39.71701813],[44.10924149,39.42815018],[44.42142105,38.28126907],[44.22573853,37.97159958],[44.77267075,37.1704483],[44.29346085,37.00149918],[43.9422493,37.2562294],[42.77909851,37.38526917],[42.34957123,37.22988129],[41.21212006,37.07435989],[40.67325974,37.09127045],[39.52256012,36.71604919],[38.69985962,36.71292877],[38.16773987,36.90121078],[37.06674957,36.62303162],[36.73949051,36.81752014],[36.6853981,36.25968933],[36.41757965,36.0406189],[36.1497612,35.82154846],[35.78207016,36.27499008],[36.16083145,36.65060043],[35.55091095,36.56544876],[34.71455002,36.79552078],[34.02690125,36.2199707],[32.50917053,36.10755157],[31.69961929,36.64427948],[30.6216507,36.67787933],[30.39108086,36.26298141],[29.69997025,36.14437103],[28.73291969,36.67683029],[27.64118004,36.65882111],[27.04875946,37.65335083],[26.31822014,38.20812988],[26.80471039,38.98575974],[26.17077065,39.4636116],[26.17077065,39.4636116]]]}, -{code:"GR", name:"Greece", borders:[[[21.02005005,40.84273911],[21.67412949,40.93127823],[22.05537033,41.14986038],[22.59732056,41.13048935],[22.76177025,41.30479813],[22.95239067,41.33800888],[23.69207954,41.30907822],[24.49263954,41.58390045],[25.19721031,41.23447037],[26.1061306,41.32889175],[26.11705971,41.82688904],[26.60417938,41.56212997],[26.29462051,40.93624878],[26.05690956,40.82413101],[25.44766045,40.85255051],[24.9258709,40.94707108],[23.7148304,40.68711853],[24.40800095,40.125],[23.89999962,39.9620018],[23.34300041,39.96099854],[22.81399918,40.47600174],[22.62627983,40.25654984],[22.84975052,39.65930939],[23.35000038,39.18999863],[22.97312927,38.97090149],[23.53000069,38.50999832],[24.02499962,38.22000122],[24.04000092,37.65499878],[23.11499977,37.91999817],[23.40999985,37.40999985],[22.77499962,37.30500031],[23.15423012,36.42250824],[22.48999977,36.40999985],[21.67000008,36.84500122],[21.29500008,37.64500046],[21.12001991,38.31031036],[20.72999954,38.77000046],[20.21773911,39.34024048],[20.14999962,39.625],[20.61499977,40.11000061],[20.67499924,40.43500137],[21.,40.58000183],[21.02005005,40.84273911],[21.02005005,40.84273911]],[[26.29000092,35.29999924],[26.16500092,35.00500107],[24.72500038,34.91999817],[24.73500061,35.08499908],[23.51499939,35.27999878],[23.70000076,35.70500183],[24.24666977,35.3680191],[25.02499962,35.42499924],[25.76923943,35.35401154],[25.74500084,35.18000031],[26.29000092,35.29999924],[26.29000092,35.29999924]]]}, -{code:"MK", name:"Macedonia", borders:[[[20.59023094,41.85541153],[20.71730995,41.84711075],[20.76215935,42.05186081],[21.35269928,42.20679855],[21.91707993,42.30363846],[22.38054085,42.32025146],[22.88138008,41.99929047],[22.95239067,41.33800888],[22.76177025,41.30479813],[22.59732056,41.13048935],[22.05537033,41.14986038],[21.67412949,40.93127823],[21.02005005,40.84273911],[20.60518074,41.08621979],[20.46315002,41.51509094],[20.59023094,41.85541153],[20.59023094,41.85541153]]]}, -{code:"BG", name:"Bulgaria", borders:[[[22.65711975,44.2349205],[22.94485092,43.82376862],[23.33229065,43.8970108],[24.10070992,43.74103928],[25.56929016,43.68843079],[26.06513977,43.94350052],[27.24237061,44.17599106],[27.97013092,43.81246948],[28.55809021,43.70748138],[28.03910065,43.29319],[27.67387962,42.57789993],[27.9967308,42.00737],[27.13570976,42.14149094],[26.11705971,41.82688904],[26.1061306,41.32889175],[25.19721031,41.23447037],[24.49263954,41.58390045],[23.69207954,41.30907822],[22.95239067,41.33800888],[22.88138008,41.99929047],[22.38054085,42.32025146],[22.54499054,42.46136093],[22.43659973,42.5803299],[22.60478973,42.89852142],[22.98603058,43.21118164],[22.50013924,43.64281082],[22.41044044,44.00804138],[22.65711975,44.2349205],[22.65711975,44.2349205]]]}, -{code:"RS", name:"Serbia", borders:[[[20.22019958,46.12746048],[19.59602928,46.17173004],[18.82982063,45.90887833],[19.07275963,45.52151871],[19.39045906,45.2365303],[19.00547981,44.86022949],[19.36803055,44.86299896],[19.11761093,44.423069],[19.59976006,44.03847122],[19.45400047,43.56809998],[19.21851921,43.52384186],[19.48389053,43.35229111],[19.62999916,43.21377945],[19.95857048,43.10604095],[20.33979988,42.89852142],[20.23888969,42.76570892],[20.07069969,42.58863068],[20.28373909,42.32025146],[20.52294922,42.2178688],[20.59023094,41.85541153],[20.71730995,41.84711075],[20.76215935,42.05186081],[21.35269928,42.20679855],[21.91707993,42.30363846],[22.38054085,42.32025146],[22.54499054,42.46136093],[22.43659973,42.5803299],[22.60478973,42.89852142],[22.98603058,43.21118164],[22.50013924,43.64281082],[22.41044044,44.00804138],[22.65711975,44.2349205],[22.47397995,44.40922928],[22.70570946,44.57801056],[22.45903015,44.70251846],[22.14506912,44.47840881],[21.56200027,44.76892853],[21.48350906,45.18119049],[20.87429047,45.41637039],[20.76215935,45.73455811],[20.22019958,46.12746048],[20.22019958,46.12746048]],[[20.07069969,42.58863068],[20.23888969,42.76570892],[20.33979988,42.89852142],[19.95857048,43.10604095],[19.62999916,43.21377945],[19.48389053,43.35229111],[19.21851921,43.52384186],[19.03165054,43.43252945],[18.70648003,43.20011139],[18.55999947,42.65000153],[18.45000076,42.47999954],[18.88213921,42.2815094],[19.16246033,41.9550209],[19.37177086,41.87754822],[19.30448914,42.19573975],[19.73806,42.68824005],[19.80158997,42.50009155],[20.07069969,42.58863068],[20.07069969,42.58863068]]]}, -{code:"DE", name:"Germany", borders:[[[9.9218998,54.98308945],[9.93959045,54.59664154],[10.95011997,54.36359024],[10.93947983,54.00870895],[11.95625019,54.19649124],[12.51842022,54.47037125],[13.64748955,54.07550812],[14.11966038,53.75701141],[14.35330009,53.24819183],[14.07448959,52.98128128],[14.4376297,52.62485123],[14.68500042,52.08995819],[14.60706997,51.74518967],[15.01696968,51.10668182],[14.57075024,51.00233841],[14.30700016,51.11727142],[14.05622959,50.9269104],[13.33810043,50.73321915],[12.96683979,50.48408127],[12.24009991,50.26631927],[12.41518974,49.96912003],[12.52105045,49.54740143],[13.03131008,49.3070488],[13.59593964,48.87717056],[13.24333,48.41609955],[12.88411045,48.28916168],[13.02585983,47.63758087],[12.93264008,47.46762848],[12.62077045,47.67238998],[12.14136028,47.70307159],[11.42644024,47.52378082],[10.54448986,47.56639099],[10.40207005,47.30247116],[9.89606953,47.58021164],[9.59424019,47.52507019],[8.52258015,47.83081818],[8.31729984,47.61359024],[7.46677017,47.62057877],[7.59368992,48.33301163],[8.09928036,49.0177803],[6.65822983,49.20193863],[6.18628979,49.46382904],[6.24272013,49.90224075],[6.04305983,50.12805176],[6.15666008,50.80374146],[6.15666008,50.80374146],[6.15666008,50.80374146],[6.15666008,50.80374908],[6.15666008,50.80374908],[5.98865986,51.85160828],[6.5893898,51.85203171],[6.84286022,52.2284317],[7.0920701,53.1440506],[6.90514994,53.4821701],[7.10040998,53.69395065],[7.9362402,53.74832153],[8.12172031,53.52780914],[8.80070972,54.02077866],[8.57213974,54.39564133],[8.52620983,54.96273041],[9.28203964,54.83087158],[9.9218998,54.98308945],[9.9218998,54.98308945]]]}, -{code:"EE", name:"Estonia", borders:[[[24.31283951,57.79344177],[24.42892075,58.38343048],[24.06121063,58.25738144],[23.42654991,58.61278152],[23.33982086,59.18722916],[24.60421944,59.46585846],[25.86418915,59.61109924],[26.94915009,59.44580078],[27.98111916,59.4753685],[28.13170052,59.30083084],[27.42015076,58.72457123],[27.7166996,57.79190063],[27.2881794,57.47452164],[26.4635601,57.47637939],[25.60279083,57.84754181],[25.16459084,57.97014999],[24.31283951,57.79344177],[24.31283951,57.79344177]]]}, -{code:"LV", name:"Latvia", borders:[[[21.05578995,56.03107834],[21.09041977,56.78385925],[21.58185005,57.41186905],[22.52436066,57.75337982],[23.31846046,57.0062294],[24.12075996,57.02568817],[24.31283951,57.79344177],[25.16459084,57.97014999],[25.60279083,57.84754181],[26.4635601,57.47637939],[27.2881794,57.47452164],[27.77004051,57.24423981],[27.85528946,56.75931168],[28.17670059,56.16913986],[27.10247993,55.78329849],[26.4943409,55.61510086],[25.53306007,56.10028839],[25.00094986,56.16455078],[24.86070061,56.37252045],[23.87824059,56.27365875],[22.20113945,56.33779907],[21.05578995,56.03107834],[21.05578995,56.03107834]]]}, -{code:"LT", name:"Lithuania", borders:[[[22.73109055,54.32754898],[22.65102005,54.58274078],[22.75774956,54.8565712],[22.31571007,55.01530838],[21.26844025,55.19047928],[21.05578995,56.03107834],[22.20113945,56.33779907],[23.87824059,56.27365875],[24.86070061,56.37252045],[25.00094986,56.16455078],[25.53306007,56.10028839],[26.4943409,55.61510086],[26.5883007,55.16717148],[25.76843071,54.84695816],[25.53636932,54.28242874],[24.45067978,53.90568924],[23.48413086,53.91249847],[23.24401093,54.22058105],[22.73109055,54.32754898],[22.73109055,54.32754898]]]}, -{code:"RO", name:"Romania", borders:[[[22.71052933,47.88217926],[23.14222908,48.09632874],[23.76098061,47.98559189],[24.40203094,47.98186874],[24.86630058,47.73751831],[25.20775032,47.89105988],[25.94594002,47.98715973],[26.19743919,48.22087097],[26.61931992,48.22074127],[26.92416,48.12327957],[27.23386002,47.82677078],[27.55114937,47.40510941],[28.12805939,46.81045914],[28.15999985,46.37155914],[28.05442047,45.94458008],[28.23353004,45.48826981],[28.67977905,45.30403137],[29.1497097,45.46492004],[29.60326004,45.2933197],[29.62656021,45.03541183],[29.14160919,44.82022095],[28.83786011,44.91387939],[28.55809021,43.70748138],[27.97013092,43.81246948],[27.24237061,44.17599106],[26.06513977,43.94350052],[25.56929016,43.68843079],[24.10070992,43.74103928],[23.33229065,43.8970108],[22.94485092,43.82376862],[22.65711975,44.2349205],[22.47397995,44.40922928],[22.70570946,44.57801056],[22.45903015,44.70251846],[22.14506912,44.47840881],[21.56200027,44.76892853],[21.48350906,45.18119049],[20.87429047,45.41637039],[20.76215935,45.73455811],[20.22019958,46.12746048],[21.0219593,46.31607056],[21.62648964,46.99422836],[22.09976006,47.67243958],[22.71052933,47.88217926],[22.71052933,47.88217926]]]}, -{code:"MD", name:"Republic of Moldova", borders:[[[26.61931992,48.22074127],[26.85782051,48.36820984],[27.52252007,48.46712875],[28.25952911,48.15555954],[28.67089081,48.11816025],[29.12266922,47.84909821],[29.0508709,47.51020813],[29.41514015,47.34664154],[29.55968094,46.92858124],[29.90884972,46.67438126],[29.83823967,46.52534103],[30.02463913,46.4239502],[29.76000023,46.34999847],[29.17064095,46.37926102],[29.07209015,46.51768112],[28.86300087,46.43788147],[28.93372917,46.2588501],[28.65999985,45.93999863],[28.48526955,45.59690857],[28.23353004,45.48826981],[28.05442047,45.94458008],[28.15999985,46.37155914],[28.12805939,46.81045914],[27.55114937,47.40510941],[27.23386002,47.82677078],[26.92416,48.12327957],[26.61931992,48.22074127],[26.61931992,48.22074127]]]}, -{code:"HU", name:"Hungary", borders:[[[16.20228004,46.85237885],[16.53426933,47.4961586],[16.34057999,47.71289825],[16.90376091,47.71487045],[16.9796505,48.12350082],[17.48848915,47.86748123],[17.85714912,47.75843048],[18.69651031,47.88097],[18.77704048,48.08174896],[19.17436028,48.11138916],[19.66135979,48.26663971],[19.76944923,48.20267868],[20.23904037,48.32757187],[20.47356987,48.56285095],[20.80130005,48.62385178],[21.87223053,48.31996918],[22.08562088,48.42224884],[22.64079094,48.15023041],[22.71052933,47.88217926],[22.09976006,47.67243958],[21.62648964,46.99422836],[21.0219593,46.31607056],[20.22019958,46.12746048],[19.59602928,46.17173004],[18.82982063,45.90887833],[18.45606041,45.75947189],[17.63005066,45.95175934],[16.88253021,46.38063049],[16.56483078,46.50374985],[16.37047958,46.84130859],[16.20228004,46.85237885],[16.20228004,46.85237885]]]}, -{code:"AT", name:"Austria", borders:[[[16.9796505,48.12350082],[16.90376091,47.71487045],[16.34057999,47.71289825],[16.53426933,47.4961586],[16.20228004,46.85237885],[16.01166916,46.68360138],[15.1370697,46.65869904],[14.63249016,46.43181992],[13.80648041,46.50928879],[12.37650013,46.76755905],[12.15307999,47.11539078],[11.16483974,46.94158936],[11.04856014,46.7513504],[10.44270992,46.89355087],[9.93247986,46.92073059],[9.47998047,47.10282135],[9.6329298,47.3475914],[9.59424019,47.52507019],[9.89606953,47.58021164],[10.40207005,47.30247116],[10.54448986,47.56639099],[11.42644024,47.52378082],[12.14136028,47.70307159],[12.62077045,47.67238998],[12.93264008,47.46762848],[13.02585983,47.63758087],[12.88411045,48.28916168],[13.24333,48.41609955],[13.59593964,48.87717056],[14.33887959,48.55530167],[14.90143967,48.9643898],[15.25341034,49.03908157],[16.02964973,48.73389816],[16.4993,48.78580856],[16.96030045,48.5969696],[16.87999916,48.47000122],[16.9796505,48.12350082],[16.9796505,48.12350082]]]}, -{code:"PL", name:"Poland", borders:[[[15.01696968,51.10668182],[14.60706997,51.74518967],[14.68500042,52.08995819],[14.4376297,52.62485123],[14.07448959,52.98128128],[14.35330009,53.24819183],[14.11966038,53.75701141],[14.80288982,54.05072021],[16.36347008,54.51316833],[17.62280083,54.85153961],[18.62084961,54.68260956],[18.69626999,54.4387207],[19.66064072,54.42610168],[20.89224052,54.31253052],[22.73109055,54.32754898],[23.24401093,54.22058105],[23.48413086,53.91249847],[23.52753067,53.47011185],[23.80492973,53.08974838],[23.79920959,52.69110107],[23.19949913,52.48696899],[23.50799942,52.02365112],[23.52706909,51.57846832],[24.02997971,50.70541],[23.92275047,50.42488098],[23.42650032,50.30849838],[22.51841927,49.47677994],[22.77639961,49.02740097],[22.55816078,49.08573914],[21.60779953,49.47008896],[20.88796043,49.32878876],[20.41583061,49.43146133],[19.82504082,49.21712875],[19.32069969,49.57157135],[18.90957069,49.43585968],[18.85313988,49.49623108],[18.39289093,49.98865128],[17.64942932,50.04904175],[17.55456924,50.36212921],[16.86874008,50.47399139],[16.71949005,50.2157402],[16.17624092,50.42263031],[16.23863029,50.69773865],[15.49094963,50.784729],[15.01696968,51.10668182],[15.01696968,51.10668182]]]}, -{code:"UA", name:"Ukraine", borders:[[[31.78597069,52.10168076],[32.15943909,52.06124878],[32.41207123,52.28871155],[32.71575928,52.2384491],[33.75268173,52.33507919],[34.39175034,51.76887131],[34.14197922,51.56642914],[34.22481155,51.25600815],[35.02220917,51.2075882],[35.37791061,50.77394104],[35.35612869,50.57720184],[36.62614822,50.22558975],[37.39345932,50.38396835],[38.01063919,49.91566086],[38.59500885,49.92646027],[40.06903839,49.60105133],[40.08079147,49.30744171],[39.67464828,48.78382111],[39.89561844,48.23241043],[39.73828125,47.8989296],[38.77056885,47.82561874],[38.25511169,47.54640961],[38.22356033,47.10218811],[37.42515945,47.02222061],[36.75986862,46.69869995],[35.82366943,46.64596176],[34.96231079,46.27318954],[35.02080154,45.6512413],[35.50999832,45.40999985],[36.52999878,45.47000122],[36.33472824,45.11320877],[35.24000168,44.93999863],[33.88249969,44.36148834],[33.32643127,44.5648613],[33.54695129,45.03477097],[32.4541893,45.32746887],[32.63079834,45.5191803],[33.58813095,45.85155869],[33.29853821,46.08058929],[31.74416924,46.33335876],[31.67528915,46.70624924],[30.74873924,46.58311081],[30.37763977,46.03240967],[29.60326004,45.2933197],[29.1497097,45.46492004],[28.67977905,45.30403137],[28.23353004,45.48826981],[28.48526955,45.59690857],[28.65999985,45.93999863],[28.93372917,46.2588501],[28.86300087,46.43788147],[29.07209015,46.51768112],[29.17064095,46.37926102],[29.76000023,46.34999847],[30.02463913,46.4239502],[29.83823967,46.52534103],[29.90884972,46.67438126],[29.55968094,46.92858124],[29.41514015,47.34664154],[29.0508709,47.51020813],[29.12266922,47.84909821],[28.67089081,48.11816025],[28.25952911,48.15555954],[27.52252007,48.46712875],[26.85782051,48.36820984],[26.61931992,48.22074127],[26.19743919,48.22087097],[25.94594002,47.98715973],[25.20775032,47.89105988],[24.86630058,47.73751831],[24.40203094,47.98186874],[23.76098061,47.98559189],[23.14222908,48.09632874],[22.71052933,47.88217926],[22.64079094,48.15023041],[22.08562088,48.42224884],[22.28082085,48.82542038],[22.55816078,49.08573914],[22.77639961,49.02740097],[22.51841927,49.47677994],[23.42650032,50.30849838],[23.92275047,50.42488098],[24.02997971,50.70541],[23.52706909,51.57846832],[24.00509071,51.61743927],[24.55311966,51.88848114],[25.32781982,51.91065979],[26.33797073,51.83227158],[27.45409012,51.59228897],[28.24163055,51.57223129],[28.61762047,51.42770004],[28.99283981,51.60205078],[29.25494003,51.36822891],[30.15736961,51.41613007],[30.55511093,51.31948853],[30.61948013,51.82281113],[30.92757988,52.04233932],[31.78597069,52.10168076],[31.78597069,52.10168076]]]}, -{code:"BY", name:"Belarus", borders:[[[23.48413086,53.91249847],[24.45067978,53.90568924],[25.53636932,54.28242874],[25.76843071,54.84695816],[26.5883007,55.16717148],[26.4943409,55.61510086],[27.10247993,55.78329849],[28.17670059,56.16913986],[29.22953033,55.91836929],[29.37154007,55.67010117],[29.89631081,55.7894516],[30.87393951,55.55099869],[30.97184944,55.0815506],[30.75754929,54.81177139],[31.38448906,54.15703964],[31.79141998,53.97462845],[31.73127937,53.79402924],[32.40557861,53.61804962],[32.69366074,53.35145187],[32.30455017,53.13272858],[31.49764061,53.16743088],[31.30521011,53.07400131],[31.54000092,52.74208069],[31.78597069,52.10168076],[30.92757988,52.04233932],[30.61948013,51.82281113],[30.55511093,51.31948853],[30.15736961,51.41613007],[29.25494003,51.36822891],[28.99283981,51.60205078],[28.61762047,51.42770004],[28.24163055,51.57223129],[27.45409012,51.59228897],[26.33797073,51.83227158],[25.32781982,51.91065979],[24.55311966,51.88848114],[24.00509071,51.61743927],[23.52706909,51.57846832],[23.50799942,52.02365112],[23.19949913,52.48696899],[23.79920959,52.69110107],[23.80492973,53.08974838],[23.52753067,53.47011185],[23.48413086,53.91249847],[23.48413086,53.91249847]]]}, -{code:"SE", name:"Sweden", borders:[[[22.18314934,65.72376251],[21.21348953,65.02600861],[21.36964035,64.41356659],[19.77885056,63.60955048],[17.84775925,62.74942017],[17.11956024,61.34114838],[17.83132935,60.63658142],[18.78770065,60.08190155],[17.86920929,58.95375061],[16.82917976,58.71981049],[16.44772911,57.04109955],[15.87981033,56.10430145],[14.66666985,56.20087814],[14.10074043,55.40779877],[12.94289017,55.36175156],[12.62510014,56.30707932],[11.78794003,57.44182968],[11.02737045,58.85617065],[11.46823978,59.43239975],[12.30039024,60.117939],[12.63115978,61.29359055],[11.99205971,61.80036926],[11.93056011,63.12831879],[12.57993984,64.06625366],[13.57192993,64.04911804],[13.91991043,64.44542694],[13.5557003,64.78703308],[15.10842037,66.19387054],[16.10869026,67.3024292],[16.76889038,68.01393127],[17.72916031,68.01055145],[17.99386978,68.56741333],[19.87857056,68.4072113],[20.02523994,69.06513977],[20.64558983,69.10624695],[21.9785099,68.61685181],[23.53948975,67.93601227],[23.56587029,66.39607239],[23.9033699,66.00691223],[22.18314934,65.72376251],[22.18314934,65.72376251]]]}, -{code:"AM", name:"Armenia", borders:[[[43.58274078,41.0921402],[44.96324921,41.24708939],[44.96343994,41.2461319],[45.17947006,40.98537064],[45.56032181,40.81229019],[45.35919189,40.56148911],[45.89191055,40.21847916],[45.61000061,39.90000153],[46.0345192,39.62802124],[46.48350906,39.46414948],[46.50572968,38.77059937],[46.14360809,38.74119949],[45.73535919,39.31972122],[45.74000168,39.47399902],[45.29816818,39.47174835],[45.0019989,39.74000168],[44.78858185,39.71701813],[44.40000153,40.00500107],[43.65642166,40.25357056],[43.75265884,40.74020004],[43.58274078,41.0921402],[43.58274078,41.0921402]]]}, -{code:"SY", name:"Syria", borders:[[[38.79235077,33.37868118],[36.83406067,32.31293106],[35.71992874,32.70920181],[35.83641052,32.86811066],[35.82107162,33.27743149],[36.06645966,33.82490158],[36.61177826,34.20178986],[36.44818115,34.59394073],[35.99840927,34.64492035],[35.76314163,35.49742889],[36.1497612,35.82154846],[36.41757965,36.0406189],[36.6853981,36.25968933],[36.73949051,36.81752014],[37.06674957,36.62303162],[38.16773987,36.90121078],[38.69985962,36.71292877],[39.52256012,36.71604919],[40.67325974,37.09127045],[41.21212006,37.07435989],[42.34957123,37.22988129],[41.83707809,36.60586166],[41.28971863,36.35879898],[41.38399124,35.62833023],[41.00616837,34.41938019],[38.79235077,33.37868118],[38.79235077,33.37868118]]]}, -{code:"IR", name:"Iran", borders:[[[53.92156982,37.1989212],[54.80033112,37.39242935],[55.51160049,37.96411896],[56.18035889,37.93511963],[56.61938095,38.1213913],[57.33044052,38.02922821],[58.43613052,37.52230072],[59.23472977,37.41299057],[60.37765884,36.52738953],[61.12308121,36.49158859],[61.21080017,35.65008163],[60.80319977,34.40409088],[60.52841187,33.67644882],[60.96369171,33.52883911],[60.53607941,32.98126984],[60.86365128,32.18291092],[60.94197083,31.54808044],[61.6993103,31.37951088],[61.78123856,30.73583984],[60.8742485,29.82925034],[61.36928177,29.30327034],[61.77183914,28.69934082],[62.72782135,28.25963974],[62.75543976,27.37892914],[63.23390961,27.21703911],[63.31665039,26.7565403],[61.8741684,26.23996925],[61.49739075,25.07823944],[59.6161499,25.38015938],[58.52574921,25.60994911],[57.39725113,25.73991013],[56.97077942,26.96611023],[56.49211884,27.14332008],[55.72370148,26.96463966],[54.71508026,26.48064995],[53.49308014,26.81237984],[52.48360825,27.5808506],[51.52075958,27.86568069],[50.85292816,28.81451988],[50.11503983,30.14776039],[49.57685089,29.98571014],[48.94131088,30.31708908],[48.56798172,29.9267807],[48.0145607,30.4524498],[48.00468063,30.98513985],[47.68526077,30.98485947],[47.84918976,31.70919037],[47.33465958,32.46915054],[46.10932922,33.01728821],[45.41669846,33.96781158],[45.64844894,34.7481308],[46.15179825,35.09326172],[46.07633972,35.67737961],[45.42060089,35.97758102],[44.77267075,37.1704483],[44.22573853,37.97159958],[44.42142105,38.28126907],[44.10924149,39.42815018],[44.78858185,39.71701813],[44.95270157,39.33576965],[45.45774841,38.87413025],[46.14360809,38.74119949],[46.50572968,38.77059937],[47.68508148,39.50836182],[48.06008148,39.58224106],[48.35551071,39.28874969],[48.01073837,38.79402161],[48.63436127,38.27037811],[48.88327026,38.32025909],[49.19961166,37.58287048],[50.14775085,37.37458038],[50.84235001,36.87282181],[52.26401901,36.70043182],[53.82579041,36.96503067],[53.92156982,37.1989212],[53.92156982,37.1989212]]]}, -{code:"TM", name:"Turkmenistan", borders:[[[61.21080017,35.65008163],[61.12308121,36.49158859],[60.37765884,36.52738953],[59.23472977,37.41299057],[58.43613052,37.52230072],[57.33044052,38.02922821],[56.61938095,38.1213913],[56.18035889,37.93511963],[55.51160049,37.96411896],[54.80033112,37.39242935],[53.92156982,37.1989212],[53.73550034,37.90613174],[53.88092041,38.95207977],[53.10100937,39.29058838],[53.35779953,39.97528839],[52.69396973,40.03364182],[52.91527939,40.87652969],[53.85811996,40.63103104],[54.73683929,40.95101166],[54.00828934,41.5512085],[53.72172165,42.12319946],[52.91675949,41.86811066],[52.81467819,41.13536835],[52.50246811,41.78332138],[52.94430161,42.11605072],[54.07942963,42.32410049],[54.75534821,42.0439682],[55.45521927,41.25986862],[55.96820068,41.30863953],[57.09642029,41.3223114],[56.93222046,41.82603073],[57.7865181,42.17053986],[58.62900162,42.75154114],[59.97642136,42.22307968],[60.08333969,41.42515182],[60.46596146,41.22034073],[61.54718018,41.26636887],[61.8827095,41.08485031],[62.3742485,40.05389023],[63.5180397,39.36325836],[64.17024231,38.89242172],[65.21601105,38.40269089],[66.54611969,37.97470093],[66.51862335,37.36277008],[66.21736908,37.39379883],[65.74565125,37.66117859],[65.58894348,37.30522919],[64.74611664,37.11180878],[64.54650116,36.31208038],[63.98287964,36.00794983],[63.19351959,35.85715866],[62.98468018,35.40404892],[62.23067093,35.27067184],[61.21080017,35.65008163],[61.21080017,35.65008163]]]}, -{code:"UZ", name:"Uzbekistan", borders:[[[66.51862335,37.36277008],[67.07576752,37.35614014],[67.83000183,37.14500046],[68.39202118,38.15702057],[68.17601776,38.90156174],[67.44223022,39.14014816],[67.7014389,39.58047867],[68.53640747,39.53343964],[69.01161957,40.08615112],[69.32949829,40.72782898],[70.66661072,40.96020889],[70.45816803,40.49650955],[70.60140991,40.21852875],[71.01422119,40.24436188],[71.77487946,40.14585114],[73.05544281,40.8660202],[71.87010956,41.39289856],[71.1578598,41.14358139],[70.41999817,41.52000046],[71.25921631,42.16772079],[70.96231079,42.26615143],[70.38894653,42.08132172],[69.07000732,41.38425064],[68.63249207,40.66867065],[68.25990295,40.66233063],[67.98584747,41.13599014],[66.71405792,41.16843033],[66.51065826,41.98764038],[66.02336121,41.99464035],[66.09802246,42.99766159],[64.90081787,43.72806168],[63.18579102,43.65008163],[62.01327896,43.5044899],[61.05833054,44.40583038],[60.24000168,44.78404617],[59.77000046,44.15999985],[59.06285858,44.36930084],[59.34571075,44.99720001],[59.35929489,45.18999863],[58.96138,45.375],[58.92142868,44.73558044],[58.49713898,44.21232986],[58.28499985,44.47394943],[58.28499985,44.89255142],[58.68999863,45.5],[58.50312042,45.58679962],[55.92893982,44.99584961],[55.96820068,41.30863953],[57.09642029,41.3223114],[56.93222046,41.82603073],[57.7865181,42.17053986],[58.62900162,42.75154114],[59.97642136,42.22307968],[60.08333969,41.42515182],[60.46596146,41.22034073],[61.54718018,41.26636887],[61.8827095,41.08485031],[62.3742485,40.05389023],[63.5180397,39.36325836],[64.17024231,38.89242172],[65.21601105,38.40269089],[66.54611969,37.97470093],[66.51862335,37.36277008],[66.51862335,37.36277008]]]}, -{code:"KG", name:"Kyrgyzstan", borders:[[[70.96231079,42.26615143],[71.1862793,42.70428848],[71.84461212,42.84540176],[73.48973846,42.50090027],[73.64530182,43.09127045],[74.21286774,43.2983284],[75.63696289,42.87789154],[76.00032806,42.98801041],[77.65840912,42.96068954],[79.14219666,42.85609055],[79.64364624,42.49668121],[80.26000214,42.34999847],[80.11943817,42.12395096],[78.54369354,41.58224106],[78.18720245,41.18531036],[76.90445709,41.06647873],[76.52635956,40.42795181],[75.46782684,40.56206894],[74.77684021,40.36642838],[73.82225037,39.89397049],[73.95999908,39.65999985],[73.67537689,39.43125153],[71.78468323,39.27946091],[70.54914856,39.6042099],[69.46488953,39.52667999],[69.55960083,40.10321045],[70.6480484,39.9357605],[71.01422119,40.24436188],[71.77487946,40.14585114],[73.05544281,40.8660202],[71.87010956,41.39289856],[71.1578598,41.14358139],[70.41999817,41.52000046],[71.25921631,42.16772079],[70.96231079,42.26615143],[70.96231079,42.26615143]]]}, -{code:"TJ", name:"Tajikistan", borders:[[[71.01422119,40.24436188],[70.6480484,39.9357605],[69.55960083,40.10321045],[69.46488953,39.52667999],[70.54914856,39.6042099],[71.78468323,39.27946091],[73.67537689,39.43125153],[73.92886353,38.50582886],[74.25750732,38.60649872],[74.86483765,38.37884903],[74.83000183,37.99000168],[74.98000336,37.41999817],[73.94867706,37.42155838],[73.26004028,37.4952507],[72.63690186,37.0475502],[72.19302368,36.94828033],[71.84461212,36.73815918],[71.44869995,37.06565094],[71.54192352,37.90578079],[71.23938751,37.95326996],[71.3481369,38.25888824],[70.80680847,38.48627853],[70.37628937,38.13838959],[70.27057648,37.73516083],[70.11656952,37.58821869],[69.51880646,37.60898972],[69.19628143,37.15114975],[68.85944366,37.34434891],[68.13556671,37.02310944],[67.83000183,37.14500046],[68.39202118,38.15702057],[68.17601776,38.90156174],[67.44223022,39.14014816],[67.7014389,39.58047867],[68.53640747,39.53343964],[69.01161957,40.08615112],[69.32949829,40.72782898],[70.66661072,40.96020889],[70.45816803,40.49650955],[70.60140991,40.21852875],[71.01422119,40.24436188],[71.01422119,40.24436188]]]}, -{code:"AF", name:"Afghanistan", borders:[[[61.21080017,35.65008163],[62.23067093,35.27067184],[62.98468018,35.40404892],[63.19351959,35.85715866],[63.98287964,36.00794983],[64.54650116,36.31208038],[64.74611664,37.11180878],[65.58894348,37.30522919],[65.74565125,37.66117859],[66.21736908,37.39379883],[66.51862335,37.36277008],[67.07576752,37.35614014],[67.83000183,37.14500046],[68.13556671,37.02310944],[68.85944366,37.34434891],[69.19628143,37.15114975],[69.51880646,37.60898972],[70.11656952,37.58821869],[70.27057648,37.73516083],[70.37628937,38.13838959],[70.80680847,38.48627853],[71.3481369,38.25888824],[71.23938751,37.95326996],[71.54192352,37.90578079],[71.44869995,37.06565094],[71.84461212,36.73815918],[72.19302368,36.94828033],[72.63690186,37.0475502],[73.26004028,37.4952507],[73.94867706,37.42155838],[74.98000336,37.41999817],[75.15802002,37.13302994],[74.57589722,37.02083969],[74.06757355,36.8361702],[72.91999817,36.72000122],[71.84628296,36.50994873],[71.26236725,36.07437897],[71.4987793,35.65055847],[71.61308289,35.15319824],[71.11501312,34.73310852],[71.1567688,34.34891891],[70.88181305,33.98884964],[69.93052673,34.02011871],[70.32357788,33.35852051],[69.68714142,33.10549927],[69.26251984,32.50193024],[69.31774902,31.90139961],[68.926651,31.62018013],[68.55692291,31.71331978],[67.79270935,31.58293915],[67.68338776,31.30314064],[66.93888855,31.30489922],[66.3814621,30.73891068],[66.34645081,29.88793945],[65.04686737,29.47219086],[64.35044098,29.56003952],[64.14801025,29.34081078],[63.55025101,29.46833992],[62.54985809,29.31856918],[60.8742485,29.82925034],[61.78123856,30.73583984],[61.6993103,31.37951088],[60.94197083,31.54808044],[60.86365128,32.18291092],[60.53607941,32.98126984],[60.96369171,33.52883911],[60.52841187,33.67644882],[60.80319977,34.40409088],[61.21080017,35.65008163],[61.21080017,35.65008163]]]}, -{code:"PK", name:"Pakistan", borders:[[[75.15802002,37.13302994],[75.89691162,36.66680908],[76.19284058,35.89839935],[77.83746338,35.49401855],[76.87174225,34.65354919],[75.75704956,34.50492096],[74.24019623,34.74887848],[73.74992371,34.3176918],[74.10430145,33.44145966],[74.4515686,32.76490021],[75.25863647,32.27111053],[74.40589905,31.6926403],[74.42137146,30.97982025],[73.45066833,29.97641945],[72.8237381,28.96158028],[71.77768707,27.9131794],[70.61647034,27.98920059],[69.51438904,26.94096947],[70.16893768,26.49188042],[70.28289795,25.72221947],[70.84468079,25.21509933],[71.0432663,24.35652924],[68.84259796,24.3591404],[68.176651,23.69197083],[67.44367218,23.94485092],[67.14543915,24.66360092],[66.37281036,25.42514038],[64.53041077,25.23703957],[62.90571976,25.21841049],[61.49739075,25.07823944],[61.8741684,26.23996925],[63.31665039,26.7565403],[63.23390961,27.21703911],[62.75543976,27.37892914],[62.72782135,28.25963974],[61.77183914,28.69934082],[61.36928177,29.30327034],[60.8742485,29.82925034],[62.54985809,29.31856918],[63.55025101,29.46833992],[64.14801025,29.34081078],[64.35044098,29.56003952],[65.04686737,29.47219086],[66.34645081,29.88793945],[66.3814621,30.73891068],[66.93888855,31.30489922],[67.68338776,31.30314064],[67.79270935,31.58293915],[68.55692291,31.71331978],[68.926651,31.62018013],[69.31774902,31.90139961],[69.26251984,32.50193024],[69.68714142,33.10549927],[70.32357788,33.35852051],[69.93052673,34.02011871],[70.88181305,33.98884964],[71.1567688,34.34891891],[71.11501312,34.73310852],[71.61308289,35.15319824],[71.4987793,35.65055847],[71.26236725,36.07437897],[71.84628296,36.50994873],[72.91999817,36.72000122],[74.06757355,36.8361702],[74.57589722,37.02083969],[75.15802002,37.13302994],[75.15802002,37.13302994]]]}, -{code:"NP", name:"Nepal", borders:[[[88.12045288,27.87655067],[88.04309845,27.44581985],[88.17482758,26.81041908],[88.0602417,26.41463089],[87.22750092,26.39789963],[86.0243988,26.63097954],[85.25176239,26.72619057],[84.67501831,27.23489952],[83.30422974,27.36450958],[82.,27.92547989],[81.05719757,28.41610909],[80.08843994,28.7944603],[80.47673798,29.72985077],[81.11122894,30.18349075],[81.52581787,30.42271042],[82.32749939,30.11527061],[83.33711243,29.46372986],[83.8989563,29.32023048],[84.23458862,28.83987999],[85.01164246,28.64277077],[85.823349,28.20358086],[86.95448303,27.97425079],[88.12045288,27.87655067],[88.12045288,27.87655067]]]}, -{code:"BT", name:"Bhutan", borders:[[[91.69667816,27.7717495],[92.10370636,27.45261002],[92.03347015,26.83831024],[91.21752167,26.80864906],[90.37326813,26.87570953],[89.74455261,26.71940994],[88.83561707,27.09896088],[88.81426239,27.29932022],[89.47579193,28.04276085],[90.01586151,28.29644012],[90.7305069,28.0649395],[91.25888062,28.04060936],[91.69667816,27.7717495],[91.69667816,27.7717495]]]}, -{code:"BD", name:"Bangladesh", borders:[[[92.67272186,22.04122925],[92.65225983,21.3240509],[92.30326843,21.47547913],[92.3685379,20.67086983],[92.08290863,21.19219017],[92.02522278,21.70155907],[91.83487701,22.18294907],[91.41708374,22.76501083],[90.49598694,22.80500984],[90.58692169,22.39279938],[90.27294159,21.83637047],[89.84745789,22.03915024],[89.70204163,21.85709953],[89.41883087,21.9661808],[89.03196716,22.0557003],[88.876297,22.87914085],[88.5297699,23.63113976],[88.69994354,24.2336998],[88.08441162,24.50165939],[88.30638123,24.86607933],[88.93153381,25.23868942],[88.20977783,25.76807022],[88.56305695,26.44651985],[89.3551178,26.01440048],[89.8325119,25.96508026],[89.92067719,25.2697506],[90.87220001,25.13260078],[91.79959106,25.14743042],[92.37621307,24.97669983],[91.91509247,24.1303997],[91.46772766,24.07265091],[91.15895844,23.50351906],[91.70648193,22.98526955],[91.86994171,23.62435913],[92.14605713,23.62748909],[92.67272186,22.04122925],[92.67272186,22.04122925]]]}, -{code:"IN", name:"India", borders:[[[77.83746338,35.49401855],[78.91227722,34.32192993],[78.81108856,33.50619125],[79.20889282,32.99440002],[79.17611694,32.48377991],[78.45842743,32.61817932],[78.73889923,31.51589966],[79.72135162,30.88273048],[81.11122894,30.18349075],[80.47673798,29.72985077],[80.08843994,28.7944603],[81.05719757,28.41610909],[82.,27.92547989],[83.30422974,27.36450958],[84.67501831,27.23489952],[85.25176239,26.72619057],[86.0243988,26.63097954],[87.22750092,26.39789963],[88.0602417,26.41463089],[88.17482758,26.81041908],[88.04309845,27.44581985],[88.12045288,27.87655067],[88.7303009,28.08687973],[88.81426239,27.29932022],[88.83561707,27.09896088],[89.74455261,26.71940994],[90.37326813,26.87570953],[91.21752167,26.80864906],[92.03347015,26.83831024],[92.10370636,27.45261002],[91.69667816,27.7717495],[92.50312042,27.8968792],[93.41332245,28.64065933],[94.56600189,29.27745056],[95.40480804,29.03171921],[96.11768341,29.45280075],[96.58659363,28.83097076],[96.2488327,28.41102028],[97.32714081,28.26157951],[97.40260315,27.88252068],[97.05200195,27.69906044],[97.13398743,27.08375931],[96.41934204,27.26457977],[95.12474823,26.57357025],[95.15512085,26.00131989],[94.60324097,25.16250992],[94.55265045,24.67523956],[94.10677338,23.8507309],[93.32520294,24.07855988],[93.28636169,23.04364967],[93.06031799,22.70311928],[93.16609192,22.27845955],[92.67272186,22.04122925],[92.14605713,23.62748909],[91.86994171,23.62435913],[91.70648193,22.98526955],[91.15895844,23.50351906],[91.46772766,24.07265091],[91.91509247,24.1303997],[92.37621307,24.97669983],[91.79959106,25.14743042],[90.87220001,25.13260078],[89.92067719,25.2697506],[89.8325119,25.96508026],[89.3551178,26.01440048],[88.56305695,26.44651985],[88.20977783,25.76807022],[88.93153381,25.23868942],[88.30638123,24.86607933],[88.08441162,24.50165939],[88.69994354,24.2336998],[88.5297699,23.63113976],[88.876297,22.87914085],[89.03196716,22.0557003],[88.88873291,21.69058037],[88.20851135,21.70315933],[86.97567749,21.49555969],[87.03314972,20.74329948],[86.49938202,20.15164948],[85.06027985,19.47858047],[83.94100952,18.30200958],[83.18923187,17.67123032],[82.19280243,17.01662064],[82.19125366,16.5566597],[81.69271851,16.31020927],[80.79197693,15.9519701],[80.32489777,15.89916992],[80.02507019,15.13642025],[80.23327637,13.83576965],[80.28629303,13.00625992],[79.86253357,12.05622005],[79.85800171,10.35727978],[79.34049988,10.30885983],[78.88535309,9.54613972],[79.18969727,9.21652985],[78.27794647,8.93305016],[77.94116974,8.25294971],[77.53987122,7.96553993],[76.59300232,8.89927959],[76.13005066,10.29961967],[75.74645233,11.30825996],[75.39608765,11.78124046],[74.86479187,12.74193001],[74.61669922,13.99258995],[74.44389343,14.61723042],[73.53421021,15.99063969],[73.11990356,17.92857933],[72.82093048,19.20824051],[72.82447815,20.41950989],[72.63053894,21.35601997],[71.17527771,20.75744057],[70.47042847,20.87734032],[69.16413879,22.08929062],[69.64491272,22.45078087],[69.34960938,22.8431797],[68.176651,23.69197083],[68.84259796,24.3591404],[71.0432663,24.35652924],[70.84468079,25.21509933],[70.28289795,25.72221947],[70.16893768,26.49188042],[69.51438904,26.94096947],[70.61647034,27.98920059],[71.77768707,27.9131794],[72.8237381,28.96158028],[73.45066833,29.97641945],[74.42137146,30.97982025],[74.40589905,31.6926403],[75.25863647,32.27111053],[74.4515686,32.76490021],[74.10430145,33.44145966],[73.74992371,34.3176918],[74.24019623,34.74887848],[75.75704956,34.50492096],[76.87174225,34.65354919],[77.83746338,35.49401855],[77.83746338,35.49401855]]]}, -{code:"MN", name:"Mongolia", borders:[[[87.75128937,49.29719925],[88.80554199,49.47053909],[90.71366119,50.33179855],[92.23468781,50.80218124],[93.1042099,50.49528885],[94.14756775,50.48052979],[94.815979,50.0134201],[95.81401825,49.97745895],[97.259758,49.72605133],[98.2317276,50.42238998],[97.82572937,51.01100922],[98.86145782,52.04737854],[99.98175812,51.63401031],[100.88950348,51.51684952],[102.06520844,51.25991058],[102.25588989,50.51055908],[103.67653656,50.08996964],[104.62158203,50.27531815],[105.88661194,50.40602112],[106.88883209,50.27428055],[107.86818695,49.79372025],[108.47518158,49.28255081],[109.40245056,49.29296112],[110.6619873,49.13014984],[111.58123779,49.37794876],[112.89772797,49.54357147],[114.36248779,50.24829865],[114.96209717,50.14027023],[115.48571014,49.80516815],[116.6787796,49.88856125],[116.19178009,49.13460159],[115.48532104,48.13537979],[115.74285889,47.72655106],[116.30893707,47.85340881],[117.29551697,47.69770813],[118.06414032,48.0667305],[118.86663055,47.74705124],[119.77281952,47.04806137],[119.66326141,46.69268036],[118.87431335,46.80540848],[117.42173767,46.67272949],[116.71787262,46.38819885],[115.98510742,45.72721863],[114.46035004,45.33983994],[113.46392059,44.80891037],[112.43609619,45.01165009],[111.87333679,45.1020813],[111.34838867,44.45746994],[111.66770172,44.07318115],[111.82962036,43.74312973],[111.12969208,43.40684128],[110.412117,42.87123108],[109.24362946,42.5194397],[107.74476624,42.48152161],[106.12931824,42.13431931],[104.9650116,41.59741974],[104.52227783,41.90835953],[103.31230927,41.90747833],[101.83305359,42.51488113],[100.84584045,42.66381073],[99.51583862,42.52468872],[97.45175171,42.74887848],[96.34938812,42.72563171],[95.76249695,43.31945038],[95.3068924,44.24132156],[94.68895721,44.35232925],[93.48069763,44.9754715],[92.1339035,45.11508179],[90.94553375,45.28606033],[90.58576965,45.71971893],[90.97080231,46.88813019],[90.28085327,47.69355011],[88.85428619,48.06908035],[88.01381683,48.59947968],[87.75128937,49.29719925],[87.75128937,49.29719925]]]}, -{code:"KR", name:"Korea, Republic of", borders:[[[128.34970093,38.61223984],[129.2129364,37.43238831],[129.46043396,36.78417969],[129.4683075,35.63214111],[129.09133911,35.08248901],[128.18585205,34.89036942],[127.38651276,34.4756813],[126.48571014,34.39007187],[126.37387085,34.93457031],[126.55921173,35.68452835],[126.11740875,36.72549057],[126.86013794,36.89393997],[126.17475128,37.74969864],[126.23732758,37.84038162],[126.68370819,37.80475998],[127.07328033,38.25611115],[127.78006744,38.3045311],[128.20571899,38.37039185],[128.34970093,38.61223984],[128.34970093,38.61223984]]]}, -{code:"KP", name:"Korea, Democratic People's Republic of", borders:[[[130.63999939,42.39500046],[130.77999878,42.22000122],[130.3999939,42.27999878],[129.96591187,41.9413681],[129.66734314,41.60110092],[129.70515442,40.88283157],[129.18811035,40.66181183],[129.01039124,40.48542023],[128.63337708,40.18983841],[127.96743011,40.02539825],[127.53341675,39.75683975],[127.5021286,39.32394028],[127.38546753,39.2134819],[127.78334808,39.05091095],[128.34970093,38.61223984],[128.20571899,38.37039185],[127.78006744,38.3045311],[127.07328033,38.25611115],[126.68370819,37.80475998],[126.23732758,37.84038162],[126.17475128,37.74969864],[125.68913269,37.94002151],[125.56845093,37.75207901],[125.27532959,37.66907883],[125.24009705,37.85720825],[124.98100281,37.94881821],[124.7121582,38.10834122],[124.98599243,38.54846954],[125.22197723,38.66585159],[125.13288879,38.84856033],[125.38659668,39.38795853],[125.32112122,39.55139923],[124.73748779,39.66033936],[124.26566315,39.92850113],[125.07996368,40.56980896],[126.18203735,41.10734177],[126.86907196,41.81655884],[127.34381866,41.5031395],[128.20846558,41.46677017],[128.05221558,41.99428177],[129.59663391,42.42499161],[129.99421692,42.98540115],[130.63999939,42.39500046],[130.63999939,42.39500046]]]}, -{code:"VN", name:"Vietnam", borders:[[[108.05020905,21.55237007],[106.71504974,20.69685936],[105.88168335,19.7520504],[105.66201019,19.05817032],[106.42680359,18.00412941],[107.36197662,16.69745064],[108.2694931,16.07975006],[108.87711334,15.27667999],[109.33524323,13.42601967],[109.20014191,11.66685009],[108.36614227,11.00831032],[107.22091675,10.36450005],[106.4050827,9.53085041],[105.15827179,8.59976006],[104.79518127,9.24104023],[105.07621765,9.91849995],[104.33435822,10.48653984],[105.19992065,10.88930035],[106.24964142,10.96181011],[105.81051636,11.56762028],[107.4914093,12.3372097],[107.61453247,13.53553963],[107.38273621,14.20242977],[107.56452179,15.20217037],[107.31269836,15.90855026],[106.55599976,16.60429001],[105.92579651,17.4853096],[105.09455872,18.6669693],[103.89649963,19.26516914],[104.18338013,19.62467003],[104.82263184,19.88665009],[104.43502045,20.75872993],[103.20384979,20.76656914],[102.75488281,21.67514038],[102.17046356,22.46475029],[102.70697784,22.70879936],[103.50453949,22.70375061],[104.47685242,22.81915092],[105.32923889,23.35206032],[105.81121063,22.97689056],[106.72541809,22.79426956],[106.56728363,22.21820068],[107.04341125,21.81189919],[108.05020905,21.55237007],[108.05020905,21.55237007]]]}, -{code:"MM", name:"Burma", borders:[[[99.54328156,20.18659019],[98.95967102,19.75297928],[98.25373077,19.70820999],[97.79776001,18.62709045],[97.37590027,18.44543076],[97.85913086,17.5679493],[98.49373627,16.83783913],[98.90335083,16.17782974],[98.53733826,15.3084898],[98.19207764,15.12370014],[98.43083191,14.62201977],[99.09780884,13.82750988],[99.21199799,13.26928997],[99.1963501,12.80475998],[99.5872879,11.89276981],[99.03810883,10.96053982],[98.55355072,9.93295956],[98.45717621,10.67525005],[98.76451874,11.4412899],[98.42835999,12.03297997],[98.509552,13.12236977],[98.10360718,13.64046001],[97.77770996,14.8373003],[97.59710693,16.10057068],[97.16452789,16.92873955],[96.5057373,16.42724991],[95.36933899,15.71438026],[94.80841827,15.80346012],[94.18881989,16.03795052],[94.53344727,17.27722931],[94.32478333,18.21351051],[93.54097748,19.36648941],[93.66325378,19.72697067],[93.07824707,19.85515022],[92.3685379,20.67086983],[92.30326843,21.47547913],[92.65225983,21.3240509],[92.67272186,22.04122925],[93.16609192,22.27845955],[93.06031799,22.70311928],[93.28636169,23.04364967],[93.32520294,24.07855988],[94.10677338,23.8507309],[94.55265045,24.67523956],[94.60324097,25.16250992],[95.15512085,26.00131989],[95.12474823,26.57357025],[96.41934204,27.26457977],[97.13398743,27.08375931],[97.05200195,27.69906044],[97.40260315,27.88252068],[97.32714081,28.26157951],[97.91195679,28.33592987],[98.24622345,27.74723053],[98.68270111,27.50881958],[98.71208954,26.74353981],[98.67180634,25.91869926],[97.72460175,25.08365059],[97.60473633,23.89739037],[98.66029358,24.06328964],[98.89875793,23.14273071],[99.53199768,22.94902992],[99.24092865,22.11831093],[99.98348999,21.7429409],[100.41652679,21.55884933],[101.15000153,21.85000038],[101.17999268,21.43655968],[100.32914734,20.78610992],[100.11595154,20.41785049],[99.54328156,20.18659019],[99.54328156,20.18659019]]]}, -{code:"LA", name:"Lao People's Democratic Republic", borders:[[[105.21877289,14.27322006],[105.54432678,14.7239399],[105.58901978,15.57032013],[104.77931976,16.4418602],[104.71691895,17.42885971],[103.95648956,18.24095917],[103.20018005,18.30964088],[102.99873352,17.96170044],[102.41304779,17.93277931],[102.11357117,18.10910034],[101.05954742,17.51250076],[101.03594971,18.40892982],[101.2820282,19.46257973],[100.60629272,19.50834084],[100.54888153,20.10923004],[100.11595154,20.41785049],[100.32914734,20.78610992],[101.17999268,21.43655968],[101.2700119,21.20165062],[101.80313873,21.17436981],[101.65200043,22.31818962],[102.17046356,22.46475029],[102.75488281,21.67514038],[103.20384979,20.76656914],[104.43502045,20.75872993],[104.82263184,19.88665009],[104.18338013,19.62467003],[103.89649963,19.26516914],[105.09455872,18.6669693],[105.92579651,17.4853096],[106.55599976,16.60429001],[107.31269836,15.90855026],[107.56452179,15.20217037],[107.38273621,14.20242977],[106.49635315,14.57056999],[106.04395294,13.88109016],[105.21877289,14.27322006],[105.21877289,14.27322006]]]}, -{code:"TH", name:"Thailand", borders:[[[102.58493805,12.18659019],[101.68711853,12.64575005],[100.83181,12.62709999],[100.97847748,13.41271019],[100.09779358,13.40686035],[100.01872253,12.30698967],[99.47894287,10.84638023],[99.15377808,9.96304989],[99.22241974,9.23925018],[99.87387085,9.20786953],[100.27964783,8.29516029],[100.45926666,7.42956018],[101.01732635,6.85686016],[101.62306213,6.74063015],[102.14118195,6.2216301],[101.81430817,5.81080008],[101.15421295,5.69138002],[101.0754776,6.20487022],[100.25959778,6.6428299],[100.08576202,6.46447992],[99.69069672,6.84820986],[99.51966858,7.34346008],[98.98825836,7.90799999],[98.50376892,8.38230038],[98.33966827,7.7945199],[98.15000153,8.35000038],[98.25917053,8.97393036],[98.55355072,9.93295956],[99.03810883,10.96053982],[99.5872879,11.89276981],[99.1963501,12.80475998],[99.21199799,13.26928997],[99.09780884,13.82750988],[98.43083191,14.62201977],[98.19207764,15.12370014],[98.53733826,15.3084898],[98.90335083,16.17782974],[98.49373627,16.83783913],[97.85913086,17.5679493],[97.37590027,18.44543076],[97.79776001,18.62709045],[98.25373077,19.70820999],[98.95967102,19.75297928],[99.54328156,20.18659019],[100.11595154,20.41785049],[100.54888153,20.10923004],[100.60629272,19.50834084],[101.2820282,19.46257973],[101.03594971,18.40892982],[101.05954742,17.51250076],[102.11357117,18.10910034],[102.41304779,17.93277931],[102.99873352,17.96170044],[103.20018005,18.30964088],[103.95648956,18.24095917],[104.71691895,17.42885971],[104.77931976,16.4418602],[105.58901978,15.57032013],[105.54432678,14.7239399],[105.21877289,14.27322006],[104.28141785,14.41672993],[102.98841858,14.22572994],[102.3480835,13.39424992],[102.58493805,12.18659019],[102.58493805,12.18659019]]]}, -{code:"KH", name:"Cambodia", borders:[[[103.49726105,10.63255978],[103.09069061,11.15365982],[102.58493805,12.18659019],[102.3480835,13.39424992],[102.98841858,14.22572994],[104.28141785,14.41672993],[105.21877289,14.27322006],[106.04395294,13.88109016],[106.49635315,14.57056999],[107.38273621,14.20242977],[107.61453247,13.53553963],[107.4914093,12.3372097],[105.81051636,11.56762028],[106.24964142,10.96181011],[105.19992065,10.88930035],[104.33435822,10.48653984],[103.49726105,10.63255978],[103.49726105,10.63255978]]]}, -{code:"VU", name:"Vanuatu", borders:[[[166.79316711,-15.66878033],[166.64987183,-15.3927002],[166.62913513,-14.62651634],[167.10772705,-14.93393421],[167.27005005,-15.74000645],[167.00120544,-15.61458206],[166.79316711,-15.66878033],[166.79316711,-15.66878033]],[[167.21681213,-15.89184666],[167.84483337,-16.46630669],[167.51516724,-16.59784889],[167.17999268,-16.15997696],[167.21681213,-15.89184666],[167.21681213,-15.89184666]]]}, -{code:"OM", name:"Oman", borders:[[[56.07083893,26.05545998],[56.36201859,26.39592934],[56.48566818,26.30911064],[56.39139938,25.89599991],[56.26103973,25.71460915],[56.07083893,26.05545998],[56.07083893,26.05545998]],[[56.39685822,24.92473984],[56.84516144,24.24168015],[57.40343857,23.87858963],[58.13694,23.74793053],[58.72919846,23.56567001],[59.18046951,22.99238968],[59.45009995,22.66028023],[59.80809021,22.53362083],[59.80612946,22.31052017],[59.44218826,21.71455002],[59.28239822,21.43388939],[58.86116028,21.11404037],[58.48799133,20.42897034],[58.03432083,20.48143959],[57.82640076,20.24299049],[57.66574097,19.7360096],[57.78868866,19.06756973],[57.69438934,18.94470978],[57.23424149,18.94799995],[56.60964966,18.57426071],[56.51219177,18.08711052],[56.28348923,17.87607002],[55.66149139,17.88414001],[55.26992035,17.63229942],[55.2748909,17.22837067],[54.79098129,16.95068932],[54.23926163,17.0449791],[53.57049942,16.70766068],[53.10858154,16.6510601],[52.78218079,17.34972954],[52.,19.],[55.,20.],[55.66666031,22.],[55.20832825,22.70833015],[55.23447037,23.11097908],[55.52582932,23.52487946],[55.52861023,23.93359947],[55.98123932,24.13055038],[55.80411911,24.26960945],[55.88623047,24.92082977],[56.39685822,24.92473984],[56.39685822,24.92473984]]]}, -{code:"IQ", name:"Iraq", borders:[[[45.42060089,35.97758102],[46.07633972,35.67737961],[46.15179825,35.09326172],[45.64844894,34.7481308],[45.41669846,33.96781158],[46.10932922,33.01728821],[47.33465958,32.46915054],[47.84918976,31.70919037],[47.68526077,30.98485947],[48.00468063,30.98513985],[48.0145607,30.4524498],[48.56798172,29.9267807],[47.97452927,29.9758091],[47.30261993,30.05907059],[46.56871033,29.09902],[44.70949936,29.17888069],[41.88999939,31.19000053],[40.40000153,31.88999939],[39.19549942,32.1609993],[38.79235077,33.37868118],[41.00616837,34.41938019],[41.38399124,35.62833023],[41.28971863,36.35879898],[41.83707809,36.60586166],[42.34957123,37.22988129],[42.77909851,37.38526917],[43.9422493,37.2562294],[44.29346085,37.00149918],[44.77267075,37.1704483],[45.42060089,35.97758102],[45.42060089,35.97758102]]]}, -{code:"KW", name:"Kuwait", borders:[[[47.97452927,29.9758091],[48.18317032,29.53449059],[48.09395981,29.30628967],[48.41611862,28.55203056],[47.70882034,28.52605057],[47.45980835,29.00251961],[46.56871033,29.09902],[47.30261993,30.05907059],[47.97452927,29.9758091],[47.97452927,29.9758091]]]}, -{code:"QA", name:"Qatar", borders:[[[50.81011963,24.7547493],[50.74388885,25.4824295],[51.01337051,26.0069809],[51.28646851,26.11458969],[51.58906937,25.80112076],[51.60673141,25.2156601],[51.38959122,24.62738037],[51.11243057,24.55633926],[50.81011963,24.7547493],[50.81011963,24.7547493]]]}, -{code:"AE", name:"United Arab Emirates", borders:[[[51.57352066,24.42000008],[51.7574501,24.29405975],[51.79439926,24.01981926],[52.57706833,24.17745018],[53.40399933,24.15130997],[54.00799179,24.12174988],[54.69300842,24.79788971],[55.43904114,25.43914986],[56.07083893,26.05545998],[56.26103973,25.71460915],[56.39685822,24.92473984],[55.88623047,24.92082977],[55.80411911,24.26960945],[55.98123932,24.13055038],[55.52861023,23.93359947],[55.52582932,23.52487946],[55.23447037,23.11097908],[55.20832825,22.70833015],[55.00683212,22.49694824],[52.00071716,23.00114632],[51.61772156,24.01422501],[51.57352066,24.42000008],[51.57352066,24.42000008]]]}, -{code:"JO", name:"Jordan", borders:[[[35.54563904,32.39398956],[35.71992874,32.70920181],[36.83406067,32.31293106],[38.79235077,33.37868118],[39.19549942,32.1609993],[39.00485992,32.01020813],[37.00217819,31.5084095],[37.99882889,30.50849915],[37.66815186,30.33867073],[37.5036087,30.00377083],[36.7405014,29.86528969],[36.5012207,29.50525093],[36.06895828,29.19750977],[34.9560318,29.35656929],[34.92259979,29.50132942],[35.42092896,31.10004997],[35.39757919,31.48908997],[35.54521942,31.78251076],[35.54563904,32.39398956],[35.54563904,32.39398956]]]}, -{code:"DZ", name:"Algeria", borders:[[[11.9995203,23.47166061],[8.57291031,21.56565094],[5.67757988,19.60120964],[4.26742983,19.15527916],[3.15812993,19.05736923],[3.14666009,19.69359016],[2.68356991,19.85622978],[2.06100988,20.14221954],[1.82323003,20.61079979],[-1.55003858,22.79268074],[-4.92331409,24.97456932],[-8.68439007,27.39574051],[-8.66510582,27.58949089],[-8.67411041,28.84129906],[-7.05921888,29.57922935],[-6.06062412,29.7317009],[-5.24212313,30.0004406],[-4.85963631,30.50119019],[-3.69042945,30.8969593],[-3.64748907,31.63731003],[-3.06898761,31.72448921],[-2.61661816,32.09434128],[-1.30787885,32.26287842],[-1.12452972,32.65153122],[-1.38803923,32.8640213],[-1.733459,33.91970825],[-1.79298949,34.52790833],[-2.16989803,35.16841125],[-1.20860004,35.71483994],[-0.12742992,35.88864899],[0.50388998,36.30128098],[1.46693003,36.60565186],[3.16166997,36.78390884],[4.81575012,36.86502838],[5.32010984,36.71652985],[6.26181984,37.11066055],[7.33038998,37.11838913],[7.73706007,36.8857193],[8.42096043,36.94641876],[8.21780968,36.43318176],[8.3763504,35.47988129],[8.14097023,34.65512848],[7.52447987,34.09737015],[7.61262989,33.34412003],[8.43045998,32.74832916],[8.43908978,32.50627136],[9.05560017,32.10269165],[9.4821701,30.30755043],[9.80566025,29.42462921],[9.85999966,28.95999908],[9.68387985,28.14418983],[9.7560997,27.68825912],[9.62903976,27.14094925],[9.71629047,26.5121994],[9.31941986,26.09431076],[9.91069031,25.36544991],[9.94824028,24.93696022],[10.30385971,24.37931061],[10.77136993,24.56251907],[11.5606699,24.09790039],[11.9995203,23.47166061],[11.9995203,23.47166061]]]}, -{code:"TN", name:"Tunisia", borders:[[[9.4821701,30.30755043],[9.05560017,32.10269165],[8.43908978,32.50627136],[8.43045998,32.74832916],[7.61262989,33.34412003],[7.52447987,34.09737015],[8.14097023,34.65512848],[8.3763504,35.47988129],[8.21780968,36.43318176],[8.42096043,36.94641876],[9.51000023,37.34999847],[10.21000004,37.22999954],[10.18064022,36.72402954],[11.02886963,37.09209061],[11.10000038,36.90000153],[10.60000038,36.40999985],[10.59331036,35.9474411],[10.93949986,35.69898987],[10.80782986,34.83349991],[10.14958,34.33076096],[10.33965015,33.78575134],[10.85684967,33.76874924],[11.10846996,33.29333878],[11.48880005,33.13700104],[11.43225956,32.3689003],[10.9448204,32.08179855],[10.63687992,31.7614193],[9.95020962,31.37606049],[10.05659962,30.96183968],[9.9700098,30.53931999],[9.4821701,30.30755043],[9.4821701,30.30755043]]]}, -{code:"GM", name:"Gambia", borders:[[[-16.84150314,13.15137959],[-16.7136879,13.59496021],[-15.62458611,13.62357998],[-15.39876652,13.86036015],[-15.08174801,13.87648964],[-14.68699265,13.63035965],[-14.3767128,13.62569046],[-14.04698849,13.79407024],[-13.84497643,13.50504971],[-14.27770996,13.28059006],[-14.71218777,13.29819965],[-15.1411581,13.50949955],[-15.5118103,13.27857971],[-15.69098854,13.27035999],[-15.93129444,13.13027954],[-16.84150314,13.15137959],[-16.84150314,13.15137959]]]}, -//{code:"??", name:"West Bank", borders:[[[35.54563904,32.39398956],[35.54521942,31.78251076],[35.39757919,31.48908997],[34.9274292,31.35343933],[34.97052002,31.61679077],[35.22591019,31.75432968],[34.97467041,31.86657906],[35.18394852,32.53252029],[35.54563904,32.39398956],[35.54563904,32.39398956]]]}, -{code:"MG", name:"Madagascar", borders:[[[49.54352188,-12.46979618],[49.80900955,-12.89525223],[50.05653,-13.55574608],[50.21741104,-14.75876236],[50.47655869,-15.22651863],[50.3771286,-15.70608044],[50.20027161,-16.00023842],[49.86059189,-15.41424656],[49.67261124,-15.71016884],[49.86333084,-16.45102882],[49.77455139,-16.87503052],[49.49858856,-17.10604668],[49.43560028,-17.9530468],[49.04180908,-19.11878014],[48.54854965,-20.49687386],[47.93077087,-22.39150047],[47.54771042,-23.78192329],[47.09572983,-24.94159889],[46.28248978,-25.17842293],[45.40950012,-25.60141945],[44.83358002,-25.34609032],[44.03974915,-24.98835564],[43.76380157,-24.46068764],[43.69776917,-23.57410431],[43.34563828,-22.77686119],[43.25416946,-22.05741692],[43.43330002,-21.33645248],[43.89371109,-21.16329956],[43.89638138,-20.83046913],[44.37430954,-20.07235527],[44.46442032,-19.43545151],[44.23242188,-18.96196938],[44.04296875,-18.33140182],[43.96310043,-17.40990448],[44.31246185,-16.85045815],[44.44652176,-16.21622467],[44.94491959,-16.17937469],[45.50273895,-15.97439194],[45.87300873,-15.79342842],[46.31225967,-15.78003407],[46.8821907,-15.21016407],[47.7051506,-14.59427261],[48.00521851,-14.09121418],[47.86901855,-13.66387844],[48.2938118,-13.78406048],[48.84505844,-13.08918571],[48.86354065,-12.4878788],[49.19462967,-12.04052448],[49.54352188,-12.46979618],[49.54352188,-12.46979618]]]}, -{code:"LB", name:"Lebanon", borders:[[[35.82107162,33.27743149],[35.55278015,33.26427078],[35.46068954,33.08903885],[35.12604904,33.09091187],[35.48218155,33.90544891],[35.99840927,34.64492035],[36.44818115,34.59394073],[36.61177826,34.20178986],[36.06645966,33.82490158],[35.82107162,33.27743149],[35.82107162,33.27743149]]]}, -{code:"IL", name:"Israel", borders:[[[35.71992874,32.70920181],[35.54563904,32.39398956],[35.18394852,32.53252029],[34.97467041,31.86657906],[35.22591019,31.75432968],[34.97052002,31.61679077],[34.9274292,31.35343933],[35.39757919,31.48908997],[35.42092896,31.10004997],[34.92259979,29.50132942],[34.26544189,31.21936035],[34.52999878,31.56500053],[34.75260162,32.07292175],[34.95539093,32.82736969],[35.12604904,33.09091187],[35.46068954,33.08903885],[35.55278015,33.26427078],[35.82107162,33.27743149],[35.83641052,32.86811066],[35.71992874,32.70920181],[35.71992874,32.70920181]]]}, -{code:"BI", name:"Burundi", borders:[[[29.27636909,-3.29389],[29.27967834,-3.35660768],[29.3055191,-3.3568275],[29.33740997,-3.55437446],[29.43075943,-4.02424002],[29.66062927,-4.45118427],[29.75351906,-4.45238733],[30.11631966,-4.09011698],[30.50554085,-3.56857753],[30.75223923,-3.35930657],[30.74300957,-3.03430867],[30.52766037,-2.80761814],[30.46966934,-2.41382957],[29.9383297,-2.34849858],[29.63217926,-2.91784716],[29.02490044,-2.83924723],[29.27636909,-3.29389],[29.27636909,-3.29389]]]}, -{code:"RW", name:"Rwanda", borders:[[[30.41909981,-1.13464856],[30.81615067,-1.69892955],[30.75831985,-2.28723812],[30.46966934,-2.41382957],[29.9383297,-2.34849858],[29.63217926,-2.91784716],[29.02490044,-2.83924723],[29.11749077,-2.29218721],[29.25481987,-2.21511674],[29.29191017,-1.62003982],[29.57946968,-1.34130001],[29.82151031,-1.44330955],[30.41909981,-1.13464856],[30.41909981,-1.13464856]]]}, -{code:"AO", name:"Angola", borders:[[[11.73423004,-17.30188942],[11.64008045,-16.67315292],[11.77855015,-15.79378033],[12.12357998,-14.87832832],[12.17564964,-14.44915009],[12.50010014,-13.54767227],[12.73845959,-13.137887],[13.31289959,-12.48359871],[13.63372993,-12.03863049],[13.7387104,-11.29783249],[13.68638039,-10.73107815],[13.38733959,-10.37359238],[13.1209898,-9.76687813],[12.87537956,-9.1669426],[12.92903996,-8.95906639],[13.23643017,-8.56260872],[12.93303013,-7.59651899],[12.72828007,-6.92712021],[12.22733021,-6.2944479],[12.32244968,-6.10010815],[12.73515034,-5.96570921],[13.02484989,-5.98435926],[13.37561035,-5.86425018],[16.32650948,-5.87747908],[16.57317924,-6.62265539],[16.86017036,-7.22229528],[17.09000015,-7.54570007],[17.47295952,-8.06855583],[18.1342392,-7.98769522],[18.46417046,-7.84698725],[19.0167408,-7.98823881],[19.16661072,-7.73815823],[19.41752052,-7.15540409],[20.03774071,-7.11633348],[20.09164047,-6.94306898],[20.60181046,-6.93932438],[20.51477051,-7.29959726],[21.7281208,-7.29085827],[21.74644089,-7.9200635],[21.94915009,-8.30591202],[21.80180931,-8.90869808],[21.87517929,-9.52371979],[22.20877075,-9.89477634],[22.15527916,-11.08477592],[22.40282059,-10.99308014],[22.8373394,-11.01758671],[23.45676994,-10.86786842],[23.91222,-10.92684841],[24.01787949,-11.2372942],[23.90415001,-11.72225857],[24.0798893,-12.19129848],[23.93091011,-12.56584835],[24.01612091,-12.91102695],[21.93391037,-12.89844036],[21.88784027,-16.08028412],[22.56249046,-16.89844513],[23.21504974,-17.52312469],[21.37717056,-17.9306469],[18.95620918,-17.78907585],[18.26332092,-17.30994415],[14.20971012,-17.35311699],[14.05852985,-17.42336082],[13.46234989,-16.97120285],[12.81406975,-16.94130898],[12.21547985,-17.11164665],[11.73423004,-17.30188942],[11.73423004,-17.30188942]],[[12.18233013,-5.78993988],[11.91493988,-5.0379653],[12.3185997,-4.60620737],[12.62075996,-4.43802309],[12.99553013,-4.78111315],[12.63162041,-4.99125338],[12.46800041,-5.24834633],[12.4366703,-5.68429899],[12.18233013,-5.78993988],[12.18233013,-5.78993988]]]}, -{code:"SZ", name:"Swaziland", borders:[[[32.07167053,-26.73380089],[31.86804008,-27.17791557],[31.28278923,-27.28587723],[30.68596077,-26.74381065],[30.67658997,-26.39808273],[30.94965935,-26.02262688],[31.04409027,-25.73146057],[31.33313942,-25.6601944],[31.83774948,-25.84332657],[31.98576927,-26.29177666],[32.07167053,-26.73380089],[32.07167053,-26.73380089]]]}, -{code:"MZ", name:"Mozambique", borders:[[[35.31240082,-11.43914032],[34.93619919,-11.47956657],[34.85963821,-12.05580807],[34.70645905,-12.26742649],[34.81444931,-12.73588085],[34.84838867,-13.56166172],[34.9071312,-13.56542969],[35.26795959,-13.88784027],[35.68682098,-14.61101055],[35.77191162,-15.89683056],[35.33908081,-16.10744476],[35.03380966,-16.80130005],[34.38129044,-16.18354607],[34.30728149,-15.47863007],[34.51766968,-15.01371002],[34.45962906,-14.61297703],[34.06483078,-14.35993958],[33.78969955,-14.45183086],[33.21401978,-13.97187614],[30.17951012,-14.79608822],[30.27425003,-15.50779438],[30.33897972,-15.88085842],[31.17307091,-15.86094856],[31.63651085,-16.07198143],[31.85201073,-16.31942558],[32.32825089,-16.39204788],[32.84764099,-16.713377],[32.8498497,-17.9790287],[32.65488815,-18.67208672],[32.61201096,-19.41935539],[32.77270889,-19.7155838],[32.65974045,-20.30428123],[32.50870895,-20.39530945],[32.24502182,-21.11650085],[31.19142914,-22.25150108],[31.67037964,-23.65895081],[31.93058014,-24.36942101],[31.7524395,-25.4842453],[31.83774948,-25.84332657],[31.98576927,-26.29177666],[32.07167053,-26.73380089],[32.83013153,-26.74217415],[32.91596985,-26.21587181],[32.66038895,-26.14855003],[32.57463074,-25.7272892],[33.0132103,-25.3575592],[34.21583939,-24.81629944],[35.0407486,-24.47833633],[35.45875168,-24.12257767],[35.60744095,-23.70651627],[35.37179184,-23.53533936],[35.53392029,-23.07077026],[35.56158066,-22.12302399],[35.35665131,-22.38731766],[35.37340927,-21.84083176],[35.17613983,-21.25435829],[34.70188141,-20.49699783],[34.78638077,-19.78400421],[35.19837952,-19.5527916],[35.89649963,-18.84226036],[36.28128052,-18.65965652],[37.41114044,-17.58637047],[38.53833008,-17.10099602],[39.45256042,-16.72089386],[40.08927917,-16.10072708],[40.47727966,-15.40629673],[40.77548981,-14.69178009],[40.59960938,-14.20198631],[40.56079865,-12.63917637],[40.43727875,-11.76169682],[40.47838974,-10.76545429],[40.31658936,-10.31708622],[39.52099991,-10.8968668],[38.42757034,-11.28518867],[37.82764053,-11.26877689],[37.47129059,-11.56875229],[36.77513885,-11.59453678],[36.51406097,-11.72091866],[35.31240082,-11.43914032],[35.31240082,-11.43914032]]]}, -{code:"MW", name:"Malawi", borders:[[[34.9071312,-13.56542969],[34.84838867,-13.56166172],[35.14873886,-14.00229836],[35.24840927,-14.2819643],[34.6974411,-14.2545805],[34.52596283,-13.98999596],[34.53623581,-13.60476875],[34.31562042,-12.92441082],[33.99679184,-12.26409817],[34.31233597,-11.61219597],[34.25,-10.89998817],[34.22251892,-10.33612633],[33.89450073,-9.80623245],[33.94083786,-9.69367027],[33.73971939,-9.41714001],[32.7593689,-9.23060226],[33.23139191,-9.67669868],[33.4856987,-10.52556229],[33.31529999,-10.79653835],[33.1142807,-11.60720634],[33.30638885,-12.43576622],[32.99174881,-12.7838583],[32.68817902,-13.71284008],[33.21401978,-13.97187614],[33.78969955,-14.45183086],[34.06483078,-14.35993958],[34.45962906,-14.61297703],[34.51766968,-15.01371002],[34.30728149,-15.47863007],[34.38129044,-16.18354607],[35.03380966,-16.80130005],[35.33908081,-16.10744476],[35.77191162,-15.89683056],[35.68682098,-14.61101055],[35.26795959,-13.88784027],[34.9071312,-13.56542969],[34.9071312,-13.56542969]]]}, -{code:"ZM", name:"Zambia", borders:[[[32.7593689,-9.23060226],[32.19187164,-8.93033695],[31.55636978,-8.76203823],[31.15775108,-8.59456921],[31.17404938,-8.74720001],[30.88792992,-8.70035648],[30.45713997,-8.47909069],[30.55149269,-8.29129219],[30.34608078,-8.23823071],[29.0028801,-8.40702629],[28.73484993,-8.52655029],[28.4498806,-9.16491413],[28.67367935,-9.60592842],[28.49604034,-10.78990841],[28.37225914,-11.79365635],[28.64241982,-11.97154999],[29.34156036,-12.36071587],[29.6160202,-12.17890835],[29.69961929,-13.25721455],[28.9342804,-13.24894428],[28.52355003,-12.69861221],[28.1550808,-12.27246666],[27.38879013,-12.13276386],[27.16440964,-11.60875416],[26.55307007,-11.92441082],[25.7523098,-11.78495598],[25.41811943,-11.33090973],[24.78315926,-11.23867607],[24.31451988,-11.26281452],[24.25712967,-10.95199203],[23.91222,-10.92684841],[24.01787949,-11.2372942],[23.90415001,-11.72225857],[24.0798893,-12.19129848],[23.93091011,-12.56584835],[24.01612091,-12.91102695],[21.93391037,-12.89844036],[21.88784027,-16.08028412],[22.56249046,-16.89844513],[23.21504974,-17.52312469],[24.03384972,-17.29586601],[24.68234062,-17.35341835],[25.07695007,-17.57878304],[25.08444023,-17.66178703],[25.26424026,-17.73651314],[26.38191986,-17.84599686],[26.70677948,-17.96123505],[27.04443932,-17.93804932],[27.5982399,-17.29080391],[28.4679203,-16.4683876],[28.82585907,-16.38973999],[28.94747925,-16.04303932],[29.51683998,-15.64469814],[30.27425003,-15.50779438],[30.17951012,-14.79608822],[33.21401978,-13.97187614],[32.68817902,-13.71284008],[32.99174881,-12.7838583],[33.30638885,-12.43576622],[33.1142807,-11.60720634],[33.31529999,-10.79653835],[33.4856987,-10.52556229],[33.23139191,-9.67669868],[32.7593689,-9.23060226],[32.7593689,-9.23060226]]]}, -{code:"GA", name:"Gabon", borders:[[[11.09377956,-3.9788177],[10.06614971,-2.96950817],[9.4052496,-2.14432812],[8.79800034,-1.11127901],[8.83008957,-0.77905977],[9.04841042,-0.45933971],[9.29137993,0.26864001],[9.49287033,1.01011002],[9.83028984,1.06791997],[11.28509045,1.05764997],[11.27643013,2.26104999],[11.75168037,2.32675004],[12.3593502,2.19282007],[12.95133972,2.32159996],[13.07584,2.26711011],[13.00312996,1.83090997],[13.28262043,1.31421006],[14.02663994,1.39567995],[14.27626991,1.19691002],[13.84335041,0.03875],[14.31643009,-0.55262989],[14.42545986,-1.33337951],[14.29924011,-1.99825907],[13.99238968,-2.470788],[13.1096096,-2.42875719],[12.5752697,-1.94848835],[12.4957304,-2.39170671],[11.82096004,-2.51415658],[11.47805023,-2.76562762],[11.85509968,-3.42687988],[11.09377956,-3.9788177],[11.09377956,-3.9788177]]]}, -{code:"CG", name:"Congo", borders:[[[12.99553013,-4.78111315],[12.62075996,-4.43802309],[12.3185997,-4.60620737],[11.91493988,-5.0379653],[11.09377956,-3.9788177],[11.85509968,-3.42687988],[11.47805023,-2.76562762],[11.82096004,-2.51415658],[12.4957304,-2.39170671],[12.5752697,-1.94848835],[13.1096096,-2.42875719],[13.99238968,-2.470788],[14.29924011,-1.99825907],[14.42545986,-1.33337951],[14.31643009,-0.55262989],[13.84335041,0.03875],[14.27626991,1.19691002],[14.02663994,1.39567995],[13.28262043,1.31421006],[13.00312996,1.83090997],[13.07584,2.26711011],[14.33780956,2.22788],[15.14634037,1.96399999],[15.94091034,1.72767997],[16.01287079,2.2676301],[16.53704071,3.19825006],[17.13303947,3.72819996],[17.80990982,3.56018996],[18.45307922,3.50439],[18.39378929,2.90044999],[18.09428024,2.36573005],[17.89882088,1.74184],[17.77420044,0.85566002],[17.82653046,0.28889999],[17.66356087,-0.05809997],[17.63862991,-0.42484999],[17.52371025,-0.74382943],[16.86531067,-1.22581923],[16.40708923,-1.74093831],[15.97282982,-2.71236992],[16.00632095,-3.53516006],[15.75352955,-3.85514665],[15.17101955,-4.34349632],[14.58259964,-4.9702301],[14.20903015,-4.79309702],[14.14494038,-4.50999641],[13.60021019,-4.50010347],[13.25823975,-4.88297319],[12.99553013,-4.78111315],[12.99553013,-4.78111315]]]}, -{code:"CD", name:"Democratic Republic of the Congo", borders:[[[30.83385086,3.50917006],[29.9534893,4.17369986],[29.71600914,4.60079002],[29.15908051,4.38926983],[28.69668007,4.45509005],[28.42900085,4.28715992],[27.97999001,4.40841007],[27.37424088,5.23396015],[27.04406929,5.12785006],[26.40273094,5.15086985],[25.65047073,5.25609016],[25.27878952,5.17040014],[25.12886047,4.92724991],[24.80504036,4.89724016],[24.41053009,5.10878992],[23.29722977,4.60968018],[22.84147072,4.7101202],[22.70413017,4.63304996],[22.40512085,4.02917004],[21.65912056,4.22433996],[20.92760086,4.32279015],[20.29067039,4.69166994],[19.46777916,5.03151989],[18.93232918,4.70949984],[18.54298973,4.20178986],[18.45307922,3.50439],[18.39378929,2.90044999],[18.09428024,2.36573005],[17.89882088,1.74184],[17.77420044,0.85566002],[17.82653046,0.28889999],[17.66356087,-0.05809997],[17.63862991,-0.42484999],[17.52371025,-0.74382943],[16.86531067,-1.22581923],[16.40708923,-1.74093831],[15.97282982,-2.71236992],[16.00632095,-3.53516006],[15.75352955,-3.85514665],[15.17101955,-4.34349632],[14.58259964,-4.9702301],[14.20903015,-4.79309702],[14.14494038,-4.50999641],[13.60021019,-4.50010347],[13.25823975,-4.88297319],[12.99553013,-4.78111315],[12.63162041,-4.99125338],[12.46800041,-5.24834633],[12.4366703,-5.68429899],[12.18233013,-5.78993988],[12.32244968,-6.10010815],[12.73515034,-5.96570921],[13.02484989,-5.98435926],[13.37561035,-5.86425018],[16.32650948,-5.87747908],[16.57317924,-6.62265539],[16.86017036,-7.22229528],[17.09000015,-7.54570007],[17.47295952,-8.06855583],[18.1342392,-7.98769522],[18.46417046,-7.84698725],[19.0167408,-7.98823881],[19.16661072,-7.73815823],[19.41752052,-7.15540409],[20.03774071,-7.11633348],[20.09164047,-6.94306898],[20.60181046,-6.93932438],[20.51477051,-7.29959726],[21.7281208,-7.29085827],[21.74644089,-7.9200635],[21.94915009,-8.30591202],[21.80180931,-8.90869808],[21.87517929,-9.52371979],[22.20877075,-9.89477634],[22.15527916,-11.08477592],[22.40282059,-10.99308014],[22.8373394,-11.01758671],[23.45676994,-10.86786842],[23.91222,-10.92684841],[24.25712967,-10.95199203],[24.31451988,-11.26281452],[24.78315926,-11.23867607],[25.41811943,-11.33090973],[25.7523098,-11.78495598],[26.55307007,-11.92441082],[27.16440964,-11.60875416],[27.38879013,-12.13276386],[28.1550808,-12.27246666],[28.52355003,-12.69861221],[28.9342804,-13.24894428],[29.69961929,-13.25721455],[29.6160202,-12.17890835],[29.34156036,-12.36071587],[28.64241982,-11.97154999],[28.37225914,-11.79365635],[28.49604034,-10.78990841],[28.67367935,-9.60592842],[28.4498806,-9.16491413],[28.73484993,-8.52655029],[29.0028801,-8.40702629],[30.34608078,-8.23823071],[30.55149269,-8.29129219],[30.55644035,-8.28144169],[30.50312996,-7.97991896],[30.29486465,-7.47784853],[29.96590042,-7.13703823],[29.47587013,-6.68478537],[29.21648979,-6.07740545],[29.39859009,-5.6035862],[29.14899063,-5.22811794],[29.13297462,-4.58752394],[29.24436569,-4.21585941],[29.08992004,-4.0308671],[29.16625023,-3.35564995],[29.27967834,-3.35660768],[29.27636909,-3.29389],[29.02490044,-2.83924723],[29.11749077,-2.29218721],[29.25481987,-2.21511674],[29.29191017,-1.62003982],[29.57946968,-1.34130001],[29.58783913,-0.58737987],[29.81949997,-0.20529994],[29.87578011,0.59740001],[30.0861702,1.06231999],[30.46850014,1.58380997],[30.85268021,1.84940004],[31.17416954,2.20445991],[30.77331924,2.33989],[30.83385086,3.50917006],[30.83385086,3.50917006]]]}, -{code:"CF", name:"Central African Republic", borders:[[[15.27947044,7.42190981],[16.1062603,7.49707985],[16.29055023,7.75431013],[16.45615959,7.73475981],[16.70598984,7.50832987],[17.96492004,7.89092016],[18.38957024,8.28131008],[18.91102982,8.63090038],[18.81197929,8.98291016],[19.09399033,9.07485962],[20.05965996,9.01270008],[21.00086021,9.4759798],[21.72382927,10.56707001],[22.23110962,10.97187996],[22.86417007,11.14239979],[22.97756004,10.71446991],[23.55429077,10.08924961],[23.55722046,9.68122005],[23.3947506,9.26506042],[23.45903015,8.95429039],[23.80582047,8.66631031],[24.56735039,8.22918034],[25.11491966,7.82508993],[25.12414932,7.50008011],[25.79664993,6.97930002],[26.2134304,6.54659986],[26.46594048,5.94671011],[27.21339035,5.55096006],[27.37424088,5.23396015],[27.04406929,5.12785006],[26.40273094,5.15086985],[25.65047073,5.25609016],[25.27878952,5.17040014],[25.12886047,4.92724991],[24.80504036,4.89724016],[24.41053009,5.10878992],[23.29722977,4.60968018],[22.84147072,4.7101202],[22.70413017,4.63304996],[22.40512085,4.02917004],[21.65912056,4.22433996],[20.92760086,4.32279015],[20.29067039,4.69166994],[19.46777916,5.03151989],[18.93232918,4.70949984],[18.54298973,4.20178986],[18.45307922,3.50439],[17.80990982,3.56018996],[17.13303947,3.72819996],[16.53704071,3.19825006],[16.01287079,2.2676301],[15.90736008,2.55738997],[15.86271954,3.01354003],[15.40536976,3.33529997],[15.03625011,3.85136008],[14.95094013,4.21039009],[14.47836018,4.73260021],[14.55895996,5.03059006],[14.45940971,5.45176983],[14.53656006,6.22695017],[14.77655983,6.40851021],[15.27947044,7.42190981],[15.27947044,7.42190981]]]}, -{code:"TD", name:"Chad", borders:[[[14.49577999,12.8593998],[14.5958004,13.33043003],[13.95446014,13.35344982],[13.95672035,13.9966898],[13.54039001,14.36711979],[13.97216988,15.68437004],[15.24775028,16.62729073],[15.30045033,17.92794991],[15.68572998,19.95718956],[15.90326977,20.38760948],[15.4871397,20.73041916],[15.4710598,21.04845047],[15.09689045,21.30850983],[14.85130024,22.86294937],[15.86085033,23.40971947],[19.84926033,21.49509048],[23.83765984,19.58046913],[23.88689041,15.61083984],[23.02458954,15.68072033],[22.5679493,14.94429016],[22.30351067,14.32682037],[22.51202011,14.0931797],[22.18329048,13.78647995],[22.29657936,13.37232018],[22.03759003,12.95545959],[21.93680954,12.58817959],[22.28800964,12.64605045],[22.49761963,12.2602396],[22.50868988,11.67936039],[22.8762207,11.38461018],[22.86417007,11.14239979],[22.23110962,10.97187996],[21.72382927,10.56707001],[21.00086021,9.4759798],[20.05965996,9.01270008],[19.09399033,9.07485962],[18.81197929,8.98291016],[18.91102982,8.63090038],[18.38957024,8.28131008],[17.96492004,7.89092016],[16.70598984,7.50832987],[16.45615959,7.73475981],[16.29055023,7.75431013],[16.1062603,7.49707985],[15.27947044,7.42190981],[15.43609047,7.69280005],[15.12088013,8.3821497],[14.98001957,8.79611015],[14.54444981,8.9658699],[13.95421982,9.54948044],[14.17146015,10.02136993],[14.62720966,9.92092037],[14.90937042,9.99211979],[15.46788025,9.98233032],[14.92358971,10.89134026],[14.96018028,11.55556965],[14.89336014,12.21905041],[14.49577999,12.8593998],[14.49577999,12.8593998]]]}, -{code:"BF", name:"Burkina Faso", borders:[[[-2.82748961,9.64245987],[-3.51188707,9.90032959],[-3.98043656,9.86236],[-4.33024979,9.61085033],[-4.77989912,9.82199001],[-4.95463896,10.15272045],[-5.40433788,10.37075043],[-5.47056913,10.9512701],[-5.19783545,11.37514019],[-5.2209444,11.71385956],[-4.42715693,12.54265022],[-4.28040409,13.22842979],[-4.00639439,13.47247982],[-3.52280998,13.33765984],[-3.10371947,13.54125977],[-2.96767998,13.79815006],[-2.19182944,14.24641037],[-2.00102997,14.55902004],[-1.06637907,14.97383022],[-0.51583916,15.11616039],[-0.26625982,14.92430973],[0.37489,14.92891979],[0.29563999,14.44423962],[0.42991,13.98873043],[0.99304998,13.33574963],[1.02410996,12.85182953],[2.17710996,12.62502003],[2.15445995,11.94013977],[1.93597996,11.64116001],[1.44714999,11.54771042],[1.24346006,11.11050987],[0.89955997,10.99732971],[0.02381,11.01867962],[-0.43868989,11.09834003],[-0.76156998,10.9369297],[-1.2033391,11.00981045],[-2.94039845,10.96267986],[-2.96389914,10.39535046],[-2.82748961,9.64245987],[-2.82748961,9.64245987]]]}, -{code:"SL", name:"Sierra Leone", borders:[[[-11.43876839,6.78591013],[-11.70819664,6.86008978],[-12.42810631,7.26294994],[-12.94903088,7.79864979],[-13.12401676,8.16394997],[-13.24653816,8.90305042],[-12.71193886,9.34270954],[-12.5967207,9.62018967],[-12.42592239,9.83582973],[-12.15030861,9.85857964],[-11.91725826,10.04697037],[-11.11748028,10.04588032],[-10.83914852,9.68824005],[-10.62239647,9.26791],[-10.65477467,8.97719002],[-10.49431229,8.7155304],[-10.505476,8.3488903],[-10.23011017,8.40620041],[-10.69557953,7.93944979],[-11.14670086,7.39670992],[-11.19976616,7.10585022],[-11.43876839,6.78591013],[-11.43876839,6.78591013]]]}, -{code:"LR", name:"Liberia", borders:[[[-7.7121563,4.36456013],[-7.97408342,4.35575008],[-9.00477219,4.83241987],[-9.91342831,5.59356022],[-10.76536655,6.14069986],[-11.43876839,6.78591013],[-11.19976616,7.10585022],[-11.14670086,7.39670992],[-10.69557953,7.93944979],[-10.23011017,8.40620041],[-10.01654625,8.42850018],[-9.75535202,8.54106045],[-9.337286,7.92853022],[-9.40333652,7.52690983],[-9.20877647,7.31391001],[-8.92605209,7.30904007],[-8.72212982,7.71165991],[-8.43927574,7.68604994],[-8.48543644,7.3952198],[-8.38543892,6.91179991],[-8.60286999,6.46757984],[-8.31134033,6.19303989],[-7.99370909,6.12618017],[-7.57013416,5.70734978],[-7.53973007,5.31334019],[-7.63535404,5.18814993],[-7.7121563,4.36456013],[-7.7121563,4.36456013]]]}, -{code:"GW", name:"Guinea-Bissau", borders:[[[-15.13029003,11.04041004],[-15.66417885,11.45847988],[-16.08519936,11.52460003],[-16.31474686,11.80650997],[-16.30895996,11.95870972],[-16.61383057,12.17090988],[-16.67741776,12.38486004],[-16.1477108,12.54776001],[-15.81655788,12.51558018],[-15.54848003,12.62817955],[-13.70047474,12.58619022],[-13.71872902,12.24719048],[-13.82828045,12.14264011],[-13.74315834,11.81128025],[-13.90079021,11.67873001],[-14.12139797,11.67712975],[-14.38218403,11.50926018],[-14.68567276,11.5278101],[-15.13029003,11.04041004],[-15.13029003,11.04041004]]]}, -{code:"GN", name:"Guinea", borders:[[[-8.43927574,7.68604994],[-8.72212982,7.71165991],[-8.92605209,7.30904007],[-9.20877647,7.31391001],[-9.40333652,7.52690983],[-9.337286,7.92853022],[-9.75535202,8.54106045],[-10.01654625,8.42850018],[-10.23011017,8.40620041],[-10.505476,8.3488903],[-10.49431229,8.7155304],[-10.65477467,8.97719002],[-10.62239647,9.26791],[-10.83914852,9.68824005],[-11.11748028,10.04588032],[-11.91725826,10.04697037],[-12.15030861,9.85857964],[-12.42592239,9.83582973],[-12.5967207,9.62018967],[-12.71193886,9.34270954],[-13.24653816,8.90305042],[-13.68515015,9.49473953],[-14.0740366,9.8861599],[-14.33007622,10.01570988],[-14.57969284,10.2144804],[-14.6931982,10.65629959],[-14.83954811,10.87656975],[-15.13029003,11.04041004],[-14.68567276,11.5278101],[-14.38218403,11.50926018],[-14.12139797,11.67712975],[-13.90079021,11.67873001],[-13.74315834,11.81128025],[-13.82828045,12.14264011],[-13.71872902,12.24719048],[-13.70047474,12.58619022],[-13.21779251,12.57588005],[-12.49901676,12.33209038],[-12.27855873,12.35443974],[-12.20353413,12.46564007],[-11.65828896,12.38659],[-11.51391697,12.44297981],[-11.45613766,12.07682037],[-11.29756832,12.07796001],[-11.03653431,12.21125984],[-10.87082386,12.17788982],[-10.5932169,11.92399025],[-10.16520405,11.84409046],[-9.89097214,12.06048012],[-9.56788826,12.19423008],[-9.32759762,12.33428955],[-9.12747955,12.30807018],[-8.90526676,12.08835983],[-8.78608418,11.81256962],[-8.3762989,11.39363956],[-8.58127689,11.13624954],[-8.62031078,10.81089973],[-8.40729046,10.90927029],[-8.28234768,10.79259968],[-8.33536625,10.49481964],[-8.02993584,10.20652962],[-8.22931385,10.12901974],[-8.30961227,9.7895298],[-8.07911396,9.37623024],[-7.83206892,8.57571983],[-8.20350266,8.45545959],[-8.29902267,8.31643963],[-8.22178841,8.12333965],[-8.28070641,7.68719006],[-8.43927574,7.68604994],[-8.43927574,7.68604994]]]}, -{code:"CI", name:"Cote d'Ivoire", borders:[[[-2.8561182,4.99446011],[-3.31107807,4.98429012],[-4.0088191,5.17981005],[-4.64991522,5.16825008],[-5.83450413,4.99369001],[-6.52876329,4.70510006],[-7.5189271,4.33829021],[-7.7121563,4.36456013],[-7.63535404,5.18814993],[-7.53973007,5.31334019],[-7.57013416,5.70734978],[-7.99370909,6.12618017],[-8.31134033,6.19303989],[-8.60286999,6.46757984],[-8.38543892,6.91179991],[-8.48543644,7.3952198],[-8.43927574,7.68604994],[-8.28070641,7.68719006],[-8.22178841,8.12333965],[-8.29902267,8.31643963],[-8.20350266,8.45545959],[-7.83206892,8.57571983],[-8.07911396,9.37623024],[-8.30961227,9.7895298],[-8.22931385,10.12901974],[-8.02993584,10.20652962],[-7.89959431,10.29738998],[-7.62274885,10.14723969],[-6.85050917,10.1389904],[-6.66645622,10.43080997],[-6.49395514,10.4113102],[-6.20520544,10.52406025],[-6.05043602,10.09636974],[-5.81693316,10.22255039],[-5.40433788,10.37075043],[-4.95463896,10.15272045],[-4.77989912,9.82199001],[-4.33024979,9.61085033],[-3.98043656,9.86236],[-3.51188707,9.90032959],[-2.82748961,9.64245987],[-2.56215715,8.21961975],[-2.98357916,7.37970018],[-3.24433804,6.25046015],[-2.81069899,5.38905001],[-2.8561182,4.99446011],[-2.8561182,4.99446011]]]}, -{code:"GH", name:"Ghana", borders:[[[1.06009996,5.92883015],[-0.50762975,5.3434701],[-1.06360829,5.00054979],[-1.96468854,4.71046019],[-2.8561182,4.99446011],[-2.81069899,5.38905001],[-3.24433804,6.25046015],[-2.98357916,7.37970018],[-2.56215715,8.21961975],[-2.82748961,9.64245987],[-2.96389914,10.39535046],[-2.94039845,10.96267986],[-1.2033391,11.00981045],[-0.76156998,10.9369297],[-0.43868989,11.09834003],[0.02381,11.01867962],[-0.04978999,10.70691967],[0.36758,10.19122028],[0.36590999,9.46498966],[0.4612,8.67722988],[0.71201998,8.31247044],[0.49098,7.41175985],[0.5704,6.91436005],[0.83695,6.27998018],[1.06009996,5.92883015],[1.06009996,5.92883015]]]}, -{code:"TG", name:"Togo", borders:[[[1.86521006,6.14214993],[1.06009996,5.92883015],[0.83695,6.27998018],[0.5704,6.91436005],[0.49098,7.41175985],[0.71201998,8.31247044],[0.4612,8.67722988],[0.36590999,9.46498966],[0.36758,10.19122028],[-0.04978999,10.70691967],[0.02381,11.01867962],[0.89955997,10.99732971],[0.77235001,10.4708004],[1.07781994,10.17562008],[1.42506003,9.82540035],[1.46306002,9.33460999],[1.66448998,9.12858963],[1.61894,6.83202982],[1.86521006,6.14214993],[1.86521006,6.14214993]]]}, -{code:"CM", name:"Cameroon", borders:[[[13.07584,2.26711011],[12.95133972,2.32159996],[12.3593502,2.19282007],[11.75168037,2.32675004],[11.27643013,2.26104999],[9.64918041,2.28385997],[9.79518986,3.07339001],[9.40435028,3.73452997],[8.9480896,3.90412998],[8.7449398,4.35222006],[8.48880959,4.49561024],[8.50026035,4.77197981],[8.75751019,5.47967005],[9.23318958,6.44448996],[9.52268982,6.45348978],[10.11828995,7.0387702],[10.49736977,7.05534983],[11.05877018,6.64443016],[11.74578953,6.98139],[11.83932018,7.39703989],[12.06394005,7.79980993],[12.2188797,8.30583],[12.75368977,8.7177496],[12.95547962,9.41777039],[13.16761017,9.64062023],[13.30865002,10.16036987],[13.57295036,10.79858017],[14.41539001,11.57238007],[14.46815968,11.90474987],[14.57717991,12.08535957],[14.18132973,12.48365974],[14.21350956,12.80202961],[14.49577999,12.8593998],[14.89336014,12.21905041],[14.96018028,11.55556965],[14.92358971,10.89134026],[15.46788025,9.98233032],[14.90937042,9.99211979],[14.62720966,9.92092037],[14.17146015,10.02136993],[13.95421982,9.54948044],[14.54444981,8.9658699],[14.98001957,8.79611015],[15.12088013,8.3821497],[15.43609047,7.69280005],[15.27947044,7.42190981],[14.77655983,6.40851021],[14.53656006,6.22695017],[14.45940971,5.45176983],[14.55895996,5.03059006],[14.47836018,4.73260021],[14.95094013,4.21039009],[15.03625011,3.85136008],[15.40536976,3.33529997],[15.86271954,3.01354003],[15.90736008,2.55738997],[16.01287079,2.2676301],[15.94091034,1.72767997],[15.14634037,1.96399999],[14.33780956,2.22788],[13.07584,2.26711011],[13.07584,2.26711011]]]}, -{code:"NG", name:"Nigeria", borders:[[[8.50026035,4.77197981],[7.46214008,4.41209984],[7.08257008,4.46469021],[6.69809008,4.2405901],[5.89816999,4.26246023],[5.36281013,4.88796997],[5.03356981,5.61180019],[4.32560015,6.27064991],[3.57419991,6.25829983],[2.69169998,6.25881004],[2.7490499,7.87073994],[2.72379994,8.50685024],[2.91230989,9.13761044],[3.22035003,9.44416046],[3.70541,10.06320953],[3.60005999,10.33218956],[3.79710007,10.73474979],[3.57221007,11.32793045],[3.61119008,11.66018009],[3.68061996,12.55290031],[3.96727991,12.95611954],[4.10793018,13.53120041],[4.36836004,13.74748993],[5.44303989,13.86592007],[6.44540977,13.49277973],[6.8204298,13.11509991],[7.33073997,13.09803963],[7.80468988,13.34354019],[9.01494026,12.82666016],[9.52493954,12.85109043],[10.11480999,13.27725983],[10.7010498,13.24691963],[10.98960972,13.38733006],[11.52779007,13.32898045],[12.30206013,13.03717995],[13.08401012,13.5961504],[13.31871033,13.55634975],[13.99534035,12.46154976],[14.18132973,12.48365974],[14.57717991,12.08535957],[14.46815968,11.90474987],[14.41539001,11.57238007],[13.57295036,10.79858017],[13.30865002,10.16036987],[13.16761017,9.64062023],[12.95547962,9.41777039],[12.75368977,8.7177496],[12.2188797,8.30583],[12.06394005,7.79980993],[11.83932018,7.39703989],[11.74578953,6.98139],[11.05877018,6.64443016],[10.49736977,7.05534983],[10.11828995,7.0387702],[9.52268982,6.45348978],[9.23318958,6.44448996],[8.75751019,5.47967005],[8.50026035,4.77197981],[8.50026035,4.77197981]]]}, -{code:"NE", name:"Niger", borders:[[[2.15445995,11.94013977],[2.17710996,12.62502003],[1.02410996,12.85182953],[0.99304998,13.33574963],[0.42991,13.98873043],[0.29563999,14.44423962],[0.37489,14.92891979],[1.01578999,14.96817017],[1.38552999,15.32357025],[2.75001001,15.40952015],[3.63825011,15.56812],[3.72344995,16.1842804],[4.27020979,16.85222054],[4.26742983,19.15527916],[5.67757988,19.60120964],[8.57291031,21.56565094],[11.9995203,23.47166061],[13.58145046,23.04051018],[14.14385033,22.4912796],[14.85130024,22.86294937],[15.09689045,21.30850983],[15.4710598,21.04845047],[15.4871397,20.73041916],[15.90326977,20.38760948],[15.68572998,19.95718956],[15.30045033,17.92794991],[15.24775028,16.62729073],[13.97216988,15.68437004],[13.54039001,14.36711979],[13.95672035,13.9966898],[13.95446014,13.35344982],[14.5958004,13.33043003],[14.49577999,12.8593998],[14.21350956,12.80202961],[14.18132973,12.48365974],[13.99534035,12.46154976],[13.31871033,13.55634975],[13.08401012,13.5961504],[12.30206013,13.03717995],[11.52779007,13.32898045],[10.98960972,13.38733006],[10.7010498,13.24691963],[10.11480999,13.27725983],[9.52493954,12.85109043],[9.01494026,12.82666016],[7.80468988,13.34354019],[7.33073997,13.09803963],[6.8204298,13.11509991],[6.44540977,13.49277973],[5.44303989,13.86592007],[4.36836004,13.74748993],[4.10793018,13.53120041],[3.96727991,12.95611954],[3.68061996,12.55290031],[3.61119008,11.66018009],[2.84867001,12.23565006],[2.49018002,12.23305988],[2.15445995,11.94013977],[2.15445995,11.94013977]]]}, -{code:"BJ", name:"Benin", borders:[[[2.69169998,6.25881004],[1.86521006,6.14214993],[1.61894,6.83202982],[1.66448998,9.12858963],[1.46306002,9.33460999],[1.42506003,9.82540035],[1.07781994,10.17562008],[0.77235001,10.4708004],[0.89955997,10.99732971],[1.24346006,11.11050987],[1.44714999,11.54771042],[1.93597996,11.64116001],[2.15445995,11.94013977],[2.49018002,12.23305988],[2.84867001,12.23565006],[3.61119008,11.66018009],[3.57221007,11.32793045],[3.79710007,10.73474979],[3.60005999,10.33218956],[3.70541,10.06320953],[3.22035003,9.44416046],[2.91230989,9.13761044],[2.72379994,8.50685024],[2.7490499,7.87073994],[2.69169998,6.25881004],[2.69169998,6.25881004]]]}, -{code:"MA", name:"Morocco", borders:[[[-13.13994694,27.64015007],[-12.61883068,28.03816986],[-11.68889236,28.14863968],[-10.90093994,28.83213997],[-10.39955807,29.09857941],[-9.56481838,29.9335804],[-9.8146944,31.17771912],[-9.43479824,32.03808975],[-9.30069447,32.56468964],[-8.6574564,33.24023056],[-7.65416431,33.69704819],[-6.91254616,34.11048126],[-6.24433804,35.14585114],[-5.92999315,35.75999832],[-5.19386339,35.75516891],[-4.59100437,35.33071136],[-3.64006996,35.39984131],[-2.60431719,35.17910004],[-2.16989803,35.16841125],[-1.79298949,34.52790833],[-1.733459,33.91970825],[-1.38803923,32.8640213],[-1.12452972,32.65153122],[-1.30787885,32.26287842],[-2.61661816,32.09434128],[-3.06898761,31.72448921],[-3.64748907,31.63731003],[-3.69042945,30.8969593],[-4.85963631,30.50119019],[-5.24212313,30.0004406],[-6.06062412,29.7317009],[-7.05921888,29.57922935],[-8.67411041,28.84129906],[-8.66510582,27.58949089],[-13.13994694,27.64015007],[-13.13994694,27.64015007]]]}, -{code:"EH", name:"Western Sahara", borders:[[[-17.06339073,20.99975014],[-16.97324181,21.88573074],[-16.58912277,22.15823936],[-16.26192474,22.67933083],[-16.32640266,23.01777077],[-15.98259449,23.72337914],[-15.42601013,24.35913086],[-15.08932018,24.52025032],[-14.82464218,25.10351944],[-14.80089092,25.63624954],[-14.4399271,26.25441933],[-13.77379704,26.61887932],[-13.13994694,27.64015007],[-8.66510582,27.58949089],[-8.68439007,27.39574051],[-8.68728828,25.88106918],[-11.96942806,25.93335915],[-11.93722057,23.3746109],[-12.8742342,23.28482056],[-13.11873817,22.7712307],[-12.92910004,21.32707977],[-16.8451786,21.33330917],[-17.06339073,20.99975014],[-17.06339073,20.99975014]]]}, -{code:"MR", name:"Mauritania", borders:[[[-12.17073631,14.61682987],[-12.8306303,15.30370045],[-13.43574047,16.03936958],[-14.09951591,16.30430984],[-14.57734394,16.59824944],[-15.13571835,16.58728981],[-15.6236496,16.36935043],[-16.12066269,16.4556694],[-16.46308708,16.13504982],[-16.54969597,16.67388916],[-16.27056694,17.1669693],[-16.14634323,18.10848999],[-16.2568531,19.09671974],[-16.37763023,19.59382057],[-16.27781296,20.09251976],[-16.53630257,20.56786919],[-17.06339073,20.99975014],[-16.8451786,21.33330917],[-12.92910004,21.32707977],[-13.11873817,22.7712307],[-12.8742342,23.28482056],[-11.93722057,23.3746109],[-11.96942806,25.93335915],[-8.68728828,25.88106918],[-8.68439007,27.39574051],[-4.92331409,24.97456932],[-6.45375633,24.95659065],[-5.97113609,20.64084053],[-5.48852825,16.32509041],[-5.31527424,16.20185089],[-5.53774309,15.5017004],[-9.55020809,15.48651028],[-9.70027828,15.26410961],[-10.08684063,15.33047962],[-10.65077972,15.13274002],[-11.34910202,15.41125011],[-11.66607857,15.38821983],[-11.83420086,14.79909992],[-12.17073631,14.61682987],[-12.17073631,14.61682987]]]}, -{code:"ML", name:"Mali", borders:[[[-12.17073631,14.61682987],[-11.83420086,14.79909992],[-11.66607857,15.38821983],[-11.34910202,15.41125011],[-10.65077972,15.13274002],[-10.08684063,15.33047962],[-9.70027828,15.26410961],[-9.55020809,15.48651028],[-5.53774309,15.5017004],[-5.31527424,16.20185089],[-5.48852825,16.32509041],[-5.97113609,20.64084053],[-6.45375633,24.95659065],[-4.92331409,24.97456932],[-1.55003858,22.79268074],[1.82323003,20.61079979],[2.06100988,20.14221954],[2.68356991,19.85622978],[3.14666009,19.69359016],[3.15812993,19.05736923],[4.26742983,19.15527916],[4.27020979,16.85222054],[3.72344995,16.1842804],[3.63825011,15.56812],[2.75001001,15.40952015],[1.38552999,15.32357025],[1.01578999,14.96817017],[0.37489,14.92891979],[-0.26625982,14.92430973],[-0.51583916,15.11616039],[-1.06637907,14.97383022],[-2.00102997,14.55902004],[-2.19182944,14.24641037],[-2.96767998,13.79815006],[-3.10371947,13.54125977],[-3.52280998,13.33765984],[-4.00639439,13.47247982],[-4.28040409,13.22842979],[-4.42715693,12.54265022],[-5.2209444,11.71385956],[-5.19783545,11.37514019],[-5.47056913,10.9512701],[-5.40433788,10.37075043],[-5.81693316,10.22255039],[-6.05043602,10.09636974],[-6.20520544,10.52406025],[-6.49395514,10.4113102],[-6.66645622,10.43080997],[-6.85050917,10.1389904],[-7.62274885,10.14723969],[-7.89959431,10.29738998],[-8.02993584,10.20652962],[-8.33536625,10.49481964],[-8.28234768,10.79259968],[-8.40729046,10.90927029],[-8.62031078,10.81089973],[-8.58127689,11.13624954],[-8.3762989,11.39363956],[-8.78608418,11.81256962],[-8.90526676,12.08835983],[-9.12747955,12.30807018],[-9.32759762,12.33428955],[-9.56788826,12.19423008],[-9.89097214,12.06048012],[-10.16520405,11.84409046],[-10.5932169,11.92399025],[-10.87082386,12.17788982],[-11.03653431,12.21125984],[-11.29756832,12.07796001],[-11.45613766,12.07682037],[-11.51391697,12.44297981],[-11.46789646,12.75452995],[-11.55339622,13.14122009],[-11.92772388,13.42208958],[-12.12488079,13.99472046],[-12.17073631,14.61682987],[-12.17073631,14.61682987]]]}, -{code:"SN", name:"Senegal", borders:[[[-16.7136879,13.59496021],[-17.12605667,14.37351036],[-17.62502098,14.72953987],[-17.18514061,14.91946983],[-16.70069695,15.62152004],[-16.46308708,16.13504982],[-16.12066269,16.4556694],[-15.6236496,16.36935043],[-15.13571835,16.58728981],[-14.57734394,16.59824944],[-14.09951591,16.30430984],[-13.43574047,16.03936958],[-12.8306303,15.30370045],[-12.17073631,14.61682987],[-12.12488079,13.99472046],[-11.92772388,13.42208958],[-11.55339622,13.14122009],[-11.46789646,12.75452995],[-11.51391697,12.44297981],[-11.65828896,12.38659],[-12.20353413,12.46564007],[-12.27855873,12.35443974],[-12.49901676,12.33209038],[-13.21779251,12.57588005],[-13.70047474,12.58619022],[-15.54848003,12.62817955],[-15.81655788,12.51558018],[-16.1477108,12.54776001],[-16.67741776,12.38486004],[-16.84150314,13.15137959],[-15.93129444,13.13027954],[-15.69098854,13.27035999],[-15.5118103,13.27857971],[-15.1411581,13.50949955],[-14.71218777,13.29819965],[-14.27770996,13.28059006],[-13.84497643,13.50504971],[-14.04698849,13.79407024],[-14.3767128,13.62569046],[-14.68699265,13.63035965],[-15.08174801,13.87648964],[-15.39876652,13.86036015],[-15.62458611,13.62357998],[-16.7136879,13.59496021],[-16.7136879,13.59496021]]]}, -{code:"NA", name:"Namibia", borders:[[[16.34494972,-28.5766716],[15.60181046,-27.82123566],[15.2104702,-27.09095573],[14.98974037,-26.11733055],[14.74322987,-25.39292908],[14.40812016,-23.85298347],[14.38572979,-22.65663338],[14.25771046,-22.11118126],[13.86865044,-21.69901085],[13.35251999,-20.87281609],[12.82682037,-19.67316437],[12.60857964,-19.04535866],[11.79489994,-18.06913567],[11.73423004,-17.30188942],[12.21547985,-17.11164665],[12.81406975,-16.94130898],[13.46234989,-16.97120285],[14.05852985,-17.42336082],[14.20971012,-17.35311699],[18.26332092,-17.30994415],[18.95620918,-17.78907585],[21.37717056,-17.9306469],[23.21504974,-17.52312469],[24.03384972,-17.29586601],[24.68234062,-17.35341835],[25.07695007,-17.57878304],[25.08444023,-17.66178703],[24.52071953,-17.88714218],[24.21738052,-17.88933563],[23.57901955,-18.28128052],[23.19685936,-17.86903763],[21.65501976,-18.21913338],[20.91065979,-18.2522049],[20.88110924,-21.81430054],[19.89546013,-21.84913254],[19.89575958,-24.76776314],[19.89473915,-28.46112061],[19.00214005,-28.97241402],[18.46489906,-29.04546165],[17.83614922,-28.85636711],[17.38748932,-28.78351784],[17.21895027,-28.35593414],[16.82398987,-28.08212662],[16.34494972,-28.5766716],[16.34494972,-28.5766716]]]}, -{code:"BW", name:"Botswana", borders:[[[25.64917946,-18.53602219],[25.85040092,-18.71439171],[26.16481018,-19.29308128],[27.29648972,-20.39150047],[27.72472954,-20.49905777],[27.72726059,-20.85176277],[28.02137947,-21.48597527],[28.79466057,-21.63945007],[29.43218994,-22.09133911],[28.01724052,-22.82774734],[27.11944008,-23.57428932],[26.78639984,-24.24067307],[26.4857502,-24.61632538],[25.94166946,-24.6963501],[25.76585007,-25.17485046],[25.66468048,-25.48679161],[25.02516937,-25.71968079],[24.21126938,-25.6702137],[23.73353958,-25.39011383],[23.3121109,-25.26867294],[22.82427025,-25.50043488],[22.57951927,-25.97942162],[22.10597038,-26.28024673],[21.60588074,-26.72650337],[20.88958931,-26.82852364],[20.66643906,-26.47740364],[20.7585907,-25.86810684],[20.16572952,-24.91794777],[19.89575958,-24.76776314],[19.89546013,-21.84913254],[20.88110924,-21.81430054],[20.91065979,-18.2522049],[21.65501976,-18.21913338],[23.19685936,-17.86903763],[23.57901955,-18.28128052],[24.21738052,-17.88933563],[24.52071953,-17.88714218],[25.08444023,-17.66178703],[25.26424026,-17.73651314],[25.64917946,-18.53602219],[25.64917946,-18.53602219]]]}, -{code:"ZW", name:"Zimbabwe", borders:[[[31.19142914,-22.25150108],[30.65983963,-22.15157127],[30.32287979,-22.27158165],[29.83905029,-22.10217667],[29.43218994,-22.09133911],[28.79466057,-21.63945007],[28.02137947,-21.48597527],[27.72726059,-20.85176277],[27.72472954,-20.49905777],[27.29648972,-20.39150047],[26.16481018,-19.29308128],[25.85040092,-18.71439171],[25.64917946,-18.53602219],[25.26424026,-17.73651314],[26.38191986,-17.84599686],[26.70677948,-17.96123505],[27.04443932,-17.93804932],[27.5982399,-17.29080391],[28.4679203,-16.4683876],[28.82585907,-16.38973999],[28.94747925,-16.04303932],[29.51683998,-15.64469814],[30.27425003,-15.50779438],[30.33897972,-15.88085842],[31.17307091,-15.86094856],[31.63651085,-16.07198143],[31.85201073,-16.31942558],[32.32825089,-16.39204788],[32.84764099,-16.713377],[32.8498497,-17.9790287],[32.65488815,-18.67208672],[32.61201096,-19.41935539],[32.77270889,-19.7155838],[32.65974045,-20.30428123],[32.50870895,-20.39530945],[32.24502182,-21.11650085],[31.19142914,-22.25150108],[31.19142914,-22.25150108]]]}, -{code:"ZA", name:"South Africa", borders:[[[31.52098083,-29.25738144],[31.3255806,-29.40197563],[30.90177917,-29.90991402],[30.62280083,-30.4237442],[30.05570984,-31.14025688],[28.92554092,-32.1720047],[28.21973991,-32.77192307],[27.46462059,-33.22694016],[26.4194603,-33.61491776],[25.90963936,-33.66700363],[25.78063965,-33.94459152],[25.17288017,-33.79682922],[24.67783928,-33.98716354],[23.59403038,-33.79441833],[22.98819923,-33.91640472],[22.57415009,-33.86407089],[21.54282951,-34.2588501],[20.68906021,-34.4171524],[20.07127953,-34.79513168],[19.61642075,-34.81917572],[19.19330025,-34.46257019],[18.85532951,-34.44425964],[18.42466927,-33.99781799],[18.37741089,-34.13650131],[18.24448013,-33.867733],[18.25009918,-33.28142548],[17.92519951,-32.61125565],[18.24793053,-32.42909622],[18.22172928,-31.66160202],[17.56691933,-30.72571564],[17.06443024,-29.8786335],[17.06291962,-29.87593079],[16.34494972,-28.5766716],[16.82398987,-28.08212662],[17.21895027,-28.35593414],[17.38748932,-28.78351784],[17.83614922,-28.85636711],[18.46489906,-29.04546165],[19.00214005,-28.97241402],[19.89473915,-28.46112061],[19.89575958,-24.76776314],[20.16572952,-24.91794777],[20.7585907,-25.86810684],[20.66643906,-26.47740364],[20.88958931,-26.82852364],[21.60588074,-26.72650337],[22.10597038,-26.28024673],[22.57951927,-25.97942162],[22.82427025,-25.50043488],[23.3121109,-25.26867294],[23.73353958,-25.39011383],[24.21126938,-25.6702137],[25.02516937,-25.71968079],[25.66468048,-25.48679161],[25.76585007,-25.17485046],[25.94166946,-24.6963501],[26.4857502,-24.61632538],[26.78639984,-24.24067307],[27.11944008,-23.57428932],[28.01724052,-22.82774734],[29.43218994,-22.09133911],[29.83905029,-22.10217667],[30.32287979,-22.27158165],[30.65983963,-22.15157127],[31.19142914,-22.25150108],[31.67037964,-23.65895081],[31.93058014,-24.36942101],[31.7524395,-25.4842453],[31.83774948,-25.84332657],[31.33313942,-25.6601944],[31.04409027,-25.73146057],[30.94965935,-26.02262688],[30.67658997,-26.39808273],[30.68596077,-26.74381065],[31.28278923,-27.28587723],[31.86804008,-27.17791557],[32.07167053,-26.73380089],[32.83013153,-26.74217415],[32.58026123,-27.47014809],[32.46213913,-28.30097008],[32.20339966,-28.75240135],[31.52098083,-29.25738144],[31.52098083,-29.25738144]]]}, -{code:"LS", name:"Lesotho", borders:[[[28.97826004,-28.95556259],[29.32514954,-29.25738144],[29.01840019,-29.74373817],[28.84839058,-30.07003593],[28.29105949,-30.22621346],[28.10721016,-30.54571152],[27.74941063,-30.64512253],[26.99928093,-29.87593079],[27.53249931,-29.24266243],[28.07434082,-28.85145187],[28.54170036,-28.6475029],[28.97826004,-28.95556259],[28.97826004,-28.95556259]]]}, -{code:"TL", name:"Timor-Leste", borders:[[[124.96868896,-8.89276791],[125.06999969,-9.08999252],[125.08853912,-9.39316082],[125.94862366,-9.07373619],[126.63134766,-8.80165768],[127.33596039,-8.39728642],[126.95723724,-8.2733469],[125.69611359,-8.48439598],[125.14170837,-8.64055252],[124.96868896,-8.89276791],[124.96868896,-8.89276791]]]}, -{code:"KZ", name:"Kazakhstan", borders:[[[70.96231079,42.26615143],[71.1862793,42.70428848],[71.84461212,42.84540176],[73.48973846,42.50090027],[73.64530182,43.09127045],[74.21286774,43.2983284],[75.63696289,42.87789154],[76.00032806,42.98801041],[77.65840912,42.96068954],[79.14219666,42.85609055],[79.64364624,42.49668121],[80.26000214,42.34999847],[80.18012238,42.92007065],[80.86618042,43.18038177],[79.96611023,44.9175415],[81.94705963,45.31700897],[82.4589386,45.53963852],[83.18047333,47.3300209],[85.16428375,47.0009613],[85.72049713,47.45298004],[85.76822662,48.45576859],[86.59879303,48.54917145],[87.36000061,49.21500015],[86.82935333,49.82667923],[85.54128265,49.69285965],[85.11557007,50.11730957],[84.41638947,50.31142044],[83.935112,50.88925171],[83.38300323,51.06919098],[81.94596863,50.81221008],[80.56846619,51.38835907],[80.03556061,50.86476135],[77.80091095,53.40441132],[76.52520752,54.17702866],[76.89111328,54.49052048],[74.38481903,53.5468483],[73.4256897,53.4897995],[73.50853729,54.0356102],[72.22413635,54.37665176],[71.18015289,54.13330078],[70.86525726,55.16973877],[69.06816864,55.38526154],[68.16909027,54.97040176],[65.66687012,54.60124969],[65.17854309,54.35422897],[61.43659973,54.00624847],[60.97806168,53.66500854],[61.70000076,52.97999954],[60.74000168,52.72000122],[60.92723846,52.44754028],[59.96754074,51.9604187],[61.58797836,51.2726593],[61.33742142,50.79904938],[59.93281937,50.84220123],[59.64226913,50.5454483],[58.3633194,51.06364059],[56.7779808,51.04354858],[55.71694183,50.62171173],[54.53289032,51.02622986],[52.32875061,51.71866989],[50.76663971,51.6927681],[48.70235062,50.60512924],[48.57785034,49.87475967],[47.54949951,50.45468903],[46.75157166,49.35599899],[47.04364014,49.15206909],[46.46644974,48.39416885],[47.31523895,47.71585083],[48.05725098,47.7437706],[48.6947403,47.07564163],[48.59325027,46.56103897],[49.10115814,46.39933014],[50.03408051,46.60900879],[51.19195938,47.04872131],[51.72220993,46.9444809],[52.04203033,46.80463028],[53.04275131,46.85301971],[53.2208519,46.23463058],[53.0408783,45.25902939],[52.1674118,45.40840149],[51.31692123,45.24599838],[51.27851105,44.51483917],[50.3056488,44.60982895],[50.33911896,44.28401184],[50.89131927,44.03104019],[51.3423996,43.13298035],[52.50143051,42.79228973],[52.69210052,42.44390106],[52.44631958,42.0271492],[52.50246811,41.78332138],[52.94430161,42.11605072],[54.07942963,42.32410049],[54.75534821,42.0439682],[55.45521927,41.25986862],[55.96820068,41.30863953],[55.92893982,44.99584961],[58.50312042,45.58679962],[58.68999863,45.5],[58.77999878,45.88673019],[59.53499985,45.70500183],[59.55784988,46.30532837],[60.12356949,46.09603119],[60.12356949,45.57278061],[60.24000168,44.78404617],[61.05833054,44.40583038],[62.01327896,43.5044899],[63.18579102,43.65008163],[64.90081787,43.72806168],[66.09802246,42.99766159],[66.02336121,41.99464035],[66.51065826,41.98764038],[66.71405792,41.16843033],[67.98584747,41.13599014],[68.25990295,40.66233063],[68.63249207,40.66867065],[69.07000732,41.38425064],[70.38894653,42.08132172],[70.96231079,42.26615143],[70.96231079,42.26615143]]]}, -{code:"RE", name:"Reunion", borders:[[[55.18000031,-21.01379776],[55.45819855,-20.84998131],[55.74438858,-20.92091751],[55.85361862,-21.20603943],[55.67193985,-21.40499687],[55.2530899,-21.20372009],[55.18000031,-21.01379776],[55.18000031,-21.01379776]]]} -]; - -/* Convert the country borders to latlng. */ -countries.forEach(function(c) { - c.borders.forEach(function(b) { - b.forEach(function(p, i) { - b[i] = {lat: p[1], lng: p[0]}; - }); - }); -}); diff --git a/lib/protovis/tests/geo/population.js b/lib/protovis/tests/geo/population.js deleted file mode 100644 index 3f636b0a..00000000 --- a/lib/protovis/tests/geo/population.js +++ /dev/null @@ -1,250 +0,0 @@ -// pop: Population in 2005 mesured in people -// area: Area in km^2 / 10 -var population = { -'AG': {pop:83039, area:44}, -'DZ': {pop:32854159, area:238174}, -'AZ': {pop:8352021, area:8260}, -'AL': {pop:3153731, area:2740}, -'AM': {pop:3017661, area:2820}, -'AO': {pop:16095214, area:124670}, -'AS': {pop:64051, area:20}, -'AR': {pop:38747148, area:273669}, -'AU': {pop:20310208, area:768230}, -'BH': {pop:724788, area:71}, -'BB': {pop:291933, area:43}, -'BM': {pop:64174, area:5}, -'BS': {pop:323295, area:1001}, -'BD': {pop:15328112, area:13017}, -'BZ': {pop:275546, area:2281}, -'BA': {pop:3915238, area:5120}, -'BO': {pop:9182015, area:108438}, -'MM': {pop:47967266, area:65755}, -'BJ': {pop:8490301, area:11062}, -'SB': {pop:472419, area:2799}, -'BR': {pop:186830759, area:845942}, -'BG': {pop:7744591, area:11063}, -'BN': {pop:373831, area:527}, -'CA': {pop:32270507, area:909351}, -'KH': {pop:13955507, area:17652}, -'LK': {pop:19120763, area:6463}, -'CG': {pop:3609851, area:34150}, -'CD': {pop:58740547, area:226705}, -'BI': {pop:7858791, area:2568}, -'CN': {pop:1312978855, area:932743}, -'AF': {pop:25067407, area:65209}, -'BT': {pop:637013, area:4700}, -'CL': {pop:16295102, area:74880}, -'KY': {pop:45591, area:26}, -'CM': {pop:17795149, area:46540}, -'TD': {pop:10145609, area:125920}, -'KM': {pop:797902, area:223}, -'CO': {pop:4494579, area:103870}, -'CR': {pop:4327228, area:5106}, -'CF': {pop:4191429, area:62298}, -'CU': {pop:11259905, area:10982}, -'CV': {pop:506807, area:403}, -'CK': {pop:13984, area:24}, -'CY': {pop:836321, area:924}, -'DK': {pop:5416945, area:4243}, -'DJ': {pop:804206, area:2318}, -'DM': {pop:67827, area:75}, -'DO': {pop:9469601, area:4838}, -'EC': {pop:13060993, area:27684}, -'EG': {pop:72849793, area:99545}, -'IE': {pop:4143294, area:6889}, -'GQ': {pop:484098, area:2805}, -'EE': {pop:1344312, area:4239}, -'ER': {pop:4526722, area:10100}, -'SV': {pop:6668356, area:2072}, -'ET': {pop:78985857, area:100000}, -'AT': {pop:8291979, area:8245}, -'CZ': {pop:10191762, area:7727}, -'GF': {pop:192099, area:8815}, -'FI': {pop:5246004, area:30459}, -'FJ': {pop:828046, area:1827}, -'FK': {pop:2975, area:1217}, -'FM': {pop:110058, area:70}, -'PF': {pop:255632, area:366}, -'FR': {pop:60990544, area:55010}, -'GM': {pop:1617029, area:1000}, -'GA': {pop:1290693, area:25767}, -'GE': {pop:4473409, area:6949}, -'GH': {pop:2253501, area:22754}, -'GD': {pop:105237, area:34}, -'GL': {pop:57475, area:41045}, -'DE': {pop:82652369, area:34895}, -'GU': {pop:16857, area:55}, -'GR': {pop:11099737, area:12890}, -'GT': {pop:12709564, area:10843}, -'GN': {pop:9002656, area:24572}, -'GY': {pop:739472, area:19685}, -'HT': {pop:9296291, area:2756}, -'HN': {pop:683411, area:11189}, -'HR': {pop:455149, area:5592}, -'HU': {pop:10086387, area:9210}, -'IS': {pop:295732, area:10025}, -'IN': {pop:1134403141, area:297319}, -'IR': {pop:69420607, area:163620}, -'IL': {pop:6692037, area:2171}, -'IT': {pop:5864636, area:29411}, -'CI': {pop:18584701, area:31800}, -'IQ': {pop:27995984, area:43737}, -'JP': {pop:127896740, area:36450}, -'JM': {pop:2682469, area:1083}, -'JO': {pop:5544066, area:8824}, -'KE': {pop:35598952, area:56914}, -'KG': {pop:5203547, area:19180}, -'KP': {pop:23615611, area:12041}, -'KI': {pop:92003, area:73}, -'KR': {pop:47869837, area:9873}, -'KW': {pop:2700, area:1782}, -'KZ': {pop:15210609, area:269970}, -'LA': {pop:566391, area:23080}, -'LB': {pop:401074, area:1023}, -'LV': {pop:2301793, area:6205}, -'BY': {pop:9795287, area:20748}, -'LT': {pop:3425077, area:6268}, -'LR': {pop:3441796, area:9632}, -'SK': {pop:5386995, area:4808}, -'LI': {pop:34598, area:16}, -'LY': {pop:5918217, area:175954}, -'MG': {pop:18642586, area:58154}, -'MQ': {pop:395896, area:106}, -'MN': {pop:2580704, area:156650}, -'MS': {pop:5628, area:10}, -'MK': {pop:2033655, area:2543}, -'ML': {pop:1161109, area:122019}, -'MA': {pop:30494991, area:44630}, -'MU': {pop:1241173, area:203}, -'MR': {pop:2963105, area:102522}, -'MT': {pop:402617, area:32}, -'OM': {pop:2507042, area:30950}, -'MV': {pop:295297, area:30}, -'MX': {pop:104266392, area:190869}, -'MY': {pop:25652985, area:32855}, -'MZ': {pop:20532675, area:78409}, -'MW': {pop:13226091, area:9408}, -'NC': {pop:234185, area:1828}, -'NU': {pop:1632, area:26}, -'NE': {pop:1326419, area:126670}, -'AW': {pop:102897, area:0}, -'AI': {pop:12256, area:0}, -'BE': {pop:10398049, area:0}, -'HK': {pop:7057418, area:0}, -'MP': {pop:80258, area:0}, -'FO': {pop:48205, area:0}, -'AD': {pop:73483, area:0}, -'GI': {pop:291, area:0}, -'IM': {pop:78357, area:0}, -'LU': {pop:456613, area:0}, -'MO': {pop:47309, area:0}, -'MC': {pop:325, area:0}, -'PS': {pop:3762005, area:0}, -'ME': {pop:607969, area:0}, -'YT': {pop:0, area:0}, -'AX': {pop:0, area:0}, -'NF': {pop:0, area:0}, -'CC': {pop:0, area:1}, -'AQ': {pop:0, area:0}, -'BV': {pop:0, area:0}, -'TF': {pop:0, area:0}, -'HM': {pop:0, area:0}, -'IO': {pop:0, area:0}, -'CX': {pop:0, area:0}, -'UM': {pop:0, area:0}, -'VU': {pop:215366, area:1219}, -'NG': {pop:141356083, area:91077}, -'NL': {pop:1632769, area:3388}, -'NO': {pop:4638836, area:30625}, -'NP': {pop:27093656, area:14300}, -'NR': {pop:10111, area:2}, -'SR': {pop:452468, area:15600}, -'NI': {pop:5462539, area:12140}, -'NZ': {pop:4097112, area:26799}, -'PY': {pop:5904342, area:39730}, -'PE': {pop:27274266, area:128000}, -'PK': {pop:158080591, area:77088}, -'PL': {pop:38195558, area:30629}, -'PA': {pop:3231502, area:7443}, -'PT': {pop:10528226, area:9150}, -'PG': {pop:6069715, area:45286}, -'GW': {pop:1596929, area:2812}, -'QA': {pop:796186, area:1100}, -'RE': {pop:785159, area:250}, -'RO': {pop:21627557, area:22987}, -'MD': {pop:3876661, area:3288}, -'PH': {pop:84566163, area:29817}, -'PR': {pop:3946779, area:887}, -'RU': {pop:143953092, area:1638094}, -'RW': {pop:9233793, area:2467}, -'SA': {pop:2361236, area:214969}, -'KN': {pop:49138, area:36}, -'SC': {pop:85532, area:46}, -'ZA': {pop:47938663, area:121447}, -'LS': {pop:1980831, area:3035}, -'BW': {pop:1835938, area:56673}, -'SN': {pop:1177034, area:19253}, -'SI': {pop:1999425, area:2014}, -'SL': {pop:5586403, area:7162}, -'SG': {pop:4327468, area:67}, -'SO': {pop:8196395, area:62734}, -'ES': {pop:43397491, area:49904}, -'LC': {pop:16124, area:61}, -'SD': {pop:36899747, area:237600}, -'SE': {pop:9038049, area:41033}, -'SY': {pop:18893881, area:18378}, -'CH': {pop:7424389, area:4000}, -'TT': {pop:1323722, area:513}, -'TH': {pop:63002911, area:51089}, -'TJ': {pop:6550213, area:13996}, -'TK': {pop:1401, area:1}, -'TO': {pop:99361, area:72}, -'TG': {pop:6238572, area:5439}, -'ST': {pop:152622, area:96}, -'TN': {pop:10104685, area:15536}, -'TR': {pop:72969723, area:76963}, -'TV': {pop:10441, area:3}, -'TM': {pop:4833266, area:46993}, -'TZ': {pop:38477873, area:88359}, -'UG': {pop:28947181, area:19710}, -'GB': {pop:60244834, area:24193}, -'UA': {pop:46917544, area:57935}, -'US': {pop:299846449, area:915896}, -'BF': {pop:13933363, area:27360}, -'UY': {pop:3325727, area:17502}, -'UZ': {pop:26593123, area:42540}, -'VC': {pop:119137, area:39}, -'VE': {pop:26725573, area:88205}, -'VG': {pop:22016, area:15}, -'VN': {pop:85028643, area:32549}, -'VI': {pop:111408, area:35}, -'NA': {pop:2019677, area:82329}, -'WF': {pop:15079, area:14}, -'WS': {pop:183845, area:283}, -'SZ': {pop:1124529, area:1720}, -'YE': {pop:21095679, area:52797}, -'ZM': {pop:11478317, area:74339}, -'ZW': {pop:13119679, area:38685}, -'ID': {pop:226063044, area:181157}, -'GP': {pop:438403, area:169}, -'AN': {pop:186392, area:80}, -'AE': {pop:4104291, area:8360}, -'TL': {pop:1067285, area:1487}, -'PN': {pop:5, area:0}, -'PW': {pop:20127, area:0}, -'MH': {pop:5672, area:0}, -'PM': {pop:6346, area:0}, -'SH': {pop:6399, area:0}, -'SM': {pop:30214, area:0}, -'TC': {pop:24459, area:0}, -'EH': {pop:440428, area:0}, -'RS': {pop:9863026, area:0}, -'VA': {pop:783, area:0}, -'SJ': {pop:0, area:0}, -'MF': {pop:0, area:0}, -'BL': {pop:0, area:0}, -'GG': {pop:0, area:0}, -'JE': {pop:0, area:0}, -'GS': {pop:0, area:0}, -'TW': {pop:0, area:0} -}; diff --git a/lib/protovis/tests/geo/scale-aitoff.html b/lib/protovis/tests/geo/scale-aitoff.html deleted file mode 100644 index 743f9bc4..00000000 --- a/lib/protovis/tests/geo/scale-aitoff.html +++ /dev/null @@ -1,58 +0,0 @@ - - - Aitoff Projection - - - - - - - - diff --git a/lib/protovis/tests/geo/scale-gall-peters.html b/lib/protovis/tests/geo/scale-gall-peters.html deleted file mode 100644 index 00d56090..00000000 --- a/lib/protovis/tests/geo/scale-gall-peters.html +++ /dev/null @@ -1,56 +0,0 @@ - - - Gall-Peters Projection - - - - - - - - diff --git a/lib/protovis/tests/geo/scale-hammer.html b/lib/protovis/tests/geo/scale-hammer.html deleted file mode 100644 index 712c88db..00000000 --- a/lib/protovis/tests/geo/scale-hammer.html +++ /dev/null @@ -1,58 +0,0 @@ - - - Hammer Projection - - - - - - - - diff --git a/lib/protovis/tests/geo/scale-identity.html b/lib/protovis/tests/geo/scale-identity.html deleted file mode 100644 index 4cf305f3..00000000 --- a/lib/protovis/tests/geo/scale-identity.html +++ /dev/null @@ -1,56 +0,0 @@ - - - Identity Projection - - - - - - - - diff --git a/lib/protovis/tests/geo/scale-mercator.html b/lib/protovis/tests/geo/scale-mercator.html deleted file mode 100644 index d51e74f1..00000000 --- a/lib/protovis/tests/geo/scale-mercator.html +++ /dev/null @@ -1,56 +0,0 @@ - - - Mercator Projection - - - - - - - - diff --git a/lib/protovis/tests/geo/scale-sinusoidal.html b/lib/protovis/tests/geo/scale-sinusoidal.html deleted file mode 100644 index 60817195..00000000 --- a/lib/protovis/tests/geo/scale-sinusoidal.html +++ /dev/null @@ -1,57 +0,0 @@ - - - Sinusoidal Projection - - - - - - - - diff --git a/lib/protovis/tests/geo/scale-smart-domain.html b/lib/protovis/tests/geo/scale-smart-domain.html deleted file mode 100644 index 501ac170..00000000 --- a/lib/protovis/tests/geo/scale-smart-domain.html +++ /dev/null @@ -1,58 +0,0 @@ - - - Geo Scale - - - - - - - - - diff --git a/lib/protovis/tests/geo/scale.html b/lib/protovis/tests/geo/scale.html deleted file mode 100644 index fcf8c4e5..00000000 --- a/lib/protovis/tests/geo/scale.html +++ /dev/null @@ -1,55 +0,0 @@ - - - Geo Scale - - - - - - - - - diff --git a/lib/protovis/tests/geo/scale2.html b/lib/protovis/tests/geo/scale2.html deleted file mode 100644 index bc1c8910..00000000 --- a/lib/protovis/tests/geo/scale2.html +++ /dev/null @@ -1,40 +0,0 @@ - - - Geo Scale - - - - - - - - diff --git a/lib/protovis/tests/geo/us-states.js b/lib/protovis/tests/geo/us-states.js deleted file mode 100644 index bffc3ce9..00000000 --- a/lib/protovis/tests/geo/us-states.js +++ /dev/null @@ -1,61 +0,0 @@ -var states = [ - { name:'Wyoming', code:'wy', borders:[[[-111.137695,45.026951],[-104.029541,45.034710],[-104.040527,40.996483],[-111.115723,40.979897],[-111.137695,45.026951]]] }, - { name:'Wisconsin', code:'wi', borders:[[[-89.967041,47.301579],[-90.439445,46.536190],[-90.329582,46.543751],[-90.197746,46.468128],[-90.120850,46.339340],[-89.077141,46.126549],[-88.791496,46.004589],[-88.648682,46.004589],[-88.494873,46.012218],[-88.297112,45.958778],[-88.121330,45.928219],[-88.143311,45.813480],[-88.000481,45.782841],[-87.857658,45.736858],[-87.758781,45.606350],[-87.813721,45.506340],[-87.890617,45.375301],[-87.769768,45.359859],[-87.681877,45.383011],[-87.769768,45.174290],[-87.626953,45.166546],[-87.637932,45.104542],[-87.462151,45.073521],[-87.418213,45.189770],[-87.253418,45.220741],[-87.220459,45.267155],[-87.121582,45.390728],[-87.110588,45.452419],[-86.813957,45.452419],[-86.275627,45.228477],[-86.561272,45.019180],[-86.726067,44.855858],[-87.132561,43.834518],[-87.165520,43.651970],[-87.044670,42.738937],[-87.110588,42.480202],[-90.648186,42.504501],[-90.714111,42.650120],[-91.043701,42.714729],[-91.098633,42.875957],[-91.153557,42.916199],[-91.175529,43.125038],[-91.076660,43.261200],[-91.197502,43.405041],[-91.274406,43.651970],[-91.296379,43.874130],[-91.461182,44.000710],[-91.735832,44.103359],[-91.878662,44.190079],[-91.955559,44.355270],[-92.274162,44.441620],[-92.329102,44.535671],[-92.548820,44.574810],[-92.779541,44.754532],[-92.768547,45.290340],[-92.636711,45.437000],[-92.746582,45.560207],[-92.911369,45.560207],[-92.878410,45.721519],[-92.680656,45.920582],[-92.296143,46.057983],[-92.307121,46.732330],[-91.955559,46.724800],[-91.483147,47.002728],[-91.164551,47.070122],[-90.659180,47.316479],[-89.967041,47.301579]]] }, - { name:'West Virginia', code:'wv', borders:[[[-82.639160,38.160461],[-82.463356,37.952862],[-82.424927,37.892197],[-82.430397,37.840149],[-82.273865,37.679474],[-82.155762,37.570702],[-81.936028,37.509720],[-81.892082,37.300259],[-81.661369,37.212818],[-81.353752,37.326469],[-80.991203,37.291531],[-80.870361,37.335209],[-80.848381,37.422508],[-80.738510,37.396339],[-80.507812,37.466118],[-80.299072,37.527142],[-80.244141,37.640320],[-80.299072,37.701199],[-79.925522,38.108620],[-79.628899,38.543861],[-79.343262,38.444981],[-79.211418,38.548161],[-78.991692,38.848259],[-79.063103,38.942322],[-78.986198,38.895298],[-78.859848,38.762650],[-78.738998,38.925220],[-78.552231,39.002110],[-78.409409,39.189678],[-78.321518,39.504040],[-78.211670,39.679710],[-78.294067,39.622616],[-78.376450,39.622608],[-78.475342,39.546410],[-78.717026,39.554871],[-78.815910,39.622608],[-78.969711,39.453152],[-79.090561,39.453152],[-79.475082,39.223728],[-79.486076,39.707180],[-80.496811,39.732521],[-80.496811,40.497089],[-80.628647,40.538841],[-80.617668,40.245979],[-80.859360,39.664902],[-81.232910,39.385262],[-81.551498,39.359779],[-81.749260,39.189678],[-81.793213,39.070358],[-81.804192,38.925220],[-81.925034,38.873909],[-81.979958,39.019169],[-82.089828,38.950851],[-82.221680,38.779781],[-82.199699,38.616859],[-82.309563,38.591110],[-82.309563,38.444981],[-82.606201,38.410549],[-82.639160,38.160461]]] }, - { name:'Washington', code:'wa', borders:[[[-123.332520,48.994637],[-117.026367,48.994637],[-117.048340,46.452995],[-116.916504,45.996964],[-119.289551,45.996964],[-119.685059,45.874714],[-120.124512,45.874714],[-120.366211,45.660126],[-120.629883,45.736858],[-121.201172,45.614037],[-121.596680,45.736858],[-121.904297,45.690830],[-122.321777,45.567909],[-122.783203,45.644768],[-122.871094,45.905300],[-122.980957,46.103710],[-123.464355,46.164616],[-123.728027,46.286224],[-123.991699,46.255848],[-124.497070,47.857403],[-124.716797,47.945786],[-124.782715,48.487484],[-123.662109,48.210030],[-123.266602,48.283192],[-123.134766,48.458351],[-123.332520,48.705463],[-123.024902,48.777912],[-123.332520,48.994637]]] }, - { name:'Oregon', code:'or', borders:[[[-123.969727,46.225452],[-124.233398,43.484810],[-124.409180,43.261208],[-124.519043,42.779274],[-124.365234,42.000324],[-120.629883,41.983994],[-117.004395,41.951321],[-116.960449,43.882057],[-116.850586,44.213711],[-117.268066,44.339565],[-116.499023,45.706177],[-116.960449,46.012222],[-119.311523,46.027481],[-119.685059,45.905300],[-120.168457,45.890007],[-120.388184,45.660126],[-120.651855,45.767521],[-121.179199,45.629402],[-121.640625,45.767521],[-122.321777,45.614037],[-122.761230,45.644768],[-122.937012,46.149395],[-123.354492,46.149395],[-123.706055,46.271034],[-123.969727,46.225452]]] }, - { name:'Nevada', code:'nv', borders:[[[-120.014648,42.016651],[-120.014648,39.010647],[-114.653320,35.012001],[-114.653320,35.621582],[-114.741211,36.102375],[-114.411621,36.084621],[-114.060059,36.102375],[-114.038086,41.983994],[-120.014648,42.016651]]] }, - { name:'Colorado', code:'co', borders:[[[-102.008057,41.004776],[-102.041000,37.020088],[-109.072258,36.985001],[-109.072250,40.979881],[-102.008057,41.004776]]] }, - { name:'South Dakota', code:'sd', borders:[[[-104.051506,45.943508],[-104.040520,42.988571],[-98.558350,42.980530],[-98.151855,42.779274],[-97.899162,42.755070],[-97.833252,42.835690],[-97.679436,42.803459],[-97.393791,42.835690],[-97.267448,42.843750],[-97.130119,42.738937],[-96.954338,42.738937],[-96.822502,42.690510],[-96.690666,42.593529],[-96.624748,42.496399],[-96.470940,42.544979],[-96.602776,42.690510],[-96.602776,42.787331],[-96.514893,42.900108],[-96.448967,43.076908],[-96.492912,43.221180],[-96.558830,43.365120],[-96.602776,43.492779],[-96.427002,43.524651],[-96.448967,45.267151],[-96.492912,45.375301],[-96.690666,45.421577],[-96.734612,45.514042],[-96.844482,45.606350],[-96.602776,45.759850],[-96.492912,45.928219],[-104.051506,45.943508]]] }, - { name:'North Dakota', code:'nd', borders:[[[-104.062500,48.994629],[-104.062500,47.487511],[-104.062500,45.935871],[-100.338135,45.905300],[-96.503899,45.935871],[-96.657707,46.422710],[-96.789551,46.634350],[-96.855461,47.606159],[-97.075188,48.034012],[-97.185051,48.545700],[-97.075195,48.690960],[-97.272942,48.994629],[-104.062500,48.994629]]] }, - { name:'Montana', code:'mt', borders:[[[-116.081543,49.009048],[-116.059570,47.989922],[-115.664062,47.635784],[-115.708008,47.457809],[-115.444336,47.294132],[-114.916992,46.890232],[-114.697266,46.664516],[-114.345703,46.649437],[-114.499512,46.118942],[-114.367676,45.874714],[-114.565430,45.798168],[-114.521484,45.567909],[-114.367676,45.444717],[-113.972168,45.660126],[-113.466797,45.042477],[-113.466797,44.887012],[-113.181152,44.809120],[-112.851562,44.339565],[-112.741699,44.496506],[-112.368164,44.496506],[-111.489258,44.574818],[-111.423340,44.731125],[-111.093750,44.480827],[-111.049805,44.980343],[-104.062500,44.980343],[-104.040527,48.980217],[-116.081543,49.009048]]] }, - { name:'Idaho', code:'id', borders:[[[-111.049805,42.000324],[-117.070312,41.983994],[-116.960449,43.882057],[-116.850586,44.213711],[-117.312012,44.339565],[-116.499023,45.736858],[-117.004395,46.057983],[-117.026367,48.994637],[-116.059570,48.965794],[-116.059570,48.019321],[-115.664062,47.606163],[-115.708008,47.442951],[-114.829102,46.845161],[-114.719238,46.694668],[-114.367676,46.664516],[-114.499512,46.149395],[-114.389648,45.890007],[-114.587402,45.782848],[-114.565430,45.567909],[-114.345703,45.475540],[-113.972168,45.690830],[-113.444824,45.073521],[-113.466797,44.871441],[-113.159180,44.777935],[-112.873535,44.339565],[-112.763672,44.512177],[-111.467285,44.606113],[-111.445312,44.777935],[-111.115723,44.512177],[-111.049805,42.000324]]] }, - { name:'Utah', code:'ut', borders:[[[-114.082031,37.002552],[-109.061279,36.993778],[-109.050293,40.996483],[-111.049805,41.013065],[-111.049805,42.016651],[-114.060059,42.000324],[-114.082031,37.002552]]] }, - { name:'New Mexico', code:'nm', borders:[[[-109.050293,37.011326],[-109.050293,31.306715],[-108.215332,31.344254],[-108.215332,31.756195],[-106.523438,31.774878],[-106.633301,31.980122],[-103.007812,31.998758],[-103.007812,36.993778],[-109.050293,37.011326]]] }, - { name:'Arizona', code:'az', borders:[[[-109.061279,36.993778],[-109.050293,31.353636],[-110.961914,31.334869],[-114.807129,32.454155],[-114.741211,32.694866],[-114.433594,32.879585],[-114.521484,33.045506],[-114.697266,33.063923],[-114.719238,33.376411],[-114.543457,33.669495],[-114.521484,33.979809],[-114.147949,34.288994],[-114.697266,34.903954],[-114.741211,36.120129],[-114.060059,36.120129],[-114.038086,37.020096],[-109.061279,36.993778]]] }, - { name:'California', code:'ca', borders:[[[-120.014648,41.983994],[-120.014648,38.993572],[-114.653320,35.065971],[-114.697266,34.849873],[-114.191895,34.288994],[-114.521484,33.943359],[-114.565430,33.632915],[-114.763184,33.394760],[-114.697266,33.063923],[-114.477539,33.008663],[-114.455566,32.879585],[-114.785156,32.694866],[-117.136230,32.546814],[-117.312012,32.824211],[-117.377930,33.174343],[-118.081055,33.742611],[-118.388672,33.760883],[-118.476562,33.998028],[-118.828125,34.052658],[-119.245605,34.125446],[-119.509277,34.397842],[-120.498047,34.452217],[-120.651855,34.885929],[-120.673828,35.173809],[-120.871582,35.263561],[-120.893555,35.460670],[-121.376953,35.657295],[-121.420898,35.871246],[-121.684570,36.137875],[-121.970215,36.368221],[-121.970215,36.615528],[-121.816406,36.809284],[-121.926270,36.949890],[-122.233887,37.002552],[-122.475586,37.195332],[-122.541504,37.561996],[-122.497559,37.770714],[-122.189941,37.474857],[-122.167969,37.683819],[-122.343750,37.822803],[-122.387695,37.961521],[-122.233887,38.082687],[-122.497559,38.117271],[-122.497559,37.840157],[-122.739258,37.944199],[-122.871094,38.048092],[-123.002930,38.048092],[-122.980957,38.238178],[-123.134766,38.427773],[-123.376465,38.444984],[-123.398438,38.616871],[-123.771973,38.908131],[-123.728027,39.095963],[-123.837891,39.402245],[-123.793945,39.791653],[-124.409180,40.346542],[-124.321289,40.730606],[-124.145508,40.913513],[-124.167480,41.178654],[-124.035645,41.409775],[-124.255371,41.771313],[-124.299316,42.016651],[-120.014648,41.983994]]] }, - { name:'Nebraska', code:'ne', borders:[[[-102.013550,40.992336],[-102.019043,40.010788],[-95.295410,40.010788],[-95.427246,40.078072],[-95.471191,40.245991],[-95.646973,40.346542],[-95.690918,40.513798],[-95.778809,40.613953],[-95.822754,40.979897],[-95.954590,41.508575],[-96.130371,41.869560],[-96.262207,42.098221],[-96.481934,42.585445],[-96.619263,42.500454],[-96.701660,42.609707],[-96.800537,42.678394],[-96.965332,42.747009],[-97.141113,42.755077],[-97.272949,42.851807],[-97.404785,42.847778],[-97.668457,42.807491],[-97.838745,42.831669],[-97.910156,42.759113],[-98.047485,42.763145],[-98.591309,43.000629],[-99.365845,43.004646],[-104.040527,43.000629],[-104.062500,41.000629],[-102.013550,40.992336]]] }, - { name:'Kansas', code:'ks', borders:[[[-95.306396,40.010788],[-102.030029,40.002373],[-102.030029,37.020096],[-94.625244,37.011326],[-94.625244,39.164143],[-94.833984,39.215233],[-94.932861,39.342793],[-94.910889,39.427708],[-95.020752,39.444679],[-95.119629,39.571819],[-94.965820,39.757881],[-94.943848,39.892879],[-95.130615,39.892879],[-95.306396,40.010788]]] }, - { name:'Oklahoma', code:'ok', borders:[[[-94.647217,37.028870],[-103.018799,37.011326],[-103.029785,36.483143],[-100.019531,36.509636],[-99.997559,34.606087],[-99.711914,34.415974],[-99.569092,34.434097],[-99.404297,34.370644],[-99.382324,34.470333],[-99.206543,34.334366],[-99.195557,34.225430],[-98.975830,34.225430],[-98.712158,34.107254],[-98.646240,34.170906],[-98.514404,34.098160],[-98.382568,34.161816],[-98.085938,34.116352],[-98.085938,34.016239],[-97.976074,34.016239],[-97.965088,33.897778],[-97.855225,33.861294],[-97.690430,33.998028],[-97.569580,33.916012],[-97.481689,33.934242],[-97.426758,33.833920],[-97.261963,33.897778],[-97.250977,33.979809],[-97.185059,33.770016],[-97.075195,33.833920],[-97.009277,33.961586],[-96.866455,33.879536],[-96.448975,33.779148],[-96.372070,33.696922],[-96.306152,33.770016],[-96.218262,33.760883],[-96.185303,33.852169],[-95.921631,33.879536],[-95.800781,33.852169],[-95.614014,33.943359],[-95.383301,33.879536],[-95.218506,33.979809],[-94.515381,33.642063],[-94.416504,35.344254],[-94.625244,36.491974],[-94.647217,37.028870]]] }, - { name:'Texas', code:'tx', borders:[[[-106.633301,31.952162],[-106.303711,31.597252],[-106.062012,31.391157],[-105.710449,31.109388],[-105.402832,30.883368],[-104.941406,30.619005],[-104.765625,30.221102],[-104.677734,29.878756],[-104.326172,29.477861],[-103.754883,29.248062],[-103.227539,28.979313],[-102.985840,29.209713],[-102.700195,29.688053],[-102.392578,29.764376],[-102.326660,29.878756],[-101.491699,29.783449],[-100.788574,29.228889],[-100.261230,28.207609],[-99.975586,27.994400],[-99.799805,27.702984],[-99.470215,27.527758],[-99.448242,27.215555],[-99.448242,26.980827],[-99.140625,26.411551],[-98.261719,26.076521],[-97.668457,25.977798],[-97.426758,25.839449],[-97.163086,25.938286],[-97.514648,26.332806],[-97.492676,26.980827],[-97.014771,27.882784],[-96.663208,28.217289],[-96.350098,28.574875],[-95.712891,28.690588],[-94.877930,29.305561],[-95.009766,29.630770],[-94.768066,29.668962],[-94.636230,29.458731],[-94.334106,29.568678],[-94.059448,29.697596],[-94.273682,29.606894],[-94.356079,29.549566],[-94.284668,29.583012],[-93.889160,29.726221],[-93.889160,29.726221],[-93.867188,29.707138],[-93.669434,30.202114],[-93.669434,30.486549],[-93.537598,30.958769],[-94.020996,31.989443],[-94.064941,33.523079],[-95.207520,33.943359],[-95.383301,33.852169],[-95.603027,33.925129],[-95.778809,33.870415],[-96.174316,33.870415],[-96.394043,33.742611],[-96.877441,33.852169],[-97.053223,33.961586],[-97.141113,33.779148],[-97.272949,33.979809],[-97.448730,33.852169],[-97.690430,33.998028],[-97.932129,33.888657],[-98.129883,34.107254],[-98.393555,34.179996],[-98.569336,34.125446],[-98.745117,34.125446],[-99.184570,34.234512],[-99.382324,34.452217],[-99.689941,34.379711],[-99.975586,34.578953],[-100.019531,36.491974],[-103.029785,36.491974],[-103.029785,31.989443],[-106.633301,31.952162]]] }, - { name:'Louisiana', code:'la', borders:[[[-91.593018,31.005863],[-91.636963,31.259769],[-91.505127,31.259769],[-91.494141,31.522362],[-91.373291,31.746853],[-91.351318,31.858896],[-91.109619,31.998758],[-91.010742,32.194210],[-91.010742,32.389240],[-91.131592,32.602360],[-91.142578,32.750324],[-91.065674,32.925709],[-91.208496,32.990234],[-94.064941,33.027088],[-94.042969,32.008076],[-93.548584,30.987026],[-93.691406,30.496017],[-93.680420,30.230595],[-93.911133,29.716681],[-93.427734,29.764376],[-93.131104,29.754841],[-92.263184,29.525669],[-92.043457,29.573458],[-91.834717,29.487425],[-91.746826,29.602118],[-91.911621,29.649868],[-92.109375,29.640320],[-92.153320,29.735762],[-91.977539,29.802517],[-91.856689,29.735762],[-91.636963,29.745300],[-91.625977,29.640320],[-91.494141,29.506548],[-91.274414,29.449165],[-91.296387,29.324718],[-91.263428,29.219301],[-90.878906,29.094578],[-90.845947,29.017748],[-90.615234,29.267233],[-90.406494,29.305561],[-90.263672,29.228889],[-90.263672,29.104176],[-90.043945,29.209713],[-90.065918,29.439598],[-90.000000,29.516109],[-89.604492,29.334297],[-89.472656,29.219301],[-89.285889,29.132971],[-89.340820,28.988920],[-89.230957,29.036961],[-89.077148,29.152161],[-89.187012,29.315142],[-89.582520,29.458731],[-89.703369,29.630770],[-89.406738,29.745300],[-89.274902,29.859701],[-89.439697,30.031054],[-89.593506,29.916851],[-89.835205,29.916851],[-89.681396,30.069094],[-89.791260,30.135626],[-89.890137,30.097612],[-90.186768,30.012032],[-90.494385,30.126123],[-90.560303,30.278044],[-90.175781,30.382353],[-89.879150,30.211607],[-89.714355,30.135626],[-89.582520,30.183123],[-89.703369,30.467613],[-89.857178,30.600094],[-89.857178,30.798473],[-89.747314,30.977610],[-91.593018,31.005863]]] }, - { name:'Mississippi', code:'ms', borders:[[[-90.252686,35.012001],[-90.560303,34.786739],[-90.560303,34.524662],[-90.582275,34.415974],[-90.747070,34.325291],[-90.955811,34.161816],[-90.889893,34.016239],[-91.087646,33.961586],[-91.065674,33.806538],[-91.219482,33.687782],[-91.219482,33.559708],[-91.076660,33.394760],[-91.098633,33.257065],[-91.164551,33.008663],[-91.054688,32.907261],[-91.142578,32.722599],[-91.131592,32.565334],[-91.032715,32.379959],[-91.032715,32.222095],[-91.120605,31.980122],[-91.351318,31.849564],[-91.494141,31.550453],[-91.494141,31.250378],[-91.636963,31.250378],[-91.593018,31.015278],[-89.736328,30.987026],[-89.835205,30.798473],[-89.857178,30.590637],[-89.670410,30.448673],[-89.593506,30.173626],[-89.439697,30.192617],[-89.395752,30.297018],[-88.956299,30.382353],[-88.714600,30.353916],[-88.538818,30.363396],[-88.406982,30.344437],[-88.439941,31.877558],[-88.099365,35.003002],[-90.252686,35.012001]]] }, - { name:'Alabama', code:'al', borders:[[[-88.406982,30.353909],[-88.165276,30.344429],[-88.077393,30.704048],[-87.923576,30.628450],[-87.791740,30.287531],[-87.517082,30.287531],[-87.374268,30.420256],[-87.374260,30.637911],[-87.648918,30.873940],[-87.615959,31.015270],[-85.012199,30.996439],[-85.133049,31.240980],[-85.056152,31.587891],[-85.144043,31.914860],[-85.001221,32.203499],[-84.902336,32.296410],[-85.034180,32.398510],[-84.990227,32.546810],[-85.122063,32.676369],[-85.198967,32.879578],[-85.605461,35.012001],[-88.088371,35.002998],[-88.450920,31.840229],[-88.406982,30.353909]]] }, - { name:'Georgia', code:'ga', borders:[[[-83.111572,34.998505],[-84.396973,35.007504],[-85.605469,35.007504],[-85.144043,32.708733],[-85.001221,32.551441],[-85.034180,32.412430],[-84.913330,32.310349],[-85.133057,31.919531],[-85.067139,31.611286],[-85.133057,31.255074],[-85.023193,31.001156],[-84.924316,30.859795],[-84.869385,30.737114],[-82.254639,30.585907],[-82.199707,30.387091],[-82.012939,30.377613],[-82.034912,30.822063],[-81.892090,30.850363],[-81.463623,30.737114],[-81.419678,31.085869],[-81.145020,31.545771],[-81.145020,31.742184],[-80.947266,31.994101],[-81.101074,32.068611],[-81.134033,32.319633],[-81.419678,32.708733],[-81.474609,33.013268],[-81.716309,33.096146],[-82.012939,33.481853],[-82.551270,33.984364],[-82.880859,34.447689],[-83.067627,34.511082],[-83.188477,34.619648],[-83.364258,34.746124],[-83.111572,34.998505]]] }, - { name:'Arkansas', code:'ar', borders:[[[-91.164551,33.008663],[-91.098633,33.413101],[-91.230469,33.687782],[-91.076660,34.016239],[-90.922852,34.016239],[-90.944824,34.216343],[-90.615234,34.434097],[-90.549316,34.777714],[-90.285645,35.012001],[-90.043945,35.029995],[-90.109863,35.406960],[-89.890137,35.746513],[-89.692383,35.995785],[-90.329590,35.995785],[-90.131836,36.332829],[-90.153809,36.509636],[-94.614258,36.491974],[-94.460449,35.514343],[-94.504395,33.724339],[-94.108887,33.523079],[-94.086914,33.045506],[-91.164551,33.008663]]] }, - { name:'Tennessee', code:'tn', borders:[[[-89.747292,36.013550],[-89.472649,36.500790],[-88.714600,36.500797],[-88.011467,36.518459],[-87.857658,36.518459],[-87.951042,36.646381],[-81.705322,36.589066],[-81.771240,36.332809],[-81.958008,36.230980],[-82.100830,36.084621],[-82.606201,36.182220],[-82.694092,36.013550],[-82.913788,35.995781],[-83.221413,35.746510],[-83.572990,35.603699],[-83.968498,35.532219],[-84.144272,35.317360],[-84.451889,35.021000],[-90.098869,35.029980],[-90.109848,35.942429],[-89.945038,35.746510],[-89.747292,36.013550]]] }, - { name:'South Carolina', code:'sc', borders:[[[-83.166504,35.003002],[-82.847900,35.110924],[-82.485352,35.191765],[-81.057129,35.173809],[-80.870361,35.003002],[-80.837402,34.822823],[-79.705811,34.813805],[-79.211426,34.370644],[-78.629150,33.879536],[-79.189453,33.211117],[-79.683838,32.870358],[-80.947266,31.980122],[-81.101074,32.129105],[-81.156006,32.361404],[-81.320801,32.583851],[-81.474609,32.787273],[-81.474609,33.008663],[-81.738281,33.146748],[-82.243652,33.742611],[-82.573242,34.007133],[-82.836914,34.425034],[-83.078613,34.533710],[-83.364258,34.768688],[-83.166504,35.003002]]] }, - { name:'North Carolina', code:'nc', borders:[[[-78.596191,33.906891],[-78.134758,33.943352],[-78.002930,33.870407],[-77.849121,34.234509],[-77.409660,34.542759],[-76.904289,34.687420],[-76.574699,34.741611],[-76.311028,34.957989],[-76.486809,35.047981],[-76.772461,35.012001],[-76.530762,35.317360],[-77.058098,35.514339],[-76.333000,35.389042],[-76.113281,35.389042],[-75.937500,35.621578],[-75.805656,35.621578],[-75.805656,35.924641],[-75.937500,35.995781],[-76.091301,35.675140],[-76.113281,35.978001],[-76.772461,35.978001],[-76.091301,36.191090],[-75.981438,36.208820],[-75.959473,36.562599],[-78.826904,36.522881],[-81.694336,36.593479],[-81.782219,36.350521],[-82.111809,36.102371],[-82.595207,36.173347],[-82.683098,36.031330],[-82.924797,35.995781],[-83.232422,35.746510],[-83.979492,35.532219],[-84.418938,35.047981],[-83.122551,35.012001],[-82.441399,35.209721],[-81.035149,35.191761],[-80.837402,34.867901],[-79.694817,34.813801],[-78.596191,33.906891]]] }, - { name:'Florida', code:'fl', borders:[[[-87.484131,30.297018],[-86.627197,30.391829],[-86.506348,30.524412],[-86.121826,30.448673],[-86.330566,30.363396],[-85.726318,30.145126],[-85.286865,29.812052],[-85.034180,29.697596],[-84.770508,29.773914],[-84.396973,29.897804],[-84.320068,30.050077],[-84.045410,30.116621],[-83.562012,29.773914],[-83.408203,29.668962],[-83.386230,29.525669],[-83.100586,29.248062],[-83.078613,29.113775],[-82.814941,29.152161],[-82.650146,28.594170],[-82.825928,27.916767],[-82.705078,27.732161],[-82.540283,27.926474],[-82.419434,27.819645],[-82.672119,27.508270],[-82.331543,26.892679],[-82.023926,26.450901],[-81.837158,26.450901],[-81.826172,26.076521],[-81.188965,25.463114],[-81.123047,25.145285],[-80.529785,25.214880],[-80.419922,25.135338],[-80.925293,24.776758],[-81.793213,24.597078],[-81.749268,24.487148],[-81.496582,24.617056],[-80.793457,24.746832],[-80.310059,25.175117],[-80.222168,25.601900],[-80.101318,26.194878],[-80.046387,26.863281],[-80.705566,28.362400],[-80.881348,28.729130],[-81.342773,29.973970],[-81.441650,30.713505],[-81.881104,30.855078],[-82.034912,30.798473],[-82.045898,30.401306],[-82.210693,30.401306],[-82.265625,30.590637],[-84.869385,30.722948],[-85.012207,30.996445],[-87.604980,31.024694],[-87.637939,30.864510],[-87.396240,30.647364],[-87.484131,30.297018]]] }, - { name:'Minnesota', code:'mn', borders:[[[-97.229004,48.994637],[-95.141602,48.994637],[-95.163574,49.368065],[-94.943848,49.353756],[-94.768066,49.267803],[-94.724121,48.792389],[-94.526367,48.676453],[-94.306641,48.719959],[-93.867188,48.647427],[-93.867188,48.516605],[-93.405762,48.632908],[-92.592773,48.574791],[-92.548828,48.429199],[-92.395020,48.239307],[-92.263184,48.341644],[-92.043457,48.341644],[-91.494141,48.078079],[-90.900879,48.239307],[-90.769043,48.122101],[-90.021973,48.107430],[-89.538574,47.989922],[-89.978027,47.309032],[-90.703125,47.323933],[-91.208496,47.025204],[-91.538086,47.010227],[-91.977539,46.724800],[-92.307129,46.724800],[-92.351074,46.042736],[-92.680664,45.905300],[-92.900391,45.598667],[-92.757568,45.560219],[-92.702637,45.413876],[-92.768555,44.762337],[-92.570801,44.527843],[-92.329102,44.574818],[-92.219238,44.418087],[-91.955566,44.402390],[-91.867676,44.150681],[-91.318359,43.897892],[-91.274414,43.500751],[-96.481934,43.548546],[-96.481934,45.398449],[-96.679688,45.429298],[-96.811523,45.644768],[-96.525879,46.027481],[-96.833496,46.709736],[-96.877441,47.635784],[-97.119141,48.100094],[-97.152100,48.574791],[-97.152100,48.792389],[-97.229004,48.994637]]] }, - { name:'Iowa', code:'ia', borders:[[[-95.734863,40.563896],[-91.779785,40.613953],[-91.494141,40.363289],[-91.384277,40.530502],[-91.384277,40.630630],[-91.142578,40.663971],[-90.966797,40.896908],[-90.966797,41.129021],[-91.098633,41.228249],[-91.054688,41.442726],[-90.681152,41.459194],[-90.417480,41.640079],[-90.197754,41.918629],[-90.153809,42.114525],[-90.373535,42.277309],[-90.637207,42.504501],[-90.725098,42.682434],[-91.120605,42.730873],[-91.208496,43.133060],[-91.098633,43.293198],[-91.252441,43.500751],[-96.613770,43.532619],[-96.503906,43.165123],[-96.657715,42.779274],[-96.525879,42.520699],[-95.932617,41.360317],[-95.734863,40.563896]]] }, - { name:'Missouri', code:'mo', borders:[[[-95.756836,40.597271],[-91.779785,40.613953],[-91.516113,40.346542],[-91.428223,39.842285],[-90.791016,39.300301],[-90.549316,38.908131],[-90.197754,38.822590],[-90.241699,38.513786],[-90.439453,38.220921],[-89.846191,37.840157],[-89.494629,37.649033],[-89.406738,37.265308],[-89.252930,36.985001],[-89.362793,36.597889],[-89.670410,35.978004],[-90.351562,36.031330],[-90.164795,36.491974],[-94.614258,36.527294],[-94.614258,39.147102],[-95.163574,39.571819],[-94.965820,39.892879],[-95.361328,40.027615],[-95.515137,40.279526],[-95.756836,40.597271]]] }, - { name:'Illinois', code:'il', borders:[[[-87.121582,42.488300],[-87.077637,42.269180],[-87.055664,42.106373],[-87.451172,41.787689],[-87.539062,39.368271],[-87.736809,39.130058],[-87.539062,38.771210],[-87.648918,38.496590],[-88.066399,37.926861],[-88.176270,37.666420],[-88.088371,37.439968],[-88.483879,37.300270],[-88.505852,37.020088],[-88.967278,37.195328],[-89.208977,37.055168],[-89.274902,37.002548],[-89.538567,37.631630],[-90.439445,38.238171],[-90.241692,38.822590],[-90.549309,38.908131],[-90.988770,39.436192],[-91.494141,39.909729],[-91.538078,40.380020],[-91.406250,40.647301],[-91.164551,40.663967],[-90.922852,41.112457],[-91.120598,41.277798],[-91.098633,41.475651],[-90.637199,41.525028],[-90.153801,42.114517],[-90.637199,42.472092],[-87.121582,42.488300]]] }, - { name:'Kentucky', code:'ky', borders:[[[-88.209221,37.701199],[-88.088371,37.918198],[-88.022461,37.952862],[-87.984009,37.952862],[-87.940063,37.926868],[-87.901611,37.918190],[-87.676392,38.039440],[-87.440170,37.961521],[-87.401733,38.039429],[-87.297356,37.944187],[-87.088623,37.762032],[-87.077629,37.926861],[-86.879883,37.987499],[-86.737061,37.944187],[-86.627182,37.866169],[-86.363510,38.177750],[-86.011963,37.944180],[-85.649406,38.384720],[-85.418701,38.771210],[-85.023178,38.754082],[-84.781487,38.822578],[-84.869377,39.053310],[-84.726562,39.155609],[-84.484848,39.027699],[-84.281609,38.938042],[-84.177231,38.779781],[-83.880608,38.771210],[-83.682861,38.616859],[-83.496078,38.702641],[-83.199463,38.625450],[-82.880836,38.736931],[-82.617180,38.496590],[-82.595200,38.401939],[-82.650131,38.169109],[-82.474358,37.952862],[-82.177719,37.588112],[-81.947006,37.518429],[-82.672112,37.125271],[-82.869873,36.932331],[-83.155510,36.782890],[-83.693840,36.597881],[-87.962029,36.646381],[-87.929070,36.606701],[-87.857658,36.483139],[-87.874138,36.496380],[-89.395752,36.518452],[-89.241928,36.993759],[-88.989243,37.204071],[-88.538795,37.028858],[-88.483871,37.291531],[-88.121330,37.439968],[-88.209221,37.701199]]] }, - { name:'Indiana', code:'in', borders:[[[-87.462158,41.771313],[-84.792480,41.771313],[-84.825439,39.121536],[-84.891357,39.044785],[-84.781494,38.839706],[-85.166016,38.694084],[-85.418701,38.745514],[-86.011963,37.935532],[-86.396484,38.186386],[-86.616211,37.900864],[-86.846924,38.004822],[-87.077637,37.909534],[-87.121582,37.788078],[-87.407227,37.961521],[-88.077393,37.926868],[-87.561035,38.754082],[-87.725830,39.155621],[-87.550049,39.402245],[-87.462158,41.771313]]] }, - { name:'Michigan', code:'mi', borders:[[[-89.538574,48.004623],[-89.143066,47.975212],[-88.439941,48.297813],[-84.814453,46.890232],[-84.550781,46.468132],[-84.221191,46.513515],[-84.111328,46.331757],[-83.935547,46.042736],[-83.649902,46.073231],[-83.474121,46.012222],[-83.583984,45.844109],[-82.507324,45.352146],[-82.133789,43.596306],[-82.507324,42.666279],[-83.078613,42.309814],[-83.100586,41.934978],[-83.342285,41.738529],[-87.451172,41.754921],[-87.077637,42.065605],[-87.121582,42.488300],[-87.033691,42.698586],[-87.165527,43.644024],[-86.704102,44.809120],[-86.220703,45.243954],[-86.726074,45.444717],[-87.121582,45.444717],[-87.451172,45.135555],[-87.736816,45.166546],[-87.736816,45.398449],[-87.956543,45.398449],[-87.758789,45.675484],[-88.110352,45.813484],[-88.066406,45.920586],[-88.791504,45.996964],[-90.109863,46.331757],[-90.285645,46.513515],[-90.461426,46.528633],[-89.538574,48.004623]]] }, - { name:'Ohio', code:'oh', borders:[[[-84.792465,41.759010],[-83.347771,41.746719],[-83.122551,41.918617],[-82.683098,41.689320],[-82.331543,41.705719],[-81.013184,42.228508],[-80.507812,42.309811],[-80.518791,40.526318],[-80.645142,40.534668],[-80.645142,40.400940],[-80.612183,40.279518],[-80.656120,40.166279],[-80.837402,39.690281],[-81.210930,39.402241],[-81.474602,39.351280],[-81.738281,39.181171],[-81.782219,38.925220],[-81.914062,38.891029],[-82.067871,39.010639],[-82.221680,38.736938],[-82.221680,38.599689],[-82.337029,38.444981],[-82.589722,38.432076],[-82.946770,38.745510],[-83.056641,38.672646],[-83.254387,38.634029],[-83.518066,38.719807],[-83.682861,38.616859],[-83.946526,38.796902],[-84.177246,38.784061],[-84.270630,38.933777],[-84.550781,39.078899],[-84.858391,39.104481],[-84.792465,41.759010]]] }, - { name:'Virginia', code:'va', borders:[[[-78.332520,39.453159],[-77.816162,39.138580],[-77.728271,39.317299],[-77.574463,39.300301],[-77.508545,39.121536],[-77.222900,38.993572],[-77.181702,38.908131],[-77.085571,38.876064],[-77.044373,38.805470],[-77.063599,38.760509],[-77.244873,38.573936],[-77.316284,38.496593],[-77.310791,38.384727],[-77.200928,38.289936],[-77.156982,38.315800],[-77.058105,38.376114],[-76.959229,38.246807],[-76.750488,38.151836],[-76.618652,38.151836],[-76.278076,37.883526],[-76.058350,37.961521],[-75.816650,37.909534],[-75.651855,37.970184],[-75.234375,38.048092],[-75.629883,37.657730],[-75.827637,37.230328],[-75.959473,37.099003],[-76.047363,37.300274],[-75.948486,37.640335],[-75.717773,37.926868],[-76.058350,37.961521],[-76.343994,37.883526],[-76.300049,37.614231],[-76.322021,37.527153],[-76.234131,37.335224],[-76.508789,37.247822],[-76.695557,37.212830],[-76.651611,37.037640],[-76.464844,36.870831],[-76.080322,36.932331],[-75.915527,36.738884],[-75.970459,36.562599],[-79.804688,36.544949],[-83.682861,36.606709],[-83.133545,36.809284],[-82.727051,37.107765],[-81.979980,37.509727],[-81.892090,37.309013],[-81.672363,37.186581],[-81.320801,37.326488],[-80.969238,37.291534],[-80.859375,37.431252],[-80.716553,37.378887],[-80.321045,37.509727],[-80.255127,37.649033],[-80.332031,37.718590],[-79.617920,38.556755],[-79.310303,38.436378],[-79.024658,38.831150],[-79.057617,38.942322],[-78.870850,38.788345],[-78.730774,38.931637],[-78.651123,38.965816],[-78.574219,39.019184],[-78.398438,39.234379],[-78.332520,39.453159]]] }, - { name:'Delaware', code:'de', borders:[[[-75.789185,39.719864],[-75.695801,39.816975],[-75.514526,39.842285],[-75.388184,39.816975],[-75.498047,39.698734],[-75.563965,39.622616],[-75.520020,39.576057],[-75.563965,39.457401],[-75.371704,39.279041],[-75.168457,39.057583],[-75.036621,38.792625],[-75.036621,38.444984],[-75.701294,38.457890],[-75.789185,39.719864]]] }, - { name:'Maryland', code:'md', borders:[[[-75.042107,38.444981],[-75.239861,38.043758],[-75.778191,37.922531],[-76.135254,37.965855],[-76.300041,37.896519],[-76.629631,38.151829],[-76.750481,38.147511],[-76.953728,38.246799],[-77.074577,38.384720],[-77.200920,38.302860],[-77.310791,38.384720],[-77.316277,38.505188],[-77.041618,38.801182],[-76.920776,38.843987],[-76.920776,38.916683],[-77.036133,39.010647],[-77.124023,38.959408],[-77.200920,38.972221],[-77.503052,39.117268],[-77.568962,39.300289],[-77.728271,39.317299],[-77.810661,39.155621],[-78.079826,39.287540],[-78.338013,39.465878],[-78.228142,39.681820],[-78.294060,39.631069],[-78.381950,39.622608],[-78.458862,39.559109],[-78.722527,39.571819],[-78.815910,39.626839],[-78.958740,39.465878],[-79.096062,39.453159],[-79.475090,39.219479],[-79.497063,39.719860],[-75.789177,39.715630],[-75.684807,38.453579],[-75.042107,38.444981]]] }, - { name:'Pennsylvania', code:'pa', borders:[[[-80.507812,42.317940],[-80.112305,42.374779],[-79.749756,42.504501],[-79.760742,42.000324],[-75.355225,41.992161],[-75.245361,41.845013],[-75.069580,41.820454],[-75.031128,41.685219],[-75.047607,41.607227],[-74.959717,41.459194],[-74.739990,41.442726],[-74.707031,41.310822],[-74.937744,41.095909],[-75.157471,41.029644],[-75.080566,40.847057],[-75.190430,40.605614],[-75.058594,40.421860],[-74.871826,40.271145],[-74.772949,40.162083],[-75.025635,39.968700],[-75.377197,39.808537],[-75.541992,39.825413],[-75.684814,39.816975],[-75.805664,39.698734],[-80.507812,39.715637],[-80.507812,42.317940]]] }, - { name:'New Jersey', code:'nj', borders:[[[-74.718018,41.368565],[-74.031372,41.029644],[-73.916016,40.988190],[-74.075317,40.630630],[-74.212646,40.530502],[-74.185181,40.488735],[-73.976440,40.392578],[-73.981934,40.233414],[-74.102783,40.006580],[-74.207153,39.766327],[-74.311523,39.588757],[-74.344482,39.402245],[-74.553223,39.300301],[-74.750977,39.061848],[-74.833374,38.942322],[-75.025635,38.963680],[-74.888306,39.138580],[-75.036621,39.210976],[-75.130005,39.181175],[-75.563965,39.470123],[-75.531006,39.571819],[-75.574951,39.626846],[-75.421143,39.795876],[-75.047607,39.964493],[-74.778442,40.178871],[-75.064087,40.405128],[-75.195923,40.609783],[-75.091553,40.847057],[-75.168457,41.025497],[-74.948730,41.095909],[-74.718018,41.368565]]] }, - { name:'New York', code:'ny', borders:[[[-73.377686,45.003651],[-73.410637,44.887009],[-73.377678,44.637390],[-73.300781,44.441620],[-73.432610,44.087582],[-73.443604,43.588341],[-73.289795,43.584370],[-73.267822,43.564472],[-73.289787,42.738937],[-73.498528,42.032970],[-73.564445,41.261292],[-73.696281,41.112457],[-73.575432,40.955009],[-71.949463,41.277798],[-71.696770,41.054501],[-73.322746,40.622288],[-73.861076,40.580578],[-74.124748,40.588921],[-73.937981,40.979889],[-74.718010,41.385048],[-74.739990,41.442719],[-74.937737,41.467419],[-75.069580,41.607220],[-75.069580,41.812260],[-75.245361,41.853188],[-75.344231,42.000320],[-79.760742,42.000320],[-79.749748,42.512600],[-78.925781,42.851799],[-78.903801,42.956421],[-79.046631,43.004639],[-79.013672,43.109001],[-79.057610,43.253201],[-79.211418,43.452911],[-78.771973,43.628120],[-76.794434,43.620171],[-76.431877,44.095470],[-76.146240,44.292400],[-75.827629,44.449459],[-75.212402,44.887009],[-75.003662,44.964790],[-74.816887,45.026939],[-73.377686,45.003651]]] }, - { name:'Connecticut', code:'ct', borders:[[[-71.817627,42.024815],[-71.839600,41.376808],[-71.894531,41.253033],[-72.487793,41.302570],[-72.938232,41.228249],[-73.542480,41.013065],[-73.729248,41.120747],[-73.575439,41.253033],[-73.487549,42.041134],[-71.817627,42.024815]]] }, - { name:'Rhode Island', code:'ri', borders:[[[-71.806641,42.016651],[-71.411133,42.024815],[-71.422119,41.918629],[-71.356201,41.787697],[-71.147461,41.640079],[-71.125488,41.475658],[-71.531982,41.393291],[-71.883545,41.261292],[-71.806641,42.016651]]] }, - { name:'Massachusetts', code:'ma', borders:[[[-73.322754,42.747009],[-71.301270,42.698578],[-71.136467,42.811520],[-70.894768,42.908161],[-70.795891,42.682430],[-70.609131,42.650120],[-70.806877,42.512600],[-71.015617,42.374767],[-70.971680,42.236649],[-70.587151,42.147110],[-70.729965,41.967648],[-70.543213,41.885918],[-70.411369,41.763107],[-70.048820,41.771309],[-70.059807,41.967648],[-70.224602,42.041130],[-70.191643,42.098221],[-69.949951,41.975819],[-69.960930,41.754917],[-69.873039,41.631859],[-70.191643,41.623650],[-70.433350,41.582581],[-71.125481,41.475651],[-71.158440,41.640072],[-71.367180,41.812260],[-71.433098,42.016647],[-73.520500,42.041130],[-73.322754,42.747009]]] }, - { name:'New Hampshire', code:'nh', borders:[[[-71.630859,44.762337],[-71.510002,45.011410],[-71.378166,45.267151],[-71.268311,45.298069],[-71.059563,45.305798],[-70.971680,43.365120],[-70.708000,43.084930],[-70.894768,42.908161],[-71.323242,42.706650],[-72.564697,42.747009],[-72.487793,42.976521],[-72.443848,43.040791],[-72.443848,43.153103],[-72.333984,43.679790],[-72.169189,43.874138],[-72.092285,44.063908],[-71.993408,44.331707],[-71.597900,44.496506],[-71.630859,44.762337]]] }, - { name:'Maine', code:'me', borders:[[[-71.048584,45.321255],[-70.927734,45.321255],[-70.861816,45.220741],[-70.806885,45.421589],[-70.620117,45.390736],[-70.773926,45.544830],[-70.400391,45.721523],[-70.411377,45.805828],[-70.235596,45.943512],[-70.323486,46.073231],[-70.235596,46.164616],[-70.323486,46.233051],[-70.037842,46.384834],[-70.037842,46.687130],[-69.246826,47.435516],[-69.027100,47.428085],[-69.071045,47.279228],[-68.917236,47.174778],[-68.620605,47.249405],[-68.367920,47.368595],[-68.027344,47.256863],[-67.796631,47.055153],[-67.774658,46.807579],[-67.774658,45.943512],[-67.796631,45.690830],[-67.456055,45.598667],[-67.467041,45.437008],[-67.478027,45.282616],[-67.368164,45.120052],[-67.159424,45.205261],[-67.038574,44.988113],[-66.961670,44.824707],[-67.225342,44.613934],[-68.422852,44.260937],[-68.697510,44.158562],[-68.807373,44.488667],[-68.994141,44.410240],[-69.071045,44.158562],[-69.191895,43.953281],[-69.378662,43.984909],[-69.488525,43.834526],[-69.862061,43.707596],[-69.971924,43.842449],[-70.147705,43.779026],[-70.455322,43.373112],[-70.718994,43.068890],[-70.993652,43.381100],[-71.048584,45.321255]]] }, - { name:'Alaska', code:'ak', borders:[[[-178.154297,51.645294],[-173.979492,52.025459],[-168.925781,52.908901],[-163.872070,54.444492],[-157.192383,56.680374],[-153.369141,58.904644],[-151.831055,60.780621],[-150.732422,61.227959],[-149.985352,61.185623],[-149.853516,60.909073],[-150.644531,60.930431],[-151.303711,60.737686],[-151.831055,59.844814],[-151.303711,59.601093],[-151.962891,59.422726],[-151.567383,59.198441],[-150.732422,59.445076],[-149.458008,60.020950],[-148.623047,60.500526],[-148.447266,60.500526],[-148.315430,59.955009],[-151.787109,59.175926],[-154.731445,57.468590],[-154.248047,56.704506],[-152.182617,57.562996],[-152.402344,58.401711],[-152.622070,58.654083],[-151.083984,59.333187],[-148.051758,60.694695],[-146.865234,61.015724],[-144.711914,60.305183],[-143.920898,59.998985],[-140.976562,59.689926],[-139.482422,59.422726],[-136.186523,57.704147],[-134.956055,56.559483],[-132.802734,54.724621],[-130.693359,54.749992],[-130.034180,55.304138],[-130.122070,56.145550],[-131.791992,56.704506],[-132.451172,57.468590],[-133.593750,58.562523],[-135.351562,59.689926],[-136.450195,59.623325],[-137.416992,58.927334],[-138.867188,59.932999],[-139.174805,60.305183],[-140.976562,60.326946],[-140.976562,69.641800],[-143.173828,70.095528],[-145.019531,70.035599],[-146.030273,70.214874],[-148.754883,70.436798],[-150.996094,70.451508],[-151.918945,70.451508],[-152.358398,70.627197],[-152.314453,70.859085],[-154.116211,70.887886],[-154.599609,70.974030],[-155.126953,71.145195],[-156.665039,71.314873],[-157.719727,70.916641],[-159.389648,70.815811],[-161.455078,70.229744],[-161.938477,70.259453],[-163.212891,69.733330],[-163.300781,69.162560],[-164.794922,68.926811],[-166.113281,68.863518],[-166.596680,68.301903],[-163.784180,67.169952],[-162.377930,66.964478],[-162.114258,66.652977],[-161.938477,66.213737],[-163.168945,66.035873],[-163.916016,66.160507],[-163.872070,66.635551],[-167.958984,65.658272],[-166.728516,65.256706],[-166.245117,64.567322],[-165.058594,64.453850],[-162.993164,64.453850],[-161.235352,64.942162],[-160.927734,64.529549],[-160.971680,63.801891],[-161.103516,63.607216],[-162.246094,63.568119],[-163.256836,63.054958],[-164.311523,63.233627],[-164.838867,62.754726],[-166.069336,61.669025],[-165.410156,61.058285],[-165.498047,60.500526],[-167.167969,60.152443],[-166.464844,59.822731],[-165.761719,59.955009],[-166.025391,60.478878],[-165.190430,60.543774],[-164.135742,59.866882],[-162.509766,59.977005],[-161.894531,59.512028],[-161.806641,58.608334],[-160.488281,58.927334],[-159.697266,58.836491],[-158.994141,58.355629],[-158.774414,58.836491],[-157.060547,58.904644],[-159.653320,56.559483],[-164.750977,54.901882],[-164.926758,54.597527],[-165.058594,54.572063],[-173.496094,52.160454],[-178.154297,51.645294]]] }, - { name:'Hawaii', code:'hi', borders:[[[-160.164185,21.937950],[-160.252075,21.825808],[-160.208130,21.769703],[-160.087280,21.897181],[-160.059814,21.973614],[-159.807129,22.009268],[-159.455566,21.881889],[-159.356689,21.943045],[-158.285522,21.565500],[-158.208618,21.453068],[-158.137207,21.330315],[-158.021851,21.289373],[-157.868042,21.294493],[-157.697754,21.284254],[-157.631836,21.299610],[-157.335205,21.125498],[-157.258301,21.074247],[-156.879272,21.043489],[-157.038574,20.920397],[-157.022095,20.828009],[-156.983643,20.735565],[-156.857300,20.740702],[-156.780396,20.807472],[-156.643066,20.828009],[-156.472778,20.750977],[-156.450806,20.648205],[-156.719971,20.524788],[-156.643066,20.504210],[-156.538696,20.519644],[-156.544189,20.607079],[-156.417847,20.679045],[-156.423340,20.601934],[-156.280518,20.607079],[-155.901489,20.190035],[-155.835571,20.014645],[-155.928955,19.880392],[-155.994873,19.828724],[-156.077271,19.766705],[-155.950928,19.518373],[-155.906982,19.362974],[-155.917969,19.119219],[-155.846558,19.004995],[-155.670776,18.901089],[-155.593872,18.994610],[-155.489502,19.139978],[-155.385132,19.217802],[-155.148926,19.285219],[-155.050049,19.321510],[-154.797363,19.487307],[-154.934692,19.585669],[-155.000610,19.740852],[-155.083008,19.787378],[-155.104980,19.859726],[-155.258789,20.035290],[-155.555420,20.112680],[-155.725708,20.184877],[-155.808105,20.262197],[-155.885010,20.267349],[-155.890503,20.179724],[-156.313477,20.601934],[-156.104736,20.627642],[-155.989380,20.704739],[-155.967407,20.776657],[-156.126709,20.874210],[-156.258545,20.930658],[-156.395874,20.930658],[-156.494751,20.925528],[-156.610107,21.017855],[-156.665039,20.976828],[-156.692505,20.863945],[-156.577148,20.802338],[-156.813354,20.822874],[-156.857300,20.879341],[-156.945190,20.915264],[-156.983643,20.935787],[-156.802368,21.058870],[-156.725464,21.151115],[-156.884766,21.166485],[-156.972656,21.197216],[-157.082520,21.192095],[-157.241821,21.227942],[-157.335205,21.135744],[-157.675781,21.320080],[-157.807617,21.427504],[-157.873535,21.575718],[-157.922974,21.652323],[-157.994385,21.693159],[-158.098755,21.611471],[-158.247070,21.539957],[-159.406128,21.953236],[-159.334717,22.004175],[-159.279785,22.095819],[-159.329224,22.212833],[-159.439087,22.233173],[-159.587402,22.207748],[-159.708252,22.156883],[-159.774170,22.075459],[-159.746704,21.993988],[-160.098267,21.999083],[-160.164185,21.937950]]] }, - { name:'Vermont', code:'vt', borders:[[[-73.355713,44.999767],[-71.510010,45.015301],[-71.647339,44.762337],[-71.603394,44.504341],[-72.004395,44.331707],[-72.114258,44.000717],[-72.196655,43.826599],[-72.333984,43.707596],[-72.421875,43.281204],[-72.465820,43.032761],[-72.564697,42.751045],[-73.289795,42.747009],[-73.278809,43.580391],[-73.449097,43.600285],[-73.427124,44.091530],[-73.300781,44.441624],[-73.383179,44.645206],[-73.416138,44.879227],[-73.355713,44.999767]]] } -]; - -/* Convert the state borders to latlng. */ -states.forEach(function(s) { - s.borders.forEach(function(b) { - b.forEach(function(p, i) { - b[i] = {lat: p[1], lng: p[0]}; - }); - }); -}); diff --git a/lib/protovis/tests/heatmap.js b/lib/protovis/tests/heatmap.js deleted file mode 100644 index e6494a13..00000000 --- a/lib/protovis/tests/heatmap.js +++ /dev/null @@ -1,63 +0,0 @@ -var heatmap = [ -[103, 104, 104, 105, 105, 106, 106, 106, 107, 107, 106, 106, 105, 105, 104, 104, 104, 104, 105, 107, 107, 106, 105, 105, 107, 108, 109, 110, 110, 110, 110, 110, 110, 109, 109, 109, 109, 109, 109, 108, 107, 107, 107, 107, 106, 106, 105, 104, 104, 104, 104, 104, 104, 104, 103, 103, 103, 103, 102, 102, 101, 101, 100, 100, 100, 100, 100, 99, 98, 97, 97, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 94, 94, 94, 94, 94, 94], -[104, 104, 105, 105, 106, 106, 107, 107, 107, 107, 107, 107, 107, 106, 106, 106, 106, 106, 106, 108, 108, 108, 106, 106, 108, 109, 110, 110, 112, 112, 113, 112, 111, 110, 110, 110, 110, 109, 109, 109, 108, 107, 107, 107, 107, 106, 106, 105, 104, 104, 104, 104, 104, 104, 104, 103, 103, 103, 103, 102, 102, 101, 101, 100, 100, 100, 100, 99, 99, 98, 97, 97, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 94, 94, 94, 94, 94], -[104, 105, 105, 106, 106, 107, 107, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, 110, 110, 110, 110, 110, 110, 110, 111, 113, 115, 116, 115, 113, 112, 110, 110, 110, 110, 110, 110, 109, 108, 108, 108, 108, 107, 106, 105, 105, 105, 105, 105, 105, 104, 104, 104, 104, 103, 103, 103, 102, 102, 102, 101, 100, 100, 100, 99, 99, 98, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 94, 94, 94, 94, 94], -[105, 105, 106, 106, 107, 107, 108, 108, 109, 109, 109, 109, 109, 110, 110, 110, 110, 110, 110, 110, 111, 112, 115, 115, 115, 115, 115, 116, 116, 117, 119, 118, 117, 116, 114, 113, 112, 110, 110, 110, 110, 110, 110, 109, 109, 108, 107, 106, 106, 106, 106, 106, 105, 105, 105, 104, 104, 104, 103, 103, 103, 102, 102, 102, 101, 100, 100, 99, 99, 98, 97, 97, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 94, 94, 94, 94, 94], -[105, 106, 106, 107, 107, 108, 108, 109, 109, 110, 110, 110, 110, 111, 110, 110, 110, 110, 111, 114, 115, 116, 121, 121, 121, 121, 121, 122, 123, 124, 124, 123, 121, 119, 118, 117, 115, 114, 112, 111, 110, 110, 110, 110, 110, 110, 109, 109, 108, 109, 107, 107, 106, 106, 105, 105, 104, 104, 104, 104, 103, 103, 102, 102, 102, 101, 100, 100, 99, 99, 98, 97, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 94, 94, 94, 94, 94], -[106, 106, 107, 107, 107, 108, 109, 109, 110, 110, 111, 111, 112, 113, 112, 111, 111, 112, 115, 118, 118, 119, 126, 128, 128, 127, 128, 128, 129, 130, 129, 128, 127, 125, 122, 120, 118, 117, 115, 114, 112, 110, 110, 110, 110, 110, 111, 110, 110, 110, 109, 109, 108, 107, 106, 105, 105, 105, 104, 104, 104, 103, 103, 102, 102, 102, 101, 100, 99, 99, 98, 97, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 94, 94, 94, 94, 94], -[106, 107, 107, 108, 108, 108, 109, 110, 110, 111, 112, 113, 114, 115, 114, 115, 116, 116, 119, 123, 125, 130, 133, 134, 134, 134, 134, 135, 135, 136, 135, 134, 132, 130, 128, 124, 121, 119, 118, 116, 114, 112, 111, 111, 111, 112, 112, 111, 110, 110, 110, 109, 108, 108, 107, 108, 107, 106, 105, 104, 104, 104, 103, 103, 103, 102, 101, 100, 99, 99, 98, 97, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 94, 94, 94, 94], -[107, 107, 108, 108, 109, 109, 110, 110, 112, 113, 114, 115, 116, 117, 117, 120, 120, 121, 123, 129, 134, 136, 138, 139, 139, 139, 140, 142, 142, 141, 141, 140, 137, 134, 131, 127, 124, 122, 120, 118, 117, 115, 113, 114, 113, 114, 114, 113, 112, 111, 110, 110, 109, 108, 107, 106, 105, 105, 105, 104, 104, 104, 103, 103, 103, 101, 100, 100, 99, 99, 98, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 94, 94, 94, 94], -[107, 108, 108, 109, 109, 110, 111, 112, 114, 115, 116, 117, 118, 119, 121, 125, 125, 127, 131, 136, 140, 141, 142, 144, 144, 145, 148, 149, 148, 147, 146, 144, 140, 138, 136, 130, 127, 125, 123, 121, 119, 118, 117, 117, 116, 116, 116, 115, 114, 113, 113, 111, 110, 109, 108, 107, 106, 105, 105, 103, 103, 102, 102, 102, 103, 101, 100, 100, 100, 99, 98, 98, 97, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 94, 94, 94], -[107, 108, 109, 109, 110, 110, 110, 113, 115, 117, 118, 119, 120, 123, 126, 129, 131, 134, 139, 142, 144, 145, 147, 148, 150, 152, 154, 154, 153, 154, 151, 149, 146, 143, 140, 136, 130, 128, 126, 124, 122, 121, 120, 119, 118, 117, 117, 117, 116, 116, 115, 113, 112, 110, 109, 108, 107, 106, 106, 105, 104, 103, 102, 101, 101, 100, 100, 100, 100, 99, 99, 98, 97, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 94, 94, 94], -[107, 108, 109, 109, 110, 110, 110, 112, 115, 117, 119, 122, 125, 127, 130, 133, 137, 141, 143, 145, 148, 149, 152, 155, 157, 159, 160, 160, 161, 162, 159, 156, 153, 149, 146, 142, 139, 134, 130, 128, 126, 125, 122, 120, 120, 120, 119, 119, 119, 118, 117, 115, 113, 111, 110, 110, 109, 108, 107, 106, 106, 105, 104, 104, 103, 102, 100, 100, 100, 99, 99, 98, 97, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 95, 94, 94], -[108, 108, 109, 109, 110, 110, 110, 112, 115, 118, 121, 125, 128, 131, 134, 138, 141, 145, 147, 149, 152, 157, 160, 161, 163, 166, 169, 170, 170, 171, 168, 162, 158, 155, 152, 148, 144, 140, 136, 132, 129, 127, 124, 122, 121, 120, 120, 120, 120, 120, 119, 117, 115, 113, 110, 110, 110, 110, 109, 108, 108, 107, 107, 106, 105, 104, 102, 100, 100, 100, 99, 98, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 94, 94], -[108, 109, 109, 110, 110, 111, 112, 114, 117, 120, 124, 128, 131, 135, 138, 142, 145, 149, 152, 155, 158, 163, 166, 167, 170, 173, 175, 175, 175, 173, 171, 169, 164, 160, 156, 153, 149, 144, 140, 136, 131, 129, 126, 124, 123, 123, 122, 121, 120, 120, 120, 119, 117, 115, 111, 110, 110, 110, 110, 110, 109, 109, 110, 109, 108, 106, 103, 101, 100, 100, 100, 98, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 95, 94], -[108, 109, 110, 110, 110, 113, 114, 116, 119, 122, 126, 131, 134, 138, 141, 145, 149, 152, 156, 160, 164, 169, 171, 174, 177, 175, 178, 179, 177, 175, 174, 172, 168, 163, 160, 157, 151, 147, 143, 138, 133, 130, 128, 125, 125, 124, 123, 122, 121, 121, 120, 120, 118, 116, 115, 111, 110, 110, 110, 110, 113, 114, 113, 112, 110, 107, 105, 102, 100, 100, 100, 98, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 94], -[108, 109, 110, 110, 112, 115, 116, 118, 122, 125, 129, 133, 137, 140, 144, 149, 152, 157, 161, 165, 169, 173, 176, 179, 179, 180, 180, 180, 178, 178, 176, 175, 171, 165, 163, 160, 153, 148, 143, 139, 135, 132, 129, 128, 127, 125, 124, 124, 123, 123, 122, 122, 120, 118, 117, 118, 115, 117, 118, 118, 119, 117, 116, 115, 112, 109, 107, 105, 100, 100, 100, 100, 97, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95, 95], -[108, 109, 110, 111, 114, 116, 118, 122, 127, 130, 133, 136, 140, 144, 148, 153, 157, 161, 165, 169, 173, 177, 180, 180, 180, 180, 181, 180, 180, 180, 179, 178, 173, 168, 165, 161, 156, 149, 143, 139, 136, 133, 130, 129, 128, 126, 126, 125, 125, 125, 125, 124, 122, 121, 120, 120, 120, 120, 121, 122, 123, 122, 120, 117, 114, 111, 108, 106, 105, 100, 100, 100, 100, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95, 95], -[107, 108, 110, 113, 115, 118, 121, 126, 131, 134, 137, 140, 143, 148, 152, 157, 162, 165, 169, 173, 177, 181, 181, 181, 180, 181, 181, 181, 180, 180, 180, 178, 176, 170, 167, 163, 158, 152, 145, 140, 137, 134, 132, 130, 129, 127, 127, 126, 127, 128, 128, 126, 125, 125, 125, 123, 126, 128, 129, 130, 130, 125, 124, 119, 116, 114, 112, 110, 107, 106, 105, 100, 100, 100, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 96, 95, 95], -[107, 109, 111, 116, 119, 122, 125, 130, 135, 137, 140, 144, 148, 152, 156, 161, 165, 168, 172, 177, 181, 184, 181, 181, 181, 180, 180, 180, 180, 180, 180, 178, 178, 173, 168, 163, 158, 152, 146, 141, 138, 136, 134, 132, 130, 129, 128, 128, 130, 130, 130, 129, 128, 129, 129, 130, 132, 133, 133, 134, 134, 132, 128, 122, 119, 116, 114, 112, 108, 106, 105, 105, 100, 100, 100, 97, 97, 97, 97, 97, 97, 97, 96, 96, 96, 96, 95], -[108, 110, 112, 117, 122, 126, 129, 135, 139, 141, 144, 149, 153, 156, 160, 165, 168, 171, 177, 181, 184, 185, 182, 180, 180, 179, 178, 178, 180, 179, 179, 178, 176, 173, 168, 163, 157, 152, 148, 143, 139, 137, 135, 133, 131, 130, 130, 131, 132, 132, 132, 131, 132, 132, 133, 134, 136, 137, 137, 137, 136, 134, 131, 124, 121, 118, 116, 114, 111, 109, 107, 106, 105, 100, 100, 100, 97, 97, 97, 97, 97, 97, 97, 96, 96, 96, 96], -[108, 110, 114, 120, 126, 129, 134, 139, 142, 144, 146, 152, 158, 161, 164, 168, 171, 175, 181, 184, 186, 186, 183, 179, 178, 178, 177, 175, 178, 177, 177, 176, 175, 173, 168, 162, 156, 153, 149, 145, 142, 140, 138, 136, 133, 132, 132, 132, 134, 134, 134, 134, 135, 136, 137, 138, 140, 140, 140, 140, 139, 137, 133, 127, 123, 120, 118, 115, 112, 108, 108, 106, 106, 105, 100, 100, 100, 98, 98, 98, 98, 98, 98, 97, 96, 96, 96], -[108, 110, 116, 122, 128, 133, 137, 141, 143, 146, 149, 154, 161, 165, 168, 172, 175, 180, 184, 188, 189, 187, 182, 178, 176, 176, 175, 173, 174, 173, 175, 174, 173, 171, 168, 161, 157, 154, 150, 148, 145, 143, 141, 138, 135, 135, 134, 135, 135, 136, 136, 137, 138, 139, 140, 140, 140, 140, 140, 140, 140, 139, 135, 130, 126, 123, 120, 117, 114, 111, 109, 108, 107, 106, 105, 100, 100, 100, 99, 99, 98, 98, 98, 98, 97, 97, 96], -[110, 112, 118, 124, 130, 135, 139, 142, 145, 148, 151, 157, 163, 169, 172, 176, 179, 183, 187, 190, 190, 186, 180, 177, 175, 173, 170, 169, 169, 170, 171, 172, 170, 170, 167, 163, 160, 157, 154, 152, 149, 147, 144, 140, 137, 137, 136, 137, 138, 138, 139, 140, 141, 140, 140, 140, 140, 140, 140, 140, 140, 138, 134, 131, 128, 124, 121, 118, 115, 112, 110, 109, 108, 107, 106, 105, 100, 100, 100, 99, 99, 99, 98, 98, 98, 97, 97], -[110, 114, 120, 126, 131, 136, 140, 143, 146, 149, 154, 159, 166, 171, 177, 180, 182, 186, 190, 190, 190, 185, 179, 174, 171, 168, 166, 163, 164, 163, 166, 169, 170, 170, 168, 164, 162, 161, 158, 155, 153, 150, 147, 143, 139, 139, 139, 139, 140, 141, 141, 142, 142, 141, 140, 140, 140, 140, 140, 140, 140, 137, 134, 131, 128, 125, 122, 119, 116, 114, 112, 110, 109, 109, 108, 107, 105, 100, 100, 100, 99, 99, 99, 98, 98, 97, 97], -[110, 115, 121, 127, 132, 136, 140, 144, 148, 151, 157, 162, 169, 174, 178, 181, 186, 188, 190, 191, 190, 184, 177, 172, 168, 165, 162, 159, 158, 158, 159, 161, 166, 167, 169, 166, 164, 163, 161, 159, 156, 153, 149, 146, 142, 142, 141, 142, 143, 143, 143, 143, 144, 142, 141, 140, 140, 140, 140, 140, 140, 138, 134, 131, 128, 125, 123, 120, 117, 116, 114, 112, 110, 109, 108, 107, 106, 105, 102, 101, 100, 99, 99, 99, 98, 98, 97], -[110, 116, 121, 127, 132, 136, 140, 144, 148, 154, 160, 166, 171, 176, 180, 184, 189, 190, 191, 191, 191, 183, 176, 170, 166, 163, 159, 156, 154, 155, 155, 158, 161, 165, 170, 167, 166, 165, 163, 161, 158, 155, 152, 150, 146, 145, 145, 145, 146, 146, 144, 145, 145, 144, 142, 141, 140, 140, 140, 140, 138, 136, 134, 131, 128, 125, 123, 121, 119, 117, 115, 113, 112, 111, 111, 110, 108, 106, 105, 102, 100, 100, 99, 99, 99, 98, 98], -[110, 114, 119, 126, 131, 135, 140, 144, 149, 158, 164, 168, 172, 176, 183, 184, 189, 190, 191, 191, 190, 183, 174, 169, 165, 161, 158, 154, 150, 151, 152, 155, 159, 164, 168, 168, 168, 167, 165, 163, 160, 158, 155, 153, 150, 148, 148, 148, 148, 148, 147, 146, 146, 145, 143, 142, 141, 140, 139, 138, 136, 134, 132, 131, 128, 126, 124, 122, 120, 118, 116, 114, 113, 113, 112, 111, 108, 107, 106, 105, 104, 102, 100, 99, 99, 99, 99], -[110, 113, 119, 125, 131, 136, 141, 145, 150, 158, 164, 168, 172, 177, 183, 187, 189, 191, 192, 191, 190, 183, 174, 168, 164, 160, 157, 153, 150, 149, 150, 154, 158, 162, 166, 170, 170, 168, 166, 164, 162, 160, 158, 155, 152, 151, 151, 151, 151, 151, 149, 148, 147, 146, 145, 143, 142, 140, 139, 137, 135, 134, 132, 131, 129, 127, 125, 123, 121, 119, 117, 116, 114, 114, 113, 112, 110, 108, 107, 105, 103, 100, 100, 100, 100, 99, 99], -[110, 112, 118, 124, 130, 136, 142, 146, 151, 157, 163, 168, 174, 178, 183, 187, 189, 190, 191, 192, 189, 182, 174, 168, 164, 160, 157, 153, 149, 148, 149, 153, 157, 161, 167, 170, 170, 170, 168, 166, 165, 163, 159, 156, 154, 153, 155, 155, 155, 155, 152, 150, 149, 147, 145, 143, 141, 140, 139, 138, 136, 134, 133, 131, 130, 128, 126, 124, 122, 120, 119, 117, 116, 115, 114, 113, 111, 110, 107, 106, 105, 105, 102, 101, 100, 100, 100], -[110, 111, 116, 122, 129, 137, 142, 146, 151, 158, 164, 168, 172, 179, 183, 186, 189, 190, 192, 193, 188, 182, 174, 168, 164, 161, 157, 154, 151, 149, 151, 154, 158, 161, 167, 170, 170, 170, 170, 169, 168, 166, 160, 157, 156, 156, 157, 158, 159, 159, 156, 153, 150, 148, 146, 144, 141, 140, 140, 138, 136, 135, 134, 133, 131, 129, 127, 125, 123, 122, 120, 118, 117, 116, 115, 114, 112, 111, 110, 108, 107, 106, 105, 104, 102, 100, 100], -[108, 110, 115, 121, 131, 137, 142, 147, 152, 159, 163, 167, 170, 177, 182, 184, 187, 189, 192, 194, 189, 183, 174, 169, 165, 161, 158, 156, 154, 153, 154, 157, 160, 164, 167, 171, 172, 174, 174, 173, 171, 168, 161, 159, 158, 158, 159, 161, 161, 160, 158, 155, 151, 149, 147, 144, 142, 141, 140, 138, 137, 136, 135, 134, 132, 130, 128, 126, 125, 123, 121, 119, 118, 117, 116, 115, 113, 112, 112, 111, 110, 109, 108, 107, 105, 101, 100], -[108, 110, 114, 120, 128, 134, 140, 146, 152, 158, 162, 166, 169, 175, 180, 183, 186, 189, 193, 195, 190, 184, 176, 171, 167, 163, 160, 158, 157, 156, 157, 159, 163, 166, 170, 174, 176, 178, 178, 176, 172, 167, 164, 161, 161, 160, 161, 163, 163, 163, 160, 157, 153, 150, 148, 146, 144, 142, 141, 140, 139, 138, 136, 135, 134, 133, 129, 127, 126, 124, 122, 121, 119, 118, 117, 116, 114, 113, 112, 111, 110, 110, 109, 109, 107, 104, 100], -[107, 110, 115, 119, 123, 129, 135, 141, 146, 156, 161, 165, 168, 173, 179, 182, 186, 189, 193, 194, 191, 184, 179, 175, 170, 166, 162, 161, 160, 160, 161, 162, 165, 169, 172, 176, 178, 179, 179, 176, 172, 168, 165, 163, 163, 163, 163, 165, 166, 164, 161, 158, 155, 152, 150, 147, 146, 144, 143, 142, 141, 139, 139, 138, 137, 135, 131, 128, 127, 125, 124, 122, 121, 119, 118, 116, 115, 113, 112, 111, 111, 110, 110, 109, 109, 105, 100], -[107, 110, 114, 117, 121, 126, 130, 135, 142, 151, 159, 163, 167, 171, 177, 182, 185, 189, 192, 193, 191, 187, 183, 179, 174, 169, 167, 166, 164, 164, 165, 166, 169, 171, 174, 178, 179, 180, 180, 178, 173, 169, 166, 165, 165, 166, 165, 168, 169, 166, 163, 159, 157, 154, 152, 149, 148, 147, 146, 145, 143, 142, 141, 140, 139, 138, 133, 130, 128, 127, 125, 124, 122, 120, 118, 117, 115, 112, 111, 111, 111, 111, 110, 109, 108, 106, 100], -[107, 109, 113, 118, 122, 126, 129, 134, 139, 150, 156, 160, 165, 170, 175, 181, 184, 188, 191, 192, 192, 189, 185, 181, 177, 173, 171, 169, 168, 167, 169, 170, 172, 174, 176, 178, 179, 180, 180, 179, 175, 170, 168, 166, 166, 168, 168, 170, 170, 168, 164, 160, 158, 155, 152, 151, 150, 149, 149, 148, 147, 145, 144, 143, 142, 141, 136, 133, 130, 129, 127, 125, 123, 120, 119, 118, 115, 112, 111, 111, 111, 110, 109, 109, 109, 105, 100], -[105, 107, 111, 117, 121, 124, 127, 131, 137, 148, 154, 159, 164, 168, 174, 181, 184, 187, 190, 191, 191, 190, 187, 184, 180, 178, 175, 174, 172, 171, 173, 173, 173, 176, 178, 179, 180, 180, 180, 179, 175, 170, 168, 166, 168, 169, 170, 170, 170, 170, 166, 161, 158, 156, 154, 153, 151, 150, 150, 150, 150, 148, 147, 146, 145, 143, 139, 135, 133, 131, 129, 126, 124, 121, 120, 118, 114, 111, 111, 111, 110, 110, 109, 107, 106, 104, 100], -[104, 106, 110, 114, 118, 121, 125, 129, 135, 142, 150, 157, 162, 167, 173, 180, 183, 186, 188, 190, 190, 190, 189, 184, 183, 181, 180, 179, 179, 176, 177, 176, 176, 177, 178, 179, 180, 180, 179, 177, 173, 169, 167, 166, 167, 169, 170, 170, 170, 170, 167, 161, 159, 157, 155, 153, 151, 150, 150, 150, 150, 150, 150, 149, 147, 145, 141, 138, 135, 133, 130, 127, 125, 123, 121, 118, 113, 111, 110, 110, 109, 109, 107, 106, 105, 103, 100], -[104, 106, 108, 111, 115, 119, 123, 128, 134, 141, 148, 154, 161, 166, 172, 179, 182, 184, 186, 189, 190, 190, 190, 187, 185, 183, 180, 180, 180, 179, 179, 177, 176, 177, 178, 178, 178, 177, 176, 174, 171, 168, 166, 164, 166, 168, 170, 170, 170, 170, 168, 162, 159, 157, 155, 153, 151, 150, 150, 150, 150, 150, 150, 150, 150, 148, 144, 140, 137, 134, 132, 129, 127, 125, 122, 117, 111, 110, 107, 107, 106, 105, 104, 103, 102, 101, 100], -[103, 105, 107, 110, 114, 118, 122, 127, 132, 140, 146, 153, 159, 165, 171, 176, 180, 183, 185, 186, 189, 190, 188, 187, 184, 182, 180, 180, 180, 179, 178, 176, 176, 176, 176, 174, 174, 173, 172, 170, 168, 167, 165, 163, 164, 165, 169, 170, 170, 170, 166, 162, 159, 157, 155, 153, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150, 146, 142, 139, 136, 133, 131, 128, 125, 122, 117, 110, 108, 106, 105, 104, 103, 103, 101, 101, 101, 101], -[102, 103, 106, 108, 112, 116, 121, 125, 130, 138, 145, 151, 157, 163, 170, 174, 178, 181, 181, 184, 186, 186, 187, 186, 184, 181, 180, 180, 180, 179, 178, 174, 173, 173, 171, 170, 170, 169, 168, 167, 166, 164, 163, 162, 161, 164, 167, 169, 170, 168, 164, 160, 158, 157, 155, 153, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150, 147, 144, 141, 138, 135, 133, 128, 125, 122, 116, 109, 107, 104, 104, 103, 102, 101, 101, 101, 101, 101], -[101, 102, 105, 107, 110, 115, 120, 124, 129, 136, 143, 149, 155, 162, 168, 170, 174, 176, 178, 179, 181, 182, 184, 184, 183, 181, 180, 180, 179, 177, 174, 172, 170, 168, 166, 165, 164, 164, 164, 164, 162, 160, 159, 159, 158, 160, 162, 164, 166, 166, 163, 159, 157, 156, 155, 153, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150, 149, 146, 143, 140, 137, 133, 129, 124, 119, 112, 108, 105, 103, 103, 102, 101, 101, 101, 101, 100, 100], -[101, 102, 104, 106, 109, 113, 118, 122, 127, 133, 141, 149, 155, 161, 165, 168, 170, 172, 175, 176, 177, 179, 181, 181, 181, 180, 180, 179, 177, 174, 171, 167, 165, 163, 161, 160, 160, 160, 160, 160, 157, 155, 155, 154, 154, 155, 157, 159, 161, 161, 161, 159, 156, 154, 154, 153, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150, 149, 147, 144, 141, 137, 133, 129, 123, 116, 110, 107, 104, 102, 102, 101, 101, 101, 100, 100, 100, 100], -[102, 103, 104, 106, 108, 112, 116, 120, 125, 129, 137, 146, 154, 161, 163, 165, 166, 169, 172, 173, 174, 175, 177, 178, 178, 178, 178, 177, 174, 171, 168, 164, 160, 158, 157, 157, 156, 156, 156, 155, 152, 151, 150, 150, 151, 151, 152, 154, 156, 157, 157, 156, 155, 153, 152, 152, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 147, 144, 141, 138, 133, 127, 120, 113, 109, 106, 103, 101, 101, 101, 100, 100, 100, 100, 100, 100], -[103, 104, 105, 106, 108, 110, 114, 118, 123, 127, 133, 143, 150, 156, 160, 160, 161, 162, 167, 170, 171, 172, 173, 175, 175, 174, 174, 173, 171, 168, 164, 160, 156, 155, 154, 153, 153, 152, 152, 150, 149, 148, 148, 148, 148, 148, 149, 149, 150, 152, 152, 152, 152, 151, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 149, 147, 144, 141, 138, 132, 125, 118, 111, 108, 105, 103, 102, 101, 101, 101, 100, 100, 100, 100, 100], -[104, 105, 106, 107, 108, 110, 113, 117, 120, 125, 129, 138, 145, 151, 156, 156, 157, 158, 160, 164, 166, 168, 170, 171, 172, 171, 171, 169, 166, 163, 160, 156, 153, 151, 150, 150, 149, 149, 149, 148, 146, 146, 146, 146, 146, 146, 146, 147, 148, 148, 149, 149, 149, 148, 148, 148, 148, 149, 149, 150, 150, 150, 150, 150, 150, 150, 148, 146, 143, 141, 136, 129, 123, 117, 110, 108, 105, 104, 103, 102, 102, 101, 101, 100, 100, 100, 100], -[103, 104, 105, 106, 107, 109, 111, 115, 118, 122, 127, 133, 140, 143, 150, 152, 153, 155, 157, 159, 162, 164, 167, 168, 168, 168, 167, 166, 163, 160, 157, 153, 150, 148, 148, 147, 147, 147, 145, 145, 144, 143, 143, 143, 144, 144, 144, 144, 145, 145, 145, 145, 146, 146, 146, 146, 146, 147, 147, 148, 149, 150, 150, 150, 150, 149, 147, 145, 143, 141, 134, 127, 123, 117, 111, 108, 105, 105, 104, 104, 103, 103, 102, 101, 100, 100, 100], -[102, 103, 104, 105, 106, 107, 109, 113, 116, 120, 125, 129, 133, 137, 143, 147, 149, 151, 152, 154, 158, 161, 164, 165, 164, 164, 163, 163, 160, 157, 154, 151, 149, 147, 145, 145, 144, 143, 141, 140, 141, 141, 141, 141, 141, 142, 142, 142, 142, 142, 142, 142, 143, 143, 143, 144, 144, 145, 146, 146, 146, 147, 148, 148, 148, 148, 145, 143, 142, 140, 134, 128, 123, 117, 112, 108, 106, 105, 105, 104, 104, 103, 102, 101, 100, 100, 99], -[102, 103, 104, 105, 105, 106, 108, 110, 113, 118, 123, 127, 129, 132, 137, 141, 142, 142, 145, 150, 154, 157, 161, 161, 160, 160, 160, 159, 157, 154, 151, 148, 146, 145, 143, 142, 142, 139, 137, 136, 137, 137, 138, 138, 139, 139, 139, 139, 139, 139, 139, 139, 140, 140, 141, 142, 142, 143, 144, 144, 144, 145, 145, 145, 145, 145, 144, 142, 140, 139, 136, 129, 124, 119, 113, 109, 106, 106, 105, 104, 103, 102, 101, 101, 100, 99, 99], -[102, 103, 104, 104, 105, 106, 107, 108, 111, 116, 121, 124, 126, 128, 131, 134, 135, 137, 139, 143, 147, 152, 156, 157, 157, 157, 156, 155, 153, 151, 148, 146, 143, 142, 141, 140, 138, 135, 133, 132, 132, 133, 133, 133, 134, 135, 135, 135, 135, 136, 136, 137, 137, 138, 138, 139, 140, 141, 141, 142, 142, 143, 142, 142, 141, 141, 140, 139, 137, 134, 133, 129, 125, 121, 114, 110, 107, 106, 106, 104, 103, 102, 101, 100, 99, 99, 99], -[102, 103, 104, 104, 105, 105, 106, 108, 110, 113, 118, 121, 124, 126, 128, 130, 132, 134, 136, 139, 143, 147, 150, 154, 154, 154, 153, 151, 149, 148, 146, 143, 141, 139, 137, 136, 132, 130, 128, 128, 128, 129, 129, 130, 130, 131, 132, 132, 132, 133, 134, 134, 135, 135, 136, 137, 138, 139, 139, 140, 140, 140, 139, 139, 138, 137, 137, 135, 132, 130, 129, 127, 124, 120, 116, 112, 109, 106, 105, 103, 102, 101, 101, 100, 99, 99, 99], -[101, 102, 103, 104, 104, 105, 106, 107, 108, 110, 114, 119, 121, 124, 126, 128, 129, 132, 134, 137, 140, 143, 147, 149, 151, 151, 151, 149, 147, 145, 143, 141, 138, 136, 134, 131, 128, 126, 124, 125, 125, 126, 126, 127, 128, 128, 129, 129, 130, 130, 131, 131, 132, 132, 133, 134, 135, 135, 136, 136, 137, 137, 136, 136, 135, 134, 133, 131, 129, 128, 127, 126, 123, 119, 115, 111, 109, 107, 105, 104, 103, 102, 101, 100, 100, 100, 99], -[101, 102, 103, 103, 104, 104, 105, 106, 108, 110, 112, 116, 119, 121, 124, 125, 127, 130, 132, 135, 137, 140, 143, 147, 149, 149, 149, 147, 145, 143, 141, 139, 136, 133, 131, 128, 125, 122, 121, 122, 122, 122, 123, 125, 125, 126, 127, 127, 127, 128, 128, 128, 129, 129, 130, 131, 131, 132, 132, 133, 133, 133, 132, 132, 131, 131, 130, 129, 128, 126, 125, 124, 121, 117, 111, 109, 108, 106, 105, 104, 103, 102, 101, 101, 100, 100, 100], -[100, 101, 102, 103, 103, 104, 105, 106, 107, 108, 110, 114, 117, 119, 121, 123, 126, 128, 130, 133, 136, 139, 141, 144, 146, 147, 146, 145, 143, 141, 138, 136, 133, 130, 127, 124, 121, 120, 120, 120, 120, 120, 121, 122, 123, 124, 124, 125, 125, 126, 126, 125, 126, 126, 126, 125, 126, 127, 128, 128, 129, 129, 128, 128, 128, 128, 128, 128, 126, 125, 123, 122, 119, 114, 109, 108, 107, 106, 105, 104, 103, 103, 102, 102, 101, 100, 100], -[100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 112, 115, 117, 120, 122, 125, 127, 130, 132, 135, 137, 139, 142, 144, 144, 144, 142, 140, 138, 136, 132, 129, 126, 123, 120, 120, 119, 119, 118, 119, 119, 120, 120, 120, 121, 122, 122, 123, 123, 123, 123, 122, 123, 122, 122, 121, 122, 122, 122, 123, 123, 123, 124, 125, 125, 126, 126, 125, 124, 122, 120, 116, 113, 109, 107, 106, 105, 104, 104, 103, 102, 102, 101, 101, 100, 100], -[100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 112, 114, 117, 119, 122, 124, 127, 129, 131, 134, 136, 138, 140, 142, 142, 142, 140, 138, 136, 133, 129, 125, 122, 120, 119, 118, 118, 117, 116, 117, 117, 118, 119, 119, 120, 120, 120, 121, 121, 121, 122, 121, 120, 120, 120, 119, 119, 120, 120, 120, 120, 120, 120, 123, 123, 124, 124, 124, 123, 121, 119, 114, 112, 108, 106, 106, 104, 104, 103, 102, 102, 101, 101, 100, 100, 99], -[101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 113, 114, 116, 119, 121, 124, 126, 128, 130, 133, 135, 137, 138, 140, 140, 139, 137, 135, 133, 131, 127, 122, 120, 118, 118, 117, 117, 116, 115, 116, 116, 117, 118, 118, 118, 119, 119, 120, 120, 121, 121, 120, 119, 119, 118, 117, 117, 118, 119, 118, 118, 118, 119, 120, 122, 123, 123, 123, 122, 120, 117, 113, 110, 108, 106, 105, 104, 103, 103, 102, 101, 101, 100, 100, 99, 99], -[101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 111, 113, 115, 118, 121, 123, 125, 127, 129, 131, 133, 135, 137, 138, 138, 137, 134, 132, 130, 127, 122, 120, 118, 116, 116, 116, 116, 115, 113, 114, 115, 116, 117, 117, 118, 118, 119, 119, 119, 120, 120, 119, 118, 117, 117, 116, 116, 117, 117, 117, 118, 119, 119, 119, 120, 121, 121, 121, 121, 119, 116, 113, 110, 107, 105, 105, 103, 103, 103, 102, 101, 100, 100, 99, 99, 99], -[101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 114, 116, 117, 120, 122, 124, 126, 129, 130, 132, 133, 135, 136, 136, 134, 132, 129, 126, 122, 120, 118, 116, 114, 114, 114, 114, 114, 113, 113, 114, 115, 116, 116, 117, 117, 117, 118, 118, 119, 119, 118, 117, 116, 116, 115, 115, 116, 116, 116, 117, 117, 118, 118, 119, 120, 120, 120, 120, 119, 116, 113, 109, 106, 104, 104, 103, 102, 102, 101, 101, 100, 99, 99, 99, 98], -[101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 113, 115, 117, 117, 118, 121, 123, 126, 128, 130, 130, 131, 132, 133, 134, 131, 129, 125, 122, 120, 118, 116, 114, 113, 112, 112, 113, 112, 112, 111, 112, 113, 113, 114, 115, 116, 116, 117, 117, 118, 118, 116, 116, 115, 115, 115, 114, 114, 115, 116, 116, 117, 117, 118, 118, 119, 119, 120, 120, 117, 115, 112, 108, 106, 104, 103, 102, 102, 102, 101, 100, 99, 99, 99, 98, 98], -[101, 102, 103, 104, 105, 105, 106, 107, 108, 109, 110, 111, 113, 115, 117, 118, 120, 122, 125, 126, 127, 128, 129, 130, 131, 131, 128, 125, 121, 120, 118, 116, 114, 113, 113, 111, 111, 111, 111, 110, 109, 110, 111, 112, 113, 113, 114, 115, 115, 116, 117, 117, 116, 115, 114, 114, 113, 113, 114, 114, 115, 115, 116, 116, 117, 118, 118, 119, 119, 118, 116, 114, 112, 108, 105, 103, 103, 102, 101, 101, 100, 100, 99, 99, 98, 98, 97], -[100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 110, 111, 113, 115, 118, 120, 121, 122, 124, 125, 125, 126, 127, 128, 127, 124, 121, 120, 118, 116, 114, 113, 112, 112, 110, 109, 109, 108, 108, 108, 109, 110, 111, 112, 112, 113, 114, 114, 115, 116, 116, 115, 114, 113, 112, 112, 113, 113, 114, 114, 115, 115, 116, 116, 117, 117, 118, 118, 117, 115, 113, 111, 107, 105, 103, 102, 101, 101, 100, 100, 100, 99, 99, 98, 98, 97], -[100, 101, 102, 103, 104, 105, 105, 106, 107, 108, 109, 110, 110, 111, 114, 116, 118, 120, 120, 121, 122, 122, 123, 124, 123, 123, 120, 118, 117, 115, 114, 115, 113, 111, 110, 109, 108, 108, 107, 107, 107, 108, 109, 110, 111, 111, 112, 113, 113, 114, 115, 115, 114, 113, 112, 111, 111, 112, 112, 112, 113, 114, 114, 115, 115, 116, 116, 117, 117, 116, 114, 112, 109, 106, 104, 102, 101, 100, 100, 99, 99, 99, 99, 98, 98, 97, 97] -]; diff --git a/lib/protovis/tests/lang/globals.html b/lib/protovis/tests/lang/globals.html deleted file mode 100644 index a76dc421..00000000 --- a/lib/protovis/tests/lang/globals.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - Protovis defined the following globals: -

-    
-  
-
diff --git a/lib/protovis/tests/lang/init.html b/lib/protovis/tests/lang/init.html
deleted file mode 100644
index e8092c59..00000000
--- a/lib/protovis/tests/lang/init.html
+++ /dev/null
@@ -1,31 +0,0 @@
-
-  
-    
-  
-  
-    

-    
-    
-    
-    
-  
-
diff --git a/lib/protovis/tests/layers.js b/lib/protovis/tests/layers.js
deleted file mode 100644
index 65ce6351..00000000
--- a/lib/protovis/tests/layers.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Inspired by Lee Byron's test data generator. */
-function layers(n, m) {
-  function bump(a) {
-    var x = 1 / (.1 + Math.random()),
-        y = 2 * Math.random() - .5,
-        z = 10 / (.1 + Math.random());
-    for (var i = 0; i < m; i++) {
-      var w = (i / m - y) * z;
-      a[i] += x * Math.exp(-w * w);
-    }
-  }
-  return pv.range(n).map(function() {
-      var a = [], i;
-      for (i = 0; i < m; i++) a[i] = 0;
-      for (i = 0; i < 5; i++) bump(a);
-      return a;
-    });
-}
-
-/* Another layer generator using gamma distributions. */
-function waves(n, m) {
-  return pv.range(n).map(function(i) {
-    return pv.range(m).map(function(j) {
-        var x = 20 * j / m - i / 3;
-        return x > 0 ? 2 * x * Math.exp(-.5 * x) : 0;
-      });
-    });
-}
diff --git a/lib/protovis/tests/layout/arc-directed.html b/lib/protovis/tests/layout/arc-directed.html
deleted file mode 100644
index 5a201c30..00000000
--- a/lib/protovis/tests/layout/arc-directed.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-  
-    Directed Arc
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/arc-radial.html b/lib/protovis/tests/layout/arc-radial.html
deleted file mode 100644
index 8310b647..00000000
--- a/lib/protovis/tests/layout/arc-radial.html
+++ /dev/null
@@ -1,36 +0,0 @@
-
-  
-    Miserables Arc
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/arc-undirected.html b/lib/protovis/tests/layout/arc-undirected.html
deleted file mode 100644
index 58c9f37c..00000000
--- a/lib/protovis/tests/layout/arc-undirected.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-  
-    Directed Arc
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/arc.html b/lib/protovis/tests/layout/arc.html
deleted file mode 100644
index e9aff8b2..00000000
--- a/lib/protovis/tests/layout/arc.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-  
-    Miserables Arc
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/arc2.html b/lib/protovis/tests/layout/arc2.html
deleted file mode 100644
index 525274dd..00000000
--- a/lib/protovis/tests/layout/arc2.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-  
-    Diamond Arc
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/bullet-multiples.html b/lib/protovis/tests/layout/bullet-multiples.html
deleted file mode 100644
index e05cd0ae..00000000
--- a/lib/protovis/tests/layout/bullet-multiples.html
+++ /dev/null
@@ -1,60 +0,0 @@
-
-  
-    Bullet Layout
-    
-    
-    
-  
-  
-    
-  
-
-
diff --git a/lib/protovis/tests/layout/bullet.html b/lib/protovis/tests/layout/bullet.html
deleted file mode 100644
index a4f38580..00000000
--- a/lib/protovis/tests/layout/bullet.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-  
-    Bullet Layout
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/bullets.js b/lib/protovis/tests/layout/bullets.js
deleted file mode 100644
index ad931bab..00000000
--- a/lib/protovis/tests/layout/bullets.js
+++ /dev/null
@@ -1,37 +0,0 @@
-var bullets = [
-  {
-    title: "Revenue",
-    subtitle: "US$, in thousands",
-    ranges: [150, 225, 300],
-    measures: [270],
-    markers: [250]
-  },
-  {
-    title: "Profit",
-    subtitle: "%",
-    ranges: [20, 25, 30],
-    measures: [23],
-    markers: [26]
-  },
-  {
-    title: "Order Size",
-    subtitle: "US$, average",
-    ranges: [350, 500, 600],
-    measures: [320],
-    markers: [550]
-  },
-  {
-    title: "New Customers",
-    subtitle: "count",
-    ranges: [1400, 2000, 2500],
-    measures: [1650],
-    markers: [2100]
-  },
-  {
-    title: "Satisfaction",
-    subtitle: "out of 5",
-    ranges: [3.5, 4.25, 5],
-    measures: [4.7],
-    markers: [4.4]
-  }
-];
diff --git a/lib/protovis/tests/layout/cluster-fill-group.html b/lib/protovis/tests/layout/cluster-fill-group.html
deleted file mode 100644
index dcb06726..00000000
--- a/lib/protovis/tests/layout/cluster-fill-group.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-  
-    Flare Dendrogram
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/cluster-fill.html b/lib/protovis/tests/layout/cluster-fill.html
deleted file mode 100644
index 8c9920f5..00000000
--- a/lib/protovis/tests/layout/cluster-fill.html
+++ /dev/null
@@ -1,28 +0,0 @@
-
-  
-    Flare Dendrogram
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/cluster-partition-radial-fill.html b/lib/protovis/tests/layout/cluster-partition-radial-fill.html
deleted file mode 100644
index efa4e1a0..00000000
--- a/lib/protovis/tests/layout/cluster-partition-radial-fill.html
+++ /dev/null
@@ -1,43 +0,0 @@
-
-  
-    Flare Dendrogram
-    
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/cluster-radial-fill-radius.html b/lib/protovis/tests/layout/cluster-radial-fill-radius.html
deleted file mode 100644
index ec09b3ba..00000000
--- a/lib/protovis/tests/layout/cluster-radial-fill-radius.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
-  
-    Flare Dendrogram
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/cluster-radial-fill.html b/lib/protovis/tests/layout/cluster-radial-fill.html
deleted file mode 100644
index b1070344..00000000
--- a/lib/protovis/tests/layout/cluster-radial-fill.html
+++ /dev/null
@@ -1,29 +0,0 @@
-
-  
-    Flare Dendrogram
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/cluster-radial-group-fill.html b/lib/protovis/tests/layout/cluster-radial-group-fill.html
deleted file mode 100644
index bbc2c294..00000000
--- a/lib/protovis/tests/layout/cluster-radial-group-fill.html
+++ /dev/null
@@ -1,30 +0,0 @@
-
-  
-    Flare Circle
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/cluster-radial-radius.html b/lib/protovis/tests/layout/cluster-radial-radius.html
deleted file mode 100644
index b986e660..00000000
--- a/lib/protovis/tests/layout/cluster-radial-radius.html
+++ /dev/null
@@ -1,30 +0,0 @@
-
-  
-    Flare Circle
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/cluster-radial.html b/lib/protovis/tests/layout/cluster-radial.html
deleted file mode 100644
index 3524d467..00000000
--- a/lib/protovis/tests/layout/cluster-radial.html
+++ /dev/null
@@ -1,28 +0,0 @@
-
-  
-    Flare Circle
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/cluster-radial2.html b/lib/protovis/tests/layout/cluster-radial2.html
deleted file mode 100644
index 65200fa8..00000000
--- a/lib/protovis/tests/layout/cluster-radial2.html
+++ /dev/null
@@ -1,33 +0,0 @@
-
-  
-    Diamond Circle
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/cluster.html b/lib/protovis/tests/layout/cluster.html
deleted file mode 100644
index 5c9502bb..00000000
--- a/lib/protovis/tests/layout/cluster.html
+++ /dev/null
@@ -1,34 +0,0 @@
-
-  
-    Flare Dendrogram
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/cluster2.html b/lib/protovis/tests/layout/cluster2.html
deleted file mode 100644
index d4f021f2..00000000
--- a/lib/protovis/tests/layout/cluster2.html
+++ /dev/null
@@ -1,32 +0,0 @@
-
-  
-    Diamond Dendrogram
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/force-toggle.html b/lib/protovis/tests/layout/force-toggle.html
deleted file mode 100644
index b258e59e..00000000
--- a/lib/protovis/tests/layout/force-toggle.html
+++ /dev/null
@@ -1,46 +0,0 @@
-
-  
-    Flare Force Toggle
-    
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/force.html b/lib/protovis/tests/layout/force.html
deleted file mode 100644
index 461718eb..00000000
--- a/lib/protovis/tests/layout/force.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-  
-    Miserables Force
-    
-    
-    
-  
-  
-    
-  
-
diff --git a/lib/protovis/tests/layout/force2.html b/lib/protovis/tests/layout/force2.html
deleted file mode 100644
index 0c179866..00000000
--- a/lib/protovis/tests/layout/force2.html
+++ /dev/null
@@ -1,58 +0,0 @@
-
-  
-    Diamond Force
-    
-    
-    
-  
-  
-    

- - This example demonstrates computing a static force-directed layout that is - bounded by the containing panel, as well as dynamic properties for nodes - and links. The data set is the diamond tree used in other examples, with - links between parents and their children. The layout is computed using - 1,000 iterations.

- - Although the layout is static, this example is interactive. Using the - point and unpoint events, we can highlight the active node and its tree - ancestors. - - - diff --git a/lib/protovis/tests/layout/force3.html b/lib/protovis/tests/layout/force3.html deleted file mode 100644 index 2ecf2538..00000000 --- a/lib/protovis/tests/layout/force3.html +++ /dev/null @@ -1,41 +0,0 @@ - - - Flare Force - - - - - - - - diff --git a/lib/protovis/tests/layout/force4.html b/lib/protovis/tests/layout/force4.html deleted file mode 100644 index 523ed58f..00000000 --- a/lib/protovis/tests/layout/force4.html +++ /dev/null @@ -1,45 +0,0 @@ - - - Social Force - - - - - - - - diff --git a/lib/protovis/tests/layout/force5.html b/lib/protovis/tests/layout/force5.html deleted file mode 100644 index c7842cd2..00000000 --- a/lib/protovis/tests/layout/force5.html +++ /dev/null @@ -1,53 +0,0 @@ - - - Diamond Force - - - - - - - - - diff --git a/lib/protovis/tests/layout/grid-cols.html b/lib/protovis/tests/layout/grid-cols.html deleted file mode 100644 index 84967eef..00000000 --- a/lib/protovis/tests/layout/grid-cols.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Grid Layout - - - - - - - diff --git a/lib/protovis/tests/layout/grid-heatmap.html b/lib/protovis/tests/layout/grid-heatmap.html deleted file mode 100644 index 52259065..00000000 --- a/lib/protovis/tests/layout/grid-heatmap.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Grid Heatmap - - - - - - - diff --git a/lib/protovis/tests/layout/grid-rows.html b/lib/protovis/tests/layout/grid-rows.html deleted file mode 100644 index a70ccd75..00000000 --- a/lib/protovis/tests/layout/grid-rows.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Grid Layout - - - - - - - diff --git a/lib/protovis/tests/layout/grid.html b/lib/protovis/tests/layout/grid.html deleted file mode 100644 index b01d487c..00000000 --- a/lib/protovis/tests/layout/grid.html +++ /dev/null @@ -1,34 +0,0 @@ - - - Grid Layout - - - - - - - diff --git a/lib/protovis/tests/layout/horizon-color.html b/lib/protovis/tests/layout/horizon-color.html deleted file mode 100644 index 559fc5be..00000000 --- a/lib/protovis/tests/layout/horizon-color.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Horizon - - - - - - diff --git a/lib/protovis/tests/layout/horizon.html b/lib/protovis/tests/layout/horizon.html deleted file mode 100644 index 8e17019c..00000000 --- a/lib/protovis/tests/layout/horizon.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Horizon - - - - - - diff --git a/lib/protovis/tests/layout/indent-toggle.html b/lib/protovis/tests/layout/indent-toggle.html deleted file mode 100644 index 36b7bbe6..00000000 --- a/lib/protovis/tests/layout/indent-toggle.html +++ /dev/null @@ -1,62 +0,0 @@ - - - Flare Indent - - - - - - - diff --git a/lib/protovis/tests/layout/indent.html b/lib/protovis/tests/layout/indent.html deleted file mode 100644 index 1d9c82ab..00000000 --- a/lib/protovis/tests/layout/indent.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Flare Indent - - - - - - - diff --git a/lib/protovis/tests/layout/indent2.html b/lib/protovis/tests/layout/indent2.html deleted file mode 100644 index efc708fd..00000000 --- a/lib/protovis/tests/layout/indent2.html +++ /dev/null @@ -1,33 +0,0 @@ - - - Diamond Indent - - - - - - - diff --git a/lib/protovis/tests/layout/matrix-sort.html b/lib/protovis/tests/layout/matrix-sort.html deleted file mode 100644 index d8f870ef..00000000 --- a/lib/protovis/tests/layout/matrix-sort.html +++ /dev/null @@ -1,28 +0,0 @@ - - - Miserables Matrix - - - - - - - diff --git a/lib/protovis/tests/layout/matrix.html b/lib/protovis/tests/layout/matrix.html deleted file mode 100644 index ccb8ee46..00000000 --- a/lib/protovis/tests/layout/matrix.html +++ /dev/null @@ -1,35 +0,0 @@ - - - Miserables Matrix - - - - - - - diff --git a/lib/protovis/tests/layout/network.html b/lib/protovis/tests/layout/network.html deleted file mode 100644 index 3b0d51b4..00000000 --- a/lib/protovis/tests/layout/network.html +++ /dev/null @@ -1,43 +0,0 @@ - - - Miserables Random - - - - - - - diff --git a/lib/protovis/tests/layout/pack-bubble.html b/lib/protovis/tests/layout/pack-bubble.html deleted file mode 100644 index a9df7e1f..00000000 --- a/lib/protovis/tests/layout/pack-bubble.html +++ /dev/null @@ -1,45 +0,0 @@ - - - Flare Pack - - - - - - - - diff --git a/lib/protovis/tests/layout/pack.html b/lib/protovis/tests/layout/pack.html deleted file mode 100644 index e97a6615..00000000 --- a/lib/protovis/tests/layout/pack.html +++ /dev/null @@ -1,26 +0,0 @@ - - - Flare Pack - - - - - - - diff --git a/lib/protovis/tests/layout/pack2.html b/lib/protovis/tests/layout/pack2.html deleted file mode 100644 index 264d5882..00000000 --- a/lib/protovis/tests/layout/pack2.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Diamond Pack - - - - - - - diff --git a/lib/protovis/tests/layout/partition-fill.html b/lib/protovis/tests/layout/partition-fill.html deleted file mode 100644 index 8f18f122..00000000 --- a/lib/protovis/tests/layout/partition-fill.html +++ /dev/null @@ -1,27 +0,0 @@ - - - Flare Icicle - - - - - - - diff --git a/lib/protovis/tests/layout/partition-fill2.html b/lib/protovis/tests/layout/partition-fill2.html deleted file mode 100644 index 1cf23907..00000000 --- a/lib/protovis/tests/layout/partition-fill2.html +++ /dev/null @@ -1,22 +0,0 @@ - - - Flare Icicle - - - - - - - diff --git a/lib/protovis/tests/layout/partition-fill3.html b/lib/protovis/tests/layout/partition-fill3.html deleted file mode 100644 index 6fc1dd43..00000000 --- a/lib/protovis/tests/layout/partition-fill3.html +++ /dev/null @@ -1,27 +0,0 @@ - - - Flare Icicle - - - - - - - diff --git a/lib/protovis/tests/layout/partition-radial-fill-radius.html b/lib/protovis/tests/layout/partition-radial-fill-radius.html deleted file mode 100644 index b2d03613..00000000 --- a/lib/protovis/tests/layout/partition-radial-fill-radius.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Flare Radial - - - - - - - diff --git a/lib/protovis/tests/layout/partition-radial-fill.html b/lib/protovis/tests/layout/partition-radial-fill.html deleted file mode 100644 index ecb211e4..00000000 --- a/lib/protovis/tests/layout/partition-radial-fill.html +++ /dev/null @@ -1,26 +0,0 @@ - - - Flare Radial - - - - - - - diff --git a/lib/protovis/tests/layout/partition-radial-fill2.html b/lib/protovis/tests/layout/partition-radial-fill2.html deleted file mode 100644 index 003f5352..00000000 --- a/lib/protovis/tests/layout/partition-radial-fill2.html +++ /dev/null @@ -1,23 +0,0 @@ - - - Diamond Partition - - - - - - - diff --git a/lib/protovis/tests/layout/partition-radial-fill3.html b/lib/protovis/tests/layout/partition-radial-fill3.html deleted file mode 100644 index 55fa1fe2..00000000 --- a/lib/protovis/tests/layout/partition-radial-fill3.html +++ /dev/null @@ -1,29 +0,0 @@ - - - Flare Radial - - - - - - - diff --git a/lib/protovis/tests/layout/partition-radial-radius.html b/lib/protovis/tests/layout/partition-radial-radius.html deleted file mode 100644 index 358f8d91..00000000 --- a/lib/protovis/tests/layout/partition-radial-radius.html +++ /dev/null @@ -1,29 +0,0 @@ - - - Flare Radial - - - - - - - diff --git a/lib/protovis/tests/layout/partition-radial.html b/lib/protovis/tests/layout/partition-radial.html deleted file mode 100644 index abf45a55..00000000 --- a/lib/protovis/tests/layout/partition-radial.html +++ /dev/null @@ -1,30 +0,0 @@ - - - Flare Radial - - - - - - - diff --git a/lib/protovis/tests/layout/partition-radial2.html b/lib/protovis/tests/layout/partition-radial2.html deleted file mode 100644 index eaac0c30..00000000 --- a/lib/protovis/tests/layout/partition-radial2.html +++ /dev/null @@ -1,33 +0,0 @@ - - - Diamond Radial - - - - - - - diff --git a/lib/protovis/tests/layout/partition.html b/lib/protovis/tests/layout/partition.html deleted file mode 100644 index e8dabb47..00000000 --- a/lib/protovis/tests/layout/partition.html +++ /dev/null @@ -1,33 +0,0 @@ - - - Flare Partition - - - - - - - diff --git a/lib/protovis/tests/layout/partition2.html b/lib/protovis/tests/layout/partition2.html deleted file mode 100644 index 585435b7..00000000 --- a/lib/protovis/tests/layout/partition2.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Diamond Partition - - - - - - - diff --git a/lib/protovis/tests/layout/rollup.html b/lib/protovis/tests/layout/rollup.html deleted file mode 100644 index 3390d4d6..00000000 --- a/lib/protovis/tests/layout/rollup.html +++ /dev/null @@ -1,50 +0,0 @@ - - - Social Rollup - - - - - - - diff --git a/lib/protovis/tests/layout/stack-empty.html b/lib/protovis/tests/layout/stack-empty.html deleted file mode 100644 index 956c5a30..00000000 --- a/lib/protovis/tests/layout/stack-empty.html +++ /dev/null @@ -1,27 +0,0 @@ - - - Empty Stack - - - - - - diff --git a/lib/protovis/tests/layout/stack-expand.html b/lib/protovis/tests/layout/stack-expand.html deleted file mode 100644 index eb2ec995..00000000 --- a/lib/protovis/tests/layout/stack-expand.html +++ /dev/null @@ -1,41 +0,0 @@ - - - Stack - - - - - - - - diff --git a/lib/protovis/tests/layout/stack-reverse.html b/lib/protovis/tests/layout/stack-reverse.html deleted file mode 100644 index cf98e9ea..00000000 --- a/lib/protovis/tests/layout/stack-reverse.html +++ /dev/null @@ -1,42 +0,0 @@ - - - Reverse Stack - - - - - - - - diff --git a/lib/protovis/tests/layout/stack-right.html b/lib/protovis/tests/layout/stack-right.html deleted file mode 100644 index 0d9da84b..00000000 --- a/lib/protovis/tests/layout/stack-right.html +++ /dev/null @@ -1,42 +0,0 @@ - - - Right Stack - - - - - - - - diff --git a/lib/protovis/tests/layout/stack-rule.html b/lib/protovis/tests/layout/stack-rule.html deleted file mode 100644 index a5467181..00000000 --- a/lib/protovis/tests/layout/stack-rule.html +++ /dev/null @@ -1,61 +0,0 @@ - - - Stacked Column Chart - - - - - - diff --git a/lib/protovis/tests/layout/stack-visible.html b/lib/protovis/tests/layout/stack-visible.html deleted file mode 100644 index 1b6f8ce3..00000000 --- a/lib/protovis/tests/layout/stack-visible.html +++ /dev/null @@ -1,43 +0,0 @@ - - - Stack - - - - - - - - diff --git a/lib/protovis/tests/layout/stack.html b/lib/protovis/tests/layout/stack.html deleted file mode 100644 index de114585..00000000 --- a/lib/protovis/tests/layout/stack.html +++ /dev/null @@ -1,53 +0,0 @@ - - - Stack - - - - - - - - diff --git a/lib/protovis/tests/layout/tree-radial.html b/lib/protovis/tests/layout/tree-radial.html deleted file mode 100644 index e3ff8543..00000000 --- a/lib/protovis/tests/layout/tree-radial.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Flare Tree - - - - - - - diff --git a/lib/protovis/tests/layout/tree-radial2.html b/lib/protovis/tests/layout/tree-radial2.html deleted file mode 100644 index d6a17338..00000000 --- a/lib/protovis/tests/layout/tree-radial2.html +++ /dev/null @@ -1,34 +0,0 @@ - - - Diamond Tree - - - - - - - diff --git a/lib/protovis/tests/layout/tree-toggle.html b/lib/protovis/tests/layout/tree-toggle.html deleted file mode 100644 index c84c28d7..00000000 --- a/lib/protovis/tests/layout/tree-toggle.html +++ /dev/null @@ -1,36 +0,0 @@ - - - Diamond Tree - - - - - - - diff --git a/lib/protovis/tests/layout/tree.html b/lib/protovis/tests/layout/tree.html deleted file mode 100644 index 660608d0..00000000 --- a/lib/protovis/tests/layout/tree.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Flare Tree - - - - - - - diff --git a/lib/protovis/tests/layout/tree2.html b/lib/protovis/tests/layout/tree2.html deleted file mode 100644 index e9a7fd1b..00000000 --- a/lib/protovis/tests/layout/tree2.html +++ /dev/null @@ -1,35 +0,0 @@ - - - Diamond Tree - - - - - - - diff --git a/lib/protovis/tests/layout/treemap-hierarchy.html b/lib/protovis/tests/layout/treemap-hierarchy.html deleted file mode 100644 index 56fc3ce6..00000000 --- a/lib/protovis/tests/layout/treemap-hierarchy.html +++ /dev/null @@ -1,40 +0,0 @@ - - - Flare Treemap - - - - - - - diff --git a/lib/protovis/tests/layout/treemap-margin.html b/lib/protovis/tests/layout/treemap-margin.html deleted file mode 100644 index 64a64d2d..00000000 --- a/lib/protovis/tests/layout/treemap-margin.html +++ /dev/null @@ -1,26 +0,0 @@ - - - Flare Treemap - - - - - - - diff --git a/lib/protovis/tests/layout/treemap-round.html b/lib/protovis/tests/layout/treemap-round.html deleted file mode 100644 index 4b4fc261..00000000 --- a/lib/protovis/tests/layout/treemap-round.html +++ /dev/null @@ -1,40 +0,0 @@ - - - Flare Treemap - - - - - - - - diff --git a/lib/protovis/tests/layout/treemap-slice.html b/lib/protovis/tests/layout/treemap-slice.html deleted file mode 100644 index 49f9b7e4..00000000 --- a/lib/protovis/tests/layout/treemap-slice.html +++ /dev/null @@ -1,34 +0,0 @@ - - - Flare Treemap - - - - - - - - diff --git a/lib/protovis/tests/layout/treemap.html b/lib/protovis/tests/layout/treemap.html deleted file mode 100644 index f9ff1fc0..00000000 --- a/lib/protovis/tests/layout/treemap.html +++ /dev/null @@ -1,37 +0,0 @@ - - - Flare Treemap - - - - - - - - diff --git a/lib/protovis/tests/life.js b/lib/protovis/tests/life.js deleted file mode 100644 index a7d9cde2..00000000 --- a/lib/protovis/tests/life.js +++ /dev/null @@ -1,212 +0,0 @@ -var life = []; - -life.neighbors = []; - -life.neighbors.add = function(x, y, v) { - for (var i = x - 1; i <= x + 1; i++) { - for (var j = y - 1; j <= y + 1; j++) { - this[i * life.size + j] += v; - } - } - this[x * life.size + y] -= v; -}; - -life.reset = function(source) { - if (!arguments.length) { - source = []; - source.size = 150; - for (var x = 0, p = 0; x < source.size; x++) { - for (var y = 0; y < source.size; y++, p++) { - source[p] = Math.random() > .5 ? 1 : 0; - } - } - } - life.size = source.size; - for (var x = 0, p = 0; x < life.size; x++) { - for (var y = 0; y < life.size; y++, p++) { - life[p] = source[p]; - life.neighbors[p] = 0; - } - } - for (var x = 0, p = 0; x < life.size; x++) { - for (var y = 0; y < life.size; y++, p++) { - if (life[p]) { - life.neighbors.add(x, y, 1); - } - } - } -}; - -life.update = function() { - var neighbors = this.neighbors.concat(); - for (var x = 0, p = 0; x < life.size; x++) { - for (var y = 0; y < life.size; y++, p++) { - if (this[p]) { - if ((neighbors[p] < 2) || (neighbors[p] > 3)) { - this.neighbors.add(x, y, -1); - this[p] = 0; - } - } else if (neighbors[p] == 3) { - this.neighbors.add(x, y, 1); - this[p] = 1; - } - } - } -}; - -life.breeder = [ - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,1,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,1,0,0,0,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,1,1,0,0,0,0,1,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,1,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,1,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,1,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 -]; - -life.breeder.size = 150; - -life.reset(life.breeder); diff --git a/lib/protovis/tests/mark/anchor.html b/lib/protovis/tests/mark/anchor.html deleted file mode 100644 index d294b46d..00000000 --- a/lib/protovis/tests/mark/anchor.html +++ /dev/null @@ -1,25 +0,0 @@ - - - Anchor - - - - - - diff --git a/lib/protovis/tests/mark/area-anchor-chain.html b/lib/protovis/tests/mark/area-anchor-chain.html deleted file mode 100644 index 53bbb4c1..00000000 --- a/lib/protovis/tests/mark/area-anchor-chain.html +++ /dev/null @@ -1,42 +0,0 @@ - - - Area Anchor Chain - - - - - - diff --git a/lib/protovis/tests/mark/area-anchor-line.html b/lib/protovis/tests/mark/area-anchor-line.html deleted file mode 100644 index de9dcfaf..00000000 --- a/lib/protovis/tests/mark/area-anchor-line.html +++ /dev/null @@ -1,57 +0,0 @@ - - - Area Chart - - - - - - diff --git a/lib/protovis/tests/mark/area-anchor-stack.html b/lib/protovis/tests/mark/area-anchor-stack.html deleted file mode 100644 index 1084a583..00000000 --- a/lib/protovis/tests/mark/area-anchor-stack.html +++ /dev/null @@ -1,35 +0,0 @@ - - - Area Anchor - - - - - - diff --git a/lib/protovis/tests/mark/area-anchor.html b/lib/protovis/tests/mark/area-anchor.html deleted file mode 100644 index 0a37385b..00000000 --- a/lib/protovis/tests/mark/area-anchor.html +++ /dev/null @@ -1,43 +0,0 @@ - - - Area Anchor - - - - - - - diff --git a/lib/protovis/tests/mark/area-anchor2.html b/lib/protovis/tests/mark/area-anchor2.html deleted file mode 100644 index d5d932a4..00000000 --- a/lib/protovis/tests/mark/area-anchor2.html +++ /dev/null @@ -1,33 +0,0 @@ - - - Area Anchor - - - - - - diff --git a/lib/protovis/tests/mark/area-cardinal.html b/lib/protovis/tests/mark/area-cardinal.html deleted file mode 100644 index 8179dd81..00000000 --- a/lib/protovis/tests/mark/area-cardinal.html +++ /dev/null @@ -1,57 +0,0 @@ - - - Area Chart - Cardinal - - - - - - diff --git a/lib/protovis/tests/mark/area-monotone.html b/lib/protovis/tests/mark/area-monotone.html deleted file mode 100644 index 2d3abe0e..00000000 --- a/lib/protovis/tests/mark/area-monotone.html +++ /dev/null @@ -1,57 +0,0 @@ - - - Area Chart - Cardinal - - - - - - diff --git a/lib/protovis/tests/mark/area-segmented-basis.html b/lib/protovis/tests/mark/area-segmented-basis.html deleted file mode 100644 index 50f6ed72..00000000 --- a/lib/protovis/tests/mark/area-segmented-basis.html +++ /dev/null @@ -1,30 +0,0 @@ - - - Segmented Basis Area - - - - - - diff --git a/lib/protovis/tests/mark/area-segmented-cardinal.html b/lib/protovis/tests/mark/area-segmented-cardinal.html deleted file mode 100644 index c23fbb78..00000000 --- a/lib/protovis/tests/mark/area-segmented-cardinal.html +++ /dev/null @@ -1,30 +0,0 @@ - - - Segmented Cardinal Area - - - - - - diff --git a/lib/protovis/tests/mark/area-segmented-monotone.html b/lib/protovis/tests/mark/area-segmented-monotone.html deleted file mode 100644 index 92c0b94a..00000000 --- a/lib/protovis/tests/mark/area-segmented-monotone.html +++ /dev/null @@ -1,30 +0,0 @@ - - - Segmented Monotone Area - - - - - - diff --git a/lib/protovis/tests/mark/area-segmented-step.html b/lib/protovis/tests/mark/area-segmented-step.html deleted file mode 100644 index cfa38923..00000000 --- a/lib/protovis/tests/mark/area-segmented-step.html +++ /dev/null @@ -1,44 +0,0 @@ - - - Area Step - - - - - - -

The red area uses "step-before"; the green area uses "step-after". The red -area should precede the blue line, which uses "linear" interpolation, while the -green area should follow the blue line. - - - diff --git a/lib/protovis/tests/mark/area-segmented.html b/lib/protovis/tests/mark/area-segmented.html deleted file mode 100644 index 8fd4db1f..00000000 --- a/lib/protovis/tests/mark/area-segmented.html +++ /dev/null @@ -1,29 +0,0 @@ - - - Segmented Area - - - - - - diff --git a/lib/protovis/tests/mark/area-stacked-cardinal.html b/lib/protovis/tests/mark/area-stacked-cardinal.html deleted file mode 100644 index b5c5d317..00000000 --- a/lib/protovis/tests/mark/area-stacked-cardinal.html +++ /dev/null @@ -1,54 +0,0 @@ - - - Stacked Area Chart - Cardinal - - - - - - diff --git a/lib/protovis/tests/mark/area-stacked-monotone.html b/lib/protovis/tests/mark/area-stacked-monotone.html deleted file mode 100644 index 68e4a54a..00000000 --- a/lib/protovis/tests/mark/area-stacked-monotone.html +++ /dev/null @@ -1,54 +0,0 @@ - - - Stacked Area Chart - Cardinal - - - - - - diff --git a/lib/protovis/tests/mark/area-stacked.html b/lib/protovis/tests/mark/area-stacked.html deleted file mode 100644 index f632ca72..00000000 --- a/lib/protovis/tests/mark/area-stacked.html +++ /dev/null @@ -1,53 +0,0 @@ - - - Stacked Area Chart - - - - - - diff --git a/lib/protovis/tests/mark/area-step.html b/lib/protovis/tests/mark/area-step.html deleted file mode 100644 index 403f98d9..00000000 --- a/lib/protovis/tests/mark/area-step.html +++ /dev/null @@ -1,43 +0,0 @@ - - - Area Step - - - - - - -

The red area uses "step-before"; the green area uses "step-after". The red -area should precede the blue line, which uses "linear" interpolation, while the -green area should follow the blue line. - - - diff --git a/lib/protovis/tests/mark/area-zero.html b/lib/protovis/tests/mark/area-zero.html deleted file mode 100644 index 965a3f6e..00000000 --- a/lib/protovis/tests/mark/area-zero.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Area Chart - - - - -

- - This test verifies that when an area has points zero height, the path is - broken up into multiple subpaths. This avoids unnecessary strokes when the - data is zero. - - diff --git a/lib/protovis/tests/mark/area.html b/lib/protovis/tests/mark/area.html deleted file mode 100644 index 8e8d1923..00000000 --- a/lib/protovis/tests/mark/area.html +++ /dev/null @@ -1,57 +0,0 @@ - - - Area Chart - - - - - - diff --git a/lib/protovis/tests/mark/bar-anchor-stack.html b/lib/protovis/tests/mark/bar-anchor-stack.html deleted file mode 100644 index f8b3e7b9..00000000 --- a/lib/protovis/tests/mark/bar-anchor-stack.html +++ /dev/null @@ -1,51 +0,0 @@ - - - Bar Anchor - - - - - - - diff --git a/lib/protovis/tests/mark/bar-anchor.html b/lib/protovis/tests/mark/bar-anchor.html deleted file mode 100644 index 9d8ac167..00000000 --- a/lib/protovis/tests/mark/bar-anchor.html +++ /dev/null @@ -1,44 +0,0 @@ - - - Bar Anchor - - - - - - - diff --git a/lib/protovis/tests/mark/bar-column-grouped.html b/lib/protovis/tests/mark/bar-column-grouped.html deleted file mode 100644 index 74c2d68b..00000000 --- a/lib/protovis/tests/mark/bar-column-grouped.html +++ /dev/null @@ -1,63 +0,0 @@ - - - Grouped Column Chart - - - - - - diff --git a/lib/protovis/tests/mark/bar-column-stacked.html b/lib/protovis/tests/mark/bar-column-stacked.html deleted file mode 100644 index eb74937b..00000000 --- a/lib/protovis/tests/mark/bar-column-stacked.html +++ /dev/null @@ -1,56 +0,0 @@ - - - Stacked Column Chart - - - - - - diff --git a/lib/protovis/tests/mark/bar-column.html b/lib/protovis/tests/mark/bar-column.html deleted file mode 100644 index 109f78da..00000000 --- a/lib/protovis/tests/mark/bar-column.html +++ /dev/null @@ -1,54 +0,0 @@ - - - Column Chart - - - - - - diff --git a/lib/protovis/tests/mark/bar-grouped.html b/lib/protovis/tests/mark/bar-grouped.html deleted file mode 100644 index 144e7788..00000000 --- a/lib/protovis/tests/mark/bar-grouped.html +++ /dev/null @@ -1,63 +0,0 @@ - - - Grouped Bar Chart - - - - - - diff --git a/lib/protovis/tests/mark/bar-stacked.html b/lib/protovis/tests/mark/bar-stacked.html deleted file mode 100644 index 7b02c66a..00000000 --- a/lib/protovis/tests/mark/bar-stacked.html +++ /dev/null @@ -1,57 +0,0 @@ - - - Stacked Bar Chart - - - - - - diff --git a/lib/protovis/tests/mark/bar.html b/lib/protovis/tests/mark/bar.html deleted file mode 100644 index b8477f30..00000000 --- a/lib/protovis/tests/mark/bar.html +++ /dev/null @@ -1,54 +0,0 @@ - - - Bar Chart - - - - - - diff --git a/lib/protovis/tests/mark/cursor.html b/lib/protovis/tests/mark/cursor.html deleted file mode 100644 index e1d8f825..00000000 --- a/lib/protovis/tests/mark/cursor.html +++ /dev/null @@ -1,41 +0,0 @@ - - - Cursor - - - - - - diff --git a/lib/protovis/tests/mark/def-type.html b/lib/protovis/tests/mark/def-type.html deleted file mode 100644 index 03c2d6e5..00000000 --- a/lib/protovis/tests/mark/def-type.html +++ /dev/null @@ -1,23 +0,0 @@ - - - Def Type - - - - - - diff --git a/lib/protovis/tests/mark/dot-anchor.html b/lib/protovis/tests/mark/dot-anchor.html deleted file mode 100644 index ff3fd506..00000000 --- a/lib/protovis/tests/mark/dot-anchor.html +++ /dev/null @@ -1,33 +0,0 @@ - - - Scatterplot - - - - - - diff --git a/lib/protovis/tests/mark/dot-radius.html b/lib/protovis/tests/mark/dot-radius.html deleted file mode 100644 index 529a4e26..00000000 --- a/lib/protovis/tests/mark/dot-radius.html +++ /dev/null @@ -1,22 +0,0 @@ - - - Dot Radius - - - - - - diff --git a/lib/protovis/tests/mark/dot-stroke.html b/lib/protovis/tests/mark/dot-stroke.html deleted file mode 100644 index 6daf2fe5..00000000 --- a/lib/protovis/tests/mark/dot-stroke.html +++ /dev/null @@ -1,43 +0,0 @@ - - - Dot Stroke - - - - -

- -When paths have very thick stroke widths, the stroke path can self-intersect. -This test checks that the stroke path is stroked using the nonzero rather than -evenodd winding rule. - - - diff --git a/lib/protovis/tests/mark/dot.html b/lib/protovis/tests/mark/dot.html deleted file mode 100644 index eebbf7a4..00000000 --- a/lib/protovis/tests/mark/dot.html +++ /dev/null @@ -1,52 +0,0 @@ - - - Scatterplot - - - - - - diff --git a/lib/protovis/tests/mark/dot2.html b/lib/protovis/tests/mark/dot2.html deleted file mode 100644 index 3f3e2293..00000000 --- a/lib/protovis/tests/mark/dot2.html +++ /dev/null @@ -1,61 +0,0 @@ - - - Scatterplot - - - - - - diff --git a/lib/protovis/tests/mark/event-dblclick.html b/lib/protovis/tests/mark/event-dblclick.html deleted file mode 100644 index 1f712329..00000000 --- a/lib/protovis/tests/mark/event-dblclick.html +++ /dev/null @@ -1,30 +0,0 @@ - - - Double Click - - - - - - diff --git a/lib/protovis/tests/mark/event-prototype.html b/lib/protovis/tests/mark/event-prototype.html deleted file mode 100644 index 588d7a90..00000000 --- a/lib/protovis/tests/mark/event-prototype.html +++ /dev/null @@ -1,45 +0,0 @@ - - - Event Prototype - - - - -

- -This test verifies that partial rendering correctly observes the current scale -(the text size should not change); it verifies that the scale and -index properties are set inside event handlers (on mouseover, the text -labels should read "1 / 1" etc.); it verifies that partial rendering -wires up the scene of preceding siblings, so as to allow property chaining (no -crashes); lastly it verifies that when a panel triggers an event, its children -have a scene attribute set, but no index. - - - diff --git a/lib/protovis/tests/mark/event-render.html b/lib/protovis/tests/mark/event-render.html deleted file mode 100644 index 8cc50ddd..00000000 --- a/lib/protovis/tests/mark/event-render.html +++ /dev/null @@ -1,45 +0,0 @@ - - - Event Render - - - - -

- -This test verifies that render does not lose scene context.

- -This test works by redefining the fillStyle on the bar on -mouseover. The bar is immediately rendered, and then the label's text property -is set to the evaluated fillStyle. This property value can be queried -because rendering does not blindly erase the scene and index -attributes associated with bar after rendering. - - - diff --git a/lib/protovis/tests/mark/event.html b/lib/protovis/tests/mark/event.html deleted file mode 100644 index 72e0c801..00000000 --- a/lib/protovis/tests/mark/event.html +++ /dev/null @@ -1,24 +0,0 @@ - - - Event - - - - - - diff --git a/lib/protovis/tests/mark/image-color-inherit.html b/lib/protovis/tests/mark/image-color-inherit.html deleted file mode 100644 index af48c22c..00000000 --- a/lib/protovis/tests/mark/image-color-inherit.html +++ /dev/null @@ -1,33 +0,0 @@ - - - Image - - - - - - -

This test verifies that the image psuedo-property is inherited. - You should see a pleasant tartan. - - diff --git a/lib/protovis/tests/mark/image-color.html b/lib/protovis/tests/mark/image-color.html deleted file mode 100644 index 56e51bb6..00000000 --- a/lib/protovis/tests/mark/image-color.html +++ /dev/null @@ -1,35 +0,0 @@ - - - Image - - - - - - - - - diff --git a/lib/protovis/tests/mark/image-color2.html b/lib/protovis/tests/mark/image-color2.html deleted file mode 100644 index 4baa5881..00000000 --- a/lib/protovis/tests/mark/image-color2.html +++ /dev/null @@ -1,35 +0,0 @@ - - - Image - - - - - - - - - diff --git a/lib/protovis/tests/mark/image-heatmap.html b/lib/protovis/tests/mark/image-heatmap.html deleted file mode 100644 index 3453b93f..00000000 --- a/lib/protovis/tests/mark/image-heatmap.html +++ /dev/null @@ -1,29 +0,0 @@ - - - Image Heatmap - - - - - - - - diff --git a/lib/protovis/tests/mark/image.html b/lib/protovis/tests/mark/image.html deleted file mode 100644 index 8d9a1c02..00000000 --- a/lib/protovis/tests/mark/image.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Image - - - - - - - - diff --git a/lib/protovis/tests/mark/label-break.html b/lib/protovis/tests/mark/label-break.html deleted file mode 100644 index c0ac90be..00000000 --- a/lib/protovis/tests/mark/label-break.html +++ /dev/null @@ -1,54 +0,0 @@ - - - Label Breaks - - - - - - diff --git a/lib/protovis/tests/mark/label-decoration.html b/lib/protovis/tests/mark/label-decoration.html deleted file mode 100644 index a12768d2..00000000 --- a/lib/protovis/tests/mark/label-decoration.html +++ /dev/null @@ -1,22 +0,0 @@ - - - Label Decoration - - - - - - diff --git a/lib/protovis/tests/mark/label-events.html b/lib/protovis/tests/mark/label-events.html deleted file mode 100644 index 141360b8..00000000 --- a/lib/protovis/tests/mark/label-events.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Label Events - - - - - - diff --git a/lib/protovis/tests/mark/line-anchor.html b/lib/protovis/tests/mark/line-anchor.html deleted file mode 100644 index e2a02927..00000000 --- a/lib/protovis/tests/mark/line-anchor.html +++ /dev/null @@ -1,42 +0,0 @@ - - - Line Anchor - - - - - - - diff --git a/lib/protovis/tests/mark/line-basis.html b/lib/protovis/tests/mark/line-basis.html deleted file mode 100644 index b2ab75e8..00000000 --- a/lib/protovis/tests/mark/line-basis.html +++ /dev/null @@ -1,54 +0,0 @@ - - - Basis Splines - - - - - - diff --git a/lib/protovis/tests/mark/line-brownian.html b/lib/protovis/tests/mark/line-brownian.html deleted file mode 100644 index 632a5bc3..00000000 --- a/lib/protovis/tests/mark/line-brownian.html +++ /dev/null @@ -1,57 +0,0 @@ - - - Brownian Motion - - - - - - - diff --git a/lib/protovis/tests/mark/line-cardinal.html b/lib/protovis/tests/mark/line-cardinal.html deleted file mode 100644 index 9076460e..00000000 --- a/lib/protovis/tests/mark/line-cardinal.html +++ /dev/null @@ -1,77 +0,0 @@ - - - Cardinal Splines - - - - - - diff --git a/lib/protovis/tests/mark/line-catmull-rom.html b/lib/protovis/tests/mark/line-catmull-rom.html deleted file mode 100644 index fdf9337d..00000000 --- a/lib/protovis/tests/mark/line-catmull-rom.html +++ /dev/null @@ -1,78 +0,0 @@ - - - Catmull-Rom Splines - - - - - - diff --git a/lib/protovis/tests/mark/line-curve.html b/lib/protovis/tests/mark/line-curve.html deleted file mode 100644 index 5fd30bfc..00000000 --- a/lib/protovis/tests/mark/line-curve.html +++ /dev/null @@ -1,65 +0,0 @@ - - - Splines - - - - - - diff --git a/lib/protovis/tests/mark/line-eccentricity.html b/lib/protovis/tests/mark/line-eccentricity.html deleted file mode 100644 index b8373ec1..00000000 --- a/lib/protovis/tests/mark/line-eccentricity.html +++ /dev/null @@ -1,39 +0,0 @@ - - - Line Eccentricity - - - - - - diff --git a/lib/protovis/tests/mark/line-fill.html b/lib/protovis/tests/mark/line-fill.html deleted file mode 100644 index 72d24301..00000000 --- a/lib/protovis/tests/mark/line-fill.html +++ /dev/null @@ -1,24 +0,0 @@ - - - Line Fill - - - - - - diff --git a/lib/protovis/tests/mark/line-join.html b/lib/protovis/tests/mark/line-join.html deleted file mode 100644 index 4d3a5c98..00000000 --- a/lib/protovis/tests/mark/line-join.html +++ /dev/null @@ -1,51 +0,0 @@ - - - Line Joins - - - - - - - - diff --git a/lib/protovis/tests/mark/line-monotone-non-monotone.html b/lib/protovis/tests/mark/line-monotone-non-monotone.html deleted file mode 100644 index ca2e2d94..00000000 --- a/lib/protovis/tests/mark/line-monotone-non-monotone.html +++ /dev/null @@ -1,53 +0,0 @@ - - - Monotone curve on non monotone data - - - - - - diff --git a/lib/protovis/tests/mark/line-monotone-two-way.html b/lib/protovis/tests/mark/line-monotone-two-way.html deleted file mode 100644 index c3c599fb..00000000 --- a/lib/protovis/tests/mark/line-monotone-two-way.html +++ /dev/null @@ -1,61 +0,0 @@ - - - Monotone curve - - - - - - diff --git a/lib/protovis/tests/mark/line-monotone.html b/lib/protovis/tests/mark/line-monotone.html deleted file mode 100644 index 0e4c6a25..00000000 --- a/lib/protovis/tests/mark/line-monotone.html +++ /dev/null @@ -1,53 +0,0 @@ - - - Monotone curve - - - - - - diff --git a/lib/protovis/tests/mark/line-polar.html b/lib/protovis/tests/mark/line-polar.html deleted file mode 100644 index f7a5f6f4..00000000 --- a/lib/protovis/tests/mark/line-polar.html +++ /dev/null @@ -1,36 +0,0 @@ - - - Line Fill - - - - - - diff --git a/lib/protovis/tests/mark/line-segmented-basis.html b/lib/protovis/tests/mark/line-segmented-basis.html deleted file mode 100644 index f512e95d..00000000 --- a/lib/protovis/tests/mark/line-segmented-basis.html +++ /dev/null @@ -1,57 +0,0 @@ - - - Segmented Basis Splines - - - - - - diff --git a/lib/protovis/tests/mark/line-segmented-cardinal.html b/lib/protovis/tests/mark/line-segmented-cardinal.html deleted file mode 100644 index 6405197a..00000000 --- a/lib/protovis/tests/mark/line-segmented-cardinal.html +++ /dev/null @@ -1,80 +0,0 @@ - - - Segmented Cardinal Splines - - - - - - diff --git a/lib/protovis/tests/mark/line-segmented-join.html b/lib/protovis/tests/mark/line-segmented-join.html deleted file mode 100644 index 5e2b5d2e..00000000 --- a/lib/protovis/tests/mark/line-segmented-join.html +++ /dev/null @@ -1,52 +0,0 @@ - - - Segmented Line Joins - - - - - - - - diff --git a/lib/protovis/tests/mark/line-segmented-monotone.html b/lib/protovis/tests/mark/line-segmented-monotone.html deleted file mode 100644 index 887adaf8..00000000 --- a/lib/protovis/tests/mark/line-segmented-monotone.html +++ /dev/null @@ -1,56 +0,0 @@ - - - Segmented Monotone curve - - - - - - diff --git a/lib/protovis/tests/mark/line-segmented-polar.html b/lib/protovis/tests/mark/line-segmented-polar.html deleted file mode 100644 index 50884c1d..00000000 --- a/lib/protovis/tests/mark/line-segmented-polar.html +++ /dev/null @@ -1,30 +0,0 @@ - - - Segmented Line with Polar Interpolation - - - - - - - - diff --git a/lib/protovis/tests/mark/line-segmented-step.html b/lib/protovis/tests/mark/line-segmented-step.html deleted file mode 100644 index 67c1c946..00000000 --- a/lib/protovis/tests/mark/line-segmented-step.html +++ /dev/null @@ -1,41 +0,0 @@ - - - Segmented Line with Step Interpolation - - - - - - -

The orange-red line uses "step-before"; the yellow-green line uses -"step-after". The orange-red line should precede the blue-cyan line, which uses -"linear" interpolation, while the yellow-green line should follow the blue-cyan -line. - - - diff --git a/lib/protovis/tests/mark/line-segmented-step2.html b/lib/protovis/tests/mark/line-segmented-step2.html deleted file mode 100644 index de98f42f..00000000 --- a/lib/protovis/tests/mark/line-segmented-step2.html +++ /dev/null @@ -1,32 +0,0 @@ - - - Segmented Line with Step Interpolation - - - - - - - - diff --git a/lib/protovis/tests/mark/line-segmented.html b/lib/protovis/tests/mark/line-segmented.html deleted file mode 100644 index 3000d578..00000000 --- a/lib/protovis/tests/mark/line-segmented.html +++ /dev/null @@ -1,30 +0,0 @@ - - - Segmented Line - - - - - - diff --git a/lib/protovis/tests/mark/line-step.html b/lib/protovis/tests/mark/line-step.html deleted file mode 100644 index 5d39450b..00000000 --- a/lib/protovis/tests/mark/line-step.html +++ /dev/null @@ -1,39 +0,0 @@ - - - Line Step - - - - - - -

The red line uses "step-before"; the green line uses "step-after". The red -line should precede the blue line, which uses "linear" interpolation, while the -green line should follow the blue line. - - - diff --git a/lib/protovis/tests/mark/line-tension.html b/lib/protovis/tests/mark/line-tension.html deleted file mode 100644 index 9753aca5..00000000 --- a/lib/protovis/tests/mark/line-tension.html +++ /dev/null @@ -1,59 +0,0 @@ - - - Cardinal Splines - - - - - - diff --git a/lib/protovis/tests/mark/line.html b/lib/protovis/tests/mark/line.html deleted file mode 100644 index da9ded9d..00000000 --- a/lib/protovis/tests/mark/line.html +++ /dev/null @@ -1,51 +0,0 @@ - - - Line Chart - - - - - - diff --git a/lib/protovis/tests/mark/panel-anchor.html b/lib/protovis/tests/mark/panel-anchor.html deleted file mode 100644 index 4c3deefe..00000000 --- a/lib/protovis/tests/mark/panel-anchor.html +++ /dev/null @@ -1,37 +0,0 @@ - - - Panel Anchor - - - - - - diff --git a/lib/protovis/tests/mark/panel-anchor2.html b/lib/protovis/tests/mark/panel-anchor2.html deleted file mode 100644 index 4e57dcd8..00000000 --- a/lib/protovis/tests/mark/panel-anchor2.html +++ /dev/null @@ -1,31 +0,0 @@ - - - Anchor - - - - - - diff --git a/lib/protovis/tests/mark/panel-anchor3.html b/lib/protovis/tests/mark/panel-anchor3.html deleted file mode 100644 index 60d75c5d..00000000 --- a/lib/protovis/tests/mark/panel-anchor3.html +++ /dev/null @@ -1,22 +0,0 @@ - - - Panel Anchor - - - - - - diff --git a/lib/protovis/tests/mark/panel-anchor4.html b/lib/protovis/tests/mark/panel-anchor4.html deleted file mode 100644 index 5f9e6f40..00000000 --- a/lib/protovis/tests/mark/panel-anchor4.html +++ /dev/null @@ -1,28 +0,0 @@ - - - Anchor - - - - - - diff --git a/lib/protovis/tests/mark/panel-anchor5.html b/lib/protovis/tests/mark/panel-anchor5.html deleted file mode 100644 index f4e49b65..00000000 --- a/lib/protovis/tests/mark/panel-anchor5.html +++ /dev/null @@ -1,28 +0,0 @@ - - - Anchor - - - - - - diff --git a/lib/protovis/tests/mark/panel-append.html b/lib/protovis/tests/mark/panel-append.html deleted file mode 100644 index 18780901..00000000 --- a/lib/protovis/tests/mark/panel-append.html +++ /dev/null @@ -1,29 +0,0 @@ - - - Panel Append - - - -

- - - diff --git a/lib/protovis/tests/mark/panel-canvas.html b/lib/protovis/tests/mark/panel-canvas.html deleted file mode 100644 index f6519f1d..00000000 --- a/lib/protovis/tests/mark/panel-canvas.html +++ /dev/null @@ -1,107 +0,0 @@ - - - Panel Canvas - - - - - - -
- - This canvas is 300×300 pixels, with a 10-pixel black border. The black - border is clipped because it extends beyond the canvas. The canvas is - specified using a string ID, and the width and height are inferred from the - DOM. Clicking on the panel makes it brighter. -

- -

- - This canvas is 300×100 pixels, with no border. The canvas is specified - using an explicit DOM reference. The height is specified as a property, - while the width is inferred from the DOM. Clicking on the panel makes it - darker. -

- -

- - This canvas is 30×10 pixels, with no border. The canvas is specified - using an explicit DOM reference. The height is specified as a property, - while the width is inferred from the DOM. The root panel has an associated - 10-element array of data, so ten root panels are generated, making the total - width 300×10; however, since a canvas property was specified, the - panels are generated overlapping in a single SVG element, rather than - creating multiple canvases. Clicking on the panel should increment the - displayed click count. -

- -

- -
- This canvas is 50×50 pixels, with no border. The root panel has an - associated 10-element array of data, so ten root panels are generated, - wrapping for a total canvas size of 300×100. Since no canvas is - specified, multiple SVG elements are generated and added to the DOM. The - height is specified as a property, while the width is inferred from the - DOM. Clicking on the panel makes it darker. -

- - - diff --git a/lib/protovis/tests/mark/panel-fill.html b/lib/protovis/tests/mark/panel-fill.html deleted file mode 100644 index 610d07d7..00000000 --- a/lib/protovis/tests/mark/panel-fill.html +++ /dev/null @@ -1,50 +0,0 @@ - - - Panel Fill - - - - - - diff --git a/lib/protovis/tests/mark/panel-mouse.html b/lib/protovis/tests/mark/panel-mouse.html deleted file mode 100644 index 6d0b71d8..00000000 --- a/lib/protovis/tests/mark/panel-mouse.html +++ /dev/null @@ -1,53 +0,0 @@ - - - Panel Transform - - - - - - diff --git a/lib/protovis/tests/mark/panel-transform.html b/lib/protovis/tests/mark/panel-transform.html deleted file mode 100644 index e332f0e6..00000000 --- a/lib/protovis/tests/mark/panel-transform.html +++ /dev/null @@ -1,67 +0,0 @@ - - - Panel Transform - - - - - - diff --git a/lib/protovis/tests/mark/property-cast.html b/lib/protovis/tests/mark/property-cast.html deleted file mode 100644 index 7875a0a9..00000000 --- a/lib/protovis/tests/mark/property-cast.html +++ /dev/null @@ -1,24 +0,0 @@ - - - Property - - - - - - diff --git a/lib/protovis/tests/mark/render-partial.html b/lib/protovis/tests/mark/render-partial.html deleted file mode 100644 index d74ca3fe..00000000 --- a/lib/protovis/tests/mark/render-partial.html +++ /dev/null @@ -1,38 +0,0 @@ - - - Mark Render - - - - - - diff --git a/lib/protovis/tests/mark/rule-anchor.html b/lib/protovis/tests/mark/rule-anchor.html deleted file mode 100644 index 7ebbd8d6..00000000 --- a/lib/protovis/tests/mark/rule-anchor.html +++ /dev/null @@ -1,29 +0,0 @@ - - - Rule Anchor - - - - - - - diff --git a/lib/protovis/tests/mark/title.html b/lib/protovis/tests/mark/title.html deleted file mode 100644 index 27132d22..00000000 --- a/lib/protovis/tests/mark/title.html +++ /dev/null @@ -1,41 +0,0 @@ - - - Title - - - - - - diff --git a/lib/protovis/tests/mark/wedge-donut.html b/lib/protovis/tests/mark/wedge-donut.html deleted file mode 100644 index ccbdf62a..00000000 --- a/lib/protovis/tests/mark/wedge-donut.html +++ /dev/null @@ -1,35 +0,0 @@ - - - Donut - - - - - - diff --git a/lib/protovis/tests/mark/wedge-implied.html b/lib/protovis/tests/mark/wedge-implied.html deleted file mode 100644 index a6c764dc..00000000 --- a/lib/protovis/tests/mark/wedge-implied.html +++ /dev/null @@ -1,42 +0,0 @@ - - - Wedge Implied - - - - -

- -This test verifies that updating the angle property from within an -event handler functions correctly. Mouseover the wedges to see them switch -from angle 2 to 3. - -

Previously, event handlers would not re-evaluate properties; instead the -event handler could directly set arbitrary property values and the corresponding -SVG element would be updated. This had a bug such that if the angle -were set during render, the implied endAngle would not be updated, and -the wedge would not be rendered correctly. - -

Now that event handlers cannot directly set property values, and instead -update property definitions which then are re-evaluated as part of render, -wedge definitions can be manipulated interactively to no ill effect. - - - diff --git a/lib/protovis/tests/mark/wedge-pie.html b/lib/protovis/tests/mark/wedge-pie.html deleted file mode 100644 index 9cd5b4c1..00000000 --- a/lib/protovis/tests/mark/wedge-pie.html +++ /dev/null @@ -1,37 +0,0 @@ - - - Pie - - - - - - diff --git a/lib/protovis/tests/mark/wedge-ring.html b/lib/protovis/tests/mark/wedge-ring.html deleted file mode 100644 index fec0003d..00000000 --- a/lib/protovis/tests/mark/wedge-ring.html +++ /dev/null @@ -1,27 +0,0 @@ - - - Donut - - - - - - diff --git a/lib/protovis/tests/miserables.js b/lib/protovis/tests/miserables.js deleted file mode 100644 index d6270858..00000000 --- a/lib/protovis/tests/miserables.js +++ /dev/null @@ -1,348 +0,0 @@ -// This file contains the weighted network of coappearances of characters in -// Victor Hugo's novel "Les Miserables". Nodes represent characters as indicated -// by the labels, and edges connect any pair of characters that appear in the -// same chapter of the book. The values on the edges are the number of such -// coappearances. The data on coappearances were taken from D. E. Knuth, The -// Stanford GraphBase: A Platform for Combinatorial Computing, Addison-Wesley, -// Reading, MA (1993). -// -// The group labels were transcribed from "Finding and evaluating community -// structure in networks" by M. E. J. Newman and M. Girvan. - -var miserables = { - nodes:[ - {nodeName:"Myriel", group:1}, - {nodeName:"Napoleon", group:1}, - {nodeName:"Mlle. Baptistine", group:1}, - {nodeName:"Mme. Magloire", group:1}, - {nodeName:"Countess de Lo", group:1}, - {nodeName:"Geborand", group:1}, - {nodeName:"Champtercier", group:1}, - {nodeName:"Cravatte", group:1}, - {nodeName:"Count", group:1}, - {nodeName:"Old Man", group:1}, - {nodeName:"Labarre", group:2}, - {nodeName:"Valjean", group:2}, - {nodeName:"Marguerite", group:3}, - {nodeName:"Mme. de R", group:2}, - {nodeName:"Isabeau", group:2}, - {nodeName:"Gervais", group:2}, - {nodeName:"Tholomyes", group:3}, - {nodeName:"Listolier", group:3}, - {nodeName:"Fameuil", group:3}, - {nodeName:"Blacheville", group:3}, - {nodeName:"Favourite", group:3}, - {nodeName:"Dahlia", group:3}, - {nodeName:"Zephine", group:3}, - {nodeName:"Fantine", group:3}, - {nodeName:"Mme. Thenardier", group:4}, - {nodeName:"Thenardier", group:4}, - {nodeName:"Cosette", group:5}, - {nodeName:"Javert", group:4}, - {nodeName:"Fauchelevent", group:0}, - {nodeName:"Bamatabois", group:2}, - {nodeName:"Perpetue", group:3}, - {nodeName:"Simplice", group:2}, - {nodeName:"Scaufflaire", group:2}, - {nodeName:"Woman 1", group:2}, - {nodeName:"Judge", group:2}, - {nodeName:"Champmathieu", group:2}, - {nodeName:"Brevet", group:2}, - {nodeName:"Chenildieu", group:2}, - {nodeName:"Cochepaille", group:2}, - {nodeName:"Pontmercy", group:4}, - {nodeName:"Boulatruelle", group:6}, - {nodeName:"Eponine", group:4}, - {nodeName:"Anzelma", group:4}, - {nodeName:"Woman 2", group:5}, - {nodeName:"Mother Innocent", group:0}, - {nodeName:"Gribier", group:0}, - {nodeName:"Jondrette", group:7}, - {nodeName:"Mme. Burgon", group:7}, - {nodeName:"Gavroche", group:8}, - {nodeName:"Gillenormand", group:5}, - {nodeName:"Magnon", group:5}, - {nodeName:"Mlle. Gillenormand", group:5}, - {nodeName:"Mme. Pontmercy", group:5}, - {nodeName:"Mlle. Vaubois", group:5}, - {nodeName:"Lt. Gillenormand", group:5}, - {nodeName:"Marius", group:8}, - {nodeName:"Baroness T", group:5}, - {nodeName:"Mabeuf", group:8}, - {nodeName:"Enjolras", group:8}, - {nodeName:"Combeferre", group:8}, - {nodeName:"Prouvaire", group:8}, - {nodeName:"Feuilly", group:8}, - {nodeName:"Courfeyrac", group:8}, - {nodeName:"Bahorel", group:8}, - {nodeName:"Bossuet", group:8}, - {nodeName:"Joly", group:8}, - {nodeName:"Grantaire", group:8}, - {nodeName:"Mother Plutarch", group:9}, - {nodeName:"Gueulemer", group:4}, - {nodeName:"Babet", group:4}, - {nodeName:"Claquesous", group:4}, - {nodeName:"Montparnasse", group:4}, - {nodeName:"Toussaint", group:5}, - {nodeName:"Child 1", group:10}, - {nodeName:"Child 2", group:10}, - {nodeName:"Brujon", group:4}, - {nodeName:"Mme. Hucheloup", group:8} - ], - links:[ - {source:1, target:0, value:1}, - {source:2, target:0, value:8}, - {source:3, target:0, value:10}, - {source:3, target:2, value:6}, - {source:4, target:0, value:1}, - {source:5, target:0, value:1}, - {source:6, target:0, value:1}, - {source:7, target:0, value:1}, - {source:8, target:0, value:2}, - {source:9, target:0, value:1}, - {source:11, target:10, value:1}, - {source:11, target:3, value:3}, - {source:11, target:2, value:3}, - {source:11, target:0, value:5}, - {source:12, target:11, value:1}, - {source:13, target:11, value:1}, - {source:14, target:11, value:1}, - {source:15, target:11, value:1}, - {source:17, target:16, value:4}, - {source:18, target:16, value:4}, - {source:18, target:17, value:4}, - {source:19, target:16, value:4}, - {source:19, target:17, value:4}, - {source:19, target:18, value:4}, - {source:20, target:16, value:3}, - {source:20, target:17, value:3}, - {source:20, target:18, value:3}, - {source:20, target:19, value:4}, - {source:21, target:16, value:3}, - {source:21, target:17, value:3}, - {source:21, target:18, value:3}, - {source:21, target:19, value:3}, - {source:21, target:20, value:5}, - {source:22, target:16, value:3}, - {source:22, target:17, value:3}, - {source:22, target:18, value:3}, - {source:22, target:19, value:3}, - {source:22, target:20, value:4}, - {source:22, target:21, value:4}, - {source:23, target:16, value:3}, - {source:23, target:17, value:3}, - {source:23, target:18, value:3}, - {source:23, target:19, value:3}, - {source:23, target:20, value:4}, - {source:23, target:21, value:4}, - {source:23, target:22, value:4}, - {source:23, target:12, value:2}, - {source:23, target:11, value:9}, - {source:24, target:23, value:2}, - {source:24, target:11, value:7}, - {source:25, target:24, value:13}, - {source:25, target:23, value:1}, - {source:25, target:11, value:12}, - {source:26, target:24, value:4}, - {source:26, target:11, value:31}, - {source:26, target:16, value:1}, - {source:26, target:25, value:1}, - {source:27, target:11, value:17}, - {source:27, target:23, value:5}, - {source:27, target:25, value:5}, - {source:27, target:24, value:1}, - {source:27, target:26, value:1}, - {source:28, target:11, value:8}, - {source:28, target:27, value:1}, - {source:29, target:23, value:1}, - {source:29, target:27, value:1}, - {source:29, target:11, value:2}, - {source:30, target:23, value:1}, - {source:31, target:30, value:2}, - {source:31, target:11, value:3}, - {source:31, target:23, value:2}, - {source:31, target:27, value:1}, - {source:32, target:11, value:1}, - {source:33, target:11, value:2}, - {source:33, target:27, value:1}, - {source:34, target:11, value:3}, - {source:34, target:29, value:2}, - {source:35, target:11, value:3}, - {source:35, target:34, value:3}, - {source:35, target:29, value:2}, - {source:36, target:34, value:2}, - {source:36, target:35, value:2}, - {source:36, target:11, value:2}, - {source:36, target:29, value:1}, - {source:37, target:34, value:2}, - {source:37, target:35, value:2}, - {source:37, target:36, value:2}, - {source:37, target:11, value:2}, - {source:37, target:29, value:1}, - {source:38, target:34, value:2}, - {source:38, target:35, value:2}, - {source:38, target:36, value:2}, - {source:38, target:37, value:2}, - {source:38, target:11, value:2}, - {source:38, target:29, value:1}, - {source:39, target:25, value:1}, - {source:40, target:25, value:1}, - {source:41, target:24, value:2}, - {source:41, target:25, value:3}, - {source:42, target:41, value:2}, - {source:42, target:25, value:2}, - {source:42, target:24, value:1}, - {source:43, target:11, value:3}, - {source:43, target:26, value:1}, - {source:43, target:27, value:1}, - {source:44, target:28, value:3}, - {source:44, target:11, value:1}, - {source:45, target:28, value:2}, - {source:47, target:46, value:1}, - {source:48, target:47, value:2}, - {source:48, target:25, value:1}, - {source:48, target:27, value:1}, - {source:48, target:11, value:1}, - {source:49, target:26, value:3}, - {source:49, target:11, value:2}, - {source:50, target:49, value:1}, - {source:50, target:24, value:1}, - {source:51, target:49, value:9}, - {source:51, target:26, value:2}, - {source:51, target:11, value:2}, - {source:52, target:51, value:1}, - {source:52, target:39, value:1}, - {source:53, target:51, value:1}, - {source:54, target:51, value:2}, - {source:54, target:49, value:1}, - {source:54, target:26, value:1}, - {source:55, target:51, value:6}, - {source:55, target:49, value:12}, - {source:55, target:39, value:1}, - {source:55, target:54, value:1}, - {source:55, target:26, value:21}, - {source:55, target:11, value:19}, - {source:55, target:16, value:1}, - {source:55, target:25, value:2}, - {source:55, target:41, value:5}, - {source:55, target:48, value:4}, - {source:56, target:49, value:1}, - {source:56, target:55, value:1}, - {source:57, target:55, value:1}, - {source:57, target:41, value:1}, - {source:57, target:48, value:1}, - {source:58, target:55, value:7}, - {source:58, target:48, value:7}, - {source:58, target:27, value:6}, - {source:58, target:57, value:1}, - {source:58, target:11, value:4}, - {source:59, target:58, value:15}, - {source:59, target:55, value:5}, - {source:59, target:48, value:6}, - {source:59, target:57, value:2}, - {source:60, target:48, value:1}, - {source:60, target:58, value:4}, - {source:60, target:59, value:2}, - {source:61, target:48, value:2}, - {source:61, target:58, value:6}, - {source:61, target:60, value:2}, - {source:61, target:59, value:5}, - {source:61, target:57, value:1}, - {source:61, target:55, value:1}, - {source:62, target:55, value:9}, - {source:62, target:58, value:17}, - {source:62, target:59, value:13}, - {source:62, target:48, value:7}, - {source:62, target:57, value:2}, - {source:62, target:41, value:1}, - {source:62, target:61, value:6}, - {source:62, target:60, value:3}, - {source:63, target:59, value:5}, - {source:63, target:48, value:5}, - {source:63, target:62, value:6}, - {source:63, target:57, value:2}, - {source:63, target:58, value:4}, - {source:63, target:61, value:3}, - {source:63, target:60, value:2}, - {source:63, target:55, value:1}, - {source:64, target:55, value:5}, - {source:64, target:62, value:12}, - {source:64, target:48, value:5}, - {source:64, target:63, value:4}, - {source:64, target:58, value:10}, - {source:64, target:61, value:6}, - {source:64, target:60, value:2}, - {source:64, target:59, value:9}, - {source:64, target:57, value:1}, - {source:64, target:11, value:1}, - {source:65, target:63, value:5}, - {source:65, target:64, value:7}, - {source:65, target:48, value:3}, - {source:65, target:62, value:5}, - {source:65, target:58, value:5}, - {source:65, target:61, value:5}, - {source:65, target:60, value:2}, - {source:65, target:59, value:5}, - {source:65, target:57, value:1}, - {source:65, target:55, value:2}, - {source:66, target:64, value:3}, - {source:66, target:58, value:3}, - {source:66, target:59, value:1}, - {source:66, target:62, value:2}, - {source:66, target:65, value:2}, - {source:66, target:48, value:1}, - {source:66, target:63, value:1}, - {source:66, target:61, value:1}, - {source:66, target:60, value:1}, - {source:67, target:57, value:3}, - {source:68, target:25, value:5}, - {source:68, target:11, value:1}, - {source:68, target:24, value:1}, - {source:68, target:27, value:1}, - {source:68, target:48, value:1}, - {source:68, target:41, value:1}, - {source:69, target:25, value:6}, - {source:69, target:68, value:6}, - {source:69, target:11, value:1}, - {source:69, target:24, value:1}, - {source:69, target:27, value:2}, - {source:69, target:48, value:1}, - {source:69, target:41, value:1}, - {source:70, target:25, value:4}, - {source:70, target:69, value:4}, - {source:70, target:68, value:4}, - {source:70, target:11, value:1}, - {source:70, target:24, value:1}, - {source:70, target:27, value:1}, - {source:70, target:41, value:1}, - {source:70, target:58, value:1}, - {source:71, target:27, value:1}, - {source:71, target:69, value:2}, - {source:71, target:68, value:2}, - {source:71, target:70, value:2}, - {source:71, target:11, value:1}, - {source:71, target:48, value:1}, - {source:71, target:41, value:1}, - {source:71, target:25, value:1}, - {source:72, target:26, value:2}, - {source:72, target:27, value:1}, - {source:72, target:11, value:1}, - {source:73, target:48, value:2}, - {source:74, target:48, value:2}, - {source:74, target:73, value:3}, - {source:75, target:69, value:3}, - {source:75, target:68, value:3}, - {source:75, target:25, value:3}, - {source:75, target:48, value:1}, - {source:75, target:41, value:1}, - {source:75, target:70, value:1}, - {source:75, target:71, value:1}, - {source:76, target:64, value:1}, - {source:76, target:65, value:1}, - {source:76, target:66, value:1}, - {source:76, target:63, value:1}, - {source:76, target:62, value:1}, - {source:76, target:48, value:1}, - {source:76, target:58, value:1} - ] -}; diff --git a/lib/protovis/tests/physics/dorling.html b/lib/protovis/tests/physics/dorling.html deleted file mode 100644 index da2877b6..00000000 --- a/lib/protovis/tests/physics/dorling.html +++ /dev/null @@ -1,70 +0,0 @@ - - - Dorling Cartogram - - - - - - - diff --git a/lib/protovis/tests/physics/simulation.html b/lib/protovis/tests/physics/simulation.html deleted file mode 100644 index 519707a8..00000000 --- a/lib/protovis/tests/physics/simulation.html +++ /dev/null @@ -1,56 +0,0 @@ - - - Simulation - - - - - - - diff --git a/lib/protovis/tests/social.js b/lib/protovis/tests/social.js deleted file mode 100644 index 685953b3..00000000 --- a/lib/protovis/tests/social.js +++ /dev/null @@ -1,28 +0,0 @@ -var social = { - nodes: [ - {gender: "M", group: 1}, - {gender: "F", group: 2}, - {gender: "M", group: 1}, - {gender: "M", group: 2}, - {gender: "F", group: 2}, - {gender: "M", group: 1}, - {gender: "F", group: 1}, - {gender: "M", group: 2}, - {gender: "F", group: 2}, - {gender: "F", group: 2} - ], - links: [ - {source: 0, target: 1}, - {source: 1, target: 2}, - {source: 2, target: 3}, - {source: 2, target: 4}, - {source: 2, target: 5}, - {source: 2, target: 6}, - {source: 2, target: 7}, - {source: 5, target: 6}, - {source: 6, target: 7}, - {source: 5, target: 8}, - {source: 8, target: 6}, - {source: 6, target: 9} - ] -}; diff --git a/lib/protovis/tests/stanford.png b/lib/protovis/tests/stanford.png deleted file mode 100644 index 32825510..00000000 Binary files a/lib/protovis/tests/stanford.png and /dev/null differ diff --git a/lib/protovis/tests/style.css b/lib/protovis/tests/style.css deleted file mode 100644 index 2b1b6efa..00000000 --- a/lib/protovis/tests/style.css +++ /dev/null @@ -1,5 +0,0 @@ -body { - max-width: 8in; - margin: .25in; - font: 14px/134% Helvetica Neue, sans-serif; -} diff --git a/lib/protovis/tests/testify.css b/lib/protovis/tests/testify.css deleted file mode 100644 index aee15494..00000000 --- a/lib/protovis/tests/testify.css +++ /dev/null @@ -1,29 +0,0 @@ -table.testify { - width: 100%; - font: 14px/134% Courier, monospace; - border-spacing: 0; - margin-bottom: 1em; - white-space: pre; -} - -table.testify td { - width: 33%; -} - -table.testify tr:first-child, -table.testify tr:first-child + tr { - font-weight: bold; -} - -table.testify tr:first-child + tr td { - border-bottom: solid 1px #ccc; -} - -table.testify tr.pass { - background: rgba(0,255,0,.1); -} - -table.testify tr.fail { - color: red; - background: rgba(255,0,0,.1); -} diff --git a/lib/protovis/tests/testify.js b/lib/protovis/tests/testify.js deleted file mode 100644 index 45960000..00000000 --- a/lib/protovis/tests/testify.js +++ /dev/null @@ -1,16 +0,0 @@ -function testify(text) { - var table = document.createElement("table"), - lines = text.split("\n"); - table.className = "testify"; - for (var i = 0; i < lines.length; i++) { - var tr = table.appendChild(document.createElement("tr")), - cols = lines[i].split("\t"); - for (var j = 0; j < cols.length; j++) { - tr.appendChild(document.createElement("td")).innerHTML = cols[j]; - } - if (i > 1 && cols.length == 3) { - tr.className = cols[1] == cols[2] ? "pass" : "fail"; - } - } - document.body.appendChild(table); -} diff --git a/lib/protovis/tests/text/format-number.html b/lib/protovis/tests/text/format-number.html deleted file mode 100644 index 675c7952..00000000 --- a/lib/protovis/tests/text/format-number.html +++ /dev/null @@ -1,76 +0,0 @@ - - - Number Format - - - - - - -


-    
-  
-
diff --git a/locales/cs_CZ.po b/locales/cs_CZ.po
index a23acc3d..b4392f96 100644
--- a/locales/cs_CZ.po
+++ b/locales/cs_CZ.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2018-06-28 11:42+0000\n"
 "Last-Translator: Pavel Borecki \n"
 "Language-Team: Czech (Czech Republic) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/cs_CZ/)\n"
@@ -21,9 +21,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "Rozšířené výkazy"
 
diff --git a/locales/de_DE.po b/locales/de_DE.po
index 876d34a6..e0976400 100644
--- a/locales/de_DE.po
+++ b/locales/de_DE.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2018-10-22 07:04+0000\n"
 "Last-Translator: Stephan \n"
 "Language-Team: German (Germany) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/de_DE/)\n"
@@ -20,9 +20,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "More Reporting"
 
diff --git a/locales/en_GB.mo b/locales/en_GB.mo
index 0c53d58b..68dbdd6c 100644
Binary files a/locales/en_GB.mo and b/locales/en_GB.mo differ
diff --git a/locales/en_GB.po b/locales/en_GB.po
index 5e96a510..ab86c67d 100644
--- a/locales/en_GB.po
+++ b/locales/en_GB.po
@@ -1,14 +1,14 @@
 # English translations for PACKAGE package.
-# Copyright (C) 2020 THE PACKAGE'S COPYRIGHT HOLDER
+# Copyright (C) 2021 THE PACKAGE'S COPYRIGHT HOLDER
 # This file is distributed under the same license as the PACKAGE package.
-# Automatically generated, 2020.
+# Automatically generated, 2021.
 #
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
-"PO-Revision-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
+"PO-Revision-Date: 2021-03-09 15:12+0000\n"
 "Last-Translator: Automatically generated\n"
 "Language-Team: none\n"
 "Language: en_GB\n"
@@ -19,9 +19,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "More Reporting"
 
diff --git a/locales/en_US.po b/locales/en_US.po
index aeafc981..5c32c5ad 100644
--- a/locales/en_US.po
+++ b/locales/en_US.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2019-02-07 13:56+0000\n"
 "Last-Translator: Shawn Long \n"
 "Language-Team: English (United States) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/en_US/)\n"
@@ -20,9 +20,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "More Reporting"
 
diff --git a/locales/es_CO.po b/locales/es_CO.po
index 853f6f3c..ec65e8a2 100644
--- a/locales/es_CO.po
+++ b/locales/es_CO.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2019-04-03 23:33+0000\n"
 "Last-Translator: Haider Ilich López Areiza \n"
 "Language-Team: Spanish (Colombia) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/es_CO/)\n"
@@ -20,9 +20,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "Más informes"
 
diff --git a/locales/es_ES.po b/locales/es_ES.po
index 1c1176a4..4a97578b 100644
--- a/locales/es_ES.po
+++ b/locales/es_ES.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2018-06-28 08:41+0000\n"
 "Last-Translator: Cédric Anne\n"
 "Language-Team: Spanish (Spain) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/es_ES/)\n"
@@ -20,9 +20,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "Más Informes"
 
diff --git a/locales/fi_FI.po b/locales/fi_FI.po
index 5bc69355..e000dcfb 100644
--- a/locales/fi_FI.po
+++ b/locales/fi_FI.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2018-08-19 06:25+0000\n"
 "Last-Translator: Markku Vepsä\n"
 "Language-Team: Finnish (Finland) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/fi_FI/)\n"
@@ -20,9 +20,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "Lisää Raportteja"
 
diff --git a/locales/fr_FR.po b/locales/fr_FR.po
index ac99fe94..03c67b38 100644
--- a/locales/fr_FR.po
+++ b/locales/fr_FR.po
@@ -11,7 +11,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2018-06-28 09:31+0000\n"
 "Last-Translator: Cédric Anne\n"
 "Language-Team: French (France) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/fr_FR/)\n"
@@ -23,9 +23,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "Plus de rapports"
 
diff --git a/locales/hr_HR.mo b/locales/hr_HR.mo
index e3f91ba6..1c325944 100644
Binary files a/locales/hr_HR.mo and b/locales/hr_HR.mo differ
diff --git a/locales/hr_HR.po b/locales/hr_HR.po
index 8bf02128..27bf3c00 100644
--- a/locales/hr_HR.po
+++ b/locales/hr_HR.po
@@ -4,12 +4,13 @@
 # 
 # Translators:
 # milotype , 2020
+# milotype , 2020
 msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
-"PO-Revision-Date: 2020-02-12 16:09+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
+"PO-Revision-Date: 2020-11-10 12:43+0000\n"
 "Last-Translator: milotype \n"
 "Language-Team: Croatian (Croatia) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/hr_HR/)\n"
 "MIME-Version: 1.0\n"
@@ -20,9 +21,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "Prošireni izvještaji"
 
@@ -100,7 +101,7 @@ msgstr "Odaberi jedan model u svojim postavkama"
 #: inc/common.class.php:61 inc/common.class.php:62 inc/common.class.php:77
 #: inc/dashboard.class.php:35 ajax/homepage_link.php:8
 msgid "Dashboard"
-msgstr "Pregledna ploča"
+msgstr "Nadzorna ploča"
 
 #: inc/common.class.php:64 inc/common.class.php:65 inc/common.class.php:86
 msgid "Reports list"
@@ -254,7 +255,7 @@ msgstr "Odaberi izvještaj koji želiš prikazati"
 
 #: inc/dashboard.class.php:96
 msgid "Dashboard is empty. Please add reports by clicking on the icon"
-msgstr "Pregledna ploča je prazna. Dodaj izvještaje klikom na ikonu"
+msgstr "Nadzorna ploča je prazna. Dodaj izvještaje klikom na ikonu"
 
 #: inc/dashboard.class.php:105
 msgid "Add a report"
diff --git a/locales/it_IT.po b/locales/it_IT.po
index 7f38b871..306d4b3e 100644
--- a/locales/it_IT.po
+++ b/locales/it_IT.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2018-09-25 13:34+0000\n"
 "Last-Translator: Pierfrancesco Passerini \n"
 "Language-Team: Italian (Italy) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/it_IT/)\n"
@@ -20,9 +20,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "More Reporting"
 
diff --git a/locales/ko_KR.po b/locales/ko_KR.po
index 053d8804..afa7ed58 100644
--- a/locales/ko_KR.po
+++ b/locales/ko_KR.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2020-01-22 23:48+0000\n"
 "Last-Translator: SeongHyeon Cho \n"
 "Language-Team: Korean (Korea) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/ko_KR/)\n"
@@ -20,9 +20,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "보고서 더 보기"
 
diff --git a/locales/lv_LV.po b/locales/lv_LV.po
index 7bec3a42..c682e036 100644
--- a/locales/lv_LV.po
+++ b/locales/lv_LV.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2018-06-28 08:41+0000\n"
 "Last-Translator: Cédric Anne\n"
 "Language-Team: Latvian (Latvia) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/lv_LV/)\n"
@@ -20,9 +20,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "More Reporting"
 
diff --git a/locales/mreporting.pot b/locales/mreporting.pot
index d70951c8..b9a224ab 100644
--- a/locales/mreporting.pot
+++ b/locales/mreporting.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME \n"
 "Language-Team: LANGUAGE \n"
@@ -19,9 +19,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr ""
 
diff --git a/locales/pl_PL.po b/locales/pl_PL.po
index 01a89e3a..69122fc7 100644
--- a/locales/pl_PL.po
+++ b/locales/pl_PL.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2018-06-28 08:41+0000\n"
 "Last-Translator: Cédric Anne\n"
 "Language-Team: Polish (Poland) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/pl_PL/)\n"
@@ -21,9 +21,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "Dodatkowe raporty"
 
diff --git a/locales/pt_BR.po b/locales/pt_BR.po
index c3a1cbf1..109306bc 100644
--- a/locales/pt_BR.po
+++ b/locales/pt_BR.po
@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2019-09-30 13:31+0000\n"
 "Last-Translator: Thiago Passamani \n"
 "Language-Team: Portuguese (Brazil) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/pt_BR/)\n"
@@ -22,9 +22,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "Mais Relatórios"
 
diff --git a/locales/pt_PT.po b/locales/pt_PT.po
index 15aef79a..ace46705 100644
--- a/locales/pt_PT.po
+++ b/locales/pt_PT.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2019-02-26 12:16+0000\n"
 "Last-Translator: Rui Melo \n"
 "Language-Team: Portuguese (Portugal) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/pt_PT/)\n"
@@ -19,9 +19,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "More Reporting"
 
diff --git a/locales/ru_RU.po b/locales/ru_RU.po
index 097d8c6c..2ef40192 100644
--- a/locales/ru_RU.po
+++ b/locales/ru_RU.po
@@ -10,7 +10,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2019-02-21 13:40+0000\n"
 "Last-Translator: Denis Arkhipov \n"
 "Language-Team: Russian (Russia) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/ru_RU/)\n"
@@ -22,9 +22,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "Подробные отчеты"
 
diff --git a/locales/tr_TR.po b/locales/tr_TR.po
index 052babd7..b85b0b88 100644
--- a/locales/tr_TR.po
+++ b/locales/tr_TR.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2019-07-30 23:48+0000\n"
 "Last-Translator: Kaya Zeren \n"
 "Language-Team: Turkish (Turkey) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/tr_TR/)\n"
@@ -20,9 +20,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "Diğer Raporlar"
 
diff --git a/locales/zh_CN.po b/locales/zh_CN.po
index 579ddcdc..97b2f4b6 100644
--- a/locales/zh_CN.po
+++ b/locales/zh_CN.po
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: GLPI Plugin - MReporting\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-07-03 19:30+0000\n"
+"POT-Creation-Date: 2021-03-09 15:12+0000\n"
 "PO-Revision-Date: 2018-07-07 04:52+0000\n"
 "Last-Translator: liAnGjiA \n"
 "Language-Team: Chinese (China) (http://www.transifex.com/teclib/glpi-project-plugin-mreporting/language/zh_CN/)\n"
@@ -20,9 +20,9 @@ msgstr ""
 
 #: front/dashboard.form.php:34 front/dashboard.form.php:39 front/config.php:45
 #: front/preference.form.php:45 front/graph.php:39 front/central.php:33
-#: front/config.form.php:56 test.php:4 inc/profile.class.php:38
+#: front/config.form.php:56 inc/profile.class.php:38
 #: inc/preference.class.php:182 inc/notificationtargetnotification.class.php:8
-#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:178
+#: inc/common.class.php:49 inc/notification.class.php:18 setup.php:177
 msgid "More Reporting"
 msgstr "更多报表"
 
diff --git a/mreporting.xml b/mreporting.xml
index adc20894..c93a9925 100644
--- a/mreporting.xml
+++ b/mreporting.xml
@@ -98,6 +98,11 @@ Voir documentation : https://github.com/PluginsGLPI/mreporting/wiki
       Infotel
    
    
+      
+         1.7.2
+         ~9.5.0
+         https://github.com/pluginsGLPI/mreporting/releases/download/1.7.2/glpi-mreporting-1.7.2.tar.bz2
+      
       
          1.7.1
          ~9.5.0
diff --git a/setup.php b/setup.php
index 672fc9d8..4d6dcb99 100644
--- a/setup.php
+++ b/setup.php
@@ -26,7 +26,7 @@
  --------------------------------------------------------------------------
  */
 
-define ('PLUGIN_MREPORTING_VERSION', '1.7.1');
+define ('PLUGIN_MREPORTING_VERSION', '1.7.2');
 
 // Minimal GLPI version, inclusive
 define("PLUGIN_MREPORTING_MIN_GLPI", "9.5");
@@ -147,9 +147,8 @@ function plugin_init_mreporting() {
       if (strpos($_SERVER['REQUEST_URI'], "/mreporting/") !== false) {
          // Add specific files to add to the header : javascript
          $PLUGIN_HOOKS['add_javascript']['mreporting'] = [
-            "lib/protovis/protovis.min.js",
-            "lib/protovis-msie/protovis-msie.min.js",
-            "lib/jquery.tipsy/jquery.tipsy.min.js",
+            "lib/protovis/protovis.js",
+            "lib/jquery.tipsy/jquery.tipsy.js",
             "lib/jquery.tipsy/tipsy.js"
          ];
 
diff --git a/test.php b/test.php
deleted file mode 100644
index 019c25f1..00000000
--- a/test.php
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
-
-
- -
-
- -