diff --git a/readme.md b/README.md similarity index 72% rename from readme.md rename to README.md index 0e7d810..c45b8ef 100644 --- a/readme.md +++ b/README.md @@ -14,40 +14,40 @@ Theres no automated testing, and most likely won't work for anything less than P Odin is a domain monitoring tool which has the following monitors: -- OpenGraph extraction. -- Uptime Monitoring with response-time graph and e-mail notifications. -- Downtime event tracking with duration. -- SSL Certificate grading via SSL Labs. -- SSL Health Monitoring with expiry and e-mail notifications. -- Robots.txt Monitoring to email changes for review - No more accidentally blocking your website. -- Basic DNS Monitoring to detect name-server and primary A Records changes -- Cron job Schedule Monitoring - Ping the API before and after your jobs run to check they're running on schedule. -- Website Crawling with Error Reporting - Crawls SSR websites and reports on 404s, errors, mixed-content warnings etc etc, if it appears in the browser console it will appear in here. +- OpenGraph extraction. +- Uptime Monitoring with response-time graph and e-mail notifications. +- Downtime event tracking with duration. +- SSL Certificate grading via SSL Labs. +- SSL Health Monitoring with expiry and e-mail notifications. +- Robots.txt Monitoring to email changes for review - No more accidentally blocking your website. +- Basic DNS Monitoring to detect name-server and primary A Records changes +- Cron job Schedule Monitoring - Ping the API before and after your jobs run to check they're running on schedule. +- Website Crawling with Error Reporting - Crawls SSR websites and reports on 404s, errors, mixed-content warnings etc etc, if it appears in the browser console it will appear in here. ## Notifications Fired -- CertificateHasExpired -- CertificateIsExpiring -- CertificateIsInvalid -- CertificateIsWeak -- CertificateWillExpire -- VisualDifferenceFound -- DnsHasChanged -- RobotsHasChanged -- WebsiteIsBackUp -- WebsiteIsDown +- CertificateHasExpired +- CertificateIsExpiring +- CertificateIsInvalid +- CertificateIsWeak +- CertificateWillExpire +- VisualDifferenceFound +- DnsHasChanged +- RobotsHasChanged +- WebsiteIsBackUp +- WebsiteIsDown ## Installing You should be able to follow any (good) up to date Laravel install guide, the jist is as follows: -- git clone the repository -- composer install -- npm install -- copy .env.example to .env and modify the settings -- npm run dev/watch/prod +- git clone the repository +- composer install +- npm install +- copy .env.example to .env and modify the settings +- npm run dev/watch/prod -You can then visit the webpage and /register to create an account. +You can then visit the webpage and / register to create an account. By default the Jobs are able to be queued and executed by a queue worker/horizon - We use horizon, but you can configure/protect this however you need. @@ -57,24 +57,33 @@ We use a modified version of the `spatie/browsershot` package which provides the Quick install for puppeteer: -macOS: `npm install puppeteer --global` +macOS: -Ubuntu 16: +```sh +npm install puppeteer --global ``` -curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - + +Ubuntu 18 / 20: + +```sh +curl -sL https://deb.nodesource.com/setup_current.x | sudo -E bash - + sudo apt-get install -y nodejs gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget + sudo npm install --global --unsafe-perm puppeteer + sudo chmod -R o+rx /usr/lib/node_modules/puppeteer/.local-chromium ``` + You can read more about this: https://github.com/spatie/browsershot#requirements ## Using the Visual Diff -The visual diff tool requires both `spatie/browsershot` (which uses puppeteer) and `Pixelmatch` +The visual diff tool requires both `spatie/browsershot` (which uses puppeteer) and `Pixelmatch` We use the following package to interact with the Pixelmatch node binaries: https://github.com/QortexDevs/laravel-visual-diff -Quick install: `npm install pixelmatch` +Quick install: `npm i pixelmatch` ## Deploying @@ -83,22 +92,29 @@ Deploying the project is very similar to installing it, the steps will differ de ## Screenshots ### Creating an account + ![register](https://user-images.githubusercontent.com/1094740/66187514-d5465400-e67c-11e9-8582-08d2aa331daa.png) ### Logging in + ![login](https://user-images.githubusercontent.com/1094740/66187512-d5465400-e67c-11e9-9c2e-8b81e58ec73a.png) ### Editing your profile + ![profile](https://user-images.githubusercontent.com/1094740/66187513-d5465400-e67c-11e9-9a54-133c4e270eb2.png) ### Creating a monitor + ![create](https://user-images.githubusercontent.com/1094740/66187508-d4adbd80-e67c-11e9-922b-501156069934.png) ### Editing a monitor + ![edit](https://user-images.githubusercontent.com/1094740/66187510-d4adbd80-e67c-11e9-95ed-4ee3bd77f591.png) ### Viewing all monitors + ![listing](https://user-images.githubusercontent.com/1094740/66187511-d5465400-e67c-11e9-95af-e15f89e7f5e8.png) ### Viewing a report/monitor + ![report](https://user-images.githubusercontent.com/1094740/66187515-d5465400-e67c-11e9-9a37-081b841ae11c.png) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index ba6b668..f308729 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -16,11 +16,6 @@ class Kernel extends ConsoleKernel // ]; - protected function scheduleTimezone() - { - return 'Europe/London'; - } - /** * Define the application's command schedule. * diff --git a/package-lock.json b/package-lock.json index 7421489..210e70c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2595,20 +2595,21 @@ "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", "dev": true, "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" }, "dependencies": { "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } @@ -3122,9 +3123,9 @@ "dev": true }, "bn.js": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.1.tgz", - "integrity": "sha512-IUTD/REb78Z2eodka1QZyyEk66pciRcP6Sroka0aI3tG/iwIdYLrBD62RsubR7vqdt3WyX8p4jxeatzmRSphtA==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", "dev": true }, "body-parser": { @@ -3286,24 +3287,24 @@ }, "dependencies": { "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } }, "browserify-sign": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.0.tgz", - "integrity": "sha512-hEZC1KEeYuoHRqhGhTy6gWrpJA3ZDjFWv0DE61643ZnOXAKJb3u7yWcrU0mMc9SwAqK1n7myPGndkp0dFG7NFA==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", "dev": true, "requires": { "bn.js": "^5.1.1", "browserify-rsa": "^4.0.1", "create-hash": "^1.2.0", "create-hmac": "^1.1.7", - "elliptic": "^6.5.2", + "elliptic": "^6.5.3", "inherits": "^2.0.4", "parse-asn1": "^5.1.5", "readable-stream": "^3.6.0", @@ -4036,19 +4037,19 @@ } }, "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", "dev": true, "requires": { "bn.js": "^4.1.0", - "elliptic": "^6.0.0" + "elliptic": "^6.5.3" }, "dependencies": { "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } @@ -4092,11 +4093,10 @@ } }, "create-react-class": { - "version": "15.6.3", - "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.6.3.tgz", - "integrity": "sha512-M+/3Q6E6DLO6Yx3OwrWjwHBnvfXXYA7W+dFjt/ZDBemHO1DDZhsalX/NUtnTYclN6GfnBDRh4qRHjcDHmlJBJg==", + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.7.0.tgz", + "integrity": "sha512-QZv4sFWG9S5RUvkTYWbflxeZX+JG7Cz0Tn33rQBJ+WFQTqTfUTjMjiv9tnfXazjsO5r0KhPs+AqCjyrQX6h2ng==", "requires": { - "fbjs": "^0.8.9", "loose-envify": "^1.3.1", "object-assign": "^4.1.1" } @@ -4694,9 +4694,9 @@ }, "dependencies": { "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } @@ -4900,9 +4900,9 @@ "dev": true }, "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "dev": true, "requires": { "bn.js": "^4.4.0", @@ -4915,9 +4915,9 @@ }, "dependencies": { "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } @@ -4966,9 +4966,9 @@ } }, "enhanced-resolve": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.1.tgz", - "integrity": "sha512-98p2zE+rL7/g/DzMHMTF4zZlCgeVdJ7yr6xzEpJRYwFYrGi9ANdn5DnJURg6RpBkyk60XYDnWIv51VfIhfNGuA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.3.0.tgz", + "integrity": "sha512-3e87LvavsdxyoCfGusJnrZ5G8SLPOFeHSNpZI/ATL9a5leXo2k0w6MKnbqhdBad9qTobSfB20Ld7UmgoNbAZkQ==", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -5156,12 +5156,20 @@ "dev": true }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, "estraverse": { @@ -7552,9 +7560,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, "lodash.assignin": { "version": "4.2.0", @@ -7937,9 +7945,9 @@ }, "dependencies": { "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } @@ -8184,9 +8192,9 @@ } }, "node-forge": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.9.0.tgz", - "integrity": "sha512-7ASaDa3pD+lJ3WvXFsxekJQelBKRpne+GOVbLbtHYdd7pFspyeuJHnWfLplGf3SwKGbfs/aYl5V/JCIaHVUKKQ==", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.10.0.tgz", + "integrity": "sha512-PPmu8eEeG9saEUvI97fm4OYxXVB6bFvyNTyiUOBichBpFG8A1Ljw3bY62+5oOjDEMHRnd0Y7HQ+x7uzxOzC6JA==", "dev": true }, "node-libs-browser": { @@ -8691,14 +8699,13 @@ } }, "parse-asn1": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", - "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", "dev": true, "requires": { - "asn1.js": "^4.0.0", + "asn1.js": "^5.2.0", "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", "pbkdf2": "^3.0.3", "safe-buffer": "^5.1.1" @@ -8796,9 +8803,9 @@ } }, "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", "dev": true, "requires": { "create-hash": "^1.1.2", @@ -9987,9 +9994,9 @@ }, "dependencies": { "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", "dev": true } } @@ -11366,12 +11373,12 @@ "dev": true }, "selfsigned": { - "version": "1.10.7", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.7.tgz", - "integrity": "sha512-8M3wBCzeWIJnQfl43IKwOmC4H/RAp50S8DF60znzjW5GVqTcSe2vWclt7hmYVPkKPlHWOu5EaWOMZ2Y6W8ZXTA==", + "version": "1.10.8", + "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.10.8.tgz", + "integrity": "sha512-2P4PtieJeEwVgTU9QEcwIRDQ/mXJLX8/+I3ur+Pg16nS8oNbrGxEso9NyYWy8NAmXiNl4dlAp5MwoNeCWzON4w==", "dev": true, "requires": { - "node-forge": "0.9.0" + "node-forge": "^0.10.0" } }, "semver": { @@ -11427,10 +11434,13 @@ } }, "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", - "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", - "dev": true + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } }, "serve-index": { "version": "1.9.1", @@ -12467,16 +12477,16 @@ } }, "terser-webpack-plugin": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", - "integrity": "sha512-QMxecFz/gHQwteWwSo5nTc6UaICqN1bMedC5sMtUc7y3Ha3Q8y6ZO0iCR8pq4RJC8Hjf0FEPEHZqcMB/+DFCrA==", + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz", + "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==", "dev": true, "requires": { "cacache": "^12.0.2", "find-cache-dir": "^2.1.0", "is-wsl": "^1.1.0", "schema-utils": "^1.0.0", - "serialize-javascript": "^2.1.2", + "serialize-javascript": "^4.0.0", "source-map": "^0.6.1", "terser": "^4.1.2", "webpack-sources": "^1.4.0", @@ -12507,9 +12517,9 @@ "dev": true }, "terser": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.7.0.tgz", - "integrity": "sha512-Lfb0RiZcjRDXCC3OSHJpEkxJ9Qeqs6mp2v4jf2MHfy8vGERmVDuvjXdd/EnP5Deme5F2yBRBymKmKHCBg2echw==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", + "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", "dev": true, "requires": { "commander": "^2.20.0", @@ -12674,9 +12684,9 @@ "dev": true }, "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "tty-browserify": { @@ -13087,12 +13097,12 @@ } }, "watchpack": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.2.tgz", - "integrity": "sha512-ymVbbQP40MFTp+cNMvpyBpBtygHnPzPkHqoIwRRj/0B8KhqQwV8LaKjtbaxF2lK4vl8zN9wCxS46IFCU5K4W0g==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.4.tgz", + "integrity": "sha512-aWAgTW4MoSJzZPAicljkO1hsi1oKj/RRq/OJQh2PKI2UKL04c2Bs+MBOB+BBABHTXJpf9mCwHN7ANCvYsvY2sg==", "dev": true, "requires": { - "chokidar": "^3.4.0", + "chokidar": "^3.4.1", "graceful-fs": "^4.1.2", "neo-async": "^2.5.0", "watchpack-chokidar2": "^2.0.0" @@ -13110,9 +13120,9 @@ } }, "binary-extensions": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.0.0.tgz", - "integrity": "sha512-Phlt0plgpIIBOGTT/ehfFnbNlfsDEiqmzE2KRXoX1bLIlir4X/MR+zSyBEkL05ffWgnRSf/DXv+WrUAVr93/ow==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", "dev": true, "optional": true }, @@ -13127,9 +13137,9 @@ } }, "chokidar": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz", - "integrity": "sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz", + "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==", "dev": true, "optional": true, "requires": { @@ -13140,7 +13150,7 @@ "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", - "readdirp": "~3.4.0" + "readdirp": "~3.5.0" } }, "fill-range": { @@ -13188,9 +13198,9 @@ "optional": true }, "readdirp": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", - "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", + "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", "dev": true, "optional": true, "requires": { @@ -13229,9 +13239,9 @@ } }, "webpack": { - "version": "4.43.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.43.0.tgz", - "integrity": "sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g==", + "version": "4.44.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.2.tgz", + "integrity": "sha512-6KJVGlCxYdISyurpQ0IPTklv+DULv05rs2hseIXer6D7KrUicRDLFb4IUM1S6LUAKypPM/nSiVSuv8jHu1m3/Q==", "dev": true, "requires": { "@webassemblyjs/ast": "1.9.0", @@ -13242,7 +13252,7 @@ "ajv": "^6.10.2", "ajv-keywords": "^3.4.1", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^4.1.0", + "enhanced-resolve": "^4.3.0", "eslint-scope": "^4.0.3", "json-parse-better-errors": "^1.0.2", "loader-runner": "^2.4.0", @@ -13255,14 +13265,14 @@ "schema-utils": "^1.0.0", "tapable": "^1.1.3", "terser-webpack-plugin": "^1.4.3", - "watchpack": "^1.6.1", + "watchpack": "^1.7.4", "webpack-sources": "^1.4.1" }, "dependencies": { "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", "dev": true }, "schema-utils": { diff --git a/public/js/maelstrom.js b/public/js/maelstrom.js index 0b23c40..19011ef 100644 --- a/public/js/maelstrom.js +++ b/public/js/maelstrom.js @@ -1 +1 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=478)}([function(e,t,n){"use strict";e.exports=n(480)},function(e,t,n){e.exports=n(484)()},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t>>0;for(t=0;t0)for(n=0;n=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,C=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)s(e,t)&&n.push(t);return n};var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,P=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,j={},D={};function N(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(D[e]=o),t&&(D[t[0]]=function(){return A(o.apply(this,arguments),t[1],t[2])}),n&&(D[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function F(e,t){return e.isValid()?(t=R(t,e.localeData()),j[t]=j[t]||function(e){var t,n,r,o=e.match(z);for(t=0,n=o.length;t=0&&P.test(e);)e=e.replace(P,r),P.lastIndex=0,n-=1;return e}var H={};function I(e,t){var n=e.toLowerCase();H[n]=H[n+"s"]=H[t]=e}function V(e){return"string"==typeof e?H[e]||H[e.toLowerCase()]:void 0}function B(e){var t,n,r={};for(n in e)s(e,n)&&(t=V(n))&&(r[t]=e[n]);return r}var Y={};function $(e,t){Y[e]=t}function W(e){return e%4==0&&e%100!=0||e%400==0}function U(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function q(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=U(t)),n}function K(e,t){return function(n){return null!=n?(J(this,e,n),o.updateOffset(this,t),this):G(this,e)}}function G(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function J(e,t,n){e.isValid()&&!isNaN(n)&&("FullYear"===t&&W(e.year())&&1===e.month()&&29===e.date()?(n=q(n),e._d["set"+(e._isUTC?"UTC":"")+t](n,e.month(),xe(n,e.month()))):e._d["set"+(e._isUTC?"UTC":"")+t](n))}var X,Q=/\d/,Z=/\d\d/,ee=/\d{3}/,te=/\d{4}/,ne=/[+-]?\d{6}/,re=/\d\d?/,oe=/\d\d\d\d?/,ie=/\d\d\d\d\d\d?/,ae=/\d{1,3}/,se=/\d{1,4}/,ce=/[+-]?\d{1,6}/,le=/\d+/,ue=/[+-]?\d+/,fe=/Z|[+-]\d\d:?\d\d/gi,de=/Z|[+-]\d\d(?::?\d\d)?/gi,pe=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function he(e,t,n){X[e]=O(t)?t:function(e,r){return e&&n?n:t}}function me(e,t){return s(X,e)?X[e](t._strict,t._locale):new RegExp(ge(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function ge(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}X={};var ve,ye={};function be(e,t){var n,r=t;for("string"==typeof e&&(e=[e]),u(t)&&(r=function(e,n){n[t]=q(e)}),n=0;n68?1900:2e3)};var Pe=K("FullYear",!0);function je(e,t,n,r,o,i,a){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,o,i,a),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,o,i,a),s}function De(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ne(e,t,n){var r=7+t-n;return-(7+De(e,0,r).getUTCDay()-t)%7+r-1}function Fe(e,t,n,r,o){var i,a,s=1+7*(t-1)+(7+n-r)%7+Ne(e,r,o);return s<=0?a=ze(i=e-1)+s:s>ze(e)?(i=e+1,a=s-ze(e)):(i=e,a=s),{year:i,dayOfYear:a}}function Re(e,t,n){var r,o,i=Ne(e.year(),t,n),a=Math.floor((e.dayOfYear()-i-1)/7)+1;return a<1?r=a+He(o=e.year()-1,t,n):a>He(e.year(),t,n)?(r=a-He(e.year(),t,n),o=e.year()+1):(o=e.year(),r=a),{week:r,year:o}}function He(e,t,n){var r=Ne(e,t,n),o=Ne(e+1,t,n);return(ze(e)-r+o)/7}function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}N("w",["ww",2],"wo","week"),N("W",["WW",2],"Wo","isoWeek"),I("week","w"),I("isoWeek","W"),$("week",5),$("isoWeek",5),he("w",re),he("ww",re,Z),he("W",re),he("WW",re,Z),we(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=q(e)})),N("d",0,"do","day"),N("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),N("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),N("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),N("e",0,0,"weekday"),N("E",0,0,"isoWeekday"),I("day","d"),I("weekday","e"),I("isoWeekday","E"),$("day",11),$("weekday",11),$("isoWeekday",11),he("d",re),he("e",re),he("E",re),he("dd",(function(e,t){return t.weekdaysMinRegex(e)})),he("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),he("dddd",(function(e,t){return t.weekdaysRegex(e)})),we(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:m(n).invalidWeekday=e})),we(["d","e","E"],(function(e,t,n,r){t[r]=q(e)}));var Ve="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Be="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ye="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),$e=pe,We=pe,Ue=pe;function qe(e,t,n){var r,o,i,a=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=ve.call(this._weekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ve.call(this._shortWeekdaysParse,a))?o:null:-1!==(o=ve.call(this._minWeekdaysParse,a))?o:null:"dddd"===t?-1!==(o=ve.call(this._weekdaysParse,a))||-1!==(o=ve.call(this._shortWeekdaysParse,a))||-1!==(o=ve.call(this._minWeekdaysParse,a))?o:null:"ddd"===t?-1!==(o=ve.call(this._shortWeekdaysParse,a))||-1!==(o=ve.call(this._weekdaysParse,a))||-1!==(o=ve.call(this._minWeekdaysParse,a))?o:null:-1!==(o=ve.call(this._minWeekdaysParse,a))||-1!==(o=ve.call(this._weekdaysParse,a))||-1!==(o=ve.call(this._shortWeekdaysParse,a))?o:null}function Ke(){function e(e,t){return t.length-e.length}var t,n,r,o,i,a=[],s=[],c=[],l=[];for(t=0;t<7;t++)n=h([2e3,1]).day(t),r=ge(this.weekdaysMin(n,"")),o=ge(this.weekdaysShort(n,"")),i=ge(this.weekdays(n,"")),a.push(r),s.push(o),c.push(i),l.push(r),l.push(o),l.push(i);a.sort(e),s.sort(e),c.sort(e),l.sort(e),this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Ge(){return this.hours()%12||12}function Je(e,t){N(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function Xe(e,t){return t._meridiemParse}N("H",["HH",2],0,"hour"),N("h",["hh",2],0,Ge),N("k",["kk",2],0,(function(){return this.hours()||24})),N("hmm",0,0,(function(){return""+Ge.apply(this)+A(this.minutes(),2)})),N("hmmss",0,0,(function(){return""+Ge.apply(this)+A(this.minutes(),2)+A(this.seconds(),2)})),N("Hmm",0,0,(function(){return""+this.hours()+A(this.minutes(),2)})),N("Hmmss",0,0,(function(){return""+this.hours()+A(this.minutes(),2)+A(this.seconds(),2)})),Je("a",!0),Je("A",!1),I("hour","h"),$("hour",13),he("a",Xe),he("A",Xe),he("H",re),he("h",re),he("k",re),he("HH",re,Z),he("hh",re,Z),he("kk",re,Z),he("hmm",oe),he("hmmss",ie),he("Hmm",oe),he("Hmmss",ie),be(["H","HH"],3),be(["k","kk"],(function(e,t,n){var r=q(e);t[3]=24===r?0:r})),be(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),be(["h","hh"],(function(e,t,n){t[3]=q(e),m(n).bigHour=!0})),be("hmm",(function(e,t,n){var r=e.length-2;t[3]=q(e.substr(0,r)),t[4]=q(e.substr(r)),m(n).bigHour=!0})),be("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=q(e.substr(0,r)),t[4]=q(e.substr(r,2)),t[5]=q(e.substr(o)),m(n).bigHour=!0})),be("Hmm",(function(e,t,n){var r=e.length-2;t[3]=q(e.substr(0,r)),t[4]=q(e.substr(r))})),be("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[3]=q(e.substr(0,r)),t[4]=q(e.substr(r,2)),t[5]=q(e.substr(o))}));var Qe,Ze=K("Hours",!0),et={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:ke,monthsShort:Se,week:{dow:0,doy:6},weekdays:Ve,weekdaysMin:Ye,weekdaysShort:Be,meridiemParse:/[ap]\.?m?\.?/i},tt={},nt={};function rt(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(r=it(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&rt(o,n)>=t-1)break;t--}i++}return Qe}(e)}function lt(e){var t,n=e._a;return n&&-2===m(e).overflow&&(t=n[1]<0||n[1]>11?1:n[2]<1||n[2]>xe(n[0],n[1])?2:n[3]<0||n[3]>24||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||n[4]>59?4:n[5]<0||n[5]>59?5:n[6]<0||n[6]>999?6:-1,m(e)._overflowDayOfYear&&(t<0||t>2)&&(t=2),m(e)._overflowWeeks&&-1===t&&(t=7),m(e)._overflowWeekday&&-1===t&&(t=8),m(e).overflow=t),e}var ut=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ft=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,dt=/Z|[+-]\d\d(?::?\d\d)?/,pt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],ht=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],mt=/^\/?Date\((-?\d+)/i,gt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,vt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function yt(e){var t,n,r,o,i,a,s=e._i,c=ut.exec(s)||ft.exec(s);if(c){for(m(e).iso=!0,t=0,n=pt.length;t7)&&(c=!0)):(i=e._locale._week.dow,a=e._locale._week.doy,l=Re(Mt(),i,a),n=_t(t.gg,e._a[0],l.year),r=_t(t.w,l.week),null!=t.d?((o=t.d)<0||o>6)&&(c=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(c=!0)):o=i),r<1||r>He(n,i,a)?m(e)._overflowWeeks=!0:null!=c?m(e)._overflowWeekday=!0:(s=Fe(n,r,o,i,a),e._a[0]=s.year,e._dayOfYear=s.dayOfYear)}(e),null!=e._dayOfYear&&(a=_t(e._a[0],r[0]),(e._dayOfYear>ze(a)||0===e._dayOfYear)&&(m(e)._overflowDayOfYear=!0),n=De(a,0,e._dayOfYear),e._a[1]=n.getUTCMonth(),e._a[2]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=s[t]=r[t];for(;t<7;t++)e._a[t]=s[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[3]&&0===e._a[4]&&0===e._a[5]&&0===e._a[6]&&(e._nextDay=!0,e._a[3]=0),e._d=(e._useUTC?De:je).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[3]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(m(e).weekdayMismatch=!0)}}function kt(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],m(e).empty=!0;var t,n,r,i,a,s,c=""+e._i,l=c.length,u=0;for(r=R(e._f,e._locale).match(z)||[],t=0;t0&&m(e).unusedInput.push(a),c=c.slice(c.indexOf(n)+n.length),u+=n.length),D[i]?(n?m(e).empty=!1:m(e).unusedTokens.push(i),_e(i,n,e)):e._strict&&!n&&m(e).unusedTokens.push(i);m(e).charsLeftOver=l-u,c.length>0&&m(e).unusedInput.push(c),e._a[3]<=12&&!0===m(e).bigHour&&e._a[3]>0&&(m(e).bigHour=void 0),m(e).parsedDateParts=e._a.slice(0),m(e).meridiem=e._meridiem,e._a[3]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[3],e._meridiem),null!==(s=m(e).era)&&(e._a[0]=e._locale.erasConvertYear(s,e._a[0])),xt(e),lt(e)}else wt(e);else yt(e)}function St(e){var t=e._i,n=e._f;return e._locale=e._locale||ct(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),x(t)?new _(lt(t)):(f(t)?e._d=t:i(n)?function(e){var t,n,r,o,i,a,s=!1;if(0===e._f.length)return m(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;othis?this:e:v()}));function Tt(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Mt();for(n=t[0],r=1;r=0?new Date(e+400,t,n)-126227808e5:new Date(e,t,n).valueOf()}function on(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-126227808e5:Date.UTC(e,t,n)}function an(e,t){return t.erasAbbrRegex(e)}function sn(){var e,t,n=[],r=[],o=[],i=[],a=this.eras();for(e=0,t=a.length;e(i=He(e,r,o))&&(t=i),un.call(this,e,t,n,r,o))}function un(e,t,n,r,o){var i=Fe(e,t,n,r,o),a=De(i.year,0,i.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}N("N",0,0,"eraAbbr"),N("NN",0,0,"eraAbbr"),N("NNN",0,0,"eraAbbr"),N("NNNN",0,0,"eraName"),N("NNNNN",0,0,"eraNarrow"),N("y",["y",1],"yo","eraYear"),N("y",["yy",2],0,"eraYear"),N("y",["yyy",3],0,"eraYear"),N("y",["yyyy",4],0,"eraYear"),he("N",an),he("NN",an),he("NNN",an),he("NNNN",(function(e,t){return t.erasNameRegex(e)})),he("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),be(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?m(n).era=o:m(n).invalidEra=e})),he("y",le),he("yy",le),he("yyy",le),he("yyyy",le),he("yo",(function(e,t){return t._eraYearOrdinalRegex||le})),be(["y","yy","yyy","yyyy"],0),be(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[0]=n._locale.eraYearOrdinalParse(e,o):t[0]=parseInt(e,10)})),N(0,["gg",2],0,(function(){return this.weekYear()%100})),N(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),cn("gggg","weekYear"),cn("ggggg","weekYear"),cn("GGGG","isoWeekYear"),cn("GGGGG","isoWeekYear"),I("weekYear","gg"),I("isoWeekYear","GG"),$("weekYear",1),$("isoWeekYear",1),he("G",ue),he("g",ue),he("GG",re,Z),he("gg",re,Z),he("GGGG",se,te),he("gggg",se,te),he("GGGGG",ce,ne),he("ggggg",ce,ne),we(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=q(e)})),we(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),N("Q",0,"Qo","quarter"),I("quarter","Q"),$("quarter",7),he("Q",Q),be("Q",(function(e,t){t[1]=3*(q(e)-1)})),N("D",["DD",2],"Do","date"),I("date","D"),$("date",9),he("D",re),he("DD",re,Z),he("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),be(["D","DD"],2),be("Do",(function(e,t){t[2]=q(e.match(re)[0])}));var fn=K("Date",!0);N("DDD",["DDDD",3],"DDDo","dayOfYear"),I("dayOfYear","DDD"),$("dayOfYear",4),he("DDD",ae),he("DDDD",ee),be(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=q(e)})),N("m",["mm",2],0,"minute"),I("minute","m"),$("minute",14),he("m",re),he("mm",re,Z),be(["m","mm"],4);var dn=K("Minutes",!1);N("s",["ss",2],0,"second"),I("second","s"),$("second",15),he("s",re),he("ss",re,Z),be(["s","ss"],5);var pn,hn,mn=K("Seconds",!1);for(N("S",0,0,(function(){return~~(this.millisecond()/100)})),N(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),N(0,["SSS",3],0,"millisecond"),N(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),N(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),N(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),N(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),N(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),N(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),I("millisecond","ms"),$("millisecond",16),he("S",ae,Q),he("SS",ae,Z),he("SSS",ae,ee),pn="SSSS";pn.length<=9;pn+="S")he(pn,le);function gn(e,t){t[6]=q(1e3*("0."+e))}for(pn="S";pn.length<=9;pn+="S")be(pn,gn);hn=K("Milliseconds",!1),N("z",0,0,"zoneAbbr"),N("zz",0,0,"zoneName");var vn=_.prototype;function yn(e){return e}vn.add=qt,vn.calendar=function(e,t){1===arguments.length&&(Jt(arguments[0])?(e=arguments[0],t=void 0):Xt(arguments[0])&&(t=arguments[0],e=void 0));var n=e||Mt(),r=Ft(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",a=t&&(O(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,Mt(n)))},vn.clone=function(){return new _(this)},vn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Ft(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=V(t)){case"year":i=Qt(this,r)/12;break;case"month":i=Qt(this,r);break;case"quarter":i=Qt(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:U(i)},vn.endOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?on:rn,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=36e5-nn(t+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":t=this._d.valueOf(),t+=6e4-nn(t,6e4)-1;break;case"second":t=this._d.valueOf(),t+=1e3-nn(t,1e3)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},vn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=F(this,e);return this.localeData().postformat(t)},vn.from=function(e,t){return this.isValid()&&(x(e)&&e.isValid()||Mt(e).isValid())?Bt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.fromNow=function(e){return this.from(Mt(),e)},vn.to=function(e,t){return this.isValid()&&(x(e)&&e.isValid()||Mt(e).isValid())?Bt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},vn.toNow=function(e){return this.to(Mt(),e)},vn.get=function(e){return O(this[e=V(e)])?this[e]():this},vn.invalidAt=function(){return m(this).overflow},vn.isAfter=function(e,t){var n=x(e)?e:Mt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()9999?F(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",F(n,"Z")):F(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},vn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",o="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=o+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(vn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),vn.toJSON=function(){return this.isValid()?this.toISOString():null},vn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},vn.unix=function(){return Math.floor(this.valueOf()/1e3)},vn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},vn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},vn.eraName=function(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;ethis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},vn.isLocal=function(){return!!this.isValid()&&!this._isUTC},vn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},vn.isUtc=Ht,vn.isUTC=Ht,vn.zoneAbbr=function(){return this._isUTC?"UTC":""},vn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},vn.dates=S("dates accessor is deprecated. Use date instead.",fn),vn.months=S("months accessor is deprecated. Use month instead",Le),vn.years=S("years accessor is deprecated. Use year instead",Pe),vn.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),vn.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var e,t={};return w(t,this),(t=St(t))._a?(e=t._isUTC?h(t._a):Mt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0;for(r=0;r0):this._isDSTShifted=!1,this._isDSTShifted}));var bn=L.prototype;function wn(e,t,n,r){var o=ct(),i=h().set(r,t);return o[n](i,e)}function _n(e,t,n){if(u(e)&&(t=e,e=void 0),e=e||"",null!=t)return wn(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=wn(e,r,n,"month");return o}function xn(e,t,n,r){"boolean"==typeof e?(u(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,u(t)&&(n=t,t=void 0),t=t||"");var o,i=ct(),a=e?i._week.dow:0,s=[];if(null!=n)return wn(t,(n+a)%7,r,"day");for(o=0;o<7;o++)s[o]=wn(t,(o+a)%7,r,"day");return s}bn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return O(r)?r.call(t,n):r},bn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(z).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},bn.invalidDate=function(){return this._invalidDate},bn.ordinal=function(e){return this._ordinal.replace("%d",e)},bn.preparse=yn,bn.postformat=yn,bn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return O(o)?o(e,t,n,r):o.replace(/%d/i,e)},bn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return O(n)?n(t):n.replace(/%s/i,t)},bn.set=function(e){var t,n;for(n in e)s(e,n)&&(O(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},bn.eras=function(e,t){var n,r,i,a=this._eras||ct("en")._eras;for(n=0,r=a.length;n=0)return c[r]},bn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?o(e.since).year():o(e.since).year()+(t-e.offset)*n},bn.erasAbbrRegex=function(e){return s(this,"_erasAbbrRegex")||sn.call(this),e?this._erasAbbrRegex:this._erasRegex},bn.erasNameRegex=function(e){return s(this,"_erasNameRegex")||sn.call(this),e?this._erasNameRegex:this._erasRegex},bn.erasNarrowRegex=function(e){return s(this,"_erasNarrowRegex")||sn.call(this),e?this._erasNarrowRegex:this._erasRegex},bn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Ce).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},bn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Ce.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},bn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return Oe.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},bn.monthsRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Ae.call(this),e?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Ee),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},bn.monthsShortRegex=function(e){return this._monthsParseExact?(s(this,"_monthsRegex")||Ae.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=Me),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},bn.week=function(e){return Re(e,this._week.dow,this._week.doy).week},bn.firstDayOfYear=function(){return this._week.doy},bn.firstDayOfWeek=function(){return this._week.dow},bn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Ie(n,this._week.dow):e?n[e.day()]:n},bn.weekdaysMin=function(e){return!0===e?Ie(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},bn.weekdaysShort=function(e){return!0===e?Ie(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},bn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return qe.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},bn.weekdaysRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=$e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},bn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=We),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},bn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||Ke.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ue),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},bn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},bn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},at("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===q(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=S("moment.lang is deprecated. Use moment.locale instead.",at),o.langData=S("moment.langData is deprecated. Use moment.localeData instead.",ct);var kn=Math.abs;function Sn(e,t,n,r){var o=Bt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Cn(e){return e<0?Math.floor(e):Math.ceil(e)}function Mn(e){return 4800*e/146097}function En(e){return 146097*e/4800}function On(e){return function(){return this.as(e)}}var Tn=On("ms"),Ln=On("s"),An=On("m"),zn=On("h"),Pn=On("d"),jn=On("w"),Dn=On("M"),Nn=On("Q"),Fn=On("y");function Rn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Hn=Rn("milliseconds"),In=Rn("seconds"),Vn=Rn("minutes"),Bn=Rn("hours"),Yn=Rn("days"),$n=Rn("months"),Wn=Rn("years"),Un=Math.round,qn={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Kn(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var Gn=Math.abs;function Jn(e){return(e>0)-(e<0)||+e}function Xn(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,i,a,s,c=Gn(this._milliseconds)/1e3,l=Gn(this._days),u=Gn(this._months),f=this.asSeconds();return f?(e=U(c/60),t=U(e/60),c%=60,e%=60,n=U(u/12),u%=12,r=c?c.toFixed(3).replace(/\.?0+$/,""):"",o=f<0?"-":"",i=Jn(this._months)!==Jn(f)?"-":"",a=Jn(this._days)!==Jn(f)?"-":"",s=Jn(this._milliseconds)!==Jn(f)?"-":"",o+"P"+(n?i+n+"Y":"")+(u?i+u+"M":"")+(l?a+l+"D":"")+(t||e||c?"T":"")+(t?s+t+"H":"")+(e?s+e+"M":"")+(c?s+r+"S":"")):"P0D"}var Qn=At.prototype;return Qn.isValid=function(){return this._isValid},Qn.abs=function(){var e=this._data;return this._milliseconds=kn(this._milliseconds),this._days=kn(this._days),this._months=kn(this._months),e.milliseconds=kn(e.milliseconds),e.seconds=kn(e.seconds),e.minutes=kn(e.minutes),e.hours=kn(e.hours),e.months=kn(e.months),e.years=kn(e.years),this},Qn.add=function(e,t){return Sn(this,e,t,1)},Qn.subtract=function(e,t){return Sn(this,e,t,-1)},Qn.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=V(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Mn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(En(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Qn.asMilliseconds=Tn,Qn.asSeconds=Ln,Qn.asMinutes=An,Qn.asHours=zn,Qn.asDays=Pn,Qn.asWeeks=jn,Qn.asMonths=Dn,Qn.asQuarters=Nn,Qn.asYears=Fn,Qn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12):NaN},Qn._bubble=function(){var e,t,n,r,o,i=this._milliseconds,a=this._days,s=this._months,c=this._data;return i>=0&&a>=0&&s>=0||i<=0&&a<=0&&s<=0||(i+=864e5*Cn(En(s)+a),a=0,s=0),c.milliseconds=i%1e3,e=U(i/1e3),c.seconds=e%60,t=U(e/60),c.minutes=t%60,n=U(t/60),c.hours=n%24,a+=U(n/24),o=U(Mn(a)),s+=o,a-=Cn(En(o)),r=U(s/12),s%=12,c.days=a,c.months=s,c.years=r,this},Qn.clone=function(){return Bt(this)},Qn.get=function(e){return e=V(e),this.isValid()?this[e+"s"]():NaN},Qn.milliseconds=Hn,Qn.seconds=In,Qn.minutes=Vn,Qn.hours=Bn,Qn.days=Yn,Qn.weeks=function(){return U(this.days()/7)},Qn.months=$n,Qn.years=Wn,Qn.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,i=qn;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(i=Object.assign({},qn,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),n=this.localeData(),r=function(e,t,n,r){var o=Bt(e).abs(),i=Un(o.as("s")),a=Un(o.as("m")),s=Un(o.as("h")),c=Un(o.as("d")),l=Un(o.as("M")),u=Un(o.as("w")),f=Un(o.as("y")),d=i<=n.ss&&["s",i]||i0,d[4]=r,Kn.apply(null,d)}(this,!o,i,n),o&&(r=n.pastFuture(+this,r)),n.postformat(r)},Qn.toISOString=Xn,Qn.toString=Xn,Qn.toJSON=Xn,Qn.locale=Zt,Qn.localeData=tn,Qn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Xn),Qn.lang=en,N("X",0,0,"unix"),N("x",0,0,"valueOf"),he("x",ue),he("X",/[+-]?\d+(\.\d{1,3})?/),be("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),be("x",(function(e,t,n){n._d=new Date(q(e))})),o.version="2.25.3",t=Mt,o.fn=vn,o.min=function(){var e=[].slice.call(arguments,0);return Tt("isBefore",e)},o.max=function(){var e=[].slice.call(arguments,0);return Tt("isAfter",e)},o.now=function(){return Date.now?Date.now():+new Date},o.utc=h,o.unix=function(e){return Mt(1e3*e)},o.months=function(e,t){return _n(e,t,"months")},o.isDate=f,o.locale=at,o.invalid=v,o.duration=Bt,o.isMoment=x,o.weekdays=function(e,t,n){return xn(e,t,n,"weekdays")},o.parseZone=function(){return Mt.apply(null,arguments).parseZone()},o.localeData=ct,o.isDuration=zt,o.monthsShort=function(e,t){return _n(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return xn(e,t,n,"weekdaysMin")},o.defineLocale=st,o.updateLocale=function(e,t){if(null!=t){var n,r,o=et;null!=tt[e]&&null!=tt[e].parentLocale?tt[e].set(T(tt[e]._config,t)):(null!=(r=it(e))&&(o=r._config),t=T(o,t),null==r&&(t.abbr=e),(n=new L(t)).parentLocale=tt[e],tt[e]=n),at(e)}else null!=tt[e]&&(null!=tt[e].parentLocale?(tt[e]=tt[e].parentLocale,e===at()&&at(e)):null!=tt[e]&&delete tt[e]);return tt[e]},o.locales=function(){return C(tt)},o.weekdaysShort=function(e,t,n){return xn(e,t,n,"weekdaysShort")},o.normalizeUnits=V,o.relativeTimeRounding=function(e){return void 0===e?Un:"function"==typeof e&&(Un=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==qn[e]&&(void 0===t?qn[e]:(qn[e]=t,"s"===e&&(qn.ss=t-1),!0))},o.calendarFormat=function(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},o.prototype=vn,o.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},o}()}).call(this,n(54)(e))},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(486),i=(r=o)&&r.__esModule?r:{default:r};t.default=i.default||function(e){for(var t=1;t>1}},r.from=function(e){if(e instanceof r)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new r(t)};var o=r;var i=function(e,t){if(this.content=e,this.size=t||0,null==t)for(var n=0;ne&&!1!==n(s,r+a,o,i)&&s.content.size){var l=a+1;s.nodesBetween(Math.max(0,e-l),Math.min(s.content.size,t-l),n,r+l)}a=c}},i.prototype.descendants=function(e){this.nodesBetween(0,this.size,e)},i.prototype.textBetween=function(e,t,n,r){var o="",i=!0;return this.nodesBetween(e,t,(function(a,s){a.isText?(o+=a.text.slice(Math.max(e,s)-s,t-s),i=!n):a.isLeaf&&r?(o+=r,i=!n):!i&&a.isBlock&&(o+=n,i=!0)}),0),o},i.prototype.append=function(e){if(!e.size)return this;if(!this.size)return e;var t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);oe)for(var o=0,a=0;ae&&((at)&&(s=s.isText?s.cut(Math.max(0,e-a),Math.min(s.text.length,t-a)):s.cut(Math.max(0,e-a-1),Math.min(s.content.size,t-a-1))),n.push(s),r+=s.nodeSize),a=c}return new i(n,r)},i.prototype.cutByIndex=function(e,t){return e==t?i.empty:0==e&&t==this.content.length?this:new i(this.content.slice(e,t))},i.prototype.replaceChild=function(e,t){var n=this.content[e];if(n==t)return this;var r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new i(r,o)},i.prototype.addToStart=function(e){return new i([e].concat(this.content),this.size+e.nodeSize)},i.prototype.addToEnd=function(e){return new i(this.content.concat(e),this.size+e.nodeSize)},i.prototype.eq=function(e){if(this.content.length!=e.content.length)return!1;for(var t=0;tthis.size||e<0)throw new RangeError("Position "+e+" outside of fragment ("+this+")");for(var n=0,r=0;;n++){var o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?c(n+1,o):c(n,r);r=o}},i.prototype.toString=function(){return"<"+this.toStringInner()+">"},i.prototype.toStringInner=function(){return this.content.join(", ")},i.prototype.toJSON=function(){return this.content.length?this.content.map((function(e){return e.toJSON()})):null},i.fromJSON=function(e,t){if(!t)return i.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new i(t.map(e.nodeFromJSON))},i.fromArray=function(e){if(!e.length)return i.empty;for(var t,n=0,r=0;rthis.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t},u.prototype.removeFromSet=function(e){for(var t=0;te.depth)throw new f("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new f("Inconsistent open depths");return function e(t,n,r,o){var a=t.index(o),s=t.node(o);if(a==n.index(o)&&o=0;o--)r=t.node(o).copy(i.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(r,t),u=l.start,f=l.end;return b(s,function e(t,n,r,o,a){var s=t.depth>a&&g(t,n,a+1),c=o.depth>a&&g(r,o,a+1),l=[];y(null,t,a,l),s&&c&&n.index(a)==r.index(a)?(m(s,c),v(b(s,e(t,n,r,o,a+1)),l)):(s&&v(b(s,w(t,n,a+1)),l),y(n,r,a,l),c&&v(b(c,w(r,o,a+1)),l));return y(o,null,a,l),new i(l)}(t,u,f,n,o))}var d=t.parent,p=d.content;return b(d,p.cut(0,t.parentOffset).append(r.content).append(p.cut(n.parentOffset)))}return b(s,w(t,n,o))}(e,t,n,0)}function m(e,t){if(!t.type.compatibleContent(e.type))throw new f("Cannot join "+t.type.name+" onto "+e.type.name)}function g(e,t,n){var r=e.node(n);return m(r,t.node(n)),r}function v(e,t){var n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function y(e,t,n,r){var o=(t||e).node(n),i=0,a=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(v(e.nodeAfter,r),i++));for(var s=i;sn)&&v(b(g(e,t,n+1),w(e,t,n+1)),r);return y(t,null,n,r),new i(r)}p.size.get=function(){return this.content.size-this.openStart-this.openEnd},d.prototype.insertAt=function(e,t){var n=function e(t,n,r,o){var i=t.findIndex(n),a=i.index,s=i.offset,c=t.maybeChild(a);if(s==n||c.isText)return o&&!o.canReplace(a,a,r)?null:t.cut(0,n).append(r).append(t.cut(n));var l=e(c.content,n-s-1,r);return l&&t.replaceChild(a,c.copy(l))}(this.content,e+this.openStart,t,null);return n&&new d(n,this.openStart,this.openEnd)},d.prototype.removeBetween=function(e,t){return new d(function e(t,n,r){var o=t.findIndex(n),i=o.index,a=o.offset,s=t.maybeChild(i),c=t.findIndex(r),l=c.index,u=c.offset;if(a==n||s.isText){if(u!=r&&!t.child(l).isText)throw new RangeError("Removing non-flat range");return t.cut(0,n).append(t.cut(r))}if(i!=l)throw new RangeError("Removing non-flat range");return t.replaceChild(i,s.copy(e(s.content,n-a-1,r-a-1)))}(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)},d.prototype.eq=function(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd},d.prototype.toString=function(){return this.content+"("+this.openStart+","+this.openEnd+")"},d.prototype.toJSON=function(){if(!this.content.size)return null;var e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e},d.fromJSON=function(e,t){if(!t)return d.empty;var n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new d(i.fromJSON(e,t.content),t.openStart||0,t.openEnd||0)},d.maxOpen=function(e,t){void 0===t&&(t=!0);for(var n=0,r=0,o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(var i=e.lastChild;i&&!i.isLeaf&&(t||!i.type.spec.isolating);i=i.lastChild)r++;return new d(e,n,r)},Object.defineProperties(d.prototype,p),d.empty=new d(i.empty,0,0);var _=function(e,t,n){this.pos=e,this.path=t,this.depth=t.length/3-1,this.parentOffset=n},x={parent:{configurable:!0},doc:{configurable:!0},textOffset:{configurable:!0},nodeAfter:{configurable:!0},nodeBefore:{configurable:!0}};_.prototype.resolveDepth=function(e){return null==e?this.depth:e<0?this.depth+e:e},x.parent.get=function(){return this.node(this.depth)},x.doc.get=function(){return this.node(0)},_.prototype.node=function(e){return this.path[3*this.resolveDepth(e)]},_.prototype.index=function(e){return this.path[3*this.resolveDepth(e)+1]},_.prototype.indexAfter=function(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)},_.prototype.start=function(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1},_.prototype.end=function(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size},_.prototype.before=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]},_.prototype.after=function(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize},x.textOffset.get=function(){return this.pos-this.path[this.path.length-1]},x.nodeAfter.get=function(){var e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;var n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r},x.nodeBefore.get=function(){var e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)},_.prototype.marks=function(){var e=this.parent,t=this.index();if(0==e.content.size)return u.none;if(this.textOffset)return e.child(t).marks;var n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){var o=n;n=r,r=o}for(var i=n.marks,a=0;a0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0},_.prototype.blockRange=function(e,t){if(void 0===e&&(e=this),e.pos=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new M(this,e,n)},_.prototype.sameParent=function(e){return this.pos-this.parentOffset==e.pos-e.parentOffset},_.prototype.max=function(e){return e.pos>this.pos?e:this},_.prototype.min=function(e){return e.pos=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");for(var n=[],r=0,o=t,i=e;;){var a=i.content.findIndex(o),s=a.index,c=a.offset,l=o-c;if(n.push(i,s,r+c),!l)break;if((i=i.child(s)).isText)break;o=l-1,r+=c+1}return new _(t,n,o)},_.resolveCached=function(e,t){for(var n=0;ne&&this.nodesBetween(e,t,(function(e){return n.isInSet(e.marks)&&(r=!0),!r})),r},L.isBlock.get=function(){return this.type.isBlock},L.isTextblock.get=function(){return this.type.isTextblock},L.inlineContent.get=function(){return this.type.inlineContent},L.isInline.get=function(){return this.type.isInline},L.isText.get=function(){return this.type.isText},L.isLeaf.get=function(){return this.type.isLeaf},L.isAtom.get=function(){return this.type.isAtom},T.prototype.toString=function(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);var e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),z(this.marks,e)},T.prototype.contentMatchAt=function(e){var t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t},T.prototype.canReplace=function(e,t,n,r,o){void 0===n&&(n=i.empty),void 0===r&&(r=0),void 0===o&&(o=n.childCount);var a=this.contentMatchAt(e).matchFragment(n,r,o),s=a&&a.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(var c=r;c=0;n--)t=e[n].type.name+"("+t+")";return t}var P=function(e){this.validEnd=e,this.next=[],this.wrapCache=[]},j={inlineContent:{configurable:!0},defaultType:{configurable:!0},edgeCount:{configurable:!0}};P.parse=function(e,t){var n=new D(e,t);if(null==n.next)return P.empty;var r=F(n);n.next&&n.err("Unexpected trailing text");var o=function(e){var t=Object.create(null);return function n(r){var o=[];r.forEach((function(t){e[t].forEach((function(t){var n=t.term,r=t.to;if(n){var i=o.indexOf(n),a=i>-1&&o[i+1];Y(e,r).forEach((function(e){a||o.push(n,a=[]),-1==a.indexOf(e)&&a.push(e)}))}}))}));for(var i=t[r.join(",")]=new P(r.indexOf(e.length-1)>-1),a=0;a>1},P.prototype.edge=function(e){var t=e<<1;if(t>=this.next.length)throw new RangeError("There's no "+e+"th edge in this content match");return{type:this.next[t],next:this.next[t+1]}},P.prototype.toString=function(){var e=[];return function t(n){e.push(n);for(var r=1;r"+e.indexOf(t.next[o+1]);return r})).join("\n")},Object.defineProperties(P.prototype,j),P.empty=new P(!0);var D=function(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.unshift()},N={next:{configurable:!0}};function F(e){var t=[];do{t.push(R(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function R(e){var t=[];do{t.push(H(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function H(e){for(var t=function(e){if(e.eat("(")){var t=F(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){var n=function(e,t){var n=e.nodeTypes,r=n[t];if(r)return[r];var o=[];for(var i in n){var a=n[i];a.groups.indexOf(t)>-1&&o.push(a)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((function(t){return null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t}}));return e.pos++,1==n.length?n[0]:{type:"choice",exprs:n}}e.err("Unexpected token '"+e.next+"'")}(e);;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=V(e,t)}return t}function I(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");var t=Number(e.next);return e.pos++,t}function V(e,t){var n=I(e),r=n;return e.eat(",")&&(r="}"!=e.next?I(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function B(e,t){return t-e}function Y(e,t){var n=[];return function t(r){var o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(var i=0;i-1},q.prototype.allowsMarks=function(e){if(null==this.markSet)return!0;for(var t=0;t-1};var Q=function(e){for(var t in this.spec={},e)this.spec[t]=e[t];this.spec.nodes=o.from(e.nodes),this.spec.marks=o.from(e.marks),this.nodes=q.compile(this.spec.nodes,this),this.marks=X.compile(this.spec.marks,this);var n=Object.create(null);for(var r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");var i=this.nodes[r],a=i.spec.content||"",s=i.spec.marks;i.contentMatch=n[a]||(n[a]=P.parse(a,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.markSet="_"==s?null:s?Z(this,s.split(" ")):""!=s&&i.inlineContent?null:[]}for(var c in this.marks){var l=this.marks[c],u=l.spec.excludes;l.excluded=null==u?[l]:""==u?[]:Z(this,u.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached=Object.create(null),this.cached.wrappings=Object.create(null)};function Z(e,t){for(var n=[],r=0;r-1)&&n.push(a=c)}if(!a)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}Q.prototype.node=function(e,t,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof q))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)},Q.prototype.text=function(e,t){var n=this.nodes.text;return new A(n,n.defaultAttrs,e,u.setFrom(t))},Q.prototype.mark=function(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)},Q.prototype.nodeFromJSON=function(e){return T.fromJSON(this,e)},Q.prototype.markFromJSON=function(e){return u.fromJSON(this,e)},Q.prototype.nodeType=function(e){var t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t};var ee=function(e,t){var n=this;this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((function(e){e.tag?n.tags.push(e):e.style&&n.styles.push(e)}))};ee.prototype.parse=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!1);return n.addAll(e,null,t.from,t.to),n.finish()},ee.prototype.parseSlice=function(e,t){void 0===t&&(t={});var n=new ae(this,t,!0);return n.addAll(e,null,t.from,t.to),d.maxOpen(n.finish())},ee.prototype.matchTag=function(e,t){for(var n=0;ne.length&&(61!=o.style.charCodeAt(e.length)||o.style.slice(e.length+1)!=t))){if(o.getAttrs){var i=o.getAttrs(t);if(!1===i)continue;o.attrs=i}return o}}},ee.schemaRules=function(e){var t=[];function n(e){for(var n=null==e.priority?50:e.priority,r=0;r=0;r--){var o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(var a=0;athis.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}},ae.prototype.finish=function(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)},ae.prototype.sync=function(e){for(var t=this.open;t>=0;t--)if(this.nodes[t]==e)return void(this.open=t)},se.currentPos.get=function(){this.closeExtra();for(var e=0,t=this.open;t>=0;t--){for(var n=this.nodes[t].content,r=n.length-1;r>=0;r--)e+=n[r].nodeSize;t&&e++}return e},ae.prototype.findAtPoint=function(e,t){if(this.find)for(var n=0;n-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);var n=e.split("/"),r=this.options.context,o=!(this.isOpen||r&&r.parent.type!=this.nodes[0].type),i=-(r?r.depth+1:0)+(o?0:1),a=function(e,s){for(;e>=0;e--){var c=n[e];if(""==c){if(e==n.length-1||0==e)continue;for(;s>=i;s--)if(a(e-1,s))return!0;return!1}var l=s>0||0==s&&o?t.nodes[s].type:r&&s>=i?r.node(s-i).type:null;if(!l||l.name!=c&&-1==l.groups.indexOf(c))return!1;s--}return!0};return a(n.length-1,this.open)},ae.prototype.textblockFromContext=function(){var e=this.options.context;if(e)for(var t=e.depth;t>=0;t--){var n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(var r in this.parser.schema.nodes){var o=this.parser.schema.nodes[r];if(o.isTextblock&&o.defaultAttrs)return o}},ae.prototype.addPendingMark=function(e){this.top.pendingMarks=e.addToSet(this.top.pendingMarks)},ae.prototype.removePendingMark=function(e,t){for(var n=this.open;n>=0;n--){var r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1?r.pendingMarks=e.removeFromSet(r.pendingMarks):r.activeMarks=e.removeFromSet(r.activeMarks),r==t)break}},Object.defineProperties(ae.prototype,se);var fe=function(e,t){this.nodes=e||{},this.marks=t||{}};function de(e){var t={};for(var n in e){var r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function pe(e){return e.document||window.document}fe.prototype.serializeFragment=function(e,t,n){var r=this;void 0===t&&(t={}),n||(n=pe(t).createDocumentFragment());var o=n,i=null;return e.forEach((function(e){if(i||e.marks.length){i||(i=[]);for(var n=0,a=0;n=0;r--){var o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n},fe.prototype.serializeMark=function(e,t,n){void 0===n&&(n={});var r=this.marks[e.type.name];return r&&fe.renderSpec(pe(n),r(e,t))},fe.renderSpec=function(e,t,n){if(void 0===n&&(n=null),"string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};var r=t[0],o=r.indexOf(" ");o>0&&(n=r.slice(0,o),r=r.slice(o+1));var i=null,a=n?e.createElementNS(n,r):e.createElement(r),s=t[1],c=1;if(s&&"object"==typeof s&&null==s.nodeType&&!Array.isArray(s))for(var l in c=2,s)if(null!=s[l]){var u=l.indexOf(" ");u>0?a.setAttributeNS(l.slice(0,u),l.slice(u+1),s[l]):a.setAttribute(l,s[l])}for(var f=c;fc)throw new RangeError("Content hole must be the only child of its parent node");return{dom:a,contentDOM:a}}var p=fe.renderSpec(e,d,n),h=p.dom,m=p.contentDOM;if(a.appendChild(h),m){if(i)throw new RangeError("Multiple content holes");i=m}}return{dom:a,contentDOM:i}},fe.fromSchema=function(e){return e.cached.domSerializer||(e.cached.domSerializer=new fe(this.nodesFromSchema(e),this.marksFromSchema(e)))},fe.nodesFromSchema=function(e){var t=de(e.nodes);return t.text||(t.text=function(e){return e.text}),t},fe.marksFromSchema=function(e){return de(e.marks)}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(144),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":(0,i.default)(t))&&"function"!=typeof t?e:t}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(232),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(e,t,n){return t in e?(0,i.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(515)),o=a(n(519)),i=a(n(144));function a(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":(0,i.default)(t)));e.prototype=(0,o.default)(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(r.default?(0,r.default)(e,t):e.__proto__=t)}},function(e,t,n){"use strict";var r=n(0),o=n(2),i=n.n(o),a=n(217),s=n(8),c=n.n(s),l=n(4),u=n.n(l),f=n(27),d=n.n(f),p=n(7),h=n.n(p),m=n(16),g=n.n(m),v=n(6),y=n.n(v),b=n(9),w=n.n(b),_=n(77),x={primaryColor:"#333",secondaryColor:"#E6E6E6"},k=function(e){function t(){return h()(this,t),y()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return w()(t,e),g()(t,[{key:"render",value:function(){var e,n=this.props,r=n.type,o=n.className,i=n.onClick,a=n.style,s=n.primaryColor,l=n.secondaryColor,f=d()(n,["type","className","onClick","style","primaryColor","secondaryColor"]),p=void 0,h=x;if(s&&(h={primaryColor:s,secondaryColor:l||Object(_.c)(s)}),Object(_.d)(r))p=r;else if("string"==typeof r&&!(p=t.get(r,h)))return null;return p?(p&&"function"==typeof p.icon&&(p=u()({},p,{icon:p.icon(h.primaryColor,h.secondaryColor)})),Object(_.b)(p.icon,"svg-"+p.name,u()((e={className:o,onClick:i,style:a},c()(e,"data-icon",p.name),c()(e,"width","1em"),c()(e,"height","1em"),c()(e,"fill","currentColor"),c()(e,"aria-hidden","true"),c()(e,"focusable","false"),e),f))):(Object(_.e)("type should be string or icon definiton, but got "+r),null)}}],[{key:"add",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:x;if(e){var n=this.definitions.get(e);return n&&"function"==typeof n.icon&&(n=u()({},n,{icon:n.icon(t.primaryColor,t.secondaryColor)})),n}}},{key:"setTwoToneColors",value:function(e){var t=e.primaryColor,n=e.secondaryColor;x.primaryColor=t,x.secondaryColor=n||Object(_.c)(t)}},{key:"getTwoToneColors",value:function(){return u()({},x)}}]),t}(r.Component);k.displayName="IconReact",k.definitions=new _.a;var S=k;function C(){return(C=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=e.scriptUrl,n=e.extraCommonProps,o=void 0===n?{}:n;if("undefined"!=typeof document&&"undefined"!=typeof window&&"function"==typeof document.createElement&&"string"==typeof t&&t.length&&!E.has(t)){var i=document.createElement("script");i.setAttribute("src",t),i.setAttribute("data-namespace",t),E.add(t),document.body.appendChild(i)}var a=function(e){var t=e.type,n=e.children,i=M(e,["type","children"]),a=null;return e.type&&(a=r.createElement("use",{xlinkHref:"#".concat(t)})),n&&(a=n),r.createElement(Y,C({},o,i),a)};return a.displayName="Iconfont",a},B.getTwoToneColor=function(){return S.getTwoToneColors().primaryColor},B.setTwoToneColor=j;var Y=t.a=B},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function o(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function i(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function a(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,a=null,s=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?a="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(a="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?s="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(s="UNSAFE_componentWillUpdate"),null!==n||null!==a||null!==s){var c=e.displayName||e.name,l="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+c+" uses "+l+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==a?"\n "+a:"")+(null!==s?"\n "+s:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=o),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=i;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return a})),r.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(481)},function(e,t,n){"use strict";n.r(t),n.d(t,"AllSelection",(function(){return p})),n.d(t,"EditorState",(function(){return x})),n.d(t,"NodeSelection",(function(){return f})),n.d(t,"Plugin",(function(){return C})),n.d(t,"PluginKey",(function(){return O})),n.d(t,"Selection",(function(){return a})),n.d(t,"SelectionRange",(function(){return c})),n.d(t,"TextSelection",(function(){return l})),n.d(t,"Transaction",(function(){return v}));var r=n(5),o=n(23),i=Object.create(null),a=function(e,t,n){this.ranges=n||[new c(e.min(t),e.max(t))],this.$anchor=e,this.$head=t},s={anchor:{configurable:!0},head:{configurable:!0},from:{configurable:!0},to:{configurable:!0},$from:{configurable:!0},$to:{configurable:!0},empty:{configurable:!0}};s.anchor.get=function(){return this.$anchor.pos},s.head.get=function(){return this.$head.pos},s.from.get=function(){return this.$from.pos},s.to.get=function(){return this.$to.pos},s.$from.get=function(){return this.ranges[0].$from},s.$to.get=function(){return this.ranges[0].$to},s.empty.get=function(){for(var e=this.ranges,t=0;t=0;o--){var i=t<0?m(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):m(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(i)return i}},a.near=function(e,t){return void 0===t&&(t=1),this.findFrom(e,t)||this.findFrom(e,-t)||new p(e.node(0))},a.atStart=function(e){return m(e,e,0,0,1)||new p(e)},a.atEnd=function(e){return m(e,e,e.content.size,e.childCount,-1)||new p(e)},a.fromJSON=function(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");var n=i[t.type];if(!n)throw new RangeError("No selection type "+t.type+" defined");return n.fromJSON(e,t)},a.jsonID=function(e,t){if(e in i)throw new RangeError("Duplicate use of selection JSON ID "+e);return i[e]=t,t.prototype.jsonID=e,t},a.prototype.getBookmark=function(){return l.between(this.$anchor,this.$head).getBookmark()},Object.defineProperties(a.prototype,s),a.prototype.visible=!0;var c=function(e,t){this.$from=e,this.$to=t},l=function(e){function t(t,n){void 0===n&&(n=t),e.call(this,t,n)}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={$cursor:{configurable:!0}};return n.$cursor.get=function(){return this.$anchor.pos==this.$head.pos?this.$head:null},t.prototype.map=function(n,r){var o=n.resolve(r.map(this.head));if(!o.parent.inlineContent)return e.near(o);var i=n.resolve(r.map(this.anchor));return new t(i.parent.inlineContent?i:o,o)},t.prototype.replace=function(t,n){if(void 0===n&&(n=r.Slice.empty),e.prototype.replace.call(this,t,n),n==r.Slice.empty){var o=this.$from.marksAcross(this.$to);o&&t.ensureMarks(o)}},t.prototype.eq=function(e){return e instanceof t&&e.anchor==this.anchor&&e.head==this.head},t.prototype.getBookmark=function(){return new u(this.anchor,this.head)},t.prototype.toJSON=function(){return{type:"text",anchor:this.anchor,head:this.head}},t.fromJSON=function(e,n){if("number"!=typeof n.anchor||"number"!=typeof n.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new t(e.resolve(n.anchor),e.resolve(n.head))},t.create=function(e,t,n){void 0===n&&(n=t);var r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))},t.between=function(n,r,o){var i=n.pos-r.pos;if(o&&!i||(o=i>=0?1:-1),!r.parent.inlineContent){var a=e.findFrom(r,o,!0)||e.findFrom(r,-o,!0);if(!a)return e.near(r,o);r=a.$head}return n.parent.inlineContent||(0==i||(n=(e.findFrom(n,-o,!0)||e.findFrom(n,o,!0)).$anchor).pos0?0:1);o>0?a=0;a+=o){var s=t.child(a);if(s.isAtom){if(!i&&f.isSelectable(s))return f.create(e,n-(o<0?s.nodeSize:0))}else{var c=m(e,s,n+o,o<0?s.childCount:0,o,i);if(c)return c}n+=s.nodeSize*o}}function g(e,t,n){var r=e.steps.length-1;if(!(r0},t.prototype.setStoredMarks=function(e){return this.storedMarks=e,this.updated|=2,this},t.prototype.ensureMarks=function(e){return r.Mark.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this},t.prototype.addStoredMark=function(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))},t.prototype.removeStoredMark=function(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))},n.storedMarksSet.get=function(){return(2&this.updated)>0},t.prototype.addStep=function(t,n){e.prototype.addStep.call(this,t,n),this.updated=-3&this.updated,this.storedMarks=null},t.prototype.setTime=function(e){return this.time=e,this},t.prototype.replaceSelection=function(e){return this.selection.replace(this,e),this},t.prototype.replaceSelectionWith=function(e,t){var n=this.selection;return!1!==t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||r.Mark.none))),n.replaceWith(this,e),this},t.prototype.deleteSelection=function(){return this.selection.replace(this),this},t.prototype.insertText=function(e,t,n){void 0===n&&(n=t);var r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();if(!e)return this.deleteRange(t,n);var o=this.storedMarks;if(!o){var i=this.doc.resolve(t);o=n==t?i.marks():i.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(a.near(this.selection.$to)),this},t.prototype.setMeta=function(e,t){return this.meta["string"==typeof e?e:e.key]=t,this},t.prototype.getMeta=function(e){return this.meta["string"==typeof e?e:e.key]},n.isGeneric.get=function(){for(var e in this.meta)return!1;return!0},t.prototype.scrollIntoView=function(){return this.updated|=4,this},n.scrolledIntoView.get=function(){return(4&this.updated)>0},Object.defineProperties(t.prototype,n),t}(o.Transform);function y(e,t){return t&&e?e.bind(t):e}var b=function(e,t,n){this.name=e,this.init=y(t.init,n),this.apply=y(t.apply,n)},w=[new b("doc",{init:function(e){return e.doc||e.schema.topNodeType.createAndFill()},apply:function(e){return e.doc}}),new b("selection",{init:function(e,t){return e.selection||a.atStart(t.doc)},apply:function(e){return e.selection}}),new b("storedMarks",{init:function(e){return e.storedMarks||null},apply:function(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new b("scrollToSelection",{init:function(){return 0},apply:function(e,t){return e.scrolledIntoView?t+1:t}})],_=function(e,t){var n=this;this.schema=e,this.fields=w.concat(),this.plugins=[],this.pluginsByKey=Object.create(null),t&&t.forEach((function(e){if(n.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");n.plugins.push(e),n.pluginsByKey[e.key]=e,e.spec.state&&n.fields.push(new b(e.key,e.spec.state,e))}))},x=function(e){this.config=e},k={schema:{configurable:!0},plugins:{configurable:!0},tr:{configurable:!0}};k.schema.get=function(){return this.config.schema},k.plugins.get=function(){return this.config.plugins},x.prototype.apply=function(e){return this.applyTransaction(e).state},x.prototype.filterTransaction=function(e,t){void 0===t&&(t=-1);for(var n=0;n-1&&S.splice(t,1)},Object.defineProperties(x.prototype,k);var S=[];var C=function(e){this.props={},e.props&&function e(t,n,r){for(var o in t){var i=t[o];i instanceof Function?i=i.bind(n):"handleDOMEvents"==o&&(i=e(i,n,{})),r[o]=i}return r}(e.props,this,this.props),this.spec=e,this.key=e.key?e.key.key:E("plugin")};C.prototype.getState=function(e){return e[this.key]};var M=Object.create(null);function E(e){return e in M?e+"$"+ ++M[e]:(M[e]=0,e+"$")}var O=function(e){void 0===e&&(e="key"),this.key=E(e)};O.prototype.get=function(e){return e.config.pluginsByKey[this.key]},O.prototype.getState=function(e){return e[this.key]}},function(e,t,n){"use strict";var r={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.a=r},function(e,t,n){"use strict";var r=n(116);t.a=function(e,t,n){Object(r.a)(e,"[antd: ".concat(t,"] ").concat(n))}},function(e,t,n){"use strict";t.__esModule=!0;var r,o=n(232),i=(r=o)&&r.__esModule?r:{default:r};t.default=function(){function e(e,t){for(var n=0;n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var f=!1;function d(){f||(f=!0,s()(!1,"Tree only accept TreeNode as children."))}function p(e,t){var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function h(e,t){var n=e.slice();return-1===n.indexOf(t)&&n.push(t),n}function m(e){return e.split("-")}function g(e,t){return"".concat(e,"-").concat(t)}function v(e){return e&&e.type&&e.type.isTreeNode}function y(e){return Object(i.a)(e).filter(v)}function b(e){var t=e.props||{},n=t.disabled,r=t.disableCheckbox,o=t.checkable;return!(!n&&!r)||!1===o}function w(e,t){!function n(o,i,a){var s=o?o.props.children:e,c=o?g(a.pos,i):0,l=y(s);if(o){var u={node:o,index:i,pos:c,key:o.key||c,parentPos:a.node?a.pos:null};t(u)}r.Children.forEach(l,(function(e,t){n(e,t,{node:o,pos:c})}))}(null)}function _(e,t){var n=Object(i.a)(e).map(t);return 1===n.length?n[0]:n}function x(e,t){var n=t.props,r=n.eventKey,o=n.pos,i=[];return w(e,(function(e){var t=e.key;i.push(t)})),i.push(r||o),i}function k(e,t){var n=e.clientY,r=t.selectHandle.getBoundingClientRect(),o=r.top,i=r.bottom,a=r.height,s=Math.max(.25*a,2);return n<=o+s?-1:n>=i-s?1:0}function S(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function C(e){return e?e.map((function(e){return String(e)})):e}var M=function(e){return e};function E(e,t){if(!e)return[];var n=(t||{}).processProps,r=void 0===n?M:n;return(Array.isArray(e)?e:[e]).map((function(e){var n=e.children,i=u(e,["children"]),a=E(n,t);return o.a.createElement(c.a,Object.assign({},r(i)),a)}))}function O(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,r=t.processEntity,o=t.onProcessFinished,i={},a={},s={posEntities:i,keyEntities:a};return n&&(s=n(s)||s),w(e,(function(e){var t=e.node,n=e.index,o=e.pos,c=e.key,l=e.parentPos,u={node:t,index:n,key:c,pos:o};i[o]=u,a[c]=u,u.parent=i[l],u.parent&&(u.parent.children=u.parent.children||[],u.parent.children.push(u)),r&&r(u,s)})),o&&o(s),s}function T(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==l(e))return s()(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t.checkedKeys=C(t.checkedKeys),t.halfCheckedKeys=C(t.halfCheckedKeys),t}function L(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o={},i={};function a(e){if(o[e]!==t){var r=n[e];if(r){var s=r.children,c=r.parent;if(!b(r.node)){var l=!0,u=!1;(s||[]).filter((function(e){return!b(e.node)})).forEach((function(e){var t=e.key,n=o[t],r=i[t];(n||r)&&(u=!0),n||(l=!1)})),o[e]=!!t&&l,i[e]=u,c&&a(c.key)}}}}function c(e){if(o[e]!==t){var r=n[e];if(r){var i=r.children;b(r.node)||(o[e]=t,(i||[]).forEach((function(e){c(e.key)})))}}}function l(e){var r=n[e];if(r){var i=r.children,l=r.parent,u=r.node;o[e]=t,b(u)||((i||[]).filter((function(e){return!b(e.node)})).forEach((function(e){c(e.key)})),l&&a(l.key))}else s()(!1,"'".concat(e,"' does not exist in the tree."))}(r.checkedKeys||[]).forEach((function(e){o[e]=!0})),(r.halfCheckedKeys||[]).forEach((function(e){i[e]=!0})),(e||[]).forEach((function(e){l(e)}));var u=[],f=[];return Object.keys(o).forEach((function(e){o[e]&&u.push(e)})),Object.keys(i).forEach((function(e){!o[e]&&i[e]&&f.push(e)})),{checkedKeys:u,halfCheckedKeys:f}}function A(e,t){var n={};return(e||[]).forEach((function(e){!function e(r){if(!n[r]){var o=t[r];if(o){n[r]=!0;var i=o.parent,a=o.node;a.props&&a.props.disabled||i&&e(i.key)}}}(e)})),Object.keys(n)}function z(e){return Object.keys(e).reduce((function(t,n){return"data-"!==n.substr(0,5)&&"aria-"!==n.substr(0,5)||(t[n]=e[n]),t}),{})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var r=l(n(820)),o=l(n(821)),i=l(n(838)),a=l(n(839)),s=l(n(840)),c=l(n(841));function l(e){return e&&e.__esModule?e:{default:e}}t.hover=a.default,t.handleHover=a.default,t.handleActive=s.default,t.loop=c.default;var u=t.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),a=1;ae)break;var u=this.ranges[c+i],f=this.ranges[c+s],d=l+u;if(e<=d){var p=l+r+((u?e==l?-1:e==d?1:t:t)<0?0:f);if(n)return p;var h=c/3+(e-l)*o;return new a(p,t<0?e!=l:e!=d,h)}r+=f-u}return n?e+r:new a(e+r)},s.prototype.touches=function(e,t){for(var n=0,r=i(t),o=this.inverted?2:1,a=this.inverted?1:2,s=0;se)break;var l=this.ranges[s+o];if(e<=c+l&&s==3*r)return!0;n+=this.ranges[s+a]-l}return!1},s.prototype.forEach=function(e){for(var t=this.inverted?2:1,n=this.inverted?1:2,r=0,o=0;r=0;t--){var r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:null)}},c.prototype.invert=function(){var e=new c;return e.appendMappingInverted(this),e},c.prototype.map=function(e,t){if(void 0===t&&(t=1),this.mirror)return this._map(e,t,!0);for(var n=this.from;ni&&u0},u.prototype.addStep=function(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t},Object.defineProperties(u.prototype,f);var p=Object.create(null),h=function(){};h.prototype.apply=function(e){return d()},h.prototype.getMap=function(){return s.empty},h.prototype.invert=function(e){return d()},h.prototype.map=function(e){return d()},h.prototype.merge=function(e){return null},h.prototype.toJSON=function(){return d()},h.fromJSON=function(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");var n=p[t.stepType];if(!n)throw new RangeError("No step type "+t.stepType+" defined");return n.fromJSON(e,t)},h.jsonID=function(e,t){if(e in p)throw new RangeError("Duplicate use of step JSON ID "+e);return p[e]=t,t.prototype.jsonID=e,t};var m=function(e,t){this.doc=e,this.failed=t};m.ok=function(e){return new m(e,null)},m.fail=function(e){return new m(null,e)},m.fromReplace=function(e,t,n,o){try{return m.ok(e.replace(t,n,o))}catch(e){if(e instanceof r.ReplaceError)return m.fail(e.message);throw e}};var g=function(e){function t(t,n,r,o){e.call(this),this.from=t,this.to=n,this.slice=r,this.structure=!!o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){return this.structure&&y(e,this.from,this.to)?m.fail("Structure replace would overwrite content"):m.fromReplace(e,this.from,this.to,this.slice)},t.prototype.getMap=function(){return new s([this.from,this.to-this.from,this.slice.size])},t.prototype.invert=function(e){return new t(this.from,this.from+this.slice.size,e.slice(this.from,this.to))},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted?null:new t(n.pos,Math.max(n.pos,r.pos),this.slice)},t.prototype.merge=function(e){if(!(e instanceof t)||e.structure!=this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;var n=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new t(e.from,this.to,n,this.structure)}var o=this.slice.size+e.slice.size==0?r.Slice.empty:new r.Slice(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new t(this.from,this.to+(e.to-e.from),o,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new t(n.from,n.to,r.Slice.fromJSON(e,n.slice),!!n.structure)},t}(h);h.jsonID("replace",g);var v=function(e){function t(t,n,r,o,i,a,s){e.call(this),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=o,this.slice=i,this.insert=a,this.structure=!!s}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){if(this.structure&&(y(e,this.from,this.gapFrom)||y(e,this.gapTo,this.to)))return m.fail("Structure gap-replace would overwrite content");var t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return m.fail("Gap is not a flat range");var n=this.slice.insertAt(this.insert,t.content);return n?m.fromReplace(e,this.from,this.to,n):m.fail("Content does not fit in gap")},t.prototype.getMap=function(){return new s([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])},t.prototype.invert=function(e){var n=this.gapTo-this.gapFrom;return new t(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1),o=e.map(this.gapFrom,-1),i=e.map(this.gapTo,1);return n.deleted&&r.deleted||or.pos?null:new t(n.pos,r.pos,o,i,this.slice,this.insert,this.structure)},t.prototype.toJSON=function(){var e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to||"number"!=typeof n.gapFrom||"number"!=typeof n.gapTo||"number"!=typeof n.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new t(n.from,n.to,n.gapFrom,n.gapTo,r.Slice.fromJSON(e,n.slice),n.insert,!!n.structure)},t}(h);function y(e,t,n){for(var r=e.resolve(t),o=n-t,i=r.depth;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0)for(var a=r.node(i).maybeChild(r.indexAfter(i));o>0;){if(!a||a.isLeaf)return!0;a=a.firstChild,o--}return!1}function b(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function w(e){for(var t=e.parent.content.cutByIndex(e.startIndex,e.endIndex),n=e.depth;;--n){var r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(ni;s--,c--){var l=o.node(s),u=o.index(s);if(l.type.spec.isolating)return!1;var f=l.content.cutByIndex(u,l.childCount),d=r&&r[c]||l;if(d!=l&&(f=f.replaceChild(0,d.type.create(d.attrs))),!l.canReplace(u+1,l.childCount)||!d.type.validContent(f))return!1}var p=o.indexAfter(i),h=r&&r[0];return o.node(i).canReplaceWith(p,p,h?h.type:o.node(i+1).type)}function S(e,t){var n=e.resolve(t),r=n.index();return C(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function C(e,t){return e&&t&&!e.isLeaf&&e.canAppend(t)}function M(e,t,n){void 0===n&&(n=-1);for(var r=e.resolve(t),o=r.depth;;o--){var i=void 0,a=void 0,s=r.index(o);if(o==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(o+1),s++,a=r.node(o).maybeChild(s)):(i=r.node(o).maybeChild(s-1),a=r.node(o+1)),i&&!i.isTextblock&&C(i,a)&&r.node(o).canReplace(s,s+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}}function E(e,t,n){var r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(var o=r.depth-1;o>=0;o--){var i=r.index(o);if(r.node(o).canReplaceWith(i,i,n))return r.before(o+1);if(i>0)return null}if(r.parentOffset==r.parent.content.size)for(var a=r.depth-1;a>=0;a--){var s=r.indexAfter(a);if(r.node(a).canReplaceWith(s,s,n))return r.after(a+1);if(s=0;s--){var c=s==r.depth?0:r.pos<=(r.start(s+1)+r.end(s+1))/2?-1:1,l=r.index(s)+(c>0?1:0);if(1==a?r.node(s).canReplace(l,l,o):r.node(s).contentMatchAt(l).findWrapping(o.firstChild.type))return 0==c?r.pos:c<0?r.before(s+1):r.after(s+1)}return null}function T(e,t,n){for(var o=[],i=0;it;d--)p||n.index(d)>0?(p=!0,u=r.Fragment.from(n.node(d).copy(u)),f++):c--;for(var h=r.Fragment.empty,m=0,g=i,y=!1;g>t;g--)y||o.after(g+1)=0;o--)n=r.Fragment.from(t[o].type.create(t[o].attrs,n));var i=e.start,a=e.end;return this.step(new v(i,a,i,a,new r.Slice(n,0,0),t.length,!0))},u.prototype.setBlockType=function(e,t,n,o){var i=this;if(void 0===t&&(t=e),!n.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");var a=this.steps.length;return this.doc.nodesBetween(e,t,(function(e,t){if(e.isTextblock&&!e.hasMarkup(n,o)&&function(e,t,n){var r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(i.doc,i.mapping.slice(a).map(t),n)){i.clearIncompatible(i.mapping.slice(a).map(t,1),n);var s=i.mapping.slice(a),c=s.map(t,1),l=s.map(t+e.nodeSize,1);return i.step(new v(c,l,c+1,l-1,new r.Slice(r.Fragment.from(n.create(o,null,e.marks)),0,0),1,!0)),!1}})),this},u.prototype.setNodeMarkup=function(e,t,n,o){var i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at given position");t||(t=i.type);var a=t.create(n,null,o||i.marks);if(i.isLeaf)return this.replaceWith(e,e+i.nodeSize,a);if(!t.validContent(i.content))throw new RangeError("Invalid content for node type "+t.name);return this.step(new v(e,e+i.nodeSize,e+1,e+i.nodeSize-1,new r.Slice(r.Fragment.from(a),0,0),1,!0))},u.prototype.split=function(e,t,n){void 0===t&&(t=1);for(var o=this.doc.resolve(e),i=r.Fragment.empty,a=r.Fragment.empty,s=o.depth,c=o.depth-t,l=t-1;s>c;s--,l--){i=r.Fragment.from(o.node(s).copy(i));var u=n&&n[l];a=r.Fragment.from(u?u.type.create(u.attrs,a):o.node(s).copy(a))}return this.step(new g(e,e,new r.Slice(i.append(a),t,t),!0))},u.prototype.join=function(e,t){void 0===t&&(t=1);var n=new g(e-t,e+t,r.Slice.empty,!0);return this.step(n)};var L=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=e.resolve(this.from),i=o.node(o.sharedDepth(this.to)),a=new r.Slice(T(n.content,(function(e,n){return n.type.allowsMarkType(t.mark.type)?e.mark(t.mark.addToSet(e.marks)):e}),i),n.openStart,n.openEnd);return m.fromReplace(e,this.from,this.to,a)},t.prototype.invert=function(){return new A(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);h.jsonID("addMark",L);var A=function(e){function t(t,n,r){e.call(this),this.from=t,this.to=n,this.mark=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.apply=function(e){var t=this,n=e.slice(this.from,this.to),o=new r.Slice(T(n.content,(function(e){return e.mark(t.mark.removeFromSet(e.marks))})),n.openStart,n.openEnd);return m.fromReplace(e,this.from,this.to,o)},t.prototype.invert=function(){return new L(this.from,this.to,this.mark)},t.prototype.map=function(e){var n=e.mapResult(this.from,1),r=e.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new t(n.pos,r.pos,this.mark)},t.prototype.merge=function(e){if(e instanceof t&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from)return new t(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark)},t.prototype.toJSON=function(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}},t.fromJSON=function(e,n){if("number"!=typeof n.from||"number"!=typeof n.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new t(n.from,n.to,e.markFromJSON(n.mark))},t}(h);function z(e,t,n,o){if(void 0===n&&(n=t),void 0===o&&(o=r.Slice.empty),t==n&&!o.size)return null;var i=e.resolve(t),a=e.resolve(n);return P(i,a,o)?new g(t,n,o):new j(i,a,o).fit()}function P(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}h.jsonID("removeMark",A),u.prototype.addMark=function(e,t,n){var r=this,o=[],i=[],a=null,s=null;return this.doc.nodesBetween(e,t,(function(r,c,l){if(r.isInline){var u=r.marks;if(!n.isInSet(u)&&l.type.allowsMarkType(n.type)){for(var f=Math.max(c,e),d=Math.min(c+r.nodeSize,t),p=n.addToSet(u),h=0;h=0;p--)this.step(i[p]);return this},u.prototype.replace=function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=r.Slice.empty);var o=z(this.doc,e,t,n);return o&&this.step(o),this},u.prototype.replaceWith=function(e,t,n){return this.replace(e,t,new r.Slice(r.Fragment.from(n),0,0))},u.prototype.delete=function(e,t){return this.replace(e,t,r.Slice.empty)},u.prototype.insert=function(e,t){return this.replaceWith(e,e,t)};var j=function(e,t,n){this.$to=t,this.$from=e,this.unplaced=n,this.frontier=[];for(var o=0;o<=e.depth;o++){var i=e.node(o);this.frontier.push({type:i.type,match:i.contentMatchAt(e.indexAfter(o))})}this.placed=r.Fragment.empty;for(var a=e.depth;a>0;a--)this.placed=r.Fragment.from(e.node(a).copy(this.placed))},D={depth:{configurable:!0}};function N(e,t,n){return 0==t?e.cutByIndex(n):e.replaceChild(0,e.firstChild.copy(N(e.firstChild.content,t-1,n)))}function F(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(F(e.lastChild.content,t-1,n)))}function R(e,t){for(var n=0;n1&&(o=o.replaceChild(0,H(o.firstChild,t-1,1==o.childCount?n-1:0))),t>0&&(o=e.type.contentMatch.fillBefore(o).append(o),n<=0&&(o=o.append(e.type.contentMatch.matchFragment(o).fillBefore(r.Fragment.empty,!0)))),e.copy(o)}function I(e,t,n,r,o){var i=e.node(t),a=o?e.indexAfter(t):e.index(t);if(a==i.childCount&&!n.compatibleContent(i.type))return null;var s=r.fillBefore(i.content,!0,a);return s&&!function(e,t,n){for(var r=n;ro){var s=i.contentMatchAt(0),c=s.fillBefore(e).append(e);e=c.append(s.matchFragment(c).fillBefore(r.Fragment.empty,!0))}return e}function B(e,t){for(var n=[],r=Math.min(e.depth,t.depth);r>=0;r--){var o=e.start(r);if(ot.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;o==t.start(r)&&n.push(r)}return n}D.depth.get=function(){return this.frontier.length-1},j.prototype.fit=function(){for(;this.unplaced.size;){var e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}var t=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,o=this.$from,i=t<0?this.$to:o.doc.resolve(t);if(this.close(i)){for(var a=this.placed,s=o.depth,c=i.depth;s&&c&&1==a.childCount;)a=a.firstChild.content,s--,c--;var l=new r.Slice(a,s,c);if(t>-1)return new v(o.pos,t,this.$to.pos,this.$to.end(),l,n);if(l.size||o.pos!=this.$to.pos)return new g(o.pos,i.pos,l)}return null},j.prototype.findFittable=function(){for(var e=1;e<=2;e++)for(var t=this.unplaced.openStart;t>=0;t--)for(var n=void 0,o=(t?(n=R(this.unplaced.content,t-1).firstChild).content:this.unplaced.content).firstChild,i=this.depth;i>=0;i--){var a=this.frontier[i],s=a.type,c=a.match,l=void 0,u=void 0;if(1==e&&(o?c.matchType(o.type)||(u=c.fillBefore(r.Fragment.from(o),!1)):s.compatibleContent(n.type)))return{sliceDepth:t,frontierDepth:i,parent:n,inject:u};if(2==e&&o&&(l=c.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:i,parent:n,wrap:l};if(n&&c.matchType(n.type))break}},j.prototype.openMore=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=R(t,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new r.Slice(t,n+1,Math.max(o,i.size+n>=t.size-o?n+1:0)),!0)},j.prototype.dropNode=function(){var e=this.unplaced,t=e.content,n=e.openStart,o=e.openEnd,i=R(t,n);if(i.childCount<=1&&n>0){var a=t.size-n<=n+i.size;this.unplaced=new r.Slice(N(t,n-1,1),n-1,a?n-1:o)}else this.unplaced=new r.Slice(N(t,n,1),n,o)},j.prototype.placeNodes=function(e){for(var t=e.sliceDepth,n=e.frontierDepth,o=e.parent,i=e.inject,a=e.wrap;this.depth>n;)this.closeFrontierNode();if(a)for(var s=0;s1||0==u||y.content.size)&&(h=b,d.push(H(y.mark(m.allowedMarks(y.marks)),1==f?u:0,f==l.childCount?v:-1)))}var w=f==l.childCount;w||(v=-1),w&&v<0&&o&&o.type==this.frontier[this.depth].type?this.closeFrontierNode():this.frontier[n].match=h;for(var _=0,x=l;_1&&r==this.$to.end(--n);)++r;return r},j.prototype.findCloseLevel=function(e){e:for(var t=Math.min(this.depth,e.depth);t>=0;t--){var n=this.frontier[t],r=n.match,o=I(e,t,n.type,r,!1);if(o){for(var i=t-1;i>=0;i--){var a=this.frontier[i],s=a.match,c=I(e,i,a.type,s,!0);if(!c||c.childCount)continue e}return{depth:t,fit:o}}}},j.prototype.close=function(e){var t=this.findCloseLevel(e);if(!t)return!1;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=F(this.placed,t.depth,t.fit));for(var n=t.depth+1;n<=e.depth;n++){var r=e.node(n),o=r.type.contentMatch.fillBefore(r.content,!0,e.index(n));this.openFrontierNode(r.type,r.attrs,o)}return!0},j.prototype.openFrontierNode=function(e,t,n){var o=this.frontier[this.depth];o.match=o.match.matchType(e),this.placed=F(this.placed,this.depth,r.Fragment.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})},j.prototype.closeFrontierNode=function(){var e=this.frontier.pop().match.fillBefore(r.Fragment.empty,!0);e.childCount&&(this.placed=F(this.placed,this.frontier.length,e))},Object.defineProperties(j.prototype,D),u.prototype.replaceRange=function(e,t,n){if(!n.size)return this.deleteRange(e,t);var o=this.doc.resolve(e),i=this.doc.resolve(t);if(P(o,i,n))return this.step(new g(e,t,n));var a=B(o,this.doc.resolve(t));0==a[a.length-1]&&a.pop();var s=-(o.depth+1);a.unshift(s);for(var c=o.depth,l=o.pos-1;c>0;c--,l--){var u=o.node(c).type.spec;if(u.defining||u.isolating)break;a.indexOf(c)>-1?s=c:o.before(c)==l&&a.splice(1,0,-c)}for(var f=a.indexOf(s),d=[],p=n.openStart,h=n.content,m=0;;m++){var v=h.firstChild;if(d.push(v),m==n.openStart)break;h=v.content}p>0&&d[p-1].type.spec.defining&&o.node(f).type!=d[p-1].type?p-=1:p>=2&&d[p-1].isTextblock&&d[p-2].type.spec.defining&&o.node(f).type!=d[p-2].type&&(p-=2);for(var y=n.openStart;y>=0;y--){var b=(y+p+1)%(n.openStart+1),w=d[b];if(w)for(var _=0;_=0&&(this.replace(e,t,n),!(this.steps.length>M));E--){var O=a[E];E<0||(e=o.before(O),t=i.after(O))}return this},u.prototype.replaceRangeWith=function(e,t,n){if(!n.isInline&&e==t&&this.doc.resolve(e).parent.content.size){var o=E(this.doc,e,n.type);null!=o&&(e=t=o)}return this.replaceRange(e,t,new r.Slice(r.Fragment.from(n),0,0))},u.prototype.deleteRange=function(e,t){for(var n=this.doc.resolve(e),r=this.doc.resolve(t),o=B(n,r),i=0;i0&&(s||n.node(a-1).canReplace(n.index(a-1),r.indexAfter(a-1))))return this.delete(n.before(a),r.after(a))}for(var c=1;c<=n.depth&&c<=r.depth;c++)if(e-n.start(c)==n.depth-c&&t>n.end(c)&&r.end(c)-t!=r.depth-c)return this.delete(n.before(c),t);return this.delete(e,t)}},function(e,t,n){"use strict";n.d(t,"e",(function(){return c})),n.d(t,"d",(function(){return l})),n.d(t,"f",(function(){return u})),n.d(t,"b",(function(){return f})),n.d(t,"h",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"g",(function(){return h})),n.d(t,"a",(function(){return m}));var r=n(4),o=n.n(r),i=n(3),a=n.n(i),s={disabledHours:function(){return[]},disabledMinutes:function(){return[]},disabledSeconds:function(){return[]}};function c(e){var t=a()();return t.locale(e.locale()).utcOffset(e.utcOffset()),t}function l(e){return e.format("LL")}function u(e){return l(c(e))}function f(e){var t=e.locale();return e.localeData()["zh-cn"===t?"months":"monthsShort"](e)}function d(e,t){a.a.isMoment(e)&&a.a.isMoment(t)&&(t.hour(e.hour()),t.minute(e.minute()),t.second(e.second()),t.millisecond(e.millisecond()))}function p(e,t){var n=t?t(e):{};return n=o()({},s,n)}function h(e,t,n){return(!t||!t(e))&&!(n&&!function(e,t){return function(e,t){var n=!1;if(e){var r=e.hour(),o=e.minute(),i=e.second();if(-1===t.disabledHours().indexOf(r))if(-1===t.disabledMinutes(r).indexOf(o))n=-1!==t.disabledSeconds(r,o).indexOf(i);else n=!0;else n=!0}return!n}(e,p(e,t))}(e,n))}function m(e,t){return e?(Array.isArray(t)&&(t=t[0]),e.format(t)):""}},function(e,t){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(842);Object.defineProperty(t,"Alpha",{enumerable:!0,get:function(){return f(r).default}});var o=n(212);Object.defineProperty(t,"Checkboard",{enumerable:!0,get:function(){return f(o).default}});var i=n(845);Object.defineProperty(t,"EditableInput",{enumerable:!0,get:function(){return f(i).default}});var a=n(846);Object.defineProperty(t,"Hue",{enumerable:!0,get:function(){return f(a).default}});var s=n(848);Object.defineProperty(t,"Raised",{enumerable:!0,get:function(){return f(s).default}});var c=n(849);Object.defineProperty(t,"Saturation",{enumerable:!0,get:function(){return f(c).default}});var l=n(447);Object.defineProperty(t,"ColorWrap",{enumerable:!0,get:function(){return f(l).default}});var u=n(854);function f(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"Swatch",{enumerable:!0,get:function(){return f(u).default}})},function(e,t,n){(function(t){for(var r=n(523),o="undefined"==typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",s=o["request"+a],c=o["cancel"+a]||o["cancelRequest"+a],l=0;!s&&l=n.subMenuTitle.offsetWidth||(e.style.minWidth="".concat(n.subMenuTitle.offsetWidth,"px"))}},n.saveSubMenuTitle=function(e){n.subMenuTitle=e};var o=e.store,a=e.eventKey,s=o.getState().defaultActiveFirst;n.isRootMenu=!1;var c=!1;return s&&(c=s[a]),te(o,a,c),n}var n,o,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&G(e,t)}(t,e),n=t,(o=[{key:"componentDidMount",value:function(){this.componentDidUpdate()}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props,n=t.mode,r=t.parentMenu,o=t.manualRef;o&&o(this),"horizontal"===n&&r.isRootMenu&&this.props.isOpen&&(this.minWidthTimeout=setTimeout((function(){return e.adjustWidth()}),0))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.onDestroy,n=e.eventKey;t&&t(n),this.minWidthTimeout&&clearTimeout(this.minWidthTimeout),this.mouseenterTimeout&&clearTimeout(this.mouseenterTimeout)}},{key:"renderChildren",value:function(e){var t=this,n=this.props,o={mode:"horizontal"===n.mode?"vertical":n.mode,visible:this.props.isOpen,level:n.level+1,inlineIndent:n.inlineIndent,focusable:!1,onClick:this.onSubMenuClick,onSelect:this.onSelect,onDeselect:this.onDeselect,onDestroy:this.onDestroy,selectedKeys:n.selectedKeys,eventKey:"".concat(n.eventKey,"-menu-"),openKeys:n.openKeys,motion:n.motion,onOpenChange:this.onOpenChange,subMenuOpenDelay:n.subMenuOpenDelay,parentMenu:this,subMenuCloseDelay:n.subMenuCloseDelay,forceSubMenuRender:n.forceSubMenuRender,triggerSubMenuAction:n.triggerSubMenuAction,builtinPlacements:n.builtinPlacements,defaultActiveFirst:n.store.getState().defaultActiveFirst[j(n.eventKey)],multiple:n.multiple,prefixCls:n.rootPrefixCls,id:this.internalMenuId,manualRef:this.saveMenuInstance,itemIcon:n.itemIcon,expandIcon:n.expandIcon},i=this.haveRendered;if(this.haveRendered=!0,this.haveOpened=this.haveOpened||o.visible||o.forceSubMenuRender,!this.haveOpened)return r.createElement("div",null);var a=X({},n.motion,{leavedClassName:"".concat(n.rootPrefixCls,"-hidden"),removeOnLeave:!1,motionAppear:i||!o.visible||"inline"!==o.mode});return r.createElement(B.a,Object.assign({visible:o.visible},a),(function(n){var i=n.className,a=n.style,s=u()("".concat(o.prefixCls,"-sub"),i);return r.createElement(je,Object.assign({},o,{id:t.internalMenuId,className:s,style:a}),e)}))}},{key:"render",value:function(){var e,t=X({},this.props),n=t.isOpen,o=this.getPrefixCls(),i="inline"===t.mode,a=u()(o,"".concat(o,"-").concat(t.mode),(Q(e={},t.className,!!t.className),Q(e,this.getOpenClassName(),n),Q(e,this.getActiveClassName(),t.active||n&&!i),Q(e,this.getDisabledClassName(),t.disabled),Q(e,this.getSelectedClassName(),this.isChildrenSelected()),e));this.internalMenuId||(t.eventKey?this.internalMenuId="".concat(t.eventKey,"$Menu"):(Z+=1,this.internalMenuId="$__$".concat(Z,"$Menu")));var s={},c={},l={};t.disabled||(s={onMouseLeave:this.onMouseLeave,onMouseEnter:this.onMouseEnter},c={onClick:this.onTitleClick},l={onMouseEnter:this.onTitleMouseEnter,onMouseLeave:this.onTitleMouseLeave});var f={};i&&(f.paddingLeft=t.inlineIndent*t.level);var d={};this.props.isOpen&&(d={"aria-owns":this.internalMenuId});var p=null;"horizontal"!==t.mode&&(p=this.props.expandIcon,"function"==typeof this.props.expandIcon&&(p=r.createElement(this.props.expandIcon,X({},this.props))));var h=r.createElement("div",Object.assign({ref:this.saveSubMenuTitle,style:f,className:"".concat(o,"-title")},l,c,{"aria-expanded":n},d,{"aria-haspopup":"true",title:"string"==typeof t.title?t.title:void 0}),t.title,p||r.createElement("i",{className:"".concat(o,"-arrow")})),m=this.renderChildren(t.children),g=t.parentMenu.isRootMenu?t.parentMenu.props.getPopupContainer:function(e){return e.parentNode},v=ee[t.mode],y=t.popupOffset?{offset:t.popupOffset}:{},b="inline"===t.mode?"":t.popupClassName,w=t.disabled,_=t.triggerSubMenuAction,x=t.subMenuOpenDelay,k=t.forceSubMenuRender,S=t.subMenuCloseDelay,C=t.builtinPlacements;return N.forEach((function(e){return delete t[e]})),delete t.onClick,r.createElement("li",Object.assign({},t,s,{className:a,role:"menuitem"}),i&&h,i&&m,!i&&r.createElement(V.a,{prefixCls:o,popupClassName:"".concat(o,"-popup ").concat(b),getPopupContainer:g,builtinPlacements:Object.assign({},$,C),popupPlacement:v,popupVisible:n,popupAlign:y,popup:m,action:w?[]:[_],mouseEnterDelay:x,mouseLeaveDelay:S,onPopupVisibleChange:this.onPopupVisibleChange,forceRender:k},h))}}])&&U(n.prototype,o),a&&U(n,a),t}(r.Component);ne.defaultProps={onMouseEnter:z,onMouseLeave:z,onTitleMouseEnter:z,onTitleMouseLeave:z,onTitleClick:z,manualRef:z,mode:"vertical",title:""};var re=Object(o.connect)((function(e,t){var n=e.openKeys,r=e.activeKey,o=e.selectedKeys,i=t.eventKey,a=t.subMenuKey;return{isOpen:n.indexOf(i)>-1,active:r[a]===i,selectedKeys:o}}))(ne);re.isSubMenu=!0;var oe=re;function ie(e){return(ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ae(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function fe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function de(e,t){for(var n=0;n=0}));i.forEach((function(e){R(e,"display","inline-block")})),e.menuItemSizes=o.map((function(e){return F(e)})),i.forEach((function(e){R(e,"display","none")})),e.overflowedIndicatorWidth=F(t.children[t.children.length-1]),e.originalTotalWidth=e.menuItemSizes.reduce((function(e,t){return e+t}),0),e.handleResize(),R(r,"display","none")}}}},e.handleResize=function(){if("horizontal"===e.props.mode){var t=H.findDOMNode(me(e));if(t){var n=F(t);e.overflowedItems=[];var r,o=0;e.originalTotalWidth>n+.5&&(r=-1,e.menuItemSizes.forEach((function(t){(o+=t)+e.overflowedIndicatorWidth<=n&&(r+=1)}))),e.setState({lastVisibleIndex:r})}}},e}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ge(e,t)}(t,e),n=t,(o=[{key:"componentDidMount",value:function(){var e=this;if(this.setChildrenWidthAndResize(),1===this.props.level&&"horizontal"===this.props.mode){var t=H.findDOMNode(this);if(!t)return;this.resizeObserver=new I.default((function(t){t.forEach(e.setChildrenWidthAndResize)})),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),"undefined"!=typeof MutationObserver&&(this.mutationObserver=new MutationObserver((function(){e.resizeObserver.disconnect(),[].slice.call(t.children).concat(t).forEach((function(t){e.resizeObserver.observe(t)})),e.setChildrenWidthAndResize()})),this.mutationObserver.observe(t,{attributes:!1,childList:!0,subTree:!1}))}}},{key:"componentWillUnmount",value:function(){this.resizeObserver&&this.resizeObserver.disconnect(),this.mutationObserver&&this.mutationObserver.disconnect()}},{key:"renderChildren",value:function(e){var t=this,n=this.state.lastVisibleIndex;return(e||[]).reduce((function(o,i,a){var s=i;if("horizontal"===t.props.mode){var c=t.getOverflowedSubMenuItem(i.props.eventKey,[]);void 0!==n&&-1!==t.props.className.indexOf("".concat(t.props.prefixCls,"-root"))&&(a>n&&(s=r.cloneElement(i,{style:{display:"none"},eventKey:"".concat(i.props.eventKey,"-hidden"),className:"".concat("menuitem-overflowed")})),a===n+1&&(t.overflowedItems=e.slice(n+1).map((function(e){return r.cloneElement(e,{key:e.props.eventKey,mode:"vertical-left"})})),c=t.getOverflowedSubMenuItem(i.props.eventKey,t.overflowedItems)));var l=[].concat(ae(o),[c,s]);return a===e.length-1&&l.push(t.getOverflowedSubMenuItem(i.props.eventKey,[],!0)),l}return[].concat(ae(o),[s])}),[])}},{key:"render",value:function(){var e=this.props,t=(e.visible,e.prefixCls,e.overflowedIndicator,e.mode,e.level,e.tag),n=e.children,o=(e.theme,ue(e,["visible","prefixCls","overflowedIndicator","mode","level","tag","children","theme"])),i=t;return r.createElement(i,Object.assign({},o),this.renderChildren(n))}}])&&de(n.prototype,o),i&&de(n,i),t}(r.Component);ye.defaultProps={tag:"div",className:""};var be=ye;function we(e){return(we="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _e(){return(_e=Object.assign||function(e){for(var t=1;t=a)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(e){return"[Circular]"}break;default:return e}})),c=t[r];r=t||n<0||g&&e-h>=u}function _(){var e=o();if(w(e))return x(e);d=setTimeout(_,function(e){var n=t-(e-p);return g?s(n,u-(e-h)):n}(e))}function x(e){return d=void 0,v&&c?y(e):(c=l=void 0,f)}function k(){var e=o(),n=w(e);if(c=arguments,l=this,p=e,n){if(void 0===d)return b(p);if(g)return clearTimeout(d),d=setTimeout(_,t),y(p)}return void 0===d&&(d=setTimeout(_,t)),f}return t=i(t)||0,r(n)&&(m=!!n.leading,u=(g="maxWait"in n)?a(i(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),k.cancel=function(){void 0!==d&&clearTimeout(d),h=0,c=p=l=d=void 0},k.flush=function(){return void 0===d?f:x(o())},k}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(0),o=n(1),i=n(59).a;function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(){return(s=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:1,n=i++,r=t;function s(){(r-=1)<=0?(e(),delete a[n]):a[n]=o()(s)}return a[n]=o()(s),n}s.cancel=function(e){void 0!==e&&(o.a.cancel(a[e]),delete a[e])},s.ids=a},function(e,t,n){"use strict";var r=n(4),o=n.n(r),i=n(8),a=n.n(i),s=n(7),c=n.n(s),l=n(16),u=n.n(l),f=n(6),d=n.n(f),p=n(9),h=n.n(p),m=n(0),g=n.n(m),v=n(1),y=n.n(v),b=n(149);function w(e){var t=[];return g.a.Children.forEach(e,(function(e){t.push(e)})),t}function _(e,t){var n=null;return e&&e.forEach((function(e){n||e&&e.key===t&&(n=e)})),n}function x(e,t,n){var r=null;return e&&e.forEach((function(e){if(e&&e.key===t&&e.props[n]){if(r)throw new Error("two child with same key for children");r=e}})),r}var k=n(12),S=n.n(k),C=n(218),M={isAppearSupported:function(e){return e.transitionName&&e.transitionAppear||e.animation.appear},isEnterSupported:function(e){return e.transitionName&&e.transitionEnter||e.animation.enter},isLeaveSupported:function(e){return e.transitionName&&e.transitionLeave||e.animation.leave},allowAppearCallback:function(e){return e.transitionAppear||e.animation.appear},allowEnterCallback:function(e){return e.transitionEnter||e.animation.enter},allowLeaveCallback:function(e){return e.transitionLeave||e.animation.leave}},E={enter:"transitionEnter",appear:"transitionAppear",leave:"transitionLeave"},O=function(e){function t(){return c()(this,t),d()(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return h()(t,e),u()(t,[{key:"componentWillUnmount",value:function(){this.stop()}},{key:"componentWillEnter",value:function(e){M.isEnterSupported(this.props)?this.transition("enter",e):e()}},{key:"componentWillAppear",value:function(e){M.isAppearSupported(this.props)?this.transition("appear",e):e()}},{key:"componentWillLeave",value:function(e){M.isLeaveSupported(this.props)?this.transition("leave",e):e()}},{key:"transition",value:function(e,t){var n=this,r=S.a.findDOMNode(this),o=this.props,i=o.transitionName,a="object"==typeof i;this.stop();var s=function(){n.stopper=null,t()};if((C.b||!o.animation[e])&&i&&o[E[e]]){var c=a?i[e]:i+"-"+e,l=c+"-active";a&&i[e+"Active"]&&(l=i[e+"Active"]),this.stopper=Object(C.a)(r,{name:c,active:l},s)}else this.stopper=o.animation[e](r,s)}},{key:"stop",value:function(){var e=this.stopper;e&&(this.stopper=null,e.stop())}},{key:"render",value:function(){return this.props.children}}]),t}(g.a.Component);O.propTypes={children:y.a.any,animation:y.a.any,transitionName:y.a.any};var T=O,L="rc_animate_"+Date.now();function A(e){var t=e.children;return g.a.isValidElement(t)&&!t.key?g.a.cloneElement(t,{key:L}):t}function z(){}var P=function(e){function t(e){c()(this,t);var n=d()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return j.call(n),n.currentlyAnimatingKeys={},n.keysToEnter=[],n.keysToLeave=[],n.state={children:w(A(e))},n.childrenRefs={},n}return h()(t,e),u()(t,[{key:"componentDidMount",value:function(){var e=this,t=this.props.showProp,n=this.state.children;t&&(n=n.filter((function(e){return!!e.props[t]}))),n.forEach((function(t){t&&e.performAppear(t.key)}))}},{key:"componentWillReceiveProps",value:function(e){var t=this;this.nextProps=e;var n=w(A(e)),r=this.props;r.exclusive&&Object.keys(this.currentlyAnimatingKeys).forEach((function(e){t.stop(e)}));var o,i,s,c,l=r.showProp,u=this.currentlyAnimatingKeys,f=r.exclusive?w(A(r)):this.state.children,d=[];l?(f.forEach((function(e){var t=e&&_(n,e.key),r=void 0;(r=t&&t.props[l]||!e.props[l]?t:g.a.cloneElement(t||e,a()({},l,!0)))&&d.push(r)})),n.forEach((function(e){e&&_(f,e.key)||d.push(e)}))):(o=n,i=[],s={},c=[],f.forEach((function(e){e&&_(o,e.key)?c.length&&(s[e.key]=c,c=[]):c.push(e)})),o.forEach((function(e){e&&Object.prototype.hasOwnProperty.call(s,e.key)&&(i=i.concat(s[e.key])),i.push(e)})),d=i=i.concat(c)),this.setState({children:d}),n.forEach((function(e){var n=e&&e.key;if(!e||!u[n]){var r=e&&_(f,n);if(l){var o=e.props[l];if(r)!x(f,n,l)&&o&&t.keysToEnter.push(n);else o&&t.keysToEnter.push(n)}else r||t.keysToEnter.push(n)}})),f.forEach((function(e){var r=e&&e.key;if(!e||!u[r]){var o=e&&_(n,r);if(l){var i=e.props[l];if(o)!x(n,r,l)&&i&&t.keysToLeave.push(r);else i&&t.keysToLeave.push(r)}else o||t.keysToLeave.push(r)}}))}},{key:"componentDidUpdate",value:function(){var e=this.keysToEnter;this.keysToEnter=[],e.forEach(this.performEnter);var t=this.keysToLeave;this.keysToLeave=[],t.forEach(this.performLeave)}},{key:"isValidChildByKey",value:function(e,t){var n=this.props.showProp;return n?x(e,t,n):_(e,t)}},{key:"stop",value:function(e){delete this.currentlyAnimatingKeys[e];var t=this.childrenRefs[e];t&&t.stop()}},{key:"render",value:function(){var e=this,t=this.props;this.nextProps=t;var n=this.state.children,r=null;n&&(r=n.map((function(n){if(null==n)return n;if(!n.key)throw new Error("must set key for children");return g.a.createElement(T,{key:n.key,ref:function(t){e.childrenRefs[n.key]=t},animation:t.animation,transitionName:t.transitionName,transitionEnter:t.transitionEnter,transitionAppear:t.transitionAppear,transitionLeave:t.transitionLeave},n)})));var i=t.component;if(i){var a=t;return"string"==typeof i&&(a=o()({className:t.className,style:t.style},t.componentProps)),g.a.createElement(i,a,r)}return r[0]||null}}]),t}(g.a.Component);P.isAnimate=!0,P.propTypes={className:y.a.string,style:y.a.object,component:y.a.any,componentProps:y.a.object,animation:y.a.object,transitionName:y.a.oneOfType([y.a.string,y.a.object]),transitionEnter:y.a.bool,transitionAppear:y.a.bool,exclusive:y.a.bool,transitionLeave:y.a.bool,onEnd:y.a.func,onEnter:y.a.func,onLeave:y.a.func,onAppear:y.a.func,showProp:y.a.string,children:y.a.node},P.defaultProps={animation:{},component:"span",componentProps:{},transitionEnter:!0,transitionLeave:!0,transitionAppear:!1,onEnd:z,onEnter:z,onLeave:z,onAppear:z};var j=function(){var e=this;this.performEnter=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillEnter(e.handleDoneAdding.bind(e,t,"enter")))},this.performAppear=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillAppear(e.handleDoneAdding.bind(e,t,"appear")))},this.handleDoneAdding=function(t,n){var r=e.props;if(delete e.currentlyAnimatingKeys[t],!r.exclusive||r===e.nextProps){var o=w(A(r));e.isValidChildByKey(o,t)?"appear"===n?M.allowAppearCallback(r)&&(r.onAppear(t),r.onEnd(t,!0)):M.allowEnterCallback(r)&&(r.onEnter(t),r.onEnd(t,!0)):e.performLeave(t)}},this.performLeave=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillLeave(e.handleDoneLeaving.bind(e,t)))},this.handleDoneLeaving=function(t){var n=e.props;if(delete e.currentlyAnimatingKeys[t],!n.exclusive||n===e.nextProps){var r,o,i,a,s=w(A(n));if(e.isValidChildByKey(s,t))e.performEnter(t);else{var c=function(){M.allowLeaveCallback(n)&&(n.onLeave(t),n.onEnd(t,!1))};r=e.state.children,o=s,i=n.showProp,(a=r.length===o.length)&&r.forEach((function(e,t){var n=o[t];e&&n&&(e&&!n||!e&&n||e.key!==n.key||i&&e.props[i]!==n.props[i])&&(a=!1)})),a?c():e.setState({children:s},c)}}}};t.a=Object(b.a)(P)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.create=t.connect=t.Provider=void 0;var r=a(n(605)),o=a(n(606)),i=a(n(608));function a(e){return e&&e.__esModule?e:{default:e}}t.Provider=r.default,t.connect=o.default,t.create=i.default},function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_FACTORY__,__WEBPACK_AMD_DEFINE_RESULT__,definition;definition=function(){var context=this,XHR2;if("window"in context)var doc=document,byTag="getElementsByTagName",head=doc[byTag]("head")[0];else try{XHR2=__webpack_require__(694)}catch(e){throw new Error("Peer dependency `xhr2` required! Please npm install xhr2")}var httpsRe=/^http/,protocolRe=/(^\w+):\/\//,twoHundo=/^(20\d|1223)$/,readyState="readyState",contentType="Content-Type",requestedWith="X-Requested-With",uniqid=0,callbackPrefix="reqwest_"+ +new Date,lastValue,xmlHttpRequest="XMLHttpRequest",xDomainRequest="XDomainRequest",noop=function(){},isArray="function"==typeof Array.isArray?Array.isArray:function(e){return e instanceof Array},defaultHeaders={contentType:"application/x-www-form-urlencoded",requestedWith:xmlHttpRequest,accept:{"*":"text/javascript, text/html, application/xml, text/xml, */*",xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript",js:"application/javascript, text/javascript"}},xhr=function(e){if(!0===e.crossOrigin){var t=context[xmlHttpRequest]?new XMLHttpRequest:null;if(t&&"withCredentials"in t)return t;if(context[xDomainRequest])return new XDomainRequest;throw new Error("Browser does not support cross-origin requests")}return context[xmlHttpRequest]?new XMLHttpRequest:XHR2?new XHR2:new ActiveXObject("Microsoft.XMLHTTP")},globalSetupOptions={dataFilter:function(e){return e}};function succeed(e){var t=protocolRe.exec(e.url);return t=t&&t[1]||context.location.protocol,httpsRe.test(t)?twoHundo.test(e.request.status):!!e.request.response}function handleReadyState(e,t,n){return function(){return e._aborted?n(e.request):e._timedOut?n(e.request,"Request is aborted: timeout"):void(e.request&&4==e.request[readyState]&&(e.request.onreadystatechange=noop,succeed(e)?t(e.request):n(e.request)))}}function setHeaders(e,t){var n,r=t.headers||{};r.Accept=r.Accept||defaultHeaders.accept[t.type]||defaultHeaders.accept["*"];var o="undefined"!=typeof FormData&&t.data instanceof FormData;for(n in t.crossOrigin||r[requestedWith]||(r[requestedWith]=defaultHeaders.requestedWith),r[contentType]||o||(r[contentType]=t.contentType||defaultHeaders.contentType),r)r.hasOwnProperty(n)&&"setRequestHeader"in e&&e.setRequestHeader(n,r[n])}function setCredentials(e,t){void 0!==t.withCredentials&&void 0!==e.withCredentials&&(e.withCredentials=!!t.withCredentials)}function generalCallback(e){lastValue=e}function urlappend(e,t){return e+(/\?/.test(e)?"&":"?")+t}function handleJsonp(e,t,n,r){var o=uniqid++,i=e.jsonpCallback||"callback",a=e.jsonpCallbackName||reqwest.getcallbackPrefix(o),s=new RegExp("((^|\\?|&)"+i+")=([^&]+)"),c=r.match(s),l=doc.createElement("script"),u=0,f=-1!==navigator.userAgent.indexOf("MSIE 10.0");return c?"?"===c[3]?r=r.replace(s,"$1="+a):a=c[3]:r=urlappend(r,i+"="+a),context[a]=generalCallback,l.type="text/javascript",l.src=r,l.async=!0,void 0===l.onreadystatechange||f||(l.htmlFor=l.id="_reqwest_"+o),l.onload=l.onreadystatechange=function(){if(l[readyState]&&"complete"!==l[readyState]&&"loaded"!==l[readyState]||u)return!1;l.onload=l.onreadystatechange=null,l.onclick&&l.onclick(),t(lastValue),lastValue=void 0,head.removeChild(l),u=1},head.appendChild(l),{abort:function(){l.onload=l.onreadystatechange=null,n({},"Request is aborted: timeout",{}),lastValue=void 0,head.removeChild(l),u=1}}}function getRequest(e,t){var n,r=this.o,o=(r.method||"GET").toUpperCase(),i="string"==typeof r?r:r.url,a=!1!==r.processData&&r.data&&"string"!=typeof r.data?reqwest.toQueryString(r.data):r.data||null,s=!1;return"jsonp"!=r.type&&"GET"!=o||!a||(i=urlappend(i,a),a=null),"jsonp"==r.type?handleJsonp(r,e,t,i):((n=r.xhr&&r.xhr(r)||xhr(r)).open(o,i,!1!==r.async),setHeaders(n,r),setCredentials(n,r),context[xDomainRequest]&&n instanceof context[xDomainRequest]?(n.onload=e,n.onerror=t,n.onprogress=function(){},s=!0):n.onreadystatechange=handleReadyState(this,e,t),r.before&&r.before(n),s?setTimeout((function(){n.send(a)}),200):n.send(a),n)}function Reqwest(e,t){this.o=e,this.fn=t,init.apply(this,arguments)}function setType(e){if(null!==e)return e.match("json")?"json":e.match("javascript")?"js":e.match("text")?"html":e.match("xml")?"xml":void 0}function init(o,fn){this.url="string"==typeof o?o:o.url,this.timeout=null,this._fulfilled=!1,this._successHandler=function(){},this._fulfillmentHandlers=[],this._errorHandlers=[],this._completeHandlers=[],this._erred=!1,this._responseArgs={};var self=this;function complete(e){for(o.timeout&&clearTimeout(self.timeout),self.timeout=null;self._completeHandlers.length>0;)self._completeHandlers.shift()(e)}function success(resp){var type=o.type||resp&&setType(resp.getResponseHeader("Content-Type"));resp="jsonp"!==type?self.request:resp;var filteredResponse=globalSetupOptions.dataFilter(resp.responseText,type),r=filteredResponse;try{resp.responseText=r}catch(e){}if(r)switch(type){case"json":try{resp=context.JSON?context.JSON.parse(r):eval("("+r+")")}catch(e){return error(resp,"Could not parse JSON in response",e)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML&&resp.responseXML.parseError&&resp.responseXML.parseError.errorCode&&resp.responseXML.parseError.reason?null:resp.responseXML}for(self._responseArgs.resp=resp,self._fulfilled=!0,fn(resp),self._successHandler(resp);self._fulfillmentHandlers.length>0;)resp=self._fulfillmentHandlers.shift()(resp);complete(resp)}function timedOut(){self._timedOut=!0,self.request.abort()}function error(e,t,n){for(e=self.request,self._responseArgs.resp=e,self._responseArgs.msg=t,self._responseArgs.t=n,self._erred=!0;self._errorHandlers.length>0;)self._errorHandlers.shift()(e,t,n);complete(e)}fn=fn||function(){},o.timeout&&(this.timeout=setTimeout((function(){timedOut()}),o.timeout)),o.success&&(this._successHandler=function(){o.success.apply(o,arguments)}),o.error&&this._errorHandlers.push((function(){o.error.apply(o,arguments)})),o.complete&&this._completeHandlers.push((function(){o.complete.apply(o,arguments)})),this.request=getRequest.call(this,success,error)}function reqwest(e,t){return new Reqwest(e,t)}function normalize(e){return e?e.replace(/\r?\n/g,"\r\n"):""}function serial(e,t){var n,r,o,i,a=e.name,s=e.tagName.toLowerCase(),c=function(e){e&&!e.disabled&&t(a,normalize(e.attributes.value&&e.attributes.value.specified?e.value:e.text))};if(!e.disabled&&a)switch(s){case"input":/reset|button|image|file/i.test(e.type)||(n=/checkbox/i.test(e.type),r=/radio/i.test(e.type),o=e.value,(!n&&!r||e.checked)&&t(a,normalize(n&&""===o?"on":o)));break;case"textarea":t(a,normalize(e.value));break;case"select":if("select-one"===e.type.toLowerCase())c(e.selectedIndex>=0?e.options[e.selectedIndex]:null);else for(i=0;e.length&&i1?(!n&&t&&(r.className+=" "+t),d.a.createElement("div",r)):d.a.Children.only(r.children)},t}(f.Component);L.propTypes={children:h.a.any,className:h.a.string,visible:h.a.bool,hiddenClassName:h.a.string};var A=L,z=function(e){function t(){return a()(this,t),c()(this,e.apply(this,arguments))}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.className;return e.visible||(t+=" "+e.hiddenClassName),d.a.createElement("div",{className:t,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onMouseDown:e.onMouseDown,onTouchStart:e.onTouchStart,style:e.style},d.a.createElement(A,{className:e.prefixCls+"-content",visible:e.visible},e.children))},t}(f.Component);z.propTypes={hiddenClassName:h.a.string,className:h.a.string,prefixCls:h.a.string,onMouseEnter:h.a.func,onMouseLeave:h.a.func,onMouseDown:h.a.func,onTouchStart:h.a.func,children:h.a.any};var P=z,j=function(e){function t(n){a()(this,t);var r=c()(this,e.call(this,n));return D.call(r),r.state={stretchChecked:!1,targetWidth:void 0,targetHeight:void 0},r.savePopupRef=C.bind(r,"popupInstance"),r.saveAlignRef=C.bind(r,"alignInstance"),r}return u()(t,e),t.prototype.componentDidMount=function(){this.rootNode=this.getPopupDomNode(),this.setStretchSize()},t.prototype.componentDidUpdate=function(){this.setStretchSize()},t.prototype.getPopupDomNode=function(){return g.a.findDOMNode(this.popupInstance)},t.prototype.getMaskTransitionName=function(){var e=this.props,t=e.maskTransitionName,n=e.maskAnimation;return!t&&n&&(t=e.prefixCls+"-"+n),t},t.prototype.getTransitionName=function(){var e=this.props,t=e.transitionName;return!t&&e.animation&&(t=e.prefixCls+"-"+e.animation),t},t.prototype.getClassName=function(e){return this.props.prefixCls+" "+this.props.className+" "+e},t.prototype.getPopupElement=function(){var e=this,t=this.savePopupRef,n=this.state,r=n.stretchChecked,i=n.targetHeight,a=n.targetWidth,s=this.props,c=s.align,l=s.visible,u=s.prefixCls,f=s.style,p=s.getClassNameFromAlign,h=s.destroyPopupOnHide,m=s.stretch,g=s.children,v=s.onMouseEnter,y=s.onMouseLeave,b=s.onMouseDown,w=s.onTouchStart,_=this.getClassName(this.currentAlignClassName||p(c)),x=u+"-hidden";l||(this.currentAlignClassName=null);var k={};m&&(-1!==m.indexOf("height")?k.height=i:-1!==m.indexOf("minHeight")&&(k.minHeight=i),-1!==m.indexOf("width")?k.width=a:-1!==m.indexOf("minWidth")&&(k.minWidth=a),r||(k.visibility="hidden",setTimeout((function(){e.alignInstance&&e.alignInstance.forceAlign()}),0)));var S={className:_,prefixCls:u,ref:t,onMouseEnter:v,onMouseLeave:y,onMouseDown:b,onTouchStart:w,style:o()({},k,f,this.getZIndexStyle())};return h?d.a.createElement(E.a,{component:"",exclusive:!0,transitionAppear:!0,transitionName:this.getTransitionName()},l?d.a.createElement(M.a,{target:this.getAlignTarget(),key:"popup",ref:this.saveAlignRef,monitorWindowResize:!0,align:c,onAlign:this.onAlign},d.a.createElement(P,o()({visible:!0},S),g)):null):d.a.createElement(E.a,{component:"",exclusive:!0,transitionAppear:!0,transitionName:this.getTransitionName(),showProp:"xVisible"},d.a.createElement(M.a,{target:this.getAlignTarget(),key:"popup",ref:this.saveAlignRef,monitorWindowResize:!0,xVisible:l,childrenProps:{visible:"xVisible"},disabled:!l,align:c,onAlign:this.onAlign},d.a.createElement(P,o()({hiddenClassName:x},S),g)))},t.prototype.getZIndexStyle=function(){var e={},t=this.props;return void 0!==t.zIndex&&(e.zIndex=t.zIndex),e},t.prototype.getMaskElement=function(){var e=this.props,t=void 0;if(e.mask){var n=this.getMaskTransitionName();t=d.a.createElement(A,{style:this.getZIndexStyle(),key:"mask",className:e.prefixCls+"-mask",hiddenClassName:e.prefixCls+"-mask-hidden",visible:e.visible}),n&&(t=d.a.createElement(E.a,{key:"mask",showProp:"visible",transitionAppear:!0,component:"",transitionName:n},t))}return t},t.prototype.render=function(){return d.a.createElement("div",null,this.getMaskElement(),this.getPopupElement())},t}(f.Component);j.propTypes={visible:h.a.bool,style:h.a.object,getClassNameFromAlign:h.a.func,onAlign:h.a.func,getRootDomNode:h.a.func,align:h.a.any,destroyPopupOnHide:h.a.bool,className:h.a.string,prefixCls:h.a.string,onMouseEnter:h.a.func,onMouseLeave:h.a.func,onMouseDown:h.a.func,onTouchStart:h.a.func,stretch:h.a.string,children:h.a.node,point:h.a.shape({pageX:h.a.number,pageY:h.a.number})};var D=function(){var e=this;this.onAlign=function(t,n){var r=e.props,o=r.getClassNameFromAlign(n);e.currentAlignClassName!==o&&(e.currentAlignClassName=o,t.className=e.getClassName(o)),r.onAlign(t,n)},this.setStretchSize=function(){var t=e.props,n=t.stretch,r=t.getRootDomNode,o=t.visible,i=e.state,a=i.stretchChecked,s=i.targetHeight,c=i.targetWidth;if(n&&o){var l=r();if(l){var u=l.offsetHeight,f=l.offsetWidth;s===u&&c===f&&a||e.setState({stretchChecked:!0,targetHeight:u,targetWidth:f})}}else a&&e.setState({stretchChecked:!1})},this.getTargetElement=function(){return e.props.getRootDomNode()},this.getAlignTarget=function(){var t=e.props.point;return t||e.getTargetElement}},N=j;function F(){}var R=["onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur","onContextMenu"],H=!!m.createPortal,I={rcTrigger:h.a.shape({onPopupMouseDown:h.a.func})},V=function(e){function t(n){a()(this,t);var r=c()(this,e.call(this,n));B.call(r);var o=void 0;return o="popupVisible"in n?!!n.popupVisible:!!n.defaultPopupVisible,r.state={prevPopupVisible:o,popupVisible:o},R.forEach((function(e){r["fire"+e]=function(t){r.fireEvents(e,t)}})),r}return u()(t,e),t.prototype.getChildContext=function(){return{rcTrigger:{onPopupMouseDown:this.onPopupMouseDown}}},t.prototype.componentDidMount=function(){this.componentDidUpdate({},{popupVisible:this.state.popupVisible})},t.prototype.componentDidUpdate=function(e,t){var n=this.props,r=this.state;if(H||this.renderComponent(null,(function(){t.popupVisible!==r.popupVisible&&n.afterPopupVisibleChange(r.popupVisible)})),r.popupVisible){var o=void 0;return this.clickOutsideHandler||!this.isClickToHide()&&!this.isContextMenuToShow()||(o=n.getDocument(),this.clickOutsideHandler=Object(b.a)(o,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(o=o||n.getDocument(),this.touchOutsideHandler=Object(b.a)(o,"touchstart",this.onDocumentClick)),!this.contextMenuOutsideHandler1&&this.isContextMenuToShow()&&(o=o||n.getDocument(),this.contextMenuOutsideHandler1=Object(b.a)(o,"scroll",this.onContextMenuClose)),void(!this.contextMenuOutsideHandler2&&this.isContextMenuToShow()&&(this.contextMenuOutsideHandler2=Object(b.a)(window,"blur",this.onContextMenuClose)))}this.clearOutsideHandler()},t.prototype.componentWillUnmount=function(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout)},t.getDerivedStateFromProps=function(e,t){var n=e.popupVisible,r={};return void 0!==n&&t.popupVisible!==n&&(r.popupVisible=n,r.prevPopupVisible=t.popupVisible),r},t.prototype.getPopupDomNode=function(){return this._component&&this._component.getPopupDomNode?this._component.getPopupDomNode():null},t.prototype.getPopupAlign=function(){var e=this.props,t=e.popupPlacement,n=e.popupAlign,r=e.builtinPlacements;return t&&r?function(e,t,n){var r=e[t]||{};return o()({},r,n)}(r,t,n):n},t.prototype.setPopupVisible=function(e,t){var n=this.props.alignPoint,r=this.state.popupVisible;this.clearDelayTimer(),r!==e&&("popupVisible"in this.props||this.setState({popupVisible:e,prevPopupVisible:r}),this.props.onPopupVisibleChange(e)),n&&t&&this.setPoint(t)},t.prototype.delaySetPopupVisible=function(e,t,n){var r=this,o=1e3*t;if(this.clearDelayTimer(),o){var i=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout((function(){r.setPopupVisible(e,i),r.clearDelayTimer()}),o)}else this.setPopupVisible(e,n)},t.prototype.clearDelayTimer=function(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)},t.prototype.clearOutsideHandler=function(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextMenuOutsideHandler1&&(this.contextMenuOutsideHandler1.remove(),this.contextMenuOutsideHandler1=null),this.contextMenuOutsideHandler2&&(this.contextMenuOutsideHandler2.remove(),this.contextMenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},t.prototype.createTwoChains=function(e){var t=this.props.children.props,n=this.props;return t[e]&&n[e]?this["fire"+e]:t[e]||n[e]},t.prototype.isClickToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")},t.prototype.isContextMenuToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("contextMenu")||-1!==n.indexOf("contextMenu")},t.prototype.isClickToHide=function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("click")||-1!==n.indexOf("click")},t.prototype.isMouseEnterToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseEnter")},t.prototype.isMouseLeaveToHide=function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("hover")||-1!==n.indexOf("mouseLeave")},t.prototype.isFocusToShow=function(){var e=this.props,t=e.action,n=e.showAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("focus")},t.prototype.isBlurToHide=function(){var e=this.props,t=e.action,n=e.hideAction;return-1!==t.indexOf("focus")||-1!==n.indexOf("blur")},t.prototype.forcePopupAlign=function(){this.state.popupVisible&&this._component&&this._component.alignInstance&&this._component.alignInstance.forceAlign()},t.prototype.fireEvents=function(e,t){var n=this.props.children.props[e];n&&n(t);var r=this.props[e];r&&r(t)},t.prototype.close=function(){this.setPopupVisible(!1)},t.prototype.render=function(){var e=this,t=this.state.popupVisible,n=this.props,r=n.children,o=n.forceRender,i=n.alignPoint,a=n.className,s=d.a.Children.only(r),c={key:"trigger"};this.isContextMenuToShow()?c.onContextMenu=this.onContextMenu:c.onContextMenu=this.createTwoChains("onContextMenu"),this.isClickToHide()||this.isClickToShow()?(c.onClick=this.onClick,c.onMouseDown=this.onMouseDown,c.onTouchStart=this.onTouchStart):(c.onClick=this.createTwoChains("onClick"),c.onMouseDown=this.createTwoChains("onMouseDown"),c.onTouchStart=this.createTwoChains("onTouchStart")),this.isMouseEnterToShow()?(c.onMouseEnter=this.onMouseEnter,i&&(c.onMouseMove=this.onMouseMove)):c.onMouseEnter=this.createTwoChains("onMouseEnter"),this.isMouseLeaveToHide()?c.onMouseLeave=this.onMouseLeave:c.onMouseLeave=this.createTwoChains("onMouseLeave"),this.isFocusToShow()||this.isBlurToHide()?(c.onFocus=this.onFocus,c.onBlur=this.onBlur):(c.onFocus=this.createTwoChains("onFocus"),c.onBlur=this.createTwoChains("onBlur"));var l=k()(s&&s.props&&s.props.className,a);l&&(c.className=l);var u=d.a.cloneElement(s,c);if(!H)return d.a.createElement(w.a,{parent:this,visible:t,autoMount:!1,forceRender:o,getComponent:this.getComponent,getContainer:this.getContainer},(function(t){var n=t.renderComponent;return e.renderComponent=n,u}));var f=void 0;return(t||this._component||o)&&(f=d.a.createElement(_.a,{key:"portal",getContainer:this.getContainer,didUpdate:this.handlePortalUpdate},this.getComponent())),[u,f]},t}(d.a.Component);V.propTypes={children:h.a.any,action:h.a.oneOfType([h.a.string,h.a.arrayOf(h.a.string)]),showAction:h.a.any,hideAction:h.a.any,getPopupClassNameFromAlign:h.a.any,onPopupVisibleChange:h.a.func,afterPopupVisibleChange:h.a.func,popup:h.a.oneOfType([h.a.node,h.a.func]).isRequired,popupStyle:h.a.object,prefixCls:h.a.string,popupClassName:h.a.string,className:h.a.string,popupPlacement:h.a.string,builtinPlacements:h.a.object,popupTransitionName:h.a.oneOfType([h.a.string,h.a.object]),popupAnimation:h.a.any,mouseEnterDelay:h.a.number,mouseLeaveDelay:h.a.number,zIndex:h.a.number,focusDelay:h.a.number,blurDelay:h.a.number,getPopupContainer:h.a.func,getDocument:h.a.func,forceRender:h.a.bool,destroyPopupOnHide:h.a.bool,mask:h.a.bool,maskClosable:h.a.bool,onPopupAlign:h.a.func,popupAlign:h.a.object,popupVisible:h.a.bool,defaultPopupVisible:h.a.bool,maskTransitionName:h.a.oneOfType([h.a.string,h.a.object]),maskAnimation:h.a.string,stretch:h.a.string,alignPoint:h.a.bool},V.contextTypes=I,V.childContextTypes=I,V.defaultProps={prefixCls:"rc-trigger-popup",getPopupClassNameFromAlign:function(){return""},getDocument:function(){return window.document},onPopupVisibleChange:F,afterPopupVisibleChange:F,onPopupAlign:F,popupClassName:"",mouseEnterDelay:0,mouseLeaveDelay:.1,focusDelay:0,blurDelay:.15,popupStyle:{},destroyPopupOnHide:!1,popupAlign:{},defaultPopupVisible:!1,mask:!1,maskClosable:!0,action:[],showAction:[],hideAction:[]};var B=function(){var e=this;this.onMouseEnter=function(t){var n=e.props.mouseEnterDelay;e.fireEvents("onMouseEnter",t),e.delaySetPopupVisible(!0,n,n?null:t)},this.onMouseMove=function(t){e.fireEvents("onMouseMove",t),e.setPoint(t)},this.onMouseLeave=function(t){e.fireEvents("onMouseLeave",t),e.delaySetPopupVisible(!1,e.props.mouseLeaveDelay)},this.onPopupMouseEnter=function(){e.clearDelayTimer()},this.onPopupMouseLeave=function(t){t.relatedTarget&&!t.relatedTarget.setTimeout&&e._component&&e._component.getPopupDomNode&&Object(y.a)(e._component.getPopupDomNode(),t.relatedTarget)||e.delaySetPopupVisible(!1,e.props.mouseLeaveDelay)},this.onFocus=function(t){e.fireEvents("onFocus",t),e.clearDelayTimer(),e.isFocusToShow()&&(e.focusTime=Date.now(),e.delaySetPopupVisible(!0,e.props.focusDelay))},this.onMouseDown=function(t){e.fireEvents("onMouseDown",t),e.preClickTime=Date.now()},this.onTouchStart=function(t){e.fireEvents("onTouchStart",t),e.preTouchTime=Date.now()},this.onBlur=function(t){e.fireEvents("onBlur",t),e.clearDelayTimer(),e.isBlurToHide()&&e.delaySetPopupVisible(!1,e.props.blurDelay)},this.onContextMenu=function(t){t.preventDefault(),e.fireEvents("onContextMenu",t),e.setPopupVisible(!0,t)},this.onContextMenuClose=function(){e.isContextMenuToShow()&&e.close()},this.onClick=function(t){if(e.fireEvents("onClick",t),e.focusTime){var n=void 0;if(e.preClickTime&&e.preTouchTime?n=Math.min(e.preClickTime,e.preTouchTime):e.preClickTime?n=e.preClickTime:e.preTouchTime&&(n=e.preTouchTime),Math.abs(n-e.focusTime)<20)return;e.focusTime=0}e.preClickTime=0,e.preTouchTime=0,e.isClickToShow()&&(e.isClickToHide()||e.isBlurToHide())&&t&&t.preventDefault&&t.preventDefault();var r=!e.state.popupVisible;(e.isClickToHide()&&!r||r&&e.isClickToShow())&&e.setPopupVisible(!e.state.popupVisible,t)},this.onPopupMouseDown=function(){var t=e.context.rcTrigger,n=void 0===t?{}:t;e.hasPopupMouseDown=!0,clearTimeout(e.mouseDownTimeout),e.mouseDownTimeout=setTimeout((function(){e.hasPopupMouseDown=!1}),0),n.onPopupMouseDown&&n.onPopupMouseDown.apply(n,arguments)},this.onDocumentClick=function(t){if(!e.props.mask||e.props.maskClosable){var n=t.target,r=Object(m.findDOMNode)(e);Object(y.a)(r,n)||e.hasPopupMouseDown||e.close()}},this.getRootDomNode=function(){return Object(m.findDOMNode)(e)},this.getPopupClassNameFromAlign=function(t){var n=[],r=e.props,o=r.popupPlacement,i=r.builtinPlacements,a=r.prefixCls,s=r.alignPoint,c=r.getPopupClassNameFromAlign;return o&&i&&n.push(function(e,t,n,r){var o=n.points;for(var i in e)if(e.hasOwnProperty(i)&&S(e[i].points,o,r))return t+"-placement-"+i;return""}(i,a,t,s)),c&&n.push(c(t)),n.join(" ")},this.getComponent=function(){var t=e.props,n=t.prefixCls,r=t.destroyPopupOnHide,i=t.popupClassName,a=t.action,s=t.onPopupAlign,c=t.popupAnimation,l=t.popupTransitionName,u=t.popupStyle,f=t.mask,p=t.maskAnimation,h=t.maskTransitionName,m=t.zIndex,g=t.popup,v=t.stretch,y=t.alignPoint,b=e.state,w=b.popupVisible,_=b.point,x=e.getPopupAlign(),k={};return e.isMouseEnterToShow()&&(k.onMouseEnter=e.onPopupMouseEnter),e.isMouseLeaveToHide()&&(k.onMouseLeave=e.onPopupMouseLeave),k.onMouseDown=e.onPopupMouseDown,k.onTouchStart=e.onPopupMouseDown,d.a.createElement(N,o()({prefixCls:n,destroyPopupOnHide:r,visible:w,point:y&&_,className:i,action:a,align:x,onAlign:s,animation:c,getClassNameFromAlign:e.getPopupClassNameFromAlign},k,{stretch:v,getRootDomNode:e.getRootDomNode,style:u,mask:f,zIndex:m,transitionName:l,maskAnimation:p,maskTransitionName:h,ref:e.savePopup}),"function"==typeof g?g():g)},this.getContainer=function(){var t=e.props,n=document.createElement("div");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",(t.getPopupContainer?t.getPopupContainer(Object(m.findDOMNode)(e)):t.getDocument().body).appendChild(n),n},this.setPoint=function(t){e.props.alignPoint&&t&&e.setState({point:{pageX:t.pageX,pageY:t.pageY}})},this.handlePortalUpdate=function(){e.state.prevPopupVisible!==e.state.popupVisible&&e.props.afterPopupVisibleChange(e.state.popupVisible)},this.savePopup=function(t){e._component=t}};Object(v.polyfill)(V);t.a=V},function(e,t,n){var r,o,i;!function(a,s){"use strict";e.exports?e.exports=s(n(413),n(414),n(415)):(o=[n(413),n(414),n(415)],void 0===(i="function"==typeof(r=s)?r.apply(t,o):r)||(e.exports=i))}(0,(function(e,t,n,r){"use strict";var o=r&&r.URI;function i(e,t){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof i))return n?r?new i(e,t):new i(e):new i;if(void 0===e){if(n)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&n)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}i.version="1.19.2";var a=i.prototype,s=Object.prototype.hasOwnProperty;function c(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function u(e){return"Array"===l(e)}function f(e,t){var n,r,o={};if("RegExp"===l(t))o=null;else if(u(t))for(n=0,r=t.length;n]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,i.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},i.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},i.hostProtocols=["http","https"],i.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,i.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},i.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return i.domAttributes[t]}},i.encode=g,i.decode=decodeURIComponent,i.iso8859=function(){i.encode=escape,i.decode=unescape},i.unicode=function(){i.encode=g,i.decode=decodeURIComponent},i.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},i.encodeQuery=function(e,t){var n=i.encode(e+"");return void 0===t&&(t=i.escapeQuerySpace),t?n.replace(/%20/g,"+"):n},i.decodeQuery=function(e,t){e+="",void 0===t&&(t=i.escapeQuerySpace);try{return i.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var v,y={encode:"encode",decode:"decode"},b=function(e,t){return function(n){try{return i[t](n+"").replace(i.characters[e][t].expression,(function(n){return i.characters[e][t].map[n]}))}catch(e){return n}}};for(v in y)i[v+"PathSegment"]=b("pathname",y[v]),i[v+"UrnPathSegment"]=b("urnpath",y[v]);var w=function(e,t,n){return function(r){var o;o=n?function(e){return i[t](i[n](e))}:i[t];for(var a=(r+"").split(e),s=0,c=a.length;s-1&&(t.fragment=e.substring(n+1)||null,e=e.substring(0,n)),(n=e.indexOf("?"))>-1&&(t.query=e.substring(n+1)||null,e=e.substring(0,n)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=i.parseAuthority(e,t)):(n=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,n)||null,t.protocol&&!t.protocol.match(i.protocol_expression)?t.protocol=void 0:"//"===e.substring(n+1,n+3)?(e=e.substring(n+3),e=i.parseAuthority(e,t)):(e=e.substring(n+1),t.urn=!0)),t.path=e,t},i.parseHost=function(e,t){e||(e="");var n,r,o=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=e.length),"["===e.charAt(0))n=e.indexOf("]"),t.hostname=e.substring(1,n)||null,t.port=e.substring(n+2,o)||null,"/"===t.port&&(t.port=null);else{var a=e.indexOf(":"),s=e.indexOf("/"),c=e.indexOf(":",a+1);-1!==c&&(-1===s||c-1?r:e.length-1);return o>-1&&(-1===r||o-1?p.slice(0,h)+p.slice(h).replace(a,""):p.replace(a,"")).length<=l[0].length||n.ignore&&n.ignore.test(p))){var v=t(p,u,d=u+p.length,e);void 0!==v?(v=String(v),e=e.slice(0,u)+v+e.slice(d),r.lastIndex=u+v.length):r.lastIndex=d}}return r.lastIndex=0,e},i.ensureValidHostname=function(t,n){var r=!!t,o=!1;if(!!n&&(o=d(i.hostProtocols,n)),o&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(t&&t.match(i.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(i.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},i.ensureValidPort=function(e){if(e){var t=Number(e);if(!(function(e){return/^[0-9]+$/.test(e)}(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},i.noConflict=function(e){if(e){var t={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(t.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(t.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=r.SecondLevelDomains.noConflict()),t}return r.URI===this&&(r.URI=o),this},a.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=i.build(this._parts),this._deferred_build=!1),this},a.clone=function(){return new i(this)},a.valueOf=a.toString=function(){return this.build(!1)._string},a.protocol=_("protocol"),a.username=_("username"),a.password=_("password"),a.hostname=_("hostname"),a.port=_("port"),a.query=x("query","?"),a.fragment=x("fragment","#"),a.search=function(e,t){var n=this.query(e,t);return"string"==typeof n&&n.length?"?"+n:n},a.hash=function(e,t){var n=this.fragment(e,t);return"string"==typeof n&&n.length?"#"+n:n},a.pathname=function(e,t){if(void 0===e||!0===e){var n=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?i.decodeUrnPath:i.decodePath)(n):n}return this._parts.urn?this._parts.path=e?i.recodeUrnPath(e):"":this._parts.path=e?i.recodePath(e):"/",this.build(!t),this},a.path=a.pathname,a.href=function(e,t){var n;if(void 0===e)return this.toString();this._string="",this._parts=i._parts();var r=e instanceof i,o="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[i.getDomAttribute(e)]||"",o=!1);if(!r&&o&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=i.parse(String(e),this._parts);else{if(!r&&!o)throw new TypeError("invalid input");var a=r?e._parts:e;for(n in a)"query"!==n&&s.call(this._parts,n)&&(this._parts[n]=a[n]);a.query&&this.query(a.query,!1)}return this.build(!t),this},a.is=function(e){var t=!1,r=!1,o=!1,a=!1,s=!1,c=!1,l=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,r=i.ip4_expression.test(this._parts.hostname),o=i.ip6_expression.test(this._parts.hostname),s=(a=!(t=r||o))&&n&&n.has(this._parts.hostname),c=a&&i.idn_expression.test(this._parts.hostname),l=a&&i.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return a;case"sld":return s;case"ip":return t;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return o;case"idn":return c;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var k=a.protocol,S=a.port,C=a.hostname;a.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(i.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return k.call(this,e,t)},a.scheme=a.protocol,a.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),i.ensureValidPort(e))),S.call(this,e,t))},a.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==i.parseHost(e,n))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=n.hostname,this._parts.preventInvalidHostname&&i.ensureValidHostname(e,this._parts.protocol)}return C.call(this,e,t)},a.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=i(e);return this.protocol(r.protocol()).authority(r.authority()).build(!t),this},a.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildHost(this._parts):"";if("/"!==i.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?i.buildAuthority(this._parts):"";if("/"!==i.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},a.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=i.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==e[e.length-1]&&(e+="@"),i.parseUserinfo(e,this._parts),this.build(!t),this},a.resource=function(e,t){var n;return void 0===e?this.path()+this.search()+this.hash():(n=i.parse(e),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!t),this)},a.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,r),a=new RegExp("^"+c(o));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&i.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(a,e),this.build(!t),this},a.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(t).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(i.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var o=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},a.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(r+1);return!0!==t&&n&&n.list[o.toLowerCase()]&&n.get(this._parts.hostname)||o}var i;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');i=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");i=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},a.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return e?i.decodePath(r):r}var o=this._parts.path.length-this.filename().length,a=this._parts.path.substring(0,o),s=new RegExp("^"+c(a));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e),this.build(!t),this},a.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return e?i.decodePathSegment(r):r}var o=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(o=!0);var a=new RegExp(c(this.filename())+"$");return e=i.recodePath(e),this._parts.path=this._parts.path.replace(a,e),o?this.normalizePath(t):this.build(!t),this},a.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,o=this.filename(),a=o.lastIndexOf(".");return-1===a?"":(n=o.substring(a+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",e?i.decodePathSegment(r):r)}"."===e.charAt(0)&&(e=e.substring(1));var s,l=this.suffix();if(l)s=e?new RegExp(c(l)+"$"):new RegExp(c("."+l)+"$");else{if(!e)return this;this._parts.path+="."+i.recodePath(e)}return s&&(e=i.recodePath(e),this._parts.path=this._parts.path.replace(s,e)),this.build(!t),this},a.segment=function(e,t,n){var r=this._parts.urn?":":"/",o=this.path(),i="/"===o.substring(0,1),a=o.split(r);if(void 0!==e&&"number"!=typeof e&&(n=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(i&&a.shift(),e<0&&(e=Math.max(a.length+e,0)),void 0===t)return void 0===e?a:a[e];if(null===e||void 0===a[e])if(u(t)){a=[];for(var s=0,c=t.length;s=.98||(n+=e,(e-=.01)<.001&&(e=.001)),n}}function s(e,t){var n=void 0!==e.uid?"uid":"name";return t.filter((function(t){return t[n]===e[n]}))[0]}function c(e,t){var n=void 0!==e.uid?"uid":"name",r=t.filter((function(t){return t[n]!==e[n]}));return r.length===t.length?null:r}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"e",(function(){return u})),n.d(t,"f",(function(){return f}));var l=function(e){return!!e&&0===e.indexOf("image/")},u=function(e){if(l(e.type))return!0;var t=e.thumbUrl||e.url,n=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.split("/"),n=t[t.length-1],r=n.split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(r)||[""])[0]}(t);return!(!/^data:image\//.test(t)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n))||!/^data:/.test(t)&&!n};function f(e){return new Promise((function(t){if(l(e.type)){var n=document.createElement("canvas");n.width=200,n.height=200,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(200,"px; height: ").concat(200,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),o=new Image;o.onload=function(){var e=o.width,i=o.height,a=200,s=200,c=0,l=0;e-1;i--)if(n(e[i-1])){r=i;break}for(i=t;i=0&&n>=0;o--)switch(e.charCodeAt(o)){case 32:continue;case 10:n--,r=!1;break;default:return n}return r?0:n},t.getBreaksNeededForEmptyLineAfter=function(e,t){if(void 0===e&&(e=""),t===e.length-1)return 0;for(var n=2,r=!0,o=t;o=0;o++)switch(e.charCodeAt(o)){case 32:continue;case 10:n--,r=!1;break;default:return n}return r?0:n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.red=t.getContrastingColor=t.isValidHex=t.toState=t.simpleCheckForValidColor=void 0;var r=i(n(852)),o=i(n(238));function i(e){return e&&e.__esModule?e:{default:e}}t.simpleCheckForValidColor=function(e){var t=0,n=0;return(0,r.default)(["r","g","b","a","h","s","l","v"],(function(r){if(e[r]&&(t+=1,isNaN(e[r])||(n+=1),"s"===r||"l"===r)){/^\d+%$/.test(e[r])&&(n+=1)}})),t===n&&e};var a=t.toState=function(e,t){var n=e.hex?(0,o.default)(e.hex):(0,o.default)(e),r=n.toHsl(),i=n.toHsv(),a=n.toRgb(),s=n.toHex();return 0===r.s&&(r.h=t||0,i.h=t||0),{hsl:r,hex:"000000"===s&&0===a.a?"transparent":"#"+s,rgb:a,hsv:i,oldHue:e.h||t||r.h,source:e.source}};t.isValidHex=function(e){var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&(0,o.default)(e).isValid()},t.getContrastingColor=function(e){if(!e)return"#fff";var t=a(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},t.red={hsl:{a:1,h:0,l:.5,s:1},hex:"#ff0000",rgb:{r:255,g:0,b:0,a:1},hsv:{h:0,s:1,v:1,a:1}};t.default=t},function(e,t,n){"use strict";var r=n(0),o=n.n(r),i=n(11),a=n(4),s=n.n(a),c=n(27),l=n.n(c),u=n(7),f=n.n(u),d=n(6),p=n.n(d),h=n(9),m=n.n(h),g=n(1),v=n.n(g),y=n(50),b={adjustX:1,adjustY:1},w=[0,0],_={left:{points:["cr","cl"],overflow:b,offset:[-4,0],targetOffset:w},right:{points:["cl","cr"],overflow:b,offset:[4,0],targetOffset:w},top:{points:["bc","tc"],overflow:b,offset:[0,-4],targetOffset:w},bottom:{points:["tc","bc"],overflow:b,offset:[0,4],targetOffset:w},topLeft:{points:["bl","tl"],overflow:b,offset:[0,-4],targetOffset:w},leftTop:{points:["tr","tl"],overflow:b,offset:[-4,0],targetOffset:w},topRight:{points:["br","tr"],overflow:b,offset:[0,-4],targetOffset:w},rightTop:{points:["tl","tr"],overflow:b,offset:[4,0],targetOffset:w},bottomRight:{points:["tr","br"],overflow:b,offset:[0,4],targetOffset:w},rightBottom:{points:["bl","br"],overflow:b,offset:[4,0],targetOffset:w},bottomLeft:{points:["tl","bl"],overflow:b,offset:[0,4],targetOffset:w},leftBottom:{points:["br","bl"],overflow:b,offset:[-4,0],targetOffset:w}},x=function(e){function t(){return f()(this,t),p()(this,e.apply(this,arguments))}return m()(t,e),t.prototype.componentDidUpdate=function(){var e=this.props.trigger;e&&e.forcePopupAlign()},t.prototype.render=function(){var e=this.props,t=e.overlay,n=e.prefixCls,r=e.id;return o.a.createElement("div",{className:n+"-inner",id:r,role:"tooltip"},"function"==typeof t?t():t)},t}(o.a.Component);x.propTypes={prefixCls:v.a.string,overlay:v.a.oneOfType([v.a.node,v.a.func]).isRequired,id:v.a.string,trigger:v.a.any};var k=x,S=function(e){function t(){var n,r,i;f()(this,t);for(var a=arguments.length,s=Array(a),c=0;c=0||o.indexOf("Bottom")>=0?a.top="".concat(i.height-n.offset[1],"px"):(o.indexOf("Top")>=0||o.indexOf("bottom")>=0)&&(a.top="".concat(-n.offset[1],"px")),o.indexOf("left")>=0||o.indexOf("Right")>=0?a.left="".concat(i.width-n.offset[0],"px"):(o.indexOf("right")>=0||o.indexOf("Left")>=0)&&(a.left="".concat(-n.offset[0],"px")),e.style.transformOrigin="".concat(a.left," ").concat(a.top)}},t.renderTooltip=function(e){var n=e.getPopupContainer,o=e.getPrefixCls,i=H(t),a=i.props,s=i.state,c=a.prefixCls,l=a.openClassName,u=a.getPopupContainer,f=a.getTooltipContainer,d=a.children,p=o("tooltip",c),h=s.visible;!("visible"in a)&&t.isNoTitle()&&(h=!1);var m=B(r.isValidElement(d)?d:r.createElement("span",null,d)),g=m.props,v=E()(g.className,function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},l||"".concat(p,"-open"),!0));return r.createElement(C,V({},t.props,{prefixCls:p,getTooltipContainer:u||f||n,ref:t.saveTooltip,builtinPlacements:t.getPlacements(),overlay:t.getOverlay(),visible:h,onVisibleChange:t.onVisibleChange,onPopupAlign:t.onPopupAlign}),h?r.cloneElement(m,{className:v}):m)},t.state={visible:!!e.visible||!!e.defaultVisible},t}return t=a,o=[{key:"getDerivedStateFromProps",value:function(e){return"visible"in e?{visible:e.visible}:null}}],(n=[{key:"getPopupDomNode",value:function(){return this.tooltip.getPopupDomNode()}},{key:"getPlacements",value:function(){var e=this.props,t=e.builtinPlacements,n=e.arrowPointAtCenter,r=e.autoAdjustOverflow;return t||function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.arrowWidth,n=void 0===t?5:t,r=e.horizontalArrowShift,o=void 0===r?16:r,i=e.verticalArrowShift,a=void 0===i?12:i,s=e.autoAdjustOverflow,c=void 0===s||s,l={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(o+n),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(a+n)]},topRight:{points:["br","tc"],offset:[o+n,-4]},rightTop:{points:["tl","cr"],offset:[4,-(a+n)]},bottomRight:{points:["tr","bc"],offset:[o+n,4]},rightBottom:{points:["bl","cr"],offset:[4,a+n]},bottomLeft:{points:["tl","bc"],offset:[-(o+n),4]},leftBottom:{points:["br","cl"],offset:[-4,a+n]}};return Object.keys(l).forEach((function(t){l[t]=e.arrowPointAtCenter?O(O({},l[t]),{overflow:z(c),targetOffset:A}):O(O({},_[t]),{overflow:z(c)}),l[t].ignoreShake=!0})),l}({arrowPointAtCenter:n,verticalArrowShift:8,autoAdjustOverflow:r})}},{key:"isNoTitle",value:function(){var e=this.props,t=e.title,n=e.overlay;return!t&&!n&&0!==t}},{key:"getOverlay",value:function(){var e=this.props,t=e.title,n=e.overlay;return 0===t?t:n||t||""}},{key:"render",value:function(){return r.createElement(P.a,null,this.renderTooltip)}}])&&D(t.prototype,n),o&&D(t,o),a}(r.Component);Y.defaultProps={placement:"top",transitionName:"zoom-big-fast",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0},Object(i.polyfill)(Y);t.a=Y},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(11),a=n(2),s=n.n(a),c=n(164),l=n(25),u=n.n(l),f=n(71),d=n(15);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(){return(m=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(g=t.getOptions().map((function(e){return r.createElement(C,{prefixCls:p,key:e.value.toString(),disabled:"disabled"in e?e.disabled:i.disabled,value:e.value,checked:-1!==a.value.indexOf(e.value),onChange:e.onChange,className:"".concat(h,"-item")},e.label)})));var v=s()(h,l);return r.createElement("div",O({className:v,style:u},m),g)},t.state={value:e.value||e.defaultValue||[],registeredValues:[]},t}return t=a,o=[{key:"getDerivedStateFromProps",value:function(e){return"value"in e?{value:e.value||[]}:null}}],(n=[{key:"getChildContext",value:function(){return{checkboxGroup:{toggleOption:this.toggleOption,value:this.state.value,disabled:this.props.disabled,name:this.props.name,registerValue:this.registerValue,cancelValue:this.cancelValue}}}},{key:"shouldComponentUpdate",value:function(e,t){return!u()(this.props,e)||!u()(this.state,t)}},{key:"getOptions",value:function(){return this.props.options.map((function(e){return"string"==typeof e?{label:e,value:e}:e}))}},{key:"render",value:function(){return r.createElement(f.a,null,this.renderGroup)}}])&&A(t.prototype,n),o&&A(t,o),a}(r.Component);R.defaultProps={options:[]},R.propTypes={defaultValue:o.array,value:o.array,options:o.array.isRequired,onChange:o.func},R.childContextTypes={checkboxGroup:o.any},Object(i.polyfill)(R);var H=R;C.Group=H;t.a=C},function(e,t,n){var r=n(393),o=n(138),i=n(718),a=n(43);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},function(e,t,n){"use strict";function r(){var e=[].slice.call(arguments,0);return 1===e.length?e[0]:function(){for(var t=0;t0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t}),{})}var h=function(){function e(){a()(this,e),this.collection={}}return c()(e,[{key:"clear",value:function(){this.collection={}}},{key:"delete",value:function(e){return delete this.collection[e]}},{key:"get",value:function(e){return this.collection[e]}},{key:"has",value:function(e){return Boolean(this.collection[e])}},{key:"set",value:function(e,t){return this.collection[e]=t,this}},{key:"size",get:function(){return Object.keys(this.collection).length}}]),e}();function m(e,t,n){return n?u.createElement(e.tag,o()({key:t},p(e.attrs),n),(e.children||[]).map((function(n,r){return m(n,t+"-"+e.tag+"-"+r)}))):u.createElement(e.tag,o()({key:t},p(e.attrs)),(e.children||[]).map((function(n,r){return m(n,t+"-"+e.tag+"-"+r)})))}function g(e){return Object(l.generate)(e)[0]}function v(e,t){switch(t){case"fill":return e+"-fill";case"outline":return e+"-o";case"twotone":return e+"-twotone";default:throw new TypeError("Unknown theme type: "+t+", name: "+e)}}}).call(this,n(106))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"c",(function(){return h})),n.d(t,"b",(function(){return m}));var r=!("undefined"==typeof window||!window.document||!window.document.createElement);function o(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}var i,a,s,c=(i=r,a="undefined"!=typeof window?window:{},s={animationend:o("Animation","AnimationEnd"),transitionend:o("Transition","TransitionEnd")},i&&("AnimationEvent"in a||delete s.animationend.animation,"TransitionEvent"in a||delete s.transitionend.transition),s),l={};r&&(l=document.createElement("div").style);var u={};function f(e){if(u[e])return u[e];var t=c[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;oc.bottom-k(r,"bottom")&&(u=t.bottom-c.bottom+k(o,"bottom")),t.leftc.right-k(r,"right")&&(l=t.right-c.right+k(o,"right")),l||u)if(s)i.defaultView.scrollBy(l,u);else{var f=a.scrollLeft,d=a.scrollTop;u&&(a.scrollTop+=u),l&&(a.scrollLeft+=l);var h=a.scrollLeft-f,m=a.scrollTop-d;t={left:t.left-h,top:t.top-m,right:t.right-h,bottom:t.bottom-m}}if(s)break}}function M(e){for(var t=[],n=e.ownerDocument;e&&(t.push({dom:e,top:e.scrollTop,left:e.scrollLeft}),e!=n);e=p(e));return t}function E(e,t){for(var n=0;n=s){a=Math.max(d.bottom,a),s=Math.min(d.top,s);var p=d.left>t.left?d.left-t.left:d.right=(d.left+d.right)/2?1:0));continue}}!n&&(t.left>=d.right&&t.top>=d.top||t.left>=d.left&&t.top>=d.bottom)&&(i=l+1)}}return n&&3==n.nodeType?function(e,t){for(var n=e.nodeValue.length,r=document.createRange(),o=0;o=(i.left+i.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||o&&1==n.nodeType?{node:e,offset:i}:T(n,r)}function L(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function A(e,t){var n,r,o,i,s=e.root;if(s.caretPositionFromPoint)try{var c=s.caretPositionFromPoint(t.left,t.top);c&&(o=(n=c).offsetNode,i=n.offset)}catch(e){}if(!o&&s.caretRangeFromPoint){var l=s.caretRangeFromPoint(t.left,t.top);l&&(o=(r=l).startContainer,i=r.startOffset)}var u,f=s.elementFromPoint(t.left,t.top+1);if(a.safari&&f.draggable&&(o=i=null),!f||!e.dom.contains(1!=f.nodeType?f.parentNode:f)){var d=e.dom.getBoundingClientRect();if(!L(t,d))return null;if(!(f=function e(t,n,r){var o=t.childNodes.length;if(o&&r.topt.top&&i++}o==e.dom&&i==o.childNodes.length-1&&1==o.lastChild.nodeType&&t.top>o.lastChild.getBoundingClientRect().bottom?u=e.state.doc.content.size:0!=i&&1==o.nodeType&&"BR"==o.childNodes[i-1].nodeName||(u=function(e,t,n,r){for(var o=-1,i=t;i!=e.dom;){var a=e.docView.nearestDesc(i,!0);if(!a)return null;if(a.node.isBlock&&a.parent){var s=a.dom.getBoundingClientRect();if(s.left>r.left||s.top>r.top)o=a.posBefore;else{if(!(s.right-1?o:e.docView.posFromDOM(t,n)}(e,o,i,t))}null==u&&(u=function(e,t,n){var r=T(t,n),o=r.node,i=r.offset,a=-1;if(1==o.nodeType&&!o.firstChild){var s=o.getBoundingClientRect();a=s.left!=s.right&&n.left>(s.left+s.right)/2?1:-1}return e.docView.posFromDOM(o,i,a)}(e,f,t));var m=e.docView.nearestDesc(f,!0);return{pos:u,inside:m?m.posAtStart-m.border:-1}}function z(e,t){var n=e.getClientRects();return n.length?n[t<0?0:n.length-1]:e.getBoundingClientRect()}function P(e,t){var n=e.docView.domFromPos(t),r=n.node,o=n.offset;if(3==r.nodeType&&(a.webkit||a.gecko)){var i=z(h(r,o,o),0);if(a.gecko&&o&&/\s/.test(r.nodeValue[o-1])&&o0&&ol.top&&("up"==n?l.bottomi.bottom-1))return!1}}return!0}))}(e,t,n):function(e,t,n){var r=t.selection.$head;if(!r.parent.isTextblock)return!1;var o=r.parentOffset,i=!o,a=o==r.parent.content.size,s=getSelection();return N.test(r.parent.textContent)&&s.modify?D(e,t,(function(){var t=s.getRangeAt(0),o=s.focusNode,i=s.focusOffset,a=s.caretBidiLevel;s.modify("move",n,"character");var c=!(r.depth?e.docView.domAfterPos(r.before()):e.dom).contains(1==s.focusNode.nodeType?s.focusNode:s.focusNode.parentNode)||o==s.focusNode&&i==s.focusOffset;return s.removeAllRanges(),s.addRange(t),null!=a&&(s.caretBidiLevel=a),c})):"left"==n||"backward"==n?i:a}(e,t,n))}var V=function(e,t,n,r){this.parent=e,this.children=t,this.dom=n,n.pmViewDesc=this,this.contentDOM=r,this.dirty=0},B={beforePosition:{configurable:!0},size:{configurable:!0},border:{configurable:!0},posBefore:{configurable:!0},posAtStart:{configurable:!0},posAfter:{configurable:!0},posAtEnd:{configurable:!0},contentLost:{configurable:!0}};V.prototype.matchesWidget=function(){return!1},V.prototype.matchesMark=function(){return!1},V.prototype.matchesNode=function(){return!1},V.prototype.matchesHack=function(){return!1},B.beforePosition.get=function(){return!1},V.prototype.parseRule=function(){return null},V.prototype.stopEvent=function(){return!1},B.size.get=function(){for(var e=0,t=0;t0:s)?this.posAtEnd:this.posAtStart},V.prototype.nearestDesc=function(e,t){for(var n=!0,r=e;r;r=r.parentNode){var o=this.getDesc(r);if(o&&(!t||o.node)){if(!n||!o.nodeDOM||(1==o.nodeDOM.nodeType?o.nodeDOM.contains(1==e.nodeType?e:e.parentNode):o.nodeDOM==e))return o;n=!1}}},V.prototype.getDesc=function(e){for(var t=e.pmViewDesc,n=t;n;n=n.parent)if(n==this)return t},V.prototype.posFromDOM=function(e,t,n){for(var r=e;;r=r.parentNode){var o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}},V.prototype.descAt=function(e){for(var t=0,n=0;t=l&&t<=c-s.border&&s.node&&s.contentDOM&&this.contentDOM.contains(s.contentDOM))return s.parseRange(e,t,l);e=i;for(var u=a;u>0;u--){var f=this.children[u-1];if(f.size&&f.dom.parentNode==this.contentDOM&&!f.emptyChildAt(1)){r=d(f.dom)+1;break}e-=f.size}-1==r&&(r=0)}if(r>-1&&t<=c){t=c;for(var p=a+1;ps&&it){var h=u;u=f,f=h}var g=document.createRange();g.setEnd(f.node,f.offset),g.setStart(u.node,u.offset),d.removeAllRanges(),d.addRange(g)}}},V.prototype.ignoreMutation=function(e){return!this.contentDOM&&"selection"!=e.type},B.contentLost.get=function(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)},V.prototype.markDirty=function(e,t){for(var n=0,r=0;r=n:en){var a=n+o.border,s=i-o.border;if(e>=a&&t<=s)return this.dirty=e==n||t==i?2:1,void(e!=a||t!=s||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-a,t-a):o.dirty=3);o.dirty=3}n=i}this.dirty=2},V.prototype.markParentsDirty=function(){for(var e=1,t=this.parent;t;t=t.parent,e++){var n=1==e?2:1;t.dirty0&&(i=ce(i,0,e,r));for(var s=0;s=0&&!c&&s.syncToMarks(a==n.node.childCount?o.Mark.none:n.node.child(a).marks,r,e),s.placeWidget(t,e,i)}),(function(t,n,o,a){s.syncToMarks(t.marks,r,e),s.findNodeMatch(t,n,o,a)||s.updateNextNode(t,n,o,e,a)||s.addNode(t,n,o,e,i),i+=t.nodeSize})),s.syncToMarks(Y,r,e),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),this.renderChildren())},t.prototype.renderChildren=function(){!function e(t,n){for(var r=t.firstChild,o=0;ot+this.node.content.size)){var a=e.root.getSelection(),s=function(e,t){for(;;){if(3==e.nodeType)return e;if(1==e.nodeType&&t>0){if(e.childNodes.length>t&&3==e.childNodes[t].nodeType)return e.childNodes[t];e=e.childNodes[t-1],t=y(e)}else{if(!(1==e.nodeType&&t=n){var u=c.lastIndexOf(t,r-s);if(u>=0&&u+t.length+s>=n)return s+u}}}return-1}(this.node.content,c,o-t,i-t);return l<0?null:{node:s,pos:l,text:c}}}},t.prototype.protectLocalComposition=function(e,t){var n=t.node,r=t.pos,o=t.text;if(!this.getDesc(n)){for(var i=n;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=null)}var a=new W(this,i,n,o);e.compositionNodes.push(a),this.children=ce(this.children,r,r+o.length,e,a)}},t.prototype.update=function(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)},t.prototype.updateInner=function(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0},t.prototype.updateOuterDeco=function(e){if(!oe(e,this.outerDeco)){var t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=te(this.dom,this.nodeDOM,ee(this.outerDeco,this.node,t),ee(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=null,this.dom.pmViewDesc=this),this.outerDeco=e}},t.prototype.selectNode=function(){this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)},t.prototype.deselectNode=function(){this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable")},Object.defineProperties(t.prototype,n),t}(V);function K(e,t,n,r,o){return re(r,t,e),new q(null,e,t,n,r,r,r,o,0)}var G=function(e){function t(t,n,r,o,i,a,s){e.call(this,t,n,r,o,i,null,a,s)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){return{skip:this.nodeDOM.parentNode||!0}},t.prototype.update=function(e,t){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text),this.node=e,this.dirty=0,!0)},t.prototype.inParent=function(){for(var e=this.parent.contentDOM,t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1},t.prototype.domFromPos=function(e){return{node:this.nodeDOM,offset:e}},t.prototype.localPosFromDOM=function(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):e.prototype.localPosFromDOM.call(this,t,n,r)},t.prototype.ignoreMutation=function(e){return"characterData"!=e.type&&"selection"!=e.type},t.prototype.slice=function(e,n,r){var o=this.node.cut(e,n),i=document.createTextNode(o.text);return new t(this.parent,o,this.outerDeco,this.innerDeco,i,i,r)},t}(q),J=function(e){function t(){e.apply(this,arguments)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.parseRule=function(){return{ignore:!0}},t.prototype.matchesHack=function(){return 0==this.dirty},t}(V),X=function(e){function t(t,n,r,o,i,a,s,c,l,u){e.call(this,t,n,r,o,i,a,s,l,u),this.spec=c}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.update=function(t,n,r,o){if(3==this.dirty)return!1;if(this.spec.update){var i=this.spec.update(t,n);return i&&this.updateInner(t,n,r,o),i}return!(!this.contentDOM&&!t.isLeaf)&&e.prototype.update.call(this,t,n,r,o)},t.prototype.selectNode=function(){this.spec.selectNode?this.spec.selectNode():e.prototype.selectNode.call(this)},t.prototype.deselectNode=function(){this.spec.deselectNode?this.spec.deselectNode():e.prototype.deselectNode.call(this)},t.prototype.setSelection=function(t,n,r,o){this.spec.setSelection?this.spec.setSelection(t,n,r):e.prototype.setSelection.call(this,t,n,r,o)},t.prototype.destroy=function(){this.spec.destroy&&this.spec.destroy(),e.prototype.destroy.call(this)},t.prototype.stopEvent=function(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)},t.prototype.ignoreMutation=function(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):e.prototype.ignoreMutation.call(this,t)},t}(q);function Q(e){e&&(this.nodeName=e)}Q.prototype=Object.create(null);var Z=[new Q];function ee(e,t,n){if(0==e.length)return Z;for(var r=n?Z[0]:new Q,o=[r],i=0;i0&&o>=0;o--){var i=t[o],a=i.node;if(a){if(a!=e.child(r-1))break;n.push(i),--r}}return{nodes:n.reverse(),offset:r}}(e.node.content,e.children);this.preMatched=n.nodes,this.preMatchOffset=n.offset};function se(e,t){return e.type.side-t.type.side}function ce(e,t,n,r,o){for(var i=[],a=0,s=0;a=n||u<=t?i.push(c):(ln&&i.push(c.slice(n-l,c.size,r)))}return i}function le(e,t){var n=e.selection,o=n.$anchor,i=n.$head,a=t>0?o.max(i):o.min(i),s=a.parent.inlineContent?a.depth?e.doc.resolve(t>0?a.after():a.before()):null:a;return s&&r.Selection.findFrom(s,t)}function ue(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function fe(e,t,n){var o=e.state.selection;if(!(o instanceof r.TextSelection)){if(o instanceof r.NodeSelection&&o.node.isInline)return ue(e,new r.TextSelection(t>0?o.$to:o.$from));var i=le(e.state,t);return!!i&&ue(e,i)}if(!o.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){var s=le(e.state,t);return!!(s&&s instanceof r.NodeSelection)&&ue(e,s)}if(!a.mac||!n.indexOf("m")){var c,l=o.$head,u=l.textOffset?null:t<0?l.nodeBefore:l.nodeAfter;if(!u||u.isText)return!1;var f=t<0?l.pos-u.nodeSize:l.pos;return!!(u.isAtom||(c=e.docView.descAt(f))&&!c.contentDOM)&&(r.NodeSelection.isSelectable(u)?ue(e,new r.NodeSelection(t<0?e.state.doc.resolve(l.pos-u.nodeSize):l)):!!a.webkit&&ue(e,new r.TextSelection(e.state.doc.resolve(t<0?f:f+u.nodeSize))))}}function de(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function pe(e){var t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function he(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){var o,i,s=!1;for(a.gecko&&1==n.nodeType&&r0){if(1!=n.nodeType)break;var c=n.childNodes[r-1];if(pe(c))o=n,i=--r;else{if(3!=c.nodeType)break;r=(n=c).nodeValue.length}}else{if(ge(n))break;for(var l=n.previousSibling;l&&pe(l);)o=n.parentNode,i=d(l),l=l.previousSibling;if(l)r=de(n=l);else{if((n=n.parentNode)==e.dom)break;r=0}}s?ve(e,t,n,r):o&&ve(e,t,o,i)}}function me(e){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n){for(var o,i,a=de(n);;)if(r-1)return!1;if(a.mac&&n.indexOf("m"))return!1;var i=o.$from,s=o.$to;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){var c=le(e.state,t);if(c&&c instanceof r.NodeSelection)return ue(e,c)}if(!i.parent.inlineContent){var l=r.Selection.findFrom(t<0?i:s,t);return!l||ue(e,l)}return!1}function be(e,t){if(!(e.state.selection instanceof r.TextSelection))return!0;var n=e.state.selection,o=n.$head,i=n.$anchor,a=n.empty;if(!o.sameParent(i))return!0;if(!a)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;var s=!o.textOffset&&(t<0?o.nodeBefore:o.nodeAfter);if(s&&!s.isText){var c=e.state.tr;return t<0?c.delete(o.pos-s.nodeSize,o.pos):c.delete(o.pos,o.pos+s.nodeSize),e.dispatch(c),!0}return!1}function we(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function _e(e,t){var n=t.keyCode,r=function(e){var t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||a.mac&&72==n&&"c"==r?be(e,-1)||he(e):46==n||a.mac&&68==n&&"c"==r?be(e,1)||me(e):13==n||27==n||(37==n?fe(e,-1,r)||he(e):39==n?fe(e,1,r)||me(e):38==n?ye(e,-1,r)||he(e):40==n?function(e){if(a.chrome&&!(e.state.selection.$head.parentOffset>0)){var t=e.root.getSelection(),n=t.focusNode,r=t.focusOffset;if(n&&1==n.nodeType&&0==r&&n.firstChild&&"false"==n.firstChild.contentEditable){var o=n.firstChild;we(e,o,!0),setTimeout((function(){return we(e,o,!1)}),20)}}}(e)||ye(e,1,r)||me(e):r==(a.mac?"m":"c")&&(66==n||73==n||89==n||90==n))}function xe(e,t){var n,o,i=e.root.getSelection(),a=e.state.doc,s=e.docView.nearestDesc(i.focusNode),c=s&&0==s.size,l=e.docView.posFromDOM(i.focusNode,i.focusOffset),u=a.resolve(l);if(w(i)){for(n=u;s&&!s.node;)s=s.parent;if(s&&s.node.isAtom&&r.NodeSelection.isSelectable(s.node)&&s.parent&&(!s.node.isInline||!function(e,t,n){for(var r=0==t,o=t==y(e);r||o;){if(e==n)return!0;var i=d(e);if(!(e=e.parentNode))return!1;r=r&&0==i,o=o&&i==y(e)}}(i.focusNode,i.focusOffset,s.dom))){var f=s.posBefore;o=new r.NodeSelection(l==f?u:a.resolve(f))}}else n=a.resolve(e.docView.posFromDOM(i.anchorNode,i.anchorOffset));o||(o=Le(e,n,u,"pointer"==t||e.state.selection.head=this.preMatchOffset?this.preMatched[e-this.preMatchOffset]:null},ae.prototype.destroyBetween=function(e,t){if(e!=t){for(var n=e;n>1,i=Math.min(o,e.length);r-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{var c=U.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,c),this.top=c,this.changed=!0}this.index=0,o++}},ae.prototype.findNodeMatch=function(e,t,n,r){var o=-1,i=r<0?void 0:this.getPreMatch(r),a=this.top.children;if(i&&i.matchesNode(e,t,n))o=a.indexOf(i);else for(var s=this.index,c=Math.min(a.length,s+5);s-1&&s+this.preMatchOffset!=o)return!1;var c=a.dom;if(!(this.lock&&(c==this.lock||1==c.nodeType&&c.contains(this.lock.parentNode))&&!(e.isText&&a.node&&a.node.isText&&a.nodeDOM.nodeValue==e.text&&3!=a.dirty&&oe(t,a.outerDeco)))&&a.update(e,t,n,r))return this.destroyBetween(this.index,i),a.dom!=c&&(this.changed=!0),this.index++,!0;break}}return!1},ae.prototype.addNode=function(e,t,n,r,o){this.top.children.splice(this.index++,0,q.create(this.top,e,t,n,r,o)),this.changed=!0},ae.prototype.placeWidget=function(e,t,n){if(this.indexDate.now()-50?e.lastSelectionOrigin:null,l=xe(e,c);if(!e.state.selection.eq(l)){var u=e.state.tr.setSelection(l);"pointer"==c?u.setMeta("pointer",!0):"key"==c&&u.scrollIntoView(),e.dispatch(u)}}else{var f=e.state.doc.resolve(t),d=f.sharedDepth(n);t=f.before(d+1),n=e.state.doc.resolve(n).after(d+1);var p,h,m=e.state.selection,g=function(e,t,n){var r=e.docView.parseRange(t,n),i=r.node,s=r.fromOffset,c=r.toOffset,l=r.from,u=r.to,f=e.root.getSelection(),d=null,p=f.anchorNode;if(p&&e.dom.contains(1==p.nodeType?p:p.parentNode)&&(d=[{node:p,offset:f.anchorOffset}],w(f)||d.push({node:f.focusNode,offset:f.focusOffset})),a.chrome&&8===e.lastKeyCode)for(var h=c;h>s;h--){var m=i.childNodes[h-1],g=m.pmViewDesc;if("BR"==m.nodeType&&!g){c=h;break}if(!g||g.size)break}var v=e.state.doc,y=e.someProp("domParser")||o.DOMParser.fromSchema(e.state.schema),b=v.resolve(l),_=null,x=y.parse(i,{topNode:b.parent,topMatch:b.parent.contentMatchAt(b.index()),topOpen:!0,from:s,to:c,preserveWhitespace:!b.parent.type.spec.code||"full",editableContent:!0,findPositions:d,ruleFromNode:ze,context:b});if(d&&null!=d[0].pos){var k=d[0].pos,S=d[1]&&d[1].pos;null==S&&(S=k),_={anchor:k+l,head:S+l}}return{doc:x,sel:_,from:l,to:u}}(e,t,n),v=e.state.doc,y=v.slice(g.from,g.to);8===e.lastKeyCode&&Date.now()-100=s?i-r:0)+(c-s),s=i}else if(c=c?i-r:0)+(s-c),c=i}return{start:i,endA:s,endB:c}}(y.content,g.doc.content,g.from,p,h);if(!b){if(!(i&&m instanceof r.TextSelection&&!m.empty&&m.$head.sameParent(m.$anchor))||e.composing||g.sel&&g.sel.anchor!=g.sel.head){if(g.sel){var x=je(e,e.state.doc,g.sel);x&&!x.eq(e.state.selection)&&e.dispatch(e.state.tr.setSelection(x))}return}b={start:m.from,endA:m.to,endB:m.to}}e.domChangeCount++,e.state.selection.frome.state.selection.from&&b.start<=e.state.selection.from+2?b.start=e.state.selection.from:b.endA=e.state.selection.to-2&&(b.endB+=e.state.selection.to-b.endA,b.endA=e.state.selection.to)),a.ie&&a.ie_version<=11&&b.endB==b.start+1&&b.endA==b.start&&b.start>g.from&&"  "==g.doc.textBetween(b.start-g.from-1,b.start-g.from+1)&&(b.start--,b.endA--,b.endB--);var k,S=g.doc.resolveNoCache(b.start-g.from),C=g.doc.resolveNoCache(b.endB-g.from),M=S.sameParent(C)&&S.parent.inlineContent;if((a.ios&&e.lastIOSEnter>Date.now()-100&&(!M||s.some((function(e){return"DIV"==e.nodeName||"P"==e.nodeName})))||!M&&S.posb.start&&function(e,t,n,r,o){if(!r.parent.isTextblock||n-t<=o.pos-r.pos||De(r,!0,!1)n||De(a,!0,!1)t.content.size?null:Le(e,t.resolve(n.anchor),t.resolve(n.head))}function De(e,t,n){for(var r=e.depth,o=t?e.end():e.pos;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n)for(var i=e.node(r).maybeChild(e.indexAfter(r));i&&!i.isLeaf;)i=i.firstChild,o++;return o}function Ne(e,t){for(var n=[],r=t.content,i=t.openStart,a=t.openEnd;i>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount;){i--,a--;var s=r.firstChild;n.push(s.type.name,s.type.hasRequiredAttrs()?s.attrs:null),r=s.content}var c=e.someProp("clipboardSerializer")||o.DOMSerializer.fromSchema(e.state.schema),l=Be(),u=l.createElement("div");u.appendChild(c.serializeFragment(r,{document:l}));for(var f,d=u.firstChild;d&&1==d.nodeType&&(f=Ie[d.nodeName.toLowerCase()]);){for(var p=f.length-1;p>=0;p--){for(var h=l.createElement(f[p]);u.firstChild;)h.appendChild(u.firstChild);u.appendChild(h)}d=u.firstChild}return d&&1==d.nodeType&&d.setAttribute("data-pm-slice",i+" "+a+" "+JSON.stringify(n)),{dom:u,text:e.someProp("clipboardTextSerializer",(function(e){return e(t)}))||t.content.textBetween(0,t.content.size,"\n\n")}}function Fe(e,t,n,r,i){var a,s,c=i.parent.type.spec.code;if(!n&&!t)return null;var l=t&&(r||c||!n);if(l){if(e.someProp("transformPastedText",(function(e){t=e(t)})),c)return new o.Slice(o.Fragment.from(e.state.schema.text(t)),0,0);var u=e.someProp("clipboardTextParser",(function(e){return e(t,i)}));u?s=u:(a=document.createElement("div"),t.trim().split(/(?:\r\n?|\n)+/).forEach((function(e){a.appendChild(document.createElement("p")).textContent=e})))}else e.someProp("transformPastedHTML",(function(e){n=e(n)})),a=function(e){var t=/(\s*]*>)*/.exec(e);t&&(e=e.slice(t[0].length));var n,r=Be().createElement("div"),o=/(?:]*>)*<([a-z][^>\s]+)/i.exec(e),i=0;(n=o&&Ie[o[1].toLowerCase()])&&(e=n.map((function(e){return"<"+e+">"})).join("")+e+n.map((function(e){return""})).reverse().join(""),i=n.length);r.innerHTML=e;for(var a=0;a=0;c-=2){var l=r.nodes[n[c]];if(!l||l.hasRequiredAttrs())break;i=o.Fragment.from(l.create(n[c+1],i)),a++,s++}return new o.Slice(i,a,s)}(function(e,t,n){t=0;r--){var i=n(r);if(i)return i.v}return e}(s.content,i),!1),e.someProp("transformPasted",(function(e){s=e(s)})),s}function Re(e,t,n){void 0===n&&(n=0);for(var r=t.length-1;r>=n;r--)e=t[r].create(null,o.Fragment.from(e));return e}function He(e,t,n,r,i,a){var s=t<0?e.firstChild:e.lastChild,c=s.content;return i=n&&(c=t<0?s.contentMatchAt(0).fillBefore(c,e.childCount>1||a<=i).append(c):c.append(s.contentMatchAt(s.childCount).fillBefore(o.Fragment.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(c))}var Ie={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]},Ve=null;function Be(){return Ve||(Ve=document.implementation.createHTMLDocument("title"))}var Ye={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},$e=a.ie&&a.ie_version<=11,We=function(){this.anchorNode=this.anchorOffset=this.focusNode=this.focusOffset=null};We.prototype.set=function(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset},We.prototype.eq=function(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset};var Ue=function(e,t){var n=this;this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=window.MutationObserver&&new window.MutationObserver((function(e){for(var t=0;te.target.nodeValue.length}))?n.flushSoon():n.flush()})),this.currentSelection=new We,$e&&(this.onCharData=function(e){n.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),n.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.suppressingSelectionUpdates=!1};Ue.prototype.flushSoon=function(){var e=this;this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((function(){e.flushingSoon=-1,e.flush()}),20))},Ue.prototype.forceFlush=function(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())},Ue.prototype.start=function(){this.observer&&this.observer.observe(this.view.dom,Ye),$e&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()},Ue.prototype.stop=function(){var e=this;if(this.observer){var t=this.observer.takeRecords();if(t.length){for(var n=0;n-1)){var e=this.observer?this.observer.takeRecords():[];this.queue.length&&(e=this.queue.concat(e),this.queue.length=0);var t=this.view.root.getSelection(),n=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(t)&&Ae(this.view)&&!this.ignoreSelectionChange(t),r=-1,o=-1,i=!1,s=[];if(this.view.editable)for(var c=0;c1){var u=s.filter((function(e){return"BR"==e.nodeName}));if(2==u.length){var f=u[0],d=u[1];f.parentNode&&f.parentNode.parentNode==d.parentNode?d.remove():f.remove()}}(r>-1||n)&&(r>-1&&(this.view.docView.markDirty(r,o),function(e){if(qe)return;qe=!0,"normal"==getComputedStyle(e.dom).whiteSpace&&console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.")}(this.view)),this.handleDOMChange(r,o,i,s),this.view.docView.dirty?this.view.updateState(this.view.state):this.currentSelection.eq(t)||ke(this.view))}},Ue.prototype.registerMutation=function(e,t){if(t.indexOf(e.target)>-1)return null;var n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){var r=e.previousSibling,o=e.nextSibling;if(a.ie&&a.ie_version<=11&&e.addedNodes.length)for(var i=0;ii.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1)})))return{v:!0}},s=i.depth+1;s>0;s--){var c=a(s);if(c)return c.v}return!1}function tt(e,t,n){e.focused||e.focus();var r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function nt(e,t,n,o,i){return et(e,"handleClickOn",t,n,o)||e.someProp("handleClick",(function(n){return n(e,t,o)}))||(i?function(e,t){if(-1==t)return!1;var n,o,i=e.state.selection;i instanceof r.NodeSelection&&(n=i.node);for(var a=e.state.doc.resolve(t),s=a.depth+1;s>0;s--){var c=s>a.depth?a.nodeAfter:a.node(s);if(r.NodeSelection.isSelectable(c)){o=n&&i.$from.depth>0&&s>=i.$from.depth&&a.before(i.$from.depth+1)==i.$from.pos?a.before(i.$from.depth):a.before(s);break}}return null!=o&&(tt(e,r.NodeSelection.create(e.state.doc,o),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;var n=e.state.doc.resolve(t),o=n.nodeAfter;return!!(o&&o.isAtom&&r.NodeSelection.isSelectable(o))&&(tt(e,new r.NodeSelection(n),"pointer"),!0)}(e,n))}function rt(e,t,n,r){return et(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(function(n){return n(e,t,r)}))}function ot(e,t,n,o){return et(e,"handleTripleClickOn",t,n,o)||e.someProp("handleTripleClick",(function(n){return n(e,t,o)}))||function(e,t){var n=e.state.doc;if(-1==t)return!!n.inlineContent&&(tt(e,r.TextSelection.create(n,0,n.content.size),"pointer"),!0);for(var o=n.resolve(t),i=o.depth+1;i>0;i--){var a=i>o.depth?o.nodeAfter:o.node(i),s=o.before(i);if(a.inlineContent)tt(e,r.TextSelection.create(n,s+1,s+1+a.content.size),"pointer");else{if(!r.NodeSelection.isSelectable(a))continue;tt(e,r.NodeSelection.create(n,s),"pointer")}return!0}}(e,n)}function it(e){return ft(e)}Ge.keydown=function(e,t){if(e.shiftKey=16==t.keyCode||t.shiftKey,!ct(e,t))if(e.domObserver.forceFlush(),e.lastKeyCode=t.keyCode,e.lastKeyCodeTime=Date.now(),!a.ios||13!=t.keyCode||t.ctrlKey||t.altKey||t.metaKey)e.someProp("handleKeyDown",(function(n){return n(e,t)}))||_e(e,t)?t.preventDefault():Je(e,"key");else{var n=Date.now();e.lastIOSEnter=n,setTimeout((function(){e.lastIOSEnter==n&&(e.someProp("handleKeyDown",(function(t){return t(e,_(13,"Enter"))})),e.lastIOSEnter=0)}),50)}},Ge.keyup=function(e,t){16==t.keyCode&&(e.shiftKey=!1)},Ge.keypress=function(e,t){if(!(ct(e,t)||!t.charCode||t.ctrlKey&&!t.altKey||a.mac&&t.metaKey))if(e.someProp("handleKeyPress",(function(n){return n(e,t)})))t.preventDefault();else{var n=e.state.selection;if(!(n instanceof r.TextSelection&&n.$from.sameParent(n.$to))){var o=String.fromCharCode(t.charCode);e.someProp("handleTextInput",(function(t){return t(e,n.$from.pos,n.$to.pos,o)}))||e.dispatch(e.state.tr.insertText(o).scrollIntoView()),t.preventDefault()}}};var at=a.mac?"metaKey":"ctrlKey";Ke.mousedown=function(e,t){e.shiftKey=t.shiftKey;var n=it(e),r=Date.now(),o="singleClick";r-e.lastClick.time<500&&function(e,t){var n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(t,e.lastClick)&&!t[at]&&("singleClick"==e.lastClick.type?o="doubleClick":"doubleClick"==e.lastClick.type&&(o="tripleClick")),e.lastClick={time:r,x:t.clientX,y:t.clientY,type:o};var i=e.posAtCoords(Ze(t));i&&("singleClick"==o?e.mouseDown=new st(e,i,t,n):("doubleClick"==o?rt:ot)(e,i.pos,i.inside,t)?t.preventDefault():Je(e,"pointer"))};var st=function(e,t,n,o){var i,s,c=this;if(this.view=e,this.startDoc=e.state.doc,this.pos=t,this.event=n,this.flushed=o,this.selectNode=n[at],this.allowDefault=n.shiftKey,t.inside>-1)i=e.state.doc.nodeAt(t.inside),s=t.inside;else{var l=e.state.doc.resolve(t.pos);i=l.parent,s=l.depth?l.before():0}this.mightDrag=null;var u=o?null:n.target,f=u?e.docView.nearestDesc(u,!0):null;this.target=f?f.dom:null,(i.type.spec.draggable&&!1!==i.type.spec.selectable||e.state.selection instanceof r.NodeSelection&&s==e.state.selection.from)&&(this.mightDrag={node:i,pos:s,addAttr:this.target&&!this.target.draggable,setUneditable:this.target&&a.gecko&&!this.target.hasAttribute("contentEditable")}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((function(){return c.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Je(e,"pointer")};function ct(e,t){return!!e.composing||!!(a.safari&&Math.abs(t.timeStamp-e.compositionEndedAt)<500)&&(e.compositionEndedAt=-2e8,!0)}st.prototype.done=function(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.view.mouseDown=null},st.prototype.up=function(e){if(this.done(),this.view.dom.contains(3==e.target.nodeType?e.target.parentNode:e.target)){var t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Ze(e))),this.allowDefault||!t?Je(this.view,"pointer"):nt(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():this.flushed||a.safari&&this.mightDrag&&!this.mightDrag.node.isAtom||a.chrome&&!(this.view.state.selection instanceof r.TextSelection)&&(t.pos==this.view.state.selection.from||t.pos==this.view.state.selection.to)?(tt(this.view,r.Selection.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Je(this.view,"pointer")}},st.prototype.move=function(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),Je(this.view,"pointer")},Ke.touchdown=function(e){it(e),Je(e,"pointer")},Ke.contextmenu=function(e){return it(e)};var lt=a.android?5e3:-1;function ut(e,t){clearTimeout(e.composingTimeout),t>-1&&(e.composingTimeout=setTimeout((function(){return ft(e)}),t))}function ft(e,t){for(e.domObserver.forceFlush(),e.composing=!1;e.compositionNodes.length>0;)e.compositionNodes.pop().markParentsDirty();if(t||e.docView.dirty){var n=xe(e);return n.eq(e.state.selection)?e.updateState(e.state):e.dispatch(e.state.tr.setSelection(n)),!0}return!1}Ge.compositionstart=Ge.compositionupdate=function(e){if(!e.composing){e.domObserver.flush();var t=e.state,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((function(e){return!1===e.type.spec.inclusive}))))e.markCursor=e.state.storedMarks||n.marks(),ft(e,!0),e.markCursor=null;else if(ft(e),a.gecko&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length)for(var r=e.root.getSelection(),o=r.focusNode,i=r.focusOffset;o&&1==o.nodeType&&0!=i;){var s=i<0?o.lastChild:o.childNodes[i-1];if(!s)break;if(3==s.nodeType){r.collapse(s,s.nodeValue.length);break}o=s,i=-1}e.composing=!0}ut(e,lt)},Ge.compositionend=function(e,t){e.composing&&(e.composing=!1,e.compositionEndedAt=t.timeStamp,ut(e,20))};var dt=a.ie&&a.ie_version<15||a.ios&&a.webkit_version<604;function pt(e,t,n,r){var i=Fe(e,t,n,e.shiftKey,e.state.selection.$from);if(!e.someProp("handlePaste",(function(t){return t(e,r,i||o.Slice.empty)}))&&i){var a=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(i),s=a?e.state.tr.replaceSelectionWith(a,e.shiftKey):e.state.tr.replaceSelection(i);e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste"))}}Ke.copy=Ge.cut=function(e,t){var n=e.state.selection,r="cut"==t.type;if(!n.empty){var o=dt?null:t.clipboardData,i=Ne(e,n.content()),a=i.dom,s=i.text;o?(t.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",s)):function(e,t){if(e.dom.parentNode){var n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";var r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((function(){n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}}(e,a),r&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))}},Ge.paste=function(e,t){var n=dt?null:t.clipboardData,r=n&&n.getData("text/html"),o=n&&n.getData("text/plain");n&&(r||o||n.files.length)?(pt(e,o,r,t),t.preventDefault()):function(e,t){if(e.dom.parentNode){var n=e.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((function(){e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?pt(e,r.value,null,t):pt(e,r.textContent,r.innerHTML,t)}),50)}}(e,t)};var ht=function(e,t){this.slice=e,this.move=t},mt=a.mac?"altKey":"ctrlKey";for(var gt in Ke.dragstart=function(e,t){var n=e.mouseDown;if(n&&n.done(),t.dataTransfer){var o=e.state.selection,i=o.empty?null:e.posAtCoords(Ze(t));if(i&&i.pos>=o.from&&i.pos<=(o instanceof r.NodeSelection?o.to-1:o.to));else if(n&&n.mightDrag)e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,n.mightDrag.pos)));else if(t.target&&1==t.target.nodeType){var a=e.docView.nearestDesc(t.target,!0);if(!a||!a.node.type.spec.draggable||a==e.docView)return;e.dispatch(e.state.tr.setSelection(r.NodeSelection.create(e.state.doc,a.posBefore)))}var s=e.state.selection.content(),c=Ne(e,s),l=c.dom,u=c.text;t.dataTransfer.clearData(),t.dataTransfer.setData(dt?"Text":"text/html",l.innerHTML),dt||t.dataTransfer.setData("text/plain",u),e.dragging=new ht(s,!t[mt])}},Ke.dragend=function(e){window.setTimeout((function(){return e.dragging=null}),50)},Ge.dragover=Ge.dragenter=function(e,t){return t.preventDefault()},Ge.drop=function(e,t){var n=e.dragging;if(e.dragging=null,t.dataTransfer){var a=e.posAtCoords(Ze(t));if(a){var s=e.state.doc.resolve(a.pos);if(s){var c=n&&n.slice||Fe(e,t.dataTransfer.getData(dt?"Text":"text/plain"),dt?null:t.dataTransfer.getData("text/html"),!1,s);if(e.someProp("handleDrop",(function(r){return r(e,t,c||o.Slice.empty,n&&n.move)})))t.preventDefault();else if(c){t.preventDefault();var l=c?Object(i.dropPoint)(e.state.doc,s.pos,c):s.pos;null==l&&(l=s.pos);var u=e.state.tr;n&&n.move&&u.deleteSelection();var f=u.mapping.map(l),d=0==c.openStart&&0==c.openEnd&&1==c.content.childCount,p=u.doc;if(d?u.replaceRangeWith(f,f,c.content.firstChild):u.replaceRange(f,f,c),!u.doc.eq(p)){var h=u.doc.resolve(f);d&&r.NodeSelection.isSelectable(c.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(c.content.firstChild)?u.setSelection(new r.NodeSelection(h)):u.setSelection(Le(e,h,u.doc.resolve(u.mapping.map(l)))),e.focus(),e.dispatch(u.setMeta("uiEvent","drop"))}}}}}},Ke.focus=function(e){e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((function(){e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.root.getSelection())&&ke(e)}),20))},Ke.blur=function(e){e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),e.domObserver.currentSelection.set({}),e.focused=!1)},Ke.beforeinput=function(e,t){if(a.chrome&&a.android&&"deleteContentBackward"==t.inputType){var n=e.domChangeCount;setTimeout((function(){if(e.domChangeCount==n&&(e.dom.blur(),e.focus(),!e.someProp("handleKeyDown",(function(t){return t(e,_(8,"Backspace"))})))){var t=e.state.selection.$cursor;t&&t.pos>0&&e.dispatch(e.state.tr.delete(t.pos-1,t.pos).scrollIntoView())}}),50)}},Ge)Ke[gt]=Ge[gt];function vt(e,t){if(e==t)return!0;for(var n in e)if(e[n]!==t[n])return!1;for(var r in t)if(!(r in e))return!1;return!0}var yt=function(e,t){this.spec=t||St,this.side=this.spec.side||0,this.toDOM=e};yt.prototype.map=function(e,t,n,r){var o=e.mapResult(t.from+r,this.side<0?-1:1),i=o.pos;return o.deleted?null:new _t(i-n,i-n,this)},yt.prototype.valid=function(){return!0},yt.prototype.eq=function(e){return this==e||e instanceof yt&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&vt(this.spec,e.spec))};var bt=function(e,t){this.spec=t||St,this.attrs=e};bt.prototype.map=function(e,t,n,r){var o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new _t(o,i,this)},bt.prototype.valid=function(e,t){return t.from=e&&(!o||o(a.spec))&&n.push(a.copy(a.from+r,a.to+r))}for(var s=0;se){var c=this.children[s]+1;this.children[s+2].findInner(e-c,t-c,n,r+c,o)}},Ct.prototype.map=function(e,t,n){return this==Mt||0==e.maps.length?this:this.mapInner(e,t,0,0,n||St)},Ct.prototype.mapInner=function(e,t,n,r,o){for(var i,a=0;ac+i||(t>=s[a]+i?s[a+1]=-1:n>=o&&(l=r-n-(t-e))&&(s[a]+=l,s[a+1]+=l))}},l=0;l=r.content.size){u=!0;continue}var h=n.map(e[f+1]+i,-1)-o,m=r.content.findIndex(p),g=m.index,v=m.offset,y=r.maybeChild(g);if(y&&v==p&&v+y.nodeSize==h){var b=s[f+2].mapInner(n,y,d+1,s[f]+i+1,a);b!=Mt?(s[f]=p,s[f+1]=h,s[f+2]=b):(s[f+1]=-2,u=!0)}else u=!0}if(u){var w=At(function(e,t,n,r,o,i,a){function s(e,t){for(var i=0;ia&&l.to=e){this.children[o]==e&&(n=this.children[o+2]);break}for(var i=e+1,a=i+t.content.size,s=0;si&&c.type instanceof bt){var l=Math.max(i,c.from)-i,u=Math.min(a,c.to)-i;ln&&a.to0;)t++;e.splice(t,0,n)}function Dt(e){var t=[];return e.someProp("decorations",(function(n){var r=n(e.state);r&&r!=Mt&&t.push(r)})),e.cursorWrapper&&t.push(Ct.create(e.state.doc,[e.cursorWrapper.deco])),Et.from(t)}Et.prototype.forChild=function(e,t){if(t.isLeaf)return Ct.empty;for(var n=[],r=0;ro.scrollToSelection?"to selection":"preserve",k=i||!this.docView.matchesNode(e.doc,_,w),S=k||!e.selection.eq(o.selection),O="preserve"==x&&S&&null==this.dom.style.overflowAnchor&&function(e){for(var t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top),i=(r.left+r.right)/2,a=o+1;a=o-20){t=s,n=c.top;break}}}return{refDOM:t,refTop:n,stack:M(e.dom)}}(this);if(S){this.domObserver.stop();var T=k&&(a.ie||a.chrome)&&!this.composing&&!o.selection.empty&&!e.selection.empty&&(f=o.selection,d=e.selection,p=Math.min(f.$anchor.sharedDepth(f.head),d.$anchor.sharedDepth(d.head)),f.$anchor.start(p)!=d.$anchor.start(p));if(k){var L=a.chrome&&Bt(this.root);!i&&this.docView.update(e.doc,_,w,this)||(this.docView.updateOuterDeco([]),this.docView.destroy(),this.docView=K(e.doc,_,w,this.dom,this)),L&&function(e,t){var n=Bt(t);if(!n||3==n[0].nodeType)return!1;for(var r=0;r=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["prefixCls","transitionName","animation","align","placement","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","trigger"]),v=u;return v||-1===p.indexOf("contextMenu")||(v=["click"]),o.a.createElement(l.a,g({},m,{prefixCls:t,ref:this.saveTrigger,popupClassName:f,popupStyle:d,builtinPlacements:h,action:p,showAction:c,hideAction:v||[],popupPlacement:a,popupAlign:i,popupTransitionName:n,popupAnimation:r,popupVisible:this.state.visible,afterPopupVisibleChange:this.afterVisibleChange,popup:this.getMenuElementOrLambda(),onPopupVisibleChange:this.onVisibleChange,getPopupContainer:s}),this.renderChildren())},t}(r.Component);v.propTypes={minOverlayWidthMatchTrigger:a.a.bool,onVisibleChange:a.a.func,onOverlayClick:a.a.func,prefixCls:a.a.string,children:a.a.any,transitionName:a.a.string,overlayClassName:a.a.string,openClassName:a.a.string,animation:a.a.any,align:a.a.object,overlayStyle:a.a.object,placement:a.a.string,overlay:a.a.oneOfType([a.a.node,a.a.func]),trigger:a.a.array,alignPoint:a.a.bool,showAction:a.a.array,hideAction:a.a.array,getPopupContainer:a.a.func,visible:a.a.bool,defaultVisible:a.a.bool},v.defaultProps={prefixCls:"rc-dropdown",trigger:["hover"],showAction:[],overlayClassName:"",overlayStyle:{},defaultVisible:!1,onVisibleChange:function(){},placement:"bottomLeft"};var y=function(){var e=this;this.onClick=function(t){var n=e.props,r=e.getOverlayElement().props;"visible"in n||e.setState({visible:!1}),n.onOverlayClick&&n.onOverlayClick(t),r.onClick&&r.onClick(t)},this.onVisibleChange=function(t){var n=e.props;"visible"in n||e.setState({visible:t}),n.onVisibleChange(t)},this.getMinOverlayWidthMatchTrigger=function(){var t=e.props,n=t.minOverlayWidthMatchTrigger,r=t.alignPoint;return"minOverlayWidthMatchTrigger"in e.props?n:!r},this.getMenuElement=function(){var t=e.props.prefixCls,n=e.getOverlayElement(),r={prefixCls:t+"-menu",onClick:e.onClick};return"string"==typeof n.type&&delete r.prefixCls,o.a.cloneElement(n,r)},this.afterVisibleChange=function(t){if(t&&e.getMinOverlayWidthMatchTrigger()){var n=e.getPopupDomNode(),r=c.a.findDOMNode(e);r&&n&&r.offsetWidth>n.offsetWidth&&(n.style.minWidth=r.offsetWidth+"px",e.trigger&&e.trigger._component&&e.trigger._component.alignInstance&&e.trigger._component.alignInstance.forceAlign())}},this.saveTrigger=function(t){e.trigger=t}};Object(m.polyfill)(v);var b=v,w=n(71),_=n(15),x=n(10),k=n(26);function S(e){return(S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function C(){return(C=Object.assign||function(e){for(var t=1;t=0?"slide-down":"slide-up"}},{key:"render",value:function(){return r.createElement(w.a,null,this.renderDropDown)}}])&&E(t.prototype,n),o&&E(t,o),a}(r.Component);z.defaultProps={mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft"}},function(e,t,n){var r=n(74),o=n(103);e.exports=n(75)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(90);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(184),o=n(190);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0});var i={position:"absolute",top:"-9999px",width:"50px",height:"50px"};t.INTERNAL_COL_DEFINE="RC_TABLE_INTERNAL_COL_DEFINE",t.measureScrollbar=function(e){var t=e.direction,n=void 0===t?"vertical":t,a=e.prefixCls;if("undefined"==typeof document||"undefined"==typeof window)return 0;var s="vertical"===n;if(s&&r)return r;if(!s&&o)return o;var c=document.createElement("div");Object.keys(i).forEach((function(e){c.style[e]=i[e]})),c.className="".concat(a,"-hide-scrollbar scroll-div-append-to-body"),s?c.style.overflowY="scroll":c.style.overflowX="scroll",document.body.appendChild(c);var l=0;return s?(l=c.offsetWidth-c.clientWidth,r=l):(l=c.offsetHeight-c.clientHeight,o=l),document.body.removeChild(c),l},t.debounce=function(e,t,n){var r;function o(){for(var o=arguments.length,i=new Array(o),a=0;a=0)){var o=e.props.insertExtraNode;e.extraNode=document.createElement("div");var i=m(e).extraNode;i.className="ant-click-animating-node";var s=e.getAttributeName();t.setAttribute(s,"true"),r=r||document.createElement("style"),n&&"#ffffff"!==n&&"rgb(255, 255, 255)"!==n&&y(n)&&!/rgba\(\d*, \d*, \d*, 0\)/.test(n)&&"transparent"!==n&&(e.csp&&e.csp.nonce&&(r.nonce=e.csp.nonce),i.style.borderColor=n,r.innerHTML="\n [ant-click-animating-without-extra-node='true']::after, .ant-click-animating-node {\n --antd-wave-shadow-color: ".concat(n,";\n }"),document.body.contains(r)||document.body.appendChild(r)),o&&t.appendChild(i),a.a.addStartEventListener(t,e.onTransitionStart),a.a.addEndEventListener(t,e.onTransitionEnd)}},e.onTransitionStart=function(t){if(!e.destroy){var n=Object(i.findDOMNode)(m(e));t&&t.target===n&&(e.animationStart||e.resetEffect(n))}},e.onTransitionEnd=function(t){t&&"fadeEffect"===t.animationName&&e.resetEffect(t.target)},e.bindAnimationEvent=function(t){if(t&&t.getAttribute&&!t.getAttribute("disabled")&&!(t.className.indexOf("disabled")>=0)){var n=function(n){if("INPUT"!==n.target.tagName&&!v(n.target)){e.resetEffect(t);var r=getComputedStyle(t).getPropertyValue("border-top-color")||getComputedStyle(t).getPropertyValue("border-color")||getComputedStyle(t).getPropertyValue("background-color");e.clickWaveTimeoutId=window.setTimeout((function(){return e.onClick(t,r)}),0),s.a.cancel(e.animationStartId),e.animationStart=!0,e.animationStartId=Object(s.a)((function(){e.animationStart=!1}),10)}};return t.addEventListener("click",n,!0),{cancel:function(){t.removeEventListener("click",n,!0)}}}},e.renderWave=function(t){var n=t.csp,r=e.props.children;return e.csp=n,r},e}return t=g,(n=[{key:"componentDidMount",value:function(){var e=Object(i.findDOMNode)(this);e&&1===e.nodeType&&(this.instance=this.bindAnimationEvent(e))}},{key:"componentWillUnmount",value:function(){this.instance&&this.instance.cancel(),this.clickWaveTimeoutId&&clearTimeout(this.clickWaveTimeoutId),this.destroy=!0}},{key:"getAttributeName",value:function(){return this.props.insertExtraNode?"ant-click-animating":"ant-click-animating-without-extra-node"}},{key:"resetEffect",value:function(e){if(e&&e!==this.extraNode&&e instanceof Element){var t=this.props.insertExtraNode,n=this.getAttributeName();e.setAttribute(n,"false"),r&&(r.innerHTML=""),t&&this.extraNode&&e.contains(this.extraNode)&&e.removeChild(this.extraNode),a.a.removeStartEventListener(e,this.onTransitionStart),a.a.removeEndEventListener(e,this.onTransitionEnd)}}},{key:"render",value:function(){return o.createElement(c.a,null,this.renderWave)}}])&&f(t.prototype,n),l&&f(t,l),g}(o.Component)},function(e,t,n){try{var r=n(373)}catch(e){r=n(373)}var o=/\s+/,i=Object.prototype.toString;function a(e){if(!e||!e.nodeType)throw new Error("A DOM element reference is required");this.el=e,this.list=e.classList}e.exports=function(e){return new a(e)},a.prototype.add=function(e){if(this.list)return this.list.add(e),this;var t=this.array();return~r(t,e)||t.push(e),this.el.className=t.join(" "),this},a.prototype.remove=function(e){if("[object RegExp]"==i.call(e))return this.removeMatching(e);if(this.list)return this.list.remove(e),this;var t=this.array(),n=r(t,e);return~n&&t.splice(n,1),this.el.className=t.join(" "),this},a.prototype.removeMatching=function(e){for(var t=this.array(),n=0;n1&&(o-=1)),[360*o,100*i,100*l]},o.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[o.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(n,r))*100,100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},o.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-o)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-o-t)/(1-t)||0),100*t]},o.rgb.keyword=function(e){var r=n[e];if(r)return r;var o,i,a,s=1/0;for(var c in t)if(t.hasOwnProperty(c)){var l=t[c],u=(i=e,a=l,Math.pow(i[0]-a[0],2)+Math.pow(i[1]-a[1],2)+Math.pow(i[2]-a[2],2));u.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},o.rgb.lab=function(e){var t=o.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return r/=100,i/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},o.hsl.rgb=function(e){var t,n,r,o,i,a=e[0]/360,s=e[1]/100,c=e[2]/100;if(0===s)return[i=255*c,i,i];t=2*c-(n=c<.5?c*(1+s):c+s-c*s),o=[0,0,0];for(var l=0;l<3;l++)(r=a+1/3*-(l-1))<0&&r++,r>1&&r--,i=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,o[l]=255*i;return o},o.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,o=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,o*=i<=1?i:2-i,[t,100*(0===r?2*o/(i+o):2*n/(r+n)),(r+n)/2*100]},o.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*i),c=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,c,a];case 1:return[s,r,a];case 2:return[a,r,c];case 3:return[a,s,r];case 4:return[c,a,r];case 5:return[r,a,s]}},o.hsv.hsl=function(e){var t,n,r,o=e[0],i=e[1]/100,a=e[2]/100,s=Math.max(a,.01);return r=(2-i)*a,n=i*s,[o,100*(n=(n/=(t=(2-i)*s)<=1?t:2-t)||0),100*(r/=2)]},o.hwb.rgb=function(e){var t,n,r,o,i,a,s,c=e[0]/360,l=e[1]/100,u=e[2]/100,f=l+u;switch(f>1&&(l/=f,u/=f),r=6*c-(t=Math.floor(6*c)),0!=(1&t)&&(r=1-r),o=l+r*((n=1-u)-l),t){default:case 6:case 0:i=n,a=o,s=l;break;case 1:i=o,a=n,s=l;break;case 2:i=l,a=n,s=o;break;case 3:i=l,a=o,s=n;break;case 4:i=o,a=l,s=n;break;case 5:i=n,a=l,s=o}return[255*i,255*a,255*s]},o.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},o.xyz.rgb=function(e){var t,n,r,o=e[0]/100,i=e[1]/100,a=e[2]/100;return n=-.9689*o+1.8758*i+.0415*a,r=.0557*o+-.204*i+1.057*a,t=(t=3.2406*o+-1.5372*i+-.4986*a)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},o.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},o.lab.xyz=function(e){var t,n,r,o=e[0];t=e[1]/500+(n=(o+16)/116),r=n-e[2]/200;var i=Math.pow(n,3),a=Math.pow(t,3),s=Math.pow(r,3);return n=i>.008856?i:(n-16/116)/7.787,t=a>.008856?a:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},o.lab.lch=function(e){var t,n=e[0],r=e[1],o=e[2];return(t=360*Math.atan2(o,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+o*o),t]},o.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},o.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],i=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===i&&(a+=60),a},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},o.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},o.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},o.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},o.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,o=e[2]/255,i=Math.max(Math.max(n,r),o),a=Math.min(Math.min(n,r),o),s=i-a;return t=s<=0?0:i===n?(r-o)/s%6:i===r?2+(o-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?a/(1-s):0)]},o.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,o=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},o.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},o.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var o,i=[0,0,0],a=t%1*6,s=a%1,c=1-s;switch(Math.floor(a)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=c,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=c,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=c}return o=(1-n)*r,[255*(n*i[0]+o),255*(n*i[1]+o),255*(n*i[2]+o)]},o.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},o.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},o.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},o.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]},o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}));function r(e){var t=function(){for(var e={},t=Object.keys(n),r=t.length,o=0;o1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"==typeof n)for(var r=n.length,o=0;o1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))}));var s=a,c={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},l={getRgba:u,getHsla:f,getRgb:function(e){var t=u(e);return t&&t.slice(0,3)},getHsl:function(e){var t=f(e);return t&&t.slice(0,3)},getHwb:d,getAlpha:function(e){var t=u(e);return t||(t=f(e))||(t=d(e))?t[3]:void 0},hexString:function(e,t){return t=void 0!==t&&3===e.length?t:e[3],"#"+v(e[0])+v(e[1])+v(e[2])+(t>=0&&t<1?v(Math.round(255*t)):"")},rgbString:function(e,t){return t<1||e[3]&&e[3]<1?p(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:p,percentString:function(e,t){if(t<1||e[3]&&e[3]<1)return h(e,t);var n=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),o=Math.round(e[2]/255*100);return"rgb("+n+"%, "+r+"%, "+o+"%)"},percentaString:h,hslString:function(e,t){return t<1||e[3]&&e[3]<1?m(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:m,hwbString:function(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return y[e.slice(0,3)]}};function u(e){if(e){var t=[0,0,0],n=1,r=e.match(/^#([a-fA-F0-9]{3,4})$/i),o="";if(r){o=(r=r[1])[3];for(var i=0;in?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=e,r=void 0===t?.5:t,o=2*r-1,i=this.alpha()-n.alpha(),a=((o*i==-1?o:(o+i)/(1+o*i))+1)/2,s=1-a;return this.rgb(a*this.red()+s*n.red(),a*this.green()+s*n.green(),a*this.blue()+s*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new w,r=this.values,o=n.values;for(var i in r)r.hasOwnProperty(i)&&(e=r[i],"[object Array]"===(t={}.toString.call(e))?o[i]=e.slice(0):"[object Number]"===t?o[i]=e:console.error("unexpected color value:",e));return n}},w.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},w.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},w.prototype.getValues=function(e){for(var t=this.values,n={},r=0;r=0;o--)t.call(n,e[o],o);else for(o=0;o=1?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),r<1?(r=1,t=n/4):t=n/(2*Math.PI)*Math.asin(1/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){var t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:function(e){var t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-C.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*C.easeInBounce(2*e):.5*C.easeOutBounce(2*e-1)+.5}},M={effects:C};S.easingEffects=C;var E=Math.PI,O=E/180,T=2*E,L=E/2,A=E/4,z=2*E/3,P={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,r,o,i){if(i){var a=Math.min(i,o/2,r/2),s=t+a,c=n+a,l=t+r-a,u=n+o-a;e.moveTo(t,c),st.left-1e-6&&e.xt.top-1e-6&&e.y0&&this.requestAnimationFrame()},advance:function(){for(var e,t,n,r,o=this.animations,i=0;i=n?(V.callback(e.onAnimationComplete,[e],t),t.animating=!1,o.splice(i,1)):++i}},Q=V.options.resolve,Z=["push","pop","shift","splice","unshift"];function ee(e,t){var n=e._chartjs;if(n){var r=n.listeners,o=r.indexOf(t);-1!==o&&r.splice(o,1),r.length>0||(Z.forEach((function(t){delete e[t]})),delete e._chartjs)}}var te=function(e,t){this.initialize(e,t)};V.extend(te.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){var n=this;n.chart=e,n.index=t,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.chart,n=t.scales,r=this.getDataset(),o=t.options.scales;null!==e.xAxisID&&e.xAxisID in n&&!r.xAxisID||(e.xAxisID=r.xAxisID||o.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in n&&!r.yAxisID||(e.yAxisID=r.yAxisID||o.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&ee(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,n=this.getMeta(),r=this.getDataset().data||[],o=n.data;for(e=0,t=r.length;en&&this.insertElements(n,r-n)},insertElements:function(e,t){for(var n=0;no?(i=o/t.innerRadius,e.arc(a,s,t.innerRadius-o,r+i,n-i,!0)):e.arc(a,s,o,r+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip()}function ie(e,t,n){var r="inner"===t.borderAlign;r?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),n.fullCircles&&function(e,t,n,r){var o,i=n.endAngle;for(r&&(n.endAngle=n.startAngle+re,oe(e,n),n.endAngle=i,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=re,n.fullCircles--)),e.beginPath(),e.arc(n.x,n.y,n.innerRadius,n.startAngle+re,n.startAngle,!0),o=0;os;)o-=re;for(;o=a&&o<=s,l=i>=n.innerRadius&&i<=n.outerRadius;return c&&l}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,o={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/re)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,o.fullCircles){for(o.endAngle=o.startAngle+re,t.beginPath(),t.arc(o.x,o.y,o.outerRadius,o.startAngle,o.endAngle),t.arc(o.x,o.y,o.innerRadius,o.endAngle,o.startAngle,!0),t.closePath(),e=0;ee.x&&(t=ve(t,"left","right")):e.basen?n:r,r:c.right||o<0?0:o>t?t:o,b:c.bottom||i<0?0:i>n?n:i,l:c.left||a<0?0:a>t?t:a}}function be(e,t,n){var r=null===t,o=null===n,i=!(!e||r&&o)&&ge(e);return i&&(r||t>=i.left&&t<=i.right)&&(o||n>=i.top&&n<=i.bottom)}N._set("global",{elements:{rectangle:{backgroundColor:he,borderColor:he,borderSkipped:"bottom",borderWidth:0}}});var we=K.extend({_type:"rectangle",draw:function(){var e=this._chart.ctx,t=this._view,n=function(e){var t=ge(e),n=t.right-t.left,r=t.bottom-t.top,o=ye(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r},inner:{x:t.left+o.l,y:t.top+o.t,w:n-o.l-o.r,h:r-o.t-o.b}}}(t),r=n.outer,o=n.inner;e.fillStyle=t.backgroundColor,e.fillRect(r.x,r.y,r.w,r.h),r.w===o.w&&r.h===o.h||(e.save(),e.beginPath(),e.rect(r.x,r.y,r.w,r.h),e.clip(),e.fillStyle=t.borderColor,e.rect(o.x,o.y,o.w,o.h),e.fill("evenodd"),e.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return be(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return me(n)?be(n,e,null):be(n,null,t)},inXRange:function(e){return be(this._view,e,null)},inYRange:function(e){return be(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return me(n)?(e=n.x,t=(n.y+n.base)/2):(e=(n.x+n.base)/2,t=n.y),{x:e,y:t}},getArea:function(){var e=this._view;return me(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),_e={},xe=ae,ke=le,Se=pe,Ce=we;_e.Arc=xe,_e.Line=ke,_e.Point=Se,_e.Rectangle=Ce;var Me=V._deprecated,Ee=V.valueOrDefault;function Oe(e,t,n){var r,o,i=n.barThickness,a=t.stackCount,s=t.pixels[e],c=V.isNullOrUndef(i)?function(e,t){var n,r,o,i,a=e._length;for(o=1,i=t.length;o0?Math.min(a,Math.abs(r-n)):a,n=r;return a}(t.scale,t.pixels):-1;return V.isNullOrUndef(i)?(r=c*n.categoryPercentage,o=n.barPercentage):(r=i*a,o=1),{chunk:r/a,ratio:o,start:s-r/2}}N._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),N._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Te=ne.extend({dataElementType:_e.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t,n=this;ne.prototype.initialize.apply(n,arguments),(e=n.getMeta()).stack=n.getDataset().stack,e.bar=!0,t=n._getIndexScale().options,Me("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Me("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Me("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Me("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Me("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,n,r=this.getMeta().data;for(this._ruler=this.getRuler(),t=0,n=r.length;t=0&&m.min>=0?m.min:m.max,w=void 0===m.start?m.end:m.max>=0&&m.min>=0?m.max-m.min:m.min-m.max,_=h.length;if(v||void 0===v&&void 0!==y)for(r=0;r<_&&(o=h[r]).index!==e;++r)o.stack===y&&(i=void 0===(l=f._parseValue(p[o.index].data[t])).start?l.end:l.min>=0&&l.max>=0?l.max:l.min,(m.min<0&&i<0||m.max>=0&&i>0)&&(b+=i));return a=f.getPixelForValue(b),c=(s=f.getPixelForValue(b+w))-a,void 0!==g&&Math.abs(c)=0&&!d||w<0&&d?a-g:a+g),{size:c,base:a,head:s,center:s+c/2}},calculateBarIndexPixels:function(e,t,n,r){var o="flex"===r.barThickness?function(e,t,n){var r,o=t.pixels,i=o[e],a=e>0?o[e-1]:null,s=e=je?-De:y<-je?De:0)+g,w=Math.cos(y),_=Math.sin(y),x=Math.cos(b),k=Math.sin(b),S=y<=0&&b>=0||b>=De,C=y<=Ne&&b>=Ne||b>=De+Ne,M=y<=-Ne&&b>=-Ne||b>=je+Ne,E=y===-je||b>=je?-1:Math.min(w,w*m,x,x*m),O=M?-1:Math.min(_,_*m,k,k*m),T=S?1:Math.max(w,w*m,x,x*m),L=C?1:Math.max(_,_*m,k,k*m);l=(T-E)/2,u=(L-O)/2,f=-(T+E)/2,d=-(L+O)/2}for(r=0,o=h.length;r0&&!isNaN(e)?De*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,r,o,i,a,s,c,l=0,u=this.chart;if(!e)for(t=0,n=u.data.datasets.length;t(l=s>l?s:l)?c:l);return l},setHoverStyle:function(e){var t=e._model,n=e._options,r=V.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Pe(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Pe(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Pe(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,n=0;n0&&Ve(c[e-1]._model,s)&&(n.controlPointPreviousX=l(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=l(n.controlPointPreviousY,s.top,s.bottom)),e0&&(i=e.getDatasetMeta(i[0]._datasetIndex).data),i},"x-axis":function(e,t){return rt(e,t,{intersect:!1})},point:function(e,t){return et(e,Qe(t,e))},nearest:function(e,t,n){var r=Qe(t,e);n.axis=n.axis||"xy";var o=nt(n.axis);return tt(e,r,n.intersect,o)},x:function(e,t,n){var r=Qe(t,e),o=[],i=!1;return Ze(e,(function(e){e.inXRange(r.x)&&o.push(e),e.inRange(r.x,r.y)&&(i=!0)})),n.intersect&&!i&&(o=[]),o},y:function(e,t,n){var r=Qe(t,e),o=[],i=!1;return Ze(e,(function(e){e.inYRange(r.y)&&o.push(e),e.inRange(r.x,r.y)&&(i=!0)})),n.intersect&&!i&&(o=[]),o}}},it=V.extend;function at(e,t){return V.where(e,(function(e){return e.pos===t}))}function st(e,t){return e.sort((function(e,n){var r=t?n:e,o=t?e:n;return r.weight===o.weight?r.index-o.index:r.weight-o.weight}))}function ct(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function lt(e,t,n){var r,o,i=n.box,a=e.maxPadding;if(n.size&&(e[n.pos]-=n.size),n.size=n.horizontal?i.height:i.width,e[n.pos]+=n.size,i.getPadding){var s=i.getPadding();a.top=Math.max(a.top,s.top),a.left=Math.max(a.left,s.left),a.bottom=Math.max(a.bottom,s.bottom),a.right=Math.max(a.right,s.right)}if(r=t.outerWidth-ct(a,e,"left","right"),o=t.outerHeight-ct(a,e,"top","bottom"),r!==e.w||o!==e.h)return e.w=r,e.h=o,n.horizontal?r!==e.w:o!==e.h}function ut(e,t){var n=t.maxPadding;function r(e){var r={left:0,top:0,right:0,bottom:0};return e.forEach((function(e){r[e]=Math.max(t[e],n[e])})),r}return r(e?["left","right"]:["top","bottom"])}function ft(e,t,n){var r,o,i,a,s,c,l=[];for(r=0,o=e.length;r div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"}))&&pt.default||pt,gt=["animationstart","webkitAnimationStart"],vt={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function yt(e,t){var n=V.getStyle(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var bt=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0};function wt(e,t,n){e.addEventListener(t,n,bt)}function _t(e,t,n){e.removeEventListener(t,n,bt)}function xt(e,t,n,r,o){return{type:e,chart:t,native:o||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function kt(e){var t=document.createElement("div");return t.className=e||"",t}function St(e,t,n){var r,o,i,a,s=e.$chartjs||(e.$chartjs={}),c=s.resizer=function(e){var t=kt("chartjs-size-monitor"),n=kt("chartjs-size-monitor-expand"),r=kt("chartjs-size-monitor-shrink");n.appendChild(kt()),r.appendChild(kt()),t.appendChild(n),t.appendChild(r),t._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var o=function(){t._reset(),e()};return wt(n,"scroll",o.bind(n,"expand")),wt(r,"scroll",o.bind(r,"shrink")),t}((r=function(){if(s.resizer){var r=n.options.maintainAspectRatio&&e.parentNode,o=r?r.clientWidth:0;t(xt("resize",n)),r&&r.clientWidth0){var i=e[0];i.label?n=i.label:i.xLabel?n=i.xLabel:o>0&&i.index-1?e.split("\n"):e}function Nt(e){var t=N.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:At(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:At(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:At(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:At(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:At(e.titleFontStyle,t.defaultFontStyle),titleFontSize:At(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:At(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:At(e.footerFontStyle,t.defaultFontStyle),footerFontSize:At(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Ft(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function Rt(e){return jt([],Dt(e))}var Ht=K.extend({initialize:function(){this._model=Nt(this._options),this._lastActive=[]},getTitle:function(){var e=this,t=e._options,n=t.callbacks,r=n.beforeTitle.apply(e,arguments),o=n.title.apply(e,arguments),i=n.afterTitle.apply(e,arguments),a=[];return a=jt(a,Dt(r)),a=jt(a,Dt(o)),a=jt(a,Dt(i))},getBeforeBody:function(){return Rt(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,t){var n=this,r=n._options.callbacks,o=[];return V.each(e,(function(e){var i={before:[],lines:[],after:[]};jt(i.before,Dt(r.beforeLabel.call(n,e,t))),jt(i.lines,r.label.call(n,e,t)),jt(i.after,Dt(r.afterLabel.call(n,e,t))),o.push(i)})),o},getAfterBody:function(){return Rt(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this,t=e._options.callbacks,n=t.beforeFooter.apply(e,arguments),r=t.footer.apply(e,arguments),o=t.afterFooter.apply(e,arguments),i=[];return i=jt(i,Dt(n)),i=jt(i,Dt(r)),i=jt(i,Dt(o))},update:function(e){var t,n,r,o,i,a,s,c,l,u,f=this,d=f._options,p=f._model,h=f._model=Nt(d),m=f._active,g=f._data,v={xAlign:p.xAlign,yAlign:p.yAlign},y={x:p.x,y:p.y},b={width:p.width,height:p.height},w={x:p.caretX,y:p.caretY};if(m.length){h.opacity=1;var _=[],x=[];w=Pt[d.position].call(f,m,f._eventPosition);var k=[];for(t=0,n=m.length;tr.width&&(o=r.width-t.width),o<0&&(o=0)),"top"===u?i+=f:i-="bottom"===u?t.height+f:t.height/2,"center"===u?"left"===l?o+=f:"right"===l&&(o-=f):"left"===l?o-=d:"right"===l&&(o+=d),{x:o,y:i}}(h,b,v=function(e,t){var n,r,o,i,a,s=e._model,c=e._chart,l=e._chart.chartArea,u="center",f="center";s.yc.height-t.height&&(f="bottom");var d=(l.left+l.right)/2,p=(l.top+l.bottom)/2;"center"===f?(n=function(e){return e<=d},r=function(e){return e>d}):(n=function(e){return e<=t.width/2},r=function(e){return e>=c.width-t.width/2}),o=function(e){return e+t.width+s.caretSize+s.caretPadding>c.width},i=function(e){return e-t.width-s.caretSize-s.caretPadding<0},a=function(e){return e<=p?"top":"bottom"},n(s.x)?(u="left",o(s.x)&&(u="center",f=a(s.y))):r(s.x)&&(u="right",i(s.x)&&(u="center",f=a(s.y)));var h=e._options;return{xAlign:h.xAlign?h.xAlign:u,yAlign:h.yAlign?h.yAlign:f}}(this,b),f._chart)}else h.opacity=0;return h.xAlign=v.xAlign,h.yAlign=v.yAlign,h.x=y.x,h.y=y.y,h.width=b.width,h.height=b.height,h.caretX=w.x,h.caretY=w.y,f._model=h,e&&d.custom&&d.custom.call(f,h),f},drawCaret:function(e,t){var n=this._chart.ctx,r=this._view,o=this.getCaretPosition(e,t,r);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)},getCaretPosition:function(e,t,n){var r,o,i,a,s,c,l=n.caretSize,u=n.cornerRadius,f=n.xAlign,d=n.yAlign,p=e.x,h=e.y,m=t.width,g=t.height;if("center"===d)s=h+g/2,"left"===f?(o=(r=p)-l,i=r,a=s+l,c=s-l):(o=(r=p+m)+l,i=r,a=s-l,c=s+l);else if("left"===f?(r=(o=p+u+l)-l,i=o+l):"right"===f?(r=(o=p+m-u-l)-l,i=o+l):(r=(o=n.caretX)-l,i=o+l),"top"===d)s=(a=h)-l,c=a;else{s=(a=h+g)+l,c=a;var v=i;i=r,r=v}return{x1:r,x2:o,x3:i,y1:a,y2:s,y3:c}},drawTitle:function(e,t,n){var r,o,i,a=t.title,s=a.length;if(s){var c=zt(t.rtl,t.x,t.width);for(e.x=Ft(t,t._titleAlign),n.textAlign=c.textAlign(t._titleAlign),n.textBaseline="middle",r=t.titleFontSize,o=t.titleSpacing,n.fillStyle=t.titleFontColor,n.font=V.fontString(r,t._titleFontStyle,t._titleFontFamily),i=0;i0&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},r={x:t.x,y:t.y},o=Math.abs(t.opacity<.001)?0:t.opacity,i=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&i&&(e.save(),e.globalAlpha=o,this.drawBackground(r,t,e,n),r.y+=t.yPadding,V.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),V.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===e.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&n._active.reverse()),(t=!V.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}}),It=Pt,Vt=Ht;Vt.positioners=It;var Bt=V.valueOrDefault;function Yt(){return V.merge({},[].slice.call(arguments),{merger:function(e,t,n,r){if("xAxes"===e||"yAxes"===e){var o,i,a,s=n[e].length;for(t[e]||(t[e]=[]),o=0;o=t[e].length&&t[e].push({}),!t[e][o].type||a.type&&a.type!==t[e][o].type?V.merge(t[e][o],[Lt.getScaleDefaults(i),a]):V.merge(t[e][o],a)}else V._merger(e,t,n,r)}})}function $t(){return V.merge({},[].slice.call(arguments),{merger:function(e,t,n,r){var o=t[e]||{},i=n[e];"scales"===e?t[e]=Yt(o,i):"scale"===e?t[e]=V.merge(o,[Lt.getScaleDefaults(i.type),i]):V._merger(e,t,n,r)}})}function Wt(e){var t=e.options;V.each(e.scales,(function(t){ht.removeBox(e,t)})),t=$t(N.global,N[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}function Ut(e,t,n){var r,o=function(e){return e.id===r};do{r=t+n++}while(V.findIndex(e,o)>=0);return r}function qt(e){return"top"===e||"bottom"===e}function Kt(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}N._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Gt=function(e,t){return this.construct(e,t),this};V.extend(Gt.prototype,{construct:function(e,t){var n=this;t=function(e){var t=(e=e||{}).data=e.data||{};return t.datasets=t.datasets||[],t.labels=t.labels||[],e.options=$t(N.global,N[e.type],e.options||{}),e}(t);var r=Ot.acquireContext(e,t),o=r&&r.canvas,i=o&&o.height,a=o&&o.width;n.id=V.uid(),n.ctx=r,n.canvas=o,n.config=t,n.width=a,n.height=i,n.aspectRatio=i?a/i:null,n.options=t.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Gt.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(e){n.config.data=e}}),r&&o?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var e=this;return Tt.notify(e,"beforeInit"),V.retinaScale(e,e.options.devicePixelRatio),e.bindEvents(),e.options.responsive&&e.resize(!0),e.initToolTip(),Tt.notify(e,"afterInit"),e},clear:function(){return V.canvas.clear(this),this},stop:function(){return X.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,r=t.canvas,o=n.maintainAspectRatio&&t.aspectRatio||null,i=Math.max(0,Math.floor(V.getMaximumWidth(r))),a=Math.max(0,Math.floor(o?i/o:V.getMaximumHeight(r)));if((t.width!==i||t.height!==a)&&(r.width=t.width=i,r.height=t.height=a,r.style.width=i+"px",r.style.height=a+"px",V.retinaScale(t,n.devicePixelRatio),!e)){var s={width:i,height:a};Tt.notify(t,"resize",[s]),n.onResize&&n.onResize(t,s),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,t=e.scales||{},n=e.scale;V.each(t.xAxes,(function(e,n){e.id||(e.id=Ut(t.xAxes,"x-axis-",n))})),V.each(t.yAxes,(function(e,n){e.id||(e.id=Ut(t.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var e=this,t=e.options,n=e.scales||{},r=[],o=Object.keys(n).reduce((function(e,t){return e[t]=!1,e}),{});t.scales&&(r=r.concat((t.scales.xAxes||[]).map((function(e){return{options:e,dtype:"category",dposition:"bottom"}})),(t.scales.yAxes||[]).map((function(e){return{options:e,dtype:"linear",dposition:"left"}})))),t.scale&&r.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),V.each(r,(function(t){var r=t.options,i=r.id,a=Bt(r.type,t.dtype);qt(r.position)!==qt(t.dposition)&&(r.position=t.dposition),o[i]=!0;var s=null;if(i in n&&n[i].type===a)(s=n[i]).options=r,s.ctx=e.ctx,s.chart=e;else{var c=Lt.getScaleConstructor(a);if(!c)return;s=new c({id:i,type:a,options:r,ctx:e.ctx,chart:e}),n[s.id]=s}s.mergeTicksOptions(),t.isDefault&&(e.scale=s)})),V.each(o,(function(e,t){e||delete n[t]})),e.scales=n,Lt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=this,r=[],o=n.data.datasets;for(e=0,t=o.length;e=0;--n)this.drawDataset(t[n],e);Tt.notify(this,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n={meta:e,index:e.index,easingValue:t};!1!==Tt.notify(this,"beforeDatasetDraw",[n])&&(e.controller.draw(t),Tt.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(e){var t=this.tooltip,n={tooltip:t,easingValue:e};!1!==Tt.notify(this,"beforeTooltipDraw",[n])&&(t.draw(),Tt.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(e){return ot.modes.single(this,e)},getElementsAtEvent:function(e){return ot.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return ot.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var r=ot.modes[t];return"function"==typeof r?r(this,e,n):[]},getDatasetAtEvent:function(e){return ot.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e];t._meta||(t._meta={});var n=t._meta[this.id];return n||(n=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t.order||0,index:e}),n},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t3?n[2]-n[1]:n[1]-n[0];Math.abs(r)>1&&e!==Math.floor(e)&&(r=e-Math.floor(e));var o=V.log10(Math.abs(r)),i="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var a=V.log10(Math.abs(e)),s=Math.floor(a)-Math.floor(o);s=Math.max(Math.min(s,20),0),i=e.toExponential(s)}else{var c=-1*Math.floor(o);c=Math.max(Math.min(c,20),0),i=e.toFixed(c)}else i="0";return i},logarithmic:function(e,t,n){var r=e/Math.pow(10,Math.floor(V.log10(e)));return 0===e?"0":1===r||2===r||5===r||0===t||t===n.length-1?e.toExponential():""}}},tn=V.isArray,nn=V.isNullOrUndef,rn=V.valueOrDefault,on=V.valueAtIndexOrDefault;function an(e,t,n){var r,o=e.getTicks().length,i=Math.min(t,o-1),a=e.getPixelForTick(i),s=e._startPixel,c=e._endPixel;if(!(n&&(r=1===o?Math.max(a-s,c-a):0===t?(e.getPixelForTick(1)-a)/2:(a-e.getPixelForTick(i-1))/2,(a+=ic+1e-6)))return a}function sn(e,t,n,r){var o,i,a,s,c,l,u,f,d,p,h,m,g,v=n.length,y=[],b=[],w=[];for(o=0;ot){for(n=0;n=d||u<=1||!s.isHorizontal()?s.labelRotation=f:(t=(e=s._getLabelSizes()).widest.width,n=e.highest.height-e.highest.offset,r=Math.min(s.maxWidth,s.chart.width-t),t+6>(o=c.offset?s.maxWidth/u:r/(u-1))&&(o=r/(u-(c.offset?.5:1)),i=s.maxHeight-cn(c.gridLines)-l.padding-ln(c.scaleLabel),a=Math.sqrt(t*t+n*n),p=V.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/o,1)),Math.asin(Math.min(i/a,1))-Math.asin(n/a))),p=Math.max(f,Math.min(d,p))),s.labelRotation=p)},afterCalculateTickRotation:function(){V.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){V.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=e.chart,r=e.options,o=r.ticks,i=r.scaleLabel,a=r.gridLines,s=e._isVisible(),c="bottom"===r.position,l=e.isHorizontal();if(l?t.width=e.maxWidth:s&&(t.width=cn(a)+ln(i)),l?s&&(t.height=cn(a)+ln(i)):t.height=e.maxHeight,o.display&&s){var u=fn(o),f=e._getLabelSizes(),d=f.first,p=f.last,h=f.widest,m=f.highest,g=.4*u.minor.lineHeight,v=o.padding;if(l){var y=0!==e.labelRotation,b=V.toRadians(e.labelRotation),w=Math.cos(b),_=Math.sin(b),x=_*h.width+w*(m.height-(y?m.offset:0))+(y?0:g);t.height=Math.min(e.maxHeight,t.height+x+v);var k,S,C=e.getPixelForTick(0)-e.left,M=e.right-e.getPixelForTick(e.getTicks().length-1);y?(k=c?w*d.width+_*d.offset:_*(d.height-d.offset),S=c?_*(p.height-p.offset):w*p.width+_*p.offset):(k=d.width/2,S=p.width/2),e.paddingLeft=Math.max((k-C)*e.width/(e.width-C),0)+3,e.paddingRight=Math.max((S-M)*e.width/(e.width-M),0)+3}else{var E=o.mirror?0:h.width+v+g;t.width=Math.min(e.maxWidth,t.width+E),e.paddingTop=d.height/2,e.paddingBottom=p.height/2}}e.handleMargins(),l?(e.width=e._length=n.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){V.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(nn(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,n,r,o=this;for(o.ticks=e.map((function(e){return e.value})),o.beforeTickToLabelConversion(),t=o.convertTicksToLabels(e)||o.ticks,o.afterTickToLabelConversion(),n=0,r=e.length;nn-1?null:this.getPixelForDecimal(e*r+(t?r/2:0))},getPixelForDecimal:function(e){return this._reversePixels&&(e=1-e),this._startPixel+e*this._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:e>0&&t>0?e:0},_autoSkip:function(e){var t,n,r,o,i=this.options.ticks,a=this._length,s=i.maxTicksLimit||a/this._tickSize()+1,c=i.major.enabled?function(e){var t,n,r=[];for(t=0,n=e.length;ts)return function(e,t,n){var r,o,i=0,a=t[0];for(n=Math.ceil(n),r=0;rl)return i;return Math.max(l,1)}(c,e,0,s),l>0){for(t=0,n=l-1;t1?(f-u)/(l-1):null,pn(e,r,V.isNullOrUndef(o)?0:u-o,u),pn(e,r,f,V.isNullOrUndef(o)?e.length:f+o),dn(e)}return pn(e,r),dn(e)},_tickSize:function(){var e=this.options.ticks,t=V.toRadians(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),o=this._getLabelSizes(),i=e.autoSkipPadding||0,a=o?o.widest.width+i:0,s=o?o.highest.height+i:0;return this.isHorizontal()?s*n>a*r?a/n:s/r:s*r=0&&(a=e),void 0!==i&&(e=n.indexOf(i))>=0&&(s=e),t.minIndex=a,t.maxIndex=s,t.min=n[a],t.max=n[s]},buildTicks:function(){var e=this._getLabels(),t=this.minIndex,n=this.maxIndex;this.ticks=0===t&&n===e.length-1?e:e.slice(t,n+1)},getLabelForIndex:function(e,t){var n=this.chart;return n.getDatasetMeta(t).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[t].data[e]):this._getLabels()[e]},_configure:function(){var e=this,t=e.options.offset,n=e.ticks;mn.prototype._configure.call(e),e.isHorizontal()||(e._reversePixels=!e._reversePixels),n&&(e._startValue=e.minIndex-(t?.5:0),e._valueRange=Math.max(n.length-(t?0:1),1))},getPixelForValue:function(e,t,n){var r,o,i,a=this;return gn(t)||gn(n)||(e=a.chart.data.datasets[n].data[t]),gn(e)||(r=a.isHorizontal()?e.x:e.y),(void 0!==r||void 0!==e&&isNaN(t))&&(o=a._getLabels(),e=V.valueOrDefault(r,e),t=-1!==(i=o.indexOf(e))?i:t,isNaN(t)&&(t=e)),a.getPixelForDecimal((t-a._startValue)/a._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange);return Math.min(Math.max(t,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),yn={position:"bottom"};vn._defaults=yn;var bn=V.noop,wn=V.isNullOrUndef,_n=mn.extend({getRightValue:function(e){return"string"==typeof e?+e:mn.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=V.sign(e.min),r=V.sign(e.max);n<0&&r<0?e.max=0:n>0&&r>0&&(e.min=0)}var o=void 0!==t.min||void 0!==t.suggestedMin,i=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),o!==i&&e.min>=e.max&&(o?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,n=t.stepSize,r=t.maxTicksLimit;return n?e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(e=this._computeTickLimit(),r=r||11),r&&(e=Math.min(r,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:bn,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:V.valueOrDefault(t.fixedStepSize,t.stepSize)},o=e.ticks=function(e,t){var n,r,o,i,a=[],s=e.stepSize,c=s||1,l=e.maxTicks-1,u=e.min,f=e.max,d=e.precision,p=t.min,h=t.max,m=V.niceNum((h-p)/l/c)*c;if(m<1e-14&&wn(u)&&wn(f))return[p,h];(i=Math.ceil(h/m)-Math.floor(p/m))>l&&(m=V.niceNum(i*m/l/c)*c),s||wn(d)?n=Math.pow(10,V._decimalPlaces(m)):(n=Math.pow(10,d),m=Math.ceil(m*n)/n),r=Math.floor(p/m)*m,o=Math.ceil(h/m)*m,s&&(!wn(u)&&V.almostWhole(u/m,m/1e3)&&(r=u),!wn(f)&&V.almostWhole(f/m,m/1e3)&&(o=f)),i=(o-r)/m,i=V.almostEquals(i,Math.round(i),m/1e3)?Math.round(i):Math.ceil(i),r=Math.round(r*n)/n,o=Math.round(o*n)/n,a.push(wn(u)?r:u);for(var g=1;gt.length-1?null:this.getPixelForValue(t[e])}}),Mn=xn;Cn._defaults=Mn;var En=V.valueOrDefault,On=V.math.log10,Tn={position:"left",ticks:{callback:en.formatters.logarithmic}};function Ln(e,t){return V.isFinite(e)&&e>=0?e:t}var An=mn.extend({determineDataLimits:function(){var e,t,n,r,o,i,a=this,s=a.options,c=a.chart,l=c.data.datasets,u=a.isHorizontal();function f(e){return u?e.xAxisID===a.id:e.yAxisID===a.id}a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,a.minNotZero=Number.POSITIVE_INFINITY;var d=s.stacked;if(void 0===d)for(e=0;e0){var t=V.min(e),n=V.max(e);a.min=Math.min(a.min,t),a.max=Math.max(a.max,n)}}))}else for(e=0;e0?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(On(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),r={min:Ln(t.min),max:Ln(t.max)},o=e.ticks=function(e,t){var n,r,o=[],i=En(e.min,Math.pow(10,Math.floor(On(t.min)))),a=Math.floor(On(t.max)),s=Math.ceil(t.max/Math.pow(10,a));0===i?(n=Math.floor(On(t.minNotZero)),r=Math.floor(t.minNotZero/Math.pow(10,n)),o.push(i),i=r*Math.pow(10,n)):(n=Math.floor(On(i)),r=Math.floor(i/Math.pow(10,n)));var c=n<0?Math.pow(10,Math.abs(n)):1;do{o.push(i),10==++r&&(r=1,c=++n>=0?1:c),i=Math.round(r*Math.pow(10,n)*c)/c}while(nt.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(On(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,n=0;mn.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),n=En(e.options.ticks.fontSize,N.global.defaultFontSize)/e._length),e._startValue=On(t),e._valueOffset=n,e._valueRange=(On(e.max)-On(t))/(1-n)},getPixelForValue:function(e){var t=this,n=0;return(e=+t.getRightValue(e))>t.min&&e>0&&(n=(On(e)-t._startValue)/t._valueRange+t._valueOffset),t.getPixelForDecimal(n)},getValueForPixel:function(e){var t=this,n=t.getDecimalForPixel(e);return 0===n&&0===t.min?0:Math.pow(10,t._startValue+(n-t._valueOffset)*t._valueRange)}}),zn=Tn;An._defaults=zn;var Pn=V.valueOrDefault,jn=V.valueAtIndexOrDefault,Dn=V.options.resolve,Nn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:en.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function Fn(e){var t=e.ticks;return t.display&&e.display?Pn(t.fontSize,N.global.defaultFontSize)+2*t.backdropPaddingY:0}function Rn(e,t,n,r,o){return e===r||e===o?{start:t-n/2,end:t+n/2}:eo?{start:t-n,end:t}:{start:t,end:t+n}}function Hn(e){return 0===e||180===e?"center":e<180?"left":"right"}function In(e,t,n,r){var o,i,a=n.y+r/2;if(V.isArray(t))for(o=0,i=t.length;o270||e<90)&&(n.y-=t.h)}function Bn(e){return V.isNumber(e)?e:0}var Yn=_n.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=Fn(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var e=this,t=e.chart,n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;V.each(t.data.datasets,(function(o,i){if(t.isDatasetVisible(i)){var a=t.getDatasetMeta(i);V.each(o.data,(function(t,o){var i=+e.getRightValue(t);isNaN(i)||a.data[o].hidden||(n=Math.min(i,n),r=Math.max(i,r))}))}})),e.min=n===Number.POSITIVE_INFINITY?0:n,e.max=r===Number.NEGATIVE_INFINITY?0:r,e.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Fn(this.options))},convertTicksToLabels:function(){var e=this;_n.prototype.convertTicksToLabels.call(e),e.pointLabels=e.chart.data.labels.map((function(){var t=V.callback(e.options.pointLabels.callback,arguments,e);return t||0===t?t:""}))},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options;e.display&&e.pointLabels.display?function(e){var t,n,r,o=V.options._parseFont(e.options.pointLabels),i={l:0,r:e.width,t:0,b:e.height-e.paddingTop},a={};e.ctx.font=o.string,e._pointLabelSizes=[];var s,c,l,u=e.chart.data.labels.length;for(t=0;ti.r&&(i.r=p.end,a.r=f),h.starti.b&&(i.b=h.end,a.b=f)}e.setReductions(e.drawingArea,i,a)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var r=this,o=t.l/Math.sin(n.l),i=Math.max(t.r-r.width,0)/Math.sin(n.r),a=-t.t/Math.cos(n.t),s=-Math.max(t.b-(r.height-r.paddingTop),0)/Math.cos(n.b);o=Bn(o),i=Bn(i),a=Bn(a),s=Bn(s),r.drawingArea=Math.min(Math.floor(e-(o+i)/2),Math.floor(e-(a+s)/2)),r.setCenterPoint(o,i,a,s)},setCenterPoint:function(e,t,n,r){var o=this,i=o.width-t-o.drawingArea,a=e+o.drawingArea,s=n+o.drawingArea,c=o.height-o.paddingTop-r-o.drawingArea;o.xCenter=Math.floor((a+i)/2+o.left),o.yCenter=Math.floor((s+c)/2+o.top+o.paddingTop)},getIndexAngle:function(e){var t=this.chart,n=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){var t=this;if(V.isNullOrUndef(e))return NaN;var n=t.drawingArea/(t.max-t.min);return t.options.ticks.reverse?(t.max-e)*n:(e-t.min)*n},getPointPosition:function(e,t){var n=this.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this.min,n=this.max;return this.getPointPositionForValue(e||0,this.beginAtZero?0:t<0&&n<0?n:t>0&&n>0?t:0)},_drawGrid:function(){var e,t,n,r=this,o=r.ctx,i=r.options,a=i.gridLines,s=i.angleLines,c=Pn(s.lineWidth,a.lineWidth),l=Pn(s.color,a.color);if(i.pointLabels.display&&function(e){var t=e.ctx,n=e.options,r=n.pointLabels,o=Fn(n),i=e.getDistanceFromCenterForValue(n.ticks.reverse?e.min:e.max),a=V.options._parseFont(r);t.save(),t.font=a.string,t.textBaseline="middle";for(var s=e.chart.data.labels.length-1;s>=0;s--){var c=0===s?o/2:0,l=e.getPointPosition(s,i+c+5),u=jn(r.fontColor,s,N.global.defaultFontColor);t.fillStyle=u;var f=e.getIndexAngle(s),d=V.toDegrees(f);t.textAlign=Hn(d),Vn(d,e._pointLabelSizes[s],l),In(t,e.pointLabels[s],l,a.lineHeight)}t.restore()}(r),a.display&&V.each(r.ticks,(function(e,n){0!==n&&(t=r.getDistanceFromCenterForValue(r.ticksAsNumbers[n]),function(e,t,n,r){var o,i=e.ctx,a=t.circular,s=e.chart.data.labels.length,c=jn(t.color,r-1),l=jn(t.lineWidth,r-1);if((a||s)&&c&&l){if(i.save(),i.strokeStyle=c,i.lineWidth=l,i.setLineDash&&(i.setLineDash(t.borderDash||[]),i.lineDashOffset=t.borderDashOffset||0),i.beginPath(),a)i.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{o=e.getPointPosition(0,n),i.moveTo(o.x,o.y);for(var u=1;u=0;e--)t=r.getDistanceFromCenterForValue(i.ticks.reverse?r.min:r.max),n=r.getPointPosition(e,t),o.beginPath(),o.moveTo(r.xCenter,r.yCenter),o.lineTo(n.x,n.y),o.stroke();o.restore()}},_drawLabels:function(){var e=this,t=e.ctx,n=e.options.ticks;if(n.display){var r,o,i=e.getIndexAngle(0),a=V.options._parseFont(n),s=Pn(n.fontColor,N.global.defaultFontColor);t.save(),t.font=a.string,t.translate(e.xCenter,e.yCenter),t.rotate(i),t.textAlign="center",t.textBaseline="middle",V.each(e.ticks,(function(i,c){(0!==c||n.reverse)&&(r=e.getDistanceFromCenterForValue(e.ticksAsNumbers[c]),n.showLabelBackdrop&&(o=t.measureText(i).width,t.fillStyle=n.backdropColor,t.fillRect(-o/2-n.backdropPaddingX,-r-a.size/2-n.backdropPaddingY,o+2*n.backdropPaddingX,a.size+2*n.backdropPaddingY)),t.fillStyle=s,t.fillText(i,0,-r))})),t.restore()}},_drawTitle:V.noop}),$n=Nn;Yn._defaults=$n;var Wn=V._deprecated,Un=V.options.resolve,qn=V.valueOrDefault,Kn=Number.MIN_SAFE_INTEGER||-9007199254740991,Gn=Number.MAX_SAFE_INTEGER||9007199254740991,Jn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Xn=Object.keys(Jn);function Qn(e,t){return e-t}function Zn(e){return V.valueOrDefault(e.time.min,e.ticks.min)}function er(e){return V.valueOrDefault(e.time.max,e.ticks.max)}function tr(e,t,n,r){var o=function(e,t,n){for(var r,o,i,a=0,s=e.length-1;a>=0&&a<=s;){if(o=e[(r=a+s>>1)-1]||null,i=e[r],!o)return{lo:null,hi:i};if(i[t]n))return{lo:o,hi:i};s=r-1}}return{lo:i,hi:null}}(e,t,n),i=o.lo?o.hi?o.lo:e[e.length-2]:e[0],a=o.lo?o.hi?o.hi:e[e.length-1]:e[1],s=a[t]-i[t],c=s?(n-i[t])/s:0,l=(a[r]-i[r])*c;return i[r]+l}function nr(e,t){var n=e._adapter,r=e.options.time,o=r.parser,i=o||r.format,a=t;return"function"==typeof o&&(a=o(a)),V.isFinite(a)||(a="string"==typeof i?n.parse(a,i):n.parse(a)),null!==a?+a:(o||"function"!=typeof i||(a=i(t),V.isFinite(a)||(a=n.parse(a))),a)}function rr(e,t){if(V.isNullOrUndef(t))return null;var n=e.options.time,r=nr(e,e.getRightValue(t));return null===r||n.round&&(r=+e._adapter.startOf(r,n.round)),r}function or(e,t,n,r){var o,i,a,s=Xn.length;for(o=Xn.indexOf(e);o=0&&(t[i].major=!0);return t}(e,i,a,n):i}var ar=mn.extend({initialize:function(){this.mergeTicksOptions(),mn.prototype.initialize.call(this)},update:function(){var e=this,t=e.options,n=t.time||(t.time={}),r=e._adapter=new Zt._date(t.adapters.date);return Wn("time scale",n.format,"time.format","time.parser"),Wn("time scale",n.min,"time.min","ticks.min"),Wn("time scale",n.max,"time.max","ticks.max"),V.mergeIf(n.displayFormats,r.formats()),mn.prototype.update.apply(e,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),mn.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,r,o,i,a,s=this,c=s.chart,l=s._adapter,u=s.options,f=u.time.unit||"day",d=Gn,p=Kn,h=[],m=[],g=[],v=s._getLabels();for(e=0,n=v.length;e1?function(e){var t,n,r,o={},i=[];for(t=0,n=e.length;t1e5*l)throw t+" and "+n+" are too far apart with stepSize of "+l+" "+c;for(o=f;o=o&&n<=i&&u.push(n);return r.min=o,r.max=i,r._unit=c.unit||(s.autoSkip?or(c.minUnit,r.min,r.max,f):function(e,t,n,r,o){var i,a;for(i=Xn.length-1;i>=Xn.indexOf(n);i--)if(a=Xn[i],Jn[a].common&&e._adapter.diff(o,r,a)>=t-1)return a;return Xn[n?Xn.indexOf(n):0]}(r,u.length,c.minUnit,r.min,r.max)),r._majorUnit=s.major.enabled&&"year"!==r._unit?function(e){for(var t=Xn.indexOf(e)+1,n=Xn.length;tt&&s=0&&e0?s:1}}),sr={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};ar._defaults=sr;var cr={category:vn,linear:Cn,logarithmic:An,radialLinear:Yn,time:ar},lr={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};Zt._date.override("function"==typeof e?{_id:"moment",formats:function(){return lr},parse:function(t,n){return"string"==typeof t&&"string"==typeof n?t=e(t,n):t instanceof e||(t=e(t)),t.isValid()?t.valueOf():null},format:function(t,n){return e(t).format(n)},add:function(t,n,r){return e(t).add(n,r).valueOf()},diff:function(t,n,r){return e(t).diff(e(n),r)},startOf:function(t,n,r){return t=e(t),"isoWeek"===n?t.isoWeekday(r).valueOf():t.startOf(n).valueOf()},endOf:function(t,n){return e(t).endOf(n).valueOf()},_create:function(t){return e(t)}}:{}),N._set("global",{plugins:{filler:{propagate:!0}}});var ur={dataset:function(e){var t=e.fill,n=e.chart,r=n.getDatasetMeta(t),o=r&&n.isDatasetVisible(t)&&r.dataset._children||[],i=o.length||0;return i?function(e,t){return t=n)&&r;switch(i){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return i;default:return!1}}function dr(e){return(e.el._scale||{}).getPointPositionForValue?function(e){var t,n,r,o,i,a=e.el._scale,s=a.options,c=a.chart.data.labels.length,l=e.fill,u=[];if(!c)return null;for(t=s.ticks.reverse?a.max:a.min,n=s.ticks.reverse?a.min:a.max,r=a.getPointPositionForValue(0,t),o=0;o0;--i)V.canvas.lineTo(e,n[i],n[i-1],!0);else for(a=n[0].cx,s=n[0].cy,c=Math.sqrt(Math.pow(n[0].x-a,2)+Math.pow(n[0].y-s,2)),i=o-1;i>0;--i)e.arc(a,s,c,n[i].angle,n[i-1].angle,!0)}}function vr(e,t,n,r,o,i){var a,s,c,l,u,f,d,p,h=t.length,m=r.spanGaps,g=[],v=[],y=0,b=0;for(e.beginPath(),a=0,s=h;a=0;--n)(t=c[n].$filler)&&t.visible&&(o=(r=t.el)._view,i=r._children||[],a=t.mapper,s=o.backgroundColor||N.global.defaultColor,a&&s&&i.length&&(V.canvas.clipArea(l,e.chartArea),vr(l,i,a,o,s,r._loop),V.canvas.unclipArea(l)))}},br=V.rtl.getRtlAdapter,wr=V.noop,_r=V.valueOrDefault;function xr(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}N._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,r=this.chart,o=r.getDatasetMeta(n);o.hidden=null===o.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(e){var t=e.data.datasets,n=e.options.legend||{},r=n.labels&&n.labels.usePointStyle;return e._getSortedDatasetMetas().map((function(n){var o=n.controller.getStyle(r?0:void 0);return{text:t[n.index].label,fillStyle:o.backgroundColor,hidden:!e.isDatasetVisible(n.index),lineCap:o.borderCapStyle,lineDash:o.borderDash,lineDashOffset:o.borderDashOffset,lineJoin:o.borderJoinStyle,lineWidth:o.borderWidth,strokeStyle:o.borderColor,pointStyle:o.pointStyle,rotation:o.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(e){var t,n,r,o=document.createElement("ul"),i=e.data.datasets;for(o.setAttribute("class",e.id+"-legend"),t=0,n=i.length;tc.width)&&(f+=a+n.padding,u[u.length-(t>0?0:1)]=0),s[t]={left:0,top:0,width:r,height:a},u[u.length-1]+=r+n.padding})),c.height+=f}else{var d=n.padding,p=e.columnWidths=[],h=e.columnHeights=[],m=n.padding,g=0,v=0;V.each(e.legendItems,(function(e,t){var r=xr(n,a)+a/2+o.measureText(e.text).width;t>0&&v+a+2*d>c.height&&(m+=g+n.padding,p.push(g),h.push(v),g=0,v=0),g=Math.max(g,r),v+=a+d,s[t]={left:0,top:0,width:r,height:a}})),m+=g,p.push(g),h.push(v),c.width+=m}e.width=c.width,e.height=c.height}else e.width=c.width=e.height=c.height=0},afterFit:wr,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var e=this,t=e.options,n=t.labels,r=N.global,o=r.defaultColor,i=r.elements.line,a=e.height,s=e.columnHeights,c=e.width,l=e.lineWidths;if(t.display){var u,f=br(t.rtl,e.left,e.minSize.width),d=e.ctx,p=_r(n.fontColor,r.defaultFontColor),h=V.options._parseFont(n),m=h.size;d.textAlign=f.textAlign("left"),d.textBaseline="middle",d.lineWidth=.5,d.strokeStyle=p,d.fillStyle=p,d.font=h.string;var g=xr(n,m),v=e.legendHitBoxes,y=function(e,r){switch(t.align){case"start":return n.padding;case"end":return e-r;default:return(e-r+n.padding)/2}},b=e.isHorizontal();u=b?{x:e.left+y(c,l[0]),y:e.top+n.padding,line:0}:{x:e.left+n.padding,y:e.top+y(a,s[0]),line:0},V.rtl.overrideTextDirection(e.ctx,t.textDirection);var w=m+n.padding;V.each(e.legendItems,(function(t,r){var p=d.measureText(t.text).width,h=g+m/2+p,_=u.x,x=u.y;f.setWidth(e.minSize.width),b?r>0&&_+h+n.padding>e.left+e.minSize.width&&(x=u.y+=w,u.line++,_=u.x=e.left+y(c,l[u.line])):r>0&&x+w>e.top+e.minSize.height&&(_=u.x=_+e.columnWidths[u.line]+n.padding,u.line++,x=u.y=e.top+y(a,s[u.line]));var k=f.x(_);!function(e,t,r){if(!(isNaN(g)||g<=0)){d.save();var a=_r(r.lineWidth,i.borderWidth);if(d.fillStyle=_r(r.fillStyle,o),d.lineCap=_r(r.lineCap,i.borderCapStyle),d.lineDashOffset=_r(r.lineDashOffset,i.borderDashOffset),d.lineJoin=_r(r.lineJoin,i.borderJoinStyle),d.lineWidth=a,d.strokeStyle=_r(r.strokeStyle,o),d.setLineDash&&d.setLineDash(_r(r.lineDash,i.borderDash)),n&&n.usePointStyle){var s=g*Math.SQRT2/2,c=f.xPlus(e,g/2),l=t+m/2;V.canvas.drawPoint(d,r.pointStyle,s,c,l,r.rotation)}else d.fillRect(f.leftForLtr(e,g),t,g,m),0!==a&&d.strokeRect(f.leftForLtr(e,g),t,g,m);d.restore()}}(k,x,t),v[r].left=f.leftForLtr(k,v[r].width),v[r].top=x,function(e,t,n,r){var o=m/2,i=f.xPlus(e,g+o),a=t+o;d.fillText(n.text,i,a),n.hidden&&(d.beginPath(),d.lineWidth=2,d.moveTo(i,a),d.lineTo(f.xPlus(i,r),a),d.stroke())}(k,x,t,p),b?u.x+=h+n.padding:u.y+=w})),V.rtl.restoreTextDirection(e.ctx,t.textDirection)}},_getLegendItemAt:function(e,t){var n,r,o,i=this;if(e>=i.left&&e<=i.right&&t>=i.top&&t<=i.bottom)for(o=i.legendHitBoxes,n=0;n=(r=o[n]).left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height)return i.legendItems[n];return null},handleEvent:function(e){var t,n=this,r=n.options,o="mouseup"===e.type?"click":e.type;if("mousemove"===o){if(!r.onHover&&!r.onLeave)return}else{if("click"!==o)return;if(!r.onClick)return}t=n._getLegendItemAt(e.x,e.y),"click"===o?t&&r.onClick&&r.onClick.call(n,e.native,t):(r.onLeave&&t!==n._hoveredItem&&(n._hoveredItem&&r.onLeave.call(n,e.native,n._hoveredItem),n._hoveredItem=t),r.onHover&&t&&r.onHover.call(n,e.native,t))}});function Sr(e,t){var n=new kr({ctx:e.ctx,options:t,chart:e});ht.configure(e,n,t),ht.addBox(e,n),e.legend=n}var Cr={id:"legend",_element:kr,beforeInit:function(e){var t=e.options.legend;t&&Sr(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(V.mergeIf(t,N.global.legend),n?(ht.configure(e,n,t),n.options=t):Sr(e,t)):n&&(ht.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},Mr=V.noop;N._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Er=K.extend({initialize:function(e){V.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:Mr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:Mr,beforeSetDimensions:Mr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:Mr,beforeBuildLabels:Mr,buildLabels:Mr,afterBuildLabels:Mr,beforeFit:Mr,fit:function(){var e,t=this,n=t.options,r=t.minSize={},o=t.isHorizontal();n.display?(e=(V.isArray(n.text)?n.text.length:1)*V.options._parseFont(n).lineHeight+2*n.padding,t.width=r.width=o?t.maxWidth:e,t.height=r.height=o?e:t.maxHeight):t.width=r.width=t.height=r.height=0},afterFit:Mr,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this,t=e.ctx,n=e.options;if(n.display){var r,o,i,a=V.options._parseFont(n),s=a.lineHeight,c=s/2+n.padding,l=0,u=e.top,f=e.left,d=e.bottom,p=e.right;t.fillStyle=V.valueOrDefault(n.fontColor,N.global.defaultFontColor),t.font=a.string,e.isHorizontal()?(o=f+(p-f)/2,i=u+c,r=p-f):(o="left"===n.position?f+c:p-c,i=u+(d-u)/2,r=d-u,l=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(o,i),t.rotate(l),t.textAlign="center",t.textBaseline="middle";var h=n.text;if(V.isArray(h))for(var m=0,g=0;g=0;r--){var o=e[r];if(t(o))return o}},V.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},V.almostEquals=function(e,t,n){return Math.abs(e-t)=e},V.max=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.max(e,t)}),Number.NEGATIVE_INFINITY)},V.min=function(e){return e.reduce((function(e,t){return isNaN(t)?e:Math.min(e,t)}),Number.POSITIVE_INFINITY)},V.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:e>0?1:-1},V.toRadians=function(e){return e*(Math.PI/180)},V.toDegrees=function(e){return e*(180/Math.PI)},V._decimalPlaces=function(e){if(V.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},V.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,o=Math.sqrt(n*n+r*r),i=Math.atan2(r,n);return i<-.5*Math.PI&&(i+=2*Math.PI),{angle:i,distance:o}},V.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},V.aliasPixel=function(e){return e%2==0?0:.5},V._alignPixel=function(e,t,n){var r=e.currentDevicePixelRatio,o=n/2;return Math.round((t-o)*r)/r+o},V.splineCurve=function(e,t,n,r){var o=e.skip?t:e,i=t,a=n.skip?t:n,s=Math.sqrt(Math.pow(i.x-o.x,2)+Math.pow(i.y-o.y,2)),c=Math.sqrt(Math.pow(a.x-i.x,2)+Math.pow(a.y-i.y,2)),l=s/(s+c),u=c/(s+c),f=r*(l=isNaN(l)?0:l),d=r*(u=isNaN(u)?0:u);return{previous:{x:i.x-f*(a.x-o.x),y:i.y-f*(a.y-o.y)},next:{x:i.x+d*(a.x-o.x),y:i.y+d*(a.y-o.y)}}},V.EPSILON=Number.EPSILON||1e-14,V.splineCurveMonotone=function(e){var t,n,r,o,i,a,s,c,l,u=(e||[]).map((function(e){return{model:e._model,deltaK:0,mK:0}})),f=u.length;for(t=0;t0?u[t-1]:null,(o=t0?u[t-1]:null,o=t=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},V.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},V.niceNum=function(e,t){var n=Math.floor(V.log10(e)),r=e/Math.pow(10,n);return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},V.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},V.getRelativePosition=function(e,t){var n,r,o=e.originalEvent||e,i=e.target||e.srcElement,a=i.getBoundingClientRect(),s=o.touches;s&&s.length>0?(n=s[0].clientX,r=s[0].clientY):(n=o.clientX,r=o.clientY);var c=parseFloat(V.getStyle(i,"padding-left")),l=parseFloat(V.getStyle(i,"padding-top")),u=parseFloat(V.getStyle(i,"padding-right")),f=parseFloat(V.getStyle(i,"padding-bottom")),d=a.right-a.left-c-u,p=a.bottom-a.top-l-f;return{x:n=Math.round((n-a.left-c)/d*i.width/t.currentDevicePixelRatio),y:r=Math.round((r-a.top-l)/p*i.height/t.currentDevicePixelRatio)}},V.getConstraintWidth=function(e){return n(e,"max-width","clientWidth")},V.getConstraintHeight=function(e){return n(e,"max-height","clientHeight")},V._calculatePadding=function(e,t,n){return(t=V.getStyle(e,t)).indexOf("%")>-1?n*parseInt(t,10)/100:parseInt(t,10)},V._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},V.getMaximumWidth=function(e){var t=V._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,r=n-V._calculatePadding(t,"padding-left",n)-V._calculatePadding(t,"padding-right",n),o=V.getConstraintWidth(e);return isNaN(o)?r:Math.min(r,o)},V.getMaximumHeight=function(e){var t=V._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,r=n-V._calculatePadding(t,"padding-top",n)-V._calculatePadding(t,"padding-bottom",n),o=V.getConstraintHeight(e);return isNaN(o)?r:Math.min(r,o)},V.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},V.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=e.canvas,o=e.height,i=e.width;r.height=o*n,r.width=i*n,e.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=o+"px",r.style.width=i+"px")}},V.fontString=function(e,t,n){return t+" "+e+"px "+n},V.longestText=function(e,t,n,r){var o=(r=r||{}).data=r.data||{},i=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(o=r.data={},i=r.garbageCollect=[],r.font=t),e.font=t;var a,s,c,l,u,f=0,d=n.length;for(a=0;an.length){for(a=0;ar&&(r=i),r},V.numberOfLabelLines=function(e){var t=1;return V.each(e,(function(e){V.isArray(e)&&e.length>t&&(t=e.length)})),t},V.color=x?function(e){return e instanceof CanvasGradient&&(e=N.global.defaultColor),x(e)}:function(e){return console.error("Color.js not found!"),e},V.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:V.color(e).saturate(.5).darken(.1).rgbString()}}(),Jt._adapters=Zt,Jt.Animation=J,Jt.animationService=X,Jt.controllers=Xe,Jt.DatasetController=ne,Jt.defaults=N,Jt.Element=K,Jt.elements=_e,Jt.Interaction=ot,Jt.layouts=ht,Jt.platform=Ot,Jt.plugins=Tt,Jt.Scale=mn,Jt.scaleService=Lt,Jt.Ticks=en,Jt.Tooltip=Vt,Jt.helpers.each(cr,(function(e,t){Jt.scaleService.registerScaleType(t,e,e._defaults)})),Tr)Tr.hasOwnProperty(Pr)&&Jt.plugins.register(Tr[Pr]);Jt.platform.initialize();var jr=Jt;return"undefined"!=typeof window&&(window.Chart=Jt),Jt.Chart=Jt,Jt.Legend=Tr.legend._element,Jt.Title=Tr.title._element,Jt.pluginService=Jt.plugins,Jt.PluginBase=Jt.Element.extend({}),Jt.canvasHelpers=Jt.helpers.canvas,Jt.layoutService=Jt.layouts,Jt.LinearScaleBase=_n,Jt.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(e){Jt[e]=function(t,n){return new Jt(t,Jt.helpers.merge(n||{},{type:e.charAt(0).toLowerCase()+e.slice(1)}))}})),jr}(function(){try{return n(3)}catch(e){}}())},function(e,t,n){"use strict";n.d(t,"a",(function(){return De}));var r=n(0),o=n(31),i=n(2),a=n.n(i),s=n(18),c=n(11),l=n(1),u=n(37),f=n.n(u),d=f()({inlineCollapsed:!1});function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(){return(h=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0));return r.createElement(R.Provider,{value:{siderHook:this.getSiderHook()}},r.createElement(s,O({className:l},c),o))}}]),n}(r.Component),B=H({suffixCls:"layout",tagName:"section",displayName:"Layout"})(V),Y=H({suffixCls:"layout-header",tagName:"header",displayName:"Header"})(I),$=H({suffixCls:"layout-footer",tagName:"footer",displayName:"Footer"})(I),W=H({suffixCls:"layout-content",tagName:"main",displayName:"Content"})(I);B.Header=Y,B.Footer=$,B.Content=W;var U=n(10),q=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};function K(e){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function G(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J(){return(J=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";return ae+=1,"".concat(e).concat(ae)}),ue=function(e){ee(n,e);var t=ne(n);function n(e){var o,i,c;return X(this,n),(o=t.call(this,e)).responsiveHandler=function(e){o.setState({below:e.matches});var t=o.props.onBreakpoint;t&&t(e.matches),o.state.collapsed!==e.matches&&o.setCollapsed(e.matches,"responsive")},o.setCollapsed=function(e,t){"collapsed"in o.props||o.setState({collapsed:e});var n=o.props.onCollapse;n&&n(e,t)},o.toggle=function(){var e=!o.state.collapsed;o.setCollapsed(e,"clickTrigger")},o.belowShowChange=function(){o.setState((function(e){return{belowShow:!e.belowShow}}))},o.renderSider=function(e){var t,n=e.getPrefixCls,i=o.props,c=i.prefixCls,l=i.className,u=i.theme,f=i.collapsible,d=i.reverseArrow,p=i.trigger,h=i.style,m=i.width,g=i.collapsedWidth,v=i.zeroWidthTriggerStyle,y=ie(i,["prefixCls","className","theme","collapsible","reverseArrow","trigger","style","width","collapsedWidth","zeroWidthTriggerStyle"]),b=n("layout-sider",c),w=Object(s.a)(y,["collapsed","defaultCollapsed","onCollapse","breakpoint","onBreakpoint","siderHook","zeroWidthTriggerStyle"]),_=o.state.collapsed?g:m,x=q(_)?"".concat(_,"px"):String(_),k=0===parseFloat(String(g||0))?r.createElement("span",{onClick:o.toggle,className:"".concat(b,"-zero-width-trigger ").concat(b,"-zero-width-trigger-").concat(d?"right":"left"),style:v},r.createElement(U.a,{type:"bars"})):null,S={expanded:d?r.createElement(U.a,{type:"right"}):r.createElement(U.a,{type:"left"}),collapsed:d?r.createElement(U.a,{type:"left"}):r.createElement(U.a,{type:"right"})}[o.state.collapsed?"collapsed":"expanded"],C=null!==p?k||r.createElement("div",{className:"".concat(b,"-trigger"),onClick:o.toggle,style:{width:x}},p||S):null,M=J(J({},h),{flex:"0 0 ".concat(x),maxWidth:x,minWidth:x,width:x}),E=a()(l,b,"".concat(b,"-").concat(u),(G(t={},"".concat(b,"-collapsed"),!!o.state.collapsed),G(t,"".concat(b,"-has-trigger"),f&&null!==p&&!k),G(t,"".concat(b,"-below"),!!o.state.below),G(t,"".concat(b,"-zero-width"),0===parseFloat(x)),t));return r.createElement("aside",J({className:E},w,{style:M}),r.createElement("div",{className:"".concat(b,"-children")},o.props.children),f||o.state.below&&k?C:null)},o.uniqueId=le("ant-sider-"),"undefined"!=typeof window&&(i=window.matchMedia),i&&e.breakpoint&&e.breakpoint in se&&(o.mql=i("(max-width: ".concat(se[e.breakpoint],")"))),c="collapsed"in e?e.collapsed:e.defaultCollapsed,o.state={collapsed:c,below:!1},o}return Z(n,[{key:"componentDidMount",value:function(){this.mql&&(this.mql.addListener(this.responsiveHandler),this.responsiveHandler(this.mql)),this.props.siderHook&&this.props.siderHook.addSider(this.uniqueId)}},{key:"componentWillUnmount",value:function(){this.mql&&this.mql.removeListener(this.responsiveHandler),this.props.siderHook&&this.props.siderHook.removeSider(this.uniqueId)}},{key:"render",value:function(){var e=this.state.collapsed,t=this.props.collapsedWidth;return r.createElement(ce.Provider,{value:{siderCollapsed:e,collapsedWidth:t}},r.createElement(S.a,null,this.renderSider))}}],[{key:"getDerivedStateFromProps",value:function(e){return"collapsed"in e?{collapsed:e.collapsed}:null}}]),n}(r.Component);ue.defaultProps={collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80,style:{},theme:"dark"},Object(c.polyfill)(ue);r.Component;function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(){return(de=Object.assign||function(e){for(var t=1;t=0;(t||o)&&i.restoreModeVerticalFromInline()},i.handleClick=function(e){i.handleOpenChange([]);var t=i.props.onClick;t&&t(e)},i.handleOpenChange=function(e){i.setOpenKeys(e);var t=i.props.onOpenChange;t&&t(e)},i.renderMenu=function(e){var t=e.getPopupContainer,n=e.getPrefixCls,c=i.props,l=c.prefixCls,u=c.className,f=c.theme,d=c.collapsedWidth,p=Object(s.a)(i.props,["collapsedWidth","siderCollapsed"]),h=i.getRealMenuMode(),m=i.getOpenMotionProps(h),g=n("menu",l),v=a()(u,"".concat(g,"-").concat(f),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},"".concat(g,"-inline-collapsed"),i.getInlineCollapsed())),y=Ce({openKeys:i.state.openKeys,onOpenChange:i.handleOpenChange,className:v,mode:h},m);return"inline"!==h&&(y.onClick=i.handleClick),i.getInlineCollapsed()&&(0===d||"0"===d||"0px"===d)&&(y.openKeys=[]),r.createElement(o.e,Ce({getPopupContainer:t},p,y,{prefixCls:g,onTransitionEnd:i.handleTransitionEnd,onMouseEnter:i.handleMouseEnter}))},Object(_e.a)(!("onOpen"in e||"onClose"in e),"Menu","`onOpen` and `onClose` are removed, please use `onOpenChange` instead, see: https://u.ant.design/menu-on-open-change."),Object(_e.a)(!("inlineCollapsed"in e&&"inline"!==e.mode),"Menu","`inlineCollapsed` should only be used when `mode` is inline."),Object(_e.a)(!(void 0!==e.siderCollapsed&&"inlineCollapsed"in e),"Menu","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead."),"openKeys"in e?c=e.openKeys:"defaultOpenKeys"in e&&(c=e.defaultOpenKeys),i.state={openKeys:c||[],switchingModeFromInline:!1,inlineOpenKeys:[],prevProps:e},i}return Oe(n,[{key:"componentWillUnmount",value:function(){xe.a.cancel(this.mountRafId)}},{key:"setOpenKeys",value:function(e){"openKeys"in this.props||this.setState({openKeys:e})}},{key:"getRealMenuMode",value:function(){var e=this.getInlineCollapsed();if(this.state.switchingModeFromInline&&e)return"inline";var t=this.props.mode;return e?"vertical":t}},{key:"getInlineCollapsed",value:function(){var e=this.props.inlineCollapsed;return void 0!==this.props.siderCollapsed?this.props.siderCollapsed:e}},{key:"getOpenMotionProps",value:function(e){var t=this.props,n=t.openTransitionName,r=t.openAnimation,o=t.motion;return o?{motion:o}:r?(Object(_e.a)("string"==typeof r,"Menu","`openAnimation` do not support object. Please use `motion` instead."),{openAnimation:r}):n?{openTransitionName:n}:"horizontal"===e?{motion:{motionName:"slide-up"}}:"inline"===e?{motion:ke.a}:{motion:{motionName:this.state.switchingModeFromInline?"":"zoom-big"}}}},{key:"restoreModeVerticalFromInline",value:function(){this.state.switchingModeFromInline&&this.setState({switchingModeFromInline:!1})}},{key:"render",value:function(){return r.createElement(d.Provider,{value:{inlineCollapsed:this.getInlineCollapsed()||!1,antdMenuTheme:this.props.theme}},r.createElement(S.a,null,this.renderMenu))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r={prevProps:e};return"inline"===n.mode&&"inline"!==e.mode&&(r.switchingModeFromInline=!0),"openKeys"in e?r.openKeys=e.openKeys:((e.inlineCollapsed&&!n.inlineCollapsed||e.siderCollapsed&&!n.siderCollapsed)&&(r.switchingModeFromInline=!0,r.inlineOpenKeys=t.openKeys,r.openKeys=[]),(!e.inlineCollapsed&&n.inlineCollapsed||!e.siderCollapsed&&n.siderCollapsed)&&(r.openKeys=t.inlineOpenKeys,r.inlineOpenKeys=[])),r}}]),n}(r.Component);je.defaultProps={className:"",theme:"light",focusable:!1},Object(c.polyfill)(je);var De=function(e){Te(n,e);var t=Ae(n);function n(){return Me(this,n),t.apply(this,arguments)}return Oe(n,[{key:"render",value:function(){var e=this;return r.createElement(ce.Consumer,null,(function(t){return r.createElement(je,Ce({},e.props,t))}))}}]),n}(r.Component);De.Divider=o.a,De.Item=we,De.SubMenu=x,De.ItemGroup=o.c},function(e,t,n){var r=n(182);e.exports=function(e,t){return r(e,t)}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(171);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports={}},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var c,l=[],u=!1,f=-1;function d(){u&&c&&(u=!1,c.length?l=c.concat(l):f=-1,l.length&&p())}function p(){if(!u){var e=s(d);u=!0;for(var t=l.length;t;){for(c=l,l=[];++f1)for(var n=1;n)[^>]*$|#([\w\-]*)$)/;t.isHtml=function(e){if("<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3)return!0;var t=a.exec(e);return!(!t||!t[1])}},function(e,t){e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},function(e,t,n){"use strict";function r(e){return"string"==typeof e}function o(e){return Array.isArray(e)&&e.length>0}function i(e){return"object"==typeof e}Object.defineProperty(t,"__esModule",{value:!0}),t.classNames=function e(){for(var t=[],n=0;n",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},i="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),a="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),s="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),c="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),l="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),u=i&&(c||+i[1]<57)||s&&c,f=0;f<10;f++)r[48+f]=r[96+f]=String(f);for(f=1;f<=24;f++)r[f+111]="F"+f;for(f=65;f<=90;f++)r[f]=String.fromCharCode(f+32),o[f]=String.fromCharCode(f);for(var d in r)o.hasOwnProperty(d)||(o[d]=r[d]);var p=n(13),h="undefined"!=typeof navigator&&/Mac/.test(navigator.platform);function m(e){var t,n,r,o,i=e.split(/-(?!$)/),a=i[i.length-1];"Space"==a&&(a=" ");for(var s=0;s127)&&(i=r[n.keyCode])&&i!=s){var d=t[g(i,n,!0)];if(d&&d(e.state,e.dispatch,e))return!0}else if(c&&n.shiftKey){var p=t[g(s,n,!0)];if(p&&p(e.state,e.dispatch,e))return!0}return!1}}},function(e,t,n){"use strict";var r={};function o(e,t){0}function i(e,t,n){t||r[n]||(e(!1,n),r[n]=!0)}t.a=function(e,t){i(o,e,t)}},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n.n(o),a=n(2),s=n.n(a),c=n(165),l=n(46),u=n(11),f=n(147),d=n(21);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function h(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),s?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),l=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),_="undefined"!=typeof WeakMap?new WeakMap:new n,x=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=c.getInstance(),r=new w(t,n,this);_.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){x.prototype[e]=function(){var t;return(t=_.get(this))[e].apply(t,arguments)}}));var k=void 0!==o.ResizeObserver?o.ResizeObserver:x;t.default=k}.call(this,n(32))},function(e,t,n){"use strict";function r(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";const r=(e,t,n)=>{const r=n<0?e.length+n:n,o=e.splice(t,1)[0];e.splice(r,0,o)},o=(e,t,n)=>(e=e.slice(),r(e,t,n),e);e.exports=o,e.exports.default=o,e.exports.mutate=r},function(e,t,n){"use strict";(function(e){var r=n(0),o=n(11),i=n(224),a=n(2),s=n.n(a),c=n(464),l=n.n(c),u=n(465),f=n.n(u),d=n(466),p=n(57),h=n(35),m=n(59),g=n(71),v=n(15);function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function w(){return(w=Object.assign||function(e){for(var t=1;t-1}function X(e,t){return function(n){e[t]=n}}function Q(){return(Q=Object.assign||function(e){for(var t=1;t0)return!0;return!1}(r,t)){var o=n.getValueByInput(r);return void 0!==o&&n.fireChange(o),n.setOpenState(!1,{needFocus:!0}),void n.setInputValue("",!1)}n.setInputValue(r),n.setState({open:!0}),H(n.props)&&n.fireChange([r])},n.onDropdownVisibleChange=function(e){e&&!n._focused&&(n.clearBlurTime(),n.timeoutFocus(),n._focused=!0,n.updateFocusClassName()),n.setOpenState(e)},n.onKeyDown=function(e){var t=n.state.open;if(!n.props.disabled){var r=e.keyCode;t&&!n.getInputDOMNode()?n.onInputKeyDown(e):r===M.a.ENTER||r===M.a.DOWN?(t||n.setOpenState(!0),e.preventDefault()):r===M.a.SPACE&&(t||(n.setOpenState(!0),e.preventDefault()))}},n.onInputKeyDown=function(e){var t=n.props,r=t.disabled,o=t.combobox,i=t.defaultActiveFirstOption;if(!r){var a=n.state,s=n.getRealOpenState(a),c=e.keyCode;if(!I(n.props)||e.target.value||c!==M.a.BACKSPACE){if(c===M.a.DOWN){if(!a.open)return n.openIfHasChildren(),e.preventDefault(),void e.stopPropagation()}else if(c===M.a.ENTER&&a.open)!s&&o||e.preventDefault(),s&&o&&!1===i&&(n.comboboxTimer=setTimeout((function(){n.setOpenState(!1)})));else if(c===M.a.ESC)return void(a.open&&(n.setOpenState(!1),e.preventDefault(),e.stopPropagation()));if(s&&n.selectTriggerRef){var l=n.selectTriggerRef.getInnerMenu();l&&l.onKeyDown(e,n.handleBackfill)&&(e.preventDefault(),e.stopPropagation())}}else{e.preventDefault();var u=a.value;u.length&&n.removeSelected(u[u.length-1])}}},n.onMenuSelect=function(e){var t=e.item;if(t){var r=n.state.value,o=n.props,i=F(t),a=r[r.length-1],s=!1;if(I(o)?-1!==U(r,i)?s=!0:r=r.concat([i]):H(o)||void 0===a||a!==i||i===n.state.backfillValue?(r=[i],n.setOpenState(!1,{needFocus:!0,fireSearch:!1})):(n.setOpenState(!1,{needFocus:!0,fireSearch:!1}),s=!0),s||n.fireChange(r),n.fireSelect(i),!s){var c=H(o)?R(t,o.optionLabelProp):"";o.autoClearSearchValue&&n.setInputValue(c,!1)}}},n.onMenuDeselect=function(e){var t=e.item,r=e.domEvent;if("keydown"!==r.type||r.keyCode!==M.a.ENTER){var o;"click"===r.type&&n.removeSelected(F(t)),n.props.autoClearSearchValue&&n.setInputValue("")}else{var i=E.findDOMNode(t);(o=i)&&null!==o.offsetParent&&n.removeSelected(F(t))}},n.onArrowClick=function(e){e.stopPropagation(),e.preventDefault(),n.props.disabled||n.setOpenState(!n.state.open,{needFocus:!n.state.open})},n.onPlaceholderClick=function(){n.getInputDOMNode&&n.getInputDOMNode()&&n.getInputDOMNode().focus()},n.onOuterFocus=function(e){if(n.props.disabled)e.preventDefault();else{n.clearBlurTime();var t=n.getInputDOMNode();t&&e.target===n.rootRef||(V(n.props)||e.target!==t)&&(n._focused||(n._focused=!0,n.updateFocusClassName(),I(n.props)&&n._mouseDown||n.timeoutFocus()))}},n.onPopupFocus=function(){n.maybeFocus(!0,!0)},n.onOuterBlur=function(e){n.props.disabled?e.preventDefault():n.blurTimer=window.setTimeout((function(){n._focused=!1,n.updateFocusClassName();var e=n.props,t=n.state.value,r=n.state.inputValue;if(B(e)&&e.showSearch&&r&&e.defaultActiveFirstOption){var o=n._options||[];if(o.length){var i=function e(t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=t.needFocus,o=t.fireSearch,i=n.props,a=n.state;if(a.open!==e){n.props.onDropdownVisibleChange&&n.props.onDropdownVisibleChange(e);var s={open:e,backfillValue:""};!e&&B(i)&&i.showSearch&&n.setInputValue("",o),e||n.maybeFocus(e,!!r),n.setState(he({open:e},s),(function(){e&&n.maybeFocus(e,!!r)}))}else n.maybeFocus(e,!!r)},n.setInputValue=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=n.props.onSearch;e!==n.state.inputValue&&n.setState((function(n){return t&&e!==n.inputValue&&r&&r(e),{inputValue:e}}),n.forcePopupAlign)},n.getValueByInput=function(e){var t=n.props,r=t.multiple,o=t.tokenSeparators,i=n.state.value,a=!1;return function(e,t){var n=new RegExp("[".concat(t.join(),"]"));return e.split(n).filter((function(e){return e}))}(e,o).forEach((function(e){var t=[e];if(r){var o=n.getValueByLabel(e);o&&-1===U(i,o)&&(i=i.concat(o),a=!0,n.fireSelect(o))}else-1===U(i,e)&&(i=i.concat(t),a=!0,n.fireSelect(e))})),a?i:void 0},n.getRealOpenState=function(e){var t=n.props.open;if("boolean"==typeof t)return t;var r=(e||n.state).open,o=n._options||[];return!V(n.props)&&n.props.showSearch||r&&!o.length&&(r=!1),r},n.markMouseDown=function(){n._mouseDown=!0},n.markMouseLeave=function(){n._mouseDown=!1},n.handleBackfill=function(e){if(n.props.backfill&&(B(n.props)||H(n.props))){var t=F(e);H(n.props)&&n.setInputValue(t,!1),n.setState({value:[t],backfillValue:t})}},n.filterOption=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:J,o=n.state.value,i=o[o.length-1];if(!e||i&&i===n.state.backfillValue)return!0;var a=n.props.filterOption;return"filterOption"in n.props?!0===a&&(a=r.bind(ve(n))):a=r.bind(ve(n)),!a||("function"==typeof a?a.call(ve(n),e,t):!t.props.disabled)},n.timeoutFocus=function(){var e=n.props.onFocus;n.focusTimer&&n.clearFocusTime(),n.focusTimer=window.setTimeout((function(){e&&e()}),10)},n.clearFocusTime=function(){n.focusTimer&&(clearTimeout(n.focusTimer),n.focusTimer=null)},n.clearBlurTime=function(){n.blurTimer&&(clearTimeout(n.blurTimer),n.blurTimer=null)},n.clearComboboxTime=function(){n.comboboxTimer&&(clearTimeout(n.comboboxTimer),n.comboboxTimer=null)},n.updateFocusClassName=function(){var e=n.rootRef,t=n.props;n._focused?x()(e).add("".concat(t.prefixCls,"-focused")):x()(e).remove("".concat(t.prefixCls,"-focused"))},n.maybeFocus=function(e,t){if(t||e){var r=n.getInputDOMNode(),o=document.activeElement;r&&(e||V(n.props))?o!==r&&(r.focus(),n._focused=!0):o!==n.selectionRef&&n.selectionRef&&(n.selectionRef.focus(),n._focused=!0)}},n.removeSelected=function(e,t){var r=n.props;if(!r.disabled&&!n.isChildDisabled(e)){t&&t.stopPropagation&&t.stopPropagation();var o=n.state.value.filter((function(t){return t!==e}));if(I(r)){var i=e;r.labelInValue&&(i={key:e,label:n.getLabelBySingleValue(e)}),r.onDeselect&&r.onDeselect(i,n.getOptionBySingleValue(e))}n.fireChange(o)}},n.openIfHasChildren=function(){var e=n.props;(r.Children.count(e.children)||B(e))&&n.setOpenState(!0)},n.fireSelect=function(e){n.props.onSelect&&n.props.onSelect(n.getVLBySingleValue(e),n.getOptionBySingleValue(e))},n.fireChange=function(e){var t=n.props;"value"in t||n.setState({value:e},n.forcePopupAlign);var r=n.getVLForOnChange(e),o=n.getOptionsBySingleValue(e);t.onChange&&t.onChange(r,I(n.props)?o:o[0])},n.isChildDisabled=function(e){return Object(C.a)(n.props.children).some((function(t){return F(t)===e&&t.props&&t.props.disabled}))},n.forcePopupAlign=function(){n.state.open&&n.selectTriggerRef&&n.selectTriggerRef.triggerRef&&n.selectTriggerRef.triggerRef.forcePopupAlign()},n.renderFilterOptions=function(){var e=n.state.inputValue,t=n.props,o=t.children,i=t.tags,a=t.notFoundContent,s=[],c=[],l=!1,u=n.renderFilterOptionsFromChildren(o,c,s);if(i){var f=n.state.value;(f=f.filter((function(t){return-1===c.indexOf(t)&&(!e||String(t).indexOf(String(e))>-1)}))).sort((function(e,t){return e.length-t.length})),f.forEach((function(e){var t=e,n=r.createElement(S.b,{style:K,role:"option",attribute:G,value:t,key:t},t);u.push(n),s.push(n)})),e&&s.every((function(t){return F(t)!==e}))&&u.unshift(r.createElement(S.b,{style:K,role:"option",attribute:G,value:e,key:e},e))}return!u.length&&a&&(l=!0,u=[r.createElement(S.b,{style:K,attribute:G,disabled:!0,role:"option",value:"NOT_FOUND",key:"NOT_FOUND"},a)]),{empty:l,options:u}},n.renderFilterOptionsFromChildren=function(e,t,o){var i=[],a=n.props,s=n.state.inputValue,c=a.tags;return r.Children.forEach(e,(function(e){if(e){var a=e.type;if(a.isSelectOptGroup){var l=e.props.label,u=e.key;if(u||"string"!=typeof l?!l&&u&&(l=u):u=l,s&&n.filterOption(s,e)){var f=Object(C.a)(e.props.children).map((function(e){var t=F(e)||e.key;return r.createElement(S.b,he({key:t,value:t},e.props))}));i.push(r.createElement(S.c,{key:u,title:l},f))}else{var d=n.renderFilterOptionsFromChildren(e.props.children,t,o);d.length&&i.push(r.createElement(S.c,{key:u,title:l},d))}}else{L()(a.isSelectOption,"the children of `Select` should be `Select.Option` or `Select.OptGroup`, "+"instead of `".concat(a.name||a.displayName||e.type,"`."));var p=F(e);if(function(e,t){if(!B(t)&&!function(e){return e.multiple}(t)&&"string"!=typeof e)throw new Error("Invalid `value` of type `".concat(typeof e,"` supplied to Option, ")+"expected `string` when `tags/combobox` is `true`.")}(p,n.props),n.filterOption(s,e)){var h=r.createElement(S.b,he({style:K,attribute:G,value:p,key:p,role:"option"},e.props));i.push(h),o.push(h)}c&&t.push(p)}}})),i},n.renderTopControlNode=function(){var e=n.state,t=e.open,o=e.inputValue,i=n.state.value,a=n.props,s=a.choiceTransitionName,c=a.prefixCls,l=a.maxTagTextLength,u=a.maxTagCount,f=a.showSearch,d=a.removeIcon,p=a.maxTagPlaceholder,h="".concat(c,"-selection__rendered"),m=null;if(B(a)){var g=null;if(i.length){var v=!1,y=1;f&&t?(v=!o)&&(y=.4):v=!0;var b=i[0],w=n.getOptionInfoBySingleValue(b),_=w.label,x=w.title;g=r.createElement("div",{key:"value",className:"".concat(c,"-selection-selected-value"),title:N(x||_),style:{display:v?"block":"none",opacity:y}},_)}m=f?[g,r.createElement("div",{className:"".concat(c,"-search ").concat(c,"-search--inline"),key:"input",style:{display:t?"block":"none"}},n.getInputElement())]:[g]}else{var S,C=[],M=i;if(void 0!==u&&i.length>u){M=M.slice(0,u);var E=n.getVLForOnChange(i.slice(u,i.length)),O="+ ".concat(i.length-u," ...");p&&(O="function"==typeof p?p(E):p),S=r.createElement("li",he({style:K},G,{role:"presentation",onMouseDown:W,className:"".concat(c,"-selection__choice ").concat(c,"-selection__choice__disabled"),key:"maxTagPlaceholder",title:N(O)}),r.createElement("div",{className:"".concat(c,"-selection__choice__content")},O))}I(a)&&(C=M.map((function(e){var t=n.getOptionInfoBySingleValue(e),o=t.label,i=t.title||o;l&&"string"==typeof o&&o.length>l&&(o="".concat(o.slice(0,l),"..."));var a=n.isChildDisabled(e),s=a?"".concat(c,"-selection__choice ").concat(c,"-selection__choice__disabled"):"".concat(c,"-selection__choice");return r.createElement("li",he({style:K},G,{onMouseDown:W,className:s,role:"presentation",key:e||"RC_SELECT_EMPTY_VALUE_KEY",title:N(i)}),r.createElement("div",{className:"".concat(c,"-selection__choice__content")},o),a?null:r.createElement("span",{onClick:function(t){n.removeSelected(e,t)},className:"".concat(c,"-selection__choice__remove")},d||r.createElement("i",{className:"".concat(c,"-selection__choice__remove-icon")},"×")))}))),S&&C.push(S),C.push(r.createElement("li",{className:"".concat(c,"-search ").concat(c,"-search--inline"),key:"__input"},n.getInputElement())),m=I(a)&&s?r.createElement(k.a,{onLeave:n.onChoiceAnimationLeave,component:"ul",transitionName:s},C):r.createElement("ul",null,C)}return r.createElement("div",{className:h,ref:n.saveTopCtrlRef},n.getPlaceholderElement(),m)};var o=t.getOptionsInfoFromProps(e);if(e.tags&&"function"!=typeof e.filterOption){var i=Object.keys(o).some((function(e){return o[e].disabled}));L()(!i,"Please avoid setting option to disabled in tags mode since user can always type text as tag.")}return n.state={value:t.getValueFromProps(e,!0),inputValue:e.combobox?t.getInputValueForCombobox(e,o,!0):"",open:e.defaultOpen,optionsInfo:o,backfillValue:"",skipBuildOptionsInfo:!0,ariaId:""},n.saveInputRef=X(ve(n),"inputRef"),n.saveInputMirrorRef=X(ve(n),"inputMirrorRef"),n.saveTopCtrlRef=X(ve(n),"topCtrlRef"),n.saveSelectTriggerRef=X(ve(n),"selectTriggerRef"),n.saveRootRef=X(ve(n),"rootRef"),n.saveSelectionRef=X(ve(n),"selectionRef"),n}var n,o,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ye(e,t)}(t,e),n=t,(o=[{key:"componentDidMount",value:function(){var e;(this.props.autoFocus||this.state.open)&&this.focus(),this.setState({ariaId:(e=(new Date).getTime(),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:7&n|8).toString(16)})))})}},{key:"componentDidUpdate",value:function(){if(I(this.props)){var e=this.getInputDOMNode(),t=this.getInputMirrorDOMNode();e&&e.value&&t?(e.style.width="",e.style.width="".concat(t.clientWidth,"px")):e&&(e.style.width="")}this.forcePopupAlign()}},{key:"componentWillUnmount",value:function(){this.clearFocusTime(),this.clearBlurTime(),this.clearComboboxTime(),this.dropdownContainer&&(E.unmountComponentAtNode(this.dropdownContainer),document.body.removeChild(this.dropdownContainer),this.dropdownContainer=null)}},{key:"focus",value:function(){B(this.props)&&this.selectionRef?this.selectionRef.focus():this.getInputDOMNode()&&this.getInputDOMNode().focus()}},{key:"blur",value:function(){B(this.props)&&this.selectionRef?this.selectionRef.blur():this.getInputDOMNode()&&this.getInputDOMNode().blur()}},{key:"renderArrow",value:function(e){var t=this.props,n=t.showArrow,o=void 0===n?!e:n,i=t.loading,a=t.inputIcon,s=t.prefixCls;if(!o&&!i)return null;var c=i?r.createElement("i",{className:"".concat(s,"-arrow-loading")}):r.createElement("i",{className:"".concat(s,"-arrow-icon")});return r.createElement("span",he({key:"arrow",className:"".concat(s,"-arrow"),style:K},G,{onClick:this.onArrowClick}),a||c)}},{key:"renderClear",value:function(){var e=this.props,t=e.prefixCls,n=e.allowClear,o=e.clearIcon,i=this.state.inputValue,a=this.state.value,s=r.createElement("span",he({key:"clear",className:"".concat(t,"-selection__clear"),onMouseDown:W,style:K},G,{onClick:this.onClearSelection}),o||r.createElement("i",{className:"".concat(t,"-selection__clear-icon")},"×"));return n?H(this.props)?i?s:null:i||a.length?s:null:null}},{key:"render",value:function(){var e,t=this.props,n=I(t),o=t.showArrow,i=void 0===o||o,a=this.state,s=t.className,c=t.disabled,l=t.prefixCls,u=t.loading,f=this.renderTopControlNode(),d=this.state,p=d.open,h=d.ariaId;if(p){var m=this.renderFilterOptions();this._empty=m.empty,this._options=m.options}var g=this.getRealOpenState(),v=this._empty,y=this._options||[],b={};Object.keys(t).forEach((function(e){!Object.prototype.hasOwnProperty.call(t,e)||"data-"!==e.substr(0,5)&&"aria-"!==e.substr(0,5)&&"role"!==e||(b[e]=t[e])}));var _=he({},b);V(t)||(_=he(he({},_),{onKeyDown:this.onKeyDown,tabIndex:t.disabled?-1:t.tabIndex}));var x=(pe(e={},s,!!s),pe(e,l,1),pe(e,"".concat(l,"-open"),p),pe(e,"".concat(l,"-focused"),p||!!this._focused),pe(e,"".concat(l,"-combobox"),H(t)),pe(e,"".concat(l,"-disabled"),c),pe(e,"".concat(l,"-enabled"),!c),pe(e,"".concat(l,"-allow-clear"),!!t.allowClear),pe(e,"".concat(l,"-no-arrow"),!i),pe(e,"".concat(l,"-loading"),!!u),e);return r.createElement(de,{onPopupFocus:this.onPopupFocus,onMouseEnter:this.props.onMouseEnter,onMouseLeave:this.props.onMouseLeave,dropdownAlign:t.dropdownAlign,dropdownClassName:t.dropdownClassName,dropdownMatchSelectWidth:t.dropdownMatchSelectWidth,defaultActiveFirstOption:t.defaultActiveFirstOption,dropdownMenuStyle:t.dropdownMenuStyle,transitionName:t.transitionName,animation:t.animation,prefixCls:t.prefixCls,dropdownStyle:t.dropdownStyle,combobox:t.combobox,showSearch:t.showSearch,options:y,empty:v,multiple:n,disabled:c,visible:g,inputValue:a.inputValue,value:a.value,backfillValue:a.backfillValue,firstActiveValue:t.firstActiveValue,onDropdownVisibleChange:this.onDropdownVisibleChange,getPopupContainer:t.getPopupContainer,onMenuSelect:this.onMenuSelect,onMenuDeselect:this.onMenuDeselect,onPopupScroll:t.onPopupScroll,showAction:t.showAction,ref:this.saveSelectTriggerRef,menuItemSelectedIcon:t.menuItemSelectedIcon,dropdownRender:t.dropdownRender,ariaId:h},r.createElement("div",{id:t.id,style:t.style,ref:this.saveRootRef,onBlur:this.onOuterBlur,onFocus:this.onOuterFocus,className:w()(x),onMouseDown:this.markMouseDown,onMouseUp:this.markMouseLeave,onMouseOut:this.markMouseLeave},r.createElement("div",he({ref:this.saveSelectionRef,key:"selection",className:"".concat(l,"-selection\n ").concat(l,"-selection--").concat(n?"multiple":"single"),role:"combobox","aria-autocomplete":"list","aria-haspopup":"true","aria-controls":h,"aria-expanded":g},_),f,this.renderClear(),this.renderArrow(!!n))))}}])&&me(n.prototype,o),i&&me(n,i),t}(r.Component);_e.propTypes=y,_e.defaultProps={prefixCls:"rc-select",defaultOpen:!1,labelInValue:!1,defaultActiveFirstOption:!0,showSearch:!0,allowClear:!1,placeholder:"",onChange:be,onFocus:be,onBlur:be,onSelect:be,onSearch:be,onDeselect:be,onInputKeyDown:be,dropdownMatchSelectWidth:!0,dropdownStyle:{},dropdownMenuStyle:{},optionFilterProp:"value",optionLabelProp:"value",notFoundContent:"Not Found",backfill:!1,showAction:["click"],tokenSeparators:[],autoClearSearchValue:!0,tabIndex:0,dropdownRender:function(e){return e}},_e.getDerivedStateFromProps=function(e,t){var n=t.skipBuildOptionsInfo?t.optionsInfo:_e.getOptionsInfoFromProps(e,t),r={optionsInfo:n,skipBuildOptionsInfo:!1};if("open"in e&&(r.open=e.open),e.disabled&&t.open&&(r.open=!1),"value"in e){var o=_e.getValueFromProps(e);r.value=o,e.combobox&&(r.inputValue=_e.getInputValueForCombobox(e,n))}return r},_e.getOptionsFromChildren=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return r.Children.forEach(e,(function(e){e&&(e.type.isSelectOptGroup?_e.getOptionsFromChildren(e.props.children,t):t.push(e))})),t},_e.getInputValueForCombobox=function(e,t,n){var r=[];if("value"in e&&!n&&(r=Y(e.value)),"defaultValue"in e&&n&&(r=Y(e.defaultValue)),!r.length)return"";var o=r=r[0];return e.labelInValue?o=r.label:t[$(r)]&&(o=t[$(r)].label),void 0===o&&(o=""),o},_e.getLabelFromOption=function(e,t){return R(t,e.optionLabelProp)},_e.getOptionsInfoFromProps=function(e,t){var n=_e.getOptionsFromChildren(e.children),r={};if(n.forEach((function(t){var n=F(t);r[$(n)]={option:t,value:n,label:_e.getLabelFromOption(e,t),title:t.props.title,disabled:t.props.disabled}})),t){var o=t.optionsInfo,i=t.value;i&&i.forEach((function(e){var t=$(e);r[t]||void 0===o[t]||(r[t]=o[t])}))}return r},_e.getValueFromProps=function(e,t){var n=[];return"value"in e&&!t&&(n=Y(e.value)),"defaultValue"in e&&t&&(n=Y(e.defaultValue)),e.labelInValue&&(n=n.map((function(e){return e.key}))),n},_e.displayName="Select",Object(O.polyfill)(_e);var xe=_e;xe.Option=m,xe.OptGroup=u;var ke=xe,Se=n(18),Ce=n(71),Me=n(15),Ee=n(10),Oe=n(26);function Te(e){return(Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Le(){return(Le=Object.assign||function(e){for(var t=1;t-1&&e%1==0&&e",n)[0];return o.type="root",t.update(r,o),o}).evaluate=function(e,t){return"string"==typeof e||r.isBuffer(e)?o.parseDOM(e,t):e},t.update=function(e,t){Array.isArray(e)||(e=[e]),t?t.children=e:t=null;for(var n=0;n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}(e)}function w(e){return b(e)?f(e):g(e)}function _(e){return e}e.exports=function(e,t){return(y(e)?r:h)(e,"function"==typeof t?t:_)}},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(495)),o=a(n(505)),i="function"==typeof o.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof o.default&&"symbol"===i(r.default)?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":i(e)}},function(e,t,n){"use strict";t.a={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"}},function(e,t,n){"use strict";t.a={today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(37),o=n.n(r)()(null)},function(e,t,n){"use strict";var r=function(){return{height:0,opacity:0}},o=function(e){return{height:e.scrollHeight,opacity:1}},i={motionName:"ant-motion-collapse",onAppearStart:r,onEnterStart:r,onAppearActive:o,onEnterActive:o,onLeaveStart:function(e){return{height:e.offsetHeight}},onLeaveActive:r};t.a=i},function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a=function(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");return"function"!=typeof t.componentWillReceiveProps?e:o.a.Profiler?(t.UNSAFE_componentWillReceiveProps=t.componentWillReceiveProps,delete t.componentWillReceiveProps,e):e}},function(e,t,n){"use strict";var r=n(0),o=n(1),i=n(2),a=n.n(i),s=n(18),c=n(34),l=n.n(c),u=n(71),f=n(26);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(){return(p=Object.assign||function(e){for(var t=1;tthis.state.expandedBlocks.length>0&&(this.setState({expandedBlocks:[]}),!0),this.onBlockExpand=e=>{const t=this.state.expandedBlocks.slice();t.push(e),this.setState({expandedBlocks:t})},this.computeStyles=l(s.default),this.onLineNumberClickProxy=e=>this.props.onLineNumberClick?t=>this.props.onLineNumberClick(e,t):()=>{},this.renderWordDiff=(e,t)=>e.map((e,n)=>r.createElement("span",{key:n,className:i.default(this.styles.wordDiff,{[this.styles.wordAdded]:e.type===a.DiffType.ADDED,[this.styles.wordRemoved]:e.type===a.DiffType.REMOVED})},t?t(e.value):e.value)),this.renderLine=(e,t,n,o,s,c)=>{const l=`${n}-${e}`,u=`${c}-${s}`,f=this.props.highlightLines.includes(l)||this.props.highlightLines.includes(u),d=t===a.DiffType.ADDED,p=t===a.DiffType.REMOVED;let h;return h=Array.isArray(o)?this.renderWordDiff(o,this.props.renderContent):this.props.renderContent?this.props.renderContent(o):o,r.createElement(r.Fragment,null,!this.props.hideLineNumbers&&r.createElement("td",{onClick:e&&this.onLineNumberClickProxy(l),className:i.default(this.styles.gutter,{[this.styles.emptyGutter]:!e,[this.styles.diffAdded]:d,[this.styles.diffRemoved]:p,[this.styles.highlightedGutter]:f})},r.createElement("pre",null,e)),!this.props.splitView&&!this.props.hideLineNumbers&&r.createElement("td",{onClick:s&&this.onLineNumberClickProxy(u),className:i.default(this.styles.gutter,{[this.styles.emptyGutter]:!s,[this.styles.diffAdded]:d,[this.styles.diffRemoved]:p,[this.styles.highlightedGutter]:f})},r.createElement("pre",null,s)),r.createElement("td",{className:i.default(this.styles.marker,{[this.styles.emptyLine]:!h,[this.styles.diffAdded]:d,[this.styles.diffRemoved]:p,[this.styles.highlightedLine]:f})},r.createElement("pre",null,d&&"+",p&&"-")),r.createElement("td",{className:i.default({[this.styles.emptyLine]:!h,[this.styles.diffAdded]:d,[this.styles.diffRemoved]:p,[this.styles.highlightedLine]:f})},r.createElement("pre",null,h)))},this.renderSplitView=({left:e,right:t},n)=>r.createElement("tr",{key:n,className:this.styles.line},this.renderLine(e.lineNumber,e.type,u.LEFT,e.value),this.renderLine(t.lineNumber,t.type,u.RIGHT,t.value)),this.renderInlineView=({left:e,right:t},n)=>{let o;return e.type===a.DiffType.REMOVED&&t.type===a.DiffType.ADDED?r.createElement(r.Fragment,{key:n},r.createElement("tr",{className:this.styles.line},this.renderLine(e.lineNumber,e.type,u.LEFT,e.value,null)),r.createElement("tr",{className:this.styles.line},this.renderLine(null,t.type,u.RIGHT,t.value,t.lineNumber))):(e.type===a.DiffType.REMOVED&&(o=this.renderLine(e.lineNumber,e.type,u.LEFT,e.value,null)),e.type===a.DiffType.DEFAULT&&(o=this.renderLine(e.lineNumber,e.type,u.LEFT,e.value,t.lineNumber,u.RIGHT)),t.type===a.DiffType.ADDED&&(o=this.renderLine(null,t.type,u.RIGHT,t.value,t.lineNumber)),r.createElement("tr",{key:n,className:this.styles.line},o))},this.onBlockClickProxy=e=>()=>this.onBlockExpand(e),this.renderSkippedLineIndicator=(e,t,n,o)=>{const{splitView:a}=this.props,s=this.props.codeFoldMessageRenderer?this.props.codeFoldMessageRenderer(e,n,o):r.createElement("pre",null,"Expand ",e," lines ..."),c=r.createElement("td",null,r.createElement("a",{onClick:this.onBlockClickProxy(t),tabIndex:0},s));return r.createElement("tr",{key:`${n}-${o}`,className:this.styles.codeFold},!this.props.hideLineNumbers&&r.createElement("td",{className:this.styles.codeFoldGutter}),r.createElement("td",{className:i.default({[this.styles.codeFoldGutter]:!a})}),a?c:r.createElement("td",null),a?r.createElement("td",null):c,r.createElement("td",null),r.createElement("td",null))},this.renderDiff=()=>{const{oldValue:e,newValue:t,splitView:n}=this.props,{lineInformation:o,diffLines:i}=a.computeLineInformation(e,t,this.props.disableWordDiff),s=this.props.extraLinesSurroundingDiff<0?0:this.props.extraLinesSurroundingDiff;let c=[];return o.map((e,t)=>{const l=i[0],u=l-t;if(this.props.showDiffOnly&&(u===-s&&(c=[],i.shift()),e.left.type===a.DiffType.DEFAULT&&(u>s||void 0===l)&&!this.state.expandedBlocks.includes(l)))return c.push(t+1),t===o.length-1&&c.length>1?this.renderSkippedLineIndicator(c.length,l,e.left.lineNumber,e.right.lineNumber):null;const f=n?this.renderSplitView(e,t):this.renderInlineView(e,t);if(u===s&&c.length>0){const{length:n}=c;return c=[],r.createElement(r.Fragment,{key:t},this.renderSkippedLineIndicator(n,l,e.left.lineNumber,e.right.lineNumber),f)}return f})},this.render=()=>{const{oldValue:e,newValue:t}=this.props;if("string"!=typeof e||"string"!=typeof t)throw Error('"oldValue" and "newValue" should be strings');this.styles=this.computeStyles(this.props.styles);const n=this.renderDiff();return r.createElement("table",{className:this.styles.diffContainer},r.createElement("tbody",null,n))},this.state={expandedBlocks:[]}}}f.defaultProps={oldValue:"",newValue:"",splitView:!0,highlightLines:[],disableWordDiff:!1,styles:{},hideLineNumbers:!1,extraLinesSurroundingDiff:3,showDiffOnly:!0},f.propTypes={oldValue:o.string.isRequired,newValue:o.string.isRequired,splitView:o.bool,disableWordDiff:o.bool,renderContent:o.func,onLineNumberClick:o.func,extraLinesSurroundingDiff:o.number,styles:o.object,hideLineNumbers:o.bool,showDiffOnly:o.bool,highlightLines:o.arrayOf(o.string)},t.default=f},function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var r=n(0),o=n.n(r),i=n(12),a=n.n(i),s=n(1),c=n.n(s);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var n=0;n=0||e.relatedTarget.className.indexOf(i+"-next")>=0)||o(r.getValidValue())},r.go=function(e){""!==r.state.goInputText&&(e.keyCode!==k&&"click"!==e.type||(r.setState({goInputText:""}),r.props.quickGo(r.getValidValue())))},o=n,h()(r,o)}return g()(t,e),d()(t,[{key:"getValidValue",value:function(){var e=this.state,t=e.goInputText,n=e.current;return!t||isNaN(t)?n:Number(t)}},{key:"render",value:function(){var e=this,t=this.props,n=t.pageSize,r=t.pageSizeOptions,i=t.locale,a=t.rootPrefixCls,s=t.changeSize,c=t.quickGo,l=t.goButton,u=t.selectComponentClass,f=t.buildOptionText,d=t.selectPrefixCls,p=t.disabled,h=this.state.goInputText,m=a+"-options",g=u,v=null,y=null,b=null;if(!s&&!c)return null;if(s&&g){var w=r.map((function(t,n){return o.a.createElement(g.Option,{key:n,value:t},(f||e.buildOptionText)(t))}));v=o.a.createElement(g,{disabled:p,prefixCls:d,showSearch:!1,className:m+"-size-changer",optionLabelProp:"children",dropdownMatchSelectWidth:!1,value:(n||r[0]).toString(),onChange:this.changeSize,getPopupContainer:function(e){return e.parentNode}},w)}return c&&(l&&(b="boolean"==typeof l?o.a.createElement("button",{type:"button",onClick:this.go,onKeyUp:this.go,disabled:p},i.jump_to_confirm):o.a.createElement("span",{onClick:this.go,onKeyUp:this.go},l)),y=o.a.createElement("div",{className:m+"-quick-jumper"},i.jump_to,o.a.createElement("input",{disabled:p,type:"text",value:h,onChange:this.handleChange,onKeyUp:this.go,onBlur:this.handleBlur}),i.page,b)),o.a.createElement("li",{className:""+m},v,y)}}]),t}(o.a.Component);M.propTypes={disabled:w.a.bool,changeSize:w.a.func,quickGo:w.a.func,selectComponentClass:w.a.func,current:w.a.number,pageSizeOptions:w.a.arrayOf(w.a.string),pageSize:w.a.number,buildOptionText:w.a.func,locale:w.a.object,rootPrefixCls:w.a.string,selectPrefixCls:w.a.string,goButton:w.a.oneOfType([w.a.bool,w.a.node])},M.defaultProps={pageSizeOptions:["10","20","30","40"]};var E=M,O=n(11);function T(){}function L(e,t,n){var r=e;return void 0===r&&(r=t.pageSize),Math.floor((n.total-1)/r)+1}var A=function(e){function t(e){u()(this,t);var n=h()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));z.call(n);var r=e.onChange!==T;"current"in e&&!r&&console.warn("Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");var o=e.defaultCurrent;"current"in e&&(o=e.current);var i=e.defaultPageSize;return"pageSize"in e&&(i=e.pageSize),o=Math.min(o,L(i,void 0,e)),n.state={current:o,currentInputValue:o,pageSize:i},n}return g()(t,e),d()(t,[{key:"componentDidUpdate",value:function(e,t){var n=this.props.prefixCls;if(t.current!==this.state.current&&this.paginationNode){var r=this.paginationNode.querySelector("."+n+"-item-"+t.current);r&&document.activeElement===r&&r.blur()}}},{key:"getValidValue",value:function(e){var t=e.target.value,n=L(void 0,this.state,this.props),r=this.state.currentInputValue;return""===t?t:isNaN(Number(t))?r:t>=n?n:Number(t)}},{key:"render",value:function(){var e=this.props,t=e.prefixCls,n=e.className,r=e.disabled;if(!0===this.props.hideOnSinglePage&&this.props.total<=this.state.pageSize)return null;var i=this.props,s=i.locale,l=L(void 0,this.state,this.props),u=[],f=null,d=null,p=null,h=null,m=null,g=i.showQuickJumper&&i.showQuickJumper.goButton,v=i.showLessItems?1:2,b=this.state,w=b.current,_=b.pageSize,k=w-1>0?w-1:0,S=w+1=2*v&&3!==w&&(u[0]=o.a.cloneElement(u[0],{className:t+"-item-after-jump-prev"}),u.unshift(f)),l-w>=2*v&&w!==l-2&&(u[u.length-1]=o.a.cloneElement(u[u.length-1],{className:t+"-item-before-jump-next"}),u.push(d)),1!==D&&u.unshift(p),N!==l&&u.push(h)}var H=null;i.showTotal&&(H=o.a.createElement("li",{className:t+"-total-text"},i.showTotal(i.total,[0===i.total?0:(w-1)*_+1,w*_>i.total?i.total:w*_])));var I=!this.hasPrev()||!l,V=!this.hasNext()||!l;return o.a.createElement("ul",c()({className:y()(t,n,a()({},t+"-disabled",r)),style:i.style,unselectable:"unselectable",ref:this.savePaginationNode},C),H,o.a.createElement("li",{title:i.showTitle?s.prev_page:null,onClick:this.prev,tabIndex:I?null:0,onKeyPress:this.runIfEnterPrev,className:(I?t+"-disabled":"")+" "+t+"-prev","aria-disabled":I},i.itemRender(k,"prev",this.getItemIcon(i.prevIcon))),u,o.a.createElement("li",{title:i.showTitle?s.next_page:null,onClick:this.next,tabIndex:V?null:0,onKeyPress:this.runIfEnterNext,className:(V?t+"-disabled":"")+" "+t+"-next","aria-disabled":V},i.itemRender(S,"next",this.getItemIcon(i.nextIcon))),o.a.createElement(E,{disabled:r,locale:i.locale,rootPrefixCls:t,selectComponentClass:i.selectComponentClass,selectPrefixCls:i.selectPrefixCls,changeSize:this.props.showSizeChanger?this.changePageSize:null,current:this.state.current,pageSize:this.state.pageSize,pageSizeOptions:this.props.pageSizeOptions,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:g}))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n={};if("current"in e&&(n.current=e.current,e.current!==t.current&&(n.currentInputValue=n.current)),"pageSize"in e&&e.pageSize!==t.pageSize){var r=t.current,o=L(e.pageSize,t,e);r=r>o?o:r,"current"in e||(n.current=r,n.currentInputValue=r),n.pageSize=e.pageSize}return n}}]),t}(o.a.Component);A.propTypes={disabled:w.a.bool,prefixCls:w.a.string,className:w.a.string,current:w.a.number,defaultCurrent:w.a.number,total:w.a.number,pageSize:w.a.number,defaultPageSize:w.a.number,onChange:w.a.func,hideOnSinglePage:w.a.bool,showSizeChanger:w.a.bool,showLessItems:w.a.bool,onShowSizeChange:w.a.func,selectComponentClass:w.a.func,showPrevNextJumpers:w.a.bool,showQuickJumper:w.a.oneOfType([w.a.bool,w.a.object]),showTitle:w.a.bool,pageSizeOptions:w.a.arrayOf(w.a.string),showTotal:w.a.func,locale:w.a.object,style:w.a.object,itemRender:w.a.func,prevIcon:w.a.oneOfType([w.a.func,w.a.node]),nextIcon:w.a.oneOfType([w.a.func,w.a.node]),jumpPrevIcon:w.a.oneOfType([w.a.func,w.a.node]),jumpNextIcon:w.a.oneOfType([w.a.func,w.a.node])},A.defaultProps={defaultCurrent:1,total:0,defaultPageSize:10,onChange:T,className:"",selectPrefixCls:"rc-select",prefixCls:"rc-pagination",selectComponentClass:null,hideOnSinglePage:!1,showPrevNextJumpers:!0,showQuickJumper:!1,showSizeChanger:!1,showLessItems:!1,showTitle:!0,onShowSizeChange:T,locale:{items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"},style:{},itemRender:function(e,t,n){return n}};var z=function(){var e=this;this.getJumpPrevPage=function(){return Math.max(1,e.state.current-(e.props.showLessItems?3:5))},this.getJumpNextPage=function(){return Math.min(L(void 0,e.state,e.props),e.state.current+(e.props.showLessItems?3:5))},this.getItemIcon=function(t){var n=e.props.prefixCls,r=t||o.a.createElement("a",{className:n+"-item-link"});return"function"==typeof t&&(r=o.a.createElement(t,c()({},e.props))),r},this.savePaginationNode=function(t){e.paginationNode=t},this.isValid=function(t){return function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}(t)&&t!==e.state.current},this.shouldDisplayQuickJumper=function(){var t=e.props,n=t.showQuickJumper,r=t.pageSize;return!(t.total<=r)&&n},this.handleKeyDown=function(e){e.keyCode!==S&&e.keyCode!==C||e.preventDefault()},this.handleKeyUp=function(t){var n=e.getValidValue(t);n!==e.state.currentInputValue&&e.setState({currentInputValue:n}),t.keyCode===k?e.handleChange(n):t.keyCode===S?e.handleChange(n-1):t.keyCode===C&&e.handleChange(n+1)},this.changePageSize=function(t){var n=e.state.current,r=L(t,e.state,e.props);n=n>r?r:n,0===r&&(n=e.state.current),"number"==typeof t&&("pageSize"in e.props||e.setState({pageSize:t}),"current"in e.props||e.setState({current:n,currentInputValue:n})),e.props.onShowSizeChange(n,t)},this.handleChange=function(t){var n=e.props.disabled,r=t;if(e.isValid(r)&&!n){var o=L(void 0,e.state,e.props);r>o?r=o:r<1&&(r=1),"current"in e.props||e.setState({current:r,currentInputValue:r});var i=e.state.pageSize;return e.props.onChange(r,i),r}return e.state.current},this.prev=function(){e.hasPrev()&&e.handleChange(e.state.current-1)},this.next=function(){e.hasNext()&&e.handleChange(e.state.current+1)},this.jumpPrev=function(){e.handleChange(e.getJumpPrevPage())},this.jumpNext=function(){e.handleChange(e.getJumpNextPage())},this.hasPrev=function(){return e.state.current>1},this.hasNext=function(){return e.state.current2?n-2:0),o=2;o0&&(h=l.map((function(e){return"string"==typeof e?r.createElement(x,{key:e,prefixCls:f,disabled:t.props.disabled,value:e,checked:t.state.value===e},e):r.createElement(x,{key:"radio-group-value-options-".concat(e.value),prefixCls:f,disabled:e.disabled||t.props.disabled,value:e.value,checked:t.state.value===e.value},e.label)}))),r.createElement("div",{className:p,style:o.style,onMouseEnter:o.onMouseEnter,onMouseLeave:o.onMouseLeave,id:o.id},h)},"value"in e)n=e.value;else if("defaultValue"in e)n=e.defaultValue;else{var o=A(e.children);n=o&&o.value}return t.state={value:n},t}return t=a,o=[{key:"getDerivedStateFromProps",value:function(e){if("value"in e)return{value:e.value};var t=A(e.children);return t?{value:t.value}:null}}],(n=[{key:"getChildContext",value:function(){return{radioGroup:{onChange:this.onRadioChange,value:this.state.value,disabled:this.props.disabled,name:this.props.name}}}},{key:"shouldComponentUpdate",value:function(e,t){return!l()(this.props,e)||!l()(this.state,t)}},{key:"render",value:function(){return r.createElement(u.a,null,this.renderGroup)}}])&&C(t.prototype,n),o&&C(t,o),a}(r.Component);z.defaultProps={buttonStyle:"outline"},z.childContextTypes={radioGroup:o.any},Object(k.polyfill)(z);var P=z;function j(e){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(){return(D=Object.assign||function(e){for(var t=1;tt.year()?1:e.year()===t.year()&&e.month()>t.month()}var S=function(e){function t(){return o()(this,t),a()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.contentRender,n=e.prefixCls,r=e.selectedValue,o=e.value,i=e.showWeekNumber,a=e.dateRender,s=e.disabledDate,c=e.hoverValue,l=void 0,p=void 0,h=void 0,m=[],g=Object(w.e)(o),v=n+"-cell",y=n+"-week-number-cell",S=n+"-date",C=n+"-today",M=n+"-selected-day",E=n+"-selected-date",O=n+"-selected-start-date",T=n+"-selected-end-date",L=n+"-in-range-cell",A=n+"-last-month-cell",z=n+"-next-month-btn-day",P=n+"-disabled-cell",j=n+"-disabled-cell-first-of-row",D=n+"-disabled-cell-last-of-row",N=n+"-last-day-of-month",F=o.clone();F.date(1);var R=(F.day()+7-o.localeData().firstDayOfWeek())%7,H=F.clone();H.add(0-R,"days");var I=0;for(l=0;l0&&(G=m[I-1]);var J=v,X=!1,Q=!1;_(h,g)&&(J+=" "+C,$=!0);var Z=x(h,o),ee=k(h,o);if(r&&Array.isArray(r)){var te=c.length?c:r;if(!Z&&!ee){var ne=te[0],re=te[1];ne&&_(h,ne)&&(Q=!0,U=!0,J+=" "+O),(ne||re)&&(_(h,re)?(Q=!0,U=!0,J+=" "+T):(null==ne&&h.isBefore(re,"day")||null==re&&h.isAfter(ne,"day")||h.isAfter(ne,"day")&&h.isBefore(re,"day"))&&(J+=" "+L))}}else _(h,o)&&(Q=!0,U=!0);_(h,r)&&(J+=" "+E),Z&&(J+=" "+A),ee&&(J+=" "+z),h.clone().endOf("month").date()===h.date()&&(J+=" "+N),s&&s(h,o)&&(X=!0,G&&s(G,o)||(J+=" "+j),K&&s(K,o)||(J+=" "+D)),Q&&(J+=" "+M),X&&(J+=" "+P);var oe=void 0;if(a)oe=a(h,o);else{var ie=t?t(h,o):h.date();oe=u.a.createElement("div",{key:(V=h,"rc-calendar-"+V.year()+"-"+V.month()+"-"+V.date()),className:S,"aria-selected":Q,"aria-disabled":X},ie)}q.push(u.a.createElement("td",{key:I,onClick:X?void 0:e.onSelect.bind(null,h),onMouseEnter:X?void 0:e.onDayHover&&e.onDayHover.bind(null,h)||void 0,role:"gridcell",title:Object(w.d)(h),className:J},oe)),I++}B.push(u.a.createElement("tr",{key:l,role:"row",className:b()((Y={},Y[n+"-current-week"]=$,Y[n+"-active-week"]=U,Y))},W,q))}return u.a.createElement("tbody",{className:n+"-tbody"},B)},t}(u.a.Component);S.propTypes={contentRender:v.a.func,dateRender:v.a.func,disabledDate:v.a.func,prefixCls:v.a.string,selectedValue:v.a.oneOfType([v.a.object,v.a.arrayOf(v.a.object)]),value:v.a.object,hoverValue:v.a.any,showWeekNumber:v.a.bool},S.defaultProps={hoverValue:[]};var C=S,M=function(e){function t(){return o()(this,t),a()(this,e.apply(this,arguments))}return c()(t,e),t.prototype.render=function(){var e=this.props,t=e.prefixCls;return u.a.createElement("table",{className:t+"-table",cellSpacing:"0",role:"grid"},u.a.createElement(m,e),u.a.createElement(C,e))},t}(u.a.Component);t.a=M},function(e,t,n){"use strict";var r=n(27),o=n.n(r),i=n(8),a=n.n(i),s=n(4),c=n.n(s),l=n(7),u=n.n(l),f=n(16),d=n.n(f),p=n(6),h=n.n(p),m=n(9),g=n.n(m),v=n(0),y=n.n(v),b=n(1),w=n.n(b),_=n(12),x=n.n(_),k=n(39),S=n(69),C=n(2),M=n.n(C),E=function(e){function t(){var e,n,r,o;u()(this,t);for(var i=arguments.length,a=Array(i),s=0;s=n&&(e.updateKey=a[0].updateKey||a[0].key,a.shift()),a.push(e)),{notices:a}}))},r.remove=function(e){r.setState((function(t){return{notices:t.notices.filter((function(t){return t.key!==e}))}}))},o=n,h()(r,o)}return g()(t,e),d()(t,[{key:"getTransitionName",value:function(){var e=this.props,t=e.transitionName;return!t&&e.animation&&(t=e.prefixCls+"-"+e.animation),t}},{key:"render",value:function(){var e,t=this,n=this.props,r=this.state.notices,o=r.map((function(e,o){var i=Boolean(o===r.length-1&&e.updateKey),a=e.updateKey?e.updateKey:e.key,s=Object(S.a)(t.remove.bind(t,e.key),e.onClose);return y.a.createElement(O,c()({prefixCls:n.prefixCls},e,{key:a,update:i,onClose:s,onClick:e.onClick,closeIcon:n.closeIcon}),e.content)})),i=(e={},a()(e,n.prefixCls,1),a()(e,n.className,!!n.className),e);return y.a.createElement("div",{className:M()(i),style:n.style},y.a.createElement(k.a,{transitionName:this.getTransitionName()},o))}}]),t}(v.Component);z.propTypes={prefixCls:w.a.string,transitionName:w.a.string,animation:w.a.oneOfType([w.a.string,w.a.object]),style:w.a.object,maxCount:w.a.number,closeIcon:w.a.node},z.defaultProps={prefixCls:"rc-notification",animation:"fade",style:{top:65,left:"50%"}},z.newInstance=function(e,t){var n=e||{},r=n.getContainer,i=o()(n,["getContainer"]),a=document.createElement("div");r?r().appendChild(a):document.body.appendChild(a);var s=!1;x.a.render(y.a.createElement(z,c()({},i,{ref:function(e){s||(s=!0,t({notice:function(t){e.add(t)},removeNotice:function(t){e.remove(t)},component:e,destroy:function(){x.a.unmountComponentAtNode(a),a.parentNode.removeChild(a)}}))}})),a)};var P=z;t.a=P},function(e,t,n){"use strict";var r=n(27),o=n.n(r),i=n(4),a=n.n(i),s=n(7),c=n.n(s),l=n(6),u=n.n(l),f=n(9),d=n.n(f),p=n(0),h=n.n(p),m=n(1),g=n.n(m),v=n(2),y=n.n(v),b=n(11),w=function(e){function t(n){c()(this,t);var r=u()(this,e.call(this,n));r.handleChange=function(e){var t=r.props,n=t.disabled,o=t.onChange;n||("checked"in r.props||r.setState({checked:e.target.checked}),o&&o({target:a()({},r.props,{checked:e.target.checked}),stopPropagation:function(){e.stopPropagation()},preventDefault:function(){e.preventDefault()},nativeEvent:e.nativeEvent}))},r.saveInput=function(e){r.input=e};var o="checked"in n?n.checked:n.defaultChecked;return r.state={checked:o},r}return d()(t,e),t.getDerivedStateFromProps=function(e,t){return"checked"in e?a()({},t,{checked:e.checked}):null},t.prototype.focus=function(){this.input.focus()},t.prototype.blur=function(){this.input.blur()},t.prototype.render=function(){var e,t=this.props,n=t.prefixCls,r=t.className,i=t.style,s=t.name,c=t.id,l=t.type,u=t.disabled,f=t.readOnly,d=t.tabIndex,p=t.onClick,m=t.onFocus,g=t.onBlur,v=t.autoFocus,b=t.value,w=o()(t,["prefixCls","className","style","name","id","type","disabled","readOnly","tabIndex","onClick","onFocus","onBlur","autoFocus","value"]),_=Object.keys(w).reduce((function(e,t){return"aria-"!==t.substr(0,5)&&"data-"!==t.substr(0,5)&&"role"!==t||(e[t]=w[t]),e}),{}),x=this.state.checked,k=y()(n,r,((e={})[n+"-checked"]=x,e[n+"-disabled"]=u,e));return h.a.createElement("span",{className:k,style:i},h.a.createElement("input",a()({name:s,id:c,type:l,readOnly:f,disabled:u,tabIndex:d,className:n+"-input",checked:!!x,onClick:p,onFocus:m,onBlur:g,onChange:this.handleChange,autoFocus:v,ref:this.saveInput,value:b},_)),h.a.createElement("span",{className:n+"-inner"}))},t}(p.Component);w.propTypes={prefixCls:g.a.string,className:g.a.string,style:g.a.object,name:g.a.string,id:g.a.string,type:g.a.string,defaultChecked:g.a.oneOfType([g.a.number,g.a.bool]),checked:g.a.oneOfType([g.a.number,g.a.bool]),disabled:g.a.bool,onFocus:g.a.func,onBlur:g.a.func,onChange:g.a.func,onClick:g.a.func,tabIndex:g.a.oneOfType([g.a.string,g.a.number]),readOnly:g.a.bool,autoFocus:g.a.bool,value:g.a.any},w.defaultProps={prefixCls:"rc-checkbox",className:"",style:{},type:"checkbox",defaultChecked:!1,onFocus:function(){},onBlur:function(){},onChange:function(){}},Object(b.polyfill)(w);var _=w;t.a=_},function(e,t,n){"use strict";var r=n(8),o=n.n(r),i=n(4),a=n.n(i),s=n(7),c=n.n(s),l=n(16),u=n.n(l),f=n(6),d=n.n(f),p=n(9),h=n.n(p),m=n(0),g=n.n(m),v=n(1),y=n.n(v),b=n(11),w=n(12),_=n.n(w);var x=n(2),k=n.n(x),S=n(30),C=n.n(S),M=n(78),E={eventProps:y.a.object,visible:y.a.bool,children:y.a.func,motionName:y.a.oneOfType([y.a.string,y.a.object]),motionAppear:y.a.bool,motionEnter:y.a.bool,motionLeave:y.a.bool,motionLeaveImmediately:y.a.bool,motionDeadline:y.a.number,removeOnLeave:y.a.bool,leavedClassName:y.a.string,onAppearStart:y.a.func,onAppearActive:y.a.func,onAppearEnd:y.a.func,onEnterStart:y.a.func,onEnterActive:y.a.func,onEnterEnd:y.a.func,onLeaveStart:y.a.func,onLeaveActive:y.a.func,onLeaveEnd:y.a.func};t.a=function(e){var t=e,n=!!g.a.forwardRef;function r(e){return!(!e.motionName||!t)}"object"==typeof e&&(t=e.transitionSupport,n="forwardRef"in e?e.forwardRef:n);var i=function(e){function t(){c()(this,t);var e=d()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onDomUpdate=function(){var t=e.state,n=t.status,o=t.newStatus,i=e.props,a=i.onAppearStart,s=i.onEnterStart,c=i.onLeaveStart,l=i.onAppearActive,u=i.onEnterActive,f=i.onLeaveActive,d=i.motionAppear,p=i.motionEnter,h=i.motionLeave;if(r(e.props)){var m=e.getElement();e.$cacheEle!==m&&(e.removeEventListener(e.$cacheEle),e.addEventListener(m),e.$cacheEle=m),o&&"appear"===n&&d?e.updateStatus(a,null,null,(function(){e.updateActiveStatus(l,"appear")})):o&&"enter"===n&&p?e.updateStatus(s,null,null,(function(){e.updateActiveStatus(u,"enter")})):o&&"leave"===n&&h&&e.updateStatus(c,null,null,(function(){e.updateActiveStatus(f,"leave")}))}},e.onMotionEnd=function(t){var n=e.state,r=n.status,o=n.statusActive,i=e.props,a=i.onAppearEnd,s=i.onEnterEnd,c=i.onLeaveEnd;"appear"===r&&o?e.updateStatus(a,{status:"none"},t):"enter"===r&&o?e.updateStatus(s,{status:"none"},t):"leave"===r&&o&&e.updateStatus(c,{status:"none"},t)},e.setNodeRef=function(t){var n=e.props.internalRef;e.node=t,"function"==typeof n?n(t):n&&"current"in n&&(n.current=t)},e.getElement=function(){try{return(t=e.node||e)instanceof HTMLElement?t:_.a.findDOMNode(t)}catch(t){return e.$cacheEle}var t},e.addEventListener=function(t){t&&(t.addEventListener(M.d,e.onMotionEnd),t.addEventListener(M.a,e.onMotionEnd))},e.removeEventListener=function(t){t&&(t.removeEventListener(M.d,e.onMotionEnd),t.removeEventListener(M.a,e.onMotionEnd))},e.updateStatus=function(t,n,r,o){var i=t?t(e.getElement(),r):null;if(!1!==i&&!e._destroyed){var s=void 0;o&&(s=function(){e.nextFrame(o)}),e.setState(a()({statusStyle:"object"==typeof i?i:null,newStatus:!1},n),s)}},e.updateActiveStatus=function(t,n){e.nextFrame((function(){if(e.state.status===n){var r=e.props.motionDeadline;e.updateStatus(t,{statusActive:!0}),r>0&&setTimeout((function(){e.onMotionEnd({deadline:!0})}),r)}}))},e.nextFrame=function(t){e.cancelNextFrame(),e.raf=C()(t)},e.cancelNextFrame=function(){e.raf&&(C.a.cancel(e.raf),e.raf=null)},e.state={status:"none",statusActive:!1,newStatus:!1,statusStyle:null},e.$cacheEle=null,e.node=null,e.raf=null,e}return h()(t,e),u()(t,[{key:"componentDidMount",value:function(){this.onDomUpdate()}},{key:"componentDidUpdate",value:function(){this.onDomUpdate()}},{key:"componentWillUnmount",value:function(){this._destroyed=!0,this.removeEventListener(this.$cacheEle),this.cancelNextFrame()}},{key:"render",value:function(){var e,t=this.state,n=t.status,i=t.statusActive,s=t.statusStyle,c=this.props,l=c.children,u=c.motionName,f=c.visible,d=c.removeOnLeave,p=c.leavedClassName,h=c.eventProps;return l?"none"!==n&&r(this.props)?l(a()({},h,{className:k()((e={},o()(e,Object(M.b)(u,n),"none"!==n),o()(e,Object(M.b)(u,n+"-active"),"none"!==n&&i),o()(e,u,"string"==typeof u),e)),style:s}),this.setNodeRef):f?l(a()({},h),this.setNodeRef):d?null:l(a()({},h,{className:p}),this.setNodeRef):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.status;if(!r(e))return{};var i=e.visible,a=e.motionAppear,s=e.motionEnter,c=e.motionLeave,l=e.motionLeaveImmediately,u={prevProps:e};return("appear"===o&&!a||"enter"===o&&!s||"leave"===o&&!c)&&(u.status="none",u.statusActive=!1,u.newStatus=!1),!n&&i&&a&&(u.status="appear",u.statusActive=!1,u.newStatus=!0),n&&!n.visible&&i&&s&&(u.status="enter",u.statusActive=!1,u.newStatus=!0),(n&&n.visible&&!i&&c||!n&&l&&!i&&c)&&(u.status="leave",u.statusActive=!1,u.newStatus=!0),u}}]),t}(g.a.Component);return i.propTypes=a()({},E,{internalRef:y.a.oneOfType([y.a.object,y.a.func])}),i.defaultProps={visible:!0,motionEnter:!0,motionAppear:!0,motionLeave:!0,removeOnLeave:!0},Object(b.polyfill)(i),n?g.a.forwardRef((function(e,t){return g.a.createElement(i,a()({internalRef:t},e))})):i}(M.c)},function(e,t,n){"use strict";t.__esModule=!0;var r=i(n(784)),o=i(n(787));function i(e){return e&&e.__esModule?e:{default:e}}t.default=function e(t,n,i){null===t&&(t=Function.prototype);var a=(0,o.default)(t,n);if(void 0===a){var s=(0,r.default)(t);return null===s?void 0:e(s,n,i)}if("value"in a)return a.value;var c=a.get;return void 0!==c?c.call(i):void 0}},,function(e,t,n){var r=n(489);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(90);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(174)("keys"),o=n(126);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(48),o=n(73),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(125)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(89),o=n(499),i=n(175),a=n(173)("IE_PROTO"),s=function(){},c=function(){var e,t=n(228)("iframe"),r=i.length;for(t.style.display="none",n(500).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("