diff --git a/.eslintrc b/.eslintrc
new file mode 100644
index 000000000..f5b4009e8
--- /dev/null
+++ b/.eslintrc
@@ -0,0 +1,86 @@
+env:
+ node: true
+ browser: true
+
+# enable ECMAScript features
+ecmaFeatures:
+ arrowFunctions: true
+ binaryLiterals: true
+ blockBindings: true
+ classes: true
+ defaultParams: true
+ destructuring: true
+ forOf: true
+ generators: true
+ modules: true
+ objectLiteralShorthandMethods: true
+ objectLiteralShorthandProperties: true
+ objectLiteralComputedProperties: true
+ objectLiteralDuplicateProperties: true
+ octalLiterals: true
+ restParams: true
+ spread: true
+ templateStrings: true
+
+rules:
+ # Possible Errors
+ # list: https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors
+ ## check debugger sentence
+ no-debugger: 2
+ ## check duplicate arguments
+ no-dupe-args: 2
+ ## check duplicate object keys
+ no-dupe-keys: 2
+ ## check duplicate switch-case
+ no-duplicate-case: 2
+ ## disallow assignment of exceptional params
+ no-ex-assign: 2
+ ## disallow unreachable code
+ no-unreachable: 2
+ ## require valid typeof compared string like typeof foo === 'strnig'
+ valid-typeof: 2
+
+ # Best Practices
+ # list: https://github.com/eslint/eslint/tree/master/docs/rules#best-practices
+ ## require falls through comment on switch-case
+ no-fallthrough: 2
+
+ ## 2 space indentation
+ indent: [2, 2]
+ ## add space after comma
+ comma-spacing: 2
+ ## put semi-colon
+ semi: 2
+ ## require spaces operator like var sum = 1 + 1;
+ space-infix-ops: 2
+ ## no space before function, eg. 'function()'
+ space-before-function-paren: [2, "never"]
+ ## require space before blocks, eg 'function() {'
+ space-before-blocks: [2, "always"]
+ ## require parens for Constructor
+ new-parens: 2
+ ## max 80 length
+ max-len: [2, 120, 2]
+ ## max 2 consecutive empty lines
+ no-multiple-empty-lines: [2, {max: 2}]
+ ## no trailing spaces
+ no-trailing-spaces: 2
+ # require space after keywords, eg 'for (..)'
+ keyword-spacing: 2
+
+ # Variables
+ # list: https://github.com/eslint/eslint/tree/master/docs/rules#variables
+ ## disallow use of undefined variables (globals)
+ no-undef: 2
+
+
+
+# Global scoped method and vars
+globals:
+ describe: true
+ it: true
+ before: true
+ after: true
+ beforeEach: true
+ afterEach: true
+
diff --git a/.gitignore b/.gitignore
index 5756bac73..7d7f73b57 100755
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-.*
*.diff
*.err
*.orig
@@ -12,21 +11,37 @@
# OS or Editor folders
.DS_Store
+.idea
.cache
.project
.settings
.tmproj
-nbproject
+.nvmrc
+sftp-config.json
Thumbs.db
+# private downloads
+download/
+archive/
+
+# database dump for tutorial export
+dump/
+
+# extra handlers are not in the repo
+extra
+
# NPM packages folder.
node_modules/
-# Brunch folder for temporary files.
+# TMP folder (run-time tmp)
tmp/
-# Brunch output folder.
-www/
+# Manifest (build-generated content, versions)
+manifest/
+
+
+# contains v8 executable for linux-tick-processor (run from project root)
+out/*
-# Bower stuff.
-bower_components/
+# Generated content
+public/*
diff --git a/.jshintrc b/.jshintrc
new file mode 100755
index 000000000..226835375
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,19 @@
+{
+ "maxerr": 25,
+ "latedef": "nofunc",
+ "browser": true,
+ "node": true, // for browserify require etc
+ "globals": ["$", "Prism", "describe", "it", "before", "after", "beforeEach", "afterEach", "context"],
+ "indent": 2,
+ "camelcase": true,
+ "newcap": true,
+ "undef": true,
+ "multistr": true,
+ "esnext": true,
+ "noyield": true,
+ "devel": true,
+ "loopfunc": true,
+ "-W004": true,
+ "-W030": true, // for yield* ...
+ "-W078": true // allow setter w/o getter
+}
diff --git a/.travis.yml b/.travis.yml
old mode 100644
new mode 100755
index db6bc0c1f..829cfa9b3
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,68 @@
language: node_js
node_js:
- - 0.10
- - 0.11
-services:
- - mongodb
+ - "5"
+git:
+ # javascipt-turorial submodule is checked out manually with token,
+ # in install hook
+ submodules: false
+ # Don't need history to do tests
+ # But depth: 1 would be too small
+ # The problem with using git clone depth 1 is that if the contributer
+ # pushes multiple commits in short succession before Travis is able to
+ # kick off a build. The build will fail due to being unable to find the
+ #commit. This is because Travis checks out a branch and then checks out
+ # the exact commit. So it is possible to get into a situation where the
+ # latest branch is newer than the commit Travis is trying to build
+ # against.
+ depth: 10
+
+install:
+ - source ./scripts/travis/install.sh
+
+script:
+ - source ./scripts/travis/test.sh
+
+env:
+ global: # not a build matrix, but variables for every build
+ #- TRAVIS_DEBUG=1
+ - NODE_ENV=test
+ - E2E_BROWSER=firefox
+ # id_rsa (by travis_key.sh)
+ - secure: "jXxCMfeJGuoQomJr/BzXtAnpjz6DVBRHsQqGLS5jky5KvQAaxwsC4MSOMCEPiTCUSRZ0/dTBhwzHeiFQ9c3m83NIwBmb27b/IkTbVUz8g515kHu1greDFWtdlVCwUOyTlc6bET84QDjMHnwmSTXHJw02j7D44mbOyvP07P1akAE="
+ - secure: "JzmDqycU+E+3MFG6iSW5+yZ9wPns4a1vC3i2/SVhLUvOAQpi/NNiNZQjcRkLmOiiV2Z9ykm4Tw0inYRmGR1LyXTFDyukjrfd9SiZ2o8iSuP3bIACyB2uGwJcRdTt0RFXEFvjE9l7O8fiQxPo8Fa3ZMF5Vx9zDGV+JGudycbGfMQ="
+ - secure: "cdqo9zt5EfTnEfHTl4BZi9eI3/V3F+piYS0W1yCe3YazgfOL4dk6SMm3nPvfrH1GafbKWDWH+PP79btqKuS27cBycRyBFyE9cOJ5KMqQZOxgtlwvoPRToxNuGkMf+K2mIaL3xLt+ydphWsoOndhBvuef5U9viGhZGiSy+v4AWGE="
+ - secure: "YvntZ1dqChna300Q2M4eHArwfxC7r5Ds+dGb3rokigszU8+orpKzNj9Ryv2v5w5TwtYV/IfdR1q+oabD0nrJzZ8iiQZVMjktfK9wWAIM7LqSN08vWeZVEV8XC9dLAjsMFAyLzm7+f3ReDcxyWeRIiq8HWdGEGqZS7adhvJhl18w="
+ - secure: "Sa2gtWs+1It2txzWkqJybNh/4q8l/owYuJgph40axFtUJt34XDJGVWIIr2uo4DUhyDt7pwI+UuiyLBC031kUNogKKm3k8W/Y3dUQUoTWTSxM9mdtMmirg8RS/C0HLp7w5d81zyJj8hzT5C0axSvNAsCLu9aXn9L4mgLlL9yb7o0="
+ - secure: "Fzy6mZQcLbsYEKiPCpTPGSfzn0eJ/ma5Bjw4t0/po3PHjnX9TTqryMp68ca7yMN7cXVE2cEgjXL1uE3DJygF+8BVmx7bt3vfHqxqhxjVTBvOcD64IPXOjoH0jkj0kX1kP72Cu7IQelPqpDToKn8HzlGwTayGG6HYcoMK6Vksd5g="
+ - secure: "c3sWfOvzmhfaaVqBc8MO2I0j2sjEB7yCtDmejza5NM/fh8NtOOmC58dEbaGmjTTdPmH5Ci0rwXBLm9JCZq62/PrLao2pLjIqGJLnEcmV51iwO0NREmX98xIjb5jWPMbppgJzf9huZfaKaC2opYzWtH5/oX2ti7mUGwBGysUM+mM="
+ - secure: "G7GYb5ARiMm8lOsvub3CGUqsLuWCg55Dh+c5CW971TXV26ZNi1l2ubLf5bdnoRueSvOMo3EmzhCBGXoXrnHnCuai5Z4srvtqTgPAf1k/9gfPAugMEf/SO13lazJs1aJsDaOtTmVf5j6yJBRDbLJexvBigsHPbTYA6qL+g6lo4Ug="
+ - secure: "B6qRlAwxo55nDxNDhIkTaPx6tgWK8wXjUK32kETQ/LZ5RWs1eb0TuvHon53WOhVYg+Sc6etbQw/Hf9w0dVTCZtKXrmCMLOjLpawnFWmmhGNQHrrXMXVsYYZZ2s1JNZYENi6m/KD1d4keL6ZRcxIY9UBJ28hwPGw7DLlaIZbh2ZM="
+ - secure: "fl65/grTfH39r9/N73yA8lByYQS/m6LUYRCCF+Y13/U7A9q2JzRhSbVkDqosT69cuvJAsGyyqyGstQQkldf9uGw7egwMepwRp4AWY/eV1jSsQYIlpCyl50BlC7FhNvVJmiXepo3yEgJGYhIlKNU9SkkLbJr4sIh3qgsRFz5Lpa8="
+ - secure: "c24KmkcbSbtc3WD6qSzU++oI+GItEFd1sjKydxTA7ZpIHQDtZADNh5XUByt1mbJ8a11xqPihzMIi3dulrVLMQM2L42oGxxDabOf7Y8qY362m32efrodvMyLf0rpHa4eJbYOn2nfxWS0HsQUt9HntES6yk15YLUzwxbzYKx7wpHc="
+ - secure: "aW9Y8WyAAj2Z+Xn1uy/wKSwDmf2G4XEOFibXzAAZFs0MwsNQHcMjY7+2UKD0BIio14XpQIgxxlxNbNZrSb/ushx3ON3SP+hzOA+tybO0a65PD1vpqUIyz5lHCY9/H7SCxdrBFqDT3pkAaQnCejvUKnQWyR4GKJtwyzZrVhuUj8A="
+ - secure: "pbQRrvcJjqfDr6XNR87XQ+KCnqhhFA1/sojHjgUziNQBf24pVHyBadGVwi243iiqTfWspDklLT8VSZe+Q/HYGm/aINLEs4w5jJ3cu3MzlWRn4kjE7/5K0QE+ZnbfCdgolIkTmxECVBFrqqMmDl/p2oys3PM3cTLjNvPGv6c5JqE="
+ - secure: "Rb3VPzv8zfSsmLXJuZpwRNiYop4Iz7wgS/Cu96oM1840LiKSoufFtKpB6Y2yoAYhkyDYdgOP9LgYQxT6P9n8PYpaN38l7JIewnkM4tfB0SU0wo5nauMiIUE1Y58QLebe0xvnzk1GvPm76SuZRPU3rg1XmCxT5M7ovGI5Zrd2cXM="
+ - secure: "Vt4Lclq4fAWRf1nkeY54osLKasJvCC6GKDvSFP7lFKcHCmArw9yvkVhlH/w2iegV1iO/Hqqggmxtq0EIu+Tqfmkkjvd1wMsH5+iOJMXvP9soINuN+wwDJwsn93mriJGaNwv2z4tRMl5klPFPgFDEZkqKDbBiuMUyG8XtWsmcAR0="
+ - secure: "OMIGENvQus8ukVIekuhK768gx/8P3xbmY2kCaDIEndo2sRNriZynsJ4WkXbM/Ov9jxPb1kmdHpjv6ChOoIjcComclld+lKMoh6AAR8dcz3PZfT0FEY7a6N0XKel6V2stF7LXgJlDbKZvCuylEESjbVRIYuZBRwni9+UmUpxcI7w="
+ - secure: "Wsg2SsZN7wsJ6FnytVZIM/+iz0Ufr96A39x9D07OjjYTdLowYxE1jU1b/25uc5Wy6V5cWddkCjjiECyKtK3qe+OVPDYDR1R+W1QvLC2XLy/PmGGhuf8EBRBaVrwgUgqAcjB53UPviVBgOpMTuu/qVzQHpehpAcJ0DDbYMBzyG/A="
+ - secure: "glTBrJyC6Trrj17ud2wmjj4pDDBEyKWEgz+m4e2xRWZ+/Y3PAf43XBWTrp3UpS0isADvoxhsN+IzYoyGfW66X7+KNS4spT43wbaT/1GrNUZDQxNP1k7rLC++tk3/6QMvUFtn/+wkCCMtQS70cZVhSTynxNa51fiXACl0oxJcUNU="
+ - secure: "DPN/qQ58H9qH/rX4YZlVUUzoK4wKTBE1dW9ROE164kazZ2DLfbLAyuUn54buFB2Xh+i2vufzvGpsUNqCh4Rk7cqznmD5YeR0Z3bp57bbFHUolxqzdg4X5Tu7IbplU4YElc12775doKviDFI5LVRjHtkbLDqVXb5u9rOQCiwLbxQ="
+ - secure: "CmpJyG4xjIPQCxdfrsl8hZ3lRyAoAk9U3WekNqcu5m85EyLbnUuC8IRdrIJ8WPTpEqO8JA6loavAGuc8Ek/NgaMKNFq/NLS7eVe9XfHvOrMHl7YplmwtTcy+a7pMyP8mHUcWZddIQO1VBG2lmEg0/mI2fVWGDhIO02/Ma2XqJtE="
+ - secure: "Uq2jBQj3+X3uec5Y5TIsZqwKOQ90xAAtwaZBEM6aSd8d6Mpo9CmmT7xtiBViZkbmAHhXYybKI9j5S5TtbGfbd66pYIDQWu5aOQq+2yIVHQnt4TsyLxDYlEW9263rdklKFcfvc3Q8aMggz8ShKCLyCPeCDm9LCSCRGsPFgYAzdM4="
+ - secure: "o6HD1f3TS/OFmAA4nuCeo9UqeZfDLcxXgI7aUu8kUe3WB1RqiFscZmi8oP4c+x+nf6D3CRq9W5t0UrifSSP0HLHumf9SJsJW8NAZuEBSBMtAlLxN4SlsE6Q65hJGIy5/VxqYbfA6nfmWf6Hzanxd5cb+4nD8nP8Rb5yhUK/WnLg="
+ - secure: "l6IO9z+QLwR8jSp8qkx72ZIpOzcGwLJopYgsPkipT/RhmDCRZiLZtqQ6+kohG1IDt0XFc9ZkyK3f5IeFA6laLrCb/6GuWCyXNtBGrP8jhOO52k2iCHrTJcr4e9NR0wldOGbuhY57ipFVs2xmFCJjIjOBEwsBNwmBxeApYlZeHxg="
+ # id_rsa.pub (by travis_key.sh)
+ - secure: "U3hGgFIvhaBxRkFTsFvOdIcUYKJHpXd6J8RWf5PrdfKJ26XDwDCrS9cYahPiBZjYzB7NhMbhfIMFxKzujxeDWx86Utw8jNpQ69U1ge+C2zhRezzDzBECLE2AAh3EvLOI6DZa5r2tWkeBUoBeGuZlBXASGLpje2kzZT3r3ggGBbA="
+ - secure: "H0xIXyYrVkLXMlH6OAkIdudwA+aaj5N+YNNruhR3WqKFaiLQkiU2OptpuN2jL+bMHyOxGGSxbHMoweVUryjX3DcBsfrNbhsRccryBC35MDrZACB2lUnwh+VJUgoHTqhVAcdIeQz1ALVlhvEgTx2+Xwe05fLjtrvkdOPtj2KZ9Ck="
+ - secure: "LlUZS83kfwVWaDD1ahw/z8hYKVvRF1lp3Y3BTCH1qPHBluqrBmg1+/kbcVAzmIaBe3/f4M3fQgQvt7rlwgKzkDfS22Z52bMqj9cSv5Am1XdDAYlomldwJpV291Rt/qG7VajlTYqKXCua2zCSGgnlybIIshca5K0OxYGLwKjHO+0="
+ - secure: "ns1sdmT8ZYr2w55/6n7AWgs0yK9XsaLPvmwYuPVcubnA12BdobtehYUNCqyjfIz6wtsUmiQHLDvFFOq5tic4c9qD217B2c8mP5fxuf9v5V2TBX8fL2RxmvPYDxi9nl5i4tSoNJjyfMWzlQLDaBiGw0Q2X6XKHZDqjg1JBWJK3Ww="
+ - secure: "PFlzNIBId1aCj6htuWqnklVPqZzc7Kb50ubpwZSXjD08txj6y9WwKyI/4aT/Qc4/g+xedBP8t6xal4qP4yd2GqWA6T3IoFusHGyjguqu08BvYad+O6ri92ZcnegmGkfAMiIlbtBjdPD3JkbtEr9+opVGfPFfd+56smZEzBZWO/M="
+ - secure: "P4Tg2Sb/TYwXx9rQsDbQ38f8bgjjNog7/6qsT2KfZsCrATk5g1vd4BaGS8G3GyVINFQTy1ozISfwEgM/SZEeDIUx9hkr9aAKqIwnQROn8FS+CIP2YO6vPHRIxBwCA49+e6wCkeeu7GMM/aHxH7O9JU9E73Dr03QRlQ2b0OQJ3SE="
+
+notifications:
+ email: false
+
+# blacklist
+branches:
+ only:
+ - master
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
new file mode 100755
index 000000000..cf2d06519
--- /dev/null
+++ b/CONTRIBUTORS.md
@@ -0,0 +1,17 @@
+
+В этом файле перечислены (в алфавитном порядке) люди, которые внесли весомый вклад в учебник или код проекта:
+
+
+Алексей Максимов @amaxcz
+Алексей Шистеров
+Антон Вернигор @smmurf
+Артём Безценный @bezart
+Илья Кантор @iliakan
+Юрий Ткаченко @tyv
+
+
+Проект существует давно, а список создан совсем недавно.
+
+Наверняка я кого-то забыл.
+
+Если вы должны быть в этом списке, но вас нет — обязательно напишите мне на mk@javascript.ru.
diff --git a/Install.md b/Install.md
new file mode 100755
index 000000000..432f41ff8
--- /dev/null
+++ b/Install.md
@@ -0,0 +1,165 @@
+
+# Как поднять сайт локально
+
+## 0. Операционная система
+
+Сайт работает под MacOS, Unix (протестировано на Ubuntu, Debian), но не Windows. Сам код сайта более-менее универсален, но под Windows криво работают некоторые сторонние модули.
+
+## 1. Директория
+
+Чтобы было проще – создайте в корне директорию `/js`, и в ней работайте.
+Если философия не позволяет – можно другую директорию, тогда в командах ниже поправьте пути соответственно.
+
+## 2. Поставьте и запустите Node.JS и MongoDB
+
+Node.JS – последняя версия с [https://nodejs.org](https://nodejs.org).
+
+Mongo – можно 2.6+. Линукс-пакет или, если у вас Mac, то проще всего сделать это через [MacPorts](http://www.macports.org/install.php) или [Homebrew](http://brew.sh), чтобы было проще ставить дополнительные пакеты.
+
+Если через MacPorts, то:
+```
+sudo port install mongodb
+sudo port load mongodb
+```
+
+## 3. Клонируйте репозитарий
+
+Предположу, что Git у вас уже стоит и вы умеете им пользоваться.
+
+Клонируйте только ветку `master` движка:
+```
+cd /js
+git clone -b master --single-branch https://github.com/iliakan/javascript-nodejs
+```
+
+
+## 4. Глобальные модули
+
+Поставьте глобальные модули:
+
+```
+npm install -g mocha bunyan gulp nodemon
+```
+
+Чтобы автоматически ставилась переменная `NODE_PATH`, для запуска `gulp` далее используется команда: `npm --silent run gulp --`.
+
+На практике для удобства используется alias:
+```
+alias glp="npm --silent run gulp -- "
+```
+
+Или же можно запускать gulp как: `NODE_PATH=./handlers:./modules gulp`.
+
+## 5. Системные пакеты
+
+Для работы также нужны Nginx, GraphicsMagick и ImageMagick (обычно используется GM, он лучше, но иногда IM).
+
+Под Macports команды такие:
+
+```
+sudo port install ImageMagick GraphicsMagick
+sudo port install nginx +debug+gzip_static+realip+geoip
+
+sudo port load nginx
+```
+
+## 6. npm install
+
+В директории, в которую клонировали, запустите:
+
+```
+npm install
+```
+
+## 7. Конфигурация Nginx с нуля
+
+Если в системе ранее не стоял nginx, то поставьте его.
+
+Логи nginx пишет в директорию `/var/log/nginx`.
+
+Если её нет, то нужно создать и поставить пермишны/владельца. Например, если компьютер – ваш личный, то запустить от рута:
+```
+mkdir /var/log/nginx
+chmod 777 /var/log/nginx
+```
+
+Cтавим настройки для сайта запуском:
+```
+npm --silent run gulp -- config:nginx --prefix /opt/local/etc/nginx --root /js/javascript-nodejs --env development --clear
+```
+
+Здесь `--prefix` -- место для конфигов nginx, обычно `/etc/nginx`, в случае MacPorts это `/opt/local/etc/nginx`.
+В параметр `--root` запишите место установки сайта.
+
+В `--root` находится путь к движку: если вы использовали другой путь для сайта, вместо `/js/javascript-nodejs`, то измените его.
+
+Опция `--clear` полностью удалит старые конфиги nginx.
+
+Также рекомендуется в `/etc/hosts` добавить строку:
+```
+127.0.0.1 javascript.in
+```
+
+Такое имя хоста стоит в конфигурации Nginx.
+
+## 7.1. Если Nginx у вас уже стоит
+
+Если уже есть nginx, то сделайте резервную копию всех его конфигов.
+
+После этого выполните предыдущую секцию без `--clear` в команде:
+
+```
+npm --silent run gulp -- config:nginx --prefix /opt/local/etc/nginx --root /js/javascript-nodejs --env development
+```
+
+Такая команда скопирует файлы из директории `/js/javascript-nodejs/nginx` в указанную директорию `--prefix`, но без перезаписывания.
+ При копировании используется небольшая шаблонизация конфигов, т.е. это не просто `cp`, но структура файлов остаётся такой же.
+
+Основные конфиги будут перезаписаны, но в `sites-enabled` останутся и будут подключены и другие сайты.
+
+Перезапустите Nginx. Проверьте, что ваши предыдущие проекты работают.
+
+
+## 8. База
+
+Инициализуйте базу сайта командой:
+
+```
+npm --silent run gulp -- db:load --from fixture/init
+```
+
+
+Клонируйте ветку учебника, например `ru`:
+```
+cd /js
+git clone -b ru --single-branch https://github.com/iliakan/javascript-tutorial
+```
+
+После клонирования импортируйте учебник в базу командой:
+```
+PLUNK_REMOTE_OFF=1 npm --silent run gulp -- tutorial:import --root /js/javascript-tutorial
+```
+
+Здесь `/js/javascript-tutorial` -- директория с репозитарием учебника.
+
+`PLUNK_REMOTE_OFF=1` отключает автоматическую загрузку примеров из учебников на сервис plnkr.co.
+Она требует настройки сессии на plnkr.co и нужна при публикации учебника.
+Для запуска проекта она не нужна, особенно если вас интересуют другие модули.
+
+## 9. Запуск сайта
+
+Запуск сайта в режиме разработки:
+```
+./ru
+```
+
+Это поднимет сразу и сайт и механизмы автосборки стилей-скриптов и livereload.
+
+Обратите внимание: ходить на сайт нужно через Nginx (обычно порт 80), не напрямую в Node.JS (не будет статики).
+
+Если в `/etc/hosts` есть строка `127.0.0.1 javascript.in`, то адрес будет `http://javascript.in/`.
+
+# TroubleShooting
+
+Если что-то не работает -- [пишите issue](https://github.com/iliakan/javascript-nodejs/issues/new).
+
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100755
index 000000000..82a2b611a
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,14 @@
+Код публикуется под открытой лицензией CC-BY-NC-SA.
+
+Это означает, что вы можете свободно распространять, использовать и адаптировать этот код при выполнении следующих условий:
+
+ - Аттрибуция: указать автора (Ilya Kantor) исходного кода и эту лицензию.
+ - В некоммерческих целях.
+ - Переделанные вами части должны быть доступны на этих же условиях.
+
+Это было совсем краткое изложение лицензии,
+более полный текст которой находится на https://creativecommons.org/licenses/by-nc-sa/3.0/,
+а юридически оформленный -- на https://creativecommons.org/licenses/by-nc-sa/3.0/legalcode.
+
+Если для вашего проекта нужна другая лицензия - напишите мне: iliakan@javascript.ru.
+
diff --git a/README.md b/README.md
index 83b578c01..02f5b9145 100755
--- a/README.md
+++ b/README.md
@@ -1,46 +1,47 @@
-**Всем желающим предлагается поучаствовать в разработке новой версии сайта http://javascript.ru на Node.JS, Open Source on GitHub.**
+# Движок javascript.ru на javascript
-О проекте:
+Всем привет!
-* Это сайт по JavaScript и смежным технологиям (AJAX, COMET, Browser APIs...)
-* Сайт достаточно большой и сложный. В новом проекте предусмотрены разделы:
- * учебник (с генерацией PDF)
- * вопрос-ответ
- * тесты знаний
- * онлайн-курсы
- * справочник
- * события
- * работа
-* Логин через соц. сети в том числе, личные сообщения и профиль.
-* Сайт достаточно посещаемый: порядка 1-1.5 млн просмотров в месяц, и их станет больше при успешной реализации.
-* Планируется перевод учебника на английский, после реализации на русском.
-* Основная аудитория - разработчики, так что поддержка старых IE не нужна. Совсем.
+А это исходный код для движка сайта [https://learn.javascript.ru](https://learn.javascript.ru) на платформе Node.JS.
-Так как сайт должен хорошо индексироваться поисковиками, он будет состоять из страниц с переходом между ними, не SPA. Хотя в различных интерфейсах элементы SPA приветствуются.
+
-Мы будем стараться, чтобы сайт работал как можно быстрее. Это означает параллельные запросы к БД и кеширование на сервере и, по возможности, плавную инициализацию на клиенте.
+## Что делаем?
-Сейчас есть существенная часть дизайна и его вёрстка в HTML/SASS.
+* Сайт по JavaScript и смежным технологиям (AJAX, COMET, Browser APIs...)
+* Сайт достаточно посещаемый: порядка 1-1.5 млн просмотров в месяц.
+* Сайт быстрый, генерация страницы до 100мс, лучше до 50мс.
+* Сайт пока на русском, на английском сделаем потом.
+* Сайт для разработчиков, да, кстати, они не пользуются старыми и страшными IE.
-Общий стиль вы можете посмотреть здесь: https://www.dropbox.com/s/mo6yx0ct9rrzic4/Learn_Home.png.
+Профиль юзера на AngularJS, в остальном не SPA, так как контент-сайт.
-RoadMap:
+## Что в опен-сорсе?
-* Определиться с архитектурой проекта, технологиями.
-* Реализовать профиль посетителя, логин через соц. сети, с заглушкой на title-page.
-* Реализовать показ учебника и навигацию по нему, древовидные комментарии с оценками, подгрузкой.
-* Сделать покупку PDF учебника (оформление, приём оплаты, почтовое уведомление, скачивание).
+В опен-сорсе весь код сайта, включая такие аспекты как:
+
+
+Общая архитектура приложения.
+Авторизация, включая через Facebook/Google/VKontakte/Яндекс/Github.
+Элементы e-магазина, включая приём оплаты Paypal/Webmoney/PayAnyWay, через Я.Деньги и другими способами.
+Отправка почты через Mandrill API с обработкой webhook со статусом.
+Транслоадинг и не использующая память/диск (через потоки) загрузка картинок на сервис http://imgur.com.
+Логгер.
+Шаблонизация с Jade + BEM.
+Система сборки на Webpack.
+...
+
-Это примерно соответствует текущему http://learn.javascript.ru. Когда закончим -- будет первый релиз, вместо старого learn.javascript.ru.
+Многие модули из него можно взять и выделить в отдельные проекты, было бы желание.
-Далее или, если будет возможность, параллельно, реализуем вопрос-ответ, справочник, тесты знаний.
+Также в опен-сорсе – текст учебника JavaScript.
+Правда, он в другом репозитории [https://github.com/iliakan/javascript-tutorial](https://github.com/iliakan/javascript-tutorial), здесь только код.
-Обсуждение происходит в чате Node.JS (Skype) , собрание сегодня 24.06.2014 в 11:00 **GMT+2**.
-
-Если не можете войти - напишите мне в Skype, ник: "ilya.a.kantor".
-
-Code Style:
- * https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
- * `use strict`
+Для установки dev-среды см. [INSTALL.md](https://github.com/iliakan/javascript-nodejs/blob/master/Install.md).
+## ♡
+
+Пишите в issues, если есть о чём.
diff --git a/app.js b/app.js
deleted file mode 100755
index 0c6865fac..000000000
--- a/app.js
+++ /dev/null
@@ -1,24 +0,0 @@
-"use strict";
-
-const log = require('lib/log')(module);
-const config = require('config');
-
-const koa = require('koa');
-
-require('models');
-
-const app = koa();
-
-require('setup/static')(app);
-
-require('setup/errors')(app);
-
-require('setup/logger')(app);
-require('setup/bodyParser')(app);
-require('setup/session')(app);
-require('setup/render')(app);
-require('setup/router')(app);
-
-require('./routes')(app);
-
-module.exports = app;
\ No newline at end of file
diff --git a/app/stylesheets/main.styl b/app/stylesheets/main.styl
deleted file mode 100755
index 6eec76731..000000000
--- a/app/stylesheets/main.styl
+++ /dev/null
@@ -1,4 +0,0 @@
-/* :-) */
-h1
- font-style italic
-
diff --git a/archive/.gitkeep b/archive/.gitkeep
new file mode 100644
index 000000000..e69de29bb
diff --git a/assets/about/amax.jpg b/assets/about/amax.jpg
new file mode 100755
index 000000000..f6ba0fc75
Binary files /dev/null and b/assets/about/amax.jpg differ
diff --git a/assets/about/bezart.jpg b/assets/about/bezart.jpg
new file mode 100755
index 000000000..3d629a077
Binary files /dev/null and b/assets/about/bezart.jpg differ
diff --git a/assets/about/csssr.jpg b/assets/about/csssr.jpg
new file mode 100644
index 000000000..18a449c72
Binary files /dev/null and b/assets/about/csssr.jpg differ
diff --git a/assets/about/iliakan.jpg b/assets/about/iliakan.jpg
new file mode 100755
index 000000000..fd52ed4c1
Binary files /dev/null and b/assets/about/iliakan.jpg differ
diff --git a/assets/about/tyv.jpg b/assets/about/tyv.jpg
new file mode 100755
index 000000000..5d8eba4e9
Binary files /dev/null and b/assets/about/tyv.jpg differ
diff --git a/assets/babel-core/browser-polyfill.js b/assets/babel-core/browser-polyfill.js
new file mode 100644
index 000000000..7773ac0a7
--- /dev/null
+++ b/assets/babel-core/browser-polyfill.js
@@ -0,0 +1,3207 @@
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o Array#indexOf
+// true -> Array#includes
+var $ = require('./$');
+module.exports = function(IS_INCLUDES){
+ return function(el /*, fromIndex = 0 */){
+ var O = $.toObject(this)
+ , length = $.toLength(O.length)
+ , index = $.toIndex(arguments[1], length)
+ , value;
+ if(IS_INCLUDES && el != el)while(length > index){
+ value = O[index++];
+ if(value != value)return true;
+ } else for(;length > index; index++)if(IS_INCLUDES || index in O){
+ if(O[index] === el)return IS_INCLUDES || index;
+ } return !IS_INCLUDES && -1;
+ };
+};
+},{"./$":21}],3:[function(require,module,exports){
+'use strict';
+// 0 -> Array#forEach
+// 1 -> Array#map
+// 2 -> Array#filter
+// 3 -> Array#some
+// 4 -> Array#every
+// 5 -> Array#find
+// 6 -> Array#findIndex
+var $ = require('./$')
+ , ctx = require('./$.ctx');
+module.exports = function(TYPE){
+ var IS_MAP = TYPE == 1
+ , IS_FILTER = TYPE == 2
+ , IS_SOME = TYPE == 3
+ , IS_EVERY = TYPE == 4
+ , IS_FIND_INDEX = TYPE == 6
+ , NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
+ return function(callbackfn/*, that = undefined */){
+ var O = Object($.assertDefined(this))
+ , self = $.ES5Object(O)
+ , f = ctx(callbackfn, arguments[1], 3)
+ , length = $.toLength(self.length)
+ , index = 0
+ , result = IS_MAP ? Array(length) : IS_FILTER ? [] : undefined
+ , val, res;
+ for(;length > index; index++)if(NO_HOLES || index in self){
+ val = self[index];
+ res = f(val, index, O);
+ if(TYPE){
+ if(IS_MAP)result[index] = res; // map
+ else if(res)switch(TYPE){
+ case 3: return true; // some
+ case 5: return val; // find
+ case 6: return index; // findIndex
+ case 2: result.push(val); // filter
+ } else if(IS_EVERY)return false; // every
+ }
+ }
+ return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;
+ };
+};
+},{"./$":21,"./$.ctx":11}],4:[function(require,module,exports){
+var $ = require('./$');
+function assert(condition, msg1, msg2){
+ if(!condition)throw TypeError(msg2 ? msg1 + msg2 : msg1);
+}
+assert.def = $.assertDefined;
+assert.fn = function(it){
+ if(!$.isFunction(it))throw TypeError(it + ' is not a function!');
+ return it;
+};
+assert.obj = function(it){
+ if(!$.isObject(it))throw TypeError(it + ' is not an object!');
+ return it;
+};
+assert.inst = function(it, Constructor, name){
+ if(!(it instanceof Constructor))throw TypeError(name + ": use the 'new' operator!");
+ return it;
+};
+module.exports = assert;
+},{"./$":21}],5:[function(require,module,exports){
+var $ = require('./$')
+ , enumKeys = require('./$.enum-keys');
+// 19.1.2.1 Object.assign(target, source, ...)
+/* eslint-disable no-unused-vars */
+module.exports = Object.assign || function assign(target, source){
+/* eslint-enable no-unused-vars */
+ var T = Object($.assertDefined(target))
+ , l = arguments.length
+ , i = 1;
+ while(l > i){
+ var S = $.ES5Object(arguments[i++])
+ , keys = enumKeys(S)
+ , length = keys.length
+ , j = 0
+ , key;
+ while(length > j)T[key = keys[j++]] = S[key];
+ }
+ return T;
+};
+},{"./$":21,"./$.enum-keys":13}],6:[function(require,module,exports){
+var $ = require('./$')
+ , TAG = require('./$.wks')('toStringTag')
+ , toString = {}.toString;
+function cof(it){
+ return toString.call(it).slice(8, -1);
+}
+cof.classof = function(it){
+ var O, T;
+ return it == undefined ? it === undefined ? 'Undefined' : 'Null'
+ : typeof (T = (O = Object(it))[TAG]) == 'string' ? T : cof(O);
+};
+cof.set = function(it, tag, stat){
+ if(it && !$.has(it = stat ? it : it.prototype, TAG))$.hide(it, TAG, tag);
+};
+module.exports = cof;
+},{"./$":21,"./$.wks":32}],7:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , ctx = require('./$.ctx')
+ , safe = require('./$.uid').safe
+ , assert = require('./$.assert')
+ , forOf = require('./$.for-of')
+ , step = require('./$.iter').step
+ , has = $.has
+ , set = $.set
+ , isObject = $.isObject
+ , hide = $.hide
+ , isFrozen = Object.isFrozen || $.core.Object.isFrozen
+ , ID = safe('id')
+ , O1 = safe('O1')
+ , LAST = safe('last')
+ , FIRST = safe('first')
+ , ITER = safe('iter')
+ , SIZE = $.DESC ? safe('size') : 'size'
+ , id = 0;
+
+function fastKey(it, create){
+ // return primitive with prefix
+ if(!isObject(it))return (typeof it == 'string' ? 'S' : 'P') + it;
+ // can't set id to frozen object
+ if(isFrozen(it))return 'F';
+ if(!has(it, ID)){
+ // not necessary to add id
+ if(!create)return 'E';
+ // add missing object id
+ hide(it, ID, ++id);
+ // return object id with prefix
+ } return 'O' + it[ID];
+}
+
+function getEntry(that, key){
+ // fast case
+ var index = fastKey(key), entry;
+ if(index != 'F')return that[O1][index];
+ // frozen object case
+ for(entry = that[FIRST]; entry; entry = entry.n){
+ if(entry.k == key)return entry;
+ }
+}
+
+module.exports = {
+ getConstructor: function(NAME, IS_MAP, ADDER){
+ function C(){
+ var that = assert.inst(this, C, NAME)
+ , iterable = arguments[0];
+ set(that, O1, $.create(null));
+ set(that, SIZE, 0);
+ set(that, LAST, undefined);
+ set(that, FIRST, undefined);
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ }
+ $.mix(C.prototype, {
+ // 23.1.3.1 Map.prototype.clear()
+ // 23.2.3.2 Set.prototype.clear()
+ clear: function clear(){
+ for(var that = this, data = that[O1], entry = that[FIRST]; entry; entry = entry.n){
+ entry.r = true;
+ if(entry.p)entry.p = entry.p.n = undefined;
+ delete data[entry.i];
+ }
+ that[FIRST] = that[LAST] = undefined;
+ that[SIZE] = 0;
+ },
+ // 23.1.3.3 Map.prototype.delete(key)
+ // 23.2.3.4 Set.prototype.delete(value)
+ 'delete': function(key){
+ var that = this
+ , entry = getEntry(that, key);
+ if(entry){
+ var next = entry.n
+ , prev = entry.p;
+ delete that[O1][entry.i];
+ entry.r = true;
+ if(prev)prev.n = next;
+ if(next)next.p = prev;
+ if(that[FIRST] == entry)that[FIRST] = next;
+ if(that[LAST] == entry)that[LAST] = prev;
+ that[SIZE]--;
+ } return !!entry;
+ },
+ // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
+ // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
+ forEach: function forEach(callbackfn /*, that = undefined */){
+ var f = ctx(callbackfn, arguments[1], 3)
+ , entry;
+ while(entry = entry ? entry.n : this[FIRST]){
+ f(entry.v, entry.k, this);
+ // revert to the last existing entry
+ while(entry && entry.r)entry = entry.p;
+ }
+ },
+ // 23.1.3.7 Map.prototype.has(key)
+ // 23.2.3.7 Set.prototype.has(value)
+ has: function has(key){
+ return !!getEntry(this, key);
+ }
+ });
+ if($.DESC)$.setDesc(C.prototype, 'size', {
+ get: function(){
+ return assert.def(this[SIZE]);
+ }
+ });
+ return C;
+ },
+ def: function(that, key, value){
+ var entry = getEntry(that, key)
+ , prev, index;
+ // change existing entry
+ if(entry){
+ entry.v = value;
+ // create new entry
+ } else {
+ that[LAST] = entry = {
+ i: index = fastKey(key, true), // <- index
+ k: key, // <- key
+ v: value, // <- value
+ p: prev = that[LAST], // <- previous entry
+ n: undefined, // <- next entry
+ r: false // <- removed
+ };
+ if(!that[FIRST])that[FIRST] = entry;
+ if(prev)prev.n = entry;
+ that[SIZE]++;
+ // add to index
+ if(index != 'F')that[O1][index] = entry;
+ } return that;
+ },
+ getEntry: getEntry,
+ // add .keys, .values, .entries, [@@iterator]
+ // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
+ setIter: function(C, NAME, IS_MAP){
+ require('./$.iter-define')(C, NAME, function(iterated, kind){
+ set(this, ITER, {o: iterated, k: kind});
+ }, function(){
+ var iter = this[ITER]
+ , kind = iter.k
+ , entry = iter.l;
+ // revert to the last existing entry
+ while(entry && entry.r)entry = entry.p;
+ // get next entry
+ if(!iter.o || !(iter.l = entry = entry ? entry.n : iter.o[FIRST])){
+ // or finish the iteration
+ iter.o = undefined;
+ return step(1);
+ }
+ // return step by kind
+ if(kind == 'keys' )return step(0, entry.k);
+ if(kind == 'values')return step(0, entry.v);
+ return step(0, [entry.k, entry.v]);
+ }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true);
+ }
+};
+},{"./$":21,"./$.assert":4,"./$.ctx":11,"./$.for-of":14,"./$.iter":20,"./$.iter-define":18,"./$.uid":30}],8:[function(require,module,exports){
+// https://github.com/DavidBruant/Map-Set.prototype.toJSON
+var $def = require('./$.def')
+ , forOf = require('./$.for-of');
+module.exports = function(NAME){
+ $def($def.P, NAME, {
+ toJSON: function toJSON(){
+ var arr = [];
+ forOf(this, false, arr.push, arr);
+ return arr;
+ }
+ });
+};
+},{"./$.def":12,"./$.for-of":14}],9:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , safe = require('./$.uid').safe
+ , assert = require('./$.assert')
+ , forOf = require('./$.for-of')
+ , _has = $.has
+ , isObject = $.isObject
+ , hide = $.hide
+ , isFrozen = Object.isFrozen || $.core.Object.isFrozen
+ , id = 0
+ , ID = safe('id')
+ , WEAK = safe('weak')
+ , LEAK = safe('leak')
+ , method = require('./$.array-methods')
+ , find = method(5)
+ , findIndex = method(6);
+function findFrozen(store, key){
+ return find.call(store.array, function(it){
+ return it[0] === key;
+ });
+}
+// fallback for frozen keys
+function leakStore(that){
+ return that[LEAK] || hide(that, LEAK, {
+ array: [],
+ get: function(key){
+ var entry = findFrozen(this, key);
+ if(entry)return entry[1];
+ },
+ has: function(key){
+ return !!findFrozen(this, key);
+ },
+ set: function(key, value){
+ var entry = findFrozen(this, key);
+ if(entry)entry[1] = value;
+ else this.array.push([key, value]);
+ },
+ 'delete': function(key){
+ var index = findIndex.call(this.array, function(it){
+ return it[0] === key;
+ });
+ if(~index)this.array.splice(index, 1);
+ return !!~index;
+ }
+ })[LEAK];
+}
+
+module.exports = {
+ getConstructor: function(NAME, IS_MAP, ADDER){
+ function C(){
+ $.set(assert.inst(this, C, NAME), ID, id++);
+ var iterable = arguments[0];
+ if(iterable != undefined)forOf(iterable, IS_MAP, this[ADDER], this);
+ }
+ $.mix(C.prototype, {
+ // 23.3.3.2 WeakMap.prototype.delete(key)
+ // 23.4.3.3 WeakSet.prototype.delete(value)
+ 'delete': function(key){
+ if(!isObject(key))return false;
+ if(isFrozen(key))return leakStore(this)['delete'](key);
+ return _has(key, WEAK) && _has(key[WEAK], this[ID]) && delete key[WEAK][this[ID]];
+ },
+ // 23.3.3.4 WeakMap.prototype.has(key)
+ // 23.4.3.4 WeakSet.prototype.has(value)
+ has: function has(key){
+ if(!isObject(key))return false;
+ if(isFrozen(key))return leakStore(this).has(key);
+ return _has(key, WEAK) && _has(key[WEAK], this[ID]);
+ }
+ });
+ return C;
+ },
+ def: function(that, key, value){
+ if(isFrozen(assert.obj(key))){
+ leakStore(that).set(key, value);
+ } else {
+ _has(key, WEAK) || hide(key, WEAK, {});
+ key[WEAK][that[ID]] = value;
+ } return that;
+ },
+ leakStore: leakStore,
+ WEAK: WEAK,
+ ID: ID
+};
+},{"./$":21,"./$.array-methods":3,"./$.assert":4,"./$.for-of":14,"./$.uid":30}],10:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , $def = require('./$.def')
+ , BUGGY = require('./$.iter').BUGGY
+ , forOf = require('./$.for-of')
+ , species = require('./$.species')
+ , assertInstance = require('./$.assert').inst;
+
+module.exports = function(NAME, methods, common, IS_MAP, IS_WEAK){
+ var Base = $.g[NAME]
+ , C = Base
+ , ADDER = IS_MAP ? 'set' : 'add'
+ , proto = C && C.prototype
+ , O = {};
+ function fixMethod(KEY, CHAIN){
+ var method = proto[KEY];
+ if($.FW)proto[KEY] = function(a, b){
+ var result = method.call(this, a === 0 ? 0 : a, b);
+ return CHAIN ? this : result;
+ };
+ }
+ if(!$.isFunction(C) || !(IS_WEAK || !BUGGY && proto.forEach && proto.entries)){
+ // create collection constructor
+ C = common.getConstructor(NAME, IS_MAP, ADDER);
+ $.mix(C.prototype, methods);
+ } else {
+ var inst = new C
+ , chain = inst[ADDER](IS_WEAK ? {} : -0, 1)
+ , buggyZero;
+ // wrap for init collections from iterable
+ if(!require('./$.iter-detect')(function(iter){ new C(iter); })){ // eslint-disable-line no-new
+ C = function(){
+ assertInstance(this, C, NAME);
+ var that = new Base
+ , iterable = arguments[0];
+ if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that);
+ return that;
+ };
+ C.prototype = proto;
+ if($.FW)proto.constructor = C;
+ }
+ IS_WEAK || inst.forEach(function(val, key){
+ buggyZero = 1 / key === -Infinity;
+ });
+ // fix converting -0 key to +0
+ if(buggyZero){
+ fixMethod('delete');
+ fixMethod('has');
+ IS_MAP && fixMethod('get');
+ }
+ // + fix .add & .set for chaining
+ if(buggyZero || chain !== inst)fixMethod(ADDER, true);
+ }
+
+ require('./$.cof').set(C, NAME);
+
+ O[NAME] = C;
+ $def($def.G + $def.W + $def.F * (C != Base), O);
+ species(C);
+ species($.core[NAME]); // for wrapper
+
+ if(!IS_WEAK)common.setIter(C, NAME, IS_MAP);
+
+ return C;
+};
+},{"./$":21,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.for-of":14,"./$.iter":20,"./$.iter-detect":19,"./$.species":27}],11:[function(require,module,exports){
+// Optional / simple context binding
+var assertFunction = require('./$.assert').fn;
+module.exports = function(fn, that, length){
+ assertFunction(fn);
+ if(~length && that === undefined)return fn;
+ switch(length){
+ case 1: return function(a){
+ return fn.call(that, a);
+ };
+ case 2: return function(a, b){
+ return fn.call(that, a, b);
+ };
+ case 3: return function(a, b, c){
+ return fn.call(that, a, b, c);
+ };
+ } return function(/* ...args */){
+ return fn.apply(that, arguments);
+ };
+};
+},{"./$.assert":4}],12:[function(require,module,exports){
+var $ = require('./$')
+ , global = $.g
+ , core = $.core
+ , isFunction = $.isFunction;
+function ctx(fn, that){
+ return function(){
+ return fn.apply(that, arguments);
+ };
+}
+global.core = core;
+// type bitmap
+$def.F = 1; // forced
+$def.G = 2; // global
+$def.S = 4; // static
+$def.P = 8; // proto
+$def.B = 16; // bind
+$def.W = 32; // wrap
+function $def(type, name, source){
+ var key, own, out, exp
+ , isGlobal = type & $def.G
+ , target = isGlobal ? global : type & $def.S
+ ? global[name] : (global[name] || {}).prototype
+ , exports = isGlobal ? core : core[name] || (core[name] = {});
+ if(isGlobal)source = name;
+ for(key in source){
+ // contains in native
+ own = !(type & $def.F) && target && key in target;
+ // export native or passed
+ out = (own ? target : source)[key];
+ // bind timers to global for call from export context
+ if(type & $def.B && own)exp = ctx(out, global);
+ else exp = type & $def.P && isFunction(out) ? ctx(Function.call, out) : out;
+ // extend global
+ if(target && !own){
+ if(isGlobal)target[key] = out;
+ else delete target[key] && $.hide(target, key, out);
+ }
+ // export
+ if(exports[key] != out)$.hide(exports, key, exp);
+ }
+}
+module.exports = $def;
+},{"./$":21}],13:[function(require,module,exports){
+var $ = require('./$');
+module.exports = function(it){
+ var keys = $.getKeys(it)
+ , getDesc = $.getDesc
+ , getSymbols = $.getSymbols;
+ if(getSymbols)$.each.call(getSymbols(it), function(key){
+ if(getDesc(it, key).enumerable)keys.push(key);
+ });
+ return keys;
+};
+},{"./$":21}],14:[function(require,module,exports){
+var ctx = require('./$.ctx')
+ , get = require('./$.iter').get
+ , call = require('./$.iter-call');
+module.exports = function(iterable, entries, fn, that){
+ var iterator = get(iterable)
+ , f = ctx(fn, that, entries ? 2 : 1)
+ , step;
+ while(!(step = iterator.next()).done){
+ if(call(iterator, f, step.value, entries) === false){
+ return call.close(iterator);
+ }
+ }
+};
+},{"./$.ctx":11,"./$.iter":20,"./$.iter-call":17}],15:[function(require,module,exports){
+module.exports = function($){
+ $.FW = true;
+ $.path = $.g;
+ return $;
+};
+},{}],16:[function(require,module,exports){
+// Fast apply
+// http://jsperf.lnkit.com/fast-apply/5
+module.exports = function(fn, args, that){
+ var un = that === undefined;
+ switch(args.length){
+ case 0: return un ? fn()
+ : fn.call(that);
+ case 1: return un ? fn(args[0])
+ : fn.call(that, args[0]);
+ case 2: return un ? fn(args[0], args[1])
+ : fn.call(that, args[0], args[1]);
+ case 3: return un ? fn(args[0], args[1], args[2])
+ : fn.call(that, args[0], args[1], args[2]);
+ case 4: return un ? fn(args[0], args[1], args[2], args[3])
+ : fn.call(that, args[0], args[1], args[2], args[3]);
+ case 5: return un ? fn(args[0], args[1], args[2], args[3], args[4])
+ : fn.call(that, args[0], args[1], args[2], args[3], args[4]);
+ } return fn.apply(that, args);
+};
+},{}],17:[function(require,module,exports){
+var assertObject = require('./$.assert').obj;
+function close(iterator){
+ var ret = iterator['return'];
+ if(ret !== undefined)assertObject(ret.call(iterator));
+}
+function call(iterator, fn, value, entries){
+ try {
+ return entries ? fn(assertObject(value)[0], value[1]) : fn(value);
+ } catch(e){
+ close(iterator);
+ throw e;
+ }
+}
+call.close = close;
+module.exports = call;
+},{"./$.assert":4}],18:[function(require,module,exports){
+var $def = require('./$.def')
+ , $ = require('./$')
+ , cof = require('./$.cof')
+ , $iter = require('./$.iter')
+ , SYMBOL_ITERATOR = require('./$.wks')('iterator')
+ , FF_ITERATOR = '@@iterator'
+ , VALUES = 'values'
+ , Iterators = $iter.Iterators;
+module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCE){
+ $iter.create(Constructor, NAME, next);
+ function createMethod(kind){
+ return function(){
+ return new Constructor(this, kind);
+ };
+ }
+ var TAG = NAME + ' Iterator'
+ , proto = Base.prototype
+ , _native = proto[SYMBOL_ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]
+ , _default = _native || createMethod(DEFAULT)
+ , methods, key;
+ // Fix native
+ if(_native){
+ var IteratorPrototype = $.getProto(_default.call(new Base));
+ // Set @@toStringTag to native iterators
+ cof.set(IteratorPrototype, TAG, true);
+ // FF fix
+ if($.FW && $.has(proto, FF_ITERATOR))$iter.set(IteratorPrototype, $.that);
+ }
+ // Define iterator
+ if($.FW)$iter.set(proto, _default);
+ // Plug for library
+ Iterators[NAME] = _default;
+ Iterators[TAG] = $.that;
+ if(DEFAULT){
+ methods = {
+ keys: IS_SET ? _default : createMethod('keys'),
+ values: DEFAULT == VALUES ? _default : createMethod(VALUES),
+ entries: DEFAULT != VALUES ? _default : createMethod('entries')
+ };
+ if(FORCE)for(key in methods){
+ if(!(key in proto))$.hide(proto, key, methods[key]);
+ } else $def($def.P + $def.F * $iter.BUGGY, NAME, methods);
+ }
+};
+},{"./$":21,"./$.cof":6,"./$.def":12,"./$.iter":20,"./$.wks":32}],19:[function(require,module,exports){
+var SYMBOL_ITERATOR = require('./$.wks')('iterator')
+ , SAFE_CLOSING = false;
+try {
+ var riter = [7][SYMBOL_ITERATOR]();
+ riter['return'] = function(){ SAFE_CLOSING = true; };
+ Array.from(riter, function(){ throw 2; });
+} catch(e){ /* empty */ }
+module.exports = function(exec){
+ if(!SAFE_CLOSING)return false;
+ var safe = false;
+ try {
+ var arr = [7]
+ , iter = arr[SYMBOL_ITERATOR]();
+ iter.next = function(){ safe = true; };
+ arr[SYMBOL_ITERATOR] = function(){ return iter; };
+ exec(arr);
+ } catch(e){ /* empty */ }
+ return safe;
+};
+},{"./$.wks":32}],20:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , cof = require('./$.cof')
+ , assertObject = require('./$.assert').obj
+ , SYMBOL_ITERATOR = require('./$.wks')('iterator')
+ , FF_ITERATOR = '@@iterator'
+ , Iterators = {}
+ , IteratorPrototype = {};
+// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
+setIterator(IteratorPrototype, $.that);
+function setIterator(O, value){
+ $.hide(O, SYMBOL_ITERATOR, value);
+ // Add iterator for FF iterator protocol
+ if(FF_ITERATOR in [])$.hide(O, FF_ITERATOR, value);
+}
+
+module.exports = {
+ // Safari has buggy iterators w/o `next`
+ BUGGY: 'keys' in [] && !('next' in [].keys()),
+ Iterators: Iterators,
+ step: function(done, value){
+ return {value: value, done: !!done};
+ },
+ is: function(it){
+ var O = Object(it)
+ , Symbol = $.g.Symbol
+ , SYM = Symbol && Symbol.iterator || FF_ITERATOR;
+ return SYM in O || SYMBOL_ITERATOR in O || $.has(Iterators, cof.classof(O));
+ },
+ get: function(it){
+ var Symbol = $.g.Symbol
+ , ext = it[Symbol && Symbol.iterator || FF_ITERATOR]
+ , getIter = ext || it[SYMBOL_ITERATOR] || Iterators[cof.classof(it)];
+ return assertObject(getIter.call(it));
+ },
+ set: setIterator,
+ create: function(Constructor, NAME, next, proto){
+ Constructor.prototype = $.create(proto || IteratorPrototype, {next: $.desc(1, next)});
+ cof.set(Constructor, NAME + ' Iterator');
+ }
+};
+},{"./$":21,"./$.assert":4,"./$.cof":6,"./$.wks":32}],21:[function(require,module,exports){
+'use strict';
+var global = typeof self != 'undefined' ? self : Function('return this')()
+ , core = {}
+ , defineProperty = Object.defineProperty
+ , hasOwnProperty = {}.hasOwnProperty
+ , ceil = Math.ceil
+ , floor = Math.floor
+ , max = Math.max
+ , min = Math.min;
+// The engine works fine with descriptors? Thank's IE8 for his funny defineProperty.
+var DESC = !!function(){
+ try {
+ return defineProperty({}, 'a', {get: function(){ return 2; }}).a == 2;
+ } catch(e){ /* empty */ }
+}();
+var hide = createDefiner(1);
+// 7.1.4 ToInteger
+function toInteger(it){
+ return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
+}
+function desc(bitmap, value){
+ return {
+ enumerable : !(bitmap & 1),
+ configurable: !(bitmap & 2),
+ writable : !(bitmap & 4),
+ value : value
+ };
+}
+function simpleSet(object, key, value){
+ object[key] = value;
+ return object;
+}
+function createDefiner(bitmap){
+ return DESC ? function(object, key, value){
+ return $.setDesc(object, key, desc(bitmap, value));
+ } : simpleSet;
+}
+
+function isObject(it){
+ return it !== null && (typeof it == 'object' || typeof it == 'function');
+}
+function isFunction(it){
+ return typeof it == 'function';
+}
+function assertDefined(it){
+ if(it == undefined)throw TypeError("Can't call method on " + it);
+ return it;
+}
+
+var $ = module.exports = require('./$.fw')({
+ g: global,
+ core: core,
+ html: global.document && document.documentElement,
+ // http://jsperf.com/core-js-isobject
+ isObject: isObject,
+ isFunction: isFunction,
+ it: function(it){
+ return it;
+ },
+ that: function(){
+ return this;
+ },
+ // 7.1.4 ToInteger
+ toInteger: toInteger,
+ // 7.1.15 ToLength
+ toLength: function(it){
+ return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991
+ },
+ toIndex: function(index, length){
+ index = toInteger(index);
+ return index < 0 ? max(index + length, 0) : min(index, length);
+ },
+ has: function(it, key){
+ return hasOwnProperty.call(it, key);
+ },
+ create: Object.create,
+ getProto: Object.getPrototypeOf,
+ DESC: DESC,
+ desc: desc,
+ getDesc: Object.getOwnPropertyDescriptor,
+ setDesc: defineProperty,
+ setDescs: Object.defineProperties,
+ getKeys: Object.keys,
+ getNames: Object.getOwnPropertyNames,
+ getSymbols: Object.getOwnPropertySymbols,
+ assertDefined: assertDefined,
+ // Dummy, fix for not array-like ES3 string in es5 module
+ ES5Object: Object,
+ toObject: function(it){
+ return $.ES5Object(assertDefined(it));
+ },
+ hide: hide,
+ def: createDefiner(0),
+ set: global.Symbol ? simpleSet : hide,
+ mix: function(target, src){
+ for(var key in src)hide(target, key, src[key]);
+ return target;
+ },
+ each: [].forEach
+});
+/* eslint-disable no-undef */
+if(typeof __e != 'undefined')__e = core;
+if(typeof __g != 'undefined')__g = global;
+},{"./$.fw":15}],22:[function(require,module,exports){
+var $ = require('./$');
+module.exports = function(object, el){
+ var O = $.toObject(object)
+ , keys = $.getKeys(O)
+ , length = keys.length
+ , index = 0
+ , key;
+ while(length > index)if(O[key = keys[index++]] === el)return key;
+};
+},{"./$":21}],23:[function(require,module,exports){
+var $ = require('./$')
+ , assertObject = require('./$.assert').obj;
+module.exports = function ownKeys(it){
+ assertObject(it);
+ var keys = $.getNames(it)
+ , getSymbols = $.getSymbols;
+ return getSymbols ? keys.concat(getSymbols(it)) : keys;
+};
+},{"./$":21,"./$.assert":4}],24:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , invoke = require('./$.invoke')
+ , assertFunction = require('./$.assert').fn;
+module.exports = function(/* ...pargs */){
+ var fn = assertFunction(this)
+ , length = arguments.length
+ , pargs = Array(length)
+ , i = 0
+ , _ = $.path._
+ , holder = false;
+ while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true;
+ return function(/* ...args */){
+ var that = this
+ , _length = arguments.length
+ , j = 0, k = 0, args;
+ if(!holder && !_length)return invoke(fn, pargs, that);
+ args = pargs.slice();
+ if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++];
+ while(_length > k)args.push(arguments[k++]);
+ return invoke(fn, args, that);
+ };
+};
+},{"./$":21,"./$.assert":4,"./$.invoke":16}],25:[function(require,module,exports){
+'use strict';
+module.exports = function(regExp, replace, isStatic){
+ var replacer = replace === Object(replace) ? function(part){
+ return replace[part];
+ } : replace;
+ return function(it){
+ return String(isStatic ? it : this).replace(regExp, replacer);
+ };
+};
+},{}],26:[function(require,module,exports){
+// Works with __proto__ only. Old v8 can't work with null proto objects.
+/* eslint-disable no-proto */
+var $ = require('./$')
+ , assert = require('./$.assert');
+function check(O, proto){
+ assert.obj(O);
+ assert(proto === null || $.isObject(proto), proto, ": can't set as prototype!");
+}
+module.exports = {
+ set: Object.setPrototypeOf || ('__proto__' in {} // eslint-disable-line
+ ? function(buggy, set){
+ try {
+ set = require('./$.ctx')(Function.call, $.getDesc(Object.prototype, '__proto__').set, 2);
+ set({}, []);
+ } catch(e){ buggy = true; }
+ return function setPrototypeOf(O, proto){
+ check(O, proto);
+ if(buggy)O.__proto__ = proto;
+ else set(O, proto);
+ return O;
+ };
+ }()
+ : undefined),
+ check: check
+};
+},{"./$":21,"./$.assert":4,"./$.ctx":11}],27:[function(require,module,exports){
+var $ = require('./$')
+ , SPECIES = require('./$.wks')('species');
+module.exports = function(C){
+ if($.DESC && !(SPECIES in C))$.setDesc(C, SPECIES, {
+ configurable: true,
+ get: $.that
+ });
+};
+},{"./$":21,"./$.wks":32}],28:[function(require,module,exports){
+'use strict';
+// true -> String#at
+// false -> String#codePointAt
+var $ = require('./$');
+module.exports = function(TO_STRING){
+ return function(pos){
+ var s = String($.assertDefined(this))
+ , i = $.toInteger(pos)
+ , l = s.length
+ , a, b;
+ if(i < 0 || i >= l)return TO_STRING ? '' : undefined;
+ a = s.charCodeAt(i);
+ return a < 0xd800 || a > 0xdbff || i + 1 === l
+ || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff
+ ? TO_STRING ? s.charAt(i) : a
+ : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
+ };
+};
+},{"./$":21}],29:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , ctx = require('./$.ctx')
+ , cof = require('./$.cof')
+ , invoke = require('./$.invoke')
+ , global = $.g
+ , isFunction = $.isFunction
+ , html = $.html
+ , document = global.document
+ , process = global.process
+ , setTask = global.setImmediate
+ , clearTask = global.clearImmediate
+ , postMessage = global.postMessage
+ , addEventListener = global.addEventListener
+ , MessageChannel = global.MessageChannel
+ , counter = 0
+ , queue = {}
+ , ONREADYSTATECHANGE = 'onreadystatechange'
+ , defer, channel, port;
+function run(){
+ var id = +this;
+ if($.has(queue, id)){
+ var fn = queue[id];
+ delete queue[id];
+ fn();
+ }
+}
+function listner(event){
+ run.call(event.data);
+}
+// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
+if(!isFunction(setTask) || !isFunction(clearTask)){
+ setTask = function(fn){
+ var args = [], i = 1;
+ while(arguments.length > i)args.push(arguments[i++]);
+ queue[++counter] = function(){
+ invoke(isFunction(fn) ? fn : Function(fn), args);
+ };
+ defer(counter);
+ return counter;
+ };
+ clearTask = function(id){
+ delete queue[id];
+ };
+ // Node.js 0.8-
+ if(cof(process) == 'process'){
+ defer = function(id){
+ process.nextTick(ctx(run, id, 1));
+ };
+ // Modern browsers, skip implementation for WebWorkers
+ // IE8 has postMessage, but it's sync & typeof its postMessage is object
+ } else if(addEventListener && isFunction(postMessage) && !global.importScripts){
+ defer = function(id){
+ postMessage(id, '*');
+ };
+ addEventListener('message', listner, false);
+ // WebWorkers
+ } else if(isFunction(MessageChannel)){
+ channel = new MessageChannel;
+ port = channel.port2;
+ channel.port1.onmessage = listner;
+ defer = ctx(port.postMessage, port, 1);
+ // IE8-
+ } else if(document && ONREADYSTATECHANGE in document.createElement('script')){
+ defer = function(id){
+ html.appendChild(document.createElement('script'))[ONREADYSTATECHANGE] = function(){
+ html.removeChild(this);
+ run.call(id);
+ };
+ };
+ // Rest old browsers
+ } else {
+ defer = function(id){
+ setTimeout(ctx(run, id, 1), 0);
+ };
+ }
+}
+module.exports = {
+ set: setTask,
+ clear: clearTask
+};
+},{"./$":21,"./$.cof":6,"./$.ctx":11,"./$.invoke":16}],30:[function(require,module,exports){
+var sid = 0;
+function uid(key){
+ return 'Symbol(' + key + ')_' + (++sid + Math.random()).toString(36);
+}
+uid.safe = require('./$').g.Symbol || uid;
+module.exports = uid;
+},{"./$":21}],31:[function(require,module,exports){
+// 22.1.3.31 Array.prototype[@@unscopables]
+var $ = require('./$')
+ , UNSCOPABLES = require('./$.wks')('unscopables');
+if($.FW && !(UNSCOPABLES in []))$.hide(Array.prototype, UNSCOPABLES, {});
+module.exports = function(key){
+ if($.FW)[][UNSCOPABLES][key] = true;
+};
+},{"./$":21,"./$.wks":32}],32:[function(require,module,exports){
+var global = require('./$').g
+ , store = {};
+module.exports = function(name){
+ return store[name] || (store[name] =
+ global.Symbol && global.Symbol[name] || require('./$.uid').safe('Symbol.' + name));
+};
+},{"./$":21,"./$.uid":30}],33:[function(require,module,exports){
+var $ = require('./$')
+ , cof = require('./$.cof')
+ , $def = require('./$.def')
+ , invoke = require('./$.invoke')
+ , arrayMethod = require('./$.array-methods')
+ , IE_PROTO = require('./$.uid').safe('__proto__')
+ , assert = require('./$.assert')
+ , assertObject = assert.obj
+ , ObjectProto = Object.prototype
+ , A = []
+ , slice = A.slice
+ , indexOf = A.indexOf
+ , classof = cof.classof
+ , has = $.has
+ , defineProperty = $.setDesc
+ , getOwnDescriptor = $.getDesc
+ , defineProperties = $.setDescs
+ , isFunction = $.isFunction
+ , toObject = $.toObject
+ , toLength = $.toLength
+ , IE8_DOM_DEFINE = false;
+
+if(!$.DESC){
+ try {
+ IE8_DOM_DEFINE = defineProperty(document.createElement('div'), 'x',
+ {get: function(){ return 8; }}
+ ).x == 8;
+ } catch(e){ /* empty */ }
+ $.setDesc = function(O, P, Attributes){
+ if(IE8_DOM_DEFINE)try {
+ return defineProperty(O, P, Attributes);
+ } catch(e){ /* empty */ }
+ if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!');
+ if('value' in Attributes)assertObject(O)[P] = Attributes.value;
+ return O;
+ };
+ $.getDesc = function(O, P){
+ if(IE8_DOM_DEFINE)try {
+ return getOwnDescriptor(O, P);
+ } catch(e){ /* empty */ }
+ if(has(O, P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]);
+ };
+ $.setDescs = defineProperties = function(O, Properties){
+ assertObject(O);
+ var keys = $.getKeys(Properties)
+ , length = keys.length
+ , i = 0
+ , P;
+ while(length > i)$.setDesc(O, P = keys[i++], Properties[P]);
+ return O;
+ };
+}
+$def($def.S + $def.F * !$.DESC, 'Object', {
+ // 19.1.2.6 / 15.2.3.3 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: $.getDesc,
+ // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
+ defineProperty: $.setDesc,
+ // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties)
+ defineProperties: defineProperties
+});
+
+ // IE 8- don't enum bug keys
+var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' +
+ 'toLocaleString,toString,valueOf').split(',')
+ // Additional keys for getOwnPropertyNames
+ , keys2 = keys1.concat('length', 'prototype')
+ , keysLen1 = keys1.length;
+
+// Create object with `null` prototype: use iframe Object with cleared prototype
+var createDict = function(){
+ // Thrash, waste and sodomy: IE GC bug
+ var iframe = document.createElement('iframe')
+ , i = keysLen1
+ , gt = '>'
+ , iframeDocument;
+ iframe.style.display = 'none';
+ $.html.appendChild(iframe);
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
+ // createDict = iframe.contentWindow.Object;
+ // html.removeChild(iframe);
+ iframeDocument = iframe.contentWindow.document;
+ iframeDocument.open();
+ iframeDocument.write(' i)if(has(O, key = names[i++])){
+ ~indexOf.call(result, key) || result.push(key);
+ }
+ return result;
+ };
+}
+function isPrimitive(it){ return !$.isObject(it); }
+function Empty(){}
+$def($def.S, 'Object', {
+ // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)
+ getPrototypeOf: $.getProto = $.getProto || function(O){
+ O = Object(assert.def(O));
+ if(has(O, IE_PROTO))return O[IE_PROTO];
+ if(isFunction(O.constructor) && O instanceof O.constructor){
+ return O.constructor.prototype;
+ } return O instanceof Object ? ObjectProto : null;
+ },
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true),
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
+ create: $.create = $.create || function(O, /*?*/Properties){
+ var result;
+ if(O !== null){
+ Empty.prototype = assertObject(O);
+ result = new Empty();
+ Empty.prototype = null;
+ // add "__proto__" for Object.getPrototypeOf shim
+ result[IE_PROTO] = O;
+ } else result = createDict();
+ return Properties === undefined ? result : defineProperties(result, Properties);
+ },
+ // 19.1.2.14 / 15.2.3.14 Object.keys(O)
+ keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false),
+ // 19.1.2.17 / 15.2.3.8 Object.seal(O)
+ seal: $.it, // <- cap
+ // 19.1.2.5 / 15.2.3.9 Object.freeze(O)
+ freeze: $.it, // <- cap
+ // 19.1.2.15 / 15.2.3.10 Object.preventExtensions(O)
+ preventExtensions: $.it, // <- cap
+ // 19.1.2.13 / 15.2.3.11 Object.isSealed(O)
+ isSealed: isPrimitive, // <- cap
+ // 19.1.2.12 / 15.2.3.12 Object.isFrozen(O)
+ isFrozen: isPrimitive, // <- cap
+ // 19.1.2.11 / 15.2.3.13 Object.isExtensible(O)
+ isExtensible: $.isObject // <- cap
+});
+
+// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...)
+$def($def.P, 'Function', {
+ bind: function(that /*, args... */){
+ var fn = assert.fn(this)
+ , partArgs = slice.call(arguments, 1);
+ function bound(/* args... */){
+ var args = partArgs.concat(slice.call(arguments));
+ return invoke(fn, args, this instanceof bound ? $.create(fn.prototype) : that);
+ }
+ if(fn.prototype)bound.prototype = fn.prototype;
+ return bound;
+ }
+});
+
+// Fix for not array-like ES3 string
+function arrayMethodFix(fn){
+ return function(){
+ return fn.apply($.ES5Object(this), arguments);
+ };
+}
+if(!(0 in Object('z') && 'z'[0] == 'z')){
+ $.ES5Object = function(it){
+ return cof(it) == 'String' ? it.split('') : Object(it);
+ };
+}
+$def($def.P + $def.F * ($.ES5Object != Object), 'Array', {
+ slice: arrayMethodFix(slice),
+ join: arrayMethodFix(A.join)
+});
+
+// 22.1.2.2 / 15.4.3.2 Array.isArray(arg)
+$def($def.S, 'Array', {
+ isArray: function(arg){
+ return cof(arg) == 'Array';
+ }
+});
+function createArrayReduce(isRight){
+ return function(callbackfn, memo){
+ assert.fn(callbackfn);
+ var O = toObject(this)
+ , length = toLength(O.length)
+ , index = isRight ? length - 1 : 0
+ , i = isRight ? -1 : 1;
+ if(arguments.length < 2)for(;;){
+ if(index in O){
+ memo = O[index];
+ index += i;
+ break;
+ }
+ index += i;
+ assert(isRight ? index >= 0 : length > index, 'Reduce of empty array with no initial value');
+ }
+ for(;isRight ? index >= 0 : length > index; index += i)if(index in O){
+ memo = callbackfn(memo, O[index], index, this);
+ }
+ return memo;
+ };
+}
+$def($def.P, 'Array', {
+ // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg])
+ forEach: $.each = $.each || arrayMethod(0),
+ // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg])
+ map: arrayMethod(1),
+ // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])
+ filter: arrayMethod(2),
+ // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg])
+ some: arrayMethod(3),
+ // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg])
+ every: arrayMethod(4),
+ // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue])
+ reduce: createArrayReduce(false),
+ // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
+ reduceRight: createArrayReduce(true),
+ // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
+ indexOf: indexOf = indexOf || require('./$.array-includes')(false),
+ // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex])
+ lastIndexOf: function(el, fromIndex /* = @[*-1] */){
+ var O = toObject(this)
+ , length = toLength(O.length)
+ , index = length - 1;
+ if(arguments.length > 1)index = Math.min(index, $.toInteger(fromIndex));
+ if(index < 0)index = toLength(length + index);
+ for(;index >= 0; index--)if(index in O)if(O[index] === el)return index;
+ return -1;
+ }
+});
+
+// 21.1.3.25 / 15.5.4.20 String.prototype.trim()
+$def($def.P, 'String', {trim: require('./$.replacer')(/^\s*([\s\S]*\S)?\s*$/, '$1')});
+
+// 20.3.3.1 / 15.9.4.4 Date.now()
+$def($def.S, 'Date', {now: function(){
+ return +new Date;
+}});
+
+function lz(num){
+ return num > 9 ? num : '0' + num;
+}
+
+// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString()
+// PhantomJS and old webkit had a broken Date implementation.
+var date = new Date(-5e13 - 1)
+ , brokenDate = !(date.toISOString && date.toISOString() == '0385-07-25T07:06:39.999Z');
+$def($def.P + $def.F * brokenDate, 'Date', {toISOString: function(){
+ if(!isFinite(this))throw RangeError('Invalid time value');
+ var d = this
+ , y = d.getUTCFullYear()
+ , m = d.getUTCMilliseconds()
+ , s = y < 0 ? '-' : y > 9999 ? '+' : '';
+ return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) +
+ '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) +
+ 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) +
+ ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
+}});
+
+if(classof(function(){ return arguments; }()) == 'Object')cof.classof = function(it){
+ var tag = classof(it);
+ return tag == 'Object' && isFunction(it.callee) ? 'Arguments' : tag;
+};
+},{"./$":21,"./$.array-includes":2,"./$.array-methods":3,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.invoke":16,"./$.replacer":25,"./$.uid":30}],34:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , $def = require('./$.def')
+ , toIndex = $.toIndex;
+$def($def.P, 'Array', {
+ // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length)
+ copyWithin: function copyWithin(target/* = 0 */, start /* = 0, end = @length */){
+ var O = Object($.assertDefined(this))
+ , len = $.toLength(O.length)
+ , to = toIndex(target, len)
+ , from = toIndex(start, len)
+ , end = arguments[2]
+ , fin = end === undefined ? len : toIndex(end, len)
+ , count = Math.min(fin - from, len - to)
+ , inc = 1;
+ if(from < to && to < from + count){
+ inc = -1;
+ from = from + count - 1;
+ to = to + count - 1;
+ }
+ while(count-- > 0){
+ if(from in O)O[to] = O[from];
+ else delete O[to];
+ to += inc;
+ from += inc;
+ } return O;
+ }
+});
+require('./$.unscope')('copyWithin');
+},{"./$":21,"./$.def":12,"./$.unscope":31}],35:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , $def = require('./$.def')
+ , toIndex = $.toIndex;
+$def($def.P, 'Array', {
+ // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length)
+ fill: function fill(value /*, start = 0, end = @length */){
+ var O = Object($.assertDefined(this))
+ , length = $.toLength(O.length)
+ , index = toIndex(arguments[1], length)
+ , end = arguments[2]
+ , endPos = end === undefined ? length : toIndex(end, length);
+ while(endPos > index)O[index++] = value;
+ return O;
+ }
+});
+require('./$.unscope')('fill');
+},{"./$":21,"./$.def":12,"./$.unscope":31}],36:[function(require,module,exports){
+var $def = require('./$.def');
+$def($def.P, 'Array', {
+ // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined)
+ findIndex: require('./$.array-methods')(6)
+});
+require('./$.unscope')('findIndex');
+},{"./$.array-methods":3,"./$.def":12,"./$.unscope":31}],37:[function(require,module,exports){
+var $def = require('./$.def');
+$def($def.P, 'Array', {
+ // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)
+ find: require('./$.array-methods')(5)
+});
+require('./$.unscope')('find');
+},{"./$.array-methods":3,"./$.def":12,"./$.unscope":31}],38:[function(require,module,exports){
+var $ = require('./$')
+ , ctx = require('./$.ctx')
+ , $def = require('./$.def')
+ , $iter = require('./$.iter')
+ , call = require('./$.iter-call');
+$def($def.S + $def.F * !require('./$.iter-detect')(function(iter){ Array.from(iter); }), 'Array', {
+ // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined)
+ from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){
+ var O = Object($.assertDefined(arrayLike))
+ , mapfn = arguments[1]
+ , mapping = mapfn !== undefined
+ , f = mapping ? ctx(mapfn, arguments[2], 2) : undefined
+ , index = 0
+ , length, result, step, iterator;
+ if($iter.is(O)){
+ iterator = $iter.get(O);
+ // strange IE quirks mode bug -> use typeof instead of isFunction
+ result = new (typeof this == 'function' ? this : Array);
+ for(; !(step = iterator.next()).done; index++){
+ result[index] = mapping ? call(iterator, f, [step.value, index], true) : step.value;
+ }
+ } else {
+ // strange IE quirks mode bug -> use typeof instead of isFunction
+ result = new (typeof this == 'function' ? this : Array)(length = $.toLength(O.length));
+ for(; length > index; index++){
+ result[index] = mapping ? f(O[index], index) : O[index];
+ }
+ }
+ result.length = index;
+ return result;
+ }
+});
+},{"./$":21,"./$.ctx":11,"./$.def":12,"./$.iter":20,"./$.iter-call":17,"./$.iter-detect":19}],39:[function(require,module,exports){
+var $ = require('./$')
+ , setUnscope = require('./$.unscope')
+ , ITER = require('./$.uid').safe('iter')
+ , $iter = require('./$.iter')
+ , step = $iter.step
+ , Iterators = $iter.Iterators;
+
+// 22.1.3.4 Array.prototype.entries()
+// 22.1.3.13 Array.prototype.keys()
+// 22.1.3.29 Array.prototype.values()
+// 22.1.3.30 Array.prototype[@@iterator]()
+require('./$.iter-define')(Array, 'Array', function(iterated, kind){
+ $.set(this, ITER, {o: $.toObject(iterated), i: 0, k: kind});
+// 22.1.5.2.1 %ArrayIteratorPrototype%.next()
+}, function(){
+ var iter = this[ITER]
+ , O = iter.o
+ , kind = iter.k
+ , index = iter.i++;
+ if(!O || index >= O.length){
+ iter.o = undefined;
+ return step(1);
+ }
+ if(kind == 'keys' )return step(0, index);
+ if(kind == 'values')return step(0, O[index]);
+ return step(0, [index, O[index]]);
+}, 'values');
+
+// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)
+Iterators.Arguments = Iterators.Array;
+
+setUnscope('keys');
+setUnscope('values');
+setUnscope('entries');
+},{"./$":21,"./$.iter":20,"./$.iter-define":18,"./$.uid":30,"./$.unscope":31}],40:[function(require,module,exports){
+var $def = require('./$.def');
+$def($def.S, 'Array', {
+ // 22.1.2.3 Array.of( ...items)
+ of: function of(/* ...args */){
+ var index = 0
+ , length = arguments.length
+ // strange IE quirks mode bug -> use typeof instead of isFunction
+ , result = new (typeof this == 'function' ? this : Array)(length);
+ while(length > index)result[index] = arguments[index++];
+ result.length = length;
+ return result;
+ }
+});
+},{"./$.def":12}],41:[function(require,module,exports){
+require('./$.species')(Array);
+},{"./$.species":27}],42:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , NAME = 'name'
+ , setDesc = $.setDesc
+ , FunctionProto = Function.prototype;
+// 19.2.4.2 name
+NAME in FunctionProto || $.FW && $.DESC && setDesc(FunctionProto, NAME, {
+ configurable: true,
+ get: function(){
+ var match = String(this).match(/^\s*function ([^ (]*)/)
+ , name = match ? match[1] : '';
+ $.has(this, NAME) || setDesc(this, NAME, $.desc(5, name));
+ return name;
+ },
+ set: function(value){
+ $.has(this, NAME) || setDesc(this, NAME, $.desc(0, value));
+ }
+});
+},{"./$":21}],43:[function(require,module,exports){
+'use strict';
+var strong = require('./$.collection-strong');
+
+// 23.1 Map Objects
+require('./$.collection')('Map', {
+ // 23.1.3.6 Map.prototype.get(key)
+ get: function get(key){
+ var entry = strong.getEntry(this, key);
+ return entry && entry.v;
+ },
+ // 23.1.3.9 Map.prototype.set(key, value)
+ set: function set(key, value){
+ return strong.def(this, key === 0 ? 0 : key, value);
+ }
+}, strong, true);
+},{"./$.collection":10,"./$.collection-strong":7}],44:[function(require,module,exports){
+var Infinity = 1 / 0
+ , $def = require('./$.def')
+ , E = Math.E
+ , pow = Math.pow
+ , abs = Math.abs
+ , exp = Math.exp
+ , log = Math.log
+ , sqrt = Math.sqrt
+ , ceil = Math.ceil
+ , floor = Math.floor
+ , EPSILON = pow(2, -52)
+ , EPSILON32 = pow(2, -23)
+ , MAX32 = pow(2, 127) * (2 - EPSILON32)
+ , MIN32 = pow(2, -126);
+function roundTiesToEven(n){
+ return n + 1 / EPSILON - 1 / EPSILON;
+}
+
+// 20.2.2.28 Math.sign(x)
+function sign(x){
+ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
+}
+// 20.2.2.5 Math.asinh(x)
+function asinh(x){
+ return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1));
+}
+// 20.2.2.14 Math.expm1(x)
+function expm1(x){
+ return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1;
+}
+
+$def($def.S, 'Math', {
+ // 20.2.2.3 Math.acosh(x)
+ acosh: function acosh(x){
+ return (x = +x) < 1 ? NaN : isFinite(x) ? log(x / E + sqrt(x + 1) * sqrt(x - 1) / E) + 1 : x;
+ },
+ // 20.2.2.5 Math.asinh(x)
+ asinh: asinh,
+ // 20.2.2.7 Math.atanh(x)
+ atanh: function atanh(x){
+ return (x = +x) == 0 ? x : log((1 + x) / (1 - x)) / 2;
+ },
+ // 20.2.2.9 Math.cbrt(x)
+ cbrt: function cbrt(x){
+ return sign(x = +x) * pow(abs(x), 1 / 3);
+ },
+ // 20.2.2.11 Math.clz32(x)
+ clz32: function clz32(x){
+ return (x >>>= 0) ? 31 - floor(log(x + 0.5) * Math.LOG2E) : 32;
+ },
+ // 20.2.2.12 Math.cosh(x)
+ cosh: function cosh(x){
+ return (exp(x = +x) + exp(-x)) / 2;
+ },
+ // 20.2.2.14 Math.expm1(x)
+ expm1: expm1,
+ // 20.2.2.16 Math.fround(x)
+ fround: function fround(x){
+ var $abs = abs(x)
+ , $sign = sign(x)
+ , a, result;
+ if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
+ a = (1 + EPSILON32 / EPSILON) * $abs;
+ result = a - (a - $abs);
+ if(result > MAX32 || result != result)return $sign * Infinity;
+ return $sign * result;
+ },
+ // 20.2.2.17 Math.hypot([value1[, value2[, … ]]])
+ hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars
+ var sum = 0
+ , len1 = arguments.length
+ , len2 = len1
+ , args = Array(len1)
+ , larg = -Infinity
+ , arg;
+ while(len1--){
+ arg = args[len1] = +arguments[len1];
+ if(arg == Infinity || arg == -Infinity)return Infinity;
+ if(arg > larg)larg = arg;
+ }
+ larg = arg || 1;
+ while(len2--)sum += pow(args[len2] / larg, 2);
+ return larg * sqrt(sum);
+ },
+ // 20.2.2.18 Math.imul(x, y)
+ imul: function imul(x, y){
+ var UInt16 = 0xffff
+ , xn = +x
+ , yn = +y
+ , xl = UInt16 & xn
+ , yl = UInt16 & yn;
+ return 0 | xl * yl + ((UInt16 & xn >>> 16) * yl + xl * (UInt16 & yn >>> 16) << 16 >>> 0);
+ },
+ // 20.2.2.20 Math.log1p(x)
+ log1p: function log1p(x){
+ return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x);
+ },
+ // 20.2.2.21 Math.log10(x)
+ log10: function log10(x){
+ return log(x) / Math.LN10;
+ },
+ // 20.2.2.22 Math.log2(x)
+ log2: function log2(x){
+ return log(x) / Math.LN2;
+ },
+ // 20.2.2.28 Math.sign(x)
+ sign: sign,
+ // 20.2.2.30 Math.sinh(x)
+ sinh: function sinh(x){
+ return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2);
+ },
+ // 20.2.2.33 Math.tanh(x)
+ tanh: function tanh(x){
+ var a = expm1(x = +x)
+ , b = expm1(-x);
+ return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
+ },
+ // 20.2.2.34 Math.trunc(x)
+ trunc: function trunc(it){
+ return (it > 0 ? floor : ceil)(it);
+ }
+});
+},{"./$.def":12}],45:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , isObject = $.isObject
+ , isFunction = $.isFunction
+ , NUMBER = 'Number'
+ , Number = $.g[NUMBER]
+ , Base = Number
+ , proto = Number.prototype;
+function toPrimitive(it){
+ var fn, val;
+ if(isFunction(fn = it.valueOf) && !isObject(val = fn.call(it)))return val;
+ if(isFunction(fn = it.toString) && !isObject(val = fn.call(it)))return val;
+ throw TypeError("Can't convert object to number");
+}
+function toNumber(it){
+ if(isObject(it))it = toPrimitive(it);
+ if(typeof it == 'string' && it.length > 2 && it.charCodeAt(0) == 48){
+ var binary = false;
+ switch(it.charCodeAt(1)){
+ case 66 : case 98 : binary = true;
+ case 79 : case 111 : return parseInt(it.slice(2), binary ? 2 : 8);
+ }
+ } return +it;
+}
+if($.FW && !(Number('0o1') && Number('0b1'))){
+ Number = function Number(it){
+ return this instanceof Number ? new Base(toNumber(it)) : toNumber(it);
+ };
+ $.each.call($.DESC ? $.getNames(Base) : (
+ // ES3:
+ 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
+ // ES6 (in case, if modules with ES6 Number statics required before):
+ 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
+ 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
+ ).split(','), function(key){
+ if($.has(Base, key) && !$.has(Number, key)){
+ $.setDesc(Number, key, $.getDesc(Base, key));
+ }
+ }
+ );
+ Number.prototype = proto;
+ proto.constructor = Number;
+ $.hide($.g, NUMBER, Number);
+}
+},{"./$":21}],46:[function(require,module,exports){
+var $ = require('./$')
+ , $def = require('./$.def')
+ , abs = Math.abs
+ , floor = Math.floor
+ , _isFinite = $.g.isFinite
+ , MAX_SAFE_INTEGER = 0x1fffffffffffff; // pow(2, 53) - 1 == 9007199254740991;
+function isInteger(it){
+ return !$.isObject(it) && _isFinite(it) && floor(it) === it;
+}
+$def($def.S, 'Number', {
+ // 20.1.2.1 Number.EPSILON
+ EPSILON: Math.pow(2, -52),
+ // 20.1.2.2 Number.isFinite(number)
+ isFinite: function isFinite(it){
+ return typeof it == 'number' && _isFinite(it);
+ },
+ // 20.1.2.3 Number.isInteger(number)
+ isInteger: isInteger,
+ // 20.1.2.4 Number.isNaN(number)
+ isNaN: function isNaN(number){
+ return number != number;
+ },
+ // 20.1.2.5 Number.isSafeInteger(number)
+ isSafeInteger: function isSafeInteger(number){
+ return isInteger(number) && abs(number) <= MAX_SAFE_INTEGER;
+ },
+ // 20.1.2.6 Number.MAX_SAFE_INTEGER
+ MAX_SAFE_INTEGER: MAX_SAFE_INTEGER,
+ // 20.1.2.10 Number.MIN_SAFE_INTEGER
+ MIN_SAFE_INTEGER: -MAX_SAFE_INTEGER,
+ // 20.1.2.12 Number.parseFloat(string)
+ parseFloat: parseFloat,
+ // 20.1.2.13 Number.parseInt(string, radix)
+ parseInt: parseInt
+});
+},{"./$":21,"./$.def":12}],47:[function(require,module,exports){
+// 19.1.3.1 Object.assign(target, source)
+var $def = require('./$.def');
+$def($def.S, 'Object', {assign: require('./$.assign')});
+},{"./$.assign":5,"./$.def":12}],48:[function(require,module,exports){
+// 19.1.3.10 Object.is(value1, value2)
+var $def = require('./$.def');
+$def($def.S, 'Object', {
+ is: function is(x, y){
+ return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
+ }
+});
+},{"./$.def":12}],49:[function(require,module,exports){
+// 19.1.3.19 Object.setPrototypeOf(O, proto)
+var $def = require('./$.def');
+$def($def.S, 'Object', {setPrototypeOf: require('./$.set-proto').set});
+},{"./$.def":12,"./$.set-proto":26}],50:[function(require,module,exports){
+var $ = require('./$')
+ , $def = require('./$.def')
+ , isObject = $.isObject
+ , toObject = $.toObject;
+function wrapObjectMethod(METHOD, MODE){
+ var fn = ($.core.Object || {})[METHOD] || Object[METHOD]
+ , f = 0
+ , o = {};
+ o[METHOD] = MODE == 1 ? function(it){
+ return isObject(it) ? fn(it) : it;
+ } : MODE == 2 ? function(it){
+ return isObject(it) ? fn(it) : true;
+ } : MODE == 3 ? function(it){
+ return isObject(it) ? fn(it) : false;
+ } : MODE == 4 ? function getOwnPropertyDescriptor(it, key){
+ return fn(toObject(it), key);
+ } : MODE == 5 ? function getPrototypeOf(it){
+ return fn(Object($.assertDefined(it)));
+ } : function(it){
+ return fn(toObject(it));
+ };
+ try {
+ fn('z');
+ } catch(e){
+ f = 1;
+ }
+ $def($def.S + $def.F * f, 'Object', o);
+}
+wrapObjectMethod('freeze', 1);
+wrapObjectMethod('seal', 1);
+wrapObjectMethod('preventExtensions', 1);
+wrapObjectMethod('isFrozen', 2);
+wrapObjectMethod('isSealed', 2);
+wrapObjectMethod('isExtensible', 3);
+wrapObjectMethod('getOwnPropertyDescriptor', 4);
+wrapObjectMethod('getPrototypeOf', 5);
+wrapObjectMethod('keys');
+wrapObjectMethod('getOwnPropertyNames');
+},{"./$":21,"./$.def":12}],51:[function(require,module,exports){
+'use strict';
+// 19.1.3.6 Object.prototype.toString()
+var $ = require('./$')
+ , cof = require('./$.cof')
+ , tmp = {};
+tmp[require('./$.wks')('toStringTag')] = 'z';
+if($.FW && cof(tmp) != 'z')$.hide(Object.prototype, 'toString', function toString(){
+ return '[object ' + cof.classof(this) + ']';
+});
+},{"./$":21,"./$.cof":6,"./$.wks":32}],52:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , ctx = require('./$.ctx')
+ , cof = require('./$.cof')
+ , $def = require('./$.def')
+ , assert = require('./$.assert')
+ , forOf = require('./$.for-of')
+ , setProto = require('./$.set-proto').set
+ , species = require('./$.species')
+ , SPECIES = require('./$.wks')('species')
+ , RECORD = require('./$.uid').safe('record')
+ , PROMISE = 'Promise'
+ , global = $.g
+ , process = global.process
+ , asap = process && process.nextTick || require('./$.task').set
+ , P = global[PROMISE]
+ , isFunction = $.isFunction
+ , isObject = $.isObject
+ , assertFunction = assert.fn
+ , assertObject = assert.obj
+ , test;
+
+var useNative = isFunction(P) && isFunction(P.resolve) &&
+ P.resolve(test = new P(function(){})) == test;
+// actual Firefox has broken subclass support, test that
+function P2(x){
+ var self = new P(x);
+ setProto(self, P2.prototype);
+ return self;
+}
+if(useNative){
+ try { // protect against bad/buggy Object.setPrototype
+ setProto(P2, P);
+ P2.prototype = $.create(P.prototype, {constructor: {value: P2}});
+ if(!(P2.resolve(5).then(function(){}) instanceof P2)){
+ useNative = false;
+ }
+ } catch(e){ useNative = false; }
+}
+
+// helpers
+function getConstructor(C){
+ var S = assertObject(C)[SPECIES];
+ return S != undefined ? S : C;
+}
+function isThenable(it){
+ var then;
+ if(isObject(it))then = it.then;
+ return isFunction(then) ? then : false;
+}
+function notify(record){
+ var chain = record.c;
+ if(chain.length)asap(function(){
+ var value = record.v
+ , ok = record.s == 1
+ , i = 0;
+ while(chain.length > i)!function(react){
+ var cb = ok ? react.ok : react.fail
+ , ret, then;
+ try {
+ if(cb){
+ if(!ok)record.h = true;
+ ret = cb === true ? value : cb(value);
+ if(ret === react.P){
+ react.rej(TypeError('Promise-chain cycle'));
+ } else if(then = isThenable(ret)){
+ then.call(ret, react.res, react.rej);
+ } else react.res(ret);
+ } else react.rej(value);
+ } catch(err){
+ react.rej(err);
+ }
+ }(chain[i++]);
+ chain.length = 0;
+ });
+}
+function isUnhandled(promise){
+ var record = promise[RECORD]
+ , chain = record.a
+ , i = 0
+ , react;
+ if(record.h)return false;
+ while(chain.length > i){
+ react = chain[i++];
+ if(react.fail || !isUnhandled(react.P))return false;
+ } return true;
+}
+function $reject(value){
+ var record = this
+ , promise;
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
+ record.v = value;
+ record.s = 2;
+ asap(function(){
+ setTimeout(function(){
+ if(isUnhandled(promise = record.p)){
+ if(cof(process) == 'process'){
+ process.emit('unhandledRejection', value, promise);
+ } else if(global.console && isFunction(console.error)){
+ console.error('Unhandled promise rejection', value);
+ }
+ }
+ }, 1);
+ });
+ notify(record);
+}
+function $resolve(value){
+ var record = this
+ , then, wrapper;
+ if(record.d)return;
+ record.d = true;
+ record = record.r || record; // unwrap
+ try {
+ if(then = isThenable(value)){
+ wrapper = {r: record, d: false}; // wrap
+ then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1));
+ } else {
+ record.v = value;
+ record.s = 1;
+ notify(record);
+ }
+ } catch(err){
+ $reject.call(wrapper || {r: record, d: false}, err); // wrap
+ }
+}
+
+// constructor polyfill
+if(!useNative){
+ // 25.4.3.1 Promise(executor)
+ P = function Promise(executor){
+ assertFunction(executor);
+ var record = {
+ p: assert.inst(this, P, PROMISE), // <- promise
+ c: [], // <- awaiting reactions
+ a: [], // <- all reactions
+ s: 0, // <- state
+ d: false, // <- done
+ v: undefined, // <- value
+ h: false // <- handled rejection
+ };
+ $.hide(this, RECORD, record);
+ try {
+ executor(ctx($resolve, record, 1), ctx($reject, record, 1));
+ } catch(err){
+ $reject.call(record, err);
+ }
+ };
+ $.mix(P.prototype, {
+ // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected)
+ then: function then(onFulfilled, onRejected){
+ var S = assertObject(assertObject(this).constructor)[SPECIES];
+ var react = {
+ ok: isFunction(onFulfilled) ? onFulfilled : true,
+ fail: isFunction(onRejected) ? onRejected : false
+ };
+ var promise = react.P = new (S != undefined ? S : P)(function(res, rej){
+ react.res = assertFunction(res);
+ react.rej = assertFunction(rej);
+ });
+ var record = this[RECORD];
+ record.a.push(react);
+ record.c.push(react);
+ record.s && notify(record);
+ return promise;
+ },
+ // 25.4.5.1 Promise.prototype.catch(onRejected)
+ 'catch': function(onRejected){
+ return this.then(undefined, onRejected);
+ }
+ });
+}
+
+// export
+$def($def.G + $def.W + $def.F * !useNative, {Promise: P});
+cof.set(P, PROMISE);
+species(P);
+species($.core[PROMISE]); // for wrapper
+
+// statics
+$def($def.S + $def.F * !useNative, PROMISE, {
+ // 25.4.4.5 Promise.reject(r)
+ reject: function reject(r){
+ return new (getConstructor(this))(function(res, rej){
+ rej(r);
+ });
+ },
+ // 25.4.4.6 Promise.resolve(x)
+ resolve: function resolve(x){
+ return isObject(x) && RECORD in x && $.getProto(x) === this.prototype
+ ? x : new (getConstructor(this))(function(res){
+ res(x);
+ });
+ }
+});
+$def($def.S + $def.F * !(useNative && require('./$.iter-detect')(function(iter){
+ P.all(iter)['catch'](function(){});
+})), PROMISE, {
+ // 25.4.4.1 Promise.all(iterable)
+ all: function all(iterable){
+ var C = getConstructor(this)
+ , values = [];
+ return new C(function(res, rej){
+ forOf(iterable, false, values.push, values);
+ var remaining = values.length
+ , results = Array(remaining);
+ if(remaining)$.each.call(values, function(promise, index){
+ C.resolve(promise).then(function(value){
+ results[index] = value;
+ --remaining || res(results);
+ }, rej);
+ });
+ else res(results);
+ });
+ },
+ // 25.4.4.4 Promise.race(iterable)
+ race: function race(iterable){
+ var C = getConstructor(this);
+ return new C(function(res, rej){
+ forOf(iterable, false, function(promise){
+ C.resolve(promise).then(res, rej);
+ });
+ });
+ }
+});
+},{"./$":21,"./$.assert":4,"./$.cof":6,"./$.ctx":11,"./$.def":12,"./$.for-of":14,"./$.iter-detect":19,"./$.set-proto":26,"./$.species":27,"./$.task":29,"./$.uid":30,"./$.wks":32}],53:[function(require,module,exports){
+var $ = require('./$')
+ , $def = require('./$.def')
+ , setProto = require('./$.set-proto')
+ , $iter = require('./$.iter')
+ , ITER = require('./$.uid').safe('iter')
+ , step = $iter.step
+ , assert = require('./$.assert')
+ , isObject = $.isObject
+ , getDesc = $.getDesc
+ , setDesc = $.setDesc
+ , getProto = $.getProto
+ , apply = Function.apply
+ , assertObject = assert.obj
+ , _isExtensible = Object.isExtensible || $.it;
+function Enumerate(iterated){
+ $.set(this, ITER, {o: iterated, k: undefined, i: 0});
+}
+$iter.create(Enumerate, 'Object', function(){
+ var iter = this[ITER]
+ , keys = iter.k
+ , key;
+ if(keys == undefined){
+ iter.k = keys = [];
+ for(key in iter.o)keys.push(key);
+ }
+ do {
+ if(iter.i >= keys.length)return step(1);
+ } while(!((key = keys[iter.i++]) in iter.o));
+ return step(0, key);
+});
+
+function wrap(fn){
+ return function(it){
+ assertObject(it);
+ try {
+ fn.apply(undefined, arguments);
+ return true;
+ } catch(e){
+ return false;
+ }
+ };
+}
+
+function get(target, propertyKey/*, receiver*/){
+ var receiver = arguments.length < 3 ? target : arguments[2]
+ , desc = getDesc(assertObject(target), propertyKey), proto;
+ if(desc)return $.has(desc, 'value')
+ ? desc.value
+ : desc.get === undefined
+ ? undefined
+ : desc.get.call(receiver);
+ return isObject(proto = getProto(target))
+ ? get(proto, propertyKey, receiver)
+ : undefined;
+}
+function set(target, propertyKey, V/*, receiver*/){
+ var receiver = arguments.length < 4 ? target : arguments[3]
+ , ownDesc = getDesc(assertObject(target), propertyKey)
+ , existingDescriptor, proto;
+ if(!ownDesc){
+ if(isObject(proto = getProto(target))){
+ return set(proto, propertyKey, V, receiver);
+ }
+ ownDesc = $.desc(0);
+ }
+ if($.has(ownDesc, 'value')){
+ if(ownDesc.writable === false || !isObject(receiver))return false;
+ existingDescriptor = getDesc(receiver, propertyKey) || $.desc(0);
+ existingDescriptor.value = V;
+ setDesc(receiver, propertyKey, existingDescriptor);
+ return true;
+ }
+ return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true);
+}
+
+var reflect = {
+ // 26.1.1 Reflect.apply(target, thisArgument, argumentsList)
+ apply: require('./$.ctx')(Function.call, apply, 3),
+ // 26.1.2 Reflect.construct(target, argumentsList [, newTarget])
+ construct: function construct(target, argumentsList /*, newTarget*/){
+ var proto = assert.fn(arguments.length < 3 ? target : arguments[2]).prototype
+ , instance = $.create(isObject(proto) ? proto : Object.prototype)
+ , result = apply.call(target, instance, argumentsList);
+ return isObject(result) ? result : instance;
+ },
+ // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes)
+ defineProperty: wrap(setDesc),
+ // 26.1.4 Reflect.deleteProperty(target, propertyKey)
+ deleteProperty: function deleteProperty(target, propertyKey){
+ var desc = getDesc(assertObject(target), propertyKey);
+ return desc && !desc.configurable ? false : delete target[propertyKey];
+ },
+ // 26.1.5 Reflect.enumerate(target)
+ enumerate: function enumerate(target){
+ return new Enumerate(assertObject(target));
+ },
+ // 26.1.6 Reflect.get(target, propertyKey [, receiver])
+ get: get,
+ // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey)
+ getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){
+ return getDesc(assertObject(target), propertyKey);
+ },
+ // 26.1.8 Reflect.getPrototypeOf(target)
+ getPrototypeOf: function getPrototypeOf(target){
+ return getProto(assertObject(target));
+ },
+ // 26.1.9 Reflect.has(target, propertyKey)
+ has: function has(target, propertyKey){
+ return propertyKey in target;
+ },
+ // 26.1.10 Reflect.isExtensible(target)
+ isExtensible: function isExtensible(target){
+ return !!_isExtensible(assertObject(target));
+ },
+ // 26.1.11 Reflect.ownKeys(target)
+ ownKeys: require('./$.own-keys'),
+ // 26.1.12 Reflect.preventExtensions(target)
+ preventExtensions: wrap(Object.preventExtensions || $.it),
+ // 26.1.13 Reflect.set(target, propertyKey, V [, receiver])
+ set: set
+};
+// 26.1.14 Reflect.setPrototypeOf(target, proto)
+if(setProto)reflect.setPrototypeOf = function setPrototypeOf(target, proto){
+ setProto.check(target, proto);
+ try {
+ setProto.set(target, proto);
+ return true;
+ } catch(e){
+ return false;
+ }
+};
+
+$def($def.G, {Reflect: {}});
+$def($def.S, 'Reflect', reflect);
+},{"./$":21,"./$.assert":4,"./$.ctx":11,"./$.def":12,"./$.iter":20,"./$.own-keys":23,"./$.set-proto":26,"./$.uid":30}],54:[function(require,module,exports){
+var $ = require('./$')
+ , cof = require('./$.cof')
+ , RegExp = $.g.RegExp
+ , Base = RegExp
+ , proto = RegExp.prototype;
+function regExpBroken() {
+ try {
+ var a = /a/g;
+ // "new" creates a new object
+ if (a === new RegExp(a)) { return true; }
+ // RegExp allows a regex with flags as the pattern
+ return RegExp(/a/g, 'i') != '/a/i';
+ } catch(e) {
+ return true;
+ }
+}
+if($.FW && $.DESC){
+ if(regExpBroken()) {
+ RegExp = function RegExp(pattern, flags){
+ return new Base(cof(pattern) == 'RegExp' ? pattern.source : pattern,
+ flags === undefined ? pattern.flags : flags);
+ };
+ $.each.call($.getNames(Base), function(key){
+ key in RegExp || $.setDesc(RegExp, key, {
+ configurable: true,
+ get: function(){ return Base[key]; },
+ set: function(it){ Base[key] = it; }
+ });
+ });
+ proto.constructor = RegExp;
+ RegExp.prototype = proto;
+ $.hide($.g, 'RegExp', RegExp);
+ }
+ // 21.2.5.3 get RegExp.prototype.flags()
+ if(/./g.flags != 'g')$.setDesc(proto, 'flags', {
+ configurable: true,
+ get: require('./$.replacer')(/^.*\/(\w*)$/, '$1')
+ });
+}
+require('./$.species')(RegExp);
+},{"./$":21,"./$.cof":6,"./$.replacer":25,"./$.species":27}],55:[function(require,module,exports){
+'use strict';
+var strong = require('./$.collection-strong');
+
+// 23.2 Set Objects
+require('./$.collection')('Set', {
+ // 23.2.3.1 Set.prototype.add(value)
+ add: function add(value){
+ return strong.def(this, value = value === 0 ? 0 : value, value);
+ }
+}, strong);
+},{"./$.collection":10,"./$.collection-strong":7}],56:[function(require,module,exports){
+var $def = require('./$.def');
+$def($def.P, 'String', {
+ // 21.1.3.3 String.prototype.codePointAt(pos)
+ codePointAt: require('./$.string-at')(false)
+});
+},{"./$.def":12,"./$.string-at":28}],57:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , cof = require('./$.cof')
+ , $def = require('./$.def')
+ , toLength = $.toLength;
+
+$def($def.P, 'String', {
+ // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition])
+ endsWith: function endsWith(searchString /*, endPosition = @length */){
+ if(cof(searchString) == 'RegExp')throw TypeError();
+ var that = String($.assertDefined(this))
+ , endPosition = arguments[1]
+ , len = toLength(that.length)
+ , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len);
+ searchString += '';
+ return that.slice(end - searchString.length, end) === searchString;
+ }
+});
+},{"./$":21,"./$.cof":6,"./$.def":12}],58:[function(require,module,exports){
+var $def = require('./$.def')
+ , toIndex = require('./$').toIndex
+ , fromCharCode = String.fromCharCode;
+
+$def($def.S, 'String', {
+ // 21.1.2.2 String.fromCodePoint(...codePoints)
+ fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars
+ var res = []
+ , len = arguments.length
+ , i = 0
+ , code;
+ while(len > i){
+ code = +arguments[i++];
+ if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point');
+ res.push(code < 0x10000
+ ? fromCharCode(code)
+ : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
+ );
+ } return res.join('');
+ }
+});
+},{"./$":21,"./$.def":12}],59:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , cof = require('./$.cof')
+ , $def = require('./$.def');
+
+$def($def.P, 'String', {
+ // 21.1.3.7 String.prototype.includes(searchString, position = 0)
+ includes: function includes(searchString /*, position = 0 */){
+ if(cof(searchString) == 'RegExp')throw TypeError();
+ return !!~String($.assertDefined(this)).indexOf(searchString, arguments[1]);
+ }
+});
+},{"./$":21,"./$.cof":6,"./$.def":12}],60:[function(require,module,exports){
+var set = require('./$').set
+ , at = require('./$.string-at')(true)
+ , ITER = require('./$.uid').safe('iter')
+ , $iter = require('./$.iter')
+ , step = $iter.step;
+
+// 21.1.3.27 String.prototype[@@iterator]()
+require('./$.iter-define')(String, 'String', function(iterated){
+ set(this, ITER, {o: String(iterated), i: 0});
+// 21.1.5.2.1 %StringIteratorPrototype%.next()
+}, function(){
+ var iter = this[ITER]
+ , O = iter.o
+ , index = iter.i
+ , point;
+ if(index >= O.length)return step(1);
+ point = at.call(O, index);
+ iter.i += point.length;
+ return step(0, point);
+});
+},{"./$":21,"./$.iter":20,"./$.iter-define":18,"./$.string-at":28,"./$.uid":30}],61:[function(require,module,exports){
+var $ = require('./$')
+ , $def = require('./$.def');
+
+$def($def.S, 'String', {
+ // 21.1.2.4 String.raw(callSite, ...substitutions)
+ raw: function raw(callSite){
+ var tpl = $.toObject(callSite.raw)
+ , len = $.toLength(tpl.length)
+ , sln = arguments.length
+ , res = []
+ , i = 0;
+ while(len > i){
+ res.push(String(tpl[i++]));
+ if(i < sln)res.push(String(arguments[i]));
+ } return res.join('');
+ }
+});
+},{"./$":21,"./$.def":12}],62:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , $def = require('./$.def');
+
+$def($def.P, 'String', {
+ // 21.1.3.13 String.prototype.repeat(count)
+ repeat: function repeat(count){
+ var str = String($.assertDefined(this))
+ , res = ''
+ , n = $.toInteger(count);
+ if(n < 0 || n == Infinity)throw RangeError("Count can't be negative");
+ for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str;
+ return res;
+ }
+});
+},{"./$":21,"./$.def":12}],63:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , cof = require('./$.cof')
+ , $def = require('./$.def');
+
+$def($def.P, 'String', {
+ // 21.1.3.18 String.prototype.startsWith(searchString [, position ])
+ startsWith: function startsWith(searchString /*, position = 0 */){
+ if(cof(searchString) == 'RegExp')throw TypeError();
+ var that = String($.assertDefined(this))
+ , index = $.toLength(Math.min(arguments[1], that.length));
+ searchString += '';
+ return that.slice(index, index + searchString.length) === searchString;
+ }
+});
+},{"./$":21,"./$.cof":6,"./$.def":12}],64:[function(require,module,exports){
+'use strict';
+// ECMAScript 6 symbols shim
+var $ = require('./$')
+ , setTag = require('./$.cof').set
+ , uid = require('./$.uid')
+ , $def = require('./$.def')
+ , keyOf = require('./$.keyof')
+ , enumKeys = require('./$.enum-keys')
+ , assertObject = require('./$.assert').obj
+ , has = $.has
+ , $create = $.create
+ , getDesc = $.getDesc
+ , setDesc = $.setDesc
+ , desc = $.desc
+ , getNames = $.getNames
+ , toObject = $.toObject
+ , Symbol = $.g.Symbol
+ , setter = false
+ , TAG = uid('tag')
+ , HIDDEN = uid('hidden')
+ , SymbolRegistry = {}
+ , AllSymbols = {}
+ , useNative = $.isFunction(Symbol);
+
+function wrap(tag){
+ var sym = AllSymbols[tag] = $.set($create(Symbol.prototype), TAG, tag);
+ $.DESC && setter && setDesc(Object.prototype, tag, {
+ configurable: true,
+ set: function(value){
+ if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false;
+ setDesc(this, tag, desc(1, value));
+ }
+ });
+ return sym;
+}
+
+function defineProperty(it, key, D){
+ if(D && has(AllSymbols, key)){
+ if(!D.enumerable){
+ if(!has(it, HIDDEN))setDesc(it, HIDDEN, desc(1, {}));
+ it[HIDDEN][key] = true;
+ } else {
+ if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false;
+ D.enumerable = false;
+ }
+ } return setDesc(it, key, D);
+}
+function defineProperties(it, P){
+ assertObject(it);
+ var keys = enumKeys(P = toObject(P))
+ , i = 0
+ , l = keys.length
+ , key;
+ while(l > i)defineProperty(it, key = keys[i++], P[key]);
+ return it;
+}
+function create(it, P){
+ return P === undefined ? $create(it) : defineProperties($create(it), P);
+}
+function getOwnPropertyDescriptor(it, key){
+ var D = getDesc(it = toObject(it), key);
+ if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true;
+ return D;
+}
+function getOwnPropertyNames(it){
+ var names = getNames(toObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(!has(AllSymbols, key = names[i++]) && key != HIDDEN)result.push(key);
+ return result;
+}
+function getOwnPropertySymbols(it){
+ var names = getNames(toObject(it))
+ , result = []
+ , i = 0
+ , key;
+ while(names.length > i)if(has(AllSymbols, key = names[i++]))result.push(AllSymbols[key]);
+ return result;
+}
+
+// 19.4.1.1 Symbol([description])
+if(!useNative){
+ Symbol = function Symbol(description){
+ if(this instanceof Symbol)throw TypeError('Symbol is not a constructor');
+ return wrap(uid(description));
+ };
+ $.hide(Symbol.prototype, 'toString', function(){
+ return this[TAG];
+ });
+
+ $.create = create;
+ $.setDesc = defineProperty;
+ $.getDesc = getOwnPropertyDescriptor;
+ $.setDescs = defineProperties;
+ $.getNames = getOwnPropertyNames;
+ $.getSymbols = getOwnPropertySymbols;
+}
+
+var symbolStatics = {
+ // 19.4.2.1 Symbol.for(key)
+ 'for': function(key){
+ return has(SymbolRegistry, key += '')
+ ? SymbolRegistry[key]
+ : SymbolRegistry[key] = Symbol(key);
+ },
+ // 19.4.2.5 Symbol.keyFor(sym)
+ keyFor: function keyFor(key){
+ return keyOf(SymbolRegistry, key);
+ },
+ useSetter: function(){ setter = true; },
+ useSimple: function(){ setter = false; }
+};
+// 19.4.2.2 Symbol.hasInstance
+// 19.4.2.3 Symbol.isConcatSpreadable
+// 19.4.2.4 Symbol.iterator
+// 19.4.2.6 Symbol.match
+// 19.4.2.8 Symbol.replace
+// 19.4.2.9 Symbol.search
+// 19.4.2.10 Symbol.species
+// 19.4.2.11 Symbol.split
+// 19.4.2.12 Symbol.toPrimitive
+// 19.4.2.13 Symbol.toStringTag
+// 19.4.2.14 Symbol.unscopables
+$.each.call((
+ 'hasInstance,isConcatSpreadable,iterator,match,replace,search,' +
+ 'species,split,toPrimitive,toStringTag,unscopables'
+ ).split(','), function(it){
+ var sym = require('./$.wks')(it);
+ symbolStatics[it] = useNative ? sym : wrap(sym);
+ }
+);
+
+setter = true;
+
+$def($def.G + $def.W, {Symbol: Symbol});
+
+$def($def.S, 'Symbol', symbolStatics);
+
+$def($def.S + $def.F * !useNative, 'Object', {
+ // 19.1.2.2 Object.create(O [, Properties])
+ create: create,
+ // 19.1.2.4 Object.defineProperty(O, P, Attributes)
+ defineProperty: defineProperty,
+ // 19.1.2.3 Object.defineProperties(O, Properties)
+ defineProperties: defineProperties,
+ // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)
+ getOwnPropertyDescriptor: getOwnPropertyDescriptor,
+ // 19.1.2.7 Object.getOwnPropertyNames(O)
+ getOwnPropertyNames: getOwnPropertyNames,
+ // 19.1.2.8 Object.getOwnPropertySymbols(O)
+ getOwnPropertySymbols: getOwnPropertySymbols
+});
+
+// 19.4.3.5 Symbol.prototype[@@toStringTag]
+setTag(Symbol, 'Symbol');
+// 20.2.1.9 Math[@@toStringTag]
+setTag(Math, 'Math', true);
+// 24.3.3 JSON[@@toStringTag]
+setTag($.g.JSON, 'JSON', true);
+},{"./$":21,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.enum-keys":13,"./$.keyof":22,"./$.uid":30,"./$.wks":32}],65:[function(require,module,exports){
+'use strict';
+var $ = require('./$')
+ , weak = require('./$.collection-weak')
+ , leakStore = weak.leakStore
+ , ID = weak.ID
+ , WEAK = weak.WEAK
+ , has = $.has
+ , isObject = $.isObject
+ , isFrozen = Object.isFrozen || $.core.Object.isFrozen
+ , tmp = {};
+
+// 23.3 WeakMap Objects
+var WeakMap = require('./$.collection')('WeakMap', {
+ // 23.3.3.3 WeakMap.prototype.get(key)
+ get: function get(key){
+ if(isObject(key)){
+ if(isFrozen(key))return leakStore(this).get(key);
+ if(has(key, WEAK))return key[WEAK][this[ID]];
+ }
+ },
+ // 23.3.3.5 WeakMap.prototype.set(key, value)
+ set: function set(key, value){
+ return weak.def(this, key, value);
+ }
+}, weak, true, true);
+
+// IE11 WeakMap frozen keys fix
+if($.FW && new WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){
+ $.each.call(['delete', 'has', 'get', 'set'], function(key){
+ var method = WeakMap.prototype[key];
+ WeakMap.prototype[key] = function(a, b){
+ // store frozen objects on leaky map
+ if(isObject(a) && isFrozen(a)){
+ var result = leakStore(this)[key](a, b);
+ return key == 'set' ? this : result;
+ // store all the rest on native weakmap
+ } return method.call(this, a, b);
+ };
+ });
+}
+},{"./$":21,"./$.collection":10,"./$.collection-weak":9}],66:[function(require,module,exports){
+'use strict';
+var weak = require('./$.collection-weak');
+
+// 23.4 WeakSet Objects
+require('./$.collection')('WeakSet', {
+ // 23.4.3.1 WeakSet.prototype.add(value)
+ add: function add(value){
+ return weak.def(this, value, true);
+ }
+}, weak, false, true);
+},{"./$.collection":10,"./$.collection-weak":9}],67:[function(require,module,exports){
+// https://github.com/domenic/Array.prototype.includes
+var $def = require('./$.def');
+$def($def.P, 'Array', {
+ includes: require('./$.array-includes')(true)
+});
+require('./$.unscope')('includes');
+},{"./$.array-includes":2,"./$.def":12,"./$.unscope":31}],68:[function(require,module,exports){
+// https://github.com/DavidBruant/Map-Set.prototype.toJSON
+require('./$.collection-to-json')('Map');
+},{"./$.collection-to-json":8}],69:[function(require,module,exports){
+// https://gist.github.com/WebReflection/9353781
+var $ = require('./$')
+ , $def = require('./$.def')
+ , ownKeys = require('./$.own-keys');
+
+$def($def.S, 'Object', {
+ getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){
+ var O = $.toObject(object)
+ , result = {};
+ $.each.call(ownKeys(O), function(key){
+ $.setDesc(result, key, $.desc(0, $.getDesc(O, key)));
+ });
+ return result;
+ }
+});
+},{"./$":21,"./$.def":12,"./$.own-keys":23}],70:[function(require,module,exports){
+// http://goo.gl/XkBrjD
+var $ = require('./$')
+ , $def = require('./$.def');
+function createObjectToArray(isEntries){
+ return function(object){
+ var O = $.toObject(object)
+ , keys = $.getKeys(O)
+ , length = keys.length
+ , i = 0
+ , result = Array(length)
+ , key;
+ if(isEntries)while(length > i)result[i] = [key = keys[i++], O[key]];
+ else while(length > i)result[i] = O[keys[i++]];
+ return result;
+ };
+}
+$def($def.S, 'Object', {
+ values: createObjectToArray(false),
+ entries: createObjectToArray(true)
+});
+},{"./$":21,"./$.def":12}],71:[function(require,module,exports){
+// https://gist.github.com/kangax/9698100
+var $def = require('./$.def');
+$def($def.S, 'RegExp', {
+ escape: require('./$.replacer')(/([\\\-[\]{}()*+?.,^$|])/g, '\\$1', true)
+});
+},{"./$.def":12,"./$.replacer":25}],72:[function(require,module,exports){
+// https://github.com/DavidBruant/Map-Set.prototype.toJSON
+require('./$.collection-to-json')('Set');
+},{"./$.collection-to-json":8}],73:[function(require,module,exports){
+// https://github.com/mathiasbynens/String.prototype.at
+var $def = require('./$.def');
+$def($def.P, 'String', {
+ at: require('./$.string-at')(true)
+});
+},{"./$.def":12,"./$.string-at":28}],74:[function(require,module,exports){
+// JavaScript 1.6 / Strawman array statics shim
+var $ = require('./$')
+ , $def = require('./$.def')
+ , $Array = $.core.Array || Array
+ , statics = {};
+function setStatics(keys, length){
+ $.each.call(keys.split(','), function(key){
+ if(length == undefined && key in $Array)statics[key] = $Array[key];
+ else if(key in [])statics[key] = require('./$.ctx')(Function.call, [][key], length);
+ });
+}
+setStatics('pop,reverse,shift,keys,values,entries', 1);
+setStatics('indexOf,every,some,forEach,map,filter,find,findIndex,includes', 3);
+setStatics('join,slice,concat,push,splice,unshift,sort,lastIndexOf,' +
+ 'reduce,reduceRight,copyWithin,fill,turn');
+$def($def.S, 'Array', statics);
+},{"./$":21,"./$.ctx":11,"./$.def":12}],75:[function(require,module,exports){
+require('./es6.array.iterator');
+var $ = require('./$')
+ , Iterators = require('./$.iter').Iterators
+ , ITERATOR = require('./$.wks')('iterator')
+ , ArrayValues = Iterators.Array
+ , NodeList = $.g.NodeList;
+if($.FW && NodeList && !(ITERATOR in NodeList.prototype)){
+ $.hide(NodeList.prototype, ITERATOR, ArrayValues);
+}
+Iterators.NodeList = ArrayValues;
+},{"./$":21,"./$.iter":20,"./$.wks":32,"./es6.array.iterator":39}],76:[function(require,module,exports){
+var $def = require('./$.def')
+ , $task = require('./$.task');
+$def($def.G + $def.B, {
+ setImmediate: $task.set,
+ clearImmediate: $task.clear
+});
+},{"./$.def":12,"./$.task":29}],77:[function(require,module,exports){
+// ie9- setTimeout & setInterval additional parameters fix
+var $ = require('./$')
+ , $def = require('./$.def')
+ , invoke = require('./$.invoke')
+ , partial = require('./$.partial')
+ , navigator = $.g.navigator
+ , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check
+function wrap(set){
+ return MSIE ? function(fn, time /*, ...args */){
+ return set(invoke(
+ partial,
+ [].slice.call(arguments, 2),
+ $.isFunction(fn) ? fn : Function(fn)
+ ), time);
+ } : set;
+}
+$def($def.G + $def.B + $def.F * MSIE, {
+ setTimeout: wrap($.g.setTimeout),
+ setInterval: wrap($.g.setInterval)
+});
+},{"./$":21,"./$.def":12,"./$.invoke":16,"./$.partial":24}],78:[function(require,module,exports){
+require('./modules/es5');
+require('./modules/es6.symbol');
+require('./modules/es6.object.assign');
+require('./modules/es6.object.is');
+require('./modules/es6.object.set-prototype-of');
+require('./modules/es6.object.to-string');
+require('./modules/es6.object.statics-accept-primitives');
+require('./modules/es6.function.name');
+require('./modules/es6.number.constructor');
+require('./modules/es6.number.statics');
+require('./modules/es6.math');
+require('./modules/es6.string.from-code-point');
+require('./modules/es6.string.raw');
+require('./modules/es6.string.iterator');
+require('./modules/es6.string.code-point-at');
+require('./modules/es6.string.ends-with');
+require('./modules/es6.string.includes');
+require('./modules/es6.string.repeat');
+require('./modules/es6.string.starts-with');
+require('./modules/es6.array.from');
+require('./modules/es6.array.of');
+require('./modules/es6.array.iterator');
+require('./modules/es6.array.species');
+require('./modules/es6.array.copy-within');
+require('./modules/es6.array.fill');
+require('./modules/es6.array.find');
+require('./modules/es6.array.find-index');
+require('./modules/es6.regexp');
+require('./modules/es6.promise');
+require('./modules/es6.map');
+require('./modules/es6.set');
+require('./modules/es6.weak-map');
+require('./modules/es6.weak-set');
+require('./modules/es6.reflect');
+require('./modules/es7.array.includes');
+require('./modules/es7.string.at');
+require('./modules/es7.regexp.escape');
+require('./modules/es7.object.get-own-property-descriptors');
+require('./modules/es7.object.to-array');
+require('./modules/es7.map.to-json');
+require('./modules/es7.set.to-json');
+require('./modules/js.array.statics');
+require('./modules/web.timers');
+require('./modules/web.immediate');
+require('./modules/web.dom.iterable');
+module.exports = require('./modules/$').core;
+},{"./modules/$":21,"./modules/es5":33,"./modules/es6.array.copy-within":34,"./modules/es6.array.fill":35,"./modules/es6.array.find":37,"./modules/es6.array.find-index":36,"./modules/es6.array.from":38,"./modules/es6.array.iterator":39,"./modules/es6.array.of":40,"./modules/es6.array.species":41,"./modules/es6.function.name":42,"./modules/es6.map":43,"./modules/es6.math":44,"./modules/es6.number.constructor":45,"./modules/es6.number.statics":46,"./modules/es6.object.assign":47,"./modules/es6.object.is":48,"./modules/es6.object.set-prototype-of":49,"./modules/es6.object.statics-accept-primitives":50,"./modules/es6.object.to-string":51,"./modules/es6.promise":52,"./modules/es6.reflect":53,"./modules/es6.regexp":54,"./modules/es6.set":55,"./modules/es6.string.code-point-at":56,"./modules/es6.string.ends-with":57,"./modules/es6.string.from-code-point":58,"./modules/es6.string.includes":59,"./modules/es6.string.iterator":60,"./modules/es6.string.raw":61,"./modules/es6.string.repeat":62,"./modules/es6.string.starts-with":63,"./modules/es6.symbol":64,"./modules/es6.weak-map":65,"./modules/es6.weak-set":66,"./modules/es7.array.includes":67,"./modules/es7.map.to-json":68,"./modules/es7.object.get-own-property-descriptors":69,"./modules/es7.object.to-array":70,"./modules/es7.regexp.escape":71,"./modules/es7.set.to-json":72,"./modules/es7.string.at":73,"./modules/js.array.statics":74,"./modules/web.dom.iterable":75,"./modules/web.immediate":76,"./modules/web.timers":77}],79:[function(require,module,exports){
+(function (global){
+/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+!(function(global) {
+ "use strict";
+
+ var hasOwn = Object.prototype.hasOwnProperty;
+ var undefined; // More compressible than void 0.
+ var iteratorSymbol =
+ typeof Symbol === "function" && Symbol.iterator || "@@iterator";
+
+ var inModule = typeof module === "object";
+ var runtime = global.regeneratorRuntime;
+ if (runtime) {
+ if (inModule) {
+ // If regeneratorRuntime is defined globally and we're in a module,
+ // make the exports object identical to regeneratorRuntime.
+ module.exports = runtime;
+ }
+ // Don't bother evaluating the rest of this file if the runtime was
+ // already defined globally.
+ return;
+ }
+
+ // Define the runtime globally (as expected by generated code) as either
+ // module.exports (if we're in a module) or a new, empty object.
+ runtime = global.regeneratorRuntime = inModule ? module.exports : {};
+
+ function wrap(innerFn, outerFn, self, tryLocsList) {
+ // If outerFn provided, then outerFn.prototype instanceof Generator.
+ var generator = Object.create((outerFn || Generator).prototype);
+
+ generator._invoke = makeInvokeMethod(
+ innerFn, self || null,
+ new Context(tryLocsList || [])
+ );
+
+ return generator;
+ }
+ runtime.wrap = wrap;
+
+ // Try/catch helper to minimize deoptimizations. Returns a completion
+ // record like context.tryEntries[i].completion. This interface could
+ // have been (and was previously) designed to take a closure to be
+ // invoked without arguments, but in all the cases we care about we
+ // already have an existing method we want to call, so there's no need
+ // to create a new function object. We can even get away with assuming
+ // the method takes exactly one argument, since that happens to be true
+ // in every case, so we don't have to touch the arguments object. The
+ // only additional allocation required is the completion record, which
+ // has a stable shape and so hopefully should be cheap to allocate.
+ function tryCatch(fn, obj, arg) {
+ try {
+ return { type: "normal", arg: fn.call(obj, arg) };
+ } catch (err) {
+ return { type: "throw", arg: err };
+ }
+ }
+
+ var GenStateSuspendedStart = "suspendedStart";
+ var GenStateSuspendedYield = "suspendedYield";
+ var GenStateExecuting = "executing";
+ var GenStateCompleted = "completed";
+
+ // Returning this object from the innerFn has the same effect as
+ // breaking out of the dispatch switch statement.
+ var ContinueSentinel = {};
+
+ // Dummy constructor functions that we use as the .constructor and
+ // .constructor.prototype properties for functions that return Generator
+ // objects. For full spec compliance, you may wish to configure your
+ // minifier not to mangle the names of these two functions.
+ function Generator() {}
+ function GeneratorFunction() {}
+ function GeneratorFunctionPrototype() {}
+
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
+ GeneratorFunction.displayName = "GeneratorFunction";
+
+ runtime.isGeneratorFunction = function(genFun) {
+ var ctor = typeof genFun === "function" && genFun.constructor;
+ return ctor
+ ? ctor === GeneratorFunction ||
+ // For the native GeneratorFunction constructor, the best we can
+ // do is to check its .name property.
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
+ : false;
+ };
+
+ runtime.mark = function(genFun) {
+ genFun.__proto__ = GeneratorFunctionPrototype;
+ genFun.prototype = Object.create(Gp);
+ return genFun;
+ };
+
+ runtime.async = function(innerFn, outerFn, self, tryLocsList) {
+ return new Promise(function(resolve, reject) {
+ var generator = wrap(innerFn, outerFn, self, tryLocsList);
+ var callNext = step.bind(generator, "next");
+ var callThrow = step.bind(generator, "throw");
+
+ function step(method, arg) {
+ var record = tryCatch(generator[method], generator, arg);
+ if (record.type === "throw") {
+ reject(record.arg);
+ return;
+ }
+
+ var info = record.arg;
+ if (info.done) {
+ resolve(info.value);
+ } else {
+ Promise.resolve(info.value).then(callNext, callThrow);
+ }
+ }
+
+ callNext();
+ });
+ };
+
+ function makeInvokeMethod(innerFn, self, context) {
+ var state = GenStateSuspendedStart;
+
+ return function invoke(method, arg) {
+ if (state === GenStateExecuting) {
+ throw new Error("Generator is already running");
+ }
+
+ if (state === GenStateCompleted) {
+ // Be forgiving, per 25.3.3.3.3 of the spec:
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+ return doneResult();
+ }
+
+ while (true) {
+ var delegate = context.delegate;
+ if (delegate) {
+ if (method === "return" ||
+ (method === "throw" && delegate.iterator[method] === undefined)) {
+ // A return or throw (when the delegate iterator has no throw
+ // method) always terminates the yield* loop.
+ context.delegate = null;
+
+ // If the delegate iterator has a return method, give it a
+ // chance to clean up.
+ var returnMethod = delegate.iterator["return"];
+ if (returnMethod) {
+ var record = tryCatch(returnMethod, delegate.iterator, arg);
+ if (record.type === "throw") {
+ // If the return method threw an exception, let that
+ // exception prevail over the original return or throw.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+ }
+
+ if (method === "return") {
+ // Continue with the outer return, now that the delegate
+ // iterator has been terminated.
+ continue;
+ }
+ }
+
+ var record = tryCatch(
+ delegate.iterator[method],
+ delegate.iterator,
+ arg
+ );
+
+ if (record.type === "throw") {
+ context.delegate = null;
+
+ // Like returning generator.throw(uncaught), but without the
+ // overhead of an extra function call.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+
+ // Delegate generator ran and handled its own exceptions so
+ // regardless of what the method was, we continue as if it is
+ // "next" with an undefined arg.
+ method = "next";
+ arg = undefined;
+
+ var info = record.arg;
+ if (info.done) {
+ context[delegate.resultName] = info.value;
+ context.next = delegate.nextLoc;
+ } else {
+ state = GenStateSuspendedYield;
+ return info;
+ }
+
+ context.delegate = null;
+ }
+
+ if (method === "next") {
+ if (state === GenStateSuspendedYield) {
+ context.sent = arg;
+ } else {
+ delete context.sent;
+ }
+
+ } else if (method === "throw") {
+ if (state === GenStateSuspendedStart) {
+ state = GenStateCompleted;
+ throw arg;
+ }
+
+ if (context.dispatchException(arg)) {
+ // If the dispatched exception was caught by a catch block,
+ // then let that catch block handle the exception normally.
+ method = "next";
+ arg = undefined;
+ }
+
+ } else if (method === "return") {
+ context.abrupt("return", arg);
+ }
+
+ state = GenStateExecuting;
+
+ var record = tryCatch(innerFn, self, context);
+ if (record.type === "normal") {
+ // If an exception is thrown from innerFn, we leave state ===
+ // GenStateExecuting and loop back for another invocation.
+ state = context.done
+ ? GenStateCompleted
+ : GenStateSuspendedYield;
+
+ var info = {
+ value: record.arg,
+ done: context.done
+ };
+
+ if (record.arg === ContinueSentinel) {
+ if (context.delegate && method === "next") {
+ // Deliberately forget the last sent value so that we don't
+ // accidentally pass it on to the delegate.
+ arg = undefined;
+ }
+ } else {
+ return info;
+ }
+
+ } else if (record.type === "throw") {
+ state = GenStateCompleted;
+ // Dispatch the exception by looping back around to the
+ // context.dispatchException(arg) call above.
+ method = "throw";
+ arg = record.arg;
+ }
+ }
+ };
+ }
+
+ function defineGeneratorMethod(method) {
+ Gp[method] = function(arg) {
+ return this._invoke(method, arg);
+ };
+ }
+ defineGeneratorMethod("next");
+ defineGeneratorMethod("throw");
+ defineGeneratorMethod("return");
+
+ Gp[iteratorSymbol] = function() {
+ return this;
+ };
+
+ Gp.toString = function() {
+ return "[object Generator]";
+ };
+
+ function pushTryEntry(locs) {
+ var entry = { tryLoc: locs[0] };
+
+ if (1 in locs) {
+ entry.catchLoc = locs[1];
+ }
+
+ if (2 in locs) {
+ entry.finallyLoc = locs[2];
+ entry.afterLoc = locs[3];
+ }
+
+ this.tryEntries.push(entry);
+ }
+
+ function resetTryEntry(entry) {
+ var record = entry.completion || {};
+ record.type = "normal";
+ delete record.arg;
+ entry.completion = record;
+ }
+
+ function Context(tryLocsList) {
+ // The root entry object (effectively a try statement without a catch
+ // or a finally block) gives us a place to store values thrown from
+ // locations where there is no enclosing try statement.
+ this.tryEntries = [{ tryLoc: "root" }];
+ tryLocsList.forEach(pushTryEntry, this);
+ this.reset();
+ }
+
+ runtime.keys = function(object) {
+ var keys = [];
+ for (var key in object) {
+ keys.push(key);
+ }
+ keys.reverse();
+
+ // Rather than returning an object with a next method, we keep
+ // things simple and return the next function itself.
+ return function next() {
+ while (keys.length) {
+ var key = keys.pop();
+ if (key in object) {
+ next.value = key;
+ next.done = false;
+ return next;
+ }
+ }
+
+ // To avoid creating an additional object, we just hang the .value
+ // and .done properties off the next function object itself. This
+ // also ensures that the minifier will not anonymize the function.
+ next.done = true;
+ return next;
+ };
+ };
+
+ function values(iterable) {
+ if (iterable) {
+ var iteratorMethod = iterable[iteratorSymbol];
+ if (iteratorMethod) {
+ return iteratorMethod.call(iterable);
+ }
+
+ if (typeof iterable.next === "function") {
+ return iterable;
+ }
+
+ if (!isNaN(iterable.length)) {
+ var i = -1, next = function next() {
+ while (++i < iterable.length) {
+ if (hasOwn.call(iterable, i)) {
+ next.value = iterable[i];
+ next.done = false;
+ return next;
+ }
+ }
+
+ next.value = undefined;
+ next.done = true;
+
+ return next;
+ };
+
+ return next.next = next;
+ }
+ }
+
+ // Return an iterator with no values.
+ return { next: doneResult };
+ }
+ runtime.values = values;
+
+ function doneResult() {
+ return { value: undefined, done: true };
+ }
+
+ Context.prototype = {
+ constructor: Context,
+
+ reset: function() {
+ this.prev = 0;
+ this.next = 0;
+ this.sent = undefined;
+ this.done = false;
+ this.delegate = null;
+
+ this.tryEntries.forEach(resetTryEntry);
+
+ // Pre-initialize at least 20 temporary variables to enable hidden
+ // class optimizations for simple generators.
+ for (var tempIndex = 0, tempName;
+ hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20;
+ ++tempIndex) {
+ this[tempName] = null;
+ }
+ },
+
+ stop: function() {
+ this.done = true;
+
+ var rootEntry = this.tryEntries[0];
+ var rootRecord = rootEntry.completion;
+ if (rootRecord.type === "throw") {
+ throw rootRecord.arg;
+ }
+
+ return this.rval;
+ },
+
+ dispatchException: function(exception) {
+ if (this.done) {
+ throw exception;
+ }
+
+ var context = this;
+ function handle(loc, caught) {
+ record.type = "throw";
+ record.arg = exception;
+ context.next = loc;
+ return !!caught;
+ }
+
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ var record = entry.completion;
+
+ if (entry.tryLoc === "root") {
+ // Exception thrown outside of any try block that could handle
+ // it, so set the completion value of the entire function to
+ // throw the exception.
+ return handle("end");
+ }
+
+ if (entry.tryLoc <= this.prev) {
+ var hasCatch = hasOwn.call(entry, "catchLoc");
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
+
+ if (hasCatch && hasFinally) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ } else if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else if (hasCatch) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ }
+
+ } else if (hasFinally) {
+ if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else {
+ throw new Error("try statement without catch or finally");
+ }
+ }
+ }
+ },
+
+ abrupt: function(type, arg) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc <= this.prev &&
+ hasOwn.call(entry, "finallyLoc") &&
+ this.prev < entry.finallyLoc) {
+ var finallyEntry = entry;
+ break;
+ }
+ }
+
+ if (finallyEntry &&
+ (type === "break" ||
+ type === "continue") &&
+ finallyEntry.tryLoc <= arg &&
+ arg <= finallyEntry.finallyLoc) {
+ // Ignore the finally entry if control is not jumping to a
+ // location outside the try/catch block.
+ finallyEntry = null;
+ }
+
+ var record = finallyEntry ? finallyEntry.completion : {};
+ record.type = type;
+ record.arg = arg;
+
+ if (finallyEntry) {
+ this.next = finallyEntry.finallyLoc;
+ } else {
+ this.complete(record);
+ }
+
+ return ContinueSentinel;
+ },
+
+ complete: function(record, afterLoc) {
+ if (record.type === "throw") {
+ throw record.arg;
+ }
+
+ if (record.type === "break" ||
+ record.type === "continue") {
+ this.next = record.arg;
+ } else if (record.type === "return") {
+ this.rval = record.arg;
+ this.next = "end";
+ } else if (record.type === "normal" && afterLoc) {
+ this.next = afterLoc;
+ }
+ },
+
+ finish: function(finallyLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.finallyLoc === finallyLoc) {
+ this.complete(entry.completion, entry.afterLoc);
+ resetTryEntry(entry);
+ return ContinueSentinel;
+ }
+ }
+ },
+
+ "catch": function(tryLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc === tryLoc) {
+ var record = entry.completion;
+ if (record.type === "throw") {
+ var thrown = record.arg;
+ resetTryEntry(entry);
+ }
+ return thrown;
+ }
+ }
+
+ // The context.catch method must only be called with a location
+ // argument that corresponds to a known catch block.
+ throw new Error("illegal catch attempt");
+ },
+
+ delegateYield: function(iterable, resultName, nextLoc) {
+ this.delegate = {
+ iterator: values(iterable),
+ resultName: resultName,
+ nextLoc: nextLoc
+ };
+
+ return ContinueSentinel;
+ }
+ };
+})(
+ // Among the various tricks for obtaining a reference to the global
+ // object, this seems to be the most reliable technique that does not
+ // use indirect eval (which violates Content Security Policy).
+ typeof global === "object" ? global :
+ typeof window === "object" ? window :
+ typeof self === "object" ? self : this
+);
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}]},{},[1]);
diff --git a/assets/babel-core/browser-polyfill.min.js b/assets/babel-core/browser-polyfill.min.js
new file mode 100644
index 000000000..cf64f17fa
--- /dev/null
+++ b/assets/babel-core/browser-polyfill.min.js
@@ -0,0 +1,4 @@
+(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;oindex){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$":21}],3:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function(callbackfn){var O=Object($.assertDefined(this)),self=$.ES5Object(O),f=ctx(callbackfn,arguments[1],3),length=$.toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$":21,"./$.ctx":11}],4:[function(require,module,exports){var $=require("./$");function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}assert.def=$.assertDefined;assert.fn=function(it){if(!$.isFunction(it))throw TypeError(it+" is not a function!");return it};assert.obj=function(it){if(!$.isObject(it))throw TypeError(it+" is not an object!");return it};assert.inst=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it};module.exports=assert},{"./$":21}],5:[function(require,module,exports){var $=require("./$"),enumKeys=require("./$.enum-keys");module.exports=Object.assign||function assign(target,source){var T=Object($.assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=$.ES5Object(arguments[i++]),keys=enumKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$":21,"./$.enum-keys":13}],6:[function(require,module,exports){var $=require("./$"),TAG=require("./$.wks")("toStringTag"),toString={}.toString;function cof(it){return toString.call(it).slice(8,-1)}cof.classof=function(it){var O,T;return it==undefined?it===undefined?"Undefined":"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:cof(O)};cof.set=function(it,tag,stat){if(it&&!$.has(it=stat?it:it.prototype,TAG))$.hide(it,TAG,tag)};module.exports=cof},{"./$":21,"./$.wks":32}],7:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),step=require("./$.iter").step,has=$.has,set=$.set,isObject=$.isObject,hide=$.hide,isFrozen=Object.isFrozen||$.core.Object.isFrozen,ID=safe("id"),O1=safe("O1"),LAST=safe("last"),FIRST=safe("first"),ITER=safe("iter"),SIZE=$.DESC?safe("size"):"size",id=0;function fastKey(it,create){if(!isObject(it))return(typeof it=="string"?"S":"P")+it;if(isFrozen(it))return"F";if(!has(it,ID)){if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(){var that=assert.inst(this,C,NAME),iterable=arguments[0];set(that,O1,$.create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)}$.mix(C.prototype,{clear:function clear(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function forEach(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function has(key){return!!getEntry(this,key)}});if($.DESC)$.setDesc(C.prototype,"size",{get:function(){return assert.def(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!="F")that[O1][index]=entry}return that},getEntry:getEntry,setIter:function(C,NAME,IS_MAP){require("./$.iter-define")(C,NAME,function(iterated,kind){set(this,ITER,{o:iterated,k:kind})},function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){iter.o=undefined;return step(1)}if(kind=="keys")return step(0,entry.k);if(kind=="values")return step(0,entry.v);return step(0,[entry.k,entry.v])},IS_MAP?"entries":"values",!IS_MAP,true)}}},{"./$":21,"./$.assert":4,"./$.ctx":11,"./$.for-of":14,"./$.iter":20,"./$.iter-define":18,"./$.uid":30}],8:[function(require,module,exports){var $def=require("./$.def"),forOf=require("./$.for-of");module.exports=function(NAME){$def($def.P,NAME,{toJSON:function toJSON(){var arr=[];forOf(this,false,arr.push,arr);return arr}})}},{"./$.def":12,"./$.for-of":14}],9:[function(require,module,exports){"use strict";var $=require("./$"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),_has=$.has,isObject=$.isObject,hide=$.hide,isFrozen=Object.isFrozen||$.core.Object.isFrozen,id=0,ID=safe("id"),WEAK=safe("weak"),LEAK=safe("leak"),method=require("./$.array-methods"),find=method(5),findIndex=method(6);function findFrozen(store,key){return find.call(store.array,function(it){return it[0]===key})}function leakStore(that){return that[LEAK]||hide(that,LEAK,{array:[],get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.array.push([key,value])},"delete":function(key){var index=findIndex.call(this.array,function(it){return it[0]===key});if(~index)this.array.splice(index,1);return!!~index}})[LEAK]}module.exports={getConstructor:function(NAME,IS_MAP,ADDER){function C(){$.set(assert.inst(this,C,NAME),ID,id++);var iterable=arguments[0];if(iterable!=undefined)forOf(iterable,IS_MAP,this[ADDER],this)}$.mix(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this)["delete"](key);return _has(key,WEAK)&&_has(key[WEAK],this[ID])&&delete key[WEAK][this[ID]]},has:function has(key){if(!isObject(key))return false;if(isFrozen(key))return leakStore(this).has(key);return _has(key,WEAK)&&_has(key[WEAK],this[ID])}});return C},def:function(that,key,value){if(isFrozen(assert.obj(key))){leakStore(that).set(key,value)}else{_has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that[ID]]=value}return that},leakStore:leakStore,WEAK:WEAK,ID:ID}},{"./$":21,"./$.array-methods":3,"./$.assert":4,"./$.for-of":14,"./$.uid":30}],10:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),BUGGY=require("./$.iter").BUGGY,forOf=require("./$.for-of"),species=require("./$.species"),assertInstance=require("./$.assert").inst;module.exports=function(NAME,methods,common,IS_MAP,IS_WEAK){var Base=$.g[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};function fixMethod(KEY,CHAIN){var method=proto[KEY];if($.FW)proto[KEY]=function(a,b){var result=method.call(this,a===0?0:a,b);return CHAIN?this:result}}if(!$.isFunction(C)||!(IS_WEAK||!BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(NAME,IS_MAP,ADDER);$.mix(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](IS_WEAK?{}:-0,1),buggyZero;if(!require("./$.iter-detect")(function(iter){new C(iter)})){C=function(){assertInstance(this,C,NAME);var that=new Base,iterable=arguments[0];if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that);return that};C.prototype=proto;if($.FW)proto.constructor=C}IS_WEAK||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER,true)}require("./$.cof").set(C,NAME);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);species(C);species($.core[NAME]);if(!IS_WEAK)common.setIter(C,NAME,IS_MAP);return C}},{"./$":21,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.for-of":14,"./$.iter":20,"./$.iter-detect":19,"./$.species":27}],11:[function(require,module,exports){var assertFunction=require("./$.assert").fn;module.exports=function(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.assert":4}],12:[function(require,module,exports){var $=require("./$"),global=$.g,core=$.core,isFunction=$.isFunction;function ctx(fn,that){return function(){return fn.apply(that,arguments)}}global.core=core;$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;function $def(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,target=isGlobal?global:type&$def.S?global[name]:(global[name]||{}).prototype,exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;out=(own?target:source)[key];if(type&$def.B&&own)exp=ctx(out,global);else exp=type&$def.P&&isFunction(out)?ctx(Function.call,out):out;if(target&&!own){if(isGlobal)target[key]=out;else delete target[key]&&$.hide(target,key,out)}if(exports[key]!=out)$.hide(exports,key,exp)}}module.exports=$def},{"./$":21}],13:[function(require,module,exports){var $=require("./$");module.exports=function(it){var keys=$.getKeys(it),getDesc=$.getDesc,getSymbols=$.getSymbols;if(getSymbols)$.each.call(getSymbols(it),function(key){if(getDesc(it,key).enumerable)keys.push(key)});return keys}},{"./$":21}],14:[function(require,module,exports){var ctx=require("./$.ctx"),get=require("./$.iter").get,call=require("./$.iter-call");module.exports=function(iterable,entries,fn,that){var iterator=get(iterable),f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done){if(call(iterator,f,step.value,entries)===false){return call.close(iterator)}}}},{"./$.ctx":11,"./$.iter":20,"./$.iter-call":17}],15:[function(require,module,exports){module.exports=function($){$.FW=true;$.path=$.g;return $}},{}],16:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}},{}],17:[function(require,module,exports){var assertObject=require("./$.assert").obj;function close(iterator){var ret=iterator["return"];if(ret!==undefined)assertObject(ret.call(iterator))}function call(iterator,fn,value,entries){try{return entries?fn(assertObject(value)[0],value[1]):fn(value)}catch(e){close(iterator);throw e}}call.close=close;module.exports=call},{"./$.assert":4}],18:[function(require,module,exports){var $def=require("./$.def"),$=require("./$"),cof=require("./$.cof"),$iter=require("./$.iter"),SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",VALUES="values",Iterators=$iter.Iterators;module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){$iter.create(Constructor,NAME,next);function createMethod(kind){return function(){return new Constructor(this,kind)}}var TAG=NAME+" Iterator",proto=Base.prototype,_native=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],_default=_native||createMethod(DEFAULT),methods,key;if(_native){var IteratorPrototype=$.getProto(_default.call(new Base));cof.set(IteratorPrototype,TAG,true);if($.FW&&$.has(proto,FF_ITERATOR))$iter.set(IteratorPrototype,$.that)}if($.FW)$iter.set(proto,_default);Iterators[NAME]=_default;Iterators[TAG]=$.that;if(DEFAULT){methods={keys:IS_SET?_default:createMethod("keys"),values:DEFAULT==VALUES?_default:createMethod(VALUES),entries:DEFAULT!=VALUES?_default:createMethod("entries")};if(FORCE)for(key in methods){if(!(key in proto))$.hide(proto,key,methods[key])}else $def($def.P+$def.F*$iter.BUGGY,NAME,methods)}}},{"./$":21,"./$.cof":6,"./$.def":12,"./$.iter":20,"./$.wks":32}],19:[function(require,module,exports){var SYMBOL_ITERATOR=require("./$.wks")("iterator"),SAFE_CLOSING=false;try{var riter=[7][SYMBOL_ITERATOR]();riter["return"]=function(){SAFE_CLOSING=true};Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec){if(!SAFE_CLOSING)return false;var safe=false;try{var arr=[7],iter=arr[SYMBOL_ITERATOR]();iter.next=function(){safe=true};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return safe}},{"./$.wks":32}],20:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),assertObject=require("./$.assert").obj,SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",Iterators={},IteratorPrototype={};setIterator(IteratorPrototype,$.that);function setIterator(O,value){$.hide(O,SYMBOL_ITERATOR,value);if(FF_ITERATOR in[])$.hide(O,FF_ITERATOR,value)}module.exports={BUGGY:"keys"in[]&&!("next"in[].keys()),Iterators:Iterators,step:function(done,value){return{value:value,done:!!done}},is:function(it){var O=Object(it),Symbol=$.g.Symbol,SYM=Symbol&&Symbol.iterator||FF_ITERATOR;return SYM in O||SYMBOL_ITERATOR in O||$.has(Iterators,cof.classof(O))},get:function(it){var Symbol=$.g.Symbol,ext=it[Symbol&&Symbol.iterator||FF_ITERATOR],getIter=ext||it[SYMBOL_ITERATOR]||Iterators[cof.classof(it)];return assertObject(getIter.call(it))},set:setIterator,create:function(Constructor,NAME,next,proto){Constructor.prototype=$.create(proto||IteratorPrototype,{next:$.desc(1,next)});cof.set(Constructor,NAME+" Iterator")}}},{"./$":21,"./$.assert":4,"./$.cof":6,"./$.wks":32}],21:[function(require,module,exports){"use strict";var global=typeof self!="undefined"?self:Function("return this")(),core={},defineProperty=Object.defineProperty,hasOwnProperty={}.hasOwnProperty,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min;var DESC=!!function(){try{return defineProperty({},"a",{get:function(){return 2}}).a==2}catch(e){}}();var hide=createDefiner(1);function toInteger(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}function desc(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return $.setDesc(object,key,desc(bitmap,value))}:simpleSet}function isObject(it){return it!==null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}function assertDefined(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}var $=module.exports=require("./$.fw")({g:global,core:core,html:global.document&&document.documentElement,isObject:isObject,isFunction:isFunction,it:function(it){return it},that:function(){return this},toInteger:toInteger,toLength:function(it){return it>0?min(toInteger(it),9007199254740991):0},toIndex:function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)},has:function(it,key){return hasOwnProperty.call(it,key)},create:Object.create,getProto:Object.getPrototypeOf,DESC:DESC,desc:desc,getDesc:Object.getOwnPropertyDescriptor,setDesc:defineProperty,setDescs:Object.defineProperties,getKeys:Object.keys,getNames:Object.getOwnPropertyNames,getSymbols:Object.getOwnPropertySymbols,assertDefined:assertDefined,ES5Object:Object,toObject:function(it){return $.ES5Object(assertDefined(it))},hide:hide,def:createDefiner(0),set:global.Symbol?simpleSet:hide,mix:function(target,src){for(var key in src)hide(target,key,src[key]);return target},each:[].forEach});if(typeof __e!="undefined")__e=core;if(typeof __g!="undefined")__g=global},{"./$.fw":15}],22:[function(require,module,exports){var $=require("./$");module.exports=function(object,el){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":21}],23:[function(require,module,exports){var $=require("./$"),assertObject=require("./$.assert").obj;module.exports=function ownKeys(it){assertObject(it);var keys=$.getNames(it),getSymbols=$.getSymbols;return getSymbols?keys.concat(getSymbols(it)):keys}},{"./$":21,"./$.assert":4}],24:[function(require,module,exports){"use strict";var $=require("./$"),invoke=require("./$.invoke"),assertFunction=require("./$.assert").fn;module.exports=function(){var fn=assertFunction(this),length=arguments.length,pargs=Array(length),i=0,_=$.path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$":21,"./$.assert":4,"./$.invoke":16}],25:[function(require,module,exports){"use strict";module.exports=function(regExp,replace,isStatic){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}},{}],26:[function(require,module,exports){var $=require("./$"),assert=require("./$.assert");function check(O,proto){assert.obj(O);assert(proto===null||$.isObject(proto),proto,": can't set as prototype!")}module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,$.getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined),check:check}},{"./$":21,"./$.assert":4,"./$.ctx":11}],27:[function(require,module,exports){var $=require("./$"),SPECIES=require("./$.wks")("species");module.exports=function(C){if($.DESC&&!(SPECIES in C))$.setDesc(C,SPECIES,{configurable:true,get:$.that})}},{"./$":21,"./$.wks":32}],28:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function(TO_STRING){return function(pos){var s=String($.assertDefined(this)),i=$.toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$":21}],29:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),invoke=require("./$.invoke"),global=$.g,isFunction=$.isFunction,html=$.html,document=global.document,process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,postMessage=global.postMessage,addEventListener=global.addEventListener,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;function run(){var id=+this;if($.has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run.call(event.data)}if(!isFunction(setTask)||!isFunction(clearTask)){setTask=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearTask=function(id){delete queue[id]};if(cof(process)=="process"){defer=function(id){process.nextTick(ctx(run,id,1))}}else if(addEventListener&&isFunction(postMessage)&&!global.importScripts){defer=function(id){postMessage(id,"*")};addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if(document&&ONREADYSTATECHANGE in document.createElement("script")){defer=function(id){html.appendChild(document.createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$":21,"./$.cof":6,"./$.ctx":11,"./$.invoke":16}],30:[function(require,module,exports){var sid=0;function uid(key){return"Symbol("+key+")_"+(++sid+Math.random()).toString(36)}uid.safe=require("./$").g.Symbol||uid;module.exports=uid},{"./$":21}],31:[function(require,module,exports){var $=require("./$"),UNSCOPABLES=require("./$.wks")("unscopables");if($.FW&&!(UNSCOPABLES in[]))$.hide(Array.prototype,UNSCOPABLES,{});module.exports=function(key){if($.FW)[][UNSCOPABLES][key]=true}},{"./$":21,"./$.wks":32}],32:[function(require,module,exports){var global=require("./$").g,store={};module.exports=function(name){return store[name]||(store[name]=global.Symbol&&global.Symbol[name]||require("./$.uid").safe("Symbol."+name))}},{"./$":21,"./$.uid":30}],33:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid").safe("__proto__"),assert=require("./$.assert"),assertObject=assert.obj,ObjectProto=Object.prototype,A=[],slice=A.slice,indexOf=A.indexOf,classof=cof.classof,has=$.has,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,defineProperties=$.setDescs,isFunction=$.isFunction,toObject=$.toObject,toLength=$.toLength,IE8_DOM_DEFINE=false;if(!$.DESC){try{IE8_DOM_DEFINE=defineProperty(document.createElement("div"),"x",{get:function(){return 8}}).x==8}catch(e){}$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)assertObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};$.setDescs=defineProperties=function(O,Properties){assertObject(O);var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!$.DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=document.createElement("iframe"),i=keysLen1,gt=">",iframeDocument;iframe.style.display="none";$.html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write("i)if(has(O,key=names[i++])){~indexOf.call(result,key)||result.push(key)}return result}}function isPrimitive(it){return!$.isObject(it)}function Empty(){}$def($def.S,"Object",{getPrototypeOf:$.getProto=$.getProto||function(O){O=Object(assert.def(O));if(has(O,IE_PROTO))return O[IE_PROTO];if(isFunction(O.constructor)&&O instanceof O.constructor){return O.constructor.prototype}return O instanceof Object?ObjectProto:null},getOwnPropertyNames:$.getNames=$.getNames||createGetKeys(keys2,keys2.length,true),create:$.create=$.create||function(O,Properties){var result;if(O!==null){Empty.prototype=assertObject(O);result=new Empty;Empty.prototype=null;result[IE_PROTO]=O}else result=createDict();return Properties===undefined?result:defineProperties(result,Properties)},keys:$.getKeys=$.getKeys||createGetKeys(keys1,keysLen1,false),seal:$.it,freeze:$.it,preventExtensions:$.it,isSealed:isPrimitive,isFrozen:isPrimitive,isExtensible:$.isObject});$def($def.P,"Function",{bind:function(that){var fn=assert.fn(this),partArgs=slice.call(arguments,1);function bound(){var args=partArgs.concat(slice.call(arguments));return invoke(fn,args,this instanceof bound?$.create(fn.prototype):that)}if(fn.prototype)bound.prototype=fn.prototype;return bound}});function arrayMethodFix(fn){return function(){return fn.apply($.ES5Object(this),arguments)}}if(!(0 in Object("z")&&"z"[0]=="z")){$.ES5Object=function(it){return cof(it)=="String"?it.split(""):Object(it)}}$def($def.P+$def.F*($.ES5Object!=Object),"Array",{slice:arrayMethodFix(slice),join:arrayMethodFix(A.join)});$def($def.S,"Array",{isArray:function(arg){return cof(arg)=="Array"}});function createArrayReduce(isRight){return function(callbackfn,memo){assert.fn(callbackfn);var O=toObject(this),length=toLength(O.length),index=isRight?length-1:0,i=isRight?-1:1;if(arguments.length<2)for(;;){if(index in O){memo=O[index];index+=i;break}index+=i;assert(isRight?index>=0:length>index,"Reduce of empty array with no initial value")}for(;isRight?index>=0:length>index;index+=i)if(index in O){memo=callbackfn(memo,O[index],index,this)}return memo}}$def($def.P,"Array",{forEach:$.each=$.each||arrayMethod(0),map:arrayMethod(1),filter:arrayMethod(2),some:arrayMethod(3),every:arrayMethod(4),reduce:createArrayReduce(false),reduceRight:createArrayReduce(true),indexOf:indexOf=indexOf||require("./$.array-includes")(false),lastIndexOf:function(el,fromIndex){var O=toObject(this),length=toLength(O.length),index=length-1;if(arguments.length>1)index=Math.min(index,$.toInteger(fromIndex));if(index<0)index=toLength(length+index);for(;index>=0;index--)if(index in O)if(O[index]===el)return index;return-1}});$def($def.P,"String",{trim:require("./$.replacer")(/^\s*([\s\S]*\S)?\s*$/,"$1")});$def($def.S,"Date",{now:function(){return+new Date}});function lz(num){return num>9?num:"0"+num}var date=new Date(-5e13-1),brokenDate=!(date.toISOString&&date.toISOString()=="0385-07-25T07:06:39.999Z");$def($def.P+$def.F*brokenDate,"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var d=this,y=d.getUTCFullYear(),m=d.getUTCMilliseconds(),s=y<0?"-":y>9999?"+":"";return s+("00000"+Math.abs(y)).slice(s?-6:-4)+"-"+lz(d.getUTCMonth()+1)+"-"+lz(d.getUTCDate())+"T"+lz(d.getUTCHours())+":"+lz(d.getUTCMinutes())+":"+lz(d.getUTCSeconds())+"."+(m>99?m:"0"+lz(m))+"Z"}});if(classof(function(){return arguments}())=="Object")cof.classof=function(it){var tag=classof(it);return tag=="Object"&&isFunction(it.callee)?"Arguments":tag}},{"./$":21,"./$.array-includes":2,"./$.array-methods":3,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.invoke":16,"./$.replacer":25,"./$.uid":30}],34:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{copyWithin:function copyWithin(target,start){var O=Object($.assertDefined(this)),len=$.toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],fin=end===undefined?len:toIndex(end,len),count=Math.min(fin-from,len-to),inc=1;if(from0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O}});require("./$.unscope")("copyWithin")},{"./$":21,"./$.def":12,"./$.unscope":31}],35:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{fill:function fill(value){var O=Object($.assertDefined(this)),length=$.toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O}});require("./$.unscope")("fill")},{"./$":21,"./$.def":12,"./$.unscope":31}],36:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{findIndex:require("./$.array-methods")(6)});require("./$.unscope")("findIndex")},{"./$.array-methods":3,"./$.def":12,"./$.unscope":31}],37:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{find:require("./$.array-methods")(5)});require("./$.unscope")("find")},{"./$.array-methods":3,"./$.def":12,"./$.unscope":31}],38:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),$iter=require("./$.iter"),call=require("./$.iter-call");$def($def.S+$def.F*!require("./$.iter-detect")(function(iter){Array.from(iter)}),"Array",{from:function from(arrayLike){var O=Object($.assertDefined(arrayLike)),mapfn=arguments[1],mapping=mapfn!==undefined,f=mapping?ctx(mapfn,arguments[2],2):undefined,index=0,length,result,step,iterator;if($iter.is(O)){iterator=$iter.get(O);result=new(typeof this=="function"?this:Array);for(;!(step=iterator.next()).done;index++){result[index]=mapping?call(iterator,f,[step.value,index],true):step.value}}else{result=new(typeof this=="function"?this:Array)(length=$.toLength(O.length));for(;length>index;index++){result[index]=mapping?f(O[index],index):O[index]}}result.length=index;return result}})},{"./$":21,"./$.ctx":11,"./$.def":12,"./$.iter":20,"./$.iter-call":17,"./$.iter-detect":19}],39:[function(require,module,exports){var $=require("./$"),setUnscope=require("./$.unscope"),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step,Iterators=$iter.Iterators;require("./$.iter-define")(Array,"Array",function(iterated,kind){$.set(this,ITER,{o:$.toObject(iterated),i:0,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,index=iter.i++;if(!O||index>=O.length){iter.o=undefined;return step(1)}if(kind=="keys")return step(0,index);if(kind=="values")return step(0,O[index]);return step(0,[index,O[index]])},"values");Iterators.Arguments=Iterators.Array;setUnscope("keys");setUnscope("values");setUnscope("entries")},{"./$":21,"./$.iter":20,"./$.iter-define":18,"./$.uid":30,"./$.unscope":31}],40:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Array",{of:function of(){var index=0,length=arguments.length,result=new(typeof this=="function"?this:Array)(length);while(length>index)result[index]=arguments[index++];result.length=length;return result;
+
+}})},{"./$.def":12}],41:[function(require,module,exports){require("./$.species")(Array)},{"./$.species":27}],42:[function(require,module,exports){"use strict";var $=require("./$"),NAME="name",setDesc=$.setDesc,FunctionProto=Function.prototype;NAME in FunctionProto||$.FW&&$.DESC&&setDesc(FunctionProto,NAME,{configurable:true,get:function(){var match=String(this).match(/^\s*function ([^ (]*)/),name=match?match[1]:"";$.has(this,NAME)||setDesc(this,NAME,$.desc(5,name));return name},set:function(value){$.has(this,NAME)||setDesc(this,NAME,$.desc(0,value))}})},{"./$":21}],43:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Map",{get:function get(key){var entry=strong.getEntry(this,key);return entry&&entry.v},set:function set(key,value){return strong.def(this,key===0?0:key,value)}},strong,true)},{"./$.collection":10,"./$.collection-strong":7}],44:[function(require,module,exports){var Infinity=1/0,$def=require("./$.def"),E=Math.E,pow=Math.pow,abs=Math.abs,exp=Math.exp,log=Math.log,sqrt=Math.sqrt,ceil=Math.ceil,floor=Math.floor,EPSILON=pow(2,-52),EPSILON32=pow(2,-23),MAX32=pow(2,127)*(2-EPSILON32),MIN32=pow(2,-126);function roundTiesToEven(n){return n+1/EPSILON-1/EPSILON}function sign(x){return(x=+x)==0||x!=x?x:x<0?-1:1}function asinh(x){return!isFinite(x=+x)||x==0?x:x<0?-asinh(-x):log(x+sqrt(x*x+1))}function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:exp(x)-1}$def($def.S,"Math",{acosh:function acosh(x){return(x=+x)<1?NaN:isFinite(x)?log(x/E+sqrt(x+1)*sqrt(x-1)/E)+1:x},asinh:asinh,atanh:function atanh(x){return(x=+x)==0?x:log((1+x)/(1-x))/2},cbrt:function cbrt(x){return sign(x=+x)*pow(abs(x),1/3)},clz32:function clz32(x){return(x>>>=0)?31-floor(log(x+.5)*Math.LOG2E):32},cosh:function cosh(x){return(exp(x=+x)+exp(-x))/2},expm1:expm1,fround:function fround(x){var $abs=abs(x),$sign=sign(x),a,result;if($absMAX32||result!=result)return $sign*Infinity;return $sign*result},hypot:function hypot(value1,value2){var sum=0,len1=arguments.length,len2=len1,args=Array(len1),larg=-Infinity,arg;while(len1--){arg=args[len1]=+arguments[len1];if(arg==Infinity||arg==-Infinity)return Infinity;if(arg>larg)larg=arg}larg=arg||1;while(len2--)sum+=pow(args[len2]/larg,2);return larg*sqrt(sum)},imul:function imul(x,y){var UInt16=65535,xn=+x,yn=+y,xl=UInt16&xn,yl=UInt16&yn;return 0|xl*yl+((UInt16&xn>>>16)*yl+xl*(UInt16&yn>>>16)<<16>>>0)},log1p:function log1p(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:log(1+x)},log10:function log10(x){return log(x)/Math.LN10},log2:function log2(x){return log(x)/Math.LN2},sign:sign,sinh:function sinh(x){return abs(x=+x)<1?(expm1(x)-expm1(-x))/2:(exp(x-1)-exp(-x-1))*(E/2)},tanh:function tanh(x){var a=expm1(x=+x),b=expm1(-x);return a==Infinity?1:b==Infinity?-1:(a-b)/(exp(x)+exp(-x))},trunc:function trunc(it){return(it>0?floor:ceil)(it)}})},{"./$.def":12}],45:[function(require,module,exports){"use strict";var $=require("./$"),isObject=$.isObject,isFunction=$.isFunction,NUMBER="Number",Number=$.g[NUMBER],Base=Number,proto=Number.prototype;function toPrimitive(it){var fn,val;if(isFunction(fn=it.valueOf)&&!isObject(val=fn.call(it)))return val;if(isFunction(fn=it.toString)&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to number")}function toNumber(it){if(isObject(it))it=toPrimitive(it);if(typeof it=="string"&&it.length>2&&it.charCodeAt(0)==48){var binary=false;switch(it.charCodeAt(1)){case 66:case 98:binary=true;case 79:case 111:return parseInt(it.slice(2),binary?2:8)}}return+it}if($.FW&&!(Number("0o1")&&Number("0b1"))){Number=function Number(it){return this instanceof Number?new Base(toNumber(it)):toNumber(it)};$.each.call($.DESC?$.getNames(Base):("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,"+"EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,"+"MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger").split(","),function(key){if($.has(Base,key)&&!$.has(Number,key)){$.setDesc(Number,key,$.getDesc(Base,key))}});Number.prototype=proto;proto.constructor=Number;$.hide($.g,NUMBER,Number)}},{"./$":21}],46:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),abs=Math.abs,floor=Math.floor,_isFinite=$.g.isFinite,MAX_SAFE_INTEGER=9007199254740991;function isInteger(it){return!$.isObject(it)&&_isFinite(it)&&floor(it)===it}$def($def.S,"Number",{EPSILON:Math.pow(2,-52),isFinite:function isFinite(it){return typeof it=="number"&&_isFinite(it)},isInteger:isInteger,isNaN:function isNaN(number){return number!=number},isSafeInteger:function isSafeInteger(number){return isInteger(number)&&abs(number)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MIN_SAFE_INTEGER:-MAX_SAFE_INTEGER,parseFloat:parseFloat,parseInt:parseInt})},{"./$":21,"./$.def":12}],47:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{assign:require("./$.assign")})},{"./$.assign":5,"./$.def":12}],48:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{is:function is(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}})},{"./$.def":12}],49:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{setPrototypeOf:require("./$.set-proto").set})},{"./$.def":12,"./$.set-proto":26}],50:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),isObject=$.isObject,toObject=$.toObject;function wrapObjectMethod(METHOD,MODE){var fn=($.core.Object||{})[METHOD]||Object[METHOD],f=0,o={};o[METHOD]=MODE==1?function(it){return isObject(it)?fn(it):it}:MODE==2?function(it){return isObject(it)?fn(it):true}:MODE==3?function(it){return isObject(it)?fn(it):false}:MODE==4?function getOwnPropertyDescriptor(it,key){return fn(toObject(it),key)}:MODE==5?function getPrototypeOf(it){return fn(Object($.assertDefined(it)))}:function(it){return fn(toObject(it))};try{fn("z")}catch(e){f=1}$def($def.S+$def.F*f,"Object",o)}wrapObjectMethod("freeze",1);wrapObjectMethod("seal",1);wrapObjectMethod("preventExtensions",1);wrapObjectMethod("isFrozen",2);wrapObjectMethod("isSealed",2);wrapObjectMethod("isExtensible",3);wrapObjectMethod("getOwnPropertyDescriptor",4);wrapObjectMethod("getPrototypeOf",5);wrapObjectMethod("keys");wrapObjectMethod("getOwnPropertyNames")},{"./$":21,"./$.def":12}],51:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),tmp={};tmp[require("./$.wks")("toStringTag")]="z";if($.FW&&cof(tmp)!="z")$.hide(Object.prototype,"toString",function toString(){return"[object "+cof.classof(this)+"]"})},{"./$":21,"./$.cof":6,"./$.wks":32}],52:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),$def=require("./$.def"),assert=require("./$.assert"),forOf=require("./$.for-of"),setProto=require("./$.set-proto").set,species=require("./$.species"),SPECIES=require("./$.wks")("species"),RECORD=require("./$.uid").safe("record"),PROMISE="Promise",global=$.g,process=global.process,asap=process&&process.nextTick||require("./$.task").set,P=global[PROMISE],isFunction=$.isFunction,isObject=$.isObject,assertFunction=assert.fn,assertObject=assert.obj,test;var useNative=isFunction(P)&&isFunction(P.resolve)&&P.resolve(test=new P(function(){}))==test;function P2(x){var self=new P(x);setProto(self,P2.prototype);return self}if(useNative){try{setProto(P2,P);P2.prototype=$.create(P.prototype,{constructor:{value:P2}});if(!(P2.resolve(5).then(function(){})instanceof P2)){useNative=false}}catch(e){useNative=false}}function getConstructor(C){var S=assertObject(C)[SPECIES];return S!=undefined?S:C}function isThenable(it){var then;if(isObject(it))then=it.then;return isFunction(then)?then:false}function notify(record){var chain=record.c;if(chain.length)asap(function(){var value=record.v,ok=record.s==1,i=0;while(chain.length>i)!function(react){var cb=ok?react.ok:react.fail,ret,then;try{if(cb){if(!ok)record.h=true;ret=cb===true?value:cb(value);if(ret===react.P){react.rej(TypeError("Promise-chain cycle"))}else if(then=isThenable(ret)){then.call(ret,react.res,react.rej)}else react.res(ret)}else react.rej(value)}catch(err){react.rej(err)}}(chain[i++]);chain.length=0})}function isUnhandled(promise){var record=promise[RECORD],chain=record.a,i=0,react;if(record.h)return false;while(chain.length>i){react=chain[i++];if(react.fail||!isUnhandled(react.P))return false}return true}function $reject(value){var record=this,promise;if(record.d)return;record.d=true;record=record.r||record;record.v=value;record.s=2;asap(function(){setTimeout(function(){if(isUnhandled(promise=record.p)){if(cof(process)=="process"){process.emit("unhandledRejection",value,promise)}else if(global.console&&isFunction(console.error)){console.error("Unhandled promise rejection",value)}}},1)});notify(record)}function $resolve(value){var record=this,then,wrapper;if(record.d)return;record.d=true;record=record.r||record;try{if(then=isThenable(value)){wrapper={r:record,d:false};then.call(value,ctx($resolve,wrapper,1),ctx($reject,wrapper,1))}else{record.v=value;record.s=1;notify(record)}}catch(err){$reject.call(wrapper||{r:record,d:false},err)}}if(!useNative){P=function Promise(executor){assertFunction(executor);var record={p:assert.inst(this,P,PROMISE),c:[],a:[],s:0,d:false,v:undefined,h:false};$.hide(this,RECORD,record);try{executor(ctx($resolve,record,1),ctx($reject,record,1))}catch(err){$reject.call(record,err)}};$.mix(P.prototype,{then:function then(onFulfilled,onRejected){var S=assertObject(assertObject(this).constructor)[SPECIES];var react={ok:isFunction(onFulfilled)?onFulfilled:true,fail:isFunction(onRejected)?onRejected:false};var promise=react.P=new(S!=undefined?S:P)(function(res,rej){react.res=assertFunction(res);react.rej=assertFunction(rej)});var record=this[RECORD];record.a.push(react);record.c.push(react);record.s&¬ify(record);return promise},"catch":function(onRejected){return this.then(undefined,onRejected)}})}$def($def.G+$def.W+$def.F*!useNative,{Promise:P});cof.set(P,PROMISE);species(P);species($.core[PROMISE]);$def($def.S+$def.F*!useNative,PROMISE,{reject:function reject(r){return new(getConstructor(this))(function(res,rej){rej(r)})},resolve:function resolve(x){return isObject(x)&&RECORD in x&&$.getProto(x)===this.prototype?x:new(getConstructor(this))(function(res){res(x)})}});$def($def.S+$def.F*!(useNative&&require("./$.iter-detect")(function(iter){P.all(iter)["catch"](function(){})})),PROMISE,{all:function all(iterable){var C=getConstructor(this),values=[];return new C(function(res,rej){forOf(iterable,false,values.push,values);var remaining=values.length,results=Array(remaining);if(remaining)$.each.call(values,function(promise,index){C.resolve(promise).then(function(value){results[index]=value;--remaining||res(results)},rej)});else res(results)})},race:function race(iterable){var C=getConstructor(this);return new C(function(res,rej){forOf(iterable,false,function(promise){C.resolve(promise).then(res,rej)})})}})},{"./$":21,"./$.assert":4,"./$.cof":6,"./$.ctx":11,"./$.def":12,"./$.for-of":14,"./$.iter-detect":19,"./$.set-proto":26,"./$.species":27,"./$.task":29,"./$.uid":30,"./$.wks":32}],53:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),setProto=require("./$.set-proto"),$iter=require("./$.iter"),ITER=require("./$.uid").safe("iter"),step=$iter.step,assert=require("./$.assert"),isObject=$.isObject,getDesc=$.getDesc,setDesc=$.setDesc,getProto=$.getProto,apply=Function.apply,assertObject=assert.obj,_isExtensible=Object.isExtensible||$.it;function Enumerate(iterated){$.set(this,ITER,{o:iterated,k:undefined,i:0})}$iter.create(Enumerate,"Object",function(){var iter=this[ITER],keys=iter.k,key;if(keys==undefined){iter.k=keys=[];for(key in iter.o)keys.push(key)}do{if(iter.i>=keys.length)return step(1)}while(!((key=keys[iter.i++])in iter.o));return step(0,key)});function wrap(fn){return function(it){assertObject(it);try{fn.apply(undefined,arguments);return true}catch(e){return false}}}function get(target,propertyKey){var receiver=arguments.length<3?target:arguments[2],desc=getDesc(assertObject(target),propertyKey),proto;if(desc)return $.has(desc,"value")?desc.value:desc.get===undefined?undefined:desc.get.call(receiver);return isObject(proto=getProto(target))?get(proto,propertyKey,receiver):undefined}function set(target,propertyKey,V){var receiver=arguments.length<4?target:arguments[3],ownDesc=getDesc(assertObject(target),propertyKey),existingDescriptor,proto;if(!ownDesc){if(isObject(proto=getProto(target))){return set(proto,propertyKey,V,receiver)}ownDesc=$.desc(0)}if($.has(ownDesc,"value")){if(ownDesc.writable===false||!isObject(receiver))return false;existingDescriptor=getDesc(receiver,propertyKey)||$.desc(0);existingDescriptor.value=V;setDesc(receiver,propertyKey,existingDescriptor);return true}return ownDesc.set===undefined?false:(ownDesc.set.call(receiver,V),true)}var reflect={apply:require("./$.ctx")(Function.call,apply,3),construct:function construct(target,argumentsList){var proto=assert.fn(arguments.length<3?target:arguments[2]).prototype,instance=$.create(isObject(proto)?proto:Object.prototype),result=apply.call(target,instance,argumentsList);return isObject(result)?result:instance},defineProperty:wrap(setDesc),deleteProperty:function deleteProperty(target,propertyKey){var desc=getDesc(assertObject(target),propertyKey);return desc&&!desc.configurable?false:delete target[propertyKey]},enumerate:function enumerate(target){return new Enumerate(assertObject(target))},get:get,getOwnPropertyDescriptor:function getOwnPropertyDescriptor(target,propertyKey){return getDesc(assertObject(target),propertyKey)},getPrototypeOf:function getPrototypeOf(target){return getProto(assertObject(target))},has:function has(target,propertyKey){return propertyKey in target},isExtensible:function isExtensible(target){return!!_isExtensible(assertObject(target))},ownKeys:require("./$.own-keys"),preventExtensions:wrap(Object.preventExtensions||$.it),set:set};if(setProto)reflect.setPrototypeOf=function setPrototypeOf(target,proto){setProto.check(target,proto);try{setProto.set(target,proto);return true}catch(e){return false}};$def($def.G,{Reflect:{}});$def($def.S,"Reflect",reflect)},{"./$":21,"./$.assert":4,"./$.ctx":11,"./$.def":12,"./$.iter":20,"./$.own-keys":23,"./$.set-proto":26,"./$.uid":30}],54:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),RegExp=$.g.RegExp,Base=RegExp,proto=RegExp.prototype;function regExpBroken(){try{var a=/a/g;if(a===new RegExp(a)){return true}return RegExp(/a/g,"i")!="/a/i"}catch(e){return true}}if($.FW&&$.DESC){if(regExpBroken()){RegExp=function RegExp(pattern,flags){return new Base(cof(pattern)=="RegExp"?pattern.source:pattern,flags===undefined?pattern.flags:flags)};$.each.call($.getNames(Base),function(key){key in RegExp||$.setDesc(RegExp,key,{configurable:true,get:function(){return Base[key]},set:function(it){Base[key]=it}})});proto.constructor=RegExp;RegExp.prototype=proto;$.hide($.g,"RegExp",RegExp)}if(/./g.flags!="g")$.setDesc(proto,"flags",{configurable:true,get:require("./$.replacer")(/^.*\/(\w*)$/,"$1")})}require("./$.species")(RegExp)},{"./$":21,"./$.cof":6,"./$.replacer":25,"./$.species":27}],55:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Set",{add:function add(value){return strong.def(this,value=value===0?0:value,value)}},strong)},{"./$.collection":10,"./$.collection-strong":7}],56:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{codePointAt:require("./$.string-at")(false)})},{"./$.def":12,"./$.string-at":28}],57:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),toLength=$.toLength;$def($def.P,"String",{endsWith:function endsWith(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),endPosition=arguments[1],len=toLength(that.length),end=endPosition===undefined?len:Math.min(toLength(endPosition),len);searchString+="";return that.slice(end-searchString.length,end)===searchString}})},{"./$":21,"./$.cof":6,"./$.def":12}],58:[function(require,module,exports){var $def=require("./$.def"),toIndex=require("./$").toIndex,fromCharCode=String.fromCharCode;$def($def.S,"String",{fromCodePoint:function fromCodePoint(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")}})},{"./$":21,"./$.def":12}],59:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{includes:function includes(searchString){if(cof(searchString)=="RegExp")throw TypeError();return!!~String($.assertDefined(this)).indexOf(searchString,arguments[1])}})},{"./$":21,"./$.cof":6,"./$.def":12}],60:[function(require,module,exports){var set=require("./$").set,at=require("./$.string-at")(true),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step;require("./$.iter-define")(String,"String",function(iterated){set(this,ITER,{o:String(iterated),i:0})},function(){var iter=this[ITER],O=iter.o,index=iter.i,point;if(index>=O.length)return step(1);point=at.call(O,index);iter.i+=point.length;return step(0,point)})},{"./$":21,"./$.iter":20,"./$.iter-define":18,"./$.string-at":28,"./$.uid":30}],61:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");$def($def.S,"String",{raw:function raw(callSite){var tpl=$.toObject(callSite.raw),len=$.toLength(tpl.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(tpl[i++]));if(i0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}})},{"./$":21,"./$.def":12}],63:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{startsWith:function startsWith(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),index=$.toLength(Math.min(arguments[1],that.length));searchString+="";return that.slice(index,index+searchString.length)===searchString}})},{"./$":21,"./$.cof":6,"./$.def":12}],64:[function(require,module,exports){"use strict";var $=require("./$"),setTag=require("./$.cof").set,uid=require("./$.uid"),$def=require("./$.def"),keyOf=require("./$.keyof"),enumKeys=require("./$.enum-keys"),assertObject=require("./$.assert").obj,has=$.has,$create=$.create,getDesc=$.getDesc,setDesc=$.setDesc,desc=$.desc,getNames=$.getNames,toObject=$.toObject,Symbol=$.g.Symbol,setter=false,TAG=uid("tag"),HIDDEN=uid("hidden"),SymbolRegistry={},AllSymbols={},useNative=$.isFunction(Symbol);function wrap(tag){var sym=AllSymbols[tag]=$.set($create(Symbol.prototype),TAG,tag);$.DESC&&setter&&setDesc(Object.prototype,tag,{configurable:true,set:function(value){if(has(this,HIDDEN)&&has(this[HIDDEN],tag))this[HIDDEN][tag]=false;setDesc(this,tag,desc(1,value))}});return sym}function defineProperty(it,key,D){if(D&&has(AllSymbols,key)){if(!D.enumerable){if(!has(it,HIDDEN))setDesc(it,HIDDEN,desc(1,{}));it[HIDDEN][key]=true}else{if(has(it,HIDDEN)&&it[HIDDEN][key])it[HIDDEN][key]=false;D.enumerable=false}}return setDesc(it,key,D)}function defineProperties(it,P){assertObject(it);var keys=enumKeys(P=toObject(P)),i=0,l=keys.length,key;while(l>i)defineProperty(it,key=keys[i++],P[key]);return it}function create(it,P){return P===undefined?$create(it):defineProperties($create(it),P)}function getOwnPropertyDescriptor(it,key){var D=getDesc(it=toObject(it),key);if(D&&has(AllSymbols,key)&&!(has(it,HIDDEN)&&it[HIDDEN][key]))D.enumerable=true;return D}function getOwnPropertyNames(it){var names=getNames(toObject(it)),result=[],i=0,key;while(names.length>i)if(!has(AllSymbols,key=names[i++])&&key!=HIDDEN)result.push(key);return result}function getOwnPropertySymbols(it){var names=getNames(toObject(it)),result=[],i=0,key;while(names.length>i)if(has(AllSymbols,key=names[i++]))result.push(AllSymbols[key]);return result}if(!useNative){Symbol=function Symbol(description){if(this instanceof Symbol)throw TypeError("Symbol is not a constructor");return wrap(uid(description))};$.hide(Symbol.prototype,"toString",function(){return this[TAG]});$.create=create;$.setDesc=defineProperty;$.getDesc=getOwnPropertyDescriptor;$.setDescs=defineProperties;$.getNames=getOwnPropertyNames;$.getSymbols=getOwnPropertySymbols}var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=Symbol(key)},keyFor:function keyFor(key){return keyOf(SymbolRegistry,key)},useSetter:function(){setter=true},useSimple:function(){setter=false}};$.each.call(("hasInstance,isConcatSpreadable,iterator,match,replace,search,"+"species,split,toPrimitive,toStringTag,unscopables").split(","),function(it){var sym=require("./$.wks")(it);symbolStatics[it]=useNative?sym:wrap(sym)});setter=true;$def($def.G+$def.W,{Symbol:Symbol});$def($def.S,"Symbol",symbolStatics);$def($def.S+$def.F*!useNative,"Object",{create:create,defineProperty:defineProperty,defineProperties:defineProperties,getOwnPropertyDescriptor:getOwnPropertyDescriptor,getOwnPropertyNames:getOwnPropertyNames,getOwnPropertySymbols:getOwnPropertySymbols});setTag(Symbol,"Symbol");setTag(Math,"Math",true);setTag($.g.JSON,"JSON",true)},{"./$":21,"./$.assert":4,"./$.cof":6,"./$.def":12,"./$.enum-keys":13,"./$.keyof":22,"./$.uid":30,"./$.wks":32}],65:[function(require,module,exports){"use strict";var $=require("./$"),weak=require("./$.collection-weak"),leakStore=weak.leakStore,ID=weak.ID,WEAK=weak.WEAK,has=$.has,isObject=$.isObject,isFrozen=Object.isFrozen||$.core.Object.isFrozen,tmp={};var WeakMap=require("./$.collection")("WeakMap",{get:function get(key){if(isObject(key)){if(isFrozen(key))return leakStore(this).get(key);if(has(key,WEAK))return key[WEAK][this[ID]]}},set:function set(key,value){return weak.def(this,key,value)}},weak,true,true);if($.FW&&(new WeakMap).set((Object.freeze||Object)(tmp),7).get(tmp)!=7){$.each.call(["delete","has","get","set"],function(key){var method=WeakMap.prototype[key];WeakMap.prototype[key]=function(a,b){if(isObject(a)&&isFrozen(a)){var result=leakStore(this)[key](a,b);return key=="set"?this:result}return method.call(this,a,b)}})}},{"./$":21,"./$.collection":10,"./$.collection-weak":9}],66:[function(require,module,exports){"use strict";var weak=require("./$.collection-weak");require("./$.collection")("WeakSet",{add:function add(value){return weak.def(this,value,true)}},weak,false,true)},{"./$.collection":10,"./$.collection-weak":9}],67:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"Array",{includes:require("./$.array-includes")(true)});require("./$.unscope")("includes")},{"./$.array-includes":2,"./$.def":12,"./$.unscope":31}],68:[function(require,module,exports){require("./$.collection-to-json")("Map")},{"./$.collection-to-json":8}],69:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),ownKeys=require("./$.own-keys");$def($def.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(object){var O=$.toObject(object),result={};$.each.call(ownKeys(O),function(key){$.setDesc(result,key,$.desc(0,$.getDesc(O,key)))});return result}})},{"./$":21,"./$.def":12,"./$.own-keys":23}],70:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");function createObjectToArray(isEntries){return function(object){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}$def($def.S,"Object",{values:createObjectToArray(false),entries:createObjectToArray(true)})},{"./$":21,"./$.def":12}],71:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"RegExp",{escape:require("./$.replacer")(/([\\\-[\]{}()*+?.,^$|])/g,"\\$1",true)})},{"./$.def":12,"./$.replacer":25}],72:[function(require,module,exports){require("./$.collection-to-json")("Set")},{"./$.collection-to-json":8}],73:[function(require,module,exports){var $def=require("./$.def");$def($def.P,"String",{at:require("./$.string-at")(true)})},{"./$.def":12,"./$.string-at":28}],74:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),$Array=$.core.Array||Array,statics={};function setStatics(keys,length){$.each.call(keys.split(","),function(key){if(length==undefined&&key in $Array)statics[key]=$Array[key];else if(key in[])statics[key]=require("./$.ctx")(Function.call,[][key],length)})}setStatics("pop,reverse,shift,keys,values,entries",1);setStatics("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);setStatics("join,slice,concat,push,splice,unshift,sort,lastIndexOf,"+"reduce,reduceRight,copyWithin,fill,turn");$def($def.S,"Array",statics)},{"./$":21,"./$.ctx":11,"./$.def":12}],75:[function(require,module,exports){require("./es6.array.iterator");var $=require("./$"),Iterators=require("./$.iter").Iterators,ITERATOR=require("./$.wks")("iterator"),ArrayValues=Iterators.Array,NodeList=$.g.NodeList;if($.FW&&NodeList&&!(ITERATOR in NodeList.prototype)){$.hide(NodeList.prototype,ITERATOR,ArrayValues)}Iterators.NodeList=ArrayValues},{"./$":21,"./$.iter":20,"./$.wks":32,"./es6.array.iterator":39}],76:[function(require,module,exports){var $def=require("./$.def"),$task=require("./$.task");$def($def.G+$def.B,{setImmediate:$task.set,clearImmediate:$task.clear})},{"./$.def":12,"./$.task":29}],77:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),invoke=require("./$.invoke"),partial=require("./$.partial"),navigator=$.g.navigator,MSIE=!!navigator&&/MSIE .\./.test(navigator.userAgent);function wrap(set){return MSIE?function(fn,time){return set(invoke(partial,[].slice.call(arguments,2),$.isFunction(fn)?fn:Function(fn)),time)}:set}$def($def.G+$def.B+$def.F*MSIE,{setTimeout:wrap($.g.setTimeout),setInterval:wrap($.g.setInterval)})},{"./$":21,"./$.def":12,"./$.invoke":16,"./$.partial":24}],78:[function(require,module,exports){require("./modules/es5");require("./modules/es6.symbol");require("./modules/es6.object.assign");require("./modules/es6.object.is");require("./modules/es6.object.set-prototype-of");require("./modules/es6.object.to-string");require("./modules/es6.object.statics-accept-primitives");require("./modules/es6.function.name");require("./modules/es6.number.constructor");require("./modules/es6.number.statics");require("./modules/es6.math");require("./modules/es6.string.from-code-point");require("./modules/es6.string.raw");require("./modules/es6.string.iterator");require("./modules/es6.string.code-point-at");require("./modules/es6.string.ends-with");require("./modules/es6.string.includes");require("./modules/es6.string.repeat");require("./modules/es6.string.starts-with");require("./modules/es6.array.from");require("./modules/es6.array.of");require("./modules/es6.array.iterator");require("./modules/es6.array.species");require("./modules/es6.array.copy-within");require("./modules/es6.array.fill");require("./modules/es6.array.find");require("./modules/es6.array.find-index");require("./modules/es6.regexp");require("./modules/es6.promise");require("./modules/es6.map");require("./modules/es6.set");require("./modules/es6.weak-map");require("./modules/es6.weak-set");require("./modules/es6.reflect");require("./modules/es7.array.includes");require("./modules/es7.string.at");require("./modules/es7.regexp.escape");require("./modules/es7.object.get-own-property-descriptors");require("./modules/es7.object.to-array");require("./modules/es7.map.to-json");require("./modules/es7.set.to-json");require("./modules/js.array.statics");require("./modules/web.timers");require("./modules/web.immediate");require("./modules/web.dom.iterable");module.exports=require("./modules/$").core},{"./modules/$":21,"./modules/es5":33,"./modules/es6.array.copy-within":34,"./modules/es6.array.fill":35,"./modules/es6.array.find":37,"./modules/es6.array.find-index":36,"./modules/es6.array.from":38,"./modules/es6.array.iterator":39,"./modules/es6.array.of":40,"./modules/es6.array.species":41,"./modules/es6.function.name":42,"./modules/es6.map":43,"./modules/es6.math":44,"./modules/es6.number.constructor":45,"./modules/es6.number.statics":46,"./modules/es6.object.assign":47,"./modules/es6.object.is":48,"./modules/es6.object.set-prototype-of":49,"./modules/es6.object.statics-accept-primitives":50,"./modules/es6.object.to-string":51,"./modules/es6.promise":52,"./modules/es6.reflect":53,"./modules/es6.regexp":54,"./modules/es6.set":55,"./modules/es6.string.code-point-at":56,"./modules/es6.string.ends-with":57,"./modules/es6.string.from-code-point":58,"./modules/es6.string.includes":59,"./modules/es6.string.iterator":60,"./modules/es6.string.raw":61,"./modules/es6.string.repeat":62,"./modules/es6.string.starts-with":63,"./modules/es6.symbol":64,"./modules/es6.weak-map":65,"./modules/es6.weak-set":66,"./modules/es7.array.includes":67,"./modules/es7.map.to-json":68,"./modules/es7.object.get-own-property-descriptors":69,"./modules/es7.object.to-array":70,"./modules/es7.regexp.escape":71,"./modules/es7.set.to-json":72,"./modules/es7.string.at":73,"./modules/js.array.statics":74,"./modules/web.dom.iterable":75,"./modules/web.immediate":76,"./modules/web.timers":77}],79:[function(require,module,exports){(function(global){!function(global){"use strict";var hasOwn=Object.prototype.hasOwnProperty;var undefined;var iteratorSymbol=typeof Symbol==="function"&&Symbol.iterator||"@@iterator";var inModule=typeof module==="object";var runtime=global.regeneratorRuntime;if(runtime){if(inModule){module.exports=runtime}return}runtime=global.regeneratorRuntime=inModule?module.exports:{};function wrap(innerFn,outerFn,self,tryLocsList){var generator=Object.create((outerFn||Generator).prototype);generator._invoke=makeInvokeMethod(innerFn,self||null,new Context(tryLocsList||[]));return generator}runtime.wrap=wrap;function tryCatch(fn,obj,arg){try{return{type:"normal",arg:fn.call(obj,arg)}}catch(err){return{type:"throw",arg:err}}}var GenStateSuspendedStart="suspendedStart";var GenStateSuspendedYield="suspendedYield";var GenStateExecuting="executing";var GenStateCompleted="completed";var ContinueSentinel={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype;GeneratorFunction.prototype=Gp.constructor=GeneratorFunctionPrototype;GeneratorFunctionPrototype.constructor=GeneratorFunction;GeneratorFunction.displayName="GeneratorFunction";runtime.isGeneratorFunction=function(genFun){var ctor=typeof genFun==="function"&&genFun.constructor;return ctor?ctor===GeneratorFunction||(ctor.displayName||ctor.name)==="GeneratorFunction":false};runtime.mark=function(genFun){genFun.__proto__=GeneratorFunctionPrototype;genFun.prototype=Object.create(Gp);return genFun};runtime.async=function(innerFn,outerFn,self,tryLocsList){return new Promise(function(resolve,reject){var generator=wrap(innerFn,outerFn,self,tryLocsList);var callNext=step.bind(generator,"next");var callThrow=step.bind(generator,"throw");function step(method,arg){var record=tryCatch(generator[method],generator,arg);if(record.type==="throw"){reject(record.arg);return}var info=record.arg;if(info.done){resolve(info.value)}else{Promise.resolve(info.value).then(callNext,callThrow)}}callNext()})};function makeInvokeMethod(innerFn,self,context){
+var state=GenStateSuspendedStart;return function invoke(method,arg){if(state===GenStateExecuting){throw new Error("Generator is already running")}if(state===GenStateCompleted){return doneResult()}while(true){var delegate=context.delegate;if(delegate){if(method==="return"||method==="throw"&&delegate.iterator[method]===undefined){context.delegate=null;var returnMethod=delegate.iterator["return"];if(returnMethod){var record=tryCatch(returnMethod,delegate.iterator,arg);if(record.type==="throw"){method="throw";arg=record.arg;continue}}if(method==="return"){continue}}var record=tryCatch(delegate.iterator[method],delegate.iterator,arg);if(record.type==="throw"){context.delegate=null;method="throw";arg=record.arg;continue}method="next";arg=undefined;var info=record.arg;if(info.done){context[delegate.resultName]=info.value;context.next=delegate.nextLoc}else{state=GenStateSuspendedYield;return info}context.delegate=null}if(method==="next"){if(state===GenStateSuspendedYield){context.sent=arg}else{delete context.sent}}else if(method==="throw"){if(state===GenStateSuspendedStart){state=GenStateCompleted;throw arg}if(context.dispatchException(arg)){method="next";arg=undefined}}else if(method==="return"){context.abrupt("return",arg)}state=GenStateExecuting;var record=tryCatch(innerFn,self,context);if(record.type==="normal"){state=context.done?GenStateCompleted:GenStateSuspendedYield;var info={value:record.arg,done:context.done};if(record.arg===ContinueSentinel){if(context.delegate&&method==="next"){arg=undefined}}else{return info}}else if(record.type==="throw"){state=GenStateCompleted;method="throw";arg=record.arg}}}}function defineGeneratorMethod(method){Gp[method]=function(arg){return this._invoke(method,arg)}}defineGeneratorMethod("next");defineGeneratorMethod("throw");defineGeneratorMethod("return");Gp[iteratorSymbol]=function(){return this};Gp.toString=function(){return"[object Generator]"};function pushTryEntry(locs){var entry={tryLoc:locs[0]};if(1 in locs){entry.catchLoc=locs[1]}if(2 in locs){entry.finallyLoc=locs[2];entry.afterLoc=locs[3]}this.tryEntries.push(entry)}function resetTryEntry(entry){var record=entry.completion||{};record.type="normal";delete record.arg;entry.completion=record}function Context(tryLocsList){this.tryEntries=[{tryLoc:"root"}];tryLocsList.forEach(pushTryEntry,this);this.reset()}runtime.keys=function(object){var keys=[];for(var key in object){keys.push(key)}keys.reverse();return function next(){while(keys.length){var key=keys.pop();if(key in object){next.value=key;next.done=false;return next}}next.done=true;return next}};function values(iterable){if(iterable){var iteratorMethod=iterable[iteratorSymbol];if(iteratorMethod){return iteratorMethod.call(iterable)}if(typeof iterable.next==="function"){return iterable}if(!isNaN(iterable.length)){var i=-1,next=function next(){while(++i=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc){this.complete(entry.completion,entry.afterLoc);resetTryEntry(entry);return ContinueSentinel}}},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}(typeof global==="object"?global:typeof window==="object"?window:typeof self==="object"?self:this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}]},{},[1]);
\ No newline at end of file
diff --git a/assets/babel-core/browser.js b/assets/babel-core/browser.js
new file mode 100644
index 000000000..983e36e14
--- /dev/null
+++ b/assets/babel-core/browser.js
@@ -0,0 +1,64702 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.babel = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o")) {
+ node.params.push(this.flow_parseTypeAnnotatableIdentifier());
+ if (!this.isRelational(">")) {
+ this.expect(tt.comma);
+ }
+ }
+ this.expectRelational(">");
+
+ return this.finishNode(node, "TypeParameterDeclaration");
+};
+
+pp.flow_parseTypeParameterInstantiation = function () {
+ var node = this.startNode(),
+ oldInType = this.inType;
+ node.params = [];
+
+ this.inType = true;
+
+ this.expectRelational("<");
+ while (!this.isRelational(">")) {
+ node.params.push(this.flow_parseType());
+ if (!this.isRelational(">")) {
+ this.expect(tt.comma);
+ }
+ }
+ this.expectRelational(">");
+
+ this.inType = oldInType;
+
+ return this.finishNode(node, "TypeParameterInstantiation");
+};
+
+pp.flow_parseObjectPropertyKey = function () {
+ return this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true);
+};
+
+pp.flow_parseObjectTypeIndexer = function (node, isStatic) {
+ node["static"] = isStatic;
+
+ this.expect(tt.bracketL);
+ node.id = this.flow_parseObjectPropertyKey();
+ node.key = this.flow_parseTypeInitialiser();
+ this.expect(tt.bracketR);
+ node.value = this.flow_parseTypeInitialiser();
+
+ this.flow_objectTypeSemicolon();
+ return this.finishNode(node, "ObjectTypeIndexer");
+};
+
+pp.flow_parseObjectTypeMethodish = function (node) {
+ node.params = [];
+ node.rest = null;
+ node.typeParameters = null;
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flow_parseTypeParameterDeclaration();
+ }
+
+ this.expect(tt.parenL);
+ while (this.type === tt.name) {
+ node.params.push(this.flow_parseFunctionTypeParam());
+ if (this.type !== tt.parenR) {
+ this.expect(tt.comma);
+ }
+ }
+
+ if (this.eat(tt.ellipsis)) {
+ node.rest = this.flow_parseFunctionTypeParam();
+ }
+ this.expect(tt.parenR);
+ node.returnType = this.flow_parseTypeInitialiser();
+
+ return this.finishNode(node, "FunctionTypeAnnotation");
+};
+
+pp.flow_parseObjectTypeMethod = function (start, isStatic, key) {
+ var node = this.startNodeAt(start);
+ node.value = this.flow_parseObjectTypeMethodish(this.startNodeAt(start));
+ node["static"] = isStatic;
+ node.key = key;
+ node.optional = false;
+ this.flow_objectTypeSemicolon();
+ return this.finishNode(node, "ObjectTypeProperty");
+};
+
+pp.flow_parseObjectTypeCallProperty = function (node, isStatic) {
+ var valueNode = this.startNode();
+ node["static"] = isStatic;
+ node.value = this.flow_parseObjectTypeMethodish(valueNode);
+ this.flow_objectTypeSemicolon();
+ return this.finishNode(node, "ObjectTypeCallProperty");
+};
+
+pp.flow_parseObjectType = function (allowStatic) {
+ var nodeStart = this.startNode();
+ var node;
+ var optional = false;
+ var property;
+ var propertyKey;
+ var propertyTypeAnnotation;
+ var token;
+ var isStatic;
+
+ nodeStart.callProperties = [];
+ nodeStart.properties = [];
+ nodeStart.indexers = [];
+
+ this.expect(tt.braceL);
+
+ while (this.type !== tt.braceR) {
+ var start = this.markPosition();
+ node = this.startNode();
+ if (allowStatic && this.isContextual("static")) {
+ this.next();
+ isStatic = true;
+ }
+
+ if (this.type === tt.bracketL) {
+ nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node, isStatic));
+ } else if (this.type === tt.parenL || this.isRelational("<")) {
+ nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node, allowStatic));
+ } else {
+ if (isStatic && this.type === tt.colon) {
+ propertyKey = this.parseIdent();
+ } else {
+ propertyKey = this.flow_parseObjectPropertyKey();
+ }
+ if (this.isRelational("<") || this.type === tt.parenL) {
+ // This is a method property
+ nodeStart.properties.push(this.flow_parseObjectTypeMethod(start, isStatic, propertyKey));
+ } else {
+ if (this.eat(tt.question)) {
+ optional = true;
+ }
+ node.key = propertyKey;
+ node.value = this.flow_parseTypeInitialiser();
+ node.optional = optional;
+ node["static"] = isStatic;
+ this.flow_objectTypeSemicolon();
+ nodeStart.properties.push(this.finishNode(node, "ObjectTypeProperty"));
+ }
+ }
+ }
+
+ this.expect(tt.braceR);
+
+ return this.finishNode(nodeStart, "ObjectTypeAnnotation");
+};
+
+pp.flow_objectTypeSemicolon = function () {
+ if (!this.eat(tt.semi) && !this.eat(tt.comma) && this.type !== tt.braceR) {
+ this.unexpected();
+ }
+};
+
+pp.flow_parseGenericType = function (start, id) {
+ var node = this.startNodeAt(start);
+
+ node.typeParameters = null;
+ node.id = id;
+
+ while (this.eat(tt.dot)) {
+ var node2 = this.startNodeAt(start);
+ node2.qualification = node.id;
+ node2.id = this.parseIdent();
+ node.id = this.finishNode(node2, "QualifiedTypeIdentifier");
+ }
+
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flow_parseTypeParameterInstantiation();
+ }
+
+ return this.finishNode(node, "GenericTypeAnnotation");
+};
+
+pp.flow_parseTypeofType = function () {
+ var node = this.startNode();
+ this.expect(tt._typeof);
+ node.argument = this.flow_parsePrimaryType();
+ return this.finishNode(node, "TypeofTypeAnnotation");
+};
+
+pp.flow_parseTupleType = function () {
+ var node = this.startNode();
+ node.types = [];
+ this.expect(tt.bracketL);
+ // We allow trailing commas
+ while (this.pos < this.input.length && this.type !== tt.bracketR) {
+ node.types.push(this.flow_parseType());
+ if (this.type === tt.bracketR) break;
+ this.expect(tt.comma);
+ }
+ this.expect(tt.bracketR);
+ return this.finishNode(node, "TupleTypeAnnotation");
+};
+
+pp.flow_parseFunctionTypeParam = function () {
+ var optional = false;
+ var node = this.startNode();
+ node.name = this.parseIdent();
+ if (this.eat(tt.question)) {
+ optional = true;
+ }
+ node.optional = optional;
+ node.typeAnnotation = this.flow_parseTypeInitialiser();
+ return this.finishNode(node, "FunctionTypeParam");
+};
+
+pp.flow_parseFunctionTypeParams = function () {
+ var ret = { params: [], rest: null };
+ while (this.type === tt.name) {
+ ret.params.push(this.flow_parseFunctionTypeParam());
+ if (this.type !== tt.parenR) {
+ this.expect(tt.comma);
+ }
+ }
+ if (this.eat(tt.ellipsis)) {
+ ret.rest = this.flow_parseFunctionTypeParam();
+ }
+ return ret;
+};
+
+pp.flow_identToTypeAnnotation = function (start, node, id) {
+ switch (id.name) {
+ case "any":
+ return this.finishNode(node, "AnyTypeAnnotation");
+
+ case "void":
+ return this.finishNode(node, "VoidTypeAnnotation");
+
+ case "bool":
+ case "boolean":
+ return this.finishNode(node, "BooleanTypeAnnotation");
+
+ case "mixed":
+ return this.finishNode(node, "MixedTypeAnnotation");
+
+ case "number":
+ return this.finishNode(node, "NumberTypeAnnotation");
+
+ case "string":
+ return this.finishNode(node, "StringTypeAnnotation");
+
+ default:
+ return this.flow_parseGenericType(start, id);
+ }
+};
+
+// The parsing of types roughly parallels the parsing of expressions, and
+// primary types are kind of like primary expressions...they're the
+// primitives with which other types are constructed.
+pp.flow_parsePrimaryType = function () {
+ var typeIdentifier = null;
+ var params = null;
+ var returnType = null;
+ var start = this.markPosition();
+ var node = this.startNode();
+ var rest = null;
+ var tmp;
+ var typeParameters;
+ var token;
+ var type;
+ var isGroupedType = false;
+
+ switch (this.type) {
+ case tt.name:
+ return this.flow_identToTypeAnnotation(start, node, this.parseIdent());
+
+ case tt.braceL:
+ return this.flow_parseObjectType();
+
+ case tt.bracketL:
+ return this.flow_parseTupleType();
+
+ case tt.relational:
+ if (this.value === "<") {
+ node.typeParameters = this.flow_parseTypeParameterDeclaration();
+ this.expect(tt.parenL);
+ tmp = this.flow_parseFunctionTypeParams();
+ node.params = tmp.params;
+ node.rest = tmp.rest;
+ this.expect(tt.parenR);
+
+ this.expect(tt.arrow);
+
+ node.returnType = this.flow_parseType();
+
+ return this.finishNode(node, "FunctionTypeAnnotation");
+ }
+
+ case tt.parenL:
+ this.next();
+
+ // Check to see if this is actually a grouped type
+ if (this.type !== tt.parenR && this.type !== tt.ellipsis) {
+ if (this.type === tt.name) {
+ var token = this.lookahead().type;
+ isGroupedType = token !== tt.question && token !== tt.colon;
+ } else {
+ isGroupedType = true;
+ }
+ }
+
+ if (isGroupedType) {
+ type = this.flow_parseType();
+ this.expect(tt.parenR);
+
+ // If we see a => next then someone was probably confused about
+ // function types, so we can provide a better error message
+ if (this.eat(tt.arrow)) {
+ this.raise(node, "Unexpected token =>. It looks like " + "you are trying to write a function type, but you ended up " + "writing a grouped type followed by an =>, which is a syntax " + "error. Remember, function type parameters are named so function " + "types look like (name1: type1, name2: type2) => returnType. You " + "probably wrote (type1) => returnType");
+ }
+
+ return type;
+ }
+
+ tmp = this.flow_parseFunctionTypeParams();
+ node.params = tmp.params;
+ node.rest = tmp.rest;
+
+ this.expect(tt.parenR);
+
+ this.expect(tt.arrow);
+
+ node.returnType = this.flow_parseType();
+ node.typeParameters = null;
+
+ return this.finishNode(node, "FunctionTypeAnnotation");
+
+ case tt.string:
+ node.value = this.value;
+ node.raw = this.input.slice(this.start, this.end);
+ this.next();
+ return this.finishNode(node, "StringLiteralTypeAnnotation");
+
+ default:
+ if (this.type.keyword === "typeof") {
+ return this.flow_parseTypeofType();
+ }
+ }
+
+ this.unexpected();
+};
+
+pp.flow_parsePostfixType = function () {
+ var node = this.startNode();
+ var type = node.elementType = this.flow_parsePrimaryType();
+ if (this.type === tt.bracketL) {
+ this.expect(tt.bracketL);
+ this.expect(tt.bracketR);
+ return this.finishNode(node, "ArrayTypeAnnotation");
+ }
+ return type;
+};
+
+pp.flow_parsePrefixType = function () {
+ var node = this.startNode();
+ if (this.eat(tt.question)) {
+ node.typeAnnotation = this.flow_parsePrefixType();
+ return this.finishNode(node, "NullableTypeAnnotation");
+ }
+ return this.flow_parsePostfixType();
+};
+
+pp.flow_parseIntersectionType = function () {
+ var node = this.startNode();
+ var type = this.flow_parsePrefixType();
+ node.types = [type];
+ while (this.eat(tt.bitwiseAND)) {
+ node.types.push(this.flow_parsePrefixType());
+ }
+ return node.types.length === 1 ? type : this.finishNode(node, "IntersectionTypeAnnotation");
+};
+
+pp.flow_parseUnionType = function () {
+ var node = this.startNode();
+ var type = this.flow_parseIntersectionType();
+ node.types = [type];
+ while (this.eat(tt.bitwiseOR)) {
+ node.types.push(this.flow_parseIntersectionType());
+ }
+ return node.types.length === 1 ? type : this.finishNode(node, "UnionTypeAnnotation");
+};
+
+pp.flow_parseType = function () {
+ var oldInType = this.inType;
+ this.inType = true;
+ var type = this.flow_parseUnionType();
+ this.inType = oldInType;
+ return type;
+};
+
+pp.flow_parseTypeAnnotation = function () {
+ var node = this.startNode();
+ node.typeAnnotation = this.flow_parseTypeInitialiser();
+ return this.finishNode(node, "TypeAnnotation");
+};
+
+pp.flow_parseTypeAnnotatableIdentifier = function (requireTypeAnnotation, canBeOptionalParam) {
+ var node = this.startNode();
+ var ident = this.parseIdent();
+ var isOptionalParam = false;
+
+ if (canBeOptionalParam && this.eat(tt.question)) {
+ this.expect(tt.question);
+ isOptionalParam = true;
+ }
+
+ if (requireTypeAnnotation || this.type === tt.colon) {
+ ident.typeAnnotation = this.flow_parseTypeAnnotation();
+ this.finishNode(ident, ident.type);
+ }
+
+ if (isOptionalParam) {
+ ident.optional = true;
+ this.finishNode(ident, ident.type);
+ }
+
+ return ident;
+};
+
+acorn.plugins.flow = function (instance) {
+ // function name(): string {}
+ instance.extend("parseFunctionBody", function (inner) {
+ return function (node, allowExpression) {
+ if (this.type === tt.colon) {
+ node.returnType = this.flow_parseTypeAnnotation();
+ }
+
+ return inner.call(this, node, allowExpression);
+ };
+ });
+
+ instance.extend("parseStatement", function (inner) {
+ return function (declaration, topLevel) {
+ // strict mode handling of `interface` since it's a reserved word
+ if (this.strict && this.type === tt.name && this.value === "interface") {
+ var node = this.startNode();
+ this.next();
+ return this.flow_parseInterface(node);
+ } else {
+ return inner.call(this, declaration, topLevel);
+ }
+ };
+ });
+
+ instance.extend("parseExpressionStatement", function (inner) {
+ return function (node, expr) {
+ if (expr.type === "Identifier") {
+ if (expr.name === "declare") {
+ if (this.type === tt._class || this.type === tt.name || this.type === tt._function || this.type === tt._var) {
+ return this.flow_parseDeclare(node);
+ }
+ } else if (this.type === tt.name) {
+ if (expr.name === "interface") {
+ return this.flow_parseInterface(node);
+ } else if (expr.name === "type") {
+ return this.flow_parseTypeAlias(node);
+ }
+ }
+ }
+
+ return inner.call(this, node, expr);
+ };
+ });
+
+ instance.extend("shouldParseExportDeclaration", function (inner) {
+ return function () {
+ return this.isContextual("type") || inner.call(this);
+ };
+ });
+
+ instance.extend("parseParenItem", function (inner) {
+ return function (node, start) {
+ if (this.type === tt.colon) {
+ var typeCastNode = this.startNodeAt(start);
+ typeCastNode.expression = node;
+ typeCastNode.typeAnnotation = this.flow_parseTypeAnnotation();
+ return this.finishNode(typeCastNode, "TypeCastExpression");
+ } else {
+ return node;
+ }
+ };
+ });
+
+ instance.extend("parseClassId", function (inner) {
+ return function (node, isStatement) {
+ inner.call(this, node, isStatement);
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flow_parseTypeParameterDeclaration();
+ }
+ };
+ });
+
+ // don't consider `void` to be a keyword as then it'll use the void token type
+ // and set startExpr
+ instance.extend("isKeyword", function (inner) {
+ return function (name) {
+ if (this.inType && name === "void") {
+ return false;
+ } else {
+ return inner.call(this, name);
+ }
+ };
+ });
+
+ instance.extend("readToken", function (inner) {
+ return function (code) {
+ if (this.inType && (code === 62 || code === 60)) {
+ return this.finishOp(tt.relational, 1);
+ } else {
+ return inner.call(this, code);
+ }
+ };
+ });
+
+ instance.extend("jsx_readToken", function (inner) {
+ return function () {
+ if (!this.inType) return inner.call(this);
+ };
+ });
+
+ instance.extend("parseParenArrowList", function (inner) {
+ return function (start, exprList, isAsync) {
+ for (var i = 0; i < exprList.length; i++) {
+ var listItem = exprList[i];
+ if (listItem.type === "TypeCastExpression") {
+ var expr = listItem.expression;
+ expr.typeAnnotation = listItem.typeAnnotation;
+ exprList[i] = expr;
+ }
+ }
+ return inner.call(this, start, exprList, isAsync);
+ };
+ });
+
+ instance.extend("parseClassProperty", function (inner) {
+ return function (node) {
+ if (this.type === tt.colon) {
+ node.typeAnnotation = this.flow_parseTypeAnnotation();
+ }
+ return inner.call(this, node);
+ };
+ });
+ instance.extend("isClassProperty", function (inner) {
+ return function () {
+ return this.type === tt.colon || inner.call(this);
+ };
+ });
+
+ instance.extend("parseClassMethod", function (inner) {
+ return function (classBody, method, isGenerator, isAsync) {
+ var typeParameters;
+ if (this.isRelational("<")) {
+ typeParameters = this.flow_parseTypeParameterDeclaration();
+ }
+ method.value = this.parseMethod(isGenerator, isAsync);
+ method.value.typeParameters = typeParameters;
+ classBody.body.push(this.finishNode(method, "MethodDefinition"));
+ };
+ });
+
+ instance.extend("parseClassSuper", function (inner) {
+ return function (node, isStatement) {
+ inner.call(this, node, isStatement);
+ if (node.superClass && this.isRelational("<")) {
+ node.superTypeParameters = this.flow_parseTypeParameterInstantiation();
+ }
+ if (this.isContextual("implements")) {
+ this.next();
+ var implemented = node["implements"] = [];
+ do {
+ var node = this.startNode();
+ node.id = this.parseIdent();
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flow_parseTypeParameterInstantiation();
+ } else {
+ node.typeParameters = null;
+ }
+ implemented.push(this.finishNode(node, "ClassImplements"));
+ } while (this.eat(tt.comma));
+ }
+ };
+ });
+
+ instance.extend("parseObjPropValue", function (inner) {
+ return function (prop) {
+ var typeParameters;
+ if (this.isRelational("<")) {
+ typeParameters = this.flow_parseTypeParameterDeclaration();
+ if (this.type !== tt.parenL) this.unexpected();
+ }
+ inner.apply(this, arguments);
+ prop.value.typeParameters = typeParameters;
+ };
+ });
+
+ instance.extend("parseAssignableListItemTypes", function (inner) {
+ return function (param) {
+ if (this.eat(tt.question)) {
+ param.optional = true;
+ }
+ if (this.type === tt.colon) {
+ param.typeAnnotation = this.flow_parseTypeAnnotation();
+ }
+ this.finishNode(param, param.type);
+ return param;
+ };
+ });
+
+ instance.extend("parseImportSpecifiers", function (inner) {
+ return function (node) {
+ node.isType = false;
+ if (this.isContextual("type")) {
+ var start = this.markPosition();
+ var typeId = this.parseIdent();
+ if (this.type === tt.name && this.value !== "from" || this.type === tt.braceL || this.type === tt.star) {
+ node.isType = true;
+ } else {
+ node.specifiers.push(this.parseImportSpecifierDefault(typeId, start));
+ if (this.isContextual("from")) return;
+ this.eat(tt.comma);
+ }
+ }
+ inner.call(this, node);
+ };
+ });
+
+ // function foo() {}
+ instance.extend("parseFunctionParams", function (inner) {
+ return function (node) {
+ if (this.isRelational("<")) {
+ node.typeParameters = this.flow_parseTypeParameterDeclaration();
+ }
+ inner.call(this, node);
+ };
+ });
+
+ // var foo: string = bar
+ instance.extend("parseVarHead", function (inner) {
+ return function (decl) {
+ inner.call(this, decl);
+ if (this.type === tt.colon) {
+ decl.id.typeAnnotation = this.flow_parseTypeAnnotation();
+ this.finishNode(decl.id, decl.id.type);
+ }
+ };
+ });
+};
+},{"../src/index":5,"./../../babel/tools/protect.js":52}],3:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+// A recursive descent parser operates by defining functions for all
+// syntactic elements, and recursively calling those, each function
+// advancing the input stream and returning an AST node. Precedence
+// of constructs (for example, the fact that `!x[1]` means `!(x[1])`
+// instead of `(!x)[1]` is handled by the fact that the parser
+// function that parses unary prefix operators is called first, and
+// in turn calls the function that parses `[]` subscripts — that
+// way, it'll receive the node for `x[1]` already parsed, and wraps
+// *that* in the unary operator node.
+//
+// Acorn uses an [operator precedence parser][opp] to handle binary
+// operator precedence, because it is much more compact than using
+// the technique outlined above, which uses different, nesting
+// functions to specify precedence, for all of the ten binary
+// precedence levels that JavaScript defines.
+//
+// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser
+
+var _tokentype = require("./tokentype");
+
+var _state = require("./state");
+
+var _identifier = require("./identifier");
+
+var _util = require("./util");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+var pp = _state.Parser.prototype;
+
+// Check if property name clashes with already added.
+// Object/class getters and setters are not allowed to clash —
+// either with each other or with an init property — and in
+// strict mode, init properties are also not allowed to be repeated.
+
+pp.checkPropClash = function (prop, propHash) {
+ if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) return;
+ var key = prop.key,
+ name = undefined;
+ switch (key.type) {
+ case "Identifier":
+ name = key.name;break;
+ case "Literal":
+ name = String(key.value);break;
+ default:
+ return;
+ }
+ var kind = prop.kind;
+ if (this.options.ecmaVersion >= 6) {
+ if (name === "__proto__" && kind === "init") {
+ if (propHash.proto) this.raise(key.start, "Redefinition of __proto__ property");
+ propHash.proto = true;
+ }
+ return;
+ }
+ var other = undefined;
+ if (_util.has(propHash, name)) {
+ other = propHash[name];
+ var isGetSet = kind !== "init";
+ if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) this.raise(key.start, "Redefinition of property");
+ } else {
+ other = propHash[name] = {
+ init: false,
+ get: false,
+ set: false
+ };
+ }
+ other[kind] = true;
+};
+
+// ### Expression parsing
+
+// These nest, from the most general expression type at the top to
+// 'atomic', nondivisible expression types at the bottom. Most of
+// the functions will simply let the function(s) below them parse,
+// and, *if* the syntactic construct they handle is present, wrap
+// the AST node that the inner parser gave them in another node.
+
+// Parse a full expression. The optional arguments are used to
+// forbid the `in` operator (in for loops initalization expressions)
+// and provide reference for storing '=' operator inside shorthand
+// property assignment in contexts where both object expression
+// and object pattern might appear (so it's possible to raise
+// delayed syntax error at correct position).
+
+pp.parseExpression = function (noIn, refShorthandDefaultPos) {
+ var start = this.markPosition();
+ var expr = this.parseMaybeAssign(noIn, refShorthandDefaultPos);
+ if (this.type === _tokentype.types.comma) {
+ var node = this.startNodeAt(start);
+ node.expressions = [expr];
+ while (this.eat(_tokentype.types.comma)) node.expressions.push(this.parseMaybeAssign(noIn, refShorthandDefaultPos));
+ return this.finishNode(node, "SequenceExpression");
+ }
+ return expr;
+};
+
+// Parse an assignment expression. This includes applications of
+// operators like `+=`.
+
+pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) {
+ if (this.type == _tokentype.types._yield && this.inGenerator) return this.parseYield();
+
+ var failOnShorthandAssign = undefined;
+ if (!refShorthandDefaultPos) {
+ refShorthandDefaultPos = { start: 0 };
+ failOnShorthandAssign = true;
+ } else {
+ failOnShorthandAssign = false;
+ }
+ var start = this.markPosition();
+ if (this.type == _tokentype.types.parenL || this.type == _tokentype.types.name) this.potentialArrowAt = this.start;
+ var left = this.parseMaybeConditional(noIn, refShorthandDefaultPos);
+ if (afterLeftParse) left = afterLeftParse.call(this, left, start);
+ if (this.type.isAssign) {
+ var node = this.startNodeAt(start);
+ node.operator = this.value;
+ node.left = this.type === _tokentype.types.eq ? this.toAssignable(left) : left;
+ refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly
+ this.checkLVal(left);
+ if (left.parenthesizedExpression) {
+ var errorMsg = undefined;
+ if (left.type === "ObjectPattern") {
+ errorMsg = "`({a}) = 0` use `({a} = 0)`";
+ } else if (left.type === "ArrayPattern") {
+ errorMsg = "`([a]) = 0` use `([a] = 0)`";
+ }
+ if (errorMsg) {
+ this.raise(left.start, "You're trying to assign to a parenthesized expression, eg. instead of " + errorMsg);
+ }
+ }
+ this.next();
+ node.right = this.parseMaybeAssign(noIn);
+ return this.finishNode(node, "AssignmentExpression");
+ } else if (failOnShorthandAssign && refShorthandDefaultPos.start) {
+ this.unexpected(refShorthandDefaultPos.start);
+ }
+ return left;
+};
+
+// Parse a ternary conditional (`?:`) operator.
+
+pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos) {
+ var start = this.markPosition();
+ var expr = this.parseExprOps(noIn, refShorthandDefaultPos);
+ if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
+ if (this.eat(_tokentype.types.question)) {
+ var node = this.startNodeAt(start);
+ node.test = expr;
+ node.consequent = this.parseMaybeAssign();
+ this.expect(_tokentype.types.colon);
+ node.alternate = this.parseMaybeAssign(noIn);
+ return this.finishNode(node, "ConditionalExpression");
+ }
+ return expr;
+};
+
+// Start the precedence parser.
+
+pp.parseExprOps = function (noIn, refShorthandDefaultPos) {
+ var start = this.markPosition();
+ var expr = this.parseMaybeUnary(refShorthandDefaultPos);
+ if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
+ return this.parseExprOp(expr, start, -1, noIn);
+};
+
+// Parse binary operators with the operator precedence parsing
+// algorithm. `left` is the left-hand side of the operator.
+// `minPrec` provides context that allows the function to stop and
+// defer further parser to one of its callers when it encounters an
+// operator that has a lower precedence than the set it is parsing.
+
+pp.parseExprOp = function (left, leftStart, minPrec, noIn) {
+ var prec = this.type.binop;
+ if (prec != null && (!noIn || this.type !== _tokentype.types._in)) {
+ if (prec > minPrec) {
+ var node = this.startNodeAt(leftStart);
+ node.left = left;
+ node.operator = this.value;
+ var op = this.type;
+ this.next();
+ var start = this.markPosition();
+ node.right = this.parseExprOp(this.parseMaybeUnary(), start, op.rightAssociative ? prec - 1 : prec, noIn);
+ this.finishNode(node, op === _tokentype.types.logicalOR || op === _tokentype.types.logicalAND ? "LogicalExpression" : "BinaryExpression");
+ return this.parseExprOp(node, leftStart, minPrec, noIn);
+ }
+ }
+ return left;
+};
+
+// Parse unary operators, both prefix and postfix.
+
+pp.parseMaybeUnary = function (refShorthandDefaultPos) {
+ if (this.type.prefix) {
+ var node = this.startNode(),
+ update = this.type === _tokentype.types.incDec;
+ node.operator = this.value;
+ node.prefix = true;
+ this.next();
+ node.argument = this.parseMaybeUnary();
+ if (refShorthandDefaultPos && refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start);
+ if (update) this.checkLVal(node.argument);else if (this.strict && node.operator === "delete" && node.argument.type === "Identifier") this.raise(node.start, "Deleting local variable in strict mode");
+ return this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression");
+ }
+ var start = this.markPosition();
+ var expr = this.parseExprSubscripts(refShorthandDefaultPos);
+ if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
+ while (this.type.postfix && !this.canInsertSemicolon()) {
+ var node = this.startNodeAt(start);
+ node.operator = this.value;
+ node.prefix = false;
+ node.argument = expr;
+ this.checkLVal(expr);
+ this.next();
+ expr = this.finishNode(node, "UpdateExpression");
+ }
+ return expr;
+};
+
+// Parse call, dot, and `[]`-subscript expressions.
+
+pp.parseExprSubscripts = function (refShorthandDefaultPos) {
+ var start = this.markPosition();
+ var expr = this.parseExprAtom(refShorthandDefaultPos);
+ if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
+ return this.parseSubscripts(expr, start);
+};
+
+pp.parseSubscripts = function (base, start, noCalls) {
+ if (!noCalls && this.eat(_tokentype.types.doubleColon)) {
+ var node = this.startNodeAt(start);
+ node.object = base;
+ node.callee = this.parseNoCallExpr();
+ return this.parseSubscripts(this.finishNode(node, "BindExpression"), start, noCalls);
+ } else if (this.eat(_tokentype.types.dot)) {
+ var node = this.startNodeAt(start);
+ node.object = base;
+ node.property = this.parseIdent(true);
+ node.computed = false;
+ return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls);
+ } else if (this.eat(_tokentype.types.bracketL)) {
+ var node = this.startNodeAt(start);
+ node.object = base;
+ node.property = this.parseExpression();
+ node.computed = true;
+ this.expect(_tokentype.types.bracketR);
+ return this.parseSubscripts(this.finishNode(node, "MemberExpression"), start, noCalls);
+ } else if (!noCalls && this.eat(_tokentype.types.parenL)) {
+ var node = this.startNodeAt(start);
+ node.callee = base;
+ node.arguments = this.parseExprList(_tokentype.types.parenR, this.options.features["es7.trailingFunctionCommas"]);
+ return this.parseSubscripts(this.finishNode(node, "CallExpression"), start, noCalls);
+ } else if (this.type === _tokentype.types.backQuote) {
+ var node = this.startNodeAt(start);
+ node.tag = base;
+ node.quasi = this.parseTemplate();
+ return this.parseSubscripts(this.finishNode(node, "TaggedTemplateExpression"), start, noCalls);
+ }return base;
+};
+
+// Parse a no-call expression (like argument of `new` or `::` operators).
+
+pp.parseNoCallExpr = function () {
+ var start = this.markPosition();
+ return this.parseSubscripts(this.parseExprAtom(), start, true);
+};
+
+// Parse an atomic expression — either a single token that is an
+// expression, an expression started by a keyword like `function` or
+// `new`, or an expression wrapped in punctuation like `()`, `[]`,
+// or `{}`.
+
+pp.parseExprAtom = function (refShorthandDefaultPos) {
+ var node = undefined,
+ canBeArrow = this.potentialArrowAt == this.start;
+ switch (this.type) {
+ case _tokentype.types._super:
+ if (!this.inFunction) this.raise(this.start, "'super' outside of function or class");
+ case _tokentype.types._this:
+ var type = this.type === _tokentype.types._this ? "ThisExpression" : "Super";
+ node = this.startNode();
+ this.next();
+ return this.finishNode(node, type);
+
+ case _tokentype.types._yield:
+ if (this.inGenerator) this.unexpected();
+
+ case _tokentype.types._do:
+ if (this.options.features["es7.doExpressions"]) {
+ var _node = this.startNode();
+ this.next();
+ var oldInFunction = this.inFunction;
+ var oldLabels = this.labels;
+ this.labels = [];
+ this.inFunction = false;
+ _node.body = this.parseBlock();
+ this.inFunction = oldInFunction;
+ this.labels = oldLabels;
+ return this.finishNode(_node, "DoExpression");
+ }
+
+ case _tokentype.types.name:
+ var start = this.markPosition();
+ node = this.startNode();
+ var id = this.parseIdent(this.type !== _tokentype.types.name);
+
+ //
+ if (this.options.features["es7.asyncFunctions"]) {
+ // async functions!
+ if (id.name === "async" && !this.canInsertSemicolon()) {
+ // arrow functions
+ if (this.type === _tokentype.types.parenL) {
+ var expr = this.parseParenAndDistinguishExpression(start, true, true);
+ if (expr && expr.type === "ArrowFunctionExpression") {
+ return expr;
+ } else {
+ node.callee = id;
+ if (!expr) {
+ node.arguments = [];
+ } else if (expr.type === "SequenceExpression") {
+ node.arguments = expr.expressions;
+ } else {
+ node.arguments = [expr];
+ }
+ return this.parseSubscripts(this.finishNode(node, "CallExpression"), start);
+ }
+ } else if (this.type === _tokentype.types.name) {
+ id = this.parseIdent();
+ this.expect(_tokentype.types.arrow);
+ return this.parseArrowExpression(node, [id], true);
+ }
+
+ // normal functions
+ if (this.type === _tokentype.types._function && !this.canInsertSemicolon()) {
+ this.next();
+ return this.parseFunction(node, false, false, true);
+ }
+ } else if (id.name === "await") {
+ if (this.inAsync) return this.parseAwait(node);
+ }
+ }
+ //
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) return this.parseArrowExpression(this.startNodeAt(start), [id]);
+ return id;
+
+ case _tokentype.types.regexp:
+ var value = this.value;
+ node = this.parseLiteral(value.value);
+ node.regex = { pattern: value.pattern, flags: value.flags };
+ return node;
+
+ case _tokentype.types.num:case _tokentype.types.string:
+ return this.parseLiteral(this.value);
+
+ case _tokentype.types._null:case _tokentype.types._true:case _tokentype.types._false:
+ node = this.startNode();
+ node.value = this.type === _tokentype.types._null ? null : this.type === _tokentype.types._true;
+ node.raw = this.type.keyword;
+ this.next();
+ return this.finishNode(node, "Literal");
+
+ case _tokentype.types.parenL:
+ return this.parseParenAndDistinguishExpression(null, null, canBeArrow);
+
+ case _tokentype.types.bracketL:
+ node = this.startNode();
+ this.next();
+ // check whether this is array comprehension or regular array
+ if ((this.options.ecmaVersion >= 7 || this.options.features["es7.comprehensions"]) && this.type === _tokentype.types._for) {
+ return this.parseComprehension(node, false);
+ }
+ node.elements = this.parseExprList(_tokentype.types.bracketR, true, true, refShorthandDefaultPos);
+ return this.finishNode(node, "ArrayExpression");
+
+ case _tokentype.types.braceL:
+ return this.parseObj(false, refShorthandDefaultPos);
+
+ case _tokentype.types._function:
+ node = this.startNode();
+ this.next();
+ return this.parseFunction(node, false);
+
+ case _tokentype.types.at:
+ this.parseDecorators();
+
+ case _tokentype.types._class:
+ node = this.startNode();
+ this.takeDecorators(node);
+ return this.parseClass(node, false);
+
+ case _tokentype.types._new:
+ return this.parseNew();
+
+ case _tokentype.types.backQuote:
+ return this.parseTemplate();
+
+ case _tokentype.types.doubleColon:
+ node = this.startNode();
+ this.next();
+ node.object = null;
+ var callee = node.callee = this.parseNoCallExpr();
+ if (callee.type !== "MemberExpression") this.raise(callee.start, "Binding should be performed on object property.");
+ return this.finishNode(node, "BindExpression");
+
+ default:
+ this.unexpected();
+ }
+};
+
+pp.parseLiteral = function (value) {
+ var node = this.startNode();
+ node.value = value;
+ node.raw = this.input.slice(this.start, this.end);
+ this.next();
+ return this.finishNode(node, "Literal");
+};
+
+pp.parseParenExpression = function () {
+ this.expect(_tokentype.types.parenL);
+ var val = this.parseExpression();
+ this.expect(_tokentype.types.parenR);
+ return val;
+};
+
+pp.parseParenAndDistinguishExpression = function (start, isAsync, canBeArrow) {
+ start = start || this.markPosition();
+ var val = undefined;
+ if (this.options.ecmaVersion >= 6) {
+ this.next();
+
+ if ((this.options.features["es7.comprehensions"] || this.options.ecmaVersion >= 7) && this.type === _tokentype.types._for) {
+ return this.parseComprehension(this.startNodeAt(start), true);
+ }
+
+ var innerStart = this.markPosition(),
+ exprList = [],
+ first = true;
+ var refShorthandDefaultPos = { start: 0 },
+ spreadStart = undefined,
+ innerParenStart = undefined,
+ optionalCommaStart = undefined;
+ while (this.type !== _tokentype.types.parenR) {
+ if (first) {
+ first = false;
+ } else {
+ this.expect(_tokentype.types.comma);
+ if (this.type === _tokentype.types.parenR && this.options.features["es7.trailingFunctionCommas"]) {
+ optionalCommaStart = this.start;
+ break;
+ }
+ }
+
+ if (this.type === _tokentype.types.ellipsis) {
+ var spreadNodeStart = this.markPosition();
+ spreadStart = this.start;
+ exprList.push(this.parseParenItem(this.parseRest(), spreadNodeStart));
+ break;
+ } else {
+ if (this.type === _tokentype.types.parenL && !innerParenStart) {
+ innerParenStart = this.start;
+ }
+ exprList.push(this.parseMaybeAssign(false, refShorthandDefaultPos, this.parseParenItem));
+ }
+ }
+ var innerEnd = this.markPosition();
+ this.expect(_tokentype.types.parenR);
+
+ if (canBeArrow && !this.canInsertSemicolon() && this.eat(_tokentype.types.arrow)) {
+ if (innerParenStart) this.unexpected(innerParenStart);
+ return this.parseParenArrowList(start, exprList, isAsync);
+ }
+
+ if (!exprList.length) {
+ if (isAsync) {
+ return;
+ } else {
+ this.unexpected(this.lastTokStart);
+ }
+ }
+ if (optionalCommaStart) this.unexpected(optionalCommaStart);
+ if (spreadStart) this.unexpected(spreadStart);
+ if (refShorthandDefaultPos.start) this.unexpected(refShorthandDefaultPos.start);
+
+ if (exprList.length > 1) {
+ val = this.startNodeAt(innerStart);
+ val.expressions = exprList;
+ this.finishNodeAt(val, "SequenceExpression", innerEnd);
+ } else {
+ val = exprList[0];
+ }
+ } else {
+ val = this.parseParenExpression();
+ }
+
+ if (this.options.preserveParens) {
+ var par = this.startNodeAt(start);
+ par.expression = val;
+ return this.finishNode(par, "ParenthesizedExpression");
+ } else {
+ val.parenthesizedExpression = true;
+ return val;
+ }
+};
+
+pp.parseParenArrowList = function (start, exprList, isAsync) {
+ return this.parseArrowExpression(this.startNodeAt(start), exprList, isAsync);
+};
+
+pp.parseParenItem = function (node, start) {
+ return node;
+};
+
+// New's precedence is slightly tricky. It must allow its argument
+// to be a `[]` or dot subscript expression, but not a call — at
+// least, not without wrapping it in parentheses. Thus, it uses the
+
+var empty = [];
+
+pp.parseNew = function () {
+ var node = this.startNode();
+ var meta = this.parseIdent(true);
+ if (this.options.ecmaVersion >= 6 && this.eat(_tokentype.types.dot)) {
+ node.meta = meta;
+ node.property = this.parseIdent(true);
+ if (node.property.name !== "target") this.raise(node.property.start, "The only valid meta property for new is new.target");
+ return this.finishNode(node, "MetaProperty");
+ }
+ node.callee = this.parseNoCallExpr();
+ if (this.eat(_tokentype.types.parenL)) node.arguments = this.parseExprList(_tokentype.types.parenR, this.options.features["es7.trailingFunctionCommas"]);else node.arguments = empty;
+ return this.finishNode(node, "NewExpression");
+};
+
+// Parse template expression.
+
+pp.parseTemplateElement = function () {
+ var elem = this.startNode();
+ elem.value = {
+ raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, "\n"),
+ cooked: this.value
+ };
+ this.next();
+ elem.tail = this.type === _tokentype.types.backQuote;
+ return this.finishNode(elem, "TemplateElement");
+};
+
+pp.parseTemplate = function () {
+ var node = this.startNode();
+ this.next();
+ node.expressions = [];
+ var curElt = this.parseTemplateElement();
+ node.quasis = [curElt];
+ while (!curElt.tail) {
+ this.expect(_tokentype.types.dollarBraceL);
+ node.expressions.push(this.parseExpression());
+ this.expect(_tokentype.types.braceR);
+ node.quasis.push(curElt = this.parseTemplateElement());
+ }
+ this.next();
+ return this.finishNode(node, "TemplateLiteral");
+};
+
+// Parse an object literal or binding pattern.
+
+pp.parseObj = function (isPattern, refShorthandDefaultPos) {
+ var node = this.startNode(),
+ first = true,
+ propHash = {};
+ node.properties = [];
+ var decorators = [];
+ this.next();
+ while (!this.eat(_tokentype.types.braceR)) {
+ if (!first) {
+ this.expect(_tokentype.types.comma);
+ if (this.afterTrailingComma(_tokentype.types.braceR)) break;
+ } else first = false;
+ while (this.type === _tokentype.types.at) {
+ decorators.push(this.parseDecorator());
+ }
+ var prop = this.startNode(),
+ isGenerator = false,
+ isAsync = false,
+ start = undefined;
+ if (decorators.length) {
+ prop.decorators = decorators;
+ decorators = [];
+ }
+ if (this.options.features["es7.objectRestSpread"] && this.type === _tokentype.types.ellipsis) {
+ prop = this.parseSpread();
+ prop.type = "SpreadProperty";
+ node.properties.push(prop);
+ continue;
+ }
+ if (this.options.ecmaVersion >= 6) {
+ prop.method = false;
+ prop.shorthand = false;
+ if (isPattern || refShorthandDefaultPos) start = this.markPosition();
+ if (!isPattern) isGenerator = this.eat(_tokentype.types.star);
+ }
+ if (this.options.features["es7.asyncFunctions"] && this.isContextual("async")) {
+ if (isGenerator || isPattern) this.unexpected();
+ var asyncId = this.parseIdent();
+ if (this.type === _tokentype.types.colon || this.type === _tokentype.types.parenL) {
+ prop.key = asyncId;
+ } else {
+ isAsync = true;
+ this.parsePropertyName(prop);
+ }
+ } else {
+ this.parsePropertyName(prop);
+ }
+ this.parseObjPropValue(prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos);
+ this.checkPropClash(prop, propHash);
+ node.properties.push(this.finishNode(prop, "Property"));
+ }
+ if (decorators.length) {
+ this.raise(this.start, "You have trailing decorators with no property");
+ }
+ return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression");
+};
+
+pp.parseObjPropValue = function (prop, start, isGenerator, isAsync, isPattern, refShorthandDefaultPos) {
+ if (this.eat(_tokentype.types.colon)) {
+ prop.value = isPattern ? this.parseMaybeDefault() : this.parseMaybeAssign(false, refShorthandDefaultPos);
+ prop.kind = "init";
+ } else if (this.options.ecmaVersion >= 6 && this.type === _tokentype.types.parenL) {
+ if (isPattern) this.unexpected();
+ prop.kind = "init";
+ prop.method = true;
+ prop.value = this.parseMethod(isGenerator, isAsync);
+ } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && (prop.key.name === "get" || prop.key.name === "set") && (this.type != _tokentype.types.comma && this.type != _tokentype.types.braceR)) {
+ if (isGenerator || isAsync || isPattern) this.unexpected();
+ prop.kind = prop.key.name;
+ this.parsePropertyName(prop);
+ prop.value = this.parseMethod(false);
+ var paramCount = prop.kind === "get" ? 0 : 1;
+ if (prop.value.params.length !== paramCount) {
+ var _start = prop.value.start;
+ if (prop.kind === "get") this.raise(_start, "getter should have no params");else this.raise(_start, "setter should have exactly one param");
+ }
+ } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") {
+ prop.kind = "init";
+ if (isPattern) {
+ if (this.isKeyword(prop.key.name) || this.strict && (_identifier.reservedWords.strictBind(prop.key.name) || _identifier.reservedWords.strict(prop.key.name)) || !this.options.allowReserved && this.isReservedWord(prop.key.name)) this.raise(prop.key.start, "Binding " + prop.key.name);
+ prop.value = this.parseMaybeDefault(start, prop.key);
+ } else if (this.type === _tokentype.types.eq && refShorthandDefaultPos) {
+ if (!refShorthandDefaultPos.start) refShorthandDefaultPos.start = this.start;
+ prop.value = this.parseMaybeDefault(start, prop.key);
+ } else {
+ prop.value = prop.key;
+ }
+ prop.shorthand = true;
+ } else this.unexpected();
+};
+
+pp.parsePropertyName = function (prop) {
+ if (this.options.ecmaVersion >= 6) {
+ if (this.eat(_tokentype.types.bracketL)) {
+ prop.computed = true;
+ prop.key = this.parseMaybeAssign();
+ this.expect(_tokentype.types.bracketR);
+ return prop.key;
+ } else {
+ prop.computed = false;
+ }
+ }
+ return prop.key = this.type === _tokentype.types.num || this.type === _tokentype.types.string ? this.parseExprAtom() : this.parseIdent(true);
+};
+
+// Initialize empty function node.
+
+pp.initFunction = function (node, isAsync) {
+ node.id = null;
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = false;
+ node.expression = false;
+ }
+ if (this.options.features["es7.asyncFunctions"]) {
+ node.async = !!isAsync;
+ }
+};
+
+// Parse object or class method.
+
+pp.parseMethod = function (isGenerator, isAsync) {
+ var node = this.startNode();
+ this.initFunction(node, isAsync);
+ this.expect(_tokentype.types.parenL);
+ node.params = this.parseBindingList(_tokentype.types.parenR, false, this.options.features["es7.trailingFunctionCommas"]);
+ if (this.options.ecmaVersion >= 6) {
+ node.generator = isGenerator;
+ }
+ this.parseFunctionBody(node);
+ return this.finishNode(node, "FunctionExpression");
+};
+
+// Parse arrow function expression with given parameters.
+
+pp.parseArrowExpression = function (node, params, isAsync) {
+ this.initFunction(node, isAsync);
+ node.params = this.toAssignableList(params, true);
+ this.parseFunctionBody(node, true);
+ return this.finishNode(node, "ArrowFunctionExpression");
+};
+
+// Parse function body and check parameters.
+
+pp.parseFunctionBody = function (node, allowExpression) {
+ var isExpression = allowExpression && this.type !== _tokentype.types.braceL;
+
+ var oldInAsync = this.inAsync;
+ this.inAsync = node.async;
+ if (isExpression) {
+ node.body = this.parseMaybeAssign();
+ node.expression = true;
+ } else {
+ // Start a new scope with regard to labels and the `inFunction`
+ // flag (restore them to their old value afterwards).
+ var oldInFunc = this.inFunction,
+ oldInGen = this.inGenerator,
+ oldLabels = this.labels;
+ this.inFunction = true;this.inGenerator = node.generator;this.labels = [];
+ node.body = this.parseBlock(true);
+ node.expression = false;
+ this.inFunction = oldInFunc;this.inGenerator = oldInGen;this.labels = oldLabels;
+ }
+ this.inAsync = oldInAsync;
+
+ // If this is a strict mode function, verify that argument names
+ // are not repeated, and it does not try to bind the words `eval`
+ // or `arguments`.
+ if (this.strict || !isExpression && node.body.body.length && this.isUseStrict(node.body.body[0])) {
+ var nameHash = {},
+ oldStrict = this.strict;
+ this.strict = true;
+ if (node.id) this.checkLVal(node.id, true);
+ for (var i = 0; i < node.params.length; i++) {
+ this.checkLVal(node.params[i], true, nameHash);
+ }this.strict = oldStrict;
+ }
+};
+
+// Parses a comma-separated list of expressions, and returns them as
+// an array. `close` is the token type that ends the list, and
+// `allowEmpty` can be turned on to allow subsequent commas with
+// nothing in between them to be parsed as `null` (which is needed
+// for array literals).
+
+pp.parseExprList = function (close, allowTrailingComma, allowEmpty, refShorthandDefaultPos) {
+ var elts = [],
+ first = true;
+ while (!this.eat(close)) {
+ if (!first) {
+ this.expect(_tokentype.types.comma);
+ if (allowTrailingComma && this.afterTrailingComma(close)) break;
+ } else first = false;
+
+ if (allowEmpty && this.type === _tokentype.types.comma) {
+ elts.push(null);
+ } else {
+ if (this.type === _tokentype.types.ellipsis) elts.push(this.parseSpread(refShorthandDefaultPos));else elts.push(this.parseMaybeAssign(false, refShorthandDefaultPos));
+ }
+ }
+ return elts;
+};
+
+// Parse the next token as an identifier. If `liberal` is true (used
+// when parsing properties), it will also convert keywords into
+// identifiers.
+
+pp.parseIdent = function (liberal) {
+ var node = this.startNode();
+ if (liberal && this.options.allowReserved == "never") liberal = false;
+ if (this.type === _tokentype.types.name) {
+ if (!liberal && (!this.options.allowReserved && this.isReservedWord(this.value) || this.strict && _identifier.reservedWords.strict(this.value) && (this.options.ecmaVersion >= 6 || this.input.slice(this.start, this.end).indexOf("\\") == -1))) this.raise(this.start, "The keyword '" + this.value + "' is reserved");
+ node.name = this.value;
+ } else if (liberal && this.type.keyword) {
+ node.name = this.type.keyword;
+ } else {
+ this.unexpected();
+ }
+ this.next();
+ return this.finishNode(node, "Identifier");
+};
+
+// Parses await expression inside async function.
+
+pp.parseAwait = function (node) {
+ if (this.eat(_tokentype.types.semi) || this.canInsertSemicolon()) {
+ this.unexpected();
+ }
+ node.all = this.eat(_tokentype.types.star);
+ node.argument = this.parseMaybeUnary();
+ return this.finishNode(node, "AwaitExpression");
+};
+
+// Parses yield expression inside generator.
+
+pp.parseYield = function () {
+ var node = this.startNode();
+ this.next();
+ if (this.type == _tokentype.types.semi || this.canInsertSemicolon() || this.type != _tokentype.types.star && !this.type.startsExpr) {
+ node.delegate = false;
+ node.argument = null;
+ } else {
+ node.delegate = this.eat(_tokentype.types.star);
+ node.argument = this.parseMaybeAssign();
+ }
+ return this.finishNode(node, "YieldExpression");
+};
+
+// Parses array and generator comprehensions.
+
+pp.parseComprehension = function (node, isGenerator) {
+ node.blocks = [];
+ while (this.type === _tokentype.types._for) {
+ var block = this.startNode();
+ this.next();
+ this.expect(_tokentype.types.parenL);
+ block.left = this.parseBindingAtom();
+ this.checkLVal(block.left, true);
+ this.expectContextual("of");
+ block.right = this.parseExpression();
+ this.expect(_tokentype.types.parenR);
+ node.blocks.push(this.finishNode(block, "ComprehensionBlock"));
+ }
+ node.filter = this.eat(_tokentype.types._if) ? this.parseParenExpression() : null;
+ node.body = this.parseExpression();
+ this.expect(isGenerator ? _tokentype.types.parenR : _tokentype.types.bracketR);
+ node.generator = isGenerator;
+ return this.finishNode(node, "ComprehensionExpression");
+};
+},{"./../../babel/tools/protect.js":52,"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+exports.__esModule = true;
+exports.isIdentifierStart = isIdentifierStart;
+exports.isIdentifierChar = isIdentifierChar;
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+// This is a trick taken from Esprima. It turns out that, on
+// non-Chrome browsers, to check whether a string is in a set, a
+// predicate containing a big ugly `switch` statement is faster than
+// a regular expression, and on Chrome the two are about on par.
+// This function uses `eval` (non-lexical) to produce such a
+// predicate from a space-separated string of words.
+//
+// It starts by sorting the words by length.
+
+function makePredicate(words) {
+ words = words.split(" ");
+ return function (str) {
+ return words.indexOf(str) >= 0;
+ };
+}
+
+// Reserved word lists for various dialects of the language
+
+var reservedWords = {
+ 3: makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),
+ 5: makePredicate("class enum extends super const export import"),
+ 6: makePredicate("enum await"),
+ strict: makePredicate("implements interface let package private protected public static yield"),
+ strictBind: makePredicate("eval arguments")
+};
+
+exports.reservedWords = reservedWords;
+// And the keywords
+
+var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";
+
+var keywords = {
+ 5: makePredicate(ecma5AndLessKeywords),
+ 6: makePredicate(ecma5AndLessKeywords + " let const class extends export import yield super")
+};
+
+exports.keywords = keywords;
+// ## Character categories
+
+// Big ugly regular expressions that match characters in the
+// whitespace, identifier, and identifier-start categories. These
+// are only applied when a character is found to actually have a
+// code point above 128.
+// Generated by `tools/generate-identifier-regex.js`.
+
+var nonASCIIidentifierStartChars = "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";
+var nonASCIIidentifierChars = "·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_";
+
+var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
+var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
+
+nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
+
+// These are a run-length and offset encoded representation of the
+// >0xffff code points that are a valid part of identifiers. The
+// offset starts at 0x10000, and each pair of numbers represents an
+// offset to the next range, and then a size of the range. They were
+// generated by tools/generate-identifier-regex.js
+var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 17, 26, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 99, 39, 9, 51, 157, 310, 10, 21, 11, 7, 153, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 98, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 26, 45, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 955, 52, 76, 44, 33, 24, 27, 35, 42, 34, 4, 0, 13, 47, 15, 3, 22, 0, 38, 17, 2, 24, 133, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 32, 4, 287, 47, 21, 1, 2, 0, 185, 46, 82, 47, 21, 0, 60, 42, 502, 63, 32, 0, 449, 56, 1288, 920, 104, 110, 2962, 1070, 13266, 568, 8, 30, 114, 29, 19, 47, 17, 3, 32, 20, 6, 18, 881, 68, 12, 0, 67, 12, 16481, 1, 3071, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 4149, 196, 1340, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42710, 42, 4148, 12, 221, 16355, 541];
+var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 1306, 2, 54, 14, 32, 9, 16, 3, 46, 10, 54, 9, 7, 2, 37, 13, 2, 9, 52, 0, 13, 2, 49, 13, 16, 9, 83, 11, 168, 11, 6, 9, 8, 2, 57, 0, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 316, 19, 13, 9, 214, 6, 3, 8, 112, 16, 16, 9, 82, 12, 9, 9, 535, 9, 20855, 9, 135, 4, 60, 6, 26, 9, 1016, 45, 17, 3, 19723, 1, 5319, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 4305, 6, 792618, 239];
+
+// This has a complexity linear to the value of the code. The
+// assumption is that looking up astral identifier characters is
+// rare.
+function isInAstralSet(code, set) {
+ var pos = 0x10000;
+ for (var i = 0; i < set.length; i += 2) {
+ pos += set[i];
+ if (pos > code) return false;
+ pos += set[i + 1];
+ if (pos >= code) return true;
+ }
+}
+
+// Test whether a given character code starts an identifier.
+
+function isIdentifierStart(code, astral) {
+ if (code < 65) return code === 36;
+ if (code < 91) return true;
+ if (code < 97) return code === 95;
+ if (code < 123) return true;
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code));
+ if (astral === false) return false;
+ return isInAstralSet(code, astralIdentifierStartCodes);
+}
+
+// Test whether a given character is part of an identifier.
+
+function isIdentifierChar(code, astral) {
+ if (code < 48) return code === 36;
+ if (code < 58) return true;
+ if (code < 65) return false;
+ if (code < 91) return true;
+ if (code < 97) return code === 95;
+ if (code < 123) return true;
+ if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code));
+ if (astral === false) return false;
+ return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes);
+}
+},{"./../../babel/tools/protect.js":52}],5:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+exports.__esModule = true;
+exports.parse = parse;
+exports.parseExpressionAt = parseExpressionAt;
+exports.tokenizer = tokenizer;
+// Acorn is a tiny, fast JavaScript parser written in JavaScript.
+//
+// Acorn was written by Marijn Haverbeke, Ingvar Stepanyan, and
+// various contributors and released under an MIT license.
+//
+// Git repositories for Acorn are available at
+//
+// http://marijnhaverbeke.nl/git/acorn
+// https://github.com/marijnh/acorn.git
+//
+// Please use the [github bug tracker][ghbt] to report issues.
+//
+// [ghbt]: https://github.com/marijnh/acorn/issues
+//
+// This file defines the main parser interface. The library also comes
+// with a [error-tolerant parser][dammit] and an
+// [abstract syntax tree walker][walk], defined in other files.
+//
+// [dammit]: acorn_loose.js
+// [walk]: util/walk.js
+
+var _state = require("./state");
+
+var _options = require("./options");
+
+require("./parseutil");
+
+require("./statement");
+
+require("./lval");
+
+require("./expression");
+
+require("./lookahead");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+exports.Parser = _state.Parser;
+exports.plugins = _state.plugins;
+exports.defaultOptions = _options.defaultOptions;
+
+var _location = require("./location");
+
+exports.SourceLocation = _location.SourceLocation;
+exports.getLineInfo = _location.getLineInfo;
+
+var _node = require("./node");
+
+exports.Node = _node.Node;
+
+var _tokentype = require("./tokentype");
+
+exports.TokenType = _tokentype.TokenType;
+exports.tokTypes = _tokentype.types;
+
+var _tokencontext = require("./tokencontext");
+
+exports.TokContext = _tokencontext.TokContext;
+exports.tokContexts = _tokencontext.types;
+
+var _identifier = require("./identifier");
+
+exports.isIdentifierChar = _identifier.isIdentifierChar;
+exports.isIdentifierStart = _identifier.isIdentifierStart;
+
+var _tokenize = require("./tokenize");
+
+exports.Token = _tokenize.Token;
+
+var _whitespace = require("./whitespace");
+
+exports.isNewLine = _whitespace.isNewLine;
+exports.lineBreak = _whitespace.lineBreak;
+exports.lineBreakG = _whitespace.lineBreakG;
+var version = "1.0.0";
+
+exports.version = version;
+// The main exported interface (under `self.acorn` when in the
+// browser) is a `parse` function that takes a code string and
+// returns an abstract syntax tree as specified by [Mozilla parser
+// API][api].
+//
+// [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API
+
+function parse(input, options) {
+ var p = parser(options, input);
+ var startPos = p.options.locations ? [p.pos, p.curPosition()] : p.pos;
+ p.nextToken();
+ return p.parseTopLevel(p.options.program || p.startNodeAt(startPos));
+}
+
+// This function tries to parse a single expression at a given
+// offset in a string. Useful for parsing mixed-language formats
+// that embed JavaScript expressions.
+
+function parseExpressionAt(input, pos, options) {
+ var p = parser(options, input, pos);
+ p.nextToken();
+ return p.parseExpression();
+}
+
+// Acorn is organized as a tokenizer and a recursive-descent parser.
+// The `tokenize` export provides an interface to the tokenizer.
+// Because the tokenizer is optimized for being efficiently used by
+// the Acorn parser itself, this interface is somewhat crude and not
+// very modular.
+
+function tokenizer(input, options) {
+ return parser(options, input);
+}
+
+function parser(options, input) {
+ return new _state.Parser(_options.getOptions(options), String(input));
+}
+},{"./../../babel/tools/protect.js":52,"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+exports.__esModule = true;
+exports.getLineInfo = getLineInfo;
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var _state = require("./state");
+
+var _whitespace = require("./whitespace");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+// These are used when `options.locations` is on, for the
+// `startLoc` and `endLoc` properties.
+
+var Position = (function () {
+ function Position(line, col) {
+ _classCallCheck(this, Position);
+
+ this.line = line;
+ this.column = col;
+ }
+
+ Position.prototype.offset = function offset(n) {
+ return new Position(this.line, this.column + n);
+ };
+
+ return Position;
+})();
+
+exports.Position = Position;
+
+var SourceLocation = function SourceLocation(p, start, end) {
+ _classCallCheck(this, SourceLocation);
+
+ this.start = start;
+ this.end = end;
+ if (p.sourceFile !== null) this.source = p.sourceFile;
+};
+
+exports.SourceLocation = SourceLocation;
+
+// The `getLineInfo` function is mostly useful when the
+// `locations` option is off (for performance reasons) and you
+// want to find the line/column position for a given character
+// offset. `input` should be the code string that the offset refers
+// into.
+
+function getLineInfo(input, offset) {
+ for (var line = 1, cur = 0;;) {
+ _whitespace.lineBreakG.lastIndex = cur;
+ var match = _whitespace.lineBreakG.exec(input);
+ if (match && match.index < offset) {
+ ++line;
+ cur = match.index + match[0].length;
+ } else {
+ return new Position(line, offset - cur);
+ }
+ }
+}
+
+var pp = _state.Parser.prototype;
+
+// This function is used to raise exceptions on parse errors. It
+// takes an offset integer (into the current `input`) to indicate
+// the location of the error, attaches the position to the end
+// of the error message, and then raises a `SyntaxError` with that
+// message.
+
+pp.raise = function (pos, message) {
+ var loc = getLineInfo(this.input, pos);
+ message += " (" + loc.line + ":" + loc.column + ")";
+ var err = new SyntaxError(message);
+ err.pos = pos;err.loc = loc;err.raisedAt = this.pos;
+ throw err;
+};
+
+pp.curPosition = function () {
+ return new Position(this.curLine, this.pos - this.lineStart);
+};
+
+pp.markPosition = function () {
+ return this.options.locations ? [this.start, this.startLoc] : this.start;
+};
+},{"./../../babel/tools/protect.js":52,"./state":12,"./whitespace":18}],7:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+var _state = require("./state");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+var pp = _state.Parser.prototype;
+
+var STATE_KEYS = ["lastTokStartLoc", "lastTokEndLoc", "lastTokStart", "lastTokEnd", "lineStart", "startLoc", "curLine", "endLoc", "start", "pos", "end", "type", "value", "exprAllowed", "potentialArrowAt", "currLine", "input", "inType", "inFunction", "inGenerator", "labels"];
+
+pp.getState = function () {
+ var state = {};
+ for (var i = 0; i < STATE_KEYS.length; i++) {
+ var key = STATE_KEYS[i];
+ state[key] = this[key];
+ }
+ state.context = this.context.slice();
+ state.labels = this.labels.slice();
+ return state;
+};
+
+pp.lookahead = function () {
+ var old = this.getState();
+ this.isLookahead = true;
+ this.next();
+ this.isLookahead = false;
+ var curr = this.getState();
+ for (var key in old) this[key] = old[key];
+ return curr;
+};
+},{"./../../babel/tools/protect.js":52,"./state":12}],8:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+var _tokentype = require("./tokentype");
+
+var _state = require("./state");
+
+var _identifier = require("./identifier");
+
+var _util = require("./util");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+var pp = _state.Parser.prototype;
+
+// Convert existing expression atom to assignable pattern
+// if possible.
+
+pp.toAssignable = function (node, isBinding) {
+ if (this.options.ecmaVersion >= 6 && node) {
+ switch (node.type) {
+ case "Identifier":
+ case "ObjectPattern":
+ case "ArrayPattern":
+ case "AssignmentPattern":
+ break;
+
+ case "ObjectExpression":
+ node.type = "ObjectPattern";
+ for (var i = 0; i < node.properties.length; i++) {
+ var prop = node.properties[i];
+ if (prop.type === "SpreadProperty") continue;
+ if (prop.kind !== "init") this.raise(prop.key.start, "Object pattern can't contain getter or setter");
+ this.toAssignable(prop.value, isBinding);
+ }
+ break;
+
+ case "ArrayExpression":
+ node.type = "ArrayPattern";
+ this.toAssignableList(node.elements, isBinding);
+ break;
+
+ case "AssignmentExpression":
+ if (node.operator === "=") {
+ node.type = "AssignmentPattern";
+ delete node.operator;
+ } else {
+ this.raise(node.left.end, "Only '=' operator can be used for specifying default value.");
+ }
+ break;
+
+ case "MemberExpression":
+ if (!isBinding) break;
+
+ default:
+ this.raise(node.start, "Assigning to rvalue");
+ }
+ }
+ return node;
+};
+
+// Convert list of expression atoms to binding list.
+
+pp.toAssignableList = function (exprList, isBinding) {
+ var end = exprList.length;
+ if (end) {
+ var last = exprList[end - 1];
+ if (last && last.type == "RestElement") {
+ --end;
+ } else if (last && last.type == "SpreadElement") {
+ last.type = "RestElement";
+ var arg = last.argument;
+ this.toAssignable(arg, isBinding);
+ if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") this.unexpected(arg.start);
+ --end;
+ }
+ }
+ for (var i = 0; i < end; i++) {
+ var elt = exprList[i];
+ if (elt) this.toAssignable(elt, isBinding);
+ }
+ return exprList;
+};
+
+// Parses spread element.
+
+pp.parseSpread = function (refShorthandDefaultPos) {
+ var node = this.startNode();
+ this.next();
+ node.argument = this.parseMaybeAssign(refShorthandDefaultPos);
+ return this.finishNode(node, "SpreadElement");
+};
+
+pp.parseRest = function () {
+ var node = this.startNode();
+ this.next();
+ node.argument = this.type === _tokentype.types.name || this.type === _tokentype.types.bracketL ? this.parseBindingAtom() : this.unexpected();
+ return this.finishNode(node, "RestElement");
+};
+
+// Parses lvalue (assignable) atom.
+
+pp.parseBindingAtom = function () {
+ if (this.options.ecmaVersion < 6) return this.parseIdent();
+ switch (this.type) {
+ case _tokentype.types.name:
+ return this.parseIdent();
+
+ case _tokentype.types.bracketL:
+ var node = this.startNode();
+ this.next();
+ node.elements = this.parseBindingList(_tokentype.types.bracketR, true, true);
+ return this.finishNode(node, "ArrayPattern");
+
+ case _tokentype.types.braceL:
+ return this.parseObj(true);
+
+ default:
+ this.unexpected();
+ }
+};
+
+pp.parseBindingList = function (close, allowEmpty, allowTrailingComma) {
+ var elts = [],
+ first = true;
+ while (!this.eat(close)) {
+ if (first) first = false;else this.expect(_tokentype.types.comma);
+ if (allowEmpty && this.type === _tokentype.types.comma) {
+ elts.push(null);
+ } else if (allowTrailingComma && this.afterTrailingComma(close)) {
+ break;
+ } else if (this.type === _tokentype.types.ellipsis) {
+ elts.push(this.parseAssignableListItemTypes(this.parseRest()));
+ this.expect(close);
+ break;
+ } else {
+ var left = this.parseMaybeDefault();
+ this.parseAssignableListItemTypes(left);
+ elts.push(this.parseMaybeDefault(null, left));
+ }
+ }
+ return elts;
+};
+
+pp.parseAssignableListItemTypes = function (param) {
+ return param;
+};
+
+// Parses assignment pattern around given atom if possible.
+
+pp.parseMaybeDefault = function (startPos, left) {
+ startPos = startPos || this.markPosition();
+ left = left || this.parseBindingAtom();
+ if (!this.eat(_tokentype.types.eq)) return left;
+ var node = this.startNodeAt(startPos);
+ node.operator = "=";
+ node.left = left;
+ node.right = this.parseMaybeAssign();
+ return this.finishNode(node, "AssignmentPattern");
+};
+
+// Verify that a node is an lval — something that can be assigned
+// to.
+
+pp.checkLVal = function (expr, isBinding, checkClashes) {
+ switch (expr.type) {
+ case "Identifier":
+ if (this.strict && (_identifier.reservedWords.strictBind(expr.name) || _identifier.reservedWords.strict(expr.name))) this.raise(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode");
+ if (checkClashes) {
+ if (_util.has(checkClashes, expr.name)) this.raise(expr.start, "Argument name clash in strict mode");
+ checkClashes[expr.name] = true;
+ }
+ break;
+
+ case "MemberExpression":
+ if (isBinding) this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression");
+ break;
+
+ case "ObjectPattern":
+ for (var i = 0; i < expr.properties.length; i++) {
+ var prop = expr.properties[i];
+ if (prop.type === "Property") prop = prop.value;
+ this.checkLVal(prop, isBinding, checkClashes);
+ }
+ break;
+
+ case "ArrayPattern":
+ for (var i = 0; i < expr.elements.length; i++) {
+ var elem = expr.elements[i];
+ if (elem) this.checkLVal(elem, isBinding, checkClashes);
+ }
+ break;
+
+ case "AssignmentPattern":
+ this.checkLVal(expr.left, isBinding, checkClashes);
+ break;
+
+ case "SpreadProperty":
+ case "RestElement":
+ this.checkLVal(expr.argument, isBinding, checkClashes);
+ break;
+
+ case "ParenthesizedExpression":
+ this.checkLVal(expr.expression, isBinding, checkClashes);
+ break;
+
+ default:
+ this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue");
+ }
+};
+},{"./../../babel/tools/protect.js":52,"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],9:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+exports.__esModule = true;
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var _state = require("./state");
+
+var _location = require("./location");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+// Start an AST node, attaching a start offset.
+
+var pp = _state.Parser.prototype;
+
+var Node = function Node() {
+ _classCallCheck(this, Node);
+};
+
+exports.Node = Node;
+
+pp.startNode = function () {
+ var node = new Node();
+ node.start = this.start;
+ if (this.options.locations) node.loc = new _location.SourceLocation(this, this.startLoc);
+ if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile;
+ if (this.options.ranges) node.range = [this.start, 0];
+ return node;
+};
+
+pp.startNodeAt = function (pos) {
+ var node = new Node(),
+ start = pos;
+ if (this.options.locations) {
+ node.loc = new _location.SourceLocation(this, start[1]);
+ start = pos[0];
+ }
+ node.start = start;
+ if (this.options.directSourceFile) node.sourceFile = this.options.directSourceFile;
+ if (this.options.ranges) node.range = [start, 0];
+ return node;
+};
+
+// Finish an AST node, adding `type` and `end` properties.
+
+pp.finishNode = function (node, type) {
+ node.type = type;
+ node.end = this.lastTokEnd;
+ if (this.options.locations) node.loc.end = this.lastTokEndLoc;
+ if (this.options.ranges) node.range[1] = this.lastTokEnd;
+ return node;
+};
+
+// Finish node at given position
+
+pp.finishNodeAt = function (node, type, pos) {
+ if (this.options.locations) {
+ node.loc.end = pos[1];pos = pos[0];
+ }
+ node.type = type;
+ node.end = pos;
+ if (this.options.ranges) node.range[1] = pos;
+ return node;
+};
+},{"./../../babel/tools/protect.js":52,"./location":6,"./state":12}],10:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+exports.__esModule = true;
+exports.getOptions = getOptions;
+
+var _util = require("./util");
+
+var _location = require("./location");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+// A second optional argument can be given to further configure
+// the parser process. These options are recognized:
+
+var defaultOptions = {
+ // `ecmaVersion` indicates the ECMAScript version to parse. Must
+ // be either 3, or 5, or 6. This influences support for strict
+ // mode, the set of reserved words, support for getters and
+ // setters and other features.
+ ecmaVersion: 5,
+ // Source type ("script" or "module") for different semantics
+ sourceType: "script",
+ // `onInsertedSemicolon` can be a callback that will be called
+ // when a semicolon is automatically inserted. It will be passed
+ // th position of the comma as an offset, and if `locations` is
+ // enabled, it is given the location as a `{line, column}` object
+ // as second argument.
+ onInsertedSemicolon: null,
+ // `onTrailingComma` is similar to `onInsertedSemicolon`, but for
+ // trailing commas.
+ onTrailingComma: null,
+ // By default, reserved words are not enforced. Disable
+ // `allowReserved` to enforce them. When this option has the
+ // value "never", reserved words and keywords can also not be
+ // used as property names.
+ allowReserved: true,
+ // When enabled, a return at the top level is not considered an
+ // error.
+ allowReturnOutsideFunction: false,
+ // When enabled, import/export statements are not constrained to
+ // appearing at the top of the program.
+ allowImportExportEverywhere: false,
+ // When enabled, hashbang directive in the beginning of file
+ // is allowed and treated as a line comment.
+ allowHashBang: false,
+ // When `locations` is on, `loc` properties holding objects with
+ // `start` and `end` properties in `{line, column}` form (with
+ // line being 1-based and column 0-based) will be attached to the
+ // nodes.
+ locations: false,
+ // A function can be passed as `onToken` option, which will
+ // cause Acorn to call that function with object in the same
+ // format as tokenize() returns. Note that you are not
+ // allowed to call the parser from the callback—that will
+ // corrupt its internal state.
+ onToken: null,
+ // A function can be passed as `onComment` option, which will
+ // cause Acorn to call that function with `(block, text, start,
+ // end)` parameters whenever a comment is skipped. `block` is a
+ // boolean indicating whether this is a block (`/* */`) comment,
+ // `text` is the content of the comment, and `start` and `end` are
+ // character offsets that denote the start and end of the comment.
+ // When the `locations` option is on, two more parameters are
+ // passed, the full `{line, column}` locations of the start and
+ // end of the comments. Note that you are not allowed to call the
+ // parser from the callback—that will corrupt its internal state.
+ onComment: null,
+ // Nodes have their start and end characters offsets recorded in
+ // `start` and `end` properties (directly on the node, rather than
+ // the `loc` object, which holds line/column data. To also add a
+ // [semi-standardized][range] `range` property holding a `[start,
+ // end]` array with the same numbers, set the `ranges` option to
+ // `true`.
+ //
+ // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678
+ ranges: false,
+ // It is possible to parse multiple files into a single AST by
+ // passing the tree produced by parsing the first file as
+ // `program` option in subsequent parses. This will add the
+ // toplevel forms of the parsed file to the `Program` (top) node
+ // of an existing parse tree.
+ program: null,
+ // When `locations` is on, you can pass this to record the source
+ // file in every node's `loc` object.
+ sourceFile: null,
+ // This value, if given, is stored in every node, whether
+ // `locations` is on or off.
+ directSourceFile: null,
+ // When enabled, parenthesized expressions are represented by
+ // (non-standard) ParenthesizedExpression nodes
+ preserveParens: false,
+ plugins: {},
+ // Babel-specific options
+ features: {},
+ strictMode: null
+};
+
+exports.defaultOptions = defaultOptions;
+// Interpret and default an options object
+
+function getOptions(opts) {
+ var options = {};
+ for (var opt in defaultOptions) {
+ options[opt] = opts && _util.has(opts, opt) ? opts[opt] : defaultOptions[opt];
+ }if (_util.isArray(options.onToken)) {
+ (function () {
+ var tokens = options.onToken;
+ options.onToken = function (token) {
+ return tokens.push(token);
+ };
+ })();
+ }
+ if (_util.isArray(options.onComment)) options.onComment = pushComment(options, options.onComment);
+
+ return options;
+}
+
+function pushComment(options, array) {
+ return function (block, text, start, end, startLoc, endLoc) {
+ var comment = {
+ type: block ? "Block" : "Line",
+ value: text,
+ start: start,
+ end: end
+ };
+ if (options.locations) comment.loc = new _location.SourceLocation(this, startLoc, endLoc);
+ if (options.ranges) comment.range = [start, end];
+ array.push(comment);
+ };
+}
+},{"./../../babel/tools/protect.js":52,"./location":6,"./util":17}],11:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+var _tokentype = require("./tokentype");
+
+var _state = require("./state");
+
+var _whitespace = require("./whitespace");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+var pp = _state.Parser.prototype;
+
+// ## Parser utilities
+
+// Test whether a statement node is the string literal `"use strict"`.
+
+pp.isUseStrict = function (stmt) {
+ return this.options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && stmt.expression.type === "Literal" && stmt.expression.value === "use strict";
+};
+
+// Predicate that tests whether the next token is of the given
+// type, and if yes, consumes it as a side effect.
+
+pp.eat = function (type) {
+ if (this.type === type) {
+ this.next();
+ return true;
+ } else {
+ return false;
+ }
+};
+
+// Tests whether parsed token is a contextual keyword.
+
+pp.isContextual = function (name) {
+ return this.type === _tokentype.types.name && this.value === name;
+};
+
+// Consumes contextual keyword if possible.
+
+pp.eatContextual = function (name) {
+ return this.value === name && this.eat(_tokentype.types.name);
+};
+
+// Asserts that following token is given contextual keyword.
+
+pp.expectContextual = function (name) {
+ if (!this.eatContextual(name)) this.unexpected();
+};
+
+// Test whether a semicolon can be inserted at the current position.
+
+pp.canInsertSemicolon = function () {
+ return this.type === _tokentype.types.eof || this.type === _tokentype.types.braceR || _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
+};
+
+pp.insertSemicolon = function () {
+ if (this.canInsertSemicolon()) {
+ if (this.options.onInsertedSemicolon) this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc);
+ return true;
+ }
+};
+
+// Consume a semicolon, or, failing that, see if we are allowed to
+// pretend that there is a semicolon at this position.
+
+pp.semicolon = function () {
+ if (!this.eat(_tokentype.types.semi) && !this.insertSemicolon()) this.unexpected();
+};
+
+pp.afterTrailingComma = function (tokType) {
+ if (this.type == tokType) {
+ if (this.options.onTrailingComma) this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc);
+ this.next();
+ return true;
+ }
+};
+
+// Expect a token of a given type. If found, consume it, otherwise,
+// raise an unexpected token error.
+
+pp.expect = function (type) {
+ this.eat(type) || this.unexpected();
+};
+
+// Raise an unexpected token error.
+
+pp.unexpected = function (pos) {
+ this.raise(pos != null ? pos : this.start, "Unexpected token");
+};
+},{"./../../babel/tools/protect.js":52,"./state":12,"./tokentype":16,"./whitespace":18}],12:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+exports.__esModule = true;
+exports.Parser = Parser;
+
+var _identifier = require("./identifier");
+
+var _tokentype = require("./tokentype");
+
+var _whitespace = require("./whitespace");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+function Parser(options, input, startPos) {
+ this.options = options;
+ this.sourceFile = this.options.sourceFile || null;
+ this.isKeyword = _identifier.keywords[this.options.ecmaVersion >= 6 ? 6 : 5];
+ this.isReservedWord = _identifier.reservedWords[this.options.ecmaVersion];
+ this.input = input;
+ this.loadPlugins(this.options.plugins);
+
+ // Set up token state
+
+ // The current position of the tokenizer in the input.
+ if (startPos) {
+ this.pos = startPos;
+ this.lineStart = Math.max(0, this.input.lastIndexOf("\n", startPos));
+ this.curLine = this.input.slice(0, this.lineStart).split(_whitespace.lineBreak).length;
+ } else {
+ this.pos = this.lineStart = 0;
+ this.curLine = 1;
+ }
+
+ // Properties of the current token:
+ // Its type
+ this.type = _tokentype.types.eof;
+ // For tokens that include more information than their type, the value
+ this.value = null;
+ // Its start and end offset
+ this.start = this.end = this.pos;
+ // And, if locations are used, the {line, column} object
+ // corresponding to those offsets
+ this.startLoc = this.endLoc = null;
+
+ // Position information for the previous token
+ this.lastTokEndLoc = this.lastTokStartLoc = null;
+ this.lastTokStart = this.lastTokEnd = this.pos;
+
+ // The context stack is used to superficially track syntactic
+ // context to predict whether a regular expression is allowed in a
+ // given position.
+ this.context = this.initialContext();
+ this.exprAllowed = true;
+
+ // Figure out if it's a module code.
+ this.inModule = this.options.sourceType === "module";
+ this.strict = this.options.strictMode === false ? false : this.inModule;
+
+ // Used to signify the start of a potential arrow function
+ this.potentialArrowAt = -1;
+
+ // Flags to track whether we are in a function, a generator.
+ this.inFunction = this.inGenerator = false;
+ // Labels in scope.
+ this.labels = [];
+
+ this.decorators = [];
+
+ // If enabled, skip leading hashbang line.
+ if (this.pos === 0 && this.options.allowHashBang && this.input.slice(0, 2) === "#!") this.skipLineComment(2);
+}
+
+Parser.prototype.extend = function (name, f) {
+ this[name] = f(this[name]);
+};
+
+// Registered plugins
+
+var plugins = {};
+
+exports.plugins = plugins;
+Parser.prototype.loadPlugins = function (plugins) {
+ for (var _name in plugins) {
+ var plugin = exports.plugins[_name];
+ if (!plugin) throw new Error("Plugin '" + _name + "' not found");
+ plugin(this, plugins[_name]);
+ }
+};
+},{"./../../babel/tools/protect.js":52,"./identifier":4,"./tokentype":16,"./whitespace":18}],13:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+var _tokentype = require("./tokentype");
+
+var _state = require("./state");
+
+var _whitespace = require("./whitespace");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+var pp = _state.Parser.prototype;
+
+// ### Statement parsing
+
+// Parse a program. Initializes the parser, reads any number of
+// statements, and wraps them in a Program node. Optionally takes a
+// `program` argument. If present, the statements will be appended
+// to its body instead of creating a new node.
+
+pp.parseTopLevel = function (node) {
+ var first = true;
+ if (!node.body) node.body = [];
+ while (this.type !== _tokentype.types.eof) {
+ var stmt = this.parseStatement(true, true);
+ node.body.push(stmt);
+ if (first && this.isUseStrict(stmt)) this.setStrict(true);
+ first = false;
+ }
+ this.next();
+ if (this.options.ecmaVersion >= 6) {
+ node.sourceType = this.options.sourceType;
+ }
+ return this.finishNode(node, "Program");
+};
+
+var loopLabel = { kind: "loop" },
+ switchLabel = { kind: "switch" };
+
+// Parse a single statement.
+//
+// If expecting a statement and finding a slash operator, parse a
+// regular expression literal. This is to handle cases like
+// `if (foo) /blah/.exec(foo)`, where looking at the previous token
+// does not help.
+
+pp.parseStatement = function (declaration, topLevel) {
+ if (this.type === _tokentype.types.at) {
+ this.parseDecorators(true);
+ }
+
+ var starttype = this.type,
+ node = this.startNode();
+
+ // Most types of statements are recognized by the keyword they
+ // start with. Many are trivial to parse, some require a bit of
+ // complexity.
+
+ switch (starttype) {
+ case _tokentype.types._break:case _tokentype.types._continue:
+ return this.parseBreakContinueStatement(node, starttype.keyword);
+ case _tokentype.types._debugger:
+ return this.parseDebuggerStatement(node);
+ case _tokentype.types._do:
+ return this.parseDoStatement(node);
+ case _tokentype.types._for:
+ return this.parseForStatement(node);
+ case _tokentype.types._function:
+ if (!declaration && this.options.ecmaVersion >= 6) this.unexpected();
+ return this.parseFunctionStatement(node);
+
+ case _tokentype.types._class:
+ if (!declaration) this.unexpected();
+ this.takeDecorators(node);
+ return this.parseClass(node, true);
+
+ case _tokentype.types._if:
+ return this.parseIfStatement(node);
+ case _tokentype.types._return:
+ return this.parseReturnStatement(node);
+ case _tokentype.types._switch:
+ return this.parseSwitchStatement(node);
+ case _tokentype.types._throw:
+ return this.parseThrowStatement(node);
+ case _tokentype.types._try:
+ return this.parseTryStatement(node);
+ case _tokentype.types._let:case _tokentype.types._const:
+ if (!declaration) this.unexpected(); // NOTE: falls through to _var
+ case _tokentype.types._var:
+ return this.parseVarStatement(node, starttype);
+ case _tokentype.types._while:
+ return this.parseWhileStatement(node);
+ case _tokentype.types._with:
+ return this.parseWithStatement(node);
+ case _tokentype.types.braceL:
+ return this.parseBlock();
+ case _tokentype.types.semi:
+ return this.parseEmptyStatement(node);
+ case _tokentype.types._export:
+ case _tokentype.types._import:
+ if (!this.options.allowImportExportEverywhere) {
+ if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level");
+ if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
+ }
+ return starttype === _tokentype.types._import ? this.parseImport(node) : this.parseExport(node);
+
+ case _tokentype.types.name:
+ if (this.options.features["es7.asyncFunctions"] && this.value === "async") {
+ var lookahead = this.lookahead();
+ if (lookahead.type === _tokentype.types._function && !this.canInsertSemicolon.call(lookahead)) {
+ this.next();
+ this.expect(_tokentype.types._function);
+ return this.parseFunction(node, true, false, true);
+ }
+ }
+
+ // If the statement does not start with a statement keyword or a
+ // brace, it's an ExpressionStatement or LabeledStatement. We
+ // simply start parsing an expression, and afterwards, if the
+ // next token is a colon and the expression was a simple
+ // Identifier node, we switch to interpreting it as a label.
+ default:
+ var maybeName = this.value,
+ expr = this.parseExpression();
+ if (starttype === _tokentype.types.name && expr.type === "Identifier" && this.eat(_tokentype.types.colon)) return this.parseLabeledStatement(node, maybeName, expr);else return this.parseExpressionStatement(node, expr);
+ }
+};
+
+pp.takeDecorators = function (node) {
+ if (this.decorators.length) {
+ node.decorators = this.decorators;
+ this.decorators = [];
+ }
+};
+
+pp.parseDecorators = function (allowExport) {
+ while (this.type === _tokentype.types.at) {
+ this.decorators.push(this.parseDecorator());
+ }
+
+ if (allowExport && this.type === _tokentype.types._export) {
+ return;
+ }
+
+ if (this.type !== _tokentype.types._class) {
+ this.raise(this.start, "Leading decorators must be attached to a class declaration");
+ }
+};
+
+pp.parseDecorator = function (allowExport) {
+ if (!this.options.features["es7.decorators"]) {
+ this.unexpected();
+ }
+ var node = this.startNode();
+ this.next();
+ node.expression = this.parseMaybeAssign();
+ return this.finishNode(node, "Decorator");
+};
+
+pp.parseBreakContinueStatement = function (node, keyword) {
+ var isBreak = keyword == "break";
+ this.next();
+ if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.label = null;else if (this.type !== _tokentype.types.name) this.unexpected();else {
+ node.label = this.parseIdent();
+ this.semicolon();
+ }
+
+ // Verify that there is an actual destination to break or
+ // continue to.
+ for (var i = 0; i < this.labels.length; ++i) {
+ var lab = this.labels[i];
+ if (node.label == null || lab.name === node.label.name) {
+ if (lab.kind != null && (isBreak || lab.kind === "loop")) break;
+ if (node.label && isBreak) break;
+ }
+ }
+ if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword);
+ return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement");
+};
+
+pp.parseDebuggerStatement = function (node) {
+ this.next();
+ this.semicolon();
+ return this.finishNode(node, "DebuggerStatement");
+};
+
+pp.parseDoStatement = function (node) {
+ var start = this.markPosition();
+ this.next();
+ this.labels.push(loopLabel);
+ node.body = this.parseStatement(false);
+ this.labels.pop();
+ this.expect(_tokentype.types._while);
+ node.test = this.parseParenExpression();
+ if (this.options.ecmaVersion >= 6) this.eat(_tokentype.types.semi);else this.semicolon();
+ return this.finishNode(node, "DoWhileStatement");
+};
+
+// Disambiguating between a `for` and a `for`/`in` or `for`/`of`
+// loop is non-trivial. Basically, we have to parse the init `var`
+// statement or expression, disallowing the `in` operator (see
+// the second parameter to `parseExpression`), and then check
+// whether the next token is `in` or `of`. When there is no init
+// part (semicolon immediately after the opening parenthesis), it
+// is a regular `for` loop.
+
+pp.parseForStatement = function (node) {
+ this.next();
+ this.labels.push(loopLabel);
+ this.expect(_tokentype.types.parenL);
+ if (this.type === _tokentype.types.semi) return this.parseFor(node, null);
+ if (this.type === _tokentype.types._var || this.type === _tokentype.types._let || this.type === _tokentype.types._const) {
+ var _init = this.startNode(),
+ varKind = this.type;
+ this.next();
+ this.parseVar(_init, true, varKind);
+ this.finishNode(_init, "VariableDeclaration");
+ if ((this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && _init.declarations.length === 1 && !(varKind !== _tokentype.types._var && _init.declarations[0].init)) return this.parseForIn(node, _init);
+ return this.parseFor(node, _init);
+ }
+ var refShorthandDefaultPos = { start: 0 };
+ var init = this.parseExpression(true, refShorthandDefaultPos);
+ if (this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) {
+ this.toAssignable(init);
+ this.checkLVal(init);
+ return this.parseForIn(node, init);
+ } else if (refShorthandDefaultPos.start) {
+ this.unexpected(refShorthandDefaultPos.start);
+ }
+ return this.parseFor(node, init);
+};
+
+pp.parseFunctionStatement = function (node) {
+ this.next();
+ return this.parseFunction(node, true);
+};
+
+pp.parseIfStatement = function (node) {
+ this.next();
+ node.test = this.parseParenExpression();
+ node.consequent = this.parseStatement(false);
+ node.alternate = this.eat(_tokentype.types._else) ? this.parseStatement(false) : null;
+ return this.finishNode(node, "IfStatement");
+};
+
+pp.parseReturnStatement = function (node) {
+ if (!this.inFunction && !this.options.allowReturnOutsideFunction) this.raise(this.start, "'return' outside of function");
+ this.next();
+
+ // In `return` (and `break`/`continue`), the keywords with
+ // optional arguments, we eagerly look for a semicolon or the
+ // possibility to insert one.
+
+ if (this.eat(_tokentype.types.semi) || this.insertSemicolon()) node.argument = null;else {
+ node.argument = this.parseExpression();this.semicolon();
+ }
+ return this.finishNode(node, "ReturnStatement");
+};
+
+pp.parseSwitchStatement = function (node) {
+ this.next();
+ node.discriminant = this.parseParenExpression();
+ node.cases = [];
+ this.expect(_tokentype.types.braceL);
+ this.labels.push(switchLabel);
+
+ // Statements under must be grouped (by label) in SwitchCase
+ // nodes. `cur` is used to keep the node that we are currently
+ // adding statements to.
+
+ for (var cur, sawDefault; this.type != _tokentype.types.braceR;) {
+ if (this.type === _tokentype.types._case || this.type === _tokentype.types._default) {
+ var isCase = this.type === _tokentype.types._case;
+ if (cur) this.finishNode(cur, "SwitchCase");
+ node.cases.push(cur = this.startNode());
+ cur.consequent = [];
+ this.next();
+ if (isCase) {
+ cur.test = this.parseExpression();
+ } else {
+ if (sawDefault) this.raise(this.lastTokStart, "Multiple default clauses");
+ sawDefault = true;
+ cur.test = null;
+ }
+ this.expect(_tokentype.types.colon);
+ } else {
+ if (!cur) this.unexpected();
+ cur.consequent.push(this.parseStatement(true));
+ }
+ }
+ if (cur) this.finishNode(cur, "SwitchCase");
+ this.next(); // Closing brace
+ this.labels.pop();
+ return this.finishNode(node, "SwitchStatement");
+};
+
+pp.parseThrowStatement = function (node) {
+ this.next();
+ if (_whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) this.raise(this.lastTokEnd, "Illegal newline after throw");
+ node.argument = this.parseExpression();
+ this.semicolon();
+ return this.finishNode(node, "ThrowStatement");
+};
+
+// Reused empty array added for node fields that are always empty.
+
+var empty = [];
+
+pp.parseTryStatement = function (node) {
+ this.next();
+ node.block = this.parseBlock();
+ node.handler = null;
+ if (this.type === _tokentype.types._catch) {
+ var clause = this.startNode();
+ this.next();
+ this.expect(_tokentype.types.parenL);
+ clause.param = this.parseBindingAtom();
+ this.checkLVal(clause.param, true);
+ this.expect(_tokentype.types.parenR);
+ clause.guard = null;
+ clause.body = this.parseBlock();
+ node.handler = this.finishNode(clause, "CatchClause");
+ }
+ node.guardedHandlers = empty;
+ node.finalizer = this.eat(_tokentype.types._finally) ? this.parseBlock() : null;
+ if (!node.handler && !node.finalizer) this.raise(node.start, "Missing catch or finally clause");
+ return this.finishNode(node, "TryStatement");
+};
+
+pp.parseVarStatement = function (node, kind) {
+ this.next();
+ this.parseVar(node, false, kind);
+ this.semicolon();
+ return this.finishNode(node, "VariableDeclaration");
+};
+
+pp.parseWhileStatement = function (node) {
+ this.next();
+ node.test = this.parseParenExpression();
+ this.labels.push(loopLabel);
+ node.body = this.parseStatement(false);
+ this.labels.pop();
+ return this.finishNode(node, "WhileStatement");
+};
+
+pp.parseWithStatement = function (node) {
+ if (this.strict) this.raise(this.start, "'with' in strict mode");
+ this.next();
+ node.object = this.parseParenExpression();
+ node.body = this.parseStatement(false);
+ return this.finishNode(node, "WithStatement");
+};
+
+pp.parseEmptyStatement = function (node) {
+ this.next();
+ return this.finishNode(node, "EmptyStatement");
+};
+
+pp.parseLabeledStatement = function (node, maybeName, expr) {
+ for (var i = 0; i < this.labels.length; ++i) {
+ if (this.labels[i].name === maybeName) this.raise(expr.start, "Label '" + maybeName + "' is already declared");
+ }var kind = this.type.isLoop ? "loop" : this.type === _tokentype.types._switch ? "switch" : null;
+ for (var i = this.labels.length - 1; i >= 0; i--) {
+ var label = this.labels[i];
+ if (label.statementStart == node.start) {
+ label.statementStart = this.start;
+ label.kind = kind;
+ } else break;
+ }
+ this.labels.push({ name: maybeName, kind: kind, statementStart: this.start });
+ node.body = this.parseStatement(true);
+ this.labels.pop();
+ node.label = expr;
+ return this.finishNode(node, "LabeledStatement");
+};
+
+pp.parseExpressionStatement = function (node, expr) {
+ node.expression = expr;
+ this.semicolon();
+ return this.finishNode(node, "ExpressionStatement");
+};
+
+// Parse a semicolon-enclosed block of statements, handling `"use
+// strict"` declarations when `allowStrict` is true (used for
+// function bodies).
+
+pp.parseBlock = function (allowStrict) {
+ var node = this.startNode(),
+ first = true,
+ oldStrict = undefined;
+ node.body = [];
+ this.expect(_tokentype.types.braceL);
+ while (!this.eat(_tokentype.types.braceR)) {
+ var stmt = this.parseStatement(true);
+ node.body.push(stmt);
+ if (first && allowStrict && this.isUseStrict(stmt)) {
+ oldStrict = this.strict;
+ this.setStrict(this.strict = true);
+ }
+ first = false;
+ }
+ if (oldStrict === false) this.setStrict(false);
+ return this.finishNode(node, "BlockStatement");
+};
+
+// Parse a regular `for` loop. The disambiguation code in
+// `parseStatement` will already have parsed the init statement or
+// expression.
+
+pp.parseFor = function (node, init) {
+ node.init = init;
+ this.expect(_tokentype.types.semi);
+ node.test = this.type === _tokentype.types.semi ? null : this.parseExpression();
+ this.expect(_tokentype.types.semi);
+ node.update = this.type === _tokentype.types.parenR ? null : this.parseExpression();
+ this.expect(_tokentype.types.parenR);
+ node.body = this.parseStatement(false);
+ this.labels.pop();
+ return this.finishNode(node, "ForStatement");
+};
+
+// Parse a `for`/`in` and `for`/`of` loop, which are almost
+// same from parser's perspective.
+
+pp.parseForIn = function (node, init) {
+ var type = this.type === _tokentype.types._in ? "ForInStatement" : "ForOfStatement";
+ this.next();
+ node.left = init;
+ node.right = this.parseExpression();
+ this.expect(_tokentype.types.parenR);
+ node.body = this.parseStatement(false);
+ this.labels.pop();
+ return this.finishNode(node, type);
+};
+
+// Parse a list of variable declarations.
+
+pp.parseVar = function (node, isFor, kind) {
+ node.declarations = [];
+ node.kind = kind.keyword;
+ for (;;) {
+ var decl = this.startNode();
+ this.parseVarHead(decl);
+ if (this.eat(_tokentype.types.eq)) {
+ decl.init = this.parseMaybeAssign(isFor);
+ } else if (kind === _tokentype.types._const && !(this.type === _tokentype.types._in || this.options.ecmaVersion >= 6 && this.isContextual("of"))) {
+ this.unexpected();
+ } else if (decl.id.type != "Identifier" && !(isFor && (this.type === _tokentype.types._in || this.isContextual("of")))) {
+ this.raise(this.lastTokEnd, "Complex binding patterns require an initialization value");
+ } else {
+ decl.init = null;
+ }
+ node.declarations.push(this.finishNode(decl, "VariableDeclarator"));
+ if (!this.eat(_tokentype.types.comma)) break;
+ }
+ return node;
+};
+
+pp.parseVarHead = function (decl) {
+ decl.id = this.parseBindingAtom();
+ this.checkLVal(decl.id, true);
+};
+
+// Parse a function declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp.parseFunction = function (node, isStatement, allowExpressionBody, isAsync) {
+ this.initFunction(node, isAsync);
+ if (this.options.ecmaVersion >= 6) node.generator = this.eat(_tokentype.types.star);
+ if (isStatement || this.type === _tokentype.types.name) node.id = this.parseIdent();
+ this.parseFunctionParams(node);
+ this.parseFunctionBody(node, allowExpressionBody);
+ return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression");
+};
+
+pp.parseFunctionParams = function (node) {
+ this.expect(_tokentype.types.parenL);
+ node.params = this.parseBindingList(_tokentype.types.parenR, false, this.options.features["es7.trailingFunctionCommas"]);
+};
+
+// Parse a class declaration or literal (depending on the
+// `isStatement` parameter).
+
+pp.parseClass = function (node, isStatement) {
+ this.next();
+ this.parseClassId(node, isStatement);
+ this.parseClassSuper(node);
+ var classBody = this.startNode();
+ var hadConstructor = false;
+ classBody.body = [];
+ this.expect(_tokentype.types.braceL);
+ var decorators = [];
+ while (!this.eat(_tokentype.types.braceR)) {
+ if (this.eat(_tokentype.types.semi)) continue;
+ if (this.type === _tokentype.types.at) {
+ decorators.push(this.parseDecorator());
+ continue;
+ }
+ var method = this.startNode();
+ if (decorators.length) {
+ method.decorators = decorators;
+ decorators = [];
+ }
+ var isMaybeStatic = this.type === _tokentype.types.name && this.value === "static";
+ var isGenerator = this.eat(_tokentype.types.star),
+ isAsync = false;
+ this.parsePropertyName(method);
+ method["static"] = isMaybeStatic && this.type !== _tokentype.types.parenL;
+ if (method["static"]) {
+ if (isGenerator) this.unexpected();
+ isGenerator = this.eat(_tokentype.types.star);
+ this.parsePropertyName(method);
+ }
+ if (!isGenerator && method.key.type === "Identifier" && !method.computed && this.isClassProperty()) {
+ classBody.body.push(this.parseClassProperty(method));
+ continue;
+ }
+ if (this.options.features["es7.asyncFunctions"] && this.type !== _tokentype.types.parenL && !method.computed && method.key.type === "Identifier" && method.key.name === "async") {
+ isAsync = true;
+ this.parsePropertyName(method);
+ }
+ var isGetSet = false;
+ method.kind = "method";
+ if (!method.computed) {
+ var key = method.key;
+
+ if (!isAsync && !isGenerator && key.type === "Identifier" && this.type !== _tokentype.types.parenL && (key.name === "get" || key.name === "set")) {
+ isGetSet = true;
+ method.kind = key.name;
+ key = this.parsePropertyName(method);
+ }
+ if (!method["static"] && (key.type === "Identifier" && key.name === "constructor" || key.type === "Literal" && key.value === "constructor")) {
+ if (hadConstructor) this.raise(key.start, "Duplicate constructor in the same class");
+ if (isGetSet) this.raise(key.start, "Constructor can't have get/set modifier");
+ if (isGenerator) this.raise(key.start, "Constructor can't be a generator");
+ if (isAsync) this.raise(key.start, "Constructor can't be an async function");
+ method.kind = "constructor";
+ hadConstructor = true;
+ }
+ }
+ if (method.kind === "constructor" && method.decorators) {
+ this.raise(method.start, "You can't attach decorators to a class constructor");
+ }
+ this.parseClassMethod(classBody, method, isGenerator, isAsync);
+ if (isGetSet) {
+ var paramCount = method.kind === "get" ? 0 : 1;
+ if (method.value.params.length !== paramCount) {
+ var start = method.value.start;
+ if (method.kind === "get") this.raise(start, "getter should have no params");else this.raise(start, "setter should have exactly one param");
+ }
+ }
+ }
+ if (decorators.length) {
+ this.raise(this.start, "You have trailing decorators with no method");
+ }
+ node.body = this.finishNode(classBody, "ClassBody");
+ return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression");
+};
+
+pp.isClassProperty = function () {
+ return this.type === _tokentype.types.eq || (this.type === _tokentype.types.semi || this.canInsertSemicolon());
+};
+
+pp.parseClassProperty = function (node) {
+ if (this.type === _tokentype.types.eq) {
+ if (!this.options.features["es7.classProperties"]) this.unexpected();
+ this.next();
+ node.value = this.parseMaybeAssign();
+ } else {
+ node.value = null;
+ }
+ this.semicolon();
+ return this.finishNode(node, "ClassProperty");
+};
+
+pp.parseClassMethod = function (classBody, method, isGenerator, isAsync) {
+ method.value = this.parseMethod(isGenerator, isAsync);
+ classBody.body.push(this.finishNode(method, "MethodDefinition"));
+};
+
+pp.parseClassId = function (node, isStatement) {
+ node.id = this.type === _tokentype.types.name ? this.parseIdent() : isStatement ? this.unexpected() : null;
+};
+
+pp.parseClassSuper = function (node) {
+ node.superClass = this.eat(_tokentype.types._extends) ? this.parseExprSubscripts() : null;
+};
+
+// Parses module export declaration.
+
+pp.parseExport = function (node) {
+ this.next();
+ // export * from '...'
+ if (this.type === _tokentype.types.star) {
+ var specifier = this.startNode();
+ this.next();
+ if (this.options.features["es7.exportExtensions"] && this.eatContextual("as")) {
+ specifier.exported = this.parseIdent();
+ node.specifiers = [this.finishNode(specifier, "ExportNamespaceSpecifier")];
+ this.parseExportSpecifiersMaybe(node);
+ this.parseExportFrom(node);
+ } else {
+ this.parseExportFrom(node);
+ return this.finishNode(node, "ExportAllDeclaration");
+ }
+ } else if (this.options.features["es7.exportExtensions"] && this.isExportDefaultSpecifier()) {
+ var specifier = this.startNode();
+ specifier.exported = this.parseIdent(true);
+ node.specifiers = [this.finishNode(specifier, "ExportDefaultSpecifier")];
+ if (this.type === _tokentype.types.comma && this.lookahead().type === _tokentype.types.star) {
+ this.expect(_tokentype.types.comma);
+ var _specifier = this.startNode();
+ this.expect(_tokentype.types.star);
+ this.expectContextual("as");
+ _specifier.exported = this.parseIdent();
+ node.specifiers.push(this.finishNode(_specifier, "ExportNamespaceSpecifier"));
+ } else {
+ this.parseExportSpecifiersMaybe(node);
+ }
+ this.parseExportFrom(node);
+ } else if (this.eat(_tokentype.types._default)) {
+ // export default ...
+ var expr = this.parseMaybeAssign();
+ var needsSemi = true;
+ if (expr.type == "FunctionExpression" || expr.type == "ClassExpression") {
+ needsSemi = false;
+ if (expr.id) {
+ expr.type = expr.type == "FunctionExpression" ? "FunctionDeclaration" : "ClassDeclaration";
+ }
+ }
+ node.declaration = expr;
+ if (needsSemi) this.semicolon();
+ this.checkExport(node);
+ return this.finishNode(node, "ExportDefaultDeclaration");
+ } else if (this.type.keyword || this.shouldParseExportDeclaration()) {
+ node.declaration = this.parseStatement(true);
+ node.specifiers = [];
+ node.source = null;
+ } else {
+ // export { x, y as z } [from '...']
+ node.declaration = null;
+ node.specifiers = this.parseExportSpecifiers();
+ if (this.eatContextual("from")) {
+ node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected();
+ } else {
+ node.source = null;
+ }
+ this.semicolon();
+ }
+ this.checkExport(node);
+ return this.finishNode(node, "ExportNamedDeclaration");
+};
+
+pp.isExportDefaultSpecifier = function () {
+ if (this.type === _tokentype.types.name) {
+ return this.value !== "type" && this.value !== "async";
+ }
+
+ if (this.type !== _tokentype.types._default) {
+ return false;
+ }
+
+ var lookahead = this.lookahead();
+ return lookahead.type === _tokentype.types.comma || lookahead.type === _tokentype.types.name && lookahead.value === "from";
+};
+
+pp.parseExportSpecifiersMaybe = function (node) {
+ if (this.eat(_tokentype.types.comma)) {
+ node.specifiers = node.specifiers.concat(this.parseExportSpecifiers());
+ }
+};
+
+pp.parseExportFrom = function (node) {
+ this.expectContextual("from");
+ node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected();
+ this.semicolon();
+ this.checkExport(node);
+};
+
+pp.shouldParseExportDeclaration = function () {
+ return this.options.features["es7.asyncFunctions"] && this.isContextual("async");
+};
+
+pp.checkExport = function (node) {
+ if (this.decorators.length) {
+ var isClass = node.declaration && (node.declaration.type === "ClassDeclaration" || node.declaration.type === "ClassExpression");
+ if (!node.declaration || !isClass) {
+ this.raise(node.start, "You can only use decorators on an export when exporting a class");
+ }
+ this.takeDecorators(node.declaration);
+ }
+};
+
+// Parses a comma-separated list of module exports.
+
+pp.parseExportSpecifiers = function () {
+ var nodes = [],
+ first = true;
+ // export { x, y as z } [from '...']
+ this.expect(_tokentype.types.braceL);
+ while (!this.eat(_tokentype.types.braceR)) {
+ if (!first) {
+ this.expect(_tokentype.types.comma);
+ if (this.afterTrailingComma(_tokentype.types.braceR)) break;
+ } else first = false;
+
+ var node = this.startNode();
+ node.local = this.parseIdent(this.type === _tokentype.types._default);
+ node.exported = this.eatContextual("as") ? this.parseIdent(true) : node.local;
+ nodes.push(this.finishNode(node, "ExportSpecifier"));
+ }
+ return nodes;
+};
+
+// Parses import declaration.
+
+pp.parseImport = function (node) {
+ this.next();
+ // import '...'
+ if (this.type === _tokentype.types.string) {
+ node.specifiers = empty;
+ node.source = this.parseExprAtom();
+ } else {
+ node.specifiers = [];
+ this.parseImportSpecifiers(node);
+ this.expectContextual("from");
+ node.source = this.type === _tokentype.types.string ? this.parseExprAtom() : this.unexpected();
+ }
+ this.semicolon();
+ return this.finishNode(node, "ImportDeclaration");
+};
+
+// Parses a comma-separated list of module imports.
+
+pp.parseImportSpecifiers = function (node) {
+ var first = true;
+ if (this.type === _tokentype.types.name) {
+ // import defaultObj, { x, y as z } from '...'
+ var start = this.markPosition();
+ node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(), start));
+ if (!this.eat(_tokentype.types.comma)) return;
+ }
+ if (this.type === _tokentype.types.star) {
+ var specifier = this.startNode();
+ this.next();
+ this.expectContextual("as");
+ specifier.local = this.parseIdent();
+ this.checkLVal(specifier.local, true);
+ node.specifiers.push(this.finishNode(specifier, "ImportNamespaceSpecifier"));
+ return;
+ }
+ this.expect(_tokentype.types.braceL);
+ while (!this.eat(_tokentype.types.braceR)) {
+ if (!first) {
+ this.expect(_tokentype.types.comma);
+ if (this.afterTrailingComma(_tokentype.types.braceR)) break;
+ } else first = false;
+
+ var specifier = this.startNode();
+ specifier.imported = this.parseIdent(true);
+ specifier.local = this.eatContextual("as") ? this.parseIdent() : specifier.imported;
+ this.checkLVal(specifier.local, true);
+ node.specifiers.push(this.finishNode(specifier, "ImportSpecifier"));
+ }
+};
+
+pp.parseImportSpecifierDefault = function (id, start) {
+ var node = this.startNodeAt(start);
+ node.local = id;
+ this.checkLVal(node.local, true);
+ return this.finishNode(node, "ImportDefaultSpecifier");
+};
+},{"./../../babel/tools/protect.js":52,"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+exports.__esModule = true;
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+// The algorithm used to determine whether a regexp can appear at a
+// given point in the program is loosely based on sweet.js' approach.
+// See https://github.com/mozilla/sweet.js/wiki/design
+
+var _state = require("./state");
+
+var _tokentype = require("./tokentype");
+
+var _whitespace = require("./whitespace");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+var TokContext = function TokContext(token, isExpr, preserveSpace, override) {
+ _classCallCheck(this, TokContext);
+
+ this.token = token;
+ this.isExpr = isExpr;
+ this.preserveSpace = preserveSpace;
+ this.override = override;
+};
+
+exports.TokContext = TokContext;
+var types = {
+ b_stat: new TokContext("{", false),
+ b_expr: new TokContext("{", true),
+ b_tmpl: new TokContext("${", true),
+ p_stat: new TokContext("(", false),
+ p_expr: new TokContext("(", true),
+ q_tmpl: new TokContext("`", true, true, function (p) {
+ return p.readTmplToken();
+ }),
+ f_expr: new TokContext("function", true)
+};
+
+exports.types = types;
+var pp = _state.Parser.prototype;
+
+pp.initialContext = function () {
+ return [types.b_stat];
+};
+
+pp.braceIsBlock = function (prevType) {
+ var parent = undefined;
+ if (prevType === _tokentype.types.colon && (parent = this.curContext()).token == "{") return !parent.isExpr;
+ if (prevType === _tokentype.types._return) return _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.start));
+ if (prevType === _tokentype.types._else || prevType === _tokentype.types.semi || prevType === _tokentype.types.eof) return true;
+ if (prevType == _tokentype.types.braceL) return this.curContext() === types.b_stat;
+ return !this.exprAllowed;
+};
+
+pp.updateContext = function (prevType) {
+ var update = undefined,
+ type = this.type;
+ if (type.keyword && prevType == _tokentype.types.dot) this.exprAllowed = false;else if (update = type.updateContext) update.call(this, prevType);else this.exprAllowed = type.beforeExpr;
+};
+
+// Token-specific context update code
+
+_tokentype.types.parenR.updateContext = _tokentype.types.braceR.updateContext = function () {
+ if (this.context.length == 1) {
+ this.exprAllowed = true;
+ return;
+ }
+ var out = this.context.pop();
+ if (out === types.b_stat && this.curContext() === types.f_expr) {
+ this.context.pop();
+ this.exprAllowed = false;
+ } else if (out === types.b_tmpl) {
+ this.exprAllowed = true;
+ } else {
+ this.exprAllowed = !out.isExpr;
+ }
+};
+
+_tokentype.types.braceL.updateContext = function (prevType) {
+ this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr);
+ this.exprAllowed = true;
+};
+
+_tokentype.types.dollarBraceL.updateContext = function () {
+ this.context.push(types.b_tmpl);
+ this.exprAllowed = true;
+};
+
+_tokentype.types.parenL.updateContext = function (prevType) {
+ var statementParens = prevType === _tokentype.types._if || prevType === _tokentype.types._for || prevType === _tokentype.types._with || prevType === _tokentype.types._while;
+ this.context.push(statementParens ? types.p_stat : types.p_expr);
+ this.exprAllowed = true;
+};
+
+_tokentype.types.incDec.updateContext = function () {};
+
+_tokentype.types._function.updateContext = function () {
+ if (this.curContext() !== types.b_stat) this.context.push(types.f_expr);
+ this.exprAllowed = false;
+};
+
+_tokentype.types.backQuote.updateContext = function () {
+ if (this.curContext() === types.q_tmpl) this.context.pop();else this.context.push(types.q_tmpl);
+ this.exprAllowed = false;
+};
+
+// tokExprAllowed stays unchanged
+},{"./../../babel/tools/protect.js":52,"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,module,exports){
+"use strict";
+
+var _babelToolsProtectJs2 = require("./../../babel/tools/protect.js");
+
+var _babelToolsProtectJs3 = _interopRequireDefault(_babelToolsProtectJs2);
+
+exports.__esModule = true;
+
+function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+
+var _identifier = require("./identifier");
+
+var _tokentype = require("./tokentype");
+
+var _state = require("./state");
+
+var _location = require("./location");
+
+var _whitespace = require("./whitespace");
+
+_babelToolsProtectJs3["default"](module);
+
+function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
+
+// Object type used to represent tokens. Note that normally, tokens
+// simply exist as properties on the parser object. This is only
+// used for the onToken callback and the external tokenizer.
+
+var Token = function Token(p) {
+ _classCallCheck(this, Token);
+
+ this.type = p.type;
+ this.value = p.value;
+ this.start = p.start;
+ this.end = p.end;
+ if (p.options.locations) this.loc = new _location.SourceLocation(p, p.startLoc, p.endLoc);
+ if (p.options.ranges) this.range = [p.start, p.end];
+};
+
+exports.Token = Token;
+
+// ## Tokenizer
+
+var pp = _state.Parser.prototype;
+
+// Are we running under Rhino?
+var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]";
+
+// Move to the next token
+
+pp.next = function () {
+ if (this.options.onToken && !this.isLookahead) this.options.onToken(new Token(this));
+
+ this.lastTokEnd = this.end;
+ this.lastTokStart = this.start;
+ this.lastTokEndLoc = this.endLoc;
+ this.lastTokStartLoc = this.startLoc;
+ this.nextToken();
+};
+
+pp.getToken = function () {
+ this.next();
+ return new Token(this);
+};
+
+// If we're in an ES6 environment, make parsers iterable
+if (typeof Symbol !== "undefined") pp[Symbol.iterator] = function () {
+ var self = this;
+ return { next: function next() {
+ var token = self.getToken();
+ return {
+ done: token.type === _tokentype.types.eof,
+ value: token
+ };
+ } };
+};
+
+// Toggle strict mode. Re-reads the next number or string to please
+// pedantic tests (`"use strict"; 010;` should fail).
+
+pp.setStrict = function (strict) {
+ this.strict = strict;
+ if (this.type !== _tokentype.types.num && this.type !== _tokentype.types.string) return;
+ this.pos = this.start;
+ if (this.options.locations) {
+ while (this.pos < this.lineStart) {
+ this.lineStart = this.input.lastIndexOf("\n", this.lineStart - 2) + 1;
+ --this.curLine;
+ }
+ }
+ this.nextToken();
+};
+
+pp.curContext = function () {
+ return this.context[this.context.length - 1];
+};
+
+// Read a single token, updating the parser object's token-related
+// properties.
+
+pp.nextToken = function () {
+ var curContext = this.curContext();
+ if (!curContext || !curContext.preserveSpace) this.skipSpace();
+
+ this.start = this.pos;
+ if (this.options.locations) this.startLoc = this.curPosition();
+ if (this.pos >= this.input.length) return this.finishToken(_tokentype.types.eof);
+
+ if (curContext.override) return curContext.override(this);else this.readToken(this.fullCharCodeAtPos());
+};
+
+pp.readToken = function (code) {
+ // Identifier or keyword. '\uXXXX' sequences are allowed in
+ // identifiers, so '\' also dispatches to that.
+ if (_identifier.isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) return this.readWord();
+
+ return this.getTokenFromCode(code);
+};
+
+pp.fullCharCodeAtPos = function () {
+ var code = this.input.charCodeAt(this.pos);
+ if (code <= 0xd7ff || code >= 0xe000) return code;
+ var next = this.input.charCodeAt(this.pos + 1);
+ return (code << 10) + next - 0x35fdc00;
+};
+
+pp.skipBlockComment = function () {
+ var startLoc = this.options.onComment && this.options.locations && this.curPosition();
+ var start = this.pos,
+ end = this.input.indexOf("*/", this.pos += 2);
+ if (end === -1) this.raise(this.pos - 2, "Unterminated comment");
+ this.pos = end + 2;
+ if (this.options.locations) {
+ _whitespace.lineBreakG.lastIndex = start;
+ var match = undefined;
+ while ((match = _whitespace.lineBreakG.exec(this.input)) && match.index < this.pos) {
+ ++this.curLine;
+ this.lineStart = match.index + match[0].length;
+ }
+ }
+ if (this.options.onComment) this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, startLoc, this.options.locations && this.curPosition());
+};
+
+pp.skipLineComment = function (startSkip) {
+ var start = this.pos;
+ var startLoc = this.options.onComment && this.options.locations && this.curPosition();
+ var ch = this.input.charCodeAt(this.pos += startSkip);
+ while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) {
+ ++this.pos;
+ ch = this.input.charCodeAt(this.pos);
+ }
+ if (this.options.onComment) this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, startLoc, this.options.locations && this.curPosition());
+};
+
+// Called at the start of the parse and after every token. Skips
+// whitespace and comments, and.
+
+pp.skipSpace = function () {
+ while (this.pos < this.input.length) {
+ var ch = this.input.charCodeAt(this.pos);
+ if (ch === 32) {
+ // ' '
+ ++this.pos;
+ } else if (ch === 13) {
+ ++this.pos;
+ var next = this.input.charCodeAt(this.pos);
+ if (next === 10) {
+ ++this.pos;
+ }
+ if (this.options.locations) {
+ ++this.curLine;
+ this.lineStart = this.pos;
+ }
+ } else if (ch === 10 || ch === 8232 || ch === 8233) {
+ ++this.pos;
+ if (this.options.locations) {
+ ++this.curLine;
+ this.lineStart = this.pos;
+ }
+ } else if (ch > 8 && ch < 14) {
+ ++this.pos;
+ } else if (ch === 47) {
+ // '/'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 42) {
+ // '*'
+ this.skipBlockComment();
+ } else if (next === 47) {
+ // '/'
+ this.skipLineComment(2);
+ } else break;
+ } else if (ch === 160) {
+ // '\xa0'
+ ++this.pos;
+ } else if (ch >= 5760 && _whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))) {
+ ++this.pos;
+ } else {
+ break;
+ }
+ }
+};
+
+// Called at the end of every token. Sets `end`, `val`, and
+// maintains `context` and `exprAllowed`, and skips the space after
+// the token, so that the next one's `start` will point at the
+// right position.
+
+pp.finishToken = function (type, val) {
+ this.end = this.pos;
+ if (this.options.locations) this.endLoc = this.curPosition();
+ var prevType = this.type;
+ this.type = type;
+ this.value = val;
+
+ this.updateContext(prevType);
+};
+
+// ### Token reading
+
+// This is the function that is called to fetch the next token. It
+// is somewhat obscure, because it works in character codes rather
+// than characters, and because operator parsing has been inlined
+// into it.
+//
+// All in the name of speed.
+//
+pp.readToken_dot = function () {
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next >= 48 && next <= 57) return this.readNumber(true);
+ var next2 = this.input.charCodeAt(this.pos + 2);
+ if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) {
+ // 46 = dot '.'
+ this.pos += 3;
+ return this.finishToken(_tokentype.types.ellipsis);
+ } else {
+ ++this.pos;
+ return this.finishToken(_tokentype.types.dot);
+ }
+};
+
+pp.readToken_slash = function () {
+ // '/'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (this.exprAllowed) {
+ ++this.pos;return this.readRegexp();
+ }
+ if (next === 61) return this.finishOp(_tokentype.types.assign, 2);
+ return this.finishOp(_tokentype.types.slash, 1);
+};
+
+pp.readToken_mult_modulo = function (code) {
+ // '%*'
+ var type = code === 42 ? _tokentype.types.star : _tokentype.types.modulo;
+ var width = 1;
+ var next = this.input.charCodeAt(this.pos + 1);
+
+ if (next === 42) {
+ // '*'
+ width++;
+ next = this.input.charCodeAt(this.pos + 2);
+ type = _tokentype.types.exponent;
+ }
+
+ if (next === 61) {
+ width++;
+ type = _tokentype.types.assign;
+ }
+
+ return this.finishOp(type, width);
+};
+
+pp.readToken_pipe_amp = function (code) {
+ // '|&'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === code) return this.finishOp(code === 124 ? _tokentype.types.logicalOR : _tokentype.types.logicalAND, 2);
+ if (next === 61) return this.finishOp(_tokentype.types.assign, 2);
+ return this.finishOp(code === 124 ? _tokentype.types.bitwiseOR : _tokentype.types.bitwiseAND, 1);
+};
+
+pp.readToken_caret = function () {
+ // '^'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === 61) return this.finishOp(_tokentype.types.assign, 2);
+ return this.finishOp(_tokentype.types.bitwiseXOR, 1);
+};
+
+pp.readToken_plus_min = function (code) {
+ // '+-'
+ var next = this.input.charCodeAt(this.pos + 1);
+ if (next === code) {
+ if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) {
+ // A `-->` line comment
+ this.skipLineComment(3);
+ this.skipSpace();
+ return this.nextToken();
+ }
+ return this.finishOp(_tokentype.types.incDec, 2);
+ }
+ if (next === 61) return this.finishOp(_tokentype.types.assign, 2);
+ return this.finishOp(_tokentype.types.plusMin, 1);
+};
+
+pp.readToken_lt_gt = function (code) {
+ // '<>'
+ var next = this.input.charCodeAt(this.pos + 1);
+ var size = 1;
+ if (next === code) {
+ size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2;
+ if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(_tokentype.types.assign, size + 1);
+ return this.finishOp(_tokentype.types.bitShift, size);
+ }
+ if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && this.input.charCodeAt(this.pos + 3) == 45) {
+ if (this.inModule) this.unexpected();
+ // ` regexps
+ set = set.map(function (s, si, set) {
+ return s.map(this.parse, this)
+ }, this)
+
+ this.debug(this.pattern, set)
+
+ // filter out everything that didn't compile properly.
+ set = set.filter(function (s) {
+ return s.indexOf(false) === -1
+ })
+
+ this.debug(this.pattern, set)
+
+ this.set = set
+}
+
+Minimatch.prototype.parseNegate = parseNegate
+function parseNegate () {
+ var pattern = this.pattern
+ var negate = false
+ var options = this.options
+ var negateOffset = 0
+
+ if (options.nonegate) return
+
+ for (var i = 0, l = pattern.length
+ ; i < l && pattern.charAt(i) === '!'
+ ; i++) {
+ negate = !negate
+ negateOffset++
+ }
+
+ if (negateOffset) this.pattern = pattern.substr(negateOffset)
+ this.negate = negate
+}
+
+// Brace expansion:
+// a{b,c}d -> abd acd
+// a{b,}c -> abc ac
+// a{0..3}d -> a0d a1d a2d a3d
+// a{b,c{d,e}f}g -> abg acdfg acefg
+// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg
+//
+// Invalid sets are not expanded.
+// a{2..}b -> a{2..}b
+// a{b}c -> a{b}c
+minimatch.braceExpand = function (pattern, options) {
+ return braceExpand(pattern, options)
+}
+
+Minimatch.prototype.braceExpand = braceExpand
+
+function braceExpand (pattern, options) {
+ if (!options) {
+ if (this instanceof Minimatch) {
+ options = this.options
+ } else {
+ options = {}
+ }
+ }
+
+ pattern = typeof pattern === 'undefined'
+ ? this.pattern : pattern
+
+ if (typeof pattern === 'undefined') {
+ throw new Error('undefined pattern')
+ }
+
+ if (options.nobrace ||
+ !pattern.match(/\{.*\}/)) {
+ // shortcut. no need to expand.
+ return [pattern]
+ }
+
+ return expand(pattern)
+}
+
+// parse a component of the expanded set.
+// At this point, no pattern may contain "/" in it
+// so we're going to return a 2d array, where each entry is the full
+// pattern, split on '/', and then turned into a regular expression.
+// A regexp is made at the end which joins each array with an
+// escaped /, and another full one which joins each regexp with |.
+//
+// Following the lead of Bash 4.1, note that "**" only has special meaning
+// when it is the *only* thing in a path portion. Otherwise, any series
+// of * is equivalent to a single *. Globstar behavior is enabled by
+// default, and can be disabled by setting options.noglobstar.
+Minimatch.prototype.parse = parse
+var SUBPARSE = {}
+function parse (pattern, isSub) {
+ var options = this.options
+
+ // shortcuts
+ if (!options.noglobstar && pattern === '**') return GLOBSTAR
+ if (pattern === '') return ''
+
+ var re = ''
+ var hasMagic = !!options.nocase
+ var escaping = false
+ // ? => one single character
+ var patternListStack = []
+ var plType
+ var stateChar
+ var inClass = false
+ var reClassStart = -1
+ var classStart = -1
+ // . and .. never match anything that doesn't start with .,
+ // even when options.dot is set.
+ var patternStart = pattern.charAt(0) === '.' ? '' // anything
+ // not (start or / followed by . or .. followed by / or end)
+ : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))'
+ : '(?!\\.)'
+ var self = this
+
+ function clearStateChar () {
+ if (stateChar) {
+ // we had some state-tracking character
+ // that wasn't consumed by this pass.
+ switch (stateChar) {
+ case '*':
+ re += star
+ hasMagic = true
+ break
+ case '?':
+ re += qmark
+ hasMagic = true
+ break
+ default:
+ re += '\\' + stateChar
+ break
+ }
+ self.debug('clearStateChar %j %j', stateChar, re)
+ stateChar = false
+ }
+ }
+
+ for (var i = 0, len = pattern.length, c
+ ; (i < len) && (c = pattern.charAt(i))
+ ; i++) {
+ this.debug('%s\t%s %s %j', pattern, i, re, c)
+
+ // skip over any that are escaped.
+ if (escaping && reSpecials[c]) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ switch (c) {
+ case '/':
+ // completely not allowed, even escaped.
+ // Should already be path-split by now.
+ return false
+
+ case '\\':
+ clearStateChar()
+ escaping = true
+ continue
+
+ // the various stateChar values
+ // for the "extglob" stuff.
+ case '?':
+ case '*':
+ case '+':
+ case '@':
+ case '!':
+ this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c)
+
+ // all of those are literals inside a class, except that
+ // the glob [!a] means [^a] in regexp
+ if (inClass) {
+ this.debug(' in class')
+ if (c === '!' && i === classStart + 1) c = '^'
+ re += c
+ continue
+ }
+
+ // if we already have a stateChar, then it means
+ // that there was something like ** or +? in there.
+ // Handle the stateChar, then proceed with this one.
+ self.debug('call clearStateChar %j', stateChar)
+ clearStateChar()
+ stateChar = c
+ // if extglob is disabled, then +(asdf|foo) isn't a thing.
+ // just clear the statechar *now*, rather than even diving into
+ // the patternList stuff.
+ if (options.noext) clearStateChar()
+ continue
+
+ case '(':
+ if (inClass) {
+ re += '('
+ continue
+ }
+
+ if (!stateChar) {
+ re += '\\('
+ continue
+ }
+
+ plType = stateChar
+ patternListStack.push({ type: plType, start: i - 1, reStart: re.length })
+ // negation is (?:(?!js)[^/]*)
+ re += stateChar === '!' ? '(?:(?!' : '(?:'
+ this.debug('plType %j %j', stateChar, re)
+ stateChar = false
+ continue
+
+ case ')':
+ if (inClass || !patternListStack.length) {
+ re += '\\)'
+ continue
+ }
+
+ clearStateChar()
+ hasMagic = true
+ re += ')'
+ plType = patternListStack.pop().type
+ // negation is (?:(?!js)[^/]*)
+ // The others are (?:)
+ switch (plType) {
+ case '!':
+ re += '[^/]*?)'
+ break
+ case '?':
+ case '+':
+ case '*':
+ re += plType
+ break
+ case '@': break // the default anyway
+ }
+ continue
+
+ case '|':
+ if (inClass || !patternListStack.length || escaping) {
+ re += '\\|'
+ escaping = false
+ continue
+ }
+
+ clearStateChar()
+ re += '|'
+ continue
+
+ // these are mostly the same in regexp and glob
+ case '[':
+ // swallow any state-tracking char before the [
+ clearStateChar()
+
+ if (inClass) {
+ re += '\\' + c
+ continue
+ }
+
+ inClass = true
+ classStart = i
+ reClassStart = re.length
+ re += c
+ continue
+
+ case ']':
+ // a right bracket shall lose its special
+ // meaning and represent itself in
+ // a bracket expression if it occurs
+ // first in the list. -- POSIX.2 2.8.3.2
+ if (i === classStart + 1 || !inClass) {
+ re += '\\' + c
+ escaping = false
+ continue
+ }
+
+ // handle the case where we left a class open.
+ // "[z-a]" is valid, equivalent to "\[z-a\]"
+ if (inClass) {
+ // split where the last [ was, make sure we don't have
+ // an invalid re. if so, re-walk the contents of the
+ // would-be class to re-translate any characters that
+ // were passed through as-is
+ // TODO: It would probably be faster to determine this
+ // without a try/catch and a new RegExp, but it's tricky
+ // to do safely. For now, this is safe and works.
+ var cs = pattern.substring(classStart + 1, i)
+ try {
+ RegExp('[' + cs + ']')
+ } catch (er) {
+ // not a valid class!
+ var sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]'
+ hasMagic = hasMagic || sp[1]
+ inClass = false
+ continue
+ }
+ }
+
+ // finish up the class.
+ hasMagic = true
+ inClass = false
+ re += c
+ continue
+
+ default:
+ // swallow any state char that wasn't consumed
+ clearStateChar()
+
+ if (escaping) {
+ // no need
+ escaping = false
+ } else if (reSpecials[c]
+ && !(c === '^' && inClass)) {
+ re += '\\'
+ }
+
+ re += c
+
+ } // switch
+ } // for
+
+ // handle the case where we left a class open.
+ // "[abc" is valid, equivalent to "\[abc"
+ if (inClass) {
+ // split where the last [ was, and escape it
+ // this is a huge pita. We now have to re-walk
+ // the contents of the would-be class to re-translate
+ // any characters that were passed through as-is
+ cs = pattern.substr(classStart + 1)
+ sp = this.parse(cs, SUBPARSE)
+ re = re.substr(0, reClassStart) + '\\[' + sp[0]
+ hasMagic = hasMagic || sp[1]
+ }
+
+ // handle the case where we had a +( thing at the *end*
+ // of the pattern.
+ // each pattern list stack adds 3 chars, and we need to go through
+ // and escape any | chars that were passed through as-is for the regexp.
+ // Go through and escape them, taking care not to double-escape any
+ // | chars that were already escaped.
+ for (var pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
+ var tail = re.slice(pl.reStart + 3)
+ // maybe some even number of \, then maybe 1 \, followed by a |
+ tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) {
+ if (!$2) {
+ // the | isn't already escaped, so escape it.
+ $2 = '\\'
+ }
+
+ // need to escape all those slashes *again*, without escaping the
+ // one that we need for escaping the | character. As it works out,
+ // escaping an even number of slashes can be done by simply repeating
+ // it exactly after itself. That's why this trick works.
+ //
+ // I am sorry that you have to see this.
+ return $1 + $1 + $2 + '|'
+ })
+
+ this.debug('tail=%j\n %s', tail, tail)
+ var t = pl.type === '*' ? star
+ : pl.type === '?' ? qmark
+ : '\\' + pl.type
+
+ hasMagic = true
+ re = re.slice(0, pl.reStart) + t + '\\(' + tail
+ }
+
+ // handle trailing things that only matter at the very end.
+ clearStateChar()
+ if (escaping) {
+ // trailing \\
+ re += '\\\\'
+ }
+
+ // only need to apply the nodot start if the re starts with
+ // something that could conceivably capture a dot
+ var addPatternStart = false
+ switch (re.charAt(0)) {
+ case '.':
+ case '[':
+ case '(': addPatternStart = true
+ }
+
+ // if the re is not "" at this point, then we need to make sure
+ // it doesn't match against an empty path part.
+ // Otherwise a/* will match a/, which it should not.
+ if (re !== '' && hasMagic) re = '(?=.)' + re
+
+ if (addPatternStart) re = patternStart + re
+
+ // parsing just a piece of a larger pattern.
+ if (isSub === SUBPARSE) {
+ return [re, hasMagic]
+ }
+
+ // skip the regexp for non-magical patterns
+ // unescape anything in it, though, so that it'll be
+ // an exact match against a file etc.
+ if (!hasMagic) {
+ return globUnescape(pattern)
+ }
+
+ var flags = options.nocase ? 'i' : ''
+ var regExp = new RegExp('^' + re + '$', flags)
+
+ regExp._glob = pattern
+ regExp._src = re
+
+ return regExp
+}
+
+minimatch.makeRe = function (pattern, options) {
+ return new Minimatch(pattern, options || {}).makeRe()
+}
+
+Minimatch.prototype.makeRe = makeRe
+function makeRe () {
+ if (this.regexp || this.regexp === false) return this.regexp
+
+ // at this point, this.set is a 2d array of partial
+ // pattern strings, or "**".
+ //
+ // It's better to use .match(). This function shouldn't
+ // be used, really, but it's pretty convenient sometimes,
+ // when you just want to work with a regex.
+ var set = this.set
+
+ if (!set.length) {
+ this.regexp = false
+ return this.regexp
+ }
+ var options = this.options
+
+ var twoStar = options.noglobstar ? star
+ : options.dot ? twoStarDot
+ : twoStarNoDot
+ var flags = options.nocase ? 'i' : ''
+
+ var re = set.map(function (pattern) {
+ return pattern.map(function (p) {
+ return (p === GLOBSTAR) ? twoStar
+ : (typeof p === 'string') ? regExpEscape(p)
+ : p._src
+ }).join('\\\/')
+ }).join('|')
+
+ // must match entire pattern
+ // ending in a * or ** will make it less strict.
+ re = '^(?:' + re + ')$'
+
+ // can match anything, as long as it's not this.
+ if (this.negate) re = '^(?!' + re + ').*$'
+
+ try {
+ this.regexp = new RegExp(re, flags)
+ } catch (ex) {
+ this.regexp = false
+ }
+ return this.regexp
+}
+
+minimatch.match = function (list, pattern, options) {
+ options = options || {}
+ var mm = new Minimatch(pattern, options)
+ list = list.filter(function (f) {
+ return mm.match(f)
+ })
+ if (mm.options.nonull && !list.length) {
+ list.push(pattern)
+ }
+ return list
+}
+
+Minimatch.prototype.match = match
+function match (f, partial) {
+ this.debug('match', f, this.pattern)
+ // short-circuit in the case of busted things.
+ // comments, etc.
+ if (this.comment) return false
+ if (this.empty) return f === ''
+
+ if (f === '/' && partial) return true
+
+ var options = this.options
+
+ // windows: need to use /, not \
+ if (path.sep !== '/') {
+ f = f.split(path.sep).join('/')
+ }
+
+ // treat the test path as a set of pathparts.
+ f = f.split(slashSplit)
+ this.debug(this.pattern, 'split', f)
+
+ // just ONE of the pattern sets in this.set needs to match
+ // in order for it to be valid. If negating, then just one
+ // match means that we have failed.
+ // Either way, return on the first hit.
+
+ var set = this.set
+ this.debug(this.pattern, 'set', set)
+
+ // Find the basename of the path by looking for the last non-empty segment
+ var filename
+ var i
+ for (i = f.length - 1; i >= 0; i--) {
+ filename = f[i]
+ if (filename) break
+ }
+
+ for (i = 0; i < set.length; i++) {
+ var pattern = set[i]
+ var file = f
+ if (options.matchBase && pattern.length === 1) {
+ file = [filename]
+ }
+ var hit = this.matchOne(file, pattern, partial)
+ if (hit) {
+ if (options.flipNegate) return true
+ return !this.negate
+ }
+ }
+
+ // didn't get any hits. this is success if it's a negative
+ // pattern, failure otherwise.
+ if (options.flipNegate) return false
+ return this.negate
+}
+
+// set partial to true to test if, for example,
+// "/a/b" matches the start of "/*/b/*/d"
+// Partial means, if you run out of file before you run
+// out of pattern, then that's fine, as long as all
+// the parts match.
+Minimatch.prototype.matchOne = function (file, pattern, partial) {
+ var options = this.options
+
+ this.debug('matchOne',
+ { 'this': this, file: file, pattern: pattern })
+
+ this.debug('matchOne', file.length, pattern.length)
+
+ for (var fi = 0,
+ pi = 0,
+ fl = file.length,
+ pl = pattern.length
+ ; (fi < fl) && (pi < pl)
+ ; fi++, pi++) {
+ this.debug('matchOne loop')
+ var p = pattern[pi]
+ var f = file[fi]
+
+ this.debug(pattern, p, f)
+
+ // should be impossible.
+ // some invalid regexp stuff in the set.
+ if (p === false) return false
+
+ if (p === GLOBSTAR) {
+ this.debug('GLOBSTAR', [pattern, p, f])
+
+ // "**"
+ // a/**/b/**/c would match the following:
+ // a/b/x/y/z/c
+ // a/x/y/z/b/c
+ // a/b/x/b/x/c
+ // a/b/c
+ // To do this, take the rest of the pattern after
+ // the **, and see if it would match the file remainder.
+ // If so, return success.
+ // If not, the ** "swallows" a segment, and try again.
+ // This is recursively awful.
+ //
+ // a/**/b/**/c matching a/b/x/y/z/c
+ // - a matches a
+ // - doublestar
+ // - matchOne(b/x/y/z/c, b/**/c)
+ // - b matches b
+ // - doublestar
+ // - matchOne(x/y/z/c, c) -> no
+ // - matchOne(y/z/c, c) -> no
+ // - matchOne(z/c, c) -> no
+ // - matchOne(c, c) yes, hit
+ var fr = fi
+ var pr = pi + 1
+ if (pr === pl) {
+ this.debug('** at the end')
+ // a ** at the end will just swallow the rest.
+ // We have found a match.
+ // however, it will not swallow /.x, unless
+ // options.dot is set.
+ // . and .. are *never* matched by **, for explosively
+ // exponential reasons.
+ for (; fi < fl; fi++) {
+ if (file[fi] === '.' || file[fi] === '..' ||
+ (!options.dot && file[fi].charAt(0) === '.')) return false
+ }
+ return true
+ }
+
+ // ok, let's see if we can swallow whatever we can.
+ while (fr < fl) {
+ var swallowee = file[fr]
+
+ this.debug('\nglobstar while', file, fr, pattern, pr, swallowee)
+
+ // XXX remove this slice. Just pass the start index.
+ if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
+ this.debug('globstar found match!', fr, fl, swallowee)
+ // found a match.
+ return true
+ } else {
+ // can't swallow "." or ".." ever.
+ // can only swallow ".foo" when explicitly asked.
+ if (swallowee === '.' || swallowee === '..' ||
+ (!options.dot && swallowee.charAt(0) === '.')) {
+ this.debug('dot detected!', file, fr, pattern, pr)
+ break
+ }
+
+ // ** swallows a segment, and continue.
+ this.debug('globstar swallow a segment, and continue')
+ fr++
+ }
+ }
+
+ // no match was found.
+ // However, in partial mode, we can't say this is necessarily over.
+ // If there's more *pattern* left, then
+ if (partial) {
+ // ran out of file
+ this.debug('\n>>> no match, partial?', file, fr, pattern, pr)
+ if (fr === fl) return true
+ }
+ return false
+ }
+
+ // something other than **
+ // non-magic patterns just have to match exactly
+ // patterns with magic have been turned into regexps.
+ var hit
+ if (typeof p === 'string') {
+ if (options.nocase) {
+ hit = f.toLowerCase() === p.toLowerCase()
+ } else {
+ hit = f === p
+ }
+ this.debug('string match', p, f, hit)
+ } else {
+ hit = f.match(p)
+ this.debug('pattern match', p, f, hit)
+ }
+
+ if (!hit) return false
+ }
+
+ // Note: ending in / means that we'll get a final ""
+ // at the end of the pattern. This can only match a
+ // corresponding "" at the end of the file.
+ // If the file ends in /, then it can only match a
+ // a pattern that ends in /, unless the pattern just
+ // doesn't have any more for it. But, a/b/ should *not*
+ // match "a/b/*", even though "" matches against the
+ // [^/]*? pattern, except in partial mode, where it might
+ // simply not be reached yet.
+ // However, a/b/ should still satisfy a/*
+
+ // now either we fell off the end of the pattern, or we're done.
+ if (fi === fl && pi === pl) {
+ // ran out of pattern and filename at the same time.
+ // an exact hit!
+ return true
+ } else if (fi === fl) {
+ // ran out of file, but still had pattern left.
+ // this is ok if we're doing the match as part of
+ // a glob fs traversal.
+ return partial
+ } else if (pi === pl) {
+ // ran out of pattern, still have file left.
+ // this is only acceptable if we're on the very last
+ // empty segment of a file with a trailing slash.
+ // a/* should match a/b/
+ var emptyFileEnd = (fi === fl - 1) && (file[fi] === '')
+ return emptyFileEnd
+ }
+
+ // should be unreachable.
+ throw new Error('wtf?')
+}
+
+// replace stuff like \* with *
+function globUnescape (s) {
+ return s.replace(/\\(.)/g, '$1')
+}
+
+function regExpEscape (s) {
+ return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')
+}
+
+},{"brace-expansion":479,"path":222}],479:[function(require,module,exports){
+var concatMap = require('concat-map');
+var balanced = require('balanced-match');
+
+module.exports = expandTop;
+
+var escSlash = '\0SLASH'+Math.random()+'\0';
+var escOpen = '\0OPEN'+Math.random()+'\0';
+var escClose = '\0CLOSE'+Math.random()+'\0';
+var escComma = '\0COMMA'+Math.random()+'\0';
+var escPeriod = '\0PERIOD'+Math.random()+'\0';
+
+function numeric(str) {
+ return parseInt(str, 10) == str
+ ? parseInt(str, 10)
+ : str.charCodeAt(0);
+}
+
+function escapeBraces(str) {
+ return str.split('\\\\').join(escSlash)
+ .split('\\{').join(escOpen)
+ .split('\\}').join(escClose)
+ .split('\\,').join(escComma)
+ .split('\\.').join(escPeriod);
+}
+
+function unescapeBraces(str) {
+ return str.split(escSlash).join('\\')
+ .split(escOpen).join('{')
+ .split(escClose).join('}')
+ .split(escComma).join(',')
+ .split(escPeriod).join('.');
+}
+
+
+// Basically just str.split(","), but handling cases
+// where we have nested braced sections, which should be
+// treated as individual members, like {a,{b,c},d}
+function parseCommaParts(str) {
+ if (!str)
+ return [''];
+
+ var parts = [];
+ var m = balanced('{', '}', str);
+
+ if (!m)
+ return str.split(',');
+
+ var pre = m.pre;
+ var body = m.body;
+ var post = m.post;
+ var p = pre.split(',');
+
+ p[p.length-1] += '{' + body + '}';
+ var postParts = parseCommaParts(post);
+ if (post.length) {
+ p[p.length-1] += postParts.shift();
+ p.push.apply(p, postParts);
+ }
+
+ parts.push.apply(parts, p);
+
+ return parts;
+}
+
+function expandTop(str) {
+ if (!str)
+ return [];
+
+ return expand(escapeBraces(str), true).map(unescapeBraces);
+}
+
+function identity(e) {
+ return e;
+}
+
+function embrace(str) {
+ return '{' + str + '}';
+}
+function isPadded(el) {
+ return /^-?0\d/.test(el);
+}
+
+function lte(i, y) {
+ return i <= y;
+}
+function gte(i, y) {
+ return i >= y;
+}
+
+function expand(str, isTop) {
+ var expansions = [];
+
+ var m = balanced('{', '}', str);
+ if (!m || /\$$/.test(m.pre)) return [str];
+
+ var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
+ var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
+ var isSequence = isNumericSequence || isAlphaSequence;
+ var isOptions = /^(.*,)+(.+)?$/.test(m.body);
+ if (!isSequence && !isOptions) {
+ // {a},b}
+ if (m.post.match(/,.*}/)) {
+ str = m.pre + '{' + m.body + escClose + m.post;
+ return expand(str);
+ }
+ return [str];
+ }
+
+ var n;
+ if (isSequence) {
+ n = m.body.split(/\.\./);
+ } else {
+ n = parseCommaParts(m.body);
+ if (n.length === 1) {
+ // x{{a,b}}y ==> x{a}y x{b}y
+ n = expand(n[0], false).map(embrace);
+ if (n.length === 1) {
+ var post = m.post.length
+ ? expand(m.post, false)
+ : [''];
+ return post.map(function(p) {
+ return m.pre + n[0] + p;
+ });
+ }
+ }
+ }
+
+ // at this point, n is the parts, and we know it's not a comma set
+ // with a single entry.
+
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
+ var pre = m.pre;
+ var post = m.post.length
+ ? expand(m.post, false)
+ : [''];
+
+ var N;
+
+ if (isSequence) {
+ var x = numeric(n[0]);
+ var y = numeric(n[1]);
+ var width = Math.max(n[0].length, n[1].length)
+ var incr = n.length == 3
+ ? Math.abs(numeric(n[2]))
+ : 1;
+ var test = lte;
+ var reverse = y < x;
+ if (reverse) {
+ incr *= -1;
+ test = gte;
+ }
+ var pad = n.some(isPadded);
+
+ N = [];
+
+ for (var i = x; test(i, y); i += incr) {
+ var c;
+ if (isAlphaSequence) {
+ c = String.fromCharCode(i);
+ if (c === '\\')
+ c = '';
+ } else {
+ c = String(i);
+ if (pad) {
+ var need = width - c.length;
+ if (need > 0) {
+ var z = new Array(need + 1).join('0');
+ if (i < 0)
+ c = '-' + z + c.slice(1);
+ else
+ c = z + c;
+ }
+ }
+ }
+ N.push(c);
+ }
+ } else {
+ N = concatMap(n, function(el) { return expand(el, false) });
+ }
+
+ for (var j = 0; j < N.length; j++) {
+ for (var k = 0; k < post.length; k++) {
+ var expansion = pre + N[j] + post[k];
+ if (!isTop || isSequence || expansion)
+ expansions.push(expansion);
+ }
+ }
+
+ return expansions;
+}
+
+
+},{"balanced-match":480,"concat-map":481}],480:[function(require,module,exports){
+module.exports = balanced;
+function balanced(a, b, str) {
+ var bal = 0;
+ var m = {};
+ var ended = false;
+
+ for (var i = 0; i < str.length; i++) {
+ if (a == str.substr(i, a.length)) {
+ if (!('start' in m)) m.start = i;
+ bal++;
+ }
+ else if (b == str.substr(i, b.length) && 'start' in m) {
+ ended = true;
+ bal--;
+ if (!bal) {
+ m.end = i;
+ m.pre = str.substr(0, m.start);
+ m.body = (m.end - m.start > 1)
+ ? str.substring(m.start + a.length, m.end)
+ : '';
+ m.post = str.slice(m.end + b.length);
+ return m;
+ }
+ }
+ }
+
+ // if we opened more than we closed, find the one we closed
+ if (bal && ended) {
+ var start = m.start + a.length;
+ m = balanced(a, b, str.substr(start));
+ if (m) {
+ m.start += start;
+ m.end += start;
+ m.pre = str.slice(0, start) + m.pre;
+ }
+ return m;
+ }
+}
+
+},{}],481:[function(require,module,exports){
+module.exports = function (xs, fn) {
+ var res = [];
+ for (var i = 0; i < xs.length; i++) {
+ var x = fn(xs[i], i);
+ if (isArray(x)) res.push.apply(res, x);
+ else res.push(x);
+ }
+ return res;
+};
+
+var isArray = Array.isArray || function (xs) {
+ return Object.prototype.toString.call(xs) === '[object Array]';
+};
+
+},{}],482:[function(require,module,exports){
+'use strict';
+var fs = require('fs')
+
+module.exports = function (pth, cb) {
+ var fn = typeof fs.access === 'function' ? fs.access : fs.stat;
+
+ fn(pth, function (err) {
+ cb(null, !err);
+ });
+};
+
+module.exports.sync = function (pth) {
+ var fn = typeof fs.accessSync === 'function' ? fs.accessSync : fs.statSync;
+
+ try {
+ fn(pth);
+ return true;
+ } catch (err) {
+ return false;
+ }
+};
+
+},{"fs":212}],483:[function(require,module,exports){
+(function (process){
+'use strict';
+
+function posix(path) {
+ return path.charAt(0) === '/';
+};
+
+function win32(path) {
+ // https://github.com/joyent/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
+ var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
+ var result = splitDeviceRe.exec(path);
+ var device = result[1] || '';
+ var isUnc = !!device && device.charAt(1) !== ':';
+
+ // UNC paths are always absolute
+ return !!result[2] || isUnc;
+};
+
+module.exports = process.platform === 'win32' ? win32 : posix;
+module.exports.posix = posix;
+module.exports.win32 = win32;
+
+}).call(this,require('_process'))
+},{"_process":223}],484:[function(require,module,exports){
+"use strict";
+
+var originalObject = Object;
+var originalDefProp = Object.defineProperty;
+var originalCreate = Object.create;
+
+function defProp(obj, name, value) {
+ if (originalDefProp) try {
+ originalDefProp.call(originalObject, obj, name, { value: value });
+ } catch (definePropertyIsBrokenInIE8) {
+ obj[name] = value;
+ } else {
+ obj[name] = value;
+ }
+}
+
+// For functions that will be invoked using .call or .apply, we need to
+// define those methods on the function objects themselves, rather than
+// inheriting them from Function.prototype, so that a malicious or clumsy
+// third party cannot interfere with the functionality of this module by
+// redefining Function.prototype.call or .apply.
+function makeSafeToCall(fun) {
+ if (fun) {
+ defProp(fun, "call", fun.call);
+ defProp(fun, "apply", fun.apply);
+ }
+ return fun;
+}
+
+makeSafeToCall(originalDefProp);
+makeSafeToCall(originalCreate);
+
+var hasOwn = makeSafeToCall(Object.prototype.hasOwnProperty);
+var numToStr = makeSafeToCall(Number.prototype.toString);
+var strSlice = makeSafeToCall(String.prototype.slice);
+
+var cloner = function(){};
+function create(prototype) {
+ if (originalCreate) {
+ return originalCreate.call(originalObject, prototype);
+ }
+ cloner.prototype = prototype || null;
+ return new cloner;
+}
+
+var rand = Math.random;
+var uniqueKeys = create(null);
+
+function makeUniqueKey() {
+ // Collisions are highly unlikely, but this module is in the business of
+ // making guarantees rather than safe bets.
+ do var uniqueKey = internString(strSlice.call(numToStr.call(rand(), 36), 2));
+ while (hasOwn.call(uniqueKeys, uniqueKey));
+ return uniqueKeys[uniqueKey] = uniqueKey;
+}
+
+function internString(str) {
+ var obj = {};
+ obj[str] = true;
+ return Object.keys(obj)[0];
+}
+
+// External users might find this function useful, but it is not necessary
+// for the typical use of this module.
+defProp(exports, "makeUniqueKey", makeUniqueKey);
+
+// Object.getOwnPropertyNames is the only way to enumerate non-enumerable
+// properties, so if we wrap it to ignore our secret keys, there should be
+// no way (except guessing) to access those properties.
+var originalGetOPNs = Object.getOwnPropertyNames;
+Object.getOwnPropertyNames = function getOwnPropertyNames(object) {
+ for (var names = originalGetOPNs(object),
+ src = 0,
+ dst = 0,
+ len = names.length;
+ src < len;
+ ++src) {
+ if (!hasOwn.call(uniqueKeys, names[src])) {
+ if (src > dst) {
+ names[dst] = names[src];
+ }
+ ++dst;
+ }
+ }
+ names.length = dst;
+ return names;
+};
+
+function defaultCreatorFn(object) {
+ return create(null);
+}
+
+function makeAccessor(secretCreatorFn) {
+ var brand = makeUniqueKey();
+ var passkey = create(null);
+
+ secretCreatorFn = secretCreatorFn || defaultCreatorFn;
+
+ function register(object) {
+ var secret; // Created lazily.
+
+ function vault(key, forget) {
+ // Only code that has access to the passkey can retrieve (or forget)
+ // the secret object.
+ if (key === passkey) {
+ return forget
+ ? secret = null
+ : secret || (secret = secretCreatorFn(object));
+ }
+ }
+
+ defProp(object, brand, vault);
+ }
+
+ function accessor(object) {
+ if (!hasOwn.call(object, brand))
+ register(object);
+ return object[brand](passkey);
+ }
+
+ accessor.forget = function(object) {
+ if (hasOwn.call(object, brand))
+ object[brand](passkey, true);
+ };
+
+ return accessor;
+}
+
+defProp(exports, "makeAccessor", makeAccessor);
+
+},{}],485:[function(require,module,exports){
+/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+var assert = require("assert");
+var types = require("recast").types;
+var isArray = types.builtInTypes.array;
+var b = types.builders;
+var n = types.namedTypes;
+var leap = require("./leap");
+var meta = require("./meta");
+var util = require("./util");
+var runtimeProperty = util.runtimeProperty;
+var hasOwn = Object.prototype.hasOwnProperty;
+
+function Emitter(contextId) {
+ assert.ok(this instanceof Emitter);
+ n.Identifier.assert(contextId);
+
+ // Used to generate unique temporary names.
+ this.nextTempId = 0;
+
+ Object.defineProperties(this, {
+ // In order to make sure the context object does not collide with
+ // anything in the local scope, we might have to rename it, so we
+ // refer to it symbolically instead of just assuming that it will be
+ // called "context".
+ contextId: { value: contextId },
+
+ // An append-only list of Statements that grows each time this.emit is
+ // called.
+ listing: { value: [] },
+
+ // A sparse array whose keys correspond to locations in this.listing
+ // that have been marked as branch/jump targets.
+ marked: { value: [true] },
+
+ // The last location will be marked when this.getDispatchLoop is
+ // called.
+ finalLoc: { value: loc() },
+
+ // A list of all leap.TryEntry statements emitted.
+ tryEntries: { value: [] }
+ });
+
+ // The .leapManager property needs to be defined by a separate
+ // defineProperties call so that .finalLoc will be visible to the
+ // leap.LeapManager constructor.
+ Object.defineProperties(this, {
+ // Each time we evaluate the body of a loop, we tell this.leapManager
+ // to enter a nested loop context that determines the meaning of break
+ // and continue statements therein.
+ leapManager: { value: new leap.LeapManager(this) }
+ });
+}
+
+var Ep = Emitter.prototype;
+exports.Emitter = Emitter;
+
+// Offsets into this.listing that could be used as targets for branches or
+// jumps are represented as numeric Literal nodes. This representation has
+// the amazingly convenient benefit of allowing the exact value of the
+// location to be determined at any time, even after generating code that
+// refers to the location.
+function loc() {
+ return b.literal(-1);
+}
+
+// Sets the exact value of the given location to the offset of the next
+// Statement emitted.
+Ep.mark = function(loc) {
+ n.Literal.assert(loc);
+ var index = this.listing.length;
+ if (loc.value === -1) {
+ loc.value = index;
+ } else {
+ // Locations can be marked redundantly, but their values cannot change
+ // once set the first time.
+ assert.strictEqual(loc.value, index);
+ }
+ this.marked[index] = true;
+ return loc;
+};
+
+Ep.emit = function(node) {
+ if (n.Expression.check(node))
+ node = b.expressionStatement(node);
+ n.Statement.assert(node);
+ this.listing.push(node);
+};
+
+// Shorthand for emitting assignment statements. This will come in handy
+// for assignments to temporary variables.
+Ep.emitAssign = function(lhs, rhs) {
+ this.emit(this.assign(lhs, rhs));
+ return lhs;
+};
+
+// Shorthand for an assignment statement.
+Ep.assign = function(lhs, rhs) {
+ return b.expressionStatement(
+ b.assignmentExpression("=", lhs, rhs));
+};
+
+// Convenience function for generating expressions like context.next,
+// context.sent, and context.rval.
+Ep.contextProperty = function(name, computed) {
+ return b.memberExpression(
+ this.contextId,
+ computed ? b.literal(name) : b.identifier(name),
+ !!computed
+ );
+};
+
+// Shorthand for setting context.rval and jumping to `context.stop()`.
+Ep.stop = function(rval) {
+ if (rval) {
+ this.setReturnValue(rval);
+ }
+
+ this.jump(this.finalLoc);
+};
+
+Ep.setReturnValue = function(valuePath) {
+ n.Expression.assert(valuePath.value);
+
+ this.emitAssign(
+ this.contextProperty("rval"),
+ this.explodeExpression(valuePath)
+ );
+};
+
+Ep.clearPendingException = function(tryLoc, assignee) {
+ n.Literal.assert(tryLoc);
+
+ var catchCall = b.callExpression(
+ this.contextProperty("catch", true),
+ [tryLoc]
+ );
+
+ if (assignee) {
+ this.emitAssign(assignee, catchCall);
+ } else {
+ this.emit(catchCall);
+ }
+};
+
+// Emits code for an unconditional jump to the given location, even if the
+// exact value of the location is not yet known.
+Ep.jump = function(toLoc) {
+ this.emitAssign(this.contextProperty("next"), toLoc);
+ this.emit(b.breakStatement());
+};
+
+// Conditional jump.
+Ep.jumpIf = function(test, toLoc) {
+ n.Expression.assert(test);
+ n.Literal.assert(toLoc);
+
+ this.emit(b.ifStatement(
+ test,
+ b.blockStatement([
+ this.assign(this.contextProperty("next"), toLoc),
+ b.breakStatement()
+ ])
+ ));
+};
+
+// Conditional jump, with the condition negated.
+Ep.jumpIfNot = function(test, toLoc) {
+ n.Expression.assert(test);
+ n.Literal.assert(toLoc);
+
+ var negatedTest;
+ if (n.UnaryExpression.check(test) &&
+ test.operator === "!") {
+ // Avoid double negation.
+ negatedTest = test.argument;
+ } else {
+ negatedTest = b.unaryExpression("!", test);
+ }
+
+ this.emit(b.ifStatement(
+ negatedTest,
+ b.blockStatement([
+ this.assign(this.contextProperty("next"), toLoc),
+ b.breakStatement()
+ ])
+ ));
+};
+
+// Returns a unique MemberExpression that can be used to store and
+// retrieve temporary values. Since the object of the member expression is
+// the context object, which is presumed to coexist peacefully with all
+// other local variables, and since we just increment `nextTempId`
+// monotonically, uniqueness is assured.
+Ep.makeTempVar = function() {
+ return this.contextProperty("t" + this.nextTempId++);
+};
+
+Ep.getContextFunction = function(id) {
+ return b.functionExpression(
+ id || null/*Anonymous*/,
+ [this.contextId],
+ b.blockStatement([this.getDispatchLoop()]),
+ false, // Not a generator anymore!
+ false // Nor an expression.
+ );
+};
+
+// Turns this.listing into a loop of the form
+//
+// while (1) switch (context.next) {
+// case 0:
+// ...
+// case n:
+// return context.stop();
+// }
+//
+// Each marked location in this.listing will correspond to one generated
+// case statement.
+Ep.getDispatchLoop = function() {
+ var self = this;
+ var cases = [];
+ var current;
+
+ // If we encounter a break, continue, or return statement in a switch
+ // case, we can skip the rest of the statements until the next case.
+ var alreadyEnded = false;
+
+ self.listing.forEach(function(stmt, i) {
+ if (self.marked.hasOwnProperty(i)) {
+ cases.push(b.switchCase(
+ b.literal(i),
+ current = []));
+ alreadyEnded = false;
+ }
+
+ if (!alreadyEnded) {
+ current.push(stmt);
+ if (isSwitchCaseEnder(stmt))
+ alreadyEnded = true;
+ }
+ });
+
+ // Now that we know how many statements there will be in this.listing,
+ // we can finally resolve this.finalLoc.value.
+ this.finalLoc.value = this.listing.length;
+
+ cases.push(
+ b.switchCase(this.finalLoc, [
+ // Intentionally fall through to the "end" case...
+ ]),
+
+ // So that the runtime can jump to the final location without having
+ // to know its offset, we provide the "end" case as a synonym.
+ b.switchCase(b.literal("end"), [
+ // This will check/clear both context.thrown and context.rval.
+ b.returnStatement(
+ b.callExpression(this.contextProperty("stop"), [])
+ )
+ ])
+ );
+
+ return b.whileStatement(
+ b.literal(1),
+ b.switchStatement(
+ b.assignmentExpression(
+ "=",
+ this.contextProperty("prev"),
+ this.contextProperty("next")
+ ),
+ cases
+ )
+ );
+};
+
+// See comment above re: alreadyEnded.
+function isSwitchCaseEnder(stmt) {
+ return n.BreakStatement.check(stmt)
+ || n.ContinueStatement.check(stmt)
+ || n.ReturnStatement.check(stmt)
+ || n.ThrowStatement.check(stmt);
+}
+
+Ep.getTryLocsList = function() {
+ if (this.tryEntries.length === 0) {
+ // To avoid adding a needless [] to the majority of runtime.wrap
+ // argument lists, force the caller to handle this case specially.
+ return null;
+ }
+
+ var lastLocValue = 0;
+
+ return b.arrayExpression(
+ this.tryEntries.map(function(tryEntry) {
+ var thisLocValue = tryEntry.firstLoc.value;
+ assert.ok(thisLocValue >= lastLocValue, "try entries out of order");
+ lastLocValue = thisLocValue;
+
+ var ce = tryEntry.catchEntry;
+ var fe = tryEntry.finallyEntry;
+
+ var locs = [
+ tryEntry.firstLoc,
+ // The null here makes a hole in the array.
+ ce ? ce.firstLoc : null
+ ];
+
+ if (fe) {
+ locs[2] = fe.firstLoc;
+ locs[3] = fe.afterLoc;
+ }
+
+ return b.arrayExpression(locs);
+ })
+ );
+};
+
+// All side effects must be realized in order.
+
+// If any subexpression harbors a leap, all subexpressions must be
+// neutered of side effects.
+
+// No destructive modification of AST nodes.
+
+Ep.explode = function(path, ignoreResult) {
+ assert.ok(path instanceof types.NodePath);
+
+ var node = path.value;
+ var self = this;
+
+ n.Node.assert(node);
+
+ if (n.Statement.check(node))
+ return self.explodeStatement(path);
+
+ if (n.Expression.check(node))
+ return self.explodeExpression(path, ignoreResult);
+
+ if (n.Declaration.check(node))
+ throw getDeclError(node);
+
+ switch (node.type) {
+ case "Program":
+ return path.get("body").map(
+ self.explodeStatement,
+ self
+ );
+
+ case "VariableDeclarator":
+ throw getDeclError(node);
+
+ // These node types should be handled by their parent nodes
+ // (ObjectExpression, SwitchStatement, and TryStatement, respectively).
+ case "Property":
+ case "SwitchCase":
+ case "CatchClause":
+ throw new Error(
+ node.type + " nodes should be handled by their parents");
+
+ default:
+ throw new Error(
+ "unknown Node of type " +
+ JSON.stringify(node.type));
+ }
+};
+
+function getDeclError(node) {
+ return new Error(
+ "all declarations should have been transformed into " +
+ "assignments before the Exploder began its work: " +
+ JSON.stringify(node));
+}
+
+Ep.explodeStatement = function(path, labelId) {
+ assert.ok(path instanceof types.NodePath);
+
+ var stmt = path.value;
+ var self = this;
+
+ n.Statement.assert(stmt);
+
+ if (labelId) {
+ n.Identifier.assert(labelId);
+ } else {
+ labelId = null;
+ }
+
+ // Explode BlockStatement nodes even if they do not contain a yield,
+ // because we don't want or need the curly braces.
+ if (n.BlockStatement.check(stmt)) {
+ return path.get("body").each(
+ self.explodeStatement,
+ self
+ );
+ }
+
+ if (!meta.containsLeap(stmt)) {
+ // Technically we should be able to avoid emitting the statement
+ // altogether if !meta.hasSideEffects(stmt), but that leads to
+ // confusing generated code (for instance, `while (true) {}` just
+ // disappears) and is probably a more appropriate job for a dedicated
+ // dead code elimination pass.
+ self.emit(stmt);
+ return;
+ }
+
+ switch (stmt.type) {
+ case "ExpressionStatement":
+ self.explodeExpression(path.get("expression"), true);
+ break;
+
+ case "LabeledStatement":
+ var after = loc();
+
+ // Did you know you can break from any labeled block statement or
+ // control structure? Well, you can! Note: when a labeled loop is
+ // encountered, the leap.LabeledEntry created here will immediately
+ // enclose a leap.LoopEntry on the leap manager's stack, and both
+ // entries will have the same label. Though this works just fine, it
+ // may seem a bit redundant. In theory, we could check here to
+ // determine if stmt knows how to handle its own label; for example,
+ // stmt happens to be a WhileStatement and so we know it's going to
+ // establish its own LoopEntry when we explode it (below). Then this
+ // LabeledEntry would be unnecessary. Alternatively, we might be
+ // tempted not to pass stmt.label down into self.explodeStatement,
+ // because we've handled the label here, but that's a mistake because
+ // labeled loops may contain labeled continue statements, which is not
+ // something we can handle in this generic case. All in all, I think a
+ // little redundancy greatly simplifies the logic of this case, since
+ // it's clear that we handle all possible LabeledStatements correctly
+ // here, regardless of whether they interact with the leap manager
+ // themselves. Also remember that labels and break/continue-to-label
+ // statements are rare, and all of this logic happens at transform
+ // time, so it has no additional runtime cost.
+ self.leapManager.withEntry(
+ new leap.LabeledEntry(after, stmt.label),
+ function() {
+ self.explodeStatement(path.get("body"), stmt.label);
+ }
+ );
+
+ self.mark(after);
+
+ break;
+
+ case "WhileStatement":
+ var before = loc();
+ var after = loc();
+
+ self.mark(before);
+ self.jumpIfNot(self.explodeExpression(path.get("test")), after);
+ self.leapManager.withEntry(
+ new leap.LoopEntry(after, before, labelId),
+ function() { self.explodeStatement(path.get("body")); }
+ );
+ self.jump(before);
+ self.mark(after);
+
+ break;
+
+ case "DoWhileStatement":
+ var first = loc();
+ var test = loc();
+ var after = loc();
+
+ self.mark(first);
+ self.leapManager.withEntry(
+ new leap.LoopEntry(after, test, labelId),
+ function() { self.explode(path.get("body")); }
+ );
+ self.mark(test);
+ self.jumpIf(self.explodeExpression(path.get("test")), first);
+ self.mark(after);
+
+ break;
+
+ case "ForStatement":
+ var head = loc();
+ var update = loc();
+ var after = loc();
+
+ if (stmt.init) {
+ // We pass true here to indicate that if stmt.init is an expression
+ // then we do not care about its result.
+ self.explode(path.get("init"), true);
+ }
+
+ self.mark(head);
+
+ if (stmt.test) {
+ self.jumpIfNot(self.explodeExpression(path.get("test")), after);
+ } else {
+ // No test means continue unconditionally.
+ }
+
+ self.leapManager.withEntry(
+ new leap.LoopEntry(after, update, labelId),
+ function() { self.explodeStatement(path.get("body")); }
+ );
+
+ self.mark(update);
+
+ if (stmt.update) {
+ // We pass true here to indicate that if stmt.update is an
+ // expression then we do not care about its result.
+ self.explode(path.get("update"), true);
+ }
+
+ self.jump(head);
+
+ self.mark(after);
+
+ break;
+
+ case "ForInStatement":
+ var head = loc();
+ var after = loc();
+
+ var keyIterNextFn = self.makeTempVar();
+ self.emitAssign(
+ keyIterNextFn,
+ b.callExpression(
+ runtimeProperty("keys"),
+ [self.explodeExpression(path.get("right"))]
+ )
+ );
+
+ self.mark(head);
+
+ var keyInfoTmpVar = self.makeTempVar();
+ self.jumpIf(
+ b.memberExpression(
+ b.assignmentExpression(
+ "=",
+ keyInfoTmpVar,
+ b.callExpression(keyIterNextFn, [])
+ ),
+ b.identifier("done"),
+ false
+ ),
+ after
+ );
+
+ self.emitAssign(
+ stmt.left,
+ b.memberExpression(
+ keyInfoTmpVar,
+ b.identifier("value"),
+ false
+ )
+ );
+
+ self.leapManager.withEntry(
+ new leap.LoopEntry(after, head, labelId),
+ function() { self.explodeStatement(path.get("body")); }
+ );
+
+ self.jump(head);
+
+ self.mark(after);
+
+ break;
+
+ case "BreakStatement":
+ self.emitAbruptCompletion({
+ type: "break",
+ target: self.leapManager.getBreakLoc(stmt.label)
+ });
+
+ break;
+
+ case "ContinueStatement":
+ self.emitAbruptCompletion({
+ type: "continue",
+ target: self.leapManager.getContinueLoc(stmt.label)
+ });
+
+ break;
+
+ case "SwitchStatement":
+ // Always save the discriminant into a temporary variable in case the
+ // test expressions overwrite values like context.sent.
+ var disc = self.emitAssign(
+ self.makeTempVar(),
+ self.explodeExpression(path.get("discriminant"))
+ );
+
+ var after = loc();
+ var defaultLoc = loc();
+ var condition = defaultLoc;
+ var caseLocs = [];
+
+ // If there are no cases, .cases might be undefined.
+ var cases = stmt.cases || [];
+
+ for (var i = cases.length - 1; i >= 0; --i) {
+ var c = cases[i];
+ n.SwitchCase.assert(c);
+
+ if (c.test) {
+ condition = b.conditionalExpression(
+ b.binaryExpression("===", disc, c.test),
+ caseLocs[i] = loc(),
+ condition
+ );
+ } else {
+ caseLocs[i] = defaultLoc;
+ }
+ }
+
+ self.jump(self.explodeExpression(
+ new types.NodePath(condition, path, "discriminant")
+ ));
+
+ self.leapManager.withEntry(
+ new leap.SwitchEntry(after),
+ function() {
+ path.get("cases").each(function(casePath) {
+ var c = casePath.value;
+ var i = casePath.name;
+
+ self.mark(caseLocs[i]);
+
+ casePath.get("consequent").each(
+ self.explodeStatement,
+ self
+ );
+ });
+ }
+ );
+
+ self.mark(after);
+ if (defaultLoc.value === -1) {
+ self.mark(defaultLoc);
+ assert.strictEqual(after.value, defaultLoc.value);
+ }
+
+ break;
+
+ case "IfStatement":
+ var elseLoc = stmt.alternate && loc();
+ var after = loc();
+
+ self.jumpIfNot(
+ self.explodeExpression(path.get("test")),
+ elseLoc || after
+ );
+
+ self.explodeStatement(path.get("consequent"));
+
+ if (elseLoc) {
+ self.jump(after);
+ self.mark(elseLoc);
+ self.explodeStatement(path.get("alternate"));
+ }
+
+ self.mark(after);
+
+ break;
+
+ case "ReturnStatement":
+ self.emitAbruptCompletion({
+ type: "return",
+ value: self.explodeExpression(path.get("argument"))
+ });
+
+ break;
+
+ case "WithStatement":
+ throw new Error(
+ node.type + " not supported in generator functions.");
+
+ case "TryStatement":
+ var after = loc();
+
+ var handler = stmt.handler;
+ if (!handler && stmt.handlers) {
+ handler = stmt.handlers[0] || null;
+ }
+
+ var catchLoc = handler && loc();
+ var catchEntry = catchLoc && new leap.CatchEntry(
+ catchLoc,
+ handler.param
+ );
+
+ var finallyLoc = stmt.finalizer && loc();
+ var finallyEntry = finallyLoc &&
+ new leap.FinallyEntry(finallyLoc, after);
+
+ var tryEntry = new leap.TryEntry(
+ self.getUnmarkedCurrentLoc(),
+ catchEntry,
+ finallyEntry
+ );
+
+ self.tryEntries.push(tryEntry);
+ self.updateContextPrevLoc(tryEntry.firstLoc);
+
+ self.leapManager.withEntry(tryEntry, function() {
+ self.explodeStatement(path.get("block"));
+
+ if (catchLoc) {
+ if (finallyLoc) {
+ // If we have both a catch block and a finally block, then
+ // because we emit the catch block first, we need to jump over
+ // it to the finally block.
+ self.jump(finallyLoc);
+
+ } else {
+ // If there is no finally block, then we need to jump over the
+ // catch block to the fall-through location.
+ self.jump(after);
+ }
+
+ self.updateContextPrevLoc(self.mark(catchLoc));
+
+ var bodyPath = path.get("handler", "body");
+ var safeParam = self.makeTempVar();
+ self.clearPendingException(tryEntry.firstLoc, safeParam);
+
+ var catchScope = bodyPath.scope;
+ var catchParamName = handler.param.name;
+ n.CatchClause.assert(catchScope.node);
+ assert.strictEqual(catchScope.lookup(catchParamName), catchScope);
+
+ types.visit(bodyPath, {
+ visitIdentifier: function(path) {
+ if (util.isReference(path, catchParamName) &&
+ path.scope.lookup(catchParamName) === catchScope) {
+ return safeParam;
+ }
+
+ this.traverse(path);
+ },
+
+ visitFunction: function(path) {
+ if (path.scope.declares(catchParamName)) {
+ // Don't descend into nested scopes that shadow the catch
+ // parameter with their own declarations. This isn't
+ // logically necessary because of the path.scope.lookup we
+ // do in visitIdentifier, but it saves time.
+ return false;
+ }
+
+ this.traverse(path);
+ }
+ });
+
+ self.leapManager.withEntry(catchEntry, function() {
+ self.explodeStatement(bodyPath);
+ });
+ }
+
+ if (finallyLoc) {
+ self.updateContextPrevLoc(self.mark(finallyLoc));
+
+ self.leapManager.withEntry(finallyEntry, function() {
+ self.explodeStatement(path.get("finalizer"));
+ });
+
+ self.emit(b.returnStatement(b.callExpression(
+ self.contextProperty("finish"),
+ [finallyEntry.firstLoc]
+ )));
+ }
+ });
+
+ self.mark(after);
+
+ break;
+
+ case "ThrowStatement":
+ self.emit(b.throwStatement(
+ self.explodeExpression(path.get("argument"))
+ ));
+
+ break;
+
+ default:
+ throw new Error(
+ "unknown Statement of type " +
+ JSON.stringify(stmt.type));
+ }
+};
+
+Ep.emitAbruptCompletion = function(record) {
+ if (!isValidCompletion(record)) {
+ assert.ok(
+ false,
+ "invalid completion record: " +
+ JSON.stringify(record)
+ );
+ }
+
+ assert.notStrictEqual(
+ record.type, "normal",
+ "normal completions are not abrupt"
+ );
+
+ var abruptArgs = [b.literal(record.type)];
+
+ if (record.type === "break" ||
+ record.type === "continue") {
+ n.Literal.assert(record.target);
+ abruptArgs[1] = record.target;
+ } else if (record.type === "return" ||
+ record.type === "throw") {
+ if (record.value) {
+ n.Expression.assert(record.value);
+ abruptArgs[1] = record.value;
+ }
+ }
+
+ this.emit(
+ b.returnStatement(
+ b.callExpression(
+ this.contextProperty("abrupt"),
+ abruptArgs
+ )
+ )
+ );
+};
+
+function isValidCompletion(record) {
+ var type = record.type;
+
+ if (type === "normal") {
+ return !hasOwn.call(record, "target");
+ }
+
+ if (type === "break" ||
+ type === "continue") {
+ return !hasOwn.call(record, "value")
+ && n.Literal.check(record.target);
+ }
+
+ if (type === "return" ||
+ type === "throw") {
+ return hasOwn.call(record, "value")
+ && !hasOwn.call(record, "target");
+ }
+
+ return false;
+}
+
+
+// Not all offsets into emitter.listing are potential jump targets. For
+// example, execution typically falls into the beginning of a try block
+// without jumping directly there. This method returns the current offset
+// without marking it, so that a switch case will not necessarily be
+// generated for this offset (I say "not necessarily" because the same
+// location might end up being marked in the process of emitting other
+// statements). There's no logical harm in marking such locations as jump
+// targets, but minimizing the number of switch cases keeps the generated
+// code shorter.
+Ep.getUnmarkedCurrentLoc = function() {
+ return b.literal(this.listing.length);
+};
+
+// The context.prev property takes the value of context.next whenever we
+// evaluate the switch statement discriminant, which is generally good
+// enough for tracking the last location we jumped to, but sometimes
+// context.prev needs to be more precise, such as when we fall
+// successfully out of a try block and into a finally block without
+// jumping. This method exists to update context.prev to the freshest
+// available location. If we were implementing a full interpreter, we
+// would know the location of the current instruction with complete
+// precision at all times, but we don't have that luxury here, as it would
+// be costly and verbose to set context.prev before every statement.
+Ep.updateContextPrevLoc = function(loc) {
+ if (loc) {
+ n.Literal.assert(loc);
+
+ if (loc.value === -1) {
+ // If an uninitialized location literal was passed in, set its value
+ // to the current this.listing.length.
+ loc.value = this.listing.length;
+ } else {
+ // Otherwise assert that the location matches the current offset.
+ assert.strictEqual(loc.value, this.listing.length);
+ }
+
+ } else {
+ loc = this.getUnmarkedCurrentLoc();
+ }
+
+ // Make sure context.prev is up to date in case we fell into this try
+ // statement without jumping to it. TODO Consider avoiding this
+ // assignment when we know control must have jumped here.
+ this.emitAssign(this.contextProperty("prev"), loc);
+};
+
+Ep.explodeExpression = function(path, ignoreResult) {
+ assert.ok(path instanceof types.NodePath);
+
+ var expr = path.value;
+ if (expr) {
+ n.Expression.assert(expr);
+ } else {
+ return expr;
+ }
+
+ var self = this;
+ var result; // Used optionally by several cases below.
+
+ function finish(expr) {
+ n.Expression.assert(expr);
+ if (ignoreResult) {
+ self.emit(expr);
+ } else {
+ return expr;
+ }
+ }
+
+ // If the expression does not contain a leap, then we either emit the
+ // expression as a standalone statement or return it whole.
+ if (!meta.containsLeap(expr)) {
+ return finish(expr);
+ }
+
+ // If any child contains a leap (such as a yield or labeled continue or
+ // break statement), then any sibling subexpressions will almost
+ // certainly have to be exploded in order to maintain the order of their
+ // side effects relative to the leaping child(ren).
+ var hasLeapingChildren = meta.containsLeap.onlyChildren(expr);
+
+ // In order to save the rest of explodeExpression from a combinatorial
+ // trainwreck of special cases, explodeViaTempVar is responsible for
+ // deciding when a subexpression needs to be "exploded," which is my
+ // very technical term for emitting the subexpression as an assignment
+ // to a temporary variable and the substituting the temporary variable
+ // for the original subexpression. Think of exploded view diagrams, not
+ // Michael Bay movies. The point of exploding subexpressions is to
+ // control the precise order in which the generated code realizes the
+ // side effects of those subexpressions.
+ function explodeViaTempVar(tempVar, childPath, ignoreChildResult) {
+ assert.ok(childPath instanceof types.NodePath);
+
+ assert.ok(
+ !ignoreChildResult || !tempVar,
+ "Ignoring the result of a child expression but forcing it to " +
+ "be assigned to a temporary variable?"
+ );
+
+ var result = self.explodeExpression(childPath, ignoreChildResult);
+
+ if (ignoreChildResult) {
+ // Side effects already emitted above.
+
+ } else if (tempVar || (hasLeapingChildren &&
+ !n.Literal.check(result))) {
+ // If tempVar was provided, then the result will always be assigned
+ // to it, even if the result does not otherwise need to be assigned
+ // to a temporary variable. When no tempVar is provided, we have
+ // the flexibility to decide whether a temporary variable is really
+ // necessary. Unfortunately, in general, a temporary variable is
+ // required whenever any child contains a yield expression, since it
+ // is difficult to prove (at all, let alone efficiently) whether
+ // this result would evaluate to the same value before and after the
+ // yield (see #206). One narrow case where we can prove it doesn't
+ // matter (and thus we do not need a temporary variable) is when the
+ // result in question is a Literal value.
+ result = self.emitAssign(
+ tempVar || self.makeTempVar(),
+ result
+ );
+ }
+ return result;
+ }
+
+ // If ignoreResult is true, then we must take full responsibility for
+ // emitting the expression with all its side effects, and we should not
+ // return a result.
+
+ switch (expr.type) {
+ case "MemberExpression":
+ return finish(b.memberExpression(
+ self.explodeExpression(path.get("object")),
+ expr.computed
+ ? explodeViaTempVar(null, path.get("property"))
+ : expr.property,
+ expr.computed
+ ));
+
+ case "CallExpression":
+ var calleePath = path.get("callee");
+ var argsPath = path.get("arguments");
+
+ var newCallee;
+ var newArgs = [];
+
+ var hasLeapingArgs = false;
+ argsPath.each(function(argPath) {
+ hasLeapingArgs = hasLeapingArgs ||
+ meta.containsLeap(argPath.value);
+ });
+
+ if (n.MemberExpression.check(calleePath.value)) {
+ if (hasLeapingArgs) {
+ // If the arguments of the CallExpression contained any yield
+ // expressions, then we need to be sure to evaluate the callee
+ // before evaluating the arguments, but if the callee was a member
+ // expression, then we must be careful that the object of the
+ // member expression still gets bound to `this` for the call.
+
+ var newObject = explodeViaTempVar(
+ // Assign the exploded callee.object expression to a temporary
+ // variable so that we can use it twice without reevaluating it.
+ self.makeTempVar(),
+ calleePath.get("object")
+ );
+
+ var newProperty = calleePath.value.computed
+ ? explodeViaTempVar(null, calleePath.get("property"))
+ : calleePath.value.property;
+
+ newArgs.unshift(newObject);
+
+ newCallee = b.memberExpression(
+ b.memberExpression(
+ newObject,
+ newProperty,
+ calleePath.value.computed
+ ),
+ b.identifier("call"),
+ false
+ );
+
+ } else {
+ newCallee = self.explodeExpression(calleePath);
+ }
+
+ } else {
+ newCallee = self.explodeExpression(calleePath);
+
+ if (n.MemberExpression.check(newCallee)) {
+ // If the callee was not previously a MemberExpression, then the
+ // CallExpression was "unqualified," meaning its `this` object
+ // should be the global object. If the exploded expression has
+ // become a MemberExpression (e.g. a context property, probably a
+ // temporary variable), then we need to force it to be unqualified
+ // by using the (0, object.property)(...) trick; otherwise, it
+ // will receive the object of the MemberExpression as its `this`
+ // object.
+ newCallee = b.sequenceExpression([
+ b.literal(0),
+ newCallee
+ ]);
+ }
+ }
+
+ argsPath.each(function(argPath) {
+ newArgs.push(explodeViaTempVar(null, argPath));
+ });
+
+ return finish(b.callExpression(
+ newCallee,
+ newArgs
+ ));
+
+ case "NewExpression":
+ return finish(b.newExpression(
+ explodeViaTempVar(null, path.get("callee")),
+ path.get("arguments").map(function(argPath) {
+ return explodeViaTempVar(null, argPath);
+ })
+ ));
+
+ case "ObjectExpression":
+ return finish(b.objectExpression(
+ path.get("properties").map(function(propPath) {
+ return b.property(
+ propPath.value.kind,
+ propPath.value.key,
+ explodeViaTempVar(null, propPath.get("value"))
+ );
+ })
+ ));
+
+ case "ArrayExpression":
+ return finish(b.arrayExpression(
+ path.get("elements").map(function(elemPath) {
+ return explodeViaTempVar(null, elemPath);
+ })
+ ));
+
+ case "SequenceExpression":
+ var lastIndex = expr.expressions.length - 1;
+
+ path.get("expressions").each(function(exprPath) {
+ if (exprPath.name === lastIndex) {
+ result = self.explodeExpression(exprPath, ignoreResult);
+ } else {
+ self.explodeExpression(exprPath, true);
+ }
+ });
+
+ return result;
+
+ case "LogicalExpression":
+ var after = loc();
+
+ if (!ignoreResult) {
+ result = self.makeTempVar();
+ }
+
+ var left = explodeViaTempVar(result, path.get("left"));
+
+ if (expr.operator === "&&") {
+ self.jumpIfNot(left, after);
+ } else {
+ assert.strictEqual(expr.operator, "||");
+ self.jumpIf(left, after);
+ }
+
+ explodeViaTempVar(result, path.get("right"), ignoreResult);
+
+ self.mark(after);
+
+ return result;
+
+ case "ConditionalExpression":
+ var elseLoc = loc();
+ var after = loc();
+ var test = self.explodeExpression(path.get("test"));
+
+ self.jumpIfNot(test, elseLoc);
+
+ if (!ignoreResult) {
+ result = self.makeTempVar();
+ }
+
+ explodeViaTempVar(result, path.get("consequent"), ignoreResult);
+ self.jump(after);
+
+ self.mark(elseLoc);
+ explodeViaTempVar(result, path.get("alternate"), ignoreResult);
+
+ self.mark(after);
+
+ return result;
+
+ case "UnaryExpression":
+ return finish(b.unaryExpression(
+ expr.operator,
+ // Can't (and don't need to) break up the syntax of the argument.
+ // Think about delete a[b].
+ self.explodeExpression(path.get("argument")),
+ !!expr.prefix
+ ));
+
+ case "BinaryExpression":
+ return finish(b.binaryExpression(
+ expr.operator,
+ explodeViaTempVar(null, path.get("left")),
+ explodeViaTempVar(null, path.get("right"))
+ ));
+
+ case "AssignmentExpression":
+ return finish(b.assignmentExpression(
+ expr.operator,
+ self.explodeExpression(path.get("left")),
+ self.explodeExpression(path.get("right"))
+ ));
+
+ case "UpdateExpression":
+ return finish(b.updateExpression(
+ expr.operator,
+ self.explodeExpression(path.get("argument")),
+ expr.prefix
+ ));
+
+ case "YieldExpression":
+ var after = loc();
+ var arg = expr.argument && self.explodeExpression(path.get("argument"));
+
+ if (arg && expr.delegate) {
+ var result = self.makeTempVar();
+
+ self.emit(b.returnStatement(b.callExpression(
+ self.contextProperty("delegateYield"), [
+ arg,
+ b.literal(result.property.name),
+ after
+ ]
+ )));
+
+ self.mark(after);
+
+ return result;
+ }
+
+ self.emitAssign(self.contextProperty("next"), after);
+ self.emit(b.returnStatement(arg || null));
+ self.mark(after);
+
+ return self.contextProperty("sent");
+
+ default:
+ throw new Error(
+ "unknown Expression of type " +
+ JSON.stringify(expr.type));
+ }
+};
+
+},{"./leap":487,"./meta":488,"./util":489,"assert":213,"recast":516}],486:[function(require,module,exports){
+/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+var assert = require("assert");
+var types = require("recast").types;
+var n = types.namedTypes;
+var b = types.builders;
+var hasOwn = Object.prototype.hasOwnProperty;
+
+// The hoist function takes a FunctionExpression or FunctionDeclaration
+// and replaces any Declaration nodes in its body with assignments, then
+// returns a VariableDeclaration containing just the names of the removed
+// declarations.
+exports.hoist = function(funPath) {
+ assert.ok(funPath instanceof types.NodePath);
+ n.Function.assert(funPath.value);
+
+ var vars = {};
+
+ function varDeclToExpr(vdec, includeIdentifiers) {
+ n.VariableDeclaration.assert(vdec);
+ var exprs = [];
+
+ vdec.declarations.forEach(function(dec) {
+ vars[dec.id.name] = dec.id;
+
+ if (dec.init) {
+ exprs.push(b.assignmentExpression(
+ "=", dec.id, dec.init
+ ));
+ } else if (includeIdentifiers) {
+ exprs.push(dec.id);
+ }
+ });
+
+ if (exprs.length === 0)
+ return null;
+
+ if (exprs.length === 1)
+ return exprs[0];
+
+ return b.sequenceExpression(exprs);
+ }
+
+ types.visit(funPath.get("body"), {
+ visitVariableDeclaration: function(path) {
+ var expr = varDeclToExpr(path.value, false);
+ if (expr === null) {
+ path.replace();
+ } else {
+ // We don't need to traverse this expression any further because
+ // there can't be any new declarations inside an expression.
+ return b.expressionStatement(expr);
+ }
+
+ // Since the original node has been either removed or replaced,
+ // avoid traversing it any further.
+ return false;
+ },
+
+ visitForStatement: function(path) {
+ var init = path.value.init;
+ if (n.VariableDeclaration.check(init)) {
+ path.get("init").replace(varDeclToExpr(init, false));
+ }
+ this.traverse(path);
+ },
+
+ visitForInStatement: function(path) {
+ var left = path.value.left;
+ if (n.VariableDeclaration.check(left)) {
+ path.get("left").replace(varDeclToExpr(left, true));
+ }
+ this.traverse(path);
+ },
+
+ visitFunctionDeclaration: function(path) {
+ var node = path.value;
+ vars[node.id.name] = node.id;
+
+ var parentNode = path.parent.node;
+ var assignment = b.expressionStatement(
+ b.assignmentExpression(
+ "=",
+ node.id,
+ b.functionExpression(
+ node.id,
+ node.params,
+ node.body,
+ node.generator,
+ node.expression
+ )
+ )
+ );
+
+ if (n.BlockStatement.check(path.parent.node)) {
+ // Insert the assignment form before the first statement in the
+ // enclosing block.
+ path.parent.get("body").unshift(assignment);
+
+ // Remove the function declaration now that we've inserted the
+ // equivalent assignment form at the beginning of the block.
+ path.replace();
+
+ } else {
+ // If the parent node is not a block statement, then we can just
+ // replace the declaration with the equivalent assignment form
+ // without worrying about hoisting it.
+ path.replace(assignment);
+ }
+
+ // Don't hoist variables out of inner functions.
+ return false;
+ },
+
+ visitFunctionExpression: function(path) {
+ // Don't descend into nested function expressions.
+ return false;
+ }
+ });
+
+ var paramNames = {};
+ funPath.get("params").each(function(paramPath) {
+ var param = paramPath.value;
+ if (n.Identifier.check(param)) {
+ paramNames[param.name] = param;
+ } else {
+ // Variables declared by destructuring parameter patterns will be
+ // harmlessly re-declared.
+ }
+ });
+
+ var declarations = [];
+
+ Object.keys(vars).forEach(function(name) {
+ if (!hasOwn.call(paramNames, name)) {
+ declarations.push(b.variableDeclarator(vars[name], null));
+ }
+ });
+
+ if (declarations.length === 0) {
+ return null; // Be sure to handle this case!
+ }
+
+ return b.variableDeclaration("var", declarations);
+};
+
+},{"assert":213,"recast":516}],487:[function(require,module,exports){
+/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+var assert = require("assert");
+var types = require("recast").types;
+var n = types.namedTypes;
+var b = types.builders;
+var inherits = require("util").inherits;
+var hasOwn = Object.prototype.hasOwnProperty;
+
+function Entry() {
+ assert.ok(this instanceof Entry);
+}
+
+function FunctionEntry(returnLoc) {
+ Entry.call(this);
+ n.Literal.assert(returnLoc);
+ this.returnLoc = returnLoc;
+}
+
+inherits(FunctionEntry, Entry);
+exports.FunctionEntry = FunctionEntry;
+
+function LoopEntry(breakLoc, continueLoc, label) {
+ Entry.call(this);
+
+ n.Literal.assert(breakLoc);
+ n.Literal.assert(continueLoc);
+
+ if (label) {
+ n.Identifier.assert(label);
+ } else {
+ label = null;
+ }
+
+ this.breakLoc = breakLoc;
+ this.continueLoc = continueLoc;
+ this.label = label;
+}
+
+inherits(LoopEntry, Entry);
+exports.LoopEntry = LoopEntry;
+
+function SwitchEntry(breakLoc) {
+ Entry.call(this);
+ n.Literal.assert(breakLoc);
+ this.breakLoc = breakLoc;
+}
+
+inherits(SwitchEntry, Entry);
+exports.SwitchEntry = SwitchEntry;
+
+function TryEntry(firstLoc, catchEntry, finallyEntry) {
+ Entry.call(this);
+
+ n.Literal.assert(firstLoc);
+
+ if (catchEntry) {
+ assert.ok(catchEntry instanceof CatchEntry);
+ } else {
+ catchEntry = null;
+ }
+
+ if (finallyEntry) {
+ assert.ok(finallyEntry instanceof FinallyEntry);
+ } else {
+ finallyEntry = null;
+ }
+
+ // Have to have one or the other (or both).
+ assert.ok(catchEntry || finallyEntry);
+
+ this.firstLoc = firstLoc;
+ this.catchEntry = catchEntry;
+ this.finallyEntry = finallyEntry;
+}
+
+inherits(TryEntry, Entry);
+exports.TryEntry = TryEntry;
+
+function CatchEntry(firstLoc, paramId) {
+ Entry.call(this);
+
+ n.Literal.assert(firstLoc);
+ n.Identifier.assert(paramId);
+
+ this.firstLoc = firstLoc;
+ this.paramId = paramId;
+}
+
+inherits(CatchEntry, Entry);
+exports.CatchEntry = CatchEntry;
+
+function FinallyEntry(firstLoc, afterLoc) {
+ Entry.call(this);
+ n.Literal.assert(firstLoc);
+ n.Literal.assert(afterLoc);
+ this.firstLoc = firstLoc;
+ this.afterLoc = afterLoc;
+}
+
+inherits(FinallyEntry, Entry);
+exports.FinallyEntry = FinallyEntry;
+
+function LabeledEntry(breakLoc, label) {
+ Entry.call(this);
+
+ n.Literal.assert(breakLoc);
+ n.Identifier.assert(label);
+
+ this.breakLoc = breakLoc;
+ this.label = label;
+}
+
+inherits(LabeledEntry, Entry);
+exports.LabeledEntry = LabeledEntry;
+
+function LeapManager(emitter) {
+ assert.ok(this instanceof LeapManager);
+
+ var Emitter = require("./emit").Emitter;
+ assert.ok(emitter instanceof Emitter);
+
+ this.emitter = emitter;
+ this.entryStack = [new FunctionEntry(emitter.finalLoc)];
+}
+
+var LMp = LeapManager.prototype;
+exports.LeapManager = LeapManager;
+
+LMp.withEntry = function(entry, callback) {
+ assert.ok(entry instanceof Entry);
+ this.entryStack.push(entry);
+ try {
+ callback.call(this.emitter);
+ } finally {
+ var popped = this.entryStack.pop();
+ assert.strictEqual(popped, entry);
+ }
+};
+
+LMp._findLeapLocation = function(property, label) {
+ for (var i = this.entryStack.length - 1; i >= 0; --i) {
+ var entry = this.entryStack[i];
+ var loc = entry[property];
+ if (loc) {
+ if (label) {
+ if (entry.label &&
+ entry.label.name === label.name) {
+ return loc;
+ }
+ } else if (entry instanceof LabeledEntry) {
+ // Ignore LabeledEntry entries unless we are actually breaking to
+ // a label.
+ } else {
+ return loc;
+ }
+ }
+ }
+
+ return null;
+};
+
+LMp.getBreakLoc = function(label) {
+ return this._findLeapLocation("breakLoc", label);
+};
+
+LMp.getContinueLoc = function(label) {
+ return this._findLeapLocation("continueLoc", label);
+};
+
+},{"./emit":485,"assert":213,"recast":516,"util":239}],488:[function(require,module,exports){
+/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+var assert = require("assert");
+var m = require("private").makeAccessor();
+var types = require("recast").types;
+var isArray = types.builtInTypes.array;
+var n = types.namedTypes;
+var hasOwn = Object.prototype.hasOwnProperty;
+
+function makePredicate(propertyName, knownTypes) {
+ function onlyChildren(node) {
+ n.Node.assert(node);
+
+ // Assume no side effects until we find out otherwise.
+ var result = false;
+
+ function check(child) {
+ if (result) {
+ // Do nothing.
+ } else if (isArray.check(child)) {
+ child.some(check);
+ } else if (n.Node.check(child)) {
+ assert.strictEqual(result, false);
+ result = predicate(child);
+ }
+ return result;
+ }
+
+ types.eachField(node, function(name, child) {
+ check(child);
+ });
+
+ return result;
+ }
+
+ function predicate(node) {
+ n.Node.assert(node);
+
+ var meta = m(node);
+ if (hasOwn.call(meta, propertyName))
+ return meta[propertyName];
+
+ // Certain types are "opaque," which means they have no side
+ // effects or leaps and we don't care about their subexpressions.
+ if (hasOwn.call(opaqueTypes, node.type))
+ return meta[propertyName] = false;
+
+ if (hasOwn.call(knownTypes, node.type))
+ return meta[propertyName] = true;
+
+ return meta[propertyName] = onlyChildren(node);
+ }
+
+ predicate.onlyChildren = onlyChildren;
+
+ return predicate;
+}
+
+var opaqueTypes = {
+ FunctionExpression: true
+};
+
+// These types potentially have side effects regardless of what side
+// effects their subexpressions have.
+var sideEffectTypes = {
+ CallExpression: true, // Anything could happen!
+ ForInStatement: true, // Modifies the key variable.
+ UnaryExpression: true, // Think delete.
+ BinaryExpression: true, // Might invoke .toString() or .valueOf().
+ AssignmentExpression: true, // Side-effecting by definition.
+ UpdateExpression: true, // Updates are essentially assignments.
+ NewExpression: true // Similar to CallExpression.
+};
+
+// These types are the direct cause of all leaps in control flow.
+var leapTypes = {
+ YieldExpression: true,
+ BreakStatement: true,
+ ContinueStatement: true,
+ ReturnStatement: true,
+ ThrowStatement: true
+};
+
+// All leap types are also side effect types.
+for (var type in leapTypes) {
+ if (hasOwn.call(leapTypes, type)) {
+ sideEffectTypes[type] = leapTypes[type];
+ }
+}
+
+exports.hasSideEffects = makePredicate("hasSideEffects", sideEffectTypes);
+exports.containsLeap = makePredicate("containsLeap", leapTypes);
+
+},{"assert":213,"private":484,"recast":516}],489:[function(require,module,exports){
+/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+var assert = require("assert");
+var types = require("recast").types;
+var n = types.namedTypes;
+var b = types.builders;
+var hasOwn = Object.prototype.hasOwnProperty;
+
+exports.defaults = function(obj) {
+ var len = arguments.length;
+ var extension;
+
+ for (var i = 1; i < len; ++i) {
+ if ((extension = arguments[i])) {
+ for (var key in extension) {
+ if (hasOwn.call(extension, key) && !hasOwn.call(obj, key)) {
+ obj[key] = extension[key];
+ }
+ }
+ }
+ }
+
+ return obj;
+};
+
+exports.runtimeProperty = function(name) {
+ return b.memberExpression(
+ b.identifier("regeneratorRuntime"),
+ b.identifier(name),
+ false
+ );
+};
+
+// Inspired by the isReference function from ast-util:
+// https://github.com/eventualbuddha/ast-util/blob/9bf91c5ce8/lib/index.js#L466-L506
+exports.isReference = function(path, name) {
+ var node = path.value;
+
+ if (!n.Identifier.check(node)) {
+ return false;
+ }
+
+ if (name && node.name !== name) {
+ return false;
+ }
+
+ var parent = path.parent.value;
+
+ switch (parent.type) {
+ case "VariableDeclarator":
+ return path.name === "init";
+
+ case "MemberExpression":
+ return path.name === "object" || (
+ parent.computed && path.name === "property"
+ );
+
+ case "FunctionExpression":
+ case "FunctionDeclaration":
+ case "ArrowFunctionExpression":
+ if (path.name === "id") {
+ return false;
+ }
+
+ if (path.parentPath.name === "params" &&
+ parent.params === path.parentPath.value &&
+ parent.params[path.name] === node) {
+ return false;
+ }
+
+ return true;
+
+ case "ClassDeclaration":
+ case "ClassExpression":
+ return path.name !== "id";
+
+ case "CatchClause":
+ return path.name !== "param";
+
+ case "Property":
+ case "MethodDefinition":
+ return path.name !== "key";
+
+ case "ImportSpecifier":
+ case "ImportDefaultSpecifier":
+ case "ImportNamespaceSpecifier":
+ case "LabeledStatement":
+ return false;
+
+ default:
+ return true;
+ }
+};
+
+},{"assert":213,"recast":516}],490:[function(require,module,exports){
+/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+var assert = require("assert");
+var fs = require("fs");
+var recast = require("recast");
+var types = recast.types;
+var n = types.namedTypes;
+var b = types.builders;
+var isArray = types.builtInTypes.array;
+var isObject = types.builtInTypes.object;
+var NodePath = types.NodePath;
+var hoist = require("./hoist").hoist;
+var Emitter = require("./emit").Emitter;
+var util = require("./util");
+var runtimeProperty = util.runtimeProperty;
+var getMarkInfo = require("private").makeAccessor();
+
+exports.transform = function transform(node, options) {
+ options = options || {};
+
+ var path = node instanceof NodePath ? node : new NodePath(node);
+ visitor.visit(path, options);
+ node = path.value;
+
+ if (options.includeRuntime === true ||
+ (options.includeRuntime === 'if used' && visitor.wasChangeReported())) {
+ injectRuntime(n.File.check(node) ? node.program : node);
+ }
+
+ options.madeChanges = visitor.wasChangeReported();
+
+ return node;
+};
+
+function injectRuntime(program) {
+ n.Program.assert(program);
+
+ // Include the runtime by modifying the AST rather than by concatenating
+ // strings. This technique will allow for more accurate source mapping.
+ var runtimePath = require("..").runtime.path;
+ var runtime = fs.readFileSync(runtimePath, "utf8");
+ var runtimeBody = recast.parse(runtime, {
+ sourceFileName: runtimePath
+ }).program.body;
+
+ var body = program.body;
+ body.unshift.apply(body, runtimeBody);
+}
+
+var visitor = types.PathVisitor.fromMethodsObject({
+ reset: function(node, options) {
+ this.options = options;
+ },
+
+ visitFunction: function(path) {
+ // Calling this.traverse(path) first makes for a post-order traversal.
+ this.traverse(path);
+
+ var node = path.value;
+ var shouldTransformAsync = node.async && !this.options.disableAsync;
+
+ if (!node.generator && !shouldTransformAsync) {
+ return;
+ }
+
+ this.reportChanged();
+
+ if (node.expression) {
+ // Transform expression lambdas into normal functions.
+ node.expression = false;
+ node.body = b.blockStatement([
+ b.returnStatement(node.body)
+ ]);
+ }
+
+ if (shouldTransformAsync) {
+ awaitVisitor.visit(path.get("body"));
+ }
+
+ var outerBody = [];
+ var innerBody = [];
+ var bodyPath = path.get("body", "body");
+
+ bodyPath.each(function(childPath) {
+ var node = childPath.value;
+ if (node && node._blockHoist != null) {
+ outerBody.push(node);
+ } else {
+ innerBody.push(node);
+ }
+ });
+
+ if (outerBody.length > 0) {
+ // Only replace the inner body if we actually hoisted any statements
+ // to the outer body.
+ bodyPath.replace(innerBody);
+ }
+
+ var outerFnExpr = getOuterFnExpr(path);
+ // Note that getOuterFnExpr has the side-effect of ensuring that the
+ // function has a name (so node.id will always be an Identifier), even
+ // if a temporary name has to be synthesized.
+ n.Identifier.assert(node.id);
+ var innerFnId = b.identifier(node.id.name + "$");
+ var contextId = path.scope.declareTemporary("context$");
+ var argsId = path.scope.declareTemporary("args$");
+
+ // Turn all declarations into vars, and replace the original
+ // declarations with equivalent assignment expressions.
+ var vars = hoist(path);
+
+ var didRenameArguments = renameArguments(path, argsId);
+ if (didRenameArguments) {
+ vars = vars || b.variableDeclaration("var", []);
+ vars.declarations.push(b.variableDeclarator(
+ argsId, b.identifier("arguments")
+ ));
+ }
+
+ var emitter = new Emitter(contextId);
+ emitter.explode(path.get("body"));
+
+ if (vars && vars.declarations.length > 0) {
+ outerBody.push(vars);
+ }
+
+ var wrapArgs = [
+ emitter.getContextFunction(innerFnId),
+ // Async functions that are not generators don't care about the
+ // outer function because they don't need it to be marked and don't
+ // inherit from its .prototype.
+ node.generator ? outerFnExpr : b.literal(null),
+ b.thisExpression()
+ ];
+
+ var tryLocsList = emitter.getTryLocsList();
+ if (tryLocsList) {
+ wrapArgs.push(tryLocsList);
+ }
+
+ var wrapCall = b.callExpression(
+ runtimeProperty(shouldTransformAsync ? "async" : "wrap"),
+ wrapArgs
+ );
+
+ outerBody.push(b.returnStatement(wrapCall));
+ node.body = b.blockStatement(outerBody);
+
+ var wasGeneratorFunction = node.generator;
+ if (wasGeneratorFunction) {
+ node.generator = false;
+ }
+
+ if (shouldTransformAsync) {
+ node.async = false;
+ }
+
+ if (wasGeneratorFunction &&
+ n.Expression.check(node)) {
+ return b.callExpression(runtimeProperty("mark"), [node]);
+ }
+ },
+
+ visitForOfStatement: function(path) {
+ this.traverse(path);
+
+ var node = path.value;
+ var tempIterId = path.scope.declareTemporary("t$");
+ var tempIterDecl = b.variableDeclarator(
+ tempIterId,
+ b.callExpression(
+ runtimeProperty("values"),
+ [node.right]
+ )
+ );
+
+ var tempInfoId = path.scope.declareTemporary("t$");
+ var tempInfoDecl = b.variableDeclarator(tempInfoId, null);
+
+ var init = node.left;
+ var loopId;
+ if (n.VariableDeclaration.check(init)) {
+ loopId = init.declarations[0].id;
+ init.declarations.push(tempIterDecl, tempInfoDecl);
+ } else {
+ loopId = init;
+ init = b.variableDeclaration("var", [
+ tempIterDecl,
+ tempInfoDecl
+ ]);
+ }
+ n.Identifier.assert(loopId);
+
+ var loopIdAssignExprStmt = b.expressionStatement(
+ b.assignmentExpression(
+ "=",
+ loopId,
+ b.memberExpression(
+ tempInfoId,
+ b.identifier("value"),
+ false
+ )
+ )
+ );
+
+ if (n.BlockStatement.check(node.body)) {
+ node.body.body.unshift(loopIdAssignExprStmt);
+ } else {
+ node.body = b.blockStatement([
+ loopIdAssignExprStmt,
+ node.body
+ ]);
+ }
+
+ return b.forStatement(
+ init,
+ b.unaryExpression(
+ "!",
+ b.memberExpression(
+ b.assignmentExpression(
+ "=",
+ tempInfoId,
+ b.callExpression(
+ b.memberExpression(
+ tempIterId,
+ b.identifier("next"),
+ false
+ ),
+ []
+ )
+ ),
+ b.identifier("done"),
+ false
+ )
+ ),
+ null,
+ node.body
+ );
+ }
+});
+
+// Given a NodePath for a Function, return an Expression node that can be
+// used to refer reliably to the function object from inside the function.
+// This expression is essentially a replacement for arguments.callee, with
+// the key advantage that it works in strict mode.
+function getOuterFnExpr(funPath) {
+ var node = funPath.value;
+ n.Function.assert(node);
+
+ if (node.generator && // Non-generator functions don't need to be marked.
+ n.FunctionDeclaration.check(node)) {
+ var pp = funPath.parent;
+
+ while (pp && !(n.BlockStatement.check(pp.value) ||
+ n.Program.check(pp.value))) {
+ pp = pp.parent;
+ }
+
+ if (!pp) {
+ return node.id;
+ }
+
+ var markDecl = getRuntimeMarkDecl(pp);
+ var markedArray = markDecl.declarations[0].id;
+ var funDeclIdArray = markDecl.declarations[0].init.callee.object;
+ n.ArrayExpression.assert(funDeclIdArray);
+
+ var index = funDeclIdArray.elements.length;
+ funDeclIdArray.elements.push(node.id);
+
+ return b.memberExpression(
+ markedArray,
+ b.literal(index),
+ true
+ );
+ }
+
+ return node.id || (
+ node.id = funPath.scope.parent.declareTemporary("callee$")
+ );
+}
+
+function getRuntimeMarkDecl(blockPath) {
+ assert.ok(blockPath instanceof NodePath);
+ var block = blockPath.node;
+ isArray.assert(block.body);
+
+ var info = getMarkInfo(block);
+ if (info.decl) {
+ return info.decl;
+ }
+
+ info.decl = b.variableDeclaration("var", [
+ b.variableDeclarator(
+ blockPath.scope.declareTemporary("marked"),
+ b.callExpression(
+ b.memberExpression(
+ b.arrayExpression([]),
+ b.identifier("map"),
+ false
+ ),
+ [runtimeProperty("mark")]
+ )
+ )
+ ]);
+
+ for (var i = 0; i < block.body.length; ++i) {
+ if (!shouldNotHoistAbove(blockPath.get("body", i))) {
+ break;
+ }
+ }
+
+ blockPath.get("body").insertAt(i, info.decl);
+
+ return info.decl;
+}
+
+function shouldNotHoistAbove(stmtPath) {
+ var value = stmtPath.value;
+ n.Statement.assert(value);
+
+ // If the first statement is a "use strict" declaration, make sure to
+ // insert hoisted declarations afterwards.
+ return n.ExpressionStatement.check(value) &&
+ n.Literal.check(value.expression) &&
+ value.expression.value === "use strict";
+}
+
+function renameArguments(funcPath, argsId) {
+ assert.ok(funcPath instanceof types.NodePath);
+ var func = funcPath.value;
+ var didRenameArguments = false;
+
+ recast.visit(funcPath, {
+ visitFunction: function(path) {
+ if (path.value === func) {
+ this.traverse(path);
+ } else {
+ return false;
+ }
+ },
+
+ visitIdentifier: function(path) {
+ if (path.value.name === "arguments" &&
+ util.isReference(path)) {
+ path.replace(argsId);
+ didRenameArguments = true;
+ return false;
+ }
+
+ this.traverse(path);
+ }
+ });
+
+ // If the traversal replaced any arguments references, then we need to
+ // alias the outer function's arguments binding (be it the implicit
+ // arguments object or some other parameter or variable) to the variable
+ // named by argsId.
+ return didRenameArguments;
+}
+
+var awaitVisitor = types.PathVisitor.fromMethodsObject({
+ visitFunction: function(path) {
+ return false; // Don't descend into nested function scopes.
+ },
+
+ visitAwaitExpression: function(path) {
+ // Convert await and await* expressions to yield expressions.
+ var argument = path.value.argument;
+
+ // If the parser supports await* syntax using a boolean .all property
+ // (#171), desugar that syntax to yield Promise.all(argument).
+ if (path.value.all) {
+ argument = b.callExpression(
+ b.memberExpression(
+ b.identifier("Promise"),
+ b.identifier("all"),
+ false
+ ),
+ [argument]
+ );
+ }
+
+ // Transforming `await x` to `yield regeneratorRuntime.awrap(x)`
+ // causes the argument to be wrapped in such a way that the runtime
+ // can distinguish between awaited and merely yielded values.
+ return b.yieldExpression(
+ b.callExpression(
+ runtimeProperty("awrap"),
+ [argument]
+ ),
+ false
+ );
+ }
+});
+
+},{"..":491,"./emit":485,"./hoist":486,"./util":489,"assert":213,"fs":212,"private":484,"recast":516}],491:[function(require,module,exports){
+(function (__dirname){
+/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+var assert = require("assert");
+var path = require("path");
+var fs = require("fs");
+var through = require("through");
+var transform = require("./lib/visit").transform;
+var utils = require("./lib/util");
+var recast = require("recast");
+var types = recast.types;
+var genOrAsyncFunExp = /\bfunction\s*\*|\basync\b/;
+var blockBindingExp = /\b(let|const)\s+/;
+
+function exports(file, options) {
+ var data = [];
+ return through(write, end);
+
+ function write(buf) {
+ data.push(buf);
+ }
+
+ function end() {
+ this.queue(compile(data.join(""), options).code);
+ this.queue(null);
+ }
+}
+
+// To get a writable stream for use as a browserify transform, call
+// require("regenerator")().
+module.exports = exports;
+
+// To include the runtime globally in the current node process, call
+// require("regenerator").runtime().
+function runtime() {
+ require("./runtime");
+}
+exports.runtime = runtime;
+runtime.path = path.join(__dirname, "runtime.js");
+
+function compile(source, options) {
+ options = normalizeOptions(options);
+
+ if (!genOrAsyncFunExp.test(source)) {
+ return {
+ // Shortcut: no generators or async functions to transform.
+ code: (options.includeRuntime === true ? fs.readFileSync(
+ path.join(__dirname, "runtime.js"), "utf-8"
+ ) + "\n" : "") + source
+ };
+ }
+
+ var recastOptions = getRecastOptions(options);
+ var ast = recast.parse(source, recastOptions);
+ var nodePath = new types.NodePath(ast);
+ var programPath = nodePath.get("program");
+
+ if (shouldVarify(source, options)) {
+ // Transpile let/const into var declarations.
+ varifyAst(programPath.node);
+ }
+
+ transform(programPath, options);
+
+ return recast.print(nodePath, recastOptions);
+}
+
+function normalizeOptions(options) {
+ options = utils.defaults(options || {}, {
+ includeRuntime: false,
+ supportBlockBinding: true
+ });
+
+ if (!options.esprima) {
+ options.esprima = require("esprima-fb");
+ }
+
+ assert.ok(
+ /harmony/.test(options.esprima.version),
+ "Bad esprima version: " + options.esprima.version
+ );
+
+ return options;
+}
+
+function getRecastOptions(options) {
+ var recastOptions = {
+ range: true
+ };
+
+ function copy(name) {
+ if (name in options) {
+ recastOptions[name] = options[name];
+ }
+ }
+
+ copy("esprima");
+ copy("sourceFileName");
+ copy("sourceMapName");
+ copy("inputSourceMap");
+ copy("sourceRoot");
+
+ return recastOptions;
+}
+
+function shouldVarify(source, options) {
+ var supportBlockBinding = !!options.supportBlockBinding;
+ if (supportBlockBinding) {
+ if (!blockBindingExp.test(source)) {
+ supportBlockBinding = false;
+ }
+ }
+
+ return supportBlockBinding;
+}
+
+function varify(source, options) {
+ var recastOptions = getRecastOptions(normalizeOptions(options));
+ var ast = recast.parse(source, recastOptions);
+ varifyAst(ast.program);
+ return recast.print(ast, recastOptions).code;
+}
+
+function varifyAst(ast) {
+ types.namedTypes.Program.assert(ast);
+
+ var defsResult = require("defs")(ast, {
+ ast: true,
+ disallowUnknownReferences: false,
+ disallowDuplicated: false,
+ disallowVars: false,
+ loopClosures: "iife"
+ });
+
+ if (defsResult.errors) {
+ throw new Error(defsResult.errors.join("\n"))
+ }
+
+ return ast;
+}
+
+// Convenience for just translating let/const to var declarations.
+exports.varify = varify;
+
+// Transforms a string of source code, returning the { code, map? } result
+// from recast.print.
+exports.compile = compile;
+
+// To modify an AST directly, call require("regenerator").transform(ast).
+exports.transform = transform;
+
+}).call(this,"/node_modules/regenerator")
+},{"./lib/util":489,"./lib/visit":490,"./runtime":518,"assert":213,"defs":492,"esprima-fb":212,"fs":212,"path":222,"recast":516,"through":517}],492:[function(require,module,exports){
+"use strict";
+
+var assert = require("assert");
+var is = require("simple-is");
+var fmt = require("simple-fmt");
+var stringmap = require("stringmap");
+var stringset = require("stringset");
+var alter = require("alter");
+var traverse = require("ast-traverse");
+var breakable = require("breakable");
+var Scope = require("./scope");
+var error = require("./error");
+var getline = error.getline;
+var options = require("./options");
+var Stats = require("./stats");
+var jshint_vars = require("./jshint_globals/vars.js");
+
+
+function isConstLet(kind) {
+ return is.someof(kind, ["const", "let"]);
+}
+
+function isVarConstLet(kind) {
+ return is.someof(kind, ["var", "const", "let"]);
+}
+
+function isNonFunctionBlock(node) {
+ return node.type === "BlockStatement" && is.noneof(node.$parent.type, ["FunctionDeclaration", "FunctionExpression"]);
+}
+
+function isForWithConstLet(node) {
+ return node.type === "ForStatement" && node.init && node.init.type === "VariableDeclaration" && isConstLet(node.init.kind);
+}
+
+function isForInOfWithConstLet(node) {
+ return isForInOf(node) && node.left.type === "VariableDeclaration" && isConstLet(node.left.kind);
+}
+
+function isForInOf(node) {
+ return is.someof(node.type, ["ForInStatement", "ForOfStatement"]);
+}
+
+function isFunction(node) {
+ return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]);
+}
+
+function isLoop(node) {
+ return is.someof(node.type, ["ForStatement", "ForInStatement", "ForOfStatement", "WhileStatement", "DoWhileStatement"]);
+}
+
+function isReference(node) {
+ var parent = node.$parent;
+ return node.$refToScope ||
+ node.type === "Identifier" &&
+ !(parent.type === "VariableDeclarator" && parent.id === node) && // var|let|const $
+ !(parent.type === "MemberExpression" && parent.computed === false && parent.property === node) && // obj.$
+ !(parent.type === "Property" && parent.key === node) && // {$: ...}
+ !(parent.type === "LabeledStatement" && parent.label === node) && // $: ...
+ !(parent.type === "CatchClause" && parent.param === node) && // catch($)
+ !(isFunction(parent) && parent.id === node) && // function $(..
+ !(isFunction(parent) && is.someof(node, parent.params)) && // function f($)..
+ true;
+}
+
+function isLvalue(node) {
+ return isReference(node) &&
+ ((node.$parent.type === "AssignmentExpression" && node.$parent.left === node) ||
+ (node.$parent.type === "UpdateExpression" && node.$parent.argument === node));
+}
+
+function createScopes(node, parent) {
+ assert(!node.$scope);
+
+ node.$parent = parent;
+ node.$scope = node.$parent ? node.$parent.$scope : null; // may be overridden
+
+ if (node.type === "Program") {
+ // Top-level program is a scope
+ // There's no block-scope under it
+ node.$scope = new Scope({
+ kind: "hoist",
+ node: node,
+ parent: null,
+ });
+
+ } else if (isFunction(node)) {
+ // Function is a scope, with params in it
+ // There's no block-scope under it
+
+ node.$scope = new Scope({
+ kind: "hoist",
+ node: node,
+ parent: node.$parent.$scope,
+ });
+
+ // function has a name
+ if (node.id) {
+ assert(node.id.type === "Identifier");
+
+ if (node.type === "FunctionDeclaration") {
+ // Function name goes in parent scope for declared functions
+ node.$parent.$scope.add(node.id.name, "fun", node.id, null);
+ } else if (node.type === "FunctionExpression") {
+ // Function name goes in function's scope for named function expressions
+ node.$scope.add(node.id.name, "fun", node.id, null);
+ } else {
+ assert(false);
+ }
+ }
+
+ node.params.forEach(function(param) {
+ node.$scope.add(param.name, "param", param, null);
+ });
+
+ } else if (node.type === "VariableDeclaration") {
+ // Variable declarations names goes in current scope
+ assert(isVarConstLet(node.kind));
+ node.declarations.forEach(function(declarator) {
+ assert(declarator.type === "VariableDeclarator");
+ var name = declarator.id.name;
+ if (options.disallowVars && node.kind === "var") {
+ error(getline(declarator), "var {0} is not allowed (use let or const)", name);
+ }
+ node.$scope.add(name, node.kind, declarator.id, declarator.range[1]);
+ });
+
+ } else if (isForWithConstLet(node) || isForInOfWithConstLet(node)) {
+ // For(In/Of) loop with const|let declaration is a scope, with declaration in it
+ // There may be a block-scope under it
+ node.$scope = new Scope({
+ kind: "block",
+ node: node,
+ parent: node.$parent.$scope,
+ });
+
+ } else if (isNonFunctionBlock(node)) {
+ // A block node is a scope unless parent is a function
+ node.$scope = new Scope({
+ kind: "block",
+ node: node,
+ parent: node.$parent.$scope,
+ });
+
+ } else if (node.type === "CatchClause") {
+ var identifier = node.param;
+
+ node.$scope = new Scope({
+ kind: "catch-block",
+ node: node,
+ parent: node.$parent.$scope,
+ });
+ node.$scope.add(identifier.name, "caught", identifier, null);
+
+ // All hoist-scope keeps track of which variables that are propagated through,
+ // i.e. an reference inside the scope points to a declaration outside the scope.
+ // This is used to mark "taint" the name since adding a new variable in the scope,
+ // with a propagated name, would change the meaning of the existing references.
+ //
+ // catch(e) is special because even though e is a variable in its own scope,
+ // we want to make sure that catch(e){let e} is never transformed to
+ // catch(e){var e} (but rather var e$0). For that reason we taint the use of e
+ // in the closest hoist-scope, i.e. where var e$0 belongs.
+ node.$scope.closestHoistScope().markPropagates(identifier.name);
+ }
+}
+
+function createTopScope(programScope, environments, globals) {
+ function inject(obj) {
+ for (var name in obj) {
+ var writeable = obj[name];
+ var kind = (writeable ? "var" : "const");
+ if (topScope.hasOwn(name)) {
+ topScope.remove(name);
+ }
+ topScope.add(name, kind, {loc: {start: {line: -1}}}, -1);
+ }
+ }
+
+ var topScope = new Scope({
+ kind: "hoist",
+ node: {},
+ parent: null,
+ });
+
+ var complementary = {
+ undefined: false,
+ Infinity: false,
+ console: false,
+ };
+
+ inject(complementary);
+ inject(jshint_vars.reservedVars);
+ inject(jshint_vars.ecmaIdentifiers);
+ if (environments) {
+ environments.forEach(function(env) {
+ if (!jshint_vars[env]) {
+ error(-1, 'environment "{0}" not found', env);
+ } else {
+ inject(jshint_vars[env]);
+ }
+ });
+ }
+ if (globals) {
+ inject(globals);
+ }
+
+ // link it in
+ programScope.parent = topScope;
+ topScope.children.push(programScope);
+
+ return topScope;
+}
+
+function setupReferences(ast, allIdentifiers, opts) {
+ var analyze = (is.own(opts, "analyze") ? opts.analyze : true);
+
+ function visit(node) {
+ if (!isReference(node)) {
+ return;
+ }
+ allIdentifiers.add(node.name);
+
+ var scope = node.$scope.lookup(node.name);
+ if (analyze && !scope && options.disallowUnknownReferences) {
+ error(getline(node), "reference to unknown global variable {0}", node.name);
+ }
+ // check const and let for referenced-before-declaration
+ if (analyze && scope && is.someof(scope.getKind(node.name), ["const", "let"])) {
+ var allowedFromPos = scope.getFromPos(node.name);
+ var referencedAtPos = node.range[0];
+ assert(is.finitenumber(allowedFromPos));
+ assert(is.finitenumber(referencedAtPos));
+ if (referencedAtPos < allowedFromPos) {
+ if (!node.$scope.hasFunctionScopeBetween(scope)) {
+ error(getline(node), "{0} is referenced before its declaration", node.name);
+ }
+ }
+ }
+ node.$refToScope = scope;
+ }
+
+ traverse(ast, {pre: visit});
+}
+
+// TODO for loops init and body props are parallel to each other but init scope is outer that of body
+// TODO is this a problem?
+
+function varify(ast, stats, allIdentifiers, changes) {
+ function unique(name) {
+ assert(allIdentifiers.has(name));
+ for (var cnt = 0; ; cnt++) {
+ var genName = name + "$" + String(cnt);
+ if (!allIdentifiers.has(genName)) {
+ return genName;
+ }
+ }
+ }
+
+ function renameDeclarations(node) {
+ if (node.type === "VariableDeclaration" && isConstLet(node.kind)) {
+ var hoistScope = node.$scope.closestHoistScope();
+ var origScope = node.$scope;
+
+ // text change const|let => var
+ changes.push({
+ start: node.range[0],
+ end: node.range[0] + node.kind.length,
+ str: "var",
+ });
+
+ node.declarations.forEach(function(declarator) {
+ assert(declarator.type === "VariableDeclarator");
+ var name = declarator.id.name;
+
+ stats.declarator(node.kind);
+
+ // rename if
+ // 1) name already exists in hoistScope, or
+ // 2) name is already propagated (passed) through hoistScope or manually tainted
+ var rename = (origScope !== hoistScope &&
+ (hoistScope.hasOwn(name) || hoistScope.doesPropagate(name)));
+
+ var newName = (rename ? unique(name) : name);
+
+ origScope.remove(name);
+ hoistScope.add(newName, "var", declarator.id, declarator.range[1]);
+
+ origScope.moves = origScope.moves || stringmap();
+ origScope.moves.set(name, {
+ name: newName,
+ scope: hoistScope,
+ });
+
+ allIdentifiers.add(newName);
+
+ if (newName !== name) {
+ stats.rename(name, newName, getline(declarator));
+
+ declarator.id.originalName = name;
+ declarator.id.name = newName;
+
+ // textchange var x => var x$1
+ changes.push({
+ start: declarator.id.range[0],
+ end: declarator.id.range[1],
+ str: newName,
+ });
+ }
+ });
+
+ // ast change const|let => var
+ node.kind = "var";
+ }
+ }
+
+ function renameReferences(node) {
+ if (!node.$refToScope) {
+ return;
+ }
+ var move = node.$refToScope.moves && node.$refToScope.moves.get(node.name);
+ if (!move) {
+ return;
+ }
+ node.$refToScope = move.scope;
+
+ if (node.name !== move.name) {
+ node.originalName = node.name;
+ node.name = move.name;
+
+ if (node.alterop) {
+ // node has no range because it is the result of another alter operation
+ var existingOp = null;
+ for (var i = 0; i < changes.length; i++) {
+ var op = changes[i];
+ if (op.node === node) {
+ existingOp = op;
+ break;
+ }
+ }
+ assert(existingOp);
+
+ // modify op
+ existingOp.str = move.name;
+ } else {
+ changes.push({
+ start: node.range[0],
+ end: node.range[1],
+ str: move.name,
+ });
+ }
+ }
+ }
+
+ traverse(ast, {pre: renameDeclarations});
+ traverse(ast, {pre: renameReferences});
+ ast.$scope.traverse({pre: function(scope) {
+ delete scope.moves;
+ }});
+}
+
+
+function detectLoopClosures(ast) {
+ traverse(ast, {pre: visit});
+
+ function detectIifyBodyBlockers(body, node) {
+ return breakable(function(brk) {
+ traverse(body, {pre: function(n) {
+ // if we hit an inner function of the loop body, don't traverse further
+ if (isFunction(n)) {
+ return false;
+ }
+
+ var err = true; // reset to false in else-statement below
+ var msg = "loop-variable {0} is captured by a loop-closure that can't be transformed due to use of {1} at line {2}";
+ if (n.type === "BreakStatement") {
+ error(getline(node), msg, node.name, "break", getline(n));
+ } else if (n.type === "ContinueStatement") {
+ error(getline(node), msg, node.name, "continue", getline(n));
+ } else if (n.type === "ReturnStatement") {
+ error(getline(node), msg, node.name, "return", getline(n));
+ } else if (n.type === "YieldExpression") {
+ error(getline(node), msg, node.name, "yield", getline(n));
+ } else if (n.type === "Identifier" && n.name === "arguments") {
+ error(getline(node), msg, node.name, "arguments", getline(n));
+ } else if (n.type === "VariableDeclaration" && n.kind === "var") {
+ error(getline(node), msg, node.name, "var", getline(n));
+ } else {
+ err = false;
+ }
+ if (err) {
+ brk(true); // break traversal
+ }
+ }});
+ return false;
+ });
+ }
+
+ function visit(node) {
+ // forbidden pattern:
+ // * * * *
+ var loopNode = null;
+ if (isReference(node) && node.$refToScope && isConstLet(node.$refToScope.getKind(node.name))) {
+ // traverse nodes up towards root from constlet-def
+ // if we hit a function (before a loop) - ok!
+ // if we hit a loop - maybe-ouch
+ // if we reach root - ok!
+ for (var n = node.$refToScope.node; ; ) {
+ if (isFunction(n)) {
+ // we're ok (function-local)
+ return;
+ } else if (isLoop(n)) {
+ loopNode = n;
+ // maybe not ok (between loop and function)
+ break;
+ }
+ n = n.$parent;
+ if (!n) {
+ // ok (reached root)
+ return;
+ }
+ }
+
+ assert(isLoop(loopNode));
+
+ // traverse scopes from reference-scope up towards definition-scope
+ // if we hit a function, ouch!
+ var defScope = node.$refToScope;
+ var generateIIFE = (options.loopClosures === "iife");
+
+ for (var s = node.$scope; s; s = s.parent) {
+ if (s === defScope) {
+ // we're ok
+ return;
+ } else if (isFunction(s.node)) {
+ // not ok (there's a function between the reference and definition)
+ // may be transformable via IIFE
+
+ if (!generateIIFE) {
+ var msg = "loop-variable {0} is captured by a loop-closure. Tried \"loopClosures\": \"iife\" in defs-config.json?";
+ return error(getline(node), msg, node.name);
+ }
+
+ // here be dragons
+ // for (let x = ..; .. ; ..) { (function(){x})() } is forbidden because of current
+ // spec and VM status
+ if (loopNode.type === "ForStatement" && defScope.node === loopNode) {
+ var declarationNode = defScope.getNode(node.name);
+ return error(getline(declarationNode), "Not yet specced ES6 feature. {0} is declared in for-loop header and then captured in loop closure", declarationNode.name);
+ }
+
+ // speak now or forever hold your peace
+ if (detectIifyBodyBlockers(loopNode.body, node)) {
+ // error already generated
+ return;
+ }
+
+ // mark loop for IIFE-insertion
+ loopNode.$iify = true;
+ }
+ }
+ }
+ }
+}
+
+function transformLoopClosures(root, ops, options) {
+ function insertOp(pos, str, node) {
+ var op = {
+ start: pos,
+ end: pos,
+ str: str,
+ }
+ if (node) {
+ op.node = node;
+ }
+ ops.push(op);
+ }
+
+ traverse(root, {pre: function(node) {
+ if (!node.$iify) {
+ return;
+ }
+
+ var hasBlock = (node.body.type === "BlockStatement");
+
+ var insertHead = (hasBlock ?
+ node.body.range[0] + 1 : // just after body {
+ node.body.range[0]); // just before existing expression
+ var insertFoot = (hasBlock ?
+ node.body.range[1] - 1 : // just before body }
+ node.body.range[1]); // just after existing expression
+
+ var forInName = (isForInOf(node) && node.left.declarations[0].id.name);;
+ var iifeHead = fmt("(function({0}){", forInName ? forInName : "");
+ var iifeTail = fmt("}).call(this{0});", forInName ? ", " + forInName : "");
+
+ // modify AST
+ var iifeFragment = options.parse(iifeHead + iifeTail);
+ var iifeExpressionStatement = iifeFragment.body[0];
+ var iifeBlockStatement = iifeExpressionStatement.expression.callee.object.body;
+
+ if (hasBlock) {
+ var forBlockStatement = node.body;
+ var tmp = forBlockStatement.body;
+ forBlockStatement.body = [iifeExpressionStatement];
+ iifeBlockStatement.body = tmp;
+ } else {
+ var tmp$0 = node.body;
+ node.body = iifeExpressionStatement;
+ iifeBlockStatement.body[0] = tmp$0;
+ }
+
+ // create ops
+ insertOp(insertHead, iifeHead);
+
+ if (forInName) {
+ insertOp(insertFoot, "}).call(this, ");
+
+ var args = iifeExpressionStatement.expression.arguments;
+ var iifeArgumentIdentifier = args[1];
+ iifeArgumentIdentifier.alterop = true;
+ insertOp(insertFoot, forInName, iifeArgumentIdentifier);
+
+ insertOp(insertFoot, ");");
+ } else {
+ insertOp(insertFoot, iifeTail);
+ }
+ }});
+}
+
+function detectConstAssignment(ast) {
+ traverse(ast, {pre: function(node) {
+ if (isLvalue(node)) {
+ var scope = node.$scope.lookup(node.name);
+ if (scope && scope.getKind(node.name) === "const") {
+ error(getline(node), "can't assign to const variable {0}", node.name);
+ }
+ }
+ }});
+}
+
+function detectConstantLets(ast) {
+ traverse(ast, {pre: function(node) {
+ if (isLvalue(node)) {
+ var scope = node.$scope.lookup(node.name);
+ if (scope) {
+ scope.markWrite(node.name);
+ }
+ }
+ }});
+
+ ast.$scope.detectUnmodifiedLets();
+}
+
+function setupScopeAndReferences(root, opts) {
+ // setup scopes
+ traverse(root, {pre: createScopes});
+ var topScope = createTopScope(root.$scope, options.environments, options.globals);
+
+ // allIdentifiers contains all declared and referenced vars
+ // collect all declaration names (including those in topScope)
+ var allIdentifiers = stringset();
+ topScope.traverse({pre: function(scope) {
+ allIdentifiers.addMany(scope.decls.keys());
+ }});
+
+ // setup node.$refToScope, check for errors.
+ // also collects all referenced names to allIdentifiers
+ setupReferences(root, allIdentifiers, opts);
+ return allIdentifiers;
+}
+
+function cleanupTree(root) {
+ traverse(root, {pre: function(node) {
+ for (var prop in node) {
+ if (prop[0] === "$") {
+ delete node[prop];
+ }
+ }
+ }});
+}
+
+function run(src, config) {
+ // alter the options singleton with user configuration
+ for (var key in config) {
+ options[key] = config[key];
+ }
+
+ var parsed;
+
+ if (is.object(src)) {
+ if (!options.ast) {
+ return {
+ errors: [
+ "Can't produce string output when input is an AST. " +
+ "Did you forget to set options.ast = true?"
+ ],
+ };
+ }
+
+ // Received an AST object as src, so no need to parse it.
+ parsed = src;
+
+ } else if (is.string(src)) {
+ try {
+ parsed = options.parse(src, {
+ loc: true,
+ range: true,
+ });
+ } catch (e) {
+ return {
+ errors: [
+ fmt("line {0} column {1}: Error during input file parsing\n{2}\n{3}",
+ e.lineNumber,
+ e.column,
+ src.split("\n")[e.lineNumber - 1],
+ fmt.repeat(" ", e.column - 1) + "^")
+ ],
+ };
+ }
+
+ } else {
+ return {
+ errors: ["Input was neither an AST object nor a string."],
+ };
+ }
+
+ var ast = parsed;
+
+ // TODO detect unused variables (never read)
+ error.reset();
+
+ var allIdentifiers = setupScopeAndReferences(ast, {});
+
+ // static analysis passes
+ detectLoopClosures(ast);
+ detectConstAssignment(ast);
+ //detectConstantLets(ast);
+
+ var changes = [];
+ transformLoopClosures(ast, changes, options);
+
+ //ast.$scope.print(); process.exit(-1);
+
+ if (error.errors.length >= 1) {
+ return {
+ errors: error.errors,
+ };
+ }
+
+ if (changes.length > 0) {
+ cleanupTree(ast);
+ allIdentifiers = setupScopeAndReferences(ast, {analyze: false});
+ }
+ assert(error.errors.length === 0);
+
+ // change constlet declarations to var, renamed if needed
+ // varify modifies the scopes and AST accordingly and
+ // returns a list of change fragments (to use with alter)
+ var stats = new Stats();
+ varify(ast, stats, allIdentifiers, changes);
+
+ if (options.ast) {
+ // return the modified AST instead of src code
+ // get rid of all added $ properties first, such as $parent and $scope
+ cleanupTree(ast);
+ return {
+ stats: stats,
+ ast: ast,
+ };
+ } else {
+ // apply changes produced by varify and return the transformed src
+ var transformedSrc = alter(src, changes);
+ return {
+ stats: stats,
+ src: transformedSrc,
+ };
+ }
+}
+
+module.exports = run;
+
+},{"./error":493,"./jshint_globals/vars.js":494,"./options":495,"./scope":496,"./stats":497,"alter":498,"assert":213,"ast-traverse":500,"breakable":501,"simple-fmt":502,"simple-is":503,"stringmap":504,"stringset":505}],493:[function(require,module,exports){
+"use strict";
+
+var fmt = require("simple-fmt");
+var assert = require("assert");
+
+function error(line, var_args) {
+ assert(arguments.length >= 2);
+
+ var msg = (arguments.length === 2 ?
+ String(var_args) : fmt.apply(fmt, Array.prototype.slice.call(arguments, 1)));
+
+ error.errors.push(line === -1 ? msg : fmt("line {0}: {1}", line, msg));
+}
+
+error.reset = function() {
+ error.errors = [];
+};
+
+error.getline = function(node) {
+ if (node && node.loc && node.loc.start) {
+ return node.loc.start.line;
+ }
+ return -1;
+};
+
+error.reset();
+
+module.exports = error;
+
+},{"assert":213,"simple-fmt":502}],494:[function(require,module,exports){
+// jshint -W001
+
+"use strict";
+
+// Identifiers provided by the ECMAScript standard.
+
+exports.reservedVars = {
+ arguments : false,
+ NaN : false
+};
+
+exports.ecmaIdentifiers = {
+ Array : false,
+ Boolean : false,
+ Date : false,
+ decodeURI : false,
+ decodeURIComponent : false,
+ encodeURI : false,
+ encodeURIComponent : false,
+ Error : false,
+ "eval" : false,
+ EvalError : false,
+ Function : false,
+ hasOwnProperty : false,
+ isFinite : false,
+ isNaN : false,
+ JSON : false,
+ Math : false,
+ Map : false,
+ Number : false,
+ Object : false,
+ parseInt : false,
+ parseFloat : false,
+ RangeError : false,
+ ReferenceError : false,
+ RegExp : false,
+ Set : false,
+ String : false,
+ SyntaxError : false,
+ TypeError : false,
+ URIError : false,
+ WeakMap : false
+};
+
+// Global variables commonly provided by a web browser environment.
+
+exports.browser = {
+ ArrayBuffer : false,
+ ArrayBufferView : false,
+ Audio : false,
+ Blob : false,
+ addEventListener : false,
+ applicationCache : false,
+ atob : false,
+ blur : false,
+ btoa : false,
+ clearInterval : false,
+ clearTimeout : false,
+ close : false,
+ closed : false,
+ DataView : false,
+ DOMParser : false,
+ defaultStatus : false,
+ document : false,
+ Element : false,
+ event : false,
+ FileReader : false,
+ Float32Array : false,
+ Float64Array : false,
+ FormData : false,
+ focus : false,
+ frames : false,
+ getComputedStyle : false,
+ HTMLElement : false,
+ HTMLAnchorElement : false,
+ HTMLBaseElement : false,
+ HTMLBlockquoteElement: false,
+ HTMLBodyElement : false,
+ HTMLBRElement : false,
+ HTMLButtonElement : false,
+ HTMLCanvasElement : false,
+ HTMLDirectoryElement : false,
+ HTMLDivElement : false,
+ HTMLDListElement : false,
+ HTMLFieldSetElement : false,
+ HTMLFontElement : false,
+ HTMLFormElement : false,
+ HTMLFrameElement : false,
+ HTMLFrameSetElement : false,
+ HTMLHeadElement : false,
+ HTMLHeadingElement : false,
+ HTMLHRElement : false,
+ HTMLHtmlElement : false,
+ HTMLIFrameElement : false,
+ HTMLImageElement : false,
+ HTMLInputElement : false,
+ HTMLIsIndexElement : false,
+ HTMLLabelElement : false,
+ HTMLLayerElement : false,
+ HTMLLegendElement : false,
+ HTMLLIElement : false,
+ HTMLLinkElement : false,
+ HTMLMapElement : false,
+ HTMLMenuElement : false,
+ HTMLMetaElement : false,
+ HTMLModElement : false,
+ HTMLObjectElement : false,
+ HTMLOListElement : false,
+ HTMLOptGroupElement : false,
+ HTMLOptionElement : false,
+ HTMLParagraphElement : false,
+ HTMLParamElement : false,
+ HTMLPreElement : false,
+ HTMLQuoteElement : false,
+ HTMLScriptElement : false,
+ HTMLSelectElement : false,
+ HTMLStyleElement : false,
+ HTMLTableCaptionElement: false,
+ HTMLTableCellElement : false,
+ HTMLTableColElement : false,
+ HTMLTableElement : false,
+ HTMLTableRowElement : false,
+ HTMLTableSectionElement: false,
+ HTMLTextAreaElement : false,
+ HTMLTitleElement : false,
+ HTMLUListElement : false,
+ HTMLVideoElement : false,
+ history : false,
+ Int16Array : false,
+ Int32Array : false,
+ Int8Array : false,
+ Image : false,
+ length : false,
+ localStorage : false,
+ location : false,
+ MessageChannel : false,
+ MessageEvent : false,
+ MessagePort : false,
+ moveBy : false,
+ moveTo : false,
+ MutationObserver : false,
+ name : false,
+ Node : false,
+ NodeFilter : false,
+ navigator : false,
+ onbeforeunload : true,
+ onblur : true,
+ onerror : true,
+ onfocus : true,
+ onload : true,
+ onresize : true,
+ onunload : true,
+ open : false,
+ openDatabase : false,
+ opener : false,
+ Option : false,
+ parent : false,
+ print : false,
+ removeEventListener : false,
+ resizeBy : false,
+ resizeTo : false,
+ screen : false,
+ scroll : false,
+ scrollBy : false,
+ scrollTo : false,
+ sessionStorage : false,
+ setInterval : false,
+ setTimeout : false,
+ SharedWorker : false,
+ status : false,
+ top : false,
+ Uint16Array : false,
+ Uint32Array : false,
+ Uint8Array : false,
+ Uint8ClampedArray : false,
+ WebSocket : false,
+ window : false,
+ Worker : false,
+ XMLHttpRequest : false,
+ XMLSerializer : false,
+ XPathEvaluator : false,
+ XPathException : false,
+ XPathExpression : false,
+ XPathNamespace : false,
+ XPathNSResolver : false,
+ XPathResult : false
+};
+
+exports.devel = {
+ alert : false,
+ confirm: false,
+ console: false,
+ Debug : false,
+ opera : false,
+ prompt : false
+};
+
+exports.worker = {
+ importScripts: true,
+ postMessage : true,
+ self : true
+};
+
+// Widely adopted global names that are not part of ECMAScript standard
+exports.nonstandard = {
+ escape : false,
+ unescape: false
+};
+
+// Globals provided by popular JavaScript environments.
+
+exports.couch = {
+ "require" : false,
+ respond : false,
+ getRow : false,
+ emit : false,
+ send : false,
+ start : false,
+ sum : false,
+ log : false,
+ exports : false,
+ module : false,
+ provides : false
+};
+
+exports.node = {
+ __filename : false,
+ __dirname : false,
+ Buffer : false,
+ DataView : false,
+ console : false,
+ exports : true, // In Node it is ok to exports = module.exports = foo();
+ GLOBAL : false,
+ global : false,
+ module : false,
+ process : false,
+ require : false,
+ setTimeout : false,
+ clearTimeout : false,
+ setInterval : false,
+ clearInterval: false
+};
+
+exports.phantom = {
+ phantom : true,
+ require : true,
+ WebPage : true
+};
+
+exports.rhino = {
+ defineClass : false,
+ deserialize : false,
+ gc : false,
+ help : false,
+ importPackage: false,
+ "java" : false,
+ load : false,
+ loadClass : false,
+ print : false,
+ quit : false,
+ readFile : false,
+ readUrl : false,
+ runCommand : false,
+ seal : false,
+ serialize : false,
+ spawn : false,
+ sync : false,
+ toint32 : false,
+ version : false
+};
+
+exports.wsh = {
+ ActiveXObject : true,
+ Enumerator : true,
+ GetObject : true,
+ ScriptEngine : true,
+ ScriptEngineBuildVersion : true,
+ ScriptEngineMajorVersion : true,
+ ScriptEngineMinorVersion : true,
+ VBArray : true,
+ WSH : true,
+ WScript : true,
+ XDomainRequest : true
+};
+
+// Globals provided by popular JavaScript libraries.
+
+exports.dojo = {
+ dojo : false,
+ dijit : false,
+ dojox : false,
+ define : false,
+ "require": false
+};
+
+exports.jquery = {
+ "$" : false,
+ jQuery : false
+};
+
+exports.mootools = {
+ "$" : false,
+ "$$" : false,
+ Asset : false,
+ Browser : false,
+ Chain : false,
+ Class : false,
+ Color : false,
+ Cookie : false,
+ Core : false,
+ Document : false,
+ DomReady : false,
+ DOMEvent : false,
+ DOMReady : false,
+ Drag : false,
+ Element : false,
+ Elements : false,
+ Event : false,
+ Events : false,
+ Fx : false,
+ Group : false,
+ Hash : false,
+ HtmlTable : false,
+ Iframe : false,
+ IframeShim : false,
+ InputValidator: false,
+ instanceOf : false,
+ Keyboard : false,
+ Locale : false,
+ Mask : false,
+ MooTools : false,
+ Native : false,
+ Options : false,
+ OverText : false,
+ Request : false,
+ Scroller : false,
+ Slick : false,
+ Slider : false,
+ Sortables : false,
+ Spinner : false,
+ Swiff : false,
+ Tips : false,
+ Type : false,
+ typeOf : false,
+ URI : false,
+ Window : false
+};
+
+exports.prototypejs = {
+ "$" : false,
+ "$$" : false,
+ "$A" : false,
+ "$F" : false,
+ "$H" : false,
+ "$R" : false,
+ "$break" : false,
+ "$continue" : false,
+ "$w" : false,
+ Abstract : false,
+ Ajax : false,
+ Class : false,
+ Enumerable : false,
+ Element : false,
+ Event : false,
+ Field : false,
+ Form : false,
+ Hash : false,
+ Insertion : false,
+ ObjectRange : false,
+ PeriodicalExecuter: false,
+ Position : false,
+ Prototype : false,
+ Selector : false,
+ Template : false,
+ Toggle : false,
+ Try : false,
+ Autocompleter : false,
+ Builder : false,
+ Control : false,
+ Draggable : false,
+ Draggables : false,
+ Droppables : false,
+ Effect : false,
+ Sortable : false,
+ SortableObserver : false,
+ Sound : false,
+ Scriptaculous : false
+};
+
+exports.yui = {
+ YUI : false,
+ Y : false,
+ YUI_config: false
+};
+
+
+},{}],495:[function(require,module,exports){
+// default configuration
+
+module.exports = {
+ disallowVars: false,
+ disallowDuplicated: true,
+ disallowUnknownReferences: true,
+ parse: require("esprima-fb").parse,
+};
+
+},{"esprima-fb":212}],496:[function(require,module,exports){
+"use strict";
+
+var assert = require("assert");
+var stringmap = require("stringmap");
+var stringset = require("stringset");
+var is = require("simple-is");
+var fmt = require("simple-fmt");
+var error = require("./error");
+var getline = error.getline;
+var options = require("./options");
+
+function Scope(args) {
+ assert(is.someof(args.kind, ["hoist", "block", "catch-block"]));
+ assert(is.object(args.node));
+ assert(args.parent === null || is.object(args.parent));
+
+ // kind === "hoist": function scopes, program scope, injected globals
+ // kind === "block": ES6 block scopes
+ // kind === "catch-block": catch block scopes
+ this.kind = args.kind;
+
+ // the AST node the block corresponds to
+ this.node = args.node;
+
+ // parent scope
+ this.parent = args.parent;
+
+ // children scopes for easier traversal (populated internally)
+ this.children = [];
+
+ // scope declarations. decls[variable_name] = {
+ // kind: "fun" for functions,
+ // "param" for function parameters,
+ // "caught" for catch parameter
+ // "var",
+ // "const",
+ // "let"
+ // node: the AST node the declaration corresponds to
+ // from: source code index from which it is visible at earliest
+ // (only stored for "const", "let" [and "var"] nodes)
+ // }
+ this.decls = stringmap();
+
+ // names of all declarations within this scope that was ever written
+ // TODO move to decls.w?
+ // TODO create corresponding read?
+ this.written = stringset();
+
+ // names of all variables declared outside this hoist scope but
+ // referenced in this scope (immediately or in child).
+ // only stored on hoist scopes for efficiency
+ // (because we currently generate lots of empty block scopes)
+ this.propagates = (this.kind === "hoist" ? stringset() : null);
+
+ // scopes register themselves with their parents for easier traversal
+ if (this.parent) {
+ this.parent.children.push(this);
+ }
+}
+
+Scope.prototype.print = function(indent) {
+ indent = indent || 0;
+ var scope = this;
+ var names = this.decls.keys().map(function(name) {
+ return fmt("{0} [{1}]", name, scope.decls.get(name).kind);
+ }).join(", ");
+ var propagates = this.propagates ? this.propagates.items().join(", ") : "";
+ console.log(fmt("{0}{1}: {2}. propagates: {3}", fmt.repeat(" ", indent), this.node.type, names, propagates));
+ this.children.forEach(function(c) {
+ c.print(indent + 2);
+ });
+};
+
+Scope.prototype.add = function(name, kind, node, referableFromPos) {
+ assert(is.someof(kind, ["fun", "param", "var", "caught", "const", "let"]));
+
+ function isConstLet(kind) {
+ return is.someof(kind, ["const", "let"]);
+ }
+
+ var scope = this;
+
+ // search nearest hoist-scope for fun, param and var's
+ // const, let and caught variables go directly in the scope (which may be hoist, block or catch-block)
+ if (is.someof(kind, ["fun", "param", "var"])) {
+ while (scope.kind !== "hoist") {
+ if (scope.decls.has(name) && isConstLet(scope.decls.get(name).kind)) { // could be caught
+ return error(getline(node), "{0} is already declared", name);
+ }
+ scope = scope.parent;
+ }
+ }
+ // name exists in scope and either new or existing kind is const|let => error
+ if (scope.decls.has(name) && (options.disallowDuplicated || isConstLet(scope.decls.get(name).kind) || isConstLet(kind))) {
+ return error(getline(node), "{0} is already declared", name);
+ }
+
+ var declaration = {
+ kind: kind,
+ node: node,
+ };
+ if (referableFromPos) {
+ assert(is.someof(kind, ["var", "const", "let"]));
+ declaration.from = referableFromPos;
+ }
+ scope.decls.set(name, declaration);
+};
+
+Scope.prototype.getKind = function(name) {
+ assert(is.string(name));
+ var decl = this.decls.get(name);
+ return decl ? decl.kind : null;
+};
+
+Scope.prototype.getNode = function(name) {
+ assert(is.string(name));
+ var decl = this.decls.get(name);
+ return decl ? decl.node : null;
+};
+
+Scope.prototype.getFromPos = function(name) {
+ assert(is.string(name));
+ var decl = this.decls.get(name);
+ return decl ? decl.from : null;
+};
+
+Scope.prototype.hasOwn = function(name) {
+ return this.decls.has(name);
+};
+
+Scope.prototype.remove = function(name) {
+ return this.decls.remove(name);
+};
+
+Scope.prototype.doesPropagate = function(name) {
+ return this.propagates.has(name);
+};
+
+Scope.prototype.markPropagates = function(name) {
+ this.propagates.add(name);
+};
+
+Scope.prototype.closestHoistScope = function() {
+ var scope = this;
+ while (scope.kind !== "hoist") {
+ scope = scope.parent;
+ }
+ return scope;
+};
+
+Scope.prototype.hasFunctionScopeBetween = function(outer) {
+ function isFunction(node) {
+ return is.someof(node.type, ["FunctionDeclaration", "FunctionExpression"]);
+ }
+
+ for (var scope = this; scope; scope = scope.parent) {
+ if (scope === outer) {
+ return false;
+ }
+ if (isFunction(scope.node)) {
+ return true;
+ }
+ }
+
+ throw new Error("wasn't inner scope of outer");
+};
+
+Scope.prototype.lookup = function(name) {
+ for (var scope = this; scope; scope = scope.parent) {
+ if (scope.decls.has(name)) {
+ return scope;
+ } else if (scope.kind === "hoist") {
+ scope.propagates.add(name);
+ }
+ }
+ return null;
+};
+
+Scope.prototype.markWrite = function(name) {
+ assert(is.string(name));
+ this.written.add(name);
+};
+
+// detects let variables that are never modified (ignores top-level)
+Scope.prototype.detectUnmodifiedLets = function() {
+ var outmost = this;
+
+ function detect(scope) {
+ if (scope !== outmost) {
+ scope.decls.keys().forEach(function(name) {
+ if (scope.getKind(name) === "let" && !scope.written.has(name)) {
+ return error(getline(scope.getNode(name)), "{0} is declared as let but never modified so could be const", name);
+ }
+ });
+ }
+
+ scope.children.forEach(function(childScope) {
+ detect(childScope);
+ });
+ }
+ detect(this);
+};
+
+Scope.prototype.traverse = function(options) {
+ options = options || {};
+ var pre = options.pre;
+ var post = options.post;
+
+ function visit(scope) {
+ if (pre) {
+ pre(scope);
+ }
+ scope.children.forEach(function(childScope) {
+ visit(childScope);
+ });
+ if (post) {
+ post(scope);
+ }
+ }
+
+ visit(this);
+};
+
+module.exports = Scope;
+
+},{"./error":493,"./options":495,"assert":213,"simple-fmt":502,"simple-is":503,"stringmap":504,"stringset":505}],497:[function(require,module,exports){
+var fmt = require("simple-fmt");
+var is = require("simple-is");
+var assert = require("assert");
+
+function Stats() {
+ this.lets = 0;
+ this.consts = 0;
+ this.renames = [];
+}
+
+Stats.prototype.declarator = function(kind) {
+ assert(is.someof(kind, ["const", "let"]));
+ if (kind === "const") {
+ this.consts++;
+ } else {
+ this.lets++;
+ }
+};
+
+Stats.prototype.rename = function(oldName, newName, line) {
+ this.renames.push({
+ oldName: oldName,
+ newName: newName,
+ line: line,
+ });
+};
+
+Stats.prototype.toString = function() {
+// console.log("defs.js stats for file {0}:", filename)
+
+ var renames = this.renames.map(function(r) {
+ return r;
+ }).sort(function(a, b) {
+ return a.line - b.line;
+ }); // sort a copy of renames
+
+ var renameStr = renames.map(function(rename) {
+ return fmt("\nline {0}: {1} => {2}", rename.line, rename.oldName, rename.newName);
+ }).join("");
+
+ var sum = this.consts + this.lets;
+ var constlets = (sum === 0 ?
+ "can't calculate const coverage (0 consts, 0 lets)" :
+ fmt("{0}% const coverage ({1} consts, {2} lets)",
+ Math.floor(100 * this.consts / sum), this.consts, this.lets));
+
+ return constlets + renameStr + "\n";
+};
+
+module.exports = Stats;
+
+},{"assert":213,"simple-fmt":502,"simple-is":503}],498:[function(require,module,exports){
+// alter.js
+// MIT licensed, see LICENSE file
+// Copyright (c) 2013 Olov Lassus
+
+var assert = require("assert");
+var stableSort = require("stable");
+
+// fragments is a list of {start: index, end: index, str: string to replace with}
+function alter(str, fragments) {
+ "use strict";
+
+ var isArray = Array.isArray || function(v) {
+ return Object.prototype.toString.call(v) === "[object Array]";
+ };;
+
+ assert(typeof str === "string");
+ assert(isArray(fragments));
+
+ // stableSort isn't in-place so no need to copy array first
+ var sortedFragments = stableSort(fragments, function(a, b) {
+ return a.start - b.start;
+ });
+
+ var outs = [];
+
+ var pos = 0;
+ for (var i = 0; i < sortedFragments.length; i++) {
+ var frag = sortedFragments[i];
+
+ assert(pos <= frag.start);
+ assert(frag.start <= frag.end);
+ outs.push(str.slice(pos, frag.start));
+ outs.push(frag.str);
+ pos = frag.end;
+ }
+ if (pos < str.length) {
+ outs.push(str.slice(pos));
+ }
+
+ return outs.join("");
+}
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = alter;
+}
+
+},{"assert":213,"stable":499}],499:[function(require,module,exports){
+//! stable.js 0.1.5, https://github.com/Two-Screen/stable
+//! © 2014 Angry Bytes and contributors. MIT licensed.
+
+(function() {
+
+// A stable array sort, because `Array#sort()` is not guaranteed stable.
+// This is an implementation of merge sort, without recursion.
+
+var stable = function(arr, comp) {
+ return exec(arr.slice(), comp);
+};
+
+stable.inplace = function(arr, comp) {
+ var result = exec(arr, comp);
+
+ // This simply copies back if the result isn't in the original array,
+ // which happens on an odd number of passes.
+ if (result !== arr) {
+ pass(result, null, arr.length, arr);
+ }
+
+ return arr;
+};
+
+// Execute the sort using the input array and a second buffer as work space.
+// Returns one of those two, containing the final result.
+function exec(arr, comp) {
+ if (typeof(comp) !== 'function') {
+ comp = function(a, b) {
+ return String(a).localeCompare(b);
+ };
+ }
+
+ // Short-circuit when there's nothing to sort.
+ var len = arr.length;
+ if (len <= 1) {
+ return arr;
+ }
+
+ // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.
+ // Chunks are the size of the left or right hand in merge sort.
+ // Stop when the left-hand covers all of the array.
+ var buffer = new Array(len);
+ for (var chk = 1; chk < len; chk *= 2) {
+ pass(arr, comp, chk, buffer);
+
+ var tmp = arr;
+ arr = buffer;
+ buffer = tmp;
+ }
+
+ return arr;
+}
+
+// Run a single pass with the given chunk size.
+var pass = function(arr, comp, chk, result) {
+ var len = arr.length;
+ var i = 0;
+ // Step size / double chunk size.
+ var dbl = chk * 2;
+ // Bounds of the left and right chunks.
+ var l, r, e;
+ // Iterators over the left and right chunk.
+ var li, ri;
+
+ // Iterate over pairs of chunks.
+ for (l = 0; l < len; l += dbl) {
+ r = l + chk;
+ e = r + chk;
+ if (r > len) r = len;
+ if (e > len) e = len;
+
+ // Iterate both chunks in parallel.
+ li = l;
+ ri = r;
+ while (true) {
+ // Compare the chunks.
+ if (li < r && ri < e) {
+ // This works for a regular `sort()` compatible comparator,
+ // but also for a simple comparator like: `a > b`
+ if (comp(arr[li], arr[ri]) <= 0) {
+ result[i++] = arr[li++];
+ }
+ else {
+ result[i++] = arr[ri++];
+ }
+ }
+ // Nothing to compare, just flush what's left.
+ else if (li < r) {
+ result[i++] = arr[li++];
+ }
+ else if (ri < e) {
+ result[i++] = arr[ri++];
+ }
+ // Both iterators are at the chunk ends.
+ else {
+ break;
+ }
+ }
+ }
+};
+
+// Export using CommonJS or to the window.
+if (typeof(module) !== 'undefined') {
+ module.exports = stable;
+}
+else {
+ window.stable = stable;
+}
+
+})();
+
+},{}],500:[function(require,module,exports){
+function traverse(root, options) {
+ "use strict";
+
+ options = options || {};
+ var pre = options.pre;
+ var post = options.post;
+ var skipProperty = options.skipProperty;
+
+ function visit(node, parent, prop, idx) {
+ if (!node || typeof node.type !== "string") {
+ return;
+ }
+
+ var res = undefined;
+ if (pre) {
+ res = pre(node, parent, prop, idx);
+ }
+
+ if (res !== false) {
+ for (var prop in node) {
+ if (skipProperty ? skipProperty(prop, node) : prop[0] === "$") {
+ continue;
+ }
+
+ var child = node[prop];
+
+ if (Array.isArray(child)) {
+ for (var i = 0; i < child.length; i++) {
+ visit(child[i], node, prop, i);
+ }
+ } else {
+ visit(child, node, prop);
+ }
+ }
+ }
+
+ if (post) {
+ post(node, parent, prop, idx);
+ }
+ }
+
+ visit(root, null);
+};
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = traverse;
+}
+
+},{}],501:[function(require,module,exports){
+// breakable.js
+// MIT licensed, see LICENSE file
+// Copyright (c) 2013-2014 Olov Lassus
+
+var breakable = (function() {
+ "use strict";
+
+ function Val(val, brk) {
+ this.val = val;
+ this.brk = brk;
+ }
+
+ function make_brk() {
+ return function brk(val) {
+ throw new Val(val, brk);
+ };
+ }
+
+ function breakable(fn) {
+ var brk = make_brk();
+ try {
+ return fn(brk);
+ } catch (e) {
+ if (e instanceof Val && e.brk === brk) {
+ return e.val;
+ }
+ throw e;
+ }
+ }
+
+ return breakable;
+})();
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = breakable;
+}
+
+},{}],502:[function(require,module,exports){
+// simple-fmt.js
+// MIT licensed, see LICENSE file
+// Copyright (c) 2013 Olov Lassus
+
+var fmt = (function() {
+ "use strict";
+
+ function fmt(str, var_args) {
+ var args = Array.prototype.slice.call(arguments, 1);
+ return str.replace(/\{(\d+)\}/g, function(s, match) {
+ return (match in args ? args[match] : s);
+ });
+ }
+
+ function obj(str, obj) {
+ return str.replace(/\{([_$a-zA-Z0-9][_$a-zA-Z0-9]*)\}/g, function(s, match) {
+ return (match in obj ? obj[match] : s);
+ });
+ }
+
+ function repeat(str, n) {
+ return (new Array(n + 1)).join(str);
+ }
+
+ fmt.fmt = fmt;
+ fmt.obj = obj;
+ fmt.repeat = repeat;
+ return fmt;
+})();
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = fmt;
+}
+
+},{}],503:[function(require,module,exports){
+// simple-is.js
+// MIT licensed, see LICENSE file
+// Copyright (c) 2013 Olov Lassus
+
+var is = (function() {
+ "use strict";
+
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+ var toString = Object.prototype.toString;
+ var _undefined = void 0;
+
+ return {
+ nan: function(v) {
+ return v !== v;
+ },
+ boolean: function(v) {
+ return typeof v === "boolean";
+ },
+ number: function(v) {
+ return typeof v === "number";
+ },
+ string: function(v) {
+ return typeof v === "string";
+ },
+ fn: function(v) {
+ return typeof v === "function";
+ },
+ object: function(v) {
+ return v !== null && typeof v === "object";
+ },
+ primitive: function(v) {
+ var t = typeof v;
+ return v === null || v === _undefined ||
+ t === "boolean" || t === "number" || t === "string";
+ },
+ array: Array.isArray || function(v) {
+ return toString.call(v) === "[object Array]";
+ },
+ finitenumber: function(v) {
+ return typeof v === "number" && isFinite(v);
+ },
+ someof: function(v, values) {
+ return values.indexOf(v) >= 0;
+ },
+ noneof: function(v, values) {
+ return values.indexOf(v) === -1;
+ },
+ own: function(obj, prop) {
+ return hasOwnProperty.call(obj, prop);
+ },
+ };
+})();
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = is;
+}
+
+},{}],504:[function(require,module,exports){
+// stringmap.js
+// MIT licensed, see LICENSE file
+// Copyright (c) 2013 Olov Lassus
+
+var StringMap = (function() {
+ "use strict";
+
+ // to save us a few characters
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+ var create = (function() {
+ function hasOwnEnumerableProps(obj) {
+ for (var prop in obj) {
+ if (hasOwnProperty.call(obj, prop)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ // FF <= 3.6:
+ // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true
+ // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false
+ function hasOwnPollutedProps(obj) {
+ return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__");
+ }
+
+ var useObjectCreate = false;
+ if (typeof Object.create === "function") {
+ if (!hasOwnEnumerableProps(Object.create(null))) {
+ useObjectCreate = true;
+ }
+ }
+ if (useObjectCreate === false) {
+ if (hasOwnEnumerableProps({})) {
+ throw new Error("StringMap environment error 0, please file a bug at https://github.com/olov/stringmap/issues");
+ }
+ }
+ // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims)
+
+ var o = (useObjectCreate ? Object.create(null) : {});
+ var useProtoClear = false;
+ if (hasOwnPollutedProps(o)) {
+ o.__proto__ = null;
+ if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) {
+ throw new Error("StringMap environment error 1, please file a bug at https://github.com/olov/stringmap/issues");
+ }
+ useProtoClear = true;
+ }
+ // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims)
+
+ return function() {
+ var o = (useObjectCreate ? Object.create(null) : {});
+ if (useProtoClear) {
+ o.__proto__ = null;
+ }
+ return o;
+ };
+ })();
+
+ // stringmap ctor
+ function stringmap(optional_object) {
+ // use with or without new
+ if (!(this instanceof stringmap)) {
+ return new stringmap(optional_object);
+ }
+ this.obj = create();
+ this.hasProto = false; // false (no __proto__ key) or true (has __proto__ key)
+ this.proto = undefined; // value for __proto__ key when hasProto is true, undefined otherwise
+
+ if (optional_object) {
+ this.setMany(optional_object);
+ }
+ };
+
+ // primitive methods that deals with data representation
+ stringmap.prototype.has = function(key) {
+ // The type-check of key in has, get, set and delete is important because otherwise an object
+ // {toString: function() { return "__proto__"; }} can avoid the key === "__proto__" test.
+ // The alternative to type-checking would be to force string conversion, i.e. key = String(key);
+ if (typeof key !== "string") {
+ throw new Error("StringMap expected string key");
+ }
+ return (key === "__proto__" ?
+ this.hasProto :
+ hasOwnProperty.call(this.obj, key));
+ };
+
+ stringmap.prototype.get = function(key) {
+ if (typeof key !== "string") {
+ throw new Error("StringMap expected string key");
+ }
+ return (key === "__proto__" ?
+ this.proto :
+ (hasOwnProperty.call(this.obj, key) ? this.obj[key] : undefined));
+ };
+
+ stringmap.prototype.set = function(key, value) {
+ if (typeof key !== "string") {
+ throw new Error("StringMap expected string key");
+ }
+ if (key === "__proto__") {
+ this.hasProto = true;
+ this.proto = value;
+ } else {
+ this.obj[key] = value;
+ }
+ };
+
+ stringmap.prototype.remove = function(key) {
+ if (typeof key !== "string") {
+ throw new Error("StringMap expected string key");
+ }
+ var didExist = this.has(key);
+ if (key === "__proto__") {
+ this.hasProto = false;
+ this.proto = undefined;
+ } else {
+ delete this.obj[key];
+ }
+ return didExist;
+ };
+
+ // alias remove to delete but beware:
+ // sm.delete("key"); // OK in ES5 and later
+ // sm['delete']("key"); // OK in all ES versions
+ // sm.remove("key"); // OK in all ES versions
+ stringmap.prototype['delete'] = stringmap.prototype.remove;
+
+ stringmap.prototype.isEmpty = function() {
+ for (var key in this.obj) {
+ if (hasOwnProperty.call(this.obj, key)) {
+ return false;
+ }
+ }
+ return !this.hasProto;
+ };
+
+ stringmap.prototype.size = function() {
+ var len = 0;
+ for (var key in this.obj) {
+ if (hasOwnProperty.call(this.obj, key)) {
+ ++len;
+ }
+ }
+ return (this.hasProto ? len + 1 : len);
+ };
+
+ stringmap.prototype.keys = function() {
+ var keys = [];
+ for (var key in this.obj) {
+ if (hasOwnProperty.call(this.obj, key)) {
+ keys.push(key);
+ }
+ }
+ if (this.hasProto) {
+ keys.push("__proto__");
+ }
+ return keys;
+ };
+
+ stringmap.prototype.values = function() {
+ var values = [];
+ for (var key in this.obj) {
+ if (hasOwnProperty.call(this.obj, key)) {
+ values.push(this.obj[key]);
+ }
+ }
+ if (this.hasProto) {
+ values.push(this.proto);
+ }
+ return values;
+ };
+
+ stringmap.prototype.items = function() {
+ var items = [];
+ for (var key in this.obj) {
+ if (hasOwnProperty.call(this.obj, key)) {
+ items.push([key, this.obj[key]]);
+ }
+ }
+ if (this.hasProto) {
+ items.push(["__proto__", this.proto]);
+ }
+ return items;
+ };
+
+
+ // methods that rely on the above primitives
+ stringmap.prototype.setMany = function(object) {
+ if (object === null || (typeof object !== "object" && typeof object !== "function")) {
+ throw new Error("StringMap expected Object");
+ }
+ for (var key in object) {
+ if (hasOwnProperty.call(object, key)) {
+ this.set(key, object[key]);
+ }
+ }
+ return this;
+ };
+
+ stringmap.prototype.merge = function(other) {
+ var keys = other.keys();
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ this.set(key, other.get(key));
+ }
+ return this;
+ };
+
+ stringmap.prototype.map = function(fn) {
+ var keys = this.keys();
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ keys[i] = fn(this.get(key), key); // re-use keys array for results
+ }
+ return keys;
+ };
+
+ stringmap.prototype.forEach = function(fn) {
+ var keys = this.keys();
+ for (var i = 0; i < keys.length; i++) {
+ var key = keys[i];
+ fn(this.get(key), key);
+ }
+ };
+
+ stringmap.prototype.clone = function() {
+ var other = stringmap();
+ return other.merge(this);
+ };
+
+ stringmap.prototype.toString = function() {
+ var self = this;
+ return "{" + this.keys().map(function(key) {
+ return JSON.stringify(key) + ":" + JSON.stringify(self.get(key));
+ }).join(",") + "}";
+ };
+
+ return stringmap;
+})();
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = StringMap;
+}
+
+},{}],505:[function(require,module,exports){
+// stringset.js
+// MIT licensed, see LICENSE file
+// Copyright (c) 2013 Olov Lassus
+
+var StringSet = (function() {
+ "use strict";
+
+ // to save us a few characters
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
+
+ var create = (function() {
+ function hasOwnEnumerableProps(obj) {
+ for (var prop in obj) {
+ if (hasOwnProperty.call(obj, prop)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ // FF <= 3.6:
+ // o = {}; o.hasOwnProperty("__proto__" or "__count__" or "__parent__") => true
+ // o = {"__proto__": null}; Object.prototype.hasOwnProperty.call(o, "__proto__" or "__count__" or "__parent__") => false
+ function hasOwnPollutedProps(obj) {
+ return hasOwnProperty.call(obj, "__count__") || hasOwnProperty.call(obj, "__parent__");
+ }
+
+ var useObjectCreate = false;
+ if (typeof Object.create === "function") {
+ if (!hasOwnEnumerableProps(Object.create(null))) {
+ useObjectCreate = true;
+ }
+ }
+ if (useObjectCreate === false) {
+ if (hasOwnEnumerableProps({})) {
+ throw new Error("StringSet environment error 0, please file a bug at https://github.com/olov/stringset/issues");
+ }
+ }
+ // no throw yet means we can create objects without own enumerable props (safe-guard against VMs and shims)
+
+ var o = (useObjectCreate ? Object.create(null) : {});
+ var useProtoClear = false;
+ if (hasOwnPollutedProps(o)) {
+ o.__proto__ = null;
+ if (hasOwnEnumerableProps(o) || hasOwnPollutedProps(o)) {
+ throw new Error("StringSet environment error 1, please file a bug at https://github.com/olov/stringset/issues");
+ }
+ useProtoClear = true;
+ }
+ // no throw yet means we can create objects without own polluted props (safe-guard against VMs and shims)
+
+ return function() {
+ var o = (useObjectCreate ? Object.create(null) : {});
+ if (useProtoClear) {
+ o.__proto__ = null;
+ }
+ return o;
+ };
+ })();
+
+ // stringset ctor
+ function stringset(optional_array) {
+ // use with or without new
+ if (!(this instanceof stringset)) {
+ return new stringset(optional_array);
+ }
+ this.obj = create();
+ this.hasProto = false; // false (no __proto__ item) or true (has __proto__ item)
+
+ if (optional_array) {
+ this.addMany(optional_array);
+ }
+ };
+
+ // primitive methods that deals with data representation
+ stringset.prototype.has = function(item) {
+ // The type-check of item in has, get, set and delete is important because otherwise an object
+ // {toString: function() { return "__proto__"; }} can avoid the item === "__proto__" test.
+ // The alternative to type-checking would be to force string conversion, i.e. item = String(item);
+ if (typeof item !== "string") {
+ throw new Error("StringSet expected string item");
+ }
+ return (item === "__proto__" ?
+ this.hasProto :
+ hasOwnProperty.call(this.obj, item));
+ };
+
+ stringset.prototype.add = function(item) {
+ if (typeof item !== "string") {
+ throw new Error("StringSet expected string item");
+ }
+ if (item === "__proto__") {
+ this.hasProto = true;
+ } else {
+ this.obj[item] = true;
+ }
+ };
+
+ stringset.prototype.remove = function(item) {
+ if (typeof item !== "string") {
+ throw new Error("StringSet expected string item");
+ }
+ var didExist = this.has(item);
+ if (item === "__proto__") {
+ this.hasProto = false;
+ } else {
+ delete this.obj[item];
+ }
+ return didExist;
+ };
+
+ // alias remove to delete but beware:
+ // ss.delete("key"); // OK in ES5 and later
+ // ss['delete']("key"); // OK in all ES versions
+ // ss.remove("key"); // OK in all ES versions
+ stringset.prototype['delete'] = stringset.prototype.remove;
+
+ stringset.prototype.isEmpty = function() {
+ for (var item in this.obj) {
+ if (hasOwnProperty.call(this.obj, item)) {
+ return false;
+ }
+ }
+ return !this.hasProto;
+ };
+
+ stringset.prototype.size = function() {
+ var len = 0;
+ for (var item in this.obj) {
+ if (hasOwnProperty.call(this.obj, item)) {
+ ++len;
+ }
+ }
+ return (this.hasProto ? len + 1 : len);
+ };
+
+ stringset.prototype.items = function() {
+ var items = [];
+ for (var item in this.obj) {
+ if (hasOwnProperty.call(this.obj, item)) {
+ items.push(item);
+ }
+ }
+ if (this.hasProto) {
+ items.push("__proto__");
+ }
+ return items;
+ };
+
+
+ // methods that rely on the above primitives
+ stringset.prototype.addMany = function(items) {
+ if (!Array.isArray(items)) {
+ throw new Error("StringSet expected array");
+ }
+ for (var i = 0; i < items.length; i++) {
+ this.add(items[i]);
+ }
+ return this;
+ };
+
+ stringset.prototype.merge = function(other) {
+ this.addMany(other.items());
+ return this;
+ };
+
+ stringset.prototype.clone = function() {
+ var other = stringset();
+ return other.merge(this);
+ };
+
+ stringset.prototype.toString = function() {
+ return "{" + this.items().map(JSON.stringify).join(",") + "}";
+ };
+
+ return stringset;
+})();
+
+if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
+ module.exports = StringSet;
+}
+
+},{}],506:[function(require,module,exports){
+var assert = require("assert");
+var types = require("./types");
+var n = types.namedTypes;
+var isArray = types.builtInTypes.array;
+var isObject = types.builtInTypes.object;
+var linesModule = require("./lines");
+var fromString = linesModule.fromString;
+var Lines = linesModule.Lines;
+var concat = linesModule.concat;
+var util = require("./util");
+var comparePos = util.comparePos;
+var childNodesCacheKey = require("private").makeUniqueKey();
+
+// TODO Move a non-caching implementation of this function into ast-types,
+// and implement a caching wrapper function here.
+function getSortedChildNodes(node, resultArray) {
+ if (!node) {
+ return;
+ }
+
+ // The .loc checks below are sensitive to some of the problems that
+ // are fixed by this utility function. Specifically, if it decides to
+ // set node.loc to null, indicating that the node's .loc information
+ // is unreliable, then we don't want to add node to the resultArray.
+ util.fixFaultyLocations(node);
+
+ if (resultArray) {
+ if (n.Node.check(node) &&
+ n.SourceLocation.check(node.loc)) {
+ // This reverse insertion sort almost always takes constant
+ // time because we almost always (maybe always?) append the
+ // nodes in order anyway.
+ for (var i = resultArray.length - 1; i >= 0; --i) {
+ if (comparePos(resultArray[i].loc.end,
+ node.loc.start) <= 0) {
+ break;
+ }
+ }
+ resultArray.splice(i + 1, 0, node);
+ return;
+ }
+ } else if (node[childNodesCacheKey]) {
+ return node[childNodesCacheKey];
+ }
+
+ var names;
+ if (isArray.check(node)) {
+ names = Object.keys(node);
+ } else if (isObject.check(node)) {
+ names = types.getFieldNames(node);
+ } else {
+ return;
+ }
+
+ if (!resultArray) {
+ Object.defineProperty(node, childNodesCacheKey, {
+ value: resultArray = [],
+ enumerable: false
+ });
+ }
+
+ for (var i = 0, nameCount = names.length; i < nameCount; ++i) {
+ getSortedChildNodes(node[names[i]], resultArray);
+ }
+
+ return resultArray;
+}
+
+// As efficiently as possible, decorate the comment object with
+// .precedingNode, .enclosingNode, and/or .followingNode properties, at
+// least one of which is guaranteed to be defined.
+function decorateComment(node, comment) {
+ var childNodes = getSortedChildNodes(node);
+
+ // Time to dust off the old binary search robes and wizard hat.
+ var left = 0, right = childNodes.length;
+ while (left < right) {
+ var middle = (left + right) >> 1;
+ var child = childNodes[middle];
+
+ if (comparePos(child.loc.start, comment.loc.start) <= 0 &&
+ comparePos(comment.loc.end, child.loc.end) <= 0) {
+ // The comment is completely contained by this child node.
+ decorateComment(comment.enclosingNode = child, comment);
+ return; // Abandon the binary search at this level.
+ }
+
+ if (comparePos(child.loc.end, comment.loc.start) <= 0) {
+ // This child node falls completely before the comment.
+ // Because we will never consider this node or any nodes
+ // before it again, this node must be the closest preceding
+ // node we have encountered so far.
+ var precedingNode = child;
+ left = middle + 1;
+ continue;
+ }
+
+ if (comparePos(comment.loc.end, child.loc.start) <= 0) {
+ // This child node falls completely after the comment.
+ // Because we will never consider this node or any nodes after
+ // it again, this node must be the closest following node we
+ // have encountered so far.
+ var followingNode = child;
+ right = middle;
+ continue;
+ }
+
+ throw new Error("Comment location overlaps with node location");
+ }
+
+ if (precedingNode) {
+ comment.precedingNode = precedingNode;
+ }
+
+ if (followingNode) {
+ comment.followingNode = followingNode;
+ }
+}
+
+exports.attach = function(comments, ast, lines) {
+ if (!isArray.check(comments)) {
+ return;
+ }
+
+ var tiesToBreak = [];
+
+ comments.forEach(function(comment) {
+ comment.loc.lines = lines;
+ decorateComment(ast, comment);
+
+ var pn = comment.precedingNode;
+ var en = comment.enclosingNode;
+ var fn = comment.followingNode;
+
+ if (pn && fn) {
+ var tieCount = tiesToBreak.length;
+ if (tieCount > 0) {
+ var lastTie = tiesToBreak[tieCount - 1];
+
+ assert.strictEqual(
+ lastTie.precedingNode === comment.precedingNode,
+ lastTie.followingNode === comment.followingNode
+ );
+
+ if (lastTie.followingNode !== comment.followingNode) {
+ breakTies(tiesToBreak, lines);
+ }
+ }
+
+ tiesToBreak.push(comment);
+
+ } else if (pn) {
+ // No contest: we have a trailing comment.
+ breakTies(tiesToBreak, lines);
+ addTrailingComment(pn, comment);
+
+ } else if (fn) {
+ // No contest: we have a leading comment.
+ breakTies(tiesToBreak, lines);
+ addLeadingComment(fn, comment);
+
+ } else if (en) {
+ // The enclosing node has no child nodes at all, so what we
+ // have here is a dangling comment, e.g. [/* crickets */].
+ breakTies(tiesToBreak, lines);
+ addDanglingComment(en, comment);
+
+ } else {
+ throw new Error("AST contains no nodes at all?");
+ }
+ });
+
+ breakTies(tiesToBreak, lines);
+
+ comments.forEach(function(comment) {
+ // These node references were useful for breaking ties, but we
+ // don't need them anymore, and they create cycles in the AST that
+ // may lead to infinite recursion if we don't delete them here.
+ delete comment.precedingNode;
+ delete comment.enclosingNode;
+ delete comment.followingNode;
+ });
+};
+
+function breakTies(tiesToBreak, lines) {
+ var tieCount = tiesToBreak.length;
+ if (tieCount === 0) {
+ return;
+ }
+
+ var pn = tiesToBreak[0].precedingNode;
+ var fn = tiesToBreak[0].followingNode;
+ var gapEndPos = fn.loc.start;
+
+ // Iterate backwards through tiesToBreak, examining the gaps
+ // between the tied comments. In order to qualify as leading, a
+ // comment must be separated from fn by an unbroken series of
+ // whitespace-only gaps (or other comments).
+ for (var indexOfFirstLeadingComment = tieCount;
+ indexOfFirstLeadingComment > 0;
+ --indexOfFirstLeadingComment) {
+ var comment = tiesToBreak[indexOfFirstLeadingComment - 1];
+ assert.strictEqual(comment.precedingNode, pn);
+ assert.strictEqual(comment.followingNode, fn);
+
+ var gap = lines.sliceString(comment.loc.end, gapEndPos);
+ if (/\S/.test(gap)) {
+ // The gap string contained something other than whitespace.
+ break;
+ }
+
+ gapEndPos = comment.loc.start;
+ }
+
+ while (indexOfFirstLeadingComment <= tieCount &&
+ (comment = tiesToBreak[indexOfFirstLeadingComment]) &&
+ // If the comment is a //-style comment and indented more
+ // deeply than the node itself, reconsider it as trailing.
+ comment.type === "Line" &&
+ comment.loc.start.column > fn.loc.start.column) {
+ ++indexOfFirstLeadingComment;
+ }
+
+ tiesToBreak.forEach(function(comment, i) {
+ if (i < indexOfFirstLeadingComment) {
+ addTrailingComment(pn, comment);
+ } else {
+ addLeadingComment(fn, comment);
+ }
+ });
+
+ tiesToBreak.length = 0;
+}
+
+function addCommentHelper(node, comment) {
+ var comments = node.comments || (node.comments = []);
+ comments.push(comment);
+}
+
+function addLeadingComment(node, comment) {
+ comment.leading = true;
+ comment.trailing = false;
+ addCommentHelper(node, comment);
+}
+
+function addDanglingComment(node, comment) {
+ comment.leading = false;
+ comment.trailing = false;
+ addCommentHelper(node, comment);
+}
+
+function addTrailingComment(node, comment) {
+ comment.leading = false;
+ comment.trailing = true;
+ addCommentHelper(node, comment);
+}
+
+function printLeadingComment(commentPath, print) {
+ var comment = commentPath.getValue();
+ n.Comment.assert(comment);
+
+ var loc = comment.loc;
+ var lines = loc && loc.lines;
+ var parts = [print(commentPath)];
+
+ if (comment.trailing) {
+ // When we print trailing comments as leading comments, we don't
+ // want to bring any trailing spaces along.
+ parts.push("\n");
+
+ } else if (lines instanceof Lines) {
+ var trailingSpace = lines.slice(
+ loc.end,
+ lines.skipSpaces(loc.end)
+ );
+
+ if (trailingSpace.length === 1) {
+ // If the trailing space contains no newlines, then we want to
+ // preserve it exactly as we found it.
+ parts.push(trailingSpace);
+ } else {
+ // If the trailing space contains newlines, then replace it
+ // with just that many newlines, with all other spaces removed.
+ parts.push(new Array(trailingSpace.length).join("\n"));
+ }
+
+ } else {
+ parts.push("\n");
+ }
+
+ return concat(parts);
+}
+
+function printTrailingComment(commentPath, print) {
+ var comment = commentPath.getValue(commentPath);
+ n.Comment.assert(comment);
+
+ var loc = comment.loc;
+ var lines = loc && loc.lines;
+ var parts = [];
+
+ if (lines instanceof Lines) {
+ var fromPos = lines.skipSpaces(loc.start, true) || lines.firstPos();
+ var leadingSpace = lines.slice(fromPos, loc.start);
+
+ if (leadingSpace.length === 1) {
+ // If the leading space contains no newlines, then we want to
+ // preserve it exactly as we found it.
+ parts.push(leadingSpace);
+ } else {
+ // If the leading space contains newlines, then replace it
+ // with just that many newlines, sans all other spaces.
+ parts.push(new Array(leadingSpace.length).join("\n"));
+ }
+ }
+
+ parts.push(print(commentPath));
+
+ return concat(parts);
+}
+
+exports.printComments = function(path, print) {
+ var value = path.getValue();
+ var innerLines = print(path);
+ var comments = n.Node.check(value) &&
+ types.getFieldValue(value, "comments");
+
+ if (!comments || comments.length === 0) {
+ return innerLines;
+ }
+
+ var leadingParts = [];
+ var trailingParts = [innerLines];
+
+ path.each(function(commentPath) {
+ var comment = commentPath.getValue();
+ var leading = types.getFieldValue(comment, "leading");
+ var trailing = types.getFieldValue(comment, "trailing");
+
+ if (leading || (trailing && comment.type !== "Block")) {
+ leadingParts.push(printLeadingComment(commentPath, print));
+ } else if (trailing) {
+ assert.strictEqual(comment.type, "Block");
+ trailingParts.push(printTrailingComment(commentPath, print));
+ }
+ }, "comments");
+
+ leadingParts.push.apply(leadingParts, trailingParts);
+ return concat(leadingParts);
+};
+
+},{"./lines":508,"./types":514,"./util":515,"assert":213,"private":484}],507:[function(require,module,exports){
+var assert = require("assert");
+var types = require("./types");
+var n = types.namedTypes;
+var Node = n.Node;
+var isArray = types.builtInTypes.array;
+var isNumber = types.builtInTypes.number;
+
+function FastPath(value) {
+ assert.ok(this instanceof FastPath);
+ this.stack = [value];
+}
+
+var FPp = FastPath.prototype;
+module.exports = FastPath;
+
+// Static convenience function for coercing a value to a FastPath.
+FastPath.from = function(obj) {
+ if (obj instanceof FastPath) {
+ // Return a defensive copy of any existing FastPath instances.
+ return obj.copy();
+ }
+
+ if (obj instanceof types.NodePath) {
+ // For backwards compatibility, unroll NodePath instances into
+ // lightweight FastPath [..., name, value] stacks.
+ var copy = Object.create(FastPath.prototype);
+ var stack = [obj.value];
+ for (var pp; (pp = obj.parentPath); obj = pp)
+ stack.push(obj.name, pp.value);
+ copy.stack = stack.reverse();
+ return copy;
+ }
+
+ // Otherwise use obj as the value of the new FastPath instance.
+ return new FastPath(obj);
+};
+
+FPp.copy = function copy() {
+ var copy = Object.create(FastPath.prototype);
+ copy.stack = this.stack.slice(0);
+ return copy;
+};
+
+// The name of the current property is always the penultimate element of
+// this.stack, and always a String.
+FPp.getName = function getName() {
+ var s = this.stack;
+ var len = s.length;
+ if (len > 1) {
+ return s[len - 2];
+ }
+ // Since the name is always a string, null is a safe sentinel value to
+ // return if we do not know the name of the (root) value.
+ return null;
+};
+
+// The value of the current property is always the final element of
+// this.stack.
+FPp.getValue = function getValue() {
+ var s = this.stack;
+ return s[s.length - 1];
+};
+
+function getNodeHelper(path, count) {
+ var s = path.stack;
+
+ for (var i = s.length - 1; i >= 0; i -= 2) {
+ var value = s[i];
+ if (n.Node.check(value) && --count < 0) {
+ return value;
+ }
+ }
+
+ return null;
+}
+
+FPp.getNode = function getNode(count) {
+ return getNodeHelper(this, ~~count);
+};
+
+FPp.getParentNode = function getParentNode(count) {
+ return getNodeHelper(this, ~~count + 1);
+};
+
+// The length of the stack can be either even or odd, depending on whether
+// or not we have a name for the root value. The difference between the
+// index of the root value and the index of the final value is always
+// even, though, which allows us to return the root value in constant time
+// (i.e. without iterating backwards through the stack).
+FPp.getRootValue = function getRootValue() {
+ var s = this.stack;
+ if (s.length % 2 === 0) {
+ return s[1];
+ }
+ return s[0];
+};
+
+// Temporarily push properties named by string arguments given after the
+// callback function onto this.stack, then call the callback with a
+// reference to this (modified) FastPath object. Note that the stack will
+// be restored to its original state after the callback is finished, so it
+// is probably a mistake to retain a reference to the path.
+FPp.call = function call(callback/*, name1, name2, ... */) {
+ var s = this.stack;
+ var origLen = s.length;
+ var value = s[origLen - 1];
+ var argc = arguments.length;
+ for (var i = 1; i < argc; ++i) {
+ var name = arguments[i];
+ value = value[name];
+ s.push(name, value);
+ }
+ var result = callback(this);
+ s.length = origLen;
+ return result;
+};
+
+// Similar to FastPath.prototype.call, except that the value obtained by
+// accessing this.getValue()[name1][name2]... should be array-like. The
+// callback will be called with a reference to this path object for each
+// element of the array.
+FPp.each = function each(callback/*, name1, name2, ... */) {
+ var s = this.stack;
+ var origLen = s.length;
+ var value = s[origLen - 1];
+ var argc = arguments.length;
+
+ for (var i = 1; i < argc; ++i) {
+ var name = arguments[i];
+ value = value[name];
+ s.push(name, value);
+ }
+
+ for (var i = 0; i < value.length; ++i) {
+ if (i in value) {
+ s.push(i, value[i]);
+ // If the callback needs to know the value of i, call
+ // path.getName(), assuming path is the parameter name.
+ callback(this);
+ s.length -= 2;
+ }
+ }
+
+ s.length = origLen;
+};
+
+// Similar to FastPath.prototype.each, except that the results of the
+// callback function invocations are stored in an array and returned at
+// the end of the iteration.
+FPp.map = function map(callback/*, name1, name2, ... */) {
+ var s = this.stack;
+ var origLen = s.length;
+ var value = s[origLen - 1];
+ var argc = arguments.length;
+
+ for (var i = 1; i < argc; ++i) {
+ var name = arguments[i];
+ value = value[name];
+ s.push(name, value);
+ }
+
+ var result = new Array(value.length);
+
+ for (var i = 0; i < value.length; ++i) {
+ if (i in value) {
+ s.push(i, value[i]);
+ result[i] = callback(this, i);
+ s.length -= 2;
+ }
+ }
+
+ s.length = origLen;
+
+ return result;
+};
+
+// Inspired by require("ast-types").NodePath.prototype.needsParens, but
+// more efficient because we're iterating backwards through a stack.
+FPp.needsParens = function(assumeExpressionContext) {
+ var parent = this.getParentNode();
+ if (!parent) {
+ return false;
+ }
+
+ var name = this.getName();
+ var node = this.getNode();
+
+ // If the value of this path is some child of a Node and not a Node
+ // itself, then it doesn't need parentheses. Only Node objects (in
+ // fact, only Expression nodes) need parentheses.
+ if (this.getValue() !== node) {
+ return false;
+ }
+
+ // Only expressions need parentheses.
+ if (!n.Expression.check(node)) {
+ return false;
+ }
+
+ // Identifiers never need parentheses.
+ if (node.type === "Identifier") {
+ return false;
+ }
+
+ switch (node.type) {
+ case "UnaryExpression":
+ case "SpreadElement":
+ case "SpreadProperty":
+ return parent.type === "MemberExpression"
+ && name === "object"
+ && parent.object === node;
+
+ case "BinaryExpression":
+ case "LogicalExpression":
+ switch (parent.type) {
+ case "CallExpression":
+ return name === "callee"
+ && parent.callee === node;
+
+ case "UnaryExpression":
+ case "SpreadElement":
+ case "SpreadProperty":
+ return true;
+
+ case "MemberExpression":
+ return name === "object"
+ && parent.object === node;
+
+ case "BinaryExpression":
+ case "LogicalExpression":
+ var po = parent.operator;
+ var pp = PRECEDENCE[po];
+ var no = node.operator;
+ var np = PRECEDENCE[no];
+
+ if (pp > np) {
+ return true;
+ }
+
+ if (pp === np && name === "right") {
+ assert.strictEqual(parent.right, node);
+ return true;
+ }
+
+ default:
+ return false;
+ }
+
+ case "SequenceExpression":
+ switch (parent.type) {
+ case "ForStatement":
+ // Although parentheses wouldn't hurt around sequence
+ // expressions in the head of for loops, traditional style
+ // dictates that e.g. i++, j++ should not be wrapped with
+ // parentheses.
+ return false;
+
+ case "ExpressionStatement":
+ return name !== "expression";
+
+ default:
+ // Otherwise err on the side of overparenthesization, adding
+ // explicit exceptions above if this proves overzealous.
+ return true;
+ }
+
+ case "YieldExpression":
+ switch (parent.type) {
+ case "BinaryExpression":
+ case "LogicalExpression":
+ case "UnaryExpression":
+ case "SpreadElement":
+ case "SpreadProperty":
+ case "CallExpression":
+ case "MemberExpression":
+ case "NewExpression":
+ case "ConditionalExpression":
+ case "YieldExpression":
+ return true;
+
+ default:
+ return false;
+ }
+
+ case "Literal":
+ return parent.type === "MemberExpression"
+ && isNumber.check(node.value)
+ && name === "object"
+ && parent.object === node;
+
+ case "AssignmentExpression":
+ case "ConditionalExpression":
+ switch (parent.type) {
+ case "UnaryExpression":
+ case "SpreadElement":
+ case "SpreadProperty":
+ case "BinaryExpression":
+ case "LogicalExpression":
+ return true;
+
+ case "CallExpression":
+ return name === "callee"
+ && parent.callee === node;
+
+ case "ConditionalExpression":
+ return name === "test"
+ && parent.test === node;
+
+ case "MemberExpression":
+ return name === "object"
+ && parent.object === node;
+
+ default:
+ return false;
+ }
+
+ case "ArrowFunctionExpression":
+ return isBinary(parent);
+
+ case "ObjectExpression":
+ if (parent.type === "ArrowFunctionExpression" &&
+ name === "body") {
+ return true;
+ }
+
+ default:
+ if (parent.type === "NewExpression" &&
+ name === "callee" &&
+ parent.callee === node) {
+ return containsCallExpression(node);
+ }
+ }
+
+ if (assumeExpressionContext !== true &&
+ !this.canBeFirstInStatement() &&
+ this.firstInStatement())
+ return true;
+
+ return false;
+};
+
+function isBinary(node) {
+ return n.BinaryExpression.check(node)
+ || n.LogicalExpression.check(node);
+}
+
+function isUnaryLike(node) {
+ return n.UnaryExpression.check(node)
+ // I considered making SpreadElement and SpreadProperty subtypes
+ // of UnaryExpression, but they're not really Expression nodes.
+ || (n.SpreadElement && n.SpreadElement.check(node))
+ || (n.SpreadProperty && n.SpreadProperty.check(node));
+}
+
+var PRECEDENCE = {};
+[["||"],
+ ["&&"],
+ ["|"],
+ ["^"],
+ ["&"],
+ ["==", "===", "!=", "!=="],
+ ["<", ">", "<=", ">=", "in", "instanceof"],
+ [">>", "<<", ">>>"],
+ ["+", "-"],
+ ["*", "/", "%"]
+].forEach(function(tier, i) {
+ tier.forEach(function(op) {
+ PRECEDENCE[op] = i;
+ });
+});
+
+function containsCallExpression(node) {
+ if (n.CallExpression.check(node)) {
+ return true;
+ }
+
+ if (isArray.check(node)) {
+ return node.some(containsCallExpression);
+ }
+
+ if (n.Node.check(node)) {
+ return types.someField(node, function(name, child) {
+ return containsCallExpression(child);
+ });
+ }
+
+ return false;
+}
+
+FPp.canBeFirstInStatement = function() {
+ var node = this.getNode();
+ return !n.FunctionExpression.check(node)
+ && !n.ObjectExpression.check(node);
+};
+
+FPp.firstInStatement = function() {
+ var s = this.stack;
+ var parentName, parent;
+ var childName, child;
+
+ for (var i = s.length - 1; i >= 0; i -= 2) {
+ if (n.Node.check(s[i])) {
+ childName = parentName;
+ child = parent;
+ parentName = s[i - 1];
+ parent = s[i];
+ }
+
+ if (!parent || !child) {
+ continue;
+ }
+
+ if (n.BlockStatement.check(parent) &&
+ parentName === "body" &&
+ childName === 0) {
+ assert.strictEqual(parent.body[0], child);
+ return true;
+ }
+
+ if (n.ExpressionStatement.check(parent) &&
+ childName === "expression") {
+ assert.strictEqual(parent.expression, child);
+ return true;
+ }
+
+ if (n.SequenceExpression.check(parent) &&
+ parentName === "expressions" &&
+ childName === 0) {
+ assert.strictEqual(parent.expressions[0], child);
+ continue;
+ }
+
+ if (n.CallExpression.check(parent) &&
+ childName === "callee") {
+ assert.strictEqual(parent.callee, child);
+ continue;
+ }
+
+ if (n.MemberExpression.check(parent) &&
+ childName === "object") {
+ assert.strictEqual(parent.object, child);
+ continue;
+ }
+
+ if (n.ConditionalExpression.check(parent) &&
+ childName === "test") {
+ assert.strictEqual(parent.test, child);
+ continue;
+ }
+
+ if (isBinary(parent) &&
+ childName === "left") {
+ assert.strictEqual(parent.left, child);
+ continue;
+ }
+
+ if (n.UnaryExpression.check(parent) &&
+ !parent.prefix &&
+ childName === "argument") {
+ assert.strictEqual(parent.argument, child);
+ continue;
+ }
+
+ return false;
+ }
+
+ return true;
+};
+
+},{"./types":514,"assert":213}],508:[function(require,module,exports){
+var assert = require("assert");
+var sourceMap = require("source-map");
+var normalizeOptions = require("./options").normalize;
+var secretKey = require("private").makeUniqueKey();
+var types = require("./types");
+var isString = types.builtInTypes.string;
+var comparePos = require("./util").comparePos;
+var Mapping = require("./mapping");
+
+// Goals:
+// 1. Minimize new string creation.
+// 2. Keep (de)identation O(lines) time.
+// 3. Permit negative indentations.
+// 4. Enforce immutability.
+// 5. No newline characters.
+
+function getSecret(lines) {
+ return lines[secretKey];
+}
+
+function Lines(infos, sourceFileName) {
+ assert.ok(this instanceof Lines);
+ assert.ok(infos.length > 0);
+
+ if (sourceFileName) {
+ isString.assert(sourceFileName);
+ } else {
+ sourceFileName = null;
+ }
+
+ Object.defineProperty(this, secretKey, {
+ value: {
+ infos: infos,
+ mappings: [],
+ name: sourceFileName,
+ cachedSourceMap: null
+ }
+ });
+
+ if (sourceFileName) {
+ getSecret(this).mappings.push(new Mapping(this, {
+ start: this.firstPos(),
+ end: this.lastPos()
+ }));
+ }
+}
+
+// Exposed for instanceof checks. The fromString function should be used
+// to create new Lines objects.
+exports.Lines = Lines;
+var Lp = Lines.prototype;
+
+// These properties used to be assigned to each new object in the Lines
+// constructor, but we can more efficiently stuff them into the secret and
+// let these lazy accessors compute their values on-the-fly.
+Object.defineProperties(Lp, {
+ length: {
+ get: function() {
+ return getSecret(this).infos.length;
+ }
+ },
+
+ name: {
+ get: function() {
+ return getSecret(this).name;
+ }
+ }
+});
+
+function copyLineInfo(info) {
+ return {
+ line: info.line,
+ indent: info.indent,
+ sliceStart: info.sliceStart,
+ sliceEnd: info.sliceEnd
+ };
+}
+
+var fromStringCache = {};
+var hasOwn = fromStringCache.hasOwnProperty;
+var maxCacheKeyLen = 10;
+
+function countSpaces(spaces, tabWidth) {
+ var count = 0;
+ var len = spaces.length;
+
+ for (var i = 0; i < len; ++i) {
+ switch (spaces.charCodeAt(i)) {
+ case 9: // '\t'
+ assert.strictEqual(typeof tabWidth, "number");
+ assert.ok(tabWidth > 0);
+
+ var next = Math.ceil(count / tabWidth) * tabWidth;
+ if (next === count) {
+ count += tabWidth;
+ } else {
+ count = next;
+ }
+
+ break;
+
+ case 11: // '\v'
+ case 12: // '\f'
+ case 13: // '\r'
+ case 0xfeff: // zero-width non-breaking space
+ // These characters contribute nothing to indentation.
+ break;
+
+ case 32: // ' '
+ default: // Treat all other whitespace like ' '.
+ count += 1;
+ break;
+ }
+ }
+
+ return count;
+}
+exports.countSpaces = countSpaces;
+
+var leadingSpaceExp = /^\s*/;
+
+/**
+ * @param {Object} options - Options object that configures printing.
+ */
+function fromString(string, options) {
+ if (string instanceof Lines)
+ return string;
+
+ string += "";
+
+ var tabWidth = options && options.tabWidth;
+ var tabless = string.indexOf("\t") < 0;
+ var cacheable = !options && tabless && (string.length <= maxCacheKeyLen);
+
+ assert.ok(tabWidth || tabless, "No tab width specified but encountered tabs in string\n" + string);
+
+ if (cacheable && hasOwn.call(fromStringCache, string))
+ return fromStringCache[string];
+
+ var lines = new Lines(string.split("\n").map(function(line) {
+ var spaces = leadingSpaceExp.exec(line)[0];
+ return {
+ line: line,
+ indent: countSpaces(spaces, tabWidth),
+ sliceStart: spaces.length,
+ sliceEnd: line.length
+ };
+ }), normalizeOptions(options).sourceFileName);
+
+ if (cacheable)
+ fromStringCache[string] = lines;
+
+ return lines;
+}
+exports.fromString = fromString;
+
+function isOnlyWhitespace(string) {
+ return !/\S/.test(string);
+}
+
+Lp.toString = function(options) {
+ return this.sliceString(this.firstPos(), this.lastPos(), options);
+};
+
+Lp.getSourceMap = function(sourceMapName, sourceRoot) {
+ if (!sourceMapName) {
+ // Although we could make up a name or generate an anonymous
+ // source map, instead we assume that any consumer who does not
+ // provide a name does not actually want a source map.
+ return null;
+ }
+
+ var targetLines = this;
+
+ function updateJSON(json) {
+ json = json || {};
+
+ isString.assert(sourceMapName);
+ json.file = sourceMapName;
+
+ if (sourceRoot) {
+ isString.assert(sourceRoot);
+ json.sourceRoot = sourceRoot;
+ }
+
+ return json;
+ }
+
+ var secret = getSecret(targetLines);
+ if (secret.cachedSourceMap) {
+ // Since Lines objects are immutable, we can reuse any source map
+ // that was previously generated. Nevertheless, we return a new
+ // JSON object here to protect the cached source map from outside
+ // modification.
+ return updateJSON(secret.cachedSourceMap.toJSON());
+ }
+
+ var smg = new sourceMap.SourceMapGenerator(updateJSON());
+ var sourcesToContents = {};
+
+ secret.mappings.forEach(function(mapping) {
+ var sourceCursor = mapping.sourceLines.skipSpaces(
+ mapping.sourceLoc.start
+ ) || mapping.sourceLines.lastPos();
+
+ var targetCursor = targetLines.skipSpaces(
+ mapping.targetLoc.start
+ ) || targetLines.lastPos();
+
+ while (comparePos(sourceCursor, mapping.sourceLoc.end) < 0 &&
+ comparePos(targetCursor, mapping.targetLoc.end) < 0) {
+
+ var sourceChar = mapping.sourceLines.charAt(sourceCursor);
+ var targetChar = targetLines.charAt(targetCursor);
+ assert.strictEqual(sourceChar, targetChar);
+
+ var sourceName = mapping.sourceLines.name;
+
+ // Add mappings one character at a time for maximum resolution.
+ smg.addMapping({
+ source: sourceName,
+ original: { line: sourceCursor.line,
+ column: sourceCursor.column },
+ generated: { line: targetCursor.line,
+ column: targetCursor.column }
+ });
+
+ if (!hasOwn.call(sourcesToContents, sourceName)) {
+ var sourceContent = mapping.sourceLines.toString();
+ smg.setSourceContent(sourceName, sourceContent);
+ sourcesToContents[sourceName] = sourceContent;
+ }
+
+ targetLines.nextPos(targetCursor, true);
+ mapping.sourceLines.nextPos(sourceCursor, true);
+ }
+ });
+
+ secret.cachedSourceMap = smg;
+
+ return smg.toJSON();
+};
+
+Lp.bootstrapCharAt = function(pos) {
+ assert.strictEqual(typeof pos, "object");
+ assert.strictEqual(typeof pos.line, "number");
+ assert.strictEqual(typeof pos.column, "number");
+
+ var line = pos.line,
+ column = pos.column,
+ strings = this.toString().split("\n"),
+ string = strings[line - 1];
+
+ if (typeof string === "undefined")
+ return "";
+
+ if (column === string.length &&
+ line < strings.length)
+ return "\n";
+
+ if (column >= string.length)
+ return "";
+
+ return string.charAt(column);
+};
+
+Lp.charAt = function(pos) {
+ assert.strictEqual(typeof pos, "object");
+ assert.strictEqual(typeof pos.line, "number");
+ assert.strictEqual(typeof pos.column, "number");
+
+ var line = pos.line,
+ column = pos.column,
+ secret = getSecret(this),
+ infos = secret.infos,
+ info = infos[line - 1],
+ c = column;
+
+ if (typeof info === "undefined" || c < 0)
+ return "";
+
+ var indent = this.getIndentAt(line);
+ if (c < indent)
+ return " ";
+
+ c += info.sliceStart - indent;
+
+ if (c === info.sliceEnd &&
+ line < this.length)
+ return "\n";
+
+ if (c >= info.sliceEnd)
+ return "";
+
+ return info.line.charAt(c);
+};
+
+Lp.stripMargin = function(width, skipFirstLine) {
+ if (width === 0)
+ return this;
+
+ assert.ok(width > 0, "negative margin: " + width);
+
+ if (skipFirstLine && this.length === 1)
+ return this;
+
+ var secret = getSecret(this);
+
+ var lines = new Lines(secret.infos.map(function(info, i) {
+ if (info.line && (i > 0 || !skipFirstLine)) {
+ info = copyLineInfo(info);
+ info.indent = Math.max(0, info.indent - width);
+ }
+ return info;
+ }));
+
+ if (secret.mappings.length > 0) {
+ var newMappings = getSecret(lines).mappings;
+ assert.strictEqual(newMappings.length, 0);
+ secret.mappings.forEach(function(mapping) {
+ newMappings.push(mapping.indent(width, skipFirstLine, true));
+ });
+ }
+
+ return lines;
+};
+
+Lp.indent = function(by) {
+ if (by === 0)
+ return this;
+
+ var secret = getSecret(this);
+
+ var lines = new Lines(secret.infos.map(function(info) {
+ if (info.line) {
+ info = copyLineInfo(info);
+ info.indent += by;
+ }
+ return info
+ }));
+
+ if (secret.mappings.length > 0) {
+ var newMappings = getSecret(lines).mappings;
+ assert.strictEqual(newMappings.length, 0);
+ secret.mappings.forEach(function(mapping) {
+ newMappings.push(mapping.indent(by));
+ });
+ }
+
+ return lines;
+};
+
+Lp.indentTail = function(by) {
+ if (by === 0)
+ return this;
+
+ if (this.length < 2)
+ return this;
+
+ var secret = getSecret(this);
+
+ var lines = new Lines(secret.infos.map(function(info, i) {
+ if (i > 0 && info.line) {
+ info = copyLineInfo(info);
+ info.indent += by;
+ }
+
+ return info;
+ }));
+
+ if (secret.mappings.length > 0) {
+ var newMappings = getSecret(lines).mappings;
+ assert.strictEqual(newMappings.length, 0);
+ secret.mappings.forEach(function(mapping) {
+ newMappings.push(mapping.indent(by, true));
+ });
+ }
+
+ return lines;
+};
+
+Lp.getIndentAt = function(line) {
+ assert.ok(line >= 1, "no line " + line + " (line numbers start from 1)");
+ var secret = getSecret(this),
+ info = secret.infos[line - 1];
+ return Math.max(info.indent, 0);
+};
+
+Lp.guessTabWidth = function() {
+ var secret = getSecret(this);
+ if (hasOwn.call(secret, "cachedTabWidth")) {
+ return secret.cachedTabWidth;
+ }
+
+ var counts = []; // Sparse array.
+ var lastIndent = 0;
+
+ for (var line = 1, last = this.length; line <= last; ++line) {
+ var info = secret.infos[line - 1];
+ var sliced = info.line.slice(info.sliceStart, info.sliceEnd);
+
+ // Whitespace-only lines don't tell us much about the likely tab
+ // width of this code.
+ if (isOnlyWhitespace(sliced)) {
+ continue;
+ }
+
+ var diff = Math.abs(info.indent - lastIndent);
+ counts[diff] = ~~counts[diff] + 1;
+ lastIndent = info.indent;
+ }
+
+ var maxCount = -1;
+ var result = 2;
+
+ for (var tabWidth = 1;
+ tabWidth < counts.length;
+ tabWidth += 1) {
+ if (hasOwn.call(counts, tabWidth) &&
+ counts[tabWidth] > maxCount) {
+ maxCount = counts[tabWidth];
+ result = tabWidth;
+ }
+ }
+
+ return secret.cachedTabWidth = result;
+};
+
+Lp.isOnlyWhitespace = function() {
+ return isOnlyWhitespace(this.toString());
+};
+
+Lp.isPrecededOnlyByWhitespace = function(pos) {
+ var secret = getSecret(this);
+ var info = secret.infos[pos.line - 1];
+ var indent = Math.max(info.indent, 0);
+
+ var diff = pos.column - indent;
+ if (diff <= 0) {
+ // If pos.column does not exceed the indentation amount, then
+ // there must be only whitespace before it.
+ return true;
+ }
+
+ var start = info.sliceStart;
+ var end = Math.min(start + diff, info.sliceEnd);
+ var prefix = info.line.slice(start, end);
+
+ return isOnlyWhitespace(prefix);
+};
+
+Lp.getLineLength = function(line) {
+ var secret = getSecret(this),
+ info = secret.infos[line - 1];
+ return this.getIndentAt(line) + info.sliceEnd - info.sliceStart;
+};
+
+Lp.nextPos = function(pos, skipSpaces) {
+ var l = Math.max(pos.line, 0),
+ c = Math.max(pos.column, 0);
+
+ if (c < this.getLineLength(l)) {
+ pos.column += 1;
+
+ return skipSpaces
+ ? !!this.skipSpaces(pos, false, true)
+ : true;
+ }
+
+ if (l < this.length) {
+ pos.line += 1;
+ pos.column = 0;
+
+ return skipSpaces
+ ? !!this.skipSpaces(pos, false, true)
+ : true;
+ }
+
+ return false;
+};
+
+Lp.prevPos = function(pos, skipSpaces) {
+ var l = pos.line,
+ c = pos.column;
+
+ if (c < 1) {
+ l -= 1;
+
+ if (l < 1)
+ return false;
+
+ c = this.getLineLength(l);
+
+ } else {
+ c = Math.min(c - 1, this.getLineLength(l));
+ }
+
+ pos.line = l;
+ pos.column = c;
+
+ return skipSpaces
+ ? !!this.skipSpaces(pos, true, true)
+ : true;
+};
+
+Lp.firstPos = function() {
+ // Trivial, but provided for completeness.
+ return { line: 1, column: 0 };
+};
+
+Lp.lastPos = function() {
+ return {
+ line: this.length,
+ column: this.getLineLength(this.length)
+ };
+};
+
+Lp.skipSpaces = function(pos, backward, modifyInPlace) {
+ if (pos) {
+ pos = modifyInPlace ? pos : {
+ line: pos.line,
+ column: pos.column
+ };
+ } else if (backward) {
+ pos = this.lastPos();
+ } else {
+ pos = this.firstPos();
+ }
+
+ if (backward) {
+ while (this.prevPos(pos)) {
+ if (!isOnlyWhitespace(this.charAt(pos)) &&
+ this.nextPos(pos)) {
+ return pos;
+ }
+ }
+
+ return null;
+
+ } else {
+ while (isOnlyWhitespace(this.charAt(pos))) {
+ if (!this.nextPos(pos)) {
+ return null;
+ }
+ }
+
+ return pos;
+ }
+};
+
+Lp.trimLeft = function() {
+ var pos = this.skipSpaces(this.firstPos(), false, true);
+ return pos ? this.slice(pos) : emptyLines;
+};
+
+Lp.trimRight = function() {
+ var pos = this.skipSpaces(this.lastPos(), true, true);
+ return pos ? this.slice(this.firstPos(), pos) : emptyLines;
+};
+
+Lp.trim = function() {
+ var start = this.skipSpaces(this.firstPos(), false, true);
+ if (start === null)
+ return emptyLines;
+
+ var end = this.skipSpaces(this.lastPos(), true, true);
+ assert.notStrictEqual(end, null);
+
+ return this.slice(start, end);
+};
+
+Lp.eachPos = function(callback, startPos, skipSpaces) {
+ var pos = this.firstPos();
+
+ if (startPos) {
+ pos.line = startPos.line,
+ pos.column = startPos.column
+ }
+
+ if (skipSpaces && !this.skipSpaces(pos, false, true)) {
+ return; // Encountered nothing but spaces.
+ }
+
+ do callback.call(this, pos);
+ while (this.nextPos(pos, skipSpaces));
+};
+
+Lp.bootstrapSlice = function(start, end) {
+ var strings = this.toString().split("\n").slice(
+ start.line - 1, end.line);
+
+ strings.push(strings.pop().slice(0, end.column));
+ strings[0] = strings[0].slice(start.column);
+
+ return fromString(strings.join("\n"));
+};
+
+Lp.slice = function(start, end) {
+ if (!end) {
+ if (!start) {
+ // The client seems to want a copy of this Lines object, but
+ // Lines objects are immutable, so it's perfectly adequate to
+ // return the same object.
+ return this;
+ }
+
+ // Slice to the end if no end position was provided.
+ end = this.lastPos();
+ }
+
+ var secret = getSecret(this);
+ var sliced = secret.infos.slice(start.line - 1, end.line);
+
+ if (start.line === end.line) {
+ sliced[0] = sliceInfo(sliced[0], start.column, end.column);
+ } else {
+ assert.ok(start.line < end.line);
+ sliced[0] = sliceInfo(sliced[0], start.column);
+ sliced.push(sliceInfo(sliced.pop(), 0, end.column));
+ }
+
+ var lines = new Lines(sliced);
+
+ if (secret.mappings.length > 0) {
+ var newMappings = getSecret(lines).mappings;
+ assert.strictEqual(newMappings.length, 0);
+ secret.mappings.forEach(function(mapping) {
+ var sliced = mapping.slice(this, start, end);
+ if (sliced) {
+ newMappings.push(sliced);
+ }
+ }, this);
+ }
+
+ return lines;
+};
+
+function sliceInfo(info, startCol, endCol) {
+ var sliceStart = info.sliceStart;
+ var sliceEnd = info.sliceEnd;
+ var indent = Math.max(info.indent, 0);
+ var lineLength = indent + sliceEnd - sliceStart;
+
+ if (typeof endCol === "undefined") {
+ endCol = lineLength;
+ }
+
+ startCol = Math.max(startCol, 0);
+ endCol = Math.min(endCol, lineLength);
+ endCol = Math.max(endCol, startCol);
+
+ if (endCol < indent) {
+ indent = endCol;
+ sliceEnd = sliceStart;
+ } else {
+ sliceEnd -= lineLength - endCol;
+ }
+
+ lineLength = endCol;
+ lineLength -= startCol;
+
+ if (startCol < indent) {
+ indent -= startCol;
+ } else {
+ startCol -= indent;
+ indent = 0;
+ sliceStart += startCol;
+ }
+
+ assert.ok(indent >= 0);
+ assert.ok(sliceStart <= sliceEnd);
+ assert.strictEqual(lineLength, indent + sliceEnd - sliceStart);
+
+ if (info.indent === indent &&
+ info.sliceStart === sliceStart &&
+ info.sliceEnd === sliceEnd) {
+ return info;
+ }
+
+ return {
+ line: info.line,
+ indent: indent,
+ sliceStart: sliceStart,
+ sliceEnd: sliceEnd
+ };
+}
+
+Lp.bootstrapSliceString = function(start, end, options) {
+ return this.slice(start, end).toString(options);
+};
+
+Lp.sliceString = function(start, end, options) {
+ if (!end) {
+ if (!start) {
+ // The client seems to want a copy of this Lines object, but
+ // Lines objects are immutable, so it's perfectly adequate to
+ // return the same object.
+ return this;
+ }
+
+ // Slice to the end if no end position was provided.
+ end = this.lastPos();
+ }
+
+ options = normalizeOptions(options);
+
+ var infos = getSecret(this).infos;
+ var parts = [];
+ var tabWidth = options.tabWidth;
+
+ for (var line = start.line; line <= end.line; ++line) {
+ var info = infos[line - 1];
+
+ if (line === start.line) {
+ if (line === end.line) {
+ info = sliceInfo(info, start.column, end.column);
+ } else {
+ info = sliceInfo(info, start.column);
+ }
+ } else if (line === end.line) {
+ info = sliceInfo(info, 0, end.column);
+ }
+
+ var indent = Math.max(info.indent, 0);
+
+ var before = info.line.slice(0, info.sliceStart);
+ if (options.reuseWhitespace &&
+ isOnlyWhitespace(before) &&
+ countSpaces(before, options.tabWidth) === indent) {
+ // Reuse original spaces if the indentation is correct.
+ parts.push(info.line.slice(0, info.sliceEnd));
+ continue;
+ }
+
+ var tabs = 0;
+ var spaces = indent;
+
+ if (options.useTabs) {
+ tabs = Math.floor(indent / tabWidth);
+ spaces -= tabs * tabWidth;
+ }
+
+ var result = "";
+
+ if (tabs > 0) {
+ result += new Array(tabs + 1).join("\t");
+ }
+
+ if (spaces > 0) {
+ result += new Array(spaces + 1).join(" ");
+ }
+
+ result += info.line.slice(info.sliceStart, info.sliceEnd);
+
+ parts.push(result);
+ }
+
+ return parts.join("\n");
+};
+
+Lp.isEmpty = function() {
+ return this.length < 2 && this.getLineLength(1) < 1;
+};
+
+Lp.join = function(elements) {
+ var separator = this;
+ var separatorSecret = getSecret(separator);
+ var infos = [];
+ var mappings = [];
+ var prevInfo;
+
+ function appendSecret(secret) {
+ if (secret === null)
+ return;
+
+ if (prevInfo) {
+ var info = secret.infos[0];
+ var indent = new Array(info.indent + 1).join(" ");
+ var prevLine = infos.length;
+ var prevColumn = Math.max(prevInfo.indent, 0) +
+ prevInfo.sliceEnd - prevInfo.sliceStart;
+
+ prevInfo.line = prevInfo.line.slice(
+ 0, prevInfo.sliceEnd) + indent + info.line.slice(
+ info.sliceStart, info.sliceEnd);
+
+ prevInfo.sliceEnd = prevInfo.line.length;
+
+ if (secret.mappings.length > 0) {
+ secret.mappings.forEach(function(mapping) {
+ mappings.push(mapping.add(prevLine, prevColumn));
+ });
+ }
+
+ } else if (secret.mappings.length > 0) {
+ mappings.push.apply(mappings, secret.mappings);
+ }
+
+ secret.infos.forEach(function(info, i) {
+ if (!prevInfo || i > 0) {
+ prevInfo = copyLineInfo(info);
+ infos.push(prevInfo);
+ }
+ });
+ }
+
+ function appendWithSeparator(secret, i) {
+ if (i > 0)
+ appendSecret(separatorSecret);
+ appendSecret(secret);
+ }
+
+ elements.map(function(elem) {
+ var lines = fromString(elem);
+ if (lines.isEmpty())
+ return null;
+ return getSecret(lines);
+ }).forEach(separator.isEmpty()
+ ? appendSecret
+ : appendWithSeparator);
+
+ if (infos.length < 1)
+ return emptyLines;
+
+ var lines = new Lines(infos);
+
+ getSecret(lines).mappings = mappings;
+
+ return lines;
+};
+
+exports.concat = function(elements) {
+ return emptyLines.join(elements);
+};
+
+Lp.concat = function(other) {
+ var args = arguments,
+ list = [this];
+ list.push.apply(list, args);
+ assert.strictEqual(list.length, args.length + 1);
+ return emptyLines.join(list);
+};
+
+// The emptyLines object needs to be created all the way down here so that
+// Lines.prototype will be fully populated.
+var emptyLines = fromString("");
+
+},{"./mapping":509,"./options":510,"./types":514,"./util":515,"assert":213,"private":484,"source-map":530}],509:[function(require,module,exports){
+var assert = require("assert");
+var types = require("./types");
+var isString = types.builtInTypes.string;
+var isNumber = types.builtInTypes.number;
+var SourceLocation = types.namedTypes.SourceLocation;
+var Position = types.namedTypes.Position;
+var linesModule = require("./lines");
+var comparePos = require("./util").comparePos;
+
+function Mapping(sourceLines, sourceLoc, targetLoc) {
+ assert.ok(this instanceof Mapping);
+ assert.ok(sourceLines instanceof linesModule.Lines);
+ SourceLocation.assert(sourceLoc);
+
+ if (targetLoc) {
+ // In certain cases it's possible for targetLoc.{start,end}.column
+ // values to be negative, which technically makes them no longer
+ // valid SourceLocation nodes, so we need to be more forgiving.
+ assert.ok(
+ isNumber.check(targetLoc.start.line) &&
+ isNumber.check(targetLoc.start.column) &&
+ isNumber.check(targetLoc.end.line) &&
+ isNumber.check(targetLoc.end.column)
+ );
+ } else {
+ // Assume identity mapping if no targetLoc specified.
+ targetLoc = sourceLoc;
+ }
+
+ Object.defineProperties(this, {
+ sourceLines: { value: sourceLines },
+ sourceLoc: { value: sourceLoc },
+ targetLoc: { value: targetLoc }
+ });
+}
+
+var Mp = Mapping.prototype;
+module.exports = Mapping;
+
+Mp.slice = function(lines, start, end) {
+ assert.ok(lines instanceof linesModule.Lines);
+ Position.assert(start);
+
+ if (end) {
+ Position.assert(end);
+ } else {
+ end = lines.lastPos();
+ }
+
+ var sourceLines = this.sourceLines;
+ var sourceLoc = this.sourceLoc;
+ var targetLoc = this.targetLoc;
+
+ function skip(name) {
+ var sourceFromPos = sourceLoc[name];
+ var targetFromPos = targetLoc[name];
+ var targetToPos = start;
+
+ if (name === "end") {
+ targetToPos = end;
+ } else {
+ assert.strictEqual(name, "start");
+ }
+
+ return skipChars(
+ sourceLines, sourceFromPos,
+ lines, targetFromPos, targetToPos
+ );
+ }
+
+ if (comparePos(start, targetLoc.start) <= 0) {
+ if (comparePos(targetLoc.end, end) <= 0) {
+ targetLoc = {
+ start: subtractPos(targetLoc.start, start.line, start.column),
+ end: subtractPos(targetLoc.end, start.line, start.column)
+ };
+
+ // The sourceLoc can stay the same because the contents of the
+ // targetLoc have not changed.
+
+ } else if (comparePos(end, targetLoc.start) <= 0) {
+ return null;
+
+ } else {
+ sourceLoc = {
+ start: sourceLoc.start,
+ end: skip("end")
+ };
+
+ targetLoc = {
+ start: subtractPos(targetLoc.start, start.line, start.column),
+ end: subtractPos(end, start.line, start.column)
+ };
+ }
+
+ } else {
+ if (comparePos(targetLoc.end, start) <= 0) {
+ return null;
+ }
+
+ if (comparePos(targetLoc.end, end) <= 0) {
+ sourceLoc = {
+ start: skip("start"),
+ end: sourceLoc.end
+ };
+
+ targetLoc = {
+ // Same as subtractPos(start, start.line, start.column):
+ start: { line: 1, column: 0 },
+ end: subtractPos(targetLoc.end, start.line, start.column)
+ };
+
+ } else {
+ sourceLoc = {
+ start: skip("start"),
+ end: skip("end")
+ };
+
+ targetLoc = {
+ // Same as subtractPos(start, start.line, start.column):
+ start: { line: 1, column: 0 },
+ end: subtractPos(end, start.line, start.column)
+ };
+ }
+ }
+
+ return new Mapping(this.sourceLines, sourceLoc, targetLoc);
+};
+
+Mp.add = function(line, column) {
+ return new Mapping(this.sourceLines, this.sourceLoc, {
+ start: addPos(this.targetLoc.start, line, column),
+ end: addPos(this.targetLoc.end, line, column)
+ });
+};
+
+function addPos(toPos, line, column) {
+ return {
+ line: toPos.line + line - 1,
+ column: (toPos.line === 1)
+ ? toPos.column + column
+ : toPos.column
+ };
+}
+
+Mp.subtract = function(line, column) {
+ return new Mapping(this.sourceLines, this.sourceLoc, {
+ start: subtractPos(this.targetLoc.start, line, column),
+ end: subtractPos(this.targetLoc.end, line, column)
+ });
+};
+
+function subtractPos(fromPos, line, column) {
+ return {
+ line: fromPos.line - line + 1,
+ column: (fromPos.line === line)
+ ? fromPos.column - column
+ : fromPos.column
+ };
+}
+
+Mp.indent = function(by, skipFirstLine, noNegativeColumns) {
+ if (by === 0) {
+ return this;
+ }
+
+ var targetLoc = this.targetLoc;
+ var startLine = targetLoc.start.line;
+ var endLine = targetLoc.end.line;
+
+ if (skipFirstLine && startLine === 1 && endLine === 1) {
+ return this;
+ }
+
+ targetLoc = {
+ start: targetLoc.start,
+ end: targetLoc.end
+ };
+
+ if (!skipFirstLine || startLine > 1) {
+ var startColumn = targetLoc.start.column + by;
+ targetLoc.start = {
+ line: startLine,
+ column: noNegativeColumns
+ ? Math.max(0, startColumn)
+ : startColumn
+ };
+ }
+
+ if (!skipFirstLine || endLine > 1) {
+ var endColumn = targetLoc.end.column + by;
+ targetLoc.end = {
+ line: endLine,
+ column: noNegativeColumns
+ ? Math.max(0, endColumn)
+ : endColumn
+ };
+ }
+
+ return new Mapping(this.sourceLines, this.sourceLoc, targetLoc);
+};
+
+function skipChars(
+ sourceLines, sourceFromPos,
+ targetLines, targetFromPos, targetToPos
+) {
+ assert.ok(sourceLines instanceof linesModule.Lines);
+ assert.ok(targetLines instanceof linesModule.Lines);
+ Position.assert(sourceFromPos);
+ Position.assert(targetFromPos);
+ Position.assert(targetToPos);
+
+ var targetComparison = comparePos(targetFromPos, targetToPos);
+ if (targetComparison === 0) {
+ // Trivial case: no characters to skip.
+ return sourceFromPos;
+ }
+
+ if (targetComparison < 0) {
+ // Skipping forward.
+
+ var sourceCursor = sourceLines.skipSpaces(sourceFromPos);
+ var targetCursor = targetLines.skipSpaces(targetFromPos);
+
+ var lineDiff = targetToPos.line - targetCursor.line;
+ sourceCursor.line += lineDiff;
+ targetCursor.line += lineDiff;
+
+ if (lineDiff > 0) {
+ // If jumping to later lines, reset columns to the beginnings
+ // of those lines.
+ sourceCursor.column = 0;
+ targetCursor.column = 0;
+ } else {
+ assert.strictEqual(lineDiff, 0);
+ }
+
+ while (comparePos(targetCursor, targetToPos) < 0 &&
+ targetLines.nextPos(targetCursor, true)) {
+ assert.ok(sourceLines.nextPos(sourceCursor, true));
+ assert.strictEqual(
+ sourceLines.charAt(sourceCursor),
+ targetLines.charAt(targetCursor)
+ );
+ }
+
+ } else {
+ // Skipping backward.
+
+ var sourceCursor = sourceLines.skipSpaces(sourceFromPos, true);
+ var targetCursor = targetLines.skipSpaces(targetFromPos, true);
+
+ var lineDiff = targetToPos.line - targetCursor.line;
+ sourceCursor.line += lineDiff;
+ targetCursor.line += lineDiff;
+
+ if (lineDiff < 0) {
+ // If jumping to earlier lines, reset columns to the ends of
+ // those lines.
+ sourceCursor.column = sourceLines.getLineLength(sourceCursor.line);
+ targetCursor.column = targetLines.getLineLength(targetCursor.line);
+ } else {
+ assert.strictEqual(lineDiff, 0);
+ }
+
+ while (comparePos(targetToPos, targetCursor) < 0 &&
+ targetLines.prevPos(targetCursor, true)) {
+ assert.ok(sourceLines.prevPos(sourceCursor, true));
+ assert.strictEqual(
+ sourceLines.charAt(sourceCursor),
+ targetLines.charAt(targetCursor)
+ );
+ }
+ }
+
+ return sourceCursor;
+}
+
+},{"./lines":508,"./types":514,"./util":515,"assert":213}],510:[function(require,module,exports){
+var defaults = {
+ // If you want to use a different branch of esprima, or any other
+ // module that supports a .parse function, pass that module object to
+ // recast.parse as options.esprima.
+ esprima: require("esprima-fb"),
+
+ // Number of spaces the pretty-printer should use per tab for
+ // indentation. If you do not pass this option explicitly, it will be
+ // (quite reliably!) inferred from the original code.
+ tabWidth: 4,
+
+ // If you really want the pretty-printer to use tabs instead of
+ // spaces, make this option true.
+ useTabs: false,
+
+ // The reprinting code leaves leading whitespace untouched unless it
+ // has to reindent a line, or you pass false for this option.
+ reuseWhitespace: true,
+
+ // Some of the pretty-printer code (such as that for printing function
+ // parameter lists) makes a valiant attempt to prevent really long
+ // lines. You can adjust the limit by changing this option; however,
+ // there is no guarantee that line length will fit inside this limit.
+ wrapColumn: 74, // Aspirational for now.
+
+ // Pass a string as options.sourceFileName to recast.parse to tell the
+ // reprinter to keep track of reused code so that it can construct a
+ // source map automatically.
+ sourceFileName: null,
+
+ // Pass a string as options.sourceMapName to recast.print, and
+ // (provided you passed options.sourceFileName earlier) the
+ // PrintResult of recast.print will have a .map property for the
+ // generated source map.
+ sourceMapName: null,
+
+ // If provided, this option will be passed along to the source map
+ // generator as a root directory for relative source file paths.
+ sourceRoot: null,
+
+ // If you provide a source map that was generated from a previous call
+ // to recast.print as options.inputSourceMap, the old source map will
+ // be composed with the new source map.
+ inputSourceMap: null,
+
+ // If you want esprima to generate .range information (recast only
+ // uses .loc internally), pass true for this option.
+ range: false,
+
+ // If you want esprima not to throw exceptions when it encounters
+ // non-fatal errors, keep this option true.
+ tolerant: true,
+
+ // If you want to override the quotes used in string literals, specify
+ // either "single", "double", or "auto" here ("auto" will select the one
+ // which results in the shorter literal)
+ // Otherwise, the input marks will be preserved
+ quote: null,
+
+ // If you want to print trailing commas in object literals,
+ // array expressions, functions calls and function definitions pass true
+ // for this option.
+ trailingComma: false,
+}, hasOwn = defaults.hasOwnProperty;
+
+// Copy options and fill in default values.
+exports.normalize = function(options) {
+ options = options || defaults;
+
+ function get(key) {
+ return hasOwn.call(options, key)
+ ? options[key]
+ : defaults[key];
+ }
+
+ return {
+ tabWidth: +get("tabWidth"),
+ useTabs: !!get("useTabs"),
+ reuseWhitespace: !!get("reuseWhitespace"),
+ wrapColumn: Math.max(get("wrapColumn"), 0),
+ sourceFileName: get("sourceFileName"),
+ sourceMapName: get("sourceMapName"),
+ sourceRoot: get("sourceRoot"),
+ inputSourceMap: get("inputSourceMap"),
+ esprima: get("esprima"),
+ range: get("range"),
+ tolerant: get("tolerant"),
+ quote: get("quote"),
+ trailingComma: get("trailingComma"),
+ };
+};
+
+},{"esprima-fb":212}],511:[function(require,module,exports){
+var assert = require("assert");
+var types = require("./types");
+var n = types.namedTypes;
+var b = types.builders;
+var isObject = types.builtInTypes.object;
+var isArray = types.builtInTypes.array;
+var isFunction = types.builtInTypes.function;
+var Patcher = require("./patcher").Patcher;
+var normalizeOptions = require("./options").normalize;
+var fromString = require("./lines").fromString;
+var attachComments = require("./comments").attach;
+var util = require("./util");
+
+exports.parse = function parse(source, options) {
+ options = normalizeOptions(options);
+
+ var lines = fromString(source, options);
+
+ var sourceWithoutTabs = lines.toString({
+ tabWidth: options.tabWidth,
+ reuseWhitespace: false,
+ useTabs: false
+ });
+
+ var program = options.esprima.parse(sourceWithoutTabs, {
+ loc: true,
+ range: options.range,
+ comment: true,
+ tolerant: options.tolerant,
+ sourceType: 'module'
+ });
+
+ // Expand the Program node's .loc to include all comments, since
+ // typically its .loc.start and .loc.end will coincide with those of
+ // the first and last statements, respectively, excluding any comments
+ // that fall outside that region.
+ program.loc = util.getTrueLoc(program);
+
+ var comments = program.comments;
+ delete program.comments;
+
+ // In order to ensure we reprint leading and trailing program
+ // comments, wrap the original Program node with a File node.
+ var file = b.file(program);
+ file.loc = {
+ lines: lines,
+ indent: 0,
+ start: lines.firstPos(),
+ end: lines.lastPos()
+ };
+
+ // Passing file.program here instead of just file means that initial
+ // comments will be attached to program.body[0] instead of program.
+ attachComments(
+ comments,
+ program.body.length ? file.program : file,
+ lines
+ );
+
+ // Return a copy of the original AST so that any changes made may be
+ // compared to the original.
+ return new TreeCopier(lines).copy(file);
+};
+
+function TreeCopier(lines) {
+ assert.ok(this instanceof TreeCopier);
+ this.lines = lines;
+ this.indent = 0;
+}
+
+var TCp = TreeCopier.prototype;
+
+TCp.copy = function(node) {
+ if (isArray.check(node)) {
+ return node.map(this.copy, this);
+ }
+
+ if (!isObject.check(node)) {
+ return node;
+ }
+
+ util.fixFaultyLocations(node);
+
+ var copy = Object.create(Object.getPrototypeOf(node), {
+ original: { // Provide a link from the copy to the original.
+ value: node,
+ configurable: false,
+ enumerable: false,
+ writable: true
+ }
+ });
+
+ var loc = node.loc;
+ var oldIndent = this.indent;
+ var newIndent = oldIndent;
+
+ if (loc) {
+ // When node is a comment, we set node.loc.indent to
+ // node.loc.start.column so that, when/if we print the comment by
+ // itself, we can strip that much whitespace from the left margin
+ // of the comment. This only really matters for multiline Block
+ // comments, but it doesn't hurt for Line comments.
+ if (node.type === "Block" || node.type === "Line" ||
+ this.lines.isPrecededOnlyByWhitespace(loc.start)) {
+ newIndent = this.indent = loc.start.column;
+ }
+
+ loc.lines = this.lines;
+ loc.indent = newIndent;
+ }
+
+ var keys = Object.keys(node);
+ var keyCount = keys.length;
+ for (var i = 0; i < keyCount; ++i) {
+ var key = keys[i];
+ if (key === "loc") {
+ copy[key] = node[key];
+ } else {
+ copy[key] = this.copy(node[key]);
+ }
+ }
+
+ this.indent = oldIndent;
+
+ return copy;
+};
+
+},{"./comments":506,"./lines":508,"./options":510,"./patcher":512,"./types":514,"./util":515,"assert":213}],512:[function(require,module,exports){
+var assert = require("assert");
+var linesModule = require("./lines");
+var types = require("./types");
+var getFieldValue = types.getFieldValue;
+var Printable = types.namedTypes.Printable;
+var Expression = types.namedTypes.Expression;
+var SourceLocation = types.namedTypes.SourceLocation;
+var util = require("./util");
+var comparePos = util.comparePos;
+var FastPath = require("./fast-path");
+var isObject = types.builtInTypes.object;
+var isArray = types.builtInTypes.array;
+var isString = types.builtInTypes.string;
+var riskyAdjoiningCharExp = /[0-9a-z_$]/i;
+
+function Patcher(lines) {
+ assert.ok(this instanceof Patcher);
+ assert.ok(lines instanceof linesModule.Lines);
+
+ var self = this,
+ replacements = [];
+
+ self.replace = function(loc, lines) {
+ if (isString.check(lines))
+ lines = linesModule.fromString(lines);
+
+ replacements.push({
+ lines: lines,
+ start: loc.start,
+ end: loc.end
+ });
+ };
+
+ self.get = function(loc) {
+ // If no location is provided, return the complete Lines object.
+ loc = loc || {
+ start: { line: 1, column: 0 },
+ end: { line: lines.length,
+ column: lines.getLineLength(lines.length) }
+ };
+
+ var sliceFrom = loc.start,
+ toConcat = [];
+
+ function pushSlice(from, to) {
+ assert.ok(comparePos(from, to) <= 0);
+ toConcat.push(lines.slice(from, to));
+ }
+
+ replacements.sort(function(a, b) {
+ return comparePos(a.start, b.start);
+ }).forEach(function(rep) {
+ if (comparePos(sliceFrom, rep.start) > 0) {
+ // Ignore nested replacement ranges.
+ } else {
+ pushSlice(sliceFrom, rep.start);
+ toConcat.push(rep.lines);
+ sliceFrom = rep.end;
+ }
+ });
+
+ pushSlice(sliceFrom, loc.end);
+
+ return linesModule.concat(toConcat);
+ };
+}
+exports.Patcher = Patcher;
+
+var Pp = Patcher.prototype;
+
+Pp.tryToReprintComments = function(newNode, oldNode, print) {
+ var patcher = this;
+
+ if (!newNode.comments &&
+ !oldNode.comments) {
+ // We were (vacuously) able to reprint all the comments!
+ return true;
+ }
+
+ var newPath = FastPath.from(newNode);
+ var oldPath = FastPath.from(oldNode);
+
+ newPath.stack.push("comments", getSurroundingComments(newNode));
+ oldPath.stack.push("comments", getSurroundingComments(oldNode));
+
+ var reprints = [];
+ var ableToReprintComments =
+ findArrayReprints(newPath, oldPath, reprints);
+
+ // No need to pop anything from newPath.stack or oldPath.stack, since
+ // newPath and oldPath are fresh local variables.
+
+ if (ableToReprintComments && reprints.length > 0) {
+ reprints.forEach(function(reprint) {
+ var oldComment = reprint.oldPath.getValue();
+ assert.ok(oldComment.leading || oldComment.trailing);
+ patcher.replace(
+ oldComment.loc,
+ // Comments can't have .comments, so it doesn't matter
+ // whether we print with comments or without.
+ print(reprint.newPath).indentTail(oldComment.loc.indent)
+ );
+ });
+ }
+
+ return ableToReprintComments;
+};
+
+// Get all comments that are either leading or trailing, ignoring any
+// comments that occur inside node.loc. Returns an empty array for nodes
+// with no leading or trailing comments.
+function getSurroundingComments(node) {
+ var result = [];
+ if (node.comments &&
+ node.comments.length > 0) {
+ node.comments.forEach(function(comment) {
+ if (comment.leading || comment.trailing) {
+ result.push(comment);
+ }
+ });
+ }
+ return result;
+}
+
+Pp.deleteComments = function(node) {
+ if (!node.comments) {
+ return;
+ }
+
+ var patcher = this;
+
+ node.comments.forEach(function(comment) {
+ if (comment.leading) {
+ // Delete leading comments along with any trailing whitespace
+ // they might have.
+ patcher.replace({
+ start: comment.loc.start,
+ end: node.loc.lines.skipSpaces(
+ comment.loc.end, false, false)
+ }, "");
+
+ } else if (comment.trailing) {
+ // Delete trailing comments along with any leading whitespace
+ // they might have.
+ patcher.replace({
+ start: node.loc.lines.skipSpaces(
+ comment.loc.start, true, false),
+ end: comment.loc.end
+ }, "");
+ }
+ });
+};
+
+exports.getReprinter = function(path) {
+ assert.ok(path instanceof FastPath);
+
+ // Make sure that this path refers specifically to a Node, rather than
+ // some non-Node subproperty of a Node.
+ var node = path.getValue();
+ if (!Printable.check(node))
+ return;
+
+ var orig = node.original;
+ var origLoc = orig && orig.loc;
+ var lines = origLoc && origLoc.lines;
+ var reprints = [];
+
+ if (!lines || !findReprints(path, reprints))
+ return;
+
+ return function(print) {
+ var patcher = new Patcher(lines);
+
+ reprints.forEach(function(reprint) {
+ var newNode = reprint.newPath.getValue();
+ var oldNode = reprint.oldPath.getValue();
+
+ SourceLocation.assert(oldNode.loc, true);
+
+ var needToPrintNewPathWithComments =
+ !patcher.tryToReprintComments(newNode, oldNode, print)
+
+ if (needToPrintNewPathWithComments) {
+ // Since we were not able to preserve all leading/trailing
+ // comments, we delete oldNode's comments, print newPath
+ // with comments, and then patch the resulting lines where
+ // oldNode used to be.
+ patcher.deleteComments(oldNode);
+ }
+
+ var pos = util.copyPos(oldNode.loc.start);
+ var needsLeadingSpace = lines.prevPos(pos) &&
+ riskyAdjoiningCharExp.test(lines.charAt(pos));
+
+ var newLines = print(
+ reprint.newPath,
+ needToPrintNewPathWithComments
+ ).indentTail(oldNode.loc.indent);
+
+ var needsTrailingSpace =
+ riskyAdjoiningCharExp.test(lines.charAt(oldNode.loc.end));
+
+ // If we try to replace the argument of a ReturnStatement like
+ // return"asdf" with e.g. a literal null expression, we run
+ // the risk of ending up with returnnull, so we need to add an
+ // extra leading space in situations where that might
+ // happen. Likewise for "asdf"in obj. See #170.
+ if (needsLeadingSpace || needsTrailingSpace) {
+ var newParts = [];
+ needsLeadingSpace && newParts.push(" ");
+ newParts.push(newLines);
+ needsTrailingSpace && newParts.push(" ");
+ newLines = linesModule.concat(newParts);
+ }
+
+ patcher.replace(oldNode.loc, newLines);
+ });
+
+ // Recall that origLoc is the .loc of an ancestor node that is
+ // guaranteed to contain all the reprinted nodes and comments.
+ return patcher.get(origLoc).indentTail(-orig.loc.indent);
+ };
+};
+
+function findReprints(newPath, reprints) {
+ var newNode = newPath.getValue();
+ Printable.assert(newNode);
+
+ var oldNode = newNode.original;
+ Printable.assert(oldNode);
+
+ assert.deepEqual(reprints, []);
+
+ if (newNode.type !== oldNode.type) {
+ return false;
+ }
+
+ var oldPath = new FastPath(oldNode);
+ var canReprint = findChildReprints(newPath, oldPath, reprints);
+
+ if (!canReprint) {
+ // Make absolutely sure the calling code does not attempt to reprint
+ // any nodes.
+ reprints.length = 0;
+ }
+
+ return canReprint;
+}
+
+function findAnyReprints(newPath, oldPath, reprints) {
+ var newNode = newPath.getValue();
+ var oldNode = oldPath.getValue();
+
+ if (newNode === oldNode)
+ return true;
+
+ if (isArray.check(newNode))
+ return findArrayReprints(newPath, oldPath, reprints);
+
+ if (isObject.check(newNode))
+ return findObjectReprints(newPath, oldPath, reprints);
+
+ return false;
+}
+
+function findArrayReprints(newPath, oldPath, reprints) {
+ var newNode = newPath.getValue();
+ var oldNode = oldPath.getValue();
+ isArray.assert(newNode);
+ var len = newNode.length;
+
+ if (!(isArray.check(oldNode) &&
+ oldNode.length === len))
+ return false;
+
+ for (var i = 0; i < len; ++i) {
+ newPath.stack.push(i, newNode[i]);
+ oldPath.stack.push(i, oldNode[i]);
+ var canReprint = findAnyReprints(newPath, oldPath, reprints);
+ newPath.stack.length -= 2;
+ oldPath.stack.length -= 2;
+ if (!canReprint) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+function findObjectReprints(newPath, oldPath, reprints) {
+ var newNode = newPath.getValue();
+ isObject.assert(newNode);
+
+ if (newNode.original === null) {
+ // If newNode.original node was set to null, reprint the node.
+ return false;
+ }
+
+ var oldNode = oldPath.getValue();
+ if (!isObject.check(oldNode))
+ return false;
+
+ if (Printable.check(newNode)) {
+ if (!Printable.check(oldNode)) {
+ return false;
+ }
+
+ // Here we need to decide whether the reprinted code for newNode
+ // is appropriate for patching into the location of oldNode.
+
+ if (newNode.type === oldNode.type) {
+ var childReprints = [];
+
+ if (findChildReprints(newPath, oldPath, childReprints)) {
+ reprints.push.apply(reprints, childReprints);
+ } else if (oldNode.loc) {
+ // If we have no .loc information for oldNode, then we
+ // won't be able to reprint it.
+ reprints.push({
+ oldPath: oldPath.copy(),
+ newPath: newPath.copy()
+ });
+ } else {
+ return false;
+ }
+
+ return true;
+ }
+
+ if (Expression.check(newNode) &&
+ Expression.check(oldNode) &&
+ // If we have no .loc information for oldNode, then we won't
+ // be able to reprint it.
+ oldNode.loc) {
+
+ // If both nodes are subtypes of Expression, then we should be
+ // able to fill the location occupied by the old node with
+ // code printed for the new node with no ill consequences.
+ reprints.push({
+ oldPath: oldPath.copy(),
+ newPath: newPath.copy()
+ });
+
+ return true;
+ }
+
+ // The nodes have different types, and at least one of the types
+ // is not a subtype of the Expression type, so we cannot safely
+ // assume the nodes are syntactically interchangeable.
+ return false;
+ }
+
+ return findChildReprints(newPath, oldPath, reprints);
+}
+
+// This object is reused in hasOpeningParen and hasClosingParen to avoid
+// having to allocate a temporary object.
+var reusablePos = { line: 1, column: 0 };
+var nonSpaceExp = /\S/;
+
+function hasOpeningParen(oldPath) {
+ var oldNode = oldPath.getValue();
+ var loc = oldNode.loc;
+ var lines = loc && loc.lines;
+
+ if (lines) {
+ var pos = reusablePos;
+ pos.line = loc.start.line;
+ pos.column = loc.start.column;
+
+ while (lines.prevPos(pos)) {
+ var ch = lines.charAt(pos);
+
+ if (ch === "(") {
+ // If we found an opening parenthesis but it occurred before
+ // the start of the original subtree for this reprinting, then
+ // we must not return true for hasOpeningParen(oldPath).
+ return comparePos(oldPath.getRootValue().loc.start, pos) <= 0;
+ }
+
+ if (nonSpaceExp.test(ch)) {
+ return false;
+ }
+ }
+ }
+
+ return false;
+}
+
+function hasClosingParen(oldPath) {
+ var oldNode = oldPath.getValue();
+ var loc = oldNode.loc;
+ var lines = loc && loc.lines;
+
+ if (lines) {
+ var pos = reusablePos;
+ pos.line = loc.end.line;
+ pos.column = loc.end.column;
+
+ do {
+ var ch = lines.charAt(pos);
+
+ if (ch === ")") {
+ // If we found a closing parenthesis but it occurred after the
+ // end of the original subtree for this reprinting, then we
+ // must not return true for hasClosingParen(oldPath).
+ return comparePos(pos, oldPath.getRootValue().loc.end) <= 0;
+ }
+
+ if (nonSpaceExp.test(ch)) {
+ return false;
+ }
+
+ } while (lines.nextPos(pos));
+ }
+
+ return false;
+}
+
+function hasParens(oldPath) {
+ // This logic can technically be fooled if the node has parentheses
+ // but there are comments intervening between the parentheses and the
+ // node. In such cases the node will be harmlessly wrapped in an
+ // additional layer of parentheses.
+ return hasOpeningParen(oldPath) && hasClosingParen(oldPath);
+}
+
+function findChildReprints(newPath, oldPath, reprints) {
+ var newNode = newPath.getValue();
+ var oldNode = oldPath.getValue();
+
+ isObject.assert(newNode);
+ isObject.assert(oldNode);
+
+ if (newNode.original === null) {
+ // If newNode.original node was set to null, reprint the node.
+ return false;
+ }
+
+ // If this type of node cannot come lexically first in its enclosing
+ // statement (e.g. a function expression or object literal), and it
+ // seems to be doing so, then the only way we can ignore this problem
+ // and save ourselves from falling back to the pretty printer is if an
+ // opening parenthesis happens to precede the node. For example,
+ // (function(){ ... }()); does not need to be reprinted, even though
+ // the FunctionExpression comes lexically first in the enclosing
+ // ExpressionStatement and fails the hasParens test, because the
+ // parent CallExpression passes the hasParens test. If we relied on
+ // the path.needsParens() && !hasParens(oldNode) check below, the
+ // absence of a closing parenthesis after the FunctionExpression would
+ // trigger pretty-printing unnecessarily.
+ if (!newPath.canBeFirstInStatement() &&
+ newPath.firstInStatement() &&
+ !hasOpeningParen(oldPath))
+ return false;
+
+ // If this node needs parentheses and will not be wrapped with
+ // parentheses when reprinted, then return false to skip reprinting
+ // and let it be printed generically.
+ if (newPath.needsParens(true) && !hasParens(oldPath)) {
+ return false;
+ }
+
+ for (var k in util.getUnionOfKeys(newNode, oldNode)) {
+ if (k === "loc")
+ continue;
+
+ newPath.stack.push(k, types.getFieldValue(newNode, k));
+ oldPath.stack.push(k, types.getFieldValue(oldNode, k));
+ var canReprint = findAnyReprints(newPath, oldPath, reprints);
+ newPath.stack.length -= 2;
+ oldPath.stack.length -= 2;
+
+ if (!canReprint) {
+ return false;
+ }
+ }
+
+ return true;
+}
+
+},{"./fast-path":507,"./lines":508,"./types":514,"./util":515,"assert":213}],513:[function(require,module,exports){
+var assert = require("assert");
+var sourceMap = require("source-map");
+var printComments = require("./comments").printComments;
+var linesModule = require("./lines");
+var fromString = linesModule.fromString;
+var concat = linesModule.concat;
+var normalizeOptions = require("./options").normalize;
+var getReprinter = require("./patcher").getReprinter;
+var types = require("./types");
+var namedTypes = types.namedTypes;
+var isString = types.builtInTypes.string;
+var isObject = types.builtInTypes.object;
+var FastPath = require("./fast-path");
+var util = require("./util");
+
+function PrintResult(code, sourceMap) {
+ assert.ok(this instanceof PrintResult);
+
+ isString.assert(code);
+ this.code = code;
+
+ if (sourceMap) {
+ isObject.assert(sourceMap);
+ this.map = sourceMap;
+ }
+}
+
+var PRp = PrintResult.prototype;
+var warnedAboutToString = false;
+
+PRp.toString = function() {
+ if (!warnedAboutToString) {
+ console.warn(
+ "Deprecation warning: recast.print now returns an object with " +
+ "a .code property. You appear to be treating the object as a " +
+ "string, which might still work but is strongly discouraged."
+ );
+
+ warnedAboutToString = true;
+ }
+
+ return this.code;
+};
+
+var emptyPrintResult = new PrintResult("");
+
+function Printer(originalOptions) {
+ assert.ok(this instanceof Printer);
+
+ var explicitTabWidth = originalOptions && originalOptions.tabWidth;
+ var options = normalizeOptions(originalOptions);
+ assert.notStrictEqual(options, originalOptions);
+
+ // It's common for client code to pass the same options into both
+ // recast.parse and recast.print, but the Printer doesn't need (and
+ // can be confused by) options.sourceFileName, so we null it out.
+ options.sourceFileName = null;
+
+ function printWithComments(path) {
+ assert.ok(path instanceof FastPath);
+ return printComments(path, print);
+ }
+
+ function print(path, includeComments) {
+ if (includeComments)
+ return printWithComments(path);
+
+ assert.ok(path instanceof FastPath);
+
+ if (!explicitTabWidth) {
+ var oldTabWidth = options.tabWidth;
+ var loc = path.getNode().loc;
+ if (loc && loc.lines && loc.lines.guessTabWidth) {
+ options.tabWidth = loc.lines.guessTabWidth();
+ var lines = maybeReprint(path);
+ options.tabWidth = oldTabWidth;
+ return lines;
+ }
+ }
+
+ return maybeReprint(path);
+ }
+
+ function maybeReprint(path) {
+ var reprinter = getReprinter(path);
+ if (reprinter)
+ return maybeAddParens(path, reprinter(print));
+ return printRootGenerically(path);
+ }
+
+ // Print the root node generically, but then resume reprinting its
+ // children non-generically.
+ function printRootGenerically(path) {
+ return genericPrint(path, options, printWithComments);
+ }
+
+ // Print the entire AST generically.
+ function printGenerically(path) {
+ return genericPrint(path, options, printGenerically);
+ }
+
+ this.print = function(ast) {
+ if (!ast) {
+ return emptyPrintResult;
+ }
+
+ var lines = print(FastPath.from(ast), true);
+
+ return new PrintResult(
+ lines.toString(options),
+ util.composeSourceMaps(
+ options.inputSourceMap,
+ lines.getSourceMap(
+ options.sourceMapName,
+ options.sourceRoot
+ )
+ )
+ );
+ };
+
+ this.printGenerically = function(ast) {
+ if (!ast) {
+ return emptyPrintResult;
+ }
+
+ var path = FastPath.from(ast);
+ var oldReuseWhitespace = options.reuseWhitespace;
+
+ // Do not reuse whitespace (or anything else, for that matter)
+ // when printing generically.
+ options.reuseWhitespace = false;
+
+ // TODO Allow printing of comments?
+ var pr = new PrintResult(printGenerically(path).toString(options));
+ options.reuseWhitespace = oldReuseWhitespace;
+ return pr;
+ };
+}
+
+exports.Printer = Printer;
+
+function maybeAddParens(path, lines) {
+ return path.needsParens() ? concat(["(", lines, ")"]) : lines;
+}
+
+function genericPrint(path, options, printPath) {
+ assert.ok(path instanceof FastPath);
+ return maybeAddParens(path, genericPrintNoParens(path, options, printPath));
+}
+
+function genericPrintNoParens(path, options, print) {
+ var n = path.getValue();
+
+ if (!n) {
+ return fromString("");
+ }
+
+ if (typeof n === "string") {
+ return fromString(n, options);
+ }
+
+ namedTypes.Printable.assert(n);
+
+ switch (n.type) {
+ case "File":
+ return path.call(print, "program");
+
+ case "Program":
+ return maybeAddSemicolon(path.call(function(bodyPath) {
+ return printStatementSequence(bodyPath, options, print);
+ }, "body"));
+
+ case "EmptyStatement":
+ return fromString("");
+
+ case "ExpressionStatement":
+ return concat([path.call(print, "expression"), ";"]);
+
+ case "BinaryExpression":
+ case "LogicalExpression":
+ case "AssignmentExpression":
+ return fromString(" ").join([
+ path.call(print, "left"),
+ n.operator,
+ path.call(print, "right")
+ ]);
+
+ case "AssignmentPattern":
+ return concat([
+ path.call(print, "left"),
+ "=",
+ path.call(print, "right")
+ ]);
+
+ case "MemberExpression":
+ var parts = [path.call(print, "object")];
+
+ var property = path.call(print, "property");
+ if (n.computed) {
+ parts.push("[", property, "]");
+ } else {
+ parts.push(".", property);
+ }
+
+ return concat(parts);
+
+ case "Path":
+ return fromString(".").join(n.body);
+
+ case "Identifier":
+ return concat([
+ fromString(n.name, options),
+ path.call(print, "typeAnnotation")
+ ]);
+
+ case "SpreadElement":
+ case "SpreadElementPattern":
+ case "SpreadProperty":
+ case "SpreadPropertyPattern":
+ case "RestElement":
+ return concat(["...", path.call(print, "argument")]);
+
+ case "FunctionDeclaration":
+ case "FunctionExpression":
+ var parts = [];
+
+ if (n.async)
+ parts.push("async ");
+
+ parts.push("function");
+
+ if (n.generator)
+ parts.push("*");
+
+ if (n.id) {
+ parts.push(
+ " ",
+ path.call(print, "id"),
+ path.call(print, "typeParameters")
+ );
+ }
+
+ parts.push(
+ "(",
+ printFunctionParams(path, options, print),
+ ")",
+ path.call(print, "returnType"),
+ " ",
+ path.call(print, "body")
+ );
+
+ return concat(parts);
+
+ case "ArrowFunctionExpression":
+ var parts = [];
+
+ if (n.async)
+ parts.push("async ");
+
+ if (n.params.length === 1 && !n.rest) {
+ parts.push(path.call(print, "params", 0));
+ } else {
+ parts.push(
+ "(",
+ printFunctionParams(path, options, print),
+ ")"
+ );
+ }
+
+ parts.push(" => ", path.call(print, "body"));
+
+ return concat(parts);
+
+ case "MethodDefinition":
+ var parts = [];
+
+ if (n.static) {
+ parts.push("static ");
+ }
+
+ parts.push(printMethod(path, options, print));
+
+ return concat(parts);
+
+ case "YieldExpression":
+ var parts = ["yield"];
+
+ if (n.delegate)
+ parts.push("*");
+
+ if (n.argument)
+ parts.push(" ", path.call(print, "argument"));
+
+ return concat(parts);
+
+ case "AwaitExpression":
+ var parts = ["await"];
+
+ if (n.all)
+ parts.push("*");
+
+ if (n.argument)
+ parts.push(" ", path.call(print, "argument"));
+
+ return concat(parts);
+
+ case "ModuleDeclaration":
+ var parts = ["module", path.call(print, "id")];
+
+ if (n.source) {
+ assert.ok(!n.body);
+ parts.push("from", path.call(print, "source"));
+ } else {
+ parts.push(path.call(print, "body"));
+ }
+
+ return fromString(" ").join(parts);
+
+ case "ImportSpecifier":
+ case "ExportSpecifier":
+ var parts = [path.call(print, "id")];
+
+ if (n.name)
+ parts.push(" as ", path.call(print, "name"));
+
+ return concat(parts);
+
+ case "ExportBatchSpecifier":
+ return fromString("*");
+
+ case "ImportNamespaceSpecifier":
+ return concat(["* as ", path.call(print, "id")]);
+
+ case "ImportDefaultSpecifier":
+ return path.call(print, "id");
+
+ case "ExportDeclaration":
+ var parts = ["export"];
+
+ if (n["default"]) {
+ parts.push(" default");
+
+ } else if (n.specifiers &&
+ n.specifiers.length > 0) {
+
+ if (n.specifiers.length === 1 &&
+ n.specifiers[0].type === "ExportBatchSpecifier") {
+ parts.push(" *");
+ } else {
+ parts.push(
+ " { ",
+ fromString(", ").join(path.map(print, "specifiers")),
+ " }"
+ );
+ }
+
+ if (n.source)
+ parts.push(" from ", path.call(print, "source"));
+
+ parts.push(";");
+
+ return concat(parts);
+ }
+
+ if (n.declaration) {
+ if (!namedTypes.Node.check(n.declaration)) {
+ console.log(JSON.stringify(n, null, 2));
+ }
+ var decLines = path.call(print, "declaration");
+ parts.push(" ", decLines);
+ if (lastNonSpaceCharacter(decLines) !== ";") {
+ parts.push(";");
+ }
+ }
+
+ return concat(parts);
+
+ case "ImportDeclaration":
+ var parts = ["import "];
+
+ if (n.specifiers &&
+ n.specifiers.length > 0) {
+
+ var foundImportSpecifier = false;
+
+ path.each(function(specifierPath) {
+ var i = specifierPath.getName();
+ if (i > 0) {
+ parts.push(", ");
+ }
+
+ var value = specifierPath.getValue();
+
+ if (namedTypes.ImportDefaultSpecifier.check(value) ||
+ namedTypes.ImportNamespaceSpecifier.check(value)) {
+ assert.strictEqual(foundImportSpecifier, false);
+ } else {
+ namedTypes.ImportSpecifier.assert(value);
+ if (!foundImportSpecifier) {
+ foundImportSpecifier = true;
+ parts.push("{");
+ }
+ }
+
+ parts.push(print(specifierPath));
+ }, "specifiers");
+
+ if (foundImportSpecifier) {
+ parts.push("}");
+ }
+
+ parts.push(" from ");
+ }
+
+ parts.push(path.call(print, "source"), ";");
+
+ return concat(parts);
+
+ case "BlockStatement":
+ var naked = path.call(function(bodyPath) {
+ return printStatementSequence(bodyPath, options, print);
+ }, "body");
+
+ if (naked.isEmpty()) {
+ return fromString("{}");
+ }
+
+ return concat([
+ "{\n",
+ naked.indent(options.tabWidth),
+ "\n}"
+ ]);
+
+ case "ReturnStatement":
+ var parts = ["return"];
+
+ if (n.argument) {
+ var argLines = path.call(print, "argument");
+ if (argLines.length > 1 &&
+ (namedTypes.XJSElement &&
+ namedTypes.XJSElement.check(n.argument) ||
+ namedTypes.JSXElement &&
+ namedTypes.JSXElement.check(n.argument))) {
+ parts.push(
+ " (\n",
+ argLines.indent(options.tabWidth),
+ "\n)"
+ );
+ } else {
+ parts.push(" ", argLines);
+ }
+ }
+
+ parts.push(";");
+
+ return concat(parts);
+
+ case "CallExpression":
+ return concat([
+ path.call(print, "callee"),
+ printArgumentsList(path, options, print)
+ ]);
+
+ case "ObjectExpression":
+ case "ObjectPattern":
+ case "ObjectTypeAnnotation":
+ var allowBreak = false;
+ var isTypeAnnotation = n.type === "ObjectTypeAnnotation";
+ var separator = isTypeAnnotation ? ';' : ',';
+ var fields = [];
+
+ if (isTypeAnnotation) {
+ fields.push("indexers", "callProperties");
+ }
+
+ fields.push("properties");
+
+ var len = 0;
+ fields.forEach(function(field) {
+ len += n[field].length;
+ });
+
+ var oneLine = (isTypeAnnotation && len === 1) || len === 0;
+ var parts = [oneLine ? "{" : "{\n"];
+
+ fields.forEach(function(field) {
+ path.map(function(childPath) {
+ var i = childPath.getName();
+ var lines = print(childPath);
+
+ if (!oneLine) {
+ lines = lines.indent(options.tabWidth);
+ }
+
+ var multiLine = !isTypeAnnotation && lines.length > 1;
+ if (multiLine && allowBreak) {
+ // Similar to the logic for BlockStatement.
+ parts.push("\n");
+ }
+
+ parts.push(lines);
+
+ if (i < len - 1) {
+ // Add an extra line break if the previous object property
+ // had a multi-line value.
+ parts.push(separator + (multiLine ? "\n\n" : "\n"));
+ allowBreak = !multiLine;
+ } else if (len !== 1 && isTypeAnnotation) {
+ parts.push(separator);
+ } else if (options.trailingComma) {
+ parts.push(separator);
+ }
+ }, field);
+ });
+
+ parts.push(oneLine ? "}" : "\n}");
+
+ return concat(parts);
+
+ case "PropertyPattern":
+ return concat([
+ path.call(print, "key"),
+ ": ",
+ path.call(print, "pattern")
+ ]);
+
+ case "Property": // Non-standard AST node type.
+ if (n.method || n.kind === "get" || n.kind === "set") {
+ return printMethod(path, options, print);
+ }
+
+ var key = path.call(print, "key");
+ if (n.computed) {
+ key = concat(["[", key, "]"]);
+ }
+
+ if (n.shorthand) {
+ return key;
+ }
+
+ return concat([key, ": ", path.call(print, "value")]);
+
+ case "ArrayExpression":
+ case "ArrayPattern":
+ var elems = n.elements,
+ len = elems.length;
+
+ var printed = path.map(print, "elements");
+ var joined = fromString(", ").join(printed);
+ var oneLine = joined.getLineLength(1) <= options.wrapColumn;
+ var parts = [oneLine ? "[" : "[\n"];
+
+ path.each(function(elemPath) {
+ var i = elemPath.getName();
+ var elem = elemPath.getValue();
+ if (!elem) {
+ // If the array expression ends with a hole, that hole
+ // will be ignored by the interpreter, but if it ends with
+ // two (or more) holes, we need to write out two (or more)
+ // commas so that the resulting code is interpreted with
+ // both (all) of the holes.
+ parts.push(",");
+ } else {
+ var lines = printed[i];
+ if (oneLine) {
+ if (i > 0)
+ parts.push(" ");
+ } else {
+ lines = lines.indent(options.tabWidth);
+ }
+ parts.push(lines);
+ if (i < len - 1 || (!oneLine && options.trailingComma))
+ parts.push(",");
+ if (!oneLine)
+ parts.push("\n");
+ }
+ }, "elements");
+
+ parts.push("]");
+
+ return concat(parts);
+
+ case "SequenceExpression":
+ return fromString(", ").join(path.map(print, "expressions"));
+
+ case "ThisExpression":
+ return fromString("this");
+
+ case "Literal":
+ if (typeof n.value !== "string")
+ return fromString(n.value, options);
+
+ // intentionally fall through...
+
+ case "ModuleSpecifier":
+ return fromString(nodeStr(n.value, options), options);
+
+ case "UnaryExpression":
+ var parts = [n.operator];
+ if (/[a-z]$/.test(n.operator))
+ parts.push(" ");
+ parts.push(path.call(print, "argument"));
+ return concat(parts);
+
+ case "UpdateExpression":
+ var parts = [path.call(print, "argument"), n.operator];
+
+ if (n.prefix)
+ parts.reverse();
+
+ return concat(parts);
+
+ case "ConditionalExpression":
+ return concat([
+ "(", path.call(print, "test"),
+ " ? ", path.call(print, "consequent"),
+ " : ", path.call(print, "alternate"), ")"
+ ]);
+
+ case "NewExpression":
+ var parts = ["new ", path.call(print, "callee")];
+ var args = n.arguments;
+ if (args) {
+ parts.push(printArgumentsList(path, options, print));
+ }
+
+ return concat(parts);
+
+ case "VariableDeclaration":
+ var parts = [n.kind, " "];
+ var maxLen = 0;
+ var printed = path.map(function(childPath) {
+ var lines = print(childPath);
+ maxLen = Math.max(lines.length, maxLen);
+ return lines;
+ }, "declarations");
+
+ if (maxLen === 1) {
+ parts.push(fromString(", ").join(printed));
+ } else if (printed.length > 1 ) {
+ parts.push(
+ fromString(",\n").join(printed)
+ .indentTail(n.kind.length + 1)
+ );
+ } else {
+ parts.push(printed[0]);
+ }
+
+ // We generally want to terminate all variable declarations with a
+ // semicolon, except when they are children of for loops.
+ var parentNode = path.getParentNode();
+ if (!namedTypes.ForStatement.check(parentNode) &&
+ !namedTypes.ForInStatement.check(parentNode) &&
+ !(namedTypes.ForOfStatement &&
+ namedTypes.ForOfStatement.check(parentNode))) {
+ parts.push(";");
+ }
+
+ return concat(parts);
+
+ case "VariableDeclarator":
+ return n.init ? fromString(" = ").join([
+ path.call(print, "id"),
+ path.call(print, "init")
+ ]) : path.call(print, "id");
+
+ case "WithStatement":
+ return concat([
+ "with (",
+ path.call(print, "object"),
+ ") ",
+ path.call(print, "body")
+ ]);
+
+ case "IfStatement":
+ var con = adjustClause(path.call(print, "consequent"), options),
+ parts = ["if (", path.call(print, "test"), ")", con];
+
+ if (n.alternate)
+ parts.push(
+ endsWithBrace(con) ? " else" : "\nelse",
+ adjustClause(path.call(print, "alternate"), options));
+
+ return concat(parts);
+
+ case "ForStatement":
+ // TODO Get the for (;;) case right.
+ var init = path.call(print, "init"),
+ sep = init.length > 1 ? ";\n" : "; ",
+ forParen = "for (",
+ indented = fromString(sep).join([
+ init,
+ path.call(print, "test"),
+ path.call(print, "update")
+ ]).indentTail(forParen.length),
+ head = concat([forParen, indented, ")"]),
+ clause = adjustClause(path.call(print, "body"), options),
+ parts = [head];
+
+ if (head.length > 1) {
+ parts.push("\n");
+ clause = clause.trimLeft();
+ }
+
+ parts.push(clause);
+
+ return concat(parts);
+
+ case "WhileStatement":
+ return concat([
+ "while (",
+ path.call(print, "test"),
+ ")",
+ adjustClause(path.call(print, "body"), options)
+ ]);
+
+ case "ForInStatement":
+ // Note: esprima can't actually parse "for each (".
+ return concat([
+ n.each ? "for each (" : "for (",
+ path.call(print, "left"),
+ " in ",
+ path.call(print, "right"),
+ ")",
+ adjustClause(path.call(print, "body"), options)
+ ]);
+
+ case "ForOfStatement":
+ return concat([
+ "for (",
+ path.call(print, "left"),
+ " of ",
+ path.call(print, "right"),
+ ")",
+ adjustClause(path.call(print, "body"), options)
+ ]);
+
+ case "DoWhileStatement":
+ var doBody = concat([
+ "do",
+ adjustClause(path.call(print, "body"), options)
+ ]), parts = [doBody];
+
+ if (endsWithBrace(doBody))
+ parts.push(" while");
+ else
+ parts.push("\nwhile");
+
+ parts.push(" (", path.call(print, "test"), ");");
+
+ return concat(parts);
+
+ case "BreakStatement":
+ var parts = ["break"];
+ if (n.label)
+ parts.push(" ", path.call(print, "label"));
+ parts.push(";");
+ return concat(parts);
+
+ case "ContinueStatement":
+ var parts = ["continue"];
+ if (n.label)
+ parts.push(" ", path.call(print, "label"));
+ parts.push(";");
+ return concat(parts);
+
+ case "LabeledStatement":
+ return concat([
+ path.call(print, "label"),
+ ":\n",
+ path.call(print, "body")
+ ]);
+
+ case "TryStatement":
+ var parts = [
+ "try ",
+ path.call(print, "block")
+ ];
+
+ if (n.handler) {
+ parts.push(" ", path.call(print, "handler"));
+ } else if (n.handlers) {
+ path.each(function(handlerPath) {
+ parts.push(" ", print(handlerPath));
+ }, "handlers");
+ }
+
+ if (n.finalizer) {
+ parts.push(" finally ", path.call(print, "finalizer"));
+ }
+
+ return concat(parts);
+
+ case "CatchClause":
+ var parts = ["catch (", path.call(print, "param")];
+
+ if (n.guard)
+ // Note: esprima does not recognize conditional catch clauses.
+ parts.push(" if ", path.call(print, "guard"));
+
+ parts.push(") ", path.call(print, "body"));
+
+ return concat(parts);
+
+ case "ThrowStatement":
+ return concat(["throw ", path.call(print, "argument"), ";"]);
+
+ case "SwitchStatement":
+ return concat([
+ "switch (",
+ path.call(print, "discriminant"),
+ ") {\n",
+ fromString("\n").join(path.map(print, "cases")),
+ "\n}"
+ ]);
+
+ // Note: ignoring n.lexical because it has no printing consequences.
+
+ case "SwitchCase":
+ var parts = [];
+
+ if (n.test)
+ parts.push("case ", path.call(print, "test"), ":");
+ else
+ parts.push("default:");
+
+ if (n.consequent.length > 0) {
+ parts.push("\n", path.call(function(consequentPath) {
+ return printStatementSequence(consequentPath, options, print);
+ }, "consequent").indent(options.tabWidth));
+ }
+
+ return concat(parts);
+
+ case "DebuggerStatement":
+ return fromString("debugger;");
+
+ // JSX extensions below.
+
+ case "XJSAttribute":
+ case "JSXAttribute":
+ var parts = [path.call(print, "name")];
+ if (n.value)
+ parts.push("=", path.call(print, "value"));
+ return concat(parts);
+
+ case "XJSIdentifier":
+ case "JSXIdentifier":
+ return fromString(n.name, options);
+
+ case "XJSNamespacedName":
+ case "JSXNamespacedName":
+ return fromString(":").join([
+ path.call(print, "namespace"),
+ path.call(print, "name")
+ ]);
+
+ case "XJSMemberExpression":
+ case "JSXMemberExpression":
+ return fromString(".").join([
+ path.call(print, "object"),
+ path.call(print, "property")
+ ]);
+
+ case "XJSSpreadAttribute":
+ case "JSXSpreadAttribute":
+ return concat(["{...", path.call(print, "argument"), "}"]);
+
+ case "XJSExpressionContainer":
+ case "JSXExpressionContainer":
+ return concat(["{", path.call(print, "expression"), "}"]);
+
+ case "XJSElement":
+ case "JSXElement":
+ var openingLines = path.call(print, "openingElement");
+
+ if (n.openingElement.selfClosing) {
+ assert.ok(!n.closingElement);
+ return openingLines;
+ }
+
+ var childLines = concat(
+ path.map(function(childPath) {
+ var child = childPath.getValue();
+
+ if (namedTypes.Literal.check(child) &&
+ typeof child.value === "string") {
+ if (/\S/.test(child.value)) {
+ return child.value.replace(/^\s+|\s+$/g, "");
+ } else if (/\n/.test(child.value)) {
+ return "\n";
+ }
+ }
+
+ return print(childPath);
+ }, "children")
+ ).indentTail(options.tabWidth);
+
+ var closingLines = path.call(print, "closingElement");
+
+ return concat([
+ openingLines,
+ childLines,
+ closingLines
+ ]);
+
+ case "XJSOpeningElement":
+ case "JSXOpeningElement":
+ var parts = ["<", path.call(print, "name")];
+ var attrParts = [];
+
+ path.each(function(attrPath) {
+ attrParts.push(" ", print(attrPath));
+ }, "attributes");
+
+ var attrLines = concat(attrParts);
+
+ var needLineWrap = (
+ attrLines.length > 1 ||
+ attrLines.getLineLength(1) > options.wrapColumn
+ );
+
+ if (needLineWrap) {
+ attrParts.forEach(function(part, i) {
+ if (part === " ") {
+ assert.strictEqual(i % 2, 0);
+ attrParts[i] = "\n";
+ }
+ });
+
+ attrLines = concat(attrParts).indentTail(options.tabWidth);
+ }
+
+ parts.push(attrLines, n.selfClosing ? " />" : ">");
+
+ return concat(parts);
+
+ case "XJSClosingElement":
+ case "JSXClosingElement":
+ return concat(["", path.call(print, "name"), ">"]);
+
+ case "XJSText":
+ case "JSXText":
+ return fromString(n.value, options);
+
+ case "XJSEmptyExpression":
+ case "JSXEmptyExpression":
+ return fromString("");
+
+ case "TypeAnnotatedIdentifier":
+ return concat([
+ path.call(print, "annotation"),
+ " ",
+ path.call(print, "identifier")
+ ]);
+
+ case "ClassBody":
+ if (n.body.length === 0) {
+ return fromString("{}");
+ }
+
+ return concat([
+ "{\n",
+ path.call(function(bodyPath) {
+ return printStatementSequence(bodyPath, options, print);
+ }, "body").indent(options.tabWidth),
+ "\n}"
+ ]);
+
+ case "ClassPropertyDefinition":
+ var parts = ["static ", path.call(print, "definition")];
+ if (!namedTypes.MethodDefinition.check(n.definition))
+ parts.push(";");
+ return concat(parts);
+
+ case "ClassProperty":
+ return concat([
+ path.call(print, "key"),
+ path.call(print, "typeAnnotation"),
+ ";"
+ ]);
+
+ case "ClassDeclaration":
+ case "ClassExpression":
+ var parts = ["class"];
+
+ if (n.id) {
+ parts.push(
+ " ",
+ path.call(print, "id"),
+ path.call(print, "typeParameters")
+ );
+ }
+
+ if (n.superClass) {
+ parts.push(
+ " extends ",
+ path.call(print, "superClass"),
+ path.call(print, "superTypeParameters")
+ );
+ }
+
+ if (n["implements"]) {
+ parts.push(
+ " implements ",
+ fromString(", ").join(path.map(print, "implements"))
+ );
+ }
+
+ parts.push(" ", path.call(print, "body"));
+
+ return concat(parts);
+
+ // These types are unprintable because they serve as abstract
+ // supertypes for other (printable) types.
+ case "Node":
+ case "Printable":
+ case "SourceLocation":
+ case "Position":
+ case "Statement":
+ case "Function":
+ case "Pattern":
+ case "Expression":
+ case "Declaration":
+ case "Specifier":
+ case "NamedSpecifier":
+ case "Comment": // Supertype of Block and Line.
+ case "MemberTypeAnnotation": // Flow
+ case "TupleTypeAnnotation": // Flow
+ case "Type": // Flow
+ throw new Error("unprintable type: " + JSON.stringify(n.type));
+
+ case "Block": // Block comment.
+ return concat(["/*", fromString(n.value, options), "*/"]);
+
+ case "Line": // Line comment.
+ return concat(["//", fromString(n.value, options)]);
+
+ // Type Annotations for Facebook Flow, typically stripped out or
+ // transformed away before printing.
+ case "TypeAnnotation":
+ var parts = [];
+
+ if (n.typeAnnotation) {
+ if (n.typeAnnotation.type !== "FunctionTypeAnnotation") {
+ parts.push(": ");
+ }
+ parts.push(path.call(print, "typeAnnotation"));
+ return concat(parts);
+ }
+
+ return fromString("");
+
+ case "AnyTypeAnnotation":
+ return fromString("any", options);
+
+ case "ArrayTypeAnnotation":
+ return concat([
+ path.call(print, "elementType"),
+ "[]"
+ ]);
+
+ case "BooleanTypeAnnotation":
+ return fromString("boolean", options);
+
+ case "DeclareClass":
+ return concat([
+ fromString("declare class ", options),
+ path.call(print, "id"),
+ " ",
+ path.call(print, "body"),
+ ]);
+
+ case "DeclareFunction":
+ return concat([
+ fromString("declare function ", options),
+ path.call(print, "id")
+ ]);
+
+ case "DeclareModule":
+ return concat([
+ fromString("declare module ", options),
+ path.call(print, "id"),
+ " ",
+ path.call(print, "body"),
+ ]);
+
+ case "DeclareVariable":
+ return concat([
+ fromString("declare var ", options),
+ path.call(print, "id")
+ ]);
+
+ case "FunctionTypeAnnotation":
+ // FunctionTypeAnnotation is ambiguous:
+ // declare function(a: B): void; OR
+ // var A: (a: B) => void;
+ var parts = [];
+ var parent = path.getParentNode(0);
+ var isArrowFunctionTypeAnnotation = !(
+ namedTypes.ObjectTypeCallProperty.check(parent) ||
+ namedTypes.DeclareFunction.check(path.getParentNode(2))
+ );
+
+ var needsColon =
+ isArrowFunctionTypeAnnotation &&
+ !namedTypes.FunctionTypeParam.check(parent);
+
+ if (needsColon) {
+ parts.push(": ");
+ }
+
+ parts.push(
+ "(",
+ fromString(", ").join(path.map(print, "params")),
+ ")"
+ );
+
+ // The returnType is not wrapped in a TypeAnnotation, so the colon
+ // needs to be added separately.
+ if (n.returnType) {
+ parts.push(
+ isArrowFunctionTypeAnnotation ? " => " : ": ",
+ path.call(print, "returnType")
+ );
+ }
+
+ return concat(parts);
+
+ case "FunctionTypeParam":
+ return concat([
+ path.call(print, "name"),
+ ": ",
+ path.call(print, "typeAnnotation"),
+ ]);
+
+ case "GenericTypeAnnotation":
+ return concat([
+ path.call(print, "id"),
+ path.call(print, "typeParameters")
+ ]);
+
+ case "InterfaceDeclaration":
+ var parts = [
+ fromString("interface ", options),
+ path.call(print, "id"),
+ path.call(print, "typeParameters"),
+ " "
+ ];
+
+ if (n["extends"]) {
+ parts.push(
+ "extends ",
+ fromString(", ").join(path.map(print, "extends"))
+ );
+ }
+
+ parts.push(path.call(print, "body"));
+
+ return concat(parts);
+
+ case "ClassImplements":
+ case "InterfaceExtends":
+ return concat([
+ path.call(print, "id"),
+ path.call(print, "typeParameters")
+ ]);
+
+ case "IntersectionTypeAnnotation":
+ return fromString(" & ").join(path.map(print, "types"));
+
+ case "NullableTypeAnnotation":
+ return concat([
+ "?",
+ path.call(print, "typeAnnotation")
+ ]);
+
+ case "NumberTypeAnnotation":
+ return fromString("number", options);
+
+ case "ObjectTypeCallProperty":
+ return path.call(print, "value");
+
+ case "ObjectTypeIndexer":
+ return concat([
+ "[",
+ path.call(print, "id"),
+ ": ",
+ path.call(print, "key"),
+ "]: ",
+ path.call(print, "value")
+ ]);
+
+ case "ObjectTypeProperty":
+ return concat([
+ path.call(print, "key"),
+ ": ",
+ path.call(print, "value")
+ ]);
+
+ case "QualifiedTypeIdentifier":
+ return concat([
+ path.call(print, "qualification"),
+ ".",
+ path.call(print, "id")
+ ]);
+
+ case "StringLiteralTypeAnnotation":
+ return fromString(nodeStr(n.value, options), options);
+
+ case "StringTypeAnnotation":
+ return fromString("string", options);
+
+ case "TypeAlias":
+ return concat([
+ "type ",
+ path.call(print, "id"),
+ " = ",
+ path.call(print, "right")
+ ]);
+
+ case "TypeCastExpression":
+ return concat([
+ "(",
+ path.call(print, "expression"),
+ path.call(print, "typeAnnotation"),
+ ")"
+ ]);
+
+ case "TypeParameterDeclaration":
+ case "TypeParameterInstantiation":
+ return concat([
+ "<",
+ fromString(", ").join(path.map(print, "params")),
+ ">"
+ ]);
+
+ case "TypeofTypeAnnotation":
+ return concat([
+ fromString("typeof ", options),
+ path.call(print, "argument")
+ ]);
+
+ case "UnionTypeAnnotation":
+ return fromString(" | ").join(path.map(print, "types"));
+
+ case "VoidTypeAnnotation":
+ return fromString("void", options);
+
+ // Unhandled types below. If encountered, nodes of these types should
+ // be either left alone or desugared into AST types that are fully
+ // supported by the pretty-printer.
+ case "ClassHeritage": // TODO
+ case "ComprehensionBlock": // TODO
+ case "ComprehensionExpression": // TODO
+ case "Glob": // TODO
+ case "TaggedTemplateExpression": // TODO
+ case "TemplateElement": // TODO
+ case "TemplateLiteral": // TODO
+ case "GeneratorExpression": // TODO
+ case "LetStatement": // TODO
+ case "LetExpression": // TODO
+ case "GraphExpression": // TODO
+ case "GraphIndexExpression": // TODO
+
+ // XML types that nobody cares about or needs to print.
+ case "XMLDefaultDeclaration":
+ case "XMLAnyName":
+ case "XMLQualifiedIdentifier":
+ case "XMLFunctionQualifiedIdentifier":
+ case "XMLAttributeSelector":
+ case "XMLFilterExpression":
+ case "XML":
+ case "XMLElement":
+ case "XMLList":
+ case "XMLEscape":
+ case "XMLText":
+ case "XMLStartTag":
+ case "XMLEndTag":
+ case "XMLPointTag":
+ case "XMLName":
+ case "XMLAttribute":
+ case "XMLCdata":
+ case "XMLComment":
+ case "XMLProcessingInstruction":
+ default:
+ debugger;
+ throw new Error("unknown type: " + JSON.stringify(n.type));
+ }
+
+ return p;
+}
+
+function printStatementSequence(path, options, print) {
+ var inClassBody =
+ namedTypes.ClassBody &&
+ namedTypes.ClassBody.check(path.getParentNode());
+
+ var filtered = [];
+ path.each(function(stmtPath) {
+ var i = stmtPath.getName();
+ var stmt = stmtPath.getValue();
+
+ // Just in case the AST has been modified to contain falsy
+ // "statements," it's safer simply to skip them.
+ if (!stmt) {
+ return;
+ }
+
+ // Skip printing EmptyStatement nodes to avoid leaving stray
+ // semicolons lying around.
+ if (stmt.type === "EmptyStatement") {
+ return;
+ }
+
+ if (!inClassBody) {
+ namedTypes.Statement.assert(stmt);
+ }
+
+ // We can't hang onto stmtPath outside of this function, because
+ // it's just a reference to a mutable FastPath object, so we have
+ // to go ahead and print it here.
+ filtered.push({
+ node: stmt,
+ printed: print(stmtPath)
+ });
+ });
+
+ var prevTrailingSpace = null;
+ var len = filtered.length;
+ var parts = [];
+
+ filtered.forEach(function(info, i) {
+ var printed = info.printed;
+ var stmt = info.node;
+ var needSemicolon = true;
+ var multiLine = printed.length > 1;
+ var notFirst = i > 0;
+ var notLast = i < len - 1;
+ var leadingSpace;
+ var trailingSpace;
+
+ if (inClassBody) {
+ if (namedTypes.MethodDefinition.check(stmt) ||
+ (namedTypes.ClassPropertyDefinition.check(stmt) &&
+ namedTypes.MethodDefinition.check(stmt.definition))) {
+ needSemicolon = false;
+ }
+ }
+
+ if (needSemicolon) {
+ // Try to add a semicolon to anything that isn't a method in a
+ // class body.
+ printed = maybeAddSemicolon(printed);
+ }
+
+ var trueLoc = options.reuseWhitespace && util.getTrueLoc(stmt);
+ var lines = trueLoc && trueLoc.lines;
+
+ if (notFirst) {
+ if (lines) {
+ var beforeStart = lines.skipSpaces(trueLoc.start, true);
+ var beforeStartLine = beforeStart ? beforeStart.line : 1;
+ var leadingGap = trueLoc.start.line - beforeStartLine;
+ leadingSpace = Array(leadingGap + 1).join("\n");
+ } else {
+ leadingSpace = multiLine ? "\n\n" : "\n";
+ }
+ } else {
+ leadingSpace = "";
+ }
+
+ if (notLast) {
+ if (lines) {
+ var afterEnd = lines.skipSpaces(trueLoc.end);
+ var afterEndLine = afterEnd ? afterEnd.line : lines.length;
+ var trailingGap = afterEndLine - trueLoc.end.line;
+ trailingSpace = Array(trailingGap + 1).join("\n");
+ } else {
+ trailingSpace = multiLine ? "\n\n" : "\n";
+ }
+ } else {
+ trailingSpace = "";
+ }
+
+ parts.push(
+ maxSpace(prevTrailingSpace, leadingSpace),
+ printed
+ );
+
+ if (notLast) {
+ prevTrailingSpace = trailingSpace;
+ } else if (trailingSpace) {
+ parts.push(trailingSpace);
+ }
+ });
+
+ return concat(parts);
+}
+
+function maxSpace(s1, s2) {
+ if (!s1 && !s2) {
+ return fromString("");
+ }
+
+ if (!s1) {
+ return fromString(s2);
+ }
+
+ if (!s2) {
+ return fromString(s1);
+ }
+
+ var spaceLines1 = fromString(s1);
+ var spaceLines2 = fromString(s2);
+
+ if (spaceLines2.length > spaceLines1.length) {
+ return spaceLines2;
+ }
+
+ return spaceLines1;
+}
+
+function printMethod(path, options, print) {
+ var node = path.getNode();
+ var kind = node.kind;
+ var parts = [];
+
+ namedTypes.FunctionExpression.assert(node.value);
+
+ if (node.value.async) {
+ parts.push("async ");
+ }
+
+ if (!kind || kind === "init") {
+ if (node.value.generator) {
+ parts.push("*");
+ }
+ } else {
+ assert.ok(kind === "get" || kind === "set");
+ parts.push(kind, " ");
+ }
+
+ var key = path.call(print, "key");
+ if (node.computed) {
+ key = concat(["[", key, "]"]);
+ }
+
+ parts.push(
+ key,
+ path.call(print, "value", "typeParameters"),
+ "(",
+ path.call(function(valuePath) {
+ return printFunctionParams(valuePath, options, print);
+ }, "value"),
+ ")",
+ path.call(print, "value", "returnType"),
+ " ",
+ path.call(print, "value", "body")
+ );
+
+ return concat(parts);
+}
+
+function printArgumentsList(path, options, print) {
+ var printed = path.map(print, "arguments");
+
+ var joined = fromString(", ").join(printed);
+ if (joined.getLineLength(1) > options.wrapColumn) {
+ joined = fromString(",\n").join(printed);
+ return concat([
+ "(\n",
+ joined.indent(options.tabWidth),
+ options.trailingComma ? ",\n)" : "\n)"
+ ]);
+ }
+
+ return concat(["(", joined, ")"]);
+}
+
+function printFunctionParams(path, options, print) {
+ var fun = path.getValue();
+ namedTypes.Function.assert(fun);
+
+ var printed = path.map(print, "params");
+
+ if (fun.defaults) {
+ path.each(function(defExprPath) {
+ var i = defExprPath.getName();
+ var p = printed[i];
+ if (p && defExprPath.getValue()) {
+ printed[i] = concat([p, "=", print(defExprPath)]);
+ }
+ }, "defaults");
+ }
+
+ if (fun.rest) {
+ printed.push(concat(["...", path.call(print, "rest")]));
+ }
+
+ var joined = fromString(", ").join(printed);
+ if (joined.length > 1 ||
+ joined.getLineLength(1) > options.wrapColumn) {
+ joined = fromString(",\n").join(printed);
+ if (options.trailingComma && !fun.rest) {
+ joined = concat([joined, ",\n"]);
+ }
+ return concat(["\n", joined.indent(options.tabWidth)]);
+ }
+
+ return joined;
+}
+
+function adjustClause(clause, options) {
+ if (clause.length > 1)
+ return concat([" ", clause]);
+
+ return concat([
+ "\n",
+ maybeAddSemicolon(clause).indent(options.tabWidth)
+ ]);
+}
+
+function lastNonSpaceCharacter(lines) {
+ var pos = lines.lastPos();
+ do {
+ var ch = lines.charAt(pos);
+ if (/\S/.test(ch))
+ return ch;
+ } while (lines.prevPos(pos));
+}
+
+function endsWithBrace(lines) {
+ return lastNonSpaceCharacter(lines) === "}";
+}
+
+function swapQuotes(str) {
+ return str.replace(/['"]/g, function(m) {
+ return m === '"' ? '\'' : '"';
+ });
+}
+
+function nodeStr(str, options) {
+ isString.assert(str);
+ switch (options.quote) {
+ case "auto":
+ var double = JSON.stringify(str);
+ var single = swapQuotes(JSON.stringify(swapQuotes(str)));
+ return double.length > single.length ? single : double;
+ case "single":
+ return swapQuotes(JSON.stringify(swapQuotes(str)));
+ case "double":
+ default:
+ return JSON.stringify(str);
+ }
+}
+
+function maybeAddSemicolon(lines) {
+ var eoc = lastNonSpaceCharacter(lines);
+ if (!eoc || "\n};".indexOf(eoc) < 0)
+ return concat([lines, ";"]);
+ return lines;
+}
+
+},{"./comments":506,"./fast-path":507,"./lines":508,"./options":510,"./patcher":512,"./types":514,"./util":515,"assert":213,"source-map":530}],514:[function(require,module,exports){
+var types = require("ast-types");
+var def = types.Type.def;
+
+def("File")
+ .bases("Node")
+ .build("program")
+ .field("program", def("Program"));
+
+types.finalize();
+
+module.exports = types;
+
+},{"ast-types":194}],515:[function(require,module,exports){
+var assert = require("assert");
+var types = require("./types");
+var getFieldValue = types.getFieldValue;
+var n = types.namedTypes;
+var sourceMap = require("source-map");
+var SourceMapConsumer = sourceMap.SourceMapConsumer;
+var SourceMapGenerator = sourceMap.SourceMapGenerator;
+var hasOwn = Object.prototype.hasOwnProperty;
+
+function getUnionOfKeys() {
+ var result = {};
+ var argc = arguments.length;
+ for (var i = 0; i < argc; ++i) {
+ var keys = Object.keys(arguments[i]);
+ var keyCount = keys.length;
+ for (var j = 0; j < keyCount; ++j) {
+ result[keys[j]] = true;
+ }
+ }
+ return result;
+}
+exports.getUnionOfKeys = getUnionOfKeys;
+
+function comparePos(pos1, pos2) {
+ return (pos1.line - pos2.line) || (pos1.column - pos2.column);
+}
+exports.comparePos = comparePos;
+
+function copyPos(pos) {
+ return {
+ line: pos.line,
+ column: pos.column
+ };
+}
+exports.copyPos = copyPos;
+
+exports.composeSourceMaps = function(formerMap, latterMap) {
+ if (formerMap) {
+ if (!latterMap) {
+ return formerMap;
+ }
+ } else {
+ return latterMap || null;
+ }
+
+ var smcFormer = new SourceMapConsumer(formerMap);
+ var smcLatter = new SourceMapConsumer(latterMap);
+ var smg = new SourceMapGenerator({
+ file: latterMap.file,
+ sourceRoot: latterMap.sourceRoot
+ });
+
+ var sourcesToContents = {};
+
+ smcLatter.eachMapping(function(mapping) {
+ var origPos = smcFormer.originalPositionFor({
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ });
+
+ var sourceName = origPos.source;
+ if (sourceName === null) {
+ return;
+ }
+
+ smg.addMapping({
+ source: sourceName,
+ original: copyPos(origPos),
+ generated: {
+ line: mapping.generatedLine,
+ column: mapping.generatedColumn
+ },
+ name: mapping.name
+ });
+
+ var sourceContent = smcFormer.sourceContentFor(sourceName);
+ if (sourceContent && !hasOwn.call(sourcesToContents, sourceName)) {
+ sourcesToContents[sourceName] = sourceContent;
+ smg.setSourceContent(sourceName, sourceContent);
+ }
+ });
+
+ return smg.toJSON();
+};
+
+exports.getTrueLoc = function(node) {
+ // It's possible that node is newly-created (not parsed by Esprima),
+ // in which case it probably won't have a .loc property (or an
+ // .original property for that matter). That's fine; we'll just
+ // pretty-print it as usual.
+ if (!node.loc) {
+ return null;
+ }
+
+ if (!node.comments) {
+ // If the node has no comments, regard node.loc as true.
+ return node.loc;
+ }
+
+ var start = node.loc.start;
+ var end = node.loc.end;
+
+ // If the node has any comments, their locations might contribute to
+ // the true start/end positions of the node.
+ node.comments.forEach(function(comment) {
+ if (comment.loc) {
+ if (comparePos(comment.loc.start, start) < 0) {
+ start = comment.loc.start;
+ }
+
+ if (comparePos(end, comment.loc.end) < 0) {
+ end = comment.loc.end;
+ }
+ }
+ });
+
+ return {
+ lines: node.loc.lines,
+ start: start,
+ end: end
+ };
+};
+
+exports.fixFaultyLocations = function(node) {
+ if ((n.MethodDefinition && n.MethodDefinition.check(node)) ||
+ (n.Property.check(node) && (node.method || node.shorthand))) {
+ // If the node is a MethodDefinition or a .method or .shorthand
+ // Property, then the location information stored in
+ // node.value.loc is very likely untrustworthy (just the {body}
+ // part of a method, or nothing in the case of shorthand
+ // properties), so we null out that information to prevent
+ // accidental reuse of bogus source code during reprinting.
+ node.value.loc = null;
+
+ if (n.FunctionExpression.check(node.value)) {
+ // FunctionExpression method values should be anonymous,
+ // because their .id fields are ignored anyway.
+ node.value.id = null;
+ }
+ }
+
+ var loc = node.loc;
+ if (loc) {
+ if (loc.start.line < 1) {
+ loc.start.line = 1;
+ }
+
+ if (loc.end.line < 1) {
+ loc.end.line = 1;
+ }
+ }
+};
+
+},{"./types":514,"assert":213,"source-map":530}],516:[function(require,module,exports){
+(function (process){
+var types = require("./lib/types");
+var parse = require("./lib/parser").parse;
+var Printer = require("./lib/printer").Printer;
+
+function print(node, options) {
+ return new Printer(options).print(node);
+}
+
+function prettyPrint(node, options) {
+ return new Printer(options).printGenerically(node);
+}
+
+function run(transformer, options) {
+ return runFile(process.argv[2], transformer, options);
+}
+
+function runFile(path, transformer, options) {
+ require("fs").readFile(path, "utf-8", function(err, code) {
+ if (err) {
+ console.error(err);
+ return;
+ }
+
+ runString(code, transformer, options);
+ });
+}
+
+function defaultWriteback(output) {
+ process.stdout.write(output);
+}
+
+function runString(code, transformer, options) {
+ var writeback = options && options.writeback || defaultWriteback;
+ transformer(parse(code, options), function(node) {
+ writeback(print(node, options).code);
+ });
+}
+
+Object.defineProperties(exports, {
+ /**
+ * Parse a string of code into an augmented syntax tree suitable for
+ * arbitrary modification and reprinting.
+ */
+ parse: {
+ enumerable: true,
+ value: parse
+ },
+
+ /**
+ * Traverse and potentially modify an abstract syntax tree using a
+ * convenient visitor syntax:
+ *
+ * recast.visit(ast, {
+ * names: [],
+ * visitIdentifier: function(path) {
+ * var node = path.value;
+ * this.visitor.names.push(node.name);
+ * this.traverse(path);
+ * }
+ * });
+ */
+ visit: {
+ enumerable: true,
+ value: types.visit
+ },
+
+ /**
+ * Reprint a modified syntax tree using as much of the original source
+ * code as possible.
+ */
+ print: {
+ enumerable: true,
+ value: print
+ },
+
+ /**
+ * Print without attempting to reuse any original source code.
+ */
+ prettyPrint: {
+ enumerable: false,
+ value: prettyPrint
+ },
+
+ /**
+ * Customized version of require("ast-types").
+ */
+ types: {
+ enumerable: false,
+ value: types
+ },
+
+ /**
+ * Convenient command-line interface (see e.g. example/add-braces).
+ */
+ run: {
+ enumerable: false,
+ value: run
+ }
+});
+
+}).call(this,require('_process'))
+},{"./lib/parser":511,"./lib/printer":513,"./lib/types":514,"_process":223,"fs":212}],517:[function(require,module,exports){
+(function (process){
+var Stream = require('stream')
+
+// through
+//
+// a stream that does nothing but re-emit the input.
+// useful for aggregating a series of changing but not ending streams into one stream)
+
+exports = module.exports = through
+through.through = through
+
+//create a readable writable stream.
+
+function through (write, end, opts) {
+ write = write || function (data) { this.queue(data) }
+ end = end || function () { this.queue(null) }
+
+ var ended = false, destroyed = false, buffer = [], _ended = false
+ var stream = new Stream()
+ stream.readable = stream.writable = true
+ stream.paused = false
+
+// stream.autoPause = !(opts && opts.autoPause === false)
+ stream.autoDestroy = !(opts && opts.autoDestroy === false)
+
+ stream.write = function (data) {
+ write.call(this, data)
+ return !stream.paused
+ }
+
+ function drain() {
+ while(buffer.length && !stream.paused) {
+ var data = buffer.shift()
+ if(null === data)
+ return stream.emit('end')
+ else
+ stream.emit('data', data)
+ }
+ }
+
+ stream.queue = stream.push = function (data) {
+// console.error(ended)
+ if(_ended) return stream
+ if(data === null) _ended = true
+ buffer.push(data)
+ drain()
+ return stream
+ }
+
+ //this will be registered as the first 'end' listener
+ //must call destroy next tick, to make sure we're after any
+ //stream piped from here.
+ //this is only a problem if end is not emitted synchronously.
+ //a nicer way to do this is to make sure this is the last listener for 'end'
+
+ stream.on('end', function () {
+ stream.readable = false
+ if(!stream.writable && stream.autoDestroy)
+ process.nextTick(function () {
+ stream.destroy()
+ })
+ })
+
+ function _end () {
+ stream.writable = false
+ end.call(stream)
+ if(!stream.readable && stream.autoDestroy)
+ stream.destroy()
+ }
+
+ stream.end = function (data) {
+ if(ended) return
+ ended = true
+ if(arguments.length) stream.write(data)
+ _end() // will emit or queue
+ return stream
+ }
+
+ stream.destroy = function () {
+ if(destroyed) return
+ destroyed = true
+ ended = true
+ buffer.length = 0
+ stream.writable = stream.readable = false
+ stream.emit('close')
+ return stream
+ }
+
+ stream.pause = function () {
+ if(stream.paused) return
+ stream.paused = true
+ return stream
+ }
+
+ stream.resume = function () {
+ if(stream.paused) {
+ stream.paused = false
+ stream.emit('resume')
+ }
+ drain()
+ //may have become paused again,
+ //as drain emits 'data'.
+ if(!stream.paused)
+ stream.emit('drain')
+ return stream
+ }
+ return stream
+}
+
+
+}).call(this,require('_process'))
+},{"_process":223,"stream":235}],518:[function(require,module,exports){
+(function (process,global){
+/**
+ * Copyright (c) 2014, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * https://raw.github.com/facebook/regenerator/master/LICENSE file. An
+ * additional grant of patent rights can be found in the PATENTS file in
+ * the same directory.
+ */
+
+!(function(global) {
+ "use strict";
+
+ var hasOwn = Object.prototype.hasOwnProperty;
+ var undefined; // More compressible than void 0.
+ var iteratorSymbol =
+ typeof Symbol === "function" && Symbol.iterator || "@@iterator";
+
+ var inModule = typeof module === "object";
+ var runtime = global.regeneratorRuntime;
+ if (runtime) {
+ if (inModule) {
+ // If regeneratorRuntime is defined globally and we're in a module,
+ // make the exports object identical to regeneratorRuntime.
+ module.exports = runtime;
+ }
+ // Don't bother evaluating the rest of this file if the runtime was
+ // already defined globally.
+ return;
+ }
+
+ // Define the runtime globally (as expected by generated code) as either
+ // module.exports (if we're in a module) or a new, empty object.
+ runtime = global.regeneratorRuntime = inModule ? module.exports : {};
+
+ function wrap(innerFn, outerFn, self, tryLocsList) {
+ // If outerFn provided, then outerFn.prototype instanceof Generator.
+ var generator = Object.create((outerFn || Generator).prototype);
+
+ generator._invoke = makeInvokeMethod(
+ innerFn, self || null,
+ new Context(tryLocsList || [])
+ );
+
+ return generator;
+ }
+ runtime.wrap = wrap;
+
+ // Try/catch helper to minimize deoptimizations. Returns a completion
+ // record like context.tryEntries[i].completion. This interface could
+ // have been (and was previously) designed to take a closure to be
+ // invoked without arguments, but in all the cases we care about we
+ // already have an existing method we want to call, so there's no need
+ // to create a new function object. We can even get away with assuming
+ // the method takes exactly one argument, since that happens to be true
+ // in every case, so we don't have to touch the arguments object. The
+ // only additional allocation required is the completion record, which
+ // has a stable shape and so hopefully should be cheap to allocate.
+ function tryCatch(fn, obj, arg) {
+ try {
+ return { type: "normal", arg: fn.call(obj, arg) };
+ } catch (err) {
+ return { type: "throw", arg: err };
+ }
+ }
+
+ var GenStateSuspendedStart = "suspendedStart";
+ var GenStateSuspendedYield = "suspendedYield";
+ var GenStateExecuting = "executing";
+ var GenStateCompleted = "completed";
+
+ // Returning this object from the innerFn has the same effect as
+ // breaking out of the dispatch switch statement.
+ var ContinueSentinel = {};
+
+ // Dummy constructor functions that we use as the .constructor and
+ // .constructor.prototype properties for functions that return Generator
+ // objects. For full spec compliance, you may wish to configure your
+ // minifier not to mangle the names of these two functions.
+ function Generator() {}
+ function GeneratorFunction() {}
+ function GeneratorFunctionPrototype() {}
+
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype;
+ GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
+ GeneratorFunctionPrototype.constructor = GeneratorFunction;
+ GeneratorFunction.displayName = "GeneratorFunction";
+
+ // Helper for defining the .next, .throw, and .return methods of the
+ // Iterator interface in terms of a single ._invoke method.
+ function defineIteratorMethods(prototype) {
+ ["next", "throw", "return"].forEach(function(method) {
+ prototype[method] = function(arg) {
+ return this._invoke(method, arg);
+ };
+ });
+ }
+
+ runtime.isGeneratorFunction = function(genFun) {
+ var ctor = typeof genFun === "function" && genFun.constructor;
+ return ctor
+ ? ctor === GeneratorFunction ||
+ // For the native GeneratorFunction constructor, the best we can
+ // do is to check its .name property.
+ (ctor.displayName || ctor.name) === "GeneratorFunction"
+ : false;
+ };
+
+ runtime.mark = function(genFun) {
+ genFun.__proto__ = GeneratorFunctionPrototype;
+ genFun.prototype = Object.create(Gp);
+ return genFun;
+ };
+
+ // Within the body of any async function, `await x` is transformed to
+ // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
+ // `value instanceof AwaitArgument` to determine if the yielded value is
+ // meant to be awaited. Some may consider the name of this method too
+ // cutesy, but they are curmudgeons.
+ runtime.awrap = function(arg) {
+ return new AwaitArgument(arg);
+ };
+
+ function AwaitArgument(arg) {
+ this.arg = arg;
+ }
+
+ function AsyncIterator(generator) {
+ // This invoke function is written in a style that assumes some
+ // calling function (or Promise) will handle exceptions.
+ function invoke(method, arg) {
+ var result = generator[method](arg);
+ var value = result.value;
+ return value instanceof AwaitArgument
+ ? Promise.resolve(value.arg).then(invokeNext, invokeThrow)
+ : Promise.resolve(value).then(function(unwrapped) {
+ result.value = unwrapped;
+ return result;
+ }, invokeThrow);
+ }
+
+ if (typeof process === "object" && process.domain) {
+ invoke = process.domain.bind(invoke);
+ }
+
+ var invokeNext = invoke.bind(generator, "next");
+ var invokeThrow = invoke.bind(generator, "throw");
+ var invokeReturn = invoke.bind(generator, "return");
+ var previousPromise;
+
+ function enqueue(method, arg) {
+ var enqueueResult =
+ // If enqueue has been called before, then we want to wait until
+ // all previous Promises have been resolved before calling invoke,
+ // so that results are always delivered in the correct order. If
+ // enqueue has not been called before, then it is important to
+ // call invoke immediately, without waiting on a callback to fire,
+ // so that the async generator function has the opportunity to do
+ // any necessary setup in a predictable way. This predictability
+ // is why the Promise constructor synchronously invokes its
+ // executor callback, and why async functions synchronously
+ // execute code before the first await. Since we implement simple
+ // async functions in terms of async generators, it is especially
+ // important to get this right, even though it requires care.
+ previousPromise ? previousPromise.then(function() {
+ return invoke(method, arg);
+ }) : new Promise(function(resolve) {
+ resolve(invoke(method, arg));
+ });
+
+ // Avoid propagating enqueueResult failures to Promises returned by
+ // later invocations of the iterator, and call generator.return() to
+ // allow the generator a chance to clean up.
+ previousPromise = enqueueResult["catch"](invokeReturn);
+
+ return enqueueResult;
+ }
+
+ // Define the unified helper method that is used to implement .next,
+ // .throw, and .return (see defineIteratorMethods).
+ this._invoke = enqueue;
+ }
+
+ defineIteratorMethods(AsyncIterator.prototype);
+
+ // Note that simple async functions are implemented on top of
+ // AsyncIterator objects; they just return a Promise for the value of
+ // the final result produced by the iterator.
+ runtime.async = function(innerFn, outerFn, self, tryLocsList) {
+ var iter = new AsyncIterator(
+ wrap(innerFn, outerFn, self, tryLocsList)
+ );
+
+ return runtime.isGeneratorFunction(outerFn)
+ ? iter // If outerFn is a generator, return the full iterator.
+ : iter.next().then(function(result) {
+ return result.done ? result.value : iter.next();
+ });
+ };
+
+ function makeInvokeMethod(innerFn, self, context) {
+ var state = GenStateSuspendedStart;
+
+ return function invoke(method, arg) {
+ if (state === GenStateExecuting) {
+ throw new Error("Generator is already running");
+ }
+
+ if (state === GenStateCompleted) {
+ // Be forgiving, per 25.3.3.3.3 of the spec:
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
+ return doneResult();
+ }
+
+ while (true) {
+ var delegate = context.delegate;
+ if (delegate) {
+ if (method === "return" ||
+ (method === "throw" && delegate.iterator[method] === undefined)) {
+ // A return or throw (when the delegate iterator has no throw
+ // method) always terminates the yield* loop.
+ context.delegate = null;
+
+ // If the delegate iterator has a return method, give it a
+ // chance to clean up.
+ var returnMethod = delegate.iterator["return"];
+ if (returnMethod) {
+ var record = tryCatch(returnMethod, delegate.iterator, arg);
+ if (record.type === "throw") {
+ // If the return method threw an exception, let that
+ // exception prevail over the original return or throw.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+ }
+
+ if (method === "return") {
+ // Continue with the outer return, now that the delegate
+ // iterator has been terminated.
+ continue;
+ }
+ }
+
+ var record = tryCatch(
+ delegate.iterator[method],
+ delegate.iterator,
+ arg
+ );
+
+ if (record.type === "throw") {
+ context.delegate = null;
+
+ // Like returning generator.throw(uncaught), but without the
+ // overhead of an extra function call.
+ method = "throw";
+ arg = record.arg;
+ continue;
+ }
+
+ // Delegate generator ran and handled its own exceptions so
+ // regardless of what the method was, we continue as if it is
+ // "next" with an undefined arg.
+ method = "next";
+ arg = undefined;
+
+ var info = record.arg;
+ if (info.done) {
+ context[delegate.resultName] = info.value;
+ context.next = delegate.nextLoc;
+ } else {
+ state = GenStateSuspendedYield;
+ return info;
+ }
+
+ context.delegate = null;
+ }
+
+ if (method === "next") {
+ if (state === GenStateSuspendedYield) {
+ context.sent = arg;
+ } else {
+ delete context.sent;
+ }
+
+ } else if (method === "throw") {
+ if (state === GenStateSuspendedStart) {
+ state = GenStateCompleted;
+ throw arg;
+ }
+
+ if (context.dispatchException(arg)) {
+ // If the dispatched exception was caught by a catch block,
+ // then let that catch block handle the exception normally.
+ method = "next";
+ arg = undefined;
+ }
+
+ } else if (method === "return") {
+ context.abrupt("return", arg);
+ }
+
+ state = GenStateExecuting;
+
+ var record = tryCatch(innerFn, self, context);
+ if (record.type === "normal") {
+ // If an exception is thrown from innerFn, we leave state ===
+ // GenStateExecuting and loop back for another invocation.
+ state = context.done
+ ? GenStateCompleted
+ : GenStateSuspendedYield;
+
+ var info = {
+ value: record.arg,
+ done: context.done
+ };
+
+ if (record.arg === ContinueSentinel) {
+ if (context.delegate && method === "next") {
+ // Deliberately forget the last sent value so that we don't
+ // accidentally pass it on to the delegate.
+ arg = undefined;
+ }
+ } else {
+ return info;
+ }
+
+ } else if (record.type === "throw") {
+ state = GenStateCompleted;
+ // Dispatch the exception by looping back around to the
+ // context.dispatchException(arg) call above.
+ method = "throw";
+ arg = record.arg;
+ }
+ }
+ };
+ }
+
+ // Define Generator.prototype.{next,throw,return} in terms of the
+ // unified ._invoke helper method.
+ defineIteratorMethods(Gp);
+
+ Gp[iteratorSymbol] = function() {
+ return this;
+ };
+
+ Gp.toString = function() {
+ return "[object Generator]";
+ };
+
+ function pushTryEntry(locs) {
+ var entry = { tryLoc: locs[0] };
+
+ if (1 in locs) {
+ entry.catchLoc = locs[1];
+ }
+
+ if (2 in locs) {
+ entry.finallyLoc = locs[2];
+ entry.afterLoc = locs[3];
+ }
+
+ this.tryEntries.push(entry);
+ }
+
+ function resetTryEntry(entry) {
+ var record = entry.completion || {};
+ record.type = "normal";
+ delete record.arg;
+ entry.completion = record;
+ }
+
+ function Context(tryLocsList) {
+ // The root entry object (effectively a try statement without a catch
+ // or a finally block) gives us a place to store values thrown from
+ // locations where there is no enclosing try statement.
+ this.tryEntries = [{ tryLoc: "root" }];
+ tryLocsList.forEach(pushTryEntry, this);
+ this.reset();
+ }
+
+ runtime.keys = function(object) {
+ var keys = [];
+ for (var key in object) {
+ keys.push(key);
+ }
+ keys.reverse();
+
+ // Rather than returning an object with a next method, we keep
+ // things simple and return the next function itself.
+ return function next() {
+ while (keys.length) {
+ var key = keys.pop();
+ if (key in object) {
+ next.value = key;
+ next.done = false;
+ return next;
+ }
+ }
+
+ // To avoid creating an additional object, we just hang the .value
+ // and .done properties off the next function object itself. This
+ // also ensures that the minifier will not anonymize the function.
+ next.done = true;
+ return next;
+ };
+ };
+
+ function values(iterable) {
+ if (iterable) {
+ var iteratorMethod = iterable[iteratorSymbol];
+ if (iteratorMethod) {
+ return iteratorMethod.call(iterable);
+ }
+
+ if (typeof iterable.next === "function") {
+ return iterable;
+ }
+
+ if (!isNaN(iterable.length)) {
+ var i = -1, next = function next() {
+ while (++i < iterable.length) {
+ if (hasOwn.call(iterable, i)) {
+ next.value = iterable[i];
+ next.done = false;
+ return next;
+ }
+ }
+
+ next.value = undefined;
+ next.done = true;
+
+ return next;
+ };
+
+ return next.next = next;
+ }
+ }
+
+ // Return an iterator with no values.
+ return { next: doneResult };
+ }
+ runtime.values = values;
+
+ function doneResult() {
+ return { value: undefined, done: true };
+ }
+
+ Context.prototype = {
+ constructor: Context,
+
+ reset: function() {
+ this.prev = 0;
+ this.next = 0;
+ this.sent = undefined;
+ this.done = false;
+ this.delegate = null;
+
+ this.tryEntries.forEach(resetTryEntry);
+
+ // Pre-initialize at least 20 temporary variables to enable hidden
+ // class optimizations for simple generators.
+ for (var tempIndex = 0, tempName;
+ hasOwn.call(this, tempName = "t" + tempIndex) || tempIndex < 20;
+ ++tempIndex) {
+ this[tempName] = null;
+ }
+ },
+
+ stop: function() {
+ this.done = true;
+
+ var rootEntry = this.tryEntries[0];
+ var rootRecord = rootEntry.completion;
+ if (rootRecord.type === "throw") {
+ throw rootRecord.arg;
+ }
+
+ return this.rval;
+ },
+
+ dispatchException: function(exception) {
+ if (this.done) {
+ throw exception;
+ }
+
+ var context = this;
+ function handle(loc, caught) {
+ record.type = "throw";
+ record.arg = exception;
+ context.next = loc;
+ return !!caught;
+ }
+
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ var record = entry.completion;
+
+ if (entry.tryLoc === "root") {
+ // Exception thrown outside of any try block that could handle
+ // it, so set the completion value of the entire function to
+ // throw the exception.
+ return handle("end");
+ }
+
+ if (entry.tryLoc <= this.prev) {
+ var hasCatch = hasOwn.call(entry, "catchLoc");
+ var hasFinally = hasOwn.call(entry, "finallyLoc");
+
+ if (hasCatch && hasFinally) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ } else if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else if (hasCatch) {
+ if (this.prev < entry.catchLoc) {
+ return handle(entry.catchLoc, true);
+ }
+
+ } else if (hasFinally) {
+ if (this.prev < entry.finallyLoc) {
+ return handle(entry.finallyLoc);
+ }
+
+ } else {
+ throw new Error("try statement without catch or finally");
+ }
+ }
+ }
+ },
+
+ abrupt: function(type, arg) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc <= this.prev &&
+ hasOwn.call(entry, "finallyLoc") &&
+ this.prev < entry.finallyLoc) {
+ var finallyEntry = entry;
+ break;
+ }
+ }
+
+ if (finallyEntry &&
+ (type === "break" ||
+ type === "continue") &&
+ finallyEntry.tryLoc <= arg &&
+ arg <= finallyEntry.finallyLoc) {
+ // Ignore the finally entry if control is not jumping to a
+ // location outside the try/catch block.
+ finallyEntry = null;
+ }
+
+ var record = finallyEntry ? finallyEntry.completion : {};
+ record.type = type;
+ record.arg = arg;
+
+ if (finallyEntry) {
+ this.next = finallyEntry.finallyLoc;
+ } else {
+ this.complete(record);
+ }
+
+ return ContinueSentinel;
+ },
+
+ complete: function(record, afterLoc) {
+ if (record.type === "throw") {
+ throw record.arg;
+ }
+
+ if (record.type === "break" ||
+ record.type === "continue") {
+ this.next = record.arg;
+ } else if (record.type === "return") {
+ this.rval = record.arg;
+ this.next = "end";
+ } else if (record.type === "normal" && afterLoc) {
+ this.next = afterLoc;
+ }
+ },
+
+ finish: function(finallyLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.finallyLoc === finallyLoc) {
+ this.complete(entry.completion, entry.afterLoc);
+ resetTryEntry(entry);
+ return ContinueSentinel;
+ }
+ }
+ },
+
+ "catch": function(tryLoc) {
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
+ var entry = this.tryEntries[i];
+ if (entry.tryLoc === tryLoc) {
+ var record = entry.completion;
+ if (record.type === "throw") {
+ var thrown = record.arg;
+ resetTryEntry(entry);
+ }
+ return thrown;
+ }
+ }
+
+ // The context.catch method must only be called with a location
+ // argument that corresponds to a known catch block.
+ throw new Error("illegal catch attempt");
+ },
+
+ delegateYield: function(iterable, resultName, nextLoc) {
+ this.delegate = {
+ iterator: values(iterable),
+ resultName: resultName,
+ nextLoc: nextLoc
+ };
+
+ return ContinueSentinel;
+ }
+ };
+})(
+ // Among the various tricks for obtaining a reference to the global
+ // object, this seems to be the most reliable technique that does not
+ // use indirect eval (which violates Content Security Policy).
+ typeof global === "object" ? global :
+ typeof window === "object" ? window :
+ typeof self === "object" ? self : this
+);
+
+}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{"_process":223}],519:[function(require,module,exports){
+// Generated by `/scripts/character-class-escape-sets.js`. Do not edit.
+var regenerate = require('regenerate');
+
+exports.REGULAR = {
+ 'd': regenerate()
+ .addRange(0x30, 0x39),
+ 'D': regenerate()
+ .addRange(0x0, 0x2F)
+ .addRange(0x3A, 0xFFFF),
+ 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF)
+ .addRange(0x9, 0xD)
+ .addRange(0x2000, 0x200A)
+ .addRange(0x2028, 0x2029),
+ 'S': regenerate()
+ .addRange(0x0, 0x8)
+ .addRange(0xE, 0x1F)
+ .addRange(0x21, 0x9F)
+ .addRange(0xA1, 0x167F)
+ .addRange(0x1681, 0x180D)
+ .addRange(0x180F, 0x1FFF)
+ .addRange(0x200B, 0x2027)
+ .addRange(0x202A, 0x202E)
+ .addRange(0x2030, 0x205E)
+ .addRange(0x2060, 0x2FFF)
+ .addRange(0x3001, 0xFEFE)
+ .addRange(0xFF00, 0xFFFF),
+ 'w': regenerate(0x5F)
+ .addRange(0x30, 0x39)
+ .addRange(0x41, 0x5A)
+ .addRange(0x61, 0x7A),
+ 'W': regenerate(0x60)
+ .addRange(0x0, 0x2F)
+ .addRange(0x3A, 0x40)
+ .addRange(0x5B, 0x5E)
+ .addRange(0x7B, 0xFFFF)
+};
+
+exports.UNICODE = {
+ 'd': regenerate()
+ .addRange(0x30, 0x39),
+ 'D': regenerate()
+ .addRange(0x0, 0x2F)
+ .addRange(0x3A, 0x10FFFF),
+ 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF)
+ .addRange(0x9, 0xD)
+ .addRange(0x2000, 0x200A)
+ .addRange(0x2028, 0x2029),
+ 'S': regenerate()
+ .addRange(0x0, 0x8)
+ .addRange(0xE, 0x1F)
+ .addRange(0x21, 0x9F)
+ .addRange(0xA1, 0x167F)
+ .addRange(0x1681, 0x180D)
+ .addRange(0x180F, 0x1FFF)
+ .addRange(0x200B, 0x2027)
+ .addRange(0x202A, 0x202E)
+ .addRange(0x2030, 0x205E)
+ .addRange(0x2060, 0x2FFF)
+ .addRange(0x3001, 0xFEFE)
+ .addRange(0xFF00, 0x10FFFF),
+ 'w': regenerate(0x5F)
+ .addRange(0x30, 0x39)
+ .addRange(0x41, 0x5A)
+ .addRange(0x61, 0x7A),
+ 'W': regenerate(0x60)
+ .addRange(0x0, 0x2F)
+ .addRange(0x3A, 0x40)
+ .addRange(0x5B, 0x5E)
+ .addRange(0x7B, 0x10FFFF)
+};
+
+exports.UNICODE_IGNORE_CASE = {
+ 'd': regenerate()
+ .addRange(0x30, 0x39),
+ 'D': regenerate()
+ .addRange(0x0, 0x2F)
+ .addRange(0x3A, 0x10FFFF),
+ 's': regenerate(0x20, 0xA0, 0x1680, 0x180E, 0x202F, 0x205F, 0x3000, 0xFEFF)
+ .addRange(0x9, 0xD)
+ .addRange(0x2000, 0x200A)
+ .addRange(0x2028, 0x2029),
+ 'S': regenerate()
+ .addRange(0x0, 0x8)
+ .addRange(0xE, 0x1F)
+ .addRange(0x21, 0x9F)
+ .addRange(0xA1, 0x167F)
+ .addRange(0x1681, 0x180D)
+ .addRange(0x180F, 0x1FFF)
+ .addRange(0x200B, 0x2027)
+ .addRange(0x202A, 0x202E)
+ .addRange(0x2030, 0x205E)
+ .addRange(0x2060, 0x2FFF)
+ .addRange(0x3001, 0xFEFE)
+ .addRange(0xFF00, 0x10FFFF),
+ 'w': regenerate(0x5F, 0x17F, 0x212A)
+ .addRange(0x30, 0x39)
+ .addRange(0x41, 0x5A)
+ .addRange(0x61, 0x7A),
+ 'W': regenerate(0x4B, 0x53, 0x60)
+ .addRange(0x0, 0x2F)
+ .addRange(0x3A, 0x40)
+ .addRange(0x5B, 0x5E)
+ .addRange(0x7B, 0x10FFFF)
+};
+
+},{"regenerate":521}],520:[function(require,module,exports){
+module.exports={
+ "75": 8490,
+ "83": 383,
+ "107": 8490,
+ "115": 383,
+ "181": 924,
+ "197": 8491,
+ "383": 83,
+ "452": 453,
+ "453": 452,
+ "455": 456,
+ "456": 455,
+ "458": 459,
+ "459": 458,
+ "497": 498,
+ "498": 497,
+ "837": 8126,
+ "914": 976,
+ "917": 1013,
+ "920": 1012,
+ "921": 8126,
+ "922": 1008,
+ "924": 181,
+ "928": 982,
+ "929": 1009,
+ "931": 962,
+ "934": 981,
+ "937": 8486,
+ "962": 931,
+ "976": 914,
+ "977": 1012,
+ "981": 934,
+ "982": 928,
+ "1008": 922,
+ "1009": 929,
+ "1012": [
+ 920,
+ 977
+ ],
+ "1013": 917,
+ "7776": 7835,
+ "7835": 7776,
+ "8126": [
+ 837,
+ 921
+ ],
+ "8486": 937,
+ "8490": 75,
+ "8491": 197,
+ "66560": 66600,
+ "66561": 66601,
+ "66562": 66602,
+ "66563": 66603,
+ "66564": 66604,
+ "66565": 66605,
+ "66566": 66606,
+ "66567": 66607,
+ "66568": 66608,
+ "66569": 66609,
+ "66570": 66610,
+ "66571": 66611,
+ "66572": 66612,
+ "66573": 66613,
+ "66574": 66614,
+ "66575": 66615,
+ "66576": 66616,
+ "66577": 66617,
+ "66578": 66618,
+ "66579": 66619,
+ "66580": 66620,
+ "66581": 66621,
+ "66582": 66622,
+ "66583": 66623,
+ "66584": 66624,
+ "66585": 66625,
+ "66586": 66626,
+ "66587": 66627,
+ "66588": 66628,
+ "66589": 66629,
+ "66590": 66630,
+ "66591": 66631,
+ "66592": 66632,
+ "66593": 66633,
+ "66594": 66634,
+ "66595": 66635,
+ "66596": 66636,
+ "66597": 66637,
+ "66598": 66638,
+ "66599": 66639,
+ "66600": 66560,
+ "66601": 66561,
+ "66602": 66562,
+ "66603": 66563,
+ "66604": 66564,
+ "66605": 66565,
+ "66606": 66566,
+ "66607": 66567,
+ "66608": 66568,
+ "66609": 66569,
+ "66610": 66570,
+ "66611": 66571,
+ "66612": 66572,
+ "66613": 66573,
+ "66614": 66574,
+ "66615": 66575,
+ "66616": 66576,
+ "66617": 66577,
+ "66618": 66578,
+ "66619": 66579,
+ "66620": 66580,
+ "66621": 66581,
+ "66622": 66582,
+ "66623": 66583,
+ "66624": 66584,
+ "66625": 66585,
+ "66626": 66586,
+ "66627": 66587,
+ "66628": 66588,
+ "66629": 66589,
+ "66630": 66590,
+ "66631": 66591,
+ "66632": 66592,
+ "66633": 66593,
+ "66634": 66594,
+ "66635": 66595,
+ "66636": 66596,
+ "66637": 66597,
+ "66638": 66598,
+ "66639": 66599,
+ "68736": 68800,
+ "68737": 68801,
+ "68738": 68802,
+ "68739": 68803,
+ "68740": 68804,
+ "68741": 68805,
+ "68742": 68806,
+ "68743": 68807,
+ "68744": 68808,
+ "68745": 68809,
+ "68746": 68810,
+ "68747": 68811,
+ "68748": 68812,
+ "68749": 68813,
+ "68750": 68814,
+ "68751": 68815,
+ "68752": 68816,
+ "68753": 68817,
+ "68754": 68818,
+ "68755": 68819,
+ "68756": 68820,
+ "68757": 68821,
+ "68758": 68822,
+ "68759": 68823,
+ "68760": 68824,
+ "68761": 68825,
+ "68762": 68826,
+ "68763": 68827,
+ "68764": 68828,
+ "68765": 68829,
+ "68766": 68830,
+ "68767": 68831,
+ "68768": 68832,
+ "68769": 68833,
+ "68770": 68834,
+ "68771": 68835,
+ "68772": 68836,
+ "68773": 68837,
+ "68774": 68838,
+ "68775": 68839,
+ "68776": 68840,
+ "68777": 68841,
+ "68778": 68842,
+ "68779": 68843,
+ "68780": 68844,
+ "68781": 68845,
+ "68782": 68846,
+ "68783": 68847,
+ "68784": 68848,
+ "68785": 68849,
+ "68786": 68850,
+ "68800": 68736,
+ "68801": 68737,
+ "68802": 68738,
+ "68803": 68739,
+ "68804": 68740,
+ "68805": 68741,
+ "68806": 68742,
+ "68807": 68743,
+ "68808": 68744,
+ "68809": 68745,
+ "68810": 68746,
+ "68811": 68747,
+ "68812": 68748,
+ "68813": 68749,
+ "68814": 68750,
+ "68815": 68751,
+ "68816": 68752,
+ "68817": 68753,
+ "68818": 68754,
+ "68819": 68755,
+ "68820": 68756,
+ "68821": 68757,
+ "68822": 68758,
+ "68823": 68759,
+ "68824": 68760,
+ "68825": 68761,
+ "68826": 68762,
+ "68827": 68763,
+ "68828": 68764,
+ "68829": 68765,
+ "68830": 68766,
+ "68831": 68767,
+ "68832": 68768,
+ "68833": 68769,
+ "68834": 68770,
+ "68835": 68771,
+ "68836": 68772,
+ "68837": 68773,
+ "68838": 68774,
+ "68839": 68775,
+ "68840": 68776,
+ "68841": 68777,
+ "68842": 68778,
+ "68843": 68779,
+ "68844": 68780,
+ "68845": 68781,
+ "68846": 68782,
+ "68847": 68783,
+ "68848": 68784,
+ "68849": 68785,
+ "68850": 68786,
+ "71840": 71872,
+ "71841": 71873,
+ "71842": 71874,
+ "71843": 71875,
+ "71844": 71876,
+ "71845": 71877,
+ "71846": 71878,
+ "71847": 71879,
+ "71848": 71880,
+ "71849": 71881,
+ "71850": 71882,
+ "71851": 71883,
+ "71852": 71884,
+ "71853": 71885,
+ "71854": 71886,
+ "71855": 71887,
+ "71856": 71888,
+ "71857": 71889,
+ "71858": 71890,
+ "71859": 71891,
+ "71860": 71892,
+ "71861": 71893,
+ "71862": 71894,
+ "71863": 71895,
+ "71864": 71896,
+ "71865": 71897,
+ "71866": 71898,
+ "71867": 71899,
+ "71868": 71900,
+ "71869": 71901,
+ "71870": 71902,
+ "71871": 71903,
+ "71872": 71840,
+ "71873": 71841,
+ "71874": 71842,
+ "71875": 71843,
+ "71876": 71844,
+ "71877": 71845,
+ "71878": 71846,
+ "71879": 71847,
+ "71880": 71848,
+ "71881": 71849,
+ "71882": 71850,
+ "71883": 71851,
+ "71884": 71852,
+ "71885": 71853,
+ "71886": 71854,
+ "71887": 71855,
+ "71888": 71856,
+ "71889": 71857,
+ "71890": 71858,
+ "71891": 71859,
+ "71892": 71860,
+ "71893": 71861,
+ "71894": 71862,
+ "71895": 71863,
+ "71896": 71864,
+ "71897": 71865,
+ "71898": 71866,
+ "71899": 71867,
+ "71900": 71868,
+ "71901": 71869,
+ "71902": 71870,
+ "71903": 71871
+}
+
+},{}],521:[function(require,module,exports){
+(function (global){
+/*! https://mths.be/regenerate v1.2.0 by @mathias | MIT license */
+;(function(root) {
+
+ // Detect free variables `exports`.
+ var freeExports = typeof exports == 'object' && exports;
+
+ // Detect free variable `module`.
+ var freeModule = typeof module == 'object' && module &&
+ module.exports == freeExports && module;
+
+ // Detect free variable `global`, from Node.js or Browserified code,
+ // and use it as `root`.
+ var freeGlobal = typeof global == 'object' && global;
+ if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
+ root = freeGlobal;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ var ERRORS = {
+ 'rangeOrder': 'A range\u2019s `stop` value must be greater than or equal ' +
+ 'to the `start` value.',
+ 'codePointRange': 'Invalid code point value. Code points range from ' +
+ 'U+000000 to U+10FFFF.'
+ };
+
+ // https://mathiasbynens.be/notes/javascript-encoding#surrogate-pairs
+ var HIGH_SURROGATE_MIN = 0xD800;
+ var HIGH_SURROGATE_MAX = 0xDBFF;
+ var LOW_SURROGATE_MIN = 0xDC00;
+ var LOW_SURROGATE_MAX = 0xDFFF;
+
+ // In Regenerate output, `\0` will never be preceded by `\` because we sort
+ // by code point value, so let’s keep this regular expression simple.
+ var regexNull = /\\x00([^0123456789]|$)/g;
+
+ var object = {};
+ var hasOwnProperty = object.hasOwnProperty;
+ var extend = function(destination, source) {
+ var key;
+ for (key in source) {
+ if (hasOwnProperty.call(source, key)) {
+ destination[key] = source[key];
+ }
+ }
+ return destination;
+ };
+
+ var forEach = function(array, callback) {
+ var index = -1;
+ var length = array.length;
+ while (++index < length) {
+ callback(array[index], index);
+ }
+ };
+
+ var toString = object.toString;
+ var isArray = function(value) {
+ return toString.call(value) == '[object Array]';
+ };
+ var isNumber = function(value) {
+ return typeof value == 'number' ||
+ toString.call(value) == '[object Number]';
+ };
+
+ // This assumes that `number` is a positive integer that `toString()`s nicely
+ // (which is the case for all code point values).
+ var zeroes = '0000';
+ var pad = function(number, totalCharacters) {
+ var string = String(number);
+ return string.length < totalCharacters
+ ? (zeroes + string).slice(-totalCharacters)
+ : string;
+ };
+
+ var hex = function(number) {
+ return Number(number).toString(16).toUpperCase();
+ };
+
+ var slice = [].slice;
+
+ /*--------------------------------------------------------------------------*/
+
+ var dataFromCodePoints = function(codePoints) {
+ var index = -1;
+ var length = codePoints.length;
+ var max = length - 1;
+ var result = [];
+ var isStart = true;
+ var tmp;
+ var previous = 0;
+ while (++index < length) {
+ tmp = codePoints[index];
+ if (isStart) {
+ result.push(tmp);
+ previous = tmp;
+ isStart = false;
+ } else {
+ if (tmp == previous + 1) {
+ if (index != max) {
+ previous = tmp;
+ continue;
+ } else {
+ isStart = true;
+ result.push(tmp + 1);
+ }
+ } else {
+ // End the previous range and start a new one.
+ result.push(previous + 1, tmp);
+ previous = tmp;
+ }
+ }
+ }
+ if (!isStart) {
+ result.push(tmp + 1);
+ }
+ return result;
+ };
+
+ var dataRemove = function(data, codePoint) {
+ // Iterate over the data per `(start, end)` pair.
+ var index = 0;
+ var start;
+ var end;
+ var length = data.length;
+ while (index < length) {
+ start = data[index];
+ end = data[index + 1];
+ if (codePoint >= start && codePoint < end) {
+ // Modify this pair.
+ if (codePoint == start) {
+ if (end == start + 1) {
+ // Just remove `start` and `end`.
+ data.splice(index, 2);
+ return data;
+ } else {
+ // Just replace `start` with a new value.
+ data[index] = codePoint + 1;
+ return data;
+ }
+ } else if (codePoint == end - 1) {
+ // Just replace `end` with a new value.
+ data[index + 1] = codePoint;
+ return data;
+ } else {
+ // Replace `[start, end]` with `[startA, endA, startB, endB]`.
+ data.splice(index, 2, start, codePoint, codePoint + 1, end);
+ return data;
+ }
+ }
+ index += 2;
+ }
+ return data;
+ };
+
+ var dataRemoveRange = function(data, rangeStart, rangeEnd) {
+ if (rangeEnd < rangeStart) {
+ throw Error(ERRORS.rangeOrder);
+ }
+ // Iterate over the data per `(start, end)` pair.
+ var index = 0;
+ var start;
+ var end;
+ while (index < data.length) {
+ start = data[index];
+ end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
+
+ // Exit as soon as no more matching pairs can be found.
+ if (start > rangeEnd) {
+ return data;
+ }
+
+ // Check if this range pair is equal to, or forms a subset of, the range
+ // to be removed.
+ // E.g. we have `[0, 11, 40, 51]` and want to remove 0-10 → `[40, 51]`.
+ // E.g. we have `[40, 51]` and want to remove 0-100 → `[]`.
+ if (rangeStart <= start && rangeEnd >= end) {
+ // Remove this pair.
+ data.splice(index, 2);
+ continue;
+ }
+
+ // Check if both `rangeStart` and `rangeEnd` are within the bounds of
+ // this pair.
+ // E.g. we have `[0, 11]` and want to remove 4-6 → `[0, 4, 7, 11]`.
+ if (rangeStart >= start && rangeEnd < end) {
+ if (rangeStart == start) {
+ // Replace `[start, end]` with `[startB, endB]`.
+ data[index] = rangeEnd + 1;
+ data[index + 1] = end + 1;
+ return data;
+ }
+ // Replace `[start, end]` with `[startA, endA, startB, endB]`.
+ data.splice(index, 2, start, rangeStart, rangeEnd + 1, end + 1);
+ return data;
+ }
+
+ // Check if only `rangeStart` is within the bounds of this pair.
+ // E.g. we have `[0, 11]` and want to remove 4-20 → `[0, 4]`.
+ if (rangeStart >= start && rangeStart <= end) {
+ // Replace `end` with `rangeStart`.
+ data[index + 1] = rangeStart;
+ // Note: we cannot `return` just yet, in case any following pairs still
+ // contain matching code points.
+ // E.g. we have `[0, 11, 14, 31]` and want to remove 4-20
+ // → `[0, 4, 21, 31]`.
+ }
+
+ // Check if only `rangeEnd` is within the bounds of this pair.
+ // E.g. we have `[14, 31]` and want to remove 4-20 → `[21, 31]`.
+ else if (rangeEnd >= start && rangeEnd <= end) {
+ // Just replace `start`.
+ data[index] = rangeEnd + 1;
+ return data;
+ }
+
+ index += 2;
+ }
+ return data;
+ };
+
+ var dataAdd = function(data, codePoint) {
+ // Iterate over the data per `(start, end)` pair.
+ var index = 0;
+ var start;
+ var end;
+ var lastIndex = null;
+ var length = data.length;
+ if (codePoint < 0x0 || codePoint > 0x10FFFF) {
+ throw RangeError(ERRORS.codePointRange);
+ }
+ while (index < length) {
+ start = data[index];
+ end = data[index + 1];
+
+ // Check if the code point is already in the set.
+ if (codePoint >= start && codePoint < end) {
+ return data;
+ }
+
+ if (codePoint == start - 1) {
+ // Just replace `start` with a new value.
+ data[index] = codePoint;
+ return data;
+ }
+
+ // At this point, if `start` is `greater` than `codePoint`, insert a new
+ // `[start, end]` pair before the current pair, or after the current pair
+ // if there is a known `lastIndex`.
+ if (start > codePoint) {
+ data.splice(
+ lastIndex != null ? lastIndex + 2 : 0,
+ 0,
+ codePoint,
+ codePoint + 1
+ );
+ return data;
+ }
+
+ if (codePoint == end) {
+ // Check if adding this code point causes two separate ranges to become
+ // a single range, e.g. `dataAdd([0, 4, 5, 10], 4)` → `[0, 10]`.
+ if (codePoint + 1 == data[index + 2]) {
+ data.splice(index, 4, start, data[index + 3]);
+ return data;
+ }
+ // Else, just replace `end` with a new value.
+ data[index + 1] = codePoint + 1;
+ return data;
+ }
+ lastIndex = index;
+ index += 2;
+ }
+ // The loop has finished; add the new pair to the end of the data set.
+ data.push(codePoint, codePoint + 1);
+ return data;
+ };
+
+ var dataAddData = function(dataA, dataB) {
+ // Iterate over the data per `(start, end)` pair.
+ var index = 0;
+ var start;
+ var end;
+ var data = dataA.slice();
+ var length = dataB.length;
+ while (index < length) {
+ start = dataB[index];
+ end = dataB[index + 1] - 1;
+ if (start == end) {
+ data = dataAdd(data, start);
+ } else {
+ data = dataAddRange(data, start, end);
+ }
+ index += 2;
+ }
+ return data;
+ };
+
+ var dataRemoveData = function(dataA, dataB) {
+ // Iterate over the data per `(start, end)` pair.
+ var index = 0;
+ var start;
+ var end;
+ var data = dataA.slice();
+ var length = dataB.length;
+ while (index < length) {
+ start = dataB[index];
+ end = dataB[index + 1] - 1;
+ if (start == end) {
+ data = dataRemove(data, start);
+ } else {
+ data = dataRemoveRange(data, start, end);
+ }
+ index += 2;
+ }
+ return data;
+ };
+
+ var dataAddRange = function(data, rangeStart, rangeEnd) {
+ if (rangeEnd < rangeStart) {
+ throw Error(ERRORS.rangeOrder);
+ }
+ if (
+ rangeStart < 0x0 || rangeStart > 0x10FFFF ||
+ rangeEnd < 0x0 || rangeEnd > 0x10FFFF
+ ) {
+ throw RangeError(ERRORS.codePointRange);
+ }
+ // Iterate over the data per `(start, end)` pair.
+ var index = 0;
+ var start;
+ var end;
+ var added = false;
+ var length = data.length;
+ while (index < length) {
+ start = data[index];
+ end = data[index + 1];
+
+ if (added) {
+ // The range has already been added to the set; at this point, we just
+ // need to get rid of the following ranges in case they overlap.
+
+ // Check if this range can be combined with the previous range.
+ if (start == rangeEnd + 1) {
+ data.splice(index - 1, 2);
+ return data;
+ }
+
+ // Exit as soon as no more possibly overlapping pairs can be found.
+ if (start > rangeEnd) {
+ return data;
+ }
+
+ // E.g. `[0, 11, 12, 16]` and we’ve added 5-15, so we now have
+ // `[0, 16, 12, 16]`. Remove the `12,16` part, as it lies within the
+ // `0,16` range that was previously added.
+ if (start >= rangeStart && start <= rangeEnd) {
+ // `start` lies within the range that was previously added.
+
+ if (end > rangeStart && end - 1 <= rangeEnd) {
+ // `end` lies within the range that was previously added as well,
+ // so remove this pair.
+ data.splice(index, 2);
+ index -= 2;
+ // Note: we cannot `return` just yet, as there may still be other
+ // overlapping pairs.
+ } else {
+ // `start` lies within the range that was previously added, but
+ // `end` doesn’t. E.g. `[0, 11, 12, 31]` and we’ve added 5-15, so
+ // now we have `[0, 16, 12, 31]`. This must be written as `[0, 31]`.
+ // Remove the previously added `end` and the current `start`.
+ data.splice(index - 1, 2);
+ index -= 2;
+ }
+
+ // Note: we cannot return yet.
+ }
+
+ }
+
+ else if (start == rangeEnd + 1) {
+ data[index] = rangeStart;
+ return data;
+ }
+
+ // Check if a new pair must be inserted *before* the current one.
+ else if (start > rangeEnd) {
+ data.splice(index, 0, rangeStart, rangeEnd + 1);
+ return data;
+ }
+
+ else if (rangeStart >= start && rangeStart < end && rangeEnd + 1 <= end) {
+ // The new range lies entirely within an existing range pair. No action
+ // needed.
+ return data;
+ }
+
+ else if (
+ // E.g. `[0, 11]` and you add 5-15 → `[0, 16]`.
+ (rangeStart >= start && rangeStart < end) ||
+ // E.g. `[0, 3]` and you add 3-6 → `[0, 7]`.
+ end == rangeStart
+ ) {
+ // Replace `end` with the new value.
+ data[index + 1] = rangeEnd + 1;
+ // Make sure the next range pair doesn’t overlap, e.g. `[0, 11, 12, 14]`
+ // and you add 5-15 → `[0, 16]`, i.e. remove the `12,14` part.
+ added = true;
+ // Note: we cannot `return` just yet.
+ }
+
+ else if (rangeStart <= start && rangeEnd + 1 >= end) {
+ // The new range is a superset of the old range.
+ data[index] = rangeStart;
+ data[index + 1] = rangeEnd + 1;
+ added = true;
+ }
+
+ index += 2;
+ }
+ // The loop has finished without doing anything; add the new pair to the end
+ // of the data set.
+ if (!added) {
+ data.push(rangeStart, rangeEnd + 1);
+ }
+ return data;
+ };
+
+ var dataContains = function(data, codePoint) {
+ var index = 0;
+ var length = data.length;
+ // Exit early if `codePoint` is not within `data`’s overall range.
+ var start = data[index];
+ var end = data[length - 1];
+ if (length >= 2) {
+ if (codePoint < start || codePoint > end) {
+ return false;
+ }
+ }
+ // Iterate over the data per `(start, end)` pair.
+ while (index < length) {
+ start = data[index];
+ end = data[index + 1];
+ if (codePoint >= start && codePoint < end) {
+ return true;
+ }
+ index += 2;
+ }
+ return false;
+ };
+
+ var dataIntersection = function(data, codePoints) {
+ var index = 0;
+ var length = codePoints.length;
+ var codePoint;
+ var result = [];
+ while (index < length) {
+ codePoint = codePoints[index];
+ if (dataContains(data, codePoint)) {
+ result.push(codePoint);
+ }
+ ++index;
+ }
+ return dataFromCodePoints(result);
+ };
+
+ var dataIsEmpty = function(data) {
+ return !data.length;
+ };
+
+ var dataIsSingleton = function(data) {
+ // Check if the set only represents a single code point.
+ return data.length == 2 && data[0] + 1 == data[1];
+ };
+
+ var dataToArray = function(data) {
+ // Iterate over the data per `(start, end)` pair.
+ var index = 0;
+ var start;
+ var end;
+ var result = [];
+ var length = data.length;
+ while (index < length) {
+ start = data[index];
+ end = data[index + 1];
+ while (start < end) {
+ result.push(start);
+ ++start;
+ }
+ index += 2;
+ }
+ return result;
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
+ var floor = Math.floor;
+ var highSurrogate = function(codePoint) {
+ return parseInt(
+ floor((codePoint - 0x10000) / 0x400) + HIGH_SURROGATE_MIN,
+ 10
+ );
+ };
+
+ var lowSurrogate = function(codePoint) {
+ return parseInt(
+ (codePoint - 0x10000) % 0x400 + LOW_SURROGATE_MIN,
+ 10
+ );
+ };
+
+ var stringFromCharCode = String.fromCharCode;
+ var codePointToString = function(codePoint) {
+ var string;
+ // https://mathiasbynens.be/notes/javascript-escapes#single
+ // Note: the `\b` escape sequence for U+0008 BACKSPACE in strings has a
+ // different meaning in regular expressions (word boundary), so it cannot
+ // be used here.
+ if (codePoint == 0x09) {
+ string = '\\t';
+ }
+ // Note: IE < 9 treats `'\v'` as `'v'`, so avoid using it.
+ // else if (codePoint == 0x0B) {
+ // string = '\\v';
+ // }
+ else if (codePoint == 0x0A) {
+ string = '\\n';
+ }
+ else if (codePoint == 0x0C) {
+ string = '\\f';
+ }
+ else if (codePoint == 0x0D) {
+ string = '\\r';
+ }
+ else if (codePoint == 0x5C) {
+ string = '\\\\';
+ }
+ else if (
+ codePoint == 0x24 ||
+ (codePoint >= 0x28 && codePoint <= 0x2B) ||
+ codePoint == 0x2D || codePoint == 0x2E || codePoint == 0x3F ||
+ (codePoint >= 0x5B && codePoint <= 0x5E) ||
+ (codePoint >= 0x7B && codePoint <= 0x7D)
+ ) {
+ // The code point maps to an unsafe printable ASCII character;
+ // backslash-escape it. Here’s the list of those symbols:
+ //
+ // $()*+-.?[\]^{|}
+ //
+ // See #7 for more info.
+ string = '\\' + stringFromCharCode(codePoint);
+ }
+ else if (codePoint >= 0x20 && codePoint <= 0x7E) {
+ // The code point maps to one of these printable ASCII symbols
+ // (including the space character):
+ //
+ // !"#%&',/0123456789:;<=>@ABCDEFGHIJKLMNO
+ // PQRSTUVWXYZ_`abcdefghijklmnopqrstuvwxyz~
+ //
+ // These can safely be used directly.
+ string = stringFromCharCode(codePoint);
+ }
+ else if (codePoint <= 0xFF) {
+ // https://mathiasbynens.be/notes/javascript-escapes#hexadecimal
+ string = '\\x' + pad(hex(codePoint), 2);
+ }
+ else { // `codePoint <= 0xFFFF` holds true.
+ // https://mathiasbynens.be/notes/javascript-escapes#unicode
+ string = '\\u' + pad(hex(codePoint), 4);
+ }
+
+ // There’s no need to account for astral symbols / surrogate pairs here,
+ // since `codePointToString` is private and only used for BMP code points.
+ // But if that’s what you need, just add an `else` block with this code:
+ //
+ // string = '\\u' + pad(hex(highSurrogate(codePoint)), 4)
+ // + '\\u' + pad(hex(lowSurrogate(codePoint)), 4);
+
+ return string;
+ };
+
+ var symbolToCodePoint = function(symbol) {
+ var length = symbol.length;
+ var first = symbol.charCodeAt(0);
+ var second;
+ if (
+ first >= HIGH_SURROGATE_MIN && first <= HIGH_SURROGATE_MAX &&
+ length > 1 // There is a next code unit.
+ ) {
+ // `first` is a high surrogate, and there is a next character. Assume
+ // it’s a low surrogate (else it’s invalid usage of Regenerate anyway).
+ second = symbol.charCodeAt(1);
+ // https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
+ return (first - HIGH_SURROGATE_MIN) * 0x400 +
+ second - LOW_SURROGATE_MIN + 0x10000;
+ }
+ return first;
+ };
+
+ var createBMPCharacterClasses = function(data) {
+ // Iterate over the data per `(start, end)` pair.
+ var result = '';
+ var index = 0;
+ var start;
+ var end;
+ var length = data.length;
+ if (dataIsSingleton(data)) {
+ return codePointToString(data[0]);
+ }
+ while (index < length) {
+ start = data[index];
+ end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
+ if (start == end) {
+ result += codePointToString(start);
+ } else if (start + 1 == end) {
+ result += codePointToString(start) + codePointToString(end);
+ } else {
+ result += codePointToString(start) + '-' + codePointToString(end);
+ }
+ index += 2;
+ }
+ return '[' + result + ']';
+ };
+
+ var splitAtBMP = function(data) {
+ // Iterate over the data per `(start, end)` pair.
+ var loneHighSurrogates = [];
+ var loneLowSurrogates = [];
+ var bmp = [];
+ var astral = [];
+ var index = 0;
+ var start;
+ var end;
+ var length = data.length;
+ while (index < length) {
+ start = data[index];
+ end = data[index + 1] - 1; // Note: the `- 1` makes `end` inclusive.
+
+ if (start < HIGH_SURROGATE_MIN) {
+
+ // The range starts and ends before the high surrogate range.
+ // E.g. (0, 0x10).
+ if (end < HIGH_SURROGATE_MIN) {
+ bmp.push(start, end + 1);
+ }
+
+ // The range starts before the high surrogate range and ends within it.
+ // E.g. (0, 0xD855).
+ if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {
+ bmp.push(start, HIGH_SURROGATE_MIN);
+ loneHighSurrogates.push(HIGH_SURROGATE_MIN, end + 1);
+ }
+
+ // The range starts before the high surrogate range and ends in the low
+ // surrogate range. E.g. (0, 0xDCFF).
+ if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
+ bmp.push(start, HIGH_SURROGATE_MIN);
+ loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);
+ loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);
+ }
+
+ // The range starts before the high surrogate range and ends after the
+ // low surrogate range. E.g. (0, 0x10FFFF).
+ if (end > LOW_SURROGATE_MAX) {
+ bmp.push(start, HIGH_SURROGATE_MIN);
+ loneHighSurrogates.push(HIGH_SURROGATE_MIN, HIGH_SURROGATE_MAX + 1);
+ loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);
+ if (end <= 0xFFFF) {
+ bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
+ } else {
+ bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
+ astral.push(0xFFFF + 1, end + 1);
+ }
+ }
+
+ } else if (start >= HIGH_SURROGATE_MIN && start <= HIGH_SURROGATE_MAX) {
+
+ // The range starts and ends in the high surrogate range.
+ // E.g. (0xD855, 0xD866).
+ if (end >= HIGH_SURROGATE_MIN && end <= HIGH_SURROGATE_MAX) {
+ loneHighSurrogates.push(start, end + 1);
+ }
+
+ // The range starts in the high surrogate range and ends in the low
+ // surrogate range. E.g. (0xD855, 0xDCFF).
+ if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
+ loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);
+ loneLowSurrogates.push(LOW_SURROGATE_MIN, end + 1);
+ }
+
+ // The range starts in the high surrogate range and ends after the low
+ // surrogate range. E.g. (0xD855, 0x10FFFF).
+ if (end > LOW_SURROGATE_MAX) {
+ loneHighSurrogates.push(start, HIGH_SURROGATE_MAX + 1);
+ loneLowSurrogates.push(LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1);
+ if (end <= 0xFFFF) {
+ bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
+ } else {
+ bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
+ astral.push(0xFFFF + 1, end + 1);
+ }
+ }
+
+ } else if (start >= LOW_SURROGATE_MIN && start <= LOW_SURROGATE_MAX) {
+
+ // The range starts and ends in the low surrogate range.
+ // E.g. (0xDCFF, 0xDDFF).
+ if (end >= LOW_SURROGATE_MIN && end <= LOW_SURROGATE_MAX) {
+ loneLowSurrogates.push(start, end + 1);
+ }
+
+ // The range starts in the low surrogate range and ends after the low
+ // surrogate range. E.g. (0xDCFF, 0x10FFFF).
+ if (end > LOW_SURROGATE_MAX) {
+ loneLowSurrogates.push(start, LOW_SURROGATE_MAX + 1);
+ if (end <= 0xFFFF) {
+ bmp.push(LOW_SURROGATE_MAX + 1, end + 1);
+ } else {
+ bmp.push(LOW_SURROGATE_MAX + 1, 0xFFFF + 1);
+ astral.push(0xFFFF + 1, end + 1);
+ }
+ }
+
+ } else if (start > LOW_SURROGATE_MAX && start <= 0xFFFF) {
+
+ // The range starts and ends after the low surrogate range.
+ // E.g. (0xFFAA, 0x10FFFF).
+ if (end <= 0xFFFF) {
+ bmp.push(start, end + 1);
+ } else {
+ bmp.push(start, 0xFFFF + 1);
+ astral.push(0xFFFF + 1, end + 1);
+ }
+
+ } else {
+
+ // The range starts and ends in the astral range.
+ astral.push(start, end + 1);
+
+ }
+
+ index += 2;
+ }
+ return {
+ 'loneHighSurrogates': loneHighSurrogates,
+ 'loneLowSurrogates': loneLowSurrogates,
+ 'bmp': bmp,
+ 'astral': astral
+ };
+ };
+
+ var optimizeSurrogateMappings = function(surrogateMappings) {
+ var result = [];
+ var tmpLow = [];
+ var addLow = false;
+ var mapping;
+ var nextMapping;
+ var highSurrogates;
+ var lowSurrogates;
+ var nextHighSurrogates;
+ var nextLowSurrogates;
+ var index = -1;
+ var length = surrogateMappings.length;
+ while (++index < length) {
+ mapping = surrogateMappings[index];
+ nextMapping = surrogateMappings[index + 1];
+ if (!nextMapping) {
+ result.push(mapping);
+ continue;
+ }
+ highSurrogates = mapping[0];
+ lowSurrogates = mapping[1];
+ nextHighSurrogates = nextMapping[0];
+ nextLowSurrogates = nextMapping[1];
+
+ // Check for identical high surrogate ranges.
+ tmpLow = lowSurrogates;
+ while (
+ nextHighSurrogates &&
+ highSurrogates[0] == nextHighSurrogates[0] &&
+ highSurrogates[1] == nextHighSurrogates[1]
+ ) {
+ // Merge with the next item.
+ if (dataIsSingleton(nextLowSurrogates)) {
+ tmpLow = dataAdd(tmpLow, nextLowSurrogates[0]);
+ } else {
+ tmpLow = dataAddRange(
+ tmpLow,
+ nextLowSurrogates[0],
+ nextLowSurrogates[1] - 1
+ );
+ }
+ ++index;
+ mapping = surrogateMappings[index];
+ highSurrogates = mapping[0];
+ lowSurrogates = mapping[1];
+ nextMapping = surrogateMappings[index + 1];
+ nextHighSurrogates = nextMapping && nextMapping[0];
+ nextLowSurrogates = nextMapping && nextMapping[1];
+ addLow = true;
+ }
+ result.push([
+ highSurrogates,
+ addLow ? tmpLow : lowSurrogates
+ ]);
+ addLow = false;
+ }
+ return optimizeByLowSurrogates(result);
+ };
+
+ var optimizeByLowSurrogates = function(surrogateMappings) {
+ if (surrogateMappings.length == 1) {
+ return surrogateMappings;
+ }
+ var index = -1;
+ var innerIndex = -1;
+ while (++index < surrogateMappings.length) {
+ var mapping = surrogateMappings[index];
+ var lowSurrogates = mapping[1];
+ var lowSurrogateStart = lowSurrogates[0];
+ var lowSurrogateEnd = lowSurrogates[1];
+ innerIndex = index; // Note: the loop starts at the next index.
+ while (++innerIndex < surrogateMappings.length) {
+ var otherMapping = surrogateMappings[innerIndex];
+ var otherLowSurrogates = otherMapping[1];
+ var otherLowSurrogateStart = otherLowSurrogates[0];
+ var otherLowSurrogateEnd = otherLowSurrogates[1];
+ if (
+ lowSurrogateStart == otherLowSurrogateStart &&
+ lowSurrogateEnd == otherLowSurrogateEnd
+ ) {
+ // Add the code points in the other item to this one.
+ if (dataIsSingleton(otherMapping[0])) {
+ mapping[0] = dataAdd(mapping[0], otherMapping[0][0]);
+ } else {
+ mapping[0] = dataAddRange(
+ mapping[0],
+ otherMapping[0][0],
+ otherMapping[0][1] - 1
+ );
+ }
+ // Remove the other, now redundant, item.
+ surrogateMappings.splice(innerIndex, 1);
+ --innerIndex;
+ }
+ }
+ }
+ return surrogateMappings;
+ };
+
+ var surrogateSet = function(data) {
+ // Exit early if `data` is an empty set.
+ if (!data.length) {
+ return [];
+ }
+
+ // Iterate over the data per `(start, end)` pair.
+ var index = 0;
+ var start;
+ var end;
+ var startHigh;
+ var startLow;
+ var prevStartHigh = 0;
+ var prevEndHigh = 0;
+ var tmpLow = [];
+ var endHigh;
+ var endLow;
+ var surrogateMappings = [];
+ var length = data.length;
+ var dataHigh = [];
+ while (index < length) {
+ start = data[index];
+ end = data[index + 1] - 1;
+
+ startHigh = highSurrogate(start);
+ startLow = lowSurrogate(start);
+ endHigh = highSurrogate(end);
+ endLow = lowSurrogate(end);
+
+ var startsWithLowestLowSurrogate = startLow == LOW_SURROGATE_MIN;
+ var endsWithHighestLowSurrogate = endLow == LOW_SURROGATE_MAX;
+ var complete = false;
+
+ // Append the previous high-surrogate-to-low-surrogate mappings.
+ // Step 1: `(startHigh, startLow)` to `(startHigh, LOW_SURROGATE_MAX)`.
+ if (
+ startHigh == endHigh ||
+ startsWithLowestLowSurrogate && endsWithHighestLowSurrogate
+ ) {
+ surrogateMappings.push([
+ [startHigh, endHigh + 1],
+ [startLow, endLow + 1]
+ ]);
+ complete = true;
+ } else {
+ surrogateMappings.push([
+ [startHigh, startHigh + 1],
+ [startLow, LOW_SURROGATE_MAX + 1]
+ ]);
+ }
+
+ // Step 2: `(startHigh + 1, LOW_SURROGATE_MIN)` to
+ // `(endHigh - 1, LOW_SURROGATE_MAX)`.
+ if (!complete && startHigh + 1 < endHigh) {
+ if (endsWithHighestLowSurrogate) {
+ // Combine step 2 and step 3.
+ surrogateMappings.push([
+ [startHigh + 1, endHigh + 1],
+ [LOW_SURROGATE_MIN, endLow + 1]
+ ]);
+ complete = true;
+ } else {
+ surrogateMappings.push([
+ [startHigh + 1, endHigh],
+ [LOW_SURROGATE_MIN, LOW_SURROGATE_MAX + 1]
+ ]);
+ }
+ }
+
+ // Step 3. `(endHigh, LOW_SURROGATE_MIN)` to `(endHigh, endLow)`.
+ if (!complete) {
+ surrogateMappings.push([
+ [endHigh, endHigh + 1],
+ [LOW_SURROGATE_MIN, endLow + 1]
+ ]);
+ }
+
+ prevStartHigh = startHigh;
+ prevEndHigh = endHigh;
+
+ index += 2;
+ }
+
+ // The format of `surrogateMappings` is as follows:
+ //
+ // [ surrogateMapping1, surrogateMapping2 ]
+ //
+ // i.e.:
+ //
+ // [
+ // [ highSurrogates1, lowSurrogates1 ],
+ // [ highSurrogates2, lowSurrogates2 ]
+ // ]
+ return optimizeSurrogateMappings(surrogateMappings);
+ };
+
+ var createSurrogateCharacterClasses = function(surrogateMappings) {
+ var result = [];
+ forEach(surrogateMappings, function(surrogateMapping) {
+ var highSurrogates = surrogateMapping[0];
+ var lowSurrogates = surrogateMapping[1];
+ result.push(
+ createBMPCharacterClasses(highSurrogates) +
+ createBMPCharacterClasses(lowSurrogates)
+ );
+ });
+ return result.join('|');
+ };
+
+ var createCharacterClassesFromData = function(data, bmpOnly) {
+ var result = [];
+
+ var parts = splitAtBMP(data);
+ var loneHighSurrogates = parts.loneHighSurrogates;
+ var loneLowSurrogates = parts.loneLowSurrogates;
+ var bmp = parts.bmp;
+ var astral = parts.astral;
+ var hasAstral = !dataIsEmpty(parts.astral);
+ var hasLoneHighSurrogates = !dataIsEmpty(loneHighSurrogates);
+ var hasLoneLowSurrogates = !dataIsEmpty(loneLowSurrogates);
+
+ var surrogateMappings = surrogateSet(astral);
+
+ if (bmpOnly) {
+ bmp = dataAddData(bmp, loneHighSurrogates);
+ hasLoneHighSurrogates = false;
+ bmp = dataAddData(bmp, loneLowSurrogates);
+ hasLoneLowSurrogates = false;
+ }
+
+ if (!dataIsEmpty(bmp)) {
+ // The data set contains BMP code points that are not high surrogates
+ // needed for astral code points in the set.
+ result.push(createBMPCharacterClasses(bmp));
+ }
+ if (surrogateMappings.length) {
+ // The data set contains astral code points; append character classes
+ // based on their surrogate pairs.
+ result.push(createSurrogateCharacterClasses(surrogateMappings));
+ }
+ // https://gist.github.com/mathiasbynens/bbe7f870208abcfec860
+ if (hasLoneHighSurrogates) {
+ result.push(
+ createBMPCharacterClasses(loneHighSurrogates) +
+ // Make sure the high surrogates aren’t part of a surrogate pair.
+ '(?![\\uDC00-\\uDFFF])'
+ );
+ }
+ if (hasLoneLowSurrogates) {
+ result.push(
+ // Make sure the low surrogates aren’t part of a surrogate pair.
+ '(?:[^\\uD800-\\uDBFF]|^)' +
+ createBMPCharacterClasses(loneLowSurrogates)
+ );
+ }
+ return result.join('|');
+ };
+
+ /*--------------------------------------------------------------------------*/
+
+ // `regenerate` can be used as a constructor (and new methods can be added to
+ // its prototype) but also as a regular function, the latter of which is the
+ // documented and most common usage. For that reason, it’s not capitalized.
+ var regenerate = function(value) {
+ if (arguments.length > 1) {
+ value = slice.call(arguments);
+ }
+ if (this instanceof regenerate) {
+ this.data = [];
+ return value ? this.add(value) : this;
+ }
+ return (new regenerate).add(value);
+ };
+
+ regenerate.version = '1.2.0';
+
+ var proto = regenerate.prototype;
+ extend(proto, {
+ 'add': function(value) {
+ var $this = this;
+ if (value == null) {
+ return $this;
+ }
+ if (value instanceof regenerate) {
+ // Allow passing other Regenerate instances.
+ $this.data = dataAddData($this.data, value.data);
+ return $this;
+ }
+ if (arguments.length > 1) {
+ value = slice.call(arguments);
+ }
+ if (isArray(value)) {
+ forEach(value, function(item) {
+ $this.add(item);
+ });
+ return $this;
+ }
+ $this.data = dataAdd(
+ $this.data,
+ isNumber(value) ? value : symbolToCodePoint(value)
+ );
+ return $this;
+ },
+ 'remove': function(value) {
+ var $this = this;
+ if (value == null) {
+ return $this;
+ }
+ if (value instanceof regenerate) {
+ // Allow passing other Regenerate instances.
+ $this.data = dataRemoveData($this.data, value.data);
+ return $this;
+ }
+ if (arguments.length > 1) {
+ value = slice.call(arguments);
+ }
+ if (isArray(value)) {
+ forEach(value, function(item) {
+ $this.remove(item);
+ });
+ return $this;
+ }
+ $this.data = dataRemove(
+ $this.data,
+ isNumber(value) ? value : symbolToCodePoint(value)
+ );
+ return $this;
+ },
+ 'addRange': function(start, end) {
+ var $this = this;
+ $this.data = dataAddRange($this.data,
+ isNumber(start) ? start : symbolToCodePoint(start),
+ isNumber(end) ? end : symbolToCodePoint(end)
+ );
+ return $this;
+ },
+ 'removeRange': function(start, end) {
+ var $this = this;
+ var startCodePoint = isNumber(start) ? start : symbolToCodePoint(start);
+ var endCodePoint = isNumber(end) ? end : symbolToCodePoint(end);
+ $this.data = dataRemoveRange(
+ $this.data,
+ startCodePoint,
+ endCodePoint
+ );
+ return $this;
+ },
+ 'intersection': function(argument) {
+ var $this = this;
+ // Allow passing other Regenerate instances.
+ // TODO: Optimize this by writing and using `dataIntersectionData()`.
+ var array = argument instanceof regenerate ?
+ dataToArray(argument.data) :
+ argument;
+ $this.data = dataIntersection($this.data, array);
+ return $this;
+ },
+ 'contains': function(codePoint) {
+ return dataContains(
+ this.data,
+ isNumber(codePoint) ? codePoint : symbolToCodePoint(codePoint)
+ );
+ },
+ 'clone': function() {
+ var set = new regenerate;
+ set.data = this.data.slice(0);
+ return set;
+ },
+ 'toString': function(options) {
+ var result = createCharacterClassesFromData(
+ this.data,
+ options ? options.bmpOnly : false
+ );
+ // Use `\0` instead of `\x00` where possible.
+ return result.replace(regexNull, '\\0$1');
+ },
+ 'toRegExp': function(flags) {
+ return RegExp(this.toString(), flags || '');
+ },
+ 'valueOf': function() { // Note: `valueOf` is aliased as `toArray`.
+ return dataToArray(this.data);
+ }
+ });
+
+ proto.toArray = proto.valueOf;
+
+ // Some AMD build optimizers, like r.js, check for specific condition patterns
+ // like the following:
+ if (
+ typeof define == 'function' &&
+ typeof define.amd == 'object' &&
+ define.amd
+ ) {
+ define(function() {
+ return regenerate;
+ });
+ } else if (freeExports && !freeExports.nodeType) {
+ if (freeModule) { // in Node.js, io.js, or RingoJS v0.8.0+
+ freeModule.exports = regenerate;
+ } else { // in Narwhal or RingoJS v0.7.0-
+ freeExports.regenerate = regenerate;
+ }
+ } else { // in Rhino or a web browser
+ root.regenerate = regenerate;
+ }
+
+}(this));
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],522:[function(require,module,exports){
+(function (global){
+/*!
+ * RegJSGen
+ * Copyright 2014 Benjamin Tan
+ * Available under MIT license
+ */
+;(function() {
+ 'use strict';
+
+ /** Used to determine if values are of the language type `Object` */
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
+
+ /** Used as a reference to the global object */
+ var root = (objectTypes[typeof window] && window) || this;
+
+ /** Backup possible global object */
+ var oldRoot = root;
+
+ /** Detect free variable `exports` */
+ var freeExports = objectTypes[typeof exports] && exports;
+
+ /** Detect free variable `module` */
+ var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
+
+ /** Detect free variable `global` from Node.js or Browserified code and use it as `root` */
+ var freeGlobal = freeExports && freeModule && typeof global == 'object' && global;
+ if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal || freeGlobal.self === freeGlobal)) {
+ root = freeGlobal;
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ /*! Based on https://mths.be/fromcodepoint v0.2.0 by @mathias */
+
+ var stringFromCharCode = String.fromCharCode;
+ var floor = Math.floor;
+ function fromCodePoint() {
+ var MAX_SIZE = 0x4000;
+ var codeUnits = [];
+ var highSurrogate;
+ var lowSurrogate;
+ var index = -1;
+ var length = arguments.length;
+ if (!length) {
+ return '';
+ }
+ var result = '';
+ while (++index < length) {
+ var codePoint = Number(arguments[index]);
+ if (
+ !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
+ codePoint < 0 || // not a valid Unicode code point
+ codePoint > 0x10FFFF || // not a valid Unicode code point
+ floor(codePoint) != codePoint // not an integer
+ ) {
+ throw RangeError('Invalid code point: ' + codePoint);
+ }
+ if (codePoint <= 0xFFFF) {
+ // BMP code point
+ codeUnits.push(codePoint);
+ } else {
+ // Astral code point; split in surrogate halves
+ // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
+ codePoint -= 0x10000;
+ highSurrogate = (codePoint >> 10) + 0xD800;
+ lowSurrogate = (codePoint % 0x400) + 0xDC00;
+ codeUnits.push(highSurrogate, lowSurrogate);
+ }
+ if (index + 1 == length || codeUnits.length > MAX_SIZE) {
+ result += stringFromCharCode.apply(null, codeUnits);
+ codeUnits.length = 0;
+ }
+ }
+ return result;
+ }
+
+ function assertType(type, expected) {
+ if (expected.indexOf('|') == -1) {
+ if (type == expected) {
+ return;
+ }
+
+ throw Error('Invalid node type: ' + type);
+ }
+
+ expected = assertType.hasOwnProperty(expected)
+ ? assertType[expected]
+ : (assertType[expected] = RegExp('^(?:' + expected + ')$'));
+
+ if (expected.test(type)) {
+ return;
+ }
+
+ throw Error('Invalid node type: ' + type);
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ function generate(node) {
+ var type = node.type;
+
+ if (generate.hasOwnProperty(type) && typeof generate[type] == 'function') {
+ return generate[type](node);
+ }
+
+ throw Error('Invalid node type: ' + type);
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ function generateAlternative(node) {
+ assertType(node.type, 'alternative');
+
+ var terms = node.body,
+ length = terms ? terms.length : 0;
+
+ if (length == 1) {
+ return generateTerm(terms[0]);
+ } else {
+ var i = -1,
+ result = '';
+
+ while (++i < length) {
+ result += generateTerm(terms[i]);
+ }
+
+ return result;
+ }
+ }
+
+ function generateAnchor(node) {
+ assertType(node.type, 'anchor');
+
+ switch (node.kind) {
+ case 'start':
+ return '^';
+ case 'end':
+ return '$';
+ case 'boundary':
+ return '\\b';
+ case 'not-boundary':
+ return '\\B';
+ default:
+ throw Error('Invalid assertion');
+ }
+ }
+
+ function generateAtom(node) {
+ assertType(node.type, 'anchor|characterClass|characterClassEscape|dot|group|reference|value');
+
+ return generate(node);
+ }
+
+ function generateCharacterClass(node) {
+ assertType(node.type, 'characterClass');
+
+ var classRanges = node.body,
+ length = classRanges ? classRanges.length : 0;
+
+ var i = -1,
+ result = '[';
+
+ if (node.negative) {
+ result += '^';
+ }
+
+ while (++i < length) {
+ result += generateClassAtom(classRanges[i]);
+ }
+
+ result += ']';
+
+ return result;
+ }
+
+ function generateCharacterClassEscape(node) {
+ assertType(node.type, 'characterClassEscape');
+
+ return '\\' + node.value;
+ }
+
+ function generateCharacterClassRange(node) {
+ assertType(node.type, 'characterClassRange');
+
+ var min = node.min,
+ max = node.max;
+
+ if (min.type == 'characterClassRange' || max.type == 'characterClassRange') {
+ throw Error('Invalid character class range');
+ }
+
+ return generateClassAtom(min) + '-' + generateClassAtom(max);
+ }
+
+ function generateClassAtom(node) {
+ assertType(node.type, 'anchor|characterClassEscape|characterClassRange|dot|value');
+
+ return generate(node);
+ }
+
+ function generateDisjunction(node) {
+ assertType(node.type, 'disjunction');
+
+ var body = node.body,
+ length = body ? body.length : 0;
+
+ if (length == 0) {
+ throw Error('No body');
+ } else if (length == 1) {
+ return generate(body[0]);
+ } else {
+ var i = -1,
+ result = '';
+
+ while (++i < length) {
+ if (i != 0) {
+ result += '|';
+ }
+ result += generate(body[i]);
+ }
+
+ return result;
+ }
+ }
+
+ function generateDot(node) {
+ assertType(node.type, 'dot');
+
+ return '.';
+ }
+
+ function generateGroup(node) {
+ assertType(node.type, 'group');
+
+ var result = '(';
+
+ switch (node.behavior) {
+ case 'normal':
+ break;
+ case 'ignore':
+ result += '?:';
+ break;
+ case 'lookahead':
+ result += '?=';
+ break;
+ case 'negativeLookahead':
+ result += '?!';
+ break;
+ default:
+ throw Error('Invalid behaviour: ' + node.behaviour);
+ }
+
+ var body = node.body,
+ length = body ? body.length : 0;
+
+ if (length == 1) {
+ result += generate(body[0]);
+ } else {
+ var i = -1;
+
+ while (++i < length) {
+ result += generate(body[i]);
+ }
+ }
+
+ result += ')';
+
+ return result;
+ }
+
+ function generateQuantifier(node) {
+ assertType(node.type, 'quantifier');
+
+ var quantifier = '',
+ min = node.min,
+ max = node.max;
+
+ switch (max) {
+ case undefined:
+ case null:
+ switch (min) {
+ case 0:
+ quantifier = '*'
+ break;
+ case 1:
+ quantifier = '+';
+ break;
+ default:
+ quantifier = '{' + min + ',}';
+ break;
+ }
+ break;
+ default:
+ if (min == max) {
+ quantifier = '{' + min + '}';
+ }
+ else if (min == 0 && max == 1) {
+ quantifier = '?';
+ } else {
+ quantifier = '{' + min + ',' + max + '}';
+ }
+ break;
+ }
+
+ if (!node.greedy) {
+ quantifier += '?';
+ }
+
+ return generateAtom(node.body[0]) + quantifier;
+ }
+
+ function generateReference(node) {
+ assertType(node.type, 'reference');
+
+ return '\\' + node.matchIndex;
+ }
+
+ function generateTerm(node) {
+ assertType(node.type, 'anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value');
+
+ return generate(node);
+ }
+
+ function generateValue(node) {
+ assertType(node.type, 'value');
+
+ var kind = node.kind,
+ codePoint = node.codePoint;
+
+ switch (kind) {
+ case 'controlLetter':
+ return '\\c' + fromCodePoint(codePoint + 64);
+ case 'hexadecimalEscape':
+ return '\\x' + ('00' + codePoint.toString(16).toUpperCase()).slice(-2);
+ case 'identifier':
+ return '\\' + fromCodePoint(codePoint);
+ case 'null':
+ return '\\' + codePoint;
+ case 'octal':
+ return '\\' + codePoint.toString(8);
+ case 'singleEscape':
+ switch (codePoint) {
+ case 0x0008:
+ return '\\b';
+ case 0x009:
+ return '\\t';
+ case 0x00A:
+ return '\\n';
+ case 0x00B:
+ return '\\v';
+ case 0x00C:
+ return '\\f';
+ case 0x00D:
+ return '\\r';
+ default:
+ throw Error('Invalid codepoint: ' + codePoint);
+ }
+ case 'symbol':
+ return fromCodePoint(codePoint);
+ case 'unicodeEscape':
+ return '\\u' + ('0000' + codePoint.toString(16).toUpperCase()).slice(-4);
+ case 'unicodeCodePointEscape':
+ return '\\u{' + codePoint.toString(16).toUpperCase() + '}';
+ default:
+ throw Error('Unsupported node kind: ' + kind);
+ }
+ }
+
+ /*--------------------------------------------------------------------------*/
+
+ generate.alternative = generateAlternative;
+ generate.anchor = generateAnchor;
+ generate.characterClass = generateCharacterClass;
+ generate.characterClassEscape = generateCharacterClassEscape;
+ generate.characterClassRange = generateCharacterClassRange;
+ generate.disjunction = generateDisjunction;
+ generate.dot = generateDot;
+ generate.group = generateGroup;
+ generate.quantifier = generateQuantifier;
+ generate.reference = generateReference;
+ generate.value = generateValue;
+
+ /*--------------------------------------------------------------------------*/
+
+ // export regjsgen
+ // some AMD build optimizers, like r.js, check for condition patterns like the following:
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ // define as an anonymous module so, through path mapping, it can be aliased
+ define(function() {
+ return {
+ 'generate': generate
+ };
+ });
+ }
+ // check for `exports` after `define` in case a build optimizer adds an `exports` object
+ else if (freeExports && freeModule) {
+ // in Narwhal, Node.js, Rhino -require, or RingoJS
+ freeExports.generate = generate;
+ }
+ // in a browser or Rhino
+ else {
+ root.regjsgen = {
+ 'generate': generate
+ };
+ }
+}.call(this));
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],523:[function(require,module,exports){
+// regjsparser
+//
+// ==================================================================
+//
+// See ECMA-262 Standard: 15.10.1
+//
+// NOTE: The ECMA-262 standard uses the term "Assertion" for /^/. Here the
+// term "Anchor" is used.
+//
+// Pattern ::
+// Disjunction
+//
+// Disjunction ::
+// Alternative
+// Alternative | Disjunction
+//
+// Alternative ::
+// [empty]
+// Alternative Term
+//
+// Term ::
+// Anchor
+// Atom
+// Atom Quantifier
+//
+// Anchor ::
+// ^
+// $
+// \ b
+// \ B
+// ( ? = Disjunction )
+// ( ? ! Disjunction )
+//
+// Quantifier ::
+// QuantifierPrefix
+// QuantifierPrefix ?
+//
+// QuantifierPrefix ::
+// *
+// +
+// ?
+// { DecimalDigits }
+// { DecimalDigits , }
+// { DecimalDigits , DecimalDigits }
+//
+// Atom ::
+// PatternCharacter
+// .
+// \ AtomEscape
+// CharacterClass
+// ( Disjunction )
+// ( ? : Disjunction )
+//
+// PatternCharacter ::
+// SourceCharacter but not any of: ^ $ \ . * + ? ( ) [ ] { } |
+//
+// AtomEscape ::
+// DecimalEscape
+// CharacterEscape
+// CharacterClassEscape
+//
+// CharacterEscape[U] ::
+// ControlEscape
+// c ControlLetter
+// HexEscapeSequence
+// RegExpUnicodeEscapeSequence[?U] (ES6)
+// IdentityEscape[?U]
+//
+// ControlEscape ::
+// one of f n r t v
+// ControlLetter ::
+// one of
+// a b c d e f g h i j k l m n o p q r s t u v w x y z
+// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
+//
+// IdentityEscape ::
+// SourceCharacter but not IdentifierPart
+//
+//
+//
+// DecimalEscape ::
+// DecimalIntegerLiteral [lookahead ∉ DecimalDigit]
+//
+// CharacterClassEscape ::
+// one of d D s S w W
+//
+// CharacterClass ::
+// [ [lookahead ∉ {^}] ClassRanges ]
+// [ ^ ClassRanges ]
+//
+// ClassRanges ::
+// [empty]
+// NonemptyClassRanges
+//
+// NonemptyClassRanges ::
+// ClassAtom
+// ClassAtom NonemptyClassRangesNoDash
+// ClassAtom - ClassAtom ClassRanges
+//
+// NonemptyClassRangesNoDash ::
+// ClassAtom
+// ClassAtomNoDash NonemptyClassRangesNoDash
+// ClassAtomNoDash - ClassAtom ClassRanges
+//
+// ClassAtom ::
+// -
+// ClassAtomNoDash
+//
+// ClassAtomNoDash ::
+// SourceCharacter but not one of \ or ] or -
+// \ ClassEscape
+//
+// ClassEscape ::
+// DecimalEscape
+// b
+// CharacterEscape
+// CharacterClassEscape
+
+(function() {
+
+ function parse(str, flags) {
+ function addRaw(node) {
+ node.raw = str.substring(node.range[0], node.range[1]);
+ return node;
+ }
+
+ function updateRawStart(node, start) {
+ node.range[0] = start;
+ return addRaw(node);
+ }
+
+ function createAnchor(kind, rawLength) {
+ return addRaw({
+ type: 'anchor',
+ kind: kind,
+ range: [
+ pos - rawLength,
+ pos
+ ]
+ });
+ }
+
+ function createValue(kind, codePoint, from, to) {
+ return addRaw({
+ type: 'value',
+ kind: kind,
+ codePoint: codePoint,
+ range: [from, to]
+ });
+ }
+
+ function createEscaped(kind, codePoint, value, fromOffset) {
+ fromOffset = fromOffset || 0;
+ return createValue(kind, codePoint, pos - (value.length + fromOffset), pos);
+ }
+
+ function createCharacter(matches) {
+ var _char = matches[0];
+ var first = _char.charCodeAt(0);
+ if (hasUnicodeFlag) {
+ var second;
+ if (_char.length === 1 && first >= 0xD800 && first <= 0xDBFF) {
+ second = lookahead().charCodeAt(0);
+ if (second >= 0xDC00 && second <= 0xDFFF) {
+ // Unicode surrogate pair
+ pos++;
+ return createValue(
+ 'symbol',
+ (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000,
+ pos - 2, pos);
+ }
+ }
+ }
+ return createValue('symbol', first, pos - 1, pos);
+ }
+
+ function createDisjunction(alternatives, from, to) {
+ return addRaw({
+ type: 'disjunction',
+ body: alternatives,
+ range: [
+ from,
+ to
+ ]
+ });
+ }
+
+ function createDot() {
+ return addRaw({
+ type: 'dot',
+ range: [
+ pos - 1,
+ pos
+ ]
+ });
+ }
+
+ function createCharacterClassEscape(value) {
+ return addRaw({
+ type: 'characterClassEscape',
+ value: value,
+ range: [
+ pos - 2,
+ pos
+ ]
+ });
+ }
+
+ function createReference(matchIndex) {
+ return addRaw({
+ type: 'reference',
+ matchIndex: parseInt(matchIndex, 10),
+ range: [
+ pos - 1 - matchIndex.length,
+ pos
+ ]
+ });
+ }
+
+ function createGroup(behavior, disjunction, from, to) {
+ return addRaw({
+ type: 'group',
+ behavior: behavior,
+ body: disjunction,
+ range: [
+ from,
+ to
+ ]
+ });
+ }
+
+ function createQuantifier(min, max, from, to) {
+ if (to == null) {
+ from = pos - 1;
+ to = pos;
+ }
+
+ return addRaw({
+ type: 'quantifier',
+ min: min,
+ max: max,
+ greedy: true,
+ body: null, // set later on,
+ range: [
+ from,
+ to
+ ]
+ });
+ }
+
+ function createAlternative(terms, from, to) {
+ return addRaw({
+ type: 'alternative',
+ body: terms,
+ range: [
+ from,
+ to
+ ]
+ });
+ }
+
+ function createCharacterClass(classRanges, negative, from, to) {
+ return addRaw({
+ type: 'characterClass',
+ body: classRanges,
+ negative: negative,
+ range: [
+ from,
+ to
+ ]
+ });
+ }
+
+ function createClassRange(min, max, from, to) {
+ // See 15.10.2.15:
+ if (min.codePoint > max.codePoint) {
+ throw SyntaxError('invalid range in character class');
+ }
+
+ return addRaw({
+ type: 'characterClassRange',
+ min: min,
+ max: max,
+ range: [
+ from,
+ to
+ ]
+ });
+ }
+
+ function flattenBody(body) {
+ if (body.type === 'alternative') {
+ return body.body;
+ } else {
+ return [body];
+ }
+ }
+
+ function isEmpty(obj) {
+ return obj.type === 'empty';
+ }
+
+ function incr(amount) {
+ amount = (amount || 1);
+ var res = str.substring(pos, pos + amount);
+ pos += (amount || 1);
+ return res;
+ }
+
+ function skip(value) {
+ if (!match(value)) {
+ throw SyntaxError('character: ' + value);
+ }
+ }
+
+ function match(value) {
+ if (str.indexOf(value, pos) === pos) {
+ return incr(value.length);
+ }
+ }
+
+ function lookahead() {
+ return str[pos];
+ }
+
+ function current(value) {
+ return str.indexOf(value, pos) === pos;
+ }
+
+ function next(value) {
+ return str[pos + 1] === value;
+ }
+
+ function matchReg(regExp) {
+ var subStr = str.substring(pos);
+ var res = subStr.match(regExp);
+ if (res) {
+ res.range = [];
+ res.range[0] = pos;
+ incr(res[0].length);
+ res.range[1] = pos;
+ }
+ return res;
+ }
+
+ function parseDisjunction() {
+ // Disjunction ::
+ // Alternative
+ // Alternative | Disjunction
+ var res = [], from = pos;
+ res.push(parseAlternative());
+
+ while (match('|')) {
+ res.push(parseAlternative());
+ }
+
+ if (res.length === 1) {
+ return res[0];
+ }
+
+ return createDisjunction(res, from, pos);
+ }
+
+ function parseAlternative() {
+ var res = [], from = pos;
+ var term;
+
+ // Alternative ::
+ // [empty]
+ // Alternative Term
+ while (term = parseTerm()) {
+ res.push(term);
+ }
+
+ if (res.length === 1) {
+ return res[0];
+ }
+
+ return createAlternative(res, from, pos);
+ }
+
+ function parseTerm() {
+ // Term ::
+ // Anchor
+ // Atom
+ // Atom Quantifier
+
+ if (pos >= str.length || current('|') || current(')')) {
+ return null; /* Means: The term is empty */
+ }
+
+ var anchor = parseAnchor();
+
+ if (anchor) {
+ return anchor;
+ }
+
+ var atom = parseAtom();
+ if (!atom) {
+ throw SyntaxError('Expected atom')
+ }
+ var quantifier = parseQuantifier() || false;
+ if (quantifier) {
+ quantifier.body = flattenBody(atom);
+ // The quantifier contains the atom. Therefore, the beginning of the
+ // quantifier range is given by the beginning of the atom.
+ updateRawStart(quantifier, atom.range[0]);
+ return quantifier;
+ }
+ return atom;
+ }
+
+ function parseGroup(matchA, typeA, matchB, typeB) {
+ var type = null, from = pos;
+
+ if (match(matchA)) {
+ type = typeA;
+ } else if (match(matchB)) {
+ type = typeB;
+ } else {
+ return false;
+ }
+
+ var body = parseDisjunction();
+ if (!body) {
+ throw SyntaxError('Expected disjunction');
+ }
+ skip(')');
+ var group = createGroup(type, flattenBody(body), from, pos);
+
+ if (type == 'normal') {
+ // Keep track of the number of closed groups. This is required for
+ // parseDecimalEscape(). In case the string is parsed a second time the
+ // value already holds the total count and no incrementation is required.
+ if (firstIteration) {
+ closedCaptureCounter++;
+ }
+ }
+ return group;
+ }
+
+ function parseAnchor() {
+ // Anchor ::
+ // ^
+ // $
+ // \ b
+ // \ B
+ // ( ? = Disjunction )
+ // ( ? ! Disjunction )
+ var res, from = pos;
+
+ if (match('^')) {
+ return createAnchor('start', 1 /* rawLength */);
+ } else if (match('$')) {
+ return createAnchor('end', 1 /* rawLength */);
+ } else if (match('\\b')) {
+ return createAnchor('boundary', 2 /* rawLength */);
+ } else if (match('\\B')) {
+ return createAnchor('not-boundary', 2 /* rawLength */);
+ } else {
+ return parseGroup('(?=', 'lookahead', '(?!', 'negativeLookahead');
+ }
+ }
+
+ function parseQuantifier() {
+ // Quantifier ::
+ // QuantifierPrefix
+ // QuantifierPrefix ?
+ //
+ // QuantifierPrefix ::
+ // *
+ // +
+ // ?
+ // { DecimalDigits }
+ // { DecimalDigits , }
+ // { DecimalDigits , DecimalDigits }
+
+ var res;
+ var quantifier;
+ var min, max;
+
+ if (match('*')) {
+ quantifier = createQuantifier(0);
+ }
+ else if (match('+')) {
+ quantifier = createQuantifier(1);
+ }
+ else if (match('?')) {
+ quantifier = createQuantifier(0, 1);
+ }
+ else if (res = matchReg(/^\{([0-9]+)\}/)) {
+ min = parseInt(res[1], 10);
+ quantifier = createQuantifier(min, min, res.range[0], res.range[1]);
+ }
+ else if (res = matchReg(/^\{([0-9]+),\}/)) {
+ min = parseInt(res[1], 10);
+ quantifier = createQuantifier(min, undefined, res.range[0], res.range[1]);
+ }
+ else if (res = matchReg(/^\{([0-9]+),([0-9]+)\}/)) {
+ min = parseInt(res[1], 10);
+ max = parseInt(res[2], 10);
+ if (min > max) {
+ throw SyntaxError('numbers out of order in {} quantifier');
+ }
+ quantifier = createQuantifier(min, max, res.range[0], res.range[1]);
+ }
+
+ if (quantifier) {
+ if (match('?')) {
+ quantifier.greedy = false;
+ quantifier.range[1] += 1;
+ }
+ }
+
+ return quantifier;
+ }
+
+ function parseAtom() {
+ // Atom ::
+ // PatternCharacter
+ // .
+ // \ AtomEscape
+ // CharacterClass
+ // ( Disjunction )
+ // ( ? : Disjunction )
+
+ var res;
+
+ // jviereck: allow ']', '}' here as well to be compatible with browser's
+ // implementations: ']'.match(/]/);
+ // if (res = matchReg(/^[^^$\\.*+?()[\]{}|]/)) {
+ if (res = matchReg(/^[^^$\\.*+?(){[|]/)) {
+ // PatternCharacter
+ return createCharacter(res);
+ }
+ else if (match('.')) {
+ // .
+ return createDot();
+ }
+ else if (match('\\')) {
+ // \ AtomEscape
+ res = parseAtomEscape();
+ if (!res) {
+ throw SyntaxError('atomEscape');
+ }
+ return res;
+ }
+ else if (res = parseCharacterClass()) {
+ return res;
+ }
+ else {
+ // ( Disjunction )
+ // ( ? : Disjunction )
+ return parseGroup('(?:', 'ignore', '(', 'normal');
+ }
+ }
+
+ function parseUnicodeSurrogatePairEscape(firstEscape) {
+ if (hasUnicodeFlag) {
+ var first, second;
+ if (firstEscape.kind == 'unicodeEscape' &&
+ (first = firstEscape.codePoint) >= 0xD800 && first <= 0xDBFF &&
+ current('\\') && next('u') ) {
+ var prevPos = pos;
+ pos++;
+ var secondEscape = parseClassEscape();
+ if (secondEscape.kind == 'unicodeEscape' &&
+ (second = secondEscape.codePoint) >= 0xDC00 && second <= 0xDFFF) {
+ // Unicode surrogate pair
+ firstEscape.range[1] = secondEscape.range[1];
+ firstEscape.codePoint = (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
+ firstEscape.type = 'value';
+ firstEscape.kind = 'unicodeCodePointEscape';
+ addRaw(firstEscape);
+ }
+ else {
+ pos = prevPos;
+ }
+ }
+ }
+ return firstEscape;
+ }
+
+ function parseClassEscape() {
+ return parseAtomEscape(true);
+ }
+
+ function parseAtomEscape(insideCharacterClass) {
+ // AtomEscape ::
+ // DecimalEscape
+ // CharacterEscape
+ // CharacterClassEscape
+
+ var res;
+
+ res = parseDecimalEscape();
+ if (res) {
+ return res;
+ }
+
+ // For ClassEscape
+ if (insideCharacterClass) {
+ if (match('b')) {
+ // 15.10.2.19
+ // The production ClassEscape :: b evaluates by returning the
+ // CharSet containing the one character (Unicode value 0008).
+ return createEscaped('singleEscape', 0x0008, '\\b');
+ } else if (match('B')) {
+ throw SyntaxError('\\B not possible inside of CharacterClass');
+ }
+ }
+
+ res = parseCharacterEscape();
+
+ return res;
+ }
+
+
+ function parseDecimalEscape() {
+ // DecimalEscape ::
+ // DecimalIntegerLiteral [lookahead ∉ DecimalDigit]
+ // CharacterClassEscape :: one of d D s S w W
+
+ var res, match;
+
+ if (res = matchReg(/^(?!0)\d+/)) {
+ match = res[0];
+ var refIdx = parseInt(res[0], 10);
+ if (refIdx <= closedCaptureCounter) {
+ // If the number is smaller than the normal-groups found so
+ // far, then it is a reference...
+ return createReference(res[0]);
+ } else {
+ // ... otherwise it needs to be interpreted as a octal (if the
+ // number is in an octal format). If it is NOT octal format,
+ // then the slash is ignored and the number is matched later
+ // as normal characters.
+
+ // Recall the negative decision to decide if the input must be parsed
+ // a second time with the total normal-groups.
+ backrefDenied.push(refIdx);
+
+ // Reset the position again, as maybe only parts of the previous
+ // matched numbers are actual octal numbers. E.g. in '019' only
+ // the '01' should be matched.
+ incr(-res[0].length);
+ if (res = matchReg(/^[0-7]{1,3}/)) {
+ return createEscaped('octal', parseInt(res[0], 8), res[0], 1);
+ } else {
+ // If we end up here, we have a case like /\91/. Then the
+ // first slash is to be ignored and the 9 & 1 to be treated
+ // like ordinary characters. Create a character for the
+ // first number only here - other number-characters
+ // (if available) will be matched later.
+ res = createCharacter(matchReg(/^[89]/));
+ return updateRawStart(res, res.range[0] - 1);
+ }
+ }
+ }
+ // Only allow octal numbers in the following. All matched numbers start
+ // with a zero (if the do not, the previous if-branch is executed).
+ // If the number is not octal format and starts with zero (e.g. `091`)
+ // then only the zeros `0` is treated here and the `91` are ordinary
+ // characters.
+ // Example:
+ // /\091/.exec('\091')[0].length === 3
+ else if (res = matchReg(/^[0-7]{1,3}/)) {
+ match = res[0];
+ if (/^0{1,3}$/.test(match)) {
+ // If they are all zeros, then only take the first one.
+ return createEscaped('null', 0x0000, '0', match.length + 1);
+ } else {
+ return createEscaped('octal', parseInt(match, 8), match, 1);
+ }
+ } else if (res = matchReg(/^[dDsSwW]/)) {
+ return createCharacterClassEscape(res[0]);
+ }
+ return false;
+ }
+
+ function parseCharacterEscape() {
+ // CharacterEscape ::
+ // ControlEscape
+ // c ControlLetter
+ // HexEscapeSequence
+ // UnicodeEscapeSequence
+ // IdentityEscape
+
+ var res;
+ if (res = matchReg(/^[fnrtv]/)) {
+ // ControlEscape
+ var codePoint = 0;
+ switch (res[0]) {
+ case 't': codePoint = 0x009; break;
+ case 'n': codePoint = 0x00A; break;
+ case 'v': codePoint = 0x00B; break;
+ case 'f': codePoint = 0x00C; break;
+ case 'r': codePoint = 0x00D; break;
+ }
+ return createEscaped('singleEscape', codePoint, '\\' + res[0]);
+ } else if (res = matchReg(/^c([a-zA-Z])/)) {
+ // c ControlLetter
+ return createEscaped('controlLetter', res[1].charCodeAt(0) % 32, res[1], 2);
+ } else if (res = matchReg(/^x([0-9a-fA-F]{2})/)) {
+ // HexEscapeSequence
+ return createEscaped('hexadecimalEscape', parseInt(res[1], 16), res[1], 2);
+ } else if (res = matchReg(/^u([0-9a-fA-F]{4})/)) {
+ // UnicodeEscapeSequence
+ return parseUnicodeSurrogatePairEscape(
+ createEscaped('unicodeEscape', parseInt(res[1], 16), res[1], 2)
+ );
+ } else if (hasUnicodeFlag && (res = matchReg(/^u\{([0-9a-fA-F]+)\}/))) {
+ // RegExpUnicodeEscapeSequence (ES6 Unicode code point escape)
+ return createEscaped('unicodeCodePointEscape', parseInt(res[1], 16), res[1], 4);
+ } else {
+ // IdentityEscape
+ return parseIdentityEscape();
+ }
+ }
+
+ // Taken from the Esprima parser.
+ function isIdentifierPart(ch) {
+ // Generated by `tools/generate-identifier-regex.js`.
+ var NonAsciiIdentifierPart = new RegExp('[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]');
+
+ return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore)
+ (ch >= 65 && ch <= 90) || // A..Z
+ (ch >= 97 && ch <= 122) || // a..z
+ (ch >= 48 && ch <= 57) || // 0..9
+ (ch === 92) || // \ (backslash)
+ ((ch >= 0x80) && NonAsciiIdentifierPart.test(String.fromCharCode(ch)));
+ }
+
+ function parseIdentityEscape() {
+ // IdentityEscape ::
+ // SourceCharacter but not IdentifierPart
+ //
+ //
+
+ var ZWJ = '\u200C';
+ var ZWNJ = '\u200D';
+
+ var res;
+ var tmp;
+
+ if (!isIdentifierPart(lookahead())) {
+ tmp = incr();
+ return createEscaped('identifier', tmp.charCodeAt(0), tmp, 1);
+ }
+
+ if (match(ZWJ)) {
+ //
+ return createEscaped('identifier', 0x200C, ZWJ);
+ } else if (match(ZWNJ)) {
+ //
+ return createEscaped('identifier', 0x200D, ZWNJ);
+ }
+
+ return null;
+ }
+
+ function parseCharacterClass() {
+ // CharacterClass ::
+ // [ [lookahead ∉ {^}] ClassRanges ]
+ // [ ^ ClassRanges ]
+
+ var res, from = pos;
+ if (res = matchReg(/^\[\^/)) {
+ res = parseClassRanges();
+ skip(']');
+ return createCharacterClass(res, true, from, pos);
+ } else if (match('[')) {
+ res = parseClassRanges();
+ skip(']');
+ return createCharacterClass(res, false, from, pos);
+ }
+
+ return null;
+ }
+
+ function parseClassRanges() {
+ // ClassRanges ::
+ // [empty]
+ // NonemptyClassRanges
+
+ var res;
+ if (current(']')) {
+ // Empty array means nothing insinde of the ClassRange.
+ return [];
+ } else {
+ res = parseNonemptyClassRanges();
+ if (!res) {
+ throw SyntaxError('nonEmptyClassRanges');
+ }
+ return res;
+ }
+ }
+
+ function parseHelperClassRanges(atom) {
+ var from, to, res;
+ if (current('-') && !next(']')) {
+ // ClassAtom - ClassAtom ClassRanges
+ skip('-');
+
+ res = parseClassAtom();
+ if (!res) {
+ throw SyntaxError('classAtom');
+ }
+ to = pos;
+ var classRanges = parseClassRanges();
+ if (!classRanges) {
+ throw SyntaxError('classRanges');
+ }
+ from = atom.range[0];
+ if (classRanges.type === 'empty') {
+ return [createClassRange(atom, res, from, to)];
+ }
+ return [createClassRange(atom, res, from, to)].concat(classRanges);
+ }
+
+ res = parseNonemptyClassRangesNoDash();
+ if (!res) {
+ throw SyntaxError('nonEmptyClassRangesNoDash');
+ }
+
+ return [atom].concat(res);
+ }
+
+ function parseNonemptyClassRanges() {
+ // NonemptyClassRanges ::
+ // ClassAtom
+ // ClassAtom NonemptyClassRangesNoDash
+ // ClassAtom - ClassAtom ClassRanges
+
+ var atom = parseClassAtom();
+ if (!atom) {
+ throw SyntaxError('classAtom');
+ }
+
+ if (current(']')) {
+ // ClassAtom
+ return [atom];
+ }
+
+ // ClassAtom NonemptyClassRangesNoDash
+ // ClassAtom - ClassAtom ClassRanges
+ return parseHelperClassRanges(atom);
+ }
+
+ function parseNonemptyClassRangesNoDash() {
+ // NonemptyClassRangesNoDash ::
+ // ClassAtom
+ // ClassAtomNoDash NonemptyClassRangesNoDash
+ // ClassAtomNoDash - ClassAtom ClassRanges
+
+ var res = parseClassAtom();
+ if (!res) {
+ throw SyntaxError('classAtom');
+ }
+ if (current(']')) {
+ // ClassAtom
+ return res;
+ }
+
+ // ClassAtomNoDash NonemptyClassRangesNoDash
+ // ClassAtomNoDash - ClassAtom ClassRanges
+ return parseHelperClassRanges(res);
+ }
+
+ function parseClassAtom() {
+ // ClassAtom ::
+ // -
+ // ClassAtomNoDash
+ if (match('-')) {
+ return createCharacter('-');
+ } else {
+ return parseClassAtomNoDash();
+ }
+ }
+
+ function parseClassAtomNoDash() {
+ // ClassAtomNoDash ::
+ // SourceCharacter but not one of \ or ] or -
+ // \ ClassEscape
+
+ var res;
+ if (res = matchReg(/^[^\\\]-]/)) {
+ return createCharacter(res[0]);
+ } else if (match('\\')) {
+ res = parseClassEscape();
+ if (!res) {
+ throw SyntaxError('classEscape');
+ }
+
+ return parseUnicodeSurrogatePairEscape(res);
+ }
+ }
+
+ var backrefDenied = [];
+ var closedCaptureCounter = 0;
+ var firstIteration = true;
+ var hasUnicodeFlag = (flags || "").indexOf("u") !== -1;
+ var pos = 0;
+
+ // Convert the input to a string and treat the empty string special.
+ str = String(str);
+ if (str === '') {
+ str = '(?:)';
+ }
+
+ var result = parseDisjunction();
+
+ if (result.range[1] !== str.length) {
+ throw SyntaxError('Could not parse entire input - got stuck: ' + str);
+ }
+
+ // The spec requires to interpret the `\2` in `/\2()()/` as backreference.
+ // As the parser collects the number of capture groups as the string is
+ // parsed it is impossible to make these decisions at the point the `\2` is
+ // handled. In case the local decision turns out to be wrongq after the
+ // parsing has finished, the input string is parsed a second time with the
+ // total count of capture groups set.
+ //
+ // SEE: https://github.com/jviereck/regjsparser/issues/70
+ for (var i = 0; i < backrefDenied.length; i++) {
+ if (backrefDenied[i] <= closedCaptureCounter) {
+ // Parse the input a second time.
+ pos = 0;
+ firstIteration = false;
+ return parseDisjunction();
+ }
+ }
+
+ return result;
+ };
+
+ var regjsparser = {
+ parse: parse
+ };
+
+ if (typeof module !== 'undefined' && module.exports) {
+ module.exports = regjsparser;
+ } else {
+ window.regjsparser = regjsparser;
+ }
+
+}());
+
+},{}],524:[function(require,module,exports){
+var generate = require('regjsgen').generate;
+var parse = require('regjsparser').parse;
+var regenerate = require('regenerate');
+var iuMappings = require('./data/iu-mappings.json');
+var ESCAPE_SETS = require('./data/character-class-escape-sets.js');
+
+function getCharacterClassEscapeSet(character) {
+ if (unicode) {
+ if (ignoreCase) {
+ return ESCAPE_SETS.UNICODE_IGNORE_CASE[character];
+ }
+ return ESCAPE_SETS.UNICODE[character];
+ }
+ return ESCAPE_SETS.REGULAR[character];
+}
+
+var object = {};
+var hasOwnProperty = object.hasOwnProperty;
+function has(object, property) {
+ return hasOwnProperty.call(object, property);
+}
+
+// Prepare a Regenerate set containing all code points, used for negative
+// character classes (if any).
+var UNICODE_SET = regenerate().addRange(0x0, 0x10FFFF);
+// Without the `u` flag, the range stops at 0xFFFF.
+// https://mths.be/es6#sec-pattern-semantics
+var BMP_SET = regenerate().addRange(0x0, 0xFFFF);
+
+// Prepare a Regenerate set containing all code points that are supposed to be
+// matched by `/./u`. https://mths.be/es6#sec-atom
+var DOT_SET_UNICODE = UNICODE_SET.clone() // all Unicode code points
+ .remove(
+ // minus `LineTerminator`s (https://mths.be/es6#sec-line-terminators):
+ 0x000A, // Line Feed
+ 0x000D, // Carriage Return
+ 0x2028, // Line Separator
+ 0x2029 // Paragraph Separator
+ );
+// Prepare a Regenerate set containing all code points that are supposed to be
+// matched by `/./` (only BMP code points).
+var DOT_SET = DOT_SET_UNICODE.clone()
+ .intersection(BMP_SET);
+
+// Add a range of code points + any case-folded code points in that range to a
+// set.
+regenerate.prototype.iuAddRange = function(min, max) {
+ var $this = this;
+ do {
+ var folded = caseFold(min);
+ if (folded) {
+ $this.add(folded);
+ }
+ } while (++min <= max);
+ return $this;
+};
+
+function assign(target, source) {
+ for (var key in source) {
+ // Note: `hasOwnProperty` is not needed here.
+ target[key] = source[key];
+ }
+}
+
+function update(item, pattern) {
+ // TODO: Test if memoizing `pattern` here is worth the effort.
+ if (!pattern) {
+ return;
+ }
+ var tree = parse(pattern, '');
+ switch (tree.type) {
+ case 'characterClass':
+ case 'group':
+ case 'value':
+ // No wrapping needed.
+ break;
+ default:
+ // Wrap the pattern in a non-capturing group.
+ tree = wrap(tree, pattern);
+ }
+ assign(item, tree);
+}
+
+function wrap(tree, pattern) {
+ // Wrap the pattern in a non-capturing group.
+ return {
+ 'type': 'group',
+ 'behavior': 'ignore',
+ 'body': [tree],
+ 'raw': '(?:' + pattern + ')'
+ };
+}
+
+function caseFold(codePoint) {
+ return has(iuMappings, codePoint) ? iuMappings[codePoint] : false;
+}
+
+var ignoreCase = false;
+var unicode = false;
+function processCharacterClass(characterClassItem) {
+ var set = regenerate();
+ var body = characterClassItem.body.forEach(function(item) {
+ switch (item.type) {
+ case 'value':
+ set.add(item.codePoint);
+ if (ignoreCase && unicode) {
+ var folded = caseFold(item.codePoint);
+ if (folded) {
+ set.add(folded);
+ }
+ }
+ break;
+ case 'characterClassRange':
+ var min = item.min.codePoint;
+ var max = item.max.codePoint;
+ set.addRange(min, max);
+ if (ignoreCase && unicode) {
+ set.iuAddRange(min, max);
+ }
+ break;
+ case 'characterClassEscape':
+ set.add(getCharacterClassEscapeSet(item.value));
+ break;
+ // The `default` clause is only here as a safeguard; it should never be
+ // reached. Code coverage tools should ignore it.
+ /* istanbul ignore next */
+ default:
+ throw Error('Unknown term type: ' + item.type);
+ }
+ });
+ if (characterClassItem.negative) {
+ set = (unicode ? UNICODE_SET : BMP_SET).clone().remove(set);
+ }
+ update(characterClassItem, set.toString());
+ return characterClassItem;
+}
+
+function processTerm(item) {
+ switch (item.type) {
+ case 'dot':
+ update(
+ item,
+ (unicode ? DOT_SET_UNICODE : DOT_SET).toString()
+ );
+ break;
+ case 'characterClass':
+ item = processCharacterClass(item);
+ break;
+ case 'characterClassEscape':
+ update(
+ item,
+ getCharacterClassEscapeSet(item.value).toString()
+ );
+ break;
+ case 'alternative':
+ case 'disjunction':
+ case 'group':
+ case 'quantifier':
+ item.body = item.body.map(processTerm);
+ break;
+ case 'value':
+ var codePoint = item.codePoint;
+ var set = regenerate(codePoint);
+ if (ignoreCase && unicode) {
+ var folded = caseFold(codePoint);
+ if (folded) {
+ set.add(folded);
+ }
+ }
+ update(item, set.toString());
+ break;
+ case 'anchor':
+ case 'empty':
+ case 'group':
+ case 'reference':
+ // Nothing to do here.
+ break;
+ // The `default` clause is only here as a safeguard; it should never be
+ // reached. Code coverage tools should ignore it.
+ /* istanbul ignore next */
+ default:
+ throw Error('Unknown term type: ' + item.type);
+ }
+ return item;
+};
+
+module.exports = function(pattern, flags) {
+ var tree = parse(pattern, flags);
+ ignoreCase = flags ? flags.indexOf('i') > -1 : false;
+ unicode = flags ? flags.indexOf('u') > -1 : false;
+ assign(tree, processTerm(tree));
+ return generate(tree);
+};
+
+},{"./data/character-class-escape-sets.js":519,"./data/iu-mappings.json":520,"regenerate":521,"regjsgen":522,"regjsparser":523}],525:[function(require,module,exports){
+'use strict';
+var isFinite = require('is-finite');
+
+module.exports = function (str, n) {
+ if (typeof str !== 'string') {
+ throw new TypeError('Expected a string as the first argument');
+ }
+
+ if (n < 0 || !isFinite(n)) {
+ throw new TypeError('Expected a finite positive number');
+ }
+
+ var ret = '';
+
+ do {
+ if (n & 1) {
+ ret += str;
+ }
+
+ str += str;
+ } while (n = n >> 1);
+
+ return ret;
+};
+
+},{"is-finite":526}],526:[function(require,module,exports){
+arguments[4][351][0].apply(exports,arguments)
+},{"dup":351,"number-is-nan":527}],527:[function(require,module,exports){
+arguments[4][352][0].apply(exports,arguments)
+},{"dup":352}],528:[function(require,module,exports){
+'use strict';
+module.exports = /^#!.*/;
+
+},{}],529:[function(require,module,exports){
+'use strict';
+module.exports = function (str) {
+ var isExtendedLengthPath = /^\\\\\?\\/.test(str);
+ var hasNonAscii = /[^\x00-\x80]+/.test(str);
+
+ if (isExtendedLengthPath || hasNonAscii) {
+ return str;
+ }
+
+ return str.replace(/\\/g, '/');
+};
+
+},{}],530:[function(require,module,exports){
+/*
+ * Copyright 2009-2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE.txt or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator;
+exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer;
+exports.SourceNode = require('./source-map/source-node').SourceNode;
+
+},{"./source-map/source-map-consumer":536,"./source-map/source-map-generator":537,"./source-map/source-node":538}],531:[function(require,module,exports){
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+if (typeof define !== 'function') {
+ var define = require('amdefine')(module, require);
+}
+define(function (require, exports, module) {
+
+ var util = require('./util');
+
+ /**
+ * A data structure which is a combination of an array and a set. Adding a new
+ * member is O(1), testing for membership is O(1), and finding the index of an
+ * element is O(1). Removing elements from the set is not supported. Only
+ * strings are supported for membership.
+ */
+ function ArraySet() {
+ this._array = [];
+ this._set = {};
+ }
+
+ /**
+ * Static method for creating ArraySet instances from an existing array.
+ */
+ ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
+ var set = new ArraySet();
+ for (var i = 0, len = aArray.length; i < len; i++) {
+ set.add(aArray[i], aAllowDuplicates);
+ }
+ return set;
+ };
+
+ /**
+ * Add the given string to this set.
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
+ var isDuplicate = this.has(aStr);
+ var idx = this._array.length;
+ if (!isDuplicate || aAllowDuplicates) {
+ this._array.push(aStr);
+ }
+ if (!isDuplicate) {
+ this._set[util.toSetString(aStr)] = idx;
+ }
+ };
+
+ /**
+ * Is the given string a member of this set?
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.has = function ArraySet_has(aStr) {
+ return Object.prototype.hasOwnProperty.call(this._set,
+ util.toSetString(aStr));
+ };
+
+ /**
+ * What is the index of the given string in the array?
+ *
+ * @param String aStr
+ */
+ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
+ if (this.has(aStr)) {
+ return this._set[util.toSetString(aStr)];
+ }
+ throw new Error('"' + aStr + '" is not in the set.');
+ };
+
+ /**
+ * What is the element at the given index?
+ *
+ * @param Number aIdx
+ */
+ ArraySet.prototype.at = function ArraySet_at(aIdx) {
+ if (aIdx >= 0 && aIdx < this._array.length) {
+ return this._array[aIdx];
+ }
+ throw new Error('No element indexed by ' + aIdx);
+ };
+
+ /**
+ * Returns the array representation of this set (which has the proper indices
+ * indicated by indexOf). Note that this is a copy of the internal array used
+ * for storing the members so that no one can mess with internal state.
+ */
+ ArraySet.prototype.toArray = function ArraySet_toArray() {
+ return this._array.slice();
+ };
+
+ exports.ArraySet = ArraySet;
+
+});
+
+},{"./util":539,"amdefine":540}],532:[function(require,module,exports){
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ *
+ * Based on the Base 64 VLQ implementation in Closure Compiler:
+ * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
+ *
+ * Copyright 2011 The Closure Compiler Authors. All rights reserved.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided
+ * with the distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+if (typeof define !== 'function') {
+ var define = require('amdefine')(module, require);
+}
+define(function (require, exports, module) {
+
+ var base64 = require('./base64');
+
+ // A single base 64 digit can contain 6 bits of data. For the base 64 variable
+ // length quantities we use in the source map spec, the first bit is the sign,
+ // the next four bits are the actual value, and the 6th bit is the
+ // continuation bit. The continuation bit tells us whether there are more
+ // digits in this value following this digit.
+ //
+ // Continuation
+ // | Sign
+ // | |
+ // V V
+ // 101011
+
+ var VLQ_BASE_SHIFT = 5;
+
+ // binary: 100000
+ var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
+
+ // binary: 011111
+ var VLQ_BASE_MASK = VLQ_BASE - 1;
+
+ // binary: 100000
+ var VLQ_CONTINUATION_BIT = VLQ_BASE;
+
+ /**
+ * Converts from a two-complement value to a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
+ * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
+ */
+ function toVLQSigned(aValue) {
+ return aValue < 0
+ ? ((-aValue) << 1) + 1
+ : (aValue << 1) + 0;
+ }
+
+ /**
+ * Converts to a two-complement value from a value where the sign bit is
+ * placed in the least significant bit. For example, as decimals:
+ * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
+ * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
+ */
+ function fromVLQSigned(aValue) {
+ var isNegative = (aValue & 1) === 1;
+ var shifted = aValue >> 1;
+ return isNegative
+ ? -shifted
+ : shifted;
+ }
+
+ /**
+ * Returns the base 64 VLQ encoded value.
+ */
+ exports.encode = function base64VLQ_encode(aValue) {
+ var encoded = "";
+ var digit;
+
+ var vlq = toVLQSigned(aValue);
+
+ do {
+ digit = vlq & VLQ_BASE_MASK;
+ vlq >>>= VLQ_BASE_SHIFT;
+ if (vlq > 0) {
+ // There are still more digits in this value, so we must make sure the
+ // continuation bit is marked.
+ digit |= VLQ_CONTINUATION_BIT;
+ }
+ encoded += base64.encode(digit);
+ } while (vlq > 0);
+
+ return encoded;
+ };
+
+ /**
+ * Decodes the next base 64 VLQ value from the given string and returns the
+ * value and the rest of the string via the out parameter.
+ */
+ exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) {
+ var strLen = aStr.length;
+ var result = 0;
+ var shift = 0;
+ var continuation, digit;
+
+ do {
+ if (aIndex >= strLen) {
+ throw new Error("Expected more digits in base 64 VLQ value.");
+ }
+ digit = base64.decode(aStr.charAt(aIndex++));
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
+ digit &= VLQ_BASE_MASK;
+ result = result + (digit << shift);
+ shift += VLQ_BASE_SHIFT;
+ } while (continuation);
+
+ aOutParam.value = fromVLQSigned(result);
+ aOutParam.rest = aIndex;
+ };
+
+});
+
+},{"./base64":533,"amdefine":540}],533:[function(require,module,exports){
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+if (typeof define !== 'function') {
+ var define = require('amdefine')(module, require);
+}
+define(function (require, exports, module) {
+
+ var charToIntMap = {};
+ var intToCharMap = {};
+
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
+ .split('')
+ .forEach(function (ch, index) {
+ charToIntMap[ch] = index;
+ intToCharMap[index] = ch;
+ });
+
+ /**
+ * Encode an integer in the range of 0 to 63 to a single base 64 digit.
+ */
+ exports.encode = function base64_encode(aNumber) {
+ if (aNumber in intToCharMap) {
+ return intToCharMap[aNumber];
+ }
+ throw new TypeError("Must be between 0 and 63: " + aNumber);
+ };
+
+ /**
+ * Decode a single base 64 digit to an integer.
+ */
+ exports.decode = function base64_decode(aChar) {
+ if (aChar in charToIntMap) {
+ return charToIntMap[aChar];
+ }
+ throw new TypeError("Not a valid base 64 digit: " + aChar);
+ };
+
+});
+
+},{"amdefine":540}],534:[function(require,module,exports){
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+if (typeof define !== 'function') {
+ var define = require('amdefine')(module, require);
+}
+define(function (require, exports, module) {
+
+ exports.GREATEST_LOWER_BOUND = 1;
+ exports.LEAST_UPPER_BOUND = 2;
+
+ /**
+ * Recursive implementation of binary search.
+ *
+ * @param aLow Indices here and lower do not contain the needle.
+ * @param aHigh Indices here and higher do not contain the needle.
+ * @param aNeedle The element being searched for.
+ * @param aHaystack The non-empty array being searched.
+ * @param aCompare Function which takes two elements and returns -1, 0, or 1.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ */
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) {
+ // This function terminates when one of the following is true:
+ //
+ // 1. We find the exact element we are looking for.
+ //
+ // 2. We did not find the exact element, but we can return the index of
+ // the next-closest element.
+ //
+ // 3. We did not find the exact element, and there is no next-closest
+ // element than the one we are searching for, so we return -1.
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
+ var cmp = aCompare(aNeedle, aHaystack[mid], true);
+ if (cmp === 0) {
+ // Found the element we are looking for.
+ return mid;
+ }
+ else if (cmp > 0) {
+ // Our needle is greater than aHaystack[mid].
+ if (aHigh - mid > 1) {
+ // The element is in the upper half.
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // The exact needle element was not found in this haystack. Determine if
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return aHigh < aHaystack.length ? aHigh : -1;
+ } else {
+ return mid;
+ }
+ }
+ else {
+ // Our needle is less than aHaystack[mid].
+ if (mid - aLow > 1) {
+ // The element is in the lower half.
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias);
+ }
+
+ // we are in termination case (3) or (2) and return the appropriate thing.
+ if (aBias == exports.LEAST_UPPER_BOUND) {
+ return mid;
+ } else {
+ return aLow < 0 ? -1 : aLow;
+ }
+ }
+ }
+
+ /**
+ * This is an implementation of binary search which will always try and return
+ * the index of the closest element if there is no exact hit. This is because
+ * mappings between original and generated line/col pairs are single points,
+ * and there is an implicit region between each of them, so a miss just means
+ * that you aren't on the very start of a region.
+ *
+ * @param aNeedle The element you are looking for.
+ * @param aHaystack The array that is being searched.
+ * @param aCompare A function which takes the needle and an element in the
+ * array and returns -1, 0, or 1 depending on whether the needle is less
+ * than, equal to, or greater than the element, respectively.
+ * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or
+ * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'.
+ */
+ exports.search = function search(aNeedle, aHaystack, aCompare, aBias) {
+ if (aHaystack.length === 0) {
+ return -1;
+ }
+
+ var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack,
+ aCompare, aBias || exports.GREATEST_LOWER_BOUND);
+ if (index < 0) {
+ return -1;
+ }
+
+ // We have found either the exact element, or the next-closest element than
+ // the one we are searching for. However, there may be more than one such
+ // element. Make sure we always return the smallest of these.
+ while (index - 1 >= 0) {
+ if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) {
+ break;
+ }
+ --index;
+ }
+
+ return index;
+ };
+
+});
+
+},{"amdefine":540}],535:[function(require,module,exports){
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2014 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+if (typeof define !== 'function') {
+ var define = require('amdefine')(module, require);
+}
+define(function (require, exports, module) {
+
+ var util = require('./util');
+
+ /**
+ * Determine whether mappingB is after mappingA with respect to generated
+ * position.
+ */
+ function generatedPositionAfter(mappingA, mappingB) {
+ // Optimized for most common case
+ var lineA = mappingA.generatedLine;
+ var lineB = mappingB.generatedLine;
+ var columnA = mappingA.generatedColumn;
+ var columnB = mappingB.generatedColumn;
+ return lineB > lineA || lineB == lineA && columnB >= columnA ||
+ util.compareByGeneratedPositions(mappingA, mappingB) <= 0;
+ }
+
+ /**
+ * A data structure to provide a sorted view of accumulated mappings in a
+ * performance conscious manner. It trades a neglibable overhead in general
+ * case for a large speedup in case of mappings being added in order.
+ */
+ function MappingList() {
+ this._array = [];
+ this._sorted = true;
+ // Serves as infimum
+ this._last = {generatedLine: -1, generatedColumn: 0};
+ }
+
+ /**
+ * Iterate through internal items. This method takes the same arguments that
+ * `Array.prototype.forEach` takes.
+ *
+ * NOTE: The order of the mappings is NOT guaranteed.
+ */
+ MappingList.prototype.unsortedForEach =
+ function MappingList_forEach(aCallback, aThisArg) {
+ this._array.forEach(aCallback, aThisArg);
+ };
+
+ /**
+ * Add the given source mapping.
+ *
+ * @param Object aMapping
+ */
+ MappingList.prototype.add = function MappingList_add(aMapping) {
+ var mapping;
+ if (generatedPositionAfter(this._last, aMapping)) {
+ this._last = aMapping;
+ this._array.push(aMapping);
+ } else {
+ this._sorted = false;
+ this._array.push(aMapping);
+ }
+ };
+
+ /**
+ * Returns the flat, sorted array of mappings. The mappings are sorted by
+ * generated position.
+ *
+ * WARNING: This method returns internal data without copying, for
+ * performance. The return value must NOT be mutated, and should be treated as
+ * an immutable borrow. If you want to take ownership, you must make your own
+ * copy.
+ */
+ MappingList.prototype.toArray = function MappingList_toArray() {
+ if (!this._sorted) {
+ this._array.sort(util.compareByGeneratedPositions);
+ this._sorted = true;
+ }
+ return this._array;
+ };
+
+ exports.MappingList = MappingList;
+
+});
+
+},{"./util":539,"amdefine":540}],536:[function(require,module,exports){
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+if (typeof define !== 'function') {
+ var define = require('amdefine')(module, require);
+}
+define(function (require, exports, module) {
+
+ var util = require('./util');
+ var binarySearch = require('./binary-search');
+ var ArraySet = require('./array-set').ArraySet;
+ var base64VLQ = require('./base64-vlq');
+
+ function SourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ return sourceMap.sections != null
+ ? new IndexedSourceMapConsumer(sourceMap)
+ : new BasicSourceMapConsumer(sourceMap);
+ }
+
+ SourceMapConsumer.fromSourceMap = function(aSourceMap) {
+ return BasicSourceMapConsumer.fromSourceMap(aSourceMap);
+ }
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ SourceMapConsumer.prototype._version = 3;
+
+ // `__generatedMappings` and `__originalMappings` are arrays that hold the
+ // parsed mapping coordinates from the source map's "mappings" attribute. They
+ // are lazily instantiated, accessed via the `_generatedMappings` and
+ // `_originalMappings` getters respectively, and we only parse the mappings
+ // and create these arrays once queried for a source location. We jump through
+ // these hoops because there can be many thousands of mappings, and parsing
+ // them is expensive, so we only want to do it if we must.
+ //
+ // Each object in the arrays is of the form:
+ //
+ // {
+ // generatedLine: The line number in the generated code,
+ // generatedColumn: The column number in the generated code,
+ // source: The path to the original source file that generated this
+ // chunk of code,
+ // originalLine: The line number in the original source that
+ // corresponds to this chunk of generated code,
+ // originalColumn: The column number in the original source that
+ // corresponds to this chunk of generated code,
+ // name: The name of the original symbol which generated this chunk of
+ // code.
+ // }
+ //
+ // All properties except for `generatedLine` and `generatedColumn` can be
+ // `null`.
+ //
+ // `_generatedMappings` is ordered by the generated positions.
+ //
+ // `_originalMappings` is ordered by the original positions.
+
+ SourceMapConsumer.prototype.__generatedMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', {
+ get: function () {
+ if (!this.__generatedMappings) {
+ this.__generatedMappings = [];
+ this.__originalMappings = [];
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__generatedMappings;
+ }
+ });
+
+ SourceMapConsumer.prototype.__originalMappings = null;
+ Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', {
+ get: function () {
+ if (!this.__originalMappings) {
+ this.__generatedMappings = [];
+ this.__originalMappings = [];
+ this._parseMappings(this._mappings, this.sourceRoot);
+ }
+
+ return this.__originalMappings;
+ }
+ });
+
+ SourceMapConsumer.prototype._nextCharIsMappingSeparator =
+ function SourceMapConsumer_nextCharIsMappingSeparator(aStr, index) {
+ var c = aStr.charAt(index);
+ return c === ";" || c === ",";
+ };
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ SourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ throw new Error("Subclasses must implement _parseMappings");
+ };
+
+ SourceMapConsumer.GENERATED_ORDER = 1;
+ SourceMapConsumer.ORIGINAL_ORDER = 2;
+
+ SourceMapConsumer.GREATEST_LOWER_BOUND = 1;
+ SourceMapConsumer.LEAST_UPPER_BOUND = 2;
+
+ /**
+ * Iterate over each mapping between an original source/line/column and a
+ * generated line/column in this source map.
+ *
+ * @param Function aCallback
+ * The function that is called with each mapping.
+ * @param Object aContext
+ * Optional. If specified, this object will be the value of `this` every
+ * time that `aCallback` is called.
+ * @param aOrder
+ * Either `SourceMapConsumer.GENERATED_ORDER` or
+ * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
+ * iterate over the mappings sorted by the generated file's line/column
+ * order or the original's source/line/column order, respectively. Defaults to
+ * `SourceMapConsumer.GENERATED_ORDER`.
+ */
+ SourceMapConsumer.prototype.eachMapping =
+ function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
+ var context = aContext || null;
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
+
+ var mappings;
+ switch (order) {
+ case SourceMapConsumer.GENERATED_ORDER:
+ mappings = this._generatedMappings;
+ break;
+ case SourceMapConsumer.ORIGINAL_ORDER:
+ mappings = this._originalMappings;
+ break;
+ default:
+ throw new Error("Unknown order of iteration.");
+ }
+
+ var sourceRoot = this.sourceRoot;
+ mappings.map(function (mapping) {
+ var source = mapping.source;
+ if (source != null && sourceRoot != null) {
+ source = util.join(sourceRoot, source);
+ }
+ return {
+ source: source,
+ generatedLine: mapping.generatedLine,
+ generatedColumn: mapping.generatedColumn,
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: mapping.name
+ };
+ }).forEach(aCallback, context);
+ };
+
+ /**
+ * Returns all generated line and column information for the original source,
+ * line, and column provided. If no column is provided, returns all mappings
+ * corresponding to a single line. Otherwise, returns all mappings
+ * corresponding to a single line and column.
+ *
+ * The only argument is an object with the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: Optional. the column number in the original source.
+ *
+ * and an array of objects is returned, each with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ SourceMapConsumer.prototype.allGeneratedPositionsFor =
+ function SourceMapConsumer_allGeneratedPositionsFor(aArgs) {
+ // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping
+ // returns the index of the closest mapping less than the needle. By
+ // setting needle.originalColumn to 0, we thus find the last mapping for
+ // the given line, provided such a mapping exists.
+ var needle = {
+ source: util.getArg(aArgs, 'source'),
+ originalLine: util.getArg(aArgs, 'line'),
+ originalColumn: util.getArg(aArgs, 'column', 0)
+ };
+
+ if (this.sourceRoot != null) {
+ needle.source = util.relative(this.sourceRoot, needle.source);
+ }
+
+ var mappings = [];
+
+ var index = this._findMapping(needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ binarySearch.LEAST_UPPER_BOUND);
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+ var originalLine = mapping.originalLine;
+ var originalColumn = mapping.originalColumn;
+
+ // Iterate until either we run out of mappings, or we run into
+ // a mapping for a different line. Since mappings are sorted, this is
+ // guaranteed to find all mappings for the line we are searching for.
+ while (mapping && mapping.originalLine === originalLine &&
+ (aArgs.column === undefined ||
+ mapping.originalColumn === originalColumn)) {
+ mappings.push({
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ });
+
+ mapping = this._originalMappings[++index];
+ }
+ }
+
+ return mappings;
+ };
+
+ exports.SourceMapConsumer = SourceMapConsumer;
+
+ /**
+ * A BasicSourceMapConsumer instance represents a parsed source map which we can
+ * query for information about the original file positions by giving it a file
+ * position in the generated source.
+ *
+ * The only parameter is the raw source map (either as a JSON string, or
+ * already parsed to an object). According to the spec, source maps have the
+ * following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - sources: An array of URLs to the original source files.
+ * - names: An array of identifiers which can be referrenced by individual mappings.
+ * - sourceRoot: Optional. The URL root from which all sources are relative.
+ * - sourcesContent: Optional. An array of contents of the original source files.
+ * - mappings: A string of base64 VLQs which contain the actual mappings.
+ * - file: Optional. The generated file this source map is associated with.
+ *
+ * Here is an example source map, taken from the source map spec[0]:
+ *
+ * {
+ * version : 3,
+ * file: "out.js",
+ * sourceRoot : "",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AA,AB;;ABCDE;"
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
+ */
+ function BasicSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sources = util.getArg(sourceMap, 'sources');
+ // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which
+ // requires the array) to play nice here.
+ var names = util.getArg(sourceMap, 'names', []);
+ var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
+ var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
+ var mappings = util.getArg(sourceMap, 'mappings');
+ var file = util.getArg(sourceMap, 'file', null);
+
+ // Once again, Sass deviates from the spec and supplies the version as a
+ // string rather than a number, so we use loose equality checking here.
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ // Some source maps produce relative source paths like "./foo.js" instead of
+ // "foo.js". Normalize these first so that future comparisons will succeed.
+ // See bugzil.la/1090768.
+ sources = sources.map(util.normalize);
+
+ // Pass `true` below to allow duplicate names and sources. While source maps
+ // are intended to be compressed and deduplicated, the TypeScript compiler
+ // sometimes generates source maps with duplicates in them. See Github issue
+ // #72 and bugzil.la/889492.
+ this._names = ArraySet.fromArray(names, true);
+ this._sources = ArraySet.fromArray(sources, true);
+
+ this.sourceRoot = sourceRoot;
+ this.sourcesContent = sourcesContent;
+ this._mappings = mappings;
+ this.file = file;
+ }
+
+ BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+ BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer;
+
+ /**
+ * Create a BasicSourceMapConsumer from a SourceMapGenerator.
+ *
+ * @param SourceMapGenerator aSourceMap
+ * The source map that will be consumed.
+ * @returns BasicSourceMapConsumer
+ */
+ BasicSourceMapConsumer.fromSourceMap =
+ function SourceMapConsumer_fromSourceMap(aSourceMap) {
+ var smc = Object.create(BasicSourceMapConsumer.prototype);
+
+ smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true);
+ smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true);
+ smc.sourceRoot = aSourceMap._sourceRoot;
+ smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(),
+ smc.sourceRoot);
+ smc.file = aSourceMap._file;
+
+ smc.__generatedMappings = aSourceMap._mappings.toArray().slice();
+ smc.__originalMappings = aSourceMap._mappings.toArray().slice()
+ .sort(util.compareByOriginalPositions);
+
+ return smc;
+ };
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ BasicSourceMapConsumer.prototype._version = 3;
+
+ /**
+ * The list of original sources.
+ */
+ Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ return this._sources.toArray().map(function (s) {
+ return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s;
+ }, this);
+ }
+ });
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ BasicSourceMapConsumer.prototype._parseMappings =
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ var generatedLine = 1;
+ var previousGeneratedColumn = 0;
+ var previousOriginalLine = 0;
+ var previousOriginalColumn = 0;
+ var previousSource = 0;
+ var previousName = 0;
+ var length = aStr.length;
+ var index = 0;
+ var cachedValues = {};
+ var temp = {};
+ var mapping, str, values, end, value;
+
+ while (index < length) {
+ if (aStr.charAt(index) === ';') {
+ generatedLine++;
+ ++index;
+ previousGeneratedColumn = 0;
+ }
+ else if (aStr.charAt(index) === ',') {
+ ++index;
+ }
+ else {
+ mapping = {};
+ mapping.generatedLine = generatedLine;
+
+ // Because each offset is encoded relative to the previous one,
+ // many segments often have the same encoding. We can exploit this
+ // fact by caching the parsed variable length fields of each segment,
+ // allowing us to avoid a second parse if we encounter the same
+ // segment again.
+ for (end = index; end < length; ++end) {
+ if (this._nextCharIsMappingSeparator(aStr, end)) {
+ break;
+ }
+ }
+ str = aStr.slice(index, end);
+
+ values = cachedValues[str];
+ if (values) {
+ index += str.length;
+ } else {
+ values = [];
+ while (index < end) {
+ base64VLQ.decode(aStr, index, temp);
+ value = temp.value;
+ index = temp.rest;
+ values.push(value);
+ }
+ cachedValues[str] = values;
+ }
+
+ // Generated column.
+ mapping.generatedColumn = previousGeneratedColumn + values[0];
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (values.length > 1) {
+ // Original source.
+ mapping.source = this._sources.at(previousSource + values[1]);
+ previousSource += values[1];
+ if (values.length === 2) {
+ throw new Error('Found a source, but no line and column');
+ }
+
+ // Original line.
+ mapping.originalLine = previousOriginalLine + values[2];
+ previousOriginalLine = mapping.originalLine;
+ // Lines are stored 0-based
+ mapping.originalLine += 1;
+ if (values.length === 3) {
+ throw new Error('Found a source and line, but no column');
+ }
+
+ // Original column.
+ mapping.originalColumn = previousOriginalColumn + values[3];
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (values.length > 4) {
+ // Original name.
+ mapping.name = this._names.at(previousName + values[4]);
+ previousName += values[4];
+ }
+ }
+
+ this.__generatedMappings.push(mapping);
+ if (typeof mapping.originalLine === 'number') {
+ this.__originalMappings.push(mapping);
+ }
+ }
+ }
+
+ this.__generatedMappings.sort(util.compareByGeneratedPositions);
+ this.__originalMappings.sort(util.compareByOriginalPositions);
+ };
+
+ /**
+ * Find the mapping that best matches the hypothetical "needle" mapping that
+ * we are searching for in the given "haystack" of mappings.
+ */
+ BasicSourceMapConsumer.prototype._findMapping =
+ function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
+ aColumnName, aComparator, aBias) {
+ // To return the position we are searching for, we must first find the
+ // mapping for the given position and then return the opposite position it
+ // points to. Because the mappings are sorted, we can use binary search to
+ // find the best mapping.
+
+ if (aNeedle[aLineName] <= 0) {
+ throw new TypeError('Line must be greater than or equal to 1, got '
+ + aNeedle[aLineName]);
+ }
+ if (aNeedle[aColumnName] < 0) {
+ throw new TypeError('Column must be greater than or equal to 0, got '
+ + aNeedle[aColumnName]);
+ }
+
+ return binarySearch.search(aNeedle, aMappings, aComparator, aBias);
+ };
+
+ /**
+ * Compute the last column for each generated mapping. The last column is
+ * inclusive.
+ */
+ BasicSourceMapConsumer.prototype.computeColumnSpans =
+ function SourceMapConsumer_computeColumnSpans() {
+ for (var index = 0; index < this._generatedMappings.length; ++index) {
+ var mapping = this._generatedMappings[index];
+
+ // Mappings do not contain a field for the last generated columnt. We
+ // can come up with an optimistic estimate, however, by assuming that
+ // mappings are contiguous (i.e. given two consecutive mappings, the
+ // first mapping ends where the second one starts).
+ if (index + 1 < this._generatedMappings.length) {
+ var nextMapping = this._generatedMappings[index + 1];
+
+ if (mapping.generatedLine === nextMapping.generatedLine) {
+ mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1;
+ continue;
+ }
+ }
+
+ // The last mapping for each line spans the entire line.
+ mapping.lastGeneratedColumn = Infinity;
+ }
+ };
+
+ /**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+ BasicSourceMapConsumer.prototype.originalPositionFor =
+ function SourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ var index = this._findMapping(
+ needle,
+ this._generatedMappings,
+ "generatedLine",
+ "generatedColumn",
+ util.compareByGeneratedPositions,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._generatedMappings[index];
+
+ if (mapping.generatedLine === needle.generatedLine) {
+ var source = util.getArg(mapping, 'source', null);
+ if (source != null && this.sourceRoot != null) {
+ source = util.join(this.sourceRoot, source);
+ }
+ return {
+ source: source,
+ line: util.getArg(mapping, 'originalLine', null),
+ column: util.getArg(mapping, 'originalColumn', null),
+ name: util.getArg(mapping, 'name', null)
+ };
+ }
+ }
+
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ };
+
+ /**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * availible.
+ */
+ BasicSourceMapConsumer.prototype.sourceContentFor =
+ function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ if (!this.sourcesContent) {
+ return null;
+ }
+
+ if (this.sourceRoot != null) {
+ aSource = util.relative(this.sourceRoot, aSource);
+ }
+
+ if (this._sources.has(aSource)) {
+ return this.sourcesContent[this._sources.indexOf(aSource)];
+ }
+
+ var url;
+ if (this.sourceRoot != null
+ && (url = util.urlParse(this.sourceRoot))) {
+ // XXX: file:// URIs and absolute paths lead to unexpected behavior for
+ // many users. We can help them out when they expect file:// URIs to
+ // behave like it would if they were running a local HTTP server. See
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
+ var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
+ if (url.scheme == "file"
+ && this._sources.has(fileUriAbsPath)) {
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
+ }
+
+ if ((!url.path || url.path == "/")
+ && this._sources.has("/" + aSource)) {
+ return this.sourcesContent[this._sources.indexOf("/" + aSource)];
+ }
+ }
+
+ // This function is used recursively from
+ // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we
+ // don't want to throw if we can't find the source - we just want to
+ // return null, so we provide a flag to exit gracefully.
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+ /**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or
+ * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the
+ * closest element that is smaller than or greater than the one we are
+ * searching for, respectively, if the exact element cannot be found.
+ * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ BasicSourceMapConsumer.prototype.generatedPositionFor =
+ function SourceMapConsumer_generatedPositionFor(aArgs) {
+ var needle = {
+ source: util.getArg(aArgs, 'source'),
+ originalLine: util.getArg(aArgs, 'line'),
+ originalColumn: util.getArg(aArgs, 'column')
+ };
+
+ if (this.sourceRoot != null) {
+ needle.source = util.relative(this.sourceRoot, needle.source);
+ }
+
+ var index = this._findMapping(
+ needle,
+ this._originalMappings,
+ "originalLine",
+ "originalColumn",
+ util.compareByOriginalPositions,
+ util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND)
+ );
+
+ if (index >= 0) {
+ var mapping = this._originalMappings[index];
+
+ if (mapping.source === needle.source) {
+ return {
+ line: util.getArg(mapping, 'generatedLine', null),
+ column: util.getArg(mapping, 'generatedColumn', null),
+ lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null)
+ };
+ }
+ }
+
+ return {
+ line: null,
+ column: null,
+ lastColumn: null
+ };
+ };
+
+ exports.BasicSourceMapConsumer = BasicSourceMapConsumer;
+
+ /**
+ * An IndexedSourceMapConsumer instance represents a parsed source map which
+ * we can query for information. It differs from BasicSourceMapConsumer in
+ * that it takes "indexed" source maps (i.e. ones with a "sections" field) as
+ * input.
+ *
+ * The only parameter is a raw source map (either as a JSON string, or already
+ * parsed to an object). According to the spec for indexed source maps, they
+ * have the following attributes:
+ *
+ * - version: Which version of the source map spec this map is following.
+ * - file: Optional. The generated file this source map is associated with.
+ * - sections: A list of section definitions.
+ *
+ * Each value under the "sections" field has two fields:
+ * - offset: The offset into the original specified at which this section
+ * begins to apply, defined as an object with a "line" and "column"
+ * field.
+ * - map: A source map definition. This source map could also be indexed,
+ * but doesn't have to be.
+ *
+ * Instead of the "map" field, it's also possible to have a "url" field
+ * specifying a URL to retrieve a source map from, but that's currently
+ * unsupported.
+ *
+ * Here's an example source map, taken from the source map spec[0], but
+ * modified to omit a section which uses the "url" field.
+ *
+ * {
+ * version : 3,
+ * file: "app.js",
+ * sections: [{
+ * offset: {line:100, column:10},
+ * map: {
+ * version : 3,
+ * file: "section.js",
+ * sources: ["foo.js", "bar.js"],
+ * names: ["src", "maps", "are", "fun"],
+ * mappings: "AAAA,E;;ABCDE;"
+ * }
+ * }],
+ * }
+ *
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt
+ */
+ function IndexedSourceMapConsumer(aSourceMap) {
+ var sourceMap = aSourceMap;
+ if (typeof aSourceMap === 'string') {
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
+ }
+
+ var version = util.getArg(sourceMap, 'version');
+ var sections = util.getArg(sourceMap, 'sections');
+
+ if (version != this._version) {
+ throw new Error('Unsupported version: ' + version);
+ }
+
+ var lastOffset = {
+ line: -1,
+ column: 0
+ };
+ this._sections = sections.map(function (s) {
+ if (s.url) {
+ // The url field will require support for asynchronicity.
+ // See https://github.com/mozilla/source-map/issues/16
+ throw new Error('Support for url field in sections not implemented.');
+ }
+ var offset = util.getArg(s, 'offset');
+ var offsetLine = util.getArg(offset, 'line');
+ var offsetColumn = util.getArg(offset, 'column');
+
+ if (offsetLine < lastOffset.line ||
+ (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) {
+ throw new Error('Section offsets must be ordered and non-overlapping.');
+ }
+ lastOffset = offset;
+
+ return {
+ generatedOffset: {
+ // The offset fields are 0-based, but we use 1-based indices when
+ // encoding/decoding from VLQ.
+ generatedLine: offsetLine + 1,
+ generatedColumn: offsetColumn + 1
+ },
+ consumer: new SourceMapConsumer(util.getArg(s, 'map'))
+ }
+ });
+ }
+
+ IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype);
+ IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer;
+
+ /**
+ * The version of the source mapping spec that we are consuming.
+ */
+ IndexedSourceMapConsumer.prototype._version = 3;
+
+ /**
+ * The list of original sources.
+ */
+ Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', {
+ get: function () {
+ var sources = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ for (var j = 0; j < this._sections[i].consumer.sources.length; j++) {
+ sources.push(this._sections[i].consumer.sources[j]);
+ }
+ };
+ return sources;
+ }
+ });
+
+ /**
+ * Returns the original source, line, and column information for the generated
+ * source's line and column positions provided. The only argument is an object
+ * with the following properties:
+ *
+ * - line: The line number in the generated source.
+ * - column: The column number in the generated source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - source: The original source file, or null.
+ * - line: The line number in the original source, or null.
+ * - column: The column number in the original source, or null.
+ * - name: The original identifier, or null.
+ */
+ IndexedSourceMapConsumer.prototype.originalPositionFor =
+ function IndexedSourceMapConsumer_originalPositionFor(aArgs) {
+ var needle = {
+ generatedLine: util.getArg(aArgs, 'line'),
+ generatedColumn: util.getArg(aArgs, 'column')
+ };
+
+ // Find the section containing the generated position we're trying to map
+ // to an original position.
+ var sectionIndex = binarySearch.search(needle, this._sections,
+ function(needle, section) {
+ var cmp = needle.generatedLine - section.generatedOffset.generatedLine;
+ if (cmp) {
+ return cmp;
+ }
+
+ return (needle.generatedColumn -
+ section.generatedOffset.generatedColumn);
+ });
+ var section = this._sections[sectionIndex];
+
+ if (!section) {
+ return {
+ source: null,
+ line: null,
+ column: null,
+ name: null
+ };
+ }
+
+ return section.consumer.originalPositionFor({
+ line: needle.generatedLine -
+ (section.generatedOffset.generatedLine - 1),
+ column: needle.generatedColumn -
+ (section.generatedOffset.generatedLine === needle.generatedLine
+ ? section.generatedOffset.generatedColumn - 1
+ : 0),
+ bias: aArgs.bias
+ });
+ };
+
+ /**
+ * Returns the original source content. The only argument is the url of the
+ * original source file. Returns null if no original source content is
+ * available.
+ */
+ IndexedSourceMapConsumer.prototype.sourceContentFor =
+ function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ var content = section.consumer.sourceContentFor(aSource, true);
+ if (content) {
+ return content;
+ }
+ }
+ if (nullOnMissing) {
+ return null;
+ }
+ else {
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
+ }
+ };
+
+ /**
+ * Returns the generated line and column information for the original source,
+ * line, and column positions provided. The only argument is an object with
+ * the following properties:
+ *
+ * - source: The filename of the original source.
+ * - line: The line number in the original source.
+ * - column: The column number in the original source.
+ *
+ * and an object is returned with the following properties:
+ *
+ * - line: The line number in the generated source, or null.
+ * - column: The column number in the generated source, or null.
+ */
+ IndexedSourceMapConsumer.prototype.generatedPositionFor =
+ function IndexedSourceMapConsumer_generatedPositionFor(aArgs) {
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+
+ // Only consider this section if the requested source is in the list of
+ // sources of the consumer.
+ if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) {
+ continue;
+ }
+ var generatedPosition = section.consumer.generatedPositionFor(aArgs);
+ if (generatedPosition) {
+ var ret = {
+ line: generatedPosition.line +
+ (section.generatedOffset.generatedLine - 1),
+ column: generatedPosition.column +
+ (section.generatedOffset.generatedLine === generatedPosition.line
+ ? section.generatedOffset.generatedColumn - 1
+ : 0)
+ };
+ return ret;
+ }
+ }
+
+ return {
+ line: null,
+ column: null
+ };
+ };
+
+ /**
+ * Parse the mappings in a string in to a data structure which we can easily
+ * query (the ordered arrays in the `this.__generatedMappings` and
+ * `this.__originalMappings` properties).
+ */
+ IndexedSourceMapConsumer.prototype._parseMappings =
+ function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) {
+ this.__generatedMappings = [];
+ this.__originalMappings = [];
+ for (var i = 0; i < this._sections.length; i++) {
+ var section = this._sections[i];
+ var sectionMappings = section.consumer._generatedMappings;
+ for (var j = 0; j < sectionMappings.length; j++) {
+ var mapping = sectionMappings[i];
+
+ var source = mapping.source;
+ var sourceRoot = section.consumer.sourceRoot;
+
+ if (source != null && sourceRoot != null) {
+ source = util.join(sourceRoot, source);
+ }
+
+ // The mappings coming from the consumer for the section have
+ // generated positions relative to the start of the section, so we
+ // need to offset them to be relative to the start of the concatenated
+ // generated file.
+ var adjustedMapping = {
+ source: source,
+ generatedLine: mapping.generatedLine +
+ (section.generatedOffset.generatedLine - 1),
+ generatedColumn: mapping.column +
+ (section.generatedOffset.generatedLine === mapping.generatedLine)
+ ? section.generatedOffset.generatedColumn - 1
+ : 0,
+ originalLine: mapping.originalLine,
+ originalColumn: mapping.originalColumn,
+ name: mapping.name
+ };
+
+ this.__generatedMappings.push(adjustedMapping);
+ if (typeof adjustedMapping.originalLine === 'number') {
+ this.__originalMappings.push(adjustedMapping);
+ }
+ };
+ };
+
+ this.__generatedMappings.sort(util.compareByGeneratedPositions);
+ this.__originalMappings.sort(util.compareByOriginalPositions);
+ };
+
+ exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
+
+});
+
+},{"./array-set":531,"./base64-vlq":532,"./binary-search":534,"./util":539,"amdefine":540}],537:[function(require,module,exports){
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+if (typeof define !== 'function') {
+ var define = require('amdefine')(module, require);
+}
+define(function (require, exports, module) {
+
+ var base64VLQ = require('./base64-vlq');
+ var util = require('./util');
+ var ArraySet = require('./array-set').ArraySet;
+ var MappingList = require('./mapping-list').MappingList;
+
+ /**
+ * An instance of the SourceMapGenerator represents a source map which is
+ * being built incrementally. You may pass an object with the following
+ * properties:
+ *
+ * - file: The filename of the generated source.
+ * - sourceRoot: A root for all relative URLs in this source map.
+ */
+ function SourceMapGenerator(aArgs) {
+ if (!aArgs) {
+ aArgs = {};
+ }
+ this._file = util.getArg(aArgs, 'file', null);
+ this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
+ this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
+ this._sources = new ArraySet();
+ this._names = new ArraySet();
+ this._mappings = new MappingList();
+ this._sourcesContents = null;
+ }
+
+ SourceMapGenerator.prototype._version = 3;
+
+ /**
+ * Creates a new SourceMapGenerator based on a SourceMapConsumer
+ *
+ * @param aSourceMapConsumer The SourceMap.
+ */
+ SourceMapGenerator.fromSourceMap =
+ function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
+ var generator = new SourceMapGenerator({
+ file: aSourceMapConsumer.file,
+ sourceRoot: sourceRoot
+ });
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ var newMapping = {
+ generated: {
+ line: mapping.generatedLine,
+ column: mapping.generatedColumn
+ }
+ };
+
+ if (mapping.source != null) {
+ newMapping.source = mapping.source;
+ if (sourceRoot != null) {
+ newMapping.source = util.relative(sourceRoot, newMapping.source);
+ }
+
+ newMapping.original = {
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ };
+
+ if (mapping.name != null) {
+ newMapping.name = mapping.name;
+ }
+ }
+
+ generator.addMapping(newMapping);
+ });
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ generator.setSourceContent(sourceFile, content);
+ }
+ });
+ return generator;
+ };
+
+ /**
+ * Add a single mapping from original source line and column to the generated
+ * source's line and column for this source map being created. The mapping
+ * object should have the following properties:
+ *
+ * - generated: An object with the generated line and column positions.
+ * - original: An object with the original line and column positions.
+ * - source: The original source file (relative to the sourceRoot).
+ * - name: An optional original token name for this mapping.
+ */
+ SourceMapGenerator.prototype.addMapping =
+ function SourceMapGenerator_addMapping(aArgs) {
+ var generated = util.getArg(aArgs, 'generated');
+ var original = util.getArg(aArgs, 'original', null);
+ var source = util.getArg(aArgs, 'source', null);
+ var name = util.getArg(aArgs, 'name', null);
+
+ if (!this._skipValidation) {
+ this._validateMapping(generated, original, source, name);
+ }
+
+ if (source != null && !this._sources.has(source)) {
+ this._sources.add(source);
+ }
+
+ if (name != null && !this._names.has(name)) {
+ this._names.add(name);
+ }
+
+ this._mappings.add({
+ generatedLine: generated.line,
+ generatedColumn: generated.column,
+ originalLine: original != null && original.line,
+ originalColumn: original != null && original.column,
+ source: source,
+ name: name
+ });
+ };
+
+ /**
+ * Set the source content for a source file.
+ */
+ SourceMapGenerator.prototype.setSourceContent =
+ function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
+ var source = aSourceFile;
+ if (this._sourceRoot != null) {
+ source = util.relative(this._sourceRoot, source);
+ }
+
+ if (aSourceContent != null) {
+ // Add the source content to the _sourcesContents map.
+ // Create a new _sourcesContents map if the property is null.
+ if (!this._sourcesContents) {
+ this._sourcesContents = {};
+ }
+ this._sourcesContents[util.toSetString(source)] = aSourceContent;
+ } else if (this._sourcesContents) {
+ // Remove the source file from the _sourcesContents map.
+ // If the _sourcesContents map is empty, set the property to null.
+ delete this._sourcesContents[util.toSetString(source)];
+ if (Object.keys(this._sourcesContents).length === 0) {
+ this._sourcesContents = null;
+ }
+ }
+ };
+
+ /**
+ * Applies the mappings of a sub-source-map for a specific source file to the
+ * source map being generated. Each mapping to the supplied source file is
+ * rewritten using the supplied source map. Note: The resolution for the
+ * resulting mappings is the minimium of this map and the supplied map.
+ *
+ * @param aSourceMapConsumer The source map to be applied.
+ * @param aSourceFile Optional. The filename of the source file.
+ * If omitted, SourceMapConsumer's file property will be used.
+ * @param aSourceMapPath Optional. The dirname of the path to the source map
+ * to be applied. If relative, it is relative to the SourceMapConsumer.
+ * This parameter is needed when the two source maps aren't in the same
+ * directory, and the source map to be applied contains relative source
+ * paths. If so, those relative source paths need to be rewritten
+ * relative to the SourceMapGenerator.
+ */
+ SourceMapGenerator.prototype.applySourceMap =
+ function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
+ var sourceFile = aSourceFile;
+ // If aSourceFile is omitted, we will use the file property of the SourceMap
+ if (aSourceFile == null) {
+ if (aSourceMapConsumer.file == null) {
+ throw new Error(
+ 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
+ 'or the source map\'s "file" property. Both were omitted.'
+ );
+ }
+ sourceFile = aSourceMapConsumer.file;
+ }
+ var sourceRoot = this._sourceRoot;
+ // Make "sourceFile" relative if an absolute Url is passed.
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ // Applying the SourceMap can add and remove items from the sources and
+ // the names array.
+ var newSources = new ArraySet();
+ var newNames = new ArraySet();
+
+ // Find mappings for the "sourceFile"
+ this._mappings.unsortedForEach(function (mapping) {
+ if (mapping.source === sourceFile && mapping.originalLine != null) {
+ // Check if it can be mapped by the source map, then update the mapping.
+ var original = aSourceMapConsumer.originalPositionFor({
+ line: mapping.originalLine,
+ column: mapping.originalColumn
+ });
+ if (original.source != null) {
+ // Copy mapping
+ mapping.source = original.source;
+ if (aSourceMapPath != null) {
+ mapping.source = util.join(aSourceMapPath, mapping.source)
+ }
+ if (sourceRoot != null) {
+ mapping.source = util.relative(sourceRoot, mapping.source);
+ }
+ mapping.originalLine = original.line;
+ mapping.originalColumn = original.column;
+ if (original.name != null) {
+ mapping.name = original.name;
+ }
+ }
+ }
+
+ var source = mapping.source;
+ if (source != null && !newSources.has(source)) {
+ newSources.add(source);
+ }
+
+ var name = mapping.name;
+ if (name != null && !newNames.has(name)) {
+ newNames.add(name);
+ }
+
+ }, this);
+ this._sources = newSources;
+ this._names = newNames;
+
+ // Copy sourcesContents of applied map.
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aSourceMapPath != null) {
+ sourceFile = util.join(aSourceMapPath, sourceFile);
+ }
+ if (sourceRoot != null) {
+ sourceFile = util.relative(sourceRoot, sourceFile);
+ }
+ this.setSourceContent(sourceFile, content);
+ }
+ }, this);
+ };
+
+ /**
+ * A mapping can have one of the three levels of data:
+ *
+ * 1. Just the generated position.
+ * 2. The Generated position, original position, and original source.
+ * 3. Generated and original position, original source, as well as a name
+ * token.
+ *
+ * To maintain consistency, we validate that any new mapping being added falls
+ * in to one of these categories.
+ */
+ SourceMapGenerator.prototype._validateMapping =
+ function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
+ aName) {
+ if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && !aOriginal && !aSource && !aName) {
+ // Case 1.
+ return;
+ }
+ else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
+ && aOriginal && 'line' in aOriginal && 'column' in aOriginal
+ && aGenerated.line > 0 && aGenerated.column >= 0
+ && aOriginal.line > 0 && aOriginal.column >= 0
+ && aSource) {
+ // Cases 2 and 3.
+ return;
+ }
+ else {
+ throw new Error('Invalid mapping: ' + JSON.stringify({
+ generated: aGenerated,
+ source: aSource,
+ original: aOriginal,
+ name: aName
+ }));
+ }
+ };
+
+ /**
+ * Serialize the accumulated mappings in to the stream of base 64 VLQs
+ * specified by the source map format.
+ */
+ SourceMapGenerator.prototype._serializeMappings =
+ function SourceMapGenerator_serializeMappings() {
+ var previousGeneratedColumn = 0;
+ var previousGeneratedLine = 1;
+ var previousOriginalColumn = 0;
+ var previousOriginalLine = 0;
+ var previousName = 0;
+ var previousSource = 0;
+ var result = '';
+ var mapping;
+
+ var mappings = this._mappings.toArray();
+
+ for (var i = 0, len = mappings.length; i < len; i++) {
+ mapping = mappings[i];
+
+ if (mapping.generatedLine !== previousGeneratedLine) {
+ previousGeneratedColumn = 0;
+ while (mapping.generatedLine !== previousGeneratedLine) {
+ result += ';';
+ previousGeneratedLine++;
+ }
+ }
+ else {
+ if (i > 0) {
+ if (!util.compareByGeneratedPositions(mapping, mappings[i - 1])) {
+ continue;
+ }
+ result += ',';
+ }
+ }
+
+ result += base64VLQ.encode(mapping.generatedColumn
+ - previousGeneratedColumn);
+ previousGeneratedColumn = mapping.generatedColumn;
+
+ if (mapping.source != null) {
+ result += base64VLQ.encode(this._sources.indexOf(mapping.source)
+ - previousSource);
+ previousSource = this._sources.indexOf(mapping.source);
+
+ // lines are stored 0-based in SourceMap spec version 3
+ result += base64VLQ.encode(mapping.originalLine - 1
+ - previousOriginalLine);
+ previousOriginalLine = mapping.originalLine - 1;
+
+ result += base64VLQ.encode(mapping.originalColumn
+ - previousOriginalColumn);
+ previousOriginalColumn = mapping.originalColumn;
+
+ if (mapping.name != null) {
+ result += base64VLQ.encode(this._names.indexOf(mapping.name)
+ - previousName);
+ previousName = this._names.indexOf(mapping.name);
+ }
+ }
+ }
+
+ return result;
+ };
+
+ SourceMapGenerator.prototype._generateSourcesContent =
+ function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
+ return aSources.map(function (source) {
+ if (!this._sourcesContents) {
+ return null;
+ }
+ if (aSourceRoot != null) {
+ source = util.relative(aSourceRoot, source);
+ }
+ var key = util.toSetString(source);
+ return Object.prototype.hasOwnProperty.call(this._sourcesContents,
+ key)
+ ? this._sourcesContents[key]
+ : null;
+ }, this);
+ };
+
+ /**
+ * Externalize the source map.
+ */
+ SourceMapGenerator.prototype.toJSON =
+ function SourceMapGenerator_toJSON() {
+ var map = {
+ version: this._version,
+ sources: this._sources.toArray(),
+ names: this._names.toArray(),
+ mappings: this._serializeMappings()
+ };
+ if (this._file != null) {
+ map.file = this._file;
+ }
+ if (this._sourceRoot != null) {
+ map.sourceRoot = this._sourceRoot;
+ }
+ if (this._sourcesContents) {
+ map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
+ }
+
+ return map;
+ };
+
+ /**
+ * Render the source map being generated to a string.
+ */
+ SourceMapGenerator.prototype.toString =
+ function SourceMapGenerator_toString() {
+ return JSON.stringify(this.toJSON());
+ };
+
+ exports.SourceMapGenerator = SourceMapGenerator;
+
+});
+
+},{"./array-set":531,"./base64-vlq":532,"./mapping-list":535,"./util":539,"amdefine":540}],538:[function(require,module,exports){
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+if (typeof define !== 'function') {
+ var define = require('amdefine')(module, require);
+}
+define(function (require, exports, module) {
+
+ var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;
+ var util = require('./util');
+
+ // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
+ // operating systems these days (capturing the result).
+ var REGEX_NEWLINE = /(\r?\n)/;
+
+ // Newline character code for charCodeAt() comparisons
+ var NEWLINE_CODE = 10;
+
+ // Private symbol for identifying `SourceNode`s when multiple versions of
+ // the source-map library are loaded. This MUST NOT CHANGE across
+ // versions!
+ var isSourceNode = "$$$isSourceNode$$$";
+
+ /**
+ * SourceNodes provide a way to abstract over interpolating/concatenating
+ * snippets of generated JavaScript source code while maintaining the line and
+ * column information associated with the original source code.
+ *
+ * @param aLine The original line number.
+ * @param aColumn The original column number.
+ * @param aSource The original source's filename.
+ * @param aChunks Optional. An array of strings which are snippets of
+ * generated JS, or other SourceNodes.
+ * @param aName The original identifier.
+ */
+ function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
+ this.children = [];
+ this.sourceContents = {};
+ this.line = aLine == null ? null : aLine;
+ this.column = aColumn == null ? null : aColumn;
+ this.source = aSource == null ? null : aSource;
+ this.name = aName == null ? null : aName;
+ this[isSourceNode] = true;
+ if (aChunks != null) this.add(aChunks);
+ }
+
+ /**
+ * Creates a SourceNode from generated code and a SourceMapConsumer.
+ *
+ * @param aGeneratedCode The generated code
+ * @param aSourceMapConsumer The SourceMap for the generated code
+ * @param aRelativePath Optional. The path that relative sources in the
+ * SourceMapConsumer should be relative to.
+ */
+ SourceNode.fromStringWithSourceMap =
+ function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) {
+ // The SourceNode we want to fill with the generated code
+ // and the SourceMap
+ var node = new SourceNode();
+
+ // All even indices of this array are one line of the generated code,
+ // while all odd indices are the newlines between two adjacent lines
+ // (since `REGEX_NEWLINE` captures its match).
+ // Processed fragments are removed from this array, by calling `shiftNextLine`.
+ var remainingLines = aGeneratedCode.split(REGEX_NEWLINE);
+ var shiftNextLine = function() {
+ var lineContents = remainingLines.shift();
+ // The last line of a file might not have a newline.
+ var newLine = remainingLines.shift() || "";
+ return lineContents + newLine;
+ };
+
+ // We need to remember the position of "remainingLines"
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
+
+ // The generate SourceNodes we need a code range.
+ // To extract it current and last mapping is used.
+ // Here we store the last mapping.
+ var lastMapping = null;
+
+ aSourceMapConsumer.eachMapping(function (mapping) {
+ if (lastMapping !== null) {
+ // We add the code from "lastMapping" to "mapping":
+ // First check if there is a new line in between.
+ if (lastGeneratedLine < mapping.generatedLine) {
+ var code = "";
+ // Associate first line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ lastGeneratedLine++;
+ lastGeneratedColumn = 0;
+ // The remaining code is added without mapping
+ } else {
+ // There is no new line in between.
+ // Associate the code between "lastGeneratedColumn" and
+ // "mapping.generatedColumn" with "lastMapping"
+ var nextLine = remainingLines[0];
+ var code = nextLine.substr(0, mapping.generatedColumn -
+ lastGeneratedColumn);
+ remainingLines[0] = nextLine.substr(mapping.generatedColumn -
+ lastGeneratedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ addMappingWithCode(lastMapping, code);
+ // No more remaining code, continue
+ lastMapping = mapping;
+ return;
+ }
+ }
+ // We add the generated code until the first mapping
+ // to the SourceNode without any mapping.
+ // Each line is added as separate string.
+ while (lastGeneratedLine < mapping.generatedLine) {
+ node.add(shiftNextLine());
+ lastGeneratedLine++;
+ }
+ if (lastGeneratedColumn < mapping.generatedColumn) {
+ var nextLine = remainingLines[0];
+ node.add(nextLine.substr(0, mapping.generatedColumn));
+ remainingLines[0] = nextLine.substr(mapping.generatedColumn);
+ lastGeneratedColumn = mapping.generatedColumn;
+ }
+ lastMapping = mapping;
+ }, this);
+ // We have processed all mappings.
+ if (remainingLines.length > 0) {
+ if (lastMapping) {
+ // Associate the remaining code in the current line with "lastMapping"
+ addMappingWithCode(lastMapping, shiftNextLine());
+ }
+ // and add the remaining lines without any mapping
+ node.add(remainingLines.join(""));
+ }
+
+ // Copy sourcesContent into SourceNode
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
+ if (content != null) {
+ if (aRelativePath != null) {
+ sourceFile = util.join(aRelativePath, sourceFile);
+ }
+ node.setSourceContent(sourceFile, content);
+ }
+ });
+
+ return node;
+
+ function addMappingWithCode(mapping, code) {
+ if (mapping === null || mapping.source === undefined) {
+ node.add(code);
+ } else {
+ var source = aRelativePath
+ ? util.join(aRelativePath, mapping.source)
+ : mapping.source;
+ node.add(new SourceNode(mapping.originalLine,
+ mapping.originalColumn,
+ source,
+ code,
+ mapping.name));
+ }
+ }
+ };
+
+ /**
+ * Add a chunk of generated JS to this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+ SourceNode.prototype.add = function SourceNode_add(aChunk) {
+ if (Array.isArray(aChunk)) {
+ aChunk.forEach(function (chunk) {
+ this.add(chunk);
+ }, this);
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ if (aChunk) {
+ this.children.push(aChunk);
+ }
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+ };
+
+ /**
+ * Add a chunk of generated JS to the beginning of this source node.
+ *
+ * @param aChunk A string snippet of generated JS code, another instance of
+ * SourceNode, or an array where each member is one of those things.
+ */
+ SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
+ if (Array.isArray(aChunk)) {
+ for (var i = aChunk.length-1; i >= 0; i--) {
+ this.prepend(aChunk[i]);
+ }
+ }
+ else if (aChunk[isSourceNode] || typeof aChunk === "string") {
+ this.children.unshift(aChunk);
+ }
+ else {
+ throw new TypeError(
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
+ );
+ }
+ return this;
+ };
+
+ /**
+ * Walk over the tree of JS snippets in this node and its children. The
+ * walking function is called once for each snippet of JS and is passed that
+ * snippet and the its original associated source's line/column location.
+ *
+ * @param aFn The traversal function.
+ */
+ SourceNode.prototype.walk = function SourceNode_walk(aFn) {
+ var chunk;
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ chunk = this.children[i];
+ if (chunk[isSourceNode]) {
+ chunk.walk(aFn);
+ }
+ else {
+ if (chunk !== '') {
+ aFn(chunk, { source: this.source,
+ line: this.line,
+ column: this.column,
+ name: this.name });
+ }
+ }
+ }
+ };
+
+ /**
+ * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
+ * each of `this.children`.
+ *
+ * @param aSep The separator.
+ */
+ SourceNode.prototype.join = function SourceNode_join(aSep) {
+ var newChildren;
+ var i;
+ var len = this.children.length;
+ if (len > 0) {
+ newChildren = [];
+ for (i = 0; i < len-1; i++) {
+ newChildren.push(this.children[i]);
+ newChildren.push(aSep);
+ }
+ newChildren.push(this.children[i]);
+ this.children = newChildren;
+ }
+ return this;
+ };
+
+ /**
+ * Call String.prototype.replace on the very right-most source snippet. Useful
+ * for trimming whitespace from the end of a source node, etc.
+ *
+ * @param aPattern The pattern to replace.
+ * @param aReplacement The thing to replace the pattern with.
+ */
+ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
+ var lastChild = this.children[this.children.length - 1];
+ if (lastChild[isSourceNode]) {
+ lastChild.replaceRight(aPattern, aReplacement);
+ }
+ else if (typeof lastChild === 'string') {
+ this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
+ }
+ else {
+ this.children.push(''.replace(aPattern, aReplacement));
+ }
+ return this;
+ };
+
+ /**
+ * Set the source content for a source file. This will be added to the SourceMapGenerator
+ * in the sourcesContent field.
+ *
+ * @param aSourceFile The filename of the source file
+ * @param aSourceContent The content of the source file
+ */
+ SourceNode.prototype.setSourceContent =
+ function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
+ };
+
+ /**
+ * Walk over the tree of SourceNodes. The walking function is called for each
+ * source file content and is passed the filename and source content.
+ *
+ * @param aFn The traversal function.
+ */
+ SourceNode.prototype.walkSourceContents =
+ function SourceNode_walkSourceContents(aFn) {
+ for (var i = 0, len = this.children.length; i < len; i++) {
+ if (this.children[i][isSourceNode]) {
+ this.children[i].walkSourceContents(aFn);
+ }
+ }
+
+ var sources = Object.keys(this.sourceContents);
+ for (var i = 0, len = sources.length; i < len; i++) {
+ aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]);
+ }
+ };
+
+ /**
+ * Return the string representation of this source node. Walks over the tree
+ * and concatenates all the various snippets together to one string.
+ */
+ SourceNode.prototype.toString = function SourceNode_toString() {
+ var str = "";
+ this.walk(function (chunk) {
+ str += chunk;
+ });
+ return str;
+ };
+
+ /**
+ * Returns the string representation of this source node along with a source
+ * map.
+ */
+ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
+ var generated = {
+ code: "",
+ line: 1,
+ column: 0
+ };
+ var map = new SourceMapGenerator(aArgs);
+ var sourceMappingActive = false;
+ var lastOriginalSource = null;
+ var lastOriginalLine = null;
+ var lastOriginalColumn = null;
+ var lastOriginalName = null;
+ this.walk(function (chunk, original) {
+ generated.code += chunk;
+ if (original.source !== null
+ && original.line !== null
+ && original.column !== null) {
+ if(lastOriginalSource !== original.source
+ || lastOriginalLine !== original.line
+ || lastOriginalColumn !== original.column
+ || lastOriginalName !== original.name) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ lastOriginalSource = original.source;
+ lastOriginalLine = original.line;
+ lastOriginalColumn = original.column;
+ lastOriginalName = original.name;
+ sourceMappingActive = true;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ generated: {
+ line: generated.line,
+ column: generated.column
+ }
+ });
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ }
+ for (var idx = 0, length = chunk.length; idx < length; idx++) {
+ if (chunk.charCodeAt(idx) === NEWLINE_CODE) {
+ generated.line++;
+ generated.column = 0;
+ // Mappings end at eol
+ if (idx + 1 === length) {
+ lastOriginalSource = null;
+ sourceMappingActive = false;
+ } else if (sourceMappingActive) {
+ map.addMapping({
+ source: original.source,
+ original: {
+ line: original.line,
+ column: original.column
+ },
+ generated: {
+ line: generated.line,
+ column: generated.column
+ },
+ name: original.name
+ });
+ }
+ } else {
+ generated.column++;
+ }
+ }
+ });
+ this.walkSourceContents(function (sourceFile, sourceContent) {
+ map.setSourceContent(sourceFile, sourceContent);
+ });
+
+ return { code: generated.code, map: map };
+ };
+
+ exports.SourceNode = SourceNode;
+
+});
+
+},{"./source-map-generator":537,"./util":539,"amdefine":540}],539:[function(require,module,exports){
+/* -*- Mode: js; js-indent-level: 2; -*- */
+/*
+ * Copyright 2011 Mozilla Foundation and contributors
+ * Licensed under the New BSD license. See LICENSE or:
+ * http://opensource.org/licenses/BSD-3-Clause
+ */
+if (typeof define !== 'function') {
+ var define = require('amdefine')(module, require);
+}
+define(function (require, exports, module) {
+
+ /**
+ * This is a helper function for getting values from parameter/options
+ * objects.
+ *
+ * @param args The object we are extracting values from
+ * @param name The name of the property we are getting.
+ * @param defaultValue An optional value to return if the property is missing
+ * from the object. If this is not specified and the property is missing, an
+ * error will be thrown.
+ */
+ function getArg(aArgs, aName, aDefaultValue) {
+ if (aName in aArgs) {
+ return aArgs[aName];
+ } else if (arguments.length === 3) {
+ return aDefaultValue;
+ } else {
+ throw new Error('"' + aName + '" is a required argument.');
+ }
+ }
+ exports.getArg = getArg;
+
+ var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/;
+ var dataUrlRegexp = /^data:.+\,.+$/;
+
+ function urlParse(aUrl) {
+ var match = aUrl.match(urlRegexp);
+ if (!match) {
+ return null;
+ }
+ return {
+ scheme: match[1],
+ auth: match[2],
+ host: match[3],
+ port: match[4],
+ path: match[5]
+ };
+ }
+ exports.urlParse = urlParse;
+
+ function urlGenerate(aParsedUrl) {
+ var url = '';
+ if (aParsedUrl.scheme) {
+ url += aParsedUrl.scheme + ':';
+ }
+ url += '//';
+ if (aParsedUrl.auth) {
+ url += aParsedUrl.auth + '@';
+ }
+ if (aParsedUrl.host) {
+ url += aParsedUrl.host;
+ }
+ if (aParsedUrl.port) {
+ url += ":" + aParsedUrl.port
+ }
+ if (aParsedUrl.path) {
+ url += aParsedUrl.path;
+ }
+ return url;
+ }
+ exports.urlGenerate = urlGenerate;
+
+ /**
+ * Normalizes a path, or the path portion of a URL:
+ *
+ * - Replaces consequtive slashes with one slash.
+ * - Removes unnecessary '.' parts.
+ * - Removes unnecessary '/..' parts.
+ *
+ * Based on code in the Node.js 'path' core module.
+ *
+ * @param aPath The path or url to normalize.
+ */
+ function normalize(aPath) {
+ var path = aPath;
+ var url = urlParse(aPath);
+ if (url) {
+ if (!url.path) {
+ return aPath;
+ }
+ path = url.path;
+ }
+ var isAbsolute = (path.charAt(0) === '/');
+
+ var parts = path.split(/\/+/);
+ for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
+ part = parts[i];
+ if (part === '.') {
+ parts.splice(i, 1);
+ } else if (part === '..') {
+ up++;
+ } else if (up > 0) {
+ if (part === '') {
+ // The first part is blank if the path is absolute. Trying to go
+ // above the root is a no-op. Therefore we can remove all '..' parts
+ // directly after the root.
+ parts.splice(i + 1, up);
+ up = 0;
+ } else {
+ parts.splice(i, 2);
+ up--;
+ }
+ }
+ }
+ path = parts.join('/');
+
+ if (path === '') {
+ path = isAbsolute ? '/' : '.';
+ }
+
+ if (url) {
+ url.path = path;
+ return urlGenerate(url);
+ }
+ return path;
+ }
+ exports.normalize = normalize;
+
+ /**
+ * Joins two paths/URLs.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be joined with the root.
+ *
+ * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
+ * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
+ * first.
+ * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
+ * is updated with the result and aRoot is returned. Otherwise the result
+ * is returned.
+ * - If aPath is absolute, the result is aPath.
+ * - Otherwise the two paths are joined with a slash.
+ * - Joining for example 'http://' and 'www.example.com' is also supported.
+ */
+ function join(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+ if (aPath === "") {
+ aPath = ".";
+ }
+ var aPathUrl = urlParse(aPath);
+ var aRootUrl = urlParse(aRoot);
+ if (aRootUrl) {
+ aRoot = aRootUrl.path || '/';
+ }
+
+ // `join(foo, '//www.example.org')`
+ if (aPathUrl && !aPathUrl.scheme) {
+ if (aRootUrl) {
+ aPathUrl.scheme = aRootUrl.scheme;
+ }
+ return urlGenerate(aPathUrl);
+ }
+
+ if (aPathUrl || aPath.match(dataUrlRegexp)) {
+ return aPath;
+ }
+
+ // `join('http://', 'www.example.com')`
+ if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
+ aRootUrl.host = aPath;
+ return urlGenerate(aRootUrl);
+ }
+
+ var joined = aPath.charAt(0) === '/'
+ ? aPath
+ : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
+
+ if (aRootUrl) {
+ aRootUrl.path = joined;
+ return urlGenerate(aRootUrl);
+ }
+ return joined;
+ }
+ exports.join = join;
+
+ /**
+ * Make a path relative to a URL or another path.
+ *
+ * @param aRoot The root path or URL.
+ * @param aPath The path or URL to be made relative to aRoot.
+ */
+ function relative(aRoot, aPath) {
+ if (aRoot === "") {
+ aRoot = ".";
+ }
+
+ aRoot = aRoot.replace(/\/$/, '');
+
+ // XXX: It is possible to remove this block, and the tests still pass!
+ var url = urlParse(aRoot);
+ if (aPath.charAt(0) == "/" && url && url.path == "/") {
+ return aPath.slice(1);
+ }
+
+ return aPath.indexOf(aRoot + '/') === 0
+ ? aPath.substr(aRoot.length + 1)
+ : aPath;
+ }
+ exports.relative = relative;
+
+ /**
+ * Because behavior goes wacky when you set `__proto__` on objects, we
+ * have to prefix all the strings in our set with an arbitrary character.
+ *
+ * See https://github.com/mozilla/source-map/pull/31 and
+ * https://github.com/mozilla/source-map/issues/30
+ *
+ * @param String aStr
+ */
+ function toSetString(aStr) {
+ return '$' + aStr;
+ }
+ exports.toSetString = toSetString;
+
+ function fromSetString(aStr) {
+ return aStr.substr(1);
+ }
+ exports.fromSetString = fromSetString;
+
+ function strcmp(aStr1, aStr2) {
+ var s1 = aStr1 || "";
+ var s2 = aStr2 || "";
+ return (s1 > s2) - (s1 < s2);
+ }
+
+ /**
+ * Comparator between two mappings where the original positions are compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same original source/line/column, but different generated
+ * line and column the same. Useful when searching for a mapping with a
+ * stubbed out mapping.
+ */
+ function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
+ var cmp;
+
+ cmp = strcmp(mappingA.source, mappingB.source);
+ if (cmp) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp || onlyCompareOriginal) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp) {
+ return cmp;
+ }
+
+ return strcmp(mappingA.name, mappingB.name);
+ };
+ exports.compareByOriginalPositions = compareByOriginalPositions;
+
+ /**
+ * Comparator between two mappings where the generated positions are
+ * compared.
+ *
+ * Optionally pass in `true` as `onlyCompareGenerated` to consider two
+ * mappings with the same generated line and column, but different
+ * source/name/original line and column the same. Useful when searching for a
+ * mapping with a stubbed out mapping.
+ */
+ function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) {
+ var cmp;
+
+ cmp = mappingA.generatedLine - mappingB.generatedLine;
+ if (cmp) {
+ return cmp;
+ }
+
+ cmp = mappingA.generatedColumn - mappingB.generatedColumn;
+ if (cmp || onlyCompareGenerated) {
+ return cmp;
+ }
+
+ cmp = strcmp(mappingA.source, mappingB.source);
+ if (cmp) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalLine - mappingB.originalLine;
+ if (cmp) {
+ return cmp;
+ }
+
+ cmp = mappingA.originalColumn - mappingB.originalColumn;
+ if (cmp) {
+ return cmp;
+ }
+
+ return strcmp(mappingA.name, mappingB.name);
+ };
+ exports.compareByGeneratedPositions = compareByGeneratedPositions;
+
+});
+
+},{"amdefine":540}],540:[function(require,module,exports){
+(function (process,__filename){
+/** vim: et:ts=4:sw=4:sts=4
+ * @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved.
+ * Available via the MIT or new BSD license.
+ * see: http://github.com/jrburke/amdefine for details
+ */
+
+/*jslint node: true */
+/*global module, process */
+'use strict';
+
+/**
+ * Creates a define for node.
+ * @param {Object} module the "module" object that is defined by Node for the
+ * current module.
+ * @param {Function} [requireFn]. Node's require function for the current module.
+ * It only needs to be passed in Node versions before 0.5, when module.require
+ * did not exist.
+ * @returns {Function} a define function that is usable for the current node
+ * module.
+ */
+function amdefine(module, requireFn) {
+ 'use strict';
+ var defineCache = {},
+ loaderCache = {},
+ alreadyCalled = false,
+ path = require('path'),
+ makeRequire, stringRequire;
+
+ /**
+ * Trims the . and .. from an array of path segments.
+ * It will keep a leading path segment if a .. will become
+ * the first path segment, to help with module name lookups,
+ * which act like paths, but can be remapped. But the end result,
+ * all paths that use this function should look normalized.
+ * NOTE: this method MODIFIES the input array.
+ * @param {Array} ary the array of path segments.
+ */
+ function trimDots(ary) {
+ var i, part;
+ for (i = 0; ary[i]; i+= 1) {
+ part = ary[i];
+ if (part === '.') {
+ ary.splice(i, 1);
+ i -= 1;
+ } else if (part === '..') {
+ if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
+ //End of the line. Keep at least one non-dot
+ //path segment at the front so it can be mapped
+ //correctly to disk. Otherwise, there is likely
+ //no path mapping for a path starting with '..'.
+ //This can still fail, but catches the most reasonable
+ //uses of ..
+ break;
+ } else if (i > 0) {
+ ary.splice(i - 1, 2);
+ i -= 2;
+ }
+ }
+ }
+ }
+
+ function normalize(name, baseName) {
+ var baseParts;
+
+ //Adjust any relative paths.
+ if (name && name.charAt(0) === '.') {
+ //If have a base name, try to normalize against it,
+ //otherwise, assume it is a top-level require that will
+ //be relative to baseUrl in the end.
+ if (baseName) {
+ baseParts = baseName.split('/');
+ baseParts = baseParts.slice(0, baseParts.length - 1);
+ baseParts = baseParts.concat(name.split('/'));
+ trimDots(baseParts);
+ name = baseParts.join('/');
+ }
+ }
+
+ return name;
+ }
+
+ /**
+ * Create the normalize() function passed to a loader plugin's
+ * normalize method.
+ */
+ function makeNormalize(relName) {
+ return function (name) {
+ return normalize(name, relName);
+ };
+ }
+
+ function makeLoad(id) {
+ function load(value) {
+ loaderCache[id] = value;
+ }
+
+ load.fromText = function (id, text) {
+ //This one is difficult because the text can/probably uses
+ //define, and any relative paths and requires should be relative
+ //to that id was it would be found on disk. But this would require
+ //bootstrapping a module/require fairly deeply from node core.
+ //Not sure how best to go about that yet.
+ throw new Error('amdefine does not implement load.fromText');
+ };
+
+ return load;
+ }
+
+ makeRequire = function (systemRequire, exports, module, relId) {
+ function amdRequire(deps, callback) {
+ if (typeof deps === 'string') {
+ //Synchronous, single module require('')
+ return stringRequire(systemRequire, exports, module, deps, relId);
+ } else {
+ //Array of dependencies with a callback.
+
+ //Convert the dependencies to modules.
+ deps = deps.map(function (depName) {
+ return stringRequire(systemRequire, exports, module, depName, relId);
+ });
+
+ //Wait for next tick to call back the require call.
+ if (callback) {
+ process.nextTick(function () {
+ callback.apply(null, deps);
+ });
+ }
+ }
+ }
+
+ amdRequire.toUrl = function (filePath) {
+ if (filePath.indexOf('.') === 0) {
+ return normalize(filePath, path.dirname(module.filename));
+ } else {
+ return filePath;
+ }
+ };
+
+ return amdRequire;
+ };
+
+ //Favor explicit value, passed in if the module wants to support Node 0.4.
+ requireFn = requireFn || function req() {
+ return module.require.apply(module, arguments);
+ };
+
+ function runFactory(id, deps, factory) {
+ var r, e, m, result;
+
+ if (id) {
+ e = loaderCache[id] = {};
+ m = {
+ id: id,
+ uri: __filename,
+ exports: e
+ };
+ r = makeRequire(requireFn, e, m, id);
+ } else {
+ //Only support one define call per file
+ if (alreadyCalled) {
+ throw new Error('amdefine with no module ID cannot be called more than once per file.');
+ }
+ alreadyCalled = true;
+
+ //Use the real variables from node
+ //Use module.exports for exports, since
+ //the exports in here is amdefine exports.
+ e = module.exports;
+ m = module;
+ r = makeRequire(requireFn, e, m, module.id);
+ }
+
+ //If there are dependencies, they are strings, so need
+ //to convert them to dependency values.
+ if (deps) {
+ deps = deps.map(function (depName) {
+ return r(depName);
+ });
+ }
+
+ //Call the factory with the right dependencies.
+ if (typeof factory === 'function') {
+ result = factory.apply(m.exports, deps);
+ } else {
+ result = factory;
+ }
+
+ if (result !== undefined) {
+ m.exports = result;
+ if (id) {
+ loaderCache[id] = m.exports;
+ }
+ }
+ }
+
+ stringRequire = function (systemRequire, exports, module, id, relId) {
+ //Split the ID by a ! so that
+ var index = id.indexOf('!'),
+ originalId = id,
+ prefix, plugin;
+
+ if (index === -1) {
+ id = normalize(id, relId);
+
+ //Straight module lookup. If it is one of the special dependencies,
+ //deal with it, otherwise, delegate to node.
+ if (id === 'require') {
+ return makeRequire(systemRequire, exports, module, relId);
+ } else if (id === 'exports') {
+ return exports;
+ } else if (id === 'module') {
+ return module;
+ } else if (loaderCache.hasOwnProperty(id)) {
+ return loaderCache[id];
+ } else if (defineCache[id]) {
+ runFactory.apply(null, defineCache[id]);
+ return loaderCache[id];
+ } else {
+ if(systemRequire) {
+ return systemRequire(originalId);
+ } else {
+ throw new Error('No module with ID: ' + id);
+ }
+ }
+ } else {
+ //There is a plugin in play.
+ prefix = id.substring(0, index);
+ id = id.substring(index + 1, id.length);
+
+ plugin = stringRequire(systemRequire, exports, module, prefix, relId);
+
+ if (plugin.normalize) {
+ id = plugin.normalize(id, makeNormalize(relId));
+ } else {
+ //Normalize the ID normally.
+ id = normalize(id, relId);
+ }
+
+ if (loaderCache[id]) {
+ return loaderCache[id];
+ } else {
+ plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {});
+
+ return loaderCache[id];
+ }
+ }
+ };
+
+ //Create a define function specific to the module asking for amdefine.
+ function define(id, deps, factory) {
+ if (Array.isArray(id)) {
+ factory = deps;
+ deps = id;
+ id = undefined;
+ } else if (typeof id !== 'string') {
+ factory = id;
+ id = deps = undefined;
+ }
+
+ if (deps && !Array.isArray(deps)) {
+ factory = deps;
+ deps = undefined;
+ }
+
+ if (!deps) {
+ deps = ['require', 'exports', 'module'];
+ }
+
+ //Set up properties for this module. If an ID, then use
+ //internal cache. If no ID, then use the external variables
+ //for this node module.
+ if (id) {
+ //Put the module in deep freeze until there is a
+ //require call for it.
+ defineCache[id] = [id, deps, factory];
+ } else {
+ runFactory(id, deps, factory);
+ }
+ }
+
+ //define.require, which has access to all the values in the
+ //cache. Useful for AMD modules that all have IDs in the file,
+ //but need to finally export a value to node based on one of those
+ //IDs.
+ define.require = function (id) {
+ if (loaderCache[id]) {
+ return loaderCache[id];
+ }
+
+ if (defineCache[id]) {
+ runFactory.apply(null, defineCache[id]);
+ return loaderCache[id];
+ }
+ };
+
+ define.amd = {};
+
+ return define;
+}
+
+module.exports = amdefine;
+
+}).call(this,require('_process'),"/node_modules/source-map/node_modules/amdefine/amdefine.js")
+},{"_process":223,"path":222}],541:[function(require,module,exports){
+/*!
+ strip-json-comments
+ Strip comments from JSON. Lets you use comments in your JSON files!
+ https://github.com/sindresorhus/strip-json-comments
+ by Sindre Sorhus
+ MIT License
+*/
+(function () {
+ 'use strict';
+
+ function stripJsonComments(str) {
+ var currentChar;
+ var nextChar;
+ var insideString = false;
+ var insideComment = false;
+ var ret = '';
+
+ for (var i = 0; i < str.length; i++) {
+ currentChar = str[i];
+ nextChar = str[i + 1];
+
+ if (!insideComment && str[i - 1] !== '\\' && currentChar === '"') {
+ insideString = !insideString;
+ }
+
+ if (insideString) {
+ ret += currentChar;
+ continue;
+ }
+
+ if (!insideComment && currentChar + nextChar === '//') {
+ insideComment = 'single';
+ i++;
+ } else if (insideComment === 'single' && currentChar + nextChar === '\r\n') {
+ insideComment = false;
+ i++;
+ ret += currentChar;
+ ret += nextChar;
+ continue;
+ } else if (insideComment === 'single' && currentChar === '\n') {
+ insideComment = false;
+ } else if (!insideComment && currentChar + nextChar === '/*') {
+ insideComment = 'multi';
+ i++;
+ continue;
+ } else if (insideComment === 'multi' && currentChar + nextChar === '*/') {
+ insideComment = false;
+ i++;
+ continue;
+ }
+
+ if (insideComment) {
+ continue;
+ }
+
+ ret += currentChar;
+ }
+
+ return ret;
+ }
+
+ if (typeof module !== 'undefined' && module.exports) {
+ module.exports = stripJsonComments;
+ } else {
+ window.stripJsonComments = stripJsonComments;
+ }
+})();
+
+},{}],542:[function(require,module,exports){
+'use strict';
+module.exports = function toFastProperties(obj) {
+ /*jshint -W027*/
+ function f() {}
+ f.prototype = obj;
+ new f();
+ return;
+ eval(obj);
+};
+
+},{}],543:[function(require,module,exports){
+'use strict';
+module.exports = function (str) {
+ return str.replace(/[\s\uFEFF\xA0]+$/g, '');
+};
+
+},{}],544:[function(require,module,exports){
+module.exports={
+ "name": "babel-core",
+ "description": "A compiler for writing next generation JavaScript",
+ "version": "5.6.15",
+ "author": "Sebastian McKenzie ",
+ "homepage": "https://babeljs.io/",
+ "license": "MIT",
+ "repository": "babel/babel",
+ "browser": {
+ "./lib/babel/api/register/node.js": "./lib/babel/api/register/browser.js"
+ },
+ "keywords": [
+ "6to5",
+ "babel",
+ "classes",
+ "const",
+ "es6",
+ "harmony",
+ "let",
+ "modules",
+ "transpile",
+ "transpiler",
+ "var"
+ ],
+ "scripts": {
+ "bench": "make bench",
+ "test": "make test"
+ },
+ "dependencies": {
+ "acorn-jsx": "^1.0.0",
+ "ast-types": "~0.7.0",
+ "babel-plugin-constant-folding": "^1.0.1",
+ "babel-plugin-dead-code-elimination": "^1.0.2",
+ "babel-plugin-eval": "^1.0.1",
+ "babel-plugin-inline-environment-variables": "^1.0.1",
+ "babel-plugin-jscript": "^1.0.1",
+ "babel-plugin-member-expression-literals": "^1.0.1",
+ "babel-plugin-property-literals": "^1.0.1",
+ "babel-plugin-proto-to-assign": "^1.0.3",
+ "babel-plugin-react-constant-elements": "^1.0.3",
+ "babel-plugin-react-display-name": "^1.0.3",
+ "babel-plugin-remove-console": "^1.0.1",
+ "babel-plugin-remove-debugger": "^1.0.1",
+ "babel-plugin-runtime": "^1.0.7",
+ "babel-plugin-undeclared-variables-check": "^1.0.2",
+ "babel-plugin-undefined-to-void": "^1.1.6",
+ "chalk": "^1.0.0",
+ "convert-source-map": "^1.1.0",
+ "core-js": "^0.9.0",
+ "debug": "^2.1.1",
+ "detect-indent": "^3.0.0",
+ "estraverse": "^4.0.0",
+ "esutils": "^2.0.0",
+ "fs-readdir-recursive": "^0.1.0",
+ "globals": "^6.4.0",
+ "home-or-tmp": "^1.0.0",
+ "is-integer": "^1.0.4",
+ "js-tokens": "1.0.1",
+ "line-numbers": "0.2.0",
+ "lodash": "^3.6.0",
+ "minimatch": "^2.0.3",
+ "output-file-sync": "^1.1.0",
+ "path-exists": "^1.0.0",
+ "path-is-absolute": "^1.0.0",
+ "private": "^0.1.6",
+ "regenerator": "0.8.31",
+ "regexpu": "^1.1.2",
+ "repeating": "^1.1.2",
+ "resolve": "^1.1.6",
+ "shebang-regex": "^1.0.0",
+ "slash": "^1.0.0",
+ "source-map": "^0.4.0",
+ "source-map-support": "^0.2.10",
+ "strip-json-comments": "^1.0.2",
+ "to-fast-properties": "^1.0.0",
+ "trim-right": "^1.0.0"
+ },
+ "devDependencies": {
+ "babel": "5.6.10",
+ "babel-eslint": "^3.1.19",
+ "browserify": "^9.0.8",
+ "chai": "^2.2.0",
+ "eslint": "^0.21.2",
+ "esvalid": "^1.1.0",
+ "istanbul": "^0.3.5",
+ "matcha": "^0.6.0",
+ "mocha": "2.2.0",
+ "rimraf": "^2.3.2",
+ "uglify-js": "^2.4.16"
+ }
+}
+
+},{}],545:[function(require,module,exports){
+module.exports={"abstract-expression-call":{"body":[{"expression":{"callee":{"object":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceGet","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"abstract-expression-delete":{"body":[{"expression":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceDelete","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"abstract-expression-get":{"body":[{"expression":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceGet","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"abstract-expression-set":{"body":[{"expression":{"callee":{"object":{"name":"PROPERTY","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"referenceSet","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"OBJECT","type":"Identifier"},{"name":"VALUE","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"array-comprehension-container":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"declarations":[{"id":{"name":"KEY","type":"Identifier"},"init":{"elements":[],"type":"ArrayExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"argument":{"name":"KEY","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"array-from":{"body":[{"expression":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"from","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"VALUE","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"array-push":{"body":[{"expression":{"callee":{"object":{"name":"KEY","type":"Identifier"},"property":{"name":"push","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"STATEMENT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"call":{"body":[{"expression":{"callee":{"object":{"name":"OBJECT","type":"Identifier"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"CONTEXT","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"class-decorator":{"body":[{"expression":{"operator":"=","left":{"name":"CLASS_REF","type":"Identifier"},"right":{"left":{"callee":{"name":"DECORATOR","type":"Identifier"},"arguments":[{"name":"CLASS_REF","type":"Identifier"}],"type":"CallExpression"},"operator":"||","right":{"name":"CLASS_REF","type":"Identifier"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"class-derived-default-constructor":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"expression":{"callee":{"type":"Super"},"arguments":[{"argument":{"name":"arguments","type":"Identifier"},"type":"SpreadElement"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"default-parameter-assign":{"body":[{"test":{"left":{"name":"VARIABLE_NAME","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"expression":{"operator":"=","left":{"name":"VARIABLE_NAME","type":"Identifier"},"right":{"name":"DEFAULT_VALUE","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"Program"},"default-parameter":{"body":[{"declarations":[{"id":{"name":"VARIABLE_NAME","type":"Identifier"},"init":{"test":{"left":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"ARGUMENT_KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"name":"DEFAULT_VALUE","type":"Identifier"},"alternate":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"ARGUMENT_KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"ConditionalExpression"},"type":"VariableDeclarator"}],"kind":"let","type":"VariableDeclaration"}],"type":"Program"},"exports-assign":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"name":"KEY","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"VALUE","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-default-assign":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"module","type":"Identifier"},"property":{"name":"exports","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"VALUE","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-from-assign":{"body":[{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"exports","type":"Identifier"},{"name":"ID","type":"Identifier"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"enumerable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"get","type":"Identifier"},"value":{"id":{"name":"get","type":"Identifier"},"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"name":"INIT","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-module-declaration-loose":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"exports-module-declaration":{"body":[{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"exports","type":"Identifier"},{"value":"__esModule","type":"Literal"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"for-of-array":{"body":[{"init":{"declarations":[{"id":{"name":"KEY","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"KEY","type":"Identifier"},"operator":"<","right":{"object":{"name":"ARR","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"KEY","type":"Identifier"},"type":"UpdateExpression"},"body":{"expression":{"name":"BODY","type":"Identifier"},"type":"ExpressionStatement"},"type":"ForStatement"}],"type":"Program"},"for-of-loose":{"body":[{"init":{"declarations":[{"id":{"name":"LOOP_OBJECT","type":"Identifier"},"init":{"name":"OBJECT","type":"Identifier"},"type":"VariableDeclarator"},{"id":{"name":"IS_ARRAY","type":"Identifier"},"init":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"LOOP_OBJECT","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"INDEX","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"},{"id":{"name":"LOOP_OBJECT","type":"Identifier"},"init":{"test":{"name":"IS_ARRAY","type":"Identifier"},"consequent":{"name":"LOOP_OBJECT","type":"Identifier"},"alternate":{"callee":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ConditionalExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":null,"update":null,"body":{"body":[{"declarations":[{"id":{"name":"ID","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"name":"IS_ARRAY","type":"Identifier"},"consequent":{"body":[{"test":{"left":{"name":"INDEX","type":"Identifier"},"operator":">=","right":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"name":"ID","type":"Identifier"},"right":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"operator":"++","prefix":false,"argument":{"name":"INDEX","type":"Identifier"},"type":"UpdateExpression"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"expression":{"operator":"=","left":{"name":"INDEX","type":"Identifier"},"right":{"callee":{"object":{"name":"LOOP_OBJECT","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"object":{"name":"INDEX","type":"Identifier"},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"name":"ID","type":"Identifier"},"right":{"object":{"name":"INDEX","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"Program"},"for-of":{"body":[{"declarations":[{"id":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"init":{"value":true,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier"},"init":{"value":false,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"ITERATOR_ERROR_KEY","type":"Identifier"},"init":{"name":"undefined","type":"Identifier"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"block":{"body":[{"init":{"declarations":[{"id":{"name":"ITERATOR_KEY","type":"Identifier"},"init":{"callee":{"object":{"name":"OBJECT","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"STEP_KEY","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"operator":"!","prefix":true,"argument":{"operator":"=","left":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"right":{"object":{"operator":"=","left":{"name":"STEP_KEY","type":"Identifier"},"right":{"callee":{"object":{"name":"ITERATOR_KEY","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"type":"UnaryExpression"},"update":{"operator":"=","left":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"body":{"body":[],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"handler":{"param":{"name":"err","type":"Identifier"},"guard":null,"body":{"body":[{"expression":{"operator":"=","left":{"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"name":"ITERATOR_ERROR_KEY","type":"Identifier"},"right":{"name":"err","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"CatchClause"},"guardedHandlers":[],"finalizer":{"body":[{"block":{"body":[{"test":{"left":{"operator":"!","prefix":true,"argument":{"name":"ITERATOR_COMPLETION","type":"Identifier"},"type":"UnaryExpression"},"operator":"&&","right":{"object":{"name":"ITERATOR_KEY","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"object":{"name":"ITERATOR_KEY","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"handler":null,"guardedHandlers":[],"finalizer":{"body":[{"test":{"name":"ITERATOR_HAD_ERROR_KEY","type":"Identifier"},"consequent":{"body":[{"argument":{"name":"ITERATOR_ERROR_KEY","type":"Identifier"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"TryStatement"}],"type":"BlockStatement"},"type":"TryStatement"}],"type":"Program"},"helper-async-to-generator":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"fn","type":"Identifier"}],"body":{"body":[{"argument":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"declarations":[{"id":{"name":"gen","type":"Identifier"},"init":{"callee":{"object":{"name":"fn","type":"Identifier"},"property":{"name":"apply","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"type":"ThisExpression"},{"name":"arguments","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"argument":{"callee":{"name":"Promise","type":"Identifier"},"arguments":[{"id":null,"generator":false,"expression":false,"params":[{"name":"resolve","type":"Identifier"},{"name":"reject","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"callNext","type":"Identifier"},"init":{"callee":{"object":{"name":"step","type":"Identifier"},"property":{"name":"bind","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"value":null,"type":"Literal"},{"value":"next","type":"Literal"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"callThrow","type":"Identifier"},"init":{"callee":{"object":{"name":"step","type":"Identifier"},"property":{"name":"bind","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"value":null,"type":"Literal"},{"value":"throw","type":"Literal"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"id":{"name":"step","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"key","type":"Identifier"},{"name":"arg","type":"Identifier"}],"body":{"body":[{"block":{"body":[{"declarations":[{"id":{"name":"info","type":"Identifier"},"init":{"callee":{"object":{"name":"gen","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"arg","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"value","type":"Identifier"},"init":{"object":{"name":"info","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"}],"type":"BlockStatement"},"handler":{"param":{"name":"error","type":"Identifier"},"guard":null,"body":{"body":[{"expression":{"callee":{"name":"reject","type":"Identifier"},"arguments":[{"name":"error","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"argument":null,"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"CatchClause"},"guardedHandlers":[],"finalizer":null,"type":"TryStatement"},{"test":{"object":{"name":"info","type":"Identifier"},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"resolve","type":"Identifier"},"arguments":[{"name":"value","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"expression":{"callee":{"object":{"callee":{"object":{"name":"Promise","type":"Identifier"},"property":{"name":"resolve","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"value","type":"Identifier"}],"type":"CallExpression"},"property":{"name":"then","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"callNext","type":"Identifier"},{"name":"callThrow","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"expression":{"callee":{"name":"callNext","type":"Identifier"},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"}],"type":"NewExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-bind":{"body":[{"expression":{"object":{"object":{"name":"Function","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"bind","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-class-call-check":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"instance","type":"Identifier"},{"name":"Constructor","type":"Identifier"}],"body":{"body":[{"test":{"operator":"!","prefix":true,"argument":{"left":{"name":"instance","type":"Identifier"},"operator":"instanceof","right":{"name":"Constructor","type":"Identifier"},"type":"BinaryExpression","parenthesizedExpression":true},"type":"UnaryExpression"},"consequent":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Cannot call a class as a function","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-create-class":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"id":{"name":"defineProperties","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"},{"name":"props","type":"Identifier"}],"body":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"props","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"object":{"name":"props","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"||","right":{"value":false,"type":"Literal"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"descriptor","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"argument":{"id":null,"generator":false,"expression":false,"params":[{"name":"Constructor","type":"Identifier"},{"name":"protoProps","type":"Identifier"},{"name":"staticProps","type":"Identifier"}],"body":{"body":[{"test":{"name":"protoProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"object":{"name":"Constructor","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"protoProps","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"test":{"name":"staticProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"name":"Constructor","type":"Identifier"},{"name":"staticProps","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"name":"Constructor","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-create-decorated-class":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"id":{"name":"defineProperties","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"},{"name":"descriptors","type":"Identifier"},{"name":"initializers","type":"Identifier"}],"body":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"decorators","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"||","right":{"value":false,"type":"Literal"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"left":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"descriptor","type":"Identifier"},"type":"BinaryExpression"},"operator":"||","right":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"test":{"name":"decorators","type":"Identifier"},"consequent":{"body":[{"init":{"declarations":[{"id":{"name":"f","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"f","type":"Identifier"},"operator":"<","right":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"f","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"decorator","type":"Identifier"},"init":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"f","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"name":"descriptor","type":"Identifier"},"right":{"left":{"callee":{"name":"decorator","type":"Identifier"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"operator":"||","right":{"name":"descriptor","type":"Identifier"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"left":{"left":{"left":{"value":"The decorator for method ","type":"Literal"},"operator":"+","right":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"operator":"+","right":{"value":" is of the invalid type ","type":"Literal"},"type":"BinaryExpression"},"operator":"+","right":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"test":{"left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"!==","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"initializers","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"name":"descriptor","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"label":null,"type":"ContinueStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"argument":{"id":null,"generator":false,"expression":false,"params":[{"name":"Constructor","type":"Identifier"},{"name":"protoProps","type":"Identifier"},{"name":"staticProps","type":"Identifier"},{"name":"protoInitializers","type":"Identifier"},{"name":"staticInitializers","type":"Identifier"}],"body":{"body":[{"test":{"name":"protoProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"object":{"name":"Constructor","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"protoProps","type":"Identifier"},{"name":"protoInitializers","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"test":{"name":"staticProps","type":"Identifier"},"consequent":{"expression":{"callee":{"name":"defineProperties","type":"Identifier"},"arguments":[{"name":"Constructor","type":"Identifier"},{"name":"staticProps","type":"Identifier"},{"name":"staticInitializers","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"name":"Constructor","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-create-decorated-object":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"descriptors","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"target","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"decorators","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"delete","prefix":true,"argument":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"decorators","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"enumerable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"name":"decorators","type":"Identifier"},"consequent":{"body":[{"init":{"declarations":[{"id":{"name":"f","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"f","type":"Identifier"},"operator":"<","right":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"f","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"decorator","type":"Identifier"},"init":{"object":{"name":"decorators","type":"Identifier"},"property":{"name":"f","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"name":"descriptor","type":"Identifier"},"right":{"left":{"callee":{"name":"decorator","type":"Identifier"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"operator":"||","right":{"name":"descriptor","type":"Identifier"},"type":"LogicalExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"left":{"left":{"left":{"value":"The decorator for method ","type":"Literal"},"operator":"+","right":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"operator":"+","right":{"value":" is of the invalid type ","type":"Literal"},"type":"BinaryExpression"},"operator":"+","right":{"operator":"typeof","prefix":true,"argument":{"name":"decorator","type":"Identifier"},"type":"UnaryExpression"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"test":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"callee":{"object":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"}],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"target","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-default-props":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"defaultProps","type":"Identifier"},{"name":"props","type":"Identifier"}],"body":{"body":[{"test":{"name":"defaultProps","type":"Identifier"},"consequent":{"body":[{"left":{"declarations":[{"id":{"name":"propName","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"defaultProps","type":"Identifier"},"body":{"body":[{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"object":{"name":"props","type":"Identifier"},"property":{"name":"propName","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"UnaryExpression"},"operator":"===","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"props","type":"Identifier"},"property":{"name":"propName","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"defaultProps","type":"Identifier"},"property":{"name":"propName","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForInStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"name":"props","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-defaults":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"},{"name":"defaults","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"keys","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyNames","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"defaults","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"keys","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":{"object":{"name":"keys","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"value","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyDescriptor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"defaults","type":"Identifier"},{"name":"key","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"left":{"name":"value","type":"Identifier"},"operator":"&&","right":{"object":{"name":"value","type":"Identifier"},"property":{"name":"configurable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"operator":"&&","right":{"left":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"value","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"obj","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-define-decorated-property-descriptor":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptors","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"_descriptor","type":"Identifier"},"init":{"object":{"name":"descriptors","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"operator":"!","prefix":true,"argument":{"name":"_descriptor","type":"Identifier"},"type":"UnaryExpression"},"consequent":{"argument":null,"type":"ReturnStatement"},"alternate":null,"type":"IfStatement"},{"declarations":[{"id":{"name":"descriptor","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"left":{"declarations":[{"id":{"name":"_key","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"_descriptor","type":"Identifier"},"body":{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"_key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"_descriptor","type":"Identifier"},"property":{"name":"_key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"type":"ForInStatement"},{"expression":{"operator":"=","left":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"callee":{"object":{"object":{"name":"descriptor","type":"Identifier"},"property":{"name":"initializer","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"}],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"target","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"descriptor","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-define-property":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"},{"name":"value","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"key","type":"Identifier"},"operator":"in","right":{"name":"obj","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"name":"value","type":"Identifier"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"enumerable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"configurable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"writable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"name":"value","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"},{"argument":{"name":"obj","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-extends":{"body":[{"expression":{"left":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"assign","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"||","right":{"id":null,"generator":false,"expression":false,"params":[{"name":"target","type":"Identifier"}],"body":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":1,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"arguments","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"declarations":[{"id":{"name":"source","type":"Identifier"},"init":{"object":{"name":"arguments","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"left":{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"source","type":"Identifier"},"body":{"body":[{"test":{"callee":{"object":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"source","type":"Identifier"},{"name":"key","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"target","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"source","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForInStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"target","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"LogicalExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-get":{"body":[{"expression":{"id":{"name":"get","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"object","type":"Identifier"},"operator":"===","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"expression":{"operator":"=","left":{"name":"object","type":"Identifier"},"right":{"object":{"name":"Function","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"},{"declarations":[{"id":{"name":"desc","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyDescriptor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"desc","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"declarations":[{"id":{"name":"parent","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getPrototypeOf","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"parent","type":"Identifier"},"operator":"===","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"name":"undefined","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"get","type":"Identifier"},"arguments":[{"name":"parent","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"desc","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"getter","type":"Identifier"},"init":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"get","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"getter","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"name":"undefined","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"callee":{"object":{"name":"getter","type":"Identifier"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"receiver","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-has-own":{"body":[{"expression":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-inherits":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"subClass","type":"Identifier"},{"name":"superClass","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"superClass","type":"Identifier"},"type":"UnaryExpression"},"operator":"!==","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"left":{"name":"superClass","type":"Identifier"},"operator":"!==","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"left":{"value":"Super expression must either be null or a function, not ","type":"Literal"},"operator":"+","right":{"operator":"typeof","prefix":true,"argument":{"name":"superClass","type":"Identifier"},"type":"UnaryExpression"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"object":{"name":"subClass","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"create","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"left":{"name":"superClass","type":"Identifier"},"operator":"&&","right":{"object":{"name":"superClass","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"constructor","type":"Identifier"},"value":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"name":"subClass","type":"Identifier"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"enumerable","type":"Identifier"},"value":{"value":false,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"writable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"configurable","type":"Identifier"},"value":{"value":true,"type":"Literal"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"test":{"name":"superClass","type":"Identifier"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"subClass","type":"Identifier"},"property":{"name":"__proto__","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"superClass","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-instanceof":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"left","type":"Identifier"},{"name":"right","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"name":"right","type":"Identifier"},"operator":"!=","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"right","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"hasInstance","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"argument":{"callee":{"object":{"name":"right","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"hasInstance","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[{"name":"left","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"left":{"name":"left","type":"Identifier"},"operator":"instanceof","right":{"name":"right","type":"Identifier"},"type":"BinaryExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-interop-require-default":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"name":"obj","type":"Identifier"},"alternate":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"value":"default","type":"Literal"},"value":{"name":"obj","type":"Identifier"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-interop-require-wildcard":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"argument":{"name":"obj","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"newObj","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"!=","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"left":{"declarations":[{"id":{"name":"key","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"obj","type":"Identifier"},"body":{"body":[{"test":{"callee":{"object":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"key","type":"Identifier"}],"type":"CallExpression"},"consequent":{"expression":{"operator":"=","left":{"object":{"name":"newObj","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"key","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForInStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"object":{"name":"newObj","type":"Identifier"},"property":{"value":"default","type":"Literal"},"computed":true,"type":"MemberExpression"},"right":{"name":"obj","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"newObj","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-interop-require":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"object":{"name":"obj","type":"Identifier"},"property":{"value":"default","type":"Literal"},"computed":true,"type":"MemberExpression"},"alternate":{"name":"obj","type":"Identifier"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-object-destructuring-empty":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"==","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Cannot destructure undefined","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-object-without-properties":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"},{"name":"keys","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"target","type":"Identifier"},"init":{"properties":[],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"left":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"right":{"name":"obj","type":"Identifier"},"body":{"body":[{"test":{"left":{"callee":{"object":{"name":"keys","type":"Identifier"},"property":{"name":"indexOf","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"i","type":"Identifier"}],"type":"CallExpression"},"operator":">=","right":{"value":0,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"label":null,"type":"ContinueStatement"},"alternate":null,"type":"IfStatement"},{"test":{"operator":"!","prefix":true,"argument":{"callee":{"object":{"object":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"hasOwnProperty","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"obj","type":"Identifier"},{"name":"i","type":"Identifier"}],"type":"CallExpression"},"type":"UnaryExpression"},"consequent":{"label":null,"type":"ContinueStatement"},"alternate":null,"type":"IfStatement"},{"expression":{"operator":"=","left":{"object":{"name":"target","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForInStatement"},{"argument":{"name":"target","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-self-global":{"body":[{"expression":{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"global","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"consequent":{"name":"self","type":"Identifier"},"alternate":{"name":"global","type":"Identifier"},"type":"ConditionalExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-set":{"body":[{"expression":{"id":{"name":"set","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"value","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"desc","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getOwnPropertyDescriptor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"},{"name":"property","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"desc","type":"Identifier"},"operator":"===","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"declarations":[{"id":{"name":"parent","type":"Identifier"},"init":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"getPrototypeOf","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"object","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"parent","type":"Identifier"},"operator":"!==","right":{"value":null,"type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"set","type":"Identifier"},"arguments":[{"name":"parent","type":"Identifier"},{"name":"property","type":"Identifier"},{"name":"value","type":"Identifier"},{"name":"receiver","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"left":{"value":"value","type":"Literal"},"operator":"in","right":{"name":"desc","type":"Identifier"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"writable","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"value","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"setter","type":"Identifier"},"init":{"object":{"name":"desc","type":"Identifier"},"property":{"name":"set","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"test":{"left":{"name":"setter","type":"Identifier"},"operator":"!==","right":{"name":"undefined","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"callee":{"object":{"name":"setter","type":"Identifier"},"property":{"name":"call","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"receiver","type":"Identifier"},{"name":"value","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"},{"argument":{"name":"value","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-slice":{"body":[{"expression":{"object":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"property":{"name":"slice","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-sliced-to-array-loose":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"},{"name":"i","type":"Identifier"}],"body":{"body":[{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"argument":{"name":"arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"in","right":{"callee":{"name":"Object","type":"Identifier"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"BinaryExpression"},"consequent":{"body":[{"declarations":[{"id":{"name":"_arr","type":"Identifier"},"init":{"elements":[],"type":"ArrayExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"init":{"declarations":[{"id":{"name":"_iterator","type":"Identifier"},"init":{"callee":{"object":{"name":"arr","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"_step","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"operator":"!","prefix":true,"argument":{"object":{"operator":"=","left":{"name":"_step","type":"Identifier"},"right":{"callee":{"object":{"name":"_iterator","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"UnaryExpression"},"update":null,"body":{"body":[{"expression":{"callee":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"push","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"object":{"name":"_step","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"test":{"left":{"name":"i","type":"Identifier"},"operator":"&&","right":{"left":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"===","right":{"name":"i","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"},{"argument":{"name":"_arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Invalid attempt to destructure non-iterable instance","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-sliced-to-array":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"id":{"name":"sliceIterator","type":"Identifier"},"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"},{"name":"i","type":"Identifier"}],"body":{"body":[{"declarations":[{"id":{"name":"_arr","type":"Identifier"},"init":{"elements":[],"type":"ArrayExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"_n","type":"Identifier"},"init":{"value":true,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"_d","type":"Identifier"},"init":{"value":false,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"declarations":[{"id":{"name":"_e","type":"Identifier"},"init":{"name":"undefined","type":"Identifier"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"block":{"body":[{"init":{"declarations":[{"id":{"name":"_i","type":"Identifier"},"init":{"callee":{"object":{"name":"arr","type":"Identifier"},"property":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"_s","type":"Identifier"},"init":null,"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"operator":"!","prefix":true,"argument":{"operator":"=","left":{"name":"_n","type":"Identifier"},"right":{"object":{"operator":"=","left":{"name":"_s","type":"Identifier"},"right":{"callee":{"object":{"name":"_i","type":"Identifier"},"property":{"name":"next","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"property":{"name":"done","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression","parenthesizedExpression":true},"type":"UnaryExpression"},"update":{"operator":"=","left":{"name":"_n","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"body":{"body":[{"expression":{"callee":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"push","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"object":{"name":"_s","type":"Identifier"},"property":{"name":"value","type":"Identifier"},"computed":false,"type":"MemberExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"test":{"left":{"name":"i","type":"Identifier"},"operator":"&&","right":{"left":{"object":{"name":"_arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"===","right":{"name":"i","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"label":null,"type":"BreakStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"BlockStatement"},"handler":{"param":{"name":"err","type":"Identifier"},"guard":null,"body":{"body":[{"expression":{"operator":"=","left":{"name":"_d","type":"Identifier"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"name":"_e","type":"Identifier"},"right":{"name":"err","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"CatchClause"},"guardedHandlers":[],"finalizer":{"body":[{"block":{"body":[{"test":{"left":{"operator":"!","prefix":true,"argument":{"name":"_n","type":"Identifier"},"type":"UnaryExpression"},"operator":"&&","right":{"object":{"name":"_i","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"expression":{"callee":{"object":{"name":"_i","type":"Identifier"},"property":{"value":"return","type":"Literal"},"computed":true,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"handler":null,"guardedHandlers":[],"finalizer":{"body":[{"test":{"name":"_d","type":"Identifier"},"consequent":{"argument":{"name":"_e","type":"Identifier"},"type":"ThrowStatement"},"alternate":null,"type":"IfStatement"}],"type":"BlockStatement"},"type":"TryStatement"}],"type":"BlockStatement"},"type":"TryStatement"},{"argument":{"name":"_arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"argument":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"},{"name":"i","type":"Identifier"}],"body":{"body":[{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"argument":{"name":"arr","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"object":{"name":"Symbol","type":"Identifier"},"property":{"name":"iterator","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"in","right":{"callee":{"name":"Object","type":"Identifier"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"callee":{"name":"sliceIterator","type":"Identifier"},"arguments":[{"name":"arr","type":"Identifier"},{"name":"i","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"name":"TypeError","type":"Identifier"},"arguments":[{"value":"Invalid attempt to destructure non-iterable instance","type":"Literal"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"helper-tagged-template-literal-loose":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"strings","type":"Identifier"},{"name":"raw","type":"Identifier"}],"body":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"strings","type":"Identifier"},"property":{"name":"raw","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"name":"raw","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"strings","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-tagged-template-literal":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"strings","type":"Identifier"},{"name":"raw","type":"Identifier"}],"body":{"body":[{"argument":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"freeze","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"defineProperties","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"strings","type":"Identifier"},{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"raw","type":"Identifier"},"value":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"value","type":"Identifier"},"value":{"callee":{"object":{"name":"Object","type":"Identifier"},"property":{"name":"freeze","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"raw","type":"Identifier"}],"type":"CallExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"}],"type":"CallExpression"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-temporal-assert-defined":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"val","type":"Identifier"},{"name":"name","type":"Identifier"},{"name":"undef","type":"Identifier"}],"body":{"body":[{"test":{"left":{"name":"val","type":"Identifier"},"operator":"===","right":{"name":"undef","type":"Identifier"},"type":"BinaryExpression"},"consequent":{"body":[{"argument":{"callee":{"name":"ReferenceError","type":"Identifier"},"arguments":[{"left":{"name":"name","type":"Identifier"},"operator":"+","right":{"value":" is not defined - temporal dead zone","type":"Literal"},"type":"BinaryExpression"}],"type":"NewExpression"},"type":"ThrowStatement"}],"type":"BlockStatement"},"alternate":null,"type":"IfStatement"},{"argument":{"value":true,"type":"Literal"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-temporal-undefined":{"body":[{"expression":{"properties":[],"type":"ObjectExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-to-array":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"name":"arr","type":"Identifier"},"alternate":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"from","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-to-consumable-array":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"arr","type":"Identifier"}],"body":{"body":[{"test":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"isArray","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"consequent":{"body":[{"init":{"declarations":[{"id":{"name":"i","type":"Identifier"},"init":{"value":0,"type":"Literal"},"type":"VariableDeclarator"},{"id":{"name":"arr2","type":"Identifier"},"init":{"callee":{"name":"Array","type":"Identifier"},"arguments":[{"object":{"name":"arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"}],"type":"CallExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"i","type":"Identifier"},"operator":"<","right":{"object":{"name":"arr","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"i","type":"Identifier"},"type":"UpdateExpression"},"body":{"expression":{"operator":"=","left":{"object":{"name":"arr2","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"arr","type":"Identifier"},"property":{"name":"i","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},"type":"ForStatement"},{"argument":{"name":"arr2","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"argument":{"callee":{"object":{"name":"Array","type":"Identifier"},"property":{"name":"from","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"arr","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"helper-typeof":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"obj","type":"Identifier"}],"body":{"body":[{"argument":{"test":{"left":{"name":"obj","type":"Identifier"},"operator":"&&","right":{"left":{"object":{"name":"obj","type":"Identifier"},"property":{"name":"constructor","type":"Identifier"},"computed":false,"type":"MemberExpression"},"operator":"===","right":{"name":"Symbol","type":"Identifier"},"type":"BinaryExpression"},"type":"LogicalExpression"},"consequent":{"value":"symbol","type":"Literal"},"alternate":{"operator":"typeof","prefix":true,"argument":{"name":"obj","type":"Identifier"},"type":"UnaryExpression"},"type":"ConditionalExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"},"let-scoping-return":{"body":[{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"RETURN","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"object","type":"Literal"},"type":"BinaryExpression"},"consequent":{"argument":{"object":{"name":"RETURN","type":"Identifier"},"property":{"name":"v","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ReturnStatement"},"alternate":null,"type":"IfStatement"}],"type":"Program"},"named-function":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"id":{"name":"GET_OUTER_ID","type":"Identifier"},"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"name":"FUNCTION_ID","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"argument":{"name":"FUNCTION","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"property-method-assignment-wrapper-generator":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[{"name":"FUNCTION_KEY","type":"Identifier"}],"body":{"body":[{"id":{"name":"FUNCTION_ID","type":"Identifier"},"generator":true,"expression":false,"params":[],"body":{"body":[{"argument":{"delegate":true,"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"apply","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"type":"ThisExpression"},{"name":"arguments","type":"Identifier"}],"type":"CallExpression"},"type":"YieldExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"expression":{"operator":"=","left":{"object":{"name":"FUNCTION_ID","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"FUNCTION_ID","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[{"name":"FUNCTION","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"property-method-assignment-wrapper":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[{"name":"FUNCTION_KEY","type":"Identifier"}],"body":{"body":[{"id":{"name":"FUNCTION_ID","type":"Identifier"},"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"apply","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"type":"ThisExpression"},{"name":"arguments","type":"Identifier"}],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionDeclaration"},{"expression":{"operator":"=","left":{"object":{"name":"FUNCTION_ID","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"id":null,"generator":false,"expression":false,"params":[],"body":{"body":[{"argument":{"callee":{"object":{"name":"FUNCTION_KEY","type":"Identifier"},"property":{"name":"toString","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[],"type":"CallExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"argument":{"name":"FUNCTION_ID","type":"Identifier"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[{"name":"FUNCTION","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"prototype-identifier":{"body":[{"expression":{"object":{"name":"CLASS_NAME","type":"Identifier"},"property":{"name":"prototype","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"ExpressionStatement"}],"type":"Program"},"require-assign-key":{"body":[{"declarations":[{"id":{"name":"VARIABLE_NAME","type":"Identifier"},"init":{"object":{"callee":{"name":"require","type":"Identifier"},"arguments":[{"name":"MODULE_NAME","type":"Identifier"}],"type":"CallExpression"},"property":{"name":"KEY","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"}],"type":"Program"},"require":{"body":[{"expression":{"callee":{"name":"require","type":"Identifier"},"arguments":[{"name":"MODULE_NAME","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"rest":{"body":[{"init":{"declarations":[{"id":{"name":"LEN","type":"Identifier"},"init":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"length","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"VariableDeclarator"},{"id":{"name":"ARRAY","type":"Identifier"},"init":{"callee":{"name":"Array","type":"Identifier"},"arguments":[{"name":"ARRAY_LEN","type":"Identifier"}],"type":"CallExpression"},"type":"VariableDeclarator"},{"id":{"name":"KEY","type":"Identifier"},"init":{"name":"START","type":"Identifier"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},"test":{"left":{"name":"KEY","type":"Identifier"},"operator":"<","right":{"name":"LEN","type":"Identifier"},"type":"BinaryExpression"},"update":{"operator":"++","prefix":false,"argument":{"name":"KEY","type":"Identifier"},"type":"UpdateExpression"},"body":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"ARRAY","type":"Identifier"},"property":{"name":"ARRAY_KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"right":{"object":{"name":"ARGUMENTS","type":"Identifier"},"property":{"name":"KEY","type":"Identifier"},"computed":true,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"ForStatement"}],"type":"Program"},"self-contained-helpers-head":{"body":[{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"value":"default","type":"Literal"},"computed":true,"type":"MemberExpression"},"right":{"name":"HELPER","type":"Identifier"},"type":"AssignmentExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"exports","type":"Identifier"},"property":{"name":"__esModule","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"value":true,"type":"Literal"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"Program"},"system":{"body":[{"expression":{"callee":{"object":{"name":"System","type":"Identifier"},"property":{"name":"register","type":"Identifier"},"computed":false,"type":"MemberExpression"},"arguments":[{"name":"MODULE_NAME","type":"Identifier"},{"name":"MODULE_DEPENDENCIES","type":"Identifier"},{"id":null,"generator":false,"expression":false,"params":[{"name":"EXPORT_IDENTIFIER","type":"Identifier"}],"body":{"body":[{"argument":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"setters","type":"Identifier"},"value":{"name":"SETTERS","type":"Identifier"},"kind":"init","type":"Property"},{"method":false,"shorthand":false,"computed":false,"key":{"name":"execute","type":"Identifier"},"value":{"name":"EXECUTE","type":"Identifier"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"type":"ReturnStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"tail-call-body":{"body":[{"body":[{"declarations":[{"id":{"name":"AGAIN_ID","type":"Identifier"},"init":{"value":true,"type":"Literal"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"body":{"test":{"name":"AGAIN_ID","type":"Identifier"},"body":{"expression":{"name":"BLOCK","type":"Identifier"},"type":"ExpressionStatement"},"type":"WhileStatement"},"label":{"name":"FUNCTION_ID","type":"Identifier"},"type":"LabeledStatement"}],"type":"BlockStatement"}],"type":"Program"},"test-exports":{"body":[{"expression":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"exports","type":"Identifier"},"type":"UnaryExpression"},"operator":"!==","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"type":"ExpressionStatement"}],"type":"Program"},"test-module":{"body":[{"expression":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"module","type":"Identifier"},"type":"UnaryExpression"},"operator":"!==","right":{"value":"undefined","type":"Literal"},"type":"BinaryExpression"},"type":"ExpressionStatement"}],"type":"Program"},"umd-commonjs-strict":{"body":[{"expression":{"callee":{"id":null,"generator":false,"expression":false,"params":[{"name":"root","type":"Identifier"},{"name":"factory","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"define","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"define","type":"Identifier"},"property":{"name":"amd","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"define","type":"Identifier"},"arguments":[{"name":"AMD_ARGUMENTS","type":"Identifier"},{"name":"factory","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"test":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"exports","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"object","type":"Literal"},"type":"BinaryExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"name":"COMMON_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"name":"BROWSER_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"arguments":[{"name":"UMD_ROOT","type":"Identifier"},{"id":null,"generator":false,"expression":false,"params":[{"name":"FACTORY_PARAMETERS","type":"Identifier"}],"body":{"body":[{"expression":{"name":"FACTORY_BODY","type":"Identifier"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"FunctionExpression"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"Program"},"umd-runner-body":{"body":[{"expression":{"id":null,"generator":false,"expression":false,"params":[{"name":"global","type":"Identifier"},{"name":"factory","type":"Identifier"}],"body":{"body":[{"test":{"left":{"left":{"operator":"typeof","prefix":true,"argument":{"name":"define","type":"Identifier"},"type":"UnaryExpression"},"operator":"===","right":{"value":"function","type":"Literal"},"type":"BinaryExpression"},"operator":"&&","right":{"object":{"name":"define","type":"Identifier"},"property":{"name":"amd","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"LogicalExpression"},"consequent":{"body":[{"expression":{"callee":{"name":"define","type":"Identifier"},"arguments":[{"name":"AMD_ARGUMENTS","type":"Identifier"},{"name":"factory","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"test":{"name":"COMMON_TEST","type":"Identifier"},"consequent":{"body":[{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"name":"COMMON_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"alternate":{"body":[{"declarations":[{"id":{"name":"mod","type":"Identifier"},"init":{"properties":[{"method":false,"shorthand":false,"computed":false,"key":{"name":"exports","type":"Identifier"},"value":{"properties":[],"type":"ObjectExpression"},"kind":"init","type":"Property"}],"type":"ObjectExpression"},"type":"VariableDeclarator"}],"kind":"var","type":"VariableDeclaration"},{"expression":{"callee":{"name":"factory","type":"Identifier"},"arguments":[{"object":{"name":"mod","type":"Identifier"},"property":{"name":"exports","type":"Identifier"},"computed":false,"type":"MemberExpression"},{"name":"BROWSER_ARGUMENTS","type":"Identifier"}],"type":"CallExpression"},"type":"ExpressionStatement"},{"expression":{"operator":"=","left":{"object":{"name":"global","type":"Identifier"},"property":{"name":"GLOBAL_ARG","type":"Identifier"},"computed":false,"type":"MemberExpression"},"right":{"object":{"name":"mod","type":"Identifier"},"property":{"name":"exports","type":"Identifier"},"computed":false,"type":"MemberExpression"},"type":"AssignmentExpression"},"type":"ExpressionStatement"}],"type":"BlockStatement"},"type":"IfStatement"},"type":"IfStatement"}],"type":"BlockStatement"},"type":"FunctionExpression","parenthesizedExpression":true},"type":"ExpressionStatement"}],"type":"Program"}}
+},{}]},{},[19])(19)
+});
\ No newline at end of file
diff --git a/assets/babel-core/browser.min.js b/assets/babel-core/browser.min.js
new file mode 100644
index 000000000..0fec5ee79
--- /dev/null
+++ b/assets/babel-core/browser.min.js
@@ -0,0 +1,42 @@
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.babel=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o")){node.params.push(this.flow_parseTypeAnnotatableIdentifier());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");return this.finishNode(node,"TypeParameterDeclaration")};pp.flow_parseTypeParameterInstantiation=function(){var node=this.startNode(),oldInType=this.inType;node.params=[];this.inType=true;this.expectRelational("<");while(!this.isRelational(">")){node.params.push(this.flow_parseType());if(!this.isRelational(">")){this.expect(tt.comma)}}this.expectRelational(">");this.inType=oldInType;return this.finishNode(node,"TypeParameterInstantiation")};pp.flow_parseObjectPropertyKey=function(){return this.type===tt.num||this.type===tt.string?this.parseExprAtom():this.parseIdent(true)};pp.flow_parseObjectTypeIndexer=function(node,isStatic){node["static"]=isStatic;this.expect(tt.bracketL);node.id=this.flow_parseObjectPropertyKey();node.key=this.flow_parseTypeInitialiser();this.expect(tt.bracketR);node.value=this.flow_parseTypeInitialiser();this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeIndexer")};pp.flow_parseObjectTypeMethodish=function(node){node.params=[];node.rest=null;node.typeParameters=null;if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}this.expect(tt.parenL);while(this.type===tt.name){node.params.push(this.flow_parseFunctionTypeParam());if(this.type!==tt.parenR){this.expect(tt.comma)}}if(this.eat(tt.ellipsis)){node.rest=this.flow_parseFunctionTypeParam()}this.expect(tt.parenR);node.returnType=this.flow_parseTypeInitialiser();return this.finishNode(node,"FunctionTypeAnnotation")};pp.flow_parseObjectTypeMethod=function(start,isStatic,key){var node=this.startNodeAt(start);node.value=this.flow_parseObjectTypeMethodish(this.startNodeAt(start));node["static"]=isStatic;node.key=key;node.optional=false;this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeProperty")};pp.flow_parseObjectTypeCallProperty=function(node,isStatic){var valueNode=this.startNode();node["static"]=isStatic;node.value=this.flow_parseObjectTypeMethodish(valueNode);this.flow_objectTypeSemicolon();return this.finishNode(node,"ObjectTypeCallProperty")};pp.flow_parseObjectType=function(allowStatic){var nodeStart=this.startNode();var node;var optional=false;var property;var propertyKey;var propertyTypeAnnotation;var token;var isStatic;nodeStart.callProperties=[];nodeStart.properties=[];nodeStart.indexers=[];this.expect(tt.braceL);while(this.type!==tt.braceR){var start=this.markPosition();node=this.startNode();if(allowStatic&&this.isContextual("static")){this.next();isStatic=true}if(this.type===tt.bracketL){nodeStart.indexers.push(this.flow_parseObjectTypeIndexer(node,isStatic))}else if(this.type===tt.parenL||this.isRelational("<")){nodeStart.callProperties.push(this.flow_parseObjectTypeCallProperty(node,allowStatic))}else{if(isStatic&&this.type===tt.colon){propertyKey=this.parseIdent()}else{propertyKey=this.flow_parseObjectPropertyKey()}if(this.isRelational("<")||this.type===tt.parenL){nodeStart.properties.push(this.flow_parseObjectTypeMethod(start,isStatic,propertyKey))}else{if(this.eat(tt.question)){optional=true}node.key=propertyKey;node.value=this.flow_parseTypeInitialiser();node.optional=optional;node["static"]=isStatic;this.flow_objectTypeSemicolon();nodeStart.properties.push(this.finishNode(node,"ObjectTypeProperty"))}}}this.expect(tt.braceR);return this.finishNode(nodeStart,"ObjectTypeAnnotation")};pp.flow_objectTypeSemicolon=function(){if(!this.eat(tt.semi)&&!this.eat(tt.comma)&&this.type!==tt.braceR){this.unexpected()}};pp.flow_parseGenericType=function(start,id){var node=this.startNodeAt(start);node.typeParameters=null;node.id=id;while(this.eat(tt.dot)){var node2=this.startNodeAt(start);node2.qualification=node.id;node2.id=this.parseIdent();node.id=this.finishNode(node2,"QualifiedTypeIdentifier")}if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterInstantiation()}return this.finishNode(node,"GenericTypeAnnotation")};pp.flow_parseTypeofType=function(){var node=this.startNode();this.expect(tt._typeof);node.argument=this.flow_parsePrimaryType();return this.finishNode(node,"TypeofTypeAnnotation")};pp.flow_parseTupleType=function(){var node=this.startNode();node.types=[];this.expect(tt.bracketL);while(this.pos. It looks like "+"you are trying to write a function type, but you ended up "+"writing a grouped type followed by an =>, which is a syntax "+"error. Remember, function type parameters are named so function "+"types look like (name1: type1, name2: type2) => returnType. You "+"probably wrote (type1) => returnType")}return type}tmp=this.flow_parseFunctionTypeParams();node.params=tmp.params;node.rest=tmp.rest;this.expect(tt.parenR);this.expect(tt.arrow);node.returnType=this.flow_parseType();node.typeParameters=null;return this.finishNode(node,"FunctionTypeAnnotation");case tt.string:node.value=this.value;node.raw=this.input.slice(this.start,this.end);this.next();return this.finishNode(node,"StringLiteralTypeAnnotation");default:if(this.type.keyword==="typeof"){return this.flow_parseTypeofType()}}this.unexpected()};pp.flow_parsePostfixType=function(){var node=this.startNode();var type=node.elementType=this.flow_parsePrimaryType();if(this.type===tt.bracketL){this.expect(tt.bracketL);this.expect(tt.bracketR);return this.finishNode(node,"ArrayTypeAnnotation")}return type};pp.flow_parsePrefixType=function(){var node=this.startNode();if(this.eat(tt.question)){node.typeAnnotation=this.flow_parsePrefixType();return this.finishNode(node,"NullableTypeAnnotation")}return this.flow_parsePostfixType()};pp.flow_parseIntersectionType=function(){var node=this.startNode();var type=this.flow_parsePrefixType();node.types=[type];while(this.eat(tt.bitwiseAND)){node.types.push(this.flow_parsePrefixType())}return node.types.length===1?type:this.finishNode(node,"IntersectionTypeAnnotation")};pp.flow_parseUnionType=function(){var node=this.startNode();var type=this.flow_parseIntersectionType();node.types=[type];while(this.eat(tt.bitwiseOR)){node.types.push(this.flow_parseIntersectionType())}return node.types.length===1?type:this.finishNode(node,"UnionTypeAnnotation")};pp.flow_parseType=function(){var oldInType=this.inType;this.inType=true;var type=this.flow_parseUnionType();this.inType=oldInType;return type};pp.flow_parseTypeAnnotation=function(){var node=this.startNode();node.typeAnnotation=this.flow_parseTypeInitialiser();return this.finishNode(node,"TypeAnnotation")};pp.flow_parseTypeAnnotatableIdentifier=function(requireTypeAnnotation,canBeOptionalParam){var node=this.startNode();var ident=this.parseIdent();var isOptionalParam=false;if(canBeOptionalParam&&this.eat(tt.question)){this.expect(tt.question);isOptionalParam=true}if(requireTypeAnnotation||this.type===tt.colon){ident.typeAnnotation=this.flow_parseTypeAnnotation();this.finishNode(ident,ident.type)}if(isOptionalParam){ident.optional=true;this.finishNode(ident,ident.type)}return ident};acorn.plugins.flow=function(instance){instance.extend("parseFunctionBody",function(inner){return function(node,allowExpression){if(this.type===tt.colon){node.returnType=this.flow_parseTypeAnnotation()}return inner.call(this,node,allowExpression)}});instance.extend("parseStatement",function(inner){return function(declaration,topLevel){if(this.strict&&this.type===tt.name&&this.value==="interface"){var node=this.startNode();this.next();return this.flow_parseInterface(node)}else{return inner.call(this,declaration,topLevel)}}});instance.extend("parseExpressionStatement",function(inner){return function(node,expr){if(expr.type==="Identifier"){if(expr.name==="declare"){if(this.type===tt._class||this.type===tt.name||this.type===tt._function||this.type===tt._var){return this.flow_parseDeclare(node)}}else if(this.type===tt.name){if(expr.name==="interface"){return this.flow_parseInterface(node)}else if(expr.name==="type"){return this.flow_parseTypeAlias(node)}}}return inner.call(this,node,expr)}});instance.extend("shouldParseExportDeclaration",function(inner){return function(){return this.isContextual("type")||inner.call(this)}});instance.extend("parseParenItem",function(inner){return function(node,start){if(this.type===tt.colon){var typeCastNode=this.startNodeAt(start);typeCastNode.expression=node;typeCastNode.typeAnnotation=this.flow_parseTypeAnnotation();return this.finishNode(typeCastNode,"TypeCastExpression")}else{return node}}});instance.extend("parseClassId",function(inner){return function(node,isStatement){inner.call(this,node,isStatement);if(this.isRelational("<")){node.typeParameters=this.flow_parseTypeParameterDeclaration()}}});instance.extend("isKeyword",function(inner){return function(name){if(this.inType&&name==="void"){return false}else{return inner.call(this,name)}}});instance.extend("readToken",function(inner){return function(code){if(this.inType&&(code===62||code===60)){return this.finishOp(tt.relational,1)}else{return inner.call(this,code)}}});instance.extend("jsx_readToken",function(inner){return function(){if(!this.inType)return inner.call(this)}});instance.extend("parseParenArrowList",function(inner){return function(start,exprList,isAsync){for(var i=0;i=6&&(prop.computed||prop.method||prop.shorthand))return;var key=prop.key,name=undefined;switch(key.type){case"Identifier":name=key.name;break;case"Literal":name=String(key.value);break;default:return}var kind=prop.kind;if(this.options.ecmaVersion>=6){if(name==="__proto__"&&kind==="init"){if(propHash.proto)this.raise(key.start,"Redefinition of __proto__ property");propHash.proto=true}return}var other=undefined;if(_util.has(propHash,name)){other=propHash[name];var isGetSet=kind!=="init";if((this.strict||isGetSet)&&other[kind]||!(isGetSet^other.init))this.raise(key.start,"Redefinition of property")}else{other=propHash[name]={init:false,get:false,set:false}}other[kind]=true};pp.parseExpression=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeAssign(noIn,refShorthandDefaultPos);if(this.type===_tokentype.types.comma){var node=this.startNodeAt(start);node.expressions=[expr];while(this.eat(_tokentype.types.comma))node.expressions.push(this.parseMaybeAssign(noIn,refShorthandDefaultPos));return this.finishNode(node,"SequenceExpression")}return expr};pp.parseMaybeAssign=function(noIn,refShorthandDefaultPos,afterLeftParse){if(this.type==_tokentype.types._yield&&this.inGenerator)return this.parseYield();var failOnShorthandAssign=undefined;if(!refShorthandDefaultPos){refShorthandDefaultPos={start:0};failOnShorthandAssign=true}else{failOnShorthandAssign=false}var start=this.markPosition();if(this.type==_tokentype.types.parenL||this.type==_tokentype.types.name)this.potentialArrowAt=this.start;var left=this.parseMaybeConditional(noIn,refShorthandDefaultPos);if(afterLeftParse)left=afterLeftParse.call(this,left,start);if(this.type.isAssign){var node=this.startNodeAt(start);node.operator=this.value;node.left=this.type===_tokentype.types.eq?this.toAssignable(left):left;refShorthandDefaultPos.start=0;this.checkLVal(left);if(left.parenthesizedExpression){var errorMsg=undefined;if(left.type==="ObjectPattern"){errorMsg="`({a}) = 0` use `({a} = 0)`"}else if(left.type==="ArrayPattern"){errorMsg="`([a]) = 0` use `([a] = 0)`"}if(errorMsg){this.raise(left.start,"You're trying to assign to a parenthesized expression, eg. instead of "+errorMsg)}}this.next();node.right=this.parseMaybeAssign(noIn);return this.finishNode(node,"AssignmentExpression")}else if(failOnShorthandAssign&&refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return left};pp.parseMaybeConditional=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprOps(noIn,refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;if(this.eat(_tokentype.types.question)){var node=this.startNodeAt(start);node.test=expr;node.consequent=this.parseMaybeAssign();this.expect(_tokentype.types.colon);node.alternate=this.parseMaybeAssign(noIn);return this.finishNode(node,"ConditionalExpression")}return expr};pp.parseExprOps=function(noIn,refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseMaybeUnary(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseExprOp(expr,start,-1,noIn)};pp.parseExprOp=function(left,leftStart,minPrec,noIn){var prec=this.type.binop;if(prec!=null&&(!noIn||this.type!==_tokentype.types._in)){if(prec>minPrec){var node=this.startNodeAt(leftStart);node.left=left;node.operator=this.value;var op=this.type;this.next();var start=this.markPosition();node.right=this.parseExprOp(this.parseMaybeUnary(),start,op.rightAssociative?prec-1:prec,noIn);this.finishNode(node,op===_tokentype.types.logicalOR||op===_tokentype.types.logicalAND?"LogicalExpression":"BinaryExpression");return this.parseExprOp(node,leftStart,minPrec,noIn)}}return left};pp.parseMaybeUnary=function(refShorthandDefaultPos){if(this.type.prefix){var node=this.startNode(),update=this.type===_tokentype.types.incDec;node.operator=this.value;node.prefix=true;this.next();node.argument=this.parseMaybeUnary();if(refShorthandDefaultPos&&refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(update)this.checkLVal(node.argument);else if(this.strict&&node.operator==="delete"&&node.argument.type==="Identifier")this.raise(node.start,"Deleting local variable in strict mode");return this.finishNode(node,update?"UpdateExpression":"UnaryExpression")}var start=this.markPosition();var expr=this.parseExprSubscripts(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;while(this.type.postfix&&!this.canInsertSemicolon()){var node=this.startNodeAt(start);node.operator=this.value;node.prefix=false;node.argument=expr;this.checkLVal(expr);this.next();expr=this.finishNode(node,"UpdateExpression")}return expr};pp.parseExprSubscripts=function(refShorthandDefaultPos){var start=this.markPosition();var expr=this.parseExprAtom(refShorthandDefaultPos);if(refShorthandDefaultPos&&refShorthandDefaultPos.start)return expr;return this.parseSubscripts(expr,start)};pp.parseSubscripts=function(base,start,noCalls){if(!noCalls&&this.eat(_tokentype.types.doubleColon)){var node=this.startNodeAt(start);node.object=base;node.callee=this.parseNoCallExpr();return this.parseSubscripts(this.finishNode(node,"BindExpression"),start,noCalls)}else if(this.eat(_tokentype.types.dot)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseIdent(true);node.computed=false;return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(this.eat(_tokentype.types.bracketL)){var node=this.startNodeAt(start);node.object=base;node.property=this.parseExpression();node.computed=true;this.expect(_tokentype.types.bracketR);return this.parseSubscripts(this.finishNode(node,"MemberExpression"),start,noCalls)}else if(!noCalls&&this.eat(_tokentype.types.parenL)){var node=this.startNodeAt(start);node.callee=base;node.arguments=this.parseExprList(_tokentype.types.parenR,this.options.features["es7.trailingFunctionCommas"]);return this.parseSubscripts(this.finishNode(node,"CallExpression"),start,noCalls)}else if(this.type===_tokentype.types.backQuote){var node=this.startNodeAt(start);node.tag=base;node.quasi=this.parseTemplate();return this.parseSubscripts(this.finishNode(node,"TaggedTemplateExpression"),start,noCalls)}return base};pp.parseNoCallExpr=function(){var start=this.markPosition();return this.parseSubscripts(this.parseExprAtom(),start,true)};pp.parseExprAtom=function(refShorthandDefaultPos){var node=undefined,canBeArrow=this.potentialArrowAt==this.start;switch(this.type){case _tokentype.types._super:if(!this.inFunction)this.raise(this.start,"'super' outside of function or class");case _tokentype.types._this:var type=this.type===_tokentype.types._this?"ThisExpression":"Super";node=this.startNode();this.next();return this.finishNode(node,type);case _tokentype.types._yield:if(this.inGenerator)this.unexpected();case _tokentype.types._do:if(this.options.features["es7.doExpressions"]){var _node=this.startNode();this.next();var oldInFunction=this.inFunction;var oldLabels=this.labels;this.labels=[];this.inFunction=false;_node.body=this.parseBlock();this.inFunction=oldInFunction;this.labels=oldLabels;return this.finishNode(_node,"DoExpression")}case _tokentype.types.name:var start=this.markPosition();node=this.startNode();var id=this.parseIdent(this.type!==_tokentype.types.name);if(this.options.features["es7.asyncFunctions"]){if(id.name==="async"&&!this.canInsertSemicolon()){if(this.type===_tokentype.types.parenL){var expr=this.parseParenAndDistinguishExpression(start,true,true);if(expr&&expr.type==="ArrowFunctionExpression"){return expr}else{node.callee=id;if(!expr){node.arguments=[]}else if(expr.type==="SequenceExpression"){node.arguments=expr.expressions}else{node.arguments=[expr]}return this.parseSubscripts(this.finishNode(node,"CallExpression"),start)}}else if(this.type===_tokentype.types.name){id=this.parseIdent();this.expect(_tokentype.types.arrow);return this.parseArrowExpression(node,[id],true)}if(this.type===_tokentype.types._function&&!this.canInsertSemicolon()){this.next();return this.parseFunction(node,false,false,true)}}else if(id.name==="await"){if(this.inAsync)return this.parseAwait(node)}}if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokentype.types.arrow))return this.parseArrowExpression(this.startNodeAt(start),[id]);return id;case _tokentype.types.regexp:var value=this.value;node=this.parseLiteral(value.value);node.regex={pattern:value.pattern,flags:value.flags};return node;case _tokentype.types.num:case _tokentype.types.string:return this.parseLiteral(this.value);case _tokentype.types._null:case _tokentype.types._true:case _tokentype.types._false:node=this.startNode();node.value=this.type===_tokentype.types._null?null:this.type===_tokentype.types._true;node.raw=this.type.keyword;this.next();return this.finishNode(node,"Literal");case _tokentype.types.parenL:return this.parseParenAndDistinguishExpression(null,null,canBeArrow);case _tokentype.types.bracketL:node=this.startNode();this.next();if((this.options.ecmaVersion>=7||this.options.features["es7.comprehensions"])&&this.type===_tokentype.types._for){return this.parseComprehension(node,false)}node.elements=this.parseExprList(_tokentype.types.bracketR,true,true,refShorthandDefaultPos);return this.finishNode(node,"ArrayExpression");case _tokentype.types.braceL:return this.parseObj(false,refShorthandDefaultPos);case _tokentype.types._function:node=this.startNode();this.next();return this.parseFunction(node,false);case _tokentype.types.at:this.parseDecorators();case _tokentype.types._class:node=this.startNode();this.takeDecorators(node);return this.parseClass(node,false);case _tokentype.types._new:return this.parseNew();case _tokentype.types.backQuote:return this.parseTemplate();case _tokentype.types.doubleColon:node=this.startNode();this.next();node.object=null;var callee=node.callee=this.parseNoCallExpr();if(callee.type!=="MemberExpression")this.raise(callee.start,"Binding should be performed on object property.");return this.finishNode(node,"BindExpression");default:this.unexpected()}};pp.parseLiteral=function(value){var node=this.startNode();node.value=value;node.raw=this.input.slice(this.start,this.end);this.next();return this.finishNode(node,"Literal")};pp.parseParenExpression=function(){this.expect(_tokentype.types.parenL);var val=this.parseExpression();this.expect(_tokentype.types.parenR);return val};pp.parseParenAndDistinguishExpression=function(start,isAsync,canBeArrow){start=start||this.markPosition();var val=undefined;if(this.options.ecmaVersion>=6){this.next();if((this.options.features["es7.comprehensions"]||this.options.ecmaVersion>=7)&&this.type===_tokentype.types._for){return this.parseComprehension(this.startNodeAt(start),true)}var innerStart=this.markPosition(),exprList=[],first=true;var refShorthandDefaultPos={start:0},spreadStart=undefined,innerParenStart=undefined,optionalCommaStart=undefined;while(this.type!==_tokentype.types.parenR){if(first){first=false}else{this.expect(_tokentype.types.comma);if(this.type===_tokentype.types.parenR&&this.options.features["es7.trailingFunctionCommas"]){
+optionalCommaStart=this.start;break}}if(this.type===_tokentype.types.ellipsis){var spreadNodeStart=this.markPosition();spreadStart=this.start;exprList.push(this.parseParenItem(this.parseRest(),spreadNodeStart));break}else{if(this.type===_tokentype.types.parenL&&!innerParenStart){innerParenStart=this.start}exprList.push(this.parseMaybeAssign(false,refShorthandDefaultPos,this.parseParenItem))}}var innerEnd=this.markPosition();this.expect(_tokentype.types.parenR);if(canBeArrow&&!this.canInsertSemicolon()&&this.eat(_tokentype.types.arrow)){if(innerParenStart)this.unexpected(innerParenStart);return this.parseParenArrowList(start,exprList,isAsync)}if(!exprList.length){if(isAsync){return}else{this.unexpected(this.lastTokStart)}}if(optionalCommaStart)this.unexpected(optionalCommaStart);if(spreadStart)this.unexpected(spreadStart);if(refShorthandDefaultPos.start)this.unexpected(refShorthandDefaultPos.start);if(exprList.length>1){val=this.startNodeAt(innerStart);val.expressions=exprList;this.finishNodeAt(val,"SequenceExpression",innerEnd)}else{val=exprList[0]}}else{val=this.parseParenExpression()}if(this.options.preserveParens){var par=this.startNodeAt(start);par.expression=val;return this.finishNode(par,"ParenthesizedExpression")}else{val.parenthesizedExpression=true;return val}};pp.parseParenArrowList=function(start,exprList,isAsync){return this.parseArrowExpression(this.startNodeAt(start),exprList,isAsync)};pp.parseParenItem=function(node,start){return node};var empty=[];pp.parseNew=function(){var node=this.startNode();var meta=this.parseIdent(true);if(this.options.ecmaVersion>=6&&this.eat(_tokentype.types.dot)){node.meta=meta;node.property=this.parseIdent(true);if(node.property.name!=="target")this.raise(node.property.start,"The only valid meta property for new is new.target");return this.finishNode(node,"MetaProperty")}node.callee=this.parseNoCallExpr();if(this.eat(_tokentype.types.parenL))node.arguments=this.parseExprList(_tokentype.types.parenR,this.options.features["es7.trailingFunctionCommas"]);else node.arguments=empty;return this.finishNode(node,"NewExpression")};pp.parseTemplateElement=function(){var elem=this.startNode();elem.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value};this.next();elem.tail=this.type===_tokentype.types.backQuote;return this.finishNode(elem,"TemplateElement")};pp.parseTemplate=function(){var node=this.startNode();this.next();node.expressions=[];var curElt=this.parseTemplateElement();node.quasis=[curElt];while(!curElt.tail){this.expect(_tokentype.types.dollarBraceL);node.expressions.push(this.parseExpression());this.expect(_tokentype.types.braceR);node.quasis.push(curElt=this.parseTemplateElement())}this.next();return this.finishNode(node,"TemplateLiteral")};pp.parseObj=function(isPattern,refShorthandDefaultPos){var node=this.startNode(),first=true,propHash={};node.properties=[];var decorators=[];this.next();while(!this.eat(_tokentype.types.braceR)){if(!first){this.expect(_tokentype.types.comma);if(this.afterTrailingComma(_tokentype.types.braceR))break}else first=false;while(this.type===_tokentype.types.at){decorators.push(this.parseDecorator())}var prop=this.startNode(),isGenerator=false,isAsync=false,start=undefined;if(decorators.length){prop.decorators=decorators;decorators=[]}if(this.options.features["es7.objectRestSpread"]&&this.type===_tokentype.types.ellipsis){prop=this.parseSpread();prop.type="SpreadProperty";node.properties.push(prop);continue}if(this.options.ecmaVersion>=6){prop.method=false;prop.shorthand=false;if(isPattern||refShorthandDefaultPos)start=this.markPosition();if(!isPattern)isGenerator=this.eat(_tokentype.types.star)}if(this.options.features["es7.asyncFunctions"]&&this.isContextual("async")){if(isGenerator||isPattern)this.unexpected();var asyncId=this.parseIdent();if(this.type===_tokentype.types.colon||this.type===_tokentype.types.parenL){prop.key=asyncId}else{isAsync=true;this.parsePropertyName(prop)}}else{this.parsePropertyName(prop)}this.parseObjPropValue(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos);this.checkPropClash(prop,propHash);node.properties.push(this.finishNode(prop,"Property"))}if(decorators.length){this.raise(this.start,"You have trailing decorators with no property")}return this.finishNode(node,isPattern?"ObjectPattern":"ObjectExpression")};pp.parseObjPropValue=function(prop,start,isGenerator,isAsync,isPattern,refShorthandDefaultPos){if(this.eat(_tokentype.types.colon)){prop.value=isPattern?this.parseMaybeDefault():this.parseMaybeAssign(false,refShorthandDefaultPos);prop.kind="init"}else if(this.options.ecmaVersion>=6&&this.type===_tokentype.types.parenL){if(isPattern)this.unexpected();prop.kind="init";prop.method=true;prop.value=this.parseMethod(isGenerator,isAsync)}else if(this.options.ecmaVersion>=5&&!prop.computed&&prop.key.type==="Identifier"&&(prop.key.name==="get"||prop.key.name==="set")&&(this.type!=_tokentype.types.comma&&this.type!=_tokentype.types.braceR)){if(isGenerator||isAsync||isPattern)this.unexpected();prop.kind=prop.key.name;this.parsePropertyName(prop);prop.value=this.parseMethod(false);var paramCount=prop.kind==="get"?0:1;if(prop.value.params.length!==paramCount){var _start=prop.value.start;if(prop.kind==="get")this.raise(_start,"getter should have no params");else this.raise(_start,"setter should have exactly one param")}}else if(this.options.ecmaVersion>=6&&!prop.computed&&prop.key.type==="Identifier"){prop.kind="init";if(isPattern){if(this.isKeyword(prop.key.name)||this.strict&&(_identifier.reservedWords.strictBind(prop.key.name)||_identifier.reservedWords.strict(prop.key.name))||!this.options.allowReserved&&this.isReservedWord(prop.key.name))this.raise(prop.key.start,"Binding "+prop.key.name);prop.value=this.parseMaybeDefault(start,prop.key)}else if(this.type===_tokentype.types.eq&&refShorthandDefaultPos){if(!refShorthandDefaultPos.start)refShorthandDefaultPos.start=this.start;prop.value=this.parseMaybeDefault(start,prop.key)}else{prop.value=prop.key}prop.shorthand=true}else this.unexpected()};pp.parsePropertyName=function(prop){if(this.options.ecmaVersion>=6){if(this.eat(_tokentype.types.bracketL)){prop.computed=true;prop.key=this.parseMaybeAssign();this.expect(_tokentype.types.bracketR);return prop.key}else{prop.computed=false}}return prop.key=this.type===_tokentype.types.num||this.type===_tokentype.types.string?this.parseExprAtom():this.parseIdent(true)};pp.initFunction=function(node,isAsync){node.id=null;if(this.options.ecmaVersion>=6){node.generator=false;node.expression=false}if(this.options.features["es7.asyncFunctions"]){node.async=!!isAsync}};pp.parseMethod=function(isGenerator,isAsync){var node=this.startNode();this.initFunction(node,isAsync);this.expect(_tokentype.types.parenL);node.params=this.parseBindingList(_tokentype.types.parenR,false,this.options.features["es7.trailingFunctionCommas"]);if(this.options.ecmaVersion>=6){node.generator=isGenerator}this.parseFunctionBody(node);return this.finishNode(node,"FunctionExpression")};pp.parseArrowExpression=function(node,params,isAsync){this.initFunction(node,isAsync);node.params=this.toAssignableList(params,true);this.parseFunctionBody(node,true);return this.finishNode(node,"ArrowFunctionExpression")};pp.parseFunctionBody=function(node,allowExpression){var isExpression=allowExpression&&this.type!==_tokentype.types.braceL;var oldInAsync=this.inAsync;this.inAsync=node.async;if(isExpression){node.body=this.parseMaybeAssign();node.expression=true}else{var oldInFunc=this.inFunction,oldInGen=this.inGenerator,oldLabels=this.labels;this.inFunction=true;this.inGenerator=node.generator;this.labels=[];node.body=this.parseBlock(true);node.expression=false;this.inFunction=oldInFunc;this.inGenerator=oldInGen;this.labels=oldLabels}this.inAsync=oldInAsync;if(this.strict||!isExpression&&node.body.body.length&&this.isUseStrict(node.body.body[0])){var nameHash={},oldStrict=this.strict;this.strict=true;if(node.id)this.checkLVal(node.id,true);for(var i=0;i=6||this.input.slice(this.start,this.end).indexOf("\\")==-1)))this.raise(this.start,"The keyword '"+this.value+"' is reserved");node.name=this.value}else if(liberal&&this.type.keyword){node.name=this.type.keyword}else{this.unexpected()}this.next();return this.finishNode(node,"Identifier")};pp.parseAwait=function(node){if(this.eat(_tokentype.types.semi)||this.canInsertSemicolon()){this.unexpected()}node.all=this.eat(_tokentype.types.star);node.argument=this.parseMaybeUnary();return this.finishNode(node,"AwaitExpression")};pp.parseYield=function(){var node=this.startNode();this.next();if(this.type==_tokentype.types.semi||this.canInsertSemicolon()||this.type!=_tokentype.types.star&&!this.type.startsExpr){node.delegate=false;node.argument=null}else{node.delegate=this.eat(_tokentype.types.star);node.argument=this.parseMaybeAssign()}return this.finishNode(node,"YieldExpression")};pp.parseComprehension=function(node,isGenerator){node.blocks=[];while(this.type===_tokentype.types._for){var block=this.startNode();this.next();this.expect(_tokentype.types.parenL);block.left=this.parseBindingAtom();this.checkLVal(block.left,true);this.expectContextual("of");block.right=this.parseExpression();this.expect(_tokentype.types.parenR);node.blocks.push(this.finishNode(block,"ComprehensionBlock"))}node.filter=this.eat(_tokentype.types._if)?this.parseParenExpression():null;node.body=this.parseExpression();this.expect(isGenerator?_tokentype.types.parenR:_tokentype.types.bracketR);node.generator=isGenerator;return this.finishNode(node,"ComprehensionExpression")}},{"./../../babel/tools/protect.js":52,"./identifier":4,"./state":12,"./tokentype":16,"./util":17}],4:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;exports.isIdentifierStart=isIdentifierStart;exports.isIdentifierChar=isIdentifierChar;_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function makePredicate(words){words=words.split(" ");return function(str){return words.indexOf(str)>=0}}var reservedWords={3:makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"),5:makePredicate("class enum extends super const export import"),6:makePredicate("enum await"),strict:makePredicate("implements interface let package private protected public static yield"),strictBind:makePredicate("eval arguments")};exports.reservedWords=reservedWords;var ecma5AndLessKeywords="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";var keywords={5:makePredicate(ecma5AndLessKeywords),6:makePredicate(ecma5AndLessKeywords+" let const class extends export import yield super")};exports.keywords=keywords;var nonASCIIidentifierStartChars="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var nonASCIIidentifierChars="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_";var nonASCIIidentifierStart=new RegExp("["+nonASCIIidentifierStartChars+"]");var nonASCIIidentifier=new RegExp("["+nonASCIIidentifierStartChars+nonASCIIidentifierChars+"]");nonASCIIidentifierStartChars=nonASCIIidentifierChars=null;var astralIdentifierStartCodes=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,99,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,98,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,955,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,38,17,2,24,133,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,32,4,287,47,21,1,2,0,185,46,82,47,21,0,60,42,502,63,32,0,449,56,1288,920,104,110,2962,1070,13266,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,16481,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,1340,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,16355,541];var astralIdentifierCodes=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,16,9,83,11,168,11,6,9,8,2,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,316,19,13,9,214,6,3,8,112,16,16,9,82,12,9,9,535,9,20855,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,4305,6,792618,239];function isInAstralSet(code,set){var pos=65536;for(var i=0;icode)return false;pos+=set[i+1];if(pos>=code)return true}}function isIdentifierStart(code,astral){if(code<65)return code===36;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;if(code<=65535)return code>=170&&nonASCIIidentifierStart.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)}function isIdentifierChar(code,astral){if(code<48)return code===36;if(code<58)return true;if(code<65)return false;if(code<91)return true;if(code<97)return code===95;if(code<123)return true;if(code<=65535)return code>=170&&nonASCIIidentifier.test(String.fromCharCode(code));if(astral===false)return false;return isInAstralSet(code,astralIdentifierStartCodes)||isInAstralSet(code,astralIdentifierCodes)}},{"./../../babel/tools/protect.js":52}],5:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;exports.parse=parse;exports.parseExpressionAt=parseExpressionAt;exports.tokenizer=tokenizer;var _state=require("./state");var _options=require("./options");require("./parseutil");require("./statement");require("./lval");require("./expression");require("./lookahead");_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.Parser=_state.Parser;exports.plugins=_state.plugins;exports.defaultOptions=_options.defaultOptions;var _location=require("./location");exports.SourceLocation=_location.SourceLocation;exports.getLineInfo=_location.getLineInfo;var _node=require("./node");exports.Node=_node.Node;var _tokentype=require("./tokentype");exports.TokenType=_tokentype.TokenType;exports.tokTypes=_tokentype.types;var _tokencontext=require("./tokencontext");exports.TokContext=_tokencontext.TokContext;exports.tokContexts=_tokencontext.types;var _identifier=require("./identifier");exports.isIdentifierChar=_identifier.isIdentifierChar;exports.isIdentifierStart=_identifier.isIdentifierStart;var _tokenize=require("./tokenize");exports.Token=_tokenize.Token;var _whitespace=require("./whitespace");exports.isNewLine=_whitespace.isNewLine;exports.lineBreak=_whitespace.lineBreak;exports.lineBreakG=_whitespace.lineBreakG;var version="1.0.0";exports.version=version;function parse(input,options){var p=parser(options,input);var startPos=p.options.locations?[p.pos,p.curPosition()]:p.pos;p.nextToken();return p.parseTopLevel(p.options.program||p.startNodeAt(startPos))}function parseExpressionAt(input,pos,options){var p=parser(options,input,pos);p.nextToken();return p.parseExpression()}function tokenizer(input,options){return parser(options,input)}function parser(options,input){return new _state.Parser(_options.getOptions(options),String(input))}},{"./../../babel/tools/protect.js":52,"./expression":3,"./identifier":4,"./location":6,"./lookahead":7,"./lval":8,"./node":9,"./options":10,"./parseutil":11,"./state":12,"./statement":13,"./tokencontext":14,"./tokenize":15,"./tokentype":16,"./whitespace":18}],6:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;exports.getLineInfo=getLineInfo;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _state=require("./state");var _whitespace=require("./whitespace");_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var Position=function(){function Position(line,col){_classCallCheck(this,Position);this.line=line;this.column=col}Position.prototype.offset=function offset(n){return new Position(this.line,this.column+n)};return Position}();exports.Position=Position;var SourceLocation=function SourceLocation(p,start,end){_classCallCheck(this,SourceLocation);this.start=start;this.end=end;if(p.sourceFile!==null)this.source=p.sourceFile};exports.SourceLocation=SourceLocation;function getLineInfo(input,offset){for(var line=1,cur=0;;){_whitespace.lineBreakG.lastIndex=cur;var match=_whitespace.lineBreakG.exec(input);if(match&&match.index=6&&node){switch(node.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":break;case"ObjectExpression":node.type="ObjectPattern";for(var i=0;i=5&&stmt.type==="ExpressionStatement"&&stmt.expression.type==="Literal"&&stmt.expression.value==="use strict"};pp.eat=function(type){if(this.type===type){this.next();return true}else{return false}};pp.isContextual=function(name){return this.type===_tokentype.types.name&&this.value===name};pp.eatContextual=function(name){return this.value===name&&this.eat(_tokentype.types.name)};pp.expectContextual=function(name){if(!this.eatContextual(name))this.unexpected()};pp.canInsertSemicolon=function(){return this.type===_tokentype.types.eof||this.type===_tokentype.types.braceR||_whitespace.lineBreak.test(this.input.slice(this.lastTokEnd,this.start))};pp.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return true}};pp.semicolon=function(){if(!this.eat(_tokentype.types.semi)&&!this.insertSemicolon())this.unexpected()};pp.afterTrailingComma=function(tokType){if(this.type==tokType){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);this.next();return true}};pp.expect=function(type){this.eat(type)||this.unexpected()};pp.unexpected=function(pos){this.raise(pos!=null?pos:this.start,"Unexpected token")}},{"./../../babel/tools/protect.js":52,"./state":12,"./tokentype":16,"./whitespace":18}],12:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;exports.Parser=Parser;var _identifier=require("./identifier");var _tokentype=require("./tokentype");var _whitespace=require("./whitespace");_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function Parser(options,input,startPos){this.options=options;this.sourceFile=this.options.sourceFile||null;this.isKeyword=_identifier.keywords[this.options.ecmaVersion>=6?6:5];this.isReservedWord=_identifier.reservedWords[this.options.ecmaVersion];this.input=input;this.loadPlugins(this.options.plugins);
+if(startPos){this.pos=startPos;this.lineStart=Math.max(0,this.input.lastIndexOf("\n",startPos));this.curLine=this.input.slice(0,this.lineStart).split(_whitespace.lineBreak).length}else{this.pos=this.lineStart=0;this.curLine=1}this.type=_tokentype.types.eof;this.value=null;this.start=this.end=this.pos;this.startLoc=this.endLoc=null;this.lastTokEndLoc=this.lastTokStartLoc=null;this.lastTokStart=this.lastTokEnd=this.pos;this.context=this.initialContext();this.exprAllowed=true;this.inModule=this.options.sourceType==="module";this.strict=this.options.strictMode===false?false:this.inModule;this.potentialArrowAt=-1;this.inFunction=this.inGenerator=false;this.labels=[];this.decorators=[];if(this.pos===0&&this.options.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2)}Parser.prototype.extend=function(name,f){this[name]=f(this[name])};var plugins={};exports.plugins=plugins;Parser.prototype.loadPlugins=function(plugins){for(var _name in plugins){var plugin=exports.plugins[_name];if(!plugin)throw new Error("Plugin '"+_name+"' not found");plugin(this,plugins[_name])}}},{"./../../babel/tools/protect.js":52,"./identifier":4,"./tokentype":16,"./whitespace":18}],13:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);var _tokentype=require("./tokentype");var _state=require("./state");var _whitespace=require("./whitespace");_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var pp=_state.Parser.prototype;pp.parseTopLevel=function(node){var first=true;if(!node.body)node.body=[];while(this.type!==_tokentype.types.eof){var stmt=this.parseStatement(true,true);node.body.push(stmt);if(first&&this.isUseStrict(stmt))this.setStrict(true);first=false}this.next();if(this.options.ecmaVersion>=6){node.sourceType=this.options.sourceType}return this.finishNode(node,"Program")};var loopLabel={kind:"loop"},switchLabel={kind:"switch"};pp.parseStatement=function(declaration,topLevel){if(this.type===_tokentype.types.at){this.parseDecorators(true)}var starttype=this.type,node=this.startNode();switch(starttype){case _tokentype.types._break:case _tokentype.types._continue:return this.parseBreakContinueStatement(node,starttype.keyword);case _tokentype.types._debugger:return this.parseDebuggerStatement(node);case _tokentype.types._do:return this.parseDoStatement(node);case _tokentype.types._for:return this.parseForStatement(node);case _tokentype.types._function:if(!declaration&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(node);case _tokentype.types._class:if(!declaration)this.unexpected();this.takeDecorators(node);return this.parseClass(node,true);case _tokentype.types._if:return this.parseIfStatement(node);case _tokentype.types._return:return this.parseReturnStatement(node);case _tokentype.types._switch:return this.parseSwitchStatement(node);case _tokentype.types._throw:return this.parseThrowStatement(node);case _tokentype.types._try:return this.parseTryStatement(node);case _tokentype.types._let:case _tokentype.types._const:if(!declaration)this.unexpected();case _tokentype.types._var:return this.parseVarStatement(node,starttype);case _tokentype.types._while:return this.parseWhileStatement(node);case _tokentype.types._with:return this.parseWithStatement(node);case _tokentype.types.braceL:return this.parseBlock();case _tokentype.types.semi:return this.parseEmptyStatement(node);case _tokentype.types._export:case _tokentype.types._import:if(!this.options.allowImportExportEverywhere){if(!topLevel)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return starttype===_tokentype.types._import?this.parseImport(node):this.parseExport(node);case _tokentype.types.name:if(this.options.features["es7.asyncFunctions"]&&this.value==="async"){var lookahead=this.lookahead();if(lookahead.type===_tokentype.types._function&&!this.canInsertSemicolon.call(lookahead)){this.next();this.expect(_tokentype.types._function);return this.parseFunction(node,true,false,true)}}default:var maybeName=this.value,expr=this.parseExpression();if(starttype===_tokentype.types.name&&expr.type==="Identifier"&&this.eat(_tokentype.types.colon))return this.parseLabeledStatement(node,maybeName,expr);else return this.parseExpressionStatement(node,expr)}};pp.takeDecorators=function(node){if(this.decorators.length){node.decorators=this.decorators;this.decorators=[]}};pp.parseDecorators=function(allowExport){while(this.type===_tokentype.types.at){this.decorators.push(this.parseDecorator())}if(allowExport&&this.type===_tokentype.types._export){return}if(this.type!==_tokentype.types._class){this.raise(this.start,"Leading decorators must be attached to a class declaration")}};pp.parseDecorator=function(allowExport){if(!this.options.features["es7.decorators"]){this.unexpected()}var node=this.startNode();this.next();node.expression=this.parseMaybeAssign();return this.finishNode(node,"Decorator")};pp.parseBreakContinueStatement=function(node,keyword){var isBreak=keyword=="break";this.next();if(this.eat(_tokentype.types.semi)||this.insertSemicolon())node.label=null;else if(this.type!==_tokentype.types.name)this.unexpected();else{node.label=this.parseIdent();this.semicolon()}for(var i=0;i=6)this.eat(_tokentype.types.semi);else this.semicolon();return this.finishNode(node,"DoWhileStatement")};pp.parseForStatement=function(node){this.next();this.labels.push(loopLabel);this.expect(_tokentype.types.parenL);if(this.type===_tokentype.types.semi)return this.parseFor(node,null);if(this.type===_tokentype.types._var||this.type===_tokentype.types._let||this.type===_tokentype.types._const){var _init=this.startNode(),varKind=this.type;this.next();this.parseVar(_init,true,varKind);this.finishNode(_init,"VariableDeclaration");if((this.type===_tokentype.types._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&_init.declarations.length===1&&!(varKind!==_tokentype.types._var&&_init.declarations[0].init))return this.parseForIn(node,_init);return this.parseFor(node,_init)}var refShorthandDefaultPos={start:0};var init=this.parseExpression(true,refShorthandDefaultPos);if(this.type===_tokentype.types._in||this.options.ecmaVersion>=6&&this.isContextual("of")){this.toAssignable(init);this.checkLVal(init);return this.parseForIn(node,init)}else if(refShorthandDefaultPos.start){this.unexpected(refShorthandDefaultPos.start)}return this.parseFor(node,init)};pp.parseFunctionStatement=function(node){this.next();return this.parseFunction(node,true)};pp.parseIfStatement=function(node){this.next();node.test=this.parseParenExpression();node.consequent=this.parseStatement(false);node.alternate=this.eat(_tokentype.types._else)?this.parseStatement(false):null;return this.finishNode(node,"IfStatement")};pp.parseReturnStatement=function(node){if(!this.inFunction&&!this.options.allowReturnOutsideFunction)this.raise(this.start,"'return' outside of function");this.next();if(this.eat(_tokentype.types.semi)||this.insertSemicolon())node.argument=null;else{node.argument=this.parseExpression();this.semicolon()}return this.finishNode(node,"ReturnStatement")};pp.parseSwitchStatement=function(node){this.next();node.discriminant=this.parseParenExpression();node.cases=[];this.expect(_tokentype.types.braceL);this.labels.push(switchLabel);for(var cur,sawDefault;this.type!=_tokentype.types.braceR;){if(this.type===_tokentype.types._case||this.type===_tokentype.types._default){var isCase=this.type===_tokentype.types._case;if(cur)this.finishNode(cur,"SwitchCase");node.cases.push(cur=this.startNode());cur.consequent=[];this.next();if(isCase){cur.test=this.parseExpression()}else{if(sawDefault)this.raise(this.lastTokStart,"Multiple default clauses");sawDefault=true;cur.test=null}this.expect(_tokentype.types.colon)}else{if(!cur)this.unexpected();cur.consequent.push(this.parseStatement(true))}}if(cur)this.finishNode(cur,"SwitchCase");this.next();this.labels.pop();return this.finishNode(node,"SwitchStatement")};pp.parseThrowStatement=function(node){this.next();if(_whitespace.lineBreak.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");node.argument=this.parseExpression();this.semicolon();return this.finishNode(node,"ThrowStatement")};var empty=[];pp.parseTryStatement=function(node){this.next();node.block=this.parseBlock();node.handler=null;if(this.type===_tokentype.types._catch){var clause=this.startNode();this.next();this.expect(_tokentype.types.parenL);clause.param=this.parseBindingAtom();this.checkLVal(clause.param,true);this.expect(_tokentype.types.parenR);clause.guard=null;clause.body=this.parseBlock();node.handler=this.finishNode(clause,"CatchClause")}node.guardedHandlers=empty;node.finalizer=this.eat(_tokentype.types._finally)?this.parseBlock():null;if(!node.handler&&!node.finalizer)this.raise(node.start,"Missing catch or finally clause");return this.finishNode(node,"TryStatement")};pp.parseVarStatement=function(node,kind){this.next();this.parseVar(node,false,kind);this.semicolon();return this.finishNode(node,"VariableDeclaration")};pp.parseWhileStatement=function(node){this.next();node.test=this.parseParenExpression();this.labels.push(loopLabel);node.body=this.parseStatement(false);this.labels.pop();return this.finishNode(node,"WhileStatement")};pp.parseWithStatement=function(node){if(this.strict)this.raise(this.start,"'with' in strict mode");this.next();node.object=this.parseParenExpression();node.body=this.parseStatement(false);return this.finishNode(node,"WithStatement")};pp.parseEmptyStatement=function(node){this.next();return this.finishNode(node,"EmptyStatement")};pp.parseLabeledStatement=function(node,maybeName,expr){for(var i=0;i=0;i--){var label=this.labels[i];if(label.statementStart==node.start){label.statementStart=this.start;label.kind=kind}else break}this.labels.push({name:maybeName,kind:kind,statementStart:this.start});node.body=this.parseStatement(true);this.labels.pop();node.label=expr;return this.finishNode(node,"LabeledStatement")};pp.parseExpressionStatement=function(node,expr){node.expression=expr;this.semicolon();return this.finishNode(node,"ExpressionStatement")};pp.parseBlock=function(allowStrict){var node=this.startNode(),first=true,oldStrict=undefined;node.body=[];this.expect(_tokentype.types.braceL);while(!this.eat(_tokentype.types.braceR)){var stmt=this.parseStatement(true);node.body.push(stmt);if(first&&allowStrict&&this.isUseStrict(stmt)){oldStrict=this.strict;this.setStrict(this.strict=true)}first=false}if(oldStrict===false)this.setStrict(false);return this.finishNode(node,"BlockStatement")};pp.parseFor=function(node,init){node.init=init;this.expect(_tokentype.types.semi);node.test=this.type===_tokentype.types.semi?null:this.parseExpression();this.expect(_tokentype.types.semi);node.update=this.type===_tokentype.types.parenR?null:this.parseExpression();this.expect(_tokentype.types.parenR);node.body=this.parseStatement(false);this.labels.pop();return this.finishNode(node,"ForStatement")};pp.parseForIn=function(node,init){var type=this.type===_tokentype.types._in?"ForInStatement":"ForOfStatement";this.next();node.left=init;node.right=this.parseExpression();this.expect(_tokentype.types.parenR);node.body=this.parseStatement(false);this.labels.pop();return this.finishNode(node,type)};pp.parseVar=function(node,isFor,kind){node.declarations=[];node.kind=kind.keyword;for(;;){var decl=this.startNode();this.parseVarHead(decl);if(this.eat(_tokentype.types.eq)){decl.init=this.parseMaybeAssign(isFor)}else if(kind===_tokentype.types._const&&!(this.type===_tokentype.types._in||this.options.ecmaVersion>=6&&this.isContextual("of"))){this.unexpected()}else if(decl.id.type!="Identifier"&&!(isFor&&(this.type===_tokentype.types._in||this.isContextual("of")))){this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value")}else{decl.init=null}node.declarations.push(this.finishNode(decl,"VariableDeclarator"));if(!this.eat(_tokentype.types.comma))break}return node};pp.parseVarHead=function(decl){decl.id=this.parseBindingAtom();this.checkLVal(decl.id,true)};pp.parseFunction=function(node,isStatement,allowExpressionBody,isAsync){this.initFunction(node,isAsync);if(this.options.ecmaVersion>=6)node.generator=this.eat(_tokentype.types.star);if(isStatement||this.type===_tokentype.types.name)node.id=this.parseIdent();this.parseFunctionParams(node);this.parseFunctionBody(node,allowExpressionBody);return this.finishNode(node,isStatement?"FunctionDeclaration":"FunctionExpression")};pp.parseFunctionParams=function(node){this.expect(_tokentype.types.parenL);node.params=this.parseBindingList(_tokentype.types.parenR,false,this.options.features["es7.trailingFunctionCommas"])};pp.parseClass=function(node,isStatement){this.next();this.parseClassId(node,isStatement);this.parseClassSuper(node);var classBody=this.startNode();var hadConstructor=false;classBody.body=[];this.expect(_tokentype.types.braceL);var decorators=[];while(!this.eat(_tokentype.types.braceR)){if(this.eat(_tokentype.types.semi))continue;if(this.type===_tokentype.types.at){decorators.push(this.parseDecorator());continue}var method=this.startNode();if(decorators.length){method.decorators=decorators;decorators=[]}var isMaybeStatic=this.type===_tokentype.types.name&&this.value==="static";var isGenerator=this.eat(_tokentype.types.star),isAsync=false;this.parsePropertyName(method);method["static"]=isMaybeStatic&&this.type!==_tokentype.types.parenL;if(method["static"]){if(isGenerator)this.unexpected();isGenerator=this.eat(_tokentype.types.star);this.parsePropertyName(method)}if(!isGenerator&&method.key.type==="Identifier"&&!method.computed&&this.isClassProperty()){classBody.body.push(this.parseClassProperty(method));continue}if(this.options.features["es7.asyncFunctions"]&&this.type!==_tokentype.types.parenL&&!method.computed&&method.key.type==="Identifier"&&method.key.name==="async"){isAsync=true;this.parsePropertyName(method)}var isGetSet=false;method.kind="method";if(!method.computed){var key=method.key;if(!isAsync&&!isGenerator&&key.type==="Identifier"&&this.type!==_tokentype.types.parenL&&(key.name==="get"||key.name==="set")){isGetSet=true;method.kind=key.name;key=this.parsePropertyName(method)}if(!method["static"]&&(key.type==="Identifier"&&key.name==="constructor"||key.type==="Literal"&&key.value==="constructor")){if(hadConstructor)this.raise(key.start,"Duplicate constructor in the same class");if(isGetSet)this.raise(key.start,"Constructor can't have get/set modifier");if(isGenerator)this.raise(key.start,"Constructor can't be a generator");if(isAsync)this.raise(key.start,"Constructor can't be an async function");method.kind="constructor";hadConstructor=true}}if(method.kind==="constructor"&&method.decorators){this.raise(method.start,"You can't attach decorators to a class constructor")}this.parseClassMethod(classBody,method,isGenerator,isAsync);if(isGetSet){var paramCount=method.kind==="get"?0:1;if(method.value.params.length!==paramCount){var start=method.value.start;if(method.kind==="get")this.raise(start,"getter should have no params");else this.raise(start,"setter should have exactly one param")}}}if(decorators.length){this.raise(this.start,"You have trailing decorators with no method")}node.body=this.finishNode(classBody,"ClassBody");return this.finishNode(node,isStatement?"ClassDeclaration":"ClassExpression")};pp.isClassProperty=function(){return this.type===_tokentype.types.eq||(this.type===_tokentype.types.semi||this.canInsertSemicolon())};pp.parseClassProperty=function(node){if(this.type===_tokentype.types.eq){if(!this.options.features["es7.classProperties"])this.unexpected();this.next();node.value=this.parseMaybeAssign()}else{node.value=null}this.semicolon();return this.finishNode(node,"ClassProperty")};pp.parseClassMethod=function(classBody,method,isGenerator,isAsync){method.value=this.parseMethod(isGenerator,isAsync);classBody.body.push(this.finishNode(method,"MethodDefinition"))};pp.parseClassId=function(node,isStatement){node.id=this.type===_tokentype.types.name?this.parseIdent():isStatement?this.unexpected():null};pp.parseClassSuper=function(node){node.superClass=this.eat(_tokentype.types._extends)?this.parseExprSubscripts():null};pp.parseExport=function(node){this.next();if(this.type===_tokentype.types.star){var specifier=this.startNode();this.next();if(this.options.features["es7.exportExtensions"]&&this.eatContextual("as")){specifier.exported=this.parseIdent();node.specifiers=[this.finishNode(specifier,"ExportNamespaceSpecifier")];this.parseExportSpecifiersMaybe(node);this.parseExportFrom(node)}else{this.parseExportFrom(node);return this.finishNode(node,"ExportAllDeclaration")}}else if(this.options.features["es7.exportExtensions"]&&this.isExportDefaultSpecifier()){var specifier=this.startNode();specifier.exported=this.parseIdent(true);node.specifiers=[this.finishNode(specifier,"ExportDefaultSpecifier")];if(this.type===_tokentype.types.comma&&this.lookahead().type===_tokentype.types.star){this.expect(_tokentype.types.comma);var _specifier=this.startNode();this.expect(_tokentype.types.star);this.expectContextual("as");_specifier.exported=this.parseIdent();node.specifiers.push(this.finishNode(_specifier,"ExportNamespaceSpecifier"))}else{this.parseExportSpecifiersMaybe(node)}this.parseExportFrom(node)}else if(this.eat(_tokentype.types._default)){var expr=this.parseMaybeAssign();var needsSemi=true;if(expr.type=="FunctionExpression"||expr.type=="ClassExpression"){needsSemi=false;if(expr.id){expr.type=expr.type=="FunctionExpression"?"FunctionDeclaration":"ClassDeclaration"}}node.declaration=expr;if(needsSemi)this.semicolon();this.checkExport(node);return this.finishNode(node,"ExportDefaultDeclaration")}else if(this.type.keyword||this.shouldParseExportDeclaration()){node.declaration=this.parseStatement(true);node.specifiers=[];node.source=null}else{node.declaration=null;node.specifiers=this.parseExportSpecifiers();if(this.eatContextual("from")){node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected()}else{node.source=null}this.semicolon()}this.checkExport(node);return this.finishNode(node,"ExportNamedDeclaration")};pp.isExportDefaultSpecifier=function(){if(this.type===_tokentype.types.name){return this.value!=="type"&&this.value!=="async"}if(this.type!==_tokentype.types._default){return false}var lookahead=this.lookahead();return lookahead.type===_tokentype.types.comma||lookahead.type===_tokentype.types.name&&lookahead.value==="from"};pp.parseExportSpecifiersMaybe=function(node){if(this.eat(_tokentype.types.comma)){node.specifiers=node.specifiers.concat(this.parseExportSpecifiers())}};pp.parseExportFrom=function(node){this.expectContextual("from");node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected();this.semicolon();this.checkExport(node)};pp.shouldParseExportDeclaration=function(){return this.options.features["es7.asyncFunctions"]&&this.isContextual("async")};pp.checkExport=function(node){if(this.decorators.length){var isClass=node.declaration&&(node.declaration.type==="ClassDeclaration"||node.declaration.type==="ClassExpression");if(!node.declaration||!isClass){this.raise(node.start,"You can only use decorators on an export when exporting a class")}this.takeDecorators(node.declaration)}};pp.parseExportSpecifiers=function(){var nodes=[],first=true;this.expect(_tokentype.types.braceL);while(!this.eat(_tokentype.types.braceR)){if(!first){this.expect(_tokentype.types.comma);if(this.afterTrailingComma(_tokentype.types.braceR))break}else first=false;var node=this.startNode();node.local=this.parseIdent(this.type===_tokentype.types._default);node.exported=this.eatContextual("as")?this.parseIdent(true):node.local;nodes.push(this.finishNode(node,"ExportSpecifier"))}return nodes};pp.parseImport=function(node){this.next();if(this.type===_tokentype.types.string){node.specifiers=empty;node.source=this.parseExprAtom()}else{node.specifiers=[];this.parseImportSpecifiers(node);this.expectContextual("from");node.source=this.type===_tokentype.types.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(node,"ImportDeclaration")};pp.parseImportSpecifiers=function(node){var first=true;if(this.type===_tokentype.types.name){var start=this.markPosition();node.specifiers.push(this.parseImportSpecifierDefault(this.parseIdent(),start));if(!this.eat(_tokentype.types.comma))return}if(this.type===_tokentype.types.star){var specifier=this.startNode();this.next();this.expectContextual("as");specifier.local=this.parseIdent();this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportNamespaceSpecifier"));return}this.expect(_tokentype.types.braceL);while(!this.eat(_tokentype.types.braceR)){if(!first){this.expect(_tokentype.types.comma);if(this.afterTrailingComma(_tokentype.types.braceR))break}else first=false;var specifier=this.startNode();specifier.imported=this.parseIdent(true);specifier.local=this.eatContextual("as")?this.parseIdent():specifier.imported;this.checkLVal(specifier.local,true);node.specifiers.push(this.finishNode(specifier,"ImportSpecifier"))}};pp.parseImportSpecifierDefault=function(id,start){var node=this.startNodeAt(start);node.local=id;this.checkLVal(node.local,true);return this.finishNode(node,"ImportDefaultSpecifier")}},{"./../../babel/tools/protect.js":52,"./state":12,"./tokentype":16,"./whitespace":18}],14:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _state=require("./state");var _tokentype=require("./tokentype");var _whitespace=require("./whitespace");_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var TokContext=function TokContext(token,isExpr,preserveSpace,override){_classCallCheck(this,TokContext);this.token=token;this.isExpr=isExpr;this.preserveSpace=preserveSpace;this.override=override};exports.TokContext=TokContext;var types={b_stat:new TokContext("{",false),b_expr:new TokContext("{",true),b_tmpl:new TokContext("${",true),p_stat:new TokContext("(",false),p_expr:new TokContext("(",true),q_tmpl:new TokContext("`",true,true,function(p){return p.readTmplToken()}),f_expr:new TokContext("function",true)};exports.types=types;var pp=_state.Parser.prototype;pp.initialContext=function(){return[types.b_stat]};pp.braceIsBlock=function(prevType){var parent=undefined;if(prevType===_tokentype.types.colon&&(parent=this.curContext()).token=="{")return!parent.isExpr;if(prevType===_tokentype.types._return)return _whitespace.lineBreak.test(this.input.slice(this.lastTokEnd,this.start));if(prevType===_tokentype.types._else||prevType===_tokentype.types.semi||prevType===_tokentype.types.eof)return true;if(prevType==_tokentype.types.braceL)return this.curContext()===types.b_stat;return!this.exprAllowed};pp.updateContext=function(prevType){var update=undefined,type=this.type;if(type.keyword&&prevType==_tokentype.types.dot)this.exprAllowed=false;else if(update=type.updateContext)update.call(this,prevType);else this.exprAllowed=type.beforeExpr};_tokentype.types.parenR.updateContext=_tokentype.types.braceR.updateContext=function(){if(this.context.length==1){this.exprAllowed=true;return}var out=this.context.pop();if(out===types.b_stat&&this.curContext()===types.f_expr){this.context.pop();this.exprAllowed=false}else if(out===types.b_tmpl){this.exprAllowed=true}else{this.exprAllowed=!out.isExpr}};_tokentype.types.braceL.updateContext=function(prevType){this.context.push(this.braceIsBlock(prevType)?types.b_stat:types.b_expr);this.exprAllowed=true};_tokentype.types.dollarBraceL.updateContext=function(){this.context.push(types.b_tmpl);this.exprAllowed=true};_tokentype.types.parenL.updateContext=function(prevType){var statementParens=prevType===_tokentype.types._if||prevType===_tokentype.types._for||prevType===_tokentype.types._with||prevType===_tokentype.types._while;this.context.push(statementParens?types.p_stat:types.p_expr);this.exprAllowed=true};_tokentype.types.incDec.updateContext=function(){};_tokentype.types._function.updateContext=function(){if(this.curContext()!==types.b_stat)this.context.push(types.f_expr);this.exprAllowed=false};_tokentype.types.backQuote.updateContext=function(){if(this.curContext()===types.q_tmpl)this.context.pop();else this.context.push(types.q_tmpl);this.exprAllowed=false}},{"./../../babel/tools/protect.js":52,"./state":12,"./tokentype":16,"./whitespace":18}],15:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _identifier=require("./identifier");var _tokentype=require("./tokentype");var _state=require("./state");var _location=require("./location");var _whitespace=require("./whitespace");_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var Token=function Token(p){_classCallCheck(this,Token);this.type=p.type;this.value=p.value;this.start=p.start;this.end=p.end;if(p.options.locations)this.loc=new _location.SourceLocation(p,p.startLoc,p.endLoc);if(p.options.ranges)this.range=[p.start,p.end]};exports.Token=Token;var pp=_state.Parser.prototype;var isRhino=typeof Packages=="object"&&Object.prototype.toString.call(Packages)=="[object JavaPackage]";pp.next=function(){if(this.options.onToken&&!this.isLookahead)this.options.onToken(new Token(this));this.lastTokEnd=this.end;this.lastTokStart=this.start;this.lastTokEndLoc=this.endLoc;this.lastTokStartLoc=this.startLoc;this.nextToken()};pp.getToken=function(){this.next();return new Token(this)};if(typeof Symbol!=="undefined")pp[Symbol.iterator]=function(){var self=this;return{next:function next(){var token=self.getToken();return{done:token.type===_tokentype.types.eof,value:token}}}};pp.setStrict=function(strict){this.strict=strict;if(this.type!==_tokentype.types.num&&this.type!==_tokentype.types.string)return;this.pos=this.start;if(this.options.locations){while(this.pos=this.input.length)return this.finishToken(_tokentype.types.eof);if(curContext.override)return curContext.override(this);else this.readToken(this.fullCharCodeAtPos())};pp.readToken=function(code){if(_identifier.isIdentifierStart(code,this.options.ecmaVersion>=6)||code===92)return this.readWord();return this.getTokenFromCode(code)};pp.fullCharCodeAtPos=function(){var code=this.input.charCodeAt(this.pos);if(code<=55295||code>=57344)return code;var next=this.input.charCodeAt(this.pos+1);return(code<<10)+next-56613888};pp.skipBlockComment=function(){var startLoc=this.options.onComment&&this.options.locations&&this.curPosition();var start=this.pos,end=this.input.indexOf("*/",this.pos+=2);if(end===-1)this.raise(this.pos-2,"Unterminated comment");this.pos=end+2;if(this.options.locations){_whitespace.lineBreakG.lastIndex=start;var match=undefined;while((match=_whitespace.lineBreakG.exec(this.input))&&match.index8&&ch<14){++this.pos}else if(ch===47){var next=this.input.charCodeAt(this.pos+1);if(next===42){this.skipBlockComment()}else if(next===47){this.skipLineComment(2)}else break}else if(ch===160){++this.pos}else if(ch>=5760&&_whitespace.nonASCIIwhitespace.test(String.fromCharCode(ch))){++this.pos}else{break}}};pp.finishToken=function(type,val){this.end=this.pos;if(this.options.locations)this.endLoc=this.curPosition();var prevType=this.type;this.type=type;this.value=val;this.updateContext(prevType)};pp.readToken_dot=function(){var next=this.input.charCodeAt(this.pos+1);if(next>=48&&next<=57)return this.readNumber(true);var next2=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&next===46&&next2===46){this.pos+=3;return this.finishToken(_tokentype.types.ellipsis)}else{++this.pos;return this.finishToken(_tokentype.types.dot)}};pp.readToken_slash=function(){var next=this.input.charCodeAt(this.pos+1);if(this.exprAllowed){++this.pos;return this.readRegexp()}if(next===61)return this.finishOp(_tokentype.types.assign,2);return this.finishOp(_tokentype.types.slash,1)};pp.readToken_mult_modulo=function(code){var type=code===42?_tokentype.types.star:_tokentype.types.modulo;var width=1;var next=this.input.charCodeAt(this.pos+1);if(next===42){width++;next=this.input.charCodeAt(this.pos+2);type=_tokentype.types.exponent}if(next===61){width++;type=_tokentype.types.assign}return this.finishOp(type,width)};pp.readToken_pipe_amp=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===code)return this.finishOp(code===124?_tokentype.types.logicalOR:_tokentype.types.logicalAND,2);if(next===61)return this.finishOp(_tokentype.types.assign,2);return this.finishOp(code===124?_tokentype.types.bitwiseOR:_tokentype.types.bitwiseAND,1)};pp.readToken_caret=function(){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(_tokentype.types.assign,2);return this.finishOp(_tokentype.types.bitwiseXOR,1);
+};pp.readToken_plus_min=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===code){if(next==45&&this.input.charCodeAt(this.pos+2)==62&&_whitespace.lineBreak.test(this.input.slice(this.lastTokEnd,this.pos))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(_tokentype.types.incDec,2)}if(next===61)return this.finishOp(_tokentype.types.assign,2);return this.finishOp(_tokentype.types.plusMin,1)};pp.readToken_lt_gt=function(code){var next=this.input.charCodeAt(this.pos+1);var size=1;if(next===code){size=code===62&&this.input.charCodeAt(this.pos+2)===62?3:2;if(this.input.charCodeAt(this.pos+size)===61)return this.finishOp(_tokentype.types.assign,size+1);return this.finishOp(_tokentype.types.bitShift,size)}if(next==33&&code==60&&this.input.charCodeAt(this.pos+2)==45&&this.input.charCodeAt(this.pos+3)==45){if(this.inModule)this.unexpected();this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(next===61)size=this.input.charCodeAt(this.pos+2)===61?3:2;return this.finishOp(_tokentype.types.relational,size)};pp.readToken_eq_excl=function(code){var next=this.input.charCodeAt(this.pos+1);if(next===61)return this.finishOp(_tokentype.types.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(code===61&&next===62&&this.options.ecmaVersion>=6){this.pos+=2;return this.finishToken(_tokentype.types.arrow)}return this.finishOp(code===61?_tokentype.types.eq:_tokentype.types.prefix,1)};pp.getTokenFromCode=function(code){switch(code){case 46:return this.readToken_dot();case 40:++this.pos;return this.finishToken(_tokentype.types.parenL);case 41:++this.pos;return this.finishToken(_tokentype.types.parenR);case 59:++this.pos;return this.finishToken(_tokentype.types.semi);case 44:++this.pos;return this.finishToken(_tokentype.types.comma);case 91:++this.pos;return this.finishToken(_tokentype.types.bracketL);case 93:++this.pos;return this.finishToken(_tokentype.types.bracketR);case 123:++this.pos;return this.finishToken(_tokentype.types.braceL);case 125:++this.pos;return this.finishToken(_tokentype.types.braceR);case 58:if(this.options.features["es7.functionBind"]&&this.input.charCodeAt(this.pos+1)===58)return this.finishOp(_tokentype.types.doubleColon,2);++this.pos;return this.finishToken(_tokentype.types.colon);case 63:++this.pos;return this.finishToken(_tokentype.types.question);case 64:++this.pos;return this.finishToken(_tokentype.types.at);case 96:if(this.options.ecmaVersion<6)break;++this.pos;return this.finishToken(_tokentype.types.backQuote);case 48:var next=this.input.charCodeAt(this.pos+1);if(next===120||next===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(next===111||next===79)return this.readRadixNumber(8);if(next===98||next===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(code);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo(code);case 124:case 38:return this.readToken_pipe_amp(code);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(code);case 60:case 62:return this.readToken_lt_gt(code);case 61:case 33:return this.readToken_eq_excl(code);case 126:return this.finishOp(_tokentype.types.prefix,1)}this.raise(this.pos,"Unexpected character '"+codePointToString(code)+"'")};pp.finishOp=function(type,size){var str=this.input.slice(this.pos,this.pos+size);this.pos+=size;return this.finishToken(type,str)};var regexpUnicodeSupport=false;try{new RegExp("","u");regexpUnicodeSupport=true}catch(e){}pp.readRegexp=function(){var _this=this;var escaped=undefined,inClass=undefined,start=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(start,"Unterminated regular expression");var ch=this.input.charAt(this.pos);if(_whitespace.lineBreak.test(ch))this.raise(start,"Unterminated regular expression");if(!escaped){if(ch==="[")inClass=true;else if(ch==="]"&&inClass)inClass=false;else if(ch==="/"&&!inClass)break;escaped=ch==="\\"}else escaped=false;++this.pos}var content=this.input.slice(start,this.pos);++this.pos;var mods=this.readWord1();var tmp=content;if(mods){var validFlags=/^[gmsiy]*$/;if(this.options.ecmaVersion>=6)validFlags=/^[gmsiyu]*$/;if(!validFlags.test(mods))this.raise(start,"Invalid regular expression flag");if(mods.indexOf("u")>=0&&!regexpUnicodeSupport){tmp=tmp.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(match,code,offset){code=Number("0x"+code);if(code>1114111)_this.raise(start+offset+3,"Code point out of bounds");return"x"});tmp=tmp.replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x")}}var value=null;if(!isRhino){try{new RegExp(tmp)}catch(e){if(e instanceof SyntaxError)this.raise(start,"Error parsing regular expression: "+e.message);this.raise(e)}try{value=new RegExp(content,mods)}catch(err){}}return this.finishToken(_tokentype.types.regexp,{pattern:content,flags:mods,value:value})};pp.readInt=function(radix,len){var start=this.pos,total=0;for(var i=0,e=len==null?Infinity:len;i=97)val=code-97+10;else if(code>=65)val=code-65+10;else if(code>=48&&code<=57)val=code-48;else val=Infinity;if(val>=radix)break;++this.pos;total=total*radix+val}if(this.pos===start||len!=null&&this.pos-start!==len)return null;return total};pp.readRadixNumber=function(radix){this.pos+=2;var val=this.readInt(radix);if(val==null)this.raise(this.start+2,"Expected number in radix "+radix);if(_identifier.isIdentifierStart(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(_tokentype.types.num,val)};pp.readNumber=function(startsWithDot){var start=this.pos,isFloat=false,octal=this.input.charCodeAt(this.pos)===48;if(!startsWithDot&&this.readInt(10)===null)this.raise(start,"Invalid number");if(this.input.charCodeAt(this.pos)===46){++this.pos;this.readInt(10);isFloat=true}var next=this.input.charCodeAt(this.pos);if(next===69||next===101){next=this.input.charCodeAt(++this.pos);if(next===43||next===45)++this.pos;if(this.readInt(10)===null)this.raise(start,"Invalid number");isFloat=true}if(_identifier.isIdentifierStart(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var str=this.input.slice(start,this.pos),val=undefined;if(isFloat)val=parseFloat(str);else if(!octal||str.length===1)val=parseInt(str,10);else if(/[89]/.test(str)||this.strict)this.raise(start,"Invalid number");else val=parseInt(str,8);return this.finishToken(_tokentype.types.num,val)};pp.readCodePoint=function(){var ch=this.input.charCodeAt(this.pos),code=undefined;if(ch===123){if(this.options.ecmaVersion<6)this.unexpected();var codePos=++this.pos;code=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(code>1114111)this.raise(codePos,"Code point out of bounds")}else{code=this.readHexChar(4)}return code};function codePointToString(code){if(code<=65535)return String.fromCharCode(code);return String.fromCharCode((code-65536>>10)+55296,(code-65536&1023)+56320)}pp.readString=function(quote){var out="",chunkStart=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var ch=this.input.charCodeAt(this.pos);if(ch===quote)break;if(ch===92){out+=this.input.slice(chunkStart,this.pos);out+=this.readEscapedChar(false);chunkStart=this.pos}else{if(_whitespace.isNewLine(ch))this.raise(this.start,"Unterminated string constant");++this.pos}}out+=this.input.slice(chunkStart,this.pos++);return this.finishToken(_tokentype.types.string,out)};pp.readTmplToken=function(){var out="",chunkStart=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var ch=this.input.charCodeAt(this.pos);if(ch===96||ch===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&this.type===_tokentype.types.template){if(ch===36){this.pos+=2;return this.finishToken(_tokentype.types.dollarBraceL)}else{++this.pos;return this.finishToken(_tokentype.types.backQuote)}}out+=this.input.slice(chunkStart,this.pos);return this.finishToken(_tokentype.types.template,out)}if(ch===92){out+=this.input.slice(chunkStart,this.pos);out+=this.readEscapedChar(true);chunkStart=this.pos}else if(_whitespace.isNewLine(ch)){out+=this.input.slice(chunkStart,this.pos);++this.pos;switch(ch){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:out+="\n";break;default:out+=String.fromCharCode(ch);break}if(this.options.locations){++this.curLine;this.lineStart=this.pos}chunkStart=this.pos}else{++this.pos}}};pp.readEscapedChar=function(inTemplate){var ch=this.input.charCodeAt(++this.pos);++this.pos;switch(ch){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return" ";case 98:return"\b";case 118:return"";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations){this.lineStart=this.pos;++this.curLine}return"";default:if(ch>=48&&ch<=55){var octalStr=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0];var octal=parseInt(octalStr,8);if(octal>255){octalStr=octalStr.slice(0,-1);octal=parseInt(octalStr,8)}if(octal>0&&(this.strict||inTemplate)){this.raise(this.pos-2,"Octal literal in strict mode")}this.pos+=octalStr.length-1;return String.fromCharCode(octal)}return String.fromCharCode(ch)}};pp.readHexChar=function(len){var codePos=this.pos;var n=this.readInt(16,len);if(n===null)this.raise(codePos,"Bad character escape sequence");return n};var containsEsc;pp.readWord1=function(){containsEsc=false;var word="",first=true,chunkStart=this.pos;var astral=this.options.ecmaVersion>=6;while(this.pos=6||!containsEsc)&&this.isKeyword(word))type=_tokentype.keywords[word];return this.finishToken(type,word)}},{"./../../babel/tools/protect.js":52,"./identifier":4,"./location":6,"./state":12,"./tokentype":16,"./whitespace":18}],16:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var TokenType=function TokenType(label){var conf=arguments[1]===undefined?{}:arguments[1];_classCallCheck(this,TokenType);this.label=label;this.keyword=conf.keyword;this.beforeExpr=!!conf.beforeExpr;this.startsExpr=!!conf.startsExpr;this.rightAssociative=!!conf.rightAssociative;this.isLoop=!!conf.isLoop;this.isAssign=!!conf.isAssign;this.prefix=!!conf.prefix;this.postfix=!!conf.postfix;this.binop=conf.binop||null;this.updateContext=null};exports.TokenType=TokenType;function binop(name,prec){return new TokenType(name,{beforeExpr:true,binop:prec})}var beforeExpr={beforeExpr:true},startsExpr={startsExpr:true};var types={num:new TokenType("num",startsExpr),regexp:new TokenType("regexp",startsExpr),string:new TokenType("string",startsExpr),name:new TokenType("name",startsExpr),eof:new TokenType("eof"),bracketL:new TokenType("[",{beforeExpr:true,startsExpr:true}),bracketR:new TokenType("]"),braceL:new TokenType("{",{beforeExpr:true,startsExpr:true}),braceR:new TokenType("}"),parenL:new TokenType("(",{beforeExpr:true,startsExpr:true}),parenR:new TokenType(")"),comma:new TokenType(",",beforeExpr),semi:new TokenType(";",beforeExpr),colon:new TokenType(":",beforeExpr),doubleColon:new TokenType("::",beforeExpr),dot:new TokenType("."),question:new TokenType("?",beforeExpr),arrow:new TokenType("=>",beforeExpr),template:new TokenType("template"),ellipsis:new TokenType("...",beforeExpr),backQuote:new TokenType("`",startsExpr),dollarBraceL:new TokenType("${",{beforeExpr:true,startsExpr:true}),at:new TokenType("@"),eq:new TokenType("=",{beforeExpr:true,isAssign:true}),assign:new TokenType("_=",{beforeExpr:true,isAssign:true}),incDec:new TokenType("++/--",{prefix:true,postfix:true,startsExpr:true}),prefix:new TokenType("prefix",{beforeExpr:true,prefix:true,startsExpr:true}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=",6),relational:binop(">",7),bitShift:binop("<>>",8),plusMin:new TokenType("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),exponent:new TokenType("**",{beforeExpr:true,binop:11,rightAssociative:true})};exports.types=types;var keywords={};exports.keywords=keywords;function kw(name){var options=arguments[1]===undefined?{}:arguments[1];options.keyword=name;keywords[name]=types["_"+name]=new TokenType(name,options)}kw("break");kw("case",beforeExpr);kw("catch");kw("continue");kw("debugger");kw("default",beforeExpr);kw("do",{isLoop:true});kw("else",beforeExpr);kw("finally");kw("for",{isLoop:true});kw("function",startsExpr);kw("if");kw("return",beforeExpr);kw("switch");kw("throw",beforeExpr);kw("try");kw("var");kw("let");kw("const");kw("while",{isLoop:true});kw("with");kw("new",{beforeExpr:true,startsExpr:true});kw("this",startsExpr);kw("super",startsExpr);kw("class");kw("extends",beforeExpr);kw("export");kw("import");kw("yield",{beforeExpr:true,startsExpr:true});kw("null",startsExpr);kw("true",startsExpr);kw("false",startsExpr);kw("in",{beforeExpr:true,binop:7});kw("instanceof",{beforeExpr:true,binop:7});kw("typeof",{beforeExpr:true,prefix:true,startsExpr:true});kw("void",{beforeExpr:true,prefix:true,startsExpr:true});kw("delete",{beforeExpr:true,prefix:true,startsExpr:true})},{"./../../babel/tools/protect.js":52}],17:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;exports.isArray=isArray;exports.has=has;_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function isArray(obj){return Object.prototype.toString.call(obj)==="[object Array]"}function has(obj,propName){return Object.prototype.hasOwnProperty.call(obj,propName)}},{"./../../babel/tools/protect.js":52}],18:[function(require,module,exports){"use strict";var _babelToolsProtectJs2=require("./../../babel/tools/protect.js");var _babelToolsProtectJs3=_interopRequireDefault(_babelToolsProtectJs2);exports.__esModule=true;exports.isNewLine=isNewLine;_babelToolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var lineBreak=/\r\n?|\n|\u2028|\u2029/;exports.lineBreak=lineBreak;var lineBreakG=new RegExp(lineBreak.source,"g");exports.lineBreakG=lineBreakG;function isNewLine(code){return code===10||code===13||code===8232||code==8233}var nonASCIIwhitespace=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;exports.nonASCIIwhitespace=nonASCIIwhitespace},{"./../../babel/tools/protect.js":52}],19:[function(require,module,exports){(function(global){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}require("./node");var transform=module.exports=require("../transformation");transform.options=require("../transformation/file/options");transform.version=require("../../../package").version;transform.transform=transform;transform.run=function(code){var opts=arguments[1]===undefined?{}:arguments[1];opts.sourceMaps="inline";return new Function(transform(code,opts).code)()};transform.load=function(url,callback,opts,hold){if(opts===undefined)opts={};opts.filename=opts.filename||url;var xhr=global.ActiveXObject?new global.ActiveXObject("Microsoft.XMLHTTP"):new global.XMLHttpRequest;xhr.open("GET",url,true);if("overrideMimeType"in xhr)xhr.overrideMimeType("text/plain");xhr.onreadystatechange=function(){if(xhr.readyState!==4)return;var status=xhr.status;if(status===0||status===200){var param=[xhr.responseText,opts];if(!hold)transform.run.apply(transform,param);if(callback)callback(param)}else{throw new Error("Could not load "+url)}};xhr.send(null)};var runScripts=function runScripts(){var scripts=[];var types=["text/ecmascript-6","text/6to5","text/babel","module"];var index=0;var exec=function exec(){var param=scripts[index];if(param instanceof Array){transform.run.apply(transform,param);index++;exec()}};var run=function run(script,i){var opts={};if(script.src){transform.load(script.src,function(param){scripts[i]=param;exec()},opts,true)}else{opts.filename="embedded";scripts[i]=[script.innerHTML,opts]}};var _scripts=global.document.getElementsByTagName("script");for(var i=0;i<_scripts.length;++i){var _script=_scripts[i];if(types.indexOf(_script.type)>=0)scripts.push(_script)}for(i in scripts){run(scripts[i],i)}exec()};if(global.addEventListener){global.addEventListener("DOMContentLoaded",runScripts,false)}else if(global.attachEvent){global.attachEvent("onload",runScripts)}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"../../../package":544,"../transformation":73,"../transformation/file/options":56,"./../tools/protect.js":52,"./node":20}],20:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.register=register;exports.polyfill=polyfill;exports.transformFile=transformFile;exports.transformFileSync=transformFileSync;exports.parse=parse;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashLangIsFunction=require("lodash/lang/isFunction");var _lodashLangIsFunction2=_interopRequireDefault(_lodashLangIsFunction);var _transformation=require("../transformation");var _transformation2=_interopRequireDefault(_transformation);var _acorn=require("../../acorn");var acorn=_interopRequireWildcard(_acorn);var _util=require("../util");var util=_interopRequireWildcard(_util);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.util=util;exports.acorn=acorn;exports.transform=_transformation2["default"];exports.pipeline=_transformation.pipeline;exports.canCompile=_util.canCompile;var _transformationFileOptionsConfig=require("../transformation/file/options/config");exports.options=_interopRequire(_transformationFileOptionsConfig);var _transformationPlugin=require("../transformation/plugin");exports.Plugin=_interopRequire(_transformationPlugin);var _transformationTransformer=require("../transformation/transformer");exports.Transformer=_interopRequire(_transformationTransformer);var _transformationPipeline=require("../transformation/pipeline");exports.Pipeline=_interopRequire(_transformationPipeline);var _traversal=require("../traversal");exports.traverse=_interopRequire(_traversal);var _toolsBuildExternalHelpers=require("../tools/build-external-helpers");exports.buildExternalHelpers=_interopRequire(_toolsBuildExternalHelpers);var _package=require("../../../package");exports.version=_package.version;exports.types=t;function register(opts){var callback=require("./register/node-polyfill");if(opts!=null)callback(opts);return callback}function polyfill(){require("../polyfill")}function transformFile(filename,opts,callback){if(_lodashLangIsFunction2["default"](opts)){callback=opts;opts={}}opts.filename=filename;_fs2["default"].readFile(filename,function(err,code){if(err)return callback(err);var result;try{result=_transformation2["default"](code,opts)}catch(err){return callback(err)}callback(null,result)})}function transformFileSync(filename){var opts=arguments[1]===undefined?{}:arguments[1];opts.filename=filename;return _transformation2["default"](_fs2["default"].readFileSync(filename,"utf8"),opts)}function parse(code){var opts=arguments[1]===undefined?{}:arguments[1];opts.allowHashBang=true;opts.sourceType="module";opts.ecmaVersion=Infinity;opts.plugins={jsx:true,flow:true};opts.features={};for(var key in _transformation2["default"].pipeline.transformers){opts.features[key]=true}return acorn.parse(code,opts)}},{"../../../package":544,"../../acorn":1,"../polyfill":50,"../tools/build-external-helpers":51,"../transformation":73,"../transformation/file/options/config":55,"../transformation/pipeline":86,"../transformation/plugin":88,"../transformation/transformer":89,"../traversal":149,"../types":174,"../util":178,"./../tools/protect.js":52,"./register/node-polyfill":22,fs:212,"lodash/lang/isFunction":455}],21:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;require("../../polyfill");_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]=function(){};module.exports=exports["default"]},{"../../polyfill":50,"./../../tools/protect.js":52}],22:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}require("../../polyfill");_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _node=require("./node");exports["default"]=_interopRequire(_node);module.exports=exports["default"]},{"../../polyfill":50,"./../../tools/protect.js":52,"./node":21}],23:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _trimRight=require("trim-right");var _trimRight2=_interopRequireDefault(_trimRight);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var Buffer=function(){function Buffer(position,format){_classCallCheck(this,Buffer);this.position=position;this._indent=format.indent.base;this.format=format;this.buf=""}Buffer.prototype.get=function get(){return _trimRight2["default"](this.buf)};Buffer.prototype.getIndent=function getIndent(){if(this.format.compact||this.format.concise){return""}else{return _repeating2["default"](this.format.indent.style,this._indent)}};Buffer.prototype.indentSize=function indentSize(){return this.getIndent().length};Buffer.prototype.indent=function indent(){this._indent++};Buffer.prototype.dedent=function dedent(){this._indent--};Buffer.prototype.semicolon=function semicolon(){this.push(";")};Buffer.prototype.ensureSemicolon=function ensureSemicolon(){if(!this.isLast(";"))this.semicolon()};Buffer.prototype.rightBrace=function rightBrace(){this.newline(true);this.push("}")};Buffer.prototype.keyword=function keyword(name){this.push(name);this.space()};Buffer.prototype.space=function space(force){if(!force&&this.format.compact)return;if(force||this.buf&&!this.isLast(" ")&&!this.isLast("\n")){this.push(" ")}};Buffer.prototype.removeLast=function removeLast(cha){if(this.format.compact)return;if(!this.isLast(cha))return;this.buf=this.buf.substr(0,this.buf.length-1);this.position.unshift(cha)};Buffer.prototype.newline=function newline(i,removeLast){if(this.format.compact||this.format.retainLines)return;if(this.format.concise){this.space();return}removeLast=removeLast||false;if(_lodashLangIsNumber2["default"](i)){i=Math.min(2,i);if(this.endsWith("{\n")||this.endsWith(":\n"))i--;if(i<=0)return;while(i>0){this._newline(removeLast);i--}return}if(_lodashLangIsBoolean2["default"](i)){removeLast=i}this._newline(removeLast)};Buffer.prototype._newline=function _newline(removeLast){if(this.endsWith("\n\n"))return;if(removeLast&&this.isLast("\n"))this.removeLast("\n");this.removeLast(" ");this._removeSpacesAfterLastNewline();this._push("\n")};Buffer.prototype._removeSpacesAfterLastNewline=function _removeSpacesAfterLastNewline(){var lastNewlineIndex=this.buf.lastIndexOf("\n");if(lastNewlineIndex===-1){return}var index=this.buf.length-1;while(index>lastNewlineIndex){if(this.buf[index]!==" "){break}index--}if(index===lastNewlineIndex){this.buf=this.buf.substring(0,index+1)}};Buffer.prototype.push=function push(str,noIndent){if(!this.format.compact&&this._indent&&!noIndent&&str!=="\n"){var indent=this.getIndent();str=str.replace(/\n/g,"\n"+indent);if(this.isLast("\n"))this._push(indent)}this._push(str)};Buffer.prototype._push=function _push(str){this.position.push(str);this.buf+=str};Buffer.prototype.endsWith=function endsWith(str){var buf=arguments[1]===undefined?this.buf:arguments[1];if(str.length===1){return buf[buf.length-1]===str}else{return buf.slice(-str.length)===str}};Buffer.prototype.isLast=function isLast(cha){if(this.format.compact)return false;var buf=this.buf;var last=buf[buf.length-1];if(Array.isArray(cha)){return _lodashCollectionIncludes2["default"](cha,last)}else{return cha===last}};return Buffer}();exports["default"]=Buffer;module.exports=exports["default"]},{"./../tools/protect.js":52,"lodash/collection/includes":369,"lodash/lang/isBoolean":453,"lodash/lang/isNumber":457,repeating:525,"trim-right":543}],24:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.File=File;exports.Program=Program;exports.BlockStatement=BlockStatement;exports.Noop=Noop;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function File(node,print){print.plain(node.program)}function Program(node,print){print.sequence(node.body)}function BlockStatement(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();print.sequence(node.body,{indent:true});if(!this.format.retainLines)this.removeLast("\n");this.rightBrace()}}function Noop(){}},{"./../../tools/protect.js":52}],25:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.ClassDeclaration=ClassDeclaration;exports.ClassBody=ClassBody;exports.ClassProperty=ClassProperty;exports.MethodDefinition=MethodDefinition;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function ClassDeclaration(node,print){print.list(node.decorators,{separator:""});this.push("class");if(node.id){this.push(" ");print.plain(node.id)}print.plain(node.typeParameters);if(node.superClass){this.push(" extends ");print.plain(node.superClass);print.plain(node.superTypeParameters)}if(node["implements"]){this.push(" implements ");print.join(node["implements"],{separator:", "})}this.space();print.plain(node.body)}exports.ClassExpression=ClassDeclaration;function ClassBody(node,print){if(node.body.length===0){this.push("{}")}else{this.push("{");this.newline();this.indent();print.sequence(node.body);this.dedent();this.rightBrace()}}function ClassProperty(node,print){print.list(node.decorators,{separator:""});if(node["static"])this.push("static ");print.plain(node.key);print.plain(node.typeAnnotation);if(node.value){this.space();this.push("=");this.space();print.plain(node.value)}this.semicolon()}function MethodDefinition(node,print){print.list(node.decorators,{separator:""});if(node["static"]){this.push("static ")}this._method(node,print)}},{"./../../tools/protect.js":52}],26:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.ComprehensionBlock=ComprehensionBlock;exports.ComprehensionExpression=ComprehensionExpression;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function ComprehensionBlock(node,print){this.keyword("for");this.push("(");print.plain(node.left);this.push(" of ");print.plain(node.right);this.push(")")}function ComprehensionExpression(node,print){this.push(node.generator?"(":"[");print.join(node.blocks,{separator:" "});this.space();if(node.filter){this.keyword("if");this.push("(");print.plain(node.filter);this.push(")");this.space()}print.plain(node.body);this.push(node.generator?")":"]")}},{"./../../tools/protect.js":52}],27:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.UnaryExpression=UnaryExpression;exports.DoExpression=DoExpression;exports.ParenthesizedExpression=ParenthesizedExpression;exports.UpdateExpression=UpdateExpression;exports.ConditionalExpression=ConditionalExpression;exports.NewExpression=NewExpression;exports.SequenceExpression=SequenceExpression;exports.ThisExpression=ThisExpression;exports.Super=Super;exports.Decorator=Decorator;exports.CallExpression=CallExpression;exports.EmptyStatement=EmptyStatement;exports.ExpressionStatement=ExpressionStatement;exports.AssignmentPattern=AssignmentPattern;exports.AssignmentExpression=AssignmentExpression;exports.BindExpression=BindExpression;exports.MemberExpression=MemberExpression;exports.MetaProperty=MetaProperty;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function UnaryExpression(node,print){var needsSpace=/[a-z]$/.test(node.operator);
+var arg=node.argument;if(t.isUpdateExpression(arg)||t.isUnaryExpression(arg)){needsSpace=true}if(t.isUnaryExpression(arg)&&arg.operator==="!"){needsSpace=false}this.push(node.operator);if(needsSpace)this.push(" ");print.plain(node.argument)}function DoExpression(node,print){this.push("do");this.space();print.plain(node.body)}function ParenthesizedExpression(node,print){this.push("(");print.plain(node.expression);this.push(")")}function UpdateExpression(node,print){if(node.prefix){this.push(node.operator);print.plain(node.argument)}else{print.plain(node.argument);this.push(node.operator)}}function ConditionalExpression(node,print){print.plain(node.test);this.space();this.push("?");this.space();print.plain(node.consequent);this.space();this.push(":");this.space();print.plain(node.alternate)}function NewExpression(node,print){this.push("new ");print.plain(node.callee);this.push("(");print.list(node.arguments);this.push(")")}function SequenceExpression(node,print){print.list(node.expressions)}function ThisExpression(){this.push("this")}function Super(){this.push("super")}function Decorator(node,print){this.push("@");print.plain(node.expression);this.newline()}function CallExpression(node,print){print.plain(node.callee);this.push("(");var isPrettyCall=node._prettyCall&&!this.format.retainLines&&!this.format.compact;var separator;if(isPrettyCall){separator=",\n";this.newline();this.indent()}print.list(node.arguments,{separator:separator});if(isPrettyCall){this.newline();this.dedent()}this.push(")")}var buildYieldAwait=function buildYieldAwait(keyword){return function(node,print){this.push(keyword);if(node.delegate||node.all){this.push("*")}if(node.argument){this.push(" ");print.plain(node.argument)}}};var YieldExpression=buildYieldAwait("yield");exports.YieldExpression=YieldExpression;var AwaitExpression=buildYieldAwait("await");exports.AwaitExpression=AwaitExpression;function EmptyStatement(){this.semicolon()}function ExpressionStatement(node,print){print.plain(node.expression);this.semicolon()}function AssignmentPattern(node,print){print.plain(node.left);this.push(" = ");print.plain(node.right)}function AssignmentExpression(node,print){print.plain(node.left);var spaces=node.operator==="in"||node.operator==="instanceof";spaces=true;this.space(spaces);this.push(node.operator);if(!spaces){spaces=node.operator==="<"&&t.isUnaryExpression(node.right,{prefix:true,operator:"!"})&&t.isUnaryExpression(node.right.argument,{prefix:true,operator:"--"})}this.space(spaces);print.plain(node.right)}function BindExpression(node,print){print.plain(node.object);this.push("::");print.plain(node.callee)}exports.BinaryExpression=AssignmentExpression;exports.LogicalExpression=AssignmentExpression;function MemberExpression(node,print){var obj=node.object;print.plain(obj);if(!node.computed&&t.isMemberExpression(node.property)){throw new TypeError("Got a MemberExpression for MemberExpression property")}var computed=node.computed;if(t.isLiteral(node.property)&&_lodashLangIsNumber2["default"](node.property.value)){computed=true}if(computed){this.push("[");print.plain(node.property);this.push("]")}else{this.push(".");print.plain(node.property)}}function MetaProperty(node,print){print.plain(node.meta);this.push(".");print.plain(node.property)}},{"../../types":174,"./../../tools/protect.js":52,"lodash/lang/isNumber":457}],28:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.AnyTypeAnnotation=AnyTypeAnnotation;exports.ArrayTypeAnnotation=ArrayTypeAnnotation;exports.BooleanTypeAnnotation=BooleanTypeAnnotation;exports.DeclareClass=DeclareClass;exports.DeclareFunction=DeclareFunction;exports.DeclareModule=DeclareModule;exports.DeclareVariable=DeclareVariable;exports.FunctionTypeAnnotation=FunctionTypeAnnotation;exports.FunctionTypeParam=FunctionTypeParam;exports.InterfaceExtends=InterfaceExtends;exports._interfaceish=_interfaceish;exports.InterfaceDeclaration=InterfaceDeclaration;exports.IntersectionTypeAnnotation=IntersectionTypeAnnotation;exports.MixedTypeAnnotation=MixedTypeAnnotation;exports.NullableTypeAnnotation=NullableTypeAnnotation;exports.NumberTypeAnnotation=NumberTypeAnnotation;exports.StringLiteralTypeAnnotation=StringLiteralTypeAnnotation;exports.StringTypeAnnotation=StringTypeAnnotation;exports.TupleTypeAnnotation=TupleTypeAnnotation;exports.TypeofTypeAnnotation=TypeofTypeAnnotation;exports.TypeAlias=TypeAlias;exports.TypeAnnotation=TypeAnnotation;exports.TypeParameterInstantiation=TypeParameterInstantiation;exports.ObjectTypeAnnotation=ObjectTypeAnnotation;exports.ObjectTypeCallProperty=ObjectTypeCallProperty;exports.ObjectTypeIndexer=ObjectTypeIndexer;exports.ObjectTypeProperty=ObjectTypeProperty;exports.QualifiedTypeIdentifier=QualifiedTypeIdentifier;exports.UnionTypeAnnotation=UnionTypeAnnotation;exports.TypeCastExpression=TypeCastExpression;exports.VoidTypeAnnotation=VoidTypeAnnotation;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function AnyTypeAnnotation(){this.push("any")}function ArrayTypeAnnotation(node,print){print.plain(node.elementType);this.push("[");this.push("]")}function BooleanTypeAnnotation(node){this.push("bool")}function DeclareClass(node,print){this.push("declare class ");this._interfaceish(node,print)}function DeclareFunction(node,print){this.push("declare function ");print.plain(node.id);print.plain(node.id.typeAnnotation.typeAnnotation);this.semicolon()}function DeclareModule(node,print){this.push("declare module ");print.plain(node.id);this.space();print.plain(node.body)}function DeclareVariable(node,print){this.push("declare var ");print.plain(node.id);print.plain(node.id.typeAnnotation);this.semicolon()}function FunctionTypeAnnotation(node,print,parent){print.plain(node.typeParameters);this.push("(");print.list(node.params);if(node.rest){if(node.params.length){this.push(",");this.space()}this.push("...");print.plain(node.rest)}this.push(")");if(parent.type==="ObjectTypeProperty"||parent.type==="ObjectTypeCallProperty"||parent.type==="DeclareFunction"){this.push(":")}else{this.space();this.push("=>")}this.space();print.plain(node.returnType)}function FunctionTypeParam(node,print){print.plain(node.name);if(node.optional)this.push("?");this.push(":");this.space();print.plain(node.typeAnnotation)}function InterfaceExtends(node,print){print.plain(node.id);print.plain(node.typeParameters)}exports.ClassImplements=InterfaceExtends;exports.GenericTypeAnnotation=InterfaceExtends;function _interfaceish(node,print){print.plain(node.id);print.plain(node.typeParameters);if(node["extends"].length){this.push(" extends ");print.join(node["extends"],{separator:", "})}this.space();print.plain(node.body)}function InterfaceDeclaration(node,print){this.push("interface ");this._interfaceish(node,print)}function IntersectionTypeAnnotation(node,print){print.join(node.types,{separator:" & "})}function MixedTypeAnnotation(){this.push("mixed")}function NullableTypeAnnotation(node,print){this.push("?");print.plain(node.typeAnnotation)}function NumberTypeAnnotation(){this.push("number")}function StringLiteralTypeAnnotation(node){this._stringLiteral(node.value)}function StringTypeAnnotation(){this.push("string")}function TupleTypeAnnotation(node,print){this.push("[");print.join(node.types,{separator:", "});this.push("]")}function TypeofTypeAnnotation(node,print){this.push("typeof ");print.plain(node.argument)}function TypeAlias(node,print){this.push("type ");print.plain(node.id);print.plain(node.typeParameters);this.space();this.push("=");this.space();print.plain(node.right);this.semicolon()}function TypeAnnotation(node,print){this.push(":");this.space();if(node.optional)this.push("?");print.plain(node.typeAnnotation)}function TypeParameterInstantiation(node,print){this.push("<");print.join(node.params,{separator:", "});this.push(">")}exports.TypeParameterDeclaration=TypeParameterInstantiation;function ObjectTypeAnnotation(node,print){var _this=this;this.push("{");var props=node.properties.concat(node.callProperties,node.indexers);if(props.length){this.space();print.list(props,{separator:false,indent:true,iterator:function iterator(){if(props.length!==1){_this.semicolon();_this.space()}}});this.space()}this.push("}")}function ObjectTypeCallProperty(node,print){if(node["static"])this.push("static ");print.plain(node.value)}function ObjectTypeIndexer(node,print){if(node["static"])this.push("static ");this.push("[");print.plain(node.id);this.push(":");this.space();print.plain(node.key);this.push("]");this.push(":");this.space();print.plain(node.value)}function ObjectTypeProperty(node,print){if(node["static"])this.push("static ");print.plain(node.key);if(node.optional)this.push("?");if(!t.isFunctionTypeAnnotation(node.value)){this.push(":");this.space()}print.plain(node.value)}function QualifiedTypeIdentifier(node,print){print.plain(node.qualification);this.push(".");print.plain(node.id)}function UnionTypeAnnotation(node,print){print.join(node.types,{separator:" | "})}function TypeCastExpression(node,print){this.push("(");print.plain(node.expression);print.plain(node.typeAnnotation);this.push(")")}function VoidTypeAnnotation(node){this.push("void")}},{"../../types":174,"./../../tools/protect.js":52}],29:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.JSXAttribute=JSXAttribute;exports.JSXIdentifier=JSXIdentifier;exports.JSXNamespacedName=JSXNamespacedName;exports.JSXMemberExpression=JSXMemberExpression;exports.JSXSpreadAttribute=JSXSpreadAttribute;exports.JSXExpressionContainer=JSXExpressionContainer;exports.JSXElement=JSXElement;exports.JSXOpeningElement=JSXOpeningElement;exports.JSXClosingElement=JSXClosingElement;exports.JSXEmptyExpression=JSXEmptyExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function JSXAttribute(node,print){print.plain(node.name);if(node.value){this.push("=");print.plain(node.value)}}function JSXIdentifier(node){this.push(node.name)}function JSXNamespacedName(node,print){print.plain(node.namespace);this.push(":");print.plain(node.name)}function JSXMemberExpression(node,print){print.plain(node.object);this.push(".");print.plain(node.property)}function JSXSpreadAttribute(node,print){this.push("{...");print.plain(node.argument);this.push("}")}function JSXExpressionContainer(node,print){this.push("{");print.plain(node.expression);this.push("}")}function JSXElement(node,print){var open=node.openingElement;print.plain(open);if(open.selfClosing)return;this.indent();var _arr=node.children;for(var _i=0;_i<_arr.length;_i++){var child=_arr[_i];if(t.isLiteral(child)){this.push(child.value,true)}else{print.plain(child)}}this.dedent();print.plain(node.closingElement)}function JSXOpeningElement(node,print){this.push("<");print.plain(node.name);if(node.attributes.length>0){this.push(" ");print.join(node.attributes,{separator:" "})}this.push(node.selfClosing?" />":">")}function JSXClosingElement(node,print){this.push("");print.plain(node.name);this.push(">")}function JSXEmptyExpression(){}},{"../../types":174,"./../../tools/protect.js":52}],30:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports._params=_params;exports._method=_method;exports.FunctionExpression=FunctionExpression;exports.ArrowFunctionExpression=ArrowFunctionExpression;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _params(node,print){var _this=this;print.plain(node.typeParameters);this.push("(");print.list(node.params,{iterator:function iterator(node){if(node.optional)_this.push("?");print.plain(node.typeAnnotation)}});this.push(")");if(node.returnType){print.plain(node.returnType)}}function _method(node,print){var value=node.value;var kind=node.kind;var key=node.key;if(kind==="method"||kind==="init"){if(value.generator){this.push("*")}}if(kind==="get"||kind==="set"){this.push(kind+" ")}if(value.async)this.push("async ");if(node.computed){this.push("[");print.plain(key);this.push("]")}else{print.plain(key)}this._params(value,print);this.space();print.plain(value.body)}function FunctionExpression(node,print){if(node.async)this.push("async ");this.push("function");if(node.generator)this.push("*");if(node.id){this.push(" ");print.plain(node.id)}else{this.space()}this._params(node,print);this.space();print.plain(node.body)}exports.FunctionDeclaration=FunctionExpression;function ArrowFunctionExpression(node,print){if(node.async)this.push("async ");if(node.params.length===1&&t.isIdentifier(node.params[0])){print.plain(node.params[0])}else{this._params(node,print)}this.push(" => ");var bodyNeedsParens=t.isObjectExpression(node.body);if(bodyNeedsParens){this.push("(")}print.plain(node.body);if(bodyNeedsParens){this.push(")")}}},{"../../types":174,"./../../tools/protect.js":52}],31:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.ImportSpecifier=ImportSpecifier;exports.ImportDefaultSpecifier=ImportDefaultSpecifier;exports.ExportDefaultSpecifier=ExportDefaultSpecifier;exports.ExportSpecifier=ExportSpecifier;exports.ExportNamespaceSpecifier=ExportNamespaceSpecifier;exports.ExportAllDeclaration=ExportAllDeclaration;exports.ExportNamedDeclaration=ExportNamedDeclaration;exports.ExportDefaultDeclaration=ExportDefaultDeclaration;exports.ImportDeclaration=ImportDeclaration;exports.ImportNamespaceSpecifier=ImportNamespaceSpecifier;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function ImportSpecifier(node,print){print.plain(node.imported);if(node.local&&node.local.name!==node.imported.name){this.push(" as ");print.plain(node.local)}}function ImportDefaultSpecifier(node,print){print.plain(node.local)}function ExportDefaultSpecifier(node,print){print.plain(node.exported)}function ExportSpecifier(node,print){print.plain(node.local);if(node.exported&&node.local.name!==node.exported.name){this.push(" as ");print.plain(node.exported)}}function ExportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.exported)}function ExportAllDeclaration(node,print){this.push("export *");if(node.exported){this.push(" as ");print.plain(node.exported)}this.push(" from ");print.plain(node.source);this.semicolon()}function ExportNamedDeclaration(node,print){this.push("export ");ExportDeclaration.call(this,node,print)}function ExportDefaultDeclaration(node,print){this.push("export default ");ExportDeclaration.call(this,node,print)}function ExportDeclaration(node,print){var specifiers=node.specifiers;if(node.declaration){var declar=node.declaration;print.plain(declar);if(t.isStatement(declar)||t.isFunction(declar)||t.isClass(declar))return}else{var first=specifiers[0];var hasSpecial=false;if(t.isExportDefaultSpecifier(first)||t.isExportNamespaceSpecifier(first)){hasSpecial=true;print.plain(specifiers.shift());if(specifiers.length){this.push(", ")}}if(specifiers.length||!specifiers.length&&!hasSpecial){this.push("{");if(specifiers.length){this.space();print.join(specifiers,{separator:", "});this.space()}this.push("}")}if(node.source){this.push(" from ");print.plain(node.source)}}this.ensureSemicolon()}function ImportDeclaration(node,print){this.push("import ");if(node.isType){this.push("type ")}var specfiers=node.specifiers;if(specfiers&&specfiers.length){var first=node.specifiers[0];if(t.isImportDefaultSpecifier(first)||t.isImportNamespaceSpecifier(first)){print.plain(node.specifiers.shift());if(node.specifiers.length){this.push(", ")}}if(node.specifiers.length){this.push("{");this.space();print.join(node.specifiers,{separator:", "});this.space();this.push("}")}this.push(" from ")}print.plain(node.source);this.semicolon()}function ImportNamespaceSpecifier(node,print){this.push("* as ");print.plain(node.local)}},{"../../types":174,"./../../tools/protect.js":52}],32:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.WithStatement=WithStatement;exports.IfStatement=IfStatement;exports.ForStatement=ForStatement;exports.WhileStatement=WhileStatement;exports.DoWhileStatement=DoWhileStatement;exports.LabeledStatement=LabeledStatement;exports.TryStatement=TryStatement;exports.CatchClause=CatchClause;exports.ThrowStatement=ThrowStatement;exports.SwitchStatement=SwitchStatement;exports.SwitchCase=SwitchCase;exports.DebuggerStatement=DebuggerStatement;exports.VariableDeclaration=VariableDeclaration;exports.VariableDeclarator=VariableDeclarator;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _repeating=require("repeating");var _repeating2=_interopRequireDefault(_repeating);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function WithStatement(node,print){this.keyword("with");this.push("(");print.plain(node.object);this.push(")");print.block(node.body)}function IfStatement(node,print){this.keyword("if");this.push("(");print.plain(node.test);this.push(")");this.space();print.indentOnComments(node.consequent);if(node.alternate){if(this.isLast("}"))this.space();this.push("else ");print.indentOnComments(node.alternate)}}function ForStatement(node,print){this.keyword("for");this.push("(");print.plain(node.init);this.push(";");if(node.test){this.space();print.plain(node.test)}this.push(";");if(node.update){this.space();print.plain(node.update)}this.push(")");print.block(node.body)}function WhileStatement(node,print){this.keyword("while");this.push("(");print.plain(node.test);this.push(")");print.block(node.body)}var buildForXStatement=function buildForXStatement(op){return function(node,print){this.keyword("for");this.push("(");print.plain(node.left);this.push(" "+op+" ");print.plain(node.right);this.push(")");print.block(node.body)}};var ForInStatement=buildForXStatement("in");exports.ForInStatement=ForInStatement;var ForOfStatement=buildForXStatement("of");exports.ForOfStatement=ForOfStatement;function DoWhileStatement(node,print){this.push("do ");print.plain(node.body);this.space();this.keyword("while");this.push("(");print.plain(node.test);this.push(");")}var buildLabelStatement=function buildLabelStatement(prefix,key){return function(node,print){this.push(prefix);var label=node[key||"label"];if(label){this.push(" ");print.plain(label)}this.semicolon()}};var ContinueStatement=buildLabelStatement("continue");exports.ContinueStatement=ContinueStatement;var ReturnStatement=buildLabelStatement("return","argument");exports.ReturnStatement=ReturnStatement;var BreakStatement=buildLabelStatement("break");exports.BreakStatement=BreakStatement;function LabeledStatement(node,print){print.plain(node.label);this.push(": ");print.plain(node.body)}function TryStatement(node,print){this.keyword("try");print.plain(node.block);this.space();if(node.handlers){print.plain(node.handlers[0])}else{print.plain(node.handler)}if(node.finalizer){this.space();this.push("finally ");print.plain(node.finalizer)}}function CatchClause(node,print){this.keyword("catch");this.push("(");print.plain(node.param);this.push(") ");print.plain(node.body)}function ThrowStatement(node,print){this.push("throw ");print.plain(node.argument);this.semicolon()}function SwitchStatement(node,print){this.keyword("switch");this.push("(");print.plain(node.discriminant);this.push(")");this.space();this.push("{");print.sequence(node.cases,{indent:true,addNewlines:function addNewlines(leading,cas){if(!leading&&node.cases[node.cases.length-1]===cas)return-1}});this.push("}")}function SwitchCase(node,print){if(node.test){this.push("case ");print.plain(node.test);this.push(":")}else{this.push("default:")}if(node.consequent.length){this.newline();print.sequence(node.consequent,{indent:true})}}function DebuggerStatement(){this.push("debugger;")}function VariableDeclaration(node,print,parent){this.push(node.kind+" ");var hasInits=false;if(!t.isFor(parent)){var _arr=node.declarations;for(var _i=0;_i<_arr.length;_i++){var declar=_arr[_i];if(declar.init){hasInits=true}}}var sep;if(!this.format.compact&&!this.format.concise&&hasInits&&!this.format.retainLines){sep=",\n"+_repeating2["default"](" ",node.kind.length+1)}print.list(node.declarations,{separator:sep});if(t.isFor(parent)){if(parent.left===node||parent.init===node)return}this.semicolon()}function VariableDeclarator(node,print){print.plain(node.id);print.plain(node.id.typeAnnotation);if(node.init){this.space();this.push("=");this.space();print.plain(node.init)}}},{"../../types":174,"./../../tools/protect.js":52,repeating:525}],33:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.TaggedTemplateExpression=TaggedTemplateExpression;exports.TemplateElement=TemplateElement;exports.TemplateLiteral=TemplateLiteral;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function TaggedTemplateExpression(node,print){print.plain(node.tag);print.plain(node.quasi)}function TemplateElement(node){this._push(node.value.raw)}function TemplateLiteral(node,print){this.push("`");var quasis=node.quasis;var len=quasis.length;for(var i=0;i0)this.space();print.plain(elem);if(i1e5;if(format.compact){console.error("[BABEL] "+messages.get("codeGeneratorDeopt",opts.filename,"100KB"))}}return format};CodeGenerator.findCommonStringDelimiter=function findCommonStringDelimiter(code,tokens){var occurences={single:0,"double":0};var checked=0;for(var i=0;i=3)break}if(occurences.single>occurences.double){return"single"}else{return"double"}};CodeGenerator.prototype.generate=function generate(){var ast=this.ast;this.print(ast);if(ast.comments){var comments=[];var _arr=ast.comments;for(var _i=0;_i<_arr.length;_i++){var comment=_arr[_i];if(!comment._displayed)comments.push(comment)}this._printComments(comments)}return{map:this.map.get(),code:this.buffer.get()}};CodeGenerator.prototype.buildPrint=function buildPrint(parent){return new _nodePrinter2["default"](this,parent)};CodeGenerator.prototype.catchUp=function catchUp(node,parent,leftParenPrinted){if(node.loc&&this.format.retainLines&&this.buffer.buf){var needsParens=false;if(!leftParenPrinted&&parent&&this.position.line","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]],function(tier,i){_lodashCollectionEach2["default"](tier,function(op){PRECEDENCE[op]=i})});function NullableTypeAnnotation(node,parent){return t.isArrayTypeAnnotation(parent)}exports.FunctionTypeAnnotation=NullableTypeAnnotation;function UpdateExpression(node,parent){if(t.isMemberExpression(parent)&&parent.object===node){return true}}function ObjectExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function Binary(node,parent){if((t.isCallExpression(parent)||t.isNewExpression(parent))&&parent.callee===node){return true}if(t.isUnaryLike(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isBinary(parent)){var parentOp=parent.operator;var parentPos=PRECEDENCE[parentOp];var nodeOp=node.operator;var nodePos=PRECEDENCE[nodeOp];if(parentPos>nodePos){return true}if(parentPos===nodePos&&parent.right===node){return true}}}function BinaryExpression(node,parent){if(node.operator==="in"){if(t.isVariableDeclarator(parent)){return true}if(t.isFor(parent)){return true}}}function SequenceExpression(node,parent){if(t.isForStatement(parent)){return false}if(t.isExpressionStatement(parent)&&parent.expression===node){return false}return true}function YieldExpression(node,parent){return t.isBinary(parent)||t.isUnaryLike(parent)||t.isCallExpression(parent)||t.isMemberExpression(parent)||t.isNewExpression(parent)||t.isConditionalExpression(parent)||t.isYieldExpression(parent)}function ClassExpression(node,parent){return t.isExpressionStatement(parent)}function UnaryLike(node,parent){return t.isMemberExpression(parent)&&parent.object===node}function FunctionExpression(node,parent){if(t.isExpressionStatement(parent)){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}if(t.isCallExpression(parent)&&parent.callee===node){return true}}function ConditionalExpression(node,parent){if(t.isUnaryLike(parent)){return true}if(t.isBinary(parent)){return true}if(t.isCallExpression(parent)||t.isNewExpression(parent)){if(parent.callee===node){return true}}if(t.isConditionalExpression(parent)&&parent.test===node){return true}if(t.isMemberExpression(parent)&&parent.object===node){return true}return false}function AssignmentExpression(node){if(t.isObjectPattern(node.left)){return true}else{return ConditionalExpression.apply(undefined,arguments)}}},{"../../types":174,"./../../tools/protect.js":52,"lodash/collection/each":367}],38:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var NodePrinter=function(){function NodePrinter(generator,parent){_classCallCheck(this,NodePrinter);this.generator=generator;this.parent=parent}NodePrinter.prototype.plain=function plain(node,opts){return this.generator.print(node,this.parent,opts)};NodePrinter.prototype.sequence=function sequence(nodes){var opts=arguments[1]===undefined?{}:arguments[1];opts.statement=true;return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.join=function join(nodes,opts){return this.generator.printJoin(this,nodes,opts)};NodePrinter.prototype.list=function list(items){var opts=arguments[1]===undefined?{}:arguments[1];if(opts.separator==null){opts.separator=",";if(!this.generator.format.compact)opts.separator+=" "}return this.join(items,opts)};NodePrinter.prototype.block=function block(node){return this.generator.printBlock(this,node)};NodePrinter.prototype.indentOnComments=function indentOnComments(node){return this.generator.printAndIndentOnComments(this,node)};return NodePrinter}();exports["default"]=NodePrinter;module.exports=exports["default"]},{"./../../tools/protect.js":52}],39:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashCollectionMap=require("lodash/collection/map");var _lodashCollectionMap2=_interopRequireDefault(_lodashCollectionMap);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function crawl(node){var state=arguments[1]===undefined?{}:arguments[1];if(t.isMemberExpression(node)){crawl(node.object,state);if(node.computed)crawl(node.property,state)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){crawl(node.left,state);crawl(node.right,state)}else if(t.isCallExpression(node)){state.hasCall=true;crawl(node.callee,state)}else if(t.isFunction(node)){state.hasFunction=true}else if(t.isIdentifier(node)){state.hasHelper=state.hasHelper||isHelper(node.callee)}return state}function isHelper(node){if(t.isMemberExpression(node)){return isHelper(node.object)||isHelper(node.property)}else if(t.isIdentifier(node)){return node.name==="require"||node.name[0]==="_"}else if(t.isCallExpression(node)){return isHelper(node.callee)}else if(t.isBinary(node)||t.isAssignmentExpression(node)){return t.isIdentifier(node.left)&&isHelper(node.left)||isHelper(node.right)}else{return false}}function isType(node){return t.isLiteral(node)||t.isObjectExpression(node)||t.isArrayExpression(node)||t.isIdentifier(node)||t.isMemberExpression(node)}exports.nodes={AssignmentExpression:function AssignmentExpression(node){var state=crawl(node.right);if(state.hasCall&&state.hasHelper||state.hasFunction){return{before:state.hasFunction,after:true}}},SwitchCase:function SwitchCase(node,parent){return{before:node.consequent.length||parent.cases[0]===node}},LogicalExpression:function LogicalExpression(node){if(t.isFunction(node.left)||t.isFunction(node.right)){return{after:true}}},Literal:function Literal(node){if(node.value==="use strict"){return{after:true}}},CallExpression:function CallExpression(node){if(t.isFunction(node.callee)||isHelper(node)){return{before:true,after:true}}},VariableDeclaration:function VariableDeclaration(node){for(var i=0;i=max){i-=max}return i}var Whitespace=function(){function Whitespace(tokens){_classCallCheck(this,Whitespace);this.tokens=tokens;this.used={};this._lastFoundIndex=0}Whitespace.prototype.getNewlinesBefore=function getNewlinesBefore(node){var startToken;var endToken;var tokens=this.tokens;for(var j=0;j")}}).join("\n")};module.exports=exports["default"]},{"./../tools/protect.js":52,chalk:240,esutils:347,"js-tokens":358,"line-numbers":359,repeating:525}],44:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;var _lodashObjectMerge=require("lodash/object/merge");var _lodashObjectMerge2=_interopRequireDefault(_lodashObjectMerge);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]=function(dest,src){if(!dest||!src)return;return _lodashObjectMerge2["default"](dest,src,function(a,b){if(Array.isArray(a)){var c=a.slice(0);for(var _iterator=b,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[Symbol.iterator]();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++]}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value}var v=_ref;if(a.indexOf(v)<0){c.push(v)}}return c}})};module.exports=exports["default"]},{"./../tools/protect.js":52,"lodash/object/merge":470}],45:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]=function(ast,comments,tokens){if(ast&&ast.type==="Program"){return t.file(ast,comments||[],tokens||[])}else{throw new Error("Not a valid ast?")}};module.exports=exports["default"]},{"../types":174,"./../tools/protect.js":52}],46:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]=function(){return Object.create(null)};module.exports=exports["default"]},{"./../tools/protect.js":52}],47:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _normalizeAst=require("./normalize-ast");var _normalizeAst2=_interopRequireDefault(_normalizeAst);var _estraverse=require("estraverse");var _estraverse2=_interopRequireDefault(_estraverse);var _acorn=require("../../acorn");var acorn=_interopRequireWildcard(_acorn);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]=function(code){var opts=arguments[1]===undefined?{}:arguments[1];var commentsAndTokens=[];var comments=[];var tokens=[];var parseOpts={allowImportExportEverywhere:opts.looseModules,allowReturnOutsideFunction:opts.looseModules,allowHashBang:true,ecmaVersion:6,strictMode:opts.strictMode,sourceType:opts.sourceType,locations:true,features:opts.features||{},plugins:opts.plugins||{},onToken:tokens,ranges:true};parseOpts.onToken=function(token){tokens.push(token);commentsAndTokens.push(token)};parseOpts.onComment=function(block,text,start,end,startLoc,endLoc){var comment={type:block?"CommentBlock":"CommentLine",value:text,start:start,end:end,loc:new acorn.SourceLocation(this,startLoc,endLoc),range:[start,end]};commentsAndTokens.push(comment);comments.push(comment)};if(opts.nonStandard){parseOpts.plugins.jsx=true;parseOpts.plugins.flow=true}var ast=acorn.parse(code,parseOpts);_estraverse2["default"].attachComments(ast,comments,tokens);ast=_normalizeAst2["default"](ast,comments,commentsAndTokens);return ast};module.exports=exports["default"]},{"../../acorn":1,"./../tools/protect.js":52,"./normalize-ast":45,estraverse:342}],48:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.get=get;exports.parseArgs=parseArgs;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _util=require("util");var util=_interopRequireWildcard(_util);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var MESSAGES={tailCallReassignmentDeopt:"Function reference has been reassigned so it's probably be dereferenced so we can't optimise this with confidence",JSXNamespacedTags:"Namespace tags are not supported. ReactJSX is not XML.",classesIllegalBareSuper:"Illegal use of bare super",classesIllegalSuperCall:"Direct super call is illegal in non-constructor, use super.$1() instead",scopeDuplicateDeclaration:"Duplicate declaration $1",settersNoRest:"Setters aren't allowed to have a rest",noAssignmentsInForHead:"No assignments allowed in for-in/of head",expectedMemberExpressionOrIdentifier:"Expected type MemberExpression or Identifier",invalidParentForThisNode:"We don't know how to handle this node within the current parent - please open an issue",readOnly:"$1 is read-only",unknownForHead:"Unknown node type $1 in ForStatement",didYouMean:"Did you mean $1?",codeGeneratorDeopt:"Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.",missingTemplatesDirectory:"no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues",
+unsupportedOutputType:"Unsupported output type $1",illegalMethodName:"Illegal method name $1",lostTrackNodePath:"We lost track of this nodes position, likely because the AST was directly manipulated",modulesIllegalExportName:"Illegal export $1",modulesDuplicateDeclarations:"Duplicate module declarations with the same source but in different scopes",undeclaredVariable:"Reference to undeclared variable $1",undeclaredVariableType:"Referencing a type alias outside of a type annotation",undeclaredVariableSuggestion:"Reference to undeclared variable $1 - did you mean $2?",traverseNeedsParent:"Must pass a scope and parentPath unless traversing a Program/File got a $1 node",traverseVerifyRootFunction:"You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?",traverseVerifyVisitorProperty:"You passed `traverse()` a visitor object with the property $1 that has the invalid property $2",traverseVerifyNodeType:"You gave us a visitor for the node type $1 but it's not a valid type",pluginIllegalKind:"Illegal kind $1 for plugin $2",pluginIllegalPosition:"Illegal position $1 for plugin $2",pluginKeyCollision:"The plugin $1 collides with another of the same name",pluginNotTransformer:"The plugin $1 didn't export a Plugin instance",pluginUnknown:"Unknown plugin $1",pluginNotFile:"Plugin $1 is resolving to a different Babel version to what is doing the actual transformation..."};exports.MESSAGES=MESSAGES;function get(key){for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key]}var msg=MESSAGES[key];if(!msg)throw new ReferenceError("Unknown message "+JSON.stringify(key));args=parseArgs(args);return msg.replace(/\$(\d+)/g,function(str,i){return args[--i]})}function parseArgs(args){return args.map(function(val){if(val!=null&&val.inspect){return val.inspect()}else{try{return JSON.stringify(val)||val+""}catch(e){return util.inspect(val)}}})}},{"./tools/protect.js":52,util:239}],49:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _estraverse=require("estraverse");var _estraverse2=_interopRequireDefault(_estraverse);var _lodashObjectExtend=require("lodash/object/extend");var _lodashObjectExtend2=_interopRequireDefault(_lodashObjectExtend);var _astTypes=require("ast-types");var _astTypes2=_interopRequireDefault(_astTypes);var _types=require("./types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}_lodashObjectExtend2["default"](_estraverse2["default"].VisitorKeys,t.VISITOR_KEYS);var def=_astTypes2["default"].Type.def;var or=_astTypes2["default"].Type.or;def("Noop");def("AssignmentPattern").bases("Pattern").build("left","right").field("left",def("Pattern")).field("right",def("Expression"));def("RestElement").bases("Pattern").build("argument").field("argument",def("expression"));def("DoExpression").bases("Expression").build("body").field("body",[def("Statement")]);def("Super").bases("Expression");def("ExportDefaultDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null));def("ExportNamedDeclaration").bases("Declaration").build("declaration").field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"))]).field("source",or(def("ModuleSpecifier"),null));def("ExportNamespaceSpecifier").bases("Specifier").field("exported",def("Identifier"));def("ExportDefaultSpecifier").bases("Specifier").field("exported",def("Identifier"));def("ExportAllDeclaration").bases("Declaration").build("exported","source").field("exported",def("Identifier")).field("source",def("Literal"));def("BindExpression").bases("Expression").build("object","callee").field("object",or(def("Expression"),null)).field("callee",def("Expression"));_astTypes2["default"].finalize()},{"./tools/protect.js":52,"./types":174,"ast-types":194,estraverse:342,"lodash/object/extend":466}],50:[function(require,module,exports){(function(global){"use strict";var _toolsProtectJs2=require("./tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);require("core-js/shim");require("regenerator/runtime");_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}if(global._babelPolyfill){throw new Error("only one instance of babel/polyfill is allowed")}global._babelPolyfill=true}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./tools/protect.js":52,"core-js/shim":337,"regenerator/runtime":518}],51:[function(require,module,exports){"use strict";var _protectJs2=require(".//protect.js");var _protectJs3=_interopRequireDefault(_protectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _generation=require("../generation");var _generation2=_interopRequireDefault(_generation);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../util");var util=_interopRequireWildcard(_util);var _transformationFile=require("../transformation/file");var _transformationFile2=_interopRequireDefault(_transformationFile);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _types=require("../types");var t=_interopRequireWildcard(_types);_protectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function buildGlobal(namespace,builder){var body=[];var container=t.functionExpression(null,[t.identifier("global")],t.blockStatement(body));var tree=t.program([t.expressionStatement(t.callExpression(container,[util.template("helper-self-global")]))]);body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.assignmentExpression("=",t.memberExpression(t.identifier("global"),namespace),t.objectExpression([])))]));builder(body);return tree}function buildUmd(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.identifier("global"))]));builder(body);var container=util.template("umd-commonjs-strict",{FACTORY_PARAMETERS:t.identifier("global"),BROWSER_ARGUMENTS:t.assignmentExpression("=",t.memberExpression(t.identifier("root"),namespace),t.objectExpression({})),COMMON_ARGUMENTS:t.identifier("exports"),AMD_ARGUMENTS:t.arrayExpression([t.literal("exports")]),FACTORY_BODY:body,UMD_ROOT:t.identifier("this")});return t.program([container])}function buildVar(namespace,builder){var body=[];body.push(t.variableDeclaration("var",[t.variableDeclarator(namespace,t.objectExpression({}))]));builder(body);return t.program(body)}function buildHelpers(body,namespace,whitelist){_lodashCollectionEach2["default"](_transformationFile2["default"].helpers,function(name){if(whitelist&&whitelist.indexOf(name)===-1)return;var key=t.identifier(t.toIdentifier(name));body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(namespace,key),util.template("helper-"+name))))})}exports["default"]=function(whitelist){var outputType=arguments[1]===undefined?"global":arguments[1];var namespace=t.identifier("babelHelpers");var builder=function builder(body){return buildHelpers(body,namespace,whitelist)};var tree;var build={global:buildGlobal,umd:buildUmd,"var":buildVar}[outputType];if(build){tree=build(namespace,builder)}else{throw new Error(messages.get("unsupportedOutputType",outputType))}return _generation2["default"](tree).code};module.exports=exports["default"]},{"../generation":35,"../messages":48,"../transformation/file":53,"../types":174,"../util":178,".//protect.js":52,"lodash/collection/each":367}],52:[function(require,module,exports){(function(__dirname){"use strict";exports.__esModule=true;function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _path=require("path");var _path2=_interopRequireDefault(_path);var root=_path2["default"].resolve(__dirname,"../../../");exports["default"]=function(module){if(module.parent&&module.parent.filename.indexOf(root)!==0){throw new Error("Don't hotlink internal Babel files.")}};module.exports=exports["default"]}).call(this,"/lib/babel/tools")},{path:222}],53:[function(require,module,exports){(function(process){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=0)continue;var group=pass.plugin.metadata.group;if(!pass.canTransform()||!group){stack.push(pass);continue}var mergeStack=[];var _arr4=_stack;for(var _i4=0;_i4<_arr4.length;_i4++){var _pass=_arr4[_i4];if(_pass.plugin.metadata.group===group){mergeStack.push(_pass);ignore.push(_pass)}}var visitors=[];var _arr5=mergeStack;for(var _i5=0;_i5<_arr5.length;_i5++){var _pass2=_arr5[_i5];visitors.push(_pass2.plugin.visitor)}var visitor=_traversal2["default"].visitors.merge(visitors);var mergePlugin=new _plugin2["default"](group,{visitor:visitor});stack.push(mergePlugin.buildPass(this))}return stack};File.prototype.set=function set(key,val){return this.data[key]=val};File.prototype.setDynamic=function setDynamic(key,fn){this.dynamicData[key]=fn};File.prototype.get=function get(key){var data=this.data[key];if(data){return data}else{var dynamic=this.dynamicData[key];if(dynamic){return this.set(key,dynamic())}}};File.prototype.resolveModuleSource=function resolveModuleSource(source){var resolveModuleSource=this.opts.resolveModuleSource;if(resolveModuleSource)source=resolveModuleSource(source,this.opts.filename);return source};File.prototype.addImport=function addImport(source,name,type){name=name||source;var id=this.dynamicImportIds[name];if(!id){source=this.resolveModuleSource(source);id=this.dynamicImportIds[name]=this.scope.generateUidIdentifier(name);var specifiers=[t.importDefaultSpecifier(id)];var declar=t.importDeclaration(specifiers,t.literal(source));declar._blockHoist=3;if(type){var modules=this.dynamicImportTypes[type]=this.dynamicImportTypes[type]||[];modules.push(declar)}if(this.transformers["es6.modules"].canTransform()){this.moduleFormatter.importSpecifier(specifiers[0],declar,this.dynamicImports,this.scope);this.moduleFormatter.hasLocalImports=true}else{this.dynamicImports.push(declar)}}return id};File.prototype.attachAuxiliaryComment=function attachAuxiliaryComment(node){var beforeComment=this.opts.auxiliaryCommentBefore;if(beforeComment){node.leadingComments=node.leadingComments||[];node.leadingComments.push({type:"CommentLine",value:" "+beforeComment})}var afterComment=this.opts.auxiliaryCommentAfter;if(afterComment){node.trailingComments=node.trailingComments||[];node.trailingComments.push({type:"CommentLine",value:" "+afterComment})}return node};File.prototype.addHelper=function addHelper(name){var isSolo=_lodashCollectionIncludes2["default"](File.soloHelpers,name);if(!isSolo&&!_lodashCollectionIncludes2["default"](File.helpers,name)){throw new ReferenceError("Unknown helper "+name)}var declar=this.declarations[name];if(declar)return declar;this.usedHelpers[name]=true;if(!isSolo){var generator=this.get("helperGenerator");var runtime=this.get("helpersNamespace");if(generator){return generator(name)}else if(runtime){var id=t.identifier(t.toIdentifier(name));return t.memberExpression(runtime,id)}}var ref=util.template("helper-"+name);var uid=this.declarations[name]=this.scope.generateUidIdentifier(name);if(t.isFunctionExpression(ref)&&!ref.id){ref.body._compact=true;ref._generated=true;ref.id=uid;ref.type="FunctionDeclaration";this.attachAuxiliaryComment(ref);this.path.unshiftContainer("body",ref)}else{ref._compact=true;this.scope.push({id:uid,init:ref,unique:true})}return uid};File.prototype.errorWithNode=function errorWithNode(node,msg){var Error=arguments[2]===undefined?SyntaxError:arguments[2];var err;if(node&&node.loc){var loc=node.loc.start;err=new Error("Line "+loc.line+": "+msg);err.loc=loc}else{err=new Error("There's been an error on a dynamic node. This is almost certainly an internal error. Please report it.")}return err};File.prototype.mergeSourceMap=function mergeSourceMap(map){var opts=this.opts;var inputMap=opts.inputSourceMap;if(inputMap){map.sources[0]=inputMap.file;var inputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(inputMap);var outputMapConsumer=new _sourceMap2["default"].SourceMapConsumer(map);var outputMapGenerator=_sourceMap2["default"].SourceMapGenerator.fromSourceMap(outputMapConsumer);outputMapGenerator.applySourceMap(inputMapConsumer);var mergedMap=outputMapGenerator.toJSON();mergedMap.sources=inputMap.sources;mergedMap.file=inputMap.file;return mergedMap}return map};File.prototype.getModuleFormatter=function getModuleFormatter(type){if(_lodashLangIsFunction2["default"](type)||!_modules2["default"][type]){this.log.deprecate("Custom module formatters are deprecated and will be removed in the next major. Please use Babel plugins instead.")}var ModuleFormatter=_lodashLangIsFunction2["default"](type)?type:_modules2["default"][type];if(!ModuleFormatter){var loc=util.resolveRelative(type);if(loc)ModuleFormatter=require(loc)}if(!ModuleFormatter){throw new ReferenceError("Unknown module formatter type "+JSON.stringify(type))}return new ModuleFormatter(this)};File.prototype.parse=function parse(code){var opts=this.opts;var parseOpts={highlightCode:opts.highlightCode,nonStandard:opts.nonStandard,filename:opts.filename,plugins:{}};var features=parseOpts.features={};for(var key in this.transformers){var transformer=this.transformers[key];features[key]=transformer.canTransform()}parseOpts.looseModules=this.isLoose("es6.modules");parseOpts.strictMode=features.strict;parseOpts.sourceType="module";this.log.debug("Parse start");var tree=_helpersParse2["default"](code,parseOpts);this.log.debug("Parse stop");return tree};File.prototype._addAst=function _addAst(ast){this.path=_traversalPath2["default"].get({hub:this.hub,parentPath:null,parent:ast,container:ast,key:"program"}).setContext();this.scope=this.path.scope;this.ast=ast};File.prototype.addAst=function addAst(ast){this.log.debug("Start set AST");this._addAst(ast);this.log.debug("End set AST");this.log.debug("Start module formatter init");var modFormatter=this.moduleFormatter=this.getModuleFormatter(this.opts.modules);if(modFormatter.init&&this.transformers["es6.modules"].canTransform()){modFormatter.init()}this.log.debug("End module formatter init")};File.prototype.transform=function transform(){this.call("pre");var _arr6=this.transformerStack;for(var _i6=0;_i6<_arr6.length;_i6++){var pass=_arr6[_i6];pass.transform()}this.call("post");return this.generate()};File.prototype.wrap=function wrap(code,callback){code=code+"";try{if(this.shouldIgnore()){return this.makeResult({code:code,ignored:true})}else{return callback()}}catch(err){if(err._babel){throw err}else{err._babel=true}var message=err.message=this.opts.filename+": "+err.message;var loc=err.loc;if(loc){err.codeFrame=_helpersCodeFrame2["default"](code,loc.line,loc.column+1,this.opts);message+="\n"+err.codeFrame}if(err.stack){var newStack=err.stack.replace(err.message,message);try{err.stack=newStack}catch(e){}}throw err}};File.prototype.addCode=function addCode(code){code=(code||"")+"";code=this.parseInputSourceMap(code);this.code=code};File.prototype.parseCode=function parseCode(){this.parseShebang();this.addAst(this.parse(this.code))};File.prototype.shouldIgnore=function shouldIgnore(){var opts=this.opts;return util.shouldIgnore(opts.filename,opts.ignore,opts.only)};File.prototype.call=function call(key){var _arr7=this.uncollapsedTransformerStack;for(var _i7=0;_i7<_arr7.length;_i7++){var pass=_arr7[_i7];var fn=pass.plugin[key];if(fn)fn(this)}};File.prototype.parseInputSourceMap=function parseInputSourceMap(code){var opts=this.opts;if(opts.inputSourceMap!==false){var inputMap=_convertSourceMap2["default"].fromSource(code);if(inputMap){opts.inputSourceMap=inputMap.toObject();code=_convertSourceMap2["default"].removeComments(code)}}return code};File.prototype.parseShebang=function parseShebang(){var shebangMatch=_shebangRegex2["default"].exec(this.code);if(shebangMatch){this.shebang=shebangMatch[0];this.code=this.code.replace(_shebangRegex2["default"],"")}};File.prototype.makeResult=function makeResult(_ref){var code=_ref.code;var _ref$map=_ref.map;var map=_ref$map===undefined?null:_ref$map;var ast=_ref.ast;var ignored=_ref.ignored;var result={metadata:null,ignored:!!ignored,code:null,ast:null,map:map};if(this.opts.code){result.code=code}if(this.opts.ast){result.ast=ast}if(this.opts.metadata){result.metadata=this.metadata;result.metadata.usedHelpers=Object.keys(this.usedHelpers)}return result};File.prototype.generate=function generate(){var opts=this.opts;var ast=this.ast;var result={ast:ast};if(!opts.code)return this.makeResult(result);this.log.debug("Generation start");var _result=_generation2["default"](ast,opts,this.code);result.code=_result.code;result.map=_result.map;this.log.debug("Generation end");if(this.shebang){result.code=this.shebang+"\n"+result.code}if(result.map){result.map=this.mergeSourceMap(result.map)}if(opts.sourceMaps==="inline"||opts.sourceMaps==="both"){result.code+="\n"+_convertSourceMap2["default"].fromObject(result.map).toComment()}if(opts.sourceMaps==="inline"){result.map=null}return this.makeResult(result)};_createClass(File,null,[{key:"helpers",value:["inherits","defaults","create-class","create-decorated-class","create-decorated-object","define-decorated-property-descriptor","tagged-template-literal","tagged-template-literal-loose","to-array","to-consumable-array","sliced-to-array","sliced-to-array-loose","object-without-properties","has-own","slice","bind","define-property","async-to-generator","interop-require-wildcard","interop-require-default","typeof","extends","get","set","class-call-check","object-destructuring-empty","temporal-undefined","temporal-assert-defined","self-global","default-props","instanceof","interop-require"],enumerable:true},{key:"soloHelpers",value:[],enumerable:true},{key:"options",value:_options.config,enumerable:true}]);return File}();exports["default"]=File;module.exports=exports["default"]}).call(this,require("_process"))},{"../../generation":35,"../../helpers/code-frame":43,"../../helpers/merge":44,"../../helpers/parse":47,"../../traversal":149,"../../traversal/hub":148,"../../traversal/path":156,"../../types":174,"../../util":178,"../modules":81,"../plugin":88,"./../../tools/protect.js":52,"./logger":54,"./options":56,"./options/resolve-rc":58,"./plugin-manager":59,_process:223,"convert-source-map":248,"lodash/collection/includes":369,"lodash/lang/clone":449,"lodash/lang/isFunction":455,"lodash/object/assign":464,"lodash/object/defaults":465,path:222,"path-is-absolute":483,"shebang-regex":528,slash:529,"source-map":530}],54:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _debugNode=require("debug/node");var _debugNode2=_interopRequireDefault(_debugNode);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var verboseDebug=_debugNode2["default"]("babel:verbose");var generalDebug=_debugNode2["default"]("babel");var seenDeprecatedMessages=[];var Logger=function(){function Logger(file,filename){_classCallCheck(this,Logger);this.filename=filename;this.file=file}Logger.prototype._buildMessage=function _buildMessage(msg){var parts="[BABEL] "+this.filename;if(msg)parts+=": "+msg;return parts};Logger.prototype.warn=function warn(msg){console.warn(this._buildMessage(msg))};Logger.prototype.error=function error(msg){var Constructor=arguments[1]===undefined?Error:arguments[1];throw new Constructor(this._buildMessage(msg))};Logger.prototype.deprecate=function deprecate(msg){if(this.file.opts.suppressDeprecationMessages)return;msg=this._buildMessage(msg);if(seenDeprecatedMessages.indexOf(msg)>=0)return;seenDeprecatedMessages.push(msg);console.error(msg)};Logger.prototype.verbose=function verbose(msg){if(verboseDebug.enabled)verboseDebug(this._buildMessage(msg))};Logger.prototype.debug=function debug(msg){if(generalDebug.enabled)generalDebug(this._buildMessage(msg))};Logger.prototype.deopt=function deopt(node,msg){this.debug(msg)};return Logger}();exports["default"]=Logger;module.exports=exports["default"]},{"./../../tools/protect.js":52,"debug/node":339}],55:[function(require,module,exports){module.exports={filename:{type:"string",description:"filename to use when reading from stdin - this will be used in source-maps, errors etc","default":"unknown",shorthand:"f"},filenameRelative:{hidden:true,type:"string"},inputSourceMap:{hidden:true},extra:{hidden:true,"default":{}},env:{hidden:true,"default":{}},moduleId:{description:"specify a custom name for module ids",type:"string"},getModuleId:{hidden:true},retainLines:{type:"boolean","default":false,description:"retain line numbers - will result in really ugly code"},nonStandard:{type:"boolean","default":true,description:"enable/disable support for JSX and Flow (on by default)"},experimental:{type:"boolean",description:"allow use of experimental transformers","default":false},highlightCode:{description:"enable/disable ANSI syntax highlighting of code frames (on by default)",type:"boolean","default":true},suppressDeprecationMessages:{type:"boolean","default":false,hidden:true},resolveModuleSource:{hidden:true},stage:{description:"ECMAScript proposal stage version to allow [0-4]",shorthand:"e",type:"number","default":2},blacklist:{type:"transformerList",description:"blacklist of transformers to NOT use",shorthand:"b","default":[]},whitelist:{type:"transformerList",optional:true,description:"whitelist of transformers to ONLY use",shorthand:"l"},optional:{type:"transformerList",description:"list of optional transformers to enable","default":[]},modules:{type:"string",description:"module formatter type to use [common]","default":"common",shorthand:"m"},moduleIds:{type:"boolean","default":false,shorthand:"M",description:"insert an explicit id for modules"},loose:{type:"transformerList",description:"list of transformers to enable loose mode ON",shorthand:"L"},jsxPragma:{type:"string",description:"custom pragma to use with JSX (same functionality as @jsx comments)","default":"React.createElement",shorthand:"P"},plugins:{type:"list",description:"","default":[]},ignore:{type:"list",description:"list of glob paths to **not** compile","default":[]},only:{type:"list",description:"list of glob paths to **only** compile"},code:{hidden:true,"default":true,type:"boolean"},metadata:{hidden:true,"default":true,type:"boolean"},ast:{hidden:true,"default":true,type:"boolean"},comments:{type:"boolean","default":true,description:"strip/output comments in generated output (on by default)"},compact:{type:"booleanString","default":"auto",description:"do not include superfluous whitespace characters and line terminators [true|false|auto]"},keepModuleIdExtensions:{type:"boolean",description:"keep extensions when generating module ids","default":false,shorthand:"k"},auxiliaryComment:{deprecated:"renamed to auxiliaryCommentBefore",shorthand:"a",alias:"auxiliaryCommentBefore"},auxiliaryCommentBefore:{type:"string","default":"",description:"attach a comment before all helper declarations and auxiliary code"},auxiliaryCommentAfter:{type:"string","default":"",description:"attach a comment after all helper declarations and auxiliary code"},externalHelpers:{type:"boolean","default":false,shorthand:"r",description:"uses a reference to `babelHelpers` instead of placing helpers at the top of your code."},metadataUsedHelpers:{deprecated:"Not required anymore as this is enabled by default",type:"boolean","default":false,hidden:true},sourceMap:{alias:"sourceMaps",hidden:true
+},sourceMaps:{type:"booleanString",description:"[true|false|inline]","default":false,shorthand:"s"},sourceMapName:{alias:"sourceMapTarget",description:"DEPRECATED - Please use sourceMapTarget"},sourceMapTarget:{type:"string",description:"set `file` on returned source map"},sourceFileName:{type:"string",description:"set `sources[0]` on returned source map"},sourceRoot:{type:"string",description:"the root from which all sources are relative"},moduleRoot:{type:"string",description:"optional prefix for the AMD module formatter that will be prepend to the filename on module definitions"},breakConfig:{type:"boolean","default":false,hidden:true,description:"stop trying to load .babelrc files"},babelrc:{hidden:true,description:"do not load the same .babelrc file twice"}}},{}],56:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.validateOption=validateOption;exports.normaliseOptions=normaliseOptions;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _parsers=require("./parsers");var parsers=_interopRequireWildcard(_parsers);var _config=require("./config");var _config2=_interopRequireDefault(_config);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports.config=_config2["default"];function validateOption(key,val,pipeline){var opt=_config2["default"][key];var parser=opt&&parsers[opt.type];if(parser&&parser.validate){return parser.validate(key,val,pipeline)}else{return val}}function normaliseOptions(){var options=arguments[0]===undefined?{}:arguments[0];for(var key in options){var val=options[key];if(val==null)continue;var opt=_config2["default"][key];if(!opt)continue;var parser=parsers[opt.type];if(parser)val=parser(val);options[key]=val}return options}},{"./../../../tools/protect.js":52,"./config":55,"./parsers":57}],57:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.transformerList=transformerList;exports.number=number;exports.boolean=boolean;exports.booleanString=booleanString;exports.list=list;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _util=require("../../../util");var util=_interopRequireWildcard(_util);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function transformerList(val){return util.arrayify(val)}transformerList.validate=function(key,val,pipeline){if(val.indexOf("all")>=0||val.indexOf(true)>=0){val=Object.keys(pipeline.transformers)}return pipeline._ensureTransformerNames(key,val)};function number(val){return+val}function boolean(val){return!!val}function booleanString(val){return util.booleanify(val)}function list(val){return util.list(val)}},{"../../../util":178,"./../../../tools/protect.js":52}],58:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;var _stripJsonComments=require("strip-json-comments");var _stripJsonComments2=_interopRequireDefault(_stripJsonComments);var _index=require("./index");var _helpersMerge=require("../../../helpers/merge");var _helpersMerge2=_interopRequireDefault(_helpersMerge);var _path=require("path");var _path2=_interopRequireDefault(_path);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _pathExists=require("path-exists");var _pathExists2=_interopRequireDefault(_pathExists);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var cache={};var jsons={};function exists(filename){var cached=cache[filename];if(cached!=null)return cached;return cache[filename]=_pathExists2["default"].sync(filename)}exports["default"]=function(loc){var opts=arguments[1]===undefined?{}:arguments[1];var rel=".babelrc";if(!opts.babelrc){opts.babelrc=[]}function find(start,rel){var file=_path2["default"].join(start,rel);if(opts.babelrc.indexOf(file)>=0){return}if(exists(file)){var content=_fs2["default"].readFileSync(file,"utf8");var json;try{json=jsons[content]=jsons[content]||JSON.parse(_stripJsonComments2["default"](content));_index.normaliseOptions(json)}catch(err){err.message=file+": "+err.message;throw err}opts.babelrc.push(file);if(json.breakConfig)return;_helpersMerge2["default"](opts,json)}var up=_path2["default"].dirname(start);if(up!==start){find(up,rel)}}if(opts.babelrc.indexOf(loc)<0&&opts.breakConfig!==true){find(loc,rel)}return opts};module.exports=exports["default"]},{"../../../helpers/merge":44,"./../../../tools/protect.js":52,"./index":56,fs:212,path:222,"path-exists":482,"strip-json-comments":541}],59:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;var _createClass=function(){function defineProperties(target,props){for(var i=0;i=3){callExpr._prettyCall=true}return t.inherits(callExpr,node)}};return visitor};module.exports=exports["default"]},{"../../messages":48,"../../types":174,"./../../tools/protect.js":52,"./react":69,esutils:347,"lodash/lang/isString":461}],63:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var visitor={enter:function enter(node,parent,scope,state){if(this.isThisExpression()||this.isReferencedIdentifier({name:"arguments"})){state.found=true;this.stop()}},Function:function Function(){this.skip()}};exports["default"]=function(node,scope){var container=t.functionExpression(null,[],node.body,node.generator,node.async);var callee=container;var args=[];var state={found:false};scope.traverse(node,visitor,state);if(state.found){callee=t.memberExpression(container,t.identifier("apply"));args=[t.thisExpression(),t.identifier("arguments")]}var call=t.callExpression(callee,args);if(node.generator)call=t.yieldExpression(call,true);return t.returnStatement(call)};module.exports=exports["default"]},{"../../types":174,"./../../tools/protect.js":52}],64:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.push=push;exports.hasComputed=hasComputed;exports.toComputedObjectFromClass=toComputedObjectFromClass;exports.toClassObject=toClassObject;exports.toDefineObject=toDefineObject;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function push(mutatorMap,node,kind,file){var alias=t.toKeyAlias(node);var map={};if(_lodashObjectHas2["default"](mutatorMap,alias))map=mutatorMap[alias];mutatorMap[alias]=map;map._inherits=map._inherits||[];map._inherits.push(node);map._key=node.key;if(node.computed){map._computed=true}if(node.decorators){var decorators=map.decorators=map.decorators||t.arrayExpression([]);decorators.elements=decorators.elements.concat(node.decorators.map(function(dec){return dec.expression}).reverse())}if(map.value||map.initializer){throw file.errorWithNode(node,"Key conflict with sibling node")}if(node.value){if(node.kind==="init")kind="value";if(node.kind==="get")kind="get";if(node.kind==="set")kind="set";t.inheritsComments(node.value,node);map[kind]=node.value}return map}function hasComputed(mutatorMap){for(var key in mutatorMap){if(mutatorMap[key]._computed){return true}}return false}function toComputedObjectFromClass(obj){var objExpr=t.arrayExpression([]);for(var i=0;i=0}function pullFlag(node,flag){var flags=node.regex.flags.split("");if(node.regex.flags.indexOf(flag)<0)return;_lodashArrayPull2["default"](flags,flag);node.regex.flags=flags.join("")}},{"../../types":174,"./../../tools/protect.js":52,"lodash/array/pull":364}],71:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){
+return obj&&obj.__esModule?obj:{"default":obj}}var awaitVisitor={Function:function Function(){this.skip()},AwaitExpression:function AwaitExpression(node){node.type="YieldExpression";if(node.all){node.all=false;node.argument=t.callExpression(t.memberExpression(t.identifier("Promise"),t.identifier("all")),[node.argument])}}};var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){var name=state.id.name;if(node.name===name&&scope.bindingIdentifierEquals(name,state.id)){return state.ref=state.ref||scope.generateUidIdentifier(name)}}};exports["default"]=function(path,callId){var node=path.node;node.async=false;node.generator=true;path.traverse(awaitVisitor,state);var call=t.callExpression(callId,[node]);var id=node.id;node.id=null;if(t.isFunctionDeclaration(node)){var declar=t.variableDeclaration("let",[t.variableDeclarator(id,call)]);declar._blockHoist=true;return declar}else{if(id){var state={id:id};path.traverse(referenceVisitor,state);if(state.ref){path.scope.parent.push({id:state.ref});return t.assignmentExpression("=",state.ref,call)}}return call}};module.exports=exports["default"]},{"../../types":174,"./../../tools/protect.js":52}],72:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function isIllegalBareSuper(node,parent){if(!t.isSuper(node))return false;if(t.isMemberExpression(parent,{computed:false}))return false;if(t.isCallExpression(parent,{callee:node}))return false;return true}function isMemberExpressionSuper(node){return t.isMemberExpression(node)&&t.isSuper(node.object)}var visitor={enter:function enter(node,parent,scope,state){var topLevel=state.topLevel;var self=state.self;if(t.isFunction(node)&&!t.isArrowFunctionExpression(node)){self.traverseLevel(this,false);return this.skip()}if(t.isProperty(node,{method:true})||t.isMethodDefinition(node)){return this.skip()}var getThisReference=topLevel?t.thisExpression:self.getThisReference.bind(self);var callback=self.specHandle;if(self.isLoose)callback=self.looseHandle;var result=callback.call(self,this,getThisReference);if(result)this.hasSuper=true;if(result===true)return;return result}};var ReplaceSupers=function(){function ReplaceSupers(opts){var inClass=arguments[1]===undefined?false:arguments[1];_classCallCheck(this,ReplaceSupers);this.topLevelThisReference=opts.topLevelThisReference;this.methodPath=opts.methodPath;this.methodNode=opts.methodNode;this.superRef=opts.superRef;this.isStatic=opts.isStatic;this.hasSuper=false;this.inClass=inClass;this.isLoose=opts.isLoose;this.scope=opts.scope;this.file=opts.file;this.opts=opts}ReplaceSupers.prototype.getObjectRef=function getObjectRef(){return this.opts.objectRef||this.opts.getObjectRef()};ReplaceSupers.prototype.setSuperProperty=function setSuperProperty(property,value,isComputed,thisExpression){return t.callExpression(this.file.addHelper("set"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),value,thisExpression])};ReplaceSupers.prototype.getSuperProperty=function getSuperProperty(property,isComputed,thisExpression){return t.callExpression(this.file.addHelper("get"),[t.callExpression(t.memberExpression(t.identifier("Object"),t.identifier("getPrototypeOf")),[this.isStatic?this.getObjectRef():t.memberExpression(this.getObjectRef(),t.identifier("prototype"))]),isComputed?property:t.literal(property.name),thisExpression])};ReplaceSupers.prototype.replace=function replace(){this.traverseLevel(this.methodPath.get("value"),true)};ReplaceSupers.prototype.traverseLevel=function traverseLevel(path,topLevel){var state={self:this,topLevel:topLevel};path.traverse(visitor,state)};ReplaceSupers.prototype.getThisReference=function getThisReference(){if(this.topLevelThisReference){return this.topLevelThisReference}else{var ref=this.topLevelThisReference=this.scope.generateUidIdentifier("this");this.methodNode.value.body.body.unshift(t.variableDeclaration("var",[t.variableDeclarator(this.topLevelThisReference,t.thisExpression())]));return ref}};ReplaceSupers.prototype.getLooseSuperProperty=function getLooseSuperProperty(id,parent){var methodNode=this.methodNode;var methodName=methodNode.key;var superRef=this.superRef||t.identifier("Function");if(parent.property===id){return}else if(t.isCallExpression(parent,{callee:id})){parent.arguments.unshift(t.thisExpression());if(methodName.name==="constructor"){if(parent.arguments.length===2&&t.isSpreadElement(parent.arguments[1])&&t.isIdentifier(parent.arguments[1].argument,{name:"arguments"})){parent.arguments[1]=parent.arguments[1].argument;return t.memberExpression(superRef,t.identifier("apply"))}else{return t.memberExpression(superRef,t.identifier("call"))}}else{id=superRef;if(!methodNode["static"]){id=t.memberExpression(id,t.identifier("prototype"))}id=t.memberExpression(id,methodName,methodNode.computed);return t.memberExpression(id,t.identifier("call"))}}else if(t.isMemberExpression(parent)&&!methodNode["static"]){return t.memberExpression(superRef,t.identifier("prototype"))}else{return superRef}};ReplaceSupers.prototype.looseHandle=function looseHandle(path,getThisReference){var node=path.node;if(path.isSuper()){return this.getLooseSuperProperty(node,path.parent)}else if(path.isCallExpression()){var callee=node.callee;if(!t.isMemberExpression(callee))return;if(!t.isSuper(callee.object))return;t.appendToMemberExpression(callee,t.identifier("call"));node.arguments.unshift(getThisReference());return true}};ReplaceSupers.prototype.specHandleAssignmentExpression=function specHandleAssignmentExpression(ref,path,node,getThisReference){if(node.operator==="="){return this.setSuperProperty(node.left.property,node.right,node.left.computed,getThisReference())}else{ref=ref||path.scope.generateUidIdentifier("ref");return[t.variableDeclaration("var",[t.variableDeclarator(ref,node.left)]),t.expressionStatement(t.assignmentExpression("=",node.left,t.binaryExpression(node.operator[0],ref,node.right)))]}};ReplaceSupers.prototype.specHandle=function specHandle(path,getThisReference){var methodNode=this.methodNode;var property;var computed;var args;var thisReference;var parent=path.parent;var node=path.node;if(isIllegalBareSuper(node,parent)){throw path.errorWithNode(messages.get("classesIllegalBareSuper"))}if(t.isCallExpression(node)){var callee=node.callee;if(t.isSuper(callee)){property=methodNode.key;computed=methodNode.computed;args=node.arguments;if(methodNode.key.name!=="constructor"||!this.inClass){var methodName=methodNode.key.name||"METHOD_NAME";throw this.file.errorWithNode(node,messages.get("classesIllegalSuperCall",methodName))}}else if(isMemberExpressionSuper(callee)){property=callee.property;computed=callee.computed;args=node.arguments}}else if(t.isMemberExpression(node)&&t.isSuper(node.object)){property=node.property;computed=node.computed}else if(t.isUpdateExpression(node)&&isMemberExpressionSuper(node.argument)){var binary=t.binaryExpression(node.operator[0],node.argument,t.literal(1));if(node.prefix){return this.specHandleAssignmentExpression(null,path,binary,getThisReference)}else{var ref=path.scope.generateUidIdentifier("ref");return this.specHandleAssignmentExpression(ref,path,binary,getThisReference).concat(t.expressionStatement(ref))}}else if(t.isAssignmentExpression(node)&&isMemberExpressionSuper(node.left)){return this.specHandleAssignmentExpression(null,path,node,getThisReference)}if(!property)return;thisReference=getThisReference();var superProperty=this.getSuperProperty(property,computed,thisReference);if(args){if(args.length===1&&t.isSpreadElement(args[0])){return t.callExpression(t.memberExpression(superProperty,t.identifier("apply")),[thisReference,args[0].argument])}else{return t.callExpression(t.memberExpression(superProperty,t.identifier("call")),[thisReference].concat(args))}}else{return superProperty}};return ReplaceSupers}();exports["default"]=ReplaceSupers;module.exports=exports["default"]},{"../../messages":48,"../../types":174,"./../../tools/protect.js":52}],73:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _pipeline=require("./pipeline");var _pipeline2=_interopRequireDefault(_pipeline);var _transformers=require("./transformers");var _transformers2=_interopRequireDefault(_transformers);var _transformersDeprecated=require("./transformers/deprecated");var _transformersDeprecated2=_interopRequireDefault(_transformersDeprecated);var _transformersAliases=require("./transformers/aliases");var _transformersAliases2=_interopRequireDefault(_transformersAliases);var _transformersFilters=require("./transformers/filters");var filters=_interopRequireWildcard(_transformersFilters);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var pipeline=new _pipeline2["default"];for(var key in _transformers2["default"]){var transformer=_transformers2["default"][key];if(typeof transformer==="object"){var metadata=transformer.metadata=transformer.metadata||{};metadata.group=metadata.group||"builtin-basic"}}pipeline.addTransformers(_transformers2["default"]);pipeline.addDeprecated(_transformersDeprecated2["default"]);pipeline.addAliases(_transformersAliases2["default"]);pipeline.addFilter(filters.internal);pipeline.addFilter(filters.blacklist);pipeline.addFilter(filters.whitelist);pipeline.addFilter(filters.stage);pipeline.addFilter(filters.optional);var transform=pipeline.transform.bind(pipeline);transform.fromAst=pipeline.transformFromAst.bind(pipeline);transform.pipeline=pipeline;exports["default"]=transform;module.exports=exports["default"]},{"./../tools/protect.js":52,"./pipeline":86,"./transformers":127,"./transformers/aliases":90,"./transformers/deprecated":91,"./transformers/filters":126}],74:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _messages=require("../../messages");var messages=_interopRequireWildcard(_messages);var _libRemaps=require("./lib/remaps");var _libRemaps2=_interopRequireDefault(_libRemaps);var _lodashObjectExtend=require("lodash/object/extend");var _lodashObjectExtend2=_interopRequireDefault(_lodashObjectExtend);var _helpersObject=require("../../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _util=require("../../util");var util=_interopRequireWildcard(_util);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadataVisitor={ModuleDeclaration:{enter:function enter(node,parent,scope,formatter){if(node.source){node.source.value=formatter.file.resolveModuleSource(node.source.value);formatter.addScope(this)}}},ImportDeclaration:{exit:function exit(node,parent,scope,formatter){formatter.hasLocalImports=true;var specifiers=[];var imported=[];formatter.metadata.imports.push({source:node.source.value,imported:imported,specifiers:specifiers});var _arr=this.get("specifiers");for(var _i=0;_i<_arr.length;_i++){var specifier=_arr[_i];var ids=specifier.getBindingIdentifiers();_lodashObjectExtend2["default"](formatter.localImports,ids);var local=specifier.node.local.name;if(specifier.isImportDefaultSpecifier()){imported.push("default");specifiers.push({kind:"named",imported:"default",local:local})}if(specifier.isImportSpecifier()){var importedName=specifier.node.imported.name;imported.push(importedName);specifiers.push({kind:"named",imported:importedName,local:local})}if(specifier.isImportNamespaceSpecifier()){imported.push("*");specifiers.push({kind:"namespace",local:local})}}}},ExportDeclaration:function ExportDeclaration(node,parent,scope,formatter){formatter.hasLocalExports=true;var source=node.source?node.source.value:null;var exports=formatter.metadata.exports;var declar=this.get("declaration");if(declar.isStatement()){var bindings=declar.getBindingIdentifiers();for(var name in bindings){var binding=bindings[name];formatter._addExport(name,binding);exports.exported.push(name);exports.specifiers.push({kind:"local",local:name,exported:this.isExportDefaultDeclaration()?"default":name})}}if(this.isExportNamedDeclaration()&&node.specifiers){var _arr2=node.specifiers;for(var _i2=0;_i2<_arr2.length;_i2++){var specifier=_arr2[_i2];var exported=specifier.exported.name;exports.exported.push(exported);if(t.isExportDefaultSpecifier(specifier)){exports.specifiers.push({kind:"external",local:exported,exported:exported,source:source})}if(t.isExportNamespaceSpecifier(specifier)){exports.specifiers.push({kind:"external-namespace",exported:exported,source:source})}var local=specifier.local;if(!local)continue;formatter._addExport(local.name,specifier.exported);if(source){exports.specifiers.push({kind:"external",local:local.name,exported:exported,source:source})}if(!source){exports.specifiers.push({kind:"local",local:local.name,exported:exported})}}}if(this.isExportAllDeclaration()){exports.specifiers.push({kind:"external-all",source:source})}if(!t.isExportDefaultDeclaration(node)&&!declar.isTypeAlias()){var onlyDefault=node.specifiers&&node.specifiers.length===1&&t.isSpecifierDefault(node.specifiers[0]);if(!onlyDefault){formatter.hasNonDefaultExports=true}}},Scope:function Scope(node,parent,scope,formatter){if(!formatter.isLoose()){this.skip()}}};var DefaultFormatter=function(){function DefaultFormatter(file){_classCallCheck(this,DefaultFormatter);this.sourceScopes=_helpersObject2["default"]();this.defaultIds=_helpersObject2["default"]();this.ids=_helpersObject2["default"]();this.remaps=new _libRemaps2["default"](file,this);this.scope=file.scope;this.file=file;this.hasNonDefaultExports=false;this.hasLocalExports=false;this.hasLocalImports=false;this.localExports=_helpersObject2["default"]();this.localImports=_helpersObject2["default"]();this.metadata=file.metadata.modules;this.getMetadata()}DefaultFormatter.prototype.addScope=function addScope(path){var source=path.node.source&&path.node.source.value;if(!source)return;var existingScope=this.sourceScopes[source];if(existingScope&&existingScope!==path.scope){throw path.errorWithNode(messages.get("modulesDuplicateDeclarations"))}this.sourceScopes[source]=path.scope};DefaultFormatter.prototype.isModuleType=function isModuleType(node,type){var modules=this.file.dynamicImportTypes[type];return modules&&modules.indexOf(node)>=0};DefaultFormatter.prototype.transform=function transform(){this.remapAssignments()};DefaultFormatter.prototype.doDefaultExportInterop=function doDefaultExportInterop(node){return(t.isExportDefaultDeclaration(node)||t.isSpecifierDefault(node))&&!this.noInteropRequireExport&&!this.hasNonDefaultExports};DefaultFormatter.prototype.getMetadata=function getMetadata(){var has=false;var _arr3=this.file.ast.program.body;for(var _i3=0;_i3<_arr3.length;_i3++){var node=_arr3[_i3];if(t.isModuleDeclaration(node)){has=true;break}}if(has||this.isLoose()){this.file.path.traverse(metadataVisitor,this)}};DefaultFormatter.prototype.remapAssignments=function remapAssignments(){if(this.hasLocalExports||this.hasLocalImports){this.remaps.run()}};DefaultFormatter.prototype.remapExportAssignment=function remapExportAssignment(node,exported){var assign=node;for(var i=0;i=0){return}loopText=loopText+"|"+node.label.name}else{if(state.ignoreLabeless)return;if(state.inSwitchCase)return;if(t.isBreakStatement(node)&&t.isSwitchCase(parent))return}state.hasBreakContinue=true;state.map[loopText]=node;replace=t.literal(loopText)}if(this.isReturnStatement()){state.hasReturn=true;replace=t.objectExpression([t.property("init",t.identifier("v"),node.argument||t.identifier("undefined"))])}if(replace){replace=t.returnStatement(replace);this.skip();return t.inherits(replace,node)}}};var BlockScoping=function(){function BlockScoping(loopPath,blockPath,parent,scope,file){_classCallCheck(this,BlockScoping);this.parent=parent;this.scope=scope;this.file=file;this.blockPath=blockPath;this.block=blockPath.node;this.outsideLetReferences=_helpersObject2["default"]();this.hasLetReferences=false;this.letReferences=this.block._letReferences=_helpersObject2["default"]();this.body=[];if(loopPath){this.loopParent=loopPath.parent;this.loopLabel=t.isLabeledStatement(this.loopParent)&&this.loopParent.label;this.loopPath=loopPath;this.loop=loopPath.node}}BlockScoping.prototype.run=function run(){var block=this.block;if(block._letDone)return;block._letDone=true;var needsClosure=this.getLetReferences();if(t.isFunction(this.parent)||t.isProgram(this.block))return;if(!this.hasLetReferences)return;if(needsClosure){this.wrapClosure()}else{this.remap()}if(this.loopLabel&&!t.isLabeledStatement(this.loopParent)){return t.labeledStatement(this.loopLabel,this.loop)}};BlockScoping.prototype.remap=function remap(){var hasRemaps=false;var letRefs=this.letReferences;var scope=this.scope;var remaps=_helpersObject2["default"]();for(var key in letRefs){var ref=letRefs[key];if(scope.parentHasBinding(key)||scope.hasGlobal(key)){var uid=scope.generateUidIdentifier(ref.name).name;ref.name=uid;hasRemaps=true;remaps[key]=remaps[uid]={binding:ref,uid:uid}}}if(!hasRemaps)return;var loop=this.loop;if(loop){traverseReplace(loop.right,loop,scope,remaps);traverseReplace(loop.test,loop,scope,remaps);traverseReplace(loop.update,loop,scope,remaps)}this.blockPath.traverse(replaceVisitor,remaps)};BlockScoping.prototype.wrapClosure=function wrapClosure(){var block=this.block;var outsideRefs=this.outsideLetReferences;if(this.loop){for(var name in outsideRefs){var id=outsideRefs[name];if(this.scope.hasGlobal(id.name)||this.scope.parentHasBinding(id.name)){delete outsideRefs[id.name];delete this.letReferences[id.name];this.scope.rename(id.name);this.letReferences[id.name]=id;outsideRefs[id.name]=id}}}this.has=this.checkLoop();this.hoistVarDeclarations();var params=_lodashObjectValues2["default"](outsideRefs);var args=_lodashObjectValues2["default"](outsideRefs);var fn=t.functionExpression(null,params,t.blockStatement(block.body));fn.shadow=true;this.addContinuations(fn);block.body=this.body;var ref=fn;if(this.loop){ref=this.scope.generateUidIdentifier("loop");this.loopPath.insertBefore(t.variableDeclaration("var",[t.variableDeclarator(ref,fn)]))}var call=t.callExpression(ref,args);var ret=this.scope.generateUidIdentifier("ret");var hasYield=_traversal2["default"].hasType(fn.body,this.scope,"YieldExpression",t.FUNCTION_TYPES);if(hasYield){fn.generator=true;call=t.yieldExpression(call,true)}var hasAsync=_traversal2["default"].hasType(fn.body,this.scope,"AwaitExpression",t.FUNCTION_TYPES);if(hasAsync){fn.async=true;call=t.awaitExpression(call)}this.buildClosure(ret,call)};BlockScoping.prototype.buildClosure=function buildClosure(ret,call){var has=this.has;if(has.hasReturn||has.hasBreakContinue){this.buildHas(ret,call)}else{this.body.push(t.expressionStatement(call))}};BlockScoping.prototype.addContinuations=function addContinuations(fn){var state={reassignments:{},outsideReferences:this.outsideLetReferences};this.scope.traverse(fn,continuationVisitor,state);for(var i=0;i=spreadPropIndex)break;if(t.isSpreadProperty(prop))continue;var key=prop.key;if(t.isIdentifier(key)&&!prop.computed)key=t.literal(prop.key.name);keys.push(key)}keys=t.arrayExpression(keys);var value=t.callExpression(this.file.addHelper("object-without-properties"),[objRef,keys]);this.nodes.push(this.buildVariableAssignment(spreadProp.argument,value))};DestructuringTransformer.prototype.pushObjectProperty=function pushObjectProperty(prop,propRef){if(t.isLiteral(prop.key))prop.computed=true;var pattern=prop.value;var objRef=t.memberExpression(propRef,prop.key,prop.computed);if(t.isPattern(pattern)){this.push(pattern,objRef)}else{this.nodes.push(this.buildVariableAssignment(pattern,objRef))}};DestructuringTransformer.prototype.pushObjectPattern=function pushObjectPattern(pattern,objRef){if(!pattern.properties.length){this.nodes.push(t.expressionStatement(t.callExpression(this.file.addHelper("object-destructuring-empty"),[objRef])))}if(pattern.properties.length>1&&t.isMemberExpression(objRef)){var temp=this.scope.generateUidIdentifierBasedOnNode(objRef,this.file);this.nodes.push(this.buildVariableDeclaration(temp,objRef));objRef=temp}for(var i=0;iarr.elements.length)return;if(pattern.elements.length0){elemRef=t.callExpression(t.memberExpression(elemRef,t.identifier("slice")),[t.literal(i)])}elem=elem.argument}else{elemRef=t.memberExpression(arrayRef,t.literal(i),true)}this.push(elem,elemRef)}};DestructuringTransformer.prototype.init=function init(pattern,ref){if(!t.isArrayExpression(ref)&&!t.isMemberExpression(ref)){var memo=this.scope.maybeGenerateMemoised(ref,true);if(memo){this.nodes.push(this.buildVariableDeclaration(memo,ref));ref=memo}}this.push(pattern,ref);return this.nodes};return DestructuringTransformer}()},{"../../../messages":48,"../../../types":174,"./../../../tools/protect.js":52}],100:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports._ForOfStatementArray=_ForOfStatementArray;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _messages=require("../../../messages");var messages=_interopRequireWildcard(_messages);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var visitor={ForOfStatement:function ForOfStatement(node,parent,scope,file){if(this.get("right").isArrayExpression()){return _ForOfStatementArray.call(this,node,scope,file)}var callback=spec;if(file.isLoose("es6.forOf"))callback=loose;var build=callback(node,parent,scope,file);var declar=build.declar;var loop=build.loop;var block=loop.body;this.ensureBlock();if(declar){block.body.push(declar)}block.body=block.body.concat(node.body.body);t.inherits(loop,node);t.inherits(loop.body,node.body);if(build.replaceParent){this.parentPath.replaceWithMultiple(build.node);this.dangerouslyRemove()}else{return build.node}}};exports.visitor=visitor;function _ForOfStatementArray(node,scope,file){var nodes=[];var right=node.right;if(!t.isIdentifier(right)||!scope.hasBinding(right.name)){var uid=scope.generateUidIdentifier("arr");nodes.push(t.variableDeclaration("var",[t.variableDeclarator(uid,right)]));right=uid}var iterationKey=scope.generateUidIdentifier("i");var loop=util.template("for-of-array",{BODY:node.body,KEY:iterationKey,ARR:right});t.inherits(loop,node);t.ensureBlock(loop);var iterationValue=t.memberExpression(right,iterationKey,true);var left=node.left;if(t.isVariableDeclaration(left)){left.declarations[0].init=iterationValue;loop.body.body.unshift(left)}else{loop.body.body.unshift(t.expressionStatement(t.assignmentExpression("=",left,iterationValue)))}if(this.parentPath.isLabeledStatement()){loop=t.labeledStatement(this.parentPath.node.label,loop)}nodes.push(loop);return nodes}var loose=function loose(node,parent,scope,file){var left=node.left;var declar,id;if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){id=left}else if(t.isVariableDeclaration(left)){id=scope.generateUidIdentifier("ref");declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,id)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var isArrayKey=scope.generateUidIdentifier("isArray");var loop=util.template("for-of-loose",{LOOP_OBJECT:iteratorKey,IS_ARRAY:isArrayKey,OBJECT:node.right,INDEX:scope.generateUidIdentifier("i"),ID:id});if(!declar){loop.body.body.shift()}return{declar:declar,node:loop,loop:loop}};var spec=function spec(node,parent,scope,file){var left=node.left;var declar;var stepKey=scope.generateUidIdentifier("step");var stepValue=t.memberExpression(stepKey,t.identifier("value"));if(t.isIdentifier(left)||t.isPattern(left)||t.isMemberExpression(left)){declar=t.expressionStatement(t.assignmentExpression("=",left,stepValue))}else if(t.isVariableDeclaration(left)){declar=t.variableDeclaration(left.kind,[t.variableDeclarator(left.declarations[0].id,stepValue)])}else{throw file.errorWithNode(left,messages.get("unknownForHead",left.type))}var iteratorKey=scope.generateUidIdentifier("iterator");var template=util.template("for-of",{ITERATOR_HAD_ERROR_KEY:scope.generateUidIdentifier("didIteratorError"),ITERATOR_COMPLETION:scope.generateUidIdentifier("iteratorNormalCompletion"),ITERATOR_ERROR_KEY:scope.generateUidIdentifier("iteratorError"),ITERATOR_KEY:iteratorKey,STEP_KEY:stepKey,OBJECT:node.right,BODY:null});var isLabeledParent=t.isLabeledStatement(parent);var tryBody=template[3].block.body;var loop=tryBody[0];if(isLabeledParent){tryBody[0]=t.labeledStatement(parent.label,loop)}return{replaceParent:isLabeledParent,declar:declar,loop:loop,node:template}}},{"../../../messages":48,"../../../types":174,"../../../util":178,"./../../../tools/protect.js":52}],101:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function keepBlockHoist(node,nodes){if(node._blockHoist){for(var i=0;ilastNonDefaultParam}var lastNonDefaultParam=_helpersGetFunctionArity2["default"](node);var params=this.get("params");for(var i=0;i",len,start),t.binaryExpression("-",len,start),t.literal(0))}var loop=util.template("rest",{ARRAY_TYPE:restParam.typeAnnotation,ARGUMENTS:argsId,ARRAY_KEY:arrKey,ARRAY_LEN:arrLen,START:start,ARRAY:rest,KEY:key,LEN:len});if(state.deopted){loop._blockHoist=node.params.length+1;node.body.body.unshift(loop)}else{loop._blockHoist=1;this.getEarliestCommonAncestorFrom(state.references).getStatementParent().insertBefore(loop)}}};exports.visitor=visitor},{"../../../../types":174,"../../../../util":178,"./../../../../tools/protect.js":52}],106:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function loose(node,body,objId){var _arr=node.properties;for(var _i=0;_i<_arr.length;_i++){var prop=_arr[_i];body.push(t.expressionStatement(t.assignmentExpression("=",t.memberExpression(objId,prop.key,prop.computed||t.isLiteral(prop.key)),prop.value)))}}function spec(node,body,objId,initProps,file){var _arr2=node.properties;for(var _i2=0;_i2<_arr2.length;_i2++){var prop=_arr2[_i2];if(t.isLiteral(t.toComputedKey(prop),{value:"__proto__"})){initProps.push(prop);continue}var key=prop.key;if(t.isIdentifier(key)&&!prop.computed){key=t.literal(key.name)}var bodyNode=t.callExpression(file.addHelper("define-property"),[objId,key,prop.value]);body.push(t.expressionStatement(bodyNode))}if(body.length===1){var first=body[0].expression;if(t.isCallExpression(first)){first.arguments[0]=t.objectExpression(initProps);return first}}}var visitor={ObjectExpression:{exit:function exit(node,parent,scope,file){var hasComputed=false;var _arr3=node.properties;for(var _i3=0;_i3<_arr3.length;_i3++){var prop=_arr3[_i3];hasComputed=t.isProperty(prop,{computed:true,kind:"init"});if(hasComputed)break}if(!hasComputed)return;var initProps=[];var stopInits=false;node.properties=node.properties.filter(function(prop){if(prop.computed){stopInits=true}if(prop.kind!=="init"||!stopInits){initProps.push(prop);return false}else{return true}});var objId=scope.generateUidIdentifierBasedOnNode(parent);var body=[];var callback=spec;if(file.isLoose("es6.properties.computed"))callback=loose;var result=callback(node,body,objId,initProps,file);if(result)return result;body.unshift(t.variableDeclaration("var",[t.variableDeclarator(objId,t.objectExpression(initProps))]));body.push(t.expressionStatement(objId));return body}}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],107:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var visitor={Property:function Property(node){if(node.method){node.method=false}if(node.shorthand){node.shorthand=false}}};exports.visitor=visitor},{"./../../../tools/protect.js":52}],108:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersRegex=require("../../helpers/regex");var regex=_interopRequireWildcard(_helpersRegex);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var visitor={Literal:function Literal(node){if(!regex.is(node,"y"))return;return t.newExpression(t.identifier("RegExp"),[t.literal(node.regex.pattern),t.literal(node.regex.flags)])}};exports.visitor=visitor},{"../../../types":174,"../../helpers/regex":70,"./../../../tools/protect.js":52}],109:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _regexpuRewritePattern=require("regexpu/rewrite-pattern");var _regexpuRewritePattern2=_interopRequireDefault(_regexpuRewritePattern);var _helpersRegex=require("../../helpers/regex");var regex=_interopRequireWildcard(_helpersRegex);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var visitor={Literal:function Literal(node){if(!regex.is(node,"u"))return;node.regex.pattern=_regexpuRewritePattern2["default"](node.regex.pattern,node.regex.flags);regex.pullFlag(node,"u")}};exports.visitor=visitor},{"../../helpers/regex":70,"./../../../tools/protect.js":52,"regexpu/rewrite-pattern":524}],110:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function buildAssert(node,file){return t.callExpression(file.addHelper("temporal-assert-defined"),[node,t.literal(node.name),file.addHelper("temporal-undefined")])}function references(node,scope,state){var declared=state.letRefs[node.name];if(!declared)return false;return scope.getBindingIdentifier(node.name)===declared}var refVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){if(t.isFor(parent)&&parent.left===node)return;if(!references(node,scope,state))return;var assert=buildAssert(node,state.file);this.skip();if(t.isUpdateExpression(parent)){if(parent._ignoreBlockScopingTDZ)return;this.parentPath.replaceWith(t.sequenceExpression([assert,parent]))}else{return t.logicalExpression("&&",assert,node)}},AssignmentExpression:{exit:function exit(node,parent,scope,state){if(node._ignoreBlockScopingTDZ)return;var nodes=[];var ids=this.getBindingIdentifiers();for(var name in ids){var id=ids[name];if(references(id,scope,state)){nodes.push(buildAssert(id,state.file))}}if(nodes.length){node._ignoreBlockScopingTDZ=true;nodes.push(node);return nodes.map(t.expressionStatement)}}}};var metadata={optional:true,group:"builtin-advanced"};exports.metadata=metadata;var visitor={"Program|Loop|BlockStatement":{exit:function exit(node,parent,scope,file){var letRefs=node._letReferences;if(!letRefs)return;this.traverse(refVisitor,{letRefs:letRefs,file:file})}}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],111:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={optional:true};exports.metadata=metadata;var visitor={UnaryExpression:function UnaryExpression(node,parent,scope,file){if(node._ignoreSpecSymbols)return;if(node.operator==="typeof"){var call=t.callExpression(file.addHelper("typeof"),[node.argument]);if(this.get("argument").isIdentifier()){var undefLiteral=t.literal("undefined");var unary=t.unaryExpression("typeof",node.argument);unary._ignoreSpecSymbols=true;return t.conditionalExpression(t.binaryExpression("===",unary,undefLiteral),undefLiteral,call)}else{return call}}},BinaryExpression:function BinaryExpression(node,parent,scope,file){
+if(node.operator==="instanceof"){return t.callExpression(file.addHelper("instanceof"),[node.left,node.right])}},"VariableDeclaration|FunctionDeclaration":function VariableDeclarationFunctionDeclaration(node){if(node._generated)this.skip()}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],112:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={optional:true,group:"builtin-pre"};exports.metadata=metadata;var visitor={TemplateLiteral:function TemplateLiteral(node,parent){if(t.isTaggedTemplateExpression(parent))return;for(var i=0;i0){var declarations=_lodashArrayFlatten2["default"](_lodashCollectionMap2["default"](this.vars,function(decl){return decl.declarations}));var assignment=_lodashCollectionReduceRight2["default"](declarations,function(expr,decl){return t.assignmentExpression("=",decl.id,expr)},t.identifier("undefined"));var statement=t.expressionStatement(assignment);statement._blockHoist=Infinity;body.unshift(statement)}var paramDecls=this.paramDecls;if(paramDecls.length>0){var paramDecl=t.variableDeclaration("var",paramDecls);paramDecl._blockHoist=Infinity;body.unshift(paramDecl)}body.unshift(t.expressionStatement(t.assignmentExpression("=",this.getAgainId(),t.literal(false))));node.body=util.template("tail-call-body",{FUNCTION_ID:this.getFunctionId(),AGAIN_ID:this.getAgainId(),BLOCK:node.body});var topVars=[];if(this.needsThis){var _arr=this.thisPaths;for(var _i=0;_i<_arr.length;_i++){var path=_arr[_i];path.replaceWith(this.getThisId())}topVars.push(t.variableDeclarator(this.getThisId(),t.thisExpression()))}if(this.needsArguments||this.setsArguments){var _arr2=this.argumentsPaths;for(var _i2=0;_i2<_arr2.length;_i2++){var _path=_arr2[_i2];_path.replaceWith(this.argumentsId)}var decl=t.variableDeclarator(this.argumentsId);if(this.argumentsId){decl.init=t.identifier("arguments");decl.init._shadowedFunctionLiteral=this.path}topVars.push(decl)}var leftId=this.leftId;if(leftId){topVars.push(t.variableDeclarator(leftId))}if(topVars.length>0){node.body.body.unshift(t.variableDeclaration("var",topVars))}};TailCallTransformer.prototype.subTransform=function subTransform(node){if(!node)return;var handler=this["subTransform"+node.type];if(handler)return handler.call(this,node)};TailCallTransformer.prototype.subTransformConditionalExpression=function subTransformConditionalExpression(node){var callConsequent=this.subTransform(node.consequent);var callAlternate=this.subTransform(node.alternate);if(!callConsequent&&!callAlternate){return}node.type="IfStatement";node.consequent=callConsequent?t.toBlock(callConsequent):returnBlock(node.consequent);if(callAlternate){node.alternate=t.isIfStatement(callAlternate)?callAlternate:t.toBlock(callAlternate)}else{node.alternate=returnBlock(node.alternate)}return[node]};TailCallTransformer.prototype.subTransformLogicalExpression=function subTransformLogicalExpression(node){var callRight=this.subTransform(node.right);if(!callRight)return;var leftId=this.getLeftId();var testExpr=t.assignmentExpression("=",leftId,node.left);if(node.operator==="&&"){testExpr=t.unaryExpression("!",testExpr)}return[t.ifStatement(testExpr,returnBlock(leftId))].concat(callRight)};TailCallTransformer.prototype.subTransformSequenceExpression=function subTransformSequenceExpression(node){var seq=node.expressions;var lastCall=this.subTransform(seq[seq.length-1]);if(!lastCall){return}if(--seq.length===1){node=seq[0]}return[t.expressionStatement(node)].concat(lastCall)};TailCallTransformer.prototype.subTransformCallExpression=function subTransformCallExpression(node){var callee=node.callee;var thisBinding,args;if(t.isMemberExpression(callee,{computed:false})&&t.isIdentifier(callee.property)){switch(callee.property.name){case"call":args=t.arrayExpression(node.arguments.slice(1));break;case"apply":args=node.arguments[1]||t.identifier("undefined");this.needsArguments=true;break;default:return}thisBinding=node.arguments[0];callee=callee.object}if(!t.isIdentifier(callee)||!this.scope.bindingIdentifierEquals(callee.name,this.ownerId)){return}this.hasTailRecursion=true;if(this.hasDeopt())return;var body=[];if(this.needsThis&&!t.isThisExpression(thisBinding)){body.push(t.expressionStatement(t.assignmentExpression("=",this.getThisId(),thisBinding||t.identifier("undefined"))))}if(!args){args=t.arrayExpression(node.arguments)}if(t.isArrayExpression(args)&&args.elements.length>this.node.params.length){this.needsArguments=true}var argumentsId=this.getArgumentsId();var params=this.getParams();if(this.needsArguments){body.push(t.expressionStatement(t.assignmentExpression("=",argumentsId,args)))}if(t.isArrayExpression(args)){var elems=args.elements;for(var i=0;i1){nodes=nodes.filter(function(n){return!t.isLiteral(n,{value:""})});if(nodes.length===1&&isString(nodes[0])){return nodes[0]}if(!isString(nodes[0])&&!isString(nodes[1])){nodes.unshift(t.literal(""))}var root=buildBinaryExpression(nodes.shift(),nodes.shift());var _arr3=nodes;for(var _i3=0;_i3<_arr3.length;_i3++){var _node=_arr3[_i3];root=buildBinaryExpression(root,_node)}this.replaceWith(root)}else{return nodes[0]}}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],116:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={stage:1};exports.metadata=metadata},{"./../../../tools/protect.js":52}],117:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={stage:0,dependencies:["es6.classes"]};exports.metadata=metadata},{"./../../../tools/protect.js":52}],118:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersBuildComprehension=require("../../helpers/build-comprehension");var _helpersBuildComprehension2=_interopRequireDefault(_helpersBuildComprehension);var _traversal=require("../../../traversal");var _traversal2=_interopRequireDefault(_traversal);var _util=require("../../../util");var util=_interopRequireWildcard(_util);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={stage:0};exports.metadata=metadata;var visitor={ComprehensionExpression:function ComprehensionExpression(node,parent,scope){var callback=array;if(node.generator)callback=generator;return callback(node,parent,scope)}};exports.visitor=visitor;function generator(node){var body=[];var container=t.functionExpression(null,[],t.blockStatement(body),true);container.shadow=true;body.push(_helpersBuildComprehension2["default"](node,function(){return t.expressionStatement(t.yieldExpression(node.body))}));return t.callExpression(container,[])}function array(node,parent,scope){var uid=scope.generateUidIdentifierBasedOnNode(parent);var container=util.template("array-comprehension-container",{KEY:uid});container.callee.shadow=true;var block=container.callee.body;var body=block.body;if(_traversal2["default"].hasType(node,scope,"YieldExpression",t.FUNCTION_TYPES)){container.callee.generator=true;container=t.yieldExpression(container,true)}var returnStatement=body.pop();body.push(_helpersBuildComprehension2["default"](node,function(){return util.template("array-push",{STATEMENT:node.body,KEY:uid},true)}));body.push(returnStatement);return container}},{"../../../traversal":149,"../../../types":174,"../../../util":178,"../../helpers/build-comprehension":61,"./../../../tools/protect.js":52}],119:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersMemoiseDecorators=require("../../helpers/memoise-decorators");var _helpersMemoiseDecorators2=_interopRequireDefault(_helpersMemoiseDecorators);var _helpersDefineMap=require("../../helpers/define-map");var defineMap=_interopRequireWildcard(_helpersDefineMap);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={dependencies:["es6.classes"],optional:true,stage:1};exports.metadata=metadata;var visitor={ObjectExpression:function ObjectExpression(node,parent,scope,file){var hasDecorators=false;for(var i=0;i=1){nodes.push(node)}return nodes}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],123:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={optional:true,stage:0};exports.metadata=metadata;function getTempId(scope){var id=scope.path.getData("functionBind");if(id)return id;id=scope.generateDeclaredUidIdentifier("context");return scope.path.setData("functionBind",id)}function getStaticContext(bind,scope){var object=bind.object||bind.callee.object;return scope.isStatic(object)&&object}function inferBindContext(bind,scope){var staticContext=getStaticContext(bind,scope);if(staticContext)return staticContext;var tempId=getTempId(scope);if(bind.object){bind.callee=t.sequenceExpression([t.assignmentExpression("=",tempId,bind.object),bind.callee])}else{bind.callee.object=t.assignmentExpression("=",tempId,bind.callee.object)}return tempId}var visitor={CallExpression:function CallExpression(node,parent,scope){var bind=node.callee;if(!t.isBindExpression(bind))return;var context=inferBindContext(bind,scope);node.callee=t.memberExpression(bind.callee,t.identifier("call"));node.arguments.unshift(context)},BindExpression:function BindExpression(node,parent,scope){var context=inferBindContext(node,scope);return t.callExpression(t.memberExpression(node.callee,t.identifier("bind")),[context])}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],124:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={stage:1,dependencies:["es6.destructuring"]};exports.metadata=metadata;var hasSpread=function hasSpread(node){for(var i=0;i=opts.stage)return true}function optional(transformer,opts){if(transformer.metadata.optional&&!_lodashCollectionIncludes2["default"](opts.optional,transformer.key))return false}},{"./../../tools/protect.js":52,"lodash/collection/includes":369}],127:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}exports["default"]={"minification.constantFolding":require("babel-plugin-constant-folding"),strict:require("./other/strict"),eval:require("babel-plugin-eval"),_explode:require("./internal/explode"),_validation:require("./internal/validation"),_hoistDirectives:require("./internal/hoist-directives"),"minification.removeDebugger":require("babel-plugin-remove-debugger"),"minification.removeConsole":require("babel-plugin-remove-console"),"utility.inlineEnvironmentVariables":require("babel-plugin-inline-environment-variables"),"minification.deadCodeElimination":require("babel-plugin-dead-code-elimination"),_modules:require("./internal/modules"),"react.displayName":require("babel-plugin-react-display-name"),"es6.spec.templateLiterals":require("./es6/spec.template-literals"),"es6.templateLiterals":require("./es6/template-literals"),"validation.undeclaredVariableCheck":require("babel-plugin-undeclared-variables-check"),"spec.functionName":require("./spec/function-name"),"es7.classProperties":require("./es7/class-properties"),"es7.trailingFunctionCommas":require("./es7/trailing-function-commas"),"es7.asyncFunctions":require("./es7/async-functions"),"es7.decorators":require("./es7/decorators"),"validation.react":require("./validation/react"),"es6.arrowFunctions":require("./es6/arrow-functions"),"spec.blockScopedFunctions":require("./spec/block-scoped-functions"),"optimisation.react.constantElements":require("babel-plugin-react-constant-elements"),
+"optimisation.react.inlineElements":require("./optimisation/react.inline-elements"),"es7.comprehensions":require("./es7/comprehensions"),"es6.classes":require("./es6/classes"),asyncToGenerator:require("./other/async-to-generator"),bluebirdCoroutines:require("./other/bluebird-coroutines"),"es6.objectSuper":require("./es6/object-super"),"es7.objectRestSpread":require("./es7/object-rest-spread"),"es7.exponentiationOperator":require("./es7/exponentiation-operator"),"es5.properties.mutators":require("./es5/properties.mutators"),"es6.properties.shorthand":require("./es6/properties.shorthand"),"es6.properties.computed":require("./es6/properties.computed"),"optimisation.flow.forOf":require("./optimisation/flow.for-of"),"es6.forOf":require("./es6/for-of"),"es6.regex.sticky":require("./es6/regex.sticky"),"es6.regex.unicode":require("./es6/regex.unicode"),"es6.constants":require("./es6/constants"),"es7.exportExtensions":require("./es7/export-extensions"),"spec.protoToAssign":require("babel-plugin-proto-to-assign"),"es7.doExpressions":require("./es7/do-expressions"),"es6.spec.symbols":require("./es6/spec.symbols"),"es7.functionBind":require("./es7/function-bind"),"spec.undefinedToVoid":require("babel-plugin-undefined-to-void"),"es6.spread":require("./es6/spread"),"es6.parameters":require("./es6/parameters"),"es6.destructuring":require("./es6/destructuring"),"es6.blockScoping":require("./es6/block-scoping"),"es6.spec.blockScoping":require("./es6/spec.block-scoping"),reactCompat:require("./other/react-compat"),react:require("./other/react"),regenerator:require("./other/regenerator"),runtime:require("babel-plugin-runtime"),"es6.modules":require("./es6/modules"),_moduleFormatter:require("./internal/module-formatter"),"es6.tailCall":require("./es6/tail-call"),_shadowFunctions:require("./internal/shadow-functions"),"es3.propertyLiterals":require("./es3/property-literals"),"es3.memberExpressionLiterals":require("./es3/member-expression-literals"),"minification.memberExpressionLiterals":require("babel-plugin-member-expression-literals"),"minification.propertyLiterals":require("babel-plugin-property-literals"),_blockHoist:require("./internal/block-hoist"),jscript:require("babel-plugin-jscript"),flow:require("./other/flow")};module.exports=exports["default"]},{"./../../tools/protect.js":52,"./es3/member-expression-literals":92,"./es3/property-literals":93,"./es5/properties.mutators":94,"./es6/arrow-functions":95,"./es6/block-scoping":96,"./es6/classes":97,"./es6/constants":98,"./es6/destructuring":99,"./es6/for-of":100,"./es6/modules":101,"./es6/object-super":102,"./es6/parameters":104,"./es6/properties.computed":106,"./es6/properties.shorthand":107,"./es6/regex.sticky":108,"./es6/regex.unicode":109,"./es6/spec.block-scoping":110,"./es6/spec.symbols":111,"./es6/spec.template-literals":112,"./es6/spread":113,"./es6/tail-call":114,"./es6/template-literals":115,"./es7/async-functions":116,"./es7/class-properties":117,"./es7/comprehensions":118,"./es7/decorators":119,"./es7/do-expressions":120,"./es7/exponentiation-operator":121,"./es7/export-extensions":122,"./es7/function-bind":123,"./es7/object-rest-spread":124,"./es7/trailing-function-commas":125,"./internal/block-hoist":128,"./internal/explode":129,"./internal/hoist-directives":130,"./internal/module-formatter":131,"./internal/modules":132,"./internal/shadow-functions":133,"./internal/validation":134,"./optimisation/flow.for-of":135,"./optimisation/react.inline-elements":136,"./other/async-to-generator":137,"./other/bluebird-coroutines":138,"./other/flow":139,"./other/react":141,"./other/react-compat":140,"./other/regenerator":142,"./other/strict":143,"./spec/block-scoped-functions":144,"./spec/function-name":145,"./validation/react":146,"babel-plugin-constant-folding":195,"babel-plugin-dead-code-elimination":196,"babel-plugin-eval":197,"babel-plugin-inline-environment-variables":198,"babel-plugin-jscript":199,"babel-plugin-member-expression-literals":200,"babel-plugin-property-literals":201,"babel-plugin-proto-to-assign":202,"babel-plugin-react-constant-elements":203,"babel-plugin-react-display-name":204,"babel-plugin-remove-console":205,"babel-plugin-remove-debugger":206,"babel-plugin-runtime":208,"babel-plugin-undeclared-variables-check":209,"babel-plugin-undefined-to-void":211}],128:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;var _lodashCollectionSortBy=require("lodash/collection/sortBy");var _lodashCollectionSortBy2=_interopRequireDefault(_lodashCollectionSortBy);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={group:"builtin-trailing"};exports.metadata=metadata;var visitor={Block:{exit:function exit(node){var hasChange=false;for(var i=0;i0){nodePath=nodePath.get(keysAlongPath.pop())}return nodePath}},{"../../../types":174,"./../../../tools/protect.js":52,"ast-types":194,regenerator:491}],143:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var metadata={group:"builtin-pre"};exports.metadata=metadata;var THIS_BREAK_KEYS=["FunctionExpression","FunctionDeclaration","ClassExpression","ClassDeclaration"];var visitor={Program:{enter:function enter(program){var first=program.body[0];var directive;if(t.isExpressionStatement(first)&&t.isLiteral(first.expression,{value:"use strict"})){directive=first}else{directive=t.expressionStatement(t.literal("use strict"));this.unshiftContainer("body",directive);if(first){directive.leadingComments=first.leadingComments;first.leadingComments=[]}}directive._blockHoist=Infinity}},ThisExpression:function ThisExpression(){if(!this.findParent(function(path){return!path.is("shadow")&&THIS_BREAK_KEYS.indexOf(path.type)>=0})){return t.identifier("undefined")}}};exports.visitor=visitor},{"../../../types":174,"./../../../tools/protect.js":52}],144:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function statementList(key,path){var paths=path.get(key);for(var i=0;i=0)continue;visited.push(path.node);if(path.visit()){stop=true;break}}var _arr3=queue;for(var _i3=0;_i3<_arr3.length;_i3++){var path=_arr3[_i3];path.shiftContext()}this.queue=null;return stop};TraversalContext.prototype.visitSingle=function visitSingle(node,key){if(this.shouldVisit(node[key])){var path=this.create(node,node,key);path.visit();path.shiftContext()}};TraversalContext.prototype.visit=function visit(node,key){var nodes=node[key];if(!nodes)return;if(Array.isArray(nodes)){return this.visitMultiple(nodes,node,key)}else{return this.visitSingle(node,key)}};return TraversalContext}();exports["default"]=TraversalContext;module.exports=exports["default"]},{"../types":174,"./../tools/protect.js":52,"./path":156}],148:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var Hub=function Hub(file){_classCallCheck(this,Hub);this.file=file};exports["default"]=Hub;module.exports=exports["default"]},{"./../tools/protect.js":52}],149:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports["default"]=traverse;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _context=require("./context");var _context2=_interopRequireDefault(_context);var _visitors=require("./visitors");var visitors=_interopRequireWildcard(_visitors);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _types=require("../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function traverse(parent,opts,scope,state,parentPath){if(!parent)return;if(!opts.noScope&&!scope){if(parent.type!=="Program"&&parent.type!=="File"){throw new Error(messages.get("traverseNeedsParent",parent.type))}}if(!opts)opts={};visitors.explode(opts);if(Array.isArray(parent)){for(var i=0;icurrentKeyIndex){earliest=path}}return earliest})}function getDeepestCommonAncestorFrom(paths,filter){var _this=this;if(!paths.length){return this}if(paths.length===1){return paths[0]}var minDepth=Infinity;var lastCommonIndex,lastCommon;var ancestries=paths.map(function(path){var ancestry=[];do{ancestry.unshift(path)}while((path=path.parentPath)&&path!==_this);if(ancestry.length-1}function visit(){if(this.isBlacklisted())return false;if(this.opts.shouldSkip&&this.opts.shouldSkip(this))return false;this.call("enter");if(this.shouldSkip){return this.shouldStop}var node=this.node;var opts=this.opts;if(node){if(Array.isArray(node)){for(var i=0;i":return left>right;case"<=":return left<=right;case">=":return left>=right;case"==":return left==right;case"!=":return left!=right;case"===":return left===right;case"!==":return left!==right}}if(path.isCallExpression()){var callee=path.get("callee");var context;var func;if(callee.isIdentifier()&&!path.scope.getBinding(callee.node.name,true)&&VALID_CALLEES.indexOf(callee.node.name)>=0){func=global[node.callee.name]}if(callee.isMemberExpression()){var object=callee.get("object");var property=callee.get("property");if(object.isIdentifier()&&property.isIdentifier()&&VALID_CALLEES.indexOf(object.node.name)>=0){context=global[object.node.name];func=context[property.node.name]}if(object.isLiteral()&&property.isIdentifier()){var type=typeof object.node.value;if(type==="string"||type==="number"){context=object.node.value;func=context[property.node.name]}}}if(func){var args=path.get("arguments").map(evaluate);if(!confident)return;return func.apply(context,args)}}confident=false}}}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./../../tools/protect.js":52}],155:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.getStatementParent=getStatementParent;exports.getOpposite=getOpposite;exports.getCompletionRecords=getCompletionRecords;exports.getSibling=getSibling;exports.get=get;exports._getKey=_getKey;exports._getPattern=_getPattern;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function getStatementParent(){var path=this;do{if(!path.parentPath||Array.isArray(path.container)&&path.isStatement()){break}else{path=path.parentPath}}while(path);if(path&&(path.isProgram()||path.isFile())){throw new Error("File/Program node, we can't possibly find a statement parent to this")}return path}function getOpposite(){if(this.key==="left"){return this.getSibling("right")}else if(this.key==="right"){return this.getSibling("left")}}function getCompletionRecords(){var paths=[];var add=function add(path){if(path)paths=paths.concat(path.getCompletionRecords())};if(this.isIfStatement()){add(this.get("consequent"));add(this.get("alternate"))}else if(this.isDoExpression()||this.isFor()||this.isWhile()){add(this.get("body"))}else if(this.isProgram()||this.isBlockStatement()){add(this.get("body").pop())}else if(this.isFunction()){return this.get("body").getCompletionRecords()}else{paths.push(this)}return paths}function getSibling(key){return _index2["default"].get({parentPath:this.parentPath,parent:this.parent,container:this.container,listKey:this.listKey,key:key})}function get(key){var parts=key.split(".");if(parts.length===1){return this._getKey(key)}else{return this._getPattern(parts)}}function _getKey(key){var _this=this;var node=this.node;var container=node[key];if(Array.isArray(container)){return container.map(function(_,i){return _index2["default"].get({listKey:key,parentPath:_this,parent:node,container:container,key:i}).setContext()})}else{return _index2["default"].get({parentPath:this,parent:node,container:node,key:key}).setContext()}}function _getPattern(parts){var path=this;var _arr=parts;for(var _i=0;_i<_arr.length;_i++){var part=_arr[_i];if(part==="."){path=path.parentPath}else{if(Array.isArray(path)){path=path[part]}else{path=path.get(part)}}}return path}function getBindingIdentifiers(){return t.getBindingIdentifiers(this.node)}},{"../../types":174,"./../../tools/protect.js":52,"./index":156}],156:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _libVirtualTypes=require("./lib/virtual-types");var virtualTypes=_interopRequireWildcard(_libVirtualTypes);var _index=require("../index");var _index2=_interopRequireDefault(_index);var _lodashObjectAssign=require("lodash/object/assign");var _lodashObjectAssign2=_interopRequireDefault(_lodashObjectAssign);var _scope=require("../scope");var _scope2=_interopRequireDefault(_scope);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var NodePath=function(){function NodePath(hub,parent){_classCallCheck(this,NodePath);this.contexts=[];this.parent=parent;this.data={};this.hub=hub;this.shouldSkip=false;this.shouldStop=false;this.removed=false;this.state=null;this.opts=null;this.skipKeys=null;this.parentPath=null;this.context=null;this.container=null;this.listKey=null;this.inList=false;this.parentKey=null;this.key=null;this.node=null;this.scope=null;this.type=null;this.typeAnnotation=null}NodePath.get=function get(_ref){var hub=_ref.hub;var parentPath=_ref.parentPath;var parent=_ref.parent;var container=_ref.container;var listKey=_ref.listKey;var key=_ref.key;if(!hub&&parentPath){hub=parentPath.hub}var targetNode=container[key];var paths=parent._paths=parent._paths||[];var path;for(var i=0;i=0)continue;visitedScopes.push(violationScope);constantViolations.push(violation);if(violationScope===path.scope){constantViolations=[violation];break}}constantViolations=constantViolations.concat(functionConstantViolations);var _arr2=constantViolations;for(var _i2=0;_i2<_arr2.length;_i2++){var violation=_arr2[_i2];types.push(violation.getTypeAnnotation())}}if(types.length){return t.createUnionTypeAnnotation(types)}}function getConstantViolationsBefore(binding,path,functions){var violations=binding.constantViolations.slice();violations.unshift(binding.path);return violations.filter(function(violation){violation=violation.resolve();var status=violation._guessExecutionStatusRelativeTo(path);if(functions&&status==="function")functions.push(violation);return status==="before"})}function inferAnnotationFromBinaryExpression(name,path){
+var operator=path.node.operator;var right=path.get("right").resolve();var left=path.get("left").resolve();var target;if(left.isIdentifier({name:name})){target=right}else if(right.isIdentifier({name:name})){target=left}if(target){if(operator==="==="){return target.getTypeAnnotation()}else if(t.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else{return}}else{if(operator!=="===")return}var typeofPath;var typePath;if(left.isUnaryExpression({operator:"typeof"})){typeofPath=left;typePath=right}else if(right.isUnaryExpression({operator:"typeof"})){typeofPath=right;typePath=left}if(!typePath&&!typeofPath)return;typePath=typePath.resolve();if(!typePath.isLiteral())return;var typeValue=typePath.node.value;if(typeof typeValue!=="string")return;if(!typeofPath.get("argument").isIdentifier({name:name}))return;return t.createTypeAnnotationBasedOnTypeof(typePath.node.value)}function getParentConditionalPath(path){var parentPath;while(parentPath=path.parentPath){if(parentPath.isIfStatement()||parentPath.isConditionalExpression()){if(path.key==="test"){return}else{return parentPath}}else{path=parentPath}}}function getConditionalAnnotation(path,name){var ifStatement=getParentConditionalPath(path);if(!ifStatement)return;var test=ifStatement.get("test");var paths=[test];var types=[];do{var _path=paths.shift().resolve();if(_path.isLogicalExpression()){paths.push(_path.get("left"));paths.push(_path.get("right"))}if(_path.isBinaryExpression()){var type=inferAnnotationFromBinaryExpression(name,_path);if(type)types.push(type)}}while(paths.length);if(types.length){return{typeAnnotation:t.createUnionTypeAnnotation(types),ifStatement:ifStatement}}else{return getConditionalAnnotation(ifStatement,name)}}module.exports=exports["default"]},{"../../../types":174,"./../../../tools/protect.js":52}],159:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.VariableDeclarator=VariableDeclarator;exports.TypeCastExpression=TypeCastExpression;exports.NewExpression=NewExpression;exports.TemplateLiteral=TemplateLiteral;exports.UnaryExpression=UnaryExpression;exports.BinaryExpression=BinaryExpression;exports.LogicalExpression=LogicalExpression;exports.ConditionalExpression=ConditionalExpression;exports.SequenceExpression=SequenceExpression;exports.AssignmentExpression=AssignmentExpression;exports.UpdateExpression=UpdateExpression;exports.Literal=Literal;exports.ObjectExpression=ObjectExpression;exports.ArrayExpression=ArrayExpression;exports.RestElement=RestElement;exports.CallExpression=CallExpression;exports.TaggedTemplateExpression=TaggedTemplateExpression;function _interopRequire(obj){return obj&&obj.__esModule?obj["default"]:obj}function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _infererReference=require("./inferer-reference");exports.Identifier=_interopRequire(_infererReference);function VariableDeclarator(){var id=this.get("id");if(id.isIdentifier()){return this.get("init").getTypeAnnotation()}else{return}}function TypeCastExpression(node){return node.typeAnnotation}TypeCastExpression.validParent=true;function NewExpression(node){if(this.get("callee").isIdentifier()){return t.genericTypeAnnotation(node.callee)}}function TemplateLiteral(){return t.stringTypeAnnotation()}function UnaryExpression(node){var operator=node.operator;if(operator==="void"){return t.voidTypeAnnotation()}else if(t.NUMBER_UNARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.STRING_UNARY_OPERATORS.indexOf(operator)>=0){return t.stringTypeAnnotation()}else if(t.BOOLEAN_UNARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}}function BinaryExpression(node){var operator=node.operator;if(t.NUMBER_BINARY_OPERATORS.indexOf(operator)>=0){return t.numberTypeAnnotation()}else if(t.BOOLEAN_BINARY_OPERATORS.indexOf(operator)>=0){return t.booleanTypeAnnotation()}else if(operator==="+"){var right=this.get("right");var left=this.get("left");if(left.isBaseType("number")&&right.isBaseType("number")){return t.numberTypeAnnotation()}else if(left.isBaseType("string")||right.isBaseType("string")){return t.stringTypeAnnotation()}return t.unionTypeAnnotation([t.stringTypeAnnotation(),t.numberTypeAnnotation()])}}function LogicalExpression(){return t.createUnionTypeAnnotation([this.get("left").getTypeAnnotation(),this.get("right").getTypeAnnotation()])}function ConditionalExpression(){return t.createUnionTypeAnnotation([this.get("consequent").getTypeAnnotation(),this.get("alternate").getTypeAnnotation()])}function SequenceExpression(node){return this.get("expressions").pop().getTypeAnnotation()}function AssignmentExpression(node){return this.get("right").getTypeAnnotation()}function UpdateExpression(node){var operator=node.operator;if(operator==="++"||operator==="--"){return t.numberTypeAnnotation()}}function Literal(node){var value=node.value;if(typeof value==="string")return t.stringTypeAnnotation();if(typeof value==="number")return t.numberTypeAnnotation();if(typeof value==="boolean")return t.booleanTypeAnnotation();if(value===null)return t.voidTypeAnnotation();if(node.regex)return t.genericTypeAnnotation(t.identifier("RegExp"))}function ObjectExpression(){return t.genericTypeAnnotation(t.identifier("Object"))}function ArrayExpression(){return t.genericTypeAnnotation(t.identifier("Array"))}function RestElement(){return ArrayExpression()}RestElement.validParent=true;function Func(){return t.genericTypeAnnotation(t.identifier("Function"))}exports.Function=Func;exports.Class=Func;function CallExpression(){return resolveCall(this.get("callee"))}function TaggedTemplateExpression(){return resolveCall(this.get("tag"))}function resolveCall(callee){callee=callee.resolve();if(callee.isFunction()){if(callee.is("async")){if(callee.is("generator")){return t.genericTypeAnnotation(t.identifier("AsyncIterator"))}else{return t.genericTypeAnnotation(t.identifier("Promise"))}}else{if(callee.node.returnType){return callee.node.returnType}else{}}}}},{"../../../types":174,"./../../../tools/protect.js":52,"./inferer-reference":158}],160:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.matchesPattern=matchesPattern;exports.has=has;exports.isnt=isnt;exports.equals=equals;exports.isNodeType=isNodeType;exports.canHaveVariableDeclarationOrExpression=canHaveVariableDeclarationOrExpression;exports.isCompletionRecord=isCompletionRecord;exports.isDirective=isDirective;exports.isStatementOrBlock=isStatementOrBlock;exports.isUser=isUser;exports.isGenerated=isGenerated;exports.referencesImport=referencesImport;exports.getSource=getSource;exports.willIMaybeExecuteBefore=willIMaybeExecuteBefore;exports._guessExecutionStatusRelativeTo=_guessExecutionStatusRelativeTo;exports.resolve=resolve;exports._resolve=_resolve;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashCollectionIncludes=require("lodash/collection/includes");var _lodashCollectionIncludes2=_interopRequireDefault(_lodashCollectionIncludes);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function matchesPattern(pattern,allowPartial){if(!this.isMemberExpression())return false;var parts=pattern.split(".");var search=[this.node];var i=0;function matches(name){var part=parts[i];return part==="*"||name===part}while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(!matches(node.name))return false}else if(t.isLiteral(node)){if(!matches(node.value))return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.unshift(node.property);search.unshift(node.object);continue}}else if(t.isThisExpression(node)){if(!matches("this"))return false}else{return false}if(++i>parts.length){return false}}return i===parts.length}function has(key){var val=this.node[key];if(val&&Array.isArray(val)){return!!val.length}else{return!!val}}var is=has;exports.is=is;function isnt(key){return!this.has(key)}function equals(key,value){return this.node[key]===value}function isNodeType(type){return t.isType(this.type,type)}function canHaveVariableDeclarationOrExpression(){return(this.key==="init"||this.key==="left")&&this.parentPath.isFor()}function isCompletionRecord(allowInsideFunction){var path=this;var first=true;do{var container=path.container;if(path.isFunction()&&!first){return!!allowInsideFunction}first=false;if(Array.isArray(container)&&path.key!==container.length-1){return false}}while((path=path.parentPath)&&!path.isProgram());return true}function isDirective(){if(this.isExpressionStatement()){return this.get("expression").isLiteral()}else{return this.isLiteral()&&this.parentPath.isExpressionStatement()}}function isStatementOrBlock(){if(this.parentPath.isLabeledStatement()||t.isBlockStatement(this.container)){return false}else{return _lodashCollectionIncludes2["default"](t.STATEMENT_OR_BLOCK_KEYS,this.key)}}function isUser(){return this.node&&!!this.node.loc}function isGenerated(){return!this.isUser()}function referencesImport(moduleSource,importName){if(!this.isReferencedIdentifier())return false;var binding=this.scope.getBinding(this.node.name);if(!binding||binding.kind!=="module")return false;var path=binding.path;if(!path.isImportDeclaration())return false;if(path.node.source.value===moduleSource){if(!importName)return true}else{return false}var _arr=path.node.specifiers;for(var _i=0;_i<_arr.length;_i++){var specifier=_arr[_i];if(t.isSpecifierDefault(specifier)&&importName==="default"){return true}if(t.isImportNamespaceSpecifier(specifier)&&importName==="*"){return true}if(t.isImportSpecifier(specifier)&&specifier.imported.name===importName){return true}}return false}function getSource(){var node=this.node;if(node.end){return this.hub.file.code.slice(node.start,node.end)}else{return""}}function willIMaybeExecuteBefore(target){return this._guessExecutionStatusRelativeTo(target)!=="after"}function _guessExecutionStatusRelativeTo(target){var targetFuncParent=target.scope.getFunctionParent();var selfFuncParent=this.scope.getFunctionParent();if(targetFuncParent!==selfFuncParent){return"function"}var targetPaths=target.getAncestry();var selfPaths=this.getAncestry();var commonPath;var targetIndex;var selfIndex;for(selfIndex=0;selfIndex=0){commonPath=selfPath;break}}if(!commonPath){return"before"}var targetRelationship=targetPaths[targetIndex-1];var selfRelationship=selfPaths[selfIndex-1];if(!targetRelationship||!selfRelationship){return"before"}if(targetRelationship.listKey&&targetRelationship.container===selfRelationship.container){return targetRelationship.key>selfRelationship.key?"before":"after"}var targetKeyPosition=t.VISITOR_KEYS[targetRelationship.type].indexOf(targetRelationship.key);var selfKeyPosition=t.VISITOR_KEYS[selfRelationship.type].indexOf(selfRelationship.key);return targetKeyPosition>selfKeyPosition?"before":"after"}function resolve(dangerous,resolved){return this._resolve(dangerous,resolved)||this}function _resolve(dangerous,resolved){if(resolved&&resolved.indexOf(this)>=0)return;resolved=resolved||[];resolved.push(this);if(this.isVariableDeclarator()){if(this.get("id").isIdentifier()){return this.get("init").resolve(dangerous,resolved)}else{}}else if(this.isReferencedIdentifier()){var binding=this.scope.getBinding(this.node.name);if(!binding)return;if(!binding.constant)return;if(binding.kind==="module")return;if(binding.path!==this){return binding.path.resolve(dangerous,resolved)}}else if(this.isTypeCastExpression()){return this.get("expression").resolve(dangerous,resolved)}else if(dangerous&&this.isMemberExpression()){var targetKey=this.toComputedKey();if(!t.isLiteral(targetKey))return;var targetName=targetKey.value;var target=this.get("object").resolve(dangerous,resolved);if(target.isObjectExpression()){var props=target.get("properties");var _arr2=props;for(var _i2=0;_i2<_arr2.length;_i2++){var prop=_arr2[_i2];if(!prop.isProperty())continue;var key=prop.get("key");var match=prop.isnt("computed")&&key.isIdentifier({name:targetName});match=match||key.isLiteral({value:targetName});if(match)return prop.get("value").resolve(dangerous,resolved)}}else if(target.isArrayExpression()&&!isNaN(+targetName)){var elems=target.get("elements");var elem=elems[targetName];if(elem)return elem.resolve(dangerous,resolved)}}}},{"../../types":174,"./../../tools/protect.js":52,"lodash/collection/includes":369}],161:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function")}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var referenceVisitor={ReferencedIdentifier:function ReferencedIdentifier(node,parent,scope,state){if(this.isJSXIdentifier()&&react.isCompatTag(node.name)){return}var binding=scope.getBinding(node.name);if(!binding)return;if(binding!==state.scope.getBinding(node.name))return;if(binding.constant){state.bindings[node.name]=binding}else{var _arr=binding.constantViolations;for(var _i=0;_i<_arr.length;_i++){var violationPath=_arr[_i];state.breakOnScopePaths.push(violationPath.scope.path)}}}};var PathHoister=function(){function PathHoister(path,scope){_classCallCheck(this,PathHoister);this.breakOnScopePaths=[];this.bindings={};this.scopes=[];this.scope=scope;this.path=path}PathHoister.prototype.isCompatibleScope=function isCompatibleScope(scope){for(var key in this.bindings){var binding=this.bindings[key];if(!scope.bindingIdentifierEquals(key,binding.identifier)){return false}}return true};PathHoister.prototype.getCompatibleScopes=function getCompatibleScopes(){var scope=this.path.scope;do{if(this.isCompatibleScope(scope)){this.scopes.push(scope)}else{break}if(this.breakOnScopePaths.indexOf(scope.path)>=0){break}}while(scope=scope.parent)};PathHoister.prototype.getAttachmentPath=function getAttachmentPath(){var scopes=this.scopes;var scope=scopes.pop();if(!scope)return;if(scope.path.isFunction()){if(this.hasOwnParamBindings(scope)){if(this.scope===scope)return;return scope.path.get("body").get("body")[0]}else{return this.getNextScopeStatementParent()}}else if(scope.path.isProgram()){return this.getNextScopeStatementParent()}};PathHoister.prototype.getNextScopeStatementParent=function getNextScopeStatementParent(){var scope=this.scopes.pop();if(scope)return scope.path.getStatementParent()};PathHoister.prototype.hasOwnParamBindings=function hasOwnParamBindings(scope){for(var name in this.bindings){if(!scope.hasOwnBinding(name))continue;var binding=this.bindings[name];if(binding.kind==="param")return true}return false};PathHoister.prototype.run=function run(){var node=this.path.node;if(node._hoisted)return;node._hoisted=true;this.path.traverse(referenceVisitor,this);this.getCompatibleScopes();var path=this.getAttachmentPath();if(!path)return;var uid=path.scope.generateUidIdentifier("ref");path.insertBefore([t.variableDeclaration("var",[t.variableDeclarator(uid,this.path.node)])]);var parent=this.path.parentPath;if(parent.isJSXElement()&&this.path.container===parent.node.children){uid=t.JSXExpressionContainer(uid)}this.path.replaceWith(uid)};return PathHoister}();exports["default"]=PathHoister;module.exports=exports["default"]},{"../../../transformation/helpers/react":69,"../../../types":174,"./../../../tools/protect.js":52}],162:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var pre=[function(self){if(self.key==="body"&&(self.isBlockStatement()||self.isClassBody())){self.node.body=[];return true}},function(self,parent){var replace=false;replace=replace||self.key==="body"&&parent.isArrowFunctionExpression();replace=replace||self.key==="argument"&&parent.isThrowStatement();if(replace){self.replaceWith(t.identifier("undefined"));return true}}];exports.pre=pre;var post=[function(self,parent){var removeParent=false;removeParent=removeParent||self.key==="test"&&(parent.isWhile()||parent.isSwitchCase());removeParent=removeParent||self.key==="declaration"&&parent.isExportDeclaration();removeParent=removeParent||self.key==="body"&&parent.isLabeledStatement();removeParent=removeParent||self.listKey==="declarations"&&parent.isVariableDeclaration()&&parent.node.declarations.length===0;removeParent=removeParent||self.key==="expression"&&parent.isExpressionStatement();removeParent=removeParent||self.key==="test"&&parent.isIfStatement();if(removeParent){parent.dangerouslyRemove();return true}},function(self,parent){if(parent.isSequenceExpression()&&parent.node.expressions.length===1){parent.replaceWith(parent.node.expressions[0]);return true}},function(self,parent){if(parent.isBinary()){if(self.key==="left"){parent.replaceWith(parent.node.right)}else{parent.replaceWith(parent.node.left)}return true}}];exports.post=post},{"../../../types":174,"./../../../tools/protect.js":52}],163:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _transformationHelpersReact=require("../../../transformation/helpers/react");var react=_interopRequireWildcard(_transformationHelpersReact);var _types=require("../../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var ReferencedIdentifier={types:["Identifier","JSXIdentifier"],checkPath:function checkPath(_ref,opts){var node=_ref.node;var parent=_ref.parent;if(!t.isIdentifier(node,opts)){if(t.isJSXIdentifier(node,opts)){if(react.isCompatTag(node.name))return false}else{return false}}return t.isReferenced(node,parent)}};exports.ReferencedIdentifier=ReferencedIdentifier;var BindingIdentifier={types:["Identifier"],checkPath:function checkPath(_ref2){var node=_ref2.node;var parent=_ref2.parent;return t.isBinding(node,parent)}};exports.BindingIdentifier=BindingIdentifier;var Expression={types:["Expression"],checkPath:function checkPath(path){if(path.isIdentifier()){return path.isReferencedIdentifier()}else{return t.isExpression(path.node)}}};exports.Expression=Expression;var Scope={types:["Scopable"],checkPath:function checkPath(path){return t.isScope(path.node,path.parent)}};exports.Scope=Scope;var Referenced={checkPath:function checkPath(path){return t.isReferenced(path.node,path.parent)}};exports.Referenced=Referenced;var BlockScoped={checkPath:function checkPath(path){return t.isBlockScoped(path.node)}};exports.BlockScoped=BlockScoped;var Var={types:["VariableDeclaration"],checkPath:function checkPath(path){return t.isVar(path.node)}};exports.Var=Var},{"../../../transformation/helpers/react":69,"../../../types":174,"./../../../tools/protect.js":52}],164:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.insertBefore=insertBefore;exports._containerInsert=_containerInsert;exports._containerInsertBefore=_containerInsertBefore;exports._containerInsertAfter=_containerInsertAfter;exports._maybePopFromStatements=_maybePopFromStatements;exports.insertAfter=insertAfter;exports.updateSiblingKeys=updateSiblingKeys;exports._verifyNodeList=_verifyNodeList;exports.unshiftContainer=unshiftContainer;exports.pushContainer=pushContainer;exports.hoist=hoist;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _libHoister=require("./lib/hoister");var _libHoister2=_interopRequireDefault(_libHoister);var _index=require("./index");var _index2=_interopRequireDefault(_index);var _types=require("../../types");var t=_interopRequireWildcard(_types);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function insertBefore(nodes){this._assertUnremoved();nodes=this._verifyNodeList(nodes);if(this.parentPath.isExpressionStatement()||this.parentPath.isLabeledStatement()){return this.parentPath.insertBefore(nodes)}else if(this.isNodeType("Expression")||this.parentPath.isForStatement()&&this.key==="init"){if(this.node)nodes.push(this.node);this.replaceExpressionWithStatements(nodes)}else{this._maybePopFromStatements(nodes);if(Array.isArray(this.container)){return this._containerInsertBefore(nodes)}else if(this.isStatementOrBlock()){if(this.node)nodes.push(this.node);this.node=this.container[this.key]=t.blockStatement(nodes)}else{throw new Error("We don't know what to do with this node type. We were previously a Statement but we can't fit in here?")}}return[this]}function _containerInsert(from,nodes){this.updateSiblingKeys(from,nodes.length);var paths=[];for(var i=0;i=fromIndex){path.key+=incrementBy}}}function _verifyNodeList(nodes){if(nodes.constructor!==Array){nodes=[nodes]}for(var i=0;i1)id+=i;return"_"+id};Scope.prototype.generateUidIdentifierBasedOnNode=function generateUidIdentifierBasedOnNode(parent,defaultName){var node=parent;if(t.isAssignmentExpression(parent)){node=parent.left}else if(t.isVariableDeclarator(parent)){node=parent.id}else if(t.isProperty(node)){node=node.key}var parts=[];var add=function add(node){if(t.isModuleDeclaration(node)){if(node.source){add(node.source)}else if(node.specifiers&&node.specifiers.length){var _arr4=node.specifiers;for(var _i4=0;_i4<_arr4.length;_i4++){var specifier=_arr4[_i4];add(specifier)}}else if(node.declaration){add(node.declaration)}}else if(t.isModuleSpecifier(node)){add(node.local)}else if(t.isMemberExpression(node)){add(node.object);add(node.property)}else if(t.isIdentifier(node)){parts.push(node.name)}else if(t.isLiteral(node)){parts.push(node.value)}else if(t.isCallExpression(node)){add(node.callee)}else if(t.isObjectExpression(node)||t.isObjectPattern(node)){var _arr5=node.properties;for(var _i5=0;_i5<_arr5.length;_i5++){var prop=_arr5[_i5];add(prop.key||prop.argument)}}};add(node);var id=parts.join("$");id=id.replace(/^_/,"")||defaultName||"ref";return this.generateUidIdentifier(id)};Scope.prototype.isStatic=function isStatic(node){if(t.isThisExpression(node)||t.isSuper(node)){return true}if(t.isIdentifier(node)&&this.hasBinding(node.name)){return true}return false};Scope.prototype.maybeGenerateMemoised=function maybeGenerateMemoised(node,dontPush){if(this.isStatic(node)){return null}else{var id=this.generateUidIdentifierBasedOnNode(node);if(!dontPush)this.push({id:id});return id}};Scope.prototype.checkBlockScopedCollisions=function checkBlockScopedCollisions(local,kind,name,id){if(kind==="param")return;if(kind==="hoisted"&&local.kind==="let")return;var duplicate=false;if(!duplicate)duplicate=kind==="let"||local.kind==="let"||local.kind==="const"||local.kind==="module";if(!duplicate)duplicate=local.kind==="param"&&(kind==="let"||kind==="const");if(duplicate){throw this.hub.file.errorWithNode(id,messages.get("scopeDuplicateDeclaration",name),TypeError)}};Scope.prototype.rename=function rename(oldName,newName,block){newName=newName||this.generateUidIdentifier(oldName).name;var info=this.getBinding(oldName);if(!info)return;var state={newName:newName,oldName:oldName,binding:info.identifier,info:info};var scope=info.scope;scope.traverse(block||scope.block,renameVisitor,state);if(!block){scope.removeOwnBinding(oldName);scope.bindings[newName]=info;state.binding.name=newName}var file=this.hub.file;if(file){this._renameFromMap(file.moduleFormatter.localImports,oldName,newName,state.binding)}};Scope.prototype._renameFromMap=function _renameFromMap(map,oldName,newName,value){if(map[oldName]){map[newName]=value;map[oldName]=null}};Scope.prototype.dump=function dump(){var sep=_repeating2["default"]("-",60);console.log(sep);var scope=this;do{console.log("#",scope.block.type);for(var name in scope.bindings){var binding=scope.bindings[name];console.log(" -",name,{constant:binding.constant,references:binding.references,kind:binding.kind})}}while(scope=scope.parent);console.log(sep)};Scope.prototype.toArray=function toArray(node,i){var file=this.hub.file;if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(binding&&binding.constant&&binding.path.isGenericType("Array"))return node}if(t.isArrayExpression(node)){return node}if(t.isIdentifier(node,{name:"arguments"})){return t.callExpression(t.memberExpression(file.addHelper("slice"),t.identifier("call")),[node])}var helperName="to-array";var args=[node];if(i===true){helperName="to-consumable-array"}else if(i){args.push(t.literal(i));helperName="sliced-to-array";if(this.hub.file.isLoose("es6.forOf"))helperName+="-loose"}return t.callExpression(file.addHelper(helperName),args)};Scope.prototype.registerDeclaration=function registerDeclaration(path){if(path.isLabeledStatement()){this.registerBinding("label",path)}else if(path.isFunctionDeclaration()){this.registerBinding("hoisted",path)}else if(path.isVariableDeclaration()){var declarations=path.get("declarations");var _arr6=declarations;for(var _i6=0;_i6<_arr6.length;_i6++){var declar=_arr6[_i6];this.registerBinding(path.node.kind,declar)}}else if(path.isClassDeclaration()){this.registerBinding("let",path)}else if(path.isImportDeclaration()||path.isExportDeclaration()){this.registerBinding("module",path)}else if(path.isFlowDeclaration()){this.registerBinding("type",path)}else{this.registerBinding("unknown",path)}};Scope.prototype.registerConstantViolation=function registerConstantViolation(root,left,right){var ids=left.getBindingIdentifiers();for(var name in ids){var binding=this.getBinding(name);if(!binding)continue;if(right){var rightType=right.typeAnnotation;if(rightType&&binding.isCompatibleWithType(rightType))continue}binding.reassign(root,left,right)}};Scope.prototype.registerBinding=function registerBinding(kind,path){if(!kind)throw new ReferenceError("no `kind`");if(path.isVariableDeclaration()){var declarators=path.get("declarations");var _arr7=declarators;for(var _i7=0;_i7<_arr7.length;_i7++){var declar=_arr7[_i7];this.registerBinding(kind,declar)}return}var parent=this.getProgramParent();var ids=path.getBindingIdentifiers();for(var name in ids){var id=ids[name];var local=this.getOwnBinding(name);if(local){if(kind==="type")continue;if(local.identifier===id)continue;this.checkBlockScopedCollisions(local,kind,name,id)}parent.references[name]=true;this.bindings[name]=new _binding2["default"]({identifier:id,existing:local,scope:this,path:path,kind:kind})}};Scope.prototype.addGlobal=function addGlobal(node){this.globals[node.name]=node};Scope.prototype.hasUid=function hasUid(name){var scope=this;do{if(scope.uids[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasGlobal=function hasGlobal(name){var scope=this;do{if(scope.globals[name])return true}while(scope=scope.parent);return false};Scope.prototype.hasReference=function hasReference(name){var scope=this;do{if(scope.references[name])return true}while(scope=scope.parent);return false};Scope.prototype.isPure=function isPure(node,constantsOnly){if(t.isIdentifier(node)){var binding=this.getBinding(node.name);if(!binding)return false;if(constantsOnly)return binding.constant;return true}else if(t.isClass(node)){return!node.superClass||this.isPure(node.superClass,constantsOnly)}else if(t.isBinary(node)){return this.isPure(node.left,constantsOnly)&&this.isPure(node.right,constantsOnly)}else if(t.isArrayExpression(node)){var _arr8=node.elements;for(var _i8=0;_i8<_arr8.length;_i8++){var elem=_arr8[_i8];if(!this.isPure(elem,constantsOnly))return false}return true}else if(t.isObjectExpression(node)){var _arr9=node.properties;for(var _i9=0;_i9<_arr9.length;_i9++){var prop=_arr9[_i9];if(!this.isPure(prop,constantsOnly))return false}return true}else if(t.isProperty(node)){if(node.computed&&!this.isPure(node.key,constantsOnly))return false;return this.isPure(node.value,constantsOnly)}else{return t.isPure(node)}};Scope.prototype.setData=function setData(key,val){return this.data[key]=val};Scope.prototype.getData=function getData(key){var scope=this;do{var data=scope.data[key];if(data!=null)return data}while(scope=scope.parent)};Scope.prototype.removeData=function removeData(key){var scope=this;do{var data=scope.data[key];if(data!=null)scope.data[key]=null}while(scope=scope.parent)};Scope.prototype.init=function init(){if(!this.references)this.crawl()};Scope.prototype.crawl=function crawl(){var path=this.path;var info=this.block._scopeInfo;if(info)return _lodashObjectExtend2["default"](this,info);info=this.block._scopeInfo={references:_helpersObject2["default"](),bindings:_helpersObject2["default"](),globals:_helpersObject2["default"](),uids:_helpersObject2["default"](),data:_helpersObject2["default"]()};_lodashObjectExtend2["default"](this,info);if(path.isLoop()){var _arr10=t.FOR_INIT_KEYS;for(var _i10=0;_i10<_arr10.length;_i10++){var key=_arr10[_i10];var node=path.get(key);if(node.isBlockScoped())this.registerBinding(node.node.kind,node)}}if(path.isFunctionExpression()&&path.has("id")){if(!t.isProperty(path.parent,{method:true})){this.registerBinding("var",path)}}if(path.isClassExpression()&&path.has("id")){this.registerBinding("var",path)}if(path.isFunction()){var params=path.get("params");var _arr11=params;for(var _i11=0;_i11<_arr11.length;_i11++){var param=_arr11[_i11];this.registerBinding("param",param)}}if(path.isCatchClause()){this.registerBinding("let",path)}if(path.isComprehensionExpression()){this.registerBinding("let",path)}var parent=this.getProgramParent();if(parent.crawling)return;this.crawling=true;path.traverse(collectorVisitor);this.crawling=false};Scope.prototype.push=function push(opts){var path=this.path;if(path.isSwitchStatement()){path=this.getFunctionParent().path}if(path.isLoop()||path.isCatchClause()||path.isFunction()){t.ensureBlock(path.node);path=path.get("body")}if(!path.isBlockStatement()&&!path.isProgram()){path=this.getBlockParent().path}var unique=opts.unique;var kind=opts.kind||"var";var dataKey="declaration:"+kind;var declar=!unique&&path.getData(dataKey);if(!declar){declar=t.variableDeclaration(kind,[]);declar._generated=true;declar._blockHoist=2;this.hub.file.attachAuxiliaryComment(declar);var _path$unshiftContainer=path.unshiftContainer("body",[declar]);var declarPath=_path$unshiftContainer[0];this.registerBinding(kind,declarPath);if(!unique)path.setData(dataKey,declar)}declar.declarations.push(t.variableDeclarator(opts.id,opts.init))};Scope.prototype.getProgramParent=function getProgramParent(){var scope=this;do{if(scope.path.isProgram()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getFunctionParent=function getFunctionParent(){var scope=this;do{if(scope.path.isFunctionParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a Function or Program...")};Scope.prototype.getBlockParent=function getBlockParent(){var scope=this;do{if(scope.path.isBlockParent()){return scope}}while(scope=scope.parent);throw new Error("We couldn't find a BlockStatement, For, Switch, Function, Loop or Program...")};Scope.prototype.getAllBindings=function getAllBindings(){var ids=_helpersObject2["default"]();var scope=this;do{_lodashObjectDefaults2["default"](ids,scope.bindings);scope=scope.parent}while(scope);return ids};Scope.prototype.getAllBindingsOfKind=function getAllBindingsOfKind(){var ids=_helpersObject2["default"]();var _arr12=arguments;for(var _i12=0;_i12<_arr12.length;_i12++){var kind=_arr12[_i12];var scope=this;do{for(var name in scope.bindings){var binding=scope.bindings[name];if(binding.kind===kind)ids[name]=binding}scope=scope.parent}while(scope)}return ids};Scope.prototype.bindingIdentifierEquals=function bindingIdentifierEquals(name,node){return this.getBindingIdentifier(name)===node};Scope.prototype.getBinding=function getBinding(name){var scope=this;do{var binding=scope.getOwnBinding(name);if(binding)return binding}while(scope=scope.parent)};Scope.prototype.getOwnBinding=function getOwnBinding(name){return this.bindings[name]};Scope.prototype.getBindingIdentifier=function getBindingIdentifier(name){var info=this.getBinding(name);return info&&info.identifier};Scope.prototype.getOwnBindingIdentifier=function getOwnBindingIdentifier(name){var binding=this.bindings[name];return binding&&binding.identifier};Scope.prototype.hasOwnBinding=function hasOwnBinding(name){return!!this.getOwnBinding(name)};Scope.prototype.hasBinding=function hasBinding(name,noGlobals){if(!name)return false;if(this.hasOwnBinding(name))return true;if(this.parentHasBinding(name,noGlobals))return true;if(this.hasUid(name))return true;if(!noGlobals&&_lodashCollectionIncludes2["default"](Scope.globals,name))return true;if(!noGlobals&&_lodashCollectionIncludes2["default"](Scope.contextVariables,name))return true;return false};Scope.prototype.parentHasBinding=function parentHasBinding(name,noGlobals){return this.parent&&this.parent.hasBinding(name,noGlobals)};Scope.prototype.moveBindingTo=function moveBindingTo(name,scope){var info=this.getBinding(name);if(info){info.scope.removeOwnBinding(name);info.scope=scope;scope.bindings[name]=info}};Scope.prototype.removeOwnBinding=function removeOwnBinding(name){delete this.bindings[name]};Scope.prototype.removeBinding=function removeBinding(name){var info=this.getBinding(name);if(info)info.scope.removeOwnBinding(name)};_createClass(Scope,null,[{key:"globals",value:_lodashArrayFlatten2["default"]([_globals2["default"].builtin,_globals2["default"].browser,_globals2["default"].node].map(Object.keys)),enumerable:true},{key:"contextVariables",value:["arguments","undefined","Infinity","NaN"],enumerable:true}]);return Scope}();exports["default"]=Scope;module.exports=exports["default"]},{"../../helpers/object":46,"../../messages":48,"../../types":174,"../index":149,"./../../tools/protect.js":52,"./binding":167,globals:349,"lodash/array/flatten":362,"lodash/collection/includes":369,"lodash/object/defaults":465,"lodash/object/extend":466,repeating:525}],169:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.explode=explode;exports.verify=verify;exports.merge=merge;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _pathLibVirtualTypes=require("./path/lib/virtual-types");var virtualTypes=_interopRequireWildcard(_pathLibVirtualTypes);var _messages=require("../messages");var messages=_interopRequireWildcard(_messages);var _types=require("../types");var t=_interopRequireWildcard(_types);var _lodashLangClone=require("lodash/lang/clone");var _lodashLangClone2=_interopRequireDefault(_lodashLangClone);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function explode(visitor){if(visitor._exploded)return visitor;visitor._exploded=true;for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var parts=nodeType.split("|");if(parts.length===1)continue;var fns=visitor[nodeType];delete visitor[nodeType];var _arr=parts;for(var _i=0;_i<_arr.length;_i++){var part=_arr[_i];visitor[part]=fns}}verify(visitor);delete visitor.__esModule;ensureEntranceObjects(visitor);ensureCallbackArrays(visitor);for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var wrapper=virtualTypes[nodeType];if(!wrapper)continue;var fns=visitor[nodeType];for(var type in fns){fns[type]=wrapCheck(wrapper,fns[type])}delete visitor[nodeType];if(wrapper.types){var _arr2=wrapper.types;for(var _i2=0;_i2<_arr2.length;_i2++){var type=_arr2[_i2];if(visitor[type]){mergePair(visitor[type],fns)}else{visitor[type]=fns}}}else{mergePair(visitor,fns)}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;var fns=visitor[nodeType];var aliases=t.FLIPPED_ALIAS_KEYS[nodeType];if(!aliases)continue;delete visitor[nodeType];var _arr3=aliases;for(var _i3=0;_i3<_arr3.length;_i3++){var alias=_arr3[_i3];var existing=visitor[alias];if(existing){mergePair(existing,fns)}else{visitor[alias]=_lodashLangClone2["default"](fns)}}}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;ensureCallbackArrays(visitor[nodeType])}return visitor}function verify(visitor){if(visitor._verified)return;if(typeof visitor==="function"){throw new Error(messages.get("traverseVerifyRootFunction"))}for(var nodeType in visitor){if(shouldIgnoreKey(nodeType))continue;if(t.TYPES.indexOf(nodeType)<0&&!virtualTypes[nodeType]){throw new Error(messages.get("traverseVerifyNodeType",nodeType))}var visitors=visitor[nodeType];if(typeof visitors==="object"){for(var visitorKey in visitors){if(visitorKey==="enter"||visitorKey==="exit")continue;throw new Error(messages.get("traverseVerifyVisitorProperty",nodeType,visitorKey))}}}visitor._verified=true}function merge(visitors){var rootVisitor={};var _arr4=visitors;for(var _i4=0;_i4<_arr4.length;_i4++){var visitor=_arr4[_i4];explode(visitor);for(var type in visitor){var nodeVisitor=rootVisitor[type]=rootVisitor[type]||{};mergePair(nodeVisitor,visitor[type])}}return rootVisitor}function ensureEntranceObjects(obj){for(var key in obj){if(shouldIgnoreKey(key))continue;var fns=obj[key];if(typeof fns==="function"){obj[key]={enter:fns}}}}function ensureCallbackArrays(obj){if(obj.enter&&!Array.isArray(obj.enter))obj.enter=[obj.enter];if(obj.exit&&!Array.isArray(obj.exit))obj.exit=[obj.exit]}function wrapCheck(wrapper,fn){return function(){if(wrapper.checkPath(this)){return fn.apply(this,arguments)}}}function shouldIgnoreKey(key){if(key[0]==="_")return true;if(key==="enter"||key==="exit"||key==="shouldSkip")return true;if(key==="blacklist"||key==="noScope"||key==="skipKeys")return true;return false}function mergePair(dest,src){for(var key in src){dest[key]=[].concat(dest[key]||[],src[key])}}},{"../messages":48,"../types":174,"./../tools/protect.js":52,"./path/lib/virtual-types":163,"lodash/lang/clone":449}],170:[function(require,module,exports){module.exports={ExpressionStatement:["Statement"],DebuggerStatement:["Statement"],IfStatement:["Statement"],TryStatement:["Statement"],WithStatement:["Statement"],EmptyStatement:["Statement"],LabeledStatement:["Statement"],VariableDeclaration:["Statement","Declaration"],BreakStatement:["Statement","Terminatorless","CompletionStatement"],ContinueStatement:["Statement","Terminatorless","CompletionStatement"],ReturnStatement:["Statement","Terminatorless","CompletionStatement"],ThrowStatement:["Statement","Terminatorless","CompletionStatement"],DoWhileStatement:["Statement","BlockParent","Loop","While","Scopable"],WhileStatement:["Statement","BlockParent","Loop","While","Scopable"],SwitchStatement:["Statement","BlockParent","Scopable"],ImportSpecifier:["ModuleSpecifier"],ExportSpecifier:["ModuleSpecifier"],ImportDefaultSpecifier:["ModuleSpecifier"],ExportDefaultSpecifier:["ModuleSpecifier"],ExportNamespaceSpecifier:["ModuleSpecifier"],ExportDefaultFromSpecifier:["ModuleSpecifier"],ExportAllDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ExportDefaultDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ExportNamedDeclaration:["Statement","Declaration","ModuleDeclaration","ExportDeclaration"],ImportDeclaration:["Statement","Declaration","ModuleDeclaration"],ArrowFunctionExpression:["Scopable","Function","Func","BlockParent","FunctionParent","Expression","Pure"],FunctionDeclaration:["Scopable","Function","Func","BlockParent","FunctionParent","Statement","Pure","Declaration"],FunctionExpression:["Scopable","Function","Func","BlockParent","FunctionParent","Expression","Pure"],BlockStatement:["Scopable","BlockParent","Block","Statement"],Program:["Scopable","BlockParent","Block","FunctionParent"],CatchClause:["Scopable"],LogicalExpression:["Binary","Expression"],BinaryExpression:["Binary","Expression"],UnaryExpression:["UnaryLike","Expression"],SpreadProperty:["UnaryLike"],SpreadElement:["UnaryLike"],ClassDeclaration:["Scopable","Class","Statement","Declaration"],ClassExpression:["Scopable","Class","Expression"],ForOfStatement:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],ForInStatement:["Scopable","Statement","For","BlockParent","Loop","ForXStatement"],ForStatement:["Scopable","Statement","For","BlockParent","Loop"],ObjectPattern:["Pattern"],ArrayPattern:["Pattern"],AssignmentPattern:["Pattern"],Property:["UserWhitespacable"],AwaitExpression:["Expression","Terminatorless"],YieldExpression:["Expression","Terminatorless"],ArrayExpression:["Expression"],AssignmentExpression:["Expression"],CallExpression:["Expression"],ComprehensionExpression:["Expression","Scopable"],ConditionalExpression:["Expression"],DoExpression:["Expression"],Identifier:["Expression"],Literal:["Expression","Pure"],MemberExpression:["Expression"],MetaProperty:["Expression"],NewExpression:["Expression"],ObjectExpression:["Expression"],ParenthesizedExpression:["Expression"],SequenceExpression:["Expression"],TaggedTemplateExpression:["Expression"],ThisExpression:["Expression"],Super:["Expression"],UpdateExpression:["Expression"],AnyTypeAnnotation:["Flow","FlowBaseAnnotation"],ArrayTypeAnnotation:["Flow"],BooleanTypeAnnotation:["Flow","FlowBaseAnnotation"],ClassImplements:["Flow"],DeclareClass:["Flow","FlowDeclaration","Statement","Declaration"],DeclareFunction:["Flow","FlowDeclaration","Statement","Declaration"],DeclareModule:["Flow","FlowDeclaration","Statement"],DeclareVariable:["Flow","FlowDeclaration","Statement","Declaration"],FunctionTypeAnnotation:["Flow"],FunctionTypeParam:["Flow"],GenericTypeAnnotation:["Flow"],InterfaceExtends:["Flow"],InterfaceDeclaration:["Flow","FlowDeclaration","Statement","Declaration"],IntersectionTypeAnnotation:["Flow"],MixedTypeAnnotation:["Flow","FlowBaseAnnotation"],NullableTypeAnnotation:["Flow"],NumberTypeAnnotation:["Flow","FlowBaseAnnotation"],StringLiteralTypeAnnotation:["Flow"],StringTypeAnnotation:["Flow","FlowBaseAnnotation"],TupleTypeAnnotation:["Flow"],TypeofTypeAnnotation:["Flow"],TypeAlias:["Flow","FlowDeclaration","Statement","Declaration"],TypeAnnotation:["Flow"],TypeCastExpression:["Flow"],TypeParameterDeclaration:["Flow"],TypeParameterInstantiation:["Flow"],ObjectTypeAnnotation:["Flow"],ObjectTypeCallProperty:["Flow","UserWhitespacable"],ObjectTypeIndexer:["Flow","UserWhitespacable"],ObjectTypeProperty:["Flow","UserWhitespacable"],QualifiedTypeIdentifier:["Flow"],UnionTypeAnnotation:["Flow"],VoidTypeAnnotation:["Flow","FlowBaseAnnotation"],JSXAttribute:["JSX","Immutable"],JSXClosingElement:["JSX","Immutable"],JSXElement:["JSX","Immutable","Expression"],
+JSXEmptyExpression:["JSX","Immutable","Expression"],JSXExpressionContainer:["JSX","Immutable"],JSXIdentifier:["JSX"],JSXMemberExpression:["JSX","Expression"],JSXNamespacedName:["JSX"],JSXOpeningElement:["JSX","Immutable"],JSXSpreadAttribute:["JSX"]}},{}],171:[function(require,module,exports){module.exports={ArrayExpression:{elements:null},ArrowFunctionExpression:{params:null,body:null},AssignmentExpression:{operator:null,left:null,right:null},BinaryExpression:{operator:null,left:null,right:null},BindExpression:{object:null,callee:null},BlockStatement:{body:null},CallExpression:{callee:null,arguments:null},ConditionalExpression:{test:null,consequent:null,alternate:null},ExpressionStatement:{expression:null},File:{program:null,comments:null,tokens:null},FunctionExpression:{id:null,params:null,body:null,generator:false,async:false},FunctionDeclaration:{id:null,params:null,body:null,generator:false,async:false},GenericTypeAnnotation:{id:null,typeParameters:null},Identifier:{name:null},IfStatement:{test:null,consequent:null,alternate:null},ImportDeclaration:{specifiers:null,source:null},ImportSpecifier:{local:null,imported:null},LabeledStatement:{label:null,body:null},Literal:{value:null},LogicalExpression:{operator:null,left:null,right:null},MemberExpression:{object:null,property:null,computed:false},MethodDefinition:{key:null,value:null,kind:"method",computed:false,"static":false},NewExpression:{callee:null,arguments:null},ObjectExpression:{properties:null},Program:{body:null},Property:{kind:null,key:null,value:null,computed:false},ReturnStatement:{argument:null},SequenceExpression:{expressions:null},TemplateLiteral:{quasis:null,expressions:null},ThrowExpression:{argument:null},UnaryExpression:{operator:null,argument:null,prefix:null},VariableDeclaration:{kind:null,declarations:null},VariableDeclarator:{id:null,init:null},WithStatement:{object:null,body:null},YieldExpression:{argument:null,delegate:null}}},{}],172:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.toComputedKey=toComputedKey;exports.toSequenceExpression=toSequenceExpression;exports.toKeyAlias=toKeyAlias;exports.toIdentifier=toIdentifier;exports.toBindingIdentifierName=toBindingIdentifierName;exports.toStatement=toStatement;exports.toExpression=toExpression;exports.toBlock=toBlock;exports.valueToNode=valueToNode;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _lodashLangIsPlainObject=require("lodash/lang/isPlainObject");var _lodashLangIsPlainObject2=_interopRequireDefault(_lodashLangIsPlainObject);var _lodashLangIsNumber=require("lodash/lang/isNumber");var _lodashLangIsNumber2=_interopRequireDefault(_lodashLangIsNumber);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _traversal=require("../traversal");var _traversal2=_interopRequireDefault(_traversal);var _index=require("./index");var t=_interopRequireWildcard(_index);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function toComputedKey(node){var key=arguments[1]===undefined?node.key||node.property:arguments[1];return function(){if(!node.computed){if(t.isIdentifier(key))key=t.literal(key.name)}return key}()}function toSequenceExpression(nodes,scope){var declars=[];var bailed=false;var result=convert(nodes);if(bailed)return;for(var i=0;i=0){continue}if(t.isAnyTypeAnnotation(node)){return[node]}if(t.isFlowBaseAnnotation(node)){bases[node.type]=node;continue}if(t.isUnionTypeAnnotation(node)){if(typeGroups.indexOf(node.types)<0){nodes=nodes.concat(node.types);typeGroups.push(node.types)}continue}if(t.isGenericTypeAnnotation(node)){var _name=node.id.name;if(generics[_name]){var existing=generics[_name];if(existing.typeParameters){if(node.typeParameters){existing.typeParameters.params=removeTypeDuplicates(existing.typeParameters.params.concat(node.typeParameters.params))}}else{existing=node.typeParameters}}else{generics[_name]=node}continue}types.push(node)}for(var type in bases){types.push(bases[type])}for(var _name2 in generics){types.push(generics[_name2])}return types}function createTypeAnnotationBasedOnTypeof(type){if(type==="string"){return t.stringTypeAnnotation()}else if(type==="number"){return t.numberTypeAnnotation()}else if(type==="undefined"){return t.voidTypeAnnotation()}else if(type==="boolean"){return t.booleanTypeAnnotation()}else if(type==="function"){return t.genericTypeAnnotation(t.identifier("Function"))}else if(type==="object"){return t.genericTypeAnnotation(t.identifier("Object"))}else if(type==="symbol"){return t.genericTypeAnnotation(t.identifier("Symbol"))}else{throw new Error("Invalid typeof value")}}},{"./../tools/protect.js":52,"./index":174}],174:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.is=is;exports.isType=isType;exports.shallowEqual=shallowEqual;exports.appendToMemberExpression=appendToMemberExpression;exports.prependToMemberExpression=prependToMemberExpression;exports.ensureBlock=ensureBlock;exports.clone=clone;exports.cloneDeep=cloneDeep;exports.buildMatchMemberExpression=buildMatchMemberExpression;exports.removeComments=removeComments;exports.inheritsComments=inheritsComments;exports.inherits=inherits;var _toFastProperties=require("to-fast-properties");var _toFastProperties2=_interopRequireDefault(_toFastProperties);var _lodashArrayCompact=require("lodash/array/compact");var _lodashArrayCompact2=_interopRequireDefault(_lodashArrayCompact);var _lodashObjectAssign=require("lodash/object/assign");var _lodashObjectAssign2=_interopRequireDefault(_lodashObjectAssign);var _lodashCollectionEach=require("lodash/collection/each");var _lodashCollectionEach2=_interopRequireDefault(_lodashCollectionEach);var _lodashArrayUniq=require("lodash/array/uniq");var _lodashArrayUniq2=_interopRequireDefault(_lodashArrayUniq);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var t=exports;function registerType(type,skipAliasCheck){var is=t["is"+type]=function(node,opts){return t.is(type,node,opts,skipAliasCheck)};t["assert"+type]=function(node,opts){opts=opts||{};if(!is(node,opts)){throw new Error("Expected type "+JSON.stringify(type)+" with option "+JSON.stringify(opts))}}}var STATEMENT_OR_BLOCK_KEYS=["consequent","body","alternate"];exports.STATEMENT_OR_BLOCK_KEYS=STATEMENT_OR_BLOCK_KEYS;var FLATTENABLE_KEYS=["body","expressions"];exports.FLATTENABLE_KEYS=FLATTENABLE_KEYS;var FOR_INIT_KEYS=["left","init"];exports.FOR_INIT_KEYS=FOR_INIT_KEYS;var COMMENT_KEYS=["leadingComments","trailingComments"];exports.COMMENT_KEYS=COMMENT_KEYS;var BOOLEAN_NUMBER_BINARY_OPERATORS=[">","<",">=","<="];exports.BOOLEAN_NUMBER_BINARY_OPERATORS=BOOLEAN_NUMBER_BINARY_OPERATORS;var COMPARISON_BINARY_OPERATORS=["==","===","!=","!==","in","instanceof"];exports.COMPARISON_BINARY_OPERATORS=COMPARISON_BINARY_OPERATORS;var BOOLEAN_BINARY_OPERATORS=[].concat(COMPARISON_BINARY_OPERATORS,BOOLEAN_NUMBER_BINARY_OPERATORS);exports.BOOLEAN_BINARY_OPERATORS=BOOLEAN_BINARY_OPERATORS;var NUMBER_BINARY_OPERATORS=["-","/","*","**","&","|",">>",">>>","<<","^"];exports.NUMBER_BINARY_OPERATORS=NUMBER_BINARY_OPERATORS;var BOOLEAN_UNARY_OPERATORS=["delete","!"];exports.BOOLEAN_UNARY_OPERATORS=BOOLEAN_UNARY_OPERATORS;var NUMBER_UNARY_OPERATORS=["+","-","++","--","~"];exports.NUMBER_UNARY_OPERATORS=NUMBER_UNARY_OPERATORS;var STRING_UNARY_OPERATORS=["typeof"];exports.STRING_UNARY_OPERATORS=STRING_UNARY_OPERATORS;var VISITOR_KEYS=require("./visitor-keys");exports.VISITOR_KEYS=VISITOR_KEYS;var BUILDER_KEYS=require("./builder-keys");exports.BUILDER_KEYS=BUILDER_KEYS;var ALIAS_KEYS=require("./alias-keys");exports.ALIAS_KEYS=ALIAS_KEYS;t.FLIPPED_ALIAS_KEYS={};_lodashCollectionEach2["default"](t.VISITOR_KEYS,function(keys,type){registerType(type,true)});_lodashCollectionEach2["default"](t.ALIAS_KEYS,function(aliases,type){_lodashCollectionEach2["default"](aliases,function(alias){var types=t.FLIPPED_ALIAS_KEYS[alias]=t.FLIPPED_ALIAS_KEYS[alias]||[];types.push(type)})});_lodashCollectionEach2["default"](t.FLIPPED_ALIAS_KEYS,function(types,type){t[type.toUpperCase()+"_TYPES"]=types;registerType(type,false)});var TYPES=Object.keys(t.VISITOR_KEYS).concat(Object.keys(t.FLIPPED_ALIAS_KEYS));exports.TYPES=TYPES;function is(type,node,opts,skipAliasCheck){if(!node)return false;var matches=isType(node.type,type);if(!matches)return false;if(typeof opts==="undefined"){return true}else{return t.shallowEqual(node,opts)}}function isType(nodeType,targetType){if(nodeType===targetType)return true;var aliases=t.FLIPPED_ALIAS_KEYS[targetType];if(aliases){if(aliases[0]===nodeType)return true;var _arr=aliases;for(var _i=0;_i<_arr.length;_i++){var alias=_arr[_i];if(nodeType===alias)return true}}return false}_lodashCollectionEach2["default"](t.VISITOR_KEYS,function(keys,type){if(t.BUILDER_KEYS[type])return;var defs={};_lodashCollectionEach2["default"](keys,function(key){defs[key]=null});t.BUILDER_KEYS[type]=defs});_lodashCollectionEach2["default"](t.BUILDER_KEYS,function(keys,type){var builder=function builder(){var node={};node.start=null;node.type=type;var i=0;for(var key in keys){var arg=arguments[i++];if(arg===undefined)arg=keys[key];node[key]=arg}return node};t[type]=builder;t[type[0].toLowerCase()+type.slice(1)]=builder});function shallowEqual(actual,expected){var keys=Object.keys(expected);var _arr2=keys;for(var _i2=0;_i2<_arr2.length;_i2++){var key=_arr2[_i2];if(actual[key]!==expected[key]){return false}}return true}function appendToMemberExpression(member,append,computed){member.object=t.memberExpression(member.object,member.property,member.computed);member.property=append;member.computed=!!computed;return member}function prependToMemberExpression(member,append){member.object=t.memberExpression(append,member.object);return member}function ensureBlock(node){var key=arguments[1]===undefined?"body":arguments[1];return node[key]=t.toBlock(node[key],node)}function clone(node){var newNode={};for(var key in node){if(key[0]==="_")continue;newNode[key]=node[key]}return newNode}function cloneDeep(node){var newNode={};for(var key in node){if(key[0]==="_")continue;var val=node[key];if(val){if(val.type){val=t.cloneDeep(val)}else if(Array.isArray(val)){val=val.map(t.cloneDeep)}}newNode[key]=val}return newNode}function buildMatchMemberExpression(match,allowPartial){var parts=match.split(".");return function(member){if(!t.isMemberExpression(member))return false;var search=[member];var i=0;while(search.length){var node=search.shift();if(allowPartial&&i===parts.length){return true}if(t.isIdentifier(node)){if(parts[i]!==node.name)return false}else if(t.isLiteral(node)){if(parts[i]!==node.value)return false}else if(t.isMemberExpression(node)){if(node.computed&&!t.isLiteral(node.property)){return false}else{search.push(node.object);search.push(node.property);continue}}else{return false}if(++i>parts.length){return false}}return true}}function removeComments(child){var _arr3=COMMENT_KEYS;for(var _i3=0;_i3<_arr3.length;_i3++){var key=_arr3[_i3];delete child[key]}return child}function inheritsComments(child,parent){if(child&&parent){var _arr4=COMMENT_KEYS;for(var _i4=0;_i4<_arr4.length;_i4++){var key=_arr4[_i4];child[key]=_lodashArrayUniq2["default"](_lodashArrayCompact2["default"]([].concat(child[key],parent[key])))}}return child}function inherits(child,parent){if(!child||!parent)return child;child._scopeInfo=parent._scopeInfo;child._paths=parent._paths;child.range=parent.range;child.start=parent.start;child.loc=parent.loc;child.end=parent.end;child.typeAnnotation=parent.typeAnnotation;child.returnType=parent.returnType;t.inheritsComments(child,parent);return child}_toFastProperties2["default"](t);_toFastProperties2["default"](t.VISITOR_KEYS);_lodashObjectAssign2["default"](t,require("./retrievers"));_lodashObjectAssign2["default"](t,require("./validators"));_lodashObjectAssign2["default"](t,require("./converters"));_lodashObjectAssign2["default"](t,require("./flow"))},{"./../tools/protect.js":52,"./alias-keys":170,"./builder-keys":171,"./converters":172,"./flow":173,"./retrievers":175,"./validators":176,"./visitor-keys":177,"lodash/array/compact":361,"lodash/array/uniq":365,"lodash/collection/each":367,"lodash/object/assign":464,"to-fast-properties":542}],175:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.getBindingIdentifiers=getBindingIdentifiers;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _helpersObject=require("../helpers/object");var _helpersObject2=_interopRequireDefault(_helpersObject);var _index=require("./index");var t=_interopRequireWildcard(_index);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function getBindingIdentifiers(node){var search=[].concat(node);var ids=_helpersObject2["default"]();while(search.length){var id=search.shift();if(!id)continue;var key=t.getBindingIdentifiers.keys[id.type];if(t.isIdentifier(id)){ids[id.name]=id}else if(t.isExportDeclaration(id)){if(t.isDeclaration(node.declaration)){search.push(node.declaration)}}else if(key&&id[key]){search=search.concat(id[key])}}return ids}getBindingIdentifiers.keys={DeclareClass:"id",DeclareFunction:"id",DeclareModule:"id",DeclareVariable:"id",InterfaceDeclaration:"id",TypeAlias:"id",ComprehensionExpression:"blocks",ComprehensionBlock:"left",CatchClause:"param",LabeledStatement:"label",UnaryExpression:"argument",AssignmentExpression:"left",ImportSpecifier:"local",ImportNamespaceSpecifier:"local",ImportDefaultSpecifier:"local",ImportDeclaration:"specifiers",FunctionDeclaration:"id",FunctionExpression:"id",ClassDeclaration:"id",ClassExpression:"id",SpreadElement:"argument",RestElement:"argument",UpdateExpression:"argument",SpreadProperty:"argument",Property:"value",AssignmentPattern:"left",ArrayPattern:"elements",ObjectPattern:"properties",VariableDeclaration:"declarations",VariableDeclarator:"id"}},{"../helpers/object":46,"./../tools/protect.js":52,"./index":174}],176:[function(require,module,exports){"use strict";var _toolsProtectJs2=require("./../tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.isBinding=isBinding;exports.isReferenced=isReferenced;exports.isValidIdentifier=isValidIdentifier;exports.isLet=isLet;exports.isBlockScoped=isBlockScoped;exports.isVar=isVar;exports.isSpecifierDefault=isSpecifierDefault;exports.isScope=isScope;exports.isImmutable=isImmutable;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}var _retrievers=require("./retrievers");var _esutils=require("esutils");var _esutils2=_interopRequireDefault(_esutils);var _index=require("./index");var t=_interopRequireWildcard(_index);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function isBinding(node,parent){var bindingKey=_retrievers.getBindingIdentifiers.keys[parent.type];if(bindingKey){return parent[bindingKey]===node}else{return false}}function isReferenced(node,parent){switch(parent.type){case"MemberExpression":case"JSXMemberExpression":if(parent.property===node&&parent.computed){return true}else if(parent.object===node){return true}else{return false}case"MetaProperty":return false;case"Property":if(parent.key===node){return parent.computed}case"VariableDeclarator":return parent.id!==node;case"ArrowFunctionExpression":case"FunctionDeclaration":case"FunctionExpression":var _arr=parent.params;for(var _i=0;_i<_arr.length;_i++){var param=_arr[_i];if(param===node)return false}return parent.id!==node;case"ExportSpecifier":if(parent.source){return false}else{return parent.local===node}case"JSXAttribute":return parent.name!==node;case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":case"ImportSpecifier":return false;case"ClassDeclaration":case"ClassExpression":return parent.id!==node;case"MethodDefinition":return parent.key===node&&parent.computed;case"LabeledStatement":return false;case"CatchClause":return parent.param!==node;case"RestElement":return false;case"AssignmentExpression":return parent.right===node;case"AssignmentPattern":return false;case"ObjectPattern":case"ArrayPattern":return false}return true}function isValidIdentifier(name){if(typeof name!=="string"||_esutils2["default"].keyword.isReservedWordES6(name,true)){return false}else{return _esutils2["default"].keyword.isIdentifierNameES6(name)}}function isLet(node){return t.isVariableDeclaration(node)&&(node.kind!=="var"||node._let)}function isBlockScoped(node){return t.isFunctionDeclaration(node)||t.isClassDeclaration(node)||t.isLet(node)}function isVar(node){return t.isVariableDeclaration(node,{kind:"var"})&&!node._let}function isSpecifierDefault(specifier){return t.isImportDefaultSpecifier(specifier)||t.isIdentifier(specifier.imported||specifier.exported,{name:"default"})}function isScope(node,parent){if(t.isBlockStatement(node)&&t.isFunction(parent,{body:node})){return false}return t.isScopable(node)}function isImmutable(node){if(t.isType(node.type,"Immutable"))return true;if(t.isLiteral(node)){if(node.regex){return false}else{return true}}else if(t.isIdentifier(node)){if(node.name==="undefined"){return true}else{return false}}return false}},{"./../tools/protect.js":52,"./index":174,"./retrievers":175,esutils:347}],177:[function(require,module,exports){module.exports={ArrayExpression:["elements"],ArrayPattern:["elements","typeAnnotation"],ArrowFunctionExpression:["params","body","returnType"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BindExpression:["object","callee"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","body","superClass","typeParameters","superTypeParameters","implements","decorators"],ClassExpression:["id","body","superClass","typeParameters","superTypeParameters","implements","decorators"],ComprehensionBlock:["left","right"],ComprehensionExpression:["filter","blocks","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],Decorator:["expression"],DebuggerStatement:[],DoWhileStatement:["body","test"],DoExpression:["body"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body","returnType","typeParameters"],FunctionExpression:["id","params","body","returnType","typeParameters"],Identifier:["typeAnnotation"],IfStatement:["test","consequent","alternate"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportDeclaration:["specifiers","source"],ImportSpecifier:["imported","local"],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value","decorators"],NewExpression:["callee","arguments"],Noop:[],ObjectExpression:["properties"],ObjectPattern:["properties","typeAnnotation"],ParenthesizedExpression:["expression"],Program:["body"],Property:["key","value","decorators"],RestElement:["argument","typeAnnotation"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],SpreadProperty:["argument"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handlers","handler","guardedHandlers","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"],ExportAllDeclaration:["source","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportDefaultSpecifier:["exported"],ExportNamespaceSpecifier:["exported"],ExportSpecifier:["local","exported"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],ClassImplements:["id","typeParameters"],ClassProperty:["key","value","typeAnnotation","decorators"],DeclareClass:["id","typeParameters","extends","body"],DeclareFunction:["id"],DeclareModule:["id","body"],DeclareVariable:["id"],FunctionTypeAnnotation:["typeParameters","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberTypeAnnotation:[],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],TupleTypeAnnotation:["types"],TypeofTypeAnnotation:["argument"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],ObjectTypeAnnotation:["properties","indexers","callProperties"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["id","key","value"],ObjectTypeProperty:["key","value"],QualifiedTypeIdentifier:["id","qualification"],UnionTypeAnnotation:["types"],VoidTypeAnnotation:[],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","closingElement","children"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXSpreadAttribute:["argument"]}},{}],178:[function(require,module,exports){(function(process,__dirname){"use strict";var _toolsProtectJs2=require("./tools/protect.js");var _toolsProtectJs3=_interopRequireDefault(_toolsProtectJs2);exports.__esModule=true;exports.canCompile=canCompile;exports.resolve=resolve;exports.resolveRelative=resolveRelative;exports.list=list;exports.regexify=regexify;exports.arrayify=arrayify;exports.booleanify=booleanify;exports.shouldIgnore=shouldIgnore;exports.template=template;exports.parseTemplate=parseTemplate;function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key]}}newObj["default"]=obj;return newObj}}require("./patch");var _lodashStringEscapeRegExp=require("lodash/string/escapeRegExp");var _lodashStringEscapeRegExp2=_interopRequireDefault(_lodashStringEscapeRegExp);var _lodashStringStartsWith=require("lodash/string/startsWith");var _lodashStringStartsWith2=_interopRequireDefault(_lodashStringStartsWith);var _lodashLangCloneDeep=require("lodash/lang/cloneDeep");var _lodashLangCloneDeep2=_interopRequireDefault(_lodashLangCloneDeep);var _lodashLangIsBoolean=require("lodash/lang/isBoolean");var _lodashLangIsBoolean2=_interopRequireDefault(_lodashLangIsBoolean);var _messages=require("./messages");var messages=_interopRequireWildcard(_messages);var _minimatch=require("minimatch");var _minimatch2=_interopRequireDefault(_minimatch);var _lodashCollectionContains=require("lodash/collection/contains");var _lodashCollectionContains2=_interopRequireDefault(_lodashCollectionContains);var _traversal=require("./traversal");var _traversal2=_interopRequireDefault(_traversal);var _lodashLangIsString=require("lodash/lang/isString");var _lodashLangIsString2=_interopRequireDefault(_lodashLangIsString);var _lodashLangIsRegExp=require("lodash/lang/isRegExp");var _lodashLangIsRegExp2=_interopRequireDefault(_lodashLangIsRegExp);var _module2=require("module");var _module3=_interopRequireDefault(_module2);var _lodashLangIsEmpty=require("lodash/lang/isEmpty");var _lodashLangIsEmpty2=_interopRequireDefault(_lodashLangIsEmpty);var _helpersParse=require("./helpers/parse");var _helpersParse2=_interopRequireDefault(_helpersParse);var _path=require("path");var _path2=_interopRequireDefault(_path);var _lodashObjectHas=require("lodash/object/has");var _lodashObjectHas2=_interopRequireDefault(_lodashObjectHas);var _fs=require("fs");var _fs2=_interopRequireDefault(_fs);var _types=require("./types");var t=_interopRequireWildcard(_types);var _slash=require("slash");var _slash2=_interopRequireDefault(_slash);var _pathExists=require("path-exists");var _pathExists2=_interopRequireDefault(_pathExists);_toolsProtectJs3["default"](module);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}var _util=require("util");exports.inherits=_util.inherits;exports.inspect=_util.inspect;function canCompile(filename,altExts){var exts=altExts||canCompile.EXTENSIONS;var ext=_path2["default"].extname(filename);return _lodashCollectionContains2["default"](exts,ext)}canCompile.EXTENSIONS=[".js",".jsx",".es6",".es"];function resolve(loc){try{return require.resolve(loc)}catch(err){return null}}var relativeMod;function resolveRelative(loc){if(typeof _module3["default"]==="object")return null;if(!relativeMod){relativeMod=new _module3["default"];relativeMod.paths=_module3["default"]._nodeModulePaths(process.cwd())}try{return _module3["default"]._resolveFilename(loc,relativeMod)}catch(err){return null}}function list(val){if(!val){return[]}else if(Array.isArray(val)){return val}else if(typeof val==="string"){return val.split(",")}else{return[val]}}function regexify(val){if(!val)return new RegExp(/.^/);if(Array.isArray(val))val=new RegExp(val.map(_lodashStringEscapeRegExp2["default"]).join("|"),"i");
+if(_lodashLangIsString2["default"](val)){val=_slash2["default"](val);if(_lodashStringStartsWith2["default"](val,"./")||_lodashStringStartsWith2["default"](val,"*/"))val=val.slice(2);if(_lodashStringStartsWith2["default"](val,"**/"))val=val.slice(3);var regex=_minimatch2["default"].makeRe(val,{nocase:true});return new RegExp(regex.source.slice(1,-1),"i")}if(_lodashLangIsRegExp2["default"](val))return val;throw new TypeError("illegal type for regexify")}function arrayify(val,mapFn){if(!val)return[];if(_lodashLangIsBoolean2["default"](val))return arrayify([val],mapFn);if(_lodashLangIsString2["default"](val))return arrayify(list(val),mapFn);if(Array.isArray(val)){if(mapFn)val=val.map(mapFn);return val}return[val]}function booleanify(val){if(val==="true")return true;if(val==="false")return false;return val}function shouldIgnore(filename,ignore,only){filename=_slash2["default"](filename);if(only){var _arr=only;for(var _i=0;_i<_arr.length;_i++){var pattern=_arr[_i];if(pattern.test(filename))return false}return true}else if(ignore.length){var _arr2=ignore;for(var _i2=0;_i2<_arr2.length;_i2++){var pattern=_arr2[_i2];if(pattern.test(filename))return true}}return false}var templateVisitor={noScope:true,enter:function enter(node,parent,scope,nodes){if(t.isExpressionStatement(node)){node=node.expression}if(t.isIdentifier(node)&&_lodashObjectHas2["default"](nodes,node.name)){this.skip();this.replaceInline(nodes[node.name])}},exit:function exit(node){_traversal2["default"].clearNode(node)}};function template(name,nodes,keepExpression){var ast=exports.templates[name];if(!ast)throw new ReferenceError("unknown template "+name);if(nodes===true){keepExpression=true;nodes=null}ast=_lodashLangCloneDeep2["default"](ast);if(!_lodashLangIsEmpty2["default"](nodes)){_traversal2["default"](ast,templateVisitor,null,nodes)}if(ast.body.length>1)return ast.body;var node=ast.body[0];if(!keepExpression&&t.isExpressionStatement(node)){return node.expression}else{return node}}function parseTemplate(loc,code){var ast=_helpersParse2["default"](code,{filename:loc,looseModules:true}).program;ast=_traversal2["default"].removeProperties(ast);return ast}function loadTemplates(){var templates={};var templatesLoc=_path2["default"].join(__dirname,"transformation/templates");if(!_pathExists2["default"].sync(templatesLoc)){throw new ReferenceError(messages.get("missingTemplatesDirectory"))}var _arr3=_fs2["default"].readdirSync(templatesLoc);for(var _i3=0;_i3<_arr3.length;_i3++){var name=_arr3[_i3];if(name[0]===".")return;var key=_path2["default"].basename(name,_path2["default"].extname(name));var loc=_path2["default"].join(templatesLoc,name);var code=_fs2["default"].readFileSync(loc,"utf8");templates[key]=parseTemplate(loc,code)}return templates}try{exports.templates=require("../../templates.json")}catch(err){if(err.code!=="MODULE_NOT_FOUND")throw err;exports.templates=loadTemplates()}}).call(this,require("_process"),"/lib/babel")},{"../../templates.json":545,"./helpers/parse":47,"./messages":48,"./patch":49,"./tools/protect.js":52,"./traversal":149,"./types":174,_process:223,fs:212,"lodash/collection/contains":366,"lodash/lang/cloneDeep":450,"lodash/lang/isBoolean":453,"lodash/lang/isEmpty":454,"lodash/lang/isRegExp":460,"lodash/lang/isString":461,"lodash/object/has":467,"lodash/string/escapeRegExp":473,"lodash/string/startsWith":474,minimatch:478,module:212,path:222,"path-exists":482,slash:529,util:239}],179:[function(require,module,exports){"use strict";var XHTMLEntities=require("./xhtml");var hexNumber=/^[\da-fA-F]+$/;var decimalNumber=/^\d+$/;module.exports=function(acorn){var tt=acorn.tokTypes;var tc=acorn.tokContexts;tc.j_oTag=new acorn.TokContext("... ",true,true);tt.jsxName=new acorn.TokenType("jsxName");tt.jsxText=new acorn.TokenType("jsxText",{beforeExpr:true});tt.jsxTagStart=new acorn.TokenType("jsxTagStart");tt.jsxTagEnd=new acorn.TokenType("jsxTagEnd");tt.jsxTagStart.updateContext=function(){this.context.push(tc.j_expr);this.context.push(tc.j_oTag);this.exprAllowed=false};tt.jsxTagEnd.updateContext=function(prevType){var out=this.context.pop();if(out===tc.j_oTag&&prevType===tt.slash||out===tc.j_cTag){this.context.pop();this.exprAllowed=this.curContext()===tc.j_expr}else{this.exprAllowed=true}};var pp=acorn.Parser.prototype;pp.jsx_readToken=function(){var out="",chunkStart=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated JSX contents");var ch=this.input.charCodeAt(this.pos);switch(ch){case 60:case 123:if(this.pos===this.start){if(ch===60&&this.exprAllowed){++this.pos;return this.finishToken(tt.jsxTagStart)}return this.getTokenFromCode(ch)}out+=this.input.slice(chunkStart,this.pos);return this.finishToken(tt.jsxText,out);case 38:out+=this.input.slice(chunkStart,this.pos);out+=this.jsx_readEntity();chunkStart=this.pos;break;default:if(acorn.isNewLine(ch)){out+=this.input.slice(chunkStart,this.pos);out+=this.jsx_readNewLine(true);chunkStart=this.pos}else{++this.pos}}}};pp.jsx_readNewLine=function(normalizeCRLF){var ch=this.input.charCodeAt(this.pos);var out;++this.pos;if(ch===13&&this.input.charCodeAt(this.pos)===10){++this.pos;out=normalizeCRLF?"\n":"\r\n"}else{out=String.fromCharCode(ch)}if(this.options.locations){++this.curLine;this.lineStart=this.pos}return out};pp.jsx_readString=function(quote){var out="",chunkStart=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var ch=this.input.charCodeAt(this.pos);if(ch===quote)break;if(ch===38){out+=this.input.slice(chunkStart,this.pos);out+=this.jsx_readEntity();chunkStart=this.pos}else if(acorn.isNewLine(ch)){out+=this.input.slice(chunkStart,this.pos);out+=this.jsx_readNewLine(false);chunkStart=this.pos}else{++this.pos}}out+=this.input.slice(chunkStart,this.pos++);return this.finishToken(tt.string,out)};pp.jsx_readEntity=function(){var str="",count=0,entity;var ch=this.input[this.pos];if(ch!=="&")this.raise(this.pos,"Entity must start with an ampersand");var startPos=++this.pos;while(this.pos")}node.openingElement=openingElement;node.closingElement=closingElement;node.children=children;if(this.type===tt.relational&&this.value==="<"){this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag")}return this.finishNode(node,"JSXElement")};pp.jsx_parseElement=function(){var start=this.markPosition();this.next();return this.jsx_parseElementAt(start)};acorn.plugins.jsx=function(instance){instance.extend("parseExprAtom",function(inner){return function(refShortHandDefaultPos){if(this.type===tt.jsxText)return this.parseLiteral(this.value);else if(this.type===tt.jsxTagStart)return this.jsx_parseElement();else return inner.call(this,refShortHandDefaultPos)}});instance.extend("readToken",function(inner){return function(code){var context=this.curContext();if(context===tc.j_expr)return this.jsx_readToken();if(context===tc.j_oTag||context===tc.j_cTag){if(acorn.isIdentifierStart(code))return this.jsx_readWord();if(code==62){++this.pos;return this.finishToken(tt.jsxTagEnd)}if((code===34||code===39)&&context==tc.j_oTag)return this.jsx_readString(code)}if(code===60&&this.exprAllowed){++this.pos;return this.finishToken(tt.jsxTagStart)}return inner.call(this,code)}});instance.extend("updateContext",function(inner){return function(prevType){if(this.type==tt.braceL){var curContext=this.curContext();if(curContext==tc.j_oTag)this.context.push(tc.b_expr);else if(curContext==tc.j_expr)this.context.push(tc.b_tmpl);else inner.call(this,prevType);this.exprAllowed=true}else if(this.type===tt.slash&&prevType===tt.jsxTagStart){this.context.length-=2;this.context.push(tc.j_cTag);this.exprAllowed=false}else{return inner.call(this,prevType)}}})};return acorn}},{"./xhtml":180}],180:[function(require,module,exports){module.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪","int":"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},{}],181:[function(require,module,exports){var types=require("../lib/types");var Type=types.Type;var def=Type.def;var or=Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var isRegExp=builtin.RegExp;var shared=require("../lib/shared");var defaults=shared.defaults;var geq=shared.geq;def("Printable").field("loc",or(def("SourceLocation"),null),defaults["null"],true);def("Node").bases("Printable").field("type",isString).field("comments",or([def("Comment")],null),defaults["null"],true);def("SourceLocation").build("start","end","source").field("start",def("Position")).field("end",def("Position")).field("source",or(isString,null),defaults["null"]);def("Position").build("line","column").field("line",geq(1)).field("column",geq(0));def("Program").bases("Node").build("body").field("body",[def("Statement")]);def("Function").bases("Node").field("id",or(def("Identifier"),null),defaults["null"]).field("params",[def("Pattern")]).field("body",def("BlockStatement"));def("Statement").bases("Node");def("EmptyStatement").bases("Statement").build();def("BlockStatement").bases("Statement").build("body").field("body",[def("Statement")]);def("ExpressionStatement").bases("Statement").build("expression").field("expression",def("Expression"));def("IfStatement").bases("Statement").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Statement")).field("alternate",or(def("Statement"),null),defaults["null"]);def("LabeledStatement").bases("Statement").build("label","body").field("label",def("Identifier")).field("body",def("Statement"));def("BreakStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("ContinueStatement").bases("Statement").build("label").field("label",or(def("Identifier"),null),defaults["null"]);def("WithStatement").bases("Statement").build("object","body").field("object",def("Expression")).field("body",def("Statement"));def("SwitchStatement").bases("Statement").build("discriminant","cases","lexical").field("discriminant",def("Expression")).field("cases",[def("SwitchCase")]).field("lexical",isBoolean,defaults["false"]);def("ReturnStatement").bases("Statement").build("argument").field("argument",or(def("Expression"),null));def("ThrowStatement").bases("Statement").build("argument").field("argument",def("Expression"));def("TryStatement").bases("Statement").build("block","handler","finalizer").field("block",def("BlockStatement")).field("handler",or(def("CatchClause"),null),function(){return this.handlers&&this.handlers[0]||null}).field("handlers",[def("CatchClause")],function(){return this.handler?[this.handler]:[]},true).field("guardedHandlers",[def("CatchClause")],defaults.emptyArray).field("finalizer",or(def("BlockStatement"),null),defaults["null"]);def("CatchClause").bases("Node").build("param","guard","body").field("param",def("Pattern")).field("guard",or(def("Expression"),null),defaults["null"]).field("body",def("BlockStatement"));def("WhileStatement").bases("Statement").build("test","body").field("test",def("Expression")).field("body",def("Statement"));def("DoWhileStatement").bases("Statement").build("body","test").field("body",def("Statement")).field("test",def("Expression"));def("ForStatement").bases("Statement").build("init","test","update","body").field("init",or(def("VariableDeclaration"),def("Expression"),null)).field("test",or(def("Expression"),null)).field("update",or(def("Expression"),null)).field("body",def("Statement"));def("ForInStatement").bases("Statement").build("left","right","body","each").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement")).field("each",isBoolean);def("DebuggerStatement").bases("Statement").build();def("Declaration").bases("Statement");def("FunctionDeclaration").bases("Function","Declaration").build("id","params","body").field("id",def("Identifier"));def("FunctionExpression").bases("Function","Expression").build("id","params","body");def("VariableDeclaration").bases("Declaration").build("kind","declarations").field("kind",or("var","let","const")).field("declarations",[or(def("VariableDeclarator"),def("Identifier"))]);def("VariableDeclarator").bases("Node").build("id","init").field("id",def("Pattern")).field("init",or(def("Expression"),null));def("Expression").bases("Node","Pattern");def("ThisExpression").bases("Expression").build();def("ArrayExpression").bases("Expression").build("elements").field("elements",[or(def("Expression"),null)]);def("ObjectExpression").bases("Expression").build("properties").field("properties",[def("Property")]);def("Property").bases("Node").build("kind","key","value").field("kind",or("init","get","set")).field("key",or(def("Literal"),def("Identifier"))).field("value",or(def("Expression"),def("Pattern")));def("SequenceExpression").bases("Expression").build("expressions").field("expressions",[def("Expression")]);var UnaryOperator=or("-","+","!","~","typeof","void","delete");def("UnaryExpression").bases("Expression").build("operator","argument","prefix").field("operator",UnaryOperator).field("argument",def("Expression")).field("prefix",isBoolean,defaults["true"]);var BinaryOperator=or("==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","&","|","^","in","instanceof","..");def("BinaryExpression").bases("Expression").build("operator","left","right").field("operator",BinaryOperator).field("left",def("Expression")).field("right",def("Expression"));var AssignmentOperator=or("=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=");def("AssignmentExpression").bases("Expression").build("operator","left","right").field("operator",AssignmentOperator).field("left",def("Pattern")).field("right",def("Expression"));var UpdateOperator=or("++","--");def("UpdateExpression").bases("Expression").build("operator","argument","prefix").field("operator",UpdateOperator).field("argument",def("Expression")).field("prefix",isBoolean);var LogicalOperator=or("||","&&");def("LogicalExpression").bases("Expression").build("operator","left","right").field("operator",LogicalOperator).field("left",def("Expression")).field("right",def("Expression"));def("ConditionalExpression").bases("Expression").build("test","consequent","alternate").field("test",def("Expression")).field("consequent",def("Expression")).field("alternate",def("Expression"));def("NewExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("CallExpression").bases("Expression").build("callee","arguments").field("callee",def("Expression")).field("arguments",[def("Expression")]);def("MemberExpression").bases("Expression").build("object","property","computed").field("object",def("Expression")).field("property",or(def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("Pattern").bases("Node");def("ObjectPattern").bases("Pattern").build("properties").field("properties",[or(def("PropertyPattern"),def("Property"))]);def("PropertyPattern").bases("Pattern").build("key","pattern").field("key",or(def("Literal"),def("Identifier"))).field("pattern",def("Pattern"));def("ArrayPattern").bases("Pattern").build("elements").field("elements",[or(def("Pattern"),null)]);def("SwitchCase").bases("Node").build("test","consequent").field("test",or(def("Expression"),null)).field("consequent",[def("Statement")]);def("Identifier").bases("Node","Expression","Pattern").build("name").field("name",isString);def("Literal").bases("Node","Expression").build("value").field("value",or(isString,isBoolean,null,isNumber,isRegExp)).field("regex",or({pattern:isString,flags:isString},null),function(){if(!isRegExp.check(this.value))return null;var flags="";if(this.value.ignoreCase)flags+="i";if(this.value.multiline)flags+="m";if(this.value.global)flags+="g";return{pattern:this.value.source,flags:flags}});def("Comment").bases("Printable").field("value",isString).field("leading",isBoolean,defaults["true"]).field("trailing",isBoolean,defaults["false"]);def("Block").bases("Comment").build("value","leading","trailing");def("Line").bases("Comment").build("value","leading","trailing")},{"../lib/shared":192,"../lib/types":193}],182:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isBoolean=builtin.boolean;def("XMLDefaultDeclaration").bases("Declaration").field("namespace",def("Expression"));def("XMLAnyName").bases("Expression");def("XMLQualifiedIdentifier").bases("Expression").field("left",or(def("Identifier"),def("XMLAnyName"))).field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLFunctionQualifiedIdentifier").bases("Expression").field("right",or(def("Identifier"),def("Expression"))).field("computed",isBoolean);def("XMLAttributeSelector").bases("Expression").field("attribute",def("Expression"));def("XMLFilterExpression").bases("Expression").field("left",def("Expression")).field("right",def("Expression"));def("XMLElement").bases("XML","Expression").field("contents",[def("XML")]);def("XMLList").bases("XML","Expression").field("contents",[def("XML")]);def("XML").bases("Node");def("XMLEscape").bases("XML").field("expression",def("Expression"));def("XMLText").bases("XML").field("text",isString);def("XMLStartTag").bases("XML").field("contents",[def("XML")]);def("XMLEndTag").bases("XML").field("contents",[def("XML")]);def("XMLPointTag").bases("XML").field("contents",[def("XML")]);def("XMLName").bases("XML").field("contents",or(isString,[def("XML")]));def("XMLAttribute").bases("XML").field("value",isString);def("XMLCdata").bases("XML").field("contents",isString);def("XMLComment").bases("XML").field("contents",isString);def("XMLProcessingInstruction").bases("XML").field("target",isString).field("contents",or(isString,null))},{"../lib/types":193,"./core":181}],183:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var isObject=builtin.object;var isString=builtin.string;var defaults=require("../lib/shared").defaults;def("Function").field("generator",isBoolean,defaults["false"]).field("expression",isBoolean,defaults["false"]).field("defaults",[or(def("Expression"),null)],defaults.emptyArray).field("rest",or(def("Identifier"),null),defaults["null"]);def("FunctionDeclaration").build("id","params","body","generator","expression");def("FunctionExpression").build("id","params","body","generator","expression");def("ArrowFunctionExpression").bases("Function","Expression").build("params","body","expression").field("id",null,defaults["null"]).field("body",or(def("BlockStatement"),def("Expression"))).field("generator",false,defaults["false"]);def("YieldExpression").bases("Expression").build("argument","delegate").field("argument",or(def("Expression"),null)).field("delegate",isBoolean,defaults["false"]);def("GeneratorExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionExpression").bases("Expression").build("body","blocks","filter").field("body",def("Expression")).field("blocks",[def("ComprehensionBlock")]).field("filter",or(def("Expression"),null));def("ComprehensionBlock").bases("Node").build("left","right","each").field("left",def("Pattern")).field("right",def("Expression")).field("each",isBoolean);def("ModuleSpecifier").bases("Literal").build("value").field("value",isString);def("Property").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("method",isBoolean,defaults["false"]).field("shorthand",isBoolean,defaults["false"]).field("computed",isBoolean,defaults["false"]);def("PropertyPattern").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("MethodDefinition").bases("Declaration").build("kind","key","value","static").field("kind",or("init","get","set","")).field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("value",def("Function")).field("computed",isBoolean,defaults["false"]).field("static",isBoolean,defaults["false"]);def("SpreadElement").bases("Node").build("argument").field("argument",def("Expression"));def("ArrayExpression").field("elements",[or(def("Expression"),def("SpreadElement"),null)]);def("NewExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("CallExpression").field("arguments",[or(def("Expression"),def("SpreadElement"))]);def("SpreadElementPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ArrayPattern").field("elements",[or(def("Pattern"),null,def("SpreadElement"))]);var ClassBodyElement=or(def("MethodDefinition"),def("VariableDeclarator"),def("ClassPropertyDefinition"),def("ClassProperty"));def("ClassProperty").bases("Declaration").build("key").field("key",or(def("Literal"),def("Identifier"),def("Expression"))).field("computed",isBoolean,defaults["false"]);def("ClassPropertyDefinition").bases("Declaration").build("definition").field("definition",ClassBodyElement);def("ClassBody").bases("Declaration").build("body").field("body",[ClassBodyElement]);def("ClassDeclaration").bases("Declaration").build("id","body","superClass").field("id",or(def("Identifier"),null)).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]);def("ClassExpression").bases("Expression").build("id","body","superClass").field("id",or(def("Identifier"),null),defaults["null"]).field("body",def("ClassBody")).field("superClass",or(def("Expression"),null),defaults["null"]).field("implements",[def("ClassImplements")],defaults.emptyArray);def("ClassImplements").bases("Node").build("id").field("id",def("Identifier")).field("superClass",or(def("Expression"),null),defaults["null"]);def("Specifier").bases("Node");def("NamedSpecifier").bases("Specifier").field("id",def("Identifier")).field("name",or(def("Identifier"),null),defaults["null"]);def("ExportSpecifier").bases("NamedSpecifier").build("id","name");def("ExportBatchSpecifier").bases("Specifier").build();def("ImportSpecifier").bases("NamedSpecifier").build("id","name");def("ImportNamespaceSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ImportDefaultSpecifier").bases("Specifier").build("id").field("id",def("Identifier"));def("ExportDeclaration").bases("Declaration").build("default","declaration","specifiers","source").field("default",isBoolean).field("declaration",or(def("Declaration"),def("Expression"),null)).field("specifiers",[or(def("ExportSpecifier"),def("ExportBatchSpecifier"))],defaults.emptyArray).field("source",or(def("Literal"),def("ModuleSpecifier"),null),defaults["null"]);def("ImportDeclaration").bases("Declaration").build("specifiers","source").field("specifiers",[or(def("ImportSpecifier"),def("ImportNamespaceSpecifier"),def("ImportDefaultSpecifier"))],defaults.emptyArray).field("source",or(def("Literal"),def("ModuleSpecifier")));def("TaggedTemplateExpression").bases("Expression").field("tag",def("Expression")).field("quasi",def("TemplateLiteral"));def("TemplateLiteral").bases("Expression").build("quasis","expressions").field("quasis",[def("TemplateElement")]).field("expressions",[def("Expression")]);def("TemplateElement").bases("Node").build("value","tail").field("value",{cooked:isString,raw:isString}).field("tail",isBoolean)},{"../lib/shared":192,"../lib/types":193,"./core":181}],184:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("Function").field("async",isBoolean,defaults["false"]);def("SpreadProperty").bases("Node").build("argument").field("argument",def("Expression"));def("ObjectExpression").field("properties",[or(def("Property"),def("SpreadProperty"))]);def("SpreadPropertyPattern").bases("Pattern").build("argument").field("argument",def("Pattern"));def("ObjectPattern").field("properties",[or(def("PropertyPattern"),def("SpreadPropertyPattern"),def("Property"),def("SpreadProperty"))]);def("AwaitExpression").bases("Expression").build("argument","all").field("argument",or(def("Expression"),null)).field("all",isBoolean,defaults["false"])},{"../lib/shared":192,"../lib/types":193,"./core":181}],185:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var builtin=types.builtInTypes;var isString=builtin.string;var isNumber=builtin.number;var isBoolean=builtin.boolean;var defaults=require("../lib/shared").defaults;def("JSXAttribute").bases("Node").build("name","value").field("name",or(def("JSXIdentifier"),def("JSXNamespacedName"))).field("value",or(def("Literal"),def("JSXExpressionContainer"),null),defaults["null"]);def("JSXIdentifier").bases("Identifier").build("name").field("name",isString);def("JSXNamespacedName").bases("Node").build("namespace","name").field("namespace",def("JSXIdentifier")).field("name",def("JSXIdentifier"));def("JSXMemberExpression").bases("MemberExpression").build("object","property").field("object",or(def("JSXIdentifier"),def("JSXMemberExpression"))).field("property",def("JSXIdentifier")).field("computed",isBoolean,defaults.false);
+var JSXElementName=or(def("JSXIdentifier"),def("JSXNamespacedName"),def("JSXMemberExpression"));def("JSXSpreadAttribute").bases("Node").build("argument").field("argument",def("Expression"));var JSXAttributes=[or(def("JSXAttribute"),def("JSXSpreadAttribute"))];def("JSXExpressionContainer").bases("Expression").build("expression").field("expression",def("Expression"));def("JSXElement").bases("Expression").build("openingElement","closingElement","children").field("openingElement",def("JSXOpeningElement")).field("closingElement",or(def("JSXClosingElement"),null),defaults["null"]).field("children",[or(def("JSXElement"),def("JSXExpressionContainer"),def("JSXText"),def("Literal"))],defaults.emptyArray).field("name",JSXElementName,function(){return this.openingElement.name}).field("selfClosing",isBoolean,function(){return this.openingElement.selfClosing}).field("attributes",JSXAttributes,function(){return this.openingElement.attributes});def("JSXOpeningElement").bases("Node").build("name","attributes","selfClosing").field("name",JSXElementName).field("attributes",JSXAttributes,defaults.emptyArray).field("selfClosing",isBoolean,defaults["false"]);def("JSXClosingElement").bases("Node").build("name").field("name",JSXElementName);def("JSXText").bases("Literal").build("value").field("value",isString);def("JSXEmptyExpression").bases("Expression").build();def("Type").bases("Node");def("AnyTypeAnnotation").bases("Type");def("VoidTypeAnnotation").bases("Type");def("NumberTypeAnnotation").bases("Type");def("NumberLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",isNumber).field("raw",isString);def("StringTypeAnnotation").bases("Type");def("StringLiteralTypeAnnotation").bases("Type").build("value","raw").field("value",isString).field("raw",isString);def("BooleanTypeAnnotation").bases("Type");def("TypeAnnotation").bases("Node").build("typeAnnotation").field("typeAnnotation",def("Type"));def("NullableTypeAnnotation").bases("Type").build("typeAnnotation").field("typeAnnotation",def("Type"));def("FunctionTypeAnnotation").bases("Type").build("params","returnType","rest","typeParameters").field("params",[def("FunctionTypeParam")]).field("returnType",def("Type")).field("rest",or(def("FunctionTypeParam"),null)).field("typeParameters",or(def("TypeParameterDeclaration"),null));def("FunctionTypeParam").bases("Node").build("name","typeAnnotation","optional").field("name",def("Identifier")).field("typeAnnotation",def("Type")).field("optional",isBoolean);def("ArrayTypeAnnotation").bases("Type").build("elementType").field("elementType",def("Type"));def("ObjectTypeAnnotation").bases("Type").build("properties").field("properties",[def("ObjectTypeProperty")]).field("indexers",[def("ObjectTypeIndexer")],defaults.emptyArray).field("callProperties",[def("ObjectTypeCallProperty")],defaults.emptyArray);def("ObjectTypeProperty").bases("Node").build("key","value","optional").field("key",or(def("Literal"),def("Identifier"))).field("value",def("Type")).field("optional",isBoolean);def("ObjectTypeIndexer").bases("Node").build("id","key","value").field("id",def("Identifier")).field("key",def("Type")).field("value",def("Type"));def("ObjectTypeCallProperty").bases("Node").build("value").field("value",def("FunctionTypeAnnotation")).field("static",isBoolean,false);def("QualifiedTypeIdentifier").bases("Node").build("qualification","id").field("qualification",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("id",def("Identifier"));def("GenericTypeAnnotation").bases("Type").build("id","typeParameters").field("id",or(def("Identifier"),def("QualifiedTypeIdentifier"))).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("MemberTypeAnnotation").bases("Type").build("object","property").field("object",def("Identifier")).field("property",or(def("MemberTypeAnnotation"),def("GenericTypeAnnotation")));def("UnionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("IntersectionTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("TypeofTypeAnnotation").bases("Type").build("argument").field("argument",def("Type"));def("Identifier").field("typeAnnotation",or(def("TypeAnnotation"),null),defaults["null"]);def("TypeParameterDeclaration").bases("Node").build("params").field("params",[def("Identifier")]);def("TypeParameterInstantiation").bases("Node").build("params").field("params",[def("Type")]);def("Function").field("returnType",or(def("TypeAnnotation"),null),defaults["null"]).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]);def("ClassProperty").build("key","typeAnnotation").field("typeAnnotation",def("TypeAnnotation")).field("static",isBoolean,false);def("ClassImplements").field("typeParameters",or(def("TypeParameterInstantiation"),null),defaults["null"]);def("InterfaceDeclaration").bases("Statement").build("id","body","extends").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null),defaults["null"]).field("body",def("ObjectTypeAnnotation")).field("extends",[def("InterfaceExtends")]);def("InterfaceExtends").bases("Node").build("id").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterInstantiation"),null));def("TypeAlias").bases("Statement").build("id","typeParameters","right").field("id",def("Identifier")).field("typeParameters",or(def("TypeParameterDeclaration"),null)).field("right",def("Type"));def("TypeCastExpression").bases("Expression").build("expression","typeAnnotation").field("expression",def("Expression")).field("typeAnnotation",def("TypeAnnotation"));def("TupleTypeAnnotation").bases("Type").build("types").field("types",[def("Type")]);def("DeclareVariable").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareFunction").bases("Statement").build("id").field("id",def("Identifier"));def("DeclareClass").bases("InterfaceDeclaration").build("id");def("DeclareModule").bases("Statement").build("id","body").field("id",or(def("Identifier"),def("Literal"))).field("body",def("BlockStatement"))},{"../lib/shared":192,"../lib/types":193,"./core":181}],186:[function(require,module,exports){require("./core");var types=require("../lib/types");var def=types.Type.def;var or=types.Type.or;var geq=require("../lib/shared").geq;def("Function").field("body",or(def("BlockStatement"),def("Expression")));def("ForOfStatement").bases("Statement").build("left","right","body").field("left",or(def("VariableDeclaration"),def("Expression"))).field("right",def("Expression")).field("body",def("Statement"));def("LetStatement").bases("Statement").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Statement"));def("LetExpression").bases("Expression").build("head","body").field("head",[def("VariableDeclarator")]).field("body",def("Expression"));def("GraphExpression").bases("Expression").build("index","expression").field("index",geq(0)).field("expression",def("Literal"));def("GraphIndexExpression").bases("Expression").build("index").field("index",geq(0))},{"../lib/shared":192,"../lib/types":193,"./core":181}],187:[function(require,module,exports){var assert=require("assert");var types=require("../main");var getFieldNames=types.getFieldNames;var getFieldValue=types.getFieldValue;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isDate=types.builtInTypes.Date;var isRegExp=types.builtInTypes.RegExp;var hasOwn=Object.prototype.hasOwnProperty;function astNodesAreEquivalent(a,b,problemPath){if(isArray.check(problemPath)){problemPath.length=0}else{problemPath=null}return areEquivalent(a,b,problemPath)}astNodesAreEquivalent.assert=function(a,b){var problemPath=[];if(!astNodesAreEquivalent(a,b,problemPath)){if(problemPath.length===0){assert.strictEqual(a,b)}else{assert.ok(false,"Nodes differ in the following path: "+problemPath.map(subscriptForProperty).join(""))}}};function subscriptForProperty(property){if(/[_$a-z][_$a-z0-9]*/i.test(property)){return"."+property}return"["+JSON.stringify(property)+"]"}function areEquivalent(a,b,problemPath){if(a===b){return true}if(isArray.check(a)){return arraysAreEquivalent(a,b,problemPath)}if(isObject.check(a)){return objectsAreEquivalent(a,b,problemPath)}if(isDate.check(a)){return isDate.check(b)&&+a===+b}if(isRegExp.check(a)){return isRegExp.check(b)&&(a.source===b.source&&a.global===b.global&&a.multiline===b.multiline&&a.ignoreCase===b.ignoreCase)}return a==b}function arraysAreEquivalent(a,b,problemPath){isArray.assert(a);var aLength=a.length;if(!isArray.check(b)||b.length!==aLength){if(problemPath){problemPath.push("length")}return false}for(var i=0;inp){return true}if(pp===np&&this.name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return this.name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&this.name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return this.name==="callee"&&parent.callee===node;case"ConditionalExpression":return this.name==="test"&&parent.test===node;case"MemberExpression":return this.name==="object"&&parent.object===node;default:return false}default:if(parent.type==="NewExpression"&&this.name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}NPp.canBeFirstInStatement=function(){var node=this.node;return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};NPp.firstInStatement=function(){return firstInStatement(this)};function firstInStatement(path){for(var node,parent;path.parent;path=path.parent){node=path.node;parent=path.parent.node;if(n.BlockStatement.check(parent)&&path.parent.name==="body"&&path.name===0){assert.strictEqual(parent.body[0],node);return true}if(n.ExpressionStatement.check(parent)&&path.name==="expression"){assert.strictEqual(parent.expression,node);return true}if(n.SequenceExpression.check(parent)&&path.parent.name==="expressions"&&path.name===0){assert.strictEqual(parent.expressions[0],node);continue}if(n.CallExpression.check(parent)&&path.name==="callee"){assert.strictEqual(parent.callee,node);continue}if(n.MemberExpression.check(parent)&&path.name==="object"){assert.strictEqual(parent.object,node);continue}if(n.ConditionalExpression.check(parent)&&path.name==="test"){assert.strictEqual(parent.test,node);continue}if(isBinary(parent)&&path.name==="left"){assert.strictEqual(parent.left,node);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&path.name==="argument"){assert.strictEqual(parent.argument,node);continue}return false}return true}function cleanUpNodesAfterPrune(remainingNodePath){if(n.VariableDeclaration.check(remainingNodePath.node)){var declarations=remainingNodePath.get("declarations").value;if(!declarations||declarations.length===0){return remainingNodePath.prune()}}else if(n.ExpressionStatement.check(remainingNodePath.node)){if(!remainingNodePath.get("expression").value){return remainingNodePath.prune()}}else if(n.IfStatement.check(remainingNodePath.node)){cleanUpIfStatementAfterPrune(remainingNodePath)}return remainingNodePath}function cleanUpIfStatementAfterPrune(ifStatement){var testExpression=ifStatement.get("test").value;var alternate=ifStatement.get("alternate").value;var consequent=ifStatement.get("consequent").value;if(!consequent&&!alternate){var testExpressionStatement=b.expressionStatement(testExpression);ifStatement.replace(testExpressionStatement)}else if(!consequent&&alternate){var negatedTestExpression=b.unaryExpression("!",testExpression,true);if(n.UnaryExpression.check(testExpression)&&testExpression.operator==="!"){negatedTestExpression=testExpression.argument}ifStatement.get("test").replace(negatedTestExpression);ifStatement.get("consequent").replace(alternate);ifStatement.get("alternate").replace()}}module.exports=NodePath},{"./path":190,"./scope":191,"./types":193,assert:213,util:239}],189:[function(require,module,exports){var assert=require("assert");var types=require("./types");var NodePath=require("./node-path");var Printable=types.namedTypes.Printable;var isArray=types.builtInTypes.array;var isObject=types.builtInTypes.object;var isFunction=types.builtInTypes.function;var hasOwn=Object.prototype.hasOwnProperty;var undefined;function PathVisitor(){assert.ok(this instanceof PathVisitor);this._reusableContextStack=[];this._methodNameTable=computeMethodNameTable(this);this._shouldVisitComments=hasOwn.call(this._methodNameTable,"Block")||hasOwn.call(this._methodNameTable,"Line");this.Context=makeContextConstructor(this);this._visiting=false;this._changeReported=false}function computeMethodNameTable(visitor){var typeNames=Object.create(null);for(var methodName in visitor){if(/^visit[A-Z]/.test(methodName)){typeNames[methodName.slice("visit".length)]=true}}var supertypeTable=types.computeSupertypeLookupTable(typeNames);var methodNameTable=Object.create(null);var typeNames=Object.keys(supertypeTable);var typeNameCount=typeNames.length;for(var i=0;i=0){parentCache[path.name=i]=path}}else{parentValue[path.name]=path.value;parentCache[path.name]=path}assert.strictEqual(parentValue[path.name],path.value);assert.strictEqual(path.parentPath.get(path.name),path);return path}Pp.replace=function replace(replacement){var results=[];var parentValue=this.parentPath.value;var parentCache=getChildCache(this.parentPath);var count=arguments.length;repairRelationshipWithParent(this);if(isArray.check(parentValue)){var originalLength=parentValue.length;var move=getMoves(this.parentPath,count-1,this.name+1);var spliceArgs=[this.name,1];for(var i=0;i=than},isNumber+" >= "+than)};exports.defaults={"null":function(){return null},emptyArray:function(){return[]},"false":function(){return false},"true":function(){return true},undefined:function(){}};var naiveIsPrimitive=Type.or(builtin.string,builtin.number,builtin.boolean,builtin.null,builtin.undefined);exports.isPrimitive=new Type(function(value){if(value===null)return true;var type=typeof value;return!(type==="object"||type==="function")},naiveIsPrimitive.toString())},{"../lib/types":193}],193:[function(require,module,exports){var assert=require("assert");var Ap=Array.prototype;var slice=Ap.slice;var map=Ap.map;var each=Ap.forEach;var Op=Object.prototype;var objToStr=Op.toString;var funObjStr=objToStr.call(function(){});var strObjStr=objToStr.call("");var hasOwn=Op.hasOwnProperty;function Type(check,name){var self=this;assert.ok(self instanceof Type,self);assert.strictEqual(objToStr.call(check),funObjStr,check+" is not a function");var nameObjStr=objToStr.call(name);assert.ok(nameObjStr===funObjStr||nameObjStr===strObjStr,name+" is neither a function nor a string");Object.defineProperties(self,{name:{value:name},check:{value:function(value,deep){var result=check.call(self,value,deep);if(!result&&deep&&objToStr.call(deep)===funObjStr)deep(self,value);return result}}})}var Tp=Type.prototype;exports.Type=Type;Tp.assert=function(value,deep){if(!this.check(value,deep)){var str=shallowStringify(value);assert.ok(false,str+" does not match type "+this);return false}return true};function shallowStringify(value){if(isObject.check(value))return"{"+Object.keys(value).map(function(key){return key+": "+value[key]}).join(", ")+"}";if(isArray.check(value))return"["+value.map(shallowStringify).join(", ")+"]";return JSON.stringify(value)}Tp.toString=function(){var name=this.name;if(isString.check(name))return name;if(isFunction.check(name))return name.call(this)+"";return name+" type"};var builtInTypes={};exports.builtInTypes=builtInTypes;function defBuiltInType(example,name){var objStr=objToStr.call(example);Object.defineProperty(builtInTypes,name,{enumerable:true,value:new Type(function(value){return objToStr.call(value)===objStr},name)});return builtInTypes[name]}var isString=defBuiltInType("","string");var isFunction=defBuiltInType(function(){},"function");var isArray=defBuiltInType([],"array");var isObject=defBuiltInType({},"object");var isRegExp=defBuiltInType(/./,"RegExp");var isDate=defBuiltInType(new Date,"Date");var isNumber=defBuiltInType(3,"number");var isBoolean=defBuiltInType(true,"boolean");var isNull=defBuiltInType(null,"null");var isUndefined=defBuiltInType(void 0,"undefined");function toType(from,name){if(from instanceof Type)return from;if(from instanceof Def)return from.type;if(isArray.check(from))return Type.fromArray(from);if(isObject.check(from))return Type.fromObject(from);if(isFunction.check(from))return new Type(from,name);return new Type(function(value){return value===from},isUndefined.check(name)?function(){return from+""}:name)}Type.or=function(){var types=[];var len=arguments.length;for(var i=0;i=0){wrapExpressionBuilderWithStatement(this.typeName)}}};function wrapExpressionBuilderWithStatement(typeName){var wrapperName=getStatementBuilderName(typeName);if(builders[wrapperName])return;var wrapped=builders[getBuilderName(typeName)];if(!wrapped)return;builders[wrapperName]=function(){return builders.expressionStatement(wrapped.apply(builders,arguments))}}function populateSupertypeList(typeName,list){list.length=0;list.push(typeName);var lastSeen=Object.create(null);for(var pos=0;pos1||!binding.constant)return;if(binding.kind==="param"||binding.kind==="module")return;var replacement=binding.path.node;if(t.isVariableDeclarator(replacement)){replacement=replacement.init}if(!replacement)return;if(!scope.isPure(replacement,true))return;if(t.isClass(replacement)||t.isFunction(replacement)){if(binding.path.scope.parent!==scope)return}if(this.findParent(function(path){return path.node===replacement})){return}t.toExpression(replacement);scope.removeBinding(node.name);binding.path.dangerouslyRemove();return replacement},"ClassDeclaration|FunctionDeclaration":function ClassDeclarationFunctionDeclaration(node,parent,scope){var binding=scope.getBinding(node.id.name);if(binding&&!binding.referenced){this.dangerouslyRemove()}},VariableDeclarator:function VariableDeclarator(node,parent,scope){if(!t.isIdentifier(node.id)||!scope.isPure(node.init,true))return;visitor["ClassDeclaration|FunctionDeclaration"].apply(this,arguments)},ConditionalExpression:function ConditionalExpression(node){var evaluateTest=this.get("test").evaluateTruthy();if(evaluateTest===true){return node.consequent}else if(evaluateTest===false){return node.alternate}},BlockStatement:function BlockStatement(){var paths=this.get("body");var purge=false;for(var i=0;i3)continue;if(distance<=shortest)continue;closest=name;shortest=distance}var msg;if(closest){msg=messages.get("undeclaredVariableSuggestion",node.name,closest)}else{msg=messages.get("undeclaredVariable",node.name)}throw this.errorWithNode(msg,ReferenceError)}}})};module.exports=exports["default"]},{leven:210}],210:[function(require,module,exports){"use strict";var arr=[];var charCodeCache=[];module.exports=function(a,b){if(a===b){return 0}var aLen=a.length;var bLen=b.length;if(aLen===0){return bLen}if(bLen===0){return aLen}var bCharCode;var ret;var tmp;var tmp2;var i=0;var j=0;while(iret?tmp2>ret?ret+1:tmp2:tmp2>tmp?tmp+1:tmp2}}return ret}},{}],211:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=function(_ref){var Plugin=_ref.Plugin;var t=_ref.types;return new Plugin("undefined-to-void",{metadata:{group:"builtin-basic"},visitor:{ReferencedIdentifier:function ReferencedIdentifier(node,parent){if(node.name==="undefined"){return t.unaryExpression("void",t.literal(0),true)}}}})};module.exports=exports["default"]},{}],212:[function(require,module,exports){},{}],213:[function(require,module,exports){var util=require("util/");var pSlice=Array.prototype.slice;var hasOwn=Object.prototype.hasOwnProperty;var assert=module.exports=ok;assert.AssertionError=function AssertionError(options){this.name="AssertionError";this.actual=options.actual;this.expected=options.expected;this.operator=options.operator;if(options.message){this.message=options.message;this.generatedMessage=false}else{this.message=getMessage(this);this.generatedMessage=true}var stackStartFunction=options.stackStartFunction||fail;if(Error.captureStackTrace){Error.captureStackTrace(this,stackStartFunction)}else{var err=new Error;if(err.stack){var out=err.stack;var fn_name=stackStartFunction.name;var idx=out.indexOf("\n"+fn_name);if(idx>=0){var next_line=out.indexOf("\n",idx+1);out=out.substring(next_line+1)}this.stack=out}}};util.inherits(assert.AssertionError,Error);function replacer(key,value){if(util.isUndefined(value)){return""+value}if(util.isNumber(value)&&!isFinite(value)){return value.toString()}if(util.isFunction(value)||util.isRegExp(value)){return value.toString()}return value}function truncate(s,n){if(util.isString(s)){return s.length=0;i--){if(ka[i]!=kb[i])return false}for(i=ka.length-1;i>=0;i--){key=ka[i];if(!_deepEqual(a[key],b[key]))return false}return true}assert.notDeepEqual=function notDeepEqual(actual,expected,message){if(_deepEqual(actual,expected)){fail(actual,expected,message,"notDeepEqual",assert.notDeepEqual)}};assert.strictEqual=function strictEqual(actual,expected,message){if(actual!==expected){fail(actual,expected,message,"===",assert.strictEqual)}};assert.notStrictEqual=function notStrictEqual(actual,expected,message){if(actual===expected){fail(actual,expected,message,"!==",assert.notStrictEqual)}};function expectedException(actual,expected){if(!actual||!expected){return false}if(Object.prototype.toString.call(expected)=="[object RegExp]"){return expected.test(actual)}else if(actual instanceof expected){return true}else if(expected.call({},actual)===true){return true}return false}function _throws(shouldThrow,block,expected,message){var actual;if(util.isString(expected)){message=expected;expected=null}try{block()}catch(e){actual=e}message=(expected&&expected.name?" ("+expected.name+").":".")+(message?" "+message:".");if(shouldThrow&&!actual){fail(actual,expected,"Missing expected exception"+message)}if(!shouldThrow&&expectedException(actual,expected)){fail(actual,expected,"Got unwanted exception"+message)}if(shouldThrow&&actual&&expected&&!expectedException(actual,expected)||!shouldThrow&&actual){throw actual}}assert.throws=function(block,error,message){_throws.apply(this,[true].concat(pSlice.call(arguments)))};assert.doesNotThrow=function(block,message){_throws.apply(this,[false].concat(pSlice.call(arguments)))};assert.ifError=function(err){if(err){throw err}};var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj){if(hasOwn.call(obj,key))keys.push(key)}return keys}},{"util/":239}],214:[function(require,module,exports){arguments[4][212][0].apply(exports,arguments)},{dup:212}],215:[function(require,module,exports){var base64=require("base64-js");var ieee754=require("ieee754");var isArray=require("is-array");exports.Buffer=Buffer;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;Buffer.poolSize=8192;var kMaxLength=1073741823;var rootParent={};Buffer.TYPED_ARRAY_SUPPORT=function(){try{var buf=new ArrayBuffer(0);var arr=new Uint8Array(buf);arr.foo=function(){return 42};return arr.foo()===42&&typeof arr.subarray==="function"&&new Uint8Array(1).subarray(1,1).byteLength===0}catch(e){return false}}();function Buffer(arg){if(!(this instanceof Buffer)){if(arguments.length>1)return new Buffer(arg,arguments[1]);return new Buffer(arg)}this.length=0;this.parent=undefined;if(typeof arg==="number"){return fromNumber(this,arg)}if(typeof arg==="string"){return fromString(this,arg,arguments.length>1?arguments[1]:"utf8")}return fromObject(this,arg)}function fromNumber(that,length){that=allocate(that,length<0?0:checked(length)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i>>1;if(fromPool)that.parent=rootParent;return that}function checked(length){if(length>=kMaxLength){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength.toString(16)+" bytes")}return length|0}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;var i=0;var len=Math.min(x,y);while(i>>1;case"utf8":case"utf-8":return utf8ToBytes(string).length;case"base64":return base64ToBytes(string).length;default:return string.length}}Buffer.byteLength=byteLength;Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined;Buffer.prototype.toString=function toString(encoding,start,end){var loweredCase=false;start=start|0;end=end===undefined||end===Infinity?this.length:end|0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val)){return arrayIndexOf(this,val,byteOffset)}if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,val,byteOffset)}return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;for(var i=0;byteOffset+iremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"binary":return binaryWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end);for(var i=start;ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||valuebuf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1;this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;
+if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||valuebuf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":216,ieee754:217,"is-array":218}],216:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],217:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],218:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],219:[function(require,module,exports){function EventEmitter(){this._events=this._events||{};this._maxListeners=this._maxListeners||undefined}module.exports=EventEmitter;EventEmitter.EventEmitter=EventEmitter;EventEmitter.prototype._events=undefined;EventEmitter.prototype._maxListeners=undefined;EventEmitter.defaultMaxListeners=10;EventEmitter.prototype.setMaxListeners=function(n){if(!isNumber(n)||n<0||isNaN(n))throw TypeError("n must be a positive number");this._maxListeners=n;return this};EventEmitter.prototype.emit=function(type){var er,handler,len,args,i,listeners;if(!this._events)this._events={};if(type==="error"){if(!this._events.error||isObject(this._events.error)&&!this._events.error.length){er=arguments[1];if(er instanceof Error){throw er}throw TypeError('Uncaught, unspecified "error" event.')}}handler=this._events[type];if(isUndefined(handler))return false;if(isFunction(handler)){switch(arguments.length){case 1:handler.call(this);break;case 2:handler.call(this,arguments[1]);break;case 3:handler.call(this,arguments[1],arguments[2]);break;default:len=arguments.length;args=new Array(len-1);for(i=1;i0&&this._events[type].length>m){this._events[type].warned=true;console.error("(node) warning: possible EventEmitter memory "+"leak detected. %d listeners added. "+"Use emitter.setMaxListeners() to increase limit.",this._events[type].length);if(typeof console.trace==="function"){console.trace()}}}return this};EventEmitter.prototype.on=EventEmitter.prototype.addListener;EventEmitter.prototype.once=function(type,listener){if(!isFunction(listener))throw TypeError("listener must be a function");var fired=false;function g(){this.removeListener(type,g);if(!fired){fired=true;listener.apply(this,arguments)}}g.listener=listener;this.on(type,g);return this};EventEmitter.prototype.removeListener=function(type,listener){var list,position,length,i;if(!isFunction(listener))throw TypeError("listener must be a function");if(!this._events||!this._events[type])return this;list=this._events[type];length=list.length;position=-1;if(list===listener||isFunction(list.listener)&&list.listener===listener){delete this._events[type];if(this._events.removeListener)this.emit("removeListener",type,listener)}else if(isObject(list)){for(i=length;i-->0;){if(list[i]===listener||list[i].listener&&list[i].listener===listener){position=i;break}}if(position<0)return this;if(list.length===1){list.length=0;delete this._events[type]}else{list.splice(position,1)}if(this._events.removeListener)this.emit("removeListener",type,listener)}return this};EventEmitter.prototype.removeAllListeners=function(type){var key,listeners;if(!this._events)return this;if(!this._events.removeListener){if(arguments.length===0)this._events={};else if(this._events[type])delete this._events[type];return this}if(arguments.length===0){for(key in this._events){if(key==="removeListener")continue;this.removeAllListeners(key)}this.removeAllListeners("removeListener");this._events={};return this}listeners=this._events[type];if(isFunction(listeners)){this.removeListener(type,listeners)}else{while(listeners.length)this.removeListener(type,listeners[listeners.length-1])}delete this._events[type];return this};EventEmitter.prototype.listeners=function(type){var ret;if(!this._events||!this._events[type])ret=[];else if(isFunction(this._events[type]))ret=[this._events[type]];else ret=this._events[type].slice();return ret};EventEmitter.listenerCount=function(emitter,type){var ret;if(!emitter._events||!emitter._events[type])ret=0;else if(isFunction(emitter._events[type]))ret=1;else ret=emitter._events[type].length;return ret};function isFunction(arg){return typeof arg==="function"}function isNumber(arg){return typeof arg==="number"}function isObject(arg){return typeof arg==="object"&&arg!==null}function isUndefined(arg){return arg===void 0}},{}],220:[function(require,module,exports){if(typeof Object.create==="function"){module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:false,writable:true,configurable:true}})}}else{module.exports=function inherits(ctor,superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype;ctor.prototype=new TempCtor;ctor.prototype.constructor=ctor}}},{}],221:[function(require,module,exports){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}},{}],222:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i0){if(state.ended&&!addToFront){var e=new Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=new Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(!addToFront)state.reading=false;if(state.flowing&&state.length===0&&!state.sync){stream.emit("data",chunk);stream.read(0)}else{state.length+=state.objectMode?1:chunk.length;if(addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}}else if(!addToFront){state.reading=false}return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length=MAX_HWM){n=MAX_HWM}else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(isNaN(n)||util.isNull(n)){if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length}if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length){if(!state.ended){state.needReadable=true;return 0}else return state.length}return n}Readable.prototype.read=function(n){debug("read",n);var state=this._readableState;var nOrig=n;if(!util.isNumber(n)||n>0)state.emittedReadable=false;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){debug("read: emitReadable",state.length,state.ended);if(state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}n=howMuchToRead(n,state);if(n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;debug("need readable",doRead);if(state.length===0||state.length-n0)ret=fromList(n,state);else ret=null;if(util.isNull(ret)){state.needReadable=true;n=0}state.length-=n;if(state.length===0&&!state.ended)state.needReadable=true;if(nOrig!==n&&state.ended&&state.length===0)endReadable(this);if(!util.isNull(ret))this.emit("data",ret);return ret};function chunkInvalid(state,chunk){var er=null;if(!util.isBuffer(chunk)&&!util.isString(chunk)&&!util.isNullOrUndefined(chunk)&&!state.objectMode){er=new TypeError("Invalid non-string/buffer chunk")}return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length){state.buffer.push(chunk);state.length+=state.objectMode?1:chunk.length}}state.ended=true;emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;state.needReadable=false;if(!state.emittedReadable){debug("emitReadable",state.flowing);state.emittedReadable=true;if(state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}}function emitReadable_(stream){debug("emit readable");stream.emit("readable");flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore){state.readingMore=true;process.nextTick(function(){maybeReadMore_(stream,state)})}}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length=length){if(stringMode)ret=list.join("");else ret=Buffer.concat(list,length);list.length=0}else{if(n0)throw new Error("endReadable called on non-empty stream");if(!state.endEmitted){state.ended=true;process.nextTick(function(){if(!state.endEmitted&&state.length===0){state.endEmitted=true;stream.readable=false;stream.emit("end")}})}}function forEach(xs,f){for(var i=0,l=xs.length;i1){var cbs=[];for(var c=0;c=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;buffer.copy(this.charBuffer,this.charReceived,0,available);this.charReceived+=available;if(this.charReceived=55296&&charCode<=56319){this.charLength+=this.surrogateSize;charStr="";continue}this.charReceived=this.charLength=0;if(buffer.length===0){return charStr}break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength){buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end);end-=this.charReceived}charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1;var charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;this.charLength+=size;this.charReceived+=size;this.charBuffer.copy(this.charBuffer,size,0,size);buffer.copy(this.charBuffer,0,0,size);return charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived;var buf=this.charBuffer;var enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2;this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3;this.charLength=this.charReceived?3:0}},{buffer:215}],237:[function(require,module,exports){exports.isatty=function(){return false};function ReadStream(){throw new Error("tty.ReadStream is not implemented")}exports.ReadStream=ReadStream;function WriteStream(){throw new Error("tty.ReadStream is not implemented")}exports.WriteStream=WriteStream},{}],238:[function(require,module,exports){module.exports=function isBuffer(arg){return arg&&typeof arg==="object"&&typeof arg.copy==="function"&&typeof arg.fill==="function"&&typeof arg.readUInt8==="function"}},{}],239:[function(require,module,exports){(function(process,global){var formatRegExp=/%[sdj%]/g;exports.format=function(f){if(!isString(f)){var objects=[];for(var i=0;i=len)return x;switch(x){case"%s":return String(args[i++]);case"%d":return Number(args[i++]);case"%j":try{return JSON.stringify(args[i++])}catch(_){return"[Circular]"}default:return x}});for(var x=args[i];i=3)ctx.depth=arguments[2];if(arguments.length>=4)ctx.colors=arguments[3];if(isBoolean(opts)){ctx.showHidden=opts}else if(opts){exports._extend(ctx,opts)}if(isUndefined(ctx.showHidden))ctx.showHidden=false;if(isUndefined(ctx.depth))ctx.depth=2;if(isUndefined(ctx.colors))ctx.colors=false;if(isUndefined(ctx.customInspect))ctx.customInspect=true;if(ctx.colors)ctx.stylize=stylizeWithColor;return formatValue(ctx,obj,ctx.depth)}exports.inspect=inspect;inspect.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};inspect.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"};function stylizeWithColor(str,styleType){var style=inspect.styles[styleType];if(style){return"["+inspect.colors[style][0]+"m"+str+"["+inspect.colors[style][1]+"m"}else{return str}}function stylizeNoColor(str,styleType){return str}function arrayToHash(array){var hash={};array.forEach(function(val,idx){hash[val]=true});return hash}function formatValue(ctx,value,recurseTimes){if(ctx.customInspect&&value&&isFunction(value.inspect)&&value.inspect!==exports.inspect&&!(value.constructor&&value.constructor.prototype===value)){var ret=value.inspect(recurseTimes,ctx);if(!isString(ret)){ret=formatValue(ctx,ret,recurseTimes)}return ret}var primitive=formatPrimitive(ctx,value);if(primitive){return primitive}var keys=Object.keys(value);var visibleKeys=arrayToHash(keys);if(ctx.showHidden){keys=Object.getOwnPropertyNames(value)}if(isError(value)&&(keys.indexOf("message")>=0||keys.indexOf("description")>=0)){return formatError(value)}if(keys.length===0){if(isFunction(value)){var name=value.name?": "+value.name:"";return ctx.stylize("[Function"+name+"]","special")}if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}if(isDate(value)){return ctx.stylize(Date.prototype.toString.call(value),"date")}if(isError(value)){return formatError(value)}}var base="",array=false,braces=["{","}"];if(isArray(value)){array=true;braces=["[","]"]}if(isFunction(value)){var n=value.name?": "+value.name:"";base=" [Function"+n+"]"}if(isRegExp(value)){base=" "+RegExp.prototype.toString.call(value)}if(isDate(value)){base=" "+Date.prototype.toUTCString.call(value)}if(isError(value)){base=" "+formatError(value)}if(keys.length===0&&(!array||value.length==0)){return braces[0]+base+braces[1]}if(recurseTimes<0){if(isRegExp(value)){return ctx.stylize(RegExp.prototype.toString.call(value),"regexp")}else{return ctx.stylize("[Object]","special")}}ctx.seen.push(value);var output;if(array){output=formatArray(ctx,value,recurseTimes,visibleKeys,keys)}else{output=keys.map(function(key){return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array)})}ctx.seen.pop();return reduceToSingleString(output,base,braces)}function formatPrimitive(ctx,value){if(isUndefined(value))return ctx.stylize("undefined","undefined");if(isString(value)){var simple="'"+JSON.stringify(value).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ctx.stylize(simple,"string")}if(isNumber(value))return ctx.stylize(""+value,"number");if(isBoolean(value))return ctx.stylize(""+value,"boolean");if(isNull(value))return ctx.stylize("null","null")}function formatError(value){return"["+Error.prototype.toString.call(value)+"]"}function formatArray(ctx,value,recurseTimes,visibleKeys,keys){var output=[];for(var i=0,l=value.length;i-1){if(array){str=str.split("\n").map(function(line){return" "+line}).join("\n").substr(2)}else{str="\n"+str.split("\n").map(function(line){return" "+line}).join("\n")}}}else{str=ctx.stylize("[Circular]","special")}}if(isUndefined(name)){if(array&&key.match(/^\d+$/)){return str}name=JSON.stringify(""+key);if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){name=name.substr(1,name.length-2);name=ctx.stylize(name,"name")}else{name=name.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'");name=ctx.stylize(name,"string")}}return name+": "+str}function reduceToSingleString(output,base,braces){var numLinesEst=0;var length=output.reduce(function(prev,cur){numLinesEst++;if(cur.indexOf("\n")>=0)numLinesEst++;return prev+cur.replace(/\u001b\[\d\d?m/g,"").length+1},0);if(length>60){return braces[0]+(base===""?"":base+"\n ")+" "+output.join(",\n ")+" "+braces[1]}return braces[0]+base+" "+output.join(", ")+" "+braces[1]}function isArray(ar){return Array.isArray(ar)}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return isObject(re)&&objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return isObject(d)&&objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return isObject(e)&&(objectToString(e)==="[object Error]"||e instanceof Error)}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg==="undefined"}exports.isPrimitive=isPrimitive;exports.isBuffer=require("./support/isBuffer");function objectToString(o){return Object.prototype.toString.call(o)}function pad(n){return n<10?"0"+n.toString(10):n.toString(10)}var months=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function timestamp(){var d=new Date;var time=[pad(d.getHours()),pad(d.getMinutes()),pad(d.getSeconds())].join(":");return[d.getDate(),months[d.getMonth()],time].join(" ")}exports.log=function(){console.log("%s - %s",timestamp(),exports.format.apply(exports,arguments))};exports.inherits=require("inherits");exports._extend=function(origin,add){if(!add||!isObject(add))return origin;var keys=Object.keys(add);var i=keys.length;while(i--){origin[keys[i]]=add[keys[i]]}return origin};function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)}}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./support/isBuffer":238,_process:223,inherits:220}],240:[function(require,module,exports){(function(process){"use strict";var escapeStringRegexp=require("escape-string-regexp");var ansiStyles=require("ansi-styles");var stripAnsi=require("strip-ansi");var hasAnsi=require("has-ansi");var supportsColor=require("supports-color");var defineProps=Object.defineProperties;function Chalk(options){this.enabled=!options||options.enabled===undefined?supportsColor:options.enabled}if(process.platform==="win32"){ansiStyles.blue.open="[94m"}function build(_styles){var builder=function builder(){return applyStyle.apply(builder,arguments)};builder._styles=_styles;builder.enabled=this.enabled;builder.__proto__=proto;return builder}var styles=function(){var ret={};Object.keys(ansiStyles).forEach(function(key){ansiStyles[key].closeRe=new RegExp(escapeStringRegexp(ansiStyles[key].close),"g");ret[key]={get:function(){return build.call(this,this._styles.concat(key))}}});return ret}();var proto=defineProps(function chalk(){},styles);function applyStyle(){var args=arguments;var argsLen=args.length;var str=argsLen!==0&&String(arguments[0]);if(argsLen>1){for(var a=1;a0;i--){line=lines[i];if(~line.indexOf("sourceMappingURL=data:"))return exports.fromComment(line)}}Converter.prototype.toJSON=function(space){return JSON.stringify(this.sourcemap,null,space)};Converter.prototype.toBase64=function(){var json=this.toJSON();return new Buffer(json).toString("base64")};Converter.prototype.toComment=function(options){var base64=this.toBase64();var data="sourceMappingURL=data:application/json;base64,"+base64;return options&&options.multiline?"/*# "+data+" */":"//# "+data};Converter.prototype.toObject=function(){return JSON.parse(this.toJSON())};Converter.prototype.addProperty=function(key,value){if(this.sourcemap.hasOwnProperty(key))throw new Error("property %s already exists on the sourcemap, use set property instead");return this.setProperty(key,value)};Converter.prototype.setProperty=function(key,value){this.sourcemap[key]=value;return this};Converter.prototype.getProperty=function(key){return this.sourcemap[key]};exports.fromObject=function(obj){return new Converter(obj)};exports.fromJSON=function(json){return new Converter(json,{isJSON:true})};exports.fromBase64=function(base64){return new Converter(base64,{isEncoded:true})};exports.fromComment=function(comment){comment=comment.replace(/^\/\*/g,"//").replace(/\*\/$/g,"");return new Converter(comment,{isEncoded:true,hasComment:true})};exports.fromMapFileComment=function(comment,dir){return new Converter(comment,{commentFileDir:dir,isFileComment:true,isJSON:true})};exports.fromSource=function(content,largeSource){if(largeSource)return convertFromLargeSource(content);var m=content.match(commentRx);commentRx.lastIndex=0;return m?exports.fromComment(m.pop()):null};exports.fromMapFileSource=function(content,dir){var m=content.match(mapFileCommentRx);mapFileCommentRx.lastIndex=0;return m?exports.fromMapFileComment(m.pop(),dir):null};exports.removeComments=function(src){commentRx.lastIndex=0;return src.replace(commentRx,"")};exports.removeMapFileComments=function(src){mapFileCommentRx.lastIndex=0;return src.replace(mapFileCommentRx,"")};Object.defineProperty(exports,"commentRegex",{get:function getCommentRegex(){commentRx.lastIndex=0;return commentRx}});Object.defineProperty(exports,"mapFileCommentRegex",{get:function getMapFileCommentRegex(){mapFileCommentRx.lastIndex=0;return mapFileCommentRx}})}).call(this,require("buffer").Buffer)},{buffer:215,fs:212,path:222}],249:[function(require,module,exports){var $=require("./$");module.exports=function(IS_INCLUDES){return function($this,el,fromIndex){var O=$.toObject($this),length=$.toLength(O.length),index=$.toIndex(fromIndex,length),value;if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];if(value!=value)return true}else for(;length>index;index++)if(IS_INCLUDES||index in O){if(O[index]===el)return IS_INCLUDES||index}return!IS_INCLUDES&&-1}}},{"./$":270}],250:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx");module.exports=function(TYPE){var IS_MAP=TYPE==1,IS_FILTER=TYPE==2,IS_SOME=TYPE==3,IS_EVERY=TYPE==4,IS_FIND_INDEX=TYPE==6,NO_HOLES=TYPE==5||IS_FIND_INDEX;return function($this,callbackfn,that){var O=Object($.assertDefined($this)),self=$.ES5Object(O),f=ctx(callbackfn,that,3),length=$.toLength(self.length),index=0,result=IS_MAP?Array(length):IS_FILTER?[]:undefined,val,res;for(;length>index;index++)if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}},{"./$":270,"./$.ctx":258}],251:[function(require,module,exports){var $=require("./$");function assert(condition,msg1,msg2){if(!condition)throw TypeError(msg2?msg1+msg2:msg1)}assert.def=$.assertDefined;assert.fn=function(it){if(!$.isFunction(it))throw TypeError(it+" is not a function!");return it};assert.obj=function(it){if(!$.isObject(it))throw TypeError(it+" is not an object!");return it};assert.inst=function(it,Constructor,name){if(!(it instanceof Constructor))throw TypeError(name+": use the 'new' operator!");return it};module.exports=assert},{"./$":270}],252:[function(require,module,exports){var $=require("./$"),enumKeys=require("./$.enum-keys");module.exports=Object.assign||function assign(target,source){var T=Object($.assertDefined(target)),l=arguments.length,i=1;while(l>i){var S=$.ES5Object(arguments[i++]),keys=enumKeys(S),length=keys.length,j=0,key;while(length>j)T[key=keys[j++]]=S[key]}return T}},{"./$":270,"./$.enum-keys":261}],253:[function(require,module,exports){var $=require("./$"),TAG=require("./$.wks")("toStringTag"),toString={}.toString;function cof(it){return toString.call(it).slice(8,-1)}cof.classof=function(it){var O,T;return it==undefined?it===undefined?"Undefined":"Null":typeof(T=(O=Object(it))[TAG])=="string"?T:cof(O)};cof.set=function(it,tag,stat){if(it&&!$.has(it=stat?it:it.prototype,TAG))$.hide(it,TAG,tag)};module.exports=cof},{"./$":270,"./$.wks":288}],254:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),step=require("./$.iter").step,$has=$.has,set=$.set,isObject=$.isObject,hide=$.hide,isExtensible=Object.isExtensible||isObject,ID=safe("id"),O1=safe("O1"),LAST=safe("last"),FIRST=safe("first"),ITER=safe("iter"),SIZE=$.DESC?safe("size"):"size",id=0;function fastKey(it,create){if(!isObject(it))return typeof it=="symbol"?it:(typeof it=="string"?"S":"P")+it;if(!$has(it,ID)){if(!isExtensible(it))return"F";if(!create)return"E";hide(it,ID,++id)}return"O"+it[ID]}function getEntry(that,key){var index=fastKey(key),entry;if(index!=="F")return that[O1][index];for(entry=that[FIRST];entry;entry=entry.n){if(entry.k==key)return entry}}module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){assert.inst(that,C,NAME);set(that,O1,$.create(null));set(that,SIZE,0);set(that,LAST,undefined);set(that,FIRST,undefined);if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});require("./$.mix")(C.prototype,{clear:function clear(){for(var that=this,data=that[O1],entry=that[FIRST];entry;entry=entry.n){entry.r=true;if(entry.p)entry.p=entry.p.n=undefined;delete data[entry.i]}that[FIRST]=that[LAST]=undefined;that[SIZE]=0},"delete":function(key){var that=this,entry=getEntry(that,key);if(entry){var next=entry.n,prev=entry.p;delete that[O1][entry.i];entry.r=true;if(prev)prev.n=next;if(next)next.p=prev;if(that[FIRST]==entry)that[FIRST]=next;if(that[LAST]==entry)that[LAST]=prev;that[SIZE]--}return!!entry},forEach:function forEach(callbackfn){var f=ctx(callbackfn,arguments[1],3),entry;while(entry=entry?entry.n:this[FIRST]){f(entry.v,entry.k,this);while(entry&&entry.r)entry=entry.p}},has:function has(key){return!!getEntry(this,key)}});if($.DESC)$.setDesc(C.prototype,"size",{get:function(){return assert.def(this[SIZE])}});return C},def:function(that,key,value){var entry=getEntry(that,key),prev,index;if(entry){entry.v=value}else{that[LAST]=entry={i:index=fastKey(key,true),k:key,v:value,p:prev=that[LAST],n:undefined,r:false};if(!that[FIRST])that[FIRST]=entry;if(prev)prev.n=entry;that[SIZE]++;if(index!=="F")that[O1][index]=entry}return that},getEntry:getEntry,setIter:function(C,NAME,IS_MAP){require("./$.iter-define")(C,NAME,function(iterated,kind){set(this,ITER,{o:iterated,k:kind})},function(){var iter=this[ITER],kind=iter.k,entry=iter.l;while(entry&&entry.r)entry=entry.p;if(!iter.o||!(iter.l=entry=entry?entry.n:iter.o[FIRST])){iter.o=undefined;return step(1)}if(kind=="keys")return step(0,entry.k);if(kind=="values")return step(0,entry.v);return step(0,[entry.k,entry.v])},IS_MAP?"entries":"values",!IS_MAP,true)}}},{"./$":270,"./$.assert":251,"./$.ctx":258,"./$.for-of":262,"./$.iter":269,"./$.iter-define":267,"./$.mix":272,"./$.uid":286}],255:[function(require,module,exports){var $def=require("./$.def"),forOf=require("./$.for-of");module.exports=function(NAME){$def($def.P,NAME,{toJSON:function toJSON(){var arr=[];forOf(this,false,arr.push,arr);return arr}})}},{"./$.def":259,"./$.for-of":262}],256:[function(require,module,exports){"use strict";var $=require("./$"),safe=require("./$.uid").safe,assert=require("./$.assert"),forOf=require("./$.for-of"),$has=$.has,isObject=$.isObject,hide=$.hide,isExtensible=Object.isExtensible||isObject,id=0,ID=safe("id"),WEAK=safe("weak"),LEAK=safe("leak"),method=require("./$.array-methods"),find=method(5),findIndex=method(6);function findFrozen(store,key){return find(store.array,function(it){return it[0]===key})}function leakStore(that){return that[LEAK]||hide(that,LEAK,{array:[],get:function(key){var entry=findFrozen(this,key);if(entry)return entry[1]},has:function(key){return!!findFrozen(this,key)},set:function(key,value){var entry=findFrozen(this,key);if(entry)entry[1]=value;else this.array.push([key,value])},"delete":function(key){var index=findIndex(this.array,function(it){return it[0]===key});if(~index)this.array.splice(index,1);return!!~index}})[LEAK]}module.exports={getConstructor:function(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){$.set(assert.inst(that,C,NAME),ID,id++);if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});require("./$.mix")(C.prototype,{"delete":function(key){if(!isObject(key))return false;if(!isExtensible(key))return leakStore(this)["delete"](key);return $has(key,WEAK)&&$has(key[WEAK],this[ID])&&delete key[WEAK][this[ID]]},has:function has(key){if(!isObject(key))return false;if(!isExtensible(key))return leakStore(this).has(key);return $has(key,WEAK)&&$has(key[WEAK],this[ID])}});return C},def:function(that,key,value){if(!isExtensible(assert.obj(key))){leakStore(that).set(key,value)}else{$has(key,WEAK)||hide(key,WEAK,{});key[WEAK][that[ID]]=value}return that},leakStore:leakStore,WEAK:WEAK,ID:ID}},{"./$":270,"./$.array-methods":250,"./$.assert":251,"./$.for-of":262,"./$.mix":272,"./$.uid":286}],257:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),BUGGY=require("./$.iter").BUGGY,forOf=require("./$.for-of"),species=require("./$.species"),assertInstance=require("./$.assert").inst;module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=$.g[NAME],C=Base,ADDER=IS_MAP?"set":"add",proto=C&&C.prototype,O={};function fixMethod(KEY){var fn=proto[KEY];require("./$.redef")(proto,KEY,KEY=="delete"?function(a){return fn.call(this,a===0?0:a)}:KEY=="has"?function has(a){return fn.call(this,a===0?0:a)}:KEY=="get"?function get(a){return fn.call(this,a===0?0:a)}:KEY=="add"?function add(a){fn.call(this,a===0?0:a);return this}:function set(a,b){fn.call(this,a===0?0:a,b);return this})}if(!$.isFunction(C)||!(IS_WEAK||!BUGGY&&proto.forEach&&proto.entries)){C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER);require("./$.mix")(C.prototype,methods)}else{var inst=new C,chain=inst[ADDER](IS_WEAK?{}:-0,1),buggyZero;if(!require("./$.iter-detect")(function(iter){new C(iter)})){C=wrapper(function(target,iterable){assertInstance(target,C,NAME);var that=new Base;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that);return that});C.prototype=proto;proto.constructor=C}IS_WEAK||inst.forEach(function(val,key){buggyZero=1/key===-Infinity});if(buggyZero){fixMethod("delete");fixMethod("has");IS_MAP&&fixMethod("get")}if(buggyZero||chain!==inst)fixMethod(ADDER)}require("./$.cof").set(C,NAME);O[NAME]=C;$def($def.G+$def.W+$def.F*(C!=Base),O);species(C);species($.core[NAME]);if(!IS_WEAK)common.setIter(C,NAME,IS_MAP);return C}},{"./$":270,"./$.assert":251,"./$.cof":253,"./$.def":259,"./$.for-of":262,"./$.iter":269,"./$.iter-detect":268,"./$.mix":272,"./$.redef":275,"./$.species":280}],258:[function(require,module,exports){var assertFunction=require("./$.assert").fn;module.exports=function(fn,that,length){assertFunction(fn);if(~length&&that===undefined)return fn;switch(length){case 1:return function(a){return fn.call(that,a)};case 2:return function(a,b){return fn.call(that,a,b)};case 3:return function(a,b,c){return fn.call(that,a,b,c)}}return function(){return fn.apply(that,arguments)}}},{"./$.assert":251}],259:[function(require,module,exports){var $=require("./$"),global=$.g,core=$.core,isFunction=$.isFunction,$redef=require("./$.redef");function ctx(fn,that){return function(){return fn.apply(that,arguments)}}global.core=core;$def.F=1;$def.G=2;$def.S=4;$def.P=8;$def.B=16;$def.W=32;function $def(type,name,source){var key,own,out,exp,isGlobal=type&$def.G,isProto=type&$def.P,target=isGlobal?global:type&$def.S?global[name]:(global[name]||{}).prototype,exports=isGlobal?core:core[name]||(core[name]={});if(isGlobal)source=name;for(key in source){own=!(type&$def.F)&&target&&key in target;out=(own?target:source)[key];if(type&$def.B&&own)exp=ctx(out,global);else exp=isProto&&isFunction(out)?ctx(Function.call,out):out;if(target&&!own)$redef(target,key,out);if(exports[key]!=out)$.hide(exports,key,exp);if(isProto)(exports.prototype||(exports.prototype={}))[key]=out}}module.exports=$def},{"./$":270,"./$.redef":275}],260:[function(require,module,exports){var $=require("./$"),document=$.g.document,isObject=$.isObject,is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{}}},{"./$":270}],261:[function(require,module,exports){var $=require("./$");module.exports=function(it){var keys=$.getKeys(it),getDesc=$.getDesc,getSymbols=$.getSymbols;if(getSymbols)$.each.call(getSymbols(it),function(key){if(getDesc(it,key).enumerable)keys.push(key)});return keys}},{"./$":270}],262:[function(require,module,exports){var ctx=require("./$.ctx"),get=require("./$.iter").get,call=require("./$.iter-call");module.exports=function(iterable,entries,fn,that){var iterator=get(iterable),f=ctx(fn,that,entries?2:1),step;while(!(step=iterator.next()).done){if(call(iterator,f,step.value,entries)===false){return call.close(iterator)}}}},{"./$.ctx":258,"./$.iter":269,"./$.iter-call":266}],263:[function(require,module,exports){module.exports=function($){$.FW=true;$.path=$.g;return $}},{}],264:[function(require,module,exports){var $=require("./$"),toString={}.toString,getNames=$.getNames;var windowNames=typeof window=="object"&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];function getWindowNames(it){try{return getNames(it)}catch(e){return windowNames.slice()}}module.exports.get=function getOwnPropertyNames(it){if(windowNames&&toString.call(it)=="[object Window]")return getWindowNames(it);return getNames($.toObject(it))}},{"./$":270}],265:[function(require,module,exports){module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3]);case 5:return un?fn(args[0],args[1],args[2],args[3],args[4]):fn.call(that,args[0],args[1],args[2],args[3],args[4])}return fn.apply(that,args)}},{}],266:[function(require,module,exports){var assertObject=require("./$.assert").obj;function close(iterator){var ret=iterator["return"];if(ret!==undefined)assertObject(ret.call(iterator))}function call(iterator,fn,value,entries){try{return entries?fn(assertObject(value)[0],value[1]):fn(value)}catch(e){close(iterator);throw e}}call.close=close;module.exports=call},{"./$.assert":251}],267:[function(require,module,exports){var $def=require("./$.def"),$redef=require("./$.redef"),$=require("./$"),cof=require("./$.cof"),$iter=require("./$.iter"),SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",KEYS="keys",VALUES="values",Iterators=$iter.Iterators;module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCE){$iter.create(Constructor,NAME,next);function createMethod(kind){function $$(that){return new Constructor(that,kind)}switch(kind){case KEYS:return function keys(){return $$(this)};case VALUES:return function values(){return $$(this)}}return function entries(){return $$(this)}}var TAG=NAME+" Iterator",proto=Base.prototype,_native=proto[SYMBOL_ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT],_default=_native||createMethod(DEFAULT),methods,key;if(_native){var IteratorPrototype=$.getProto(_default.call(new Base));cof.set(IteratorPrototype,TAG,true);if($.FW&&$.has(proto,FF_ITERATOR))$iter.set(IteratorPrototype,$.that)}if($.FW||FORCE)$iter.set(proto,_default);Iterators[NAME]=_default;Iterators[TAG]=$.that;if(DEFAULT){methods={keys:IS_SET?_default:createMethod(KEYS),values:DEFAULT==VALUES?_default:createMethod(VALUES),entries:DEFAULT!=VALUES?_default:createMethod("entries")};if(FORCE)for(key in methods){if(!(key in proto))$redef(proto,key,methods[key])}else $def($def.P+$def.F*$iter.BUGGY,NAME,methods)}}},{"./$":270,"./$.cof":253,"./$.def":259,"./$.iter":269,"./$.redef":275,"./$.wks":288}],268:[function(require,module,exports){var SYMBOL_ITERATOR=require("./$.wks")("iterator"),SAFE_CLOSING=false;try{var riter=[7][SYMBOL_ITERATOR]();riter["return"]=function(){SAFE_CLOSING=true};Array.from(riter,function(){throw 2})}catch(e){}module.exports=function(exec){if(!SAFE_CLOSING)return false;var safe=false;try{var arr=[7],iter=arr[SYMBOL_ITERATOR]();iter.next=function(){safe=true};arr[SYMBOL_ITERATOR]=function(){return iter};exec(arr)}catch(e){}return safe}},{"./$.wks":288}],269:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),classof=cof.classof,assert=require("./$.assert"),assertObject=assert.obj,SYMBOL_ITERATOR=require("./$.wks")("iterator"),FF_ITERATOR="@@iterator",Iterators=require("./$.shared")("iterators"),IteratorPrototype={};setIterator(IteratorPrototype,$.that);function setIterator(O,value){$.hide(O,SYMBOL_ITERATOR,value);if(FF_ITERATOR in[])$.hide(O,FF_ITERATOR,value)}module.exports={BUGGY:"keys"in[]&&!("next"in[].keys()),Iterators:Iterators,step:function(done,value){return{value:value,done:!!done}},is:function(it){var O=Object(it),Symbol=$.g.Symbol;return(Symbol&&Symbol.iterator||FF_ITERATOR)in O||SYMBOL_ITERATOR in O||$.has(Iterators,classof(O))},get:function(it){var Symbol=$.g.Symbol,getIter;if(it!=undefined){getIter=it[Symbol&&Symbol.iterator||FF_ITERATOR]||it[SYMBOL_ITERATOR]||Iterators[classof(it)]}assert($.isFunction(getIter),it," is not iterable!");return assertObject(getIter.call(it))},set:setIterator,create:function(Constructor,NAME,next,proto){Constructor.prototype=$.create(proto||IteratorPrototype,{next:$.desc(1,next)});cof.set(Constructor,NAME+" Iterator")}}},{"./$":270,"./$.assert":251,"./$.cof":253,"./$.shared":279,"./$.wks":288}],270:[function(require,module,exports){"use strict";var global=typeof self!="undefined"?self:Function("return this")(),core={},defineProperty=Object.defineProperty,hasOwnProperty={}.hasOwnProperty,ceil=Math.ceil,floor=Math.floor,max=Math.max,min=Math.min;var DESC=!!function(){try{return defineProperty({},"a",{get:function(){return 2}}).a==2}catch(e){}}();var hide=createDefiner(1);function toInteger(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}function desc(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}function simpleSet(object,key,value){object[key]=value;return object}function createDefiner(bitmap){return DESC?function(object,key,value){return $.setDesc(object,key,desc(bitmap,value))}:simpleSet}function isObject(it){return it!==null&&(typeof it=="object"||typeof it=="function")}function isFunction(it){return typeof it=="function"}function assertDefined(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}var $=module.exports=require("./$.fw")({g:global,core:core,html:global.document&&document.documentElement,isObject:isObject,isFunction:isFunction,that:function(){return this},toInteger:toInteger,toLength:function(it){return it>0?min(toInteger(it),9007199254740991):0},toIndex:function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)},has:function(it,key){return hasOwnProperty.call(it,key)},create:Object.create,getProto:Object.getPrototypeOf,DESC:DESC,desc:desc,getDesc:Object.getOwnPropertyDescriptor,setDesc:defineProperty,setDescs:Object.defineProperties,getKeys:Object.keys,getNames:Object.getOwnPropertyNames,getSymbols:Object.getOwnPropertySymbols,assertDefined:assertDefined,ES5Object:Object,toObject:function(it){return $.ES5Object(assertDefined(it))},hide:hide,def:createDefiner(0),set:global.Symbol?simpleSet:hide,each:[].forEach});if(typeof __e!="undefined")__e=core;if(typeof __g!="undefined")__g=global},{"./$.fw":263}],271:[function(require,module,exports){var $=require("./$");module.exports=function(object,el){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,index=0,key;while(length>index)if(O[key=keys[index++]]===el)return key}},{"./$":270}],272:[function(require,module,exports){var $redef=require("./$.redef");module.exports=function(target,src){for(var key in src)$redef(target,key,src[key]);return target}},{"./$.redef":275}],273:[function(require,module,exports){var $=require("./$"),assertObject=require("./$.assert").obj;module.exports=function ownKeys(it){assertObject(it);var keys=$.getNames(it),getSymbols=$.getSymbols;return getSymbols?keys.concat(getSymbols(it)):keys}},{"./$":270,"./$.assert":251}],274:[function(require,module,exports){"use strict";var $=require("./$"),invoke=require("./$.invoke"),assertFunction=require("./$.assert").fn;module.exports=function(){var fn=assertFunction(this),length=arguments.length,pargs=Array(length),i=0,_=$.path._,holder=false;while(length>i)if((pargs[i]=arguments[i++])===_)holder=true;return function(){var that=this,_length=arguments.length,j=0,k=0,args;if(!holder&&!_length)return invoke(fn,pargs,that);args=pargs.slice();if(holder)for(;length>j;j++)if(args[j]===_)args[j]=arguments[k++];while(_length>k)args.push(arguments[k++]);return invoke(fn,args,that)}}},{"./$":270,"./$.assert":251,"./$.invoke":265}],275:[function(require,module,exports){var $=require("./$"),tpl=String({}.hasOwnProperty),SRC=require("./$.uid").safe("src"),_toString=Function.toString;function $redef(O,key,val,safe){if($.isFunction(val)){var base=O[key];$.hide(val,SRC,base?String(base):tpl.replace(/hasOwnProperty/,String(key)));if(!("name"in val))val.name=key}if(O===$.g){O[key]=val}else{if(!safe)delete O[key];$.hide(O,key,val)}}$redef(Function.prototype,"toString",function toString(){return $.has(this,SRC)?this[SRC]:_toString.call(this)});$.core.inspectSource=function(it){return _toString.call(it)};module.exports=$redef},{"./$":270,"./$.uid":286}],276:[function(require,module,exports){"use strict";module.exports=function(regExp,replace,isStatic){var replacer=replace===Object(replace)?function(part){return replace[part]}:replace;return function(it){return String(isStatic?it:this).replace(regExp,replacer)}}},{}],277:[function(require,module,exports){module.exports=Object.is||function is(x,y){return x===y?x!==0||1/x===1/y:x!=x&&y!=y}},{}],278:[function(require,module,exports){var $=require("./$"),assert=require("./$.assert");function check(O,proto){assert.obj(O);assert(proto===null||$.isObject(proto),proto,": can't set as prototype!")}module.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(buggy,set){try{set=require("./$.ctx")(Function.call,$.getDesc(Object.prototype,"__proto__").set,2);set({},[])}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}():undefined),check:check}},{"./$":270,"./$.assert":251,"./$.ctx":258}],279:[function(require,module,exports){var $=require("./$"),SHARED="__core-js_shared__",store=$.g[SHARED]||($.g[SHARED]={});module.exports=function(key){return store[key]||(store[key]={})}},{"./$":270}],280:[function(require,module,exports){var $=require("./$"),SPECIES=require("./$.wks")("species");module.exports=function(C){if($.DESC&&!(SPECIES in C))$.setDesc(C,SPECIES,{configurable:true,get:$.that})}},{"./$":270,"./$.wks":288}],281:[function(require,module,exports){var $=require("./$");module.exports=function(TO_STRING){return function(that,pos){var s=String($.assertDefined(that)),i=$.toInteger(pos),l=s.length,a,b;if(i<0||i>=l)return TO_STRING?"":undefined;a=s.charCodeAt(i);return a<55296||a>56319||i+1===l||(b=s.charCodeAt(i+1))<56320||b>57343?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-55296<<10)+(b-56320)+65536}}},{"./$":270}],282:[function(require,module,exports){var $=require("./$"),repeat=require("./$.string-repeat");module.exports=function(that,minLength,fillChar,left){var S=String($.assertDefined(that));if(minLength===undefined)return S;var intMinLength=$.toInteger(minLength);var fillLen=intMinLength-S.length;if(fillLen<0||fillLen===Infinity){throw new RangeError("Cannot satisfy string length "+minLength+" for string: "+S)}var sFillStr=fillChar===undefined?" ":String(fillChar);var sFillVal=repeat.call(sFillStr,Math.ceil(fillLen/sFillStr.length));if(sFillVal.length>fillLen)sFillVal=left?sFillVal.slice(sFillVal.length-fillLen):sFillVal.slice(0,fillLen);return left?sFillVal.concat(S):S.concat(sFillVal)}},{"./$":270,"./$.string-repeat":283}],283:[function(require,module,exports){"use strict";var $=require("./$");module.exports=function repeat(count){var str=String($.assertDefined(this)),res="",n=$.toInteger(count);if(n<0||n==Infinity)throw RangeError("Count can't be negative");for(;n>0;(n>>>=1)&&(str+=str))if(n&1)res+=str;return res}},{"./$":270}],284:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),invoke=require("./$.invoke"),cel=require("./$.dom-create"),global=$.g,isFunction=$.isFunction,html=$.html,process=global.process,setTask=global.setImmediate,clearTask=global.clearImmediate,MessageChannel=global.MessageChannel,counter=0,queue={},ONREADYSTATECHANGE="onreadystatechange",defer,channel,port;function run(){var id=+this;if($.has(queue,id)){var fn=queue[id];delete queue[id];fn()}}function listner(event){run.call(event.data)}if(!isFunction(setTask)||!isFunction(clearTask)){setTask=function(fn){var args=[],i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){invoke(isFunction(fn)?fn:Function(fn),args)};defer(counter);return counter};clearTask=function(id){delete queue[id]};if(cof(process)=="process"){defer=function(id){process.nextTick(ctx(run,id,1))}}else if(global.addEventListener&&isFunction(global.postMessage)&&!global.importScripts){defer=function(id){global.postMessage(id,"*")};global.addEventListener("message",listner,false)}else if(isFunction(MessageChannel)){channel=new MessageChannel;port=channel.port2;channel.port1.onmessage=listner;defer=ctx(port.postMessage,port,1)}else if(ONREADYSTATECHANGE in cel("script")){defer=function(id){html.appendChild(cel("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run.call(id)}}}else{defer=function(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}},{"./$":270,"./$.cof":253,"./$.ctx":258,"./$.dom-create":260,"./$.invoke":265}],285:[function(require,module,exports){module.exports=function(exec){try{exec();return false}catch(e){return true}}},{}],286:[function(require,module,exports){var sid=0;function uid(key){return"Symbol(".concat(key===undefined?"":key,")_",(++sid+Math.random()).toString(36))}uid.safe=require("./$").g.Symbol||uid;module.exports=uid},{"./$":270}],287:[function(require,module,exports){var UNSCOPABLES=require("./$.wks")("unscopables");if(!(UNSCOPABLES in[]))require("./$").hide(Array.prototype,UNSCOPABLES,{});module.exports=function(key){[][UNSCOPABLES][key]=true}},{"./$":270,"./$.wks":288}],288:[function(require,module,exports){var global=require("./$").g,store=require("./$.shared")("wks");module.exports=function(name){return store[name]||(store[name]=global.Symbol&&global.Symbol[name]||require("./$.uid").safe("Symbol."+name))}},{"./$":270,"./$.shared":279,"./$.uid":286}],289:[function(require,module,exports){var $=require("./$"),cel=require("./$.dom-create"),cof=require("./$.cof"),$def=require("./$.def"),invoke=require("./$.invoke"),arrayMethod=require("./$.array-methods"),IE_PROTO=require("./$.uid").safe("__proto__"),assert=require("./$.assert"),assertObject=assert.obj,ObjectProto=Object.prototype,html=$.html,A=[],_slice=A.slice,_join=A.join,classof=cof.classof,has=$.has,defineProperty=$.setDesc,getOwnDescriptor=$.getDesc,defineProperties=$.setDescs,isFunction=$.isFunction,isObject=$.isObject,toObject=$.toObject,toLength=$.toLength,toIndex=$.toIndex,IE8_DOM_DEFINE=false,$indexOf=require("./$.array-includes")(false),$forEach=arrayMethod(0),$map=arrayMethod(1),$filter=arrayMethod(2),$some=arrayMethod(3),$every=arrayMethod(4);if(!$.DESC){try{IE8_DOM_DEFINE=defineProperty(cel("div"),"x",{get:function(){return 8}}).x==8}catch(e){}$.setDesc=function(O,P,Attributes){if(IE8_DOM_DEFINE)try{return defineProperty(O,P,Attributes)}catch(e){}if("get"in Attributes||"set"in Attributes)throw TypeError("Accessors not supported!");if("value"in Attributes)assertObject(O)[P]=Attributes.value;return O};$.getDesc=function(O,P){if(IE8_DOM_DEFINE)try{return getOwnDescriptor(O,P)}catch(e){}if(has(O,P))return $.desc(!ObjectProto.propertyIsEnumerable.call(O,P),O[P])};$.setDescs=defineProperties=function(O,Properties){assertObject(O);
+var keys=$.getKeys(Properties),length=keys.length,i=0,P;while(length>i)$.setDesc(O,P=keys[i++],Properties[P]);return O}}$def($def.S+$def.F*!$.DESC,"Object",{getOwnPropertyDescriptor:$.getDesc,defineProperty:$.setDesc,defineProperties:defineProperties});var keys1=("constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,"+"toLocaleString,toString,valueOf").split(","),keys2=keys1.concat("length","prototype"),keysLen1=keys1.length;var createDict=function(){var iframe=cel("iframe"),i=keysLen1,gt=">",iframeDocument;iframe.style.display="none";html.appendChild(iframe);iframe.src="javascript:";iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write("i)if(has(O,key=names[i++])){~$indexOf(result,key)||result.push(key)}return result}}function Empty(){}$def($def.S,"Object",{getPrototypeOf:$.getProto=$.getProto||function(O){O=Object(assert.def(O));if(has(O,IE_PROTO))return O[IE_PROTO];if(isFunction(O.constructor)&&O instanceof O.constructor){return O.constructor.prototype}return O instanceof Object?ObjectProto:null},getOwnPropertyNames:$.getNames=$.getNames||createGetKeys(keys2,keys2.length,true),create:$.create=$.create||function(O,Properties){var result;if(O!==null){Empty.prototype=assertObject(O);result=new Empty;Empty.prototype=null;result[IE_PROTO]=O}else result=createDict();return Properties===undefined?result:defineProperties(result,Properties)},keys:$.getKeys=$.getKeys||createGetKeys(keys1,keysLen1,false),seal:function seal(it){return it},freeze:function freeze(it){return it},preventExtensions:function preventExtensions(it){return it},isSealed:function isSealed(it){return!isObject(it)},isFrozen:function isFrozen(it){return!isObject(it)},isExtensible:function isExtensible(it){return isObject(it)}});$def($def.P,"Function",{bind:function(that){var fn=assert.fn(this),partArgs=_slice.call(arguments,1);function bound(){var args=partArgs.concat(_slice.call(arguments)),constr=this instanceof bound,ctx=constr?$.create(fn.prototype):that,result=invoke(fn,args,ctx);return constr?ctx:result}if(fn.prototype)bound.prototype=fn.prototype;return bound}});if(!(0 in Object("z")&&"z"[0]=="z")){$.ES5Object=function(it){return cof(it)=="String"?it.split(""):Object(it)}}var buggySlice=true;try{if(html)_slice.call(html);buggySlice=false}catch(e){}$def($def.P+$def.F*buggySlice,"Array",{slice:function slice(begin,end){var len=toLength(this.length),klass=cof(this);end=end===undefined?len:end;if(klass=="Array")return _slice.call(this,begin,end);var start=toIndex(begin,len),upTo=toIndex(end,len),size=toLength(upTo-start),cloned=Array(size),i=0;for(;i=0:length>index,"Reduce of empty array with no initial value")}for(;isRight?index>=0:length>index;index+=i)if(index in O){memo=callbackfn(memo,O[index],index,this)}return memo}}$def($def.P,"Array",{forEach:$.each=$.each||function forEach(callbackfn){return $forEach(this,callbackfn,arguments[1])},map:function map(callbackfn){return $map(this,callbackfn,arguments[1])},filter:function filter(callbackfn){return $filter(this,callbackfn,arguments[1])},some:function some(callbackfn){return $some(this,callbackfn,arguments[1])},every:function every(callbackfn){return $every(this,callbackfn,arguments[1])},reduce:createArrayReduce(false),reduceRight:createArrayReduce(true),indexOf:function indexOf(el){return $indexOf(this,el,arguments[1])},lastIndexOf:function(el,fromIndex){var O=toObject(this),length=toLength(O.length),index=length-1;if(arguments.length>1)index=Math.min(index,$.toInteger(fromIndex));if(index<0)index=toLength(length+index);for(;index>=0;index--)if(index in O)if(O[index]===el)return index;return-1}});$def($def.P,"String",{trim:require("./$.replacer")(/^\s*([\s\S]*\S)?\s*$/,"$1")});$def($def.S,"Date",{now:function(){return+new Date}});function lz(num){return num>9?num:"0"+num}var date=new Date(-5e13-1),brokenDate=!(date.toISOString&&date.toISOString()=="0385-07-25T07:06:39.999Z"&&require("./$.throws")(function(){new Date(NaN).toISOString()}));$def($def.P+$def.F*brokenDate,"Date",{toISOString:function(){if(!isFinite(this))throw RangeError("Invalid time value");var d=this,y=d.getUTCFullYear(),m=d.getUTCMilliseconds(),s=y<0?"-":y>9999?"+":"";return s+("00000"+Math.abs(y)).slice(s?-6:-4)+"-"+lz(d.getUTCMonth()+1)+"-"+lz(d.getUTCDate())+"T"+lz(d.getUTCHours())+":"+lz(d.getUTCMinutes())+":"+lz(d.getUTCSeconds())+"."+(m>99?m:"0"+lz(m))+"Z"}});if(classof(function(){return arguments}())=="Object")cof.classof=function(it){var tag=classof(it);return tag=="Object"&&isFunction(it.callee)?"Arguments":tag}},{"./$":270,"./$.array-includes":249,"./$.array-methods":250,"./$.assert":251,"./$.cof":253,"./$.def":259,"./$.dom-create":260,"./$.invoke":265,"./$.replacer":276,"./$.throws":285,"./$.uid":286}],290:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{copyWithin:function copyWithin(target,start){var O=Object($.assertDefined(this)),len=$.toLength(O.length),to=toIndex(target,len),from=toIndex(start,len),end=arguments[2],fin=end===undefined?len:toIndex(end,len),count=Math.min(fin-from,len-to),inc=1;if(from0){if(from in O)O[to]=O[from];else delete O[to];to+=inc;from+=inc}return O}});require("./$.unscope")("copyWithin")},{"./$":270,"./$.def":259,"./$.unscope":287}],291:[function(require,module,exports){"use strict";var $=require("./$"),$def=require("./$.def"),toIndex=$.toIndex;$def($def.P,"Array",{fill:function fill(value){var O=Object($.assertDefined(this)),length=$.toLength(O.length),index=toIndex(arguments[1],length),end=arguments[2],endPos=end===undefined?length:toIndex(end,length);while(endPos>index)O[index++]=value;return O}});require("./$.unscope")("fill")},{"./$":270,"./$.def":259,"./$.unscope":287}],292:[function(require,module,exports){"use strict";var KEY="findIndex",$def=require("./$.def"),forced=true,$find=require("./$.array-methods")(6);if(KEY in[])Array(1)[KEY](function(){forced=false});$def($def.P+$def.F*forced,"Array",{findIndex:function findIndex(callbackfn){return $find(this,callbackfn,arguments[1])}});require("./$.unscope")(KEY)},{"./$.array-methods":250,"./$.def":259,"./$.unscope":287}],293:[function(require,module,exports){"use strict";var KEY="find",$def=require("./$.def"),forced=true,$find=require("./$.array-methods")(5);if(KEY in[])Array(1)[KEY](function(){forced=false});$def($def.P+$def.F*forced,"Array",{find:function find(callbackfn){return $find(this,callbackfn,arguments[1])}});require("./$.unscope")(KEY)},{"./$.array-methods":250,"./$.def":259,"./$.unscope":287}],294:[function(require,module,exports){var $=require("./$"),ctx=require("./$.ctx"),$def=require("./$.def"),$iter=require("./$.iter"),call=require("./$.iter-call");$def($def.S+$def.F*!require("./$.iter-detect")(function(iter){Array.from(iter)}),"Array",{from:function from(arrayLike){var O=Object($.assertDefined(arrayLike)),mapfn=arguments[1],mapping=mapfn!==undefined,f=mapping?ctx(mapfn,arguments[2],2):undefined,index=0,length,result,step,iterator;if($iter.is(O)){iterator=$iter.get(O);result=new(typeof this=="function"?this:Array);for(;!(step=iterator.next()).done;index++){result[index]=mapping?call(iterator,f,[step.value,index],true):step.value}}else{result=new(typeof this=="function"?this:Array)(length=$.toLength(O.length));for(;length>index;index++){result[index]=mapping?f(O[index],index):O[index]}}result.length=index;return result}})},{"./$":270,"./$.ctx":258,"./$.def":259,"./$.iter":269,"./$.iter-call":266,"./$.iter-detect":268}],295:[function(require,module,exports){var $=require("./$"),setUnscope=require("./$.unscope"),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step,Iterators=$iter.Iterators;require("./$.iter-define")(Array,"Array",function(iterated,kind){$.set(this,ITER,{o:$.toObject(iterated),i:0,k:kind})},function(){var iter=this[ITER],O=iter.o,kind=iter.k,index=iter.i++;if(!O||index>=O.length){iter.o=undefined;return step(1)}if(kind=="keys")return step(0,index);if(kind=="values")return step(0,O[index]);return step(0,[index,O[index]])},"values");Iterators.Arguments=Iterators.Array;setUnscope("keys");setUnscope("values");setUnscope("entries")},{"./$":270,"./$.iter":269,"./$.iter-define":267,"./$.uid":286,"./$.unscope":287}],296:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Array",{of:function of(){var index=0,length=arguments.length,result=new(typeof this=="function"?this:Array)(length);while(length>index)result[index]=arguments[index++];result.length=length;return result}})},{"./$.def":259}],297:[function(require,module,exports){require("./$.species")(Array)},{"./$.species":280}],298:[function(require,module,exports){var $=require("./$"),HAS_INSTANCE=require("./$.wks")("hasInstance"),FunctionProto=Function.prototype;if(!(HAS_INSTANCE in FunctionProto))$.setDesc(FunctionProto,HAS_INSTANCE,{value:function(O){if(!$.isFunction(this)||!$.isObject(O))return false;if(!$.isObject(this.prototype))return O instanceof this;while(O=$.getProto(O))if(this.prototype===O)return true;return false}})},{"./$":270,"./$.wks":288}],299:[function(require,module,exports){"use strict";var $=require("./$"),NAME="name",setDesc=$.setDesc,FunctionProto=Function.prototype;NAME in FunctionProto||$.FW&&$.DESC&&setDesc(FunctionProto,NAME,{configurable:true,get:function(){var match=String(this).match(/^\s*function ([^ (]*)/),name=match?match[1]:"";$.has(this,NAME)||setDesc(this,NAME,$.desc(5,name));return name},set:function(value){$.has(this,NAME)||setDesc(this,NAME,$.desc(0,value))}})},{"./$":270}],300:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Map",function(get){return function Map(){return get(this,arguments[0])}},{get:function get(key){var entry=strong.getEntry(this,key);return entry&&entry.v},set:function set(key,value){return strong.def(this,key===0?0:key,value)}},strong,true)},{"./$.collection":257,"./$.collection-strong":254}],301:[function(require,module,exports){var Infinity=1/0,$def=require("./$.def"),E=Math.E,pow=Math.pow,abs=Math.abs,exp=Math.exp,log=Math.log,sqrt=Math.sqrt,ceil=Math.ceil,floor=Math.floor,EPSILON=pow(2,-52),EPSILON32=pow(2,-23),MAX32=pow(2,127)*(2-EPSILON32),MIN32=pow(2,-126);function roundTiesToEven(n){return n+1/EPSILON-1/EPSILON}function sign(x){return(x=+x)==0||x!=x?x:x<0?-1:1}function asinh(x){return!isFinite(x=+x)||x==0?x:x<0?-asinh(-x):log(x+sqrt(x*x+1))}function expm1(x){return(x=+x)==0?x:x>-1e-6&&x<1e-6?x+x*x/2:exp(x)-1}$def($def.S,"Math",{acosh:function acosh(x){return(x=+x)<1?NaN:isFinite(x)?log(x/E+sqrt(x+1)*sqrt(x-1)/E)+1:x},asinh:asinh,atanh:function atanh(x){return(x=+x)==0?x:log((1+x)/(1-x))/2},cbrt:function cbrt(x){return sign(x=+x)*pow(abs(x),1/3)},clz32:function clz32(x){return(x>>>=0)?31-floor(log(x+.5)*Math.LOG2E):32},cosh:function cosh(x){return(exp(x=+x)+exp(-x))/2},expm1:expm1,fround:function fround(x){var $abs=abs(x),$sign=sign(x),a,result;if($absMAX32||result!=result)return $sign*Infinity;return $sign*result},hypot:function hypot(value1,value2){var sum=0,i=0,len=arguments.length,larg=0,arg,div;while(i0){div=arg/larg;sum+=div*div}else sum+=arg}return larg===Infinity?Infinity:larg*sqrt(sum)},imul:function imul(x,y){var UInt16=65535,xn=+x,yn=+y,xl=UInt16&xn,yl=UInt16&yn;return 0|xl*yl+((UInt16&xn>>>16)*yl+xl*(UInt16&yn>>>16)<<16>>>0)},log1p:function log1p(x){return(x=+x)>-1e-8&&x<1e-8?x-x*x/2:log(1+x)},log10:function log10(x){return log(x)/Math.LN10},log2:function log2(x){return log(x)/Math.LN2},sign:sign,sinh:function sinh(x){return abs(x=+x)<1?(expm1(x)-expm1(-x))/2:(exp(x-1)-exp(-x-1))*(E/2)},tanh:function tanh(x){var a=expm1(x=+x),b=expm1(-x);return a==Infinity?1:b==Infinity?-1:(a-b)/(exp(x)+exp(-x))},trunc:function trunc(it){return(it>0?floor:ceil)(it)}})},{"./$.def":259}],302:[function(require,module,exports){"use strict";var $=require("./$"),isObject=$.isObject,isFunction=$.isFunction,NUMBER="Number",$Number=$.g[NUMBER],Base=$Number,proto=$Number.prototype;function toPrimitive(it){var fn,val;if(isFunction(fn=it.valueOf)&&!isObject(val=fn.call(it)))return val;if(isFunction(fn=it.toString)&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to number")}function toNumber(it){if(isObject(it))it=toPrimitive(it);if(typeof it=="string"&&it.length>2&&it.charCodeAt(0)==48){var binary=false;switch(it.charCodeAt(1)){case 66:case 98:binary=true;case 79:case 111:return parseInt(it.slice(2),binary?2:8)}}return+it}if($.FW&&!($Number("0o1")&&$Number("0b1"))){$Number=function Number(it){return this instanceof $Number?new Base(toNumber(it)):toNumber(it)};$.each.call($.DESC?$.getNames(Base):("MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,"+"EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,"+"MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger").split(","),function(key){if($.has(Base,key)&&!$.has($Number,key)){$.setDesc($Number,key,$.getDesc(Base,key))}});$Number.prototype=proto;proto.constructor=$Number;require("./$.redef")($.g,NUMBER,$Number)}},{"./$":270,"./$.redef":275}],303:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),abs=Math.abs,floor=Math.floor,_isFinite=$.g.isFinite,MAX_SAFE_INTEGER=9007199254740991;function isInteger(it){return!$.isObject(it)&&_isFinite(it)&&floor(it)===it}$def($def.S,"Number",{EPSILON:Math.pow(2,-52),isFinite:function isFinite(it){return typeof it=="number"&&_isFinite(it)},isInteger:isInteger,isNaN:function isNaN(number){return number!=number},isSafeInteger:function isSafeInteger(number){return isInteger(number)&&abs(number)<=MAX_SAFE_INTEGER},MAX_SAFE_INTEGER:MAX_SAFE_INTEGER,MIN_SAFE_INTEGER:-MAX_SAFE_INTEGER,parseFloat:parseFloat,parseInt:parseInt})},{"./$":270,"./$.def":259}],304:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{assign:require("./$.assign")})},{"./$.assign":252,"./$.def":259}],305:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{is:require("./$.same")})},{"./$.def":259,"./$.same":277}],306:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"Object",{setPrototypeOf:require("./$.set-proto").set})},{"./$.def":259,"./$.set-proto":278}],307:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),isObject=$.isObject,toObject=$.toObject;$.each.call(("freeze,seal,preventExtensions,isFrozen,isSealed,isExtensible,"+"getOwnPropertyDescriptor,getPrototypeOf,keys,getOwnPropertyNames").split(","),function(KEY,ID){var fn=($.core.Object||{})[KEY]||Object[KEY],forced=0,method={};method[KEY]=ID==0?function freeze(it){return isObject(it)?fn(it):it}:ID==1?function seal(it){return isObject(it)?fn(it):it}:ID==2?function preventExtensions(it){return isObject(it)?fn(it):it}:ID==3?function isFrozen(it){return isObject(it)?fn(it):true}:ID==4?function isSealed(it){return isObject(it)?fn(it):true}:ID==5?function isExtensible(it){return isObject(it)?fn(it):false}:ID==6?function getOwnPropertyDescriptor(it,key){return fn(toObject(it),key)}:ID==7?function getPrototypeOf(it){return fn(Object($.assertDefined(it)))}:ID==8?function keys(it){return fn(toObject(it))}:require("./$.get-names").get;try{fn("z")}catch(e){forced=1}$def($def.S+$def.F*forced,"Object",method)})},{"./$":270,"./$.def":259,"./$.get-names":264}],308:[function(require,module,exports){"use strict";var cof=require("./$.cof"),tmp={};tmp[require("./$.wks")("toStringTag")]="z";if(require("./$").FW&&cof(tmp)!="z"){require("./$.redef")(Object.prototype,"toString",function toString(){return"[object "+cof.classof(this)+"]"},true)}},{"./$":270,"./$.cof":253,"./$.redef":275,"./$.wks":288}],309:[function(require,module,exports){"use strict";var $=require("./$"),ctx=require("./$.ctx"),cof=require("./$.cof"),$def=require("./$.def"),assert=require("./$.assert"),forOf=require("./$.for-of"),setProto=require("./$.set-proto").set,same=require("./$.same"),species=require("./$.species"),SPECIES=require("./$.wks")("species"),RECORD=require("./$.uid").safe("record"),PROMISE="Promise",global=$.g,process=global.process,isNode=cof(process)=="process",asap=process&&process.nextTick||require("./$.task").set,P=global[PROMISE],isFunction=$.isFunction,isObject=$.isObject,assertFunction=assert.fn,assertObject=assert.obj,Wrapper;function testResolve(sub){var test=new P(function(){});if(sub)test.constructor=Object;return P.resolve(test)===test}var useNative=function(){var works=false;function P2(x){var self=new P(x);setProto(self,P2.prototype);return self}try{works=isFunction(P)&&isFunction(P.resolve)&&testResolve();setProto(P2,P);P2.prototype=$.create(P.prototype,{constructor:{value:P2}});if(!(P2.resolve(5).then(function(){})instanceof P2)){works=false}if(works&&$.DESC){var thenableThenGotten=false;P.resolve($.setDesc({},"then",{get:function(){thenableThenGotten=true}}));works=thenableThenGotten}}catch(e){works=false}return works}();function isPromise(it){return isObject(it)&&(useNative?cof.classof(it)=="Promise":RECORD in it)}function sameConstructor(a,b){if(!$.FW&&a===P&&b===Wrapper)return true;return same(a,b)}function getConstructor(C){var S=assertObject(C)[SPECIES];return S!=undefined?S:C}function isThenable(it){var then;if(isObject(it))then=it.then;return isFunction(then)?then:false}function notify(record){var chain=record.c;if(chain.length)asap.call(global,function(){var value=record.v,ok=record.s==1,i=0;function run(react){var cb=ok?react.ok:react.fail,ret,then;try{if(cb){if(!ok)record.h=true;ret=cb===true?value:cb(value);if(ret===react.P){react.rej(TypeError("Promise-chain cycle"))}else if(then=isThenable(ret)){then.call(ret,react.res,react.rej)}else react.res(ret)}else react.rej(value)}catch(err){react.rej(err)}}while(chain.length>i)run(chain[i++]);chain.length=0})}function isUnhandled(promise){var record=promise[RECORD],chain=record.a||record.c,i=0,react;if(record.h)return false;while(chain.length>i){react=chain[i++];if(react.fail||!isUnhandled(react.P))return false}return true}function $reject(value){var record=this,promise;if(record.d)return;record.d=true;record=record.r||record;record.v=value;record.s=2;record.a=record.c.slice();setTimeout(function(){asap.call(global,function(){if(isUnhandled(promise=record.p)){if(isNode){process.emit("unhandledRejection",value,promise)}else if(global.console&&console.error){console.error("Unhandled promise rejection",value)}}record.a=undefined})},1);notify(record)}function $resolve(value){var record=this,then;if(record.d)return;record.d=true;record=record.r||record;try{if(then=isThenable(value)){asap.call(global,function(){var wrapper={r:record,d:false};try{then.call(value,ctx($resolve,wrapper,1),ctx($reject,wrapper,1))}catch(e){$reject.call(wrapper,e)}})}else{record.v=value;record.s=1;notify(record)}}catch(e){$reject.call({r:record,d:false},e)}}if(!useNative){P=function Promise(executor){assertFunction(executor);var record={p:assert.inst(this,P,PROMISE),c:[],a:undefined,s:0,d:false,v:undefined,h:false};$.hide(this,RECORD,record);try{executor(ctx($resolve,record,1),ctx($reject,record,1))}catch(err){$reject.call(record,err)}};require("./$.mix")(P.prototype,{then:function then(onFulfilled,onRejected){var S=assertObject(assertObject(this).constructor)[SPECIES];var react={ok:isFunction(onFulfilled)?onFulfilled:true,fail:isFunction(onRejected)?onRejected:false};var promise=react.P=new(S!=undefined?S:P)(function(res,rej){react.res=assertFunction(res);react.rej=assertFunction(rej)});var record=this[RECORD];record.c.push(react);if(record.a)record.a.push(react);if(record.s)notify(record);return promise},"catch":function(onRejected){return this.then(undefined,onRejected)}})}$def($def.G+$def.W+$def.F*!useNative,{Promise:P});cof.set(P,PROMISE);species(P);species(Wrapper=$.core[PROMISE]);$def($def.S+$def.F*!useNative,PROMISE,{reject:function reject(r){return new(getConstructor(this))(function(res,rej){rej(r)})}});$def($def.S+$def.F*(!useNative||testResolve(true)),PROMISE,{resolve:function resolve(x){return isPromise(x)&&sameConstructor(x.constructor,this)?x:new this(function(res){res(x)})}});$def($def.S+$def.F*!(useNative&&require("./$.iter-detect")(function(iter){P.all(iter)["catch"](function(){})})),PROMISE,{all:function all(iterable){var C=getConstructor(this),values=[];return new C(function(res,rej){forOf(iterable,false,values.push,values);var remaining=values.length,results=Array(remaining);if(remaining)$.each.call(values,function(promise,index){C.resolve(promise).then(function(value){results[index]=value;--remaining||res(results)},rej)});else res(results)})},race:function race(iterable){var C=getConstructor(this);return new C(function(res,rej){forOf(iterable,false,function(promise){C.resolve(promise).then(res,rej)})})}})},{"./$":270,"./$.assert":251,"./$.cof":253,"./$.ctx":258,"./$.def":259,"./$.for-of":262,"./$.iter-detect":268,"./$.mix":272,"./$.same":277,"./$.set-proto":278,"./$.species":280,"./$.task":284,"./$.uid":286,"./$.wks":288}],310:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),setProto=require("./$.set-proto"),$iter=require("./$.iter"),ITERATOR=require("./$.wks")("iterator"),ITER=require("./$.uid").safe("iter"),step=$iter.step,assert=require("./$.assert"),isObject=$.isObject,getProto=$.getProto,$Reflect=$.g.Reflect,_apply=Function.apply,assertObject=assert.obj,_isExtensible=Object.isExtensible||isObject,_preventExtensions=Object.preventExtensions,buggyEnumerate=!($Reflect&&$Reflect.enumerate&&ITERATOR in $Reflect.enumerate({}));function Enumerate(iterated){$.set(this,ITER,{o:iterated,k:undefined,i:0})}$iter.create(Enumerate,"Object",function(){var iter=this[ITER],keys=iter.k,key;if(keys==undefined){iter.k=keys=[];for(key in iter.o)keys.push(key)}do{if(iter.i>=keys.length)return step(1)}while(!((key=keys[iter.i++])in iter.o));return step(0,key)});var reflect={apply:function apply(target,thisArgument,argumentsList){return _apply.call(target,thisArgument,argumentsList)},construct:function construct(target,argumentsList){var proto=assert.fn(arguments.length<3?target:arguments[2]).prototype,instance=$.create(isObject(proto)?proto:Object.prototype),result=_apply.call(target,instance,argumentsList);return isObject(result)?result:instance},defineProperty:function defineProperty(target,propertyKey,attributes){assertObject(target);try{$.setDesc(target,propertyKey,attributes);return true}catch(e){return false}},deleteProperty:function deleteProperty(target,propertyKey){var desc=$.getDesc(assertObject(target),propertyKey);return desc&&!desc.configurable?false:delete target[propertyKey]},get:function get(target,propertyKey){var receiver=arguments.length<3?target:arguments[2],desc=$.getDesc(assertObject(target),propertyKey),proto;if(desc)return $.has(desc,"value")?desc.value:desc.get===undefined?undefined:desc.get.call(receiver);return isObject(proto=getProto(target))?get(proto,propertyKey,receiver):undefined},getOwnPropertyDescriptor:function getOwnPropertyDescriptor(target,propertyKey){return $.getDesc(assertObject(target),propertyKey)},getPrototypeOf:function getPrototypeOf(target){return getProto(assertObject(target))},has:function has(target,propertyKey){return propertyKey in target},isExtensible:function isExtensible(target){return _isExtensible(assertObject(target))},ownKeys:require("./$.own-keys"),preventExtensions:function preventExtensions(target){assertObject(target);try{if(_preventExtensions)_preventExtensions(target);return true}catch(e){return false}},set:function set(target,propertyKey,V){var receiver=arguments.length<4?target:arguments[3],ownDesc=$.getDesc(assertObject(target),propertyKey),existingDescriptor,proto;if(!ownDesc){if(isObject(proto=getProto(target))){return set(proto,propertyKey,V,receiver)}ownDesc=$.desc(0)}if($.has(ownDesc,"value")){if(ownDesc.writable===false||!isObject(receiver))return false;existingDescriptor=$.getDesc(receiver,propertyKey)||$.desc(0);existingDescriptor.value=V;$.setDesc(receiver,propertyKey,existingDescriptor);return true}return ownDesc.set===undefined?false:(ownDesc.set.call(receiver,V),true)}};if(setProto)reflect.setPrototypeOf=function setPrototypeOf(target,proto){setProto.check(target,proto);try{setProto.set(target,proto);return true}catch(e){return false}};$def($def.G,{Reflect:{}});$def($def.S+$def.F*buggyEnumerate,"Reflect",{enumerate:function enumerate(target){return new Enumerate(assertObject(target))}});$def($def.S,"Reflect",reflect)},{"./$":270,"./$.assert":251,"./$.def":259,"./$.iter":269,"./$.own-keys":273,"./$.set-proto":278,"./$.uid":286,"./$.wks":288}],311:[function(require,module,exports){var $=require("./$"),cof=require("./$.cof"),$RegExp=$.g.RegExp,Base=$RegExp,proto=$RegExp.prototype,re=/a/g,CORRECT_NEW=new $RegExp(re)!==re,ALLOWS_RE_WITH_FLAGS=function(){try{return $RegExp(re,"i")=="/a/i"}catch(e){}}();if($.FW&&$.DESC){if(!CORRECT_NEW||!ALLOWS_RE_WITH_FLAGS){$RegExp=function RegExp(pattern,flags){var patternIsRegExp=cof(pattern)=="RegExp",flagsIsUndefined=flags===undefined;if(!(this instanceof $RegExp)&&patternIsRegExp&&flagsIsUndefined)return pattern;return CORRECT_NEW?new Base(patternIsRegExp&&!flagsIsUndefined?pattern.source:pattern,flags):new Base(patternIsRegExp?pattern.source:pattern,patternIsRegExp&&flagsIsUndefined?pattern.flags:flags)};$.each.call($.getNames(Base),function(key){key in $RegExp||$.setDesc($RegExp,key,{configurable:true,get:function(){return Base[key]},set:function(it){Base[key]=it}})});proto.constructor=$RegExp;$RegExp.prototype=proto;require("./$.redef")($.g,"RegExp",$RegExp)}if(/./g.flags!="g")$.setDesc(proto,"flags",{configurable:true,get:require("./$.replacer")(/^.*\/(\w*)$/,"$1")})}require("./$.species")($RegExp)},{"./$":270,"./$.cof":253,"./$.redef":275,"./$.replacer":276,"./$.species":280}],312:[function(require,module,exports){"use strict";var strong=require("./$.collection-strong");require("./$.collection")("Set",function(get){return function Set(){return get(this,arguments[0])}},{add:function add(value){return strong.def(this,value=value===0?0:value,value)}},strong)},{"./$.collection":257,"./$.collection-strong":254}],313:[function(require,module,exports){"use strict";var $def=require("./$.def"),$at=require("./$.string-at")(false);$def($def.P,"String",{codePointAt:function codePointAt(pos){return $at(this,pos)}})},{"./$.def":259,"./$.string-at":281}],314:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def"),toLength=$.toLength;$def($def.P+$def.F*!require("./$.throws")(function(){"q".endsWith(/./)}),"String",{endsWith:function endsWith(searchString){if(cof(searchString)=="RegExp")throw TypeError();var that=String($.assertDefined(this)),endPosition=arguments[1],len=toLength(that.length),end=endPosition===undefined?len:Math.min(toLength(endPosition),len);searchString+="";return that.slice(end-searchString.length,end)===searchString}})},{"./$":270,"./$.cof":253,"./$.def":259,"./$.throws":285}],315:[function(require,module,exports){var $def=require("./$.def"),toIndex=require("./$").toIndex,fromCharCode=String.fromCharCode,$fromCodePoint=String.fromCodePoint;$def($def.S+$def.F*(!!$fromCodePoint&&$fromCodePoint.length!=1),"String",{fromCodePoint:function fromCodePoint(x){var res=[],len=arguments.length,i=0,code;while(len>i){code=+arguments[i++];if(toIndex(code,1114111)!==code)throw RangeError(code+" is not a valid code point");res.push(code<65536?fromCharCode(code):fromCharCode(((code-=65536)>>10)+55296,code%1024+56320))}return res.join("")}})},{"./$":270,"./$.def":259}],316:[function(require,module,exports){"use strict";var $=require("./$"),cof=require("./$.cof"),$def=require("./$.def");$def($def.P,"String",{includes:function includes(searchString){if(cof(searchString)=="RegExp")throw TypeError();return!!~String($.assertDefined(this)).indexOf(searchString,arguments[1])}})},{"./$":270,"./$.cof":253,"./$.def":259}],317:[function(require,module,exports){var set=require("./$").set,$at=require("./$.string-at")(true),ITER=require("./$.uid").safe("iter"),$iter=require("./$.iter"),step=$iter.step;require("./$.iter-define")(String,"String",function(iterated){set(this,ITER,{o:String(iterated),i:0})},function(){var iter=this[ITER],O=iter.o,index=iter.i,point;if(index>=O.length)return step(1);point=$at(O,index);iter.i+=point.length;return step(0,point)})},{"./$":270,"./$.iter":269,"./$.iter-define":267,"./$.string-at":281,"./$.uid":286}],318:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");$def($def.S,"String",{raw:function raw(callSite){var tpl=$.toObject(callSite.raw),len=$.toLength(tpl.length),sln=arguments.length,res=[],i=0;while(len>i){res.push(String(tpl[i++]));if(ii)defineProperty(it,key=keys[i++],P[key]);return it}function create(it,P){return P===undefined?$create(it):defineProperties($create(it),P)}function propertyIsEnumerable(key){var E=_propertyIsEnumerable.call(this,key);return E||!has(this,key)||!has(AllSymbols,key)||has(this,HIDDEN)&&this[HIDDEN][key]?E:true}function getOwnPropertyDescriptor(it,key){var D=getDesc(it=toObject(it),key);if(D&&has(AllSymbols,key)&&!(has(it,HIDDEN)&&it[HIDDEN][key]))D.enumerable=true;return D}function getOwnPropertyNames(it){var names=getNames(toObject(it)),result=[],i=0,key;while(names.length>i)if(!has(AllSymbols,key=names[i++])&&key!=HIDDEN)result.push(key);return result}function getOwnPropertySymbols(it){var names=getNames(toObject(it)),result=[],i=0,key;while(names.length>i)if(has(AllSymbols,key=names[i++]))result.push(AllSymbols[key]);return result}if(!useNative){$Symbol=function Symbol(){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor");return wrap(uid(arguments[0]))};$redef($Symbol.prototype,"toString",function(){return this[TAG]});$.create=create;$.setDesc=defineProperty;$.getDesc=getOwnPropertyDescriptor;$.setDescs=defineProperties;$.getNames=$names.get=getOwnPropertyNames;$.getSymbols=getOwnPropertySymbols;if($.DESC&&$.FW)$redef(ObjectProto,"propertyIsEnumerable",propertyIsEnumerable,true)}var symbolStatics={"for":function(key){return has(SymbolRegistry,key+="")?SymbolRegistry[key]:SymbolRegistry[key]=$Symbol(key)},keyFor:function keyFor(key){return keyOf(SymbolRegistry,key)},useSetter:function(){setter=true},useSimple:function(){setter=false}};$.each.call(("hasInstance,isConcatSpreadable,iterator,match,replace,search,"+"species,split,toPrimitive,toStringTag,unscopables").split(","),function(it){var sym=require("./$.wks")(it);symbolStatics[it]=useNative?sym:wrap(sym)});setter=true;$def($def.G+$def.W,{Symbol:$Symbol});$def($def.S,"Symbol",symbolStatics);$def($def.S+$def.F*!useNative,"Object",{create:create,defineProperty:defineProperty,defineProperties:defineProperties,getOwnPropertyDescriptor:getOwnPropertyDescriptor,getOwnPropertyNames:getOwnPropertyNames,getOwnPropertySymbols:getOwnPropertySymbols});setTag($Symbol,"Symbol");setTag(Math,"Math",true);setTag($.g.JSON,"JSON",true)},{"./$":270,"./$.assert":251,"./$.cof":253,"./$.def":259,"./$.enum-keys":261,"./$.get-names":264,"./$.keyof":271,"./$.redef":275,"./$.shared":279,"./$.uid":286,"./$.wks":288}],322:[function(require,module,exports){"use strict";var $=require("./$"),weak=require("./$.collection-weak"),leakStore=weak.leakStore,ID=weak.ID,WEAK=weak.WEAK,has=$.has,isObject=$.isObject,isExtensible=Object.isExtensible||isObject,tmp={};var $WeakMap=require("./$.collection")("WeakMap",function(get){return function WeakMap(){return get(this,arguments[0])}},{get:function get(key){if(isObject(key)){if(!isExtensible(key))return leakStore(this).get(key);if(has(key,WEAK))return key[WEAK][this[ID]]}},set:function set(key,value){return weak.def(this,key,value)}},weak,true,true);if((new $WeakMap).set((Object.freeze||Object)(tmp),7).get(tmp)!=7){$.each.call(["delete","has","get","set"],function(key){var proto=$WeakMap.prototype,method=proto[key];require("./$.redef")(proto,key,function(a,b){if(isObject(a)&&!isExtensible(a)){var result=leakStore(this)[key](a,b);return key=="set"?this:result}return method.call(this,a,b)})})}},{"./$":270,"./$.collection":257,"./$.collection-weak":256,"./$.redef":275}],323:[function(require,module,exports){"use strict";var weak=require("./$.collection-weak");require("./$.collection")("WeakSet",function(get){return function WeakSet(){return get(this,arguments[0])}},{add:function add(value){return weak.def(this,value,true)}},weak,false,true)},{"./$.collection":257,"./$.collection-weak":256}],324:[function(require,module,exports){"use strict";var $def=require("./$.def"),$includes=require("./$.array-includes")(true);$def($def.P,"Array",{includes:function includes(el){return $includes(this,el,arguments[1])}});require("./$.unscope")("includes")},{"./$.array-includes":249,"./$.def":259,"./$.unscope":287}],325:[function(require,module,exports){require("./$.collection-to-json")("Map")},{"./$.collection-to-json":255}],326:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),ownKeys=require("./$.own-keys");$def($def.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(object){var O=$.toObject(object),result={};$.each.call(ownKeys(O),function(key){$.setDesc(result,key,$.desc(0,$.getDesc(O,key)))});return result}})},{"./$":270,"./$.def":259,"./$.own-keys":273}],327:[function(require,module,exports){var $=require("./$"),$def=require("./$.def");function createObjectToArray(isEntries){return function(object){var O=$.toObject(object),keys=$.getKeys(O),length=keys.length,i=0,result=Array(length),key;if(isEntries)while(length>i)result[i]=[key=keys[i++],O[key]];else while(length>i)result[i]=O[keys[i++]];return result}}$def($def.S,"Object",{values:createObjectToArray(false),entries:createObjectToArray(true)})},{"./$":270,"./$.def":259}],328:[function(require,module,exports){var $def=require("./$.def");$def($def.S,"RegExp",{escape:require("./$.replacer")(/[\\^$*+?.()|[\]{}]/g,"\\$&",true)})},{"./$.def":259,"./$.replacer":276}],329:[function(require,module,exports){require("./$.collection-to-json")("Set")},{"./$.collection-to-json":255}],330:[function(require,module,exports){"use strict";var $def=require("./$.def"),$at=require("./$.string-at")(true);$def($def.P,"String",{at:function at(pos){return $at(this,pos)}})},{"./$.def":259,"./$.string-at":281}],331:[function(require,module,exports){"use strict";var $def=require("./$.def"),$pad=require("./$.string-pad");$def($def.P,"String",{lpad:function lpad(n){return $pad(this,n,arguments[1],true)}})},{"./$.def":259,"./$.string-pad":282}],332:[function(require,module,exports){"use strict";var $def=require("./$.def"),$pad=require("./$.string-pad");$def($def.P,"String",{rpad:function rpad(n){return $pad(this,n,arguments[1],false)}})},{"./$.def":259,"./$.string-pad":282}],333:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),$Array=$.core.Array||Array,statics={};function setStatics(keys,length){$.each.call(keys.split(","),function(key){if(length==undefined&&key in $Array)statics[key]=$Array[key];else if(key in[])statics[key]=require("./$.ctx")(Function.call,[][key],length)})}setStatics("pop,reverse,shift,keys,values,entries",1);setStatics("indexOf,every,some,forEach,map,filter,find,findIndex,includes",3);setStatics("join,slice,concat,push,splice,unshift,sort,lastIndexOf,"+"reduce,reduceRight,copyWithin,fill,turn");$def($def.S,"Array",statics)},{"./$":270,"./$.ctx":258,"./$.def":259}],334:[function(require,module,exports){require("./es6.array.iterator");var $=require("./$"),Iterators=require("./$.iter").Iterators,ITERATOR=require("./$.wks")("iterator"),ArrayValues=Iterators.Array,NL=$.g.NodeList,HTC=$.g.HTMLCollection,NLProto=NL&&NL.prototype,HTCProto=HTC&&HTC.prototype;if($.FW){if(NL&&!(ITERATOR in NLProto))$.hide(NLProto,ITERATOR,ArrayValues);if(HTC&&!(ITERATOR in HTCProto))$.hide(HTCProto,ITERATOR,ArrayValues)}Iterators.NodeList=Iterators.HTMLCollection=ArrayValues},{"./$":270,"./$.iter":269,"./$.wks":288,"./es6.array.iterator":295}],335:[function(require,module,exports){var $def=require("./$.def"),$task=require("./$.task");$def($def.G+$def.B,{setImmediate:$task.set,clearImmediate:$task.clear})},{"./$.def":259,"./$.task":284}],336:[function(require,module,exports){var $=require("./$"),$def=require("./$.def"),invoke=require("./$.invoke"),partial=require("./$.partial"),navigator=$.g.navigator,MSIE=!!navigator&&/MSIE .\./.test(navigator.userAgent);function wrap(set){return MSIE?function(fn,time){return set(invoke(partial,[].slice.call(arguments,2),$.isFunction(fn)?fn:Function(fn)),time)}:set}$def($def.G+$def.B+$def.F*MSIE,{setTimeout:wrap($.g.setTimeout),setInterval:wrap($.g.setInterval)})},{"./$":270,"./$.def":259,"./$.invoke":265,"./$.partial":274}],337:[function(require,module,exports){require("./modules/es5");require("./modules/es6.symbol");require("./modules/es6.object.assign");require("./modules/es6.object.is");require("./modules/es6.object.set-prototype-of");require("./modules/es6.object.to-string");require("./modules/es6.object.statics-accept-primitives");require("./modules/es6.function.name");require("./modules/es6.function.has-instance");require("./modules/es6.number.constructor");require("./modules/es6.number.statics");require("./modules/es6.math");require("./modules/es6.string.from-code-point");require("./modules/es6.string.raw");require("./modules/es6.string.iterator");require("./modules/es6.string.code-point-at");require("./modules/es6.string.ends-with");require("./modules/es6.string.includes");require("./modules/es6.string.repeat");require("./modules/es6.string.starts-with");require("./modules/es6.array.from");require("./modules/es6.array.of");require("./modules/es6.array.iterator");require("./modules/es6.array.species");require("./modules/es6.array.copy-within");require("./modules/es6.array.fill");require("./modules/es6.array.find");require("./modules/es6.array.find-index");require("./modules/es6.regexp");require("./modules/es6.promise");require("./modules/es6.map");require("./modules/es6.set");require("./modules/es6.weak-map");require("./modules/es6.weak-set");require("./modules/es6.reflect");require("./modules/es7.array.includes");require("./modules/es7.string.at");require("./modules/es7.string.lpad");require("./modules/es7.string.rpad");require("./modules/es7.regexp.escape");require("./modules/es7.object.get-own-property-descriptors");require("./modules/es7.object.to-array");require("./modules/es7.map.to-json");require("./modules/es7.set.to-json");require("./modules/js.array.statics");require("./modules/web.timers");require("./modules/web.immediate");require("./modules/web.dom.iterable");module.exports=require("./modules/$").core},{"./modules/$":270,"./modules/es5":289,"./modules/es6.array.copy-within":290,"./modules/es6.array.fill":291,"./modules/es6.array.find":293,"./modules/es6.array.find-index":292,"./modules/es6.array.from":294,"./modules/es6.array.iterator":295,"./modules/es6.array.of":296,"./modules/es6.array.species":297,"./modules/es6.function.has-instance":298,"./modules/es6.function.name":299,"./modules/es6.map":300,"./modules/es6.math":301,"./modules/es6.number.constructor":302,"./modules/es6.number.statics":303,"./modules/es6.object.assign":304,"./modules/es6.object.is":305,"./modules/es6.object.set-prototype-of":306,"./modules/es6.object.statics-accept-primitives":307,"./modules/es6.object.to-string":308,"./modules/es6.promise":309,"./modules/es6.reflect":310,"./modules/es6.regexp":311,"./modules/es6.set":312,"./modules/es6.string.code-point-at":313,"./modules/es6.string.ends-with":314,"./modules/es6.string.from-code-point":315,"./modules/es6.string.includes":316,"./modules/es6.string.iterator":317,"./modules/es6.string.raw":318,"./modules/es6.string.repeat":319,"./modules/es6.string.starts-with":320,"./modules/es6.symbol":321,"./modules/es6.weak-map":322,"./modules/es6.weak-set":323,"./modules/es7.array.includes":324,"./modules/es7.map.to-json":325,"./modules/es7.object.get-own-property-descriptors":326,"./modules/es7.object.to-array":327,"./modules/es7.regexp.escape":328,"./modules/es7.set.to-json":329,"./modules/es7.string.at":330,"./modules/es7.string.lpad":331,"./modules/es7.string.rpad":332,"./modules/js.array.statics":333,"./modules/web.dom.iterable":334,"./modules/web.immediate":335,"./modules/web.timers":336}],338:[function(require,module,exports){exports=module.exports=debug;exports.coerce=coerce;exports.disable=disable;exports.enable=enable;exports.enabled=enabled;exports.humanize=require("ms");exports.names=[];exports.skips=[];exports.formatters={};var prevColor=0;var prevTime;function selectColor(){return exports.colors[prevColor++%exports.colors.length]}function debug(namespace){function disabled(){}disabled.enabled=false;function enabled(){var self=enabled;var curr=+new Date;var ms=curr-(prevTime||curr);self.diff=ms;self.prev=prevTime;self.curr=curr;prevTime=curr;if(null==self.useColors)self.useColors=exports.useColors();if(null==self.color&&self.useColors)self.color=selectColor();var args=Array.prototype.slice.call(arguments);args[0]=exports.coerce(args[0]);if("string"!==typeof args[0]){args=["%o"].concat(args)}var index=0;args[0]=args[0].replace(/%([a-z%])/g,function(match,format){if(match==="%%")return match;index++;var formatter=exports.formatters[format];if("function"===typeof formatter){var val=args[index];match=formatter.call(self,val);args.splice(index,1);index--}return match});if("function"===typeof exports.formatArgs){args=exports.formatArgs.apply(self,args)}var logFn=enabled.log||exports.log||console.log.bind(console);logFn.apply(self,args)}enabled.enabled=true;var fn=exports.enabled(namespace)?enabled:disabled;fn.namespace=namespace;return fn}function enable(namespaces){exports.save(namespaces);var split=(namespaces||"").split(/[\s,]+/);var len=split.length;for(var i=0;i1e4)return;var match=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(str);if(!match)return;var n=parseFloat(match[1]);var type=(match[2]||"ms").toLowerCase();switch(type){case"years":case"year":case"yrs":case"yr":case"y":return n*y;case"days":case"day":case"d":return n*d;case"hours":case"hour":case"hrs":case"hr":case"h":return n*h;case"minutes":case"minute":case"mins":case"min":case"m":return n*m;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n}}function short(ms){if(ms>=d)return Math.round(ms/d)+"d";if(ms>=h)return Math.round(ms/h)+"h";if(ms>=m)return Math.round(ms/m)+"m";if(ms>=s)return Math.round(ms/s)+"s";return ms+"ms"}function long(ms){return plural(ms,d,"day")||plural(ms,h,"hour")||plural(ms,m,"minute")||plural(ms,s,"second")||ms+" ms"}function plural(ms,n,name){if(msmaxUsed||u===maxUsed&&w>maxWeight){maxUsed=u;maxWeight=w;result=+n}}return result}module.exports=function(str){if(typeof str!=="string"){throw new TypeError("Expected a string")}var tabs=0;var spaces=0;var prev=0;var indents={};var current;var isIndent;str.split(/\n/g).forEach(function(line){if(!line){return}var indent;var matches=line.match(INDENT_RE);if(!matches){indent=0}else{indent=matches[0].length;if(matches[1]){spaces++}else{tabs++}}var diff=indent-prev;prev=indent;if(diff){isIndent=diff>0;current=indents[isIndent?diff:-diff];if(current){current[0]++}else{current=indents[diff]=[1,0]}}else if(current){current[1]+=+isIndent}});var amount=getMostUsed(indents);var type;var actual;if(!amount){type=null;actual=""}else if(spaces>=tabs){type="space";actual=repeating(" ",amount)}else{type="tab";actual=repeating(" ",amount)}return{amount:amount,type:type,indent:actual}}},{repeating:525}],342:[function(require,module,exports){(function clone(exports){"use strict";var Syntax,isArray,VisitorOption,VisitorKeys,objectCreate,objectKeys,BREAK,SKIP,REMOVE;function ignoreJSHintError(){}isArray=Array.isArray;if(!isArray){isArray=function isArray(array){return Object.prototype.toString.call(array)==="[object Array]"}}function deepCopy(obj){var ret={},key,val;for(key in obj){if(obj.hasOwnProperty(key)){val=obj[key];if(typeof val==="object"&&val!==null){ret[key]=deepCopy(val)}else{ret[key]=val}}}return ret}function shallowCopy(obj){var ret={},key;for(key in obj){if(obj.hasOwnProperty(key)){ret[key]=obj[key]}}return ret}ignoreJSHintError(shallowCopy);function upperBound(array,func){var diff,len,i,current;len=array.length;i=0;while(len){diff=len>>>1;current=i+diff;if(func(array[current])){len=diff}else{i=current+1;len-=diff+1}}return i}function lowerBound(array,func){var diff,len,i,current;len=array.length;i=0;while(len){diff=len>>>1;current=i+diff;if(func(array[current])){i=current+1;len-=diff+1}else{len=diff}}return i}ignoreJSHintError(lowerBound);objectCreate=Object.create||function(){function F(){}return function(o){F.prototype=o;return new F}}();objectKeys=Object.keys||function(o){var keys=[],key;for(key in o){keys.push(key)}return keys};function extend(to,from){var keys=objectKeys(from),key,i,len;for(i=0,len=keys.length;i=0){key=candidates[current];candidate=node[key];if(!candidate){continue}if(isArray(candidate)){current2=candidate.length;while((current2-=1)>=0){if(!candidate[current2]){continue}if(isProperty(nodeType,candidates[current])){element=new Element(candidate[current2],[key,current2],"Property",null)}else if(isNode(candidate[current2])){element=new Element(candidate[current2],[key,current2],null,null)}else{continue}worklist.push(element)}}else if(isNode(candidate)){worklist.push(new Element(candidate,key,null,null))}}}}};Controller.prototype.replace=function replace(root,visitor){function removeElem(element){var i,key,nextElem,parent;if(element.ref.remove()){key=element.ref.key;parent=element.ref.parent;i=worklist.length;while(i--){nextElem=worklist[i];if(nextElem.ref&&nextElem.ref.parent===parent){if(nextElem.ref.key=0){key=candidates[current];candidate=node[key];if(!candidate){continue}if(isArray(candidate)){current2=candidate.length;while((current2-=1)>=0){if(!candidate[current2]){continue}if(isProperty(nodeType,candidates[current])){element=new Element(candidate[current2],[key,current2],"Property",new Reference(candidate,current2))}else if(isNode(candidate[current2])){element=new Element(candidate[current2],[key,current2],null,new Reference(candidate,current2))}else{continue}worklist.push(element)}}else if(isNode(candidate)){worklist.push(new Element(candidate,key,null,new Reference(node,key)))}}}return outer.root};function traverse(root,visitor){var controller=new Controller;return controller.traverse(root,visitor)}function replace(root,visitor){var controller=new Controller;return controller.replace(root,visitor)}function extendCommentRange(comment,tokens){var target;target=upperBound(tokens,function search(token){return token.range[0]>comment.range[0]});comment.extendedRange=[comment.range[0],comment.range[1]];if(target!==tokens.length){comment.extendedRange[1]=tokens[target].range[0]}target-=1;if(target>=0){comment.extendedRange[0]=tokens[target].range[1]}return comment}function attachComments(tree,providedComments,tokens){var comments=[],comment,len,i,cursor;if(!tree.range){throw new Error("attachComments needs range information")}if(!tokens.length){if(providedComments.length){for(i=0,len=providedComments.length;inode.range[0]){break}if(comment.extendedRange[1]===node.range[0]){if(!node.leadingComments){node.leadingComments=[]}node.leadingComments.push(comment);comments.splice(cursor,1)}else{cursor+=1}}if(cursor===comments.length){return VisitorOption.Break}if(comments[cursor].extendedRange[0]>node.range[1]){return VisitorOption.Skip}}});cursor=0;traverse(tree,{leave:function(node){var comment;while(cursornode.range[1]){return VisitorOption.Skip}}});return tree}exports.version=require("./package.json").version;exports.Syntax=Syntax;exports.traverse=traverse;exports.replace=replace;exports.attachComments=attachComments;exports.VisitorKeys=VisitorKeys;exports.VisitorOption=VisitorOption;exports.Controller=Controller;exports.cloneEnvironment=function(){return clone({})};return exports})(exports)},{"./package.json":343}],343:[function(require,module,exports){module.exports={name:"estraverse",description:"ECMAScript JS AST traversal functions",homepage:"https://github.com/estools/estraverse",main:"estraverse.js",version:"4.1.0",engines:{node:">=0.10.0"},maintainers:[{name:"constellation",email:"utatane.tea@gmail.com"},{name:"michaelficarra",email:"npm@michael.ficarra.me"}],repository:{type:"git",url:"git+ssh://git@github.com/estools/estraverse.git"},devDependencies:{chai:"^2.1.1","coffee-script":"^1.8.0",espree:"^1.11.0",gulp:"^3.8.10","gulp-bump":"^0.2.2","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-tag-version":"^1.2.1",jshint:"^2.5.6",mocha:"^2.1.0"},licenses:[{type:"BSD",url:"http://github.com/estools/estraverse/raw/master/LICENSE.BSD"}],scripts:{test:"npm run-script lint && npm run-script unit-test",lint:"jshint estraverse.js","unit-test":"mocha --compilers coffee:coffee-script/register"},gitHead:"347d52996336719b5910c7ffb5ff3ea8ecb87cf3",bugs:{url:"https://github.com/estools/estraverse/issues"},_id:"estraverse@4.1.0",_shasum:"40f23a76092041be6467d7f235c933b670766e05",_from:"estraverse@>=4.0.0 <5.0.0",_npmVersion:"2.8.3",_nodeVersion:"1.8.1",_npmUser:{name:"constellation",email:"utatane.tea@gmail.com"},dist:{shasum:"40f23a76092041be6467d7f235c933b670766e05",tarball:"http://registry.npmjs.org/estraverse/-/estraverse-4.1.0.tgz"},directories:{},_resolved:"https://registry.npmjs.org/estraverse/-/estraverse-4.1.0.tgz"}},{}],344:[function(require,module,exports){(function(){"use strict";function isExpression(node){if(node==null){return false}switch(node.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return true}return false}function isIterationStatement(node){if(node==null){return false}switch(node.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return true}return false}function isStatement(node){if(node==null){return false}switch(node.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return true}return false}function isSourceElement(node){return isStatement(node)||node!=null&&node.type==="FunctionDeclaration"}function trailingStatement(node){switch(node.type){case"IfStatement":if(node.alternate!=null){return node.alternate}return node.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return node.body}return null}function isProblematicIfStatement(node){var current;if(node.type!=="IfStatement"){return false}if(node.alternate==null){return false}current=node.consequent;do{if(current.type==="IfStatement"){if(current.alternate==null){return true}}current=trailingStatement(current)}while(current);return false}module.exports={isExpression:isExpression,isStatement:isStatement,isIterationStatement:isIterationStatement,isSourceElement:isSourceElement,isProblematicIfStatement:isProblematicIfStatement,trailingStatement:trailingStatement}})()},{}],345:[function(require,module,exports){(function(){"use strict";var ES6Regex,ES5Regex,NON_ASCII_WHITESPACES,IDENTIFIER_START,IDENTIFIER_PART,ch;ES5Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/};ES6Regex={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};function isDecimalDigit(ch){return 48<=ch&&ch<=57}function isHexDigit(ch){return 48<=ch&&ch<=57||97<=ch&&ch<=102||65<=ch&&ch<=70}function isOctalDigit(ch){return ch>=48&&ch<=55}NON_ASCII_WHITESPACES=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];function isWhiteSpace(ch){return ch===32||ch===9||ch===11||ch===12||ch===160||ch>=5760&&NON_ASCII_WHITESPACES.indexOf(ch)>=0}function isLineTerminator(ch){return ch===10||ch===13||ch===8232||ch===8233}function fromCodePoint(cp){if(cp<=65535){return String.fromCharCode(cp)}var cu1=String.fromCharCode(Math.floor((cp-65536)/1024)+55296);var cu2=String.fromCharCode((cp-65536)%1024+56320);return cu1+cu2}IDENTIFIER_START=new Array(128);for(ch=0;ch<128;++ch){IDENTIFIER_START[ch]=ch>=97&&ch<=122||ch>=65&&ch<=90||ch===36||ch===95}IDENTIFIER_PART=new Array(128);for(ch=0;ch<128;++ch){IDENTIFIER_PART[ch]=ch>=97&&ch<=122||ch>=65&&ch<=90||ch>=48&&ch<=57||ch===36||ch===95}function isIdentifierStartES5(ch){return ch<128?IDENTIFIER_START[ch]:ES5Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))}function isIdentifierPartES5(ch){return ch<128?IDENTIFIER_PART[ch]:ES5Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch))}function isIdentifierStartES6(ch){return ch<128?IDENTIFIER_START[ch]:ES6Regex.NonAsciiIdentifierStart.test(fromCodePoint(ch))}function isIdentifierPartES6(ch){return ch<128?IDENTIFIER_PART[ch]:ES6Regex.NonAsciiIdentifierPart.test(fromCodePoint(ch))}module.exports={isDecimalDigit:isDecimalDigit,isHexDigit:isHexDigit,isOctalDigit:isOctalDigit,isWhiteSpace:isWhiteSpace,isLineTerminator:isLineTerminator,isIdentifierStartES5:isIdentifierStartES5,isIdentifierPartES5:isIdentifierPartES5,isIdentifierStartES6:isIdentifierStartES6,isIdentifierPartES6:isIdentifierPartES6}})()},{}],346:[function(require,module,exports){(function(){"use strict";var code=require("./code");function isStrictModeReservedWordES6(id){switch(id){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return true;default:return false}}function isKeywordES5(id,strict){if(!strict&&id==="yield"){return false}return isKeywordES6(id,strict)}function isKeywordES6(id,strict){if(strict&&isStrictModeReservedWordES6(id)){return true}switch(id.length){case 2:return id==="if"||id==="in"||id==="do";case 3:return id==="var"||id==="for"||id==="new"||id==="try";case 4:return id==="this"||id==="else"||id==="case"||id==="void"||id==="with"||id==="enum";case 5:return id==="while"||id==="break"||id==="catch"||id==="throw"||id==="const"||id==="yield"||id==="class"||id==="super";case 6:return id==="return"||id==="typeof"||id==="delete"||id==="switch"||id==="export"||id==="import";case 7:return id==="default"||id==="finally"||id==="extends";case 8:return id==="function"||id==="continue"||id==="debugger";case 10:return id==="instanceof";default:return false}}function isReservedWordES5(id,strict){return id==="null"||id==="true"||id==="false"||isKeywordES5(id,strict)}function isReservedWordES6(id,strict){return id==="null"||id==="true"||id==="false"||isKeywordES6(id,strict)}function isRestrictedWord(id){return id==="eval"||id==="arguments"}function isIdentifierNameES5(id){var i,iz,ch;if(id.length===0){return false}ch=id.charCodeAt(0);if(!code.isIdentifierStartES5(ch)){return false}
+for(i=1,iz=id.length;i=iz){return false}lowCh=id.charCodeAt(i);if(!(56320<=lowCh&&lowCh<=57343)){return false}ch=decodeUtf16(ch,lowCh)}if(!check(ch)){return false}check=code.isIdentifierPartES6}return true}function isIdentifierES5(id,strict){return isIdentifierNameES5(id)&&!isReservedWordES5(id,strict)}function isIdentifierES6(id,strict){return isIdentifierNameES6(id)&&!isReservedWordES6(id,strict)}module.exports={isKeywordES5:isKeywordES5,isKeywordES6:isKeywordES6,isReservedWordES5:isReservedWordES5,isReservedWordES6:isReservedWordES6,isRestrictedWord:isRestrictedWord,isIdentifierNameES5:isIdentifierNameES5,isIdentifierNameES6:isIdentifierNameES6,isIdentifierES5:isIdentifierES5,isIdentifierES6:isIdentifierES6}})()},{"./code":345}],347:[function(require,module,exports){(function(){"use strict";exports.ast=require("./ast");exports.code=require("./code");exports.keyword=require("./keyword")})()},{"./ast":344,"./code":345,"./keyword":346}],348:[function(require,module,exports){module.exports={builtin:{Array:false,ArrayBuffer:false,Boolean:false,constructor:false,Date:false,decodeURI:false,decodeURIComponent:false,encodeURI:false,encodeURIComponent:false,Error:false,eval:false,EvalError:false,Float32Array:false,Float64Array:false,Function:false,hasOwnProperty:false,Infinity:false,Int16Array:false,Int32Array:false,Int8Array:false,isFinite:false,isNaN:false,isPrototypeOf:false,JSON:false,Map:false,Math:false,NaN:false,Number:false,Object:false,parseFloat:false,parseInt:false,Promise:false,propertyIsEnumerable:false,Proxy:false,RangeError:false,ReferenceError:false,Reflect:false,RegExp:false,Set:false,String:false,Symbol:false,SyntaxError:false,System:false,toLocaleString:false,toString:false,TypeError:false,Uint16Array:false,Uint32Array:false,Uint8Array:false,Uint8ClampedArray:false,undefined:false,URIError:false,valueOf:false,WeakMap:false,WeakSet:false},nonstandard:{escape:false,unescape:false},browser:{addEventListener:false,alert:false,applicationCache:false,atob:false,Audio:false,AudioProcessingEvent:false,BeforeUnloadEvent:false,Blob:false,blur:false,btoa:false,cancelAnimationFrame:false,CanvasGradient:false,CanvasPattern:false,CanvasRenderingContext2D:false,clearInterval:false,clearTimeout:false,close:false,closed:false,CloseEvent:false,Comment:false,CompositionEvent:false,confirm:false,console:false,crypto:false,CSS:false,CustomEvent:false,DataView:false,Debug:false,defaultStatus:false,devicePixelRatio:false,dispatchEvent:false,document:false,Document:false,DocumentFragment:false,DOMParser:false,DragEvent:false,Element:false,ElementTimeControl:false,ErrorEvent:false,event:false,Event:false,FileReader:false,fetch:false,find:false,focus:false,FocusEvent:false,FormData:false,frameElement:false,frames:false,GamepadEvent:false,getComputedStyle:false,getSelection:false,HashChangeEvent:false,Headers:false,history:false,HTMLAnchorElement:false,HTMLBaseElement:false,HTMLBlockquoteElement:false,HTMLBodyElement:false,HTMLBRElement:false,HTMLButtonElement:false,HTMLCanvasElement:false,HTMLDirectoryElement:false,HTMLDivElement:false,HTMLDListElement:false,HTMLElement:false,HTMLFieldSetElement:false,HTMLFontElement:false,HTMLFormElement:false,HTMLFrameElement:false,HTMLFrameSetElement:false,HTMLHeadElement:false,HTMLHeadingElement:false,HTMLHRElement:false,HTMLHtmlElement:false,HTMLIFrameElement:false,HTMLImageElement:false,HTMLInputElement:false,HTMLIsIndexElement:false,HTMLLabelElement:false,HTMLLayerElement:false,HTMLLegendElement:false,HTMLLIElement:false,HTMLLinkElement:false,HTMLMapElement:false,HTMLMenuElement:false,HTMLMetaElement:false,HTMLModElement:false,HTMLObjectElement:false,HTMLOListElement:false,HTMLOptGroupElement:false,HTMLOptionElement:false,HTMLParagraphElement:false,HTMLParamElement:false,HTMLPreElement:false,HTMLQuoteElement:false,HTMLScriptElement:false,HTMLSelectElement:false,HTMLStyleElement:false,HTMLTableCaptionElement:false,HTMLTableCellElement:false,HTMLTableColElement:false,HTMLTableElement:false,HTMLTableRowElement:false,HTMLTableSectionElement:false,HTMLTextAreaElement:false,HTMLTitleElement:false,HTMLUListElement:false,HTMLVideoElement:false,IDBCursor:false,IDBCursorWithValue:false,IDBDatabase:false,IDBEnvironment:false,IDBFactory:false,IDBIndex:false,IDBKeyRange:false,IDBObjectStore:false,IDBOpenDBRequest:false,IDBRequest:false,IDBTransaction:false,IDBVersionChangeEvent:false,Image:false,indexedDB:false,innerHeight:false,innerWidth:false,InputEvent:false,Intl:false,KeyboardEvent:false,length:false,localStorage:false,location:false,matchMedia:false,MessageChannel:false,MessageEvent:false,MessagePort:false,MouseEvent:false,moveBy:false,moveTo:false,MutationObserver:false,name:false,navigator:false,Node:false,NodeFilter:false,NodeList:false,Notification:false,OfflineAudioCompletionEvent:false,onbeforeunload:true,onblur:true,onerror:true,onfocus:true,onload:true,onresize:true,onunload:true,open:false,openDatabase:false,opener:false,opera:false,Option:false,outerHeight:false,outerWidth:false,PageTransitionEvent:false,pageXOffset:false,pageYOffset:false,parent:false,PopStateEvent:false,postMessage:false,print:false,ProgressEvent:false,prompt:false,Range:false,Request:false,Response:false,removeEventListener:false,requestAnimationFrame:false,resizeBy:false,resizeTo:false,screen:false,screenX:false,screenY:false,scroll:false,scrollbars:false,scrollBy:false,scrollTo:false,scrollX:false,scrollY:false,self:false,sessionStorage:false,setInterval:false,setTimeout:false,SharedWorker:false,showModalDialog:false,status:false,stop:false,StorageEvent:false,SVGAElement:false,SVGAltGlyphDefElement:false,SVGAltGlyphElement:false,SVGAltGlyphItemElement:false,SVGAngle:false,SVGAnimateColorElement:false,SVGAnimatedAngle:false,SVGAnimatedBoolean:false,SVGAnimatedEnumeration:false,SVGAnimatedInteger:false,SVGAnimatedLength:false,SVGAnimatedLengthList:false,SVGAnimatedNumber:false,SVGAnimatedNumberList:false,SVGAnimatedPathData:false,SVGAnimatedPoints:false,SVGAnimatedPreserveAspectRatio:false,SVGAnimatedRect:false,SVGAnimatedString:false,SVGAnimatedTransformList:false,SVGAnimateElement:false,SVGAnimateMotionElement:false,SVGAnimateTransformElement:false,SVGAnimationElement:false,SVGCircleElement:false,SVGClipPathElement:false,SVGColor:false,SVGColorProfileElement:false,SVGColorProfileRule:false,SVGComponentTransferFunctionElement:false,SVGCSSRule:false,SVGCursorElement:false,SVGDefsElement:false,SVGDescElement:false,SVGDocument:false,SVGElement:false,SVGElementInstance:false,SVGElementInstanceList:false,SVGEllipseElement:false,SVGEvent:false,SVGExternalResourcesRequired:false,SVGFEBlendElement:false,SVGFEColorMatrixElement:false,SVGFEComponentTransferElement:false,SVGFECompositeElement:false,SVGFEConvolveMatrixElement:false,SVGFEDiffuseLightingElement:false,SVGFEDisplacementMapElement:false,SVGFEDistantLightElement:false,SVGFEFloodElement:false,SVGFEFuncAElement:false,SVGFEFuncBElement:false,SVGFEFuncGElement:false,SVGFEFuncRElement:false,SVGFEGaussianBlurElement:false,SVGFEImageElement:false,SVGFEMergeElement:false,SVGFEMergeNodeElement:false,SVGFEMorphologyElement:false,SVGFEOffsetElement:false,SVGFEPointLightElement:false,SVGFESpecularLightingElement:false,SVGFESpotLightElement:false,SVGFETileElement:false,SVGFETurbulenceElement:false,SVGFilterElement:false,SVGFilterPrimitiveStandardAttributes:false,SVGFitToViewBox:false,SVGFontElement:false,SVGFontFaceElement:false,SVGFontFaceFormatElement:false,SVGFontFaceNameElement:false,SVGFontFaceSrcElement:false,SVGFontFaceUriElement:false,SVGForeignObjectElement:false,SVGGElement:false,SVGGlyphElement:false,SVGGlyphRefElement:false,SVGGradientElement:false,SVGHKernElement:false,SVGICCColor:false,SVGImageElement:false,SVGLangSpace:false,SVGLength:false,SVGLengthList:false,SVGLinearGradientElement:false,SVGLineElement:false,SVGLocatable:false,SVGMarkerElement:false,SVGMaskElement:false,SVGMatrix:false,SVGMetadataElement:false,SVGMissingGlyphElement:false,SVGMPathElement:false,SVGNumber:false,SVGNumberList:false,SVGPaint:false,SVGPathElement:false,SVGPathSeg:false,SVGPathSegArcAbs:false,SVGPathSegArcRel:false,SVGPathSegClosePath:false,SVGPathSegCurvetoCubicAbs:false,SVGPathSegCurvetoCubicRel:false,SVGPathSegCurvetoCubicSmoothAbs:false,SVGPathSegCurvetoCubicSmoothRel:false,SVGPathSegCurvetoQuadraticAbs:false,SVGPathSegCurvetoQuadraticRel:false,SVGPathSegCurvetoQuadraticSmoothAbs:false,SVGPathSegCurvetoQuadraticSmoothRel:false,SVGPathSegLinetoAbs:false,SVGPathSegLinetoHorizontalAbs:false,SVGPathSegLinetoHorizontalRel:false,SVGPathSegLinetoRel:false,SVGPathSegLinetoVerticalAbs:false,SVGPathSegLinetoVerticalRel:false,SVGPathSegList:false,SVGPathSegMovetoAbs:false,SVGPathSegMovetoRel:false,SVGPatternElement:false,SVGPoint:false,SVGPointList:false,SVGPolygonElement:false,SVGPolylineElement:false,SVGPreserveAspectRatio:false,SVGRadialGradientElement:false,SVGRect:false,SVGRectElement:false,SVGRenderingIntent:false,SVGScriptElement:false,SVGSetElement:false,SVGStopElement:false,SVGStringList:false,SVGStylable:false,SVGStyleElement:false,SVGSVGElement:false,SVGSwitchElement:false,SVGSymbolElement:false,SVGTests:false,SVGTextContentElement:false,SVGTextElement:false,SVGTextPathElement:false,SVGTextPositioningElement:false,SVGTitleElement:false,SVGTransform:false,SVGTransformable:false,SVGTransformList:false,SVGTRefElement:false,SVGTSpanElement:false,SVGUnitTypes:false,SVGURIReference:false,SVGUseElement:false,SVGViewElement:false,SVGViewSpec:false,SVGVKernElement:false,SVGZoomAndPan:false,Text:false,TextDecoder:false,TextEncoder:false,TimeEvent:false,top:false,TouchEvent:false,UIEvent:false,URL:false,WebGLActiveInfo:false,WebGLBuffer:false,WebGLContextEvent:false,WebGLFramebuffer:false,WebGLProgram:false,WebGLRenderbuffer:false,WebGLRenderingContext:false,WebGLShader:false,WebGLShaderPrecisionFormat:false,WebGLTexture:false,WebGLUniformLocation:false,WebSocket:false,WheelEvent:false,window:false,Window:false,Worker:false,XDomainRequest:false,XMLHttpRequest:false,XMLSerializer:false,XPathEvaluator:false,XPathException:false,XPathExpression:false,XPathNamespace:false,XPathNSResolver:false,XPathResult:false},worker:{importScripts:true,postMessage:true,self:true},node:{__dirname:false,__filename:false,arguments:false,Buffer:false,clearImmediate:false,clearInterval:false,clearTimeout:false,console:false,DataView:false,exports:true,GLOBAL:false,global:false,module:false,process:false,require:false,setImmediate:false,setInterval:false,setTimeout:false},amd:{define:false,require:false},mocha:{after:false,afterEach:false,before:false,beforeEach:false,context:false,describe:false,it:false,setup:false,specify:false,suite:false,suiteSetup:false,suiteTeardown:false,teardown:false,test:false,xcontext:false,xdescribe:false,xit:false,xspecify:false},jasmine:{afterAll:false,afterEach:false,beforeAll:false,beforeEach:false,describe:false,expect:false,fail:false,fdescribe:false,fit:false,it:false,jasmine:false,pending:false,runs:false,spyOn:false,waits:false,waitsFor:false,xdescribe:false,xit:false},qunit:{asyncTest:false,deepEqual:false,equal:false,expect:false,module:false,notDeepEqual:false,notEqual:false,notPropEqual:false,notStrictEqual:false,ok:false,propEqual:false,QUnit:false,raises:false,start:false,stop:false,strictEqual:false,test:false,"throws":false},phantomjs:{console:true,exports:true,phantom:true,require:true,WebPage:true},couch:{emit:false,exports:false,getRow:false,log:false,module:false,provides:false,require:false,respond:false,send:false,start:false,sum:false},rhino:{defineClass:false,deserialize:false,gc:false,help:false,importClass:false,importPackage:false,java:false,load:false,loadClass:false,Packages:false,print:false,quit:false,readFile:false,readUrl:false,runCommand:false,seal:false,serialize:false,spawn:false,sync:false,toint32:false,version:false},wsh:{ActiveXObject:true,Enumerator:true,GetObject:true,ScriptEngine:true,ScriptEngineBuildVersion:true,ScriptEngineMajorVersion:true,ScriptEngineMinorVersion:true,VBArray:true,WScript:true,WSH:true,XDomainRequest:true},jquery:{$:false,jQuery:false},yui:{Y:false,YUI:false,YUI_config:false},shelljs:{cat:false,cd:false,chmod:false,config:false,cp:false,dirs:false,echo:false,env:false,error:false,exec:false,exit:false,find:false,grep:false,ls:false,mkdir:false,mv:false,popd:false,pushd:false,pwd:false,rm:false,sed:false,target:false,tempdir:false,test:false,which:false},prototypejs:{$:false,$$:false,$A:false,$break:false,$continue:false,$F:false,$H:false,$R:false,$w:false,Abstract:false,Ajax:false,Autocompleter:false,Builder:false,Class:false,Control:false,Draggable:false,Draggables:false,Droppables:false,Effect:false,Element:false,Enumerable:false,Event:false,Field:false,Form:false,Hash:false,Insertion:false,ObjectRange:false,PeriodicalExecuter:false,Position:false,Prototype:false,Scriptaculous:false,Selector:false,Sortable:false,SortableObserver:false,Sound:false,Template:false,Toggle:false,Try:false},meteor:{$:false,_:false,Accounts:false,App:false,Assets:false,Blaze:false,check:false,Cordova:false,DDP:false,DDPServer:false,Deps:false,EJSON:false,Email:false,HTTP:false,Log:false,Match:false,Meteor:false,Mongo:false,MongoInternals:false,Npm:false,Package:false,Plugin:false,process:false,Random:false,ReactiveDict:false,ReactiveVar:false,Router:false,Session:false,share:false,Spacebars:false,Template:false,Tinytest:false,Tracker:false,UI:false,Utils:false,WebApp:false,WebAppInternals:false},mongo:{_isWindows:false,_rand:false,BulkWriteResult:false,cat:false,cd:false,connect:false,db:false,getHostName:false,getMemInfo:false,hostname:false,listFiles:false,load:false,ls:false,md5sumFile:false,mkdir:false,Mongo:false,ObjectId:false,PlanCache:false,pwd:false,quit:false,removeFile:false,rs:false,sh:false,UUID:false,version:false,WriteResult:false},applescript:{$:false,Application:false,Automation:false,console:false,delay:false,Library:false,ObjC:false,ObjectSpecifier:false,Path:false,Progress:false,Ref:false}}},{}],349:[function(require,module,exports){module.exports=require("./globals.json")},{"./globals.json":348}],350:[function(require,module,exports){var isNaN=require("is-nan");var isFinite=require("is-finite");module.exports=Number.isInteger||function(val){return typeof val==="number"&&!isNaN(val)&&isFinite(val)&&parseInt(val,10)===val}},{"is-finite":351,"is-nan":353}],351:[function(require,module,exports){"use strict";var numberIsNan=require("number-is-nan");module.exports=Number.isFinite||function(val){return!(typeof val!=="number"||numberIsNan(val)||val===Infinity||val===-Infinity)}},{"number-is-nan":352}],352:[function(require,module,exports){"use strict";module.exports=Number.isNaN||function(x){return x!==x}},{}],353:[function(require,module,exports){"use strict";var define=require("define-properties");var numberIsNaN=function isNaN(value){return value!==value};define(numberIsNaN,{shim:function shimNumberIsNaN(){if(!Number.isNaN){define(Number,{isNaN:numberIsNaN})}return Number.isNaN||numberIsNaN}});module.exports=numberIsNaN},{"define-properties":354}],354:[function(require,module,exports){"use strict";var keys=require("object-keys");var foreach=require("foreach");var toStr=Object.prototype.toString;var isFunction=function(fn){return typeof fn==="function"&&toStr.call(fn)==="[object Function]"};var arePropertyDescriptorsSupported=function(){var obj={};try{Object.defineProperty(obj,"x",{value:obj});return obj.x===obj}catch(e){return false}};var supportsDescriptors=Object.defineProperty&&arePropertyDescriptorsSupported();var defineProperty=function(object,name,value,predicate){if(name in object&&(!isFunction(predicate)||!predicate())){return}if(supportsDescriptors){Object.defineProperty(object,name,{configurable:true,enumerable:false,writable:true,value:value})}else{object[name]=value}};var defineProperties=function(object,map){var predicates=arguments.length>2?arguments[2]:{};foreach(keys(map),function(name){defineProperty(object,name,map[name],predicates[name])})};defineProperties.supportsDescriptors=!!supportsDescriptors;module.exports=defineProperties},{foreach:355,"object-keys":356}],355:[function(require,module,exports){var hasOwn=Object.prototype.hasOwnProperty;var toString=Object.prototype.toString;module.exports=function forEach(obj,fn,ctx){if(toString.call(fn)!=="[object Function]"){throw new TypeError("iterator must be a function")}var l=obj.length;if(l===+l){for(var i=0;i0&&!has.call(object,0)){for(var i=0;i0){for(var j=0;j=0&&toStr.call(value.callee)==="[object Function]"}return isArgs}},{}],358:[function(require,module,exports){module.exports=/((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g;module.exports.matchToToken=function(match){var token={type:"invalid",value:match[0]};if(match[1])token.type="string",token.closed=!!(match[3]||match[4]);else if(match[5])token.type="comment";else if(match[6])token.type="comment",token.closed=!!match[7];else if(match[8])token.type="regex";else if(match[9])token.type="number";else if(match[10])token.type="name";else if(match[11])token.type="punctuator";else if(match[12])token.type="whitespace";return token}},{}],359:[function(require,module,exports){var leftPad=require("left-pad");function get(options,key,defaultValue){return key in options?options[key]:defaultValue}function lineNumbers(code,options){var getOption=get.bind(null,options||{});var transform=getOption("transform",Function.prototype);var padding=getOption("padding"," ");var before=getOption("before"," ");var after=getOption("after"," | ");var start=getOption("start",1);var isArray=Array.isArray(code);var lines=isArray?code:code.split("\n");var end=start+lines.length-1;var width=String(end).length;var numbered=lines.map(function(line,index){var number=start+index;var params={before:before,number:number,width:width,after:after,line:line};transform(params);return params.before+leftPad(params.number,width,padding)+params.after+params.line});return isArray?numbered:numbered.join("\n")}module.exports=lineNumbers},{"left-pad":360}],360:[function(require,module,exports){module.exports=leftpad;function leftpad(str,len,ch){str=String(str);var i=-1;ch||(ch=" ");len=len-str.length;while(++i-1){splice.call(array,fromIndex,1)}}return array}module.exports=pull},{"../internal/baseIndexOf":397}],365:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseUniq=require("../internal/baseUniq"),isIterateeCall=require("../internal/isIterateeCall"),sortedUniq=require("../internal/sortedUniq");function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(isSorted!=null&&typeof isSorted!="boolean"){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?null:isSorted;isSorted=false}iteratee=iteratee==null?iteratee:baseCallback(iteratee,thisArg,3);return isSorted?sortedUniq(array,iteratee):baseUniq(array,iteratee)}module.exports=uniq},{"../internal/baseCallback":384,"../internal/baseUniq":414,"../internal/isIterateeCall":439,"../internal/sortedUniq":446}],366:[function(require,module,exports){module.exports=require("./includes")},{"./includes":369}],367:[function(require,module,exports){module.exports=require("./forEach")},{"./forEach":368}],368:[function(require,module,exports){var arrayEach=require("../internal/arrayEach"),baseEach=require("../internal/baseEach"),createForEach=require("../internal/createForEach");var forEach=createForEach(arrayEach,baseEach);module.exports=forEach},{"../internal/arrayEach":377,"../internal/baseEach":388,"../internal/createForEach":425}],369:[function(require,module,exports){var baseIndexOf=require("../internal/baseIndexOf"),getLength=require("../internal/getLength"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall"),isLength=require("../internal/isLength"),isString=require("../lang/isString"),values=require("../object/values");var nativeMax=Math.max;function includes(collection,target,fromIndex,guard){var length=collection?getLength(collection):0;if(!isLength(length)){collection=values(collection);length=collection.length}if(!length){return false}if(typeof fromIndex!="number"||guard&&isIterateeCall(target,fromIndex,guard)){fromIndex=0}else{fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex-1:baseIndexOf(collection,target,fromIndex)>-1}module.exports=includes},{"../internal/baseIndexOf":397,"../internal/getLength":430,"../internal/isIterateeCall":439,"../internal/isLength":441,"../lang/isArray":452,"../lang/isString":461,"../object/values":472}],370:[function(require,module,exports){var arrayMap=require("../internal/arrayMap"),baseCallback=require("../internal/baseCallback"),baseMap=require("../internal/baseMap"),isArray=require("../lang/isArray");function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=baseCallback(iteratee,thisArg,3);return func(collection,iteratee)}module.exports=map},{"../internal/arrayMap":378,"../internal/baseCallback":384,"../internal/baseMap":402,"../lang/isArray":452}],371:[function(require,module,exports){var arrayReduceRight=require("../internal/arrayReduceRight"),baseEachRight=require("../internal/baseEachRight"),createReduce=require("../internal/createReduce");var reduceRight=createReduce(arrayReduceRight,baseEachRight);module.exports=reduceRight},{"../internal/arrayReduceRight":379,"../internal/baseEachRight":389,"../internal/createReduce":426}],372:[function(require,module,exports){var arraySome=require("../internal/arraySome"),baseCallback=require("../internal/baseCallback"),baseSome=require("../internal/baseSome"),isArray=require("../lang/isArray"),isIterateeCall=require("../internal/isIterateeCall");function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=null}if(typeof predicate!="function"||thisArg!==undefined){predicate=baseCallback(predicate,thisArg,3)}return func(collection,predicate)}module.exports=some},{"../internal/arraySome":380,"../internal/baseCallback":384,"../internal/baseSome":411,"../internal/isIterateeCall":439,"../lang/isArray":452}],373:[function(require,module,exports){var baseCallback=require("../internal/baseCallback"),baseMap=require("../internal/baseMap"),baseSortBy=require("../internal/baseSortBy"),compareAscending=require("../internal/compareAscending"),isIterateeCall=require("../internal/isIterateeCall");function sortBy(collection,iteratee,thisArg){if(collection==null){return[]}if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=null}var index=-1;iteratee=baseCallback(iteratee,thisArg,3);var result=baseMap(collection,function(value,key,collection){return{criteria:iteratee(value,key,collection),index:++index,value:value}});return baseSortBy(result,compareAscending)}module.exports=sortBy},{"../internal/baseCallback":384,"../internal/baseMap":402,"../internal/baseSortBy":412,"../internal/compareAscending":420,"../internal/isIterateeCall":439}],374:[function(require,module,exports){var FUNC_ERROR_TEXT="Expected a function";var nativeMax=Math.max;function restParam(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=nativeMax(start===undefined?func.length-1:+start||0,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);while(++indexother&&!othIsNull||!valIsReflexive||valIsNull&&!othIsUndef&&othIsReflexive||valIsUndef&&othIsReflexive){return 1}if(valuelength?0:length+start}end=end===undefined||end>length?length:+end||0;if(end<0){end+=length}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index=200,seen=isLarge?createCache():null,result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index2?sources[length-2]:undefined,guard=length>2?sources[2]:undefined,thisArg=length>1?sources[length-1]:undefined;if(typeof customizer=="function"){customizer=bindCallback(customizer,thisArg,5);length-=2}else{customizer=typeof thisArg=="function"?thisArg:undefined;length-=customizer?1:0}if(guard&&isIterateeCall(sources[0],sources[1],guard)){customizer=length<3?undefined:customizer;length=1}while(++indexarrLength)){return false}while(++index-1&&value%1==0&&value-1&&value%1==0&&value<=MAX_SAFE_INTEGER}module.exports=isLength},{}],442:[function(require,module,exports){function isObjectLike(value){return!!value&&typeof value=="object"}module.exports=isObjectLike},{}],443:[function(require,module,exports){var isObject=require("../lang/isObject");function isStrictComparable(value){return value===value&&!isObject(value)}module.exports=isStrictComparable},{"../lang/isObject":458}],444:[function(require,module,exports){var baseForIn=require("./baseForIn"),isObjectLike=require("./isObjectLike");var objectTag="[object Object]";var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;var objToString=objectProto.toString;function shimIsPlainObject(value){var Ctor;if(!(isObjectLike(value)&&objToString.call(value)==objectTag)||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;
+baseForIn(value,function(subValue,key){result=key});return result===undefined||hasOwnProperty.call(value,result)}module.exports=shimIsPlainObject},{"./baseForIn":392,"./isObjectLike":442}],445:[function(require,module,exports){var isArguments=require("../lang/isArguments"),isArray=require("../lang/isArray"),isIndex=require("./isIndex"),isLength=require("./isLength"),keysIn=require("../object/keysIn");var objectProto=Object.prototype;var hasOwnProperty=objectProto.hasOwnProperty;function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length;var allowIndexes=!!length&&isLength(length)&&(isArray(object)||isArguments(object));var index=-1,result=[];while(++index0;while(++index=0;i--){filename=f[i];if(filename)break}for(i=0;i>> no match, partial?",file,fr,pattern,pr);if(fr===fl)return true}return false}var hit;if(typeof p==="string"){if(options.nocase){hit=f.toLowerCase()===p.toLowerCase()}else{hit=f===p}this.debug("string match",p,f,hit)}else{hit=f.match(p);this.debug("pattern match",p,f,hit)}if(!hit)return false}if(fi===fl&&pi===pl){return true}else if(fi===fl){return partial}else if(pi===pl){var emptyFileEnd=fi===fl-1&&file[fi]==="";return emptyFileEnd}throw new Error("wtf?")};function globUnescape(s){return s.replace(/\\(.)/g,"$1")}function regExpEscape(s){return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}},{"brace-expansion":479,path:222}],479:[function(require,module,exports){var concatMap=require("concat-map");var balanced=require("balanced-match");module.exports=expandTop;var escSlash="\x00SLASH"+Math.random()+"\x00";var escOpen="\x00OPEN"+Math.random()+"\x00";var escClose="\x00CLOSE"+Math.random()+"\x00";var escComma="\x00COMMA"+Math.random()+"\x00";var escPeriod="\x00PERIOD"+Math.random()+"\x00";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[];var m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre;var body=m.body;var post=m.post;var p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);if(post.length){p[p.length-1]+=postParts.shift();p.push.apply(p,postParts)}parts.push.apply(parts,p);return parts}function expandTop(str){if(!str)return[];return expand(escapeBraces(str),true).map(unescapeBraces)}function identity(e){return e}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,isTop){var expansions=[];var m=balanced("{","}",str);if(!m||/\$$/.test(m.pre))return[str];var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);var isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);var isSequence=isNumericSequence||isAlphaSequence;var isOptions=/^(.*,)+(.+)?$/.test(m.body);if(!isSequence&&!isOptions){if(m.post.match(/,.*}/)){str=m.pre+"{"+m.body+escClose+m.post;return expand(str)}return[str]}var n;if(isSequence){n=m.body.split(/\.\./)}else{n=parseCommaParts(m.body);if(n.length===1){n=expand(n[0],false).map(embrace);if(n.length===1){var post=m.post.length?expand(m.post,false):[""];return post.map(function(p){return m.pre+n[0]+p})}}}var pre=m.pre;var post=m.post.length?expand(m.post,false):[""];var N;if(isSequence){var x=numeric(n[0]);var y=numeric(n[1]);var width=Math.max(n[0].length,n[1].length);var incr=n.length==3?Math.abs(numeric(n[2])):1;var test=lte;var reverse=y0){var z=new Array(need+1).join("0");if(i<0)c="-"+z+c.slice(1);else c=z+c}}}N.push(c)}}else{N=concatMap(n,function(el){return expand(el,false)})}for(var j=0;j1?str.substring(m.start+a.length,m.end):"";m.post=str.slice(m.end+b.length);return m}}}if(bal&&ended){var start=m.start+a.length;m=balanced(a,b,str.substr(start));if(m){m.start+=start;m.end+=start;m.pre=str.slice(0,start)+m.pre}return m}}},{}],481:[function(require,module,exports){module.exports=function(xs,fn){var res=[];for(var i=0;idst){names[dst]=names[src]}++dst}}names.length=dst;return names};function defaultCreatorFn(object){return create(null)}function makeAccessor(secretCreatorFn){var brand=makeUniqueKey();var passkey=create(null);secretCreatorFn=secretCreatorFn||defaultCreatorFn;function register(object){var secret;function vault(key,forget){if(key===passkey){return forget?secret=null:secret||(secret=secretCreatorFn(object))}}defProp(object,brand,vault)}function accessor(object){if(!hasOwn.call(object,brand))register(object);return object[brand](passkey)}accessor.forget=function(object){if(hasOwn.call(object,brand))object[brand](passkey,true)};return accessor}defProp(exports,"makeAccessor",makeAccessor)},{}],485:[function(require,module,exports){var assert=require("assert");var types=require("recast").types;var isArray=types.builtInTypes.array;var b=types.builders;var n=types.namedTypes;var leap=require("./leap");var meta=require("./meta");var util=require("./util");var runtimeProperty=util.runtimeProperty;var hasOwn=Object.prototype.hasOwnProperty;function Emitter(contextId){assert.ok(this instanceof Emitter);n.Identifier.assert(contextId);this.nextTempId=0;Object.defineProperties(this,{contextId:{value:contextId},listing:{value:[]},marked:{value:[true]},finalLoc:{value:loc()},tryEntries:{value:[]}});Object.defineProperties(this,{leapManager:{value:new leap.LeapManager(this)}})}var Ep=Emitter.prototype;exports.Emitter=Emitter;function loc(){return b.literal(-1)}Ep.mark=function(loc){n.Literal.assert(loc);var index=this.listing.length;if(loc.value===-1){loc.value=index}else{assert.strictEqual(loc.value,index)}this.marked[index]=true;return loc};Ep.emit=function(node){if(n.Expression.check(node))node=b.expressionStatement(node);n.Statement.assert(node);this.listing.push(node)};Ep.emitAssign=function(lhs,rhs){this.emit(this.assign(lhs,rhs));return lhs};Ep.assign=function(lhs,rhs){return b.expressionStatement(b.assignmentExpression("=",lhs,rhs))};Ep.contextProperty=function(name,computed){return b.memberExpression(this.contextId,computed?b.literal(name):b.identifier(name),!!computed)};Ep.stop=function(rval){if(rval){this.setReturnValue(rval)}this.jump(this.finalLoc)};Ep.setReturnValue=function(valuePath){n.Expression.assert(valuePath.value);this.emitAssign(this.contextProperty("rval"),this.explodeExpression(valuePath))};Ep.clearPendingException=function(tryLoc,assignee){n.Literal.assert(tryLoc);var catchCall=b.callExpression(this.contextProperty("catch",true),[tryLoc]);if(assignee){this.emitAssign(assignee,catchCall)}else{this.emit(catchCall)}};Ep.jump=function(toLoc){this.emitAssign(this.contextProperty("next"),toLoc);this.emit(b.breakStatement())};Ep.jumpIf=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);this.emit(b.ifStatement(test,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};Ep.jumpIfNot=function(test,toLoc){n.Expression.assert(test);n.Literal.assert(toLoc);var negatedTest;if(n.UnaryExpression.check(test)&&test.operator==="!"){negatedTest=test.argument}else{negatedTest=b.unaryExpression("!",test)}this.emit(b.ifStatement(negatedTest,b.blockStatement([this.assign(this.contextProperty("next"),toLoc),b.breakStatement()])))};Ep.makeTempVar=function(){return this.contextProperty("t"+this.nextTempId++)};Ep.getContextFunction=function(id){return b.functionExpression(id||null,[this.contextId],b.blockStatement([this.getDispatchLoop()]),false,false)};Ep.getDispatchLoop=function(){var self=this;var cases=[];var current;var alreadyEnded=false;self.listing.forEach(function(stmt,i){if(self.marked.hasOwnProperty(i)){cases.push(b.switchCase(b.literal(i),current=[]));alreadyEnded=false}if(!alreadyEnded){current.push(stmt);if(isSwitchCaseEnder(stmt))alreadyEnded=true}});this.finalLoc.value=this.listing.length;cases.push(b.switchCase(this.finalLoc,[]),b.switchCase(b.literal("end"),[b.returnStatement(b.callExpression(this.contextProperty("stop"),[]))]));return b.whileStatement(b.literal(1),b.switchStatement(b.assignmentExpression("=",this.contextProperty("prev"),this.contextProperty("next")),cases))};function isSwitchCaseEnder(stmt){return n.BreakStatement.check(stmt)||n.ContinueStatement.check(stmt)||n.ReturnStatement.check(stmt)||n.ThrowStatement.check(stmt)}Ep.getTryLocsList=function(){if(this.tryEntries.length===0){return null}var lastLocValue=0;return b.arrayExpression(this.tryEntries.map(function(tryEntry){var thisLocValue=tryEntry.firstLoc.value;assert.ok(thisLocValue>=lastLocValue,"try entries out of order");lastLocValue=thisLocValue;var ce=tryEntry.catchEntry;var fe=tryEntry.finallyEntry;var locs=[tryEntry.firstLoc,ce?ce.firstLoc:null];if(fe){locs[2]=fe.firstLoc;locs[3]=fe.afterLoc}return b.arrayExpression(locs)}))};Ep.explode=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var node=path.value;var self=this;n.Node.assert(node);if(n.Statement.check(node))return self.explodeStatement(path);if(n.Expression.check(node))return self.explodeExpression(path,ignoreResult);if(n.Declaration.check(node))throw getDeclError(node);switch(node.type){case"Program":return path.get("body").map(self.explodeStatement,self);case"VariableDeclarator":throw getDeclError(node);case"Property":case"SwitchCase":case"CatchClause":throw new Error(node.type+" nodes should be handled by their parents");default:throw new Error("unknown Node of type "+JSON.stringify(node.type))}};function getDeclError(node){return new Error("all declarations should have been transformed into "+"assignments before the Exploder began its work: "+JSON.stringify(node))}Ep.explodeStatement=function(path,labelId){assert.ok(path instanceof types.NodePath);var stmt=path.value;var self=this;n.Statement.assert(stmt);if(labelId){n.Identifier.assert(labelId)}else{labelId=null}if(n.BlockStatement.check(stmt)){return path.get("body").each(self.explodeStatement,self)}if(!meta.containsLeap(stmt)){self.emit(stmt);return}switch(stmt.type){case"ExpressionStatement":self.explodeExpression(path.get("expression"),true);break;case"LabeledStatement":var after=loc();self.leapManager.withEntry(new leap.LabeledEntry(after,stmt.label),function(){self.explodeStatement(path.get("body"),stmt.label)});self.mark(after);break;case"WhileStatement":var before=loc();var after=loc();self.mark(before);self.jumpIfNot(self.explodeExpression(path.get("test")),after);self.leapManager.withEntry(new leap.LoopEntry(after,before,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(before);self.mark(after);break;case"DoWhileStatement":var first=loc();var test=loc();var after=loc();self.mark(first);self.leapManager.withEntry(new leap.LoopEntry(after,test,labelId),function(){self.explode(path.get("body"))});self.mark(test);self.jumpIf(self.explodeExpression(path.get("test")),first);self.mark(after);break;case"ForStatement":var head=loc();var update=loc();var after=loc();if(stmt.init){self.explode(path.get("init"),true)}self.mark(head);if(stmt.test){self.jumpIfNot(self.explodeExpression(path.get("test")),after)}else{}self.leapManager.withEntry(new leap.LoopEntry(after,update,labelId),function(){self.explodeStatement(path.get("body"))});self.mark(update);if(stmt.update){self.explode(path.get("update"),true)}self.jump(head);self.mark(after);break;case"ForInStatement":var head=loc();var after=loc();var keyIterNextFn=self.makeTempVar();self.emitAssign(keyIterNextFn,b.callExpression(runtimeProperty("keys"),[self.explodeExpression(path.get("right"))]));self.mark(head);var keyInfoTmpVar=self.makeTempVar();self.jumpIf(b.memberExpression(b.assignmentExpression("=",keyInfoTmpVar,b.callExpression(keyIterNextFn,[])),b.identifier("done"),false),after);self.emitAssign(stmt.left,b.memberExpression(keyInfoTmpVar,b.identifier("value"),false));self.leapManager.withEntry(new leap.LoopEntry(after,head,labelId),function(){self.explodeStatement(path.get("body"))});self.jump(head);self.mark(after);break;case"BreakStatement":self.emitAbruptCompletion({type:"break",target:self.leapManager.getBreakLoc(stmt.label)});break;case"ContinueStatement":self.emitAbruptCompletion({type:"continue",target:self.leapManager.getContinueLoc(stmt.label)});break;case"SwitchStatement":var disc=self.emitAssign(self.makeTempVar(),self.explodeExpression(path.get("discriminant")));var after=loc();var defaultLoc=loc();var condition=defaultLoc;var caseLocs=[];var cases=stmt.cases||[];for(var i=cases.length-1;i>=0;--i){var c=cases[i];n.SwitchCase.assert(c);if(c.test){condition=b.conditionalExpression(b.binaryExpression("===",disc,c.test),caseLocs[i]=loc(),condition)}else{caseLocs[i]=defaultLoc}}self.jump(self.explodeExpression(new types.NodePath(condition,path,"discriminant")));self.leapManager.withEntry(new leap.SwitchEntry(after),function(){path.get("cases").each(function(casePath){var c=casePath.value;var i=casePath.name;self.mark(caseLocs[i]);casePath.get("consequent").each(self.explodeStatement,self)})});self.mark(after);if(defaultLoc.value===-1){self.mark(defaultLoc);assert.strictEqual(after.value,defaultLoc.value)}break;case"IfStatement":var elseLoc=stmt.alternate&&loc();var after=loc();self.jumpIfNot(self.explodeExpression(path.get("test")),elseLoc||after);self.explodeStatement(path.get("consequent"));if(elseLoc){self.jump(after);self.mark(elseLoc);self.explodeStatement(path.get("alternate"))}self.mark(after);break;case"ReturnStatement":self.emitAbruptCompletion({type:"return",value:self.explodeExpression(path.get("argument"))});break;case"WithStatement":throw new Error(node.type+" not supported in generator functions.");case"TryStatement":var after=loc();var handler=stmt.handler;if(!handler&&stmt.handlers){handler=stmt.handlers[0]||null}var catchLoc=handler&&loc();var catchEntry=catchLoc&&new leap.CatchEntry(catchLoc,handler.param);var finallyLoc=stmt.finalizer&&loc();var finallyEntry=finallyLoc&&new leap.FinallyEntry(finallyLoc,after);var tryEntry=new leap.TryEntry(self.getUnmarkedCurrentLoc(),catchEntry,finallyEntry);self.tryEntries.push(tryEntry);self.updateContextPrevLoc(tryEntry.firstLoc);self.leapManager.withEntry(tryEntry,function(){self.explodeStatement(path.get("block"));if(catchLoc){if(finallyLoc){self.jump(finallyLoc)}else{self.jump(after)}self.updateContextPrevLoc(self.mark(catchLoc));var bodyPath=path.get("handler","body");var safeParam=self.makeTempVar();self.clearPendingException(tryEntry.firstLoc,safeParam);var catchScope=bodyPath.scope;var catchParamName=handler.param.name;n.CatchClause.assert(catchScope.node);assert.strictEqual(catchScope.lookup(catchParamName),catchScope);types.visit(bodyPath,{visitIdentifier:function(path){if(util.isReference(path,catchParamName)&&path.scope.lookup(catchParamName)===catchScope){return safeParam}this.traverse(path)},visitFunction:function(path){if(path.scope.declares(catchParamName)){return false}this.traverse(path)}});self.leapManager.withEntry(catchEntry,function(){self.explodeStatement(bodyPath)})}if(finallyLoc){self.updateContextPrevLoc(self.mark(finallyLoc));self.leapManager.withEntry(finallyEntry,function(){self.explodeStatement(path.get("finalizer"))});self.emit(b.returnStatement(b.callExpression(self.contextProperty("finish"),[finallyEntry.firstLoc])))}});self.mark(after);break;case"ThrowStatement":self.emit(b.throwStatement(self.explodeExpression(path.get("argument"))));break;default:throw new Error("unknown Statement of type "+JSON.stringify(stmt.type))}};Ep.emitAbruptCompletion=function(record){if(!isValidCompletion(record)){assert.ok(false,"invalid completion record: "+JSON.stringify(record))}assert.notStrictEqual(record.type,"normal","normal completions are not abrupt");var abruptArgs=[b.literal(record.type)];if(record.type==="break"||record.type==="continue"){n.Literal.assert(record.target);abruptArgs[1]=record.target}else if(record.type==="return"||record.type==="throw"){if(record.value){n.Expression.assert(record.value);abruptArgs[1]=record.value}}this.emit(b.returnStatement(b.callExpression(this.contextProperty("abrupt"),abruptArgs)))};function isValidCompletion(record){var type=record.type;if(type==="normal"){return!hasOwn.call(record,"target")}if(type==="break"||type==="continue"){return!hasOwn.call(record,"value")&&n.Literal.check(record.target)}if(type==="return"||type==="throw"){return hasOwn.call(record,"value")&&!hasOwn.call(record,"target")}return false}Ep.getUnmarkedCurrentLoc=function(){return b.literal(this.listing.length)};Ep.updateContextPrevLoc=function(loc){if(loc){n.Literal.assert(loc);if(loc.value===-1){loc.value=this.listing.length}else{assert.strictEqual(loc.value,this.listing.length)}}else{loc=this.getUnmarkedCurrentLoc()}this.emitAssign(this.contextProperty("prev"),loc)};Ep.explodeExpression=function(path,ignoreResult){assert.ok(path instanceof types.NodePath);var expr=path.value;if(expr){n.Expression.assert(expr)}else{return expr}var self=this;var result;function finish(expr){n.Expression.assert(expr);if(ignoreResult){self.emit(expr)}else{return expr}}if(!meta.containsLeap(expr)){return finish(expr)}var hasLeapingChildren=meta.containsLeap.onlyChildren(expr);function explodeViaTempVar(tempVar,childPath,ignoreChildResult){assert.ok(childPath instanceof types.NodePath);assert.ok(!ignoreChildResult||!tempVar,"Ignoring the result of a child expression but forcing it to "+"be assigned to a temporary variable?");var result=self.explodeExpression(childPath,ignoreChildResult);if(ignoreChildResult){}else if(tempVar||hasLeapingChildren&&!n.Literal.check(result)){result=self.emitAssign(tempVar||self.makeTempVar(),result)}return result}switch(expr.type){case"MemberExpression":return finish(b.memberExpression(self.explodeExpression(path.get("object")),expr.computed?explodeViaTempVar(null,path.get("property")):expr.property,expr.computed));case"CallExpression":var calleePath=path.get("callee");var argsPath=path.get("arguments");var newCallee;var newArgs=[];var hasLeapingArgs=false;argsPath.each(function(argPath){hasLeapingArgs=hasLeapingArgs||meta.containsLeap(argPath.value)});if(n.MemberExpression.check(calleePath.value)){if(hasLeapingArgs){var newObject=explodeViaTempVar(self.makeTempVar(),calleePath.get("object"));var newProperty=calleePath.value.computed?explodeViaTempVar(null,calleePath.get("property")):calleePath.value.property;newArgs.unshift(newObject);newCallee=b.memberExpression(b.memberExpression(newObject,newProperty,calleePath.value.computed),b.identifier("call"),false)}else{newCallee=self.explodeExpression(calleePath)}}else{newCallee=self.explodeExpression(calleePath);if(n.MemberExpression.check(newCallee)){newCallee=b.sequenceExpression([b.literal(0),newCallee])}}argsPath.each(function(argPath){newArgs.push(explodeViaTempVar(null,argPath))});return finish(b.callExpression(newCallee,newArgs));case"NewExpression":return finish(b.newExpression(explodeViaTempVar(null,path.get("callee")),path.get("arguments").map(function(argPath){return explodeViaTempVar(null,argPath)})));case"ObjectExpression":return finish(b.objectExpression(path.get("properties").map(function(propPath){return b.property(propPath.value.kind,propPath.value.key,explodeViaTempVar(null,propPath.get("value")))})));case"ArrayExpression":return finish(b.arrayExpression(path.get("elements").map(function(elemPath){return explodeViaTempVar(null,elemPath)})));case"SequenceExpression":var lastIndex=expr.expressions.length-1;path.get("expressions").each(function(exprPath){if(exprPath.name===lastIndex){result=self.explodeExpression(exprPath,ignoreResult)}else{self.explodeExpression(exprPath,true)}});return result;case"LogicalExpression":var after=loc();if(!ignoreResult){result=self.makeTempVar()}var left=explodeViaTempVar(result,path.get("left"));if(expr.operator==="&&"){self.jumpIfNot(left,after)}else{assert.strictEqual(expr.operator,"||");self.jumpIf(left,after)}explodeViaTempVar(result,path.get("right"),ignoreResult);self.mark(after);return result;case"ConditionalExpression":var elseLoc=loc();var after=loc();var test=self.explodeExpression(path.get("test"));self.jumpIfNot(test,elseLoc);if(!ignoreResult){result=self.makeTempVar()}explodeViaTempVar(result,path.get("consequent"),ignoreResult);self.jump(after);self.mark(elseLoc);explodeViaTempVar(result,path.get("alternate"),ignoreResult);self.mark(after);return result;case"UnaryExpression":return finish(b.unaryExpression(expr.operator,self.explodeExpression(path.get("argument")),!!expr.prefix));case"BinaryExpression":return finish(b.binaryExpression(expr.operator,explodeViaTempVar(null,path.get("left")),explodeViaTempVar(null,path.get("right"))));case"AssignmentExpression":return finish(b.assignmentExpression(expr.operator,self.explodeExpression(path.get("left")),self.explodeExpression(path.get("right"))));case"UpdateExpression":return finish(b.updateExpression(expr.operator,self.explodeExpression(path.get("argument")),expr.prefix));case"YieldExpression":var after=loc();var arg=expr.argument&&self.explodeExpression(path.get("argument"));if(arg&&expr.delegate){var result=self.makeTempVar();self.emit(b.returnStatement(b.callExpression(self.contextProperty("delegateYield"),[arg,b.literal(result.property.name),after])));self.mark(after);return result}self.emitAssign(self.contextProperty("next"),after);self.emit(b.returnStatement(arg||null));self.mark(after);return self.contextProperty("sent");default:throw new Error("unknown Expression of type "+JSON.stringify(expr.type))}}},{"./leap":487,"./meta":488,"./util":489,assert:213,recast:516}],486:[function(require,module,exports){var assert=require("assert");var types=require("recast").types;var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.hoist=function(funPath){assert.ok(funPath instanceof types.NodePath);n.Function.assert(funPath.value);var vars={};function varDeclToExpr(vdec,includeIdentifiers){n.VariableDeclaration.assert(vdec);var exprs=[];vdec.declarations.forEach(function(dec){vars[dec.id.name]=dec.id;if(dec.init){exprs.push(b.assignmentExpression("=",dec.id,dec.init))}else if(includeIdentifiers){exprs.push(dec.id)}});if(exprs.length===0)return null;if(exprs.length===1)return exprs[0];return b.sequenceExpression(exprs)}types.visit(funPath.get("body"),{visitVariableDeclaration:function(path){var expr=varDeclToExpr(path.value,false);if(expr===null){path.replace()}else{return b.expressionStatement(expr)}return false},visitForStatement:function(path){var init=path.value.init;if(n.VariableDeclaration.check(init)){path.get("init").replace(varDeclToExpr(init,false))}this.traverse(path)},visitForInStatement:function(path){var left=path.value.left;if(n.VariableDeclaration.check(left)){path.get("left").replace(varDeclToExpr(left,true))}this.traverse(path)},visitFunctionDeclaration:function(path){var node=path.value;vars[node.id.name]=node.id;var parentNode=path.parent.node;var assignment=b.expressionStatement(b.assignmentExpression("=",node.id,b.functionExpression(node.id,node.params,node.body,node.generator,node.expression)));if(n.BlockStatement.check(path.parent.node)){path.parent.get("body").unshift(assignment);path.replace()}else{path.replace(assignment)}return false},visitFunctionExpression:function(path){return false}});var paramNames={};funPath.get("params").each(function(paramPath){var param=paramPath.value;if(n.Identifier.check(param)){paramNames[param.name]=param}else{}});var declarations=[];Object.keys(vars).forEach(function(name){if(!hasOwn.call(paramNames,name)){declarations.push(b.variableDeclarator(vars[name],null))}});if(declarations.length===0){return null}return b.variableDeclaration("var",declarations)}},{assert:213,recast:516}],487:[function(require,module,exports){var assert=require("assert");var types=require("recast").types;var n=types.namedTypes;var b=types.builders;var inherits=require("util").inherits;var hasOwn=Object.prototype.hasOwnProperty;function Entry(){assert.ok(this instanceof Entry)}function FunctionEntry(returnLoc){Entry.call(this);n.Literal.assert(returnLoc);this.returnLoc=returnLoc}inherits(FunctionEntry,Entry);exports.FunctionEntry=FunctionEntry;function LoopEntry(breakLoc,continueLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Literal.assert(continueLoc);if(label){n.Identifier.assert(label)}else{label=null}this.breakLoc=breakLoc;this.continueLoc=continueLoc;this.label=label}inherits(LoopEntry,Entry);exports.LoopEntry=LoopEntry;function SwitchEntry(breakLoc){Entry.call(this);n.Literal.assert(breakLoc);this.breakLoc=breakLoc}inherits(SwitchEntry,Entry);exports.SwitchEntry=SwitchEntry;function TryEntry(firstLoc,catchEntry,finallyEntry){Entry.call(this);n.Literal.assert(firstLoc);if(catchEntry){assert.ok(catchEntry instanceof CatchEntry)}else{catchEntry=null}if(finallyEntry){assert.ok(finallyEntry instanceof FinallyEntry)}else{finallyEntry=null}assert.ok(catchEntry||finallyEntry);this.firstLoc=firstLoc;this.catchEntry=catchEntry;this.finallyEntry=finallyEntry}inherits(TryEntry,Entry);exports.TryEntry=TryEntry;function CatchEntry(firstLoc,paramId){Entry.call(this);n.Literal.assert(firstLoc);n.Identifier.assert(paramId);this.firstLoc=firstLoc;this.paramId=paramId}inherits(CatchEntry,Entry);exports.CatchEntry=CatchEntry;function FinallyEntry(firstLoc,afterLoc){Entry.call(this);n.Literal.assert(firstLoc);n.Literal.assert(afterLoc);this.firstLoc=firstLoc;this.afterLoc=afterLoc}inherits(FinallyEntry,Entry);exports.FinallyEntry=FinallyEntry;function LabeledEntry(breakLoc,label){Entry.call(this);n.Literal.assert(breakLoc);n.Identifier.assert(label);this.breakLoc=breakLoc;this.label=label}inherits(LabeledEntry,Entry);exports.LabeledEntry=LabeledEntry;function LeapManager(emitter){assert.ok(this instanceof LeapManager);var Emitter=require("./emit").Emitter;assert.ok(emitter instanceof Emitter);this.emitter=emitter;this.entryStack=[new FunctionEntry(emitter.finalLoc)]}var LMp=LeapManager.prototype;exports.LeapManager=LeapManager;LMp.withEntry=function(entry,callback){assert.ok(entry instanceof Entry);this.entryStack.push(entry);try{callback.call(this.emitter)}finally{var popped=this.entryStack.pop();assert.strictEqual(popped,entry)}};LMp._findLeapLocation=function(property,label){for(var i=this.entryStack.length-1;i>=0;--i){var entry=this.entryStack[i];var loc=entry[property];if(loc){if(label){if(entry.label&&entry.label.name===label.name){return loc}}else if(entry instanceof LabeledEntry){}else{return loc}}}return null};LMp.getBreakLoc=function(label){return this._findLeapLocation("breakLoc",label)};LMp.getContinueLoc=function(label){return this._findLeapLocation("continueLoc",label)}},{"./emit":485,assert:213,recast:516,util:239}],488:[function(require,module,exports){var assert=require("assert");var m=require("private").makeAccessor();var types=require("recast").types;var isArray=types.builtInTypes.array;var n=types.namedTypes;var hasOwn=Object.prototype.hasOwnProperty;function makePredicate(propertyName,knownTypes){function onlyChildren(node){n.Node.assert(node);var result=false;function check(child){if(result){}else if(isArray.check(child)){child.some(check)}else if(n.Node.check(child)){assert.strictEqual(result,false);result=predicate(child)}return result}types.eachField(node,function(name,child){check(child)});return result}function predicate(node){n.Node.assert(node);var meta=m(node);if(hasOwn.call(meta,propertyName))return meta[propertyName];if(hasOwn.call(opaqueTypes,node.type))return meta[propertyName]=false;if(hasOwn.call(knownTypes,node.type))return meta[propertyName]=true;return meta[propertyName]=onlyChildren(node)}predicate.onlyChildren=onlyChildren;return predicate}var opaqueTypes={FunctionExpression:true};var sideEffectTypes={CallExpression:true,ForInStatement:true,UnaryExpression:true,BinaryExpression:true,AssignmentExpression:true,UpdateExpression:true,NewExpression:true};var leapTypes={YieldExpression:true,BreakStatement:true,ContinueStatement:true,ReturnStatement:true,ThrowStatement:true};for(var type in leapTypes){if(hasOwn.call(leapTypes,type)){sideEffectTypes[type]=leapTypes[type]}}exports.hasSideEffects=makePredicate("hasSideEffects",sideEffectTypes);exports.containsLeap=makePredicate("containsLeap",leapTypes)},{assert:213,"private":484,recast:516}],489:[function(require,module,exports){var assert=require("assert");var types=require("recast").types;var n=types.namedTypes;var b=types.builders;var hasOwn=Object.prototype.hasOwnProperty;exports.defaults=function(obj){var len=arguments.length;var extension;for(var i=1;i0){bodyPath.replace(innerBody)}var outerFnExpr=getOuterFnExpr(path);n.Identifier.assert(node.id);var innerFnId=b.identifier(node.id.name+"$");var contextId=path.scope.declareTemporary("context$");var argsId=path.scope.declareTemporary("args$");var vars=hoist(path);var didRenameArguments=renameArguments(path,argsId);if(didRenameArguments){vars=vars||b.variableDeclaration("var",[]);vars.declarations.push(b.variableDeclarator(argsId,b.identifier("arguments")))}var emitter=new Emitter(contextId);emitter.explode(path.get("body"));if(vars&&vars.declarations.length>0){outerBody.push(vars)}var wrapArgs=[emitter.getContextFunction(innerFnId),node.generator?outerFnExpr:b.literal(null),b.thisExpression()];var tryLocsList=emitter.getTryLocsList();if(tryLocsList){wrapArgs.push(tryLocsList)}var wrapCall=b.callExpression(runtimeProperty(shouldTransformAsync?"async":"wrap"),wrapArgs);outerBody.push(b.returnStatement(wrapCall));node.body=b.blockStatement(outerBody);var wasGeneratorFunction=node.generator;if(wasGeneratorFunction){node.generator=false}if(shouldTransformAsync){node.async=false}if(wasGeneratorFunction&&n.Expression.check(node)){return b.callExpression(runtimeProperty("mark"),[node])}},visitForOfStatement:function(path){this.traverse(path);var node=path.value;var tempIterId=path.scope.declareTemporary("t$");var tempIterDecl=b.variableDeclarator(tempIterId,b.callExpression(runtimeProperty("values"),[node.right]));var tempInfoId=path.scope.declareTemporary("t$");var tempInfoDecl=b.variableDeclarator(tempInfoId,null);var init=node.left;var loopId;if(n.VariableDeclaration.check(init)){loopId=init.declarations[0].id;init.declarations.push(tempIterDecl,tempInfoDecl)}else{loopId=init;init=b.variableDeclaration("var",[tempIterDecl,tempInfoDecl])}n.Identifier.assert(loopId);var loopIdAssignExprStmt=b.expressionStatement(b.assignmentExpression("=",loopId,b.memberExpression(tempInfoId,b.identifier("value"),false)));if(n.BlockStatement.check(node.body)){node.body.body.unshift(loopIdAssignExprStmt)}else{node.body=b.blockStatement([loopIdAssignExprStmt,node.body])}return b.forStatement(init,b.unaryExpression("!",b.memberExpression(b.assignmentExpression("=",tempInfoId,b.callExpression(b.memberExpression(tempIterId,b.identifier("next"),false),[])),b.identifier("done"),false)),null,node.body)}});function getOuterFnExpr(funPath){var node=funPath.value;n.Function.assert(node);if(node.generator&&n.FunctionDeclaration.check(node)){var pp=funPath.parent;while(pp&&!(n.BlockStatement.check(pp.value)||n.Program.check(pp.value))){pp=pp.parent}if(!pp){return node.id}var markDecl=getRuntimeMarkDecl(pp);var markedArray=markDecl.declarations[0].id;var funDeclIdArray=markDecl.declarations[0].init.callee.object;n.ArrayExpression.assert(funDeclIdArray);var index=funDeclIdArray.elements.length;funDeclIdArray.elements.push(node.id);return b.memberExpression(markedArray,b.literal(index),true)}return node.id||(node.id=funPath.scope.parent.declareTemporary("callee$"))}function getRuntimeMarkDecl(blockPath){assert.ok(blockPath instanceof NodePath);var block=blockPath.node;isArray.assert(block.body);var info=getMarkInfo(block);if(info.decl){return info.decl}info.decl=b.variableDeclaration("var",[b.variableDeclarator(blockPath.scope.declareTemporary("marked"),b.callExpression(b.memberExpression(b.arrayExpression([]),b.identifier("map"),false),[runtimeProperty("mark")]))]);for(var i=0;i=1){return{errors:error.errors}}if(changes.length>0){cleanupTree(ast);allIdentifiers=setupScopeAndReferences(ast,{analyze:false})}assert(error.errors.length===0);var stats=new Stats;varify(ast,stats,allIdentifiers,changes);if(options.ast){cleanupTree(ast);return{stats:stats,ast:ast}}else{var transformedSrc=alter(src,changes);return{stats:stats,src:transformedSrc}}}module.exports=run},{"./error":493,"./jshint_globals/vars.js":494,"./options":495,"./scope":496,"./stats":497,alter:498,assert:213,"ast-traverse":500,breakable:501,"simple-fmt":502,"simple-is":503,stringmap:504,stringset:505}],493:[function(require,module,exports){"use strict";var fmt=require("simple-fmt");var assert=require("assert");function error(line,var_args){assert(arguments.length>=2);var msg=arguments.length===2?String(var_args):fmt.apply(fmt,Array.prototype.slice.call(arguments,1));error.errors.push(line===-1?msg:fmt("line {0}: {1}",line,msg))}error.reset=function(){error.errors=[]};error.getline=function(node){if(node&&node.loc&&node.loc.start){return node.loc.start.line}return-1};error.reset();module.exports=error},{assert:213,"simple-fmt":502}],494:[function(require,module,exports){"use strict";exports.reservedVars={arguments:false,NaN:false};exports.ecmaIdentifiers={Array:false,Boolean:false,Date:false,decodeURI:false,decodeURIComponent:false,encodeURI:false,encodeURIComponent:false,Error:false,eval:false,EvalError:false,Function:false,hasOwnProperty:false,isFinite:false,isNaN:false,JSON:false,Math:false,Map:false,Number:false,Object:false,parseInt:false,parseFloat:false,RangeError:false,ReferenceError:false,RegExp:false,Set:false,String:false,SyntaxError:false,TypeError:false,URIError:false,WeakMap:false};exports.browser={ArrayBuffer:false,ArrayBufferView:false,Audio:false,Blob:false,addEventListener:false,applicationCache:false,atob:false,blur:false,btoa:false,clearInterval:false,clearTimeout:false,close:false,closed:false,DataView:false,DOMParser:false,defaultStatus:false,document:false,Element:false,event:false,FileReader:false,Float32Array:false,Float64Array:false,FormData:false,focus:false,frames:false,getComputedStyle:false,HTMLElement:false,HTMLAnchorElement:false,HTMLBaseElement:false,HTMLBlockquoteElement:false,HTMLBodyElement:false,HTMLBRElement:false,HTMLButtonElement:false,HTMLCanvasElement:false,HTMLDirectoryElement:false,HTMLDivElement:false,HTMLDListElement:false,HTMLFieldSetElement:false,HTMLFontElement:false,HTMLFormElement:false,HTMLFrameElement:false,HTMLFrameSetElement:false,HTMLHeadElement:false,HTMLHeadingElement:false,HTMLHRElement:false,HTMLHtmlElement:false,HTMLIFrameElement:false,HTMLImageElement:false,HTMLInputElement:false,HTMLIsIndexElement:false,HTMLLabelElement:false,HTMLLayerElement:false,HTMLLegendElement:false,HTMLLIElement:false,HTMLLinkElement:false,HTMLMapElement:false,HTMLMenuElement:false,HTMLMetaElement:false,HTMLModElement:false,HTMLObjectElement:false,HTMLOListElement:false,HTMLOptGroupElement:false,HTMLOptionElement:false,HTMLParagraphElement:false,HTMLParamElement:false,HTMLPreElement:false,HTMLQuoteElement:false,HTMLScriptElement:false,HTMLSelectElement:false,HTMLStyleElement:false,HTMLTableCaptionElement:false,HTMLTableCellElement:false,HTMLTableColElement:false,HTMLTableElement:false,HTMLTableRowElement:false,HTMLTableSectionElement:false,HTMLTextAreaElement:false,HTMLTitleElement:false,HTMLUListElement:false,HTMLVideoElement:false,history:false,Int16Array:false,Int32Array:false,Int8Array:false,Image:false,length:false,localStorage:false,location:false,MessageChannel:false,MessageEvent:false,MessagePort:false,moveBy:false,moveTo:false,MutationObserver:false,name:false,Node:false,NodeFilter:false,navigator:false,onbeforeunload:true,onblur:true,onerror:true,onfocus:true,onload:true,onresize:true,onunload:true,open:false,openDatabase:false,opener:false,Option:false,parent:false,print:false,removeEventListener:false,resizeBy:false,resizeTo:false,screen:false,scroll:false,scrollBy:false,scrollTo:false,sessionStorage:false,setInterval:false,setTimeout:false,SharedWorker:false,status:false,top:false,Uint16Array:false,Uint32Array:false,Uint8Array:false,Uint8ClampedArray:false,WebSocket:false,window:false,Worker:false,XMLHttpRequest:false,XMLSerializer:false,XPathEvaluator:false,XPathException:false,XPathExpression:false,XPathNamespace:false,XPathNSResolver:false,XPathResult:false};exports.devel={alert:false,confirm:false,console:false,Debug:false,opera:false,prompt:false};exports.worker={importScripts:true,postMessage:true,self:true};exports.nonstandard={escape:false,unescape:false};exports.couch={require:false,respond:false,getRow:false,emit:false,send:false,start:false,sum:false,log:false,exports:false,module:false,provides:false};exports.node={__filename:false,__dirname:false,Buffer:false,DataView:false,console:false,exports:true,GLOBAL:false,global:false,module:false,process:false,require:false,setTimeout:false,clearTimeout:false,setInterval:false,clearInterval:false};exports.phantom={phantom:true,require:true,WebPage:true};exports.rhino={defineClass:false,deserialize:false,gc:false,help:false,importPackage:false,java:false,load:false,loadClass:false,print:false,quit:false,readFile:false,readUrl:false,runCommand:false,seal:false,serialize:false,spawn:false,sync:false,toint32:false,version:false};exports.wsh={ActiveXObject:true,Enumerator:true,GetObject:true,ScriptEngine:true,ScriptEngineBuildVersion:true,ScriptEngineMajorVersion:true,ScriptEngineMinorVersion:true,VBArray:true,WSH:true,WScript:true,XDomainRequest:true};exports.dojo={dojo:false,dijit:false,dojox:false,define:false,require:false};exports.jquery={$:false,jQuery:false};exports.mootools={$:false,$$:false,Asset:false,Browser:false,Chain:false,Class:false,Color:false,Cookie:false,Core:false,Document:false,DomReady:false,DOMEvent:false,DOMReady:false,Drag:false,Element:false,Elements:false,Event:false,Events:false,Fx:false,Group:false,Hash:false,HtmlTable:false,Iframe:false,IframeShim:false,InputValidator:false,instanceOf:false,Keyboard:false,Locale:false,Mask:false,MooTools:false,Native:false,Options:false,OverText:false,Request:false,Scroller:false,Slick:false,Slider:false,Sortables:false,Spinner:false,Swiff:false,Tips:false,Type:false,typeOf:false,URI:false,Window:false};exports.prototypejs={$:false,$$:false,$A:false,$F:false,$H:false,$R:false,$break:false,$continue:false,$w:false,Abstract:false,Ajax:false,Class:false,Enumerable:false,Element:false,Event:false,Field:false,Form:false,Hash:false,Insertion:false,ObjectRange:false,PeriodicalExecuter:false,Position:false,Prototype:false,Selector:false,Template:false,Toggle:false,Try:false,Autocompleter:false,Builder:false,Control:false,Draggable:false,Draggables:false,Droppables:false,Effect:false,Sortable:false,SortableObserver:false,Sound:false,Scriptaculous:false};exports.yui={YUI:false,Y:false,YUI_config:false}},{}],495:[function(require,module,exports){module.exports={disallowVars:false,disallowDuplicated:true,disallowUnknownReferences:true,parse:require("esprima-fb").parse}},{"esprima-fb":212}],496:[function(require,module,exports){"use strict";var assert=require("assert");var stringmap=require("stringmap");var stringset=require("stringset");var is=require("simple-is");var fmt=require("simple-fmt");var error=require("./error");var getline=error.getline;var options=require("./options");function Scope(args){assert(is.someof(args.kind,["hoist","block","catch-block"]));assert(is.object(args.node));assert(args.parent===null||is.object(args.parent));this.kind=args.kind;this.node=args.node;this.parent=args.parent;this.children=[];this.decls=stringmap();this.written=stringset();this.propagates=this.kind==="hoist"?stringset():null;if(this.parent){this.parent.children.push(this)}}Scope.prototype.print=function(indent){indent=indent||0;var scope=this;var names=this.decls.keys().map(function(name){return fmt("{0} [{1}]",name,scope.decls.get(name).kind)}).join(", ");var propagates=this.propagates?this.propagates.items().join(", "):"";console.log(fmt("{0}{1}: {2}. propagates: {3}",fmt.repeat(" ",indent),this.node.type,names,propagates));this.children.forEach(function(c){c.print(indent+2)})};Scope.prototype.add=function(name,kind,node,referableFromPos){assert(is.someof(kind,["fun","param","var","caught","const","let"]));function isConstLet(kind){return is.someof(kind,["const","let"])}var scope=this;if(is.someof(kind,["fun","param","var"])){while(scope.kind!=="hoist"){if(scope.decls.has(name)&&isConstLet(scope.decls.get(name).kind)){return error(getline(node),"{0} is already declared",name)}scope=scope.parent}}if(scope.decls.has(name)&&(options.disallowDuplicated||isConstLet(scope.decls.get(name).kind)||isConstLet(kind))){return error(getline(node),"{0} is already declared",name)}var declaration={kind:kind,node:node};if(referableFromPos){assert(is.someof(kind,["var","const","let"]));declaration.from=referableFromPos}scope.decls.set(name,declaration)};Scope.prototype.getKind=function(name){assert(is.string(name));var decl=this.decls.get(name);return decl?decl.kind:null};Scope.prototype.getNode=function(name){assert(is.string(name));var decl=this.decls.get(name);return decl?decl.node:null};Scope.prototype.getFromPos=function(name){assert(is.string(name));var decl=this.decls.get(name);return decl?decl.from:null};Scope.prototype.hasOwn=function(name){return this.decls.has(name)};Scope.prototype.remove=function(name){return this.decls.remove(name)};Scope.prototype.doesPropagate=function(name){return this.propagates.has(name)};Scope.prototype.markPropagates=function(name){this.propagates.add(name)};Scope.prototype.closestHoistScope=function(){var scope=this;while(scope.kind!=="hoist"){scope=scope.parent}return scope};Scope.prototype.hasFunctionScopeBetween=function(outer){function isFunction(node){return is.someof(node.type,["FunctionDeclaration","FunctionExpression"])}for(var scope=this;scope;scope=scope.parent){if(scope===outer){return false}if(isFunction(scope.node)){return true}}throw new Error("wasn't inner scope of outer")};Scope.prototype.lookup=function(name){for(var scope=this;scope;scope=scope.parent){if(scope.decls.has(name)){return scope}else if(scope.kind==="hoist"){scope.propagates.add(name)}}return null};Scope.prototype.markWrite=function(name){assert(is.string(name));this.written.add(name)};Scope.prototype.detectUnmodifiedLets=function(){var outmost=this;function detect(scope){if(scope!==outmost){scope.decls.keys().forEach(function(name){if(scope.getKind(name)==="let"&&!scope.written.has(name)){return error(getline(scope.getNode(name)),"{0} is declared as let but never modified so could be const",name)}})}scope.children.forEach(function(childScope){detect(childScope)})}detect(this)};Scope.prototype.traverse=function(options){options=options||{};var pre=options.pre;var post=options.post;function visit(scope){if(pre){pre(scope)}scope.children.forEach(function(childScope){visit(childScope)});if(post){post(scope)}}visit(this)};module.exports=Scope},{"./error":493,"./options":495,assert:213,"simple-fmt":502,"simple-is":503,stringmap:504,stringset:505}],497:[function(require,module,exports){var fmt=require("simple-fmt");var is=require("simple-is");var assert=require("assert");function Stats(){this.lets=0;this.consts=0;this.renames=[]}Stats.prototype.declarator=function(kind){assert(is.someof(kind,["const","let"]));if(kind==="const"){this.consts++}else{this.lets++}};Stats.prototype.rename=function(oldName,newName,line){this.renames.push({oldName:oldName,newName:newName,line:line})};Stats.prototype.toString=function(){var renames=this.renames.map(function(r){return r}).sort(function(a,b){return a.line-b.line});var renameStr=renames.map(function(rename){return fmt("\nline {0}: {1} => {2}",rename.line,rename.oldName,rename.newName)}).join("");var sum=this.consts+this.lets;var constlets=sum===0?"can't calculate const coverage (0 consts, 0 lets)":fmt("{0}% const coverage ({1} consts, {2} lets)",Math.floor(100*this.consts/sum),this.consts,this.lets);return constlets+renameStr+"\n"};module.exports=Stats},{assert:213,"simple-fmt":502,"simple-is":503}],498:[function(require,module,exports){var assert=require("assert");var stableSort=require("stable");function alter(str,fragments){"use strict";var isArray=Array.isArray||function(v){return Object.prototype.toString.call(v)==="[object Array]"};assert(typeof str==="string");assert(isArray(fragments));var sortedFragments=stableSort(fragments,function(a,b){return a.start-b.start});var outs=[];var pos=0;for(var i=0;ilen)r=len;if(e>len)e=len;li=l;ri=r;while(true){if(li=0},noneof:function(v,values){return values.indexOf(v)===-1},own:function(obj,prop){return hasOwnProperty.call(obj,prop);
+}}}();if(typeof module!=="undefined"&&typeof module.exports!=="undefined"){module.exports=is}},{}],504:[function(require,module,exports){var StringMap=function(){"use strict";var hasOwnProperty=Object.prototype.hasOwnProperty;var create=function(){function hasOwnEnumerableProps(obj){for(var prop in obj){if(hasOwnProperty.call(obj,prop)){return true}}return false}function hasOwnPollutedProps(obj){return hasOwnProperty.call(obj,"__count__")||hasOwnProperty.call(obj,"__parent__")}var useObjectCreate=false;if(typeof Object.create==="function"){if(!hasOwnEnumerableProps(Object.create(null))){useObjectCreate=true}}if(useObjectCreate===false){if(hasOwnEnumerableProps({})){throw new Error("StringMap environment error 0, please file a bug at https://github.com/olov/stringmap/issues")}}var o=useObjectCreate?Object.create(null):{};var useProtoClear=false;if(hasOwnPollutedProps(o)){o.__proto__=null;if(hasOwnEnumerableProps(o)||hasOwnPollutedProps(o)){throw new Error("StringMap environment error 1, please file a bug at https://github.com/olov/stringmap/issues")}useProtoClear=true}return function(){var o=useObjectCreate?Object.create(null):{};if(useProtoClear){o.__proto__=null}return o}}();function stringmap(optional_object){if(!(this instanceof stringmap)){return new stringmap(optional_object)}this.obj=create();this.hasProto=false;this.proto=undefined;if(optional_object){this.setMany(optional_object)}}stringmap.prototype.has=function(key){if(typeof key!=="string"){throw new Error("StringMap expected string key")}return key==="__proto__"?this.hasProto:hasOwnProperty.call(this.obj,key)};stringmap.prototype.get=function(key){if(typeof key!=="string"){throw new Error("StringMap expected string key")}return key==="__proto__"?this.proto:hasOwnProperty.call(this.obj,key)?this.obj[key]:undefined};stringmap.prototype.set=function(key,value){if(typeof key!=="string"){throw new Error("StringMap expected string key")}if(key==="__proto__"){this.hasProto=true;this.proto=value}else{this.obj[key]=value}};stringmap.prototype.remove=function(key){if(typeof key!=="string"){throw new Error("StringMap expected string key")}var didExist=this.has(key);if(key==="__proto__"){this.hasProto=false;this.proto=undefined}else{delete this.obj[key]}return didExist};stringmap.prototype["delete"]=stringmap.prototype.remove;stringmap.prototype.isEmpty=function(){for(var key in this.obj){if(hasOwnProperty.call(this.obj,key)){return false}}return!this.hasProto};stringmap.prototype.size=function(){var len=0;for(var key in this.obj){if(hasOwnProperty.call(this.obj,key)){++len}}return this.hasProto?len+1:len};stringmap.prototype.keys=function(){var keys=[];for(var key in this.obj){if(hasOwnProperty.call(this.obj,key)){keys.push(key)}}if(this.hasProto){keys.push("__proto__")}return keys};stringmap.prototype.values=function(){var values=[];for(var key in this.obj){if(hasOwnProperty.call(this.obj,key)){values.push(this.obj[key])}}if(this.hasProto){values.push(this.proto)}return values};stringmap.prototype.items=function(){var items=[];for(var key in this.obj){if(hasOwnProperty.call(this.obj,key)){items.push([key,this.obj[key]])}}if(this.hasProto){items.push(["__proto__",this.proto])}return items};stringmap.prototype.setMany=function(object){if(object===null||typeof object!=="object"&&typeof object!=="function"){throw new Error("StringMap expected Object")}for(var key in object){if(hasOwnProperty.call(object,key)){this.set(key,object[key])}}return this};stringmap.prototype.merge=function(other){var keys=other.keys();for(var i=0;i=0;--i){if(comparePos(resultArray[i].loc.end,node.loc.start)<=0){break}}resultArray.splice(i+1,0,node);return}}else if(node[childNodesCacheKey]){return node[childNodesCacheKey]}var names;if(isArray.check(node)){names=Object.keys(node)}else if(isObject.check(node)){names=types.getFieldNames(node)}else{return}if(!resultArray){Object.defineProperty(node,childNodesCacheKey,{value:resultArray=[],enumerable:false})}for(var i=0,nameCount=names.length;i>1;var child=childNodes[middle];if(comparePos(child.loc.start,comment.loc.start)<=0&&comparePos(comment.loc.end,child.loc.end)<=0){decorateComment(comment.enclosingNode=child,comment);return}if(comparePos(child.loc.end,comment.loc.start)<=0){var precedingNode=child;left=middle+1;continue}if(comparePos(comment.loc.end,child.loc.start)<=0){var followingNode=child;right=middle;continue}throw new Error("Comment location overlaps with node location")}if(precedingNode){comment.precedingNode=precedingNode}if(followingNode){comment.followingNode=followingNode}}exports.attach=function(comments,ast,lines){if(!isArray.check(comments)){return}var tiesToBreak=[];comments.forEach(function(comment){comment.loc.lines=lines;decorateComment(ast,comment);var pn=comment.precedingNode;var en=comment.enclosingNode;var fn=comment.followingNode;if(pn&&fn){var tieCount=tiesToBreak.length;if(tieCount>0){var lastTie=tiesToBreak[tieCount-1];assert.strictEqual(lastTie.precedingNode===comment.precedingNode,lastTie.followingNode===comment.followingNode);if(lastTie.followingNode!==comment.followingNode){breakTies(tiesToBreak,lines)}}tiesToBreak.push(comment)}else if(pn){breakTies(tiesToBreak,lines);addTrailingComment(pn,comment)}else if(fn){breakTies(tiesToBreak,lines);addLeadingComment(fn,comment)}else if(en){breakTies(tiesToBreak,lines);addDanglingComment(en,comment)}else{throw new Error("AST contains no nodes at all?")}});breakTies(tiesToBreak,lines);comments.forEach(function(comment){delete comment.precedingNode;delete comment.enclosingNode;delete comment.followingNode})};function breakTies(tiesToBreak,lines){var tieCount=tiesToBreak.length;if(tieCount===0){return}var pn=tiesToBreak[0].precedingNode;var fn=tiesToBreak[0].followingNode;var gapEndPos=fn.loc.start;for(var indexOfFirstLeadingComment=tieCount;indexOfFirstLeadingComment>0;--indexOfFirstLeadingComment){var comment=tiesToBreak[indexOfFirstLeadingComment-1];assert.strictEqual(comment.precedingNode,pn);assert.strictEqual(comment.followingNode,fn);var gap=lines.sliceString(comment.loc.end,gapEndPos);if(/\S/.test(gap)){break}gapEndPos=comment.loc.start}while(indexOfFirstLeadingComment<=tieCount&&(comment=tiesToBreak[indexOfFirstLeadingComment])&&comment.type==="Line"&&comment.loc.start.column>fn.loc.start.column){++indexOfFirstLeadingComment}tiesToBreak.forEach(function(comment,i){if(i1){return s[len-2]}return null};FPp.getValue=function getValue(){var s=this.stack;return s[s.length-1]};function getNodeHelper(path,count){var s=path.stack;for(var i=s.length-1;i>=0;i-=2){var value=s[i];if(n.Node.check(value)&&--count<0){return value}}return null}FPp.getNode=function getNode(count){return getNodeHelper(this,~~count)};FPp.getParentNode=function getParentNode(count){return getNodeHelper(this,~~count+1)};FPp.getRootValue=function getRootValue(){var s=this.stack;if(s.length%2===0){return s[1]}return s[0]};FPp.call=function call(callback){var s=this.stack;var origLen=s.length;var value=s[origLen-1];var argc=arguments.length;for(var i=1;inp){return true}if(pp===np&&name==="right"){assert.strictEqual(parent.right,node);return true}default:return false}case"SequenceExpression":switch(parent.type){case"ForStatement":return false;case"ExpressionStatement":return name!=="expression";default:return true}case"YieldExpression":switch(parent.type){case"BinaryExpression":case"LogicalExpression":case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"CallExpression":case"MemberExpression":case"NewExpression":case"ConditionalExpression":case"YieldExpression":return true;default:return false}case"Literal":return parent.type==="MemberExpression"&&isNumber.check(node.value)&&name==="object"&&parent.object===node;case"AssignmentExpression":case"ConditionalExpression":switch(parent.type){case"UnaryExpression":case"SpreadElement":case"SpreadProperty":case"BinaryExpression":case"LogicalExpression":return true;case"CallExpression":return name==="callee"&&parent.callee===node;case"ConditionalExpression":return name==="test"&&parent.test===node;case"MemberExpression":return name==="object"&&parent.object===node;default:return false}case"ArrowFunctionExpression":return isBinary(parent);case"ObjectExpression":if(parent.type==="ArrowFunctionExpression"&&name==="body"){return true}default:if(parent.type==="NewExpression"&&name==="callee"&&parent.callee===node){return containsCallExpression(node)}}if(assumeExpressionContext!==true&&!this.canBeFirstInStatement()&&this.firstInStatement())return true;return false};function isBinary(node){return n.BinaryExpression.check(node)||n.LogicalExpression.check(node)}function isUnaryLike(node){return n.UnaryExpression.check(node)||n.SpreadElement&&n.SpreadElement.check(node)||n.SpreadProperty&&n.SpreadProperty.check(node)}var PRECEDENCE={};[["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"]].forEach(function(tier,i){tier.forEach(function(op){PRECEDENCE[op]=i})});function containsCallExpression(node){if(n.CallExpression.check(node)){return true}if(isArray.check(node)){return node.some(containsCallExpression)}if(n.Node.check(node)){return types.someField(node,function(name,child){return containsCallExpression(child)})}return false}FPp.canBeFirstInStatement=function(){var node=this.getNode();return!n.FunctionExpression.check(node)&&!n.ObjectExpression.check(node)};FPp.firstInStatement=function(){var s=this.stack;var parentName,parent;var childName,child;for(var i=s.length-1;i>=0;i-=2){if(n.Node.check(s[i])){childName=parentName;child=parent;parentName=s[i-1];parent=s[i]}if(!parent||!child){continue}if(n.BlockStatement.check(parent)&&parentName==="body"&&childName===0){assert.strictEqual(parent.body[0],child);return true}if(n.ExpressionStatement.check(parent)&&childName==="expression"){assert.strictEqual(parent.expression,child);return true}if(n.SequenceExpression.check(parent)&&parentName==="expressions"&&childName===0){assert.strictEqual(parent.expressions[0],child);continue}if(n.CallExpression.check(parent)&&childName==="callee"){assert.strictEqual(parent.callee,child);continue}if(n.MemberExpression.check(parent)&&childName==="object"){assert.strictEqual(parent.object,child);continue}if(n.ConditionalExpression.check(parent)&&childName==="test"){assert.strictEqual(parent.test,child);continue}if(isBinary(parent)&&childName==="left"){assert.strictEqual(parent.left,child);continue}if(n.UnaryExpression.check(parent)&&!parent.prefix&&childName==="argument"){assert.strictEqual(parent.argument,child);continue}return false}return true}},{"./types":514,assert:213}],508:[function(require,module,exports){var assert=require("assert");var sourceMap=require("source-map");var normalizeOptions=require("./options").normalize;var secretKey=require("private").makeUniqueKey();var types=require("./types");var isString=types.builtInTypes.string;var comparePos=require("./util").comparePos;var Mapping=require("./mapping");function getSecret(lines){return lines[secretKey]}function Lines(infos,sourceFileName){assert.ok(this instanceof Lines);assert.ok(infos.length>0);if(sourceFileName){isString.assert(sourceFileName)}else{sourceFileName=null}Object.defineProperty(this,secretKey,{value:{infos:infos,mappings:[],name:sourceFileName,cachedSourceMap:null}});if(sourceFileName){getSecret(this).mappings.push(new Mapping(this,{start:this.firstPos(),end:this.lastPos()}))}}exports.Lines=Lines;var Lp=Lines.prototype;Object.defineProperties(Lp,{length:{get:function(){return getSecret(this).infos.length}},name:{get:function(){return getSecret(this).name}}});function copyLineInfo(info){return{line:info.line,indent:info.indent,sliceStart:info.sliceStart,sliceEnd:info.sliceEnd}}var fromStringCache={};var hasOwn=fromStringCache.hasOwnProperty;var maxCacheKeyLen=10;function countSpaces(spaces,tabWidth){var count=0;var len=spaces.length;for(var i=0;i0);var next=Math.ceil(count/tabWidth)*tabWidth;if(next===count){count+=tabWidth}else{count=next}break;case 11:case 12:case 13:case 65279:break;case 32:default:count+=1;break}}return count}exports.countSpaces=countSpaces;var leadingSpaceExp=/^\s*/;function fromString(string,options){if(string instanceof Lines)return string;string+="";var tabWidth=options&&options.tabWidth;var tabless=string.indexOf(" ")<0;var cacheable=!options&&tabless&&string.length<=maxCacheKeyLen;assert.ok(tabWidth||tabless,"No tab width specified but encountered tabs in string\n"+string);if(cacheable&&hasOwn.call(fromStringCache,string))return fromStringCache[string];var lines=new Lines(string.split("\n").map(function(line){var spaces=leadingSpaceExp.exec(line)[0];return{line:line,indent:countSpaces(spaces,tabWidth),sliceStart:spaces.length,sliceEnd:line.length}}),normalizeOptions(options).sourceFileName);if(cacheable)fromStringCache[string]=lines;return lines}exports.fromString=fromString;function isOnlyWhitespace(string){return!/\S/.test(string)}Lp.toString=function(options){return this.sliceString(this.firstPos(),this.lastPos(),options)};Lp.getSourceMap=function(sourceMapName,sourceRoot){if(!sourceMapName){return null}var targetLines=this;function updateJSON(json){json=json||{};isString.assert(sourceMapName);json.file=sourceMapName;if(sourceRoot){isString.assert(sourceRoot);json.sourceRoot=sourceRoot}return json}var secret=getSecret(targetLines);if(secret.cachedSourceMap){return updateJSON(secret.cachedSourceMap.toJSON())}var smg=new sourceMap.SourceMapGenerator(updateJSON());var sourcesToContents={};secret.mappings.forEach(function(mapping){var sourceCursor=mapping.sourceLines.skipSpaces(mapping.sourceLoc.start)||mapping.sourceLines.lastPos();var targetCursor=targetLines.skipSpaces(mapping.targetLoc.start)||targetLines.lastPos();while(comparePos(sourceCursor,mapping.sourceLoc.end)<0&&comparePos(targetCursor,mapping.targetLoc.end)<0){var sourceChar=mapping.sourceLines.charAt(sourceCursor);var targetChar=targetLines.charAt(targetCursor);assert.strictEqual(sourceChar,targetChar);var sourceName=mapping.sourceLines.name;smg.addMapping({source:sourceName,original:{line:sourceCursor.line,column:sourceCursor.column},generated:{line:targetCursor.line,column:targetCursor.column}});if(!hasOwn.call(sourcesToContents,sourceName)){var sourceContent=mapping.sourceLines.toString();smg.setSourceContent(sourceName,sourceContent);sourcesToContents[sourceName]=sourceContent}targetLines.nextPos(targetCursor,true);mapping.sourceLines.nextPos(sourceCursor,true)}});secret.cachedSourceMap=smg;return smg.toJSON()};Lp.bootstrapCharAt=function(pos){assert.strictEqual(typeof pos,"object");assert.strictEqual(typeof pos.line,"number");assert.strictEqual(typeof pos.column,"number");var line=pos.line,column=pos.column,strings=this.toString().split("\n"),string=strings[line-1];if(typeof string==="undefined")return"";if(column===string.length&&line=string.length)return"";return string.charAt(column)};Lp.charAt=function(pos){assert.strictEqual(typeof pos,"object");assert.strictEqual(typeof pos.line,"number");assert.strictEqual(typeof pos.column,"number");var line=pos.line,column=pos.column,secret=getSecret(this),infos=secret.infos,info=infos[line-1],c=column;if(typeof info==="undefined"||c<0)return"";var indent=this.getIndentAt(line);if(c=info.sliceEnd)return"";return info.line.charAt(c)};Lp.stripMargin=function(width,skipFirstLine){if(width===0)return this;assert.ok(width>0,"negative margin: "+width);if(skipFirstLine&&this.length===1)return this;var secret=getSecret(this);var lines=new Lines(secret.infos.map(function(info,i){if(info.line&&(i>0||!skipFirstLine)){info=copyLineInfo(info);info.indent=Math.max(0,info.indent-width)}return info}));if(secret.mappings.length>0){var newMappings=getSecret(lines).mappings;assert.strictEqual(newMappings.length,0);secret.mappings.forEach(function(mapping){newMappings.push(mapping.indent(width,skipFirstLine,true))})}return lines};Lp.indent=function(by){if(by===0)return this;var secret=getSecret(this);var lines=new Lines(secret.infos.map(function(info){if(info.line){info=copyLineInfo(info);info.indent+=by}return info}));if(secret.mappings.length>0){var newMappings=getSecret(lines).mappings;assert.strictEqual(newMappings.length,0);secret.mappings.forEach(function(mapping){newMappings.push(mapping.indent(by))})}return lines};Lp.indentTail=function(by){if(by===0)return this;if(this.length<2)return this;var secret=getSecret(this);var lines=new Lines(secret.infos.map(function(info,i){if(i>0&&info.line){info=copyLineInfo(info);info.indent+=by}return info}));if(secret.mappings.length>0){var newMappings=getSecret(lines).mappings;assert.strictEqual(newMappings.length,0);secret.mappings.forEach(function(mapping){newMappings.push(mapping.indent(by,true))})}return lines};Lp.getIndentAt=function(line){assert.ok(line>=1,"no line "+line+" (line numbers start from 1)");var secret=getSecret(this),info=secret.infos[line-1];return Math.max(info.indent,0)};Lp.guessTabWidth=function(){var secret=getSecret(this);if(hasOwn.call(secret,"cachedTabWidth")){return secret.cachedTabWidth}var counts=[];var lastIndent=0;for(var line=1,last=this.length;line<=last;++line){var info=secret.infos[line-1];var sliced=info.line.slice(info.sliceStart,info.sliceEnd);if(isOnlyWhitespace(sliced)){continue}var diff=Math.abs(info.indent-lastIndent);counts[diff]=~~counts[diff]+1;lastIndent=info.indent}var maxCount=-1;var result=2;for(var tabWidth=1;tabWidthmaxCount){maxCount=counts[tabWidth];result=tabWidth}}return secret.cachedTabWidth=result};Lp.isOnlyWhitespace=function(){return isOnlyWhitespace(this.toString())};Lp.isPrecededOnlyByWhitespace=function(pos){var secret=getSecret(this);var info=secret.infos[pos.line-1];var indent=Math.max(info.indent,0);var diff=pos.column-indent;if(diff<=0){return true}var start=info.sliceStart;var end=Math.min(start+diff,info.sliceEnd);var prefix=info.line.slice(start,end);return isOnlyWhitespace(prefix)};Lp.getLineLength=function(line){var secret=getSecret(this),info=secret.infos[line-1];return this.getIndentAt(line)+info.sliceEnd-info.sliceStart};Lp.nextPos=function(pos,skipSpaces){var l=Math.max(pos.line,0),c=Math.max(pos.column,0);if(c0){var newMappings=getSecret(lines).mappings;assert.strictEqual(newMappings.length,0);secret.mappings.forEach(function(mapping){var sliced=mapping.slice(this,start,end);if(sliced){newMappings.push(sliced)}},this)}return lines};function sliceInfo(info,startCol,endCol){var sliceStart=info.sliceStart;var sliceEnd=info.sliceEnd;var indent=Math.max(info.indent,0);var lineLength=indent+sliceEnd-sliceStart;if(typeof endCol==="undefined"){endCol=lineLength}startCol=Math.max(startCol,0);endCol=Math.min(endCol,lineLength);endCol=Math.max(endCol,startCol);if(endCol=0);assert.ok(sliceStart<=sliceEnd);assert.strictEqual(lineLength,indent+sliceEnd-sliceStart);if(info.indent===indent&&info.sliceStart===sliceStart&&info.sliceEnd===sliceEnd){return info}return{line:info.line,indent:indent,sliceStart:sliceStart,sliceEnd:sliceEnd}}Lp.bootstrapSliceString=function(start,end,options){return this.slice(start,end).toString(options)};Lp.sliceString=function(start,end,options){if(!end){if(!start){return this}end=this.lastPos()}options=normalizeOptions(options);var infos=getSecret(this).infos;var parts=[];var tabWidth=options.tabWidth;for(var line=start.line;line<=end.line;++line){var info=infos[line-1];if(line===start.line){if(line===end.line){info=sliceInfo(info,start.column,end.column)}else{info=sliceInfo(info,start.column)}}else if(line===end.line){info=sliceInfo(info,0,end.column)}var indent=Math.max(info.indent,0);var before=info.line.slice(0,info.sliceStart);if(options.reuseWhitespace&&isOnlyWhitespace(before)&&countSpaces(before,options.tabWidth)===indent){
+parts.push(info.line.slice(0,info.sliceEnd));continue}var tabs=0;var spaces=indent;if(options.useTabs){tabs=Math.floor(indent/tabWidth);spaces-=tabs*tabWidth}var result="";if(tabs>0){result+=new Array(tabs+1).join(" ")}if(spaces>0){result+=new Array(spaces+1).join(" ")}result+=info.line.slice(info.sliceStart,info.sliceEnd);parts.push(result)}return parts.join("\n")};Lp.isEmpty=function(){return this.length<2&&this.getLineLength(1)<1};Lp.join=function(elements){var separator=this;var separatorSecret=getSecret(separator);var infos=[];var mappings=[];var prevInfo;function appendSecret(secret){if(secret===null)return;if(prevInfo){var info=secret.infos[0];var indent=new Array(info.indent+1).join(" ");var prevLine=infos.length;var prevColumn=Math.max(prevInfo.indent,0)+prevInfo.sliceEnd-prevInfo.sliceStart;prevInfo.line=prevInfo.line.slice(0,prevInfo.sliceEnd)+indent+info.line.slice(info.sliceStart,info.sliceEnd);prevInfo.sliceEnd=prevInfo.line.length;if(secret.mappings.length>0){secret.mappings.forEach(function(mapping){mappings.push(mapping.add(prevLine,prevColumn))})}}else if(secret.mappings.length>0){mappings.push.apply(mappings,secret.mappings)}secret.infos.forEach(function(info,i){if(!prevInfo||i>0){prevInfo=copyLineInfo(info);infos.push(prevInfo)}})}function appendWithSeparator(secret,i){if(i>0)appendSecret(separatorSecret);appendSecret(secret)}elements.map(function(elem){var lines=fromString(elem);if(lines.isEmpty())return null;return getSecret(lines)}).forEach(separator.isEmpty()?appendSecret:appendWithSeparator);if(infos.length<1)return emptyLines;var lines=new Lines(infos);getSecret(lines).mappings=mappings;return lines};exports.concat=function(elements){return emptyLines.join(elements)};Lp.concat=function(other){var args=arguments,list=[this];list.push.apply(list,args);assert.strictEqual(list.length,args.length+1);return emptyLines.join(list)};var emptyLines=fromString("")},{"./mapping":509,"./options":510,"./types":514,"./util":515,assert:213,"private":484,"source-map":530}],509:[function(require,module,exports){var assert=require("assert");var types=require("./types");var isString=types.builtInTypes.string;var isNumber=types.builtInTypes.number;var SourceLocation=types.namedTypes.SourceLocation;var Position=types.namedTypes.Position;var linesModule=require("./lines");var comparePos=require("./util").comparePos;function Mapping(sourceLines,sourceLoc,targetLoc){assert.ok(this instanceof Mapping);assert.ok(sourceLines instanceof linesModule.Lines);SourceLocation.assert(sourceLoc);if(targetLoc){assert.ok(isNumber.check(targetLoc.start.line)&&isNumber.check(targetLoc.start.column)&&isNumber.check(targetLoc.end.line)&&isNumber.check(targetLoc.end.column))}else{targetLoc=sourceLoc}Object.defineProperties(this,{sourceLines:{value:sourceLines},sourceLoc:{value:sourceLoc},targetLoc:{value:targetLoc}})}var Mp=Mapping.prototype;module.exports=Mapping;Mp.slice=function(lines,start,end){assert.ok(lines instanceof linesModule.Lines);Position.assert(start);if(end){Position.assert(end)}else{end=lines.lastPos()}var sourceLines=this.sourceLines;var sourceLoc=this.sourceLoc;var targetLoc=this.targetLoc;function skip(name){var sourceFromPos=sourceLoc[name];var targetFromPos=targetLoc[name];var targetToPos=start;if(name==="end"){targetToPos=end}else{assert.strictEqual(name,"start")}return skipChars(sourceLines,sourceFromPos,lines,targetFromPos,targetToPos)}if(comparePos(start,targetLoc.start)<=0){if(comparePos(targetLoc.end,end)<=0){targetLoc={start:subtractPos(targetLoc.start,start.line,start.column),end:subtractPos(targetLoc.end,start.line,start.column)}}else if(comparePos(end,targetLoc.start)<=0){return null}else{sourceLoc={start:sourceLoc.start,end:skip("end")};targetLoc={start:subtractPos(targetLoc.start,start.line,start.column),end:subtractPos(end,start.line,start.column)}}}else{if(comparePos(targetLoc.end,start)<=0){return null}if(comparePos(targetLoc.end,end)<=0){sourceLoc={start:skip("start"),end:sourceLoc.end};targetLoc={start:{line:1,column:0},end:subtractPos(targetLoc.end,start.line,start.column)}}else{sourceLoc={start:skip("start"),end:skip("end")};targetLoc={start:{line:1,column:0},end:subtractPos(end,start.line,start.column)}}}return new Mapping(this.sourceLines,sourceLoc,targetLoc)};Mp.add=function(line,column){return new Mapping(this.sourceLines,this.sourceLoc,{start:addPos(this.targetLoc.start,line,column),end:addPos(this.targetLoc.end,line,column)})};function addPos(toPos,line,column){return{line:toPos.line+line-1,column:toPos.line===1?toPos.column+column:toPos.column}}Mp.subtract=function(line,column){return new Mapping(this.sourceLines,this.sourceLoc,{start:subtractPos(this.targetLoc.start,line,column),end:subtractPos(this.targetLoc.end,line,column)})};function subtractPos(fromPos,line,column){return{line:fromPos.line-line+1,column:fromPos.line===line?fromPos.column-column:fromPos.column}}Mp.indent=function(by,skipFirstLine,noNegativeColumns){if(by===0){return this}var targetLoc=this.targetLoc;var startLine=targetLoc.start.line;var endLine=targetLoc.end.line;if(skipFirstLine&&startLine===1&&endLine===1){return this}targetLoc={start:targetLoc.start,end:targetLoc.end};if(!skipFirstLine||startLine>1){var startColumn=targetLoc.start.column+by;targetLoc.start={line:startLine,column:noNegativeColumns?Math.max(0,startColumn):startColumn}}if(!skipFirstLine||endLine>1){var endColumn=targetLoc.end.column+by;targetLoc.end={line:endLine,column:noNegativeColumns?Math.max(0,endColumn):endColumn}}return new Mapping(this.sourceLines,this.sourceLoc,targetLoc)};function skipChars(sourceLines,sourceFromPos,targetLines,targetFromPos,targetToPos){assert.ok(sourceLines instanceof linesModule.Lines);assert.ok(targetLines instanceof linesModule.Lines);Position.assert(sourceFromPos);Position.assert(targetFromPos);Position.assert(targetToPos);var targetComparison=comparePos(targetFromPos,targetToPos);if(targetComparison===0){return sourceFromPos}if(targetComparison<0){var sourceCursor=sourceLines.skipSpaces(sourceFromPos);var targetCursor=targetLines.skipSpaces(targetFromPos);var lineDiff=targetToPos.line-targetCursor.line;sourceCursor.line+=lineDiff;targetCursor.line+=lineDiff;if(lineDiff>0){sourceCursor.column=0;targetCursor.column=0}else{assert.strictEqual(lineDiff,0)}while(comparePos(targetCursor,targetToPos)<0&&targetLines.nextPos(targetCursor,true)){assert.ok(sourceLines.nextPos(sourceCursor,true));assert.strictEqual(sourceLines.charAt(sourceCursor),targetLines.charAt(targetCursor))}}else{var sourceCursor=sourceLines.skipSpaces(sourceFromPos,true);var targetCursor=targetLines.skipSpaces(targetFromPos,true);var lineDiff=targetToPos.line-targetCursor.line;sourceCursor.line+=lineDiff;targetCursor.line+=lineDiff;if(lineDiff<0){sourceCursor.column=sourceLines.getLineLength(sourceCursor.line);targetCursor.column=targetLines.getLineLength(targetCursor.line)}else{assert.strictEqual(lineDiff,0)}while(comparePos(targetToPos,targetCursor)<0&&targetLines.prevPos(targetCursor,true)){assert.ok(sourceLines.prevPos(sourceCursor,true));assert.strictEqual(sourceLines.charAt(sourceCursor),targetLines.charAt(targetCursor))}}return sourceCursor}},{"./lines":508,"./types":514,"./util":515,assert:213}],510:[function(require,module,exports){var defaults={esprima:require("esprima-fb"),tabWidth:4,useTabs:false,reuseWhitespace:true,wrapColumn:74,sourceFileName:null,sourceMapName:null,sourceRoot:null,inputSourceMap:null,range:false,tolerant:true,quote:null,trailingComma:false},hasOwn=defaults.hasOwnProperty;exports.normalize=function(options){options=options||defaults;function get(key){return hasOwn.call(options,key)?options[key]:defaults[key]}return{tabWidth:+get("tabWidth"),useTabs:!!get("useTabs"),reuseWhitespace:!!get("reuseWhitespace"),wrapColumn:Math.max(get("wrapColumn"),0),sourceFileName:get("sourceFileName"),sourceMapName:get("sourceMapName"),sourceRoot:get("sourceRoot"),inputSourceMap:get("inputSourceMap"),esprima:get("esprima"),range:get("range"),tolerant:get("tolerant"),quote:get("quote"),trailingComma:get("trailingComma")}}},{"esprima-fb":212}],511:[function(require,module,exports){var assert=require("assert");var types=require("./types");var n=types.namedTypes;var b=types.builders;var isObject=types.builtInTypes.object;var isArray=types.builtInTypes.array;var isFunction=types.builtInTypes.function;var Patcher=require("./patcher").Patcher;var normalizeOptions=require("./options").normalize;var fromString=require("./lines").fromString;var attachComments=require("./comments").attach;var util=require("./util");exports.parse=function parse(source,options){options=normalizeOptions(options);var lines=fromString(source,options);var sourceWithoutTabs=lines.toString({tabWidth:options.tabWidth,reuseWhitespace:false,useTabs:false});var program=options.esprima.parse(sourceWithoutTabs,{loc:true,range:options.range,comment:true,tolerant:options.tolerant,sourceType:"module"});program.loc=util.getTrueLoc(program);var comments=program.comments;delete program.comments;var file=b.file(program);file.loc={lines:lines,indent:0,start:lines.firstPos(),end:lines.lastPos()};attachComments(comments,program.body.length?file.program:file,lines);return new TreeCopier(lines).copy(file)};function TreeCopier(lines){assert.ok(this instanceof TreeCopier);this.lines=lines;this.indent=0}var TCp=TreeCopier.prototype;TCp.copy=function(node){if(isArray.check(node)){return node.map(this.copy,this)}if(!isObject.check(node)){return node}util.fixFaultyLocations(node);var copy=Object.create(Object.getPrototypeOf(node),{original:{value:node,configurable:false,enumerable:false,writable:true}});var loc=node.loc;var oldIndent=this.indent;var newIndent=oldIndent;if(loc){if(node.type==="Block"||node.type==="Line"||this.lines.isPrecededOnlyByWhitespace(loc.start)){newIndent=this.indent=loc.start.column}loc.lines=this.lines;loc.indent=newIndent}var keys=Object.keys(node);var keyCount=keys.length;for(var i=0;i0){}else{pushSlice(sliceFrom,rep.start);toConcat.push(rep.lines);sliceFrom=rep.end}});pushSlice(sliceFrom,loc.end);return linesModule.concat(toConcat)}}exports.Patcher=Patcher;var Pp=Patcher.prototype;Pp.tryToReprintComments=function(newNode,oldNode,print){var patcher=this;if(!newNode.comments&&!oldNode.comments){return true}var newPath=FastPath.from(newNode);var oldPath=FastPath.from(oldNode);newPath.stack.push("comments",getSurroundingComments(newNode));oldPath.stack.push("comments",getSurroundingComments(oldNode));var reprints=[];var ableToReprintComments=findArrayReprints(newPath,oldPath,reprints);if(ableToReprintComments&&reprints.length>0){reprints.forEach(function(reprint){var oldComment=reprint.oldPath.getValue();assert.ok(oldComment.leading||oldComment.trailing);patcher.replace(oldComment.loc,print(reprint.newPath).indentTail(oldComment.loc.indent))})}return ableToReprintComments};function getSurroundingComments(node){var result=[];if(node.comments&&node.comments.length>0){node.comments.forEach(function(comment){if(comment.leading||comment.trailing){result.push(comment)}})}return result}Pp.deleteComments=function(node){if(!node.comments){return}var patcher=this;node.comments.forEach(function(comment){if(comment.leading){patcher.replace({start:comment.loc.start,end:node.loc.lines.skipSpaces(comment.loc.end,false,false)},"")}else if(comment.trailing){patcher.replace({start:node.loc.lines.skipSpaces(comment.loc.start,true,false),end:comment.loc.end},"")}})};exports.getReprinter=function(path){assert.ok(path instanceof FastPath);var node=path.getValue();if(!Printable.check(node))return;var orig=node.original;var origLoc=orig&&orig.loc;var lines=origLoc&&origLoc.lines;var reprints=[];if(!lines||!findReprints(path,reprints))return;return function(print){var patcher=new Patcher(lines);reprints.forEach(function(reprint){var newNode=reprint.newPath.getValue();var oldNode=reprint.oldPath.getValue();SourceLocation.assert(oldNode.loc,true);var needToPrintNewPathWithComments=!patcher.tryToReprintComments(newNode,oldNode,print);if(needToPrintNewPathWithComments){patcher.deleteComments(oldNode)}var pos=util.copyPos(oldNode.loc.start);var needsLeadingSpace=lines.prevPos(pos)&&riskyAdjoiningCharExp.test(lines.charAt(pos));var newLines=print(reprint.newPath,needToPrintNewPathWithComments).indentTail(oldNode.loc.indent);var needsTrailingSpace=riskyAdjoiningCharExp.test(lines.charAt(oldNode.loc.end));if(needsLeadingSpace||needsTrailingSpace){var newParts=[];needsLeadingSpace&&newParts.push(" ");newParts.push(newLines);needsTrailingSpace&&newParts.push(" ");newLines=linesModule.concat(newParts)}patcher.replace(oldNode.loc,newLines)});return patcher.get(origLoc).indentTail(-orig.loc.indent)}};function findReprints(newPath,reprints){var newNode=newPath.getValue();Printable.assert(newNode);var oldNode=newNode.original;Printable.assert(oldNode);assert.deepEqual(reprints,[]);if(newNode.type!==oldNode.type){return false}var oldPath=new FastPath(oldNode);var canReprint=findChildReprints(newPath,oldPath,reprints);if(!canReprint){reprints.length=0}return canReprint}function findAnyReprints(newPath,oldPath,reprints){var newNode=newPath.getValue();var oldNode=oldPath.getValue();if(newNode===oldNode)return true;if(isArray.check(newNode))return findArrayReprints(newPath,oldPath,reprints);if(isObject.check(newNode))return findObjectReprints(newPath,oldPath,reprints);return false}function findArrayReprints(newPath,oldPath,reprints){var newNode=newPath.getValue();var oldNode=oldPath.getValue();isArray.assert(newNode);var len=newNode.length;if(!(isArray.check(oldNode)&&oldNode.length===len))return false;for(var i=0;i ",path.call(print,"body"));return concat(parts);case"MethodDefinition":var parts=[];if(n.static){parts.push("static ")}parts.push(printMethod(path,options,print));return concat(parts);case"YieldExpression":var parts=["yield"];if(n.delegate)parts.push("*");if(n.argument)parts.push(" ",path.call(print,"argument"));return concat(parts);case"AwaitExpression":var parts=["await"];if(n.all)parts.push("*");if(n.argument)parts.push(" ",path.call(print,"argument"));return concat(parts);case"ModuleDeclaration":var parts=["module",path.call(print,"id")];if(n.source){assert.ok(!n.body);parts.push("from",path.call(print,"source"))}else{parts.push(path.call(print,"body"))}return fromString(" ").join(parts);case"ImportSpecifier":case"ExportSpecifier":var parts=[path.call(print,"id")];if(n.name)parts.push(" as ",path.call(print,"name"));return concat(parts);case"ExportBatchSpecifier":return fromString("*");case"ImportNamespaceSpecifier":return concat(["* as ",path.call(print,"id")]);case"ImportDefaultSpecifier":return path.call(print,"id");case"ExportDeclaration":var parts=["export"];if(n["default"]){parts.push(" default")}else if(n.specifiers&&n.specifiers.length>0){if(n.specifiers.length===1&&n.specifiers[0].type==="ExportBatchSpecifier"){parts.push(" *")}else{parts.push(" { ",fromString(", ").join(path.map(print,"specifiers"))," }")}if(n.source)parts.push(" from ",path.call(print,"source"));parts.push(";");return concat(parts)}if(n.declaration){if(!namedTypes.Node.check(n.declaration)){console.log(JSON.stringify(n,null,2))}var decLines=path.call(print,"declaration");parts.push(" ",decLines);if(lastNonSpaceCharacter(decLines)!==";"){parts.push(";")}}return concat(parts);case"ImportDeclaration":var parts=["import "];if(n.specifiers&&n.specifiers.length>0){var foundImportSpecifier=false;path.each(function(specifierPath){var i=specifierPath.getName();if(i>0){parts.push(", ")}var value=specifierPath.getValue();if(namedTypes.ImportDefaultSpecifier.check(value)||namedTypes.ImportNamespaceSpecifier.check(value)){assert.strictEqual(foundImportSpecifier,false)}else{namedTypes.ImportSpecifier.assert(value);if(!foundImportSpecifier){foundImportSpecifier=true;parts.push("{")}}parts.push(print(specifierPath))},"specifiers");if(foundImportSpecifier){parts.push("}")}parts.push(" from ")}parts.push(path.call(print,"source"),";");return concat(parts);case"BlockStatement":var naked=path.call(function(bodyPath){return printStatementSequence(bodyPath,options,print)},"body");if(naked.isEmpty()){return fromString("{}")}return concat(["{\n",naked.indent(options.tabWidth),"\n}"]);case"ReturnStatement":var parts=["return"];if(n.argument){var argLines=path.call(print,"argument");if(argLines.length>1&&(namedTypes.XJSElement&&namedTypes.XJSElement.check(n.argument)||namedTypes.JSXElement&&namedTypes.JSXElement.check(n.argument))){parts.push(" (\n",argLines.indent(options.tabWidth),"\n)")}else{parts.push(" ",argLines)}}parts.push(";");return concat(parts);case"CallExpression":return concat([path.call(print,"callee"),printArgumentsList(path,options,print)]);case"ObjectExpression":case"ObjectPattern":case"ObjectTypeAnnotation":var allowBreak=false;var isTypeAnnotation=n.type==="ObjectTypeAnnotation";var separator=isTypeAnnotation?";":",";var fields=[];if(isTypeAnnotation){fields.push("indexers","callProperties")}fields.push("properties");var len=0;fields.forEach(function(field){len+=n[field].length});var oneLine=isTypeAnnotation&&len===1||len===0;var parts=[oneLine?"{":"{\n"];fields.forEach(function(field){path.map(function(childPath){var i=childPath.getName();var lines=print(childPath);if(!oneLine){lines=lines.indent(options.tabWidth)}var multiLine=!isTypeAnnotation&&lines.length>1;if(multiLine&&allowBreak){parts.push("\n")}parts.push(lines);if(i0)parts.push(" ")}else{lines=lines.indent(options.tabWidth)}parts.push(lines);if(i1){parts.push(fromString(",\n").join(printed).indentTail(n.kind.length+1))}else{parts.push(printed[0])}var parentNode=path.getParentNode();if(!namedTypes.ForStatement.check(parentNode)&&!namedTypes.ForInStatement.check(parentNode)&&!(namedTypes.ForOfStatement&&namedTypes.ForOfStatement.check(parentNode))){parts.push(";")}return concat(parts);case"VariableDeclarator":return n.init?fromString(" = ").join([path.call(print,"id"),path.call(print,"init")]):path.call(print,"id");case"WithStatement":return concat(["with (",path.call(print,"object"),") ",path.call(print,"body")]);case"IfStatement":var con=adjustClause(path.call(print,"consequent"),options),parts=["if (",path.call(print,"test"),")",con];if(n.alternate)parts.push(endsWithBrace(con)?" else":"\nelse",adjustClause(path.call(print,"alternate"),options));return concat(parts);case"ForStatement":var init=path.call(print,"init"),sep=init.length>1?";\n":"; ",forParen="for (",indented=fromString(sep).join([init,path.call(print,"test"),path.call(print,"update")]).indentTail(forParen.length),head=concat([forParen,indented,")"]),clause=adjustClause(path.call(print,"body"),options),parts=[head];if(head.length>1){parts.push("\n");clause=clause.trimLeft()}parts.push(clause);return concat(parts);case"WhileStatement":return concat(["while (",path.call(print,"test"),")",adjustClause(path.call(print,"body"),options)]);case"ForInStatement":return concat([n.each?"for each (":"for (",path.call(print,"left")," in ",path.call(print,"right"),")",adjustClause(path.call(print,"body"),options)]);case"ForOfStatement":return concat(["for (",path.call(print,"left")," of ",path.call(print,"right"),")",adjustClause(path.call(print,"body"),options)]);case"DoWhileStatement":var doBody=concat(["do",adjustClause(path.call(print,"body"),options)]),parts=[doBody];if(endsWithBrace(doBody))parts.push(" while");else parts.push("\nwhile");parts.push(" (",path.call(print,"test"),");");return concat(parts);case"BreakStatement":var parts=["break"];if(n.label)parts.push(" ",path.call(print,"label"));parts.push(";");return concat(parts);case"ContinueStatement":var parts=["continue"];if(n.label)parts.push(" ",path.call(print,"label"));parts.push(";");return concat(parts);case"LabeledStatement":return concat([path.call(print,"label"),":\n",path.call(print,"body")]);case"TryStatement":var parts=["try ",path.call(print,"block")];if(n.handler){parts.push(" ",path.call(print,"handler"))}else if(n.handlers){path.each(function(handlerPath){parts.push(" ",print(handlerPath))},"handlers")}if(n.finalizer){parts.push(" finally ",path.call(print,"finalizer"))}return concat(parts);case"CatchClause":var parts=["catch (",path.call(print,"param")];if(n.guard)parts.push(" if ",path.call(print,"guard"));parts.push(") ",path.call(print,"body"));return concat(parts);case"ThrowStatement":return concat(["throw ",path.call(print,"argument"),";"]);case"SwitchStatement":return concat(["switch (",path.call(print,"discriminant"),") {\n",fromString("\n").join(path.map(print,"cases")),"\n}"]);case"SwitchCase":var parts=[];if(n.test)parts.push("case ",path.call(print,"test"),":");else parts.push("default:");if(n.consequent.length>0){parts.push("\n",path.call(function(consequentPath){return printStatementSequence(consequentPath,options,print)},"consequent").indent(options.tabWidth));
+}return concat(parts);case"DebuggerStatement":return fromString("debugger;");case"XJSAttribute":case"JSXAttribute":var parts=[path.call(print,"name")];if(n.value)parts.push("=",path.call(print,"value"));return concat(parts);case"XJSIdentifier":case"JSXIdentifier":return fromString(n.name,options);case"XJSNamespacedName":case"JSXNamespacedName":return fromString(":").join([path.call(print,"namespace"),path.call(print,"name")]);case"XJSMemberExpression":case"JSXMemberExpression":return fromString(".").join([path.call(print,"object"),path.call(print,"property")]);case"XJSSpreadAttribute":case"JSXSpreadAttribute":return concat(["{...",path.call(print,"argument"),"}"]);case"XJSExpressionContainer":case"JSXExpressionContainer":return concat(["{",path.call(print,"expression"),"}"]);case"XJSElement":case"JSXElement":var openingLines=path.call(print,"openingElement");if(n.openingElement.selfClosing){assert.ok(!n.closingElement);return openingLines}var childLines=concat(path.map(function(childPath){var child=childPath.getValue();if(namedTypes.Literal.check(child)&&typeof child.value==="string"){if(/\S/.test(child.value)){return child.value.replace(/^\s+|\s+$/g,"")}else if(/\n/.test(child.value)){return"\n"}}return print(childPath)},"children")).indentTail(options.tabWidth);var closingLines=path.call(print,"closingElement");return concat([openingLines,childLines,closingLines]);case"XJSOpeningElement":case"JSXOpeningElement":var parts=["<",path.call(print,"name")];var attrParts=[];path.each(function(attrPath){attrParts.push(" ",print(attrPath))},"attributes");var attrLines=concat(attrParts);var needLineWrap=attrLines.length>1||attrLines.getLineLength(1)>options.wrapColumn;if(needLineWrap){attrParts.forEach(function(part,i){if(part===" "){assert.strictEqual(i%2,0);attrParts[i]="\n"}});attrLines=concat(attrParts).indentTail(options.tabWidth)}parts.push(attrLines,n.selfClosing?" />":">");return concat(parts);case"XJSClosingElement":case"JSXClosingElement":return concat(["",path.call(print,"name"),">"]);case"XJSText":case"JSXText":return fromString(n.value,options);case"XJSEmptyExpression":case"JSXEmptyExpression":return fromString("");case"TypeAnnotatedIdentifier":return concat([path.call(print,"annotation")," ",path.call(print,"identifier")]);case"ClassBody":if(n.body.length===0){return fromString("{}")}return concat(["{\n",path.call(function(bodyPath){return printStatementSequence(bodyPath,options,print)},"body").indent(options.tabWidth),"\n}"]);case"ClassPropertyDefinition":var parts=["static ",path.call(print,"definition")];if(!namedTypes.MethodDefinition.check(n.definition))parts.push(";");return concat(parts);case"ClassProperty":return concat([path.call(print,"key"),path.call(print,"typeAnnotation"),";"]);case"ClassDeclaration":case"ClassExpression":var parts=["class"];if(n.id){parts.push(" ",path.call(print,"id"),path.call(print,"typeParameters"))}if(n.superClass){parts.push(" extends ",path.call(print,"superClass"),path.call(print,"superTypeParameters"))}if(n["implements"]){parts.push(" implements ",fromString(", ").join(path.map(print,"implements")))}parts.push(" ",path.call(print,"body"));return concat(parts);case"Node":case"Printable":case"SourceLocation":case"Position":case"Statement":case"Function":case"Pattern":case"Expression":case"Declaration":case"Specifier":case"NamedSpecifier":case"Comment":case"MemberTypeAnnotation":case"TupleTypeAnnotation":case"Type":throw new Error("unprintable type: "+JSON.stringify(n.type));case"Block":return concat(["/*",fromString(n.value,options),"*/"]);case"Line":return concat(["//",fromString(n.value,options)]);case"TypeAnnotation":var parts=[];if(n.typeAnnotation){if(n.typeAnnotation.type!=="FunctionTypeAnnotation"){parts.push(": ")}parts.push(path.call(print,"typeAnnotation"));return concat(parts)}return fromString("");case"AnyTypeAnnotation":return fromString("any",options);case"ArrayTypeAnnotation":return concat([path.call(print,"elementType"),"[]"]);case"BooleanTypeAnnotation":return fromString("boolean",options);case"DeclareClass":return concat([fromString("declare class ",options),path.call(print,"id")," ",path.call(print,"body")]);case"DeclareFunction":return concat([fromString("declare function ",options),path.call(print,"id")]);case"DeclareModule":return concat([fromString("declare module ",options),path.call(print,"id")," ",path.call(print,"body")]);case"DeclareVariable":return concat([fromString("declare var ",options),path.call(print,"id")]);case"FunctionTypeAnnotation":var parts=[];var parent=path.getParentNode(0);var isArrowFunctionTypeAnnotation=!(namedTypes.ObjectTypeCallProperty.check(parent)||namedTypes.DeclareFunction.check(path.getParentNode(2)));var needsColon=isArrowFunctionTypeAnnotation&&!namedTypes.FunctionTypeParam.check(parent);if(needsColon){parts.push(": ")}parts.push("(",fromString(", ").join(path.map(print,"params")),")");if(n.returnType){parts.push(isArrowFunctionTypeAnnotation?" => ":": ",path.call(print,"returnType"))}return concat(parts);case"FunctionTypeParam":return concat([path.call(print,"name"),": ",path.call(print,"typeAnnotation")]);case"GenericTypeAnnotation":return concat([path.call(print,"id"),path.call(print,"typeParameters")]);case"InterfaceDeclaration":var parts=[fromString("interface ",options),path.call(print,"id"),path.call(print,"typeParameters")," "];if(n["extends"]){parts.push("extends ",fromString(", ").join(path.map(print,"extends")))}parts.push(path.call(print,"body"));return concat(parts);case"ClassImplements":case"InterfaceExtends":return concat([path.call(print,"id"),path.call(print,"typeParameters")]);case"IntersectionTypeAnnotation":return fromString(" & ").join(path.map(print,"types"));case"NullableTypeAnnotation":return concat(["?",path.call(print,"typeAnnotation")]);case"NumberTypeAnnotation":return fromString("number",options);case"ObjectTypeCallProperty":return path.call(print,"value");case"ObjectTypeIndexer":return concat(["[",path.call(print,"id"),": ",path.call(print,"key"),"]: ",path.call(print,"value")]);case"ObjectTypeProperty":return concat([path.call(print,"key"),": ",path.call(print,"value")]);case"QualifiedTypeIdentifier":return concat([path.call(print,"qualification"),".",path.call(print,"id")]);case"StringLiteralTypeAnnotation":return fromString(nodeStr(n.value,options),options);case"StringTypeAnnotation":return fromString("string",options);case"TypeAlias":return concat(["type ",path.call(print,"id")," = ",path.call(print,"right")]);case"TypeCastExpression":return concat(["(",path.call(print,"expression"),path.call(print,"typeAnnotation"),")"]);case"TypeParameterDeclaration":case"TypeParameterInstantiation":return concat(["<",fromString(", ").join(path.map(print,"params")),">"]);case"TypeofTypeAnnotation":return concat([fromString("typeof ",options),path.call(print,"argument")]);case"UnionTypeAnnotation":return fromString(" | ").join(path.map(print,"types"));case"VoidTypeAnnotation":return fromString("void",options);case"ClassHeritage":case"ComprehensionBlock":case"ComprehensionExpression":case"Glob":case"TaggedTemplateExpression":case"TemplateElement":case"TemplateLiteral":case"GeneratorExpression":case"LetStatement":case"LetExpression":case"GraphExpression":case"GraphIndexExpression":case"XMLDefaultDeclaration":case"XMLAnyName":case"XMLQualifiedIdentifier":case"XMLFunctionQualifiedIdentifier":case"XMLAttributeSelector":case"XMLFilterExpression":case"XML":case"XMLElement":case"XMLList":case"XMLEscape":case"XMLText":case"XMLStartTag":case"XMLEndTag":case"XMLPointTag":case"XMLName":case"XMLAttribute":case"XMLCdata":case"XMLComment":case"XMLProcessingInstruction":default:debugger;throw new Error("unknown type: "+JSON.stringify(n.type))}return p}function printStatementSequence(path,options,print){var inClassBody=namedTypes.ClassBody&&namedTypes.ClassBody.check(path.getParentNode());var filtered=[];path.each(function(stmtPath){var i=stmtPath.getName();var stmt=stmtPath.getValue();if(!stmt){return}if(stmt.type==="EmptyStatement"){return}if(!inClassBody){namedTypes.Statement.assert(stmt)}filtered.push({node:stmt,printed:print(stmtPath)})});var prevTrailingSpace=null;var len=filtered.length;var parts=[];filtered.forEach(function(info,i){var printed=info.printed;var stmt=info.node;var needSemicolon=true;var multiLine=printed.length>1;var notFirst=i>0;var notLast=ispaceLines1.length){return spaceLines2}return spaceLines1}function printMethod(path,options,print){var node=path.getNode();var kind=node.kind;var parts=[];namedTypes.FunctionExpression.assert(node.value);if(node.value.async){parts.push("async ")}if(!kind||kind==="init"){if(node.value.generator){parts.push("*")}}else{assert.ok(kind==="get"||kind==="set");parts.push(kind," ")}var key=path.call(print,"key");if(node.computed){key=concat(["[",key,"]"])}parts.push(key,path.call(print,"value","typeParameters"),"(",path.call(function(valuePath){return printFunctionParams(valuePath,options,print)},"value"),")",path.call(print,"value","returnType")," ",path.call(print,"value","body"));return concat(parts)}function printArgumentsList(path,options,print){var printed=path.map(print,"arguments");var joined=fromString(", ").join(printed);if(joined.getLineLength(1)>options.wrapColumn){joined=fromString(",\n").join(printed);return concat(["(\n",joined.indent(options.tabWidth),options.trailingComma?",\n)":"\n)"])}return concat(["(",joined,")"])}function printFunctionParams(path,options,print){var fun=path.getValue();namedTypes.Function.assert(fun);var printed=path.map(print,"params");if(fun.defaults){path.each(function(defExprPath){var i=defExprPath.getName();var p=printed[i];if(p&&defExprPath.getValue()){printed[i]=concat([p,"=",print(defExprPath)])}},"defaults")}if(fun.rest){printed.push(concat(["...",path.call(print,"rest")]))}var joined=fromString(", ").join(printed);if(joined.length>1||joined.getLineLength(1)>options.wrapColumn){joined=fromString(",\n").join(printed);if(options.trailingComma&&!fun.rest){joined=concat([joined,",\n"])}return concat(["\n",joined.indent(options.tabWidth)])}return joined}function adjustClause(clause,options){if(clause.length>1)return concat([" ",clause]);return concat(["\n",maybeAddSemicolon(clause).indent(options.tabWidth)])}function lastNonSpaceCharacter(lines){var pos=lines.lastPos();do{var ch=lines.charAt(pos);if(/\S/.test(ch))return ch}while(lines.prevPos(pos))}function endsWithBrace(lines){return lastNonSpaceCharacter(lines)==="}"}function swapQuotes(str){return str.replace(/['"]/g,function(m){return m==='"'?"'":'"'})}function nodeStr(str,options){isString.assert(str);switch(options.quote){case"auto":var double=JSON.stringify(str);var single=swapQuotes(JSON.stringify(swapQuotes(str)));return double.length>single.length?single:double;case"single":return swapQuotes(JSON.stringify(swapQuotes(str)));case"double":default:return JSON.stringify(str)}}function maybeAddSemicolon(lines){var eoc=lastNonSpaceCharacter(lines);if(!eoc||"\n};".indexOf(eoc)<0)return concat([lines,";"]);return lines}},{"./comments":506,"./fast-path":507,"./lines":508,"./options":510,"./patcher":512,"./types":514,"./util":515,assert:213,"source-map":530}],514:[function(require,module,exports){var types=require("ast-types");var def=types.Type.def;def("File").bases("Node").build("program").field("program",def("Program"));types.finalize();module.exports=types},{"ast-types":194}],515:[function(require,module,exports){var assert=require("assert");var types=require("./types");var getFieldValue=types.getFieldValue;var n=types.namedTypes;var sourceMap=require("source-map");var SourceMapConsumer=sourceMap.SourceMapConsumer;var SourceMapGenerator=sourceMap.SourceMapGenerator;var hasOwn=Object.prototype.hasOwnProperty;function getUnionOfKeys(){var result={};var argc=arguments.length;for(var i=0;i=0;--i){var entry=this.tryEntries[i];var record=entry.completion;if(entry.tryLoc==="root"){return handle("end")}if(entry.tryLoc<=this.prev){var hasCatch=hasOwn.call(entry,"catchLoc");var hasFinally=hasOwn.call(entry,"finallyLoc");if(hasCatch&&hasFinally){if(this.prev=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=0;--i){var entry=this.tryEntries[i];if(entry.finallyLoc===finallyLoc){this.complete(entry.completion,entry.afterLoc);resetTryEntry(entry);return ContinueSentinel}}},"catch":function(tryLoc){for(var i=this.tryEntries.length-1;i>=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc===tryLoc){var record=entry.completion;if(record.type==="throw"){var thrown=record.arg;resetTryEntry(entry)}return thrown}}throw new Error("illegal catch attempt")},delegateYield:function(iterable,resultName,nextLoc){this.delegate={iterator:values(iterable),resultName:resultName,nextLoc:nextLoc};return ContinueSentinel}}}(typeof global==="object"?global:typeof window==="object"?window:typeof self==="object"?self:this)}).call(this,require("_process"),typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{_process:223}],519:[function(require,module,exports){var regenerate=require("regenerate");exports.REGULAR={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,65535),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,65535),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,65535)};exports.UNICODE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)};exports.UNICODE_IGNORE_CASE={d:regenerate().addRange(48,57),D:regenerate().addRange(0,47).addRange(58,1114111),s:regenerate(32,160,5760,6158,8239,8287,12288,65279).addRange(9,13).addRange(8192,8202).addRange(8232,8233),S:regenerate().addRange(0,8).addRange(14,31).addRange(33,159).addRange(161,5759).addRange(5761,6157).addRange(6159,8191).addRange(8203,8231).addRange(8234,8238).addRange(8240,8286).addRange(8288,12287).addRange(12289,65278).addRange(65280,1114111),w:regenerate(95,383,8490).addRange(48,57).addRange(65,90).addRange(97,122),W:regenerate(75,83,96).addRange(0,47).addRange(58,64).addRange(91,94).addRange(123,1114111)}},{regenerate:521}],520:[function(require,module,exports){module.exports={75:8490,83:383,107:8490,115:383,181:924,197:8491,383:83,452:453,453:452,455:456,456:455,458:459,459:458,497:498,498:497,837:8126,914:976,917:1013,920:1012,921:8126,922:1008,924:181,928:982,929:1009,931:962,934:981,937:8486,962:931,976:914,977:1012,981:934,982:928,1008:922,1009:929,1012:[920,977],1013:917,7776:7835,7835:7776,8126:[837,921],8486:937,8490:75,8491:197,66560:66600,66561:66601,66562:66602,66563:66603,66564:66604,66565:66605,66566:66606,66567:66607,66568:66608,66569:66609,66570:66610,66571:66611,66572:66612,66573:66613,66574:66614,66575:66615,66576:66616,66577:66617,66578:66618,66579:66619,66580:66620,66581:66621,66582:66622,66583:66623,66584:66624,66585:66625,66586:66626,66587:66627,66588:66628,66589:66629,66590:66630,66591:66631,66592:66632,66593:66633,66594:66634,66595:66635,66596:66636,66597:66637,66598:66638,66599:66639,66600:66560,66601:66561,66602:66562,66603:66563,66604:66564,66605:66565,66606:66566,66607:66567,66608:66568,66609:66569,66610:66570,66611:66571,66612:66572,66613:66573,66614:66574,66615:66575,66616:66576,66617:66577,66618:66578,66619:66579,66620:66580,66621:66581,66622:66582,66623:66583,66624:66584,66625:66585,66626:66586,66627:66587,66628:66588,66629:66589,66630:66590,66631:66591,66632:66592,66633:66593,66634:66594,66635:66595,66636:66596,66637:66597,66638:66598,66639:66599,68736:68800,68737:68801,68738:68802,68739:68803,68740:68804,68741:68805,68742:68806,68743:68807,68744:68808,68745:68809,68746:68810,68747:68811,68748:68812,68749:68813,68750:68814,68751:68815,68752:68816,68753:68817,68754:68818,68755:68819,68756:68820,68757:68821,68758:68822,68759:68823,68760:68824,68761:68825,68762:68826,68763:68827,68764:68828,68765:68829,68766:68830,68767:68831,68768:68832,68769:68833,68770:68834,68771:68835,68772:68836,68773:68837,68774:68838,68775:68839,68776:68840,68777:68841,68778:68842,68779:68843,68780:68844,68781:68845,68782:68846,68783:68847,68784:68848,68785:68849,68786:68850,68800:68736,68801:68737,68802:68738,68803:68739,68804:68740,68805:68741,68806:68742,68807:68743,68808:68744,68809:68745,68810:68746,68811:68747,68812:68748,68813:68749,68814:68750,68815:68751,68816:68752,68817:68753,68818:68754,68819:68755,68820:68756,68821:68757,68822:68758,68823:68759,68824:68760,68825:68761,68826:68762,68827:68763,68828:68764,68829:68765,68830:68766,68831:68767,68832:68768,68833:68769,68834:68770,68835:68771,68836:68772,68837:68773,68838:68774,68839:68775,68840:68776,68841:68777,68842:68778,68843:68779,68844:68780,68845:68781,68846:68782,68847:68783,68848:68784,68849:68785,68850:68786,71840:71872,71841:71873,71842:71874,71843:71875,71844:71876,71845:71877,71846:71878,71847:71879,71848:71880,71849:71881,71850:71882,71851:71883,71852:71884,71853:71885,71854:71886,71855:71887,71856:71888,71857:71889,71858:71890,71859:71891,71860:71892,71861:71893,71862:71894,71863:71895,71864:71896,71865:71897,71866:71898,71867:71899,71868:71900,71869:71901,71870:71902,71871:71903,71872:71840,71873:71841,71874:71842,71875:71843,71876:71844,71877:71845,
+71878:71846,71879:71847,71880:71848,71881:71849,71882:71850,71883:71851,71884:71852,71885:71853,71886:71854,71887:71855,71888:71856,71889:71857,71890:71858,71891:71859,71892:71860,71893:71861,71894:71862,71895:71863,71896:71864,71897:71865,71898:71866,71899:71867,71900:71868,71901:71869,71902:71870,71903:71871}},{}],521:[function(require,module,exports){(function(global){(function(root){var freeExports=typeof exports=="object"&&exports;var freeModule=typeof module=="object"&&module&&module.exports==freeExports&&module;var freeGlobal=typeof global=="object"&&global;if(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal){root=freeGlobal}var ERRORS={rangeOrder:"A range’s `stop` value must be greater than or equal "+"to the `start` value.",codePointRange:"Invalid code point value. Code points range from "+"U+000000 to U+10FFFF."};var HIGH_SURROGATE_MIN=55296;var HIGH_SURROGATE_MAX=56319;var LOW_SURROGATE_MIN=56320;var LOW_SURROGATE_MAX=57343;var regexNull=/\\x00([^0123456789]|$)/g;var object={};var hasOwnProperty=object.hasOwnProperty;var extend=function(destination,source){var key;for(key in source){if(hasOwnProperty.call(source,key)){destination[key]=source[key]}}return destination};var forEach=function(array,callback){var index=-1;var length=array.length;while(++index=start&&codePointrangeEnd){return data}if(rangeStart<=start&&rangeEnd>=end){data.splice(index,2);continue}if(rangeStart>=start&&rangeEnd=start&&rangeStart<=end){data[index+1]=rangeStart}else if(rangeEnd>=start&&rangeEnd<=end){data[index]=rangeEnd+1;return data}index+=2}return data};var dataAdd=function(data,codePoint){var index=0;var start;var end;var lastIndex=null;var length=data.length;if(codePoint<0||codePoint>1114111){throw RangeError(ERRORS.codePointRange)}while(index=start&&codePointcodePoint){data.splice(lastIndex!=null?lastIndex+2:0,0,codePoint,codePoint+1);return data}if(codePoint==end){if(codePoint+1==data[index+2]){data.splice(index,4,start,data[index+3]);return data}data[index+1]=codePoint+1;return data}lastIndex=index;index+=2}data.push(codePoint,codePoint+1);return data};var dataAddData=function(dataA,dataB){var index=0;var start;var end;var data=dataA.slice();var length=dataB.length;while(index1114111||rangeEnd<0||rangeEnd>1114111){throw RangeError(ERRORS.codePointRange)}var index=0;var start;var end;var added=false;var length=data.length;while(indexrangeEnd){return data}if(start>=rangeStart&&start<=rangeEnd){if(end>rangeStart&&end-1<=rangeEnd){data.splice(index,2);index-=2}else{data.splice(index-1,2);index-=2}}}else if(start==rangeEnd+1){data[index]=rangeStart;return data}else if(start>rangeEnd){data.splice(index,0,rangeStart,rangeEnd+1);return data}else if(rangeStart>=start&&rangeStart=start&&rangeStart=end){data[index]=rangeStart;data[index+1]=rangeEnd+1;added=true}index+=2}if(!added){data.push(rangeStart,rangeEnd+1)}return data};var dataContains=function(data,codePoint){var index=0;var length=data.length;var start=data[index];var end=data[length-1];if(length>=2){if(codePointend){return false}}while(index=start&&codePoint=40&&codePoint<=43||codePoint==45||codePoint==46||codePoint==63||codePoint>=91&&codePoint<=94||codePoint>=123&&codePoint<=125){string="\\"+stringFromCharCode(codePoint)}else if(codePoint>=32&&codePoint<=126){string=stringFromCharCode(codePoint)}else if(codePoint<=255){string="\\x"+pad(hex(codePoint),2)}else{string="\\u"+pad(hex(codePoint),4)}return string};var symbolToCodePoint=function(symbol){var length=symbol.length;var first=symbol.charCodeAt(0);var second;if(first>=HIGH_SURROGATE_MIN&&first<=HIGH_SURROGATE_MAX&&length>1){second=symbol.charCodeAt(1);return(first-HIGH_SURROGATE_MIN)*1024+second-LOW_SURROGATE_MIN+65536}return first};var createBMPCharacterClasses=function(data){var result="";var index=0;var start;var end;var length=data.length;if(dataIsSingleton(data)){return codePointToString(data[0])}while(index=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){bmp.push(start,HIGH_SURROGATE_MIN);loneHighSurrogates.push(HIGH_SURROGATE_MIN,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=HIGH_SURROGATE_MIN&&start<=HIGH_SURROGATE_MAX){if(end>=HIGH_SURROGATE_MIN&&end<=HIGH_SURROGATE_MAX){loneHighSurrogates.push(start,end+1)}if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,end+1)}if(end>LOW_SURROGATE_MAX){loneHighSurrogates.push(start,HIGH_SURROGATE_MAX+1);loneLowSurrogates.push(LOW_SURROGATE_MIN,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>=LOW_SURROGATE_MIN&&start<=LOW_SURROGATE_MAX){if(end>=LOW_SURROGATE_MIN&&end<=LOW_SURROGATE_MAX){loneLowSurrogates.push(start,end+1)}if(end>LOW_SURROGATE_MAX){loneLowSurrogates.push(start,LOW_SURROGATE_MAX+1);if(end<=65535){bmp.push(LOW_SURROGATE_MAX+1,end+1)}else{bmp.push(LOW_SURROGATE_MAX+1,65535+1);astral.push(65535+1,end+1)}}}else if(start>LOW_SURROGATE_MAX&&start<=65535){if(end<=65535){bmp.push(start,end+1)}else{bmp.push(start,65535+1);astral.push(65535+1,end+1)}}else{astral.push(start,end+1)}index+=2}return{loneHighSurrogates:loneHighSurrogates,loneLowSurrogates:loneLowSurrogates,bmp:bmp,astral:astral}};var optimizeSurrogateMappings=function(surrogateMappings){var result=[];var tmpLow=[];var addLow=false;var mapping;var nextMapping;var highSurrogates;var lowSurrogates;var nextHighSurrogates;var nextLowSurrogates;var index=-1;var length=surrogateMappings.length;while(++index1){value=slice.call(arguments)}if(this instanceof regenerate){this.data=[];return value?this.add(value):this}return(new regenerate).add(value)};regenerate.version="1.2.0";var proto=regenerate.prototype;extend(proto,{add:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataAddData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.add(item)});return $this}$this.data=dataAdd($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},remove:function(value){var $this=this;if(value==null){return $this}if(value instanceof regenerate){$this.data=dataRemoveData($this.data,value.data);return $this}if(arguments.length>1){value=slice.call(arguments)}if(isArray(value)){forEach(value,function(item){$this.remove(item)});return $this}$this.data=dataRemove($this.data,isNumber(value)?value:symbolToCodePoint(value));return $this},addRange:function(start,end){var $this=this;$this.data=dataAddRange($this.data,isNumber(start)?start:symbolToCodePoint(start),isNumber(end)?end:symbolToCodePoint(end));return $this},removeRange:function(start,end){var $this=this;var startCodePoint=isNumber(start)?start:symbolToCodePoint(start);var endCodePoint=isNumber(end)?end:symbolToCodePoint(end);$this.data=dataRemoveRange($this.data,startCodePoint,endCodePoint);return $this},intersection:function(argument){var $this=this;var array=argument instanceof regenerate?dataToArray(argument.data):argument;$this.data=dataIntersection($this.data,array);return $this},contains:function(codePoint){return dataContains(this.data,isNumber(codePoint)?codePoint:symbolToCodePoint(codePoint))},clone:function(){var set=new regenerate;set.data=this.data.slice(0);return set},toString:function(options){var result=createCharacterClassesFromData(this.data,options?options.bmpOnly:false);return result.replace(regexNull,"\\0$1")},toRegExp:function(flags){return RegExp(this.toString(),flags||"")},valueOf:function(){return dataToArray(this.data)}});proto.toArray=proto.valueOf;if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){define(function(){return regenerate})}else if(freeExports&&!freeExports.nodeType){if(freeModule){freeModule.exports=regenerate}else{freeExports.regenerate=regenerate}}else{root.regenerate=regenerate}})(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],522:[function(require,module,exports){(function(global){(function(){"use strict";var objectTypes={"function":true,object:true};var root=objectTypes[typeof window]&&window||this;var oldRoot=root;var freeExports=objectTypes[typeof exports]&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal||freeGlobal.self===freeGlobal)){root=freeGlobal}var stringFromCharCode=String.fromCharCode;var floor=Math.floor;function fromCodePoint(){var MAX_SIZE=16384;var codeUnits=[];var highSurrogate;var lowSurrogate;var index=-1;var length=arguments.length;if(!length){return""}var result="";while(++index1114111||floor(codePoint)!=codePoint){throw RangeError("Invalid code point: "+codePoint)}if(codePoint<=65535){codeUnits.push(codePoint)}else{codePoint-=65536;highSurrogate=(codePoint>>10)+55296;lowSurrogate=codePoint%1024+56320;codeUnits.push(highSurrogate,lowSurrogate)}if(index+1==length||codeUnits.length>MAX_SIZE){result+=stringFromCharCode.apply(null,codeUnits);codeUnits.length=0}}return result}function assertType(type,expected){if(expected.indexOf("|")==-1){if(type==expected){return}throw Error("Invalid node type: "+type)}expected=assertType.hasOwnProperty(expected)?assertType[expected]:assertType[expected]=RegExp("^(?:"+expected+")$");if(expected.test(type)){return}throw Error("Invalid node type: "+type)}function generate(node){var type=node.type;if(generate.hasOwnProperty(type)&&typeof generate[type]=="function"){return generate[type](node)}throw Error("Invalid node type: "+type)}function generateAlternative(node){assertType(node.type,"alternative");var terms=node.body,length=terms?terms.length:0;if(length==1){return generateTerm(terms[0])}else{var i=-1,result="";while(++i=55296&&first<=56319){second=lookahead().charCodeAt(0);if(second>=56320&&second<=57343){pos++;return createValue("symbol",(first-55296)*1024+second-56320+65536,pos-2,pos)}}}return createValue("symbol",first,pos-1,pos)}function createDisjunction(alternatives,from,to){return addRaw({type:"disjunction",body:alternatives,range:[from,to]})}function createDot(){return addRaw({type:"dot",range:[pos-1,pos]})}function createCharacterClassEscape(value){return addRaw({type:"characterClassEscape",value:value,range:[pos-2,pos]})}function createReference(matchIndex){return addRaw({type:"reference",matchIndex:parseInt(matchIndex,10),range:[pos-1-matchIndex.length,pos]})}function createGroup(behavior,disjunction,from,to){return addRaw({type:"group",behavior:behavior,body:disjunction,range:[from,to]})}function createQuantifier(min,max,from,to){if(to==null){from=pos-1;to=pos}return addRaw({type:"quantifier",min:min,max:max,greedy:true,body:null,range:[from,to]})}function createAlternative(terms,from,to){return addRaw({type:"alternative",body:terms,range:[from,to]})}function createCharacterClass(classRanges,negative,from,to){return addRaw({type:"characterClass",body:classRanges,negative:negative,range:[from,to]})}function createClassRange(min,max,from,to){if(min.codePoint>max.codePoint){throw SyntaxError("invalid range in character class")}return addRaw({type:"characterClassRange",min:min,max:max,range:[from,to]})}function flattenBody(body){if(body.type==="alternative"){return body.body}else{return[body]}}function isEmpty(obj){return obj.type==="empty"}function incr(amount){amount=amount||1;var res=str.substring(pos,pos+amount);pos+=amount||1;return res}function skip(value){if(!match(value)){throw SyntaxError("character: "+value)}}function match(value){if(str.indexOf(value,pos)===pos){return incr(value.length)}}function lookahead(){return str[pos]}function current(value){return str.indexOf(value,pos)===pos}function next(value){return str[pos+1]===value}function matchReg(regExp){var subStr=str.substring(pos);var res=subStr.match(regExp);if(res){res.range=[];res.range[0]=pos;incr(res[0].length);res.range[1]=pos}return res}function parseDisjunction(){var res=[],from=pos;res.push(parseAlternative());while(match("|")){res.push(parseAlternative())}if(res.length===1){return res[0]}return createDisjunction(res,from,pos)}function parseAlternative(){var res=[],from=pos;var term;while(term=parseTerm()){res.push(term)}if(res.length===1){return res[0]}return createAlternative(res,from,pos)}function parseTerm(){if(pos>=str.length||current("|")||current(")")){return null}var anchor=parseAnchor();if(anchor){return anchor}var atom=parseAtom();if(!atom){throw SyntaxError("Expected atom")}var quantifier=parseQuantifier()||false;if(quantifier){quantifier.body=flattenBody(atom);updateRawStart(quantifier,atom.range[0]);return quantifier}return atom}function parseGroup(matchA,typeA,matchB,typeB){var type=null,from=pos;if(match(matchA)){type=typeA}else if(match(matchB)){type=typeB}else{return false}var body=parseDisjunction();if(!body){throw SyntaxError("Expected disjunction")}skip(")");var group=createGroup(type,flattenBody(body),from,pos);if(type=="normal"){if(firstIteration){closedCaptureCounter++}}return group}function parseAnchor(){var res,from=pos;if(match("^")){return createAnchor("start",1)}else if(match("$")){return createAnchor("end",1)}else if(match("\\b")){return createAnchor("boundary",2)}else if(match("\\B")){return createAnchor("not-boundary",2)}else{return parseGroup("(?=","lookahead","(?!","negativeLookahead")}}function parseQuantifier(){var res;var quantifier;var min,max;if(match("*")){quantifier=createQuantifier(0)}else if(match("+")){quantifier=createQuantifier(1)}else if(match("?")){quantifier=createQuantifier(0,1)}else if(res=matchReg(/^\{([0-9]+)\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,min,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),\}/)){min=parseInt(res[1],10);quantifier=createQuantifier(min,undefined,res.range[0],res.range[1])}else if(res=matchReg(/^\{([0-9]+),([0-9]+)\}/)){min=parseInt(res[1],10);max=parseInt(res[2],10);if(min>max){throw SyntaxError("numbers out of order in {} quantifier")}quantifier=createQuantifier(min,max,res.range[0],res.range[1])}if(quantifier){if(match("?")){quantifier.greedy=false;quantifier.range[1]+=1}}return quantifier}function parseAtom(){var res;if(res=matchReg(/^[^^$\\.*+?(){[|]/)){return createCharacter(res)}else if(match(".")){return createDot()}else if(match("\\")){res=parseAtomEscape();if(!res){throw SyntaxError("atomEscape")}return res}else if(res=parseCharacterClass()){return res}else{return parseGroup("(?:","ignore","(","normal")}}function parseUnicodeSurrogatePairEscape(firstEscape){if(hasUnicodeFlag){var first,second;if(firstEscape.kind=="unicodeEscape"&&(first=firstEscape.codePoint)>=55296&&first<=56319&¤t("\\")&&next("u")){var prevPos=pos;pos++;var secondEscape=parseClassEscape();if(secondEscape.kind=="unicodeEscape"&&(second=secondEscape.codePoint)>=56320&&second<=57343){firstEscape.range[1]=secondEscape.range[1];firstEscape.codePoint=(first-55296)*1024+second-56320+65536;firstEscape.type="value";firstEscape.kind="unicodeCodePointEscape";addRaw(firstEscape)}else{pos=prevPos}}}return firstEscape}function parseClassEscape(){return parseAtomEscape(true)}function parseAtomEscape(insideCharacterClass){var res;res=parseDecimalEscape();if(res){return res}if(insideCharacterClass){if(match("b")){return createEscaped("singleEscape",8,"\\b")}else if(match("B")){throw SyntaxError("\\B not possible inside of CharacterClass")}}res=parseCharacterEscape();return res}function parseDecimalEscape(){var res,match;if(res=matchReg(/^(?!0)\d+/)){match=res[0];var refIdx=parseInt(res[0],10);if(refIdx<=closedCaptureCounter){return createReference(res[0])}else{backrefDenied.push(refIdx);incr(-res[0].length);if(res=matchReg(/^[0-7]{1,3}/)){return createEscaped("octal",parseInt(res[0],8),res[0],1)}else{res=createCharacter(matchReg(/^[89]/));return updateRawStart(res,res.range[0]-1)}}}else if(res=matchReg(/^[0-7]{1,3}/)){match=res[0];if(/^0{1,3}$/.test(match)){return createEscaped("null",0,"0",match.length+1)}else{return createEscaped("octal",parseInt(match,8),match,1)}}else if(res=matchReg(/^[dDsSwW]/)){return createCharacterClassEscape(res[0])}return false}function parseCharacterEscape(){var res;if(res=matchReg(/^[fnrtv]/)){var codePoint=0;switch(res[0]){case"t":codePoint=9;break;case"n":codePoint=10;break;case"v":codePoint=11;break;case"f":codePoint=12;break;case"r":codePoint=13;break}return createEscaped("singleEscape",codePoint,"\\"+res[0])}else if(res=matchReg(/^c([a-zA-Z])/)){return createEscaped("controlLetter",res[1].charCodeAt(0)%32,res[1],2)}else if(res=matchReg(/^x([0-9a-fA-F]{2})/)){return createEscaped("hexadecimalEscape",parseInt(res[1],16),res[1],2)}else if(res=matchReg(/^u([0-9a-fA-F]{4})/)){return parseUnicodeSurrogatePairEscape(createEscaped("unicodeEscape",parseInt(res[1],16),res[1],2))}else if(hasUnicodeFlag&&(res=matchReg(/^u\{([0-9a-fA-F]+)\}/))){return createEscaped("unicodeCodePointEscape",parseInt(res[1],16),res[1],4)}else{return parseIdentityEscape()}}function isIdentifierPart(ch){var NonAsciiIdentifierPart=new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]");
+return ch===36||ch===95||ch>=65&&ch<=90||ch>=97&&ch<=122||ch>=48&&ch<=57||ch===92||ch>=128&&NonAsciiIdentifierPart.test(String.fromCharCode(ch))}function parseIdentityEscape(){var ZWJ="";var ZWNJ="";var res;var tmp;if(!isIdentifierPart(lookahead())){tmp=incr();return createEscaped("identifier",tmp.charCodeAt(0),tmp,1)}if(match(ZWJ)){return createEscaped("identifier",8204,ZWJ)}else if(match(ZWNJ)){return createEscaped("identifier",8205,ZWNJ)}return null}function parseCharacterClass(){var res,from=pos;if(res=matchReg(/^\[\^/)){res=parseClassRanges();skip("]");return createCharacterClass(res,true,from,pos)}else if(match("[")){res=parseClassRanges();skip("]");return createCharacterClass(res,false,from,pos)}return null}function parseClassRanges(){var res;if(current("]")){return[]}else{res=parseNonemptyClassRanges();if(!res){throw SyntaxError("nonEmptyClassRanges")}return res}}function parseHelperClassRanges(atom){var from,to,res;if(current("-")&&!next("]")){skip("-");res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}to=pos;var classRanges=parseClassRanges();if(!classRanges){throw SyntaxError("classRanges")}from=atom.range[0];if(classRanges.type==="empty"){return[createClassRange(atom,res,from,to)]}return[createClassRange(atom,res,from,to)].concat(classRanges)}res=parseNonemptyClassRangesNoDash();if(!res){throw SyntaxError("nonEmptyClassRangesNoDash")}return[atom].concat(res)}function parseNonemptyClassRanges(){var atom=parseClassAtom();if(!atom){throw SyntaxError("classAtom")}if(current("]")){return[atom]}return parseHelperClassRanges(atom)}function parseNonemptyClassRangesNoDash(){var res=parseClassAtom();if(!res){throw SyntaxError("classAtom")}if(current("]")){return res}return parseHelperClassRanges(res)}function parseClassAtom(){if(match("-")){return createCharacter("-")}else{return parseClassAtomNoDash()}}function parseClassAtomNoDash(){var res;if(res=matchReg(/^[^\\\]-]/)){return createCharacter(res[0])}else if(match("\\")){res=parseClassEscape();if(!res){throw SyntaxError("classEscape")}return parseUnicodeSurrogatePairEscape(res)}}var backrefDenied=[];var closedCaptureCounter=0;var firstIteration=true;var hasUnicodeFlag=(flags||"").indexOf("u")!==-1;var pos=0;str=String(str);if(str===""){str="(?:)"}var result=parseDisjunction();if(result.range[1]!==str.length){throw SyntaxError("Could not parse entire input - got stuck: "+str)}for(var i=0;i-1:false;unicode=flags?flags.indexOf("u")>-1:false;assign(tree,processTerm(tree));return generate(tree)}},{"./data/character-class-escape-sets.js":519,"./data/iu-mappings.json":520,regenerate:521,regjsgen:522,regjsparser:523}],525:[function(require,module,exports){"use strict";var isFinite=require("is-finite");module.exports=function(str,n){if(typeof str!=="string"){throw new TypeError("Expected a string as the first argument")}if(n<0||!isFinite(n)){throw new TypeError("Expected a finite positive number")}var ret="";do{if(n&1){ret+=str}str+=str}while(n=n>>1);return ret}},{"is-finite":526}],526:[function(require,module,exports){arguments[4][351][0].apply(exports,arguments)},{dup:351,"number-is-nan":527}],527:[function(require,module,exports){arguments[4][352][0].apply(exports,arguments)},{dup:352}],528:[function(require,module,exports){"use strict";module.exports=/^#!.*/},{}],529:[function(require,module,exports){"use strict";module.exports=function(str){var isExtendedLengthPath=/^\\\\\?\\/.test(str);var hasNonAscii=/[^\x00-\x80]+/.test(str);if(isExtendedLengthPath||hasNonAscii){return str}return str.replace(/\\/g,"/")}},{}],530:[function(require,module,exports){exports.SourceMapGenerator=require("./source-map/source-map-generator").SourceMapGenerator;exports.SourceMapConsumer=require("./source-map/source-map-consumer").SourceMapConsumer;exports.SourceNode=require("./source-map/source-node").SourceNode},{"./source-map/source-map-consumer":536,"./source-map/source-map-generator":537,"./source-map/source-node":538}],531:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function ArraySet(){this._array=[];this._set={}}ArraySet.fromArray=function ArraySet_fromArray(aArray,aAllowDuplicates){var set=new ArraySet;for(var i=0,len=aArray.length;i=0&&aIdx>1;return isNegative?-shifted:shifted}exports.encode=function base64VLQ_encode(aValue){var encoded="";var digit;var vlq=toVLQSigned(aValue);do{digit=vlq&VLQ_BASE_MASK;vlq>>>=VLQ_BASE_SHIFT;if(vlq>0){digit|=VLQ_CONTINUATION_BIT}encoded+=base64.encode(digit)}while(vlq>0);return encoded};exports.decode=function base64VLQ_decode(aStr,aIndex,aOutParam){var strLen=aStr.length;var result=0;var shift=0;var continuation,digit;do{if(aIndex>=strLen){throw new Error("Expected more digits in base 64 VLQ value.")}digit=base64.decode(aStr.charAt(aIndex++));continuation=!!(digit&VLQ_CONTINUATION_BIT);digit&=VLQ_BASE_MASK;result=result+(digit<0){if(aHigh-mid>1){return recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return aHigh1){return recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare,aBias)}if(aBias==exports.LEAST_UPPER_BOUND){return mid}else{return aLow<0?-1:aLow}}}exports.search=function search(aNeedle,aHaystack,aCompare,aBias){if(aHaystack.length===0){return-1}var index=recursiveSearch(-1,aHaystack.length,aNeedle,aHaystack,aCompare,aBias||exports.GREATEST_LOWER_BOUND);if(index<0){return-1}while(index-1>=0){if(aCompare(aHaystack[index],aHaystack[index-1],true)!==0){break}--index}return index}})},{amdefine:540}],535:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");function generatedPositionAfter(mappingA,mappingB){var lineA=mappingA.generatedLine;var lineB=mappingB.generatedLine;var columnA=mappingA.generatedColumn;var columnB=mappingB.generatedColumn;return lineB>lineA||lineB==lineA&&columnB>=columnA||util.compareByGeneratedPositions(mappingA,mappingB)<=0}function MappingList(){this._array=[];this._sorted=true;this._last={generatedLine:-1,generatedColumn:0}}MappingList.prototype.unsortedForEach=function MappingList_forEach(aCallback,aThisArg){this._array.forEach(aCallback,aThisArg)};MappingList.prototype.add=function MappingList_add(aMapping){var mapping;if(generatedPositionAfter(this._last,aMapping)){this._last=aMapping;this._array.push(aMapping)}else{this._sorted=false;this._array.push(aMapping)}};MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(util.compareByGeneratedPositions);this._sorted=true}return this._array};exports.MappingList=MappingList})},{"./util":539,amdefine:540}],536:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var util=require("./util");var binarySearch=require("./binary-search");var ArraySet=require("./array-set").ArraySet;var base64VLQ=require("./base64-vlq");function SourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}return sourceMap.sections!=null?new IndexedSourceMapConsumer(sourceMap):new BasicSourceMapConsumer(sourceMap)}SourceMapConsumer.fromSourceMap=function(aSourceMap){return BasicSourceMapConsumer.fromSourceMap(aSourceMap)};SourceMapConsumer.prototype._version=3;SourceMapConsumer.prototype.__generatedMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_generatedMappings",{get:function(){if(!this.__generatedMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__generatedMappings}});SourceMapConsumer.prototype.__originalMappings=null;Object.defineProperty(SourceMapConsumer.prototype,"_originalMappings",{get:function(){if(!this.__originalMappings){this.__generatedMappings=[];this.__originalMappings=[];this._parseMappings(this._mappings,this.sourceRoot)}return this.__originalMappings}});SourceMapConsumer.prototype._nextCharIsMappingSeparator=function SourceMapConsumer_nextCharIsMappingSeparator(aStr,index){var c=aStr.charAt(index);return c===";"||c===","};SourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){throw new Error("Subclasses must implement _parseMappings")};SourceMapConsumer.GENERATED_ORDER=1;SourceMapConsumer.ORIGINAL_ORDER=2;SourceMapConsumer.GREATEST_LOWER_BOUND=1;SourceMapConsumer.LEAST_UPPER_BOUND=2;SourceMapConsumer.prototype.eachMapping=function SourceMapConsumer_eachMapping(aCallback,aContext,aOrder){var context=aContext||null;var order=aOrder||SourceMapConsumer.GENERATED_ORDER;var mappings;switch(order){case SourceMapConsumer.GENERATED_ORDER:mappings=this._generatedMappings;break;case SourceMapConsumer.ORIGINAL_ORDER:mappings=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var sourceRoot=this.sourceRoot;mappings.map(function(mapping){var source=mapping.source;if(source!=null&&sourceRoot!=null){source=util.join(sourceRoot,source)}return{source:source,generatedLine:mapping.generatedLine,generatedColumn:mapping.generatedColumn,originalLine:mapping.originalLine,originalColumn:mapping.originalColumn,name:mapping.name}}).forEach(aCallback,context)};SourceMapConsumer.prototype.allGeneratedPositionsFor=function SourceMapConsumer_allGeneratedPositionsFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column",0)};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var mappings=[];var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,binarySearch.LEAST_UPPER_BOUND);if(index>=0){var mapping=this._originalMappings[index];var originalLine=mapping.originalLine;var originalColumn=mapping.originalColumn;while(mapping&&mapping.originalLine===originalLine&&(aArgs.column===undefined||mapping.originalColumn===originalColumn)){mappings.push({line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)});mapping=this._originalMappings[++index]}}return mappings};exports.SourceMapConsumer=SourceMapConsumer;function BasicSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sources=util.getArg(sourceMap,"sources");var names=util.getArg(sourceMap,"names",[]);var sourceRoot=util.getArg(sourceMap,"sourceRoot",null);var sourcesContent=util.getArg(sourceMap,"sourcesContent",null);var mappings=util.getArg(sourceMap,"mappings");var file=util.getArg(sourceMap,"file",null);if(version!=this._version){throw new Error("Unsupported version: "+version)}sources=sources.map(util.normalize);this._names=ArraySet.fromArray(names,true);this._sources=ArraySet.fromArray(sources,true);this.sourceRoot=sourceRoot;this.sourcesContent=sourcesContent;this._mappings=mappings;this.file=file}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;BasicSourceMapConsumer.fromSourceMap=function SourceMapConsumer_fromSourceMap(aSourceMap){var smc=Object.create(BasicSourceMapConsumer.prototype);smc._names=ArraySet.fromArray(aSourceMap._names.toArray(),true);smc._sources=ArraySet.fromArray(aSourceMap._sources.toArray(),true);smc.sourceRoot=aSourceMap._sourceRoot;smc.sourcesContent=aSourceMap._generateSourcesContent(smc._sources.toArray(),smc.sourceRoot);smc.file=aSourceMap._file;smc.__generatedMappings=aSourceMap._mappings.toArray().slice();smc.__originalMappings=aSourceMap._mappings.toArray().slice().sort(util.compareByOriginalPositions);return smc};BasicSourceMapConsumer.prototype._version=3;Object.defineProperty(BasicSourceMapConsumer.prototype,"sources",{get:function(){return this._sources.toArray().map(function(s){return this.sourceRoot!=null?util.join(this.sourceRoot,s):s},this)}});BasicSourceMapConsumer.prototype._parseMappings=function SourceMapConsumer_parseMappings(aStr,aSourceRoot){var generatedLine=1;var previousGeneratedColumn=0;var previousOriginalLine=0;var previousOriginalColumn=0;var previousSource=0;var previousName=0;var length=aStr.length;var index=0;var cachedValues={};var temp={};var mapping,str,values,end,value;while(index1){mapping.source=this._sources.at(previousSource+values[1]);previousSource+=values[1];if(values.length===2){throw new Error("Found a source, but no line and column")}mapping.originalLine=previousOriginalLine+values[2];previousOriginalLine=mapping.originalLine;mapping.originalLine+=1;if(values.length===3){throw new Error("Found a source and line, but no column")}mapping.originalColumn=previousOriginalColumn+values[3];previousOriginalColumn=mapping.originalColumn;if(values.length>4){mapping.name=this._names.at(previousName+values[4]);previousName+=values[4]}}this.__generatedMappings.push(mapping);if(typeof mapping.originalLine==="number"){this.__originalMappings.push(mapping)}}}this.__generatedMappings.sort(util.compareByGeneratedPositions);this.__originalMappings.sort(util.compareByOriginalPositions)};BasicSourceMapConsumer.prototype._findMapping=function SourceMapConsumer_findMapping(aNeedle,aMappings,aLineName,aColumnName,aComparator,aBias){if(aNeedle[aLineName]<=0){throw new TypeError("Line must be greater than or equal to 1, got "+aNeedle[aLineName])}if(aNeedle[aColumnName]<0){throw new TypeError("Column must be greater than or equal to 0, got "+aNeedle[aColumnName])}return binarySearch.search(aNeedle,aMappings,aComparator,aBias)};BasicSourceMapConsumer.prototype.computeColumnSpans=function SourceMapConsumer_computeColumnSpans(){for(var index=0;index=0){var mapping=this._generatedMappings[index];if(mapping.generatedLine===needle.generatedLine){var source=util.getArg(mapping,"source",null);if(source!=null&&this.sourceRoot!=null){source=util.join(this.sourceRoot,source)}return{source:source,line:util.getArg(mapping,"originalLine",null),column:util.getArg(mapping,"originalColumn",null),name:util.getArg(mapping,"name",null)}}}return{source:null,line:null,column:null,name:null}};BasicSourceMapConsumer.prototype.sourceContentFor=function SourceMapConsumer_sourceContentFor(aSource,nullOnMissing){if(!this.sourcesContent){return null}if(this.sourceRoot!=null){aSource=util.relative(this.sourceRoot,aSource)}if(this._sources.has(aSource)){return this.sourcesContent[this._sources.indexOf(aSource)]}var url;if(this.sourceRoot!=null&&(url=util.urlParse(this.sourceRoot))){var fileUriAbsPath=aSource.replace(/^file:\/\//,"");if(url.scheme=="file"&&this._sources.has(fileUriAbsPath)){return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]}if((!url.path||url.path=="/")&&this._sources.has("/"+aSource)){return this.sourcesContent[this._sources.indexOf("/"+aSource)]}}if(nullOnMissing){return null}else{throw new Error('"'+aSource+'" is not in the SourceMap.')}};BasicSourceMapConsumer.prototype.generatedPositionFor=function SourceMapConsumer_generatedPositionFor(aArgs){var needle={source:util.getArg(aArgs,"source"),originalLine:util.getArg(aArgs,"line"),originalColumn:util.getArg(aArgs,"column")};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source)}var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,util.getArg(aArgs,"bias",SourceMapConsumer.GREATEST_LOWER_BOUND));if(index>=0){var mapping=this._originalMappings[index];if(mapping.source===needle.source){return{line:util.getArg(mapping,"generatedLine",null),column:util.getArg(mapping,"generatedColumn",null),lastColumn:util.getArg(mapping,"lastGeneratedColumn",null)}}}return{line:null,column:null,lastColumn:null}};exports.BasicSourceMapConsumer=BasicSourceMapConsumer;function IndexedSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==="string"){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,""))}var version=util.getArg(sourceMap,"version");var sections=util.getArg(sourceMap,"sections");if(version!=this._version){throw new Error("Unsupported version: "+version)}var lastOffset={line:-1,column:0};this._sections=sections.map(function(s){if(s.url){throw new Error("Support for url field in sections not implemented.")}var offset=util.getArg(s,"offset");var offsetLine=util.getArg(offset,"line");var offsetColumn=util.getArg(offset,"column");if(offsetLine0&&aGenerated.column>=0&&!aOriginal&&!aSource&&!aName){return}else if(aGenerated&&"line"in aGenerated&&"column"in aGenerated&&aOriginal&&"line"in aOriginal&&"column"in aOriginal&&aGenerated.line>0&&aGenerated.column>=0&&aOriginal.line>0&&aOriginal.column>=0&&aSource){return}else{throw new Error("Invalid mapping: "+JSON.stringify({generated:aGenerated,source:aSource,original:aOriginal,name:aName}))}};SourceMapGenerator.prototype._serializeMappings=function SourceMapGenerator_serializeMappings(){var previousGeneratedColumn=0;var previousGeneratedLine=1;var previousOriginalColumn=0;var previousOriginalLine=0;var previousName=0;var previousSource=0;var result="";var mapping;var mappings=this._mappings.toArray();for(var i=0,len=mappings.length;i0){if(!util.compareByGeneratedPositions(mapping,mappings[i-1])){continue}result+=","}}result+=base64VLQ.encode(mapping.generatedColumn-previousGeneratedColumn);previousGeneratedColumn=mapping.generatedColumn;if(mapping.source!=null){result+=base64VLQ.encode(this._sources.indexOf(mapping.source)-previousSource);previousSource=this._sources.indexOf(mapping.source);result+=base64VLQ.encode(mapping.originalLine-1-previousOriginalLine);previousOriginalLine=mapping.originalLine-1;result+=base64VLQ.encode(mapping.originalColumn-previousOriginalColumn);previousOriginalColumn=mapping.originalColumn;if(mapping.name!=null){result+=base64VLQ.encode(this._names.indexOf(mapping.name)-previousName);previousName=this._names.indexOf(mapping.name)}}}return result};SourceMapGenerator.prototype._generateSourcesContent=function SourceMapGenerator_generateSourcesContent(aSources,aSourceRoot){return aSources.map(function(source){if(!this._sourcesContents){return null}if(aSourceRoot!=null){source=util.relative(aSourceRoot,source)}var key=util.toSetString(source);return Object.prototype.hasOwnProperty.call(this._sourcesContents,key)?this._sourcesContents[key]:null},this)};SourceMapGenerator.prototype.toJSON=function SourceMapGenerator_toJSON(){var map={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};if(this._file!=null){map.file=this._file}if(this._sourceRoot!=null){map.sourceRoot=this._sourceRoot}if(this._sourcesContents){map.sourcesContent=this._generateSourcesContent(map.sources,map.sourceRoot)}return map};SourceMapGenerator.prototype.toString=function SourceMapGenerator_toString(){return JSON.stringify(this.toJSON())};exports.SourceMapGenerator=SourceMapGenerator})},{"./array-set":531,"./base64-vlq":532,"./mapping-list":535,"./util":539,amdefine:540}],538:[function(require,module,exports){if(typeof define!=="function"){var define=require("amdefine")(module,require)}define(function(require,exports,module){var SourceMapGenerator=require("./source-map-generator").SourceMapGenerator;var util=require("./util");var REGEX_NEWLINE=/(\r?\n)/;var NEWLINE_CODE=10;var isSourceNode="$$$isSourceNode$$$";function SourceNode(aLine,aColumn,aSource,aChunks,aName){this.children=[];this.sourceContents={};this.line=aLine==null?null:aLine;this.column=aColumn==null?null:aColumn;this.source=aSource==null?null:aSource;this.name=aName==null?null:aName;this[isSourceNode]=true;if(aChunks!=null)this.add(aChunks)}SourceNode.fromStringWithSourceMap=function SourceNode_fromStringWithSourceMap(aGeneratedCode,aSourceMapConsumer,aRelativePath){var node=new SourceNode;var remainingLines=aGeneratedCode.split(REGEX_NEWLINE);var shiftNextLine=function(){var lineContents=remainingLines.shift();var newLine=remainingLines.shift()||"";return lineContents+newLine};var lastGeneratedLine=1,lastGeneratedColumn=0;var lastMapping=null;aSourceMapConsumer.eachMapping(function(mapping){if(lastMapping!==null){if(lastGeneratedLine0){if(lastMapping){addMappingWithCode(lastMapping,shiftNextLine())}node.add(remainingLines.join(""))}aSourceMapConsumer.sources.forEach(function(sourceFile){var content=aSourceMapConsumer.sourceContentFor(sourceFile);if(content!=null){if(aRelativePath!=null){sourceFile=util.join(aRelativePath,sourceFile)}node.setSourceContent(sourceFile,content)}});return node;function addMappingWithCode(mapping,code){if(mapping===null||mapping.source===undefined){node.add(code)}else{var source=aRelativePath?util.join(aRelativePath,mapping.source):mapping.source;node.add(new SourceNode(mapping.originalLine,mapping.originalColumn,source,code,mapping.name))}}};SourceNode.prototype.add=function SourceNode_add(aChunk){if(Array.isArray(aChunk)){aChunk.forEach(function(chunk){this.add(chunk)},this)}else if(aChunk[isSourceNode]||typeof aChunk==="string"){if(aChunk){this.children.push(aChunk)}}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.prepend=function SourceNode_prepend(aChunk){if(Array.isArray(aChunk)){for(var i=aChunk.length-1;i>=0;i--){this.prepend(aChunk[i])}}else if(aChunk[isSourceNode]||typeof aChunk==="string"){this.children.unshift(aChunk)}else{throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+aChunk)}return this};SourceNode.prototype.walk=function SourceNode_walk(aFn){var chunk;for(var i=0,len=this.children.length;i0){newChildren=[];for(i=0;i=0;i--){part=parts[i];if(part==="."){parts.splice(i,1)}else if(part===".."){up++}else if(up>0){if(part===""){parts.splice(i+1,up);up=0}else{parts.splice(i,2);up--}}}path=parts.join("/");if(path===""){path=isAbsolute?"/":"."}if(url){url.path=path;return urlGenerate(url)}return path}exports.normalize=normalize;function join(aRoot,aPath){if(aRoot===""){aRoot="."}if(aPath===""){aPath="."}var aPathUrl=urlParse(aPath);var aRootUrl=urlParse(aRoot);if(aRootUrl){aRoot=aRootUrl.path||"/"}if(aPathUrl&&!aPathUrl.scheme){if(aRootUrl){aPathUrl.scheme=aRootUrl.scheme}return urlGenerate(aPathUrl)}if(aPathUrl||aPath.match(dataUrlRegexp)){return aPath}if(aRootUrl&&!aRootUrl.host&&!aRootUrl.path){aRootUrl.host=aPath;return urlGenerate(aRootUrl)}var joined=aPath.charAt(0)==="/"?aPath:normalize(aRoot.replace(/\/+$/,"")+"/"+aPath);if(aRootUrl){aRootUrl.path=joined;return urlGenerate(aRootUrl)}return joined}exports.join=join;function relative(aRoot,aPath){if(aRoot===""){aRoot="."}aRoot=aRoot.replace(/\/$/,"");var url=urlParse(aRoot);if(aPath.charAt(0)=="/"&&url&&url.path=="/"){return aPath.slice(1)}return aPath.indexOf(aRoot+"/")===0?aPath.substr(aRoot.length+1):aPath}exports.relative=relative;function toSetString(aStr){return"$"+aStr}exports.toSetString=toSetString;function fromSetString(aStr){return aStr.substr(1)}exports.fromSetString=fromSetString;function strcmp(aStr1,aStr2){var s1=aStr1||"";var s2=aStr2||"";return(s1>s2)-(s10){ary.splice(i-1,2);i-=2}}}}function normalize(name,baseName){var baseParts;if(name&&name.charAt(0)==="."){if(baseName){baseParts=baseName.split("/");baseParts=baseParts.slice(0,baseParts.length-1);baseParts=baseParts.concat(name.split("/"));trimDots(baseParts);name=baseParts.join("/")}}return name}function makeNormalize(relName){return function(name){return normalize(name,relName)}}function makeLoad(id){function load(value){loaderCache[id]=value}load.fromText=function(id,text){throw new Error("amdefine does not implement load.fromText")};return load}makeRequire=function(systemRequire,exports,module,relId){function amdRequire(deps,callback){if(typeof deps==="string"){return stringRequire(systemRequire,exports,module,deps,relId)}else{deps=deps.map(function(depName){return stringRequire(systemRequire,exports,module,depName,relId)});if(callback){process.nextTick(function(){callback.apply(null,deps)})}}}amdRequire.toUrl=function(filePath){if(filePath.indexOf(".")===0){return normalize(filePath,path.dirname(module.filename))}else{return filePath}};return amdRequire};requireFn=requireFn||function req(){return module.require.apply(module,arguments)};function runFactory(id,deps,factory){var r,e,m,result;if(id){e=loaderCache[id]={};m={id:id,uri:__filename,exports:e};r=makeRequire(requireFn,e,m,id)}else{if(alreadyCalled){throw new Error("amdefine with no module ID cannot be called more than once per file.")}alreadyCalled=true;e=module.exports;m=module;r=makeRequire(requireFn,e,m,module.id)}if(deps){deps=deps.map(function(depName){return r(depName)})}if(typeof factory==="function"){result=factory.apply(m.exports,deps)}else{result=factory}if(result!==undefined){m.exports=result;if(id){loaderCache[id]=m.exports}}}stringRequire=function(systemRequire,exports,module,id,relId){var index=id.indexOf("!"),originalId=id,prefix,plugin;if(index===-1){id=normalize(id,relId);if(id==="require"){return makeRequire(systemRequire,exports,module,relId)}else if(id==="exports"){return exports}else if(id==="module"){return module}else if(loaderCache.hasOwnProperty(id)){return loaderCache[id]}else if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}else{if(systemRequire){return systemRequire(originalId)}else{throw new Error("No module with ID: "+id)}}}else{prefix=id.substring(0,index);id=id.substring(index+1,id.length);plugin=stringRequire(systemRequire,exports,module,prefix,relId);if(plugin.normalize){id=plugin.normalize(id,makeNormalize(relId))}else{id=normalize(id,relId)}if(loaderCache[id]){return loaderCache[id]}else{plugin.load(id,makeRequire(systemRequire,exports,module,relId),makeLoad(id),{});return loaderCache[id]}}};function define(id,deps,factory){if(Array.isArray(id)){factory=deps;deps=id;id=undefined}else if(typeof id!=="string"){factory=id;id=deps=undefined}if(deps&&!Array.isArray(deps)){factory=deps;deps=undefined}if(!deps){deps=["require","exports","module"]}if(id){defineCache[id]=[id,deps,factory]}else{runFactory(id,deps,factory)}}define.require=function(id){if(loaderCache[id]){return loaderCache[id]}if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id]}};define.amd={};return define}module.exports=amdefine}).call(this,require("_process"),"/node_modules/source-map/node_modules/amdefine/amdefine.js")},{_process:223,path:222}],541:[function(require,module,exports){(function(){"use strict";function stripJsonComments(str){var currentChar;var nextChar;var insideString=false;var insideComment=false;var ret="";for(var i=0;i",homepage:"https://babeljs.io/",license:"MIT",repository:"babel/babel",browser:{"./lib/babel/api/register/node.js":"./lib/babel/api/register/browser.js"},keywords:["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var"],scripts:{bench:"make bench",test:"make test"},dependencies:{"acorn-jsx":"^1.0.0","ast-types":"~0.7.0","babel-plugin-constant-folding":"^1.0.1","babel-plugin-dead-code-elimination":"^1.0.2","babel-plugin-eval":"^1.0.1","babel-plugin-inline-environment-variables":"^1.0.1","babel-plugin-jscript":"^1.0.1","babel-plugin-member-expression-literals":"^1.0.1","babel-plugin-property-literals":"^1.0.1","babel-plugin-proto-to-assign":"^1.0.3","babel-plugin-react-constant-elements":"^1.0.3","babel-plugin-react-display-name":"^1.0.3","babel-plugin-remove-console":"^1.0.1","babel-plugin-remove-debugger":"^1.0.1","babel-plugin-runtime":"^1.0.7","babel-plugin-undeclared-variables-check":"^1.0.2","babel-plugin-undefined-to-void":"^1.1.6",chalk:"^1.0.0","convert-source-map":"^1.1.0","core-js":"^0.9.0",debug:"^2.1.1","detect-indent":"^3.0.0",estraverse:"^4.0.0",esutils:"^2.0.0","fs-readdir-recursive":"^0.1.0",globals:"^6.4.0","home-or-tmp":"^1.0.0","is-integer":"^1.0.4","js-tokens":"1.0.1","line-numbers":"0.2.0",lodash:"^3.6.0",minimatch:"^2.0.3","output-file-sync":"^1.1.0","path-exists":"^1.0.0","path-is-absolute":"^1.0.0","private":"^0.1.6",regenerator:"0.8.31",regexpu:"^1.1.2",repeating:"^1.1.2",resolve:"^1.1.6","shebang-regex":"^1.0.0",slash:"^1.0.0","source-map":"^0.4.0","source-map-support":"^0.2.10","strip-json-comments":"^1.0.2","to-fast-properties":"^1.0.0","trim-right":"^1.0.0"},devDependencies:{babel:"5.6.10","babel-eslint":"^3.1.19",browserify:"^9.0.8",chai:"^2.2.0",eslint:"^0.21.2",esvalid:"^1.1.0",istanbul:"^0.3.5",matcha:"^0.6.0",mocha:"2.2.0",rimraf:"^2.3.2","uglify-js":"^2.4.16"}}},{}],545:[function(require,module,exports){module.exports={"abstract-expression-call":{body:[{expression:{callee:{object:{callee:{object:{name:"PROPERTY",type:"Identifier"},property:{object:{name:"Symbol",type:"Identifier"},property:{name:"referenceGet",type:"Identifier"},computed:false,type:"MemberExpression"},computed:true,type:"MemberExpression"},arguments:[{name:"OBJECT",type:"Identifier"}],type:"CallExpression"},property:{name:"call",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"OBJECT",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"abstract-expression-delete":{body:[{expression:{callee:{object:{name:"PROPERTY",type:"Identifier"},property:{object:{name:"Symbol",type:"Identifier"},property:{name:"referenceDelete",type:"Identifier"},computed:false,type:"MemberExpression"},computed:true,type:"MemberExpression"},arguments:[{name:"OBJECT",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"abstract-expression-get":{body:[{expression:{callee:{object:{name:"PROPERTY",type:"Identifier"},property:{object:{name:"Symbol",type:"Identifier"},property:{name:"referenceGet",type:"Identifier"},computed:false,type:"MemberExpression"},computed:true,type:"MemberExpression"},arguments:[{name:"OBJECT",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"abstract-expression-set":{body:[{expression:{callee:{object:{name:"PROPERTY",type:"Identifier"},property:{object:{name:"Symbol",type:"Identifier"},property:{name:"referenceSet",type:"Identifier"},computed:false,type:"MemberExpression"},computed:true,type:"MemberExpression"},arguments:[{name:"OBJECT",type:"Identifier"},{name:"VALUE",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"array-comprehension-container":{body:[{expression:{callee:{id:null,generator:false,expression:false,params:[],body:{body:[{declarations:[{id:{name:"KEY",type:"Identifier"},init:{elements:[],type:"ArrayExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{argument:{name:"KEY",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},arguments:[],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"array-from":{body:[{expression:{callee:{object:{name:"Array",type:"Identifier"},property:{name:"from",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"VALUE",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"array-push":{body:[{expression:{callee:{object:{name:"KEY",type:"Identifier"},property:{name:"push",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"STATEMENT",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},call:{body:[{expression:{callee:{object:{name:"OBJECT",type:"Identifier"},property:{name:"call",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"CONTEXT",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"class-decorator":{body:[{expression:{operator:"=",left:{name:"CLASS_REF",type:"Identifier"},right:{left:{callee:{name:"DECORATOR",type:"Identifier"},arguments:[{name:"CLASS_REF",type:"Identifier"}],type:"CallExpression"},operator:"||",right:{name:"CLASS_REF",type:"Identifier"},type:"LogicalExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"Program"},"class-derived-default-constructor":{body:[{expression:{id:null,generator:false,expression:false,params:[],body:{body:[{expression:{callee:{type:"Super"},arguments:[{argument:{name:"arguments",type:"Identifier"},type:"SpreadElement"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"default-parameter-assign":{body:[{test:{left:{name:"VARIABLE_NAME",type:"Identifier"},operator:"===",right:{name:"undefined",type:"Identifier"},type:"BinaryExpression"},consequent:{expression:{operator:"=",left:{name:"VARIABLE_NAME",type:"Identifier"},right:{name:"DEFAULT_VALUE",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"},alternate:null,type:"IfStatement"}],type:"Program"},"default-parameter":{body:[{declarations:[{id:{name:"VARIABLE_NAME",type:"Identifier"},init:{test:{left:{object:{name:"ARGUMENTS",type:"Identifier"},property:{name:"ARGUMENT_KEY",type:"Identifier"},computed:true,type:"MemberExpression"},operator:"===",right:{name:"undefined",type:"Identifier"},type:"BinaryExpression"},consequent:{name:"DEFAULT_VALUE",type:"Identifier"},alternate:{object:{name:"ARGUMENTS",type:"Identifier"},property:{name:"ARGUMENT_KEY",type:"Identifier"},computed:true,type:"MemberExpression"},type:"ConditionalExpression"},type:"VariableDeclarator"}],kind:"let",type:"VariableDeclaration"}],type:"Program"},"exports-assign":{body:[{expression:{operator:"=",left:{object:{name:"exports",type:"Identifier"},property:{name:"KEY",type:"Identifier"},computed:false,type:"MemberExpression"},right:{name:"VALUE",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"Program"},"exports-default-assign":{body:[{expression:{operator:"=",left:{object:{name:"module",type:"Identifier"},property:{name:"exports",type:"Identifier"},computed:false,type:"MemberExpression"},right:{name:"VALUE",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"Program"},"exports-from-assign":{body:[{expression:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"defineProperty",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"exports",type:"Identifier"},{name:"ID",type:"Identifier"},{properties:[{method:false,shorthand:false,computed:false,key:{name:"enumerable",type:"Identifier"},value:{value:true,type:"Literal"},kind:"init",type:"Property"},{method:false,shorthand:false,computed:false,key:{name:"get",type:"Identifier"},value:{id:{name:"get",type:"Identifier"},generator:false,expression:false,params:[],body:{body:[{argument:{name:"INIT",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression"},kind:"init",type:"Property"}],type:"ObjectExpression"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"exports-module-declaration-loose":{body:[{expression:{operator:"=",left:{object:{name:"exports",type:"Identifier"},property:{name:"__esModule",type:"Identifier"},computed:false,type:"MemberExpression"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"Program"},"exports-module-declaration":{body:[{expression:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"defineProperty",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"exports",type:"Identifier"},{value:"__esModule",type:"Literal"},{properties:[{method:false,shorthand:false,computed:false,key:{name:"value",type:"Identifier"},value:{value:true,type:"Literal"},kind:"init",type:"Property"}],type:"ObjectExpression"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"for-of-array":{body:[{init:{declarations:[{id:{name:"KEY",type:"Identifier"},init:{value:0,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{left:{name:"KEY",type:"Identifier"},operator:"<",right:{object:{name:"ARR",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},update:{operator:"++",prefix:false,argument:{name:"KEY",type:"Identifier"},type:"UpdateExpression"},body:{expression:{name:"BODY",type:"Identifier"},type:"ExpressionStatement"},type:"ForStatement"}],type:"Program"},"for-of-loose":{body:[{init:{declarations:[{id:{name:"LOOP_OBJECT",type:"Identifier"},init:{name:"OBJECT",type:"Identifier"},type:"VariableDeclarator"},{id:{name:"IS_ARRAY",type:"Identifier"},init:{callee:{object:{name:"Array",type:"Identifier"},property:{name:"isArray",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"LOOP_OBJECT",type:"Identifier"}],type:"CallExpression"},type:"VariableDeclarator"},{id:{name:"INDEX",type:"Identifier"},init:{value:0,type:"Literal"},type:"VariableDeclarator"},{id:{name:"LOOP_OBJECT",type:"Identifier"},init:{test:{name:"IS_ARRAY",type:"Identifier"},consequent:{name:"LOOP_OBJECT",type:"Identifier"},alternate:{callee:{object:{name:"LOOP_OBJECT",type:"Identifier"},property:{object:{name:"Symbol",type:"Identifier"},property:{name:"iterator",type:"Identifier"},computed:false,type:"MemberExpression"},computed:true,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"ConditionalExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:null,update:null,body:{body:[{declarations:[{id:{name:"ID",type:"Identifier"},init:null,type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{name:"IS_ARRAY",type:"Identifier"},consequent:{body:[{test:{left:{name:"INDEX",type:"Identifier"},operator:">=",right:{object:{name:"LOOP_OBJECT",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},consequent:{label:null,type:"BreakStatement"},alternate:null,type:"IfStatement"},{expression:{operator:"=",left:{name:"ID",type:"Identifier"},right:{object:{name:"LOOP_OBJECT",type:"Identifier"},property:{operator:"++",prefix:false,argument:{name:"INDEX",type:"Identifier"},type:"UpdateExpression"},computed:true,type:"MemberExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:{body:[{expression:{operator:"=",left:{name:"INDEX",type:"Identifier"},right:{callee:{object:{name:"LOOP_OBJECT",type:"Identifier"},property:{name:"next",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"},{test:{object:{name:"INDEX",type:"Identifier"},property:{name:"done",type:"Identifier"},computed:false,type:"MemberExpression"},consequent:{label:null,type:"BreakStatement"},alternate:null,type:"IfStatement"},{expression:{operator:"=",left:{name:"ID",type:"Identifier"},right:{object:{name:"INDEX",type:"Identifier"},property:{name:"value",type:"Identifier"},computed:false,type:"MemberExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"ForStatement"}],type:"Program"},"for-of":{body:[{declarations:[{id:{name:"ITERATOR_COMPLETION",type:"Identifier"},init:{value:true,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier"},init:{value:false,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"ITERATOR_ERROR_KEY",type:"Identifier"},init:{name:"undefined",type:"Identifier"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{block:{body:[{init:{declarations:[{id:{name:"ITERATOR_KEY",type:"Identifier"},init:{callee:{object:{
+name:"OBJECT",type:"Identifier"},property:{object:{name:"Symbol",type:"Identifier"},property:{name:"iterator",type:"Identifier"},computed:false,type:"MemberExpression"},computed:true,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"VariableDeclarator"},{id:{name:"STEP_KEY",type:"Identifier"},init:null,type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{operator:"!",prefix:true,argument:{operator:"=",left:{name:"ITERATOR_COMPLETION",type:"Identifier"},right:{object:{operator:"=",left:{name:"STEP_KEY",type:"Identifier"},right:{callee:{object:{name:"ITERATOR_KEY",type:"Identifier"},property:{name:"next",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"AssignmentExpression",parenthesizedExpression:true},property:{name:"done",type:"Identifier"},computed:false,type:"MemberExpression"},type:"AssignmentExpression",parenthesizedExpression:true},type:"UnaryExpression"},update:{operator:"=",left:{name:"ITERATOR_COMPLETION",type:"Identifier"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},body:{body:[],type:"BlockStatement"},type:"ForStatement"}],type:"BlockStatement"},handler:{param:{name:"err",type:"Identifier"},guard:null,body:{body:[{expression:{operator:"=",left:{name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},type:"ExpressionStatement"},{expression:{operator:"=",left:{name:"ITERATOR_ERROR_KEY",type:"Identifier"},right:{name:"err",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"CatchClause"},guardedHandlers:[],finalizer:{body:[{block:{body:[{test:{left:{operator:"!",prefix:true,argument:{name:"ITERATOR_COMPLETION",type:"Identifier"},type:"UnaryExpression"},operator:"&&",right:{object:{name:"ITERATOR_KEY",type:"Identifier"},property:{value:"return",type:"Literal"},computed:true,type:"MemberExpression"},type:"LogicalExpression"},consequent:{body:[{expression:{callee:{object:{name:"ITERATOR_KEY",type:"Identifier"},property:{value:"return",type:"Literal"},computed:true,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},handler:null,guardedHandlers:[],finalizer:{body:[{test:{name:"ITERATOR_HAD_ERROR_KEY",type:"Identifier"},consequent:{body:[{argument:{name:"ITERATOR_ERROR_KEY",type:"Identifier"},type:"ThrowStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"TryStatement"}],type:"BlockStatement"},type:"TryStatement"}],type:"Program"},"helper-async-to-generator":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"fn",type:"Identifier"}],body:{body:[{argument:{id:null,generator:false,expression:false,params:[],body:{body:[{declarations:[{id:{name:"gen",type:"Identifier"},init:{callee:{object:{name:"fn",type:"Identifier"},property:{name:"apply",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{type:"ThisExpression"},{name:"arguments",type:"Identifier"}],type:"CallExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{argument:{callee:{name:"Promise",type:"Identifier"},arguments:[{id:null,generator:false,expression:false,params:[{name:"resolve",type:"Identifier"},{name:"reject",type:"Identifier"}],body:{body:[{declarations:[{id:{name:"callNext",type:"Identifier"},init:{callee:{object:{name:"step",type:"Identifier"},property:{name:"bind",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{value:null,type:"Literal"},{value:"next",type:"Literal"}],type:"CallExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"callThrow",type:"Identifier"},init:{callee:{object:{name:"step",type:"Identifier"},property:{name:"bind",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{value:null,type:"Literal"},{value:"throw",type:"Literal"}],type:"CallExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{id:{name:"step",type:"Identifier"},generator:false,expression:false,params:[{name:"key",type:"Identifier"},{name:"arg",type:"Identifier"}],body:{body:[{block:{body:[{declarations:[{id:{name:"info",type:"Identifier"},init:{callee:{object:{name:"gen",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:true,type:"MemberExpression"},arguments:[{name:"arg",type:"Identifier"}],type:"CallExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"value",type:"Identifier"},init:{object:{name:"info",type:"Identifier"},property:{name:"value",type:"Identifier"},computed:false,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"}],type:"BlockStatement"},handler:{param:{name:"error",type:"Identifier"},guard:null,body:{body:[{expression:{callee:{name:"reject",type:"Identifier"},arguments:[{name:"error",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"},{argument:null,type:"ReturnStatement"}],type:"BlockStatement"},type:"CatchClause"},guardedHandlers:[],finalizer:null,type:"TryStatement"},{test:{object:{name:"info",type:"Identifier"},property:{name:"done",type:"Identifier"},computed:false,type:"MemberExpression"},consequent:{body:[{expression:{callee:{name:"resolve",type:"Identifier"},arguments:[{name:"value",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:{body:[{expression:{callee:{object:{callee:{object:{name:"Promise",type:"Identifier"},property:{name:"resolve",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"value",type:"Identifier"}],type:"CallExpression"},property:{name:"then",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"callNext",type:"Identifier"},{name:"callThrow",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"FunctionDeclaration"},{expression:{callee:{name:"callNext",type:"Identifier"},arguments:[],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"FunctionExpression"}],type:"NewExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-bind":{body:[{expression:{object:{object:{name:"Function",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},property:{name:"bind",type:"Identifier"},computed:false,type:"MemberExpression"},type:"ExpressionStatement"}],type:"Program"},"helper-class-call-check":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"instance",type:"Identifier"},{name:"Constructor",type:"Identifier"}],body:{body:[{test:{operator:"!",prefix:true,argument:{left:{name:"instance",type:"Identifier"},operator:"instanceof",right:{name:"Constructor",type:"Identifier"},type:"BinaryExpression",parenthesizedExpression:true},type:"UnaryExpression"},consequent:{body:[{argument:{callee:{name:"TypeError",type:"Identifier"},arguments:[{value:"Cannot call a class as a function",type:"Literal"}],type:"NewExpression"},type:"ThrowStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-create-class":{body:[{expression:{callee:{id:null,generator:false,expression:false,params:[],body:{body:[{id:{name:"defineProperties",type:"Identifier"},generator:false,expression:false,params:[{name:"target",type:"Identifier"},{name:"props",type:"Identifier"}],body:{body:[{init:{declarations:[{id:{name:"i",type:"Identifier"},init:{value:0,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{left:{name:"i",type:"Identifier"},operator:"<",right:{object:{name:"props",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},update:{operator:"++",prefix:false,argument:{name:"i",type:"Identifier"},type:"UpdateExpression"},body:{body:[{declarations:[{id:{name:"descriptor",type:"Identifier"},init:{object:{name:"props",type:"Identifier"},property:{name:"i",type:"Identifier"},computed:true,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"enumerable",type:"Identifier"},computed:false,type:"MemberExpression"},right:{left:{object:{name:"descriptor",type:"Identifier"},property:{name:"enumerable",type:"Identifier"},computed:false,type:"MemberExpression"},operator:"||",right:{value:false,type:"Literal"},type:"LogicalExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"},{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"configurable",type:"Identifier"},computed:false,type:"MemberExpression"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},type:"ExpressionStatement"},{test:{left:{value:"value",type:"Literal"},operator:"in",right:{name:"descriptor",type:"Identifier"},type:"BinaryExpression"},consequent:{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"writable",type:"Identifier"},computed:false,type:"MemberExpression"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},type:"ExpressionStatement"},alternate:null,type:"IfStatement"},{expression:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"defineProperty",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"target",type:"Identifier"},{object:{name:"descriptor",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:false,type:"MemberExpression"},{name:"descriptor",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"ForStatement"}],type:"BlockStatement"},type:"FunctionDeclaration"},{argument:{id:null,generator:false,expression:false,params:[{name:"Constructor",type:"Identifier"},{name:"protoProps",type:"Identifier"},{name:"staticProps",type:"Identifier"}],body:{body:[{test:{name:"protoProps",type:"Identifier"},consequent:{expression:{callee:{name:"defineProperties",type:"Identifier"},arguments:[{object:{name:"Constructor",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},{name:"protoProps",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"},alternate:null,type:"IfStatement"},{test:{name:"staticProps",type:"Identifier"},consequent:{expression:{callee:{name:"defineProperties",type:"Identifier"},arguments:[{name:"Constructor",type:"Identifier"},{name:"staticProps",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"},alternate:null,type:"IfStatement"},{argument:{name:"Constructor",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},arguments:[],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"helper-create-decorated-class":{body:[{expression:{callee:{id:null,generator:false,expression:false,params:[],body:{body:[{id:{name:"defineProperties",type:"Identifier"},generator:false,expression:false,params:[{name:"target",type:"Identifier"},{name:"descriptors",type:"Identifier"},{name:"initializers",type:"Identifier"}],body:{body:[{init:{declarations:[{id:{name:"i",type:"Identifier"},init:{value:0,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{left:{name:"i",type:"Identifier"},operator:"<",right:{object:{name:"descriptors",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},update:{operator:"++",prefix:false,argument:{name:"i",type:"Identifier"},type:"UpdateExpression"},body:{body:[{declarations:[{id:{name:"descriptor",type:"Identifier"},init:{object:{name:"descriptors",type:"Identifier"},property:{name:"i",type:"Identifier"},computed:true,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"decorators",type:"Identifier"},init:{object:{name:"descriptor",type:"Identifier"},property:{name:"decorators",type:"Identifier"},computed:false,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"key",type:"Identifier"},init:{object:{name:"descriptor",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:false,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{expression:{operator:"delete",prefix:true,argument:{object:{name:"descriptor",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:false,type:"MemberExpression"},type:"UnaryExpression"},type:"ExpressionStatement"},{expression:{operator:"delete",prefix:true,argument:{object:{name:"descriptor",type:"Identifier"},property:{name:"decorators",type:"Identifier"},computed:false,type:"MemberExpression"},type:"UnaryExpression"},type:"ExpressionStatement"},{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"enumerable",type:"Identifier"},computed:false,type:"MemberExpression"},right:{left:{object:{name:"descriptor",type:"Identifier"},property:{name:"enumerable",type:"Identifier"},computed:false,type:"MemberExpression"},operator:"||",right:{value:false,type:"Literal"},type:"LogicalExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"},{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"configurable",type:"Identifier"},computed:false,type:"MemberExpression"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},type:"ExpressionStatement"},{test:{left:{left:{value:"value",type:"Literal"},operator:"in",right:{name:"descriptor",type:"Identifier"},type:"BinaryExpression"},operator:"||",right:{object:{name:"descriptor",type:"Identifier"},property:{name:"initializer",type:"Identifier"},computed:false,type:"MemberExpression"},type:"LogicalExpression"},consequent:{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"writable",type:"Identifier"},computed:false,type:"MemberExpression"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},type:"ExpressionStatement"},alternate:null,type:"IfStatement"},{test:{name:"decorators",type:"Identifier"},consequent:{body:[{init:{declarations:[{id:{name:"f",type:"Identifier"},init:{value:0,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{left:{name:"f",type:"Identifier"},operator:"<",right:{object:{name:"decorators",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},update:{operator:"++",prefix:false,argument:{name:"f",type:"Identifier"},type:"UpdateExpression"},body:{body:[{declarations:[{id:{name:"decorator",type:"Identifier"},init:{object:{name:"decorators",type:"Identifier"},property:{name:"f",type:"Identifier"},computed:true,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{left:{operator:"typeof",prefix:true,argument:{name:"decorator",type:"Identifier"},type:"UnaryExpression"},operator:"===",right:{value:"function",type:"Literal"},type:"BinaryExpression"},consequent:{body:[{expression:{operator:"=",left:{name:"descriptor",type:"Identifier"},right:{left:{callee:{name:"decorator",type:"Identifier"},arguments:[{name:"target",type:"Identifier"},{name:"key",type:"Identifier"},{name:"descriptor",type:"Identifier"}],type:"CallExpression"},operator:"||",right:{name:"descriptor",type:"Identifier"},type:"LogicalExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:{body:[{argument:{callee:{name:"TypeError",type:"Identifier"},arguments:[{left:{left:{left:{value:"The decorator for method ",type:"Literal"},operator:"+",right:{object:{name:"descriptor",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},operator:"+",right:{value:" is of the invalid type ",type:"Literal"},type:"BinaryExpression"},operator:"+",right:{operator:"typeof",prefix:true,argument:{name:"decorator",type:"Identifier"},type:"UnaryExpression"},type:"BinaryExpression"}],type:"NewExpression"},type:"ThrowStatement"}],type:"BlockStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"ForStatement"},{test:{left:{object:{name:"descriptor",type:"Identifier"},property:{name:"initializer",type:"Identifier"},computed:false,type:"MemberExpression"},operator:"!==",right:{name:"undefined",type:"Identifier"},type:"BinaryExpression"},consequent:{body:[{expression:{operator:"=",left:{object:{name:"initializers",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:true,type:"MemberExpression"},right:{name:"descriptor",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"},{label:null,type:"ContinueStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"},{expression:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"defineProperty",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"target",type:"Identifier"},{name:"key",type:"Identifier"},{name:"descriptor",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"ForStatement"}],type:"BlockStatement"},type:"FunctionDeclaration"},{argument:{id:null,generator:false,expression:false,params:[{name:"Constructor",type:"Identifier"},{name:"protoProps",type:"Identifier"},{name:"staticProps",type:"Identifier"},{name:"protoInitializers",type:"Identifier"},{name:"staticInitializers",type:"Identifier"}],body:{body:[{test:{name:"protoProps",type:"Identifier"},consequent:{expression:{callee:{name:"defineProperties",type:"Identifier"},arguments:[{object:{name:"Constructor",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},{name:"protoProps",type:"Identifier"},{name:"protoInitializers",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"},alternate:null,type:"IfStatement"},{test:{name:"staticProps",type:"Identifier"},consequent:{expression:{callee:{name:"defineProperties",type:"Identifier"},arguments:[{name:"Constructor",type:"Identifier"},{name:"staticProps",type:"Identifier"},{name:"staticInitializers",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"},alternate:null,type:"IfStatement"},{argument:{name:"Constructor",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},arguments:[],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"helper-create-decorated-object":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"descriptors",type:"Identifier"}],body:{body:[{declarations:[{id:{name:"target",type:"Identifier"},init:{properties:[],type:"ObjectExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{init:{declarations:[{id:{name:"i",type:"Identifier"},init:{value:0,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{left:{name:"i",type:"Identifier"},operator:"<",right:{object:{name:"descriptors",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},update:{operator:"++",prefix:false,argument:{name:"i",type:"Identifier"},type:"UpdateExpression"},body:{body:[{declarations:[{id:{name:"descriptor",type:"Identifier"},init:{object:{name:"descriptors",type:"Identifier"},property:{name:"i",type:"Identifier"},computed:true,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"decorators",type:"Identifier"},init:{object:{name:"descriptor",type:"Identifier"},property:{name:"decorators",type:"Identifier"},computed:false,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"key",type:"Identifier"},init:{object:{name:"descriptor",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:false,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{expression:{operator:"delete",prefix:true,argument:{object:{name:"descriptor",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:false,type:"MemberExpression"},type:"UnaryExpression"},type:"ExpressionStatement"},{expression:{operator:"delete",prefix:true,argument:{object:{name:"descriptor",type:"Identifier"},property:{name:"decorators",type:"Identifier"},computed:false,type:"MemberExpression"},type:"UnaryExpression"},type:"ExpressionStatement"},{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"enumerable",type:"Identifier"},computed:false,type:"MemberExpression"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},type:"ExpressionStatement"},{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"configurable",type:"Identifier"},computed:false,type:"MemberExpression"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},type:"ExpressionStatement"},{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"writable",type:"Identifier"},computed:false,type:"MemberExpression"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},type:"ExpressionStatement"},{test:{name:"decorators",type:"Identifier"},consequent:{body:[{init:{declarations:[{id:{name:"f",type:"Identifier"},init:{value:0,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{left:{name:"f",type:"Identifier"},operator:"<",right:{object:{name:"decorators",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},update:{operator:"++",prefix:false,argument:{name:"f",type:"Identifier"},type:"UpdateExpression"},body:{body:[{declarations:[{id:{name:"decorator",type:"Identifier"},init:{object:{name:"decorators",type:"Identifier"},property:{name:"f",type:"Identifier"},computed:true,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{left:{operator:"typeof",prefix:true,argument:{name:"decorator",type:"Identifier"},type:"UnaryExpression"},operator:"===",right:{value:"function",type:"Literal"},type:"BinaryExpression"},consequent:{body:[{expression:{operator:"=",left:{name:"descriptor",type:"Identifier"},right:{left:{callee:{name:"decorator",type:"Identifier"},arguments:[{name:"target",type:"Identifier"},{name:"key",type:"Identifier"},{name:"descriptor",type:"Identifier"}],type:"CallExpression"},operator:"||",right:{name:"descriptor",type:"Identifier"},type:"LogicalExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:{body:[{argument:{callee:{name:"TypeError",type:"Identifier"},arguments:[{left:{left:{left:{value:"The decorator for method ",type:"Literal"},operator:"+",right:{object:{name:"descriptor",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},operator:"+",right:{value:" is of the invalid type ",type:"Literal"},type:"BinaryExpression"},operator:"+",right:{operator:"typeof",prefix:true,argument:{name:"decorator",type:"Identifier"},type:"UnaryExpression"},type:"BinaryExpression"}],type:"NewExpression"},type:"ThrowStatement"}],type:"BlockStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"ForStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"},{test:{object:{name:"descriptor",type:"Identifier"},property:{name:"initializer",type:"Identifier"},computed:false,type:"MemberExpression"},consequent:{body:[{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"value",type:"Identifier"},computed:false,type:"MemberExpression"},right:{callee:{object:{object:{name:"descriptor",type:"Identifier"},property:{name:"initializer",type:"Identifier"},computed:false,type:"MemberExpression"},property:{name:"call",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"target",type:"Identifier"}],type:"CallExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"},{expression:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"defineProperty",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"target",type:"Identifier"},{name:"key",type:"Identifier"},{name:"descriptor",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"ForStatement"},{argument:{name:"target",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-default-props":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"defaultProps",type:"Identifier"},{name:"props",type:"Identifier"}],body:{body:[{test:{name:"defaultProps",type:"Identifier"},consequent:{body:[{left:{declarations:[{id:{name:"propName",type:"Identifier"},init:null,type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},right:{name:"defaultProps",type:"Identifier"},body:{body:[{test:{left:{operator:"typeof",prefix:true,argument:{object:{name:"props",type:"Identifier"},property:{name:"propName",type:"Identifier"},computed:true,type:"MemberExpression"},type:"UnaryExpression"},operator:"===",right:{value:"undefined",type:"Literal"},type:"BinaryExpression"},consequent:{body:[{expression:{operator:"=",left:{object:{name:"props",type:"Identifier"},property:{name:"propName",type:"Identifier"},computed:true,type:"MemberExpression"},right:{object:{name:"defaultProps",type:"Identifier"},property:{name:"propName",type:"Identifier"},computed:true,type:"MemberExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"ForInStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"},{argument:{name:"props",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-defaults":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"obj",type:"Identifier"},{name:"defaults",type:"Identifier"}],body:{body:[{declarations:[{id:{name:"keys",type:"Identifier"},init:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"getOwnPropertyNames",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"defaults",type:"Identifier"}],type:"CallExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{init:{declarations:[{id:{name:"i",type:"Identifier"},init:{value:0,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{left:{name:"i",type:"Identifier"},operator:"<",right:{object:{name:"keys",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},update:{operator:"++",prefix:false,argument:{name:"i",type:"Identifier"},type:"UpdateExpression"},body:{body:[{declarations:[{id:{name:"key",type:"Identifier"},init:{object:{name:"keys",type:"Identifier"},property:{name:"i",type:"Identifier"},computed:true,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"value",type:"Identifier"},init:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"getOwnPropertyDescriptor",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"defaults",type:"Identifier"},{name:"key",type:"Identifier"}],type:"CallExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{left:{left:{name:"value",type:"Identifier"},operator:"&&",right:{object:{name:"value",type:"Identifier"},property:{name:"configurable",type:"Identifier"},computed:false,type:"MemberExpression"},type:"LogicalExpression"},operator:"&&",right:{left:{object:{name:"obj",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:true,type:"MemberExpression"},operator:"===",right:{name:"undefined",type:"Identifier"},type:"BinaryExpression"},type:"LogicalExpression"},consequent:{body:[{expression:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"defineProperty",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"obj",type:"Identifier"},{name:"key",type:"Identifier"},{name:"value",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"ForStatement"},{argument:{name:"obj",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-define-decorated-property-descriptor":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"target",type:"Identifier"},{name:"key",type:"Identifier"},{name:"descriptors",type:"Identifier"}],body:{body:[{declarations:[{id:{name:"_descriptor",type:"Identifier"},init:{object:{name:"descriptors",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:true,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{operator:"!",prefix:true,argument:{name:"_descriptor",type:"Identifier"},type:"UnaryExpression"},consequent:{argument:null,type:"ReturnStatement"},alternate:null,type:"IfStatement"},{declarations:[{id:{name:"descriptor",type:"Identifier"},init:{properties:[],type:"ObjectExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{left:{declarations:[{id:{name:"_key",type:"Identifier"},init:null,type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},right:{name:"_descriptor",type:"Identifier"},body:{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"_key",type:"Identifier"},computed:true,type:"MemberExpression"},right:{object:{name:"_descriptor",type:"Identifier"},property:{name:"_key",type:"Identifier"},computed:true,type:"MemberExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"},type:"ForInStatement"},{expression:{operator:"=",left:{object:{name:"descriptor",type:"Identifier"},property:{name:"value",type:"Identifier"},computed:false,type:"MemberExpression"},right:{callee:{object:{object:{name:"descriptor",type:"Identifier"},property:{name:"initializer",type:"Identifier"},computed:false,type:"MemberExpression"},property:{name:"call",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"target",type:"Identifier"}],type:"CallExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"},{expression:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"defineProperty",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"target",type:"Identifier"},{name:"key",type:"Identifier"},{name:"descriptor",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"
+},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-define-property":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"obj",type:"Identifier"},{name:"key",type:"Identifier"},{name:"value",type:"Identifier"}],body:{body:[{test:{left:{name:"key",type:"Identifier"},operator:"in",right:{name:"obj",type:"Identifier"},type:"BinaryExpression"},consequent:{body:[{expression:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"defineProperty",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"obj",type:"Identifier"},{name:"key",type:"Identifier"},{properties:[{method:false,shorthand:false,computed:false,key:{name:"value",type:"Identifier"},value:{name:"value",type:"Identifier"},kind:"init",type:"Property"},{method:false,shorthand:false,computed:false,key:{name:"enumerable",type:"Identifier"},value:{value:true,type:"Literal"},kind:"init",type:"Property"},{method:false,shorthand:false,computed:false,key:{name:"configurable",type:"Identifier"},value:{value:true,type:"Literal"},kind:"init",type:"Property"},{method:false,shorthand:false,computed:false,key:{name:"writable",type:"Identifier"},value:{value:true,type:"Literal"},kind:"init",type:"Property"}],type:"ObjectExpression"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:{body:[{expression:{operator:"=",left:{object:{name:"obj",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:true,type:"MemberExpression"},right:{name:"value",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"IfStatement"},{argument:{name:"obj",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-extends":{body:[{expression:{left:{object:{name:"Object",type:"Identifier"},property:{name:"assign",type:"Identifier"},computed:false,type:"MemberExpression"},operator:"||",right:{id:null,generator:false,expression:false,params:[{name:"target",type:"Identifier"}],body:{body:[{init:{declarations:[{id:{name:"i",type:"Identifier"},init:{value:1,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{left:{name:"i",type:"Identifier"},operator:"<",right:{object:{name:"arguments",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},update:{operator:"++",prefix:false,argument:{name:"i",type:"Identifier"},type:"UpdateExpression"},body:{body:[{declarations:[{id:{name:"source",type:"Identifier"},init:{object:{name:"arguments",type:"Identifier"},property:{name:"i",type:"Identifier"},computed:true,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{left:{declarations:[{id:{name:"key",type:"Identifier"},init:null,type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},right:{name:"source",type:"Identifier"},body:{body:[{test:{callee:{object:{object:{object:{name:"Object",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},property:{name:"hasOwnProperty",type:"Identifier"},computed:false,type:"MemberExpression"},property:{name:"call",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"source",type:"Identifier"},{name:"key",type:"Identifier"}],type:"CallExpression"},consequent:{body:[{expression:{operator:"=",left:{object:{name:"target",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:true,type:"MemberExpression"},right:{object:{name:"source",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:true,type:"MemberExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"ForInStatement"}],type:"BlockStatement"},type:"ForStatement"},{argument:{name:"target",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression"},type:"LogicalExpression"},type:"ExpressionStatement"}],type:"Program"},"helper-get":{body:[{expression:{id:{name:"get",type:"Identifier"},generator:false,expression:false,params:[{name:"object",type:"Identifier"},{name:"property",type:"Identifier"},{name:"receiver",type:"Identifier"}],body:{body:[{test:{left:{name:"object",type:"Identifier"},operator:"===",right:{value:null,type:"Literal"},type:"BinaryExpression"},consequent:{expression:{operator:"=",left:{name:"object",type:"Identifier"},right:{object:{name:"Function",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"},alternate:null,type:"IfStatement"},{declarations:[{id:{name:"desc",type:"Identifier"},init:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"getOwnPropertyDescriptor",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"object",type:"Identifier"},{name:"property",type:"Identifier"}],type:"CallExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{left:{name:"desc",type:"Identifier"},operator:"===",right:{name:"undefined",type:"Identifier"},type:"BinaryExpression"},consequent:{body:[{declarations:[{id:{name:"parent",type:"Identifier"},init:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"getPrototypeOf",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"object",type:"Identifier"}],type:"CallExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{left:{name:"parent",type:"Identifier"},operator:"===",right:{value:null,type:"Literal"},type:"BinaryExpression"},consequent:{body:[{argument:{name:"undefined",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},alternate:{body:[{argument:{callee:{name:"get",type:"Identifier"},arguments:[{name:"parent",type:"Identifier"},{name:"property",type:"Identifier"},{name:"receiver",type:"Identifier"}],type:"CallExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"IfStatement"}],type:"BlockStatement"},alternate:{test:{left:{value:"value",type:"Literal"},operator:"in",right:{name:"desc",type:"Identifier"},type:"BinaryExpression"},consequent:{body:[{argument:{object:{name:"desc",type:"Identifier"},property:{name:"value",type:"Identifier"},computed:false,type:"MemberExpression"},type:"ReturnStatement"}],type:"BlockStatement"},alternate:{body:[{declarations:[{id:{name:"getter",type:"Identifier"},init:{object:{name:"desc",type:"Identifier"},property:{name:"get",type:"Identifier"},computed:false,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{left:{name:"getter",type:"Identifier"},operator:"===",right:{name:"undefined",type:"Identifier"},type:"BinaryExpression"},consequent:{body:[{argument:{name:"undefined",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"},{argument:{callee:{object:{name:"getter",type:"Identifier"},property:{name:"call",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"receiver",type:"Identifier"}],type:"CallExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"IfStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-has-own":{body:[{expression:{object:{object:{name:"Object",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},property:{name:"hasOwnProperty",type:"Identifier"},computed:false,type:"MemberExpression"},type:"ExpressionStatement"}],type:"Program"},"helper-inherits":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"subClass",type:"Identifier"},{name:"superClass",type:"Identifier"}],body:{body:[{test:{left:{left:{operator:"typeof",prefix:true,argument:{name:"superClass",type:"Identifier"},type:"UnaryExpression"},operator:"!==",right:{value:"function",type:"Literal"},type:"BinaryExpression"},operator:"&&",right:{left:{name:"superClass",type:"Identifier"},operator:"!==",right:{value:null,type:"Literal"},type:"BinaryExpression"},type:"LogicalExpression"},consequent:{body:[{argument:{callee:{name:"TypeError",type:"Identifier"},arguments:[{left:{value:"Super expression must either be null or a function, not ",type:"Literal"},operator:"+",right:{operator:"typeof",prefix:true,argument:{name:"superClass",type:"Identifier"},type:"UnaryExpression"},type:"BinaryExpression"}],type:"NewExpression"},type:"ThrowStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"},{expression:{operator:"=",left:{object:{name:"subClass",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},right:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"create",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{left:{name:"superClass",type:"Identifier"},operator:"&&",right:{object:{name:"superClass",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},type:"LogicalExpression"},{properties:[{method:false,shorthand:false,computed:false,key:{name:"constructor",type:"Identifier"},value:{properties:[{method:false,shorthand:false,computed:false,key:{name:"value",type:"Identifier"},value:{name:"subClass",type:"Identifier"},kind:"init",type:"Property"},{method:false,shorthand:false,computed:false,key:{name:"enumerable",type:"Identifier"},value:{value:false,type:"Literal"},kind:"init",type:"Property"},{method:false,shorthand:false,computed:false,key:{name:"writable",type:"Identifier"},value:{value:true,type:"Literal"},kind:"init",type:"Property"},{method:false,shorthand:false,computed:false,key:{name:"configurable",type:"Identifier"},value:{value:true,type:"Literal"},kind:"init",type:"Property"}],type:"ObjectExpression"},kind:"init",type:"Property"}],type:"ObjectExpression"}],type:"CallExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"},{test:{name:"superClass",type:"Identifier"},consequent:{expression:{operator:"=",left:{object:{name:"subClass",type:"Identifier"},property:{name:"__proto__",type:"Identifier"},computed:false,type:"MemberExpression"},right:{name:"superClass",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-instanceof":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"left",type:"Identifier"},{name:"right",type:"Identifier"}],body:{body:[{test:{left:{left:{name:"right",type:"Identifier"},operator:"!=",right:{value:null,type:"Literal"},type:"BinaryExpression"},operator:"&&",right:{object:{name:"right",type:"Identifier"},property:{object:{name:"Symbol",type:"Identifier"},property:{name:"hasInstance",type:"Identifier"},computed:false,type:"MemberExpression"},computed:true,type:"MemberExpression"},type:"LogicalExpression"},consequent:{body:[{argument:{callee:{object:{name:"right",type:"Identifier"},property:{object:{name:"Symbol",type:"Identifier"},property:{name:"hasInstance",type:"Identifier"},computed:false,type:"MemberExpression"},computed:true,type:"MemberExpression"},arguments:[{name:"left",type:"Identifier"}],type:"CallExpression"},type:"ReturnStatement"}],type:"BlockStatement"},alternate:{body:[{argument:{left:{name:"left",type:"Identifier"},operator:"instanceof",right:{name:"right",type:"Identifier"},type:"BinaryExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-interop-require-default":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"obj",type:"Identifier"}],body:{body:[{argument:{test:{left:{name:"obj",type:"Identifier"},operator:"&&",right:{object:{name:"obj",type:"Identifier"},property:{name:"__esModule",type:"Identifier"},computed:false,type:"MemberExpression"},type:"LogicalExpression"},consequent:{name:"obj",type:"Identifier"},alternate:{properties:[{method:false,shorthand:false,computed:false,key:{value:"default",type:"Literal"},value:{name:"obj",type:"Identifier"},kind:"init",type:"Property"}],type:"ObjectExpression"},type:"ConditionalExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-interop-require-wildcard":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"obj",type:"Identifier"}],body:{body:[{test:{left:{name:"obj",type:"Identifier"},operator:"&&",right:{object:{name:"obj",type:"Identifier"},property:{name:"__esModule",type:"Identifier"},computed:false,type:"MemberExpression"},type:"LogicalExpression"},consequent:{body:[{argument:{name:"obj",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},alternate:{body:[{declarations:[{id:{name:"newObj",type:"Identifier"},init:{properties:[],type:"ObjectExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{left:{name:"obj",type:"Identifier"},operator:"!=",right:{value:null,type:"Literal"},type:"BinaryExpression"},consequent:{body:[{left:{declarations:[{id:{name:"key",type:"Identifier"},init:null,type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},right:{name:"obj",type:"Identifier"},body:{body:[{test:{callee:{object:{object:{object:{name:"Object",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},property:{name:"hasOwnProperty",type:"Identifier"},computed:false,type:"MemberExpression"},property:{name:"call",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"obj",type:"Identifier"},{name:"key",type:"Identifier"}],type:"CallExpression"},consequent:{expression:{operator:"=",left:{object:{name:"newObj",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:true,type:"MemberExpression"},right:{object:{name:"obj",type:"Identifier"},property:{name:"key",type:"Identifier"},computed:true,type:"MemberExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"ForInStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"},{expression:{operator:"=",left:{object:{name:"newObj",type:"Identifier"},property:{value:"default",type:"Literal"},computed:true,type:"MemberExpression"},right:{name:"obj",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"},{argument:{name:"newObj",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-interop-require":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"obj",type:"Identifier"}],body:{body:[{argument:{test:{left:{name:"obj",type:"Identifier"},operator:"&&",right:{object:{name:"obj",type:"Identifier"},property:{name:"__esModule",type:"Identifier"},computed:false,type:"MemberExpression"},type:"LogicalExpression"},consequent:{object:{name:"obj",type:"Identifier"},property:{value:"default",type:"Literal"},computed:true,type:"MemberExpression"},alternate:{name:"obj",type:"Identifier"},type:"ConditionalExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-object-destructuring-empty":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"obj",type:"Identifier"}],body:{body:[{test:{left:{name:"obj",type:"Identifier"},operator:"==",right:{value:null,type:"Literal"},type:"BinaryExpression"},consequent:{argument:{callee:{name:"TypeError",type:"Identifier"},arguments:[{value:"Cannot destructure undefined",type:"Literal"}],type:"NewExpression"},type:"ThrowStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-object-without-properties":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"obj",type:"Identifier"},{name:"keys",type:"Identifier"}],body:{body:[{declarations:[{id:{name:"target",type:"Identifier"},init:{properties:[],type:"ObjectExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{left:{declarations:[{id:{name:"i",type:"Identifier"},init:null,type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},right:{name:"obj",type:"Identifier"},body:{body:[{test:{left:{callee:{object:{name:"keys",type:"Identifier"},property:{name:"indexOf",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"i",type:"Identifier"}],type:"CallExpression"},operator:">=",right:{value:0,type:"Literal"},type:"BinaryExpression"},consequent:{label:null,type:"ContinueStatement"},alternate:null,type:"IfStatement"},{test:{operator:"!",prefix:true,argument:{callee:{object:{object:{object:{name:"Object",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},property:{name:"hasOwnProperty",type:"Identifier"},computed:false,type:"MemberExpression"},property:{name:"call",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"obj",type:"Identifier"},{name:"i",type:"Identifier"}],type:"CallExpression"},type:"UnaryExpression"},consequent:{label:null,type:"ContinueStatement"},alternate:null,type:"IfStatement"},{expression:{operator:"=",left:{object:{name:"target",type:"Identifier"},property:{name:"i",type:"Identifier"},computed:true,type:"MemberExpression"},right:{object:{name:"obj",type:"Identifier"},property:{name:"i",type:"Identifier"},computed:true,type:"MemberExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"ForInStatement"},{argument:{name:"target",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-self-global":{body:[{expression:{test:{left:{operator:"typeof",prefix:true,argument:{name:"global",type:"Identifier"},type:"UnaryExpression"},operator:"===",right:{value:"undefined",type:"Literal"},type:"BinaryExpression"},consequent:{name:"self",type:"Identifier"},alternate:{name:"global",type:"Identifier"},type:"ConditionalExpression"},type:"ExpressionStatement"}],type:"Program"},"helper-set":{body:[{expression:{id:{name:"set",type:"Identifier"},generator:false,expression:false,params:[{name:"object",type:"Identifier"},{name:"property",type:"Identifier"},{name:"value",type:"Identifier"},{name:"receiver",type:"Identifier"}],body:{body:[{declarations:[{id:{name:"desc",type:"Identifier"},init:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"getOwnPropertyDescriptor",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"object",type:"Identifier"},{name:"property",type:"Identifier"}],type:"CallExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{left:{name:"desc",type:"Identifier"},operator:"===",right:{name:"undefined",type:"Identifier"},type:"BinaryExpression"},consequent:{body:[{declarations:[{id:{name:"parent",type:"Identifier"},init:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"getPrototypeOf",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"object",type:"Identifier"}],type:"CallExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{left:{name:"parent",type:"Identifier"},operator:"!==",right:{value:null,type:"Literal"},type:"BinaryExpression"},consequent:{body:[{expression:{callee:{name:"set",type:"Identifier"},arguments:[{name:"parent",type:"Identifier"},{name:"property",type:"Identifier"},{name:"value",type:"Identifier"},{name:"receiver",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},alternate:{test:{left:{left:{value:"value",type:"Literal"},operator:"in",right:{name:"desc",type:"Identifier"},type:"BinaryExpression"},operator:"&&",right:{object:{name:"desc",type:"Identifier"},property:{name:"writable",type:"Identifier"},computed:false,type:"MemberExpression"},type:"LogicalExpression"},consequent:{body:[{expression:{operator:"=",left:{object:{name:"desc",type:"Identifier"},property:{name:"value",type:"Identifier"},computed:false,type:"MemberExpression"},right:{name:"value",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:{body:[{declarations:[{id:{name:"setter",type:"Identifier"},init:{object:{name:"desc",type:"Identifier"},property:{name:"set",type:"Identifier"},computed:false,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{test:{left:{name:"setter",type:"Identifier"},operator:"!==",right:{name:"undefined",type:"Identifier"},type:"BinaryExpression"},consequent:{body:[{expression:{callee:{object:{name:"setter",type:"Identifier"},property:{name:"call",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"receiver",type:"Identifier"},{name:"value",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"IfStatement"},type:"IfStatement"},{argument:{name:"value",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-slice":{body:[{expression:{object:{object:{name:"Array",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},property:{name:"slice",type:"Identifier"},computed:false,type:"MemberExpression"},type:"ExpressionStatement"}],type:"Program"},"helper-sliced-to-array-loose":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"arr",type:"Identifier"},{name:"i",type:"Identifier"}],body:{body:[{test:{callee:{object:{name:"Array",type:"Identifier"},property:{name:"isArray",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"arr",type:"Identifier"}],type:"CallExpression"},consequent:{body:[{argument:{name:"arr",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},alternate:{test:{left:{object:{name:"Symbol",type:"Identifier"},property:{name:"iterator",type:"Identifier"},computed:false,type:"MemberExpression"},operator:"in",right:{callee:{name:"Object",type:"Identifier"},arguments:[{name:"arr",type:"Identifier"}],type:"CallExpression"},type:"BinaryExpression"},consequent:{body:[{declarations:[{id:{name:"_arr",type:"Identifier"},init:{elements:[],type:"ArrayExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{init:{declarations:[{id:{name:"_iterator",type:"Identifier"},init:{callee:{object:{name:"arr",type:"Identifier"},property:{object:{name:"Symbol",type:"Identifier"},property:{name:"iterator",type:"Identifier"},computed:false,type:"MemberExpression"},computed:true,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"VariableDeclarator"},{id:{name:"_step",type:"Identifier"},init:null,type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{operator:"!",prefix:true,argument:{object:{operator:"=",left:{name:"_step",type:"Identifier"},right:{callee:{object:{name:"_iterator",type:"Identifier"},property:{name:"next",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"AssignmentExpression",parenthesizedExpression:true},property:{name:"done",type:"Identifier"},computed:false,type:"MemberExpression"},type:"UnaryExpression"},update:null,body:{body:[{expression:{callee:{object:{name:"_arr",type:"Identifier"},property:{name:"push",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{object:{name:"_step",type:"Identifier"},property:{name:"value",type:"Identifier"},computed:false,type:"MemberExpression"}],type:"CallExpression"},type:"ExpressionStatement"},{test:{left:{name:"i",type:"Identifier"},operator:"&&",right:{left:{object:{name:"_arr",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},operator:"===",right:{name:"i",type:"Identifier"},type:"BinaryExpression"},type:"LogicalExpression"},consequent:{label:null,type:"BreakStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"ForStatement"},{argument:{name:"_arr",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},alternate:{body:[{argument:{callee:{name:"TypeError",type:"Identifier"},arguments:[{value:"Invalid attempt to destructure non-iterable instance",type:"Literal"}],type:"NewExpression"},type:"ThrowStatement"}],type:"BlockStatement"},type:"IfStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-sliced-to-array":{body:[{expression:{callee:{id:null,generator:false,expression:false,params:[],body:{body:[{id:{name:"sliceIterator",type:"Identifier"},generator:false,expression:false,params:[{name:"arr",type:"Identifier"},{name:"i",type:"Identifier"}],body:{body:[{declarations:[{id:{name:"_arr",type:"Identifier"},init:{elements:[],type:"ArrayExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"_n",type:"Identifier"},init:{value:true,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"_d",type:"Identifier"},init:{value:false,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{declarations:[{id:{name:"_e",type:"Identifier"},init:{name:"undefined",type:"Identifier"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{block:{body:[{init:{declarations:[{id:{name:"_i",type:"Identifier"},init:{callee:{object:{name:"arr",type:"Identifier"},property:{object:{name:"Symbol",type:"Identifier"},property:{name:"iterator",type:"Identifier"},computed:false,type:"MemberExpression"},computed:true,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"VariableDeclarator"},{id:{name:"_s",type:"Identifier"},init:null,type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{operator:"!",prefix:true,argument:{operator:"=",left:{name:"_n",type:"Identifier"},right:{object:{operator:"=",left:{name:"_s",type:"Identifier"},right:{callee:{object:{name:"_i",type:"Identifier"},property:{name:"next",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"AssignmentExpression",parenthesizedExpression:true},property:{name:"done",type:"Identifier"},computed:false,type:"MemberExpression"},type:"AssignmentExpression",parenthesizedExpression:true},type:"UnaryExpression"},update:{operator:"=",left:{name:"_n",type:"Identifier"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},body:{body:[{expression:{callee:{object:{name:"_arr",type:"Identifier"},property:{name:"push",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{object:{name:"_s",type:"Identifier"},property:{name:"value",type:"Identifier"},computed:false,type:"MemberExpression"}],type:"CallExpression"},type:"ExpressionStatement"},{test:{left:{name:"i",type:"Identifier"},operator:"&&",right:{left:{object:{name:"_arr",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},operator:"===",right:{name:"i",type:"Identifier"},type:"BinaryExpression"},type:"LogicalExpression"},consequent:{label:null,type:"BreakStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"ForStatement"}],type:"BlockStatement"},handler:{param:{name:"err",type:"Identifier"},guard:null,body:{body:[{expression:{operator:"=",left:{name:"_d",type:"Identifier"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},type:"ExpressionStatement"},{expression:{operator:"=",left:{name:"_e",type:"Identifier"},right:{name:"err",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"CatchClause"},guardedHandlers:[],finalizer:{body:[{block:{body:[{test:{left:{operator:"!",prefix:true,argument:{name:"_n",type:"Identifier"},type:"UnaryExpression"},operator:"&&",right:{object:{name:"_i",type:"Identifier"},property:{value:"return",type:"Literal"},computed:true,type:"MemberExpression"},type:"LogicalExpression"},consequent:{expression:{callee:{object:{name:"_i",type:"Identifier"},property:{value:"return",type:"Literal"},computed:true,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"ExpressionStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},handler:null,guardedHandlers:[],finalizer:{body:[{test:{name:"_d",type:"Identifier"},consequent:{argument:{name:"_e",type:"Identifier"},type:"ThrowStatement"},alternate:null,type:"IfStatement"}],type:"BlockStatement"},type:"TryStatement"}],type:"BlockStatement"},type:"TryStatement"},{argument:{name:"_arr",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionDeclaration"},{argument:{id:null,generator:false,expression:false,params:[{name:"arr",type:"Identifier"},{name:"i",type:"Identifier"}],body:{body:[{test:{callee:{object:{name:"Array",type:"Identifier"},property:{name:"isArray",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"arr",type:"Identifier"}],type:"CallExpression"},consequent:{body:[{argument:{name:"arr",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},alternate:{test:{left:{object:{name:"Symbol",type:"Identifier"},property:{name:"iterator",type:"Identifier"},computed:false,type:"MemberExpression"},operator:"in",right:{callee:{name:"Object",type:"Identifier"},arguments:[{name:"arr",type:"Identifier"}],type:"CallExpression"},type:"BinaryExpression"},consequent:{body:[{argument:{callee:{name:"sliceIterator",type:"Identifier"},arguments:[{name:"arr",type:"Identifier"},{name:"i",type:"Identifier"}],type:"CallExpression"},type:"ReturnStatement"}],type:"BlockStatement"},alternate:{body:[{argument:{callee:{name:"TypeError",type:"Identifier"},arguments:[{value:"Invalid attempt to destructure non-iterable instance",type:"Literal"}],type:"NewExpression"},type:"ThrowStatement"}],type:"BlockStatement"},type:"IfStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"FunctionExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},arguments:[],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"helper-tagged-template-literal-loose":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"strings",type:"Identifier"},{name:"raw",type:"Identifier"}],body:{body:[{expression:{operator:"=",left:{object:{name:"strings",type:"Identifier"},property:{name:"raw",type:"Identifier"},computed:false,type:"MemberExpression"},right:{name:"raw",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"},{argument:{name:"strings",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-tagged-template-literal":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"strings",type:"Identifier"},{name:"raw",type:"Identifier"}],body:{body:[{argument:{callee:{object:{name:"Object",type:"Identifier"
+},property:{name:"freeze",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{callee:{object:{name:"Object",type:"Identifier"},property:{name:"defineProperties",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"strings",type:"Identifier"},{properties:[{method:false,shorthand:false,computed:false,key:{name:"raw",type:"Identifier"},value:{properties:[{method:false,shorthand:false,computed:false,key:{name:"value",type:"Identifier"},value:{callee:{object:{name:"Object",type:"Identifier"},property:{name:"freeze",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"raw",type:"Identifier"}],type:"CallExpression"},kind:"init",type:"Property"}],type:"ObjectExpression"},kind:"init",type:"Property"}],type:"ObjectExpression"}],type:"CallExpression"}],type:"CallExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-temporal-assert-defined":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"val",type:"Identifier"},{name:"name",type:"Identifier"},{name:"undef",type:"Identifier"}],body:{body:[{test:{left:{name:"val",type:"Identifier"},operator:"===",right:{name:"undef",type:"Identifier"},type:"BinaryExpression"},consequent:{body:[{argument:{callee:{name:"ReferenceError",type:"Identifier"},arguments:[{left:{name:"name",type:"Identifier"},operator:"+",right:{value:" is not defined - temporal dead zone",type:"Literal"},type:"BinaryExpression"}],type:"NewExpression"},type:"ThrowStatement"}],type:"BlockStatement"},alternate:null,type:"IfStatement"},{argument:{value:true,type:"Literal"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-temporal-undefined":{body:[{expression:{properties:[],type:"ObjectExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-to-array":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"arr",type:"Identifier"}],body:{body:[{argument:{test:{callee:{object:{name:"Array",type:"Identifier"},property:{name:"isArray",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"arr",type:"Identifier"}],type:"CallExpression"},consequent:{name:"arr",type:"Identifier"},alternate:{callee:{object:{name:"Array",type:"Identifier"},property:{name:"from",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"arr",type:"Identifier"}],type:"CallExpression"},type:"ConditionalExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-to-consumable-array":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"arr",type:"Identifier"}],body:{body:[{test:{callee:{object:{name:"Array",type:"Identifier"},property:{name:"isArray",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"arr",type:"Identifier"}],type:"CallExpression"},consequent:{body:[{init:{declarations:[{id:{name:"i",type:"Identifier"},init:{value:0,type:"Literal"},type:"VariableDeclarator"},{id:{name:"arr2",type:"Identifier"},init:{callee:{name:"Array",type:"Identifier"},arguments:[{object:{name:"arr",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"}],type:"CallExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{left:{name:"i",type:"Identifier"},operator:"<",right:{object:{name:"arr",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},type:"BinaryExpression"},update:{operator:"++",prefix:false,argument:{name:"i",type:"Identifier"},type:"UpdateExpression"},body:{expression:{operator:"=",left:{object:{name:"arr2",type:"Identifier"},property:{name:"i",type:"Identifier"},computed:true,type:"MemberExpression"},right:{object:{name:"arr",type:"Identifier"},property:{name:"i",type:"Identifier"},computed:true,type:"MemberExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"},type:"ForStatement"},{argument:{name:"arr2",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},alternate:{body:[{argument:{callee:{object:{name:"Array",type:"Identifier"},property:{name:"from",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"arr",type:"Identifier"}],type:"CallExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"helper-typeof":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"obj",type:"Identifier"}],body:{body:[{argument:{test:{left:{name:"obj",type:"Identifier"},operator:"&&",right:{left:{object:{name:"obj",type:"Identifier"},property:{name:"constructor",type:"Identifier"},computed:false,type:"MemberExpression"},operator:"===",right:{name:"Symbol",type:"Identifier"},type:"BinaryExpression"},type:"LogicalExpression"},consequent:{value:"symbol",type:"Literal"},alternate:{operator:"typeof",prefix:true,argument:{name:"obj",type:"Identifier"},type:"UnaryExpression"},type:"ConditionalExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"},"let-scoping-return":{body:[{test:{left:{operator:"typeof",prefix:true,argument:{name:"RETURN",type:"Identifier"},type:"UnaryExpression"},operator:"===",right:{value:"object",type:"Literal"},type:"BinaryExpression"},consequent:{argument:{object:{name:"RETURN",type:"Identifier"},property:{name:"v",type:"Identifier"},computed:false,type:"MemberExpression"},type:"ReturnStatement"},alternate:null,type:"IfStatement"}],type:"Program"},"named-function":{body:[{expression:{callee:{id:null,generator:false,expression:false,params:[],body:{body:[{id:{name:"GET_OUTER_ID",type:"Identifier"},generator:false,expression:false,params:[],body:{body:[{argument:{name:"FUNCTION_ID",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionDeclaration"},{argument:{name:"FUNCTION",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},arguments:[],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"property-method-assignment-wrapper-generator":{body:[{expression:{callee:{id:null,generator:false,expression:false,params:[{name:"FUNCTION_KEY",type:"Identifier"}],body:{body:[{id:{name:"FUNCTION_ID",type:"Identifier"},generator:true,expression:false,params:[],body:{body:[{argument:{delegate:true,argument:{callee:{object:{name:"FUNCTION_KEY",type:"Identifier"},property:{name:"apply",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{type:"ThisExpression"},{name:"arguments",type:"Identifier"}],type:"CallExpression"},type:"YieldExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionDeclaration"},{expression:{operator:"=",left:{object:{name:"FUNCTION_ID",type:"Identifier"},property:{name:"toString",type:"Identifier"},computed:false,type:"MemberExpression"},right:{id:null,generator:false,expression:false,params:[],body:{body:[{argument:{callee:{object:{name:"FUNCTION_KEY",type:"Identifier"},property:{name:"toString",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"},{argument:{name:"FUNCTION_ID",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},arguments:[{name:"FUNCTION",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"property-method-assignment-wrapper":{body:[{expression:{callee:{id:null,generator:false,expression:false,params:[{name:"FUNCTION_KEY",type:"Identifier"}],body:{body:[{id:{name:"FUNCTION_ID",type:"Identifier"},generator:false,expression:false,params:[],body:{body:[{argument:{callee:{object:{name:"FUNCTION_KEY",type:"Identifier"},property:{name:"apply",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{type:"ThisExpression"},{name:"arguments",type:"Identifier"}],type:"CallExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionDeclaration"},{expression:{operator:"=",left:{object:{name:"FUNCTION_ID",type:"Identifier"},property:{name:"toString",type:"Identifier"},computed:false,type:"MemberExpression"},right:{id:null,generator:false,expression:false,params:[],body:{body:[{argument:{callee:{object:{name:"FUNCTION_KEY",type:"Identifier"},property:{name:"toString",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[],type:"CallExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"},{argument:{name:"FUNCTION_ID",type:"Identifier"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},arguments:[{name:"FUNCTION",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"prototype-identifier":{body:[{expression:{object:{name:"CLASS_NAME",type:"Identifier"},property:{name:"prototype",type:"Identifier"},computed:false,type:"MemberExpression"},type:"ExpressionStatement"}],type:"Program"},"require-assign-key":{body:[{declarations:[{id:{name:"VARIABLE_NAME",type:"Identifier"},init:{object:{callee:{name:"require",type:"Identifier"},arguments:[{name:"MODULE_NAME",type:"Identifier"}],type:"CallExpression"},property:{name:"KEY",type:"Identifier"},computed:false,type:"MemberExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"}],type:"Program"},require:{body:[{expression:{callee:{name:"require",type:"Identifier"},arguments:[{name:"MODULE_NAME",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},rest:{body:[{init:{declarations:[{id:{name:"LEN",type:"Identifier"},init:{object:{name:"ARGUMENTS",type:"Identifier"},property:{name:"length",type:"Identifier"},computed:false,type:"MemberExpression"},type:"VariableDeclarator"},{id:{name:"ARRAY",type:"Identifier"},init:{callee:{name:"Array",type:"Identifier"},arguments:[{name:"ARRAY_LEN",type:"Identifier"}],type:"CallExpression"},type:"VariableDeclarator"},{id:{name:"KEY",type:"Identifier"},init:{name:"START",type:"Identifier"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},test:{left:{name:"KEY",type:"Identifier"},operator:"<",right:{name:"LEN",type:"Identifier"},type:"BinaryExpression"},update:{operator:"++",prefix:false,argument:{name:"KEY",type:"Identifier"},type:"UpdateExpression"},body:{body:[{expression:{operator:"=",left:{object:{name:"ARRAY",type:"Identifier"},property:{name:"ARRAY_KEY",type:"Identifier"},computed:true,type:"MemberExpression"},right:{object:{name:"ARGUMENTS",type:"Identifier"},property:{name:"KEY",type:"Identifier"},computed:true,type:"MemberExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"ForStatement"}],type:"Program"},"self-contained-helpers-head":{body:[{expression:{operator:"=",left:{object:{name:"exports",type:"Identifier"},property:{value:"default",type:"Literal"},computed:true,type:"MemberExpression"},right:{name:"HELPER",type:"Identifier"},type:"AssignmentExpression"},type:"ExpressionStatement"},{expression:{operator:"=",left:{object:{name:"exports",type:"Identifier"},property:{name:"__esModule",type:"Identifier"},computed:false,type:"MemberExpression"},right:{value:true,type:"Literal"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"Program"},system:{body:[{expression:{callee:{object:{name:"System",type:"Identifier"},property:{name:"register",type:"Identifier"},computed:false,type:"MemberExpression"},arguments:[{name:"MODULE_NAME",type:"Identifier"},{name:"MODULE_DEPENDENCIES",type:"Identifier"},{id:null,generator:false,expression:false,params:[{name:"EXPORT_IDENTIFIER",type:"Identifier"}],body:{body:[{argument:{properties:[{method:false,shorthand:false,computed:false,key:{name:"setters",type:"Identifier"},value:{name:"SETTERS",type:"Identifier"},kind:"init",type:"Property"},{method:false,shorthand:false,computed:false,key:{name:"execute",type:"Identifier"},value:{name:"EXECUTE",type:"Identifier"},kind:"init",type:"Property"}],type:"ObjectExpression"},type:"ReturnStatement"}],type:"BlockStatement"},type:"FunctionExpression"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"tail-call-body":{body:[{body:[{declarations:[{id:{name:"AGAIN_ID",type:"Identifier"},init:{value:true,type:"Literal"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{body:{test:{name:"AGAIN_ID",type:"Identifier"},body:{expression:{name:"BLOCK",type:"Identifier"},type:"ExpressionStatement"},type:"WhileStatement"},label:{name:"FUNCTION_ID",type:"Identifier"},type:"LabeledStatement"}],type:"BlockStatement"}],type:"Program"},"test-exports":{body:[{expression:{left:{operator:"typeof",prefix:true,argument:{name:"exports",type:"Identifier"},type:"UnaryExpression"},operator:"!==",right:{value:"undefined",type:"Literal"},type:"BinaryExpression"},type:"ExpressionStatement"}],type:"Program"},"test-module":{body:[{expression:{left:{operator:"typeof",prefix:true,argument:{name:"module",type:"Identifier"},type:"UnaryExpression"},operator:"!==",right:{value:"undefined",type:"Literal"},type:"BinaryExpression"},type:"ExpressionStatement"}],type:"Program"},"umd-commonjs-strict":{body:[{expression:{callee:{id:null,generator:false,expression:false,params:[{name:"root",type:"Identifier"},{name:"factory",type:"Identifier"}],body:{body:[{test:{left:{left:{operator:"typeof",prefix:true,argument:{name:"define",type:"Identifier"},type:"UnaryExpression"},operator:"===",right:{value:"function",type:"Literal"},type:"BinaryExpression"},operator:"&&",right:{object:{name:"define",type:"Identifier"},property:{name:"amd",type:"Identifier"},computed:false,type:"MemberExpression"},type:"LogicalExpression"},consequent:{body:[{expression:{callee:{name:"define",type:"Identifier"},arguments:[{name:"AMD_ARGUMENTS",type:"Identifier"},{name:"factory",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:{test:{left:{operator:"typeof",prefix:true,argument:{name:"exports",type:"Identifier"},type:"UnaryExpression"},operator:"===",right:{value:"object",type:"Literal"},type:"BinaryExpression"},consequent:{body:[{expression:{callee:{name:"factory",type:"Identifier"},arguments:[{name:"COMMON_ARGUMENTS",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:{body:[{expression:{callee:{name:"factory",type:"Identifier"},arguments:[{name:"BROWSER_ARGUMENTS",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"IfStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},arguments:[{name:"UMD_ROOT",type:"Identifier"},{id:null,generator:false,expression:false,params:[{name:"FACTORY_PARAMETERS",type:"Identifier"}],body:{body:[{expression:{name:"FACTORY_BODY",type:"Identifier"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"FunctionExpression"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"Program"},"umd-runner-body":{body:[{expression:{id:null,generator:false,expression:false,params:[{name:"global",type:"Identifier"},{name:"factory",type:"Identifier"}],body:{body:[{test:{left:{left:{operator:"typeof",prefix:true,argument:{name:"define",type:"Identifier"},type:"UnaryExpression"},operator:"===",right:{value:"function",type:"Literal"},type:"BinaryExpression"},operator:"&&",right:{object:{name:"define",type:"Identifier"},property:{name:"amd",type:"Identifier"},computed:false,type:"MemberExpression"},type:"LogicalExpression"},consequent:{body:[{expression:{callee:{name:"define",type:"Identifier"},arguments:[{name:"AMD_ARGUMENTS",type:"Identifier"},{name:"factory",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:{test:{name:"COMMON_TEST",type:"Identifier"},consequent:{body:[{expression:{callee:{name:"factory",type:"Identifier"},arguments:[{name:"COMMON_ARGUMENTS",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},alternate:{body:[{declarations:[{id:{name:"mod",type:"Identifier"},init:{properties:[{method:false,shorthand:false,computed:false,key:{name:"exports",type:"Identifier"},value:{properties:[],type:"ObjectExpression"},kind:"init",type:"Property"}],type:"ObjectExpression"},type:"VariableDeclarator"}],kind:"var",type:"VariableDeclaration"},{expression:{callee:{name:"factory",type:"Identifier"},arguments:[{object:{name:"mod",type:"Identifier"},property:{name:"exports",type:"Identifier"},computed:false,type:"MemberExpression"},{name:"BROWSER_ARGUMENTS",type:"Identifier"}],type:"CallExpression"},type:"ExpressionStatement"},{expression:{operator:"=",left:{object:{name:"global",type:"Identifier"},property:{name:"GLOBAL_ARG",type:"Identifier"},computed:false,type:"MemberExpression"},right:{object:{name:"mod",type:"Identifier"},property:{name:"exports",type:"Identifier"},computed:false,type:"MemberExpression"},type:"AssignmentExpression"},type:"ExpressionStatement"}],type:"BlockStatement"},type:"IfStatement"},type:"IfStatement"}],type:"BlockStatement"},type:"FunctionExpression",parenthesizedExpression:true},type:"ExpressionStatement"}],type:"Program"}}},{}]},{},[19])(19)});
diff --git a/assets/bookify/blank.html b/assets/bookify/blank.html
new file mode 100755
index 000000000..e69de29bb
diff --git a/assets/browsers/chrome.svg b/assets/browsers/chrome.svg
new file mode 100755
index 000000000..65cee5a6b
--- /dev/null
+++ b/assets/browsers/chrome.svg
@@ -0,0 +1,192 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/browsers/firefox.svg b/assets/browsers/firefox.svg
new file mode 100755
index 000000000..68c9532c7
--- /dev/null
+++ b/assets/browsers/firefox.svg
@@ -0,0 +1,1561 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/browsers/ie.svg b/assets/browsers/ie.svg
new file mode 100755
index 000000000..b8855de77
--- /dev/null
+++ b/assets/browsers/ie.svg
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
diff --git a/assets/browsers/opera.svg b/assets/browsers/opera.svg
new file mode 100755
index 000000000..7eccf5e95
--- /dev/null
+++ b/assets/browsers/opera.svg
@@ -0,0 +1,408 @@
+
+image/svg+xml
\ No newline at end of file
diff --git a/assets/browsers/safari.svg b/assets/browsers/safari.svg
new file mode 100755
index 000000000..c27418f49
--- /dev/null
+++ b/assets/browsers/safari.svg
@@ -0,0 +1,29 @@
+
+
+
+ Safari
+ Created with Sketch.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/assets/carousel/1.png b/assets/carousel/1.png
new file mode 100755
index 000000000..62c91a8ac
Binary files /dev/null and b/assets/carousel/1.png differ
diff --git a/assets/carousel/10.png b/assets/carousel/10.png
new file mode 100755
index 000000000..c604c9dc0
Binary files /dev/null and b/assets/carousel/10.png differ
diff --git a/assets/carousel/2.png b/assets/carousel/2.png
new file mode 100755
index 000000000..44d07b296
Binary files /dev/null and b/assets/carousel/2.png differ
diff --git a/assets/carousel/3.png b/assets/carousel/3.png
new file mode 100755
index 000000000..8c42d030b
Binary files /dev/null and b/assets/carousel/3.png differ
diff --git a/assets/carousel/4.png b/assets/carousel/4.png
new file mode 100755
index 000000000..54bb57d8e
Binary files /dev/null and b/assets/carousel/4.png differ
diff --git a/assets/carousel/5.png b/assets/carousel/5.png
new file mode 100755
index 000000000..b3fa4724b
Binary files /dev/null and b/assets/carousel/5.png differ
diff --git a/assets/carousel/6.png b/assets/carousel/6.png
new file mode 100755
index 000000000..e3b25489f
Binary files /dev/null and b/assets/carousel/6.png differ
diff --git a/assets/carousel/7.png b/assets/carousel/7.png
new file mode 100755
index 000000000..dde832ee7
Binary files /dev/null and b/assets/carousel/7.png differ
diff --git a/assets/carousel/8.png b/assets/carousel/8.png
new file mode 100755
index 000000000..54f782ec8
Binary files /dev/null and b/assets/carousel/8.png differ
diff --git a/assets/carousel/9.png b/assets/carousel/9.png
new file mode 100755
index 000000000..72af497ea
Binary files /dev/null and b/assets/carousel/9.png differ
diff --git a/assets/clickjacking/facebook.html b/assets/clickjacking/facebook.html
new file mode 100755
index 000000000..6e2c39bee
--- /dev/null
+++ b/assets/clickjacking/facebook.html
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/assets/clipart/30.png b/assets/clipart/30.png
new file mode 100755
index 000000000..f71263982
Binary files /dev/null and b/assets/clipart/30.png differ
diff --git a/assets/clipart/angry_dog.png b/assets/clipart/angry_dog.png
new file mode 100755
index 000000000..5dadb8bd5
Binary files /dev/null and b/assets/clipart/angry_dog.png differ
diff --git a/assets/clipart/arrow-down.png b/assets/clipart/arrow-down.png
new file mode 100755
index 000000000..49f76f5cd
Binary files /dev/null and b/assets/clipart/arrow-down.png differ
diff --git a/assets/clipart/arrow-left.jpg b/assets/clipart/arrow-left.jpg
new file mode 100755
index 000000000..e9d29b874
Binary files /dev/null and b/assets/clipart/arrow-left.jpg differ
diff --git a/assets/clipart/arrow-right.jpg b/assets/clipart/arrow-right.jpg
new file mode 100755
index 000000000..964f5acb7
Binary files /dev/null and b/assets/clipart/arrow-right.jpg differ
diff --git a/assets/clipart/arrow-right.png b/assets/clipart/arrow-right.png
new file mode 100755
index 000000000..4f05ea367
Binary files /dev/null and b/assets/clipart/arrow-right.png differ
diff --git a/assets/clipart/ball.svg b/assets/clipart/ball.svg
new file mode 100755
index 000000000..b9203d0ac
--- /dev/null
+++ b/assets/clipart/ball.svg
@@ -0,0 +1,17 @@
+
+
+
+ ball
+ Created with Sketch.
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/assets/clipart/boat.png b/assets/clipart/boat.png
new file mode 100755
index 000000000..ec40c993e
Binary files /dev/null and b/assets/clipart/boat.png differ
diff --git a/assets/clipart/computer-smile.gif b/assets/clipart/computer-smile.gif
new file mode 100755
index 000000000..fa8ff50bd
Binary files /dev/null and b/assets/clipart/computer-smile.gif differ
diff --git a/assets/clipart/computer.gif b/assets/clipart/computer.gif
new file mode 100755
index 000000000..a845b6fbc
Binary files /dev/null and b/assets/clipart/computer.gif differ
diff --git a/assets/clipart/delete.gif b/assets/clipart/delete.gif
new file mode 100755
index 000000000..6d4d1b72f
Binary files /dev/null and b/assets/clipart/delete.gif differ
diff --git a/assets/clipart/download.png b/assets/clipart/download.png
new file mode 100755
index 000000000..f12e6b6e0
Binary files /dev/null and b/assets/clipart/download.png differ
diff --git a/assets/clipart/download_lq.png b/assets/clipart/download_lq.png
new file mode 100755
index 000000000..4d621a118
Binary files /dev/null and b/assets/clipart/download_lq.png differ
diff --git a/assets/clipart/flyjet.jpg b/assets/clipart/flyjet.jpg
new file mode 100755
index 000000000..d2d635523
Binary files /dev/null and b/assets/clipart/flyjet.jpg differ
diff --git a/assets/clipart/handle-se.png b/assets/clipart/handle-se.png
new file mode 100755
index 000000000..408b01a9e
Binary files /dev/null and b/assets/clipart/handle-se.png differ
diff --git a/assets/clipart/hedgehog_nocache.jpg b/assets/clipart/hedgehog_nocache.jpg
new file mode 100755
index 000000000..8e54148a8
Binary files /dev/null and b/assets/clipart/hedgehog_nocache.jpg differ
diff --git a/assets/clipart/heroes.jpg b/assets/clipart/heroes.jpg
new file mode 100755
index 000000000..94d57766d
Binary files /dev/null and b/assets/clipart/heroes.jpg differ
diff --git a/assets/clipart/key.png b/assets/clipart/key.png
new file mode 100755
index 000000000..6ea44aa3c
Binary files /dev/null and b/assets/clipart/key.png differ
diff --git a/assets/clipart/mousie.gif b/assets/clipart/mousie.gif
new file mode 100755
index 000000000..f1698fed1
Binary files /dev/null and b/assets/clipart/mousie.gif differ
diff --git a/assets/clipart/owl-mult.jpg b/assets/clipart/owl-mult.jpg
new file mode 100755
index 000000000..9327a4dee
Binary files /dev/null and b/assets/clipart/owl-mult.jpg differ
diff --git a/assets/clipart/prompt.png b/assets/clipart/prompt.png
new file mode 100755
index 000000000..b8d6190d9
Binary files /dev/null and b/assets/clipart/prompt.png differ
diff --git a/assets/clipart/recyclebin.png b/assets/clipart/recyclebin.png
new file mode 100755
index 000000000..2f0f21cc5
Binary files /dev/null and b/assets/clipart/recyclebin.png differ
diff --git a/assets/clipart/select-button.gif b/assets/clipart/select-button.gif
new file mode 100755
index 000000000..12654f99e
Binary files /dev/null and b/assets/clipart/select-button.gif differ
diff --git a/assets/clipart/square_50.png b/assets/clipart/square_50.png
new file mode 100755
index 000000000..2b83c561c
Binary files /dev/null and b/assets/clipart/square_50.png differ
diff --git a/assets/clipart/train.gif b/assets/clipart/train.gif
new file mode 100755
index 000000000..9cbc9884d
Binary files /dev/null and b/assets/clipart/train.gif differ
diff --git a/assets/clipart/updown.gif b/assets/clipart/updown.gif
new file mode 100755
index 000000000..0d02d8935
Binary files /dev/null and b/assets/clipart/updown.gif differ
diff --git a/assets/clipart/web.jpg b/assets/clipart/web.jpg
new file mode 100755
index 000000000..a74cd073b
Binary files /dev/null and b/assets/clipart/web.jpg differ
diff --git a/assets/clipart/winnie-mult.jpg b/assets/clipart/winnie-mult.jpg
new file mode 100755
index 000000000..5ef65e1f5
Binary files /dev/null and b/assets/clipart/winnie-mult.jpg differ
diff --git a/assets/clipart/winnie-nazarov.jpg b/assets/clipart/winnie-nazarov.jpg
new file mode 100755
index 000000000..7944f4d23
Binary files /dev/null and b/assets/clipart/winnie-nazarov.jpg differ
diff --git a/assets/clipart/winnie-stamp.jpg b/assets/clipart/winnie-stamp.jpg
new file mode 100755
index 000000000..e69de29bb
diff --git a/assets/clipart/yozhik.jpg b/assets/clipart/yozhik.jpg
new file mode 100755
index 000000000..8e54148a8
Binary files /dev/null and b/assets/clipart/yozhik.jpg differ
diff --git a/assets/cloudflare/10xx-errors.html b/assets/cloudflare/10xx-errors.html
new file mode 100644
index 000000000..132153fc4
--- /dev/null
+++ b/assets/cloudflare/10xx-errors.html
@@ -0,0 +1,70 @@
+
+
+
+
+
+ JavaScript.ru
+
+
+
+
+
+
+
+
+ ::CLOUDFLARE_ERROR_1000S_BOX::
+
+
+
+
+
diff --git a/assets/cloudflare/5xx-errors.html b/assets/cloudflare/5xx-errors.html
new file mode 100644
index 000000000..71a36868f
--- /dev/null
+++ b/assets/cloudflare/5xx-errors.html
@@ -0,0 +1,78 @@
+
+
+
+
+
+ JavaScript.ru
+
+
+
+
+
+
+
+
+ ::CLOUDFLARE_ERROR_500S_BOX::
+
+
+
+
+
diff --git a/assets/cloudflare/advanced-security.html b/assets/cloudflare/advanced-security.html
new file mode 100644
index 000000000..a05575c4b
--- /dev/null
+++ b/assets/cloudflare/advanced-security.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+ JavaScript.ru
+
+
+
+
+
+
+
+
+
Была запущена система безопасности сайта
+
Скорее всего, вы пытаетесь совершить действие, которое вызвало подозрение.
+
Для получения доступа введите символы с картинки и нажмите кнопку:
+ ::CAPTCHA_BOX::
+
+
+
+
+
diff --git a/assets/cloudflare/always-online.html b/assets/cloudflare/always-online.html
new file mode 100644
index 000000000..3979fd33b
--- /dev/null
+++ b/assets/cloudflare/always-online.html
@@ -0,0 +1,115 @@
+
+
+
+
+
+ JavaScript.ru
+
+
+
+
+
+
+
+
+
+ ::ALWAYS_ONLINE_NO_COPY_BOX::
+
+
+
+
+
diff --git a/assets/cloudflare/basic-security.html b/assets/cloudflare/basic-security.html
new file mode 100644
index 000000000..b3920322c
--- /dev/null
+++ b/assets/cloudflare/basic-security.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+ JavaScript.ru
+
+
+
+
+
+
+
+
+
Была запущена система безопасности сайта
+
Скорее всего, вы пытаетесь совершить действие, которое вызвало подозрение.
+
Для получения доступа введите символы с картинки и нажмите кнопку:
+ ::CAPTCHA_BOX::
+
+
+
+
+
diff --git a/assets/cloudflare/country-challenge.html b/assets/cloudflare/country-challenge.html
new file mode 100644
index 000000000..ec77e4ee1
--- /dev/null
+++ b/assets/cloudflare/country-challenge.html
@@ -0,0 +1,75 @@
+
+
+
+
+
+ JavaScript.ru
+
+
+
+
+
+
+
+
+
Была запущена система безопасности сайта
+
Ваш IP-адрес находится в черном списке. Обратитесь к администратору сайта.
+
Для получения доступа введите символы с картинки и нажмите кнопку:
+ ::CAPTCHA_BOX::
+
+
+
+
+
diff --git a/assets/cloudflare/im-under-attack-mode.html b/assets/cloudflare/im-under-attack-mode.html
new file mode 100644
index 000000000..f9da69ea6
--- /dev/null
+++ b/assets/cloudflare/im-under-attack-mode.html
@@ -0,0 +1,73 @@
+
+
+
+
+
+ JavaScript.ru
+
+
+
+
+
+
+
+
+
Пожалуйста, подождите...
+ ::IM_UNDER_ATTACK_BOX::
+
+
+
+
+
diff --git a/assets/cloudflare/ip-or-ip-range-block.html b/assets/cloudflare/ip-or-ip-range-block.html
new file mode 100644
index 000000000..bbe76b6ea
--- /dev/null
+++ b/assets/cloudflare/ip-or-ip-range-block.html
@@ -0,0 +1,73 @@
+
+
+
+
+
+ JavaScript.ru
+
+
+
+
+
+
+
+
+
Доступ заблокирован
+
Ваш IP-адрес находится в черном списке. Обратитесь к администратору сайта.
+
+
+
+
+
diff --git a/assets/cloudflare/urls.txt b/assets/cloudflare/urls.txt
new file mode 100644
index 000000000..06d46ee37
--- /dev/null
+++ b/assets/cloudflare/urls.txt
@@ -0,0 +1,8 @@
+https://learn.javascript.ru/cloudflare/basic-security.html
+https://learn.javascript.ru/cloudflare/advanced-security.html
+https://learn.javascript.ru/cloudflare/country-challenge.html
+https://learn.javascript.ru/cloudflare/ip-or-ip-range-block.html
+https://learn.javascript.ru/cloudflare/im-under-attack-mode.html
+https://learn.javascript.ru/cloudflare/5xx-errors.html
+https://learn.javascript.ru/cloudflare/10xx-errors.html
+https://learn.javascript.ru/cloudflare/always-online.html
diff --git a/assets/courses/adium.mp4 b/assets/courses/adium.mp4
new file mode 100644
index 000000000..460c1db07
Binary files /dev/null and b/assets/courses/adium.mp4 differ
diff --git a/assets/courses/course-knowledge-profile-alternative@2x.png b/assets/courses/course-knowledge-profile-alternative@2x.png
new file mode 100644
index 000000000..17dfb3749
Binary files /dev/null and b/assets/courses/course-knowledge-profile-alternative@2x.png differ
diff --git a/assets/courses/course-knowledge-profile.png b/assets/courses/course-knowledge-profile.png
new file mode 100644
index 000000000..1b1f845b7
Binary files /dev/null and b/assets/courses/course-knowledge-profile.png differ
diff --git a/assets/courses/course-knowledge-profile@2x.png b/assets/courses/course-knowledge-profile@2x.png
new file mode 100644
index 000000000..d08a71a1e
Binary files /dev/null and b/assets/courses/course-knowledge-profile@2x.png differ
diff --git a/assets/courses/git-win-1.png b/assets/courses/git-win-1.png
new file mode 100644
index 000000000..b47c181e6
Binary files /dev/null and b/assets/courses/git-win-1.png differ
diff --git a/assets/courses/git-win-2.png b/assets/courses/git-win-2.png
new file mode 100644
index 000000000..a3a7d9b97
Binary files /dev/null and b/assets/courses/git-win-2.png differ
diff --git a/assets/courses/logos/1.png b/assets/courses/logos/1.png
new file mode 100644
index 000000000..759a90e0b
Binary files /dev/null and b/assets/courses/logos/1.png differ
diff --git a/assets/courses/logos/10.png b/assets/courses/logos/10.png
new file mode 100644
index 000000000..2a3e646d9
Binary files /dev/null and b/assets/courses/logos/10.png differ
diff --git a/assets/courses/logos/11.png b/assets/courses/logos/11.png
new file mode 100644
index 000000000..4cac20a31
Binary files /dev/null and b/assets/courses/logos/11.png differ
diff --git a/assets/courses/logos/12.png b/assets/courses/logos/12.png
new file mode 100644
index 000000000..7c5915dda
Binary files /dev/null and b/assets/courses/logos/12.png differ
diff --git a/assets/courses/logos/13.png b/assets/courses/logos/13.png
new file mode 100644
index 000000000..e91fe58a2
Binary files /dev/null and b/assets/courses/logos/13.png differ
diff --git a/assets/courses/logos/14.png b/assets/courses/logos/14.png
new file mode 100644
index 000000000..82ad40113
Binary files /dev/null and b/assets/courses/logos/14.png differ
diff --git a/assets/courses/logos/15.png b/assets/courses/logos/15.png
new file mode 100644
index 000000000..7c5e23299
Binary files /dev/null and b/assets/courses/logos/15.png differ
diff --git a/assets/courses/logos/16.png b/assets/courses/logos/16.png
new file mode 100644
index 000000000..8ed00bf56
Binary files /dev/null and b/assets/courses/logos/16.png differ
diff --git a/assets/courses/logos/17.png b/assets/courses/logos/17.png
new file mode 100644
index 000000000..66351495a
Binary files /dev/null and b/assets/courses/logos/17.png differ
diff --git a/assets/courses/logos/18.png b/assets/courses/logos/18.png
new file mode 100644
index 000000000..eefdf02f0
Binary files /dev/null and b/assets/courses/logos/18.png differ
diff --git a/assets/courses/logos/19.png b/assets/courses/logos/19.png
new file mode 100644
index 000000000..6132f02c3
Binary files /dev/null and b/assets/courses/logos/19.png differ
diff --git a/assets/courses/logos/2.png b/assets/courses/logos/2.png
new file mode 100644
index 000000000..23ccae31b
Binary files /dev/null and b/assets/courses/logos/2.png differ
diff --git a/assets/courses/logos/20.png b/assets/courses/logos/20.png
new file mode 100644
index 000000000..47d28a2a0
Binary files /dev/null and b/assets/courses/logos/20.png differ
diff --git a/assets/courses/logos/21.png b/assets/courses/logos/21.png
new file mode 100644
index 000000000..e83d25e92
Binary files /dev/null and b/assets/courses/logos/21.png differ
diff --git a/assets/courses/logos/22.png b/assets/courses/logos/22.png
new file mode 100644
index 000000000..814288e8e
Binary files /dev/null and b/assets/courses/logos/22.png differ
diff --git a/assets/courses/logos/23.png b/assets/courses/logos/23.png
new file mode 100644
index 000000000..caad65d2c
Binary files /dev/null and b/assets/courses/logos/23.png differ
diff --git a/assets/courses/logos/24.png b/assets/courses/logos/24.png
new file mode 100644
index 000000000..02d2f18e4
Binary files /dev/null and b/assets/courses/logos/24.png differ
diff --git a/assets/courses/logos/25.png b/assets/courses/logos/25.png
new file mode 100644
index 000000000..1cbd54a4d
Binary files /dev/null and b/assets/courses/logos/25.png differ
diff --git a/assets/courses/logos/26.png b/assets/courses/logos/26.png
new file mode 100644
index 000000000..478649638
Binary files /dev/null and b/assets/courses/logos/26.png differ
diff --git a/assets/courses/logos/27.png b/assets/courses/logos/27.png
new file mode 100644
index 000000000..22737c0d8
Binary files /dev/null and b/assets/courses/logos/27.png differ
diff --git a/assets/courses/logos/3.png b/assets/courses/logos/3.png
new file mode 100644
index 000000000..6a2720260
Binary files /dev/null and b/assets/courses/logos/3.png differ
diff --git a/assets/courses/logos/4.png b/assets/courses/logos/4.png
new file mode 100644
index 000000000..9d671bcfc
Binary files /dev/null and b/assets/courses/logos/4.png differ
diff --git a/assets/courses/logos/5.png b/assets/courses/logos/5.png
new file mode 100644
index 000000000..aec4ed613
Binary files /dev/null and b/assets/courses/logos/5.png differ
diff --git a/assets/courses/logos/6.png b/assets/courses/logos/6.png
new file mode 100644
index 000000000..2484ce065
Binary files /dev/null and b/assets/courses/logos/6.png differ
diff --git a/assets/courses/logos/7.png b/assets/courses/logos/7.png
new file mode 100644
index 000000000..44df1a175
Binary files /dev/null and b/assets/courses/logos/7.png differ
diff --git a/assets/courses/logos/8.png b/assets/courses/logos/8.png
new file mode 100644
index 000000000..343ab5488
Binary files /dev/null and b/assets/courses/logos/8.png differ
diff --git a/assets/courses/logos/9.png b/assets/courses/logos/9.png
new file mode 100644
index 000000000..9d9913fc2
Binary files /dev/null and b/assets/courses/logos/9.png differ
diff --git a/assets/courses/pidgin.mp4 b/assets/courses/pidgin.mp4
new file mode 100644
index 000000000..ab03f9edd
Binary files /dev/null and b/assets/courses/pidgin.mp4 differ
diff --git a/assets/courses/pyramid.png b/assets/courses/pyramid.png
new file mode 100644
index 000000000..8a249eeac
Binary files /dev/null and b/assets/courses/pyramid.png differ
diff --git a/assets/devtools/bug.html b/assets/devtools/bug.html
new file mode 100755
index 000000000..e922e0d46
--- /dev/null
+++ b/assets/devtools/bug.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+На этой странице есть скрипт с ошибкой.
+
+
+
+
diff --git a/assets/drag-heroes/ball.png b/assets/drag-heroes/ball.png
new file mode 100755
index 000000000..834bea209
Binary files /dev/null and b/assets/drag-heroes/ball.png differ
diff --git a/assets/drag-heroes/field.png b/assets/drag-heroes/field.png
new file mode 100755
index 000000000..ebabc14af
Binary files /dev/null and b/assets/drag-heroes/field.png differ
diff --git a/assets/drag-heroes/heroes.png b/assets/drag-heroes/heroes.png
new file mode 100755
index 000000000..9566b5017
Binary files /dev/null and b/assets/drag-heroes/heroes.png differ
diff --git a/assets/drag-heroes/soccer_ball.png b/assets/drag-heroes/soccer_ball.png
new file mode 100755
index 000000000..4aa55877a
Binary files /dev/null and b/assets/drag-heroes/soccer_ball.png differ
diff --git a/assets/gallery/img1-lg.jpg b/assets/gallery/img1-lg.jpg
new file mode 100755
index 000000000..b0719d5a8
Binary files /dev/null and b/assets/gallery/img1-lg.jpg differ
diff --git a/assets/gallery/img2-lg.jpg b/assets/gallery/img2-lg.jpg
new file mode 100755
index 000000000..08df6db2e
Binary files /dev/null and b/assets/gallery/img2-lg.jpg differ
diff --git a/assets/gallery/img2-thumb.jpg b/assets/gallery/img2-thumb.jpg
new file mode 100755
index 000000000..a388d3bfb
Binary files /dev/null and b/assets/gallery/img2-thumb.jpg differ
diff --git a/assets/gallery/img3-lg.jpg b/assets/gallery/img3-lg.jpg
new file mode 100755
index 000000000..a08bf36eb
Binary files /dev/null and b/assets/gallery/img3-lg.jpg differ
diff --git a/assets/gallery/img3-thumb.jpg b/assets/gallery/img3-thumb.jpg
new file mode 100755
index 000000000..744b89a4f
Binary files /dev/null and b/assets/gallery/img3-thumb.jpg differ
diff --git a/assets/gallery/img4-lg.jpg b/assets/gallery/img4-lg.jpg
new file mode 100755
index 000000000..1a16b4e10
Binary files /dev/null and b/assets/gallery/img4-lg.jpg differ
diff --git a/assets/gallery/img4-thumb.jpg b/assets/gallery/img4-thumb.jpg
new file mode 100755
index 000000000..f24fa2497
Binary files /dev/null and b/assets/gallery/img4-thumb.jpg differ
diff --git a/assets/gallery/img5-lg.jpg b/assets/gallery/img5-lg.jpg
new file mode 100755
index 000000000..945e39805
Binary files /dev/null and b/assets/gallery/img5-lg.jpg differ
diff --git a/assets/gallery/img5-thumb.jpg b/assets/gallery/img5-thumb.jpg
new file mode 100755
index 000000000..b6704ef92
Binary files /dev/null and b/assets/gallery/img5-thumb.jpg differ
diff --git a/assets/gallery/img6-lg.jpg b/assets/gallery/img6-lg.jpg
new file mode 100755
index 000000000..3213ab5bd
Binary files /dev/null and b/assets/gallery/img6-lg.jpg differ
diff --git a/assets/gallery/img6-thumb.jpg b/assets/gallery/img6-thumb.jpg
new file mode 100755
index 000000000..c1ee1d565
Binary files /dev/null and b/assets/gallery/img6-thumb.jpg differ
diff --git a/assets/height-percent/arrow_left.png b/assets/height-percent/arrow_left.png
new file mode 100755
index 000000000..3399acc6b
Binary files /dev/null and b/assets/height-percent/arrow_left.png differ
diff --git a/assets/hello/ads.js b/assets/hello/ads.js
new file mode 100755
index 000000000..bddc4f5ec
--- /dev/null
+++ b/assets/hello/ads.js
@@ -0,0 +1 @@
+alert("Реклама загружена!");
diff --git a/assets/images-load/1.jpg b/assets/images-load/1.jpg
new file mode 100755
index 000000000..f0b9ab25b
Binary files /dev/null and b/assets/images-load/1.jpg differ
diff --git a/assets/images-load/2.jpg b/assets/images-load/2.jpg
new file mode 100755
index 000000000..1f2fb3f6d
Binary files /dev/null and b/assets/images-load/2.jpg differ
diff --git a/assets/images-load/3.jpg b/assets/images-load/3.jpg
new file mode 100755
index 000000000..100530c91
Binary files /dev/null and b/assets/images-load/3.jpg differ
diff --git a/assets/img/ball.gif b/assets/img/ball.gif
new file mode 100755
index 000000000..0b2c177f1
Binary files /dev/null and b/assets/img/ball.gif differ
diff --git a/assets/img/close-button.png b/assets/img/close-button.png
new file mode 100755
index 000000000..591dafb8f
Binary files /dev/null and b/assets/img/close-button.png differ
diff --git a/assets/img/courses/andrewsumin.jpg b/assets/img/courses/andrewsumin.jpg
new file mode 100644
index 000000000..3e4b1697f
Binary files /dev/null and b/assets/img/courses/andrewsumin.jpg differ
diff --git a/assets/img/courses/dmitryx.jpg b/assets/img/courses/dmitryx.jpg
new file mode 100644
index 000000000..dfd706f43
Binary files /dev/null and b/assets/img/courses/dmitryx.jpg differ
diff --git a/assets/img/courses/tyv.jpg b/assets/img/courses/tyv.jpg
new file mode 100644
index 000000000..5d8eba4e9
Binary files /dev/null and b/assets/img/courses/tyv.jpg differ
diff --git a/assets/img/email__logo.png b/assets/img/email__logo.png
new file mode 100755
index 000000000..e5f8a0695
Binary files /dev/null and b/assets/img/email__logo.png differ
diff --git a/assets/img/favicon/apple-touch-icon-precomposed.png b/assets/img/favicon/apple-touch-icon-precomposed.png
new file mode 100755
index 000000000..8139bf08c
Binary files /dev/null and b/assets/img/favicon/apple-touch-icon-precomposed.png differ
diff --git a/assets/img/favicon/favicon.ico b/assets/img/favicon/favicon.ico
new file mode 100755
index 000000000..283184a19
Binary files /dev/null and b/assets/img/favicon/favicon.ico differ
diff --git a/assets/img/favicon/favicon.png b/assets/img/favicon/favicon.png
new file mode 100755
index 000000000..a664829d9
Binary files /dev/null and b/assets/img/favicon/favicon.png differ
diff --git a/assets/img/favicon/tileicon.png b/assets/img/favicon/tileicon.png
new file mode 100755
index 000000000..bb4cfb4f3
Binary files /dev/null and b/assets/img/favicon/tileicon.png differ
diff --git a/assets/img/flags/ad.svg b/assets/img/flags/ad.svg
new file mode 100644
index 000000000..9190d9ea1
--- /dev/null
+++ b/assets/img/flags/ad.svg
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ae.svg b/assets/img/flags/ae.svg
new file mode 100644
index 000000000..e634982d8
--- /dev/null
+++ b/assets/img/flags/ae.svg
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/af.svg b/assets/img/flags/af.svg
new file mode 100644
index 000000000..937edcae3
--- /dev/null
+++ b/assets/img/flags/af.svg
@@ -0,0 +1,779 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ag.svg b/assets/img/flags/ag.svg
new file mode 100644
index 000000000..c7450f055
--- /dev/null
+++ b/assets/img/flags/ag.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ai.svg b/assets/img/flags/ai.svg
new file mode 100644
index 000000000..69c5041b3
--- /dev/null
+++ b/assets/img/flags/ai.svg
@@ -0,0 +1,791 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/al.svg b/assets/img/flags/al.svg
new file mode 100644
index 000000000..e9709ccb1
--- /dev/null
+++ b/assets/img/flags/al.svg
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/am.svg b/assets/img/flags/am.svg
new file mode 100644
index 000000000..03054df0d
--- /dev/null
+++ b/assets/img/flags/am.svg
@@ -0,0 +1,16 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ao.svg b/assets/img/flags/ao.svg
new file mode 100644
index 000000000..2e5ca479e
--- /dev/null
+++ b/assets/img/flags/ao.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/aq.svg b/assets/img/flags/aq.svg
new file mode 100644
index 000000000..40dec4751
--- /dev/null
+++ b/assets/img/flags/aq.svg
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ar.svg b/assets/img/flags/ar.svg
new file mode 100644
index 000000000..c36b65a8b
--- /dev/null
+++ b/assets/img/flags/ar.svg
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/as.svg b/assets/img/flags/as.svg
new file mode 100644
index 000000000..b3585f3af
--- /dev/null
+++ b/assets/img/flags/as.svg
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/at.svg b/assets/img/flags/at.svg
new file mode 100644
index 000000000..388a6b8b9
--- /dev/null
+++ b/assets/img/flags/at.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/au.svg b/assets/img/flags/au.svg
new file mode 100644
index 000000000..c064c7475
--- /dev/null
+++ b/assets/img/flags/au.svg
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/aw.svg b/assets/img/flags/aw.svg
new file mode 100644
index 000000000..ac8440a83
--- /dev/null
+++ b/assets/img/flags/aw.svg
@@ -0,0 +1,210 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ax.svg b/assets/img/flags/ax.svg
new file mode 100644
index 000000000..fd17f0bb8
--- /dev/null
+++ b/assets/img/flags/ax.svg
@@ -0,0 +1,27 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/az.svg b/assets/img/flags/az.svg
new file mode 100644
index 000000000..d77a2f53a
--- /dev/null
+++ b/assets/img/flags/az.svg
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ba.svg b/assets/img/flags/ba.svg
new file mode 100644
index 000000000..4336c07db
--- /dev/null
+++ b/assets/img/flags/ba.svg
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bb.svg b/assets/img/flags/bb.svg
new file mode 100644
index 000000000..2bf861da5
--- /dev/null
+++ b/assets/img/flags/bb.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bd.svg b/assets/img/flags/bd.svg
new file mode 100644
index 000000000..4b9d0c022
--- /dev/null
+++ b/assets/img/flags/bd.svg
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/be.svg b/assets/img/flags/be.svg
new file mode 100644
index 000000000..891501cbd
--- /dev/null
+++ b/assets/img/flags/be.svg
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bf.svg b/assets/img/flags/bf.svg
new file mode 100644
index 000000000..6d354c608
--- /dev/null
+++ b/assets/img/flags/bf.svg
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bg.svg b/assets/img/flags/bg.svg
new file mode 100644
index 000000000..2cf07bfc9
--- /dev/null
+++ b/assets/img/flags/bg.svg
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bh.svg b/assets/img/flags/bh.svg
new file mode 100644
index 000000000..a73eb8dde
--- /dev/null
+++ b/assets/img/flags/bh.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bi.svg b/assets/img/flags/bi.svg
new file mode 100644
index 000000000..20a3533f2
--- /dev/null
+++ b/assets/img/flags/bi.svg
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bj.svg b/assets/img/flags/bj.svg
new file mode 100644
index 000000000..132f9b5ed
--- /dev/null
+++ b/assets/img/flags/bj.svg
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bl.svg b/assets/img/flags/bl.svg
new file mode 100644
index 000000000..454ecc943
--- /dev/null
+++ b/assets/img/flags/bl.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bm.svg b/assets/img/flags/bm.svg
new file mode 100644
index 000000000..b2d83f5c3
--- /dev/null
+++ b/assets/img/flags/bm.svg
@@ -0,0 +1,363 @@
+
+
+
+
+
+
+ Bermuda
+
+
+
+
+ caribbean
+ america
+ flag
+ sign
+
+
+
+
+ Caleb Moore
+
+
+
+
+ Caleb Moore
+
+
+
+
+ Caleb Moore
+
+
+
+ image/svg+xml
+
+
+ en
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bn.svg b/assets/img/flags/bn.svg
new file mode 100644
index 000000000..2cb386e86
--- /dev/null
+++ b/assets/img/flags/bn.svg
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bo.svg b/assets/img/flags/bo.svg
new file mode 100644
index 000000000..5952c3094
--- /dev/null
+++ b/assets/img/flags/bo.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bq.svg b/assets/img/flags/bq.svg
new file mode 100644
index 000000000..5da21323d
--- /dev/null
+++ b/assets/img/flags/bq.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/br.svg b/assets/img/flags/br.svg
new file mode 100644
index 000000000..df1132002
--- /dev/null
+++ b/assets/img/flags/br.svg
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bs.svg b/assets/img/flags/bs.svg
new file mode 100644
index 000000000..570d7a5b3
--- /dev/null
+++ b/assets/img/flags/bs.svg
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bt.svg b/assets/img/flags/bt.svg
new file mode 100644
index 000000000..fada20a30
--- /dev/null
+++ b/assets/img/flags/bt.svg
@@ -0,0 +1,217 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bv.svg b/assets/img/flags/bv.svg
new file mode 100644
index 000000000..104b29bd7
--- /dev/null
+++ b/assets/img/flags/bv.svg
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bw.svg b/assets/img/flags/bw.svg
new file mode 100644
index 000000000..d7f0c92f3
--- /dev/null
+++ b/assets/img/flags/bw.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/by.svg b/assets/img/flags/by.svg
new file mode 100644
index 000000000..260168059
--- /dev/null
+++ b/assets/img/flags/by.svg
@@ -0,0 +1,266 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/bz.svg b/assets/img/flags/bz.svg
new file mode 100644
index 000000000..d352f9a15
--- /dev/null
+++ b/assets/img/flags/bz.svg
@@ -0,0 +1,302 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ca.svg b/assets/img/flags/ca.svg
new file mode 100644
index 000000000..eb528d941
--- /dev/null
+++ b/assets/img/flags/ca.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cc.svg b/assets/img/flags/cc.svg
new file mode 100644
index 000000000..d250b0523
--- /dev/null
+++ b/assets/img/flags/cc.svg
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cd.svg b/assets/img/flags/cd.svg
new file mode 100644
index 000000000..0bc79360d
--- /dev/null
+++ b/assets/img/flags/cd.svg
@@ -0,0 +1,16 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cf.svg b/assets/img/flags/cf.svg
new file mode 100644
index 000000000..ee8a291f1
--- /dev/null
+++ b/assets/img/flags/cf.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cg.svg b/assets/img/flags/cg.svg
new file mode 100644
index 000000000..76cd8ea7e
--- /dev/null
+++ b/assets/img/flags/cg.svg
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ch.svg b/assets/img/flags/ch.svg
new file mode 100644
index 000000000..36483307a
--- /dev/null
+++ b/assets/img/flags/ch.svg
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ci.svg b/assets/img/flags/ci.svg
new file mode 100644
index 000000000..4a6fc7f91
--- /dev/null
+++ b/assets/img/flags/ci.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ck.svg b/assets/img/flags/ck.svg
new file mode 100644
index 000000000..57efc0707
--- /dev/null
+++ b/assets/img/flags/ck.svg
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cl.svg b/assets/img/flags/cl.svg
new file mode 100644
index 000000000..ffa1d2023
--- /dev/null
+++ b/assets/img/flags/cl.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cm.svg b/assets/img/flags/cm.svg
new file mode 100644
index 000000000..a1186c333
--- /dev/null
+++ b/assets/img/flags/cm.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cn.svg b/assets/img/flags/cn.svg
new file mode 100644
index 000000000..121d077a1
--- /dev/null
+++ b/assets/img/flags/cn.svg
@@ -0,0 +1,19 @@
+
+
+ Flag of the People's Republic of China
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/co.svg b/assets/img/flags/co.svg
new file mode 100644
index 000000000..9a220d175
--- /dev/null
+++ b/assets/img/flags/co.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cr.svg b/assets/img/flags/cr.svg
new file mode 100644
index 000000000..79e5dd24e
--- /dev/null
+++ b/assets/img/flags/cr.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cu.svg b/assets/img/flags/cu.svg
new file mode 100644
index 000000000..897fa77f3
--- /dev/null
+++ b/assets/img/flags/cu.svg
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cv.svg b/assets/img/flags/cv.svg
new file mode 100644
index 000000000..1a65d045c
--- /dev/null
+++ b/assets/img/flags/cv.svg
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+ The United States of America flag, produced by Daniel McRae
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cw.svg b/assets/img/flags/cw.svg
new file mode 100644
index 000000000..f4cd92bfc
--- /dev/null
+++ b/assets/img/flags/cw.svg
@@ -0,0 +1,29 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cx.svg b/assets/img/flags/cx.svg
new file mode 100644
index 000000000..70f8b8b6d
--- /dev/null
+++ b/assets/img/flags/cx.svg
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cy.svg b/assets/img/flags/cy.svg
new file mode 100644
index 000000000..e6cc05d00
--- /dev/null
+++ b/assets/img/flags/cy.svg
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/cz.svg b/assets/img/flags/cz.svg
new file mode 100644
index 000000000..ee59f947f
--- /dev/null
+++ b/assets/img/flags/cz.svg
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/de.svg b/assets/img/flags/de.svg
new file mode 100644
index 000000000..aa101a3d1
--- /dev/null
+++ b/assets/img/flags/de.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/dj.svg b/assets/img/flags/dj.svg
new file mode 100644
index 000000000..a5621c55e
--- /dev/null
+++ b/assets/img/flags/dj.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/dk.svg b/assets/img/flags/dk.svg
new file mode 100644
index 000000000..c91659308
--- /dev/null
+++ b/assets/img/flags/dk.svg
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/dm.svg b/assets/img/flags/dm.svg
new file mode 100644
index 000000000..82fa18a3c
--- /dev/null
+++ b/assets/img/flags/dm.svg
@@ -0,0 +1,192 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/do.svg b/assets/img/flags/do.svg
new file mode 100644
index 000000000..22ff46493
--- /dev/null
+++ b/assets/img/flags/do.svg
@@ -0,0 +1,6801 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+ The United States of America flag, produced by Daniel McRae
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/dz.svg b/assets/img/flags/dz.svg
new file mode 100644
index 000000000..e05bd11f8
--- /dev/null
+++ b/assets/img/flags/dz.svg
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ec.svg b/assets/img/flags/ec.svg
new file mode 100644
index 000000000..0116d3787
--- /dev/null
+++ b/assets/img/flags/ec.svg
@@ -0,0 +1,184 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ee.svg b/assets/img/flags/ee.svg
new file mode 100644
index 000000000..cb04c4da0
--- /dev/null
+++ b/assets/img/flags/ee.svg
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/eg.svg b/assets/img/flags/eg.svg
new file mode 100644
index 000000000..e6b608a6e
--- /dev/null
+++ b/assets/img/flags/eg.svg
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/eh.svg b/assets/img/flags/eh.svg
new file mode 100644
index 000000000..68d82c7a9
--- /dev/null
+++ b/assets/img/flags/eh.svg
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/er.svg b/assets/img/flags/er.svg
new file mode 100644
index 000000000..9c5ebcf02
--- /dev/null
+++ b/assets/img/flags/er.svg
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/es.svg b/assets/img/flags/es.svg
new file mode 100644
index 000000000..506b28bcc
--- /dev/null
+++ b/assets/img/flags/es.svg
@@ -0,0 +1,705 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/et.svg b/assets/img/flags/et.svg
new file mode 100644
index 000000000..f81a16a5e
--- /dev/null
+++ b/assets/img/flags/et.svg
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/fi.svg b/assets/img/flags/fi.svg
new file mode 100644
index 000000000..f0d3c8e03
--- /dev/null
+++ b/assets/img/flags/fi.svg
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/fj.svg b/assets/img/flags/fj.svg
new file mode 100644
index 000000000..0f2ea3c9a
--- /dev/null
+++ b/assets/img/flags/fj.svg
@@ -0,0 +1,154 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/fk.svg b/assets/img/flags/fk.svg
new file mode 100644
index 000000000..904400621
--- /dev/null
+++ b/assets/img/flags/fk.svg
@@ -0,0 +1,215 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/fm.svg b/assets/img/flags/fm.svg
new file mode 100644
index 000000000..1b57bbfb4
--- /dev/null
+++ b/assets/img/flags/fm.svg
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/fo.svg b/assets/img/flags/fo.svg
new file mode 100644
index 000000000..37211bee8
--- /dev/null
+++ b/assets/img/flags/fo.svg
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/fr.svg b/assets/img/flags/fr.svg
new file mode 100644
index 000000000..7e0bdb8e1
--- /dev/null
+++ b/assets/img/flags/fr.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ga.svg b/assets/img/flags/ga.svg
new file mode 100644
index 000000000..74be3500e
--- /dev/null
+++ b/assets/img/flags/ga.svg
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gb.svg b/assets/img/flags/gb.svg
new file mode 100644
index 000000000..5389a49d3
--- /dev/null
+++ b/assets/img/flags/gb.svg
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gd.svg b/assets/img/flags/gd.svg
new file mode 100644
index 000000000..44c61b160
--- /dev/null
+++ b/assets/img/flags/gd.svg
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ge.svg b/assets/img/flags/ge.svg
new file mode 100644
index 000000000..a508b2b42
--- /dev/null
+++ b/assets/img/flags/ge.svg
@@ -0,0 +1,31 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gf.svg b/assets/img/flags/gf.svg
new file mode 100644
index 000000000..8fada7233
--- /dev/null
+++ b/assets/img/flags/gf.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gg.svg b/assets/img/flags/gg.svg
new file mode 100644
index 000000000..1144540ca
--- /dev/null
+++ b/assets/img/flags/gg.svg
@@ -0,0 +1,29 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gh.svg b/assets/img/flags/gh.svg
new file mode 100644
index 000000000..b6fa30d17
--- /dev/null
+++ b/assets/img/flags/gh.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gi.svg b/assets/img/flags/gi.svg
new file mode 100644
index 000000000..e40d6e753
--- /dev/null
+++ b/assets/img/flags/gi.svg
@@ -0,0 +1,347 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gl.svg b/assets/img/flags/gl.svg
new file mode 100644
index 000000000..37aaccf88
--- /dev/null
+++ b/assets/img/flags/gl.svg
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gm.svg b/assets/img/flags/gm.svg
new file mode 100644
index 000000000..d4409b23a
--- /dev/null
+++ b/assets/img/flags/gm.svg
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gn.svg b/assets/img/flags/gn.svg
new file mode 100644
index 000000000..23ce5b33e
--- /dev/null
+++ b/assets/img/flags/gn.svg
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gp.svg b/assets/img/flags/gp.svg
new file mode 100644
index 000000000..a775d8f3b
--- /dev/null
+++ b/assets/img/flags/gp.svg
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gq.svg b/assets/img/flags/gq.svg
new file mode 100644
index 000000000..4e878ccef
--- /dev/null
+++ b/assets/img/flags/gq.svg
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gr.svg b/assets/img/flags/gr.svg
new file mode 100644
index 000000000..4bff36c12
--- /dev/null
+++ b/assets/img/flags/gr.svg
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gs.svg b/assets/img/flags/gs.svg
new file mode 100644
index 000000000..18c6dbd4f
--- /dev/null
+++ b/assets/img/flags/gs.svg
@@ -0,0 +1,346 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ L
+
+
+ E
+
+
+ O
+
+
+ T
+
+
+ E
+
+
+ R
+
+
+ R
+
+
+ R
+
+
+ R
+
+
+ R
+
+
+ E
+
+
+ O
+
+
+ O
+
+
+ A
+
+
+ A
+
+
+ A
+
+
+ M
+
+
+ P
+
+
+ P
+
+
+ P
+
+
+ I
+
+
+ T
+
+
+ T
+
+
+ M
+
+
+ G
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ South Georgia and South Sandwich Islands
+
+
+
+ united_kingdom
+ flags
+ antarctic
+ sign
+ signs_and_symbols
+
+ europe
+
+
+
+
+ Tobias Jakobs
+
+
+
+
+ Tobias Jakobs
+
+
+
+
+ Tobias Jakobs
+
+
+
+ image/svg+xml
+
+
+
+
+ en
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gt.svg b/assets/img/flags/gt.svg
new file mode 100644
index 000000000..9ae0d79eb
--- /dev/null
+++ b/assets/img/flags/gt.svg
@@ -0,0 +1,139 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gu.svg b/assets/img/flags/gu.svg
new file mode 100644
index 000000000..797b88dc0
--- /dev/null
+++ b/assets/img/flags/gu.svg
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ G
+
+
+ U
+
+
+ A
+
+
+ M
+
+
+
+
+
+
+
+ G
+
+
+ U
+
+
+ A
+
+
+ M
+
+
+
+
diff --git a/assets/img/flags/gw.svg b/assets/img/flags/gw.svg
new file mode 100644
index 000000000..277f3a178
--- /dev/null
+++ b/assets/img/flags/gw.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/gy.svg b/assets/img/flags/gy.svg
new file mode 100644
index 000000000..626eff887
--- /dev/null
+++ b/assets/img/flags/gy.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/hk.svg b/assets/img/flags/hk.svg
new file mode 100644
index 000000000..7ad03f360
--- /dev/null
+++ b/assets/img/flags/hk.svg
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/hm.svg b/assets/img/flags/hm.svg
new file mode 100644
index 000000000..a3cd071cd
--- /dev/null
+++ b/assets/img/flags/hm.svg
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/hn.svg b/assets/img/flags/hn.svg
new file mode 100644
index 000000000..7e79933f5
--- /dev/null
+++ b/assets/img/flags/hn.svg
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/hr.svg b/assets/img/flags/hr.svg
new file mode 100644
index 000000000..4ba52b07f
--- /dev/null
+++ b/assets/img/flags/hr.svg
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ht.svg b/assets/img/flags/ht.svg
new file mode 100644
index 000000000..53475ab1e
--- /dev/null
+++ b/assets/img/flags/ht.svg
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/hu.svg b/assets/img/flags/hu.svg
new file mode 100644
index 000000000..8ab9d1b3a
--- /dev/null
+++ b/assets/img/flags/hu.svg
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/id.svg b/assets/img/flags/id.svg
new file mode 100644
index 000000000..ba4f9585b
--- /dev/null
+++ b/assets/img/flags/id.svg
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ie.svg b/assets/img/flags/ie.svg
new file mode 100644
index 000000000..f10a9c558
--- /dev/null
+++ b/assets/img/flags/ie.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/il.svg b/assets/img/flags/il.svg
new file mode 100644
index 000000000..518a2bc0d
--- /dev/null
+++ b/assets/img/flags/il.svg
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/im.svg b/assets/img/flags/im.svg
new file mode 100644
index 000000000..275cf86fa
--- /dev/null
+++ b/assets/img/flags/im.svg
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/in.svg b/assets/img/flags/in.svg
new file mode 100644
index 000000000..3265f8f5f
--- /dev/null
+++ b/assets/img/flags/in.svg
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/io.svg b/assets/img/flags/io.svg
new file mode 100644
index 000000000..6051b09b8
--- /dev/null
+++ b/assets/img/flags/io.svg
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/iq.svg b/assets/img/flags/iq.svg
new file mode 100644
index 000000000..e0dd0b9a9
--- /dev/null
+++ b/assets/img/flags/iq.svg
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ir.svg b/assets/img/flags/ir.svg
new file mode 100644
index 000000000..9779aeada
--- /dev/null
+++ b/assets/img/flags/ir.svg
@@ -0,0 +1,522 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/is.svg b/assets/img/flags/is.svg
new file mode 100644
index 000000000..046ffd0b5
--- /dev/null
+++ b/assets/img/flags/is.svg
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/it.svg b/assets/img/flags/it.svg
new file mode 100644
index 000000000..1a9f297f2
--- /dev/null
+++ b/assets/img/flags/it.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/je.svg b/assets/img/flags/je.svg
new file mode 100644
index 000000000..4dd97f1bf
--- /dev/null
+++ b/assets/img/flags/je.svg
@@ -0,0 +1,67 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/jm.svg b/assets/img/flags/jm.svg
new file mode 100644
index 000000000..5ccd524ff
--- /dev/null
+++ b/assets/img/flags/jm.svg
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/jo.svg b/assets/img/flags/jo.svg
new file mode 100644
index 000000000..152749e30
--- /dev/null
+++ b/assets/img/flags/jo.svg
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/jp.svg b/assets/img/flags/jp.svg
new file mode 100644
index 000000000..f36071b8c
--- /dev/null
+++ b/assets/img/flags/jp.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ke.svg b/assets/img/flags/ke.svg
new file mode 100644
index 000000000..79d223f2a
--- /dev/null
+++ b/assets/img/flags/ke.svg
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/kg.svg b/assets/img/flags/kg.svg
new file mode 100644
index 000000000..e560aefb8
--- /dev/null
+++ b/assets/img/flags/kg.svg
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/kh.svg b/assets/img/flags/kh.svg
new file mode 100644
index 000000000..48e782e19
--- /dev/null
+++ b/assets/img/flags/kh.svg
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ki.svg b/assets/img/flags/ki.svg
new file mode 100644
index 000000000..c145dd325
--- /dev/null
+++ b/assets/img/flags/ki.svg
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/km.svg b/assets/img/flags/km.svg
new file mode 100644
index 000000000..235ec0227
--- /dev/null
+++ b/assets/img/flags/km.svg
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/kn.svg b/assets/img/flags/kn.svg
new file mode 100644
index 000000000..d60ae2e76
--- /dev/null
+++ b/assets/img/flags/kn.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/kp.svg b/assets/img/flags/kp.svg
new file mode 100644
index 000000000..6ce531d50
--- /dev/null
+++ b/assets/img/flags/kp.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/kr.svg b/assets/img/flags/kr.svg
new file mode 100644
index 000000000..a0b266d50
--- /dev/null
+++ b/assets/img/flags/kr.svg
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/kw.svg b/assets/img/flags/kw.svg
new file mode 100644
index 000000000..5822eb614
--- /dev/null
+++ b/assets/img/flags/kw.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ky.svg b/assets/img/flags/ky.svg
new file mode 100644
index 000000000..fb5e915af
--- /dev/null
+++ b/assets/img/flags/ky.svg
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/kz.svg b/assets/img/flags/kz.svg
new file mode 100644
index 000000000..bd7130af8
--- /dev/null
+++ b/assets/img/flags/kz.svg
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/la.svg b/assets/img/flags/la.svg
new file mode 100644
index 000000000..fe009db97
--- /dev/null
+++ b/assets/img/flags/la.svg
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/lb.svg b/assets/img/flags/lb.svg
new file mode 100644
index 000000000..433b2c28e
--- /dev/null
+++ b/assets/img/flags/lb.svg
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/lc.svg b/assets/img/flags/lc.svg
new file mode 100644
index 000000000..ab006b5ba
--- /dev/null
+++ b/assets/img/flags/lc.svg
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/li.svg b/assets/img/flags/li.svg
new file mode 100644
index 000000000..78d5325a1
--- /dev/null
+++ b/assets/img/flags/li.svg
@@ -0,0 +1,195 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/lk.svg b/assets/img/flags/lk.svg
new file mode 100644
index 000000000..e28985d4d
--- /dev/null
+++ b/assets/img/flags/lk.svg
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/lr.svg b/assets/img/flags/lr.svg
new file mode 100644
index 000000000..f9d3939f3
--- /dev/null
+++ b/assets/img/flags/lr.svg
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ls.svg b/assets/img/flags/ls.svg
new file mode 100644
index 000000000..d5836fa03
--- /dev/null
+++ b/assets/img/flags/ls.svg
@@ -0,0 +1,173 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/lt.svg b/assets/img/flags/lt.svg
new file mode 100644
index 000000000..b67359b99
--- /dev/null
+++ b/assets/img/flags/lt.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/lu.svg b/assets/img/flags/lu.svg
new file mode 100644
index 000000000..1f6fe91ce
--- /dev/null
+++ b/assets/img/flags/lu.svg
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/lv.svg b/assets/img/flags/lv.svg
new file mode 100644
index 000000000..a2fbe7538
--- /dev/null
+++ b/assets/img/flags/lv.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ly.svg b/assets/img/flags/ly.svg
new file mode 100644
index 000000000..092275246
--- /dev/null
+++ b/assets/img/flags/ly.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ma.svg b/assets/img/flags/ma.svg
new file mode 100644
index 000000000..457afd2bc
--- /dev/null
+++ b/assets/img/flags/ma.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mc.svg b/assets/img/flags/mc.svg
new file mode 100644
index 000000000..9bd4ab13b
--- /dev/null
+++ b/assets/img/flags/mc.svg
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/md.svg b/assets/img/flags/md.svg
new file mode 100644
index 000000000..27729f56b
--- /dev/null
+++ b/assets/img/flags/md.svg
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/me.svg b/assets/img/flags/me.svg
new file mode 100644
index 000000000..473f64045
--- /dev/null
+++ b/assets/img/flags/me.svg
@@ -0,0 +1,5 @@
+
+
+image/svg+xml
+
+
diff --git a/assets/img/flags/mf.svg b/assets/img/flags/mf.svg
new file mode 100644
index 000000000..7e0bdb8e1
--- /dev/null
+++ b/assets/img/flags/mf.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mg.svg b/assets/img/flags/mg.svg
new file mode 100644
index 000000000..05bd5b982
--- /dev/null
+++ b/assets/img/flags/mg.svg
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mh.svg b/assets/img/flags/mh.svg
new file mode 100644
index 000000000..df29219e5
--- /dev/null
+++ b/assets/img/flags/mh.svg
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mk.svg b/assets/img/flags/mk.svg
new file mode 100644
index 000000000..62e5e37b9
--- /dev/null
+++ b/assets/img/flags/mk.svg
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ml.svg b/assets/img/flags/ml.svg
new file mode 100644
index 000000000..dc71966d9
--- /dev/null
+++ b/assets/img/flags/ml.svg
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mm.svg b/assets/img/flags/mm.svg
new file mode 100644
index 000000000..add89f8d2
--- /dev/null
+++ b/assets/img/flags/mm.svg
@@ -0,0 +1,146 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mn.svg b/assets/img/flags/mn.svg
new file mode 100644
index 000000000..819ce2f07
--- /dev/null
+++ b/assets/img/flags/mn.svg
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mo.svg b/assets/img/flags/mo.svg
new file mode 100644
index 000000000..769e94a5f
--- /dev/null
+++ b/assets/img/flags/mo.svg
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mp.svg b/assets/img/flags/mp.svg
new file mode 100644
index 000000000..93ca16865
--- /dev/null
+++ b/assets/img/flags/mp.svg
@@ -0,0 +1,268 @@
+
+
+
+
+
+
+
+
+
+
+ micronesia
+
+ oceania
+ flag
+ sign
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+ en
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mq.svg b/assets/img/flags/mq.svg
new file mode 100644
index 000000000..d6ebd3885
--- /dev/null
+++ b/assets/img/flags/mq.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mr.svg b/assets/img/flags/mr.svg
new file mode 100644
index 000000000..0066c90f9
--- /dev/null
+++ b/assets/img/flags/mr.svg
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ms.svg b/assets/img/flags/ms.svg
new file mode 100644
index 000000000..c9ef72b10
--- /dev/null
+++ b/assets/img/flags/ms.svg
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mt.svg b/assets/img/flags/mt.svg
new file mode 100644
index 000000000..b14194b75
--- /dev/null
+++ b/assets/img/flags/mt.svg
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mu.svg b/assets/img/flags/mu.svg
new file mode 100644
index 000000000..6ae235d89
--- /dev/null
+++ b/assets/img/flags/mu.svg
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mv.svg b/assets/img/flags/mv.svg
new file mode 100644
index 000000000..eb20d9ef8
--- /dev/null
+++ b/assets/img/flags/mv.svg
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mw.svg b/assets/img/flags/mw.svg
new file mode 100644
index 000000000..cf3922bc7
--- /dev/null
+++ b/assets/img/flags/mw.svg
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mx.svg b/assets/img/flags/mx.svg
new file mode 100644
index 000000000..7fc1393f8
--- /dev/null
+++ b/assets/img/flags/mx.svg
@@ -0,0 +1,349 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/my.svg b/assets/img/flags/my.svg
new file mode 100644
index 000000000..2654cef5e
--- /dev/null
+++ b/assets/img/flags/my.svg
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/mz.svg b/assets/img/flags/mz.svg
new file mode 100644
index 000000000..605a9d59c
--- /dev/null
+++ b/assets/img/flags/mz.svg
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/na.svg b/assets/img/flags/na.svg
new file mode 100644
index 000000000..af516371d
--- /dev/null
+++ b/assets/img/flags/na.svg
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/nc.svg b/assets/img/flags/nc.svg
new file mode 100644
index 000000000..042507e51
--- /dev/null
+++ b/assets/img/flags/nc.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ne.svg b/assets/img/flags/ne.svg
new file mode 100644
index 000000000..e6a778141
--- /dev/null
+++ b/assets/img/flags/ne.svg
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/nf.svg b/assets/img/flags/nf.svg
new file mode 100644
index 000000000..84f84ec82
--- /dev/null
+++ b/assets/img/flags/nf.svg
@@ -0,0 +1,46 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ng.svg b/assets/img/flags/ng.svg
new file mode 100644
index 000000000..4eccb54f7
--- /dev/null
+++ b/assets/img/flags/ng.svg
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ni.svg b/assets/img/flags/ni.svg
new file mode 100644
index 000000000..2fe085a17
--- /dev/null
+++ b/assets/img/flags/ni.svg
@@ -0,0 +1,122 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/nl.svg b/assets/img/flags/nl.svg
new file mode 100644
index 000000000..be962d33d
--- /dev/null
+++ b/assets/img/flags/nl.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/no.svg b/assets/img/flags/no.svg
new file mode 100644
index 000000000..699ed31ce
--- /dev/null
+++ b/assets/img/flags/no.svg
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/np.svg b/assets/img/flags/np.svg
new file mode 100644
index 000000000..373225e07
--- /dev/null
+++ b/assets/img/flags/np.svg
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/nr.svg b/assets/img/flags/nr.svg
new file mode 100644
index 000000000..78a65e02e
--- /dev/null
+++ b/assets/img/flags/nr.svg
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/nu.svg b/assets/img/flags/nu.svg
new file mode 100644
index 000000000..645a66e3e
--- /dev/null
+++ b/assets/img/flags/nu.svg
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/nz.svg b/assets/img/flags/nz.svg
new file mode 100644
index 000000000..0f7cf2f52
--- /dev/null
+++ b/assets/img/flags/nz.svg
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/om.svg b/assets/img/flags/om.svg
new file mode 100644
index 000000000..f28f32dae
--- /dev/null
+++ b/assets/img/flags/om.svg
@@ -0,0 +1,349 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/pa.svg b/assets/img/flags/pa.svg
new file mode 100644
index 000000000..c1368b259
--- /dev/null
+++ b/assets/img/flags/pa.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/pe.svg b/assets/img/flags/pe.svg
new file mode 100644
index 000000000..ebd2e5f32
--- /dev/null
+++ b/assets/img/flags/pe.svg
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/pf.svg b/assets/img/flags/pf.svg
new file mode 100644
index 000000000..63f056e71
--- /dev/null
+++ b/assets/img/flags/pf.svg
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/pg.svg b/assets/img/flags/pg.svg
new file mode 100644
index 000000000..fd1fe93b2
--- /dev/null
+++ b/assets/img/flags/pg.svg
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ph.svg b/assets/img/flags/ph.svg
new file mode 100644
index 000000000..95f9d3761
--- /dev/null
+++ b/assets/img/flags/ph.svg
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/pk.svg b/assets/img/flags/pk.svg
new file mode 100644
index 000000000..1c33e675f
--- /dev/null
+++ b/assets/img/flags/pk.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/pl.svg b/assets/img/flags/pl.svg
new file mode 100644
index 000000000..a8d406aff
--- /dev/null
+++ b/assets/img/flags/pl.svg
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/pm.svg b/assets/img/flags/pm.svg
new file mode 100644
index 000000000..d7fb73650
--- /dev/null
+++ b/assets/img/flags/pm.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/pn.svg b/assets/img/flags/pn.svg
new file mode 100644
index 000000000..d310c313f
--- /dev/null
+++ b/assets/img/flags/pn.svg
@@ -0,0 +1,146 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/pr.svg b/assets/img/flags/pr.svg
new file mode 100644
index 000000000..771c304c1
--- /dev/null
+++ b/assets/img/flags/pr.svg
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ps.svg b/assets/img/flags/ps.svg
new file mode 100644
index 000000000..e960374a9
--- /dev/null
+++ b/assets/img/flags/ps.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/pt.svg b/assets/img/flags/pt.svg
new file mode 100644
index 000000000..752ea6476
--- /dev/null
+++ b/assets/img/flags/pt.svg
@@ -0,0 +1,526 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/pw.svg b/assets/img/flags/pw.svg
new file mode 100644
index 000000000..222f3c25b
--- /dev/null
+++ b/assets/img/flags/pw.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/py.svg b/assets/img/flags/py.svg
new file mode 100644
index 000000000..80d30bf02
--- /dev/null
+++ b/assets/img/flags/py.svg
@@ -0,0 +1,242 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/qa.svg b/assets/img/flags/qa.svg
new file mode 100644
index 000000000..099b508f1
--- /dev/null
+++ b/assets/img/flags/qa.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/re.svg b/assets/img/flags/re.svg
new file mode 100644
index 000000000..d5a5e2158
--- /dev/null
+++ b/assets/img/flags/re.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ro.svg b/assets/img/flags/ro.svg
new file mode 100644
index 000000000..311c372df
--- /dev/null
+++ b/assets/img/flags/ro.svg
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/rs.svg b/assets/img/flags/rs.svg
new file mode 100644
index 000000000..21e21c2dd
--- /dev/null
+++ b/assets/img/flags/rs.svg
@@ -0,0 +1,1562 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ru.svg b/assets/img/flags/ru.svg
new file mode 100644
index 000000000..e931a6b6c
--- /dev/null
+++ b/assets/img/flags/ru.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/rw.svg b/assets/img/flags/rw.svg
new file mode 100644
index 000000000..282288223
--- /dev/null
+++ b/assets/img/flags/rw.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sa.svg b/assets/img/flags/sa.svg
new file mode 100644
index 000000000..f2bacbb39
--- /dev/null
+++ b/assets/img/flags/sa.svg
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sb.svg b/assets/img/flags/sb.svg
new file mode 100644
index 000000000..334ae6475
--- /dev/null
+++ b/assets/img/flags/sb.svg
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sc.svg b/assets/img/flags/sc.svg
new file mode 100644
index 000000000..a4841f81d
--- /dev/null
+++ b/assets/img/flags/sc.svg
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sd.svg b/assets/img/flags/sd.svg
new file mode 100644
index 000000000..bbfac97be
--- /dev/null
+++ b/assets/img/flags/sd.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/se.svg b/assets/img/flags/se.svg
new file mode 100644
index 000000000..913d8a83d
--- /dev/null
+++ b/assets/img/flags/se.svg
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sg.svg b/assets/img/flags/sg.svg
new file mode 100644
index 000000000..7a85ef521
--- /dev/null
+++ b/assets/img/flags/sg.svg
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sh.svg b/assets/img/flags/sh.svg
new file mode 100644
index 000000000..21cf48865
--- /dev/null
+++ b/assets/img/flags/sh.svg
@@ -0,0 +1,795 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/si.svg b/assets/img/flags/si.svg
new file mode 100644
index 000000000..7461f6361
--- /dev/null
+++ b/assets/img/flags/si.svg
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sj.svg b/assets/img/flags/sj.svg
new file mode 100644
index 000000000..7550d890e
--- /dev/null
+++ b/assets/img/flags/sj.svg
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sk.svg b/assets/img/flags/sk.svg
new file mode 100644
index 000000000..84c09e8c8
--- /dev/null
+++ b/assets/img/flags/sk.svg
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sl.svg b/assets/img/flags/sl.svg
new file mode 100644
index 000000000..662d1d71b
--- /dev/null
+++ b/assets/img/flags/sl.svg
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sm.svg b/assets/img/flags/sm.svg
new file mode 100644
index 000000000..88284d40d
--- /dev/null
+++ b/assets/img/flags/sm.svg
@@ -0,0 +1,209 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ L
+
+
+ I
+
+
+ B
+
+
+ E
+
+
+ R
+
+
+ T
+
+
+ A
+
+
+ S
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sn.svg b/assets/img/flags/sn.svg
new file mode 100644
index 000000000..a3fa37a44
--- /dev/null
+++ b/assets/img/flags/sn.svg
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/so.svg b/assets/img/flags/so.svg
new file mode 100644
index 000000000..534c6abbf
--- /dev/null
+++ b/assets/img/flags/so.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sr.svg b/assets/img/flags/sr.svg
new file mode 100644
index 000000000..99514a928
--- /dev/null
+++ b/assets/img/flags/sr.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ss.svg b/assets/img/flags/ss.svg
new file mode 100644
index 000000000..56aff0574
--- /dev/null
+++ b/assets/img/flags/ss.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+ image/svg+xml
+
+ Flag of South Sudan
+
+
+
+ Flag of South Sudan
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/st.svg b/assets/img/flags/st.svg
new file mode 100644
index 000000000..8f09d115e
--- /dev/null
+++ b/assets/img/flags/st.svg
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sv.svg b/assets/img/flags/sv.svg
new file mode 100644
index 000000000..0fcd4f4a4
--- /dev/null
+++ b/assets/img/flags/sv.svg
@@ -0,0 +1,301 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sx.svg b/assets/img/flags/sx.svg
new file mode 100644
index 000000000..142b30fce
--- /dev/null
+++ b/assets/img/flags/sx.svg
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sy.svg b/assets/img/flags/sy.svg
new file mode 100644
index 000000000..d85aadf9a
--- /dev/null
+++ b/assets/img/flags/sy.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/sz.svg b/assets/img/flags/sz.svg
new file mode 100644
index 000000000..c92e5979d
--- /dev/null
+++ b/assets/img/flags/sz.svg
@@ -0,0 +1,93 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tc.svg b/assets/img/flags/tc.svg
new file mode 100644
index 000000000..865b4ad92
--- /dev/null
+++ b/assets/img/flags/tc.svg
@@ -0,0 +1,102 @@
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/td.svg b/assets/img/flags/td.svg
new file mode 100644
index 000000000..1d01cdc0d
--- /dev/null
+++ b/assets/img/flags/td.svg
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tf.svg b/assets/img/flags/tf.svg
new file mode 100644
index 000000000..213c2841b
--- /dev/null
+++ b/assets/img/flags/tf.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tg.svg b/assets/img/flags/tg.svg
new file mode 100644
index 000000000..20dbfa347
--- /dev/null
+++ b/assets/img/flags/tg.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/th.svg b/assets/img/flags/th.svg
new file mode 100644
index 000000000..a539e3825
--- /dev/null
+++ b/assets/img/flags/th.svg
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tj.svg b/assets/img/flags/tj.svg
new file mode 100644
index 000000000..c1b0a89f6
--- /dev/null
+++ b/assets/img/flags/tj.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tk.svg b/assets/img/flags/tk.svg
new file mode 100644
index 000000000..5d1649cc9
--- /dev/null
+++ b/assets/img/flags/tk.svg
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tl.svg b/assets/img/flags/tl.svg
new file mode 100644
index 000000000..3b56c52f9
--- /dev/null
+++ b/assets/img/flags/tl.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tm.svg b/assets/img/flags/tm.svg
new file mode 100644
index 000000000..83cd9aa1b
--- /dev/null
+++ b/assets/img/flags/tm.svg
@@ -0,0 +1,325 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tn.svg b/assets/img/flags/tn.svg
new file mode 100644
index 000000000..ef0d0b737
--- /dev/null
+++ b/assets/img/flags/tn.svg
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/to.svg b/assets/img/flags/to.svg
new file mode 100644
index 000000000..f51522f03
--- /dev/null
+++ b/assets/img/flags/to.svg
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tr.svg b/assets/img/flags/tr.svg
new file mode 100644
index 000000000..779779e41
--- /dev/null
+++ b/assets/img/flags/tr.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tt.svg b/assets/img/flags/tt.svg
new file mode 100644
index 000000000..46e554773
--- /dev/null
+++ b/assets/img/flags/tt.svg
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tv.svg b/assets/img/flags/tv.svg
new file mode 100644
index 000000000..d83f0d223
--- /dev/null
+++ b/assets/img/flags/tv.svg
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tw.svg b/assets/img/flags/tw.svg
new file mode 100644
index 000000000..e9fb0c2f7
--- /dev/null
+++ b/assets/img/flags/tw.svg
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/tz.svg b/assets/img/flags/tz.svg
new file mode 100644
index 000000000..85179d6e0
--- /dev/null
+++ b/assets/img/flags/tz.svg
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ua.svg b/assets/img/flags/ua.svg
new file mode 100644
index 000000000..6a8cf878a
--- /dev/null
+++ b/assets/img/flags/ua.svg
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ug.svg b/assets/img/flags/ug.svg
new file mode 100644
index 000000000..7facab455
--- /dev/null
+++ b/assets/img/flags/ug.svg
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/um.svg b/assets/img/flags/um.svg
new file mode 100644
index 000000000..88b7f77cc
--- /dev/null
+++ b/assets/img/flags/um.svg
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+ The United States of America flag, produced by Daniel McRae
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/us.svg b/assets/img/flags/us.svg
new file mode 100644
index 000000000..b6516b4d5
--- /dev/null
+++ b/assets/img/flags/us.svg
@@ -0,0 +1,141 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+ The United States of America flag, produced by Daniel McRae
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/uy.svg b/assets/img/flags/uy.svg
new file mode 100644
index 000000000..4a29ce5a7
--- /dev/null
+++ b/assets/img/flags/uy.svg
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/uz.svg b/assets/img/flags/uz.svg
new file mode 100644
index 000000000..97468a7fe
--- /dev/null
+++ b/assets/img/flags/uz.svg
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/va.svg b/assets/img/flags/va.svg
new file mode 100644
index 000000000..097e3b4b1
--- /dev/null
+++ b/assets/img/flags/va.svg
@@ -0,0 +1,501 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/vc.svg b/assets/img/flags/vc.svg
new file mode 100644
index 000000000..de35200cd
--- /dev/null
+++ b/assets/img/flags/vc.svg
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ve.svg b/assets/img/flags/ve.svg
new file mode 100644
index 000000000..565d2683f
--- /dev/null
+++ b/assets/img/flags/ve.svg
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/vg.svg b/assets/img/flags/vg.svg
new file mode 100644
index 000000000..fe88d47a8
--- /dev/null
+++ b/assets/img/flags/vg.svg
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+ British Virgin Islands
+
+
+
+
+ united_kingdom
+ flags
+ caribbean
+ america
+ signs_and_symbols
+ sign
+
+
+
+
+ Tobias Jakobs
+
+
+
+
+ Tobias Jakobs
+
+
+
+
+ Tobias Jakobs
+
+
+
+ image/svg+xml
+
+
+ en
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/vi.svg b/assets/img/flags/vi.svg
new file mode 100644
index 000000000..fe88d47a8
--- /dev/null
+++ b/assets/img/flags/vi.svg
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+ British Virgin Islands
+
+
+
+
+ united_kingdom
+ flags
+ caribbean
+ america
+ signs_and_symbols
+ sign
+
+
+
+
+ Tobias Jakobs
+
+
+
+
+ Tobias Jakobs
+
+
+
+
+ Tobias Jakobs
+
+
+
+ image/svg+xml
+
+
+ en
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/vn.svg b/assets/img/flags/vn.svg
new file mode 100644
index 000000000..ee7ab4f26
--- /dev/null
+++ b/assets/img/flags/vn.svg
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/vu.svg b/assets/img/flags/vu.svg
new file mode 100644
index 000000000..bdea587c8
--- /dev/null
+++ b/assets/img/flags/vu.svg
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/wf.svg b/assets/img/flags/wf.svg
new file mode 100644
index 000000000..ae7ec827d
--- /dev/null
+++ b/assets/img/flags/wf.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ws.svg b/assets/img/flags/ws.svg
new file mode 100644
index 000000000..e799dd161
--- /dev/null
+++ b/assets/img/flags/ws.svg
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/ye.svg b/assets/img/flags/ye.svg
new file mode 100644
index 000000000..1d68b8216
--- /dev/null
+++ b/assets/img/flags/ye.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/yt.svg b/assets/img/flags/yt.svg
new file mode 100644
index 000000000..c0f60f64c
--- /dev/null
+++ b/assets/img/flags/yt.svg
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/za.svg b/assets/img/flags/za.svg
new file mode 100644
index 000000000..d7a118700
--- /dev/null
+++ b/assets/img/flags/za.svg
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/zm.svg b/assets/img/flags/zm.svg
new file mode 100644
index 000000000..bc16746a7
--- /dev/null
+++ b/assets/img/flags/zm.svg
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/flags/zw.svg b/assets/img/flags/zw.svg
new file mode 100644
index 000000000..1227ba886
--- /dev/null
+++ b/assets/img/flags/zw.svg
@@ -0,0 +1,52 @@
+
+
+
+
+
+
+ image/svg+xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/gotowebinar-test.png b/assets/img/gotowebinar-test.png
new file mode 100644
index 000000000..6d1167da7
Binary files /dev/null and b/assets/img/gotowebinar-test.png differ
diff --git a/assets/img/highlights-icons/distance.png b/assets/img/highlights-icons/distance.png
new file mode 100755
index 000000000..8e8f25a85
Binary files /dev/null and b/assets/img/highlights-icons/distance.png differ
diff --git a/assets/img/highlights-icons/quality.png b/assets/img/highlights-icons/quality.png
new file mode 100755
index 000000000..2e7aa4ea1
Binary files /dev/null and b/assets/img/highlights-icons/quality.png differ
diff --git a/assets/img/highlights-icons/result.png b/assets/img/highlights-icons/result.png
new file mode 100755
index 000000000..237fa79a6
Binary files /dev/null and b/assets/img/highlights-icons/result.png differ
diff --git a/assets/img/highlights-icons/support.png b/assets/img/highlights-icons/support.png
new file mode 100755
index 000000000..93d181f06
Binary files /dev/null and b/assets/img/highlights-icons/support.png differ
diff --git a/assets/img/highlights-icons/warranty.png b/assets/img/highlights-icons/warranty.png
new file mode 100755
index 000000000..3fdfe7a68
Binary files /dev/null and b/assets/img/highlights-icons/warranty.png differ
diff --git a/assets/img/important-icons-s32ff0be2d7.png b/assets/img/important-icons-s32ff0be2d7.png
new file mode 100755
index 000000000..ccdac4cf0
Binary files /dev/null and b/assets/img/important-icons-s32ff0be2d7.png differ
diff --git a/assets/img/interkassa.png b/assets/img/interkassa.png
new file mode 100755
index 000000000..5db8ac111
Binary files /dev/null and b/assets/img/interkassa.png differ
diff --git a/assets/img/invoice.png b/assets/img/invoice.png
new file mode 100755
index 000000000..ebeffa6b7
Binary files /dev/null and b/assets/img/invoice.png differ
diff --git a/assets/img/learning-pyramide.jpg b/assets/img/learning-pyramide.jpg
new file mode 100755
index 000000000..c2a157187
Binary files /dev/null and b/assets/img/learning-pyramide.jpg differ
diff --git a/assets/img/linked-upic.png b/assets/img/linked-upic.png
new file mode 100755
index 000000000..bdf15fc06
Binary files /dev/null and b/assets/img/linked-upic.png differ
diff --git a/assets/img/linked-userpic.gif b/assets/img/linked-userpic.gif
new file mode 100755
index 000000000..366c28b3f
Binary files /dev/null and b/assets/img/linked-userpic.gif differ
diff --git a/assets/img/logo.png b/assets/img/logo.png
new file mode 100755
index 000000000..4e8ac5356
Binary files /dev/null and b/assets/img/logo.png differ
diff --git a/assets/img/logo.svg b/assets/img/logo.svg
new file mode 100755
index 000000000..9c7678f1e
--- /dev/null
+++ b/assets/img/logo.svg
@@ -0,0 +1 @@
+Group Created with Sketch.
\ No newline at end of file
diff --git a/assets/img/logo_square.png b/assets/img/logo_square.png
new file mode 100644
index 000000000..a6017b324
Binary files /dev/null and b/assets/img/logo_square.png differ
diff --git a/assets/img/markup/sitetoolbar-userpic.png b/assets/img/markup/sitetoolbar-userpic.png
new file mode 100755
index 000000000..80036691d
Binary files /dev/null and b/assets/img/markup/sitetoolbar-userpic.png differ
diff --git a/assets/img/noisy.png b/assets/img/noisy.png
new file mode 100755
index 000000000..e429e4099
Binary files /dev/null and b/assets/img/noisy.png differ
diff --git a/assets/img/page-footer.png b/assets/img/page-footer.png
new file mode 100755
index 000000000..c2345babf
Binary files /dev/null and b/assets/img/page-footer.png differ
diff --git a/assets/img/pager-scroll.png b/assets/img/pager-scroll.png
new file mode 100755
index 000000000..4285dfadb
Binary files /dev/null and b/assets/img/pager-scroll.png differ
diff --git a/assets/img/pay-method__bank-bill.png b/assets/img/pay-method__bank-bill.png
new file mode 100755
index 000000000..6375f6d2e
Binary files /dev/null and b/assets/img/pay-method__bank-bill.png differ
diff --git a/assets/img/pay-method__interkassa.png b/assets/img/pay-method__interkassa.png
new file mode 100755
index 000000000..de6959585
Binary files /dev/null and b/assets/img/pay-method__interkassa.png differ
diff --git a/assets/img/pay-method__payanyway.png b/assets/img/pay-method__payanyway.png
new file mode 100755
index 000000000..db07649e0
Binary files /dev/null and b/assets/img/pay-method__payanyway.png differ
diff --git a/assets/img/pay-method__paypal.png b/assets/img/pay-method__paypal.png
new file mode 100755
index 000000000..1335e9446
Binary files /dev/null and b/assets/img/pay-method__paypal.png differ
diff --git a/assets/img/pay-method__webmoney.png b/assets/img/pay-method__webmoney.png
new file mode 100755
index 000000000..b9f1aab43
Binary files /dev/null and b/assets/img/pay-method__webmoney.png differ
diff --git a/assets/img/pay-method__yandexmoney.png b/assets/img/pay-method__yandexmoney.png
new file mode 100755
index 000000000..949a2b50c
Binary files /dev/null and b/assets/img/pay-method__yandexmoney.png differ
diff --git a/assets/img/payanyway.png b/assets/img/payanyway.png
new file mode 100755
index 000000000..fea4e2489
Binary files /dev/null and b/assets/img/payanyway.png differ
diff --git a/assets/img/paypal.png b/assets/img/paypal.png
new file mode 100755
index 000000000..a8b101b02
Binary files /dev/null and b/assets/img/paypal.png differ
diff --git a/assets/img/profile__confirmed.png b/assets/img/profile__confirmed.png
new file mode 100755
index 000000000..8fc1b03a3
Binary files /dev/null and b/assets/img/profile__confirmed.png differ
diff --git a/assets/img/receipts__separator.png b/assets/img/receipts__separator.png
new file mode 100755
index 000000000..4603047b5
Binary files /dev/null and b/assets/img/receipts__separator.png differ
diff --git a/assets/img/reviewer.jpg b/assets/img/reviewer.jpg
new file mode 100755
index 000000000..63ce87fb7
Binary files /dev/null and b/assets/img/reviewer.jpg differ
diff --git a/assets/img/reviews-arrows-sea1675148f.png b/assets/img/reviews-arrows-sea1675148f.png
new file mode 100755
index 000000000..489c9b272
Binary files /dev/null and b/assets/img/reviews-arrows-sea1675148f.png differ
diff --git a/assets/img/reviews-arrows/next.png b/assets/img/reviews-arrows/next.png
new file mode 100755
index 000000000..eb5ba02c9
Binary files /dev/null and b/assets/img/reviews-arrows/next.png differ
diff --git a/assets/img/reviews-arrows/prev.png b/assets/img/reviews-arrows/prev.png
new file mode 100755
index 000000000..70c170dbb
Binary files /dev/null and b/assets/img/reviews-arrows/prev.png differ
diff --git a/assets/img/reviews-speech.gif b/assets/img/reviews-speech.gif
new file mode 100755
index 000000000..5b6001690
Binary files /dev/null and b/assets/img/reviews-speech.gif differ
diff --git a/assets/img/sberbank.png b/assets/img/sberbank.png
new file mode 100755
index 000000000..dc7275fa8
Binary files /dev/null and b/assets/img/sberbank.png differ
diff --git a/assets/img/sidebar-bg.png b/assets/img/sidebar-bg.png
new file mode 100755
index 000000000..5f48419d5
Binary files /dev/null and b/assets/img/sidebar-bg.png differ
diff --git a/assets/img/sitetoolbar__logo.en.svg b/assets/img/sitetoolbar__logo.en.svg
new file mode 100644
index 000000000..19e42238f
--- /dev/null
+++ b/assets/img/sitetoolbar__logo.en.svg
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/sitetoolbar__logo.svg b/assets/img/sitetoolbar__logo.svg
new file mode 100755
index 000000000..a13df52c2
--- /dev/null
+++ b/assets/img/sitetoolbar__logo.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/img/sitetoolbar__logo_small.svg b/assets/img/sitetoolbar__logo_small.svg
new file mode 100755
index 000000000..330869802
--- /dev/null
+++ b/assets/img/sitetoolbar__logo_small.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/img/subscribe_bg.svg b/assets/img/subscribe_bg.svg
new file mode 100644
index 000000000..28b69e097
--- /dev/null
+++ b/assets/img/subscribe_bg.svg
@@ -0,0 +1,38 @@
+
+
+ Slice 1
+ Created with Sketch.
+
+ Layer 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/assets/img/userpic/userpic-deleted.png b/assets/img/userpic/userpic-deleted.png
new file mode 100755
index 000000000..3f49322e5
Binary files /dev/null and b/assets/img/userpic/userpic-deleted.png differ
diff --git a/assets/img/userpic/userpic-deleted.svg b/assets/img/userpic/userpic-deleted.svg
new file mode 100755
index 000000000..0bd3b21d2
--- /dev/null
+++ b/assets/img/userpic/userpic-deleted.svg
@@ -0,0 +1 @@
+Group Created with Sketch.
\ No newline at end of file
diff --git a/assets/img/userpic/userpic.png b/assets/img/userpic/userpic.png
new file mode 100755
index 000000000..d2f85b2ee
Binary files /dev/null and b/assets/img/userpic/userpic.png differ
diff --git a/assets/img/userpic/userpic.svg b/assets/img/userpic/userpic.svg
new file mode 100755
index 000000000..d9573eaeb
--- /dev/null
+++ b/assets/img/userpic/userpic.svg
@@ -0,0 +1 @@
+Userpic Default Rounded Created with Sketch.
\ No newline at end of file
diff --git a/assets/img/webmoney.png b/assets/img/webmoney.png
new file mode 100755
index 000000000..ee7bb9492
Binary files /dev/null and b/assets/img/webmoney.png differ
diff --git a/assets/img/x.gif b/assets/img/x.gif
new file mode 100755
index 000000000..7c8e9e98f
Binary files /dev/null and b/assets/img/x.gif differ
diff --git a/assets/img/yamoney.png b/assets/img/yamoney.png
new file mode 100755
index 000000000..07d531a7f
Binary files /dev/null and b/assets/img/yamoney.png differ
diff --git a/assets/lazyimg/1.gif b/assets/lazyimg/1.gif
new file mode 100755
index 000000000..a13b1e82e
Binary files /dev/null and b/assets/lazyimg/1.gif differ
diff --git a/assets/lazyimg/1.jpg b/assets/lazyimg/1.jpg
new file mode 100755
index 000000000..f84536a89
Binary files /dev/null and b/assets/lazyimg/1.jpg differ
diff --git a/assets/lazyimg/2-1.jpg b/assets/lazyimg/2-1.jpg
new file mode 100755
index 000000000..25e08843a
Binary files /dev/null and b/assets/lazyimg/2-1.jpg differ
diff --git a/assets/lazyimg/2-2.jpg b/assets/lazyimg/2-2.jpg
new file mode 100755
index 000000000..44ba334e5
Binary files /dev/null and b/assets/lazyimg/2-2.jpg differ
diff --git a/assets/lazyimg/3-1.jpg b/assets/lazyimg/3-1.jpg
new file mode 100755
index 000000000..93a1c1f1d
Binary files /dev/null and b/assets/lazyimg/3-1.jpg differ
diff --git a/assets/lazyimg/3-2.jpg b/assets/lazyimg/3-2.jpg
new file mode 100755
index 000000000..1b0987bca
Binary files /dev/null and b/assets/lazyimg/3-2.jpg differ
diff --git a/assets/lazyimg/4.jpg b/assets/lazyimg/4.jpg
new file mode 100755
index 000000000..6c619fd76
Binary files /dev/null and b/assets/lazyimg/4.jpg differ
diff --git a/assets/lazyimg/5.jpg b/assets/lazyimg/5.jpg
new file mode 100755
index 000000000..ad753f6b1
Binary files /dev/null and b/assets/lazyimg/5.jpg differ
diff --git a/assets/lazyimg/6.jpg b/assets/lazyimg/6.jpg
new file mode 100755
index 000000000..8100fca48
Binary files /dev/null and b/assets/lazyimg/6.jpg differ
diff --git a/assets/lazyimg/7.jpg b/assets/lazyimg/7.jpg
new file mode 100755
index 000000000..5a9d056dd
Binary files /dev/null and b/assets/lazyimg/7.jpg differ
diff --git a/assets/lazyimg/8.jpg b/assets/lazyimg/8.jpg
new file mode 100755
index 000000000..a4bdb2a4d
Binary files /dev/null and b/assets/lazyimg/8.jpg differ
diff --git a/assets/libs/animate.js b/assets/libs/animate.js
new file mode 100755
index 000000000..d2ecc4546
--- /dev/null
+++ b/assets/libs/animate.js
@@ -0,0 +1,20 @@
+function animate(options) {
+
+ var start = performance.now();
+
+ requestAnimationFrame(function animate(time) {
+ // timeFraction от 0 до 1
+ var timeFraction = (time - start) / options.duration;
+ if (timeFraction > 1) timeFraction = 1;
+
+ // текущее состояние анимации
+ var progress = options.timing(timeFraction)
+
+ options.draw(progress);
+
+ if (timeFraction < 1) {
+ requestAnimationFrame(animate);
+ }
+
+ });
+}
\ No newline at end of file
diff --git a/assets/libs/class-extend.js b/assets/libs/class-extend.js
new file mode 100755
index 000000000..dba244525
--- /dev/null
+++ b/assets/libs/class-extend.js
@@ -0,0 +1,108 @@
+/**
+ * Синтаксис:
+ * Class.extend(props)
+ * Class.extend(props, staticProps)
+ * Class.extend([mixins], props)
+ * Class.extend([mixins], props, staticProps)
+*/
+!function() {
+
+ window.Class = function() { /* вся магия - в Class.extend */ };
+
+
+ Class.extend = function(props, staticProps) {
+
+ var mixins = [];
+
+ // если первый аргумент -- массив, то переназначить аргументы
+ if ({}.toString.apply(arguments[0]) == "[object Array]") {
+ mixins = arguments[0];
+ props = arguments[1];
+ staticProps = arguments[2];
+ }
+
+ // эта функция будет возвращена как результат работы extend
+ function Constructor() {
+ this.init && this.init.apply(this, arguments);
+ }
+
+ // this -- это класс "перед точкой", для которого вызван extend (Animal.extend)
+ // наследуем от него:
+ Constructor.prototype = Class.inherit(this.prototype);
+
+ // constructor был затёрт вызовом inherit
+ Constructor.prototype.constructor = Constructor;
+
+ // добавим возможность наследовать дальше
+ Constructor.extend = Class.extend;
+
+ // скопировать в Constructor статические свойства
+ copyWrappedProps(staticProps, Constructor, this);
+
+ // скопировать в Constructor.prototype свойства из примесей и props
+ for (var i = 0; i < mixins.length; i++) {
+ copyWrappedProps(mixins[i], Constructor.prototype, this.prototype);
+ }
+ copyWrappedProps(props, Constructor.prototype, this.prototype);
+
+ return Constructor;
+ };
+
+
+ //---------- вспомогательные методы ----------
+
+ // fnTest -- регулярное выражение,
+ // которое проверяет функцию на то, есть ли в её коде вызов _super
+ //
+ // для его объявления мы проверяем, поддерживает ли функция преобразование
+ // в код вызовом toString: /xyz/.test(function() {xyz})
+ // в редких мобильных браузерах -- не поддерживает, поэтому регэксп будет /./
+ var fnTest = /xyz/.test(function() {xyz}) ? /\b_super\b/ : /./;
+
+
+ // копирует свойства из props в targetPropsObj
+ // третий аргумент -- это свойства родителя
+ //
+ // при копировании, если выясняется что свойство есть и в родителе тоже,
+ // и является функцией -- его вызов оборачивается в обёртку,
+ // которая ставит this._super на метод родителя,
+ // затем вызывает его, затем возвращает this._super
+ function copyWrappedProps(props, targetPropsObj, parentPropsObj) {
+ if (!props) return;
+
+ for (var name in props) {
+ if (typeof props[name] == "function"
+ && typeof parentPropsObj[name] == "function"
+ && fnTest.test(props[name])) {
+ // скопировать, завернув в обёртку
+ targetPropsObj[name] = wrap(props[name], parentPropsObj[name]);
+ } else {
+ targetPropsObj[name] = props[name];
+ }
+ }
+
+ }
+
+ // возвращает обёртку вокруг method, которая ставит this._super на родителя
+ // и возвращает его потом
+ function wrap(method, parentMethod) {
+ return function() {
+ var backup = this._super;
+
+ this._super = parentMethod;
+
+ try {
+ return method.apply(this, arguments);
+ } finally {
+ this._super = backup;
+ }
+ }
+ }
+
+ // эмуляция Object.create для старых IE
+ Class.inherit = Object.create || function(proto) {
+ function F() {}
+ F.prototype = proto;
+ return new F;
+ };
+}();
diff --git a/assets/libs/compareDocumentPosition.js b/assets/libs/compareDocumentPosition.js
new file mode 100755
index 000000000..0feca5b45
--- /dev/null
+++ b/assets/libs/compareDocumentPosition.js
@@ -0,0 +1,28 @@
+
+// полифилл для compareDocumentPosition в ie8
+
+!function(){
+ var el = document.documentElement;
+ if( !el.compareDocumentPosition && el.sourceIndex !== undefined ){
+
+ /* ??
+ Node = Element;
+ Node.DOCUMENT_POSITION_DISCONNECTED = 1;
+ Node.DOCUMENT_POSITION_PRECEDING = 2
+ Node.DOCUMENT_POSITION_FOLLOWING = 4;
+ Node.DOCUMENT_POSITION_CONTAINS = 8;
+ Node.DOCUMENT_POSITION_CONTAINED_BY = 16;
+ Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 32;
+ */
+
+ Element.prototype.compareDocumentPosition = function(other){
+ return (this != other && this.contains(other) && 16) +
+ (this != other && other.contains(this) && 8) +
+ (this.sourceIndex >= 0 && other.sourceIndex >= 0 ?
+ (this.sourceIndex < other.sourceIndex && 4) +
+ (this.sourceIndex > other.sourceIndex && 2)
+ : 1
+ ) + 0;
+ }
+ }
+}();
diff --git a/assets/libs/d3.js b/assets/libs/d3.js
new file mode 100755
index 000000000..d4cd8bef7
--- /dev/null
+++ b/assets/libs/d3.js
@@ -0,0 +1,5 @@
+!function(){function n(n){return null!=n&&!isNaN(n)}function t(n){return n.length}function e(n){for(var t=1;n*t%1;)t*=10;return t}function r(n,t){try{for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}catch(r){n.prototype=t}}function u(){}function i(n){return aa+n in this}function o(n){return n=aa+n,n in this&&delete this[n]}function a(){var n=[];return this.forEach(function(t){n.push(t)}),n}function c(){var n=0;for(var t in this)t.charCodeAt(0)===ca&&++n;return n}function s(){for(var n in this)if(n.charCodeAt(0)===ca)return!1;return!0}function l(){}function f(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function h(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.substring(1);for(var e=0,r=sa.length;r>e;++e){var u=sa[e]+t;if(u in n)return u}}function g(){}function p(){}function v(n){function t(){for(var t,r=e,u=-1,i=r.length;++ue;e++)for(var u,i=n[e],o=0,a=i.length;a>o;o++)(u=i[o])&&t(u,o,e);return n}function D(n){return fa(n,ya),n}function P(n){var t,e;return function(r,u,i){var o,a=n[i].update,c=a.length;for(i!=e&&(e=i,t=0),u>=t&&(t=u+1);!(o=a[t])&&++t0&&(n=n.substring(0,a));var s=Ma.get(n);return s&&(n=s,c=F),a?t?u:r:t?g:i}function H(n,t){return function(e){var r=Xo.event;Xo.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{Xo.event=r}}}function F(n,t){var e=H(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function O(){var n=".dragsuppress-"+ ++ba,t="click"+n,e=Xo.select(Go).on("touchmove"+n,d).on("dragstart"+n,d).on("selectstart"+n,d);if(_a){var r=Jo.style,u=r[_a];r[_a]="none"}return function(i){function o(){e.on(t,null)}e.on(n,null),_a&&(r[_a]=u),i&&(e.on(t,function(){d(),o()},!0),setTimeout(o,0))}}function Y(n,t){t.changedTouches&&(t=t.changedTouches[0]);var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();if(0>wa&&(Go.scrollX||Go.scrollY)){e=Xo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=e[0][0].getScreenCTM();wa=!(u.f||u.e),e.remove()}return wa?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}function I(n){return n>0?1:0>n?-1:0}function Z(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function V(n){return n>1?0:-1>n?Sa:Math.acos(n)}function X(n){return n>1?Ea:-1>n?-Ea:Math.asin(n)}function $(n){return((n=Math.exp(n))-1/n)/2}function B(n){return((n=Math.exp(n))+1/n)/2}function W(n){return((n=Math.exp(2*n))-1)/(n+1)}function J(n){return(n=Math.sin(n/2))*n}function G(){}function K(n,t,e){return new Q(n,t,e)}function Q(n,t,e){this.h=n,this.s=t,this.l=e}function nt(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?i+(o-i)*n/60:180>n?o:240>n?i+(o-i)*(240-n)/60:i}function u(n){return Math.round(255*r(n))}var i,o;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,o=.5>=e?e*(1+t):e+t-e*t,i=2*e-o,gt(u(n+120),u(n),u(n-120))}function tt(n,t,e){return new et(n,t,e)}function et(n,t,e){this.h=n,this.c=t,this.l=e}function rt(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),ut(e,Math.cos(n*=Na)*t,Math.sin(n)*t)}function ut(n,t,e){return new it(n,t,e)}function it(n,t,e){this.l=n,this.a=t,this.b=e}function ot(n,t,e){var r=(n+16)/116,u=r+t/500,i=r-e/200;return u=ct(u)*Fa,r=ct(r)*Oa,i=ct(i)*Ya,gt(lt(3.2404542*u-1.5371385*r-.4985314*i),lt(-.969266*u+1.8760108*r+.041556*i),lt(.0556434*u-.2040259*r+1.0572252*i))}function at(n,t,e){return n>0?tt(Math.atan2(e,t)*La,Math.sqrt(t*t+e*e),n):tt(0/0,0/0,n)}function ct(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function st(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function lt(n){return Math.round(255*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function ft(n){return gt(n>>16,255&n>>8,255&n)}function ht(n){return ft(n)+""}function gt(n,t,e){return new pt(n,t,e)}function pt(n,t,e){this.r=n,this.g=t,this.b=e}function vt(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function dt(n,t,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/i.exec(n))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return t(Mt(u[0]),Mt(u[1]),Mt(u[2]))}return(i=Va.get(n))?t(i.r,i.g,i.b):(null!=n&&"#"===n.charAt(0)&&(4===n.length?(o=n.charAt(1),o+=o,a=n.charAt(2),a+=a,c=n.charAt(3),c+=c):7===n.length&&(o=n.substring(1,3),a=n.substring(3,5),c=n.substring(5,7)),o=parseInt(o,16),a=parseInt(a,16),c=parseInt(c,16)),t(o,a,c))}function mt(n,t,e){var r,u,i=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-i,c=(o+i)/2;return a?(u=.5>c?a/(o+i):a/(2-o-i),r=n==o?(t-e)/a+(e>t?6:0):t==o?(e-n)/a+2:(n-t)/a+4,r*=60):(r=0/0,u=c>0&&1>c?0:r),K(r,u,c)}function yt(n,t,e){n=xt(n),t=xt(t),e=xt(e);var r=st((.4124564*n+.3575761*t+.1804375*e)/Fa),u=st((.2126729*n+.7151522*t+.072175*e)/Oa),i=st((.0193339*n+.119192*t+.9503041*e)/Ya);return ut(116*u-16,500*(r-u),200*(u-i))}function xt(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Mt(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function _t(n){return"function"==typeof n?n:function(){return n}}function bt(n){return n}function wt(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),St(t,e,n,r)}}function St(n,t,e,r){function u(){var n,t=c.status;if(!t&&c.responseText||t>=200&&300>t||304===t){try{n=e.call(i,c)}catch(r){return o.error.call(i,r),void 0}o.load.call(i,n)}else o.error.call(i,c)}var i={},o=Xo.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,s=null;return!Go.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(n)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(n){var t=Xo.event;Xo.event=n;try{o.progress.call(i,c)}finally{Xo.event=t}},i.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",i)},i.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",i):t},i.responseType=function(n){return arguments.length?(s=n,i):s},i.response=function(n){return e=n,i},["get","post"].forEach(function(n){i[n]=function(){return i.send.apply(i,[n].concat(Bo(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),c.setRequestHeader)for(var l in a)c.setRequestHeader(l,a[l]);return null!=t&&c.overrideMimeType&&c.overrideMimeType(t),null!=s&&(c.responseType=s),null!=u&&i.on("error",u).on("load",function(n){u(null,n)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},Xo.rebind(i,o,"on"),null==r?i:i.get(kt(r))}function kt(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Et(){var n=At(),t=Ct()-n;t>24?(isFinite(t)&&(clearTimeout(Wa),Wa=setTimeout(Et,t)),Ba=0):(Ba=1,Ga(Et))}function At(){var n=Date.now();for(Ja=Xa;Ja;)n>=Ja.t&&(Ja.f=Ja.c(n-Ja.t)),Ja=Ja.n;return n}function Ct(){for(var n,t=Xa,e=1/0;t;)t.f?t=n?n.n=t.n:Xa=t.n:(t.t8?function(n){return n/e}:function(n){return n*e},symbol:n}}function zt(n){var t=n.decimal,e=n.thousands,r=n.grouping,u=n.currency,i=r?function(n){for(var t=n.length,u=[],i=0,o=r[0];t>0&&o>0;)u.push(n.substring(t-=o,t+o)),o=r[i=(i+1)%r.length];return u.reverse().join(e)}:bt;return function(n){var e=Qa.exec(n),r=e[1]||" ",o=e[2]||">",a=e[3]||"",c=e[4]||"",s=e[5],l=+e[6],f=e[7],h=e[8],g=e[9],p=1,v="",d="",m=!1;switch(h&&(h=+h.substring(1)),(s||"0"===r&&"="===o)&&(s=r="0",o="=",f&&(l-=Math.floor((l-1)/4))),g){case"n":f=!0,g="g";break;case"%":p=100,d="%",g="f";break;case"p":p=100,d="%",g="r";break;case"b":case"o":case"x":case"X":"#"===c&&(v="0"+g.toLowerCase());case"c":case"d":m=!0,h=0;break;case"s":p=-1,g="r"}"$"===c&&(v=u[0],d=u[1]),"r"!=g||h||(g="g"),null!=h&&("g"==g?h=Math.max(1,Math.min(21,h)):("e"==g||"f"==g)&&(h=Math.max(0,Math.min(20,h)))),g=nc.get(g)||qt;var y=s&&f;return function(n){var e=d;if(m&&n%1)return"";var u=0>n||0===n&&0>1/n?(n=-n,"-"):a;if(0>p){var c=Xo.formatPrefix(n,h);n=c.scale(n),e=c.symbol+d}else n*=p;n=g(n,h);var x=n.lastIndexOf("."),M=0>x?n:n.substring(0,x),_=0>x?"":t+n.substring(x+1);!s&&f&&(M=i(M));var b=v.length+M.length+_.length+(y?0:u.length),w=l>b?new Array(b=l-b+1).join(r):"";return y&&(M=i(w+M)),u+=v,n=M+_,("<"===o?u+n+w:">"===o?w+u+n:"^"===o?w.substring(0,b>>=1)+u+n+w.substring(b):u+(y?n:w+n))+e}}}function qt(n){return n+""}function Tt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Rt(n,t,e){function r(t){var e=n(t),r=i(e,1);return r-t>t-e?e:r}function u(e){return t(e=n(new ec(e-1)),1),e}function i(n,e){return t(n=new ec(+n),e),n}function o(n,r,i){var o=u(n),a=[];if(i>1)for(;r>o;)e(o)%i||a.push(new Date(+o)),t(o,1);else for(;r>o;)a.push(new Date(+o)),t(o,1);return a}function a(n,t,e){try{ec=Tt;var r=new Tt;return r._=n,o(r,t,e)}finally{ec=Date}}n.floor=n,n.round=r,n.ceil=u,n.offset=i,n.range=o;var c=n.utc=Dt(n);return c.floor=c,c.round=Dt(r),c.ceil=Dt(u),c.offset=Dt(i),c.range=a,n}function Dt(n){return function(t,e){try{ec=Tt;var r=new Tt;return r._=t,n(r,e)._}finally{ec=Date}}}function Pt(n){function t(n){function t(t){for(var e,u,i,o=[],a=-1,c=0;++aa;){if(r>=s)return-1;if(u=t.charCodeAt(a++),37===u){if(o=t.charAt(a++),i=N[o in uc?t.charAt(a++):o],!i||(r=i(n,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){b.lastIndex=0;var r=b.exec(t.substring(e));return r?(n.w=w.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){M.lastIndex=0;var r=M.exec(t.substring(e));return r?(n.w=_.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){E.lastIndex=0;var r=E.exec(t.substring(e));return r?(n.m=A.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){S.lastIndex=0;var r=S.exec(t.substring(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,C.c.toString(),t,r)}function c(n,t,r){return e(n,C.x.toString(),t,r)}function s(n,t,r){return e(n,C.X.toString(),t,r)}function l(n,t,e){var r=x.get(t.substring(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,g=n.time,p=n.periods,v=n.days,d=n.shortDays,m=n.months,y=n.shortMonths;t.utc=function(n){function e(n){try{ec=Tt;var t=new ec;return t._=n,r(t)}finally{ec=Date}}var r=t(n);return e.parse=function(n){try{ec=Tt;var t=r.parse(n);return t&&t._}finally{ec=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=ee;var x=Xo.map(),M=jt(v),_=Ht(v),b=jt(d),w=Ht(d),S=jt(m),k=Ht(m),E=jt(y),A=Ht(y);p.forEach(function(n,t){x.set(n.toLowerCase(),t)});var C={a:function(n){return d[n.getDay()]},A:function(n){return v[n.getDay()]},b:function(n){return y[n.getMonth()]},B:function(n){return m[n.getMonth()]},c:t(f),d:function(n,t){return Ut(n.getDate(),t,2)},e:function(n,t){return Ut(n.getDate(),t,2)},H:function(n,t){return Ut(n.getHours(),t,2)},I:function(n,t){return Ut(n.getHours()%12||12,t,2)},j:function(n,t){return Ut(1+tc.dayOfYear(n),t,3)},L:function(n,t){return Ut(n.getMilliseconds(),t,3)},m:function(n,t){return Ut(n.getMonth()+1,t,2)},M:function(n,t){return Ut(n.getMinutes(),t,2)},p:function(n){return p[+(n.getHours()>=12)]},S:function(n,t){return Ut(n.getSeconds(),t,2)},U:function(n,t){return Ut(tc.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Ut(tc.mondayOfYear(n),t,2)},x:t(h),X:t(g),y:function(n,t){return Ut(n.getFullYear()%100,t,2)},Y:function(n,t){return Ut(n.getFullYear()%1e4,t,4)},Z:ne,"%":function(){return"%"}},N={a:r,A:u,b:i,B:o,c:a,d:Bt,e:Bt,H:Jt,I:Jt,j:Wt,L:Qt,m:$t,M:Gt,p:l,S:Kt,U:Ot,w:Ft,W:Yt,x:c,X:s,y:Zt,Y:It,Z:Vt,"%":te};return t}function Ut(n,t,e){var r=0>n?"-":"",u=(r?-n:n)+"",i=u.length;return r+(e>i?new Array(e-i+1).join(t)+u:u)}function jt(n){return new RegExp("^(?:"+n.map(Xo.requote).join("|")+")","i")}function Ht(n){for(var t=new u,e=-1,r=n.length;++e68?1900:2e3)}function $t(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function Bt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function Wt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function Jt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function Gt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function Kt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function Qt(n,t,e){ic.lastIndex=0;var r=ic.exec(t.substring(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function ne(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=~~(oa(t)/60),u=oa(t)%60;return e+Ut(r,"0",2)+Ut(u,"0",2)}function te(n,t,e){oc.lastIndex=0;var r=oc.exec(t.substring(e,e+1));return r?e+r[0].length:-1}function ee(n){for(var t=n.length,e=-1;++e=0?1:-1,a=o*e,c=Math.cos(t),s=Math.sin(t),l=i*s,f=u*c+l*Math.cos(a),h=l*o*Math.sin(a);hc.add(Math.atan2(h,f)),r=n,u=c,i=s}var t,e,r,u,i;gc.point=function(o,a){gc.point=n,r=(t=o)*Na,u=Math.cos(a=(e=a)*Na/2+Sa/4),i=Math.sin(a)},gc.lineEnd=function(){n(t,e)}}function se(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function le(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function fe(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function he(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function ge(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function pe(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function ve(n){return[Math.atan2(n[1],n[0]),X(n[2])]}function de(n,t){return oa(n[0]-t[0])a;++a)u.point((e=n[a])[0],e[1]);return u.lineEnd(),void 0}var c=new ke(e,n,null,!0),s=new ke(e,null,c,!1);c.o=s,i.push(c),o.push(s),c=new ke(r,n,null,!1),s=new ke(r,null,c,!0),c.o=s,i.push(c),o.push(s)}}),o.sort(t),Se(i),Se(o),i.length){for(var a=0,c=e,s=o.length;s>a;++a)o[a].e=c=!c;for(var l,f,h=i[0];;){for(var g=h,p=!0;g.v;)if((g=g.n)===h)return;l=g.z,u.lineStart();do{if(g.v=g.o.v=!0,g.e){if(p)for(var a=0,s=l.length;s>a;++a)u.point((f=l[a])[0],f[1]);else r(g.x,g.n.x,1,u);g=g.n}else{if(p){l=g.p.z;for(var a=l.length-1;a>=0;--a)u.point((f=l[a])[0],f[1])}else r(g.x,g.p.x,-1,u);g=g.p}g=g.o,l=g.z,p=!p}while(!g.v);u.lineEnd()}}}function Se(n){if(t=n.length){for(var t,e,r=0,u=n[0];++r1&&2&t&&e.push(e.pop().concat(e.shift())),g.push(e.filter(Ae))}}var g,p,v,d=t(i),m=u.invert(r[0],r[1]),y={point:o,lineStart:c,lineEnd:s,polygonStart:function(){y.point=l,y.lineStart=f,y.lineEnd=h,g=[],p=[],i.polygonStart()},polygonEnd:function(){y.point=o,y.lineStart=c,y.lineEnd=s,g=Xo.merge(g);var n=Le(m,p);g.length?we(g,Ne,n,e,i):n&&(i.lineStart(),e(null,null,1,i),i.lineEnd()),i.polygonEnd(),g=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},x=Ce(),M=t(x);return y}}function Ae(n){return n.length>1}function Ce(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:g,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ne(n,t){return((n=n.x)[0]<0?n[1]-Ea-Aa:Ea-n[1])-((t=t.x)[0]<0?t[1]-Ea-Aa:Ea-t[1])}function Le(n,t){var e=n[0],r=n[1],u=[Math.sin(e),-Math.cos(e),0],i=0,o=0;hc.reset();for(var a=0,c=t.length;c>a;++a){var s=t[a],l=s.length;if(l)for(var f=s[0],h=f[0],g=f[1]/2+Sa/4,p=Math.sin(g),v=Math.cos(g),d=1;;){d===l&&(d=0),n=s[d];var m=n[0],y=n[1]/2+Sa/4,x=Math.sin(y),M=Math.cos(y),_=m-h,b=_>=0?1:-1,w=b*_,S=w>Sa,k=p*x;if(hc.add(Math.atan2(k*b*Math.sin(w),v*M+k*Math.cos(w))),i+=S?_+b*ka:_,S^h>=e^m>=e){var E=fe(se(f),se(n));pe(E);var A=fe(u,E);pe(A);var C=(S^_>=0?-1:1)*X(A[2]);(r>C||r===C&&(E[0]||E[1]))&&(o+=S^_>=0?1:-1)}if(!d++)break;h=m,p=x,v=M,f=n}}return(-Aa>i||Aa>i&&0>hc)^1&o}function ze(n){var t,e=0/0,r=0/0,u=0/0;return{lineStart:function(){n.lineStart(),t=1},point:function(i,o){var a=i>0?Sa:-Sa,c=oa(i-e);oa(c-Sa)0?Ea:-Ea),n.point(u,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(i,r),t=0):u!==a&&c>=Sa&&(oa(e-u)Aa?Math.atan((Math.sin(t)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(t))*Math.sin(n))/(u*i*o)):(t+r)/2}function Te(n,t,e,r){var u;if(null==n)u=e*Ea,r.point(-Sa,u),r.point(0,u),r.point(Sa,u),r.point(Sa,0),r.point(Sa,-u),r.point(0,-u),r.point(-Sa,-u),r.point(-Sa,0),r.point(-Sa,u);else if(oa(n[0]-t[0])>Aa){var i=n[0]i}function e(n){var e,i,c,s,l;return{lineStart:function(){s=c=!1,l=1},point:function(f,h){var g,p=[f,h],v=t(f,h),d=o?v?0:u(f,h):v?u(f+(0>f?Sa:-Sa),h):0;if(!e&&(s=c=v)&&n.lineStart(),v!==c&&(g=r(e,p),(de(e,g)||de(p,g))&&(p[0]+=Aa,p[1]+=Aa,v=t(p[0],p[1]))),v!==c)l=0,v?(n.lineStart(),g=r(p,e),n.point(g[0],g[1])):(g=r(e,p),n.point(g[0],g[1]),n.lineEnd()),e=g;else if(a&&e&&o^v){var m;d&i||!(m=r(p,e,!0))||(l=0,o?(n.lineStart(),n.point(m[0][0],m[0][1]),n.point(m[1][0],m[1][1]),n.lineEnd()):(n.point(m[1][0],m[1][1]),n.lineEnd(),n.lineStart(),n.point(m[0][0],m[0][1])))}!v||e&&de(e,p)||n.point(p[0],p[1]),e=p,c=v,i=d},lineEnd:function(){c&&n.lineEnd(),e=null},clean:function(){return l|(s&&c)<<1}}}function r(n,t,e){var r=se(n),u=se(t),o=[1,0,0],a=fe(r,u),c=le(a,a),s=a[0],l=c-s*s;if(!l)return!e&&n;var f=i*c/l,h=-i*s/l,g=fe(o,a),p=ge(o,f),v=ge(a,h);he(p,v);var d=g,m=le(p,d),y=le(d,d),x=m*m-y*(le(p,p)-1);if(!(0>x)){var M=Math.sqrt(x),_=ge(d,(-m-M)/y);if(he(_,p),_=ve(_),!e)return _;var b,w=n[0],S=t[0],k=n[1],E=t[1];w>S&&(b=w,w=S,S=b);var A=S-w,C=oa(A-Sa)A;if(!C&&k>E&&(b=k,k=E,E=b),N?C?k+E>0^_[1]<(oa(_[0]-w)Sa^(w<=_[0]&&_[0]<=S)){var L=ge(d,(-m+M)/y);return he(L,p),[_,ve(L)]}}}function u(t,e){var r=o?n:Sa-n,u=0;return-r>t?u|=1:t>r&&(u|=2),-r>e?u|=4:e>r&&(u|=8),u}var i=Math.cos(n),o=i>0,a=oa(i)>Aa,c=cr(n,6*Na);return Ee(t,e,c,o?[0,-n]:[-Sa,n-Sa])}function De(n,t,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,s=o.y,l=a.x,f=a.y,h=0,g=1,p=l-c,v=f-s;if(i=n-c,p||!(i>0)){if(i/=p,0>p){if(h>i)return;g>i&&(g=i)}else if(p>0){if(i>g)return;i>h&&(h=i)}if(i=e-c,p||!(0>i)){if(i/=p,0>p){if(i>g)return;i>h&&(h=i)}else if(p>0){if(h>i)return;g>i&&(g=i)}if(i=t-s,v||!(i>0)){if(i/=v,0>v){if(h>i)return;g>i&&(g=i)}else if(v>0){if(i>g)return;i>h&&(h=i)}if(i=r-s,v||!(0>i)){if(i/=v,0>v){if(i>g)return;i>h&&(h=i)}else if(v>0){if(h>i)return;g>i&&(g=i)}return h>0&&(u.a={x:c+h*p,y:s+h*v}),1>g&&(u.b={x:c+g*p,y:s+g*v}),u}}}}}}function Pe(n,t,e,r){function u(r,u){return oa(r[0]-n)0?0:3:oa(r[0]-e)0?2:1:oa(r[1]-t)0?1:0:u>0?3:2}function i(n,t){return o(n.x,t.x)}function o(n,t){var e=u(n,1),r=u(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function c(n){for(var t=0,e=d.length,r=n[1],u=0;e>u;++u)for(var i,o=1,a=d[u],c=a.length,s=a[0];c>o;++o)i=a[o],s[1]<=r?i[1]>r&&Z(s,i,n)>0&&++t:i[1]<=r&&Z(s,i,n)<0&&--t,s=i;return 0!==t}function s(i,a,c,s){var l=0,f=0;if(null==i||(l=u(i,c))!==(f=u(a,c))||o(i,a)<0^c>0){do s.point(0===l||3===l?n:e,l>1?r:t);while((l=(l+c+4)%4)!==f)}else s.point(a[0],a[1])}function l(u,i){return u>=n&&e>=u&&i>=t&&r>=i}function f(n,t){l(n,t)&&a.point(n,t)}function h(){N.point=p,d&&d.push(m=[]),S=!0,w=!1,_=b=0/0}function g(){v&&(p(y,x),M&&w&&A.rejoin(),v.push(A.buffer())),N.point=f,w&&a.lineEnd()}function p(n,t){n=Math.max(-Ac,Math.min(Ac,n)),t=Math.max(-Ac,Math.min(Ac,t));var e=l(n,t);if(d&&m.push([n,t]),S)y=n,x=t,M=e,S=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&w)a.point(n,t);else{var r={a:{x:_,y:b},b:{x:n,y:t}};C(r)?(w||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),k=!1):e&&(a.lineStart(),a.point(n,t),k=!1)}_=n,b=t,w=e}var v,d,m,y,x,M,_,b,w,S,k,E=a,A=Ce(),C=De(n,t,e,r),N={point:f,lineStart:h,lineEnd:g,polygonStart:function(){a=A,v=[],d=[],k=!0},polygonEnd:function(){a=E,v=Xo.merge(v);var t=c([n,r]),e=k&&t,u=v.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),s(null,null,1,a),a.lineEnd()),u&&we(v,i,t,s,a),a.polygonEnd()),v=d=m=null}};return N}}function Ue(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return e=t.invert(e,r),e&&n.invert(e[0],e[1])}),e}function je(n){var t=0,e=Sa/3,r=nr(n),u=r(t,e);return u.parallels=function(n){return arguments.length?r(t=n[0]*Sa/180,e=n[1]*Sa/180):[180*(t/Sa),180*(e/Sa)]},u}function He(n,t){function e(n,t){var e=Math.sqrt(i-2*u*Math.sin(t))/u;return[e*Math.sin(n*=u),o-e*Math.cos(n)]}var r=Math.sin(n),u=(r+Math.sin(t))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/u,X((i-(n*n+e*e)*u*u)/(2*u))]},e}function Fe(){function n(n,t){Nc+=u*n-r*t,r=n,u=t}var t,e,r,u;Rc.point=function(i,o){Rc.point=n,t=r=i,e=u=o},Rc.lineEnd=function(){n(t,e)}}function Oe(n,t){Lc>n&&(Lc=n),n>qc&&(qc=n),zc>t&&(zc=t),t>Tc&&(Tc=t)}function Ye(){function n(n,t){o.push("M",n,",",t,i)}function t(n,t){o.push("M",n,",",t),a.point=e}function e(n,t){o.push("L",n,",",t)}function r(){a.point=n}function u(){o.push("Z")}var i=Ie(4.5),o=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return i=Ie(n),a},result:function(){if(o.length){var n=o.join("");return o=[],n}}};return a}function Ie(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Ze(n,t){dc+=n,mc+=t,++yc}function Ve(){function n(n,r){var u=n-t,i=r-e,o=Math.sqrt(u*u+i*i);xc+=o*(t+n)/2,Mc+=o*(e+r)/2,_c+=o,Ze(t=n,e=r)}var t,e;Pc.point=function(r,u){Pc.point=n,Ze(t=r,e=u)}}function Xe(){Pc.point=Ze}function $e(){function n(n,t){var e=n-r,i=t-u,o=Math.sqrt(e*e+i*i);xc+=o*(r+n)/2,Mc+=o*(u+t)/2,_c+=o,o=u*n-r*t,bc+=o*(r+n),wc+=o*(u+t),Sc+=3*o,Ze(r=n,u=t)}var t,e,r,u;Pc.point=function(i,o){Pc.point=n,Ze(t=r=i,e=u=o)},Pc.lineEnd=function(){n(t,e)}}function Be(n){function t(t,e){n.moveTo(t,e),n.arc(t,e,o,0,ka)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function u(){a.point=t}function i(){n.closePath()}var o=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=t},pointRadius:function(n){return o=n,a},result:g};return a}function We(n){function t(n){return(a?r:e)(n)}function e(t){return Ke(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){x=0/0,S.point=i,t.lineStart()}function i(e,r){var i=se([e,r]),o=n(e,r);u(x,M,y,_,b,w,x=o[0],M=o[1],y=e,_=i[0],b=i[1],w=i[2],a,t),t.point(x,M)}function o(){S.point=e,t.lineEnd()}function c(){r(),S.point=s,S.lineEnd=l}function s(n,t){i(f=n,h=t),g=x,p=M,v=_,d=b,m=w,S.point=i}function l(){u(x,M,y,_,b,w,g,p,f,v,d,m,a,t),S.lineEnd=o,o()}var f,h,g,p,v,d,m,y,x,M,_,b,w,S={point:e,lineStart:r,lineEnd:o,polygonStart:function(){t.polygonStart(),S.lineStart=c},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function u(t,e,r,a,c,s,l,f,h,g,p,v,d,m){var y=l-t,x=f-e,M=y*y+x*x;if(M>4*i&&d--){var _=a+g,b=c+p,w=s+v,S=Math.sqrt(_*_+b*b+w*w),k=Math.asin(w/=S),E=oa(oa(w)-1)i||oa((y*L+x*z)/M-.5)>.3||o>a*g+c*p+s*v)&&(u(t,e,r,a,c,s,C,N,E,_/=S,b/=S,w,d,m),m.point(C,N),u(C,N,E,_,b,w,l,f,h,g,p,v,d,m))}}var i=.5,o=Math.cos(30*Na),a=16;return t.precision=function(n){return arguments.length?(a=(i=n*n)>0&&16,t):Math.sqrt(i)},t}function Je(n){var t=We(function(t,e){return n([t*La,e*La])});return function(n){return tr(t(n))}}function Ge(n){this.stream=n}function Ke(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function Qe(n){return nr(function(){return n})()}function nr(n){function t(n){return n=a(n[0]*Na,n[1]*Na),[n[0]*h+c,s-n[1]*h]}function e(n){return n=a.invert((n[0]-c)/h,(s-n[1])/h),n&&[n[0]*La,n[1]*La]}function r(){a=Ue(o=ur(m,y,x),i);var n=i(v,d);return c=g-n[0]*h,s=p+n[1]*h,u()}function u(){return l&&(l.valid=!1,l=null),t}var i,o,a,c,s,l,f=We(function(n,t){return n=i(n,t),[n[0]*h+c,s-n[1]*h]}),h=150,g=480,p=250,v=0,d=0,m=0,y=0,x=0,M=Ec,_=bt,b=null,w=null;return t.stream=function(n){return l&&(l.valid=!1),l=tr(M(o,f(_(n)))),l.valid=!0,l
+},t.clipAngle=function(n){return arguments.length?(M=null==n?(b=n,Ec):Re((b=+n)*Na),u()):b},t.clipExtent=function(n){return arguments.length?(w=n,_=n?Pe(n[0][0],n[0][1],n[1][0],n[1][1]):bt,u()):w},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(g=+n[0],p=+n[1],r()):[g,p]},t.center=function(n){return arguments.length?(v=n[0]%360*Na,d=n[1]%360*Na,r()):[v*La,d*La]},t.rotate=function(n){return arguments.length?(m=n[0]%360*Na,y=n[1]%360*Na,x=n.length>2?n[2]%360*Na:0,r()):[m*La,y*La,x*La]},Xo.rebind(t,f,"precision"),function(){return i=n.apply(this,arguments),t.invert=i.invert&&e,r()}}function tr(n){return Ke(n,function(t,e){n.point(t*Na,e*Na)})}function er(n,t){return[n,t]}function rr(n,t){return[n>Sa?n-ka:-Sa>n?n+ka:n,t]}function ur(n,t,e){return n?t||e?Ue(or(n),ar(t,e)):or(n):t||e?ar(t,e):rr}function ir(n){return function(t,e){return t+=n,[t>Sa?t-ka:-Sa>t?t+ka:t,e]}}function or(n){var t=ir(n);return t.invert=ir(-n),t}function ar(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),l=s*r+a*u;return[Math.atan2(c*i-l*o,a*r-s*u),X(l*i+c*o)]}var r=Math.cos(n),u=Math.sin(n),i=Math.cos(t),o=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),l=s*i-c*o;return[Math.atan2(c*i+s*o,a*r+l*u),X(l*r-a*u)]},e}function cr(n,t){var e=Math.cos(n),r=Math.sin(n);return function(u,i,o,a){var c=o*t;null!=u?(u=sr(e,u),i=sr(e,i),(o>0?i>u:u>i)&&(u+=o*ka)):(u=n+o*ka,i=n-.5*c);for(var s,l=u;o>0?l>i:i>l;l-=c)a.point((s=ve([e,-r*Math.cos(l),-r*Math.sin(l)]))[0],s[1])}}function sr(n,t){var e=se(t);e[0]-=n,pe(e);var r=V(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Aa)%(2*Math.PI)}function lr(n,t,e){var r=Xo.range(n,t-Aa,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function fr(n,t,e){var r=Xo.range(n,t-Aa,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function hr(n){return n.source}function gr(n){return n.target}function pr(n,t,e,r){var u=Math.cos(t),i=Math.sin(t),o=Math.cos(r),a=Math.sin(r),c=u*Math.cos(n),s=u*Math.sin(n),l=o*Math.cos(e),f=o*Math.sin(e),h=2*Math.asin(Math.sqrt(J(r-t)+u*o*J(e-n))),g=1/Math.sin(h),p=h?function(n){var t=Math.sin(n*=h)*g,e=Math.sin(h-n)*g,r=e*c+t*l,u=e*s+t*f,o=e*i+t*a;return[Math.atan2(u,r)*La,Math.atan2(o,Math.sqrt(r*r+u*u))*La]}:function(){return[n*La,t*La]};return p.distance=h,p}function vr(){function n(n,u){var i=Math.sin(u*=Na),o=Math.cos(u),a=oa((n*=Na)-t),c=Math.cos(a);Uc+=Math.atan2(Math.sqrt((a=o*Math.sin(a))*a+(a=r*i-e*o*c)*a),e*i+r*o*c),t=n,e=i,r=o}var t,e,r;jc.point=function(u,i){t=u*Na,e=Math.sin(i*=Na),r=Math.cos(i),jc.point=n},jc.lineEnd=function(){jc.point=jc.lineEnd=g}}function dr(n,t){function e(t,e){var r=Math.cos(t),u=Math.cos(e),i=n(r*u);return[i*u*Math.sin(t),i*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),u=t(r),i=Math.sin(u),o=Math.cos(u);return[Math.atan2(n*i,r*o),Math.asin(r&&e*i/r)]},e}function mr(n,t){function e(n,t){var e=oa(oa(t)-Ea)u;u++){for(;r>1&&Z(n[e[r-2]],n[e[r-1]],n[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function kr(n,t){return n[0]-t[0]||n[1]-t[1]}function Er(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Ar(n,t,e,r){var u=n[0],i=e[0],o=t[0]-u,a=r[0]-i,c=n[1],s=e[1],l=t[1]-c,f=r[1]-s,h=(a*(c-s)-f*(u-i))/(f*o-a*l);return[u+h*o,c+h*l]}function Cr(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Nr(){Jr(this),this.edge=this.site=this.circle=null}function Lr(n){var t=Jc.pop()||new Nr;return t.site=n,t}function zr(n){Or(n),$c.remove(n),Jc.push(n),Jr(n)}function qr(n){var t=n.circle,e=t.x,r=t.cy,u={x:e,y:r},i=n.P,o=n.N,a=[n];zr(n);for(var c=i;c.circle&&oa(e-c.circle.x)l;++l)s=a[l],c=a[l-1],$r(s.edge,c.site,s.site,u);c=a[0],s=a[f-1],s.edge=Vr(c.site,s.site,null,u),Fr(c),Fr(s)}function Tr(n){for(var t,e,r,u,i=n.x,o=n.y,a=$c._;a;)if(r=Rr(a,o)-i,r>Aa)a=a.L;else{if(u=i-Dr(a,o),!(u>Aa)){r>-Aa?(t=a.P,e=a):u>-Aa?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var c=Lr(n);if($c.insert(t,c),t||e){if(t===e)return Or(t),e=Lr(t.site),$c.insert(c,e),c.edge=e.edge=Vr(t.site,c.site),Fr(t),Fr(e),void 0;if(!e)return c.edge=Vr(t.site,c.site),void 0;Or(t),Or(e);var s=t.site,l=s.x,f=s.y,h=n.x-l,g=n.y-f,p=e.site,v=p.x-l,d=p.y-f,m=2*(h*d-g*v),y=h*h+g*g,x=v*v+d*d,M={x:(d*y-g*x)/m+l,y:(h*x-v*y)/m+f};$r(e.edge,s,p,M),c.edge=Vr(s,n,null,M),e.edge=Vr(n,p,null,M),Fr(t),Fr(e)}}function Rr(n,t){var e=n.site,r=e.x,u=e.y,i=u-t;if(!i)return r;var o=n.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,s=c-t;if(!s)return a;var l=a-r,f=1/i-1/s,h=l/s;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*s)-c+s/2+u-i/2)))/f+r:(r+a)/2}function Dr(n,t){var e=n.N;if(e)return Rr(e,t);var r=n.site;return r.y===t?r.x:1/0}function Pr(n){this.site=n,this.edges=[]}function Ur(n){for(var t,e,r,u,i,o,a,c,s,l,f=n[0][0],h=n[1][0],g=n[0][1],p=n[1][1],v=Xc,d=v.length;d--;)if(i=v[d],i&&i.prepare())for(a=i.edges,c=a.length,o=0;c>o;)l=a[o].end(),r=l.x,u=l.y,s=a[++o%c].start(),t=s.x,e=s.y,(oa(r-t)>Aa||oa(u-e)>Aa)&&(a.splice(o,0,new Br(Xr(i.site,l,oa(r-f)Aa?{x:f,y:oa(t-f)Aa?{x:oa(e-p)Aa?{x:h,y:oa(t-h)Aa?{x:oa(e-g)=-Ca)){var g=c*c+s*s,p=l*l+f*f,v=(f*g-s*p)/h,d=(c*p-l*g)/h,f=d+a,m=Gc.pop()||new Hr;m.arc=n,m.site=u,m.x=v+o,m.y=f+Math.sqrt(v*v+d*d),m.cy=f,n.circle=m;for(var y=null,x=Wc._;x;)if(m.yd||d>=a)return;if(h>p){if(i){if(i.y>=s)return}else i={x:d,y:c};e={x:d,y:s}}else{if(i){if(i.yr||r>1)if(h>p){if(i){if(i.y>=s)return}else i={x:(c-u)/r,y:c};e={x:(s-u)/r,y:s}}else{if(i){if(i.yg){if(i){if(i.x>=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.xr;++r)if(o=l[r],o.x==e[0]){if(o.i)if(null==s[o.i+1])for(s[o.i-1]+=o.x,s.splice(o.i,1),u=r+1;i>u;++u)l[u].i--;else for(s[o.i-1]+=o.x+s[o.i+1],s.splice(o.i,2),u=r+1;i>u;++u)l[u].i-=2;else if(null==s[o.i+1])s[o.i]=o.x;else for(s[o.i]=o.x+s[o.i+1],s.splice(o.i+1,1),u=r+1;i>u;++u)l[u].i--;l.splice(r,1),i--,r--}else o.x=su(parseFloat(e[0]),parseFloat(o.x));for(;i>r;)o=l.pop(),null==s[o.i+1]?s[o.i]=o.x:(s[o.i]=o.x+s[o.i+1],s.splice(o.i+1,1)),i--;return 1===s.length?null==s[0]?(o=l[0].x,function(n){return o(n)+""}):function(){return t}:function(n){for(r=0;i>r;++r)s[(o=l[r]).i]=o.x(n);return s.join("")}}function fu(n,t){for(var e,r=Xo.interpolators.length;--r>=0&&!(e=Xo.interpolators[r](n,t)););return e}function hu(n,t){var e,r=[],u=[],i=n.length,o=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(fu(n[e],t[e]));for(;i>e;++e)u[e]=n[e];for(;o>e;++e)u[e]=t[e];return function(n){for(e=0;a>e;++e)u[e]=r[e](n);return u}}function gu(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function pu(n){return function(t){return 1-n(1-t)}}function vu(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function du(n){return n*n}function mu(n){return n*n*n}function yu(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function xu(n){return function(t){return Math.pow(t,n)}}function Mu(n){return 1-Math.cos(n*Ea)}function _u(n){return Math.pow(2,10*(n-1))}function bu(n){return 1-Math.sqrt(1-n*n)}function wu(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/ka*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*ka/t)}}function Su(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function ku(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Eu(n,t){n=Xo.hcl(n),t=Xo.hcl(t);var e=n.h,r=n.c,u=n.l,i=t.h-e,o=t.c-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.c:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return rt(e+i*n,r+o*n,u+a*n)+""}}function Au(n,t){n=Xo.hsl(n),t=Xo.hsl(t);var e=n.h,r=n.s,u=n.l,i=t.h-e,o=t.s-r,a=t.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?t.s:r),isNaN(i)?(i=0,e=isNaN(e)?t.h:e):i>180?i-=360:-180>i&&(i+=360),function(n){return nt(e+i*n,r+o*n,u+a*n)+""}}function Cu(n,t){n=Xo.lab(n),t=Xo.lab(t);var e=n.l,r=n.a,u=n.b,i=t.l-e,o=t.a-r,a=t.b-u;return function(n){return ot(e+i*n,r+o*n,u+a*n)+""}}function Nu(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Lu(n){var t=[n.a,n.b],e=[n.c,n.d],r=qu(t),u=zu(t,e),i=qu(Tu(e,t,-u))||0;t[0]*e[1]180?l+=360:l-s>180&&(s+=360),u.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:su(s,l)})):l&&r.push(r.pop()+"rotate("+l+")"),f!=h?u.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:su(f,h)}):h&&r.push(r.pop()+"skewX("+h+")"),g[0]!=p[0]||g[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),u.push({i:e-4,x:su(g[0],p[0])},{i:e-2,x:su(g[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=u.length,function(n){for(var t,i=-1;++ie;++e)(t=n[e][1])>u&&(r=e,u=t);return r}function ei(n){return n.reduce(ri,0)}function ri(n,t){return n+t[1]}function ui(n,t){return ii(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ii(n,t){for(var e=-1,r=+n[0],u=(n[1]-r)/t,i=[];++e<=t;)i[e]=u*e+r;return i}function oi(n){return[Xo.min(n),Xo.max(n)]}function ai(n,t){return n.parent==t.parent?1:2}function ci(n){var t=n.children;return t&&t.length?t[0]:n._tree.thread}function si(n){var t,e=n.children;return e&&(t=e.length)?e[t-1]:n._tree.thread}function li(n,t){var e=n.children;if(e&&(u=e.length))for(var r,u,i=-1;++i0&&(n=r);return n}function fi(n,t){return n.x-t.x}function hi(n,t){return t.x-n.x}function gi(n,t){return n.depth-t.depth}function pi(n,t){function e(n,r){var u=n.children;if(u&&(o=u.length))for(var i,o,a=null,c=-1;++c=0;)t=u[i]._tree,t.prelim+=e,t.mod+=e,e+=t.shift+(r+=t.change)}function di(n,t,e){n=n._tree,t=t._tree;var r=e/(t.number-n.number);n.change+=r,t.change-=r,t.shift+=e,t.prelim+=e,t.mod+=e}function mi(n,t,e){return n._tree.ancestor.parent==t.parent?n._tree.ancestor:e}function yi(n,t){return n.value-t.value}function xi(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Mi(n,t){n._pack_next=t,t._pack_prev=n}function _i(n,t){var e=t.x-n.x,r=t.y-n.y,u=n.r+t.r;return.999*u*u>e*e+r*r}function bi(n){function t(n){l=Math.min(n.x-n.r,l),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),g=Math.max(n.y+n.r,g)}if((e=n.children)&&(s=e.length)){var e,r,u,i,o,a,c,s,l=1/0,f=-1/0,h=1/0,g=-1/0;if(e.forEach(wi),r=e[0],r.x=-r.r,r.y=0,t(r),s>1&&(u=e[1],u.x=u.r,u.y=0,t(u),s>2))for(i=e[2],Ei(r,u,i),t(i),xi(r,i),r._pack_prev=i,xi(i,u),u=r._pack_next,o=3;s>o;o++){Ei(r,u,i=e[o]);var p=0,v=1,d=1;for(a=u._pack_next;a!==u;a=a._pack_next,v++)if(_i(a,i)){p=1;break}if(1==p)for(c=r._pack_prev;c!==a._pack_prev&&!_i(c,i);c=c._pack_prev,d++);p?(d>v||v==d&&u.ro;o++)i=e[o],i.x-=m,i.y-=y,x=Math.max(x,i.r+Math.sqrt(i.x*i.x+i.y*i.y));n.r=x,e.forEach(Si)}}function wi(n){n._pack_next=n._pack_prev=n}function Si(n){delete n._pack_next,delete n._pack_prev}function ki(n,t,e,r){var u=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,u)for(var i=-1,o=u.length;++iu&&(e+=u/2,u=0),0>i&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Ti(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Ri(n){return n.rangeExtent?n.rangeExtent():Ti(n.range())}function Di(n,t,e,r){var u=e(n[0],n[1]),i=r(t[0],t[1]);return function(n){return i(u(n))}}function Pi(n,t){var e,r=0,u=n.length-1,i=n[r],o=n[u];return i>o&&(e=r,r=u,u=e,e=i,i=o,o=e),n[r]=t.floor(i),n[u]=t.ceil(o),n}function Ui(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:ls}function ji(n,t,e,r){var u=[],i=[],o=0,a=Math.min(n.length,t.length)-1;for(n[a]2?ji:Di,c=r?Pu:Du;return o=u(n,t,c,e),a=u(t,n,c,fu),i}function i(n){return o(n)}var o,a;return i.invert=function(n){return a(n)},i.domain=function(t){return arguments.length?(n=t.map(Number),u()):n},i.range=function(n){return arguments.length?(t=n,u()):t},i.rangeRound=function(n){return i.range(n).interpolate(Nu)},i.clamp=function(n){return arguments.length?(r=n,u()):r},i.interpolate=function(n){return arguments.length?(e=n,u()):e},i.ticks=function(t){return Ii(n,t)},i.tickFormat=function(t,e){return Zi(n,t,e)},i.nice=function(t){return Oi(n,t),u()},i.copy=function(){return Hi(n,t,e,r)},u()}function Fi(n,t){return Xo.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Oi(n,t){return Pi(n,Ui(Yi(n,t)[2]))}function Yi(n,t){null==t&&(t=10);var e=Ti(n),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),i=t/r*u;return.15>=i?u*=10:.35>=i?u*=5:.75>=i&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function Ii(n,t){return Xo.range.apply(Xo,Yi(n,t))}function Zi(n,t,e){var r=Yi(n,t);return Xo.format(e?e.replace(Qa,function(n,t,e,u,i,o,a,c,s,l){return[t,e,u,i,o,a,c,s||"."+Xi(l,r),l].join("")}):",."+Vi(r[2])+"f")}function Vi(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function Xi(n,t){var e=Vi(t[2]);return n in fs?Math.abs(e-Vi(Math.max(Math.abs(t[0]),Math.abs(t[1]))))+ +("e"!==n):e-2*("%"===n)}function $i(n,t,e,r){function u(n){return(e?Math.log(0>n?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function i(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function o(t){return n(u(t))}return o.invert=function(t){return i(n.invert(t))},o.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(t=+e,n.domain(r.map(u)),o):t},o.nice=function(){var t=Pi(r.map(u),e?Math:gs);return n.domain(t),r=t.map(i),o},o.ticks=function(){var n=Ti(r),o=[],a=n[0],c=n[1],s=Math.floor(u(a)),l=Math.ceil(u(c)),f=t%1?2:t;if(isFinite(l-s)){if(e){for(;l>s;s++)for(var h=1;f>h;h++)o.push(i(s)*h);o.push(i(s))}else for(o.push(i(s));s++0;h--)o.push(i(s)*h);for(s=0;o[s]c;l--);o=o.slice(s,l)}return o},o.tickFormat=function(n,t){if(!arguments.length)return hs;arguments.length<2?t=hs:"function"!=typeof t&&(t=Xo.format(t));var r,a=Math.max(.1,n/o.ticks().length),c=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/i(c(u(n)+r))<=a?t(n):""}},o.copy=function(){return $i(n.copy(),t,e,r)},Fi(o,n)}function Bi(n,t,e){function r(t){return n(u(t))}var u=Wi(t),i=Wi(1/t);return r.invert=function(t){return i(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(u)),r):e},r.ticks=function(n){return Ii(e,n)},r.tickFormat=function(n,t){return Zi(e,n,t)},r.nice=function(n){return r.domain(Oi(e,n))},r.exponent=function(o){return arguments.length?(u=Wi(t=o),i=Wi(1/t),n.domain(e.map(u)),r):t},r.copy=function(){return Bi(n.copy(),t,e)},Fi(r,n)}function Wi(n){return function(t){return 0>t?-Math.pow(-t,n):Math.pow(t,n)}}function Ji(n,t){function e(e){return o[((i.get(e)||"range"===t.t&&i.set(e,n.push(e)))-1)%o.length]}function r(t,e){return Xo.range(n.length).map(function(n){return t+e*n})}var i,o,a;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new u;for(var o,a=-1,c=r.length;++ae?[0/0,0/0]:[e>0?u[e-1]:n[0],et?0/0:t/i+n,[t,t+1/i]},r.copy=function(){return Ki(n,t,e)},u()}function Qi(n,t){function e(e){return e>=e?t[Xo.bisect(n,e)]:void 0}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return Qi(n,t)},e}function no(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return Ii(n,t)},t.tickFormat=function(t,e){return Zi(n,t,e)},t.copy=function(){return no(n)},t}function to(n){return n.innerRadius}function eo(n){return n.outerRadius}function ro(n){return n.startAngle}function uo(n){return n.endAngle}function io(n){function t(t){function o(){s.push("M",i(n(l),a))}for(var c,s=[],l=[],f=-1,h=t.length,g=_t(e),p=_t(r);++f1&&u.push("H",r[0]),u.join("")}function so(n){for(var t=0,e=n.length,r=n[0],u=[r[0],",",r[1]];++t