Version Description
- Added a new firewall policy to block attempts to override PHP superglobals. See the "NinjaFirewall > Firewall Policies > Advanced Policies > PHP" section.
- WP+ Edition (Premium): Added a whitelist of IP addresses from the following external services: Automattic (JetPack, VaultPress etc), Paypal and Stripes payment gateways. If you use those services, you can easily whitelist them with the "NinjaFirewall > Access Control > IP Access Control > External Services" option.
- Fixed PHP 8.0 compatibility issues.
- Fixed a potential bug that could reset some advanced policies when updating the firewall security rules.
- Fixed a "Call to undefined function readonly" PHP error on old WordPress versions (<4.9).
- Fixed a "Cannot redeclare nfw_anonymize_ip2" PHP error message.
- Improved the sandbox of the "Full WAF" mode installer.
- Updated Chart.js to the latest version.
- Many additional small fixes and adjustments.
- WP+ Edition (Premium): Updated IPv4/IPv6/ASN GeoIP databases.
Download this release
Release Info
Developer | nintechnet |
Plugin | NinjaFirewall (WP Edition) |
Version | 4.3 |
Comparing to | |
See all releases |
Code changes from version 4.2.6 to 4.3
- languages/ninjafirewall-fr_FR.mo +0 -0
- languages/ninjafirewall-fr_FR.po +194 -171
- languages/ninjafirewall.pot +187 -170
- lib/custom_plugin.php +5 -0
- lib/event_updates.php +3 -0
- lib/firewall.php +32 -11
- lib/firewall_options.php +6 -0
- lib/firewall_policies.php +18 -0
- lib/help.php +2 -0
- lib/install.php +22 -0
- lib/install_default.php +5 -1
- lib/security_rules_update.php +4 -0
- lib/utils.php +12 -1
- ninjafirewall.php +23 -23
- readme.txt +16 -3
- static/chart.min.js +3 -3
languages/ninjafirewall-fr_FR.mo
CHANGED
Binary file
|
languages/ninjafirewall-fr_FR.po
CHANGED
@@ -4,15 +4,15 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Stable (latest release)\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ninjafirewall\n"
|
7 |
-
"POT-Creation-Date: 2020-
|
8 |
-
"PO-Revision-Date: 2020-
|
9 |
"Last-Translator: NinTechNet <contact@nintechnet.com>\n"
|
10 |
"Language-Team: NinTechNet <nintechnet.com>\n"
|
11 |
"Language: fr_FR\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
-
"X-Generator: Poedit 2.2
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
18 |
|
@@ -53,11 +53,11 @@ msgstr ""
|
|
53 |
"NinjaScanner au menu de NinjaFirewall\". Cela remplacera cette page par le "
|
54 |
"propre menu de NinjaScanner :"
|
55 |
|
56 |
-
#: lib/custom_plugin.php:
|
57 |
msgid "Support forum:"
|
58 |
msgstr "Forum :"
|
59 |
|
60 |
-
#: lib/custom_plugin.php:
|
61 |
#, php-format
|
62 |
msgid ""
|
63 |
"Need more security? Check out our supercharged NinjaFirewall (WP+ Edition): "
|
@@ -338,12 +338,12 @@ msgstr ""
|
|
338 |
"l'adresse IP est invalide. Veuillez vérifier <a href=\"%s\">votre "
|
339 |
"configuration</a>."
|
340 |
|
341 |
-
#: lib/dashboard.php:320 lib/help.php:
|
342 |
#: lib/wpplus.php:170
|
343 |
msgid "Centralized Logging"
|
344 |
msgstr "Centralisation des Logs"
|
345 |
|
346 |
-
#: lib/dashboard.php:324 lib/security_rules_update.php:
|
347 |
#, php-format
|
348 |
msgid "Error: %s"
|
349 |
msgstr "Erreur : %s"
|
@@ -444,7 +444,7 @@ msgstr ""
|
|
444 |
"Soyez informé des dernières vulnérabilités dans les extensions et thèmes de "
|
445 |
"WordPress :"
|
446 |
|
447 |
-
#: lib/dashboard_about.php:31 lib/help.php:
|
448 |
msgid "GDPR Compliance"
|
449 |
msgstr "Conformité RGPD"
|
450 |
|
@@ -514,7 +514,7 @@ msgstr "Moyen"
|
|
514 |
msgid "Select monthly stats to view..."
|
515 |
msgstr "Sélectionnez les statistiques à afficher..."
|
516 |
|
517 |
-
#: lib/event_notifications.php:34 lib/help.php:
|
518 |
msgid "Event Notifications"
|
519 |
msgstr "Notifications d'Événement"
|
520 |
|
@@ -765,7 +765,7 @@ msgstr "Moyen :"
|
|
765 |
msgid "Blocked brute-force attacks:"
|
766 |
msgstr "Attaques par force brute bloquées :"
|
767 |
|
768 |
-
#: lib/event_notifications.php:503 lib/event_updates.php:
|
769 |
msgid ""
|
770 |
"This notification can be turned off from NinjaFirewall \"Event Notifications"
|
771 |
"\" page."
|
@@ -773,11 +773,11 @@ msgstr ""
|
|
773 |
"Cette notification peut être désactivée depuis la page \"Notifications "
|
774 |
"d’Événement\" de NinjaFirewall."
|
775 |
|
776 |
-
#: lib/event_updates.php:
|
777 |
msgid "[NinjaFirewall] Warning: Security update available"
|
778 |
msgstr "[NinjaFirewall] Mise à jour de sécurité en attente"
|
779 |
|
780 |
-
#: lib/event_updates.php:
|
781 |
msgid ""
|
782 |
"NinjaFirewall has detected that there are security updates available for "
|
783 |
"your website:"
|
@@ -785,54 +785,54 @@ msgstr ""
|
|
785 |
"NinjaFirewall a détecté que des mises à jour de sécurité sont disponibles "
|
786 |
"pour votre site Web :"
|
787 |
|
788 |
-
#: lib/event_updates.php:
|
789 |
#: lib/utils.php:440 lib/utils.php:1036 lib/utils.php:1224 lib/utils.php:1496
|
790 |
msgid "Date:"
|
791 |
msgstr "Date :"
|
792 |
|
793 |
-
#: lib/event_updates.php:
|
794 |
#, php-format
|
795 |
msgid "Blog: %s"
|
796 |
msgstr "Blog : %s"
|
797 |
|
798 |
-
#: lib/event_updates.php:
|
799 |
-
#: lib/event_updates.php:
|
800 |
#, php-format
|
801 |
msgid "Your version: %s"
|
802 |
msgstr "Votre version : %s"
|
803 |
|
804 |
-
#: lib/event_updates.php:
|
805 |
-
#: lib/event_updates.php:
|
806 |
#, php-format
|
807 |
msgid "New version: %s"
|
808 |
msgstr "Nouvelle version : %s"
|
809 |
|
810 |
-
#: lib/event_updates.php:
|
811 |
-
#: lib/event_updates.php:
|
812 |
msgid "Severity: This is an important security update"
|
813 |
msgstr "Sévérité : Ceci est une mise à jour de sécurité importante"
|
814 |
|
815 |
-
#: lib/event_updates.php:
|
816 |
-
#: lib/event_updates.php:
|
817 |
msgid "Severity: **This is a critical security update**"
|
818 |
msgstr "Sévérité : **Ceci est une mise à jour de sécurité critique**"
|
819 |
|
820 |
-
#: lib/event_updates.php:
|
821 |
-
#: lib/event_updates.php:
|
822 |
msgid "Type: Security fix"
|
823 |
msgstr "Type : Correctif de sécurité"
|
824 |
|
825 |
-
#: lib/event_updates.php:
|
826 |
#, php-format
|
827 |
msgid "Plugin: %s"
|
828 |
msgstr "Extension : %s"
|
829 |
|
830 |
-
#: lib/event_updates.php:
|
831 |
#, php-format
|
832 |
msgid "Theme: %s"
|
833 |
msgstr "Theme : %s"
|
834 |
|
835 |
-
#: lib/event_updates.php:
|
836 |
msgid "Don't leave your blog at risk, make sure to update as soon as possible."
|
837 |
msgstr ""
|
838 |
"Ne laissez pas votre blog en danger, lancez cette mise à jour dès que "
|
@@ -1054,28 +1054,28 @@ msgstr ""
|
|
1054 |
msgid "There are no backup available yet, check back later."
|
1055 |
msgstr "Il n'y a pas encore de sauvegarde disponible, revenez plus tard."
|
1056 |
|
1057 |
-
#: lib/firewall_options.php:
|
1058 |
#, php-format
|
1059 |
msgid "Uploaded file is either corrupted or its format is not supported (#%s)"
|
1060 |
msgstr ""
|
1061 |
"Le fichier importé est illisible ou son format n'est pas supporté (#%s)"
|
1062 |
|
1063 |
-
#: lib/firewall_options.php:
|
1064 |
msgid "[NinjaFirewall] Alert: Firewall is disabled"
|
1065 |
msgstr "[NinjaFirewall] Alerte : Le pare-feu a été désactivé"
|
1066 |
|
1067 |
-
#: lib/firewall_options.php:
|
1068 |
#: ninjafirewall.php:232 ninjafirewall.php:234
|
1069 |
msgid "-Blog :"
|
1070 |
msgstr "- Blog :"
|
1071 |
|
1072 |
-
#: lib/firewall_options.php:
|
1073 |
msgid "Someone disabled NinjaFirewall from your WordPress admin dashboard:"
|
1074 |
msgstr ""
|
1075 |
"Quelqu'un a désactivé NinjaFirewall depuis votre Tableau de bord de "
|
1076 |
"WordPress :"
|
1077 |
|
1078 |
-
#: lib/firewall_options.php:
|
1079 |
msgid ""
|
1080 |
"NinjaFirewall is disabled because someone enabled debugging mode from your "
|
1081 |
"WordPress admin dashboard:"
|
@@ -1083,26 +1083,26 @@ msgstr ""
|
|
1083 |
"NinjaFirewall est désactivé car quelqu'un activé son \"Mode débogage\" "
|
1084 |
"depuis votre tableau de bord de WordPress :"
|
1085 |
|
1086 |
-
#: lib/firewall_options.php:
|
1087 |
msgid "[NinjaFirewall] Alert: Firewall override settings"
|
1088 |
msgstr "[NinjaFirewall] Alerte : Modification des paramètres du pare-feu"
|
1089 |
|
1090 |
-
#: lib/firewall_options.php:
|
1091 |
msgid ""
|
1092 |
"Someone imported a new configuration which overrode the firewall settings:"
|
1093 |
msgstr ""
|
1094 |
"Quelqu'un a importé une nouvelle configuration qui a modifié tous les "
|
1095 |
"paramètres du pare-feu :"
|
1096 |
|
1097 |
-
#: lib/firewall_options.php:
|
1098 |
msgid "-User :"
|
1099 |
msgstr "- Nom :"
|
1100 |
|
1101 |
-
#: lib/firewall_options.php:
|
1102 |
msgid "-IP :"
|
1103 |
msgstr "- IP :"
|
1104 |
|
1105 |
-
#: lib/firewall_options.php:
|
1106 |
msgid "-Date :"
|
1107 |
msgstr "- Date :"
|
1108 |
|
@@ -1619,7 +1619,7 @@ msgstr ""
|
|
1619 |
msgid "Set %s (Chrome, Opera and Firefox browsers)"
|
1620 |
msgstr "Activer %s (Chrome, Opera et Firefox)"
|
1621 |
|
1622 |
-
#: lib/firewall_policies.php:
|
1623 |
msgid ""
|
1624 |
"Block PHP built-in wrappers in <code>GET</code>, <code>POST</code>, "
|
1625 |
"<code>HTTP_USER_AGENT</code>, <code>HTTP_REFERER</code> and cookies"
|
@@ -1628,54 +1628,58 @@ msgstr ""
|
|
1628 |
"<code>GET</code>, <code>POST</code>, <code>HTTP_USER_AGENT</code>, "
|
1629 |
"<code>HTTP_REFERER</code> et les cookies"
|
1630 |
|
1631 |
-
#: lib/firewall_policies.php:
|
1632 |
msgid "Block serialized PHP objects in the following global variables"
|
1633 |
msgstr ""
|
1634 |
"Bloquer les objets PHP sérialisés dans les variables globales suivantes"
|
1635 |
|
1636 |
-
#: lib/firewall_policies.php:
|
|
|
|
|
|
|
|
|
1637 |
msgid "Hide PHP notice and error messages"
|
1638 |
msgstr "Masquer les messages d'erreur de PHP"
|
1639 |
|
1640 |
-
#: lib/firewall_policies.php:
|
1641 |
msgid "Sanitise <code>PHP_SELF</code>"
|
1642 |
msgstr "Nettoyer <code>PHP_SELF</code>"
|
1643 |
|
1644 |
-
#: lib/firewall_policies.php:
|
1645 |
msgid "Sanitise <code>PATH_TRANSLATED</code>"
|
1646 |
msgstr "Nettoyer <code>PATH_TRANSLATED</code>"
|
1647 |
|
1648 |
-
#: lib/firewall_policies.php:
|
1649 |
msgid "Sanitise <code>PATH_INFO</code>"
|
1650 |
msgstr "Nettoyer <code>PATH_INFO</code>"
|
1651 |
|
1652 |
-
#: lib/firewall_policies.php:
|
1653 |
msgid "This option is not compatible with your actual configuration."
|
1654 |
msgstr ""
|
1655 |
"Cette option n'est pas compatible avec la configuration de votre serveur."
|
1656 |
|
1657 |
-
#: lib/firewall_policies.php:
|
1658 |
msgid "Various"
|
1659 |
msgstr "Divers"
|
1660 |
|
1661 |
-
#: lib/firewall_policies.php:
|
1662 |
msgid "Block the <code>DOCUMENT_ROOT</code> server variable in HTTP request"
|
1663 |
msgstr ""
|
1664 |
"Bloquer les requêtes HTTP contenant la variable <code>DOCUMENT_ROOT</code>"
|
1665 |
|
1666 |
-
#: lib/firewall_policies.php:
|
1667 |
msgid "Block ASCII character 0x00 (NULL byte)"
|
1668 |
msgstr "Bloquer le caractère ASCII 0x00 (NULL byte)"
|
1669 |
|
1670 |
-
#: lib/firewall_policies.php:
|
1671 |
msgid "Block ASCII control characters 1 to 8 and 14 to 31"
|
1672 |
msgstr "Bloquer les caractères de contrôle ASCII 1 à 8 et 14 à 31"
|
1673 |
|
1674 |
-
#: lib/firewall_policies.php:
|
1675 |
msgid "Save Firewall Policies"
|
1676 |
msgstr "Sauvegarder les options"
|
1677 |
|
1678 |
-
#: lib/firewall_policies.php:
|
1679 |
msgid "Restore Default Values"
|
1680 |
msgstr "Rétablir les valeurs par défaut"
|
1681 |
|
@@ -2563,6 +2567,21 @@ msgstr ""
|
|
2563 |
"code> et <code>HTTP_USER_AGENT</code>."
|
2564 |
|
2565 |
#: lib/help.php:293
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2566 |
msgid ""
|
2567 |
"This option lets you hide errors returned by your scripts. Such errors can "
|
2568 |
"leak sensitive informations which can be exploited by hackers."
|
@@ -2571,7 +2590,7 @@ msgstr ""
|
|
2571 |
"afficher des informations sensibles qui peuvent être exploitées "
|
2572 |
"ultérieurement par des pirates."
|
2573 |
|
2574 |
-
#: lib/help.php:
|
2575 |
msgid ""
|
2576 |
"Sanitise <code>PHP_SELF</code>, <code>PATH_TRANSLATED</code>, "
|
2577 |
"<code>PATH_INFO</code>"
|
@@ -2579,7 +2598,7 @@ msgstr ""
|
|
2579 |
"Nettoyer <code>PHP_SELF</code>, <code>PATH_TRANSLATED</code>, "
|
2580 |
"<code>PATH_INFO</code>"
|
2581 |
|
2582 |
-
#: lib/help.php:
|
2583 |
msgid ""
|
2584 |
"This option can sanitise any dangerous characters found in those 3 server "
|
2585 |
"variables to prevent various XSS and database injection attempts."
|
@@ -2587,7 +2606,7 @@ msgstr ""
|
|
2587 |
"Activez ces options si vous souhaitez que le pare-feu nettoie ces trois "
|
2588 |
"variables."
|
2589 |
|
2590 |
-
#: lib/help.php:
|
2591 |
#, php-format
|
2592 |
msgid ""
|
2593 |
"Block the <code>DOCUMENT_ROOT</code> server variable (%s) in HTTP requests"
|
@@ -2595,7 +2614,7 @@ msgstr ""
|
|
2595 |
"Bloquer les requêtes HTTP contenant la variable <code>DOCUMENT_ROOT</code> "
|
2596 |
"(%s)"
|
2597 |
|
2598 |
-
#: lib/help.php:
|
2599 |
msgid ""
|
2600 |
"This option will block scripts attempting to pass the <code>DOCUMENT_ROOT</"
|
2601 |
"code> server variable in a <code>GET</code> or <code>POST</code> request. "
|
@@ -2608,7 +2627,7 @@ msgstr ""
|
|
2608 |
"cette variable, mais pas la plupart des applications légitimes (hormis "
|
2609 |
"certains scripts d'installation ou de configuration)."
|
2610 |
|
2611 |
-
#: lib/help.php:
|
2612 |
msgid ""
|
2613 |
"This option will reject any <code>GET</code> or <code>POST</code> request, "
|
2614 |
"<code>HTTP_USER_AGENT</code>, <code>REQUEST_URI</code>, <code>PHP_SELF</"
|
@@ -2622,7 +2641,7 @@ msgstr ""
|
|
2622 |
"contenant le caractère ASCI 0x00 (NULL byte) sera bloquée immédiatement. Ce "
|
2623 |
"caractère est dangereux et devrait toujours être rejeté."
|
2624 |
|
2625 |
-
#: lib/help.php:
|
2626 |
msgid ""
|
2627 |
"This option will reject any <code>GET</code> or <code>POST</code> request, "
|
2628 |
"<code>HTTP_USER_AGENT</code>, <code>HTTP_REFERER</code> variables containing "
|
@@ -2632,11 +2651,11 @@ msgstr ""
|
|
2632 |
"variable <code>HTTP_USER_AGENT</code>, <code>HTTP_REFERER</code> contenant "
|
2633 |
"des caractères ASCII 1 à 8 et 14 à 31 sera bloquée."
|
2634 |
|
2635 |
-
#: lib/help.php:
|
2636 |
msgid "File Check"
|
2637 |
msgstr "File Check"
|
2638 |
|
2639 |
-
#: lib/help.php:
|
2640 |
msgid ""
|
2641 |
"File Check lets you perform file integrity monitoring upon request or on a "
|
2642 |
"specific interval."
|
@@ -2644,7 +2663,7 @@ msgstr ""
|
|
2644 |
"File Check vous permet d'effectuer une analyse de l'intégrité de vos "
|
2645 |
"fichiers sur demande ou à un intervalle spécifique défini."
|
2646 |
|
2647 |
-
#: lib/help.php:
|
2648 |
msgid ""
|
2649 |
"You need to create a snapshot of all your files and then, at a later time, "
|
2650 |
"you can scan your system to compare it with the previous snapshot. Any "
|
@@ -2657,7 +2676,7 @@ msgstr ""
|
|
2657 |
"permissions et propriétés des fichiers, leur création et suppression ainsi "
|
2658 |
"que l'horodatage."
|
2659 |
|
2660 |
-
#: lib/help.php:
|
2661 |
#, php-format
|
2662 |
msgid ""
|
2663 |
"Create a snapshot of all files stored in that directory: by default, the "
|
@@ -2667,7 +2686,7 @@ msgstr ""
|
|
2667 |
"répertoire : par défaut, le repertoire est l'<code>ABSPATH</code> de "
|
2668 |
"WordPress (%s)"
|
2669 |
|
2670 |
-
#: lib/help.php:
|
2671 |
msgid ""
|
2672 |
"Exclude the following files/folders: you can enter a directory or a file "
|
2673 |
"name (e.g., <code>/foo/bar/</code>), or a part of it (e.g., <code>foo</"
|
@@ -2678,7 +2697,7 @@ msgstr ""
|
|
2678 |
"partie de celui-ci (par ex. <code>foo</code>), ou même exclure une extension "
|
2679 |
"de fichier (par ex. <code>.css</code>)."
|
2680 |
|
2681 |
-
#: lib/help.php:
|
2682 |
msgid ""
|
2683 |
"Multiple values must be comma-separated (e.g., <code>/foo/bar/,.css,.png</"
|
2684 |
"code>)."
|
@@ -2686,7 +2705,7 @@ msgstr ""
|
|
2686 |
"Plusieurs valeurs doivent être séparées par des virgules (par ex. <code>/foo/"
|
2687 |
"bar/,.css,.png</code>)."
|
2688 |
|
2689 |
-
#: lib/help.php:
|
2690 |
msgid ""
|
2691 |
"Do not follow symbolic links: by default, NinjaFirewall will not follow "
|
2692 |
"symbolic links."
|
@@ -2694,11 +2713,11 @@ msgstr ""
|
|
2694 |
"Ne pas suivre les liens symboliques : par défaut, NinjaFirewall ignore "
|
2695 |
"les liens symboliques lors de son analyse des fichiers."
|
2696 |
|
2697 |
-
#: lib/help.php:
|
2698 |
msgid "Scheduled scans"
|
2699 |
msgstr "Analyses planifiées"
|
2700 |
|
2701 |
-
#: lib/help.php:
|
2702 |
msgid ""
|
2703 |
"NinjaFirewall can scan your system on a specific interval (hourly, "
|
2704 |
"twicedaily or daily)."
|
@@ -2706,7 +2725,7 @@ msgstr ""
|
|
2706 |
"NinjaFirewall peut scanner votre système à intervalle régulier (une fois par "
|
2707 |
"heure, deux fois par jour ou tous les jours)."
|
2708 |
|
2709 |
-
#: lib/help.php:
|
2710 |
msgid ""
|
2711 |
"It can either send you a scan report only if changes are detected, or always "
|
2712 |
"send you one after each scan."
|
@@ -2715,7 +2734,7 @@ msgstr ""
|
|
2715 |
"été détectés, ou bien vous en envoyer un systématiquement après chaque "
|
2716 |
"analyse."
|
2717 |
|
2718 |
-
#: lib/help.php:
|
2719 |
msgid ""
|
2720 |
"Reports will be sent to the contact email address defined in the \"Event "
|
2721 |
"Notifications\" menu."
|
@@ -2723,7 +2742,7 @@ msgstr ""
|
|
2723 |
"Les rapports seront envoyés à l'adresse e-mail définie dans la page "
|
2724 |
"\"Notifications d'Événement\"."
|
2725 |
|
2726 |
-
#: lib/help.php:
|
2727 |
#, php-format
|
2728 |
msgid ""
|
2729 |
"Scheduled scans rely on <a href=\"%s\">WordPress pseudo cron</a> which works "
|
@@ -2732,11 +2751,11 @@ msgstr ""
|
|
2732 |
"Les analyses planifiées utilisent le <a href=\"%s\">pseudo cron de "
|
2733 |
"WordPress</a> qui ne fonctionne que si votre site reçoit un trafic suffisant."
|
2734 |
|
2735 |
-
#: lib/help.php:
|
2736 |
msgid "File Guard"
|
2737 |
msgstr "File Guard"
|
2738 |
|
2739 |
-
#: lib/help.php:
|
2740 |
msgid ""
|
2741 |
"File Guard can detect, in real-time, any access to a PHP file that was "
|
2742 |
"recently modified or created, and alert you about this."
|
@@ -2744,7 +2763,7 @@ msgstr ""
|
|
2744 |
"File Guard peut détecter, en temps réel, tout accès à un fichier PHP qui a "
|
2745 |
"été récemment modifié ou créé, et vous alerter à ce sujet."
|
2746 |
|
2747 |
-
#: lib/help.php:
|
2748 |
msgid ""
|
2749 |
"If a hacker uploaded a shell script to your site (or injected a backdoor "
|
2750 |
"into an already existing file) and tried to directly access that file using "
|
@@ -2763,7 +2782,7 @@ msgstr ""
|
|
2763 |
"envoyées à l'adresse e-mail de contact définie dans le menu \"Notifications "
|
2764 |
"d’Événement\"."
|
2765 |
|
2766 |
-
#: lib/help.php:
|
2767 |
msgid ""
|
2768 |
"If you do not want to monitor a folder, you can exclude its full path or a "
|
2769 |
"part of it (e.g., <code>/var/www/public_html/cache/</code> or <code>/cache/</"
|
@@ -2777,7 +2796,7 @@ msgstr ""
|
|
2777 |
"variable <code>$_SERVER[\"SCRIPT_FILENAME\"]</code> et, si elle correspond, "
|
2778 |
"l'ignorera."
|
2779 |
|
2780 |
-
#: lib/help.php:
|
2781 |
msgid ""
|
2782 |
"Multiple values must be comma-separated (e.g., <code>/foo/bar/,/cache/</"
|
2783 |
"code>)."
|
@@ -2785,7 +2804,7 @@ msgstr ""
|
|
2785 |
"Plusieurs valeurs doivent être séparées par des virgules (par ex. <code>/foo/"
|
2786 |
"bar/,/cache/</code>)."
|
2787 |
|
2788 |
-
#: lib/help.php:
|
2789 |
msgid ""
|
2790 |
"File Guard real-time detection is a totally unique feature, because "
|
2791 |
"NinjaFirewall is the only plugin for WordPress that can hook HTTP requests "
|
@@ -2797,11 +2816,11 @@ msgstr ""
|
|
2797 |
"intercepter les requêtes HTTP envoyées à tout script PHP, même si ce dernier "
|
2798 |
"ne fait pas partie de WordPress (logiciel tiers, backdoor, etc)."
|
2799 |
|
2800 |
-
#: lib/help.php:
|
2801 |
msgid "Network"
|
2802 |
msgstr "Réseau"
|
2803 |
|
2804 |
-
#: lib/help.php:
|
2805 |
msgid ""
|
2806 |
"Even if NinjaFirewall administration menu is only available to the Super "
|
2807 |
"Admin (from the main site), you can still display its status to all sites in "
|
@@ -2813,7 +2832,7 @@ msgstr ""
|
|
2813 |
"du réseau en ajoutant une petite icône à leur barre d'administration. Elle "
|
2814 |
"ne sera visible que par les administrateurs de ces sites."
|
2815 |
|
2816 |
-
#: lib/help.php:
|
2817 |
msgid ""
|
2818 |
"It is recommended to enable this feature as it is the only way to know "
|
2819 |
"whether the sites in your network are protected and if NinjaFirewall "
|
@@ -2823,7 +2842,7 @@ msgstr ""
|
|
2823 |
"si les sites de votre réseau sont protégés et si l'installation de "
|
2824 |
"NinjaFirewall a réussi."
|
2825 |
|
2826 |
-
#: lib/help.php:
|
2827 |
msgid ""
|
2828 |
"Note that when it is disabled, the icon still remains visible to you, the "
|
2829 |
"Super Admin."
|
@@ -2831,7 +2850,7 @@ msgstr ""
|
|
2831 |
"Notez que même lorsqu'il est désactivé, l'icône reste visible pour vous, le "
|
2832 |
"Super Administrateur."
|
2833 |
|
2834 |
-
#: lib/help.php:
|
2835 |
msgid ""
|
2836 |
"NinjaFirewall can alert you by email on specific events triggered within "
|
2837 |
"your blog. They include installations, updates, activations etc, as well as "
|
@@ -2850,11 +2869,11 @@ msgstr ""
|
|
2850 |
"après avoir pénétré dans votre Tableau de bord de WordPress, d'y installer "
|
2851 |
"une porte dérobée (backdoor) afin de prendre le contrôle de votre blog."
|
2852 |
|
2853 |
-
#: lib/help.php:
|
2854 |
msgid "Login Protection"
|
2855 |
msgstr "Page de Connexion"
|
2856 |
|
2857 |
-
#: lib/help.php:
|
2858 |
msgid ""
|
2859 |
"By processing incoming HTTP requests before your blog and any of its "
|
2860 |
"plugins, NinjaFirewall is the only plugin for WordPress able to protect it "
|
@@ -2867,7 +2886,7 @@ msgstr ""
|
|
2867 |
"compris les attaques distribuées provenant de plusieurs milliers d'adresses "
|
2868 |
"IP différentes."
|
2869 |
|
2870 |
-
#: lib/help.php:
|
2871 |
msgid ""
|
2872 |
"You can choose two different types of protection: a password or a captcha. "
|
2873 |
"You can enable the protection only if an attack is detected or to keep it "
|
@@ -2877,11 +2896,11 @@ msgstr ""
|
|
2877 |
"captcha. Vous pouvez choisir d'activer la protection uniquement lorsqu'une "
|
2878 |
"attaque est détectée ou bien l'activer en permanence."
|
2879 |
|
2880 |
-
#: lib/help.php:
|
2881 |
msgid "Yes, if under attack:"
|
2882 |
msgstr "Oui, si attaque en cours :"
|
2883 |
|
2884 |
-
#: lib/help.php:
|
2885 |
msgid ""
|
2886 |
"The protection will be triggered when too many login attempts are detected, "
|
2887 |
"regardless of the offending IP. It blocks the attack instantly and prevents "
|
@@ -2896,11 +2915,11 @@ msgstr ""
|
|
2896 |
"utilisant soit une combinaison nom d'utilisateur / mot de passe prédéfinie, "
|
2897 |
"soit un code captcha."
|
2898 |
|
2899 |
-
#: lib/help.php:
|
2900 |
msgid "Always ON:"
|
2901 |
msgstr "Toujours activée :"
|
2902 |
|
2903 |
-
#: lib/help.php:
|
2904 |
msgid ""
|
2905 |
"NinjaFirewall will always enforce the HTTP authentication or captcha "
|
2906 |
"implementation each time you access the login page."
|
@@ -2908,11 +2927,11 @@ msgstr ""
|
|
2908 |
"Vous serez toujours invité à saisir votre nom d'utilisateur / mot de passe, "
|
2909 |
"ou le code du captcha, chaque fois que vous accéderez à la page de connexion."
|
2910 |
|
2911 |
-
#: lib/help.php:
|
2912 |
msgid "Type of protection:"
|
2913 |
msgstr "Type de protection :"
|
2914 |
|
2915 |
-
#: lib/help.php:
|
2916 |
msgid ""
|
2917 |
"<b>Password:</b> It password-protects the login page. NinjaFirewall uses its "
|
2918 |
"own very fast authentication scheme and it is compatible with any HTTP "
|
@@ -2922,15 +2941,15 @@ msgstr ""
|
|
2922 |
"utilise son propre système d'authentification, rapide et compatible avec "
|
2923 |
"n'importe quel serveur HTTP (Apache, Nginx, Lighttpd etc)."
|
2924 |
|
2925 |
-
#: lib/help.php:
|
2926 |
msgid "<b>Captcha:</b> It will display a 5-character captcha code."
|
2927 |
msgstr "<b>Captcha :</b> Affichera un code captcha à 5 caractères."
|
2928 |
|
2929 |
-
#: lib/help.php:
|
2930 |
msgid "Bot protection:"
|
2931 |
msgstr "Protection contre les bots :"
|
2932 |
|
2933 |
-
#: lib/help.php:
|
2934 |
msgid ""
|
2935 |
"NinjaFirewall will attempt to block bots and scripts immediately, i.e., even "
|
2936 |
"before they start a brute-force attack."
|
@@ -2938,11 +2957,11 @@ msgstr ""
|
|
2938 |
"NinjaFirewall tentera de bloquer les bots et les scripts immédiatement, "
|
2939 |
"c'est-à-dire avant même qu'ils ne commencent une attaque par force brute."
|
2940 |
|
2941 |
-
#: lib/help.php:
|
2942 |
msgid "AUTH log"
|
2943 |
msgstr "Journal d'authentification"
|
2944 |
|
2945 |
-
#: lib/help.php:
|
2946 |
msgid ""
|
2947 |
"NinjaFirewall can write to the server Authentication log when the brute-"
|
2948 |
"force protection is triggered. This can be useful to the system "
|
@@ -2954,7 +2973,7 @@ msgstr ""
|
|
2954 |
"surveillance ou pour bloquer l'IP incriminée au niveau du pare-feu du "
|
2955 |
"serveur."
|
2956 |
|
2957 |
-
#: lib/help.php:
|
2958 |
msgid ""
|
2959 |
"If you have a shared hosting account, keep this option disabled as you do "
|
2960 |
"not have any access to the server's logs."
|
@@ -2962,7 +2981,7 @@ msgstr ""
|
|
2962 |
"Si vous avez un hébergement mutualisé, laissez cette option désactivée car "
|
2963 |
"vous n'avez pas accès aux journaux du serveur."
|
2964 |
|
2965 |
-
#: lib/help.php:
|
2966 |
msgid ""
|
2967 |
"On Debian-based systems, the log is located in <code>/var/log/auth.log</"
|
2968 |
"code>, and on Red Hat-based systems in <code>/var/log/secure</code>. The "
|
@@ -2972,19 +2991,19 @@ msgstr ""
|
|
2972 |
"sous Red Hat, dans <code>/var/log/secure</code>. Le format utilisé est le "
|
2973 |
"suivant :"
|
2974 |
|
2975 |
-
#: lib/help.php:
|
2976 |
msgid "AA: the process ID (PID)."
|
2977 |
msgstr "AA : l'identifiant de processus (PID)."
|
2978 |
|
2979 |
-
#: lib/help.php:
|
2980 |
msgid "BB: the user IPv4 or IPv6 address."
|
2981 |
msgstr "BB : L'adresse IPv4 ou IPv6 de l'utilisateur."
|
2982 |
|
2983 |
-
#: lib/help.php:
|
2984 |
msgid "CC: the blog (sub-)domain name."
|
2985 |
msgstr "CC : le nom de (sous-)domaine du blog."
|
2986 |
|
2987 |
-
#: lib/help.php:
|
2988 |
msgid ""
|
2989 |
"DD: the target: it can be either <code>wp-login.php</code> or <code>XML-RPC "
|
2990 |
"API</code>."
|
@@ -2992,16 +3011,16 @@ msgstr ""
|
|
2992 |
"DD : la cible; il peut s'agir soit de <code>wp-login.php</code>, soit de "
|
2993 |
"<code>XML-RPC API</code>."
|
2994 |
|
2995 |
-
#: lib/help.php:
|
2996 |
msgid "EE: the time, in minutes, the protection will remain active."
|
2997 |
msgstr ""
|
2998 |
"EE : le temps, en minutes, pendant lequel la protection restera active."
|
2999 |
|
3000 |
-
#: lib/help.php:
|
3001 |
msgid "Sample loglines:"
|
3002 |
msgstr "Exemple :"
|
3003 |
|
3004 |
-
#: lib/help.php:
|
3005 |
#, php-format
|
3006 |
msgid ""
|
3007 |
"Be careful if you are behind a load balancer, reverse-proxy or CDN because "
|
@@ -3021,11 +3040,11 @@ msgstr ""
|
|
3021 |
"Alternativement, vous pouvez utiliser le fichier <code><a href=\"%s\">."
|
3022 |
"htninja</a></code>."
|
3023 |
|
3024 |
-
#: lib/help.php:
|
3025 |
msgid "Firewall Log"
|
3026 |
msgstr "Journal du Pare-feu"
|
3027 |
|
3028 |
-
#: lib/help.php:
|
3029 |
msgid ""
|
3030 |
"The firewall log displays blocked and sanitised requests as well as some "
|
3031 |
"useful information. It has 6 columns:"
|
@@ -3033,18 +3052,18 @@ msgstr ""
|
|
3033 |
"Le journal du pare-feu affiche les requêtes HTTP qui ont été bloquées ou "
|
3034 |
"nettoyées ainsi que d'autres informations utiles. Il a six colonnes :"
|
3035 |
|
3036 |
-
#: lib/help.php:
|
3037 |
msgid "DATE : date and time of the incident."
|
3038 |
msgstr "DATE : date et heure de l'incident."
|
3039 |
|
3040 |
-
#: lib/help.php:
|
3041 |
msgid ""
|
3042 |
"INCIDENT : unique incident number/ID as it was displayed to the blocked user."
|
3043 |
msgstr ""
|
3044 |
"INCIDENT : le numéro d'incident (ID) unique. Par défaut, il sera aussi "
|
3045 |
"affiché à l'utilisateur dont la requête aura été bloquée par le pare-feu."
|
3046 |
|
3047 |
-
#: lib/help.php:
|
3048 |
msgid ""
|
3049 |
"LEVEL : level of severity (<code>CRITICAL</code>, <code>HIGH</code> or "
|
3050 |
"<code>MEDIUM</code>), information (<code>INFO</code>, <code>UPLOAD</code>) "
|
@@ -3054,7 +3073,7 @@ msgstr ""
|
|
3054 |
"<code>MEDIUM</code>), information (<code>INFO</code>, <code>UPLOAD</code>) "
|
3055 |
"et mode débogage (<code>DEBUG_ON</code>)."
|
3056 |
|
3057 |
-
#: lib/help.php:
|
3058 |
msgid ""
|
3059 |
"RULE : reference of the NinjaFirewall built-in security rule that triggered "
|
3060 |
"the action. A hyphen (<code>-</code>) instead of a number means it was a "
|
@@ -3065,11 +3084,11 @@ msgstr ""
|
|
3065 |
"d'un numéro signifie que la règle provient de votre configuration "
|
3066 |
"personnelle de la page \"Politiques du Pare-feu\"."
|
3067 |
|
3068 |
-
#: lib/help.php:
|
3069 |
msgid "IP : the user IPv4 or IPv6 address."
|
3070 |
msgstr "BB : L'adresse IPv4 ou IPv6 de l'utilisateur."
|
3071 |
|
3072 |
-
#: lib/help.php:
|
3073 |
msgid ""
|
3074 |
"REQUEST : the HTTP request including offending variables and values as well "
|
3075 |
"as the reason the action was logged."
|
@@ -3077,11 +3096,11 @@ msgstr ""
|
|
3077 |
"REQUEST : la requête HTTP avec ses variables et valeurs, ainsi que la raison "
|
3078 |
"qui a déclenché l'incident."
|
3079 |
|
3080 |
-
#: lib/help.php:
|
3081 |
msgid "Auto-delete log"
|
3082 |
msgstr "Suppression automatique des journaux"
|
3083 |
|
3084 |
-
#: lib/help.php:
|
3085 |
msgid ""
|
3086 |
"This options lets you configure NinjaFirewall to delete its old logs "
|
3087 |
"automatically. By default, logs are never deleted, <b>even when uninstall "
|
@@ -3094,7 +3113,7 @@ msgstr ""
|
|
3094 |
"cette valeur à <code>0</code> si vous ne voulez pas supprimer les anciens "
|
3095 |
"journaux."
|
3096 |
|
3097 |
-
#: lib/help.php:
|
3098 |
msgid ""
|
3099 |
"Centralized Logging lets you remotely access the firewall log of all your "
|
3100 |
"NinjaFirewall protected websites from one single installation. You do not "
|
@@ -3105,13 +3124,13 @@ msgstr ""
|
|
3105 |
"NinjaFirewall. Vous n'avez plus besoin de vous connecter à chaque site pour "
|
3106 |
"analyser vos journaux."
|
3107 |
|
3108 |
-
#: lib/help.php:
|
3109 |
#, php-format
|
3110 |
msgid "<a href=\"%s\">Consult our blog</a> for more info about it."
|
3111 |
msgstr ""
|
3112 |
"<a href=\"%s\">Consultez notre blog pour plus d'informations à ce sujet</a>."
|
3113 |
|
3114 |
-
#: lib/help.php:
|
3115 |
msgid ""
|
3116 |
"Enter your public key (optional): This is the public key that was created "
|
3117 |
"from your main server."
|
@@ -3119,7 +3138,7 @@ msgstr ""
|
|
3119 |
"Entrez votre clé publique (optionnel) : Il s'agit de la clé qui a été créée "
|
3120 |
"depuis le serveur principal."
|
3121 |
|
3122 |
-
#: lib/help.php:
|
3123 |
msgid ""
|
3124 |
"Centralized Logging will keep working even if NinjaFirewall is disabled. "
|
3125 |
"Delete your public key below if you want to disable it."
|
@@ -3128,11 +3147,11 @@ msgstr ""
|
|
3128 |
"NinjaFirewall. Si vous souhaitez complètement désactiver cette option, "
|
3129 |
"supprimez votre clé publique ci-dessous."
|
3130 |
|
3131 |
-
#: lib/help.php:
|
3132 |
msgid "Live Log"
|
3133 |
msgstr "Live Log"
|
3134 |
|
3135 |
-
#: lib/help.php:
|
3136 |
msgid ""
|
3137 |
"Live Log lets you watch your blog traffic in real time, just like the Unix "
|
3138 |
"<code>tail -f</code> command. Note that requests sent to static elements "
|
@@ -3144,7 +3163,7 @@ msgstr ""
|
|
3144 |
"statiques comme les fichiers JS/CSS ou les images ne sont pas traitées par "
|
3145 |
"NinjaFirewall."
|
3146 |
|
3147 |
-
#: lib/help.php:
|
3148 |
msgid ""
|
3149 |
"You can enable/disable the monitoring process, change the refresh rate, "
|
3150 |
"clear the screen, enable automatic vertical scrolling, change the log "
|
@@ -3155,7 +3174,7 @@ msgstr ""
|
|
3155 |
"effacer l'écran, changer le format d'affichage, le fuseau horaire et choisir "
|
3156 |
"le type de trafic à visualiser (HTTP/HTTPS)."
|
3157 |
|
3158 |
-
#: lib/help.php:
|
3159 |
msgid ""
|
3160 |
"You can also apply filters to include or exclude files and folders "
|
3161 |
"(REQUEST_URI)."
|
@@ -3163,7 +3182,7 @@ msgstr ""
|
|
3163 |
"Vous pouvez également appliquer des filtres pour inclure ou exclure des "
|
3164 |
"fichiers et des dossiers (REQUEST_URI)."
|
3165 |
|
3166 |
-
#: lib/help.php:
|
3167 |
msgid ""
|
3168 |
"Live Log does not make use of any WordPress core file (e.g., <code>admin-"
|
3169 |
"ajax.php</code>). It communicates directly with the firewall without loading "
|
@@ -3177,7 +3196,7 @@ msgstr ""
|
|
3177 |
"serveur, même si vous ajustez son intervalle de rafraîchissement de la page "
|
3178 |
"sur la fréquence la plus rapide (5 secondes)."
|
3179 |
|
3180 |
-
#: lib/help.php:
|
3181 |
msgid ""
|
3182 |
"If you are using the optional <code>.htninja</code> configuration file to "
|
3183 |
"whitelist your IP, the Live Log feature will not work."
|
@@ -3186,27 +3205,27 @@ msgstr ""
|
|
3186 |
"pour toujours accepter les requêtes provenant de votre adresse IP, Live Log "
|
3187 |
"ne fonctionnera pas."
|
3188 |
|
3189 |
-
#: lib/help.php:
|
3190 |
msgid "Log Format"
|
3191 |
msgstr "Format d'affichage"
|
3192 |
|
3193 |
-
#: lib/help.php:
|
3194 |
msgid "You can easily customize the log format. Possible values are:"
|
3195 |
msgstr ""
|
3196 |
"Vous pouvez facilement changer le format d'affichage en combinant une ou "
|
3197 |
"plusieurs des valeurs suivantes :"
|
3198 |
|
3199 |
-
#: lib/help.php:
|
3200 |
msgid "<code>%time</code>: the server date, time and timezone."
|
3201 |
msgstr "<code>%time</code> : la date, heure et fuseau horaire du serveur."
|
3202 |
|
3203 |
-
#: lib/help.php:
|
3204 |
msgid "<code>%name</code>: authenticated user (HTTP basic auth), if any."
|
3205 |
msgstr ""
|
3206 |
"<code>%name</code> : le nom de l'utilisateur (Authentification HTTP), s'il "
|
3207 |
"existe."
|
3208 |
|
3209 |
-
#: lib/help.php:
|
3210 |
#, php-format
|
3211 |
msgid ""
|
3212 |
"<code>%client</code>: the client REMOTE_ADDR. If you are behind a load "
|
@@ -3216,28 +3235,28 @@ msgstr ""
|
|
3216 |
"serveur est derrière un CDN ou un proxy, cette variable retournera l'adresse "
|
3217 |
"IP de celui-ci."
|
3218 |
|
3219 |
-
#: lib/help.php:
|
3220 |
msgid "<code>%method</code>: HTTP method (e.g., GET, POST)."
|
3221 |
msgstr "<code>%method</code> : la méthode HTTP (ex. GET, POST)."
|
3222 |
|
3223 |
-
#: lib/help.php:
|
3224 |
#, php-format
|
3225 |
msgid ""
|
3226 |
"<code>%uri</code>: the URI which was given in order to access the page "
|
3227 |
"(REQUEST_URI)."
|
3228 |
msgstr "<code>%uri</code> : l'URI donnée pour accéder à la page (REQUEST_URI)."
|
3229 |
|
3230 |
-
#: lib/help.php:
|
3231 |
msgid "<code>%referrer</code>: the referrer (HTTP_REFERER), if any."
|
3232 |
msgstr "<code>%referrer</code> : le referrer (HTTP_REFERER), s'il existe."
|
3233 |
|
3234 |
-
#: lib/help.php:
|
3235 |
#, php-format
|
3236 |
msgid "<code>%ua</code>: the user-agent (HTTP_USER_AGENT), if any."
|
3237 |
msgstr ""
|
3238 |
"<code>%ua</code> : l'en-tête User-Agent (HTTP_USER_AGENT), s'il existe."
|
3239 |
|
3240 |
-
#: lib/help.php:
|
3241 |
#, php-format
|
3242 |
msgid ""
|
3243 |
"<code>%forward</code>: HTTP_X_FORWARDED_FOR, if any. If you are behind a "
|
@@ -3247,13 +3266,13 @@ msgstr ""
|
|
3247 |
"votre serveur est derrière un CDN ou un proxy, cette variable retournera "
|
3248 |
"l'adresse réelle du client."
|
3249 |
|
3250 |
-
#: lib/help.php:
|
3251 |
msgid "<code>%host</code>: the requested host (HTTP_HOST), if any."
|
3252 |
msgstr ""
|
3253 |
"<code>%host</code> : l'en-tête Host de la requête courante (HTTP_HOST), si "
|
3254 |
"elle existe."
|
3255 |
|
3256 |
-
#: lib/help.php:
|
3257 |
msgid ""
|
3258 |
"Additionally, you can include any of the following characters: <code>\"</"
|
3259 |
"code>, <code>%</code>, <code>[</code>, <code>]</code>, <code>space</code> "
|
@@ -3263,7 +3282,7 @@ msgstr ""
|
|
3263 |
"%</code>, <code>[</code>, <code>]</code>, <code>espace</code> et toute "
|
3264 |
"lettre minuscule <code>a-z</code>."
|
3265 |
|
3266 |
-
#: lib/help.php:
|
3267 |
msgid ""
|
3268 |
"Your website can run NinjaFirewall and be compliant with the General Data "
|
3269 |
"Protection Regulation (GDPR). For more info, please visit our blog:"
|
@@ -3271,11 +3290,11 @@ msgstr ""
|
|
3271 |
"NinjaFirewall est conforme à la réglementation générale sur la protection "
|
3272 |
"des données (RGPD). Pour plus d'informations, veuillez visiter notre blog :"
|
3273 |
|
3274 |
-
#: lib/help.php:
|
3275 |
msgid "Rules Updates"
|
3276 |
msgstr "Mise à Jour des Règles"
|
3277 |
|
3278 |
-
#: lib/help.php:
|
3279 |
msgid ""
|
3280 |
"To get the most efficient protection, you can ask NinjaFirewall to "
|
3281 |
"automatically update its security rules."
|
@@ -3283,7 +3302,7 @@ msgstr ""
|
|
3283 |
"Pour bénéficier de la protection la plus efficace, vous pouvez demander à "
|
3284 |
"NinjaFirewall de mettre à jour ses règles de sécurité automatiquement."
|
3285 |
|
3286 |
-
#: lib/help.php:
|
3287 |
msgid ""
|
3288 |
"Each time a new vulnerability is found in WordPress or one of its plugins/"
|
3289 |
"themes, a new set of security rules will be made available to protect "
|
@@ -3293,7 +3312,7 @@ msgstr ""
|
|
3293 |
"extensions ou ses thèmes, un nouvel ensemble de règles de sécurité est "
|
3294 |
"disponible pour protéger contre cette vulnérabilité si nécessaire."
|
3295 |
|
3296 |
-
#: lib/help.php:
|
3297 |
msgid ""
|
3298 |
"Only security rules will be downloaded. If a new version of NinjaFirewall "
|
3299 |
"(including new files, options and features) was available, it would have to "
|
@@ -3304,7 +3323,7 @@ msgstr ""
|
|
3304 |
"jour depuis la page des \"Extensions\" de votre tableau de bord, comme "
|
3305 |
"d'habitude."
|
3306 |
|
3307 |
-
#: lib/help.php:
|
3308 |
msgid ""
|
3309 |
"We recommend to enable this feature, as it is the <strong>best way to keep "
|
3310 |
"your WordPress secure</strong> against new vulnerabilities."
|
@@ -3313,11 +3332,11 @@ msgstr ""
|
|
3313 |
"<strong>meilleure façon de garder votre WordPress protégé</strong> contre "
|
3314 |
"les dernières vulnérabilités."
|
3315 |
|
3316 |
-
#: lib/help.php:
|
3317 |
msgid "Rules Editor"
|
3318 |
msgstr "Éditeur de Règles"
|
3319 |
|
3320 |
-
#: lib/help.php:
|
3321 |
msgid ""
|
3322 |
"Besides the \"Firewall Policies\", NinjaFirewall includes also a large set "
|
3323 |
"of built-in rules used to protect your blog against the most common "
|
@@ -3334,7 +3353,7 @@ msgstr ""
|
|
3334 |
"règles, vous pouvez utiliser l’Éditeur de règles ci-dessous pour les "
|
3335 |
"désactiver individuellement :"
|
3336 |
|
3337 |
-
#: lib/help.php:
|
3338 |
msgid ""
|
3339 |
"Check your firewall log and find the rule ID you want to disable (it is "
|
3340 |
"displayed in the <code>RULE</code> column)."
|
@@ -3342,7 +3361,7 @@ msgstr ""
|
|
3342 |
"Consultez le journal du pare-feu afin d'y trouver l'ID de la règle que vous "
|
3343 |
"souhaitez désactiver (il est affiché dans la colonne <code>RULE</code>)."
|
3344 |
|
3345 |
-
#: lib/help.php:
|
3346 |
msgid ""
|
3347 |
"Select its ID from the enabled rules list below and click the \"Disable it\" "
|
3348 |
"button."
|
@@ -3350,7 +3369,7 @@ msgstr ""
|
|
3350 |
"Sélectionnez son ID dans la liste des règles ci-dessous et cliquez sur le "
|
3351 |
"bouton \"Désactiver\"."
|
3352 |
|
3353 |
-
#: lib/help.php:
|
3354 |
msgid ""
|
3355 |
"Note: if the <code>RULE</code> column from your log shows a hyphen <code>-</"
|
3356 |
"code> instead of a number, that means that the rule can be changed in the "
|
@@ -3373,7 +3392,7 @@ msgstr ""
|
|
3373 |
msgid "Error: wrong parameter value (%s)."
|
3374 |
msgstr "Erreur : Mauvais paramètre (%s)."
|
3375 |
|
3376 |
-
#: lib/install.php:105 lib/install.php:
|
3377 |
#, php-format
|
3378 |
msgid ""
|
3379 |
"Error: The following file is not writable, please change its permissions: %s"
|
@@ -3381,7 +3400,7 @@ msgstr ""
|
|
3381 |
"Erreur : Le fichier suivant n'est pas accessible en écriture. Veuillez "
|
3382 |
"modifier ses autorisations : %s"
|
3383 |
|
3384 |
-
#: lib/install.php:
|
3385 |
#, php-format
|
3386 |
msgid ""
|
3387 |
"NinjaFirewall detected that the requested changes seemed to crash your blog. "
|
@@ -3390,7 +3409,7 @@ msgstr ""
|
|
3390 |
"NinjaFirewall a détecté que les modifications demandées semblaient planter "
|
3391 |
"votre blog. %s"
|
3392 |
|
3393 |
-
#: lib/install.php:
|
3394 |
msgid ""
|
3395 |
"Changes have been undone. You may need to modify your selection and try "
|
3396 |
"again."
|
@@ -3398,22 +3417,26 @@ msgstr ""
|
|
3398 |
"Les modifications ont été annulées. Vous devriez peut-être modifier votre "
|
3399 |
"sélection et réessayer."
|
3400 |
|
3401 |
-
#: lib/install.php:
|
3402 |
#, php-format
|
3403 |
msgid "The website front-end returned: HTTP %s %s."
|
3404 |
msgstr "La page d'accueil du site a retourné : HTTP %s %s."
|
3405 |
|
3406 |
-
#: lib/install.php:
|
|
|
|
|
|
|
|
|
3407 |
#, php-format
|
3408 |
msgid "The website front-end returned a fatal error: %s."
|
3409 |
msgstr "La page d'accueil du site a retourné une erreur fatale : %s."
|
3410 |
|
3411 |
-
#: lib/install.php:
|
3412 |
-
#: lib/install.php:
|
3413 |
msgid "File is not writable"
|
3414 |
msgstr "Le fichier n'est pas accessible en écriture"
|
3415 |
|
3416 |
-
#: lib/install_default.php:
|
3417 |
msgid ""
|
3418 |
"Error: The installer cannot download the security rules from wordpress.org "
|
3419 |
"website."
|
@@ -3421,7 +3444,7 @@ msgstr ""
|
|
3421 |
"Erreur : Impossible de télécharger les règles de sécurité depuis le site de "
|
3422 |
"wordpress.org."
|
3423 |
|
3424 |
-
#: lib/install_default.php:
|
3425 |
msgid ""
|
3426 |
"The server may be temporarily down or you may have network connectivity "
|
3427 |
"problems? Please try again in a few minutes."
|
@@ -3430,7 +3453,7 @@ msgstr ""
|
|
3430 |
"problèmes de connectivité réseau ? Veuillez ré-essayer d'ici quelques "
|
3431 |
"minutes."
|
3432 |
|
3433 |
-
#: lib/install_default.php:
|
3434 |
msgid ""
|
3435 |
"NinjaFirewall downloads its rules over an HTTPS secure connection. Maybe "
|
3436 |
"your server does not support SSL? You can force NinjaFirewall to use a non-"
|
@@ -3443,7 +3466,7 @@ msgstr ""
|
|
3443 |
"connexion non-sécurisée (HTTP) en ajoutant la ligne suivante dans votre "
|
3444 |
"fichier <strong>wp-config.php</strong> :"
|
3445 |
|
3446 |
-
#: lib/install_default.php:
|
3447 |
#, php-format
|
3448 |
msgid ""
|
3449 |
"NinjaFirewall cannot create its <code>nfwlog/</code>log and cache folder; "
|
@@ -4193,14 +4216,14 @@ msgstr "[NinjaFirewall] Alerte: Détection File Check"
|
|
4193 |
|
4194 |
#: lib/monitoring_file_check.php:768 lib/monitoring_file_check.php:770
|
4195 |
#: lib/monitoring_file_check.php:790 lib/monitoring_file_check.php:792
|
4196 |
-
#: lib/security_rules_update.php:
|
4197 |
#: lib/utils.php:225 lib/utils.php:311 lib/utils.php:435 lib/utils.php:1035
|
4198 |
#: lib/utils.php:1213 lib/utils.php:1492
|
4199 |
msgid "Blog:"
|
4200 |
msgstr "Blog :"
|
4201 |
|
4202 |
#: lib/monitoring_file_check.php:772 lib/monitoring_file_check.php:794
|
4203 |
-
#: lib/security_rules_update.php:
|
4204 |
#, php-format
|
4205 |
msgid "Date: %s"
|
4206 |
msgstr "Date : %s"
|
@@ -4295,7 +4318,7 @@ msgstr ""
|
|
4295 |
msgid "Save Network options"
|
4296 |
msgstr "Sauvegarder les options"
|
4297 |
|
4298 |
-
#: lib/security_rules.php:44 lib/security_rules_update.php:
|
4299 |
#: ninjafirewall.php:846
|
4300 |
msgid "Security Rules"
|
4301 |
msgstr "Règles de Sécurité"
|
@@ -4407,7 +4430,7 @@ msgstr ""
|
|
4407 |
msgid "Security rules have been updated."
|
4408 |
msgstr "Les règles de sécurité ont été mises à jour."
|
4409 |
|
4410 |
-
#: lib/security_rules_update.php:91 lib/security_rules_update.php:
|
4411 |
msgid "No security rules update available."
|
4412 |
msgstr "Aucune mise à jour des règles de sécurité disponible."
|
4413 |
|
@@ -4512,31 +4535,31 @@ msgstr ""
|
|
4512 |
"Erreur : Le fichier des règles téléchargé semblent corrompu (unserialized "
|
4513 |
"rules seem corrupted)."
|
4514 |
|
4515 |
-
#: lib/security_rules_update.php:
|
4516 |
#, php-format
|
4517 |
msgid "Security rules updated to version %s."
|
4518 |
msgstr "Les règles de sécurité ont été mises à jour vers la version %s."
|
4519 |
|
4520 |
-
#: lib/security_rules_update.php:
|
4521 |
msgid "Error: Unable to retrieve the new rules version."
|
4522 |
msgstr "Erreur : Impossible de récupérer la nouvelle version des règles."
|
4523 |
|
4524 |
-
#: lib/security_rules_update.php:
|
4525 |
#, php-format
|
4526 |
msgid "Error: Server returned a %s HTTP error code (#1)."
|
4527 |
msgstr "Erreur : Le serveur a retourné un code d'erreur HTTP %s (#1)."
|
4528 |
|
4529 |
-
#: lib/security_rules_update.php:
|
4530 |
msgid "Error: Unable to connect to the remote server"
|
4531 |
msgstr "Erreur : Impossible de se connecter au serveur distant"
|
4532 |
|
4533 |
-
#: lib/security_rules_update.php:
|
4534 |
#, php-format
|
4535 |
msgid "Error: The new rules versions do not match (%s != %s)."
|
4536 |
msgstr ""
|
4537 |
"Erreur : La versions des nouvelles règles ne correspond pas (%s != %s)."
|
4538 |
|
4539 |
-
#: lib/security_rules_update.php:
|
4540 |
#, php-format
|
4541 |
msgid ""
|
4542 |
"Error: The new rules %s digital signature is not correct. Aborting update, "
|
@@ -4545,24 +4568,24 @@ msgstr ""
|
|
4545 |
"Erreur : La signature numérique des nouvelles règles %s n'est pas correcte. "
|
4546 |
"Annulation de la mise à jour, les règles ont peut-être été altérées."
|
4547 |
|
4548 |
-
#: lib/security_rules_update.php:
|
4549 |
#, php-format
|
4550 |
msgid "Error: Server returned a %s HTTP error code (#2)."
|
4551 |
msgstr "Erreur : Le serveur a retourné un code d'erreur HTTP %s (#2)."
|
4552 |
|
4553 |
-
#: lib/security_rules_update.php:
|
4554 |
msgid "[NinjaFirewall] Security rules update"
|
4555 |
msgstr "[NinjaFirewall] Mise à jour des règles de sécurité"
|
4556 |
|
4557 |
-
#: lib/security_rules_update.php:
|
4558 |
msgid "NinjaFirewall security rules have been updated:"
|
4559 |
msgstr "Les règles de sécurité de NinjaFirewall ont été mises à jour :"
|
4560 |
|
4561 |
-
#: lib/security_rules_update.php:
|
4562 |
msgid "Rules version:"
|
4563 |
msgstr "Version des règles :"
|
4564 |
|
4565 |
-
#: lib/security_rules_update.php:
|
4566 |
#, php-format
|
4567 |
msgid "This notification can be turned off from NinjaFirewall \"%s\" page."
|
4568 |
msgstr ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: Stable (latest release)\n"
|
6 |
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/ninjafirewall\n"
|
7 |
+
"POT-Creation-Date: 2020-11-25 19:01+0700\n"
|
8 |
+
"PO-Revision-Date: 2020-11-25 19:02+0700\n"
|
9 |
"Last-Translator: NinTechNet <contact@nintechnet.com>\n"
|
10 |
"Language-Team: NinTechNet <nintechnet.com>\n"
|
11 |
"Language: fr_FR\n"
|
12 |
"MIME-Version: 1.0\n"
|
13 |
"Content-Type: text/plain; charset=UTF-8\n"
|
14 |
"Content-Transfer-Encoding: 8bit\n"
|
15 |
+
"X-Generator: Poedit 2.4.2\n"
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
17 |
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
18 |
|
53 |
"NinjaScanner au menu de NinjaFirewall\". Cela remplacera cette page par le "
|
54 |
"propre menu de NinjaScanner :"
|
55 |
|
56 |
+
#: lib/custom_plugin.php:27
|
57 |
msgid "Support forum:"
|
58 |
msgstr "Forum :"
|
59 |
|
60 |
+
#: lib/custom_plugin.php:29
|
61 |
#, php-format
|
62 |
msgid ""
|
63 |
"Need more security? Check out our supercharged NinjaFirewall (WP+ Edition): "
|
338 |
"l'adresse IP est invalide. Veuillez vérifier <a href=\"%s\">votre "
|
339 |
"configuration</a>."
|
340 |
|
341 |
+
#: lib/dashboard.php:320 lib/help.php:465 lib/logs_firewall_log.php:193
|
342 |
#: lib/wpplus.php:170
|
343 |
msgid "Centralized Logging"
|
344 |
msgstr "Centralisation des Logs"
|
345 |
|
346 |
+
#: lib/dashboard.php:324 lib/security_rules_update.php:434
|
347 |
#, php-format
|
348 |
msgid "Error: %s"
|
349 |
msgstr "Erreur : %s"
|
444 |
"Soyez informé des dernières vulnérabilités dans les extensions et thèmes de "
|
445 |
"WordPress :"
|
446 |
|
447 |
+
#: lib/dashboard_about.php:31 lib/help.php:513
|
448 |
msgid "GDPR Compliance"
|
449 |
msgstr "Conformité RGPD"
|
450 |
|
514 |
msgid "Select monthly stats to view..."
|
515 |
msgstr "Sélectionnez les statistiques à afficher..."
|
516 |
|
517 |
+
#: lib/event_notifications.php:34 lib/help.php:375 ninjafirewall.php:834
|
518 |
msgid "Event Notifications"
|
519 |
msgstr "Notifications d'Événement"
|
520 |
|
765 |
msgid "Blocked brute-force attacks:"
|
766 |
msgstr "Attaques par force brute bloquées :"
|
767 |
|
768 |
+
#: lib/event_notifications.php:503 lib/event_updates.php:225 lib/utils.php:1047
|
769 |
msgid ""
|
770 |
"This notification can be turned off from NinjaFirewall \"Event Notifications"
|
771 |
"\" page."
|
773 |
"Cette notification peut être désactivée depuis la page \"Notifications "
|
774 |
"d’Événement\" de NinjaFirewall."
|
775 |
|
776 |
+
#: lib/event_updates.php:160
|
777 |
msgid "[NinjaFirewall] Warning: Security update available"
|
778 |
msgstr "[NinjaFirewall] Mise à jour de sécurité en attente"
|
779 |
|
780 |
+
#: lib/event_updates.php:162
|
781 |
msgid ""
|
782 |
"NinjaFirewall has detected that there are security updates available for "
|
783 |
"your website:"
|
785 |
"NinjaFirewall a détecté que des mises à jour de sécurité sont disponibles "
|
786 |
"pour votre site Web :"
|
787 |
|
788 |
+
#: lib/event_updates.php:163 lib/utils.php:233 lib/utils.php:318
|
789 |
#: lib/utils.php:440 lib/utils.php:1036 lib/utils.php:1224 lib/utils.php:1496
|
790 |
msgid "Date:"
|
791 |
msgstr "Date :"
|
792 |
|
793 |
+
#: lib/event_updates.php:166 lib/event_updates.php:168
|
794 |
#, php-format
|
795 |
msgid "Blog: %s"
|
796 |
msgstr "Blog : %s"
|
797 |
|
798 |
+
#: lib/event_updates.php:174 lib/event_updates.php:190
|
799 |
+
#: lib/event_updates.php:209
|
800 |
#, php-format
|
801 |
msgid "Your version: %s"
|
802 |
msgstr "Votre version : %s"
|
803 |
|
804 |
+
#: lib/event_updates.php:175 lib/event_updates.php:191
|
805 |
+
#: lib/event_updates.php:210
|
806 |
#, php-format
|
807 |
msgid "New version: %s"
|
808 |
msgstr "Nouvelle version : %s"
|
809 |
|
810 |
+
#: lib/event_updates.php:177 lib/event_updates.php:194
|
811 |
+
#: lib/event_updates.php:213
|
812 |
msgid "Severity: This is an important security update"
|
813 |
msgstr "Sévérité : Ceci est une mise à jour de sécurité importante"
|
814 |
|
815 |
+
#: lib/event_updates.php:179 lib/event_updates.php:196
|
816 |
+
#: lib/event_updates.php:215
|
817 |
msgid "Severity: **This is a critical security update**"
|
818 |
msgstr "Sévérité : **Ceci est une mise à jour de sécurité critique**"
|
819 |
|
820 |
+
#: lib/event_updates.php:181 lib/event_updates.php:198
|
821 |
+
#: lib/event_updates.php:217
|
822 |
msgid "Type: Security fix"
|
823 |
msgstr "Type : Correctif de sécurité"
|
824 |
|
825 |
+
#: lib/event_updates.php:189
|
826 |
#, php-format
|
827 |
msgid "Plugin: %s"
|
828 |
msgstr "Extension : %s"
|
829 |
|
830 |
+
#: lib/event_updates.php:208
|
831 |
#, php-format
|
832 |
msgid "Theme: %s"
|
833 |
msgstr "Theme : %s"
|
834 |
|
835 |
+
#: lib/event_updates.php:223
|
836 |
msgid "Don't leave your blog at risk, make sure to update as soon as possible."
|
837 |
msgstr ""
|
838 |
"Ne laissez pas votre blog en danger, lancez cette mise à jour dès que "
|
1054 |
msgid "There are no backup available yet, check back later."
|
1055 |
msgstr "Il n'y a pas encore de sauvegarde disponible, revenez plus tard."
|
1056 |
|
1057 |
+
#: lib/firewall_options.php:376
|
1058 |
#, php-format
|
1059 |
msgid "Uploaded file is either corrupted or its format is not supported (#%s)"
|
1060 |
msgstr ""
|
1061 |
"Le fichier importé est illisible ou son format n'est pas supporté (#%s)"
|
1062 |
|
1063 |
+
#: lib/firewall_options.php:554 ninjafirewall.php:230
|
1064 |
msgid "[NinjaFirewall] Alert: Firewall is disabled"
|
1065 |
msgstr "[NinjaFirewall] Alerte : Le pare-feu a été désactivé"
|
1066 |
|
1067 |
+
#: lib/firewall_options.php:556 lib/firewall_options.php:558
|
1068 |
#: ninjafirewall.php:232 ninjafirewall.php:234
|
1069 |
msgid "-Blog :"
|
1070 |
msgstr "- Blog :"
|
1071 |
|
1072 |
+
#: lib/firewall_options.php:562 ninjafirewall.php:236
|
1073 |
msgid "Someone disabled NinjaFirewall from your WordPress admin dashboard:"
|
1074 |
msgstr ""
|
1075 |
"Quelqu'un a désactivé NinjaFirewall depuis votre Tableau de bord de "
|
1076 |
"WordPress :"
|
1077 |
|
1078 |
+
#: lib/firewall_options.php:565
|
1079 |
msgid ""
|
1080 |
"NinjaFirewall is disabled because someone enabled debugging mode from your "
|
1081 |
"WordPress admin dashboard:"
|
1083 |
"NinjaFirewall est désactivé car quelqu'un activé son \"Mode débogage\" "
|
1084 |
"depuis votre tableau de bord de WordPress :"
|
1085 |
|
1086 |
+
#: lib/firewall_options.php:568
|
1087 |
msgid "[NinjaFirewall] Alert: Firewall override settings"
|
1088 |
msgstr "[NinjaFirewall] Alerte : Modification des paramètres du pare-feu"
|
1089 |
|
1090 |
+
#: lib/firewall_options.php:569
|
1091 |
msgid ""
|
1092 |
"Someone imported a new configuration which overrode the firewall settings:"
|
1093 |
msgstr ""
|
1094 |
"Quelqu'un a importé une nouvelle configuration qui a modifié tous les "
|
1095 |
"paramètres du pare-feu :"
|
1096 |
|
1097 |
+
#: lib/firewall_options.php:575 ninjafirewall.php:237
|
1098 |
msgid "-User :"
|
1099 |
msgstr "- Nom :"
|
1100 |
|
1101 |
+
#: lib/firewall_options.php:576 ninjafirewall.php:238
|
1102 |
msgid "-IP :"
|
1103 |
msgstr "- IP :"
|
1104 |
|
1105 |
+
#: lib/firewall_options.php:577 ninjafirewall.php:239
|
1106 |
msgid "-Date :"
|
1107 |
msgstr "- Date :"
|
1108 |
|
1619 |
msgid "Set %s (Chrome, Opera and Firefox browsers)"
|
1620 |
msgstr "Activer %s (Chrome, Opera et Firefox)"
|
1621 |
|
1622 |
+
#: lib/firewall_policies.php:1000
|
1623 |
msgid ""
|
1624 |
"Block PHP built-in wrappers in <code>GET</code>, <code>POST</code>, "
|
1625 |
"<code>HTTP_USER_AGENT</code>, <code>HTTP_REFERER</code> and cookies"
|
1628 |
"<code>GET</code>, <code>POST</code>, <code>HTTP_USER_AGENT</code>, "
|
1629 |
"<code>HTTP_REFERER</code> et les cookies"
|
1630 |
|
1631 |
+
#: lib/firewall_policies.php:1039
|
1632 |
msgid "Block serialized PHP objects in the following global variables"
|
1633 |
msgstr ""
|
1634 |
"Bloquer les objets PHP sérialisés dans les variables globales suivantes"
|
1635 |
|
1636 |
+
#: lib/firewall_policies.php:1049 lib/help.php:293
|
1637 |
+
msgid "Block attempts to override PHP Superglobals"
|
1638 |
+
msgstr "Bloquer les tentatives de modification des Superglobales PHP"
|
1639 |
+
|
1640 |
+
#: lib/firewall_policies.php:1055 lib/help.php:295
|
1641 |
msgid "Hide PHP notice and error messages"
|
1642 |
msgstr "Masquer les messages d'erreur de PHP"
|
1643 |
|
1644 |
+
#: lib/firewall_policies.php:1061
|
1645 |
msgid "Sanitise <code>PHP_SELF</code>"
|
1646 |
msgstr "Nettoyer <code>PHP_SELF</code>"
|
1647 |
|
1648 |
+
#: lib/firewall_policies.php:1067
|
1649 |
msgid "Sanitise <code>PATH_TRANSLATED</code>"
|
1650 |
msgstr "Nettoyer <code>PATH_TRANSLATED</code>"
|
1651 |
|
1652 |
+
#: lib/firewall_policies.php:1073
|
1653 |
msgid "Sanitise <code>PATH_INFO</code>"
|
1654 |
msgstr "Nettoyer <code>PATH_INFO</code>"
|
1655 |
|
1656 |
+
#: lib/firewall_policies.php:1087
|
1657 |
msgid "This option is not compatible with your actual configuration."
|
1658 |
msgstr ""
|
1659 |
"Cette option n'est pas compatible avec la configuration de votre serveur."
|
1660 |
|
1661 |
+
#: lib/firewall_policies.php:1109 lib/help.php:299
|
1662 |
msgid "Various"
|
1663 |
msgstr "Divers"
|
1664 |
|
1665 |
+
#: lib/firewall_policies.php:1112
|
1666 |
msgid "Block the <code>DOCUMENT_ROOT</code> server variable in HTTP request"
|
1667 |
msgstr ""
|
1668 |
"Bloquer les requêtes HTTP contenant la variable <code>DOCUMENT_ROOT</code>"
|
1669 |
|
1670 |
+
#: lib/firewall_policies.php:1119 lib/help.php:302
|
1671 |
msgid "Block ASCII character 0x00 (NULL byte)"
|
1672 |
msgstr "Bloquer le caractère ASCII 0x00 (NULL byte)"
|
1673 |
|
1674 |
+
#: lib/firewall_policies.php:1125 lib/help.php:304
|
1675 |
msgid "Block ASCII control characters 1 to 8 and 14 to 31"
|
1676 |
msgstr "Bloquer les caractères de contrôle ASCII 1 à 8 et 14 à 31"
|
1677 |
|
1678 |
+
#: lib/firewall_policies.php:1138
|
1679 |
msgid "Save Firewall Policies"
|
1680 |
msgstr "Sauvegarder les options"
|
1681 |
|
1682 |
+
#: lib/firewall_policies.php:1140
|
1683 |
msgid "Restore Default Values"
|
1684 |
msgstr "Rétablir les valeurs par défaut"
|
1685 |
|
2567 |
"code> et <code>HTTP_USER_AGENT</code>."
|
2568 |
|
2569 |
#: lib/help.php:293
|
2570 |
+
#, php-format
|
2571 |
+
msgid ""
|
2572 |
+
"This policy will block attempts to override superglobals (%s). A plugin or a "
|
2573 |
+
"theme could make an unsafe use of some PHP functions that could potentially "
|
2574 |
+
"override superglobals. Enabling this option will not block the request but "
|
2575 |
+
"unset the dangerous value and write the event ot the firewall log."
|
2576 |
+
msgstr ""
|
2577 |
+
"Cette politique bloquera les tentatives de modification des Superglobales de "
|
2578 |
+
"PHP (%s). Une extension ou un thème pourrait faire une utilisation "
|
2579 |
+
"dangereuse de certaines fonctions PHP qui pourraient potentiellement "
|
2580 |
+
"modifier les Superglobales. L'activation de cette option ne bloquera pas la "
|
2581 |
+
"requête mais annulera la valeur dangereuse et enregistrera l'événement dans "
|
2582 |
+
"le journal du pare-feu."
|
2583 |
+
|
2584 |
+
#: lib/help.php:295
|
2585 |
msgid ""
|
2586 |
"This option lets you hide errors returned by your scripts. Such errors can "
|
2587 |
"leak sensitive informations which can be exploited by hackers."
|
2590 |
"afficher des informations sensibles qui peuvent être exploitées "
|
2591 |
"ultérieurement par des pirates."
|
2592 |
|
2593 |
+
#: lib/help.php:297
|
2594 |
msgid ""
|
2595 |
"Sanitise <code>PHP_SELF</code>, <code>PATH_TRANSLATED</code>, "
|
2596 |
"<code>PATH_INFO</code>"
|
2598 |
"Nettoyer <code>PHP_SELF</code>, <code>PATH_TRANSLATED</code>, "
|
2599 |
"<code>PATH_INFO</code>"
|
2600 |
|
2601 |
+
#: lib/help.php:297
|
2602 |
msgid ""
|
2603 |
"This option can sanitise any dangerous characters found in those 3 server "
|
2604 |
"variables to prevent various XSS and database injection attempts."
|
2606 |
"Activez ces options si vous souhaitez que le pare-feu nettoie ces trois "
|
2607 |
"variables."
|
2608 |
|
2609 |
+
#: lib/help.php:300
|
2610 |
#, php-format
|
2611 |
msgid ""
|
2612 |
"Block the <code>DOCUMENT_ROOT</code> server variable (%s) in HTTP requests"
|
2614 |
"Bloquer les requêtes HTTP contenant la variable <code>DOCUMENT_ROOT</code> "
|
2615 |
"(%s)"
|
2616 |
|
2617 |
+
#: lib/help.php:300
|
2618 |
msgid ""
|
2619 |
"This option will block scripts attempting to pass the <code>DOCUMENT_ROOT</"
|
2620 |
"code> server variable in a <code>GET</code> or <code>POST</code> request. "
|
2627 |
"cette variable, mais pas la plupart des applications légitimes (hormis "
|
2628 |
"certains scripts d'installation ou de configuration)."
|
2629 |
|
2630 |
+
#: lib/help.php:302
|
2631 |
msgid ""
|
2632 |
"This option will reject any <code>GET</code> or <code>POST</code> request, "
|
2633 |
"<code>HTTP_USER_AGENT</code>, <code>REQUEST_URI</code>, <code>PHP_SELF</"
|
2641 |
"contenant le caractère ASCI 0x00 (NULL byte) sera bloquée immédiatement. Ce "
|
2642 |
"caractère est dangereux et devrait toujours être rejeté."
|
2643 |
|
2644 |
+
#: lib/help.php:304
|
2645 |
msgid ""
|
2646 |
"This option will reject any <code>GET</code> or <code>POST</code> request, "
|
2647 |
"<code>HTTP_USER_AGENT</code>, <code>HTTP_REFERER</code> variables containing "
|
2651 |
"variable <code>HTTP_USER_AGENT</code>, <code>HTTP_REFERER</code> contenant "
|
2652 |
"des caractères ASCII 1 à 8 et 14 à 31 sera bloquée."
|
2653 |
|
2654 |
+
#: lib/help.php:317 lib/monitoring.php:46
|
2655 |
msgid "File Check"
|
2656 |
msgstr "File Check"
|
2657 |
|
2658 |
+
#: lib/help.php:318
|
2659 |
msgid ""
|
2660 |
"File Check lets you perform file integrity monitoring upon request or on a "
|
2661 |
"specific interval."
|
2663 |
"File Check vous permet d'effectuer une analyse de l'intégrité de vos "
|
2664 |
"fichiers sur demande ou à un intervalle spécifique défini."
|
2665 |
|
2666 |
+
#: lib/help.php:320
|
2667 |
msgid ""
|
2668 |
"You need to create a snapshot of all your files and then, at a later time, "
|
2669 |
"you can scan your system to compare it with the previous snapshot. Any "
|
2676 |
"permissions et propriétés des fichiers, leur création et suppression ainsi "
|
2677 |
"que l'horodatage."
|
2678 |
|
2679 |
+
#: lib/help.php:322
|
2680 |
#, php-format
|
2681 |
msgid ""
|
2682 |
"Create a snapshot of all files stored in that directory: by default, the "
|
2686 |
"répertoire : par défaut, le repertoire est l'<code>ABSPATH</code> de "
|
2687 |
"WordPress (%s)"
|
2688 |
|
2689 |
+
#: lib/help.php:323
|
2690 |
msgid ""
|
2691 |
"Exclude the following files/folders: you can enter a directory or a file "
|
2692 |
"name (e.g., <code>/foo/bar/</code>), or a part of it (e.g., <code>foo</"
|
2697 |
"partie de celui-ci (par ex. <code>foo</code>), ou même exclure une extension "
|
2698 |
"de fichier (par ex. <code>.css</code>)."
|
2699 |
|
2700 |
+
#: lib/help.php:325
|
2701 |
msgid ""
|
2702 |
"Multiple values must be comma-separated (e.g., <code>/foo/bar/,.css,.png</"
|
2703 |
"code>)."
|
2705 |
"Plusieurs valeurs doivent être séparées par des virgules (par ex. <code>/foo/"
|
2706 |
"bar/,.css,.png</code>)."
|
2707 |
|
2708 |
+
#: lib/help.php:326
|
2709 |
msgid ""
|
2710 |
"Do not follow symbolic links: by default, NinjaFirewall will not follow "
|
2711 |
"symbolic links."
|
2713 |
"Ne pas suivre les liens symboliques : par défaut, NinjaFirewall ignore "
|
2714 |
"les liens symboliques lors de son analyse des fichiers."
|
2715 |
|
2716 |
+
#: lib/help.php:329
|
2717 |
msgid "Scheduled scans"
|
2718 |
msgstr "Analyses planifiées"
|
2719 |
|
2720 |
+
#: lib/help.php:330
|
2721 |
msgid ""
|
2722 |
"NinjaFirewall can scan your system on a specific interval (hourly, "
|
2723 |
"twicedaily or daily)."
|
2725 |
"NinjaFirewall peut scanner votre système à intervalle régulier (une fois par "
|
2726 |
"heure, deux fois par jour ou tous les jours)."
|
2727 |
|
2728 |
+
#: lib/help.php:332
|
2729 |
msgid ""
|
2730 |
"It can either send you a scan report only if changes are detected, or always "
|
2731 |
"send you one after each scan."
|
2734 |
"été détectés, ou bien vous en envoyer un systématiquement après chaque "
|
2735 |
"analyse."
|
2736 |
|
2737 |
+
#: lib/help.php:334
|
2738 |
msgid ""
|
2739 |
"Reports will be sent to the contact email address defined in the \"Event "
|
2740 |
"Notifications\" menu."
|
2742 |
"Les rapports seront envoyés à l'adresse e-mail définie dans la page "
|
2743 |
"\"Notifications d'Événement\"."
|
2744 |
|
2745 |
+
#: lib/help.php:336
|
2746 |
#, php-format
|
2747 |
msgid ""
|
2748 |
"Scheduled scans rely on <a href=\"%s\">WordPress pseudo cron</a> which works "
|
2751 |
"Les analyses planifiées utilisent le <a href=\"%s\">pseudo cron de "
|
2752 |
"WordPress</a> qui ne fonctionne que si votre site reçoit un trafic suffisant."
|
2753 |
|
2754 |
+
#: lib/help.php:342 lib/monitoring.php:47
|
2755 |
msgid "File Guard"
|
2756 |
msgstr "File Guard"
|
2757 |
|
2758 |
+
#: lib/help.php:344
|
2759 |
msgid ""
|
2760 |
"File Guard can detect, in real-time, any access to a PHP file that was "
|
2761 |
"recently modified or created, and alert you about this."
|
2763 |
"File Guard peut détecter, en temps réel, tout accès à un fichier PHP qui a "
|
2764 |
"été récemment modifié ou créé, et vous alerter à ce sujet."
|
2765 |
|
2766 |
+
#: lib/help.php:346
|
2767 |
msgid ""
|
2768 |
"If a hacker uploaded a shell script to your site (or injected a backdoor "
|
2769 |
"into an already existing file) and tried to directly access that file using "
|
2782 |
"envoyées à l'adresse e-mail de contact définie dans le menu \"Notifications "
|
2783 |
"d’Événement\"."
|
2784 |
|
2785 |
+
#: lib/help.php:347
|
2786 |
msgid ""
|
2787 |
"If you do not want to monitor a folder, you can exclude its full path or a "
|
2788 |
"part of it (e.g., <code>/var/www/public_html/cache/</code> or <code>/cache/</"
|
2796 |
"variable <code>$_SERVER[\"SCRIPT_FILENAME\"]</code> et, si elle correspond, "
|
2797 |
"l'ignorera."
|
2798 |
|
2799 |
+
#: lib/help.php:348
|
2800 |
msgid ""
|
2801 |
"Multiple values must be comma-separated (e.g., <code>/foo/bar/,/cache/</"
|
2802 |
"code>)."
|
2804 |
"Plusieurs valeurs doivent être séparées par des virgules (par ex. <code>/foo/"
|
2805 |
"bar/,/cache/</code>)."
|
2806 |
|
2807 |
+
#: lib/help.php:349
|
2808 |
msgid ""
|
2809 |
"File Guard real-time detection is a totally unique feature, because "
|
2810 |
"NinjaFirewall is the only plugin for WordPress that can hook HTTP requests "
|
2816 |
"intercepter les requêtes HTTP envoyées à tout script PHP, même si ce dernier "
|
2817 |
"ne fait pas partie de WordPress (logiciel tiers, backdoor, etc)."
|
2818 |
|
2819 |
+
#: lib/help.php:358 lib/network.php:32 ninjafirewall.php:830
|
2820 |
msgid "Network"
|
2821 |
msgstr "Réseau"
|
2822 |
|
2823 |
+
#: lib/help.php:360
|
2824 |
msgid ""
|
2825 |
"Even if NinjaFirewall administration menu is only available to the Super "
|
2826 |
"Admin (from the main site), you can still display its status to all sites in "
|
2832 |
"du réseau en ajoutant une petite icône à leur barre d'administration. Elle "
|
2833 |
"ne sera visible que par les administrateurs de ces sites."
|
2834 |
|
2835 |
+
#: lib/help.php:362
|
2836 |
msgid ""
|
2837 |
"It is recommended to enable this feature as it is the only way to know "
|
2838 |
"whether the sites in your network are protected and if NinjaFirewall "
|
2842 |
"si les sites de votre réseau sont protégés et si l'installation de "
|
2843 |
"NinjaFirewall a réussi."
|
2844 |
|
2845 |
+
#: lib/help.php:364
|
2846 |
msgid ""
|
2847 |
"Note that when it is disabled, the icon still remains visible to you, the "
|
2848 |
"Super Admin."
|
2850 |
"Notez que même lorsqu'il est désactivé, l'icône reste visible pour vous, le "
|
2851 |
"Super Administrateur."
|
2852 |
|
2853 |
+
#: lib/help.php:376
|
2854 |
msgid ""
|
2855 |
"NinjaFirewall can alert you by email on specific events triggered within "
|
2856 |
"your blog. They include installations, updates, activations etc, as well as "
|
2869 |
"après avoir pénétré dans votre Tableau de bord de WordPress, d'y installer "
|
2870 |
"une porte dérobée (backdoor) afin de prendre le contrôle de votre blog."
|
2871 |
|
2872 |
+
#: lib/help.php:387 lib/login_protection.php:21 ninjafirewall.php:838
|
2873 |
msgid "Login Protection"
|
2874 |
msgstr "Page de Connexion"
|
2875 |
|
2876 |
+
#: lib/help.php:391
|
2877 |
msgid ""
|
2878 |
"By processing incoming HTTP requests before your blog and any of its "
|
2879 |
"plugins, NinjaFirewall is the only plugin for WordPress able to protect it "
|
2886 |
"compris les attaques distribuées provenant de plusieurs milliers d'adresses "
|
2887 |
"IP différentes."
|
2888 |
|
2889 |
+
#: lib/help.php:393
|
2890 |
msgid ""
|
2891 |
"You can choose two different types of protection: a password or a captcha. "
|
2892 |
"You can enable the protection only if an attack is detected or to keep it "
|
2896 |
"captcha. Vous pouvez choisir d'activer la protection uniquement lorsqu'une "
|
2897 |
"attaque est détectée ou bien l'activer en permanence."
|
2898 |
|
2899 |
+
#: lib/help.php:395
|
2900 |
msgid "Yes, if under attack:"
|
2901 |
msgstr "Oui, si attaque en cours :"
|
2902 |
|
2903 |
+
#: lib/help.php:397
|
2904 |
msgid ""
|
2905 |
"The protection will be triggered when too many login attempts are detected, "
|
2906 |
"regardless of the offending IP. It blocks the attack instantly and prevents "
|
2915 |
"utilisant soit une combinaison nom d'utilisateur / mot de passe prédéfinie, "
|
2916 |
"soit un code captcha."
|
2917 |
|
2918 |
+
#: lib/help.php:399
|
2919 |
msgid "Always ON:"
|
2920 |
msgstr "Toujours activée :"
|
2921 |
|
2922 |
+
#: lib/help.php:401
|
2923 |
msgid ""
|
2924 |
"NinjaFirewall will always enforce the HTTP authentication or captcha "
|
2925 |
"implementation each time you access the login page."
|
2927 |
"Vous serez toujours invité à saisir votre nom d'utilisateur / mot de passe, "
|
2928 |
"ou le code du captcha, chaque fois que vous accéderez à la page de connexion."
|
2929 |
|
2930 |
+
#: lib/help.php:404
|
2931 |
msgid "Type of protection:"
|
2932 |
msgstr "Type de protection :"
|
2933 |
|
2934 |
+
#: lib/help.php:405
|
2935 |
msgid ""
|
2936 |
"<b>Password:</b> It password-protects the login page. NinjaFirewall uses its "
|
2937 |
"own very fast authentication scheme and it is compatible with any HTTP "
|
2941 |
"utilise son propre système d'authentification, rapide et compatible avec "
|
2942 |
"n'importe quel serveur HTTP (Apache, Nginx, Lighttpd etc)."
|
2943 |
|
2944 |
+
#: lib/help.php:406
|
2945 |
msgid "<b>Captcha:</b> It will display a 5-character captcha code."
|
2946 |
msgstr "<b>Captcha :</b> Affichera un code captcha à 5 caractères."
|
2947 |
|
2948 |
+
#: lib/help.php:407
|
2949 |
msgid "Bot protection:"
|
2950 |
msgstr "Protection contre les bots :"
|
2951 |
|
2952 |
+
#: lib/help.php:408
|
2953 |
msgid ""
|
2954 |
"NinjaFirewall will attempt to block bots and scripts immediately, i.e., even "
|
2955 |
"before they start a brute-force attack."
|
2957 |
"NinjaFirewall tentera de bloquer les bots et les scripts immédiatement, "
|
2958 |
"c'est-à-dire avant même qu'ils ne commencent une attaque par force brute."
|
2959 |
|
2960 |
+
#: lib/help.php:416
|
2961 |
msgid "AUTH log"
|
2962 |
msgstr "Journal d'authentification"
|
2963 |
|
2964 |
+
#: lib/help.php:419
|
2965 |
msgid ""
|
2966 |
"NinjaFirewall can write to the server Authentication log when the brute-"
|
2967 |
"force protection is triggered. This can be useful to the system "
|
2973 |
"surveillance ou pour bloquer l'IP incriminée au niveau du pare-feu du "
|
2974 |
"serveur."
|
2975 |
|
2976 |
+
#: lib/help.php:421
|
2977 |
msgid ""
|
2978 |
"If you have a shared hosting account, keep this option disabled as you do "
|
2979 |
"not have any access to the server's logs."
|
2981 |
"Si vous avez un hébergement mutualisé, laissez cette option désactivée car "
|
2982 |
"vous n'avez pas accès aux journaux du serveur."
|
2983 |
|
2984 |
+
#: lib/help.php:423
|
2985 |
msgid ""
|
2986 |
"On Debian-based systems, the log is located in <code>/var/log/auth.log</"
|
2987 |
"code>, and on Red Hat-based systems in <code>/var/log/secure</code>. The "
|
2991 |
"sous Red Hat, dans <code>/var/log/secure</code>. Le format utilisé est le "
|
2992 |
"suivant :"
|
2993 |
|
2994 |
+
#: lib/help.php:426
|
2995 |
msgid "AA: the process ID (PID)."
|
2996 |
msgstr "AA : l'identifiant de processus (PID)."
|
2997 |
|
2998 |
+
#: lib/help.php:427
|
2999 |
msgid "BB: the user IPv4 or IPv6 address."
|
3000 |
msgstr "BB : L'adresse IPv4 ou IPv6 de l'utilisateur."
|
3001 |
|
3002 |
+
#: lib/help.php:428
|
3003 |
msgid "CC: the blog (sub-)domain name."
|
3004 |
msgstr "CC : le nom de (sous-)domaine du blog."
|
3005 |
|
3006 |
+
#: lib/help.php:429
|
3007 |
msgid ""
|
3008 |
"DD: the target: it can be either <code>wp-login.php</code> or <code>XML-RPC "
|
3009 |
"API</code>."
|
3011 |
"DD : la cible; il peut s'agir soit de <code>wp-login.php</code>, soit de "
|
3012 |
"<code>XML-RPC API</code>."
|
3013 |
|
3014 |
+
#: lib/help.php:430
|
3015 |
msgid "EE: the time, in minutes, the protection will remain active."
|
3016 |
msgstr ""
|
3017 |
"EE : le temps, en minutes, pendant lequel la protection restera active."
|
3018 |
|
3019 |
+
#: lib/help.php:432
|
3020 |
msgid "Sample loglines:"
|
3021 |
msgstr "Exemple :"
|
3022 |
|
3023 |
+
#: lib/help.php:435
|
3024 |
#, php-format
|
3025 |
msgid ""
|
3026 |
"Be careful if you are behind a load balancer, reverse-proxy or CDN because "
|
3040 |
"Alternativement, vous pouvez utiliser le fichier <code><a href=\"%s\">."
|
3041 |
"htninja</a></code>."
|
3042 |
|
3043 |
+
#: lib/help.php:449 lib/logs.php:39 lib/wpplus.php:206
|
3044 |
msgid "Firewall Log"
|
3045 |
msgstr "Journal du Pare-feu"
|
3046 |
|
3047 |
+
#: lib/help.php:452
|
3048 |
msgid ""
|
3049 |
"The firewall log displays blocked and sanitised requests as well as some "
|
3050 |
"useful information. It has 6 columns:"
|
3052 |
"Le journal du pare-feu affiche les requêtes HTTP qui ont été bloquées ou "
|
3053 |
"nettoyées ainsi que d'autres informations utiles. Il a six colonnes :"
|
3054 |
|
3055 |
+
#: lib/help.php:453
|
3056 |
msgid "DATE : date and time of the incident."
|
3057 |
msgstr "DATE : date et heure de l'incident."
|
3058 |
|
3059 |
+
#: lib/help.php:454
|
3060 |
msgid ""
|
3061 |
"INCIDENT : unique incident number/ID as it was displayed to the blocked user."
|
3062 |
msgstr ""
|
3063 |
"INCIDENT : le numéro d'incident (ID) unique. Par défaut, il sera aussi "
|
3064 |
"affiché à l'utilisateur dont la requête aura été bloquée par le pare-feu."
|
3065 |
|
3066 |
+
#: lib/help.php:455
|
3067 |
msgid ""
|
3068 |
"LEVEL : level of severity (<code>CRITICAL</code>, <code>HIGH</code> or "
|
3069 |
"<code>MEDIUM</code>), information (<code>INFO</code>, <code>UPLOAD</code>) "
|
3073 |
"<code>MEDIUM</code>), information (<code>INFO</code>, <code>UPLOAD</code>) "
|
3074 |
"et mode débogage (<code>DEBUG_ON</code>)."
|
3075 |
|
3076 |
+
#: lib/help.php:456
|
3077 |
msgid ""
|
3078 |
"RULE : reference of the NinjaFirewall built-in security rule that triggered "
|
3079 |
"the action. A hyphen (<code>-</code>) instead of a number means it was a "
|
3084 |
"d'un numéro signifie que la règle provient de votre configuration "
|
3085 |
"personnelle de la page \"Politiques du Pare-feu\"."
|
3086 |
|
3087 |
+
#: lib/help.php:457
|
3088 |
msgid "IP : the user IPv4 or IPv6 address."
|
3089 |
msgstr "BB : L'adresse IPv4 ou IPv6 de l'utilisateur."
|
3090 |
|
3091 |
+
#: lib/help.php:458
|
3092 |
msgid ""
|
3093 |
"REQUEST : the HTTP request including offending variables and values as well "
|
3094 |
"as the reason the action was logged."
|
3096 |
"REQUEST : la requête HTTP avec ses variables et valeurs, ainsi que la raison "
|
3097 |
"qui a déclenché l'incident."
|
3098 |
|
3099 |
+
#: lib/help.php:461 lib/logs_firewall_log.php:164
|
3100 |
msgid "Auto-delete log"
|
3101 |
msgstr "Suppression automatique des journaux"
|
3102 |
|
3103 |
+
#: lib/help.php:462
|
3104 |
msgid ""
|
3105 |
"This options lets you configure NinjaFirewall to delete its old logs "
|
3106 |
"automatically. By default, logs are never deleted, <b>even when uninstall "
|
3113 |
"cette valeur à <code>0</code> si vous ne voulez pas supprimer les anciens "
|
3114 |
"journaux."
|
3115 |
|
3116 |
+
#: lib/help.php:466
|
3117 |
msgid ""
|
3118 |
"Centralized Logging lets you remotely access the firewall log of all your "
|
3119 |
"NinjaFirewall protected websites from one single installation. You do not "
|
3124 |
"NinjaFirewall. Vous n'avez plus besoin de vous connecter à chaque site pour "
|
3125 |
"analyser vos journaux."
|
3126 |
|
3127 |
+
#: lib/help.php:466
|
3128 |
#, php-format
|
3129 |
msgid "<a href=\"%s\">Consult our blog</a> for more info about it."
|
3130 |
msgstr ""
|
3131 |
"<a href=\"%s\">Consultez notre blog pour plus d'informations à ce sujet</a>."
|
3132 |
|
3133 |
+
#: lib/help.php:467
|
3134 |
msgid ""
|
3135 |
"Enter your public key (optional): This is the public key that was created "
|
3136 |
"from your main server."
|
3138 |
"Entrez votre clé publique (optionnel) : Il s'agit de la clé qui a été créée "
|
3139 |
"depuis le serveur principal."
|
3140 |
|
3141 |
+
#: lib/help.php:471
|
3142 |
msgid ""
|
3143 |
"Centralized Logging will keep working even if NinjaFirewall is disabled. "
|
3144 |
"Delete your public key below if you want to disable it."
|
3147 |
"NinjaFirewall. Si vous souhaitez complètement désactiver cette option, "
|
3148 |
"supprimez votre clé publique ci-dessous."
|
3149 |
|
3150 |
+
#: lib/help.php:478 lib/logs.php:40 lib/logs_live_log.php:37
|
3151 |
msgid "Live Log"
|
3152 |
msgstr "Live Log"
|
3153 |
|
3154 |
+
#: lib/help.php:481
|
3155 |
msgid ""
|
3156 |
"Live Log lets you watch your blog traffic in real time, just like the Unix "
|
3157 |
"<code>tail -f</code> command. Note that requests sent to static elements "
|
3163 |
"statiques comme les fichiers JS/CSS ou les images ne sont pas traitées par "
|
3164 |
"NinjaFirewall."
|
3165 |
|
3166 |
+
#: lib/help.php:483
|
3167 |
msgid ""
|
3168 |
"You can enable/disable the monitoring process, change the refresh rate, "
|
3169 |
"clear the screen, enable automatic vertical scrolling, change the log "
|
3174 |
"effacer l'écran, changer le format d'affichage, le fuseau horaire et choisir "
|
3175 |
"le type de trafic à visualiser (HTTP/HTTPS)."
|
3176 |
|
3177 |
+
#: lib/help.php:483
|
3178 |
msgid ""
|
3179 |
"You can also apply filters to include or exclude files and folders "
|
3180 |
"(REQUEST_URI)."
|
3182 |
"Vous pouvez également appliquer des filtres pour inclure ou exclure des "
|
3183 |
"fichiers et des dossiers (REQUEST_URI)."
|
3184 |
|
3185 |
+
#: lib/help.php:486
|
3186 |
msgid ""
|
3187 |
"Live Log does not make use of any WordPress core file (e.g., <code>admin-"
|
3188 |
"ajax.php</code>). It communicates directly with the firewall without loading "
|
3196 |
"serveur, même si vous ajustez son intervalle de rafraîchissement de la page "
|
3197 |
"sur la fréquence la plus rapide (5 secondes)."
|
3198 |
|
3199 |
+
#: lib/help.php:488
|
3200 |
msgid ""
|
3201 |
"If you are using the optional <code>.htninja</code> configuration file to "
|
3202 |
"whitelist your IP, the Live Log feature will not work."
|
3205 |
"pour toujours accepter les requêtes provenant de votre adresse IP, Live Log "
|
3206 |
"ne fonctionnera pas."
|
3207 |
|
3208 |
+
#: lib/help.php:492
|
3209 |
msgid "Log Format"
|
3210 |
msgstr "Format d'affichage"
|
3211 |
|
3212 |
+
#: lib/help.php:493
|
3213 |
msgid "You can easily customize the log format. Possible values are:"
|
3214 |
msgstr ""
|
3215 |
"Vous pouvez facilement changer le format d'affichage en combinant une ou "
|
3216 |
"plusieurs des valeurs suivantes :"
|
3217 |
|
3218 |
+
#: lib/help.php:494
|
3219 |
msgid "<code>%time</code>: the server date, time and timezone."
|
3220 |
msgstr "<code>%time</code> : la date, heure et fuseau horaire du serveur."
|
3221 |
|
3222 |
+
#: lib/help.php:495
|
3223 |
msgid "<code>%name</code>: authenticated user (HTTP basic auth), if any."
|
3224 |
msgstr ""
|
3225 |
"<code>%name</code> : le nom de l'utilisateur (Authentification HTTP), s'il "
|
3226 |
"existe."
|
3227 |
|
3228 |
+
#: lib/help.php:496
|
3229 |
#, php-format
|
3230 |
msgid ""
|
3231 |
"<code>%client</code>: the client REMOTE_ADDR. If you are behind a load "
|
3235 |
"serveur est derrière un CDN ou un proxy, cette variable retournera l'adresse "
|
3236 |
"IP de celui-ci."
|
3237 |
|
3238 |
+
#: lib/help.php:497
|
3239 |
msgid "<code>%method</code>: HTTP method (e.g., GET, POST)."
|
3240 |
msgstr "<code>%method</code> : la méthode HTTP (ex. GET, POST)."
|
3241 |
|
3242 |
+
#: lib/help.php:498
|
3243 |
#, php-format
|
3244 |
msgid ""
|
3245 |
"<code>%uri</code>: the URI which was given in order to access the page "
|
3246 |
"(REQUEST_URI)."
|
3247 |
msgstr "<code>%uri</code> : l'URI donnée pour accéder à la page (REQUEST_URI)."
|
3248 |
|
3249 |
+
#: lib/help.php:499
|
3250 |
msgid "<code>%referrer</code>: the referrer (HTTP_REFERER), if any."
|
3251 |
msgstr "<code>%referrer</code> : le referrer (HTTP_REFERER), s'il existe."
|
3252 |
|
3253 |
+
#: lib/help.php:500
|
3254 |
#, php-format
|
3255 |
msgid "<code>%ua</code>: the user-agent (HTTP_USER_AGENT), if any."
|
3256 |
msgstr ""
|
3257 |
"<code>%ua</code> : l'en-tête User-Agent (HTTP_USER_AGENT), s'il existe."
|
3258 |
|
3259 |
+
#: lib/help.php:501
|
3260 |
#, php-format
|
3261 |
msgid ""
|
3262 |
"<code>%forward</code>: HTTP_X_FORWARDED_FOR, if any. If you are behind a "
|
3266 |
"votre serveur est derrière un CDN ou un proxy, cette variable retournera "
|
3267 |
"l'adresse réelle du client."
|
3268 |
|
3269 |
+
#: lib/help.php:502
|
3270 |
msgid "<code>%host</code>: the requested host (HTTP_HOST), if any."
|
3271 |
msgstr ""
|
3272 |
"<code>%host</code> : l'en-tête Host de la requête courante (HTTP_HOST), si "
|
3273 |
"elle existe."
|
3274 |
|
3275 |
+
#: lib/help.php:504
|
3276 |
msgid ""
|
3277 |
"Additionally, you can include any of the following characters: <code>\"</"
|
3278 |
"code>, <code>%</code>, <code>[</code>, <code>]</code>, <code>space</code> "
|
3282 |
"%</code>, <code>[</code>, <code>]</code>, <code>espace</code> et toute "
|
3283 |
"lettre minuscule <code>a-z</code>."
|
3284 |
|
3285 |
+
#: lib/help.php:515
|
3286 |
msgid ""
|
3287 |
"Your website can run NinjaFirewall and be compliant with the General Data "
|
3288 |
"Protection Regulation (GDPR). For more info, please visit our blog:"
|
3290 |
"NinjaFirewall est conforme à la réglementation générale sur la protection "
|
3291 |
"des données (RGPD). Pour plus d'informations, veuillez visiter notre blog :"
|
3292 |
|
3293 |
+
#: lib/help.php:529 lib/security_rules.php:47
|
3294 |
msgid "Rules Updates"
|
3295 |
msgstr "Mise à Jour des Règles"
|
3296 |
|
3297 |
+
#: lib/help.php:531
|
3298 |
msgid ""
|
3299 |
"To get the most efficient protection, you can ask NinjaFirewall to "
|
3300 |
"automatically update its security rules."
|
3302 |
"Pour bénéficier de la protection la plus efficace, vous pouvez demander à "
|
3303 |
"NinjaFirewall de mettre à jour ses règles de sécurité automatiquement."
|
3304 |
|
3305 |
+
#: lib/help.php:533
|
3306 |
msgid ""
|
3307 |
"Each time a new vulnerability is found in WordPress or one of its plugins/"
|
3308 |
"themes, a new set of security rules will be made available to protect "
|
3312 |
"extensions ou ses thèmes, un nouvel ensemble de règles de sécurité est "
|
3313 |
"disponible pour protéger contre cette vulnérabilité si nécessaire."
|
3314 |
|
3315 |
+
#: lib/help.php:535
|
3316 |
msgid ""
|
3317 |
"Only security rules will be downloaded. If a new version of NinjaFirewall "
|
3318 |
"(including new files, options and features) was available, it would have to "
|
3323 |
"jour depuis la page des \"Extensions\" de votre tableau de bord, comme "
|
3324 |
"d'habitude."
|
3325 |
|
3326 |
+
#: lib/help.php:537
|
3327 |
msgid ""
|
3328 |
"We recommend to enable this feature, as it is the <strong>best way to keep "
|
3329 |
"your WordPress secure</strong> against new vulnerabilities."
|
3332 |
"<strong>meilleure façon de garder votre WordPress protégé</strong> contre "
|
3333 |
"les dernières vulnérabilités."
|
3334 |
|
3335 |
+
#: lib/help.php:542 lib/security_rules.php:48
|
3336 |
msgid "Rules Editor"
|
3337 |
msgstr "Éditeur de Règles"
|
3338 |
|
3339 |
+
#: lib/help.php:544
|
3340 |
msgid ""
|
3341 |
"Besides the \"Firewall Policies\", NinjaFirewall includes also a large set "
|
3342 |
"of built-in rules used to protect your blog against the most common "
|
3353 |
"règles, vous pouvez utiliser l’Éditeur de règles ci-dessous pour les "
|
3354 |
"désactiver individuellement :"
|
3355 |
|
3356 |
+
#: lib/help.php:546
|
3357 |
msgid ""
|
3358 |
"Check your firewall log and find the rule ID you want to disable (it is "
|
3359 |
"displayed in the <code>RULE</code> column)."
|
3361 |
"Consultez le journal du pare-feu afin d'y trouver l'ID de la règle que vous "
|
3362 |
"souhaitez désactiver (il est affiché dans la colonne <code>RULE</code>)."
|
3363 |
|
3364 |
+
#: lib/help.php:547
|
3365 |
msgid ""
|
3366 |
"Select its ID from the enabled rules list below and click the \"Disable it\" "
|
3367 |
"button."
|
3369 |
"Sélectionnez son ID dans la liste des règles ci-dessous et cliquez sur le "
|
3370 |
"bouton \"Désactiver\"."
|
3371 |
|
3372 |
+
#: lib/help.php:549
|
3373 |
msgid ""
|
3374 |
"Note: if the <code>RULE</code> column from your log shows a hyphen <code>-</"
|
3375 |
"code> instead of a number, that means that the rule can be changed in the "
|
3392 |
msgid "Error: wrong parameter value (%s)."
|
3393 |
msgstr "Erreur : Mauvais paramètre (%s)."
|
3394 |
|
3395 |
+
#: lib/install.php:105 lib/install.php:199 lib/install.php:220
|
3396 |
#, php-format
|
3397 |
msgid ""
|
3398 |
"Error: The following file is not writable, please change its permissions: %s"
|
3400 |
"Erreur : Le fichier suivant n'est pas accessible en écriture. Veuillez "
|
3401 |
"modifier ses autorisations : %s"
|
3402 |
|
3403 |
+
#: lib/install.php:133
|
3404 |
#, php-format
|
3405 |
msgid ""
|
3406 |
"NinjaFirewall detected that the requested changes seemed to crash your blog. "
|
3409 |
"NinjaFirewall a détecté que les modifications demandées semblaient planter "
|
3410 |
"votre blog. %s"
|
3411 |
|
3412 |
+
#: lib/install.php:134
|
3413 |
msgid ""
|
3414 |
"Changes have been undone. You may need to modify your selection and try "
|
3415 |
"again."
|
3417 |
"Les modifications ont été annulées. Vous devriez peut-être modifier votre "
|
3418 |
"sélection et réessayer."
|
3419 |
|
3420 |
+
#: lib/install.php:145
|
3421 |
#, php-format
|
3422 |
msgid "The website front-end returned: HTTP %s %s."
|
3423 |
msgstr "La page d'accueil du site a retourné : HTTP %s %s."
|
3424 |
|
3425 |
+
#: lib/install.php:155
|
3426 |
+
msgid "The website front-end did not return the expected page."
|
3427 |
+
msgstr "Le site n'a pas retourné la page attendue."
|
3428 |
+
|
3429 |
+
#: lib/install.php:164
|
3430 |
#, php-format
|
3431 |
msgid "The website front-end returned a fatal error: %s."
|
3432 |
msgstr "La page d'accueil du site a retourné une erreur fatale : %s."
|
3433 |
|
3434 |
+
#: lib/install.php:263 lib/install.php:288 lib/install.php:313
|
3435 |
+
#: lib/install.php:334
|
3436 |
msgid "File is not writable"
|
3437 |
msgstr "Le fichier n'est pas accessible en écriture"
|
3438 |
|
3439 |
+
#: lib/install_default.php:178
|
3440 |
msgid ""
|
3441 |
"Error: The installer cannot download the security rules from wordpress.org "
|
3442 |
"website."
|
3444 |
"Erreur : Impossible de télécharger les règles de sécurité depuis le site de "
|
3445 |
"wordpress.org."
|
3446 |
|
3447 |
+
#: lib/install_default.php:179
|
3448 |
msgid ""
|
3449 |
"The server may be temporarily down or you may have network connectivity "
|
3450 |
"problems? Please try again in a few minutes."
|
3453 |
"problèmes de connectivité réseau ? Veuillez ré-essayer d'ici quelques "
|
3454 |
"minutes."
|
3455 |
|
3456 |
+
#: lib/install_default.php:180
|
3457 |
msgid ""
|
3458 |
"NinjaFirewall downloads its rules over an HTTPS secure connection. Maybe "
|
3459 |
"your server does not support SSL? You can force NinjaFirewall to use a non-"
|
3466 |
"connexion non-sécurisée (HTTP) en ajoutant la ligne suivante dans votre "
|
3467 |
"fichier <strong>wp-config.php</strong> :"
|
3468 |
|
3469 |
+
#: lib/install_default.php:255
|
3470 |
#, php-format
|
3471 |
msgid ""
|
3472 |
"NinjaFirewall cannot create its <code>nfwlog/</code>log and cache folder; "
|
4216 |
|
4217 |
#: lib/monitoring_file_check.php:768 lib/monitoring_file_check.php:770
|
4218 |
#: lib/monitoring_file_check.php:790 lib/monitoring_file_check.php:792
|
4219 |
+
#: lib/security_rules_update.php:572 lib/security_rules_update.php:574
|
4220 |
#: lib/utils.php:225 lib/utils.php:311 lib/utils.php:435 lib/utils.php:1035
|
4221 |
#: lib/utils.php:1213 lib/utils.php:1492
|
4222 |
msgid "Blog:"
|
4223 |
msgstr "Blog :"
|
4224 |
|
4225 |
#: lib/monitoring_file_check.php:772 lib/monitoring_file_check.php:794
|
4226 |
+
#: lib/security_rules_update.php:577
|
4227 |
#, php-format
|
4228 |
msgid "Date: %s"
|
4229 |
msgstr "Date : %s"
|
4318 |
msgid "Save Network options"
|
4319 |
msgstr "Sauvegarder les options"
|
4320 |
|
4321 |
+
#: lib/security_rules.php:44 lib/security_rules_update.php:578
|
4322 |
#: ninjafirewall.php:846
|
4323 |
msgid "Security Rules"
|
4324 |
msgstr "Règles de Sécurité"
|
4430 |
msgid "Security rules have been updated."
|
4431 |
msgstr "Les règles de sécurité ont été mises à jour."
|
4432 |
|
4433 |
+
#: lib/security_rules_update.php:91 lib/security_rules_update.php:454
|
4434 |
msgid "No security rules update available."
|
4435 |
msgstr "Aucune mise à jour des règles de sécurité disponible."
|
4436 |
|
4535 |
"Erreur : Le fichier des règles téléchargé semblent corrompu (unserialized "
|
4536 |
"rules seem corrupted)."
|
4537 |
|
4538 |
+
#: lib/security_rules_update.php:397
|
4539 |
#, php-format
|
4540 |
msgid "Security rules updated to version %s."
|
4541 |
msgstr "Les règles de sécurité ont été mises à jour vers la version %s."
|
4542 |
|
4543 |
+
#: lib/security_rules_update.php:443
|
4544 |
msgid "Error: Unable to retrieve the new rules version."
|
4545 |
msgstr "Erreur : Impossible de récupérer la nouvelle version des règles."
|
4546 |
|
4547 |
+
#: lib/security_rules_update.php:461
|
4548 |
#, php-format
|
4549 |
msgid "Error: Server returned a %s HTTP error code (#1)."
|
4550 |
msgstr "Erreur : Le serveur a retourné un code d'erreur HTTP %s (#1)."
|
4551 |
|
4552 |
+
#: lib/security_rules_update.php:468 lib/security_rules_update.php:534
|
4553 |
msgid "Error: Unable to connect to the remote server"
|
4554 |
msgstr "Erreur : Impossible de se connecter au serveur distant"
|
4555 |
|
4556 |
+
#: lib/security_rules_update.php:498
|
4557 |
#, php-format
|
4558 |
msgid "Error: The new rules versions do not match (%s != %s)."
|
4559 |
msgstr ""
|
4560 |
"Erreur : La versions des nouvelles règles ne correspond pas (%s != %s)."
|
4561 |
|
4562 |
+
#: lib/security_rules_update.php:512
|
4563 |
#, php-format
|
4564 |
msgid ""
|
4565 |
"Error: The new rules %s digital signature is not correct. Aborting update, "
|
4568 |
"Erreur : La signature numérique des nouvelles règles %s n'est pas correcte. "
|
4569 |
"Annulation de la mise à jour, les règles ont peut-être été altérées."
|
4570 |
|
4571 |
+
#: lib/security_rules_update.php:527
|
4572 |
#, php-format
|
4573 |
msgid "Error: Server returned a %s HTTP error code (#2)."
|
4574 |
msgstr "Erreur : Le serveur a retourné un code d'erreur HTTP %s (#2)."
|
4575 |
|
4576 |
+
#: lib/security_rules_update.php:569
|
4577 |
msgid "[NinjaFirewall] Security rules update"
|
4578 |
msgstr "[NinjaFirewall] Mise à jour des règles de sécurité"
|
4579 |
|
4580 |
+
#: lib/security_rules_update.php:570
|
4581 |
msgid "NinjaFirewall security rules have been updated:"
|
4582 |
msgstr "Les règles de sécurité de NinjaFirewall ont été mises à jour :"
|
4583 |
|
4584 |
+
#: lib/security_rules_update.php:576
|
4585 |
msgid "Rules version:"
|
4586 |
msgstr "Version des règles :"
|
4587 |
|
4588 |
+
#: lib/security_rules_update.php:578
|
4589 |
#, php-format
|
4590 |
msgid "This notification can be turned off from NinjaFirewall \"%s\" page."
|
4591 |
msgstr ""
|
languages/ninjafirewall.pot
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Stable (latest release)\n"
|
5 |
-
"POT-Creation-Date: 2020-
|
6 |
"PO-Revision-Date: 2018-04-05 22:52+0700\n"
|
7 |
"Last-Translator: NinTechNet <contact@nintechnet.com>\n"
|
8 |
"Language-Team: \n"
|
@@ -10,7 +10,7 @@ msgstr ""
|
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
-
"X-Generator: Poedit 2.2
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
@@ -47,11 +47,11 @@ msgid ""
|
|
47 |
"menu instead:"
|
48 |
msgstr ""
|
49 |
|
50 |
-
#: lib/custom_plugin.php:
|
51 |
msgid "Support forum:"
|
52 |
msgstr ""
|
53 |
|
54 |
-
#: lib/custom_plugin.php:
|
55 |
#, php-format
|
56 |
msgid ""
|
57 |
"Need more security? Check out our supercharged NinjaFirewall (WP+ Edition): "
|
@@ -293,12 +293,12 @@ msgid ""
|
|
293 |
"configuration</a>."
|
294 |
msgstr ""
|
295 |
|
296 |
-
#: lib/dashboard.php:320 lib/help.php:
|
297 |
#: lib/wpplus.php:170
|
298 |
msgid "Centralized Logging"
|
299 |
msgstr ""
|
300 |
|
301 |
-
#: lib/dashboard.php:324 lib/security_rules_update.php:
|
302 |
#, php-format
|
303 |
msgid "Error: %s"
|
304 |
msgstr ""
|
@@ -383,7 +383,7 @@ msgid ""
|
|
383 |
"themes:"
|
384 |
msgstr ""
|
385 |
|
386 |
-
#: lib/dashboard_about.php:31 lib/help.php:
|
387 |
msgid "GDPR Compliance"
|
388 |
msgstr ""
|
389 |
|
@@ -453,7 +453,7 @@ msgstr ""
|
|
453 |
msgid "Select monthly stats to view..."
|
454 |
msgstr ""
|
455 |
|
456 |
-
#: lib/event_notifications.php:34 lib/help.php:
|
457 |
msgid "Event Notifications"
|
458 |
msgstr ""
|
459 |
|
@@ -695,70 +695,70 @@ msgstr ""
|
|
695 |
msgid "Blocked brute-force attacks:"
|
696 |
msgstr ""
|
697 |
|
698 |
-
#: lib/event_notifications.php:503 lib/event_updates.php:
|
699 |
msgid ""
|
700 |
"This notification can be turned off from NinjaFirewall \"Event Notifications"
|
701 |
"\" page."
|
702 |
msgstr ""
|
703 |
|
704 |
-
#: lib/event_updates.php:
|
705 |
msgid "[NinjaFirewall] Warning: Security update available"
|
706 |
msgstr ""
|
707 |
|
708 |
-
#: lib/event_updates.php:
|
709 |
msgid ""
|
710 |
"NinjaFirewall has detected that there are security updates available for "
|
711 |
"your website:"
|
712 |
msgstr ""
|
713 |
|
714 |
-
#: lib/event_updates.php:
|
715 |
#: lib/utils.php:440 lib/utils.php:1036 lib/utils.php:1224 lib/utils.php:1496
|
716 |
msgid "Date:"
|
717 |
msgstr ""
|
718 |
|
719 |
-
#: lib/event_updates.php:
|
720 |
#, php-format
|
721 |
msgid "Blog: %s"
|
722 |
msgstr ""
|
723 |
|
724 |
-
#: lib/event_updates.php:
|
725 |
-
#: lib/event_updates.php:
|
726 |
#, php-format
|
727 |
msgid "Your version: %s"
|
728 |
msgstr ""
|
729 |
|
730 |
-
#: lib/event_updates.php:
|
731 |
-
#: lib/event_updates.php:
|
732 |
#, php-format
|
733 |
msgid "New version: %s"
|
734 |
msgstr ""
|
735 |
|
736 |
-
#: lib/event_updates.php:
|
737 |
-
#: lib/event_updates.php:
|
738 |
msgid "Severity: This is an important security update"
|
739 |
msgstr ""
|
740 |
|
741 |
-
#: lib/event_updates.php:
|
742 |
-
#: lib/event_updates.php:
|
743 |
msgid "Severity: **This is a critical security update**"
|
744 |
msgstr ""
|
745 |
|
746 |
-
#: lib/event_updates.php:
|
747 |
-
#: lib/event_updates.php:
|
748 |
msgid "Type: Security fix"
|
749 |
msgstr ""
|
750 |
|
751 |
-
#: lib/event_updates.php:
|
752 |
#, php-format
|
753 |
msgid "Plugin: %s"
|
754 |
msgstr ""
|
755 |
|
756 |
-
#: lib/event_updates.php:
|
757 |
#, php-format
|
758 |
msgid "Theme: %s"
|
759 |
msgstr ""
|
760 |
|
761 |
-
#: lib/event_updates.php:
|
762 |
msgid "Don't leave your blog at risk, make sure to update as soon as possible."
|
763 |
msgstr ""
|
764 |
|
@@ -971,48 +971,48 @@ msgstr ""
|
|
971 |
msgid "There are no backup available yet, check back later."
|
972 |
msgstr ""
|
973 |
|
974 |
-
#: lib/firewall_options.php:
|
975 |
#, php-format
|
976 |
msgid "Uploaded file is either corrupted or its format is not supported (#%s)"
|
977 |
msgstr ""
|
978 |
|
979 |
-
#: lib/firewall_options.php:
|
980 |
msgid "[NinjaFirewall] Alert: Firewall is disabled"
|
981 |
msgstr ""
|
982 |
|
983 |
-
#: lib/firewall_options.php:
|
984 |
#: ninjafirewall.php:232 ninjafirewall.php:234
|
985 |
msgid "-Blog :"
|
986 |
msgstr ""
|
987 |
|
988 |
-
#: lib/firewall_options.php:
|
989 |
msgid "Someone disabled NinjaFirewall from your WordPress admin dashboard:"
|
990 |
msgstr ""
|
991 |
|
992 |
-
#: lib/firewall_options.php:
|
993 |
msgid ""
|
994 |
"NinjaFirewall is disabled because someone enabled debugging mode from your "
|
995 |
"WordPress admin dashboard:"
|
996 |
msgstr ""
|
997 |
|
998 |
-
#: lib/firewall_options.php:
|
999 |
msgid "[NinjaFirewall] Alert: Firewall override settings"
|
1000 |
msgstr ""
|
1001 |
|
1002 |
-
#: lib/firewall_options.php:
|
1003 |
msgid ""
|
1004 |
"Someone imported a new configuration which overrode the firewall settings:"
|
1005 |
msgstr ""
|
1006 |
|
1007 |
-
#: lib/firewall_options.php:
|
1008 |
msgid "-User :"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
-
#: lib/firewall_options.php:
|
1012 |
msgid "-IP :"
|
1013 |
msgstr ""
|
1014 |
|
1015 |
-
#: lib/firewall_options.php:
|
1016 |
msgid "-Date :"
|
1017 |
msgstr ""
|
1018 |
|
@@ -1477,57 +1477,61 @@ msgstr ""
|
|
1477 |
msgid "Set %s (Chrome, Opera and Firefox browsers)"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
-
#: lib/firewall_policies.php:
|
1481 |
msgid ""
|
1482 |
"Block PHP built-in wrappers in <code>GET</code>, <code>POST</code>, "
|
1483 |
"<code>HTTP_USER_AGENT</code>, <code>HTTP_REFERER</code> and cookies"
|
1484 |
msgstr ""
|
1485 |
|
1486 |
-
#: lib/firewall_policies.php:
|
1487 |
msgid "Block serialized PHP objects in the following global variables"
|
1488 |
msgstr ""
|
1489 |
|
1490 |
-
#: lib/firewall_policies.php:
|
|
|
|
|
|
|
|
|
1491 |
msgid "Hide PHP notice and error messages"
|
1492 |
msgstr ""
|
1493 |
|
1494 |
-
#: lib/firewall_policies.php:
|
1495 |
msgid "Sanitise <code>PHP_SELF</code>"
|
1496 |
msgstr ""
|
1497 |
|
1498 |
-
#: lib/firewall_policies.php:
|
1499 |
msgid "Sanitise <code>PATH_TRANSLATED</code>"
|
1500 |
msgstr ""
|
1501 |
|
1502 |
-
#: lib/firewall_policies.php:
|
1503 |
msgid "Sanitise <code>PATH_INFO</code>"
|
1504 |
msgstr ""
|
1505 |
|
1506 |
-
#: lib/firewall_policies.php:
|
1507 |
msgid "This option is not compatible with your actual configuration."
|
1508 |
msgstr ""
|
1509 |
|
1510 |
-
#: lib/firewall_policies.php:
|
1511 |
msgid "Various"
|
1512 |
msgstr ""
|
1513 |
|
1514 |
-
#: lib/firewall_policies.php:
|
1515 |
msgid "Block the <code>DOCUMENT_ROOT</code> server variable in HTTP request"
|
1516 |
msgstr ""
|
1517 |
|
1518 |
-
#: lib/firewall_policies.php:
|
1519 |
msgid "Block ASCII character 0x00 (NULL byte)"
|
1520 |
msgstr ""
|
1521 |
|
1522 |
-
#: lib/firewall_policies.php:
|
1523 |
msgid "Block ASCII control characters 1 to 8 and 14 to 31"
|
1524 |
msgstr ""
|
1525 |
|
1526 |
-
#: lib/firewall_policies.php:
|
1527 |
msgid "Save Firewall Policies"
|
1528 |
msgstr ""
|
1529 |
|
1530 |
-
#: lib/firewall_policies.php:
|
1531 |
msgid "Restore Default Values"
|
1532 |
msgstr ""
|
1533 |
|
@@ -2156,30 +2160,39 @@ msgid ""
|
|
2156 |
msgstr ""
|
2157 |
|
2158 |
#: lib/help.php:293
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2159 |
msgid ""
|
2160 |
"This option lets you hide errors returned by your scripts. Such errors can "
|
2161 |
"leak sensitive informations which can be exploited by hackers."
|
2162 |
msgstr ""
|
2163 |
|
2164 |
-
#: lib/help.php:
|
2165 |
msgid ""
|
2166 |
"Sanitise <code>PHP_SELF</code>, <code>PATH_TRANSLATED</code>, "
|
2167 |
"<code>PATH_INFO</code>"
|
2168 |
msgstr ""
|
2169 |
|
2170 |
-
#: lib/help.php:
|
2171 |
msgid ""
|
2172 |
"This option can sanitise any dangerous characters found in those 3 server "
|
2173 |
"variables to prevent various XSS and database injection attempts."
|
2174 |
msgstr ""
|
2175 |
|
2176 |
-
#: lib/help.php:
|
2177 |
#, php-format
|
2178 |
msgid ""
|
2179 |
"Block the <code>DOCUMENT_ROOT</code> server variable (%s) in HTTP requests"
|
2180 |
msgstr ""
|
2181 |
|
2182 |
-
#: lib/help.php:
|
2183 |
msgid ""
|
2184 |
"This option will block scripts attempting to pass the <code>DOCUMENT_ROOT</"
|
2185 |
"code> server variable in a <code>GET</code> or <code>POST</code> request. "
|
@@ -2187,7 +2200,7 @@ msgid ""
|
|
2187 |
"legitimate programs do not."
|
2188 |
msgstr ""
|
2189 |
|
2190 |
-
#: lib/help.php:
|
2191 |
msgid ""
|
2192 |
"This option will reject any <code>GET</code> or <code>POST</code> request, "
|
2193 |
"<code>HTTP_USER_AGENT</code>, <code>REQUEST_URI</code>, <code>PHP_SELF</"
|
@@ -2196,24 +2209,24 @@ msgid ""
|
|
2196 |
"dangerous and should always be rejected."
|
2197 |
msgstr ""
|
2198 |
|
2199 |
-
#: lib/help.php:
|
2200 |
msgid ""
|
2201 |
"This option will reject any <code>GET</code> or <code>POST</code> request, "
|
2202 |
"<code>HTTP_USER_AGENT</code>, <code>HTTP_REFERER</code> variables containing "
|
2203 |
"ASCII characters from 1 to 8 and 14 to 31."
|
2204 |
msgstr ""
|
2205 |
|
2206 |
-
#: lib/help.php:
|
2207 |
msgid "File Check"
|
2208 |
msgstr ""
|
2209 |
|
2210 |
-
#: lib/help.php:
|
2211 |
msgid ""
|
2212 |
"File Check lets you perform file integrity monitoring upon request or on a "
|
2213 |
"specific interval."
|
2214 |
msgstr ""
|
2215 |
|
2216 |
-
#: lib/help.php:
|
2217 |
msgid ""
|
2218 |
"You need to create a snapshot of all your files and then, at a later time, "
|
2219 |
"you can scan your system to compare it with the previous snapshot. Any "
|
@@ -2221,72 +2234,72 @@ msgid ""
|
|
2221 |
"file ownership, timestamp as well as file creation and deletion."
|
2222 |
msgstr ""
|
2223 |
|
2224 |
-
#: lib/help.php:
|
2225 |
#, php-format
|
2226 |
msgid ""
|
2227 |
"Create a snapshot of all files stored in that directory: by default, the "
|
2228 |
"directory is set to WordPress <code>ABSPATH</code> (%s)"
|
2229 |
msgstr ""
|
2230 |
|
2231 |
-
#: lib/help.php:
|
2232 |
msgid ""
|
2233 |
"Exclude the following files/folders: you can enter a directory or a file "
|
2234 |
"name (e.g., <code>/foo/bar/</code>), or a part of it (e.g., <code>foo</"
|
2235 |
"code>). Or you can exclude a file extension (e.g., <code>.css</code>)."
|
2236 |
msgstr ""
|
2237 |
|
2238 |
-
#: lib/help.php:
|
2239 |
msgid ""
|
2240 |
"Multiple values must be comma-separated (e.g., <code>/foo/bar/,.css,.png</"
|
2241 |
"code>)."
|
2242 |
msgstr ""
|
2243 |
|
2244 |
-
#: lib/help.php:
|
2245 |
msgid ""
|
2246 |
"Do not follow symbolic links: by default, NinjaFirewall will not follow "
|
2247 |
"symbolic links."
|
2248 |
msgstr ""
|
2249 |
|
2250 |
-
#: lib/help.php:
|
2251 |
msgid "Scheduled scans"
|
2252 |
msgstr ""
|
2253 |
|
2254 |
-
#: lib/help.php:
|
2255 |
msgid ""
|
2256 |
"NinjaFirewall can scan your system on a specific interval (hourly, "
|
2257 |
"twicedaily or daily)."
|
2258 |
msgstr ""
|
2259 |
|
2260 |
-
#: lib/help.php:
|
2261 |
msgid ""
|
2262 |
"It can either send you a scan report only if changes are detected, or always "
|
2263 |
"send you one after each scan."
|
2264 |
msgstr ""
|
2265 |
|
2266 |
-
#: lib/help.php:
|
2267 |
msgid ""
|
2268 |
"Reports will be sent to the contact email address defined in the \"Event "
|
2269 |
"Notifications\" menu."
|
2270 |
msgstr ""
|
2271 |
|
2272 |
-
#: lib/help.php:
|
2273 |
#, php-format
|
2274 |
msgid ""
|
2275 |
"Scheduled scans rely on <a href=\"%s\">WordPress pseudo cron</a> which works "
|
2276 |
"only if your site gets sufficient traffic."
|
2277 |
msgstr ""
|
2278 |
|
2279 |
-
#: lib/help.php:
|
2280 |
msgid "File Guard"
|
2281 |
msgstr ""
|
2282 |
|
2283 |
-
#: lib/help.php:
|
2284 |
msgid ""
|
2285 |
"File Guard can detect, in real-time, any access to a PHP file that was "
|
2286 |
"recently modified or created, and alert you about this."
|
2287 |
msgstr ""
|
2288 |
|
2289 |
-
#: lib/help.php:
|
2290 |
msgid ""
|
2291 |
"If a hacker uploaded a shell script to your site (or injected a backdoor "
|
2292 |
"into an already existing file) and tried to directly access that file using "
|
@@ -2297,7 +2310,7 @@ msgid ""
|
|
2297 |
"Notifications\" menu."
|
2298 |
msgstr ""
|
2299 |
|
2300 |
-
#: lib/help.php:
|
2301 |
msgid ""
|
2302 |
"If you do not want to monitor a folder, you can exclude its full path or a "
|
2303 |
"part of it (e.g., <code>/var/www/public_html/cache/</code> or <code>/cache/</"
|
@@ -2306,13 +2319,13 @@ msgid ""
|
|
2306 |
"will ignore it."
|
2307 |
msgstr ""
|
2308 |
|
2309 |
-
#: lib/help.php:
|
2310 |
msgid ""
|
2311 |
"Multiple values must be comma-separated (e.g., <code>/foo/bar/,/cache/</"
|
2312 |
"code>)."
|
2313 |
msgstr ""
|
2314 |
|
2315 |
-
#: lib/help.php:
|
2316 |
msgid ""
|
2317 |
"File Guard real-time detection is a totally unique feature, because "
|
2318 |
"NinjaFirewall is the only plugin for WordPress that can hook HTTP requests "
|
@@ -2320,11 +2333,11 @@ msgid ""
|
|
2320 |
"package (third-party software, shell script, backdoor etc)."
|
2321 |
msgstr ""
|
2322 |
|
2323 |
-
#: lib/help.php:
|
2324 |
msgid "Network"
|
2325 |
msgstr ""
|
2326 |
|
2327 |
-
#: lib/help.php:
|
2328 |
msgid ""
|
2329 |
"Even if NinjaFirewall administration menu is only available to the Super "
|
2330 |
"Admin (from the main site), you can still display its status to all sites in "
|
@@ -2332,20 +2345,20 @@ msgid ""
|
|
2332 |
"It will be visible only to the administrators of those sites."
|
2333 |
msgstr ""
|
2334 |
|
2335 |
-
#: lib/help.php:
|
2336 |
msgid ""
|
2337 |
"It is recommended to enable this feature as it is the only way to know "
|
2338 |
"whether the sites in your network are protected and if NinjaFirewall "
|
2339 |
"installation was successful."
|
2340 |
msgstr ""
|
2341 |
|
2342 |
-
#: lib/help.php:
|
2343 |
msgid ""
|
2344 |
"Note that when it is disabled, the icon still remains visible to you, the "
|
2345 |
"Super Admin."
|
2346 |
msgstr ""
|
2347 |
|
2348 |
-
#: lib/help.php:
|
2349 |
msgid ""
|
2350 |
"NinjaFirewall can alert you by email on specific events triggered within "
|
2351 |
"your blog. They include installations, updates, activations etc, as well as "
|
@@ -2356,11 +2369,11 @@ msgid ""
|
|
2356 |
"theme in order to take full control of your website."
|
2357 |
msgstr ""
|
2358 |
|
2359 |
-
#: lib/help.php:
|
2360 |
msgid "Login Protection"
|
2361 |
msgstr ""
|
2362 |
|
2363 |
-
#: lib/help.php:
|
2364 |
msgid ""
|
2365 |
"By processing incoming HTTP requests before your blog and any of its "
|
2366 |
"plugins, NinjaFirewall is the only plugin for WordPress able to protect it "
|
@@ -2368,18 +2381,18 @@ msgid ""
|
|
2368 |
"from several thousands of different IPs."
|
2369 |
msgstr ""
|
2370 |
|
2371 |
-
#: lib/help.php:
|
2372 |
msgid ""
|
2373 |
"You can choose two different types of protection: a password or a captcha. "
|
2374 |
"You can enable the protection only if an attack is detected or to keep it "
|
2375 |
"always activated."
|
2376 |
msgstr ""
|
2377 |
|
2378 |
-
#: lib/help.php:
|
2379 |
msgid "Yes, if under attack:"
|
2380 |
msgstr ""
|
2381 |
|
2382 |
-
#: lib/help.php:
|
2383 |
msgid ""
|
2384 |
"The protection will be triggered when too many login attempts are detected, "
|
2385 |
"regardless of the offending IP. It blocks the attack instantly and prevents "
|
@@ -2388,92 +2401,92 @@ msgid ""
|
|
2388 |
"combination or the captcha code."
|
2389 |
msgstr ""
|
2390 |
|
2391 |
-
#: lib/help.php:
|
2392 |
msgid "Always ON:"
|
2393 |
msgstr ""
|
2394 |
|
2395 |
-
#: lib/help.php:
|
2396 |
msgid ""
|
2397 |
"NinjaFirewall will always enforce the HTTP authentication or captcha "
|
2398 |
"implementation each time you access the login page."
|
2399 |
msgstr ""
|
2400 |
|
2401 |
-
#: lib/help.php:
|
2402 |
msgid "Type of protection:"
|
2403 |
msgstr ""
|
2404 |
|
2405 |
-
#: lib/help.php:
|
2406 |
msgid ""
|
2407 |
"<b>Password:</b> It password-protects the login page. NinjaFirewall uses its "
|
2408 |
"own very fast authentication scheme and it is compatible with any HTTP "
|
2409 |
"server (Apache, Nginx, Lighttpd etc)."
|
2410 |
msgstr ""
|
2411 |
|
2412 |
-
#: lib/help.php:
|
2413 |
msgid "<b>Captcha:</b> It will display a 5-character captcha code."
|
2414 |
msgstr ""
|
2415 |
|
2416 |
-
#: lib/help.php:
|
2417 |
msgid "Bot protection:"
|
2418 |
msgstr ""
|
2419 |
|
2420 |
-
#: lib/help.php:
|
2421 |
msgid ""
|
2422 |
"NinjaFirewall will attempt to block bots and scripts immediately, i.e., even "
|
2423 |
"before they start a brute-force attack."
|
2424 |
msgstr ""
|
2425 |
|
2426 |
-
#: lib/help.php:
|
2427 |
msgid "AUTH log"
|
2428 |
msgstr ""
|
2429 |
|
2430 |
-
#: lib/help.php:
|
2431 |
msgid ""
|
2432 |
"NinjaFirewall can write to the server Authentication log when the brute-"
|
2433 |
"force protection is triggered. This can be useful to the system "
|
2434 |
"administrator for monitoring purposes or banning IPs at the server level."
|
2435 |
msgstr ""
|
2436 |
|
2437 |
-
#: lib/help.php:
|
2438 |
msgid ""
|
2439 |
"If you have a shared hosting account, keep this option disabled as you do "
|
2440 |
"not have any access to the server's logs."
|
2441 |
msgstr ""
|
2442 |
|
2443 |
-
#: lib/help.php:
|
2444 |
msgid ""
|
2445 |
"On Debian-based systems, the log is located in <code>/var/log/auth.log</"
|
2446 |
"code>, and on Red Hat-based systems in <code>/var/log/secure</code>. The "
|
2447 |
"logline uses the following format:"
|
2448 |
msgstr ""
|
2449 |
|
2450 |
-
#: lib/help.php:
|
2451 |
msgid "AA: the process ID (PID)."
|
2452 |
msgstr ""
|
2453 |
|
2454 |
-
#: lib/help.php:
|
2455 |
msgid "BB: the user IPv4 or IPv6 address."
|
2456 |
msgstr ""
|
2457 |
|
2458 |
-
#: lib/help.php:
|
2459 |
msgid "CC: the blog (sub-)domain name."
|
2460 |
msgstr ""
|
2461 |
|
2462 |
-
#: lib/help.php:
|
2463 |
msgid ""
|
2464 |
"DD: the target: it can be either <code>wp-login.php</code> or <code>XML-RPC "
|
2465 |
"API</code>."
|
2466 |
msgstr ""
|
2467 |
|
2468 |
-
#: lib/help.php:
|
2469 |
msgid "EE: the time, in minutes, the protection will remain active."
|
2470 |
msgstr ""
|
2471 |
|
2472 |
-
#: lib/help.php:
|
2473 |
msgid "Sample loglines:"
|
2474 |
msgstr ""
|
2475 |
|
2476 |
-
#: lib/help.php:
|
2477 |
#, php-format
|
2478 |
msgid ""
|
2479 |
"Be careful if you are behind a load balancer, reverse-proxy or CDN because "
|
@@ -2484,54 +2497,54 @@ msgid ""
|
|
2484 |
"otherwise you will likely block legitimate users."
|
2485 |
msgstr ""
|
2486 |
|
2487 |
-
#: lib/help.php:
|
2488 |
msgid "Firewall Log"
|
2489 |
msgstr ""
|
2490 |
|
2491 |
-
#: lib/help.php:
|
2492 |
msgid ""
|
2493 |
"The firewall log displays blocked and sanitised requests as well as some "
|
2494 |
"useful information. It has 6 columns:"
|
2495 |
msgstr ""
|
2496 |
|
2497 |
-
#: lib/help.php:
|
2498 |
msgid "DATE : date and time of the incident."
|
2499 |
msgstr ""
|
2500 |
|
2501 |
-
#: lib/help.php:
|
2502 |
msgid ""
|
2503 |
"INCIDENT : unique incident number/ID as it was displayed to the blocked user."
|
2504 |
msgstr ""
|
2505 |
|
2506 |
-
#: lib/help.php:
|
2507 |
msgid ""
|
2508 |
"LEVEL : level of severity (<code>CRITICAL</code>, <code>HIGH</code> or "
|
2509 |
"<code>MEDIUM</code>), information (<code>INFO</code>, <code>UPLOAD</code>) "
|
2510 |
"and debugging mode (<code>DEBUG_ON</code>)."
|
2511 |
msgstr ""
|
2512 |
|
2513 |
-
#: lib/help.php:
|
2514 |
msgid ""
|
2515 |
"RULE : reference of the NinjaFirewall built-in security rule that triggered "
|
2516 |
"the action. A hyphen (<code>-</code>) instead of a number means it was a "
|
2517 |
"rule from the \"Firewall Policies\" page."
|
2518 |
msgstr ""
|
2519 |
|
2520 |
-
#: lib/help.php:
|
2521 |
msgid "IP : the user IPv4 or IPv6 address."
|
2522 |
msgstr ""
|
2523 |
|
2524 |
-
#: lib/help.php:
|
2525 |
msgid ""
|
2526 |
"REQUEST : the HTTP request including offending variables and values as well "
|
2527 |
"as the reason the action was logged."
|
2528 |
msgstr ""
|
2529 |
|
2530 |
-
#: lib/help.php:
|
2531 |
msgid "Auto-delete log"
|
2532 |
msgstr ""
|
2533 |
|
2534 |
-
#: lib/help.php:
|
2535 |
msgid ""
|
2536 |
"This options lets you configure NinjaFirewall to delete its old logs "
|
2537 |
"automatically. By default, logs are never deleted, <b>even when uninstall "
|
@@ -2539,55 +2552,55 @@ msgid ""
|
|
2539 |
"delete old logs."
|
2540 |
msgstr ""
|
2541 |
|
2542 |
-
#: lib/help.php:
|
2543 |
msgid ""
|
2544 |
"Centralized Logging lets you remotely access the firewall log of all your "
|
2545 |
"NinjaFirewall protected websites from one single installation. You do not "
|
2546 |
"need any longer to log in to individual servers to analyse your log data."
|
2547 |
msgstr ""
|
2548 |
|
2549 |
-
#: lib/help.php:
|
2550 |
#, php-format
|
2551 |
msgid "<a href=\"%s\">Consult our blog</a> for more info about it."
|
2552 |
msgstr ""
|
2553 |
|
2554 |
-
#: lib/help.php:
|
2555 |
msgid ""
|
2556 |
"Enter your public key (optional): This is the public key that was created "
|
2557 |
"from your main server."
|
2558 |
msgstr ""
|
2559 |
|
2560 |
-
#: lib/help.php:
|
2561 |
msgid ""
|
2562 |
"Centralized Logging will keep working even if NinjaFirewall is disabled. "
|
2563 |
"Delete your public key below if you want to disable it."
|
2564 |
msgstr ""
|
2565 |
|
2566 |
-
#: lib/help.php:
|
2567 |
msgid "Live Log"
|
2568 |
msgstr ""
|
2569 |
|
2570 |
-
#: lib/help.php:
|
2571 |
msgid ""
|
2572 |
"Live Log lets you watch your blog traffic in real time, just like the Unix "
|
2573 |
"<code>tail -f</code> command. Note that requests sent to static elements "
|
2574 |
"like JS/CSS files and images are not managed by NinjaFirewall."
|
2575 |
msgstr ""
|
2576 |
|
2577 |
-
#: lib/help.php:
|
2578 |
msgid ""
|
2579 |
"You can enable/disable the monitoring process, change the refresh rate, "
|
2580 |
"clear the screen, enable automatic vertical scrolling, change the log "
|
2581 |
"format, select which traffic you want to view (HTTP/HTTPS) and the timezone."
|
2582 |
msgstr ""
|
2583 |
|
2584 |
-
#: lib/help.php:
|
2585 |
msgid ""
|
2586 |
"You can also apply filters to include or exclude files and folders "
|
2587 |
"(REQUEST_URI)."
|
2588 |
msgstr ""
|
2589 |
|
2590 |
-
#: lib/help.php:
|
2591 |
msgid ""
|
2592 |
"Live Log does not make use of any WordPress core file (e.g., <code>admin-"
|
2593 |
"ajax.php</code>). It communicates directly with the firewall without loading "
|
@@ -2596,114 +2609,114 @@ msgid ""
|
|
2596 |
"value."
|
2597 |
msgstr ""
|
2598 |
|
2599 |
-
#: lib/help.php:
|
2600 |
msgid ""
|
2601 |
"If you are using the optional <code>.htninja</code> configuration file to "
|
2602 |
"whitelist your IP, the Live Log feature will not work."
|
2603 |
msgstr ""
|
2604 |
|
2605 |
-
#: lib/help.php:
|
2606 |
msgid "Log Format"
|
2607 |
msgstr ""
|
2608 |
|
2609 |
-
#: lib/help.php:
|
2610 |
msgid "You can easily customize the log format. Possible values are:"
|
2611 |
msgstr ""
|
2612 |
|
2613 |
-
#: lib/help.php:
|
2614 |
msgid "<code>%time</code>: the server date, time and timezone."
|
2615 |
msgstr ""
|
2616 |
|
2617 |
-
#: lib/help.php:
|
2618 |
msgid "<code>%name</code>: authenticated user (HTTP basic auth), if any."
|
2619 |
msgstr ""
|
2620 |
|
2621 |
-
#: lib/help.php:
|
2622 |
#, php-format
|
2623 |
msgid ""
|
2624 |
"<code>%client</code>: the client REMOTE_ADDR. If you are behind a load "
|
2625 |
"balancer or CDN, this will be its IP."
|
2626 |
msgstr ""
|
2627 |
|
2628 |
-
#: lib/help.php:
|
2629 |
msgid "<code>%method</code>: HTTP method (e.g., GET, POST)."
|
2630 |
msgstr ""
|
2631 |
|
2632 |
-
#: lib/help.php:
|
2633 |
#, php-format
|
2634 |
msgid ""
|
2635 |
"<code>%uri</code>: the URI which was given in order to access the page "
|
2636 |
"(REQUEST_URI)."
|
2637 |
msgstr ""
|
2638 |
|
2639 |
-
#: lib/help.php:
|
2640 |
msgid "<code>%referrer</code>: the referrer (HTTP_REFERER), if any."
|
2641 |
msgstr ""
|
2642 |
|
2643 |
-
#: lib/help.php:
|
2644 |
#, php-format
|
2645 |
msgid "<code>%ua</code>: the user-agent (HTTP_USER_AGENT), if any."
|
2646 |
msgstr ""
|
2647 |
|
2648 |
-
#: lib/help.php:
|
2649 |
#, php-format
|
2650 |
msgid ""
|
2651 |
"<code>%forward</code>: HTTP_X_FORWARDED_FOR, if any. If you are behind a "
|
2652 |
"load balancer or CDN, this will likely be the visitor true IP."
|
2653 |
msgstr ""
|
2654 |
|
2655 |
-
#: lib/help.php:
|
2656 |
msgid "<code>%host</code>: the requested host (HTTP_HOST), if any."
|
2657 |
msgstr ""
|
2658 |
|
2659 |
-
#: lib/help.php:
|
2660 |
msgid ""
|
2661 |
"Additionally, you can include any of the following characters: <code>\"</"
|
2662 |
"code>, <code>%</code>, <code>[</code>, <code>]</code>, <code>space</code> "
|
2663 |
"and lowercase letters <code>a-z</code>."
|
2664 |
msgstr ""
|
2665 |
|
2666 |
-
#: lib/help.php:
|
2667 |
msgid ""
|
2668 |
"Your website can run NinjaFirewall and be compliant with the General Data "
|
2669 |
"Protection Regulation (GDPR). For more info, please visit our blog:"
|
2670 |
msgstr ""
|
2671 |
|
2672 |
-
#: lib/help.php:
|
2673 |
msgid "Rules Updates"
|
2674 |
msgstr ""
|
2675 |
|
2676 |
-
#: lib/help.php:
|
2677 |
msgid ""
|
2678 |
"To get the most efficient protection, you can ask NinjaFirewall to "
|
2679 |
"automatically update its security rules."
|
2680 |
msgstr ""
|
2681 |
|
2682 |
-
#: lib/help.php:
|
2683 |
msgid ""
|
2684 |
"Each time a new vulnerability is found in WordPress or one of its plugins/"
|
2685 |
"themes, a new set of security rules will be made available to protect "
|
2686 |
"against such vulnerability if needed."
|
2687 |
msgstr ""
|
2688 |
|
2689 |
-
#: lib/help.php:
|
2690 |
msgid ""
|
2691 |
"Only security rules will be downloaded. If a new version of NinjaFirewall "
|
2692 |
"(including new files, options and features) was available, it would have to "
|
2693 |
"be updated from the dashboard plugins menu as usual."
|
2694 |
msgstr ""
|
2695 |
|
2696 |
-
#: lib/help.php:
|
2697 |
msgid ""
|
2698 |
"We recommend to enable this feature, as it is the <strong>best way to keep "
|
2699 |
"your WordPress secure</strong> against new vulnerabilities."
|
2700 |
msgstr ""
|
2701 |
|
2702 |
-
#: lib/help.php:
|
2703 |
msgid "Rules Editor"
|
2704 |
msgstr ""
|
2705 |
|
2706 |
-
#: lib/help.php:
|
2707 |
msgid ""
|
2708 |
"Besides the \"Firewall Policies\", NinjaFirewall includes also a large set "
|
2709 |
"of built-in rules used to protect your blog against the most common "
|
@@ -2713,19 +2726,19 @@ msgid ""
|
|
2713 |
"individually:"
|
2714 |
msgstr ""
|
2715 |
|
2716 |
-
#: lib/help.php:
|
2717 |
msgid ""
|
2718 |
"Check your firewall log and find the rule ID you want to disable (it is "
|
2719 |
"displayed in the <code>RULE</code> column)."
|
2720 |
msgstr ""
|
2721 |
|
2722 |
-
#: lib/help.php:
|
2723 |
msgid ""
|
2724 |
"Select its ID from the enabled rules list below and click the \"Disable it\" "
|
2725 |
"button."
|
2726 |
msgstr ""
|
2727 |
|
2728 |
-
#: lib/help.php:
|
2729 |
msgid ""
|
2730 |
"Note: if the <code>RULE</code> column from your log shows a hyphen <code>-</"
|
2731 |
"code> instead of a number, that means that the rule can be changed in the "
|
@@ -2743,53 +2756,57 @@ msgstr ""
|
|
2743 |
msgid "Error: wrong parameter value (%s)."
|
2744 |
msgstr ""
|
2745 |
|
2746 |
-
#: lib/install.php:105 lib/install.php:
|
2747 |
#, php-format
|
2748 |
msgid ""
|
2749 |
"Error: The following file is not writable, please change its permissions: %s"
|
2750 |
msgstr ""
|
2751 |
|
2752 |
-
#: lib/install.php:
|
2753 |
#, php-format
|
2754 |
msgid ""
|
2755 |
"NinjaFirewall detected that the requested changes seemed to crash your blog. "
|
2756 |
"%s"
|
2757 |
msgstr ""
|
2758 |
|
2759 |
-
#: lib/install.php:
|
2760 |
msgid ""
|
2761 |
"Changes have been undone. You may need to modify your selection and try "
|
2762 |
"again."
|
2763 |
msgstr ""
|
2764 |
|
2765 |
-
#: lib/install.php:
|
2766 |
#, php-format
|
2767 |
msgid "The website front-end returned: HTTP %s %s."
|
2768 |
msgstr ""
|
2769 |
|
2770 |
-
#: lib/install.php:
|
|
|
|
|
|
|
|
|
2771 |
#, php-format
|
2772 |
msgid "The website front-end returned a fatal error: %s."
|
2773 |
msgstr ""
|
2774 |
|
2775 |
-
#: lib/install.php:
|
2776 |
-
#: lib/install.php:
|
2777 |
msgid "File is not writable"
|
2778 |
msgstr ""
|
2779 |
|
2780 |
-
#: lib/install_default.php:
|
2781 |
msgid ""
|
2782 |
"Error: The installer cannot download the security rules from wordpress.org "
|
2783 |
"website."
|
2784 |
msgstr ""
|
2785 |
|
2786 |
-
#: lib/install_default.php:
|
2787 |
msgid ""
|
2788 |
"The server may be temporarily down or you may have network connectivity "
|
2789 |
"problems? Please try again in a few minutes."
|
2790 |
msgstr ""
|
2791 |
|
2792 |
-
#: lib/install_default.php:
|
2793 |
msgid ""
|
2794 |
"NinjaFirewall downloads its rules over an HTTPS secure connection. Maybe "
|
2795 |
"your server does not support SSL? You can force NinjaFirewall to use a non-"
|
@@ -2797,7 +2814,7 @@ msgid ""
|
|
2797 |
"config.php</strong> file:"
|
2798 |
msgstr ""
|
2799 |
|
2800 |
-
#: lib/install_default.php:
|
2801 |
#, php-format
|
2802 |
msgid ""
|
2803 |
"NinjaFirewall cannot create its <code>nfwlog/</code>log and cache folder; "
|
@@ -3491,14 +3508,14 @@ msgstr ""
|
|
3491 |
|
3492 |
#: lib/monitoring_file_check.php:768 lib/monitoring_file_check.php:770
|
3493 |
#: lib/monitoring_file_check.php:790 lib/monitoring_file_check.php:792
|
3494 |
-
#: lib/security_rules_update.php:
|
3495 |
#: lib/utils.php:225 lib/utils.php:311 lib/utils.php:435 lib/utils.php:1035
|
3496 |
#: lib/utils.php:1213 lib/utils.php:1492
|
3497 |
msgid "Blog:"
|
3498 |
msgstr ""
|
3499 |
|
3500 |
#: lib/monitoring_file_check.php:772 lib/monitoring_file_check.php:794
|
3501 |
-
#: lib/security_rules_update.php:
|
3502 |
#, php-format
|
3503 |
msgid "Date: %s"
|
3504 |
msgstr ""
|
@@ -3580,7 +3597,7 @@ msgstr ""
|
|
3580 |
msgid "Save Network options"
|
3581 |
msgstr ""
|
3582 |
|
3583 |
-
#: lib/security_rules.php:44 lib/security_rules_update.php:
|
3584 |
#: ninjafirewall.php:846
|
3585 |
msgid "Security Rules"
|
3586 |
msgstr ""
|
@@ -3683,7 +3700,7 @@ msgstr ""
|
|
3683 |
msgid "Security rules have been updated."
|
3684 |
msgstr ""
|
3685 |
|
3686 |
-
#: lib/security_rules_update.php:91 lib/security_rules_update.php:
|
3687 |
msgid "No security rules update available."
|
3688 |
msgstr ""
|
3689 |
|
@@ -3773,54 +3790,54 @@ msgstr ""
|
|
3773 |
msgid "Error: Unserialized rules seem corrupted."
|
3774 |
msgstr ""
|
3775 |
|
3776 |
-
#: lib/security_rules_update.php:
|
3777 |
#, php-format
|
3778 |
msgid "Security rules updated to version %s."
|
3779 |
msgstr ""
|
3780 |
|
3781 |
-
#: lib/security_rules_update.php:
|
3782 |
msgid "Error: Unable to retrieve the new rules version."
|
3783 |
msgstr ""
|
3784 |
|
3785 |
-
#: lib/security_rules_update.php:
|
3786 |
#, php-format
|
3787 |
msgid "Error: Server returned a %s HTTP error code (#1)."
|
3788 |
msgstr ""
|
3789 |
|
3790 |
-
#: lib/security_rules_update.php:
|
3791 |
msgid "Error: Unable to connect to the remote server"
|
3792 |
msgstr ""
|
3793 |
|
3794 |
-
#: lib/security_rules_update.php:
|
3795 |
#, php-format
|
3796 |
msgid "Error: The new rules versions do not match (%s != %s)."
|
3797 |
msgstr ""
|
3798 |
|
3799 |
-
#: lib/security_rules_update.php:
|
3800 |
#, php-format
|
3801 |
msgid ""
|
3802 |
"Error: The new rules %s digital signature is not correct. Aborting update, "
|
3803 |
"rules may have been tampered with."
|
3804 |
msgstr ""
|
3805 |
|
3806 |
-
#: lib/security_rules_update.php:
|
3807 |
#, php-format
|
3808 |
msgid "Error: Server returned a %s HTTP error code (#2)."
|
3809 |
msgstr ""
|
3810 |
|
3811 |
-
#: lib/security_rules_update.php:
|
3812 |
msgid "[NinjaFirewall] Security rules update"
|
3813 |
msgstr ""
|
3814 |
|
3815 |
-
#: lib/security_rules_update.php:
|
3816 |
msgid "NinjaFirewall security rules have been updated:"
|
3817 |
msgstr ""
|
3818 |
|
3819 |
-
#: lib/security_rules_update.php:
|
3820 |
msgid "Rules version:"
|
3821 |
msgstr ""
|
3822 |
|
3823 |
-
#: lib/security_rules_update.php:
|
3824 |
#, php-format
|
3825 |
msgid "This notification can be turned off from NinjaFirewall \"%s\" page."
|
3826 |
msgstr ""
|
2 |
msgid ""
|
3 |
msgstr ""
|
4 |
"Project-Id-Version: Stable (latest release)\n"
|
5 |
+
"POT-Creation-Date: 2020-11-25 19:01+0700\n"
|
6 |
"PO-Revision-Date: 2018-04-05 22:52+0700\n"
|
7 |
"Last-Translator: NinTechNet <contact@nintechnet.com>\n"
|
8 |
"Language-Team: \n"
|
10 |
"MIME-Version: 1.0\n"
|
11 |
"Content-Type: text/plain; charset=UTF-8\n"
|
12 |
"Content-Transfer-Encoding: 8bit\n"
|
13 |
+
"X-Generator: Poedit 2.4.2\n"
|
14 |
"X-Poedit-Basepath: ..\n"
|
15 |
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
16 |
"X-Poedit-SourceCharset: UTF-8\n"
|
47 |
"menu instead:"
|
48 |
msgstr ""
|
49 |
|
50 |
+
#: lib/custom_plugin.php:27
|
51 |
msgid "Support forum:"
|
52 |
msgstr ""
|
53 |
|
54 |
+
#: lib/custom_plugin.php:29
|
55 |
#, php-format
|
56 |
msgid ""
|
57 |
"Need more security? Check out our supercharged NinjaFirewall (WP+ Edition): "
|
293 |
"configuration</a>."
|
294 |
msgstr ""
|
295 |
|
296 |
+
#: lib/dashboard.php:320 lib/help.php:465 lib/logs_firewall_log.php:193
|
297 |
#: lib/wpplus.php:170
|
298 |
msgid "Centralized Logging"
|
299 |
msgstr ""
|
300 |
|
301 |
+
#: lib/dashboard.php:324 lib/security_rules_update.php:434
|
302 |
#, php-format
|
303 |
msgid "Error: %s"
|
304 |
msgstr ""
|
383 |
"themes:"
|
384 |
msgstr ""
|
385 |
|
386 |
+
#: lib/dashboard_about.php:31 lib/help.php:513
|
387 |
msgid "GDPR Compliance"
|
388 |
msgstr ""
|
389 |
|
453 |
msgid "Select monthly stats to view..."
|
454 |
msgstr ""
|
455 |
|
456 |
+
#: lib/event_notifications.php:34 lib/help.php:375 ninjafirewall.php:834
|
457 |
msgid "Event Notifications"
|
458 |
msgstr ""
|
459 |
|
695 |
msgid "Blocked brute-force attacks:"
|
696 |
msgstr ""
|
697 |
|
698 |
+
#: lib/event_notifications.php:503 lib/event_updates.php:225 lib/utils.php:1047
|
699 |
msgid ""
|
700 |
"This notification can be turned off from NinjaFirewall \"Event Notifications"
|
701 |
"\" page."
|
702 |
msgstr ""
|
703 |
|
704 |
+
#: lib/event_updates.php:160
|
705 |
msgid "[NinjaFirewall] Warning: Security update available"
|
706 |
msgstr ""
|
707 |
|
708 |
+
#: lib/event_updates.php:162
|
709 |
msgid ""
|
710 |
"NinjaFirewall has detected that there are security updates available for "
|
711 |
"your website:"
|
712 |
msgstr ""
|
713 |
|
714 |
+
#: lib/event_updates.php:163 lib/utils.php:233 lib/utils.php:318
|
715 |
#: lib/utils.php:440 lib/utils.php:1036 lib/utils.php:1224 lib/utils.php:1496
|
716 |
msgid "Date:"
|
717 |
msgstr ""
|
718 |
|
719 |
+
#: lib/event_updates.php:166 lib/event_updates.php:168
|
720 |
#, php-format
|
721 |
msgid "Blog: %s"
|
722 |
msgstr ""
|
723 |
|
724 |
+
#: lib/event_updates.php:174 lib/event_updates.php:190
|
725 |
+
#: lib/event_updates.php:209
|
726 |
#, php-format
|
727 |
msgid "Your version: %s"
|
728 |
msgstr ""
|
729 |
|
730 |
+
#: lib/event_updates.php:175 lib/event_updates.php:191
|
731 |
+
#: lib/event_updates.php:210
|
732 |
#, php-format
|
733 |
msgid "New version: %s"
|
734 |
msgstr ""
|
735 |
|
736 |
+
#: lib/event_updates.php:177 lib/event_updates.php:194
|
737 |
+
#: lib/event_updates.php:213
|
738 |
msgid "Severity: This is an important security update"
|
739 |
msgstr ""
|
740 |
|
741 |
+
#: lib/event_updates.php:179 lib/event_updates.php:196
|
742 |
+
#: lib/event_updates.php:215
|
743 |
msgid "Severity: **This is a critical security update**"
|
744 |
msgstr ""
|
745 |
|
746 |
+
#: lib/event_updates.php:181 lib/event_updates.php:198
|
747 |
+
#: lib/event_updates.php:217
|
748 |
msgid "Type: Security fix"
|
749 |
msgstr ""
|
750 |
|
751 |
+
#: lib/event_updates.php:189
|
752 |
#, php-format
|
753 |
msgid "Plugin: %s"
|
754 |
msgstr ""
|
755 |
|
756 |
+
#: lib/event_updates.php:208
|
757 |
#, php-format
|
758 |
msgid "Theme: %s"
|
759 |
msgstr ""
|
760 |
|
761 |
+
#: lib/event_updates.php:223
|
762 |
msgid "Don't leave your blog at risk, make sure to update as soon as possible."
|
763 |
msgstr ""
|
764 |
|
971 |
msgid "There are no backup available yet, check back later."
|
972 |
msgstr ""
|
973 |
|
974 |
+
#: lib/firewall_options.php:376
|
975 |
#, php-format
|
976 |
msgid "Uploaded file is either corrupted or its format is not supported (#%s)"
|
977 |
msgstr ""
|
978 |
|
979 |
+
#: lib/firewall_options.php:554 ninjafirewall.php:230
|
980 |
msgid "[NinjaFirewall] Alert: Firewall is disabled"
|
981 |
msgstr ""
|
982 |
|
983 |
+
#: lib/firewall_options.php:556 lib/firewall_options.php:558
|
984 |
#: ninjafirewall.php:232 ninjafirewall.php:234
|
985 |
msgid "-Blog :"
|
986 |
msgstr ""
|
987 |
|
988 |
+
#: lib/firewall_options.php:562 ninjafirewall.php:236
|
989 |
msgid "Someone disabled NinjaFirewall from your WordPress admin dashboard:"
|
990 |
msgstr ""
|
991 |
|
992 |
+
#: lib/firewall_options.php:565
|
993 |
msgid ""
|
994 |
"NinjaFirewall is disabled because someone enabled debugging mode from your "
|
995 |
"WordPress admin dashboard:"
|
996 |
msgstr ""
|
997 |
|
998 |
+
#: lib/firewall_options.php:568
|
999 |
msgid "[NinjaFirewall] Alert: Firewall override settings"
|
1000 |
msgstr ""
|
1001 |
|
1002 |
+
#: lib/firewall_options.php:569
|
1003 |
msgid ""
|
1004 |
"Someone imported a new configuration which overrode the firewall settings:"
|
1005 |
msgstr ""
|
1006 |
|
1007 |
+
#: lib/firewall_options.php:575 ninjafirewall.php:237
|
1008 |
msgid "-User :"
|
1009 |
msgstr ""
|
1010 |
|
1011 |
+
#: lib/firewall_options.php:576 ninjafirewall.php:238
|
1012 |
msgid "-IP :"
|
1013 |
msgstr ""
|
1014 |
|
1015 |
+
#: lib/firewall_options.php:577 ninjafirewall.php:239
|
1016 |
msgid "-Date :"
|
1017 |
msgstr ""
|
1018 |
|
1477 |
msgid "Set %s (Chrome, Opera and Firefox browsers)"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
+
#: lib/firewall_policies.php:1000
|
1481 |
msgid ""
|
1482 |
"Block PHP built-in wrappers in <code>GET</code>, <code>POST</code>, "
|
1483 |
"<code>HTTP_USER_AGENT</code>, <code>HTTP_REFERER</code> and cookies"
|
1484 |
msgstr ""
|
1485 |
|
1486 |
+
#: lib/firewall_policies.php:1039
|
1487 |
msgid "Block serialized PHP objects in the following global variables"
|
1488 |
msgstr ""
|
1489 |
|
1490 |
+
#: lib/firewall_policies.php:1049 lib/help.php:293
|
1491 |
+
msgid "Block attempts to override PHP Superglobals"
|
1492 |
+
msgstr ""
|
1493 |
+
|
1494 |
+
#: lib/firewall_policies.php:1055 lib/help.php:295
|
1495 |
msgid "Hide PHP notice and error messages"
|
1496 |
msgstr ""
|
1497 |
|
1498 |
+
#: lib/firewall_policies.php:1061
|
1499 |
msgid "Sanitise <code>PHP_SELF</code>"
|
1500 |
msgstr ""
|
1501 |
|
1502 |
+
#: lib/firewall_policies.php:1067
|
1503 |
msgid "Sanitise <code>PATH_TRANSLATED</code>"
|
1504 |
msgstr ""
|
1505 |
|
1506 |
+
#: lib/firewall_policies.php:1073
|
1507 |
msgid "Sanitise <code>PATH_INFO</code>"
|
1508 |
msgstr ""
|
1509 |
|
1510 |
+
#: lib/firewall_policies.php:1087
|
1511 |
msgid "This option is not compatible with your actual configuration."
|
1512 |
msgstr ""
|
1513 |
|
1514 |
+
#: lib/firewall_policies.php:1109 lib/help.php:299
|
1515 |
msgid "Various"
|
1516 |
msgstr ""
|
1517 |
|
1518 |
+
#: lib/firewall_policies.php:1112
|
1519 |
msgid "Block the <code>DOCUMENT_ROOT</code> server variable in HTTP request"
|
1520 |
msgstr ""
|
1521 |
|
1522 |
+
#: lib/firewall_policies.php:1119 lib/help.php:302
|
1523 |
msgid "Block ASCII character 0x00 (NULL byte)"
|
1524 |
msgstr ""
|
1525 |
|
1526 |
+
#: lib/firewall_policies.php:1125 lib/help.php:304
|
1527 |
msgid "Block ASCII control characters 1 to 8 and 14 to 31"
|
1528 |
msgstr ""
|
1529 |
|
1530 |
+
#: lib/firewall_policies.php:1138
|
1531 |
msgid "Save Firewall Policies"
|
1532 |
msgstr ""
|
1533 |
|
1534 |
+
#: lib/firewall_policies.php:1140
|
1535 |
msgid "Restore Default Values"
|
1536 |
msgstr ""
|
1537 |
|
2160 |
msgstr ""
|
2161 |
|
2162 |
#: lib/help.php:293
|
2163 |
+
#, php-format
|
2164 |
+
msgid ""
|
2165 |
+
"This policy will block attempts to override superglobals (%s). A plugin or a "
|
2166 |
+
"theme could make an unsafe use of some PHP functions that could potentially "
|
2167 |
+
"override superglobals. Enabling this option will not block the request but "
|
2168 |
+
"unset the dangerous value and write the event ot the firewall log."
|
2169 |
+
msgstr ""
|
2170 |
+
|
2171 |
+
#: lib/help.php:295
|
2172 |
msgid ""
|
2173 |
"This option lets you hide errors returned by your scripts. Such errors can "
|
2174 |
"leak sensitive informations which can be exploited by hackers."
|
2175 |
msgstr ""
|
2176 |
|
2177 |
+
#: lib/help.php:297
|
2178 |
msgid ""
|
2179 |
"Sanitise <code>PHP_SELF</code>, <code>PATH_TRANSLATED</code>, "
|
2180 |
"<code>PATH_INFO</code>"
|
2181 |
msgstr ""
|
2182 |
|
2183 |
+
#: lib/help.php:297
|
2184 |
msgid ""
|
2185 |
"This option can sanitise any dangerous characters found in those 3 server "
|
2186 |
"variables to prevent various XSS and database injection attempts."
|
2187 |
msgstr ""
|
2188 |
|
2189 |
+
#: lib/help.php:300
|
2190 |
#, php-format
|
2191 |
msgid ""
|
2192 |
"Block the <code>DOCUMENT_ROOT</code> server variable (%s) in HTTP requests"
|
2193 |
msgstr ""
|
2194 |
|
2195 |
+
#: lib/help.php:300
|
2196 |
msgid ""
|
2197 |
"This option will block scripts attempting to pass the <code>DOCUMENT_ROOT</"
|
2198 |
"code> server variable in a <code>GET</code> or <code>POST</code> request. "
|
2200 |
"legitimate programs do not."
|
2201 |
msgstr ""
|
2202 |
|
2203 |
+
#: lib/help.php:302
|
2204 |
msgid ""
|
2205 |
"This option will reject any <code>GET</code> or <code>POST</code> request, "
|
2206 |
"<code>HTTP_USER_AGENT</code>, <code>REQUEST_URI</code>, <code>PHP_SELF</"
|
2209 |
"dangerous and should always be rejected."
|
2210 |
msgstr ""
|
2211 |
|
2212 |
+
#: lib/help.php:304
|
2213 |
msgid ""
|
2214 |
"This option will reject any <code>GET</code> or <code>POST</code> request, "
|
2215 |
"<code>HTTP_USER_AGENT</code>, <code>HTTP_REFERER</code> variables containing "
|
2216 |
"ASCII characters from 1 to 8 and 14 to 31."
|
2217 |
msgstr ""
|
2218 |
|
2219 |
+
#: lib/help.php:317 lib/monitoring.php:46
|
2220 |
msgid "File Check"
|
2221 |
msgstr ""
|
2222 |
|
2223 |
+
#: lib/help.php:318
|
2224 |
msgid ""
|
2225 |
"File Check lets you perform file integrity monitoring upon request or on a "
|
2226 |
"specific interval."
|
2227 |
msgstr ""
|
2228 |
|
2229 |
+
#: lib/help.php:320
|
2230 |
msgid ""
|
2231 |
"You need to create a snapshot of all your files and then, at a later time, "
|
2232 |
"you can scan your system to compare it with the previous snapshot. Any "
|
2234 |
"file ownership, timestamp as well as file creation and deletion."
|
2235 |
msgstr ""
|
2236 |
|
2237 |
+
#: lib/help.php:322
|
2238 |
#, php-format
|
2239 |
msgid ""
|
2240 |
"Create a snapshot of all files stored in that directory: by default, the "
|
2241 |
"directory is set to WordPress <code>ABSPATH</code> (%s)"
|
2242 |
msgstr ""
|
2243 |
|
2244 |
+
#: lib/help.php:323
|
2245 |
msgid ""
|
2246 |
"Exclude the following files/folders: you can enter a directory or a file "
|
2247 |
"name (e.g., <code>/foo/bar/</code>), or a part of it (e.g., <code>foo</"
|
2248 |
"code>). Or you can exclude a file extension (e.g., <code>.css</code>)."
|
2249 |
msgstr ""
|
2250 |
|
2251 |
+
#: lib/help.php:325
|
2252 |
msgid ""
|
2253 |
"Multiple values must be comma-separated (e.g., <code>/foo/bar/,.css,.png</"
|
2254 |
"code>)."
|
2255 |
msgstr ""
|
2256 |
|
2257 |
+
#: lib/help.php:326
|
2258 |
msgid ""
|
2259 |
"Do not follow symbolic links: by default, NinjaFirewall will not follow "
|
2260 |
"symbolic links."
|
2261 |
msgstr ""
|
2262 |
|
2263 |
+
#: lib/help.php:329
|
2264 |
msgid "Scheduled scans"
|
2265 |
msgstr ""
|
2266 |
|
2267 |
+
#: lib/help.php:330
|
2268 |
msgid ""
|
2269 |
"NinjaFirewall can scan your system on a specific interval (hourly, "
|
2270 |
"twicedaily or daily)."
|
2271 |
msgstr ""
|
2272 |
|
2273 |
+
#: lib/help.php:332
|
2274 |
msgid ""
|
2275 |
"It can either send you a scan report only if changes are detected, or always "
|
2276 |
"send you one after each scan."
|
2277 |
msgstr ""
|
2278 |
|
2279 |
+
#: lib/help.php:334
|
2280 |
msgid ""
|
2281 |
"Reports will be sent to the contact email address defined in the \"Event "
|
2282 |
"Notifications\" menu."
|
2283 |
msgstr ""
|
2284 |
|
2285 |
+
#: lib/help.php:336
|
2286 |
#, php-format
|
2287 |
msgid ""
|
2288 |
"Scheduled scans rely on <a href=\"%s\">WordPress pseudo cron</a> which works "
|
2289 |
"only if your site gets sufficient traffic."
|
2290 |
msgstr ""
|
2291 |
|
2292 |
+
#: lib/help.php:342 lib/monitoring.php:47
|
2293 |
msgid "File Guard"
|
2294 |
msgstr ""
|
2295 |
|
2296 |
+
#: lib/help.php:344
|
2297 |
msgid ""
|
2298 |
"File Guard can detect, in real-time, any access to a PHP file that was "
|
2299 |
"recently modified or created, and alert you about this."
|
2300 |
msgstr ""
|
2301 |
|
2302 |
+
#: lib/help.php:346
|
2303 |
msgid ""
|
2304 |
"If a hacker uploaded a shell script to your site (or injected a backdoor "
|
2305 |
"into an already existing file) and tried to directly access that file using "
|
2310 |
"Notifications\" menu."
|
2311 |
msgstr ""
|
2312 |
|
2313 |
+
#: lib/help.php:347
|
2314 |
msgid ""
|
2315 |
"If you do not want to monitor a folder, you can exclude its full path or a "
|
2316 |
"part of it (e.g., <code>/var/www/public_html/cache/</code> or <code>/cache/</"
|
2319 |
"will ignore it."
|
2320 |
msgstr ""
|
2321 |
|
2322 |
+
#: lib/help.php:348
|
2323 |
msgid ""
|
2324 |
"Multiple values must be comma-separated (e.g., <code>/foo/bar/,/cache/</"
|
2325 |
"code>)."
|
2326 |
msgstr ""
|
2327 |
|
2328 |
+
#: lib/help.php:349
|
2329 |
msgid ""
|
2330 |
"File Guard real-time detection is a totally unique feature, because "
|
2331 |
"NinjaFirewall is the only plugin for WordPress that can hook HTTP requests "
|
2333 |
"package (third-party software, shell script, backdoor etc)."
|
2334 |
msgstr ""
|
2335 |
|
2336 |
+
#: lib/help.php:358 lib/network.php:32 ninjafirewall.php:830
|
2337 |
msgid "Network"
|
2338 |
msgstr ""
|
2339 |
|
2340 |
+
#: lib/help.php:360
|
2341 |
msgid ""
|
2342 |
"Even if NinjaFirewall administration menu is only available to the Super "
|
2343 |
"Admin (from the main site), you can still display its status to all sites in "
|
2345 |
"It will be visible only to the administrators of those sites."
|
2346 |
msgstr ""
|
2347 |
|
2348 |
+
#: lib/help.php:362
|
2349 |
msgid ""
|
2350 |
"It is recommended to enable this feature as it is the only way to know "
|
2351 |
"whether the sites in your network are protected and if NinjaFirewall "
|
2352 |
"installation was successful."
|
2353 |
msgstr ""
|
2354 |
|
2355 |
+
#: lib/help.php:364
|
2356 |
msgid ""
|
2357 |
"Note that when it is disabled, the icon still remains visible to you, the "
|
2358 |
"Super Admin."
|
2359 |
msgstr ""
|
2360 |
|
2361 |
+
#: lib/help.php:376
|
2362 |
msgid ""
|
2363 |
"NinjaFirewall can alert you by email on specific events triggered within "
|
2364 |
"your blog. They include installations, updates, activations etc, as well as "
|
2369 |
"theme in order to take full control of your website."
|
2370 |
msgstr ""
|
2371 |
|
2372 |
+
#: lib/help.php:387 lib/login_protection.php:21 ninjafirewall.php:838
|
2373 |
msgid "Login Protection"
|
2374 |
msgstr ""
|
2375 |
|
2376 |
+
#: lib/help.php:391
|
2377 |
msgid ""
|
2378 |
"By processing incoming HTTP requests before your blog and any of its "
|
2379 |
"plugins, NinjaFirewall is the only plugin for WordPress able to protect it "
|
2381 |
"from several thousands of different IPs."
|
2382 |
msgstr ""
|
2383 |
|
2384 |
+
#: lib/help.php:393
|
2385 |
msgid ""
|
2386 |
"You can choose two different types of protection: a password or a captcha. "
|
2387 |
"You can enable the protection only if an attack is detected or to keep it "
|
2388 |
"always activated."
|
2389 |
msgstr ""
|
2390 |
|
2391 |
+
#: lib/help.php:395
|
2392 |
msgid "Yes, if under attack:"
|
2393 |
msgstr ""
|
2394 |
|
2395 |
+
#: lib/help.php:397
|
2396 |
msgid ""
|
2397 |
"The protection will be triggered when too many login attempts are detected, "
|
2398 |
"regardless of the offending IP. It blocks the attack instantly and prevents "
|
2401 |
"combination or the captcha code."
|
2402 |
msgstr ""
|
2403 |
|
2404 |
+
#: lib/help.php:399
|
2405 |
msgid "Always ON:"
|
2406 |
msgstr ""
|
2407 |
|
2408 |
+
#: lib/help.php:401
|
2409 |
msgid ""
|
2410 |
"NinjaFirewall will always enforce the HTTP authentication or captcha "
|
2411 |
"implementation each time you access the login page."
|
2412 |
msgstr ""
|
2413 |
|
2414 |
+
#: lib/help.php:404
|
2415 |
msgid "Type of protection:"
|
2416 |
msgstr ""
|
2417 |
|
2418 |
+
#: lib/help.php:405
|
2419 |
msgid ""
|
2420 |
"<b>Password:</b> It password-protects the login page. NinjaFirewall uses its "
|
2421 |
"own very fast authentication scheme and it is compatible with any HTTP "
|
2422 |
"server (Apache, Nginx, Lighttpd etc)."
|
2423 |
msgstr ""
|
2424 |
|
2425 |
+
#: lib/help.php:406
|
2426 |
msgid "<b>Captcha:</b> It will display a 5-character captcha code."
|
2427 |
msgstr ""
|
2428 |
|
2429 |
+
#: lib/help.php:407
|
2430 |
msgid "Bot protection:"
|
2431 |
msgstr ""
|
2432 |
|
2433 |
+
#: lib/help.php:408
|
2434 |
msgid ""
|
2435 |
"NinjaFirewall will attempt to block bots and scripts immediately, i.e., even "
|
2436 |
"before they start a brute-force attack."
|
2437 |
msgstr ""
|
2438 |
|
2439 |
+
#: lib/help.php:416
|
2440 |
msgid "AUTH log"
|
2441 |
msgstr ""
|
2442 |
|
2443 |
+
#: lib/help.php:419
|
2444 |
msgid ""
|
2445 |
"NinjaFirewall can write to the server Authentication log when the brute-"
|
2446 |
"force protection is triggered. This can be useful to the system "
|
2447 |
"administrator for monitoring purposes or banning IPs at the server level."
|
2448 |
msgstr ""
|
2449 |
|
2450 |
+
#: lib/help.php:421
|
2451 |
msgid ""
|
2452 |
"If you have a shared hosting account, keep this option disabled as you do "
|
2453 |
"not have any access to the server's logs."
|
2454 |
msgstr ""
|
2455 |
|
2456 |
+
#: lib/help.php:423
|
2457 |
msgid ""
|
2458 |
"On Debian-based systems, the log is located in <code>/var/log/auth.log</"
|
2459 |
"code>, and on Red Hat-based systems in <code>/var/log/secure</code>. The "
|
2460 |
"logline uses the following format:"
|
2461 |
msgstr ""
|
2462 |
|
2463 |
+
#: lib/help.php:426
|
2464 |
msgid "AA: the process ID (PID)."
|
2465 |
msgstr ""
|
2466 |
|
2467 |
+
#: lib/help.php:427
|
2468 |
msgid "BB: the user IPv4 or IPv6 address."
|
2469 |
msgstr ""
|
2470 |
|
2471 |
+
#: lib/help.php:428
|
2472 |
msgid "CC: the blog (sub-)domain name."
|
2473 |
msgstr ""
|
2474 |
|
2475 |
+
#: lib/help.php:429
|
2476 |
msgid ""
|
2477 |
"DD: the target: it can be either <code>wp-login.php</code> or <code>XML-RPC "
|
2478 |
"API</code>."
|
2479 |
msgstr ""
|
2480 |
|
2481 |
+
#: lib/help.php:430
|
2482 |
msgid "EE: the time, in minutes, the protection will remain active."
|
2483 |
msgstr ""
|
2484 |
|
2485 |
+
#: lib/help.php:432
|
2486 |
msgid "Sample loglines:"
|
2487 |
msgstr ""
|
2488 |
|
2489 |
+
#: lib/help.php:435
|
2490 |
#, php-format
|
2491 |
msgid ""
|
2492 |
"Be careful if you are behind a load balancer, reverse-proxy or CDN because "
|
2497 |
"otherwise you will likely block legitimate users."
|
2498 |
msgstr ""
|
2499 |
|
2500 |
+
#: lib/help.php:449 lib/logs.php:39 lib/wpplus.php:206
|
2501 |
msgid "Firewall Log"
|
2502 |
msgstr ""
|
2503 |
|
2504 |
+
#: lib/help.php:452
|
2505 |
msgid ""
|
2506 |
"The firewall log displays blocked and sanitised requests as well as some "
|
2507 |
"useful information. It has 6 columns:"
|
2508 |
msgstr ""
|
2509 |
|
2510 |
+
#: lib/help.php:453
|
2511 |
msgid "DATE : date and time of the incident."
|
2512 |
msgstr ""
|
2513 |
|
2514 |
+
#: lib/help.php:454
|
2515 |
msgid ""
|
2516 |
"INCIDENT : unique incident number/ID as it was displayed to the blocked user."
|
2517 |
msgstr ""
|
2518 |
|
2519 |
+
#: lib/help.php:455
|
2520 |
msgid ""
|
2521 |
"LEVEL : level of severity (<code>CRITICAL</code>, <code>HIGH</code> or "
|
2522 |
"<code>MEDIUM</code>), information (<code>INFO</code>, <code>UPLOAD</code>) "
|
2523 |
"and debugging mode (<code>DEBUG_ON</code>)."
|
2524 |
msgstr ""
|
2525 |
|
2526 |
+
#: lib/help.php:456
|
2527 |
msgid ""
|
2528 |
"RULE : reference of the NinjaFirewall built-in security rule that triggered "
|
2529 |
"the action. A hyphen (<code>-</code>) instead of a number means it was a "
|
2530 |
"rule from the \"Firewall Policies\" page."
|
2531 |
msgstr ""
|
2532 |
|
2533 |
+
#: lib/help.php:457
|
2534 |
msgid "IP : the user IPv4 or IPv6 address."
|
2535 |
msgstr ""
|
2536 |
|
2537 |
+
#: lib/help.php:458
|
2538 |
msgid ""
|
2539 |
"REQUEST : the HTTP request including offending variables and values as well "
|
2540 |
"as the reason the action was logged."
|
2541 |
msgstr ""
|
2542 |
|
2543 |
+
#: lib/help.php:461 lib/logs_firewall_log.php:164
|
2544 |
msgid "Auto-delete log"
|
2545 |
msgstr ""
|
2546 |
|
2547 |
+
#: lib/help.php:462
|
2548 |
msgid ""
|
2549 |
"This options lets you configure NinjaFirewall to delete its old logs "
|
2550 |
"automatically. By default, logs are never deleted, <b>even when uninstall "
|
2552 |
"delete old logs."
|
2553 |
msgstr ""
|
2554 |
|
2555 |
+
#: lib/help.php:466
|
2556 |
msgid ""
|
2557 |
"Centralized Logging lets you remotely access the firewall log of all your "
|
2558 |
"NinjaFirewall protected websites from one single installation. You do not "
|
2559 |
"need any longer to log in to individual servers to analyse your log data."
|
2560 |
msgstr ""
|
2561 |
|
2562 |
+
#: lib/help.php:466
|
2563 |
#, php-format
|
2564 |
msgid "<a href=\"%s\">Consult our blog</a> for more info about it."
|
2565 |
msgstr ""
|
2566 |
|
2567 |
+
#: lib/help.php:467
|
2568 |
msgid ""
|
2569 |
"Enter your public key (optional): This is the public key that was created "
|
2570 |
"from your main server."
|
2571 |
msgstr ""
|
2572 |
|
2573 |
+
#: lib/help.php:471
|
2574 |
msgid ""
|
2575 |
"Centralized Logging will keep working even if NinjaFirewall is disabled. "
|
2576 |
"Delete your public key below if you want to disable it."
|
2577 |
msgstr ""
|
2578 |
|
2579 |
+
#: lib/help.php:478 lib/logs.php:40 lib/logs_live_log.php:37
|
2580 |
msgid "Live Log"
|
2581 |
msgstr ""
|
2582 |
|
2583 |
+
#: lib/help.php:481
|
2584 |
msgid ""
|
2585 |
"Live Log lets you watch your blog traffic in real time, just like the Unix "
|
2586 |
"<code>tail -f</code> command. Note that requests sent to static elements "
|
2587 |
"like JS/CSS files and images are not managed by NinjaFirewall."
|
2588 |
msgstr ""
|
2589 |
|
2590 |
+
#: lib/help.php:483
|
2591 |
msgid ""
|
2592 |
"You can enable/disable the monitoring process, change the refresh rate, "
|
2593 |
"clear the screen, enable automatic vertical scrolling, change the log "
|
2594 |
"format, select which traffic you want to view (HTTP/HTTPS) and the timezone."
|
2595 |
msgstr ""
|
2596 |
|
2597 |
+
#: lib/help.php:483
|
2598 |
msgid ""
|
2599 |
"You can also apply filters to include or exclude files and folders "
|
2600 |
"(REQUEST_URI)."
|
2601 |
msgstr ""
|
2602 |
|
2603 |
+
#: lib/help.php:486
|
2604 |
msgid ""
|
2605 |
"Live Log does not make use of any WordPress core file (e.g., <code>admin-"
|
2606 |
"ajax.php</code>). It communicates directly with the firewall without loading "
|
2609 |
"value."
|
2610 |
msgstr ""
|
2611 |
|
2612 |
+
#: lib/help.php:488
|
2613 |
msgid ""
|
2614 |
"If you are using the optional <code>.htninja</code> configuration file to "
|
2615 |
"whitelist your IP, the Live Log feature will not work."
|
2616 |
msgstr ""
|
2617 |
|
2618 |
+
#: lib/help.php:492
|
2619 |
msgid "Log Format"
|
2620 |
msgstr ""
|
2621 |
|
2622 |
+
#: lib/help.php:493
|
2623 |
msgid "You can easily customize the log format. Possible values are:"
|
2624 |
msgstr ""
|
2625 |
|
2626 |
+
#: lib/help.php:494
|
2627 |
msgid "<code>%time</code>: the server date, time and timezone."
|
2628 |
msgstr ""
|
2629 |
|
2630 |
+
#: lib/help.php:495
|
2631 |
msgid "<code>%name</code>: authenticated user (HTTP basic auth), if any."
|
2632 |
msgstr ""
|
2633 |
|
2634 |
+
#: lib/help.php:496
|
2635 |
#, php-format
|
2636 |
msgid ""
|
2637 |
"<code>%client</code>: the client REMOTE_ADDR. If you are behind a load "
|
2638 |
"balancer or CDN, this will be its IP."
|
2639 |
msgstr ""
|
2640 |
|
2641 |
+
#: lib/help.php:497
|
2642 |
msgid "<code>%method</code>: HTTP method (e.g., GET, POST)."
|
2643 |
msgstr ""
|
2644 |
|
2645 |
+
#: lib/help.php:498
|
2646 |
#, php-format
|
2647 |
msgid ""
|
2648 |
"<code>%uri</code>: the URI which was given in order to access the page "
|
2649 |
"(REQUEST_URI)."
|
2650 |
msgstr ""
|
2651 |
|
2652 |
+
#: lib/help.php:499
|
2653 |
msgid "<code>%referrer</code>: the referrer (HTTP_REFERER), if any."
|
2654 |
msgstr ""
|
2655 |
|
2656 |
+
#: lib/help.php:500
|
2657 |
#, php-format
|
2658 |
msgid "<code>%ua</code>: the user-agent (HTTP_USER_AGENT), if any."
|
2659 |
msgstr ""
|
2660 |
|
2661 |
+
#: lib/help.php:501
|
2662 |
#, php-format
|
2663 |
msgid ""
|
2664 |
"<code>%forward</code>: HTTP_X_FORWARDED_FOR, if any. If you are behind a "
|
2665 |
"load balancer or CDN, this will likely be the visitor true IP."
|
2666 |
msgstr ""
|
2667 |
|
2668 |
+
#: lib/help.php:502
|
2669 |
msgid "<code>%host</code>: the requested host (HTTP_HOST), if any."
|
2670 |
msgstr ""
|
2671 |
|
2672 |
+
#: lib/help.php:504
|
2673 |
msgid ""
|
2674 |
"Additionally, you can include any of the following characters: <code>\"</"
|
2675 |
"code>, <code>%</code>, <code>[</code>, <code>]</code>, <code>space</code> "
|
2676 |
"and lowercase letters <code>a-z</code>."
|
2677 |
msgstr ""
|
2678 |
|
2679 |
+
#: lib/help.php:515
|
2680 |
msgid ""
|
2681 |
"Your website can run NinjaFirewall and be compliant with the General Data "
|
2682 |
"Protection Regulation (GDPR). For more info, please visit our blog:"
|
2683 |
msgstr ""
|
2684 |
|
2685 |
+
#: lib/help.php:529 lib/security_rules.php:47
|
2686 |
msgid "Rules Updates"
|
2687 |
msgstr ""
|
2688 |
|
2689 |
+
#: lib/help.php:531
|
2690 |
msgid ""
|
2691 |
"To get the most efficient protection, you can ask NinjaFirewall to "
|
2692 |
"automatically update its security rules."
|
2693 |
msgstr ""
|
2694 |
|
2695 |
+
#: lib/help.php:533
|
2696 |
msgid ""
|
2697 |
"Each time a new vulnerability is found in WordPress or one of its plugins/"
|
2698 |
"themes, a new set of security rules will be made available to protect "
|
2699 |
"against such vulnerability if needed."
|
2700 |
msgstr ""
|
2701 |
|
2702 |
+
#: lib/help.php:535
|
2703 |
msgid ""
|
2704 |
"Only security rules will be downloaded. If a new version of NinjaFirewall "
|
2705 |
"(including new files, options and features) was available, it would have to "
|
2706 |
"be updated from the dashboard plugins menu as usual."
|
2707 |
msgstr ""
|
2708 |
|
2709 |
+
#: lib/help.php:537
|
2710 |
msgid ""
|
2711 |
"We recommend to enable this feature, as it is the <strong>best way to keep "
|
2712 |
"your WordPress secure</strong> against new vulnerabilities."
|
2713 |
msgstr ""
|
2714 |
|
2715 |
+
#: lib/help.php:542 lib/security_rules.php:48
|
2716 |
msgid "Rules Editor"
|
2717 |
msgstr ""
|
2718 |
|
2719 |
+
#: lib/help.php:544
|
2720 |
msgid ""
|
2721 |
"Besides the \"Firewall Policies\", NinjaFirewall includes also a large set "
|
2722 |
"of built-in rules used to protect your blog against the most common "
|
2726 |
"individually:"
|
2727 |
msgstr ""
|
2728 |
|
2729 |
+
#: lib/help.php:546
|
2730 |
msgid ""
|
2731 |
"Check your firewall log and find the rule ID you want to disable (it is "
|
2732 |
"displayed in the <code>RULE</code> column)."
|
2733 |
msgstr ""
|
2734 |
|
2735 |
+
#: lib/help.php:547
|
2736 |
msgid ""
|
2737 |
"Select its ID from the enabled rules list below and click the \"Disable it\" "
|
2738 |
"button."
|
2739 |
msgstr ""
|
2740 |
|
2741 |
+
#: lib/help.php:549
|
2742 |
msgid ""
|
2743 |
"Note: if the <code>RULE</code> column from your log shows a hyphen <code>-</"
|
2744 |
"code> instead of a number, that means that the rule can be changed in the "
|
2756 |
msgid "Error: wrong parameter value (%s)."
|
2757 |
msgstr ""
|
2758 |
|
2759 |
+
#: lib/install.php:105 lib/install.php:199 lib/install.php:220
|
2760 |
#, php-format
|
2761 |
msgid ""
|
2762 |
"Error: The following file is not writable, please change its permissions: %s"
|
2763 |
msgstr ""
|
2764 |
|
2765 |
+
#: lib/install.php:133
|
2766 |
#, php-format
|
2767 |
msgid ""
|
2768 |
"NinjaFirewall detected that the requested changes seemed to crash your blog. "
|
2769 |
"%s"
|
2770 |
msgstr ""
|
2771 |
|
2772 |
+
#: lib/install.php:134
|
2773 |
msgid ""
|
2774 |
"Changes have been undone. You may need to modify your selection and try "
|
2775 |
"again."
|
2776 |
msgstr ""
|
2777 |
|
2778 |
+
#: lib/install.php:145
|
2779 |
#, php-format
|
2780 |
msgid "The website front-end returned: HTTP %s %s."
|
2781 |
msgstr ""
|
2782 |
|
2783 |
+
#: lib/install.php:155
|
2784 |
+
msgid "The website front-end did not return the expected page."
|
2785 |
+
msgstr ""
|
2786 |
+
|
2787 |
+
#: lib/install.php:164
|
2788 |
#, php-format
|
2789 |
msgid "The website front-end returned a fatal error: %s."
|
2790 |
msgstr ""
|
2791 |
|
2792 |
+
#: lib/install.php:263 lib/install.php:288 lib/install.php:313
|
2793 |
+
#: lib/install.php:334
|
2794 |
msgid "File is not writable"
|
2795 |
msgstr ""
|
2796 |
|
2797 |
+
#: lib/install_default.php:178
|
2798 |
msgid ""
|
2799 |
"Error: The installer cannot download the security rules from wordpress.org "
|
2800 |
"website."
|
2801 |
msgstr ""
|
2802 |
|
2803 |
+
#: lib/install_default.php:179
|
2804 |
msgid ""
|
2805 |
"The server may be temporarily down or you may have network connectivity "
|
2806 |
"problems? Please try again in a few minutes."
|
2807 |
msgstr ""
|
2808 |
|
2809 |
+
#: lib/install_default.php:180
|
2810 |
msgid ""
|
2811 |
"NinjaFirewall downloads its rules over an HTTPS secure connection. Maybe "
|
2812 |
"your server does not support SSL? You can force NinjaFirewall to use a non-"
|
2814 |
"config.php</strong> file:"
|
2815 |
msgstr ""
|
2816 |
|
2817 |
+
#: lib/install_default.php:255
|
2818 |
#, php-format
|
2819 |
msgid ""
|
2820 |
"NinjaFirewall cannot create its <code>nfwlog/</code>log and cache folder; "
|
3508 |
|
3509 |
#: lib/monitoring_file_check.php:768 lib/monitoring_file_check.php:770
|
3510 |
#: lib/monitoring_file_check.php:790 lib/monitoring_file_check.php:792
|
3511 |
+
#: lib/security_rules_update.php:572 lib/security_rules_update.php:574
|
3512 |
#: lib/utils.php:225 lib/utils.php:311 lib/utils.php:435 lib/utils.php:1035
|
3513 |
#: lib/utils.php:1213 lib/utils.php:1492
|
3514 |
msgid "Blog:"
|
3515 |
msgstr ""
|
3516 |
|
3517 |
#: lib/monitoring_file_check.php:772 lib/monitoring_file_check.php:794
|
3518 |
+
#: lib/security_rules_update.php:577
|
3519 |
#, php-format
|
3520 |
msgid "Date: %s"
|
3521 |
msgstr ""
|
3597 |
msgid "Save Network options"
|
3598 |
msgstr ""
|
3599 |
|
3600 |
+
#: lib/security_rules.php:44 lib/security_rules_update.php:578
|
3601 |
#: ninjafirewall.php:846
|
3602 |
msgid "Security Rules"
|
3603 |
msgstr ""
|
3700 |
msgid "Security rules have been updated."
|
3701 |
msgstr ""
|
3702 |
|
3703 |
+
#: lib/security_rules_update.php:91 lib/security_rules_update.php:454
|
3704 |
msgid "No security rules update available."
|
3705 |
msgstr ""
|
3706 |
|
3790 |
msgid "Error: Unserialized rules seem corrupted."
|
3791 |
msgstr ""
|
3792 |
|
3793 |
+
#: lib/security_rules_update.php:397
|
3794 |
#, php-format
|
3795 |
msgid "Security rules updated to version %s."
|
3796 |
msgstr ""
|
3797 |
|
3798 |
+
#: lib/security_rules_update.php:443
|
3799 |
msgid "Error: Unable to retrieve the new rules version."
|
3800 |
msgstr ""
|
3801 |
|
3802 |
+
#: lib/security_rules_update.php:461
|
3803 |
#, php-format
|
3804 |
msgid "Error: Server returned a %s HTTP error code (#1)."
|
3805 |
msgstr ""
|
3806 |
|
3807 |
+
#: lib/security_rules_update.php:468 lib/security_rules_update.php:534
|
3808 |
msgid "Error: Unable to connect to the remote server"
|
3809 |
msgstr ""
|
3810 |
|
3811 |
+
#: lib/security_rules_update.php:498
|
3812 |
#, php-format
|
3813 |
msgid "Error: The new rules versions do not match (%s != %s)."
|
3814 |
msgstr ""
|
3815 |
|
3816 |
+
#: lib/security_rules_update.php:512
|
3817 |
#, php-format
|
3818 |
msgid ""
|
3819 |
"Error: The new rules %s digital signature is not correct. Aborting update, "
|
3820 |
"rules may have been tampered with."
|
3821 |
msgstr ""
|
3822 |
|
3823 |
+
#: lib/security_rules_update.php:527
|
3824 |
#, php-format
|
3825 |
msgid "Error: Server returned a %s HTTP error code (#2)."
|
3826 |
msgstr ""
|
3827 |
|
3828 |
+
#: lib/security_rules_update.php:569
|
3829 |
msgid "[NinjaFirewall] Security rules update"
|
3830 |
msgstr ""
|
3831 |
|
3832 |
+
#: lib/security_rules_update.php:570
|
3833 |
msgid "NinjaFirewall security rules have been updated:"
|
3834 |
msgstr ""
|
3835 |
|
3836 |
+
#: lib/security_rules_update.php:576
|
3837 |
msgid "Rules version:"
|
3838 |
msgstr ""
|
3839 |
|
3840 |
+
#: lib/security_rules_update.php:578
|
3841 |
#, php-format
|
3842 |
msgid "This notification can be turned off from NinjaFirewall \"%s\" page."
|
3843 |
msgstr ""
|
lib/custom_plugin.php
CHANGED
@@ -17,6 +17,11 @@
|
|
17 |
|
18 |
if (! defined( 'NFW_ENGINE_VERSION' ) ) { die( 'Forbidden' ); }
|
19 |
|
|
|
|
|
|
|
|
|
|
|
20 |
// Plugin's email signature
|
21 |
define( 'NF_PG_SIGNATURE', 'NinjaFirewall (WP Edition) - https://nintechnet.com/' ."\n".
|
22 |
__('Support forum:', 'ninjafirewall') . ' http://wordpress.org/support/plugin/ninjafirewall' );
|
17 |
|
18 |
if (! defined( 'NFW_ENGINE_VERSION' ) ) { die( 'Forbidden' ); }
|
19 |
|
20 |
+
// ---------------------------------------------------------------------
|
21 |
+
// WordPress functions/API can be used here because this file
|
22 |
+
// is loaded by WordPress.
|
23 |
+
// ---------------------------------------------------------------------
|
24 |
+
|
25 |
// Plugin's email signature
|
26 |
define( 'NF_PG_SIGNATURE', 'NinjaFirewall (WP Edition) - https://nintechnet.com/' ."\n".
|
27 |
__('Support forum:', 'ninjafirewall') . ' http://wordpress.org/support/plugin/ninjafirewall' );
|
lib/event_updates.php
CHANGED
@@ -45,6 +45,9 @@ function nfw_check_security_updates() {
|
|
45 |
// Fetch latest data:
|
46 |
$list = array();
|
47 |
$list = nfw_fetch_security_updates( $url );
|
|
|
|
|
|
|
48 |
|
49 |
if (! isset( $list['wordpress'] ) || ! isset( $list['themes'] ) || ! isset( $list['plugins'] ) ) {
|
50 |
nfw_log_error("nfw_check_security_updates: json-encoded array is corrupted");
|
45 |
// Fetch latest data:
|
46 |
$list = array();
|
47 |
$list = nfw_fetch_security_updates( $url );
|
48 |
+
if ( $list === false ) {
|
49 |
+
return false;
|
50 |
+
}
|
51 |
|
52 |
if (! isset( $list['wordpress'] ) || ! isset( $list['themes'] ) || ! isset( $list['plugins'] ) ) {
|
53 |
nfw_log_error("nfw_check_security_updates: json-encoded array is corrupted");
|
lib/firewall.php
CHANGED
@@ -128,6 +128,28 @@ if (! empty($nfw_['nfw_options']['disable_error_handler']) ) {
|
|
128 |
|
129 |
nfw_check_ip();
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
// We only start a session if users already have a PHP session
|
132 |
// cookie because we don't need write access yet:
|
133 |
$nfw_['session_name'] = ini_get('session.name');
|
@@ -759,7 +781,7 @@ function nfw_check_request( $nfw_rules, $nfw_options ) {
|
|
759 |
@$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
|
760 |
}
|
761 |
|
762 |
-
if ( nfw_matching( 'RAW', $_SERVER['REQUEST_METHOD'], $nfw_rules, $rules, 1, $id, $
|
763 |
nfw_check_subrule( 'RAW', $_SERVER['REQUEST_METHOD'], $nfw_rules, $nfw_options, $rules, $id );
|
764 |
}
|
765 |
continue;
|
@@ -775,7 +797,7 @@ function nfw_check_request( $nfw_rules, $nfw_options ) {
|
|
775 |
|
776 |
foreach ($GLOBALS['_' . $where] as $key => $val) {
|
777 |
|
778 |
-
if ( nfw_matching( $where, $key, $nfw_rules, $rules, 1, $id,
|
779 |
nfw_check_subrule( $where, $key, $nfw_rules, $nfw_options, $rules, $id );
|
780 |
}
|
781 |
|
@@ -787,7 +809,7 @@ function nfw_check_request( $nfw_rules, $nfw_options ) {
|
|
787 |
|
788 |
if ( isset( $_SERVER[$where] ) ) {
|
789 |
|
790 |
-
if ( nfw_matching( 'SERVER', $where, $nfw_rules, $rules, 1, $id,
|
791 |
nfw_check_subrule( 'SERVER', $where, $nfw_rules, $nfw_options, $rules, $id );
|
792 |
}
|
793 |
continue;
|
@@ -806,7 +828,7 @@ function nfw_check_request( $nfw_rules, $nfw_options ) {
|
|
806 |
continue;
|
807 |
}
|
808 |
|
809 |
-
if ( nfw_matching( $w[0], $w[1], $nfw_rules, $rules, 1, $id,
|
810 |
nfw_check_subrule( $w[0], $w[1], $nfw_rules, $nfw_options, $rules, $id );
|
811 |
}
|
812 |
|
@@ -852,7 +874,7 @@ function nfw_check_temp_hash( $where, $what ) {
|
|
852 |
function nfw_check_subrule( $w0, $w1, $nfw_rules, $nfw_options, $rules, $id ) {
|
853 |
|
854 |
if ( isset( $rules['cha'][1]['cap'] ) ) {
|
855 |
-
nfw_matching( $w0, $w1, $nfw_rules, $rules, 2, $id,
|
856 |
|
857 |
} else {
|
858 |
$w = explode(':', $rules['cha'][2]['whe']);
|
@@ -867,7 +889,7 @@ function nfw_check_subrule( $w0, $w1, $nfw_rules, $nfw_options, $rules, $id ) {
|
|
867 |
if (! isset( $HTTP_RAW_POST_DATA ) ) {
|
868 |
@$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
|
869 |
}
|
870 |
-
nfw_matching( $_SERVER['REQUEST_METHOD'], 'RAW', $nfw_rules, $rules, 2, $id, $
|
871 |
return;
|
872 |
}
|
873 |
$w[2] = $w[1] = $w[0];
|
@@ -888,7 +910,7 @@ function nfw_check_subrule( $w0, $w1, $nfw_rules, $nfw_options, $rules, $id ) {
|
|
888 |
if ( nfw_disabled_scan( $w[0], $nfw_options, $w[2] ) ) {
|
889 |
return;
|
890 |
} else {
|
891 |
-
nfw_matching( $w[0], $w[1], $nfw_rules, $rules, 2, $id,
|
892 |
}
|
893 |
}
|
894 |
|
@@ -913,7 +935,7 @@ function nfw_disabled_scan( $where, $nfw_options, $extra = null ) {
|
|
913 |
|
914 |
// =====================================================================
|
915 |
|
916 |
-
function nfw_matching( $where, $key, $nfw_rules, $rules, $subid, $id, $RAW_POST = null
|
917 |
|
918 |
global $nfw_;
|
919 |
|
@@ -1275,7 +1297,7 @@ function nfw_check_b64( $key, $string ) {
|
|
1275 |
$decoded = base64_decode($string);
|
1276 |
if ( strlen($decoded) < 4 ) { return; }
|
1277 |
|
1278 |
-
if ( preg_match( '`\b(?:\$?_(COOKIE|ENV|FILES|(?:GE|POS|REQUES)T|SE(RVER|SSION))|HTTP_(?:(?:POST|GET)_VARS|RAW_POST_DATA)|GLOBALS)\s*[=\[)]|\b(?i:array_map|assert|base64_(?:de|en)code|chmod|curl_exec|(?:ex|im)plode|error_reporting|eval|file(?:_get_contents)?|f(?:open|write|close)|fsockopen|function_exists|gzinflate|md5|move_uploaded_file|ob_start|passthru|[ep]reg_replace|phpinfo|stripslashes|strrev|(?:shell_)?exec|substr|system|unlink)\s*\(|\becho\s*[\'"]|<(?i:a[\s/]|applet|div|embed|i?frame(?:set)?|img|link|meta|marquee|object|script|style|textarea)\b|\W\$\{\s*[\'"]\w+[\'"]|<\?(?i:php|=)|(?i:(?:\b|\d)select\b.+?from\b.+?(?:\b|\d)where|(?:\b|\d)insert\b.+?into\b|(?:\b|\d)union\b.+?(?:\b|\d)select\b|(?:\b|\d)update\b.+?(?:\b|\d)set\b)|^.{0,25}[;{}]?\b[OC]:\+?\d+:"[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*":\+?\d+:{.*?}`', $decoded) ) {
|
1279 |
nfw_log('BASE64-encoded injection', 'POST:' . $key . ' = ' . $string, '3', 0);
|
1280 |
nfw_block();
|
1281 |
}
|
@@ -1292,7 +1314,7 @@ function nfw_sanitise( $str, $how, $msg ) {
|
|
1292 |
global $nfw_;
|
1293 |
|
1294 |
if (is_string($str) ) {
|
1295 |
-
|
1296 |
if ($how == 1) {
|
1297 |
// Full WAF
|
1298 |
if (! empty( $nfw_['mysqli'] ) ) {
|
@@ -1326,7 +1348,6 @@ function nfw_sanitise( $str, $how, $msg ) {
|
|
1326 |
|
1327 |
} else if (is_array($str) ) {
|
1328 |
foreach($str as $key => $value) {
|
1329 |
-
if (get_magic_quotes_gpc() ) {$key = stripslashes($key);}
|
1330 |
if ($how == 3) {
|
1331 |
$key2 = str_replace( array('\\', "'", "\x00", "\x1a", '`', '<', '>'),
|
1332 |
array('\\\\', "\\'", '-', '-', '\\`', '<', '>'), $key, $occ);
|
128 |
|
129 |
nfw_check_ip();
|
130 |
|
131 |
+
// Superglobals override
|
132 |
+
if (! empty($nfw_['nfw_options']['php_superglobals']) ) {
|
133 |
+
$sgs = array(
|
134 |
+
'_GET', '_POST', '_SESSION', '_COOKIE',
|
135 |
+
'_SERVER', '_FILES', '_ENV', '_REQUEST', 'GLOBALS'
|
136 |
+
);
|
137 |
+
foreach( $sgs as $sg ) {
|
138 |
+
if ( isset( $_GET[$sg] ) ) {
|
139 |
+
nfw_log('Superglobals override attempt', "\$_GET[$sg]: ". serialize( $_GET[$sg] ), 6, 0);
|
140 |
+
unset( $_GET[$sg] );
|
141 |
+
}
|
142 |
+
if ( isset( $_POST[$sg] ) ) {
|
143 |
+
nfw_log('Superglobals override attempt', "\$_POST[$sg]: ". serialize( $_POST[$sg] ), 6, 0);
|
144 |
+
unset( $_POST[$sg] );
|
145 |
+
}
|
146 |
+
if ( isset( $_COOKIE[$sg] ) ) {
|
147 |
+
nfw_log('Superglobals override attempt', "\$_COOKIE[$sg]: ". serialize( $_COOKIE[$sg] ), 6, 0);
|
148 |
+
unset( $_COOKIE[$sg] );
|
149 |
+
}
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
// We only start a session if users already have a PHP session
|
154 |
// cookie because we don't need write access yet:
|
155 |
$nfw_['session_name'] = ini_get('session.name');
|
781 |
@$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
|
782 |
}
|
783 |
|
784 |
+
if ( nfw_matching( 'RAW', $_SERVER['REQUEST_METHOD'], $nfw_rules, $rules, 1, $id, $nfw_options, $HTTP_RAW_POST_DATA ) ) {
|
785 |
nfw_check_subrule( 'RAW', $_SERVER['REQUEST_METHOD'], $nfw_rules, $nfw_options, $rules, $id );
|
786 |
}
|
787 |
continue;
|
797 |
|
798 |
foreach ($GLOBALS['_' . $where] as $key => $val) {
|
799 |
|
800 |
+
if ( nfw_matching( $where, $key, $nfw_rules, $rules, 1, $id, $nfw_options ) ) {
|
801 |
nfw_check_subrule( $where, $key, $nfw_rules, $nfw_options, $rules, $id );
|
802 |
}
|
803 |
|
809 |
|
810 |
if ( isset( $_SERVER[$where] ) ) {
|
811 |
|
812 |
+
if ( nfw_matching( 'SERVER', $where, $nfw_rules, $rules, 1, $id, $nfw_options ) ) {
|
813 |
nfw_check_subrule( 'SERVER', $where, $nfw_rules, $nfw_options, $rules, $id );
|
814 |
}
|
815 |
continue;
|
828 |
continue;
|
829 |
}
|
830 |
|
831 |
+
if ( nfw_matching( $w[0], $w[1], $nfw_rules, $rules, 1, $id, $nfw_options ) ) {
|
832 |
nfw_check_subrule( $w[0], $w[1], $nfw_rules, $nfw_options, $rules, $id );
|
833 |
}
|
834 |
|
874 |
function nfw_check_subrule( $w0, $w1, $nfw_rules, $nfw_options, $rules, $id ) {
|
875 |
|
876 |
if ( isset( $rules['cha'][1]['cap'] ) ) {
|
877 |
+
nfw_matching( $w0, $w1, $nfw_rules, $rules, 2, $id, $nfw_options );
|
878 |
|
879 |
} else {
|
880 |
$w = explode(':', $rules['cha'][2]['whe']);
|
889 |
if (! isset( $HTTP_RAW_POST_DATA ) ) {
|
890 |
@$HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
|
891 |
}
|
892 |
+
nfw_matching( $_SERVER['REQUEST_METHOD'], 'RAW', $nfw_rules, $rules, 2, $id, $nfw_options, $HTTP_RAW_POST_DATA );
|
893 |
return;
|
894 |
}
|
895 |
$w[2] = $w[1] = $w[0];
|
910 |
if ( nfw_disabled_scan( $w[0], $nfw_options, $w[2] ) ) {
|
911 |
return;
|
912 |
} else {
|
913 |
+
nfw_matching( $w[0], $w[1], $nfw_rules, $rules, 2, $id, $nfw_options);
|
914 |
}
|
915 |
}
|
916 |
|
935 |
|
936 |
// =====================================================================
|
937 |
|
938 |
+
function nfw_matching( $where, $key, $nfw_rules, $rules, $subid, $id, $nfw_options, $RAW_POST = null ) {
|
939 |
|
940 |
global $nfw_;
|
941 |
|
1297 |
$decoded = base64_decode($string);
|
1298 |
if ( strlen($decoded) < 4 ) { return; }
|
1299 |
|
1300 |
+
if ( preg_match( '`\b(?:\$?_(COOKIE|ENV|FILES|(?:GE|POS|REQUES)T|SE(RVER|SSION))|HTTP_(?:(?:POST|GET)_VARS|RAW_POST_DATA)|GLOBALS)\s*[=\[)]|\b(?i:array_map|assert|base64_(?:de|en)code|chmod|curl_exec|(?:ex|im)plode|error_reporting|eval|file(?:_get_contents)?|f(?:open|write|close)|fsockopen|function_exists|gzinflate|md5|move_uploaded_file|ob_start|passthru|[ep]reg_replace|phpinfo|stripslashes|strrev|(?:shell_)?exec|substr|system|unlink)\s*\(|\becho\s*[\'"]|<(?i:a[\s/]|applet|div|embed|i?frame(?:set)?|img|link|meta|marquee|object|script|style|textarea)\b|\W\$\{\s*[\'"]\w+[\'"]|<\?(?i:php|=)\s|(?i:(?:\b|\d)select\b.+?from\b.+?(?:\b|\d)where|(?:\b|\d)insert\b.+?into\b|(?:\b|\d)union\b.+?(?:\b|\d)select\b|(?:\b|\d)update\b.+?(?:\b|\d)set\b)|^.{0,25}[;{}]?\b[OC]:\+?\d+:"[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*":\+?\d+:{.*?}`', $decoded) ) {
|
1301 |
nfw_log('BASE64-encoded injection', 'POST:' . $key . ' = ' . $string, '3', 0);
|
1302 |
nfw_block();
|
1303 |
}
|
1314 |
global $nfw_;
|
1315 |
|
1316 |
if (is_string($str) ) {
|
1317 |
+
|
1318 |
if ($how == 1) {
|
1319 |
// Full WAF
|
1320 |
if (! empty( $nfw_['mysqli'] ) ) {
|
1348 |
|
1349 |
} else if (is_array($str) ) {
|
1350 |
foreach($str as $key => $value) {
|
|
|
1351 |
if ($how == 3) {
|
1352 |
$key2 = str_replace( array('\\', "'", "\x00", "\x1a", '`', '<', '>'),
|
1353 |
array('\\\\', "\\'", '-', '-', '\\`', '<', '>'), $key, $occ);
|
lib/firewall_options.php
CHANGED
@@ -358,6 +358,10 @@ function nf_sub_options_save() {
|
|
358 |
$nfw_options['widgetnews'] = (int) $_POST['nfw_options']['widgetnews'];
|
359 |
}
|
360 |
|
|
|
|
|
|
|
|
|
361 |
// Save them :
|
362 |
nfw_update_option( 'nfw_options', $nfw_options);
|
363 |
|
@@ -438,6 +442,8 @@ function nf_sub_options_import( $file ) {
|
|
438 |
|
439 |
// Fix paths and directories:
|
440 |
$nfw_options['logo'] = plugins_url() . '/ninjafirewall/images/ninjafirewall_75.png';
|
|
|
|
|
441 |
// We must preserve the previous option, but we still need to adjust
|
442 |
// the paths because WP_CONTENT_DIR can be user-defined and thus different (e.g., server migration):
|
443 |
if ( isset( $nfw_options['wp_dir'] ) ) {
|
358 |
$nfw_options['widgetnews'] = (int) $_POST['nfw_options']['widgetnews'];
|
359 |
}
|
360 |
|
361 |
+
// Logo
|
362 |
+
$nfw_options['logo'] = plugins_url() . '/ninjafirewall/images/ninjafirewall_75.png';
|
363 |
+
$nfw_options['logo'] = preg_replace( '/^https?:/', '', $nfw_options['logo'] );
|
364 |
+
|
365 |
// Save them :
|
366 |
nfw_update_option( 'nfw_options', $nfw_options);
|
367 |
|
442 |
|
443 |
// Fix paths and directories:
|
444 |
$nfw_options['logo'] = plugins_url() . '/ninjafirewall/images/ninjafirewall_75.png';
|
445 |
+
$nfw_options['logo'] = preg_replace( '/^https?:/', '', $nfw_options['logo'] );
|
446 |
+
|
447 |
// We must preserve the previous option, but we still need to adjust
|
448 |
// the paths because WP_CONTENT_DIR can be user-defined and thus different (e.g., server migration):
|
449 |
if ( isset( $nfw_options['wp_dir'] ) ) {
|
lib/firewall_policies.php
CHANGED
@@ -988,6 +988,11 @@ wp_nonce_field('policies_save', 'nfwnonce', 0);
|
|
988 |
} else {
|
989 |
$php_path_i = 1;
|
990 |
}
|
|
|
|
|
|
|
|
|
|
|
991 |
?>
|
992 |
<h3>PHP</h3>
|
993 |
<table class="form-table nfw-table">
|
@@ -1040,6 +1045,12 @@ wp_nonce_field('policies_save', 'nfwnonce', 0);
|
|
1040 |
<p><label><input type="checkbox" name="nfw_rules[php_objects_http_referer]" value="1"<?php echo $NFW_OBJECTS_HTTP_REFERER ?>><code>HTTP_REFERER</code></label><p>
|
1041 |
</td>
|
1042 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
1043 |
<tr>
|
1044 |
<th scope="row" class="row-mid"><?php _e('Hide PHP notice and error messages', 'ninjafirewall') ?></th>
|
1045 |
<td>
|
@@ -1380,6 +1391,12 @@ function nf_sub_policies_save() {
|
|
1380 |
} else {
|
1381 |
$nfw_options['php_path_i'] = 1;
|
1382 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
1383 |
|
1384 |
// We change those policies only if we're in Full WAF mode
|
1385 |
if (! defined( 'NFW_WPWAF' ) ) {
|
@@ -1635,6 +1652,7 @@ function nf_sub_policies_default() {
|
|
1635 |
$nfw_options['referer_post'] = 0;
|
1636 |
$nfw_options['no_host_ip'] = 0;
|
1637 |
$nfw_options['allow_local_ip'] = 1; // 1 == no !
|
|
|
1638 |
$nfw_options['php_errors'] = 1;
|
1639 |
$nfw_options['php_self'] = 1;
|
1640 |
$nfw_options['php_path_t'] = 1;
|
988 |
} else {
|
989 |
$php_path_i = 1;
|
990 |
}
|
991 |
+
if ( empty( $nfw_options['php_superglobals']) ) {
|
992 |
+
$php_superglobals = 0;
|
993 |
+
} else {
|
994 |
+
$php_superglobals = 1;
|
995 |
+
}
|
996 |
?>
|
997 |
<h3>PHP</h3>
|
998 |
<table class="form-table nfw-table">
|
1045 |
<p><label><input type="checkbox" name="nfw_rules[php_objects_http_referer]" value="1"<?php echo $NFW_OBJECTS_HTTP_REFERER ?>><code>HTTP_REFERER</code></label><p>
|
1046 |
</td>
|
1047 |
</tr>
|
1048 |
+
<tr>
|
1049 |
+
<th scope="row" class="row-mid"><?php _e('Block attempts to override PHP Superglobals', 'ninjafirewall') ?></th>
|
1050 |
+
<td>
|
1051 |
+
<?php nfw_toggle_switch( 'info', 'nfw_options[php_superglobals]', $yes, $no, 'small', $php_superglobals ) ?>
|
1052 |
+
</td>
|
1053 |
+
</tr>
|
1054 |
<tr>
|
1055 |
<th scope="row" class="row-mid"><?php _e('Hide PHP notice and error messages', 'ninjafirewall') ?></th>
|
1056 |
<td>
|
1391 |
} else {
|
1392 |
$nfw_options['php_path_i'] = 1;
|
1393 |
}
|
1394 |
+
// Superglobals override
|
1395 |
+
if ( empty( $_POST['nfw_options']['php_superglobals']) ) {
|
1396 |
+
$nfw_options['php_superglobals'] = 0;
|
1397 |
+
} else {
|
1398 |
+
$nfw_options['php_superglobals'] = 1;
|
1399 |
+
}
|
1400 |
|
1401 |
// We change those policies only if we're in Full WAF mode
|
1402 |
if (! defined( 'NFW_WPWAF' ) ) {
|
1652 |
$nfw_options['referer_post'] = 0;
|
1653 |
$nfw_options['no_host_ip'] = 0;
|
1654 |
$nfw_options['allow_local_ip'] = 1; // 1 == no !
|
1655 |
+
$nfw_options['php_superglobals'] = 0;
|
1656 |
$nfw_options['php_errors'] = 1;
|
1657 |
$nfw_options['php_self'] = 1;
|
1658 |
$nfw_options['php_path_t'] = 1;
|
lib/help.php
CHANGED
@@ -290,6 +290,8 @@ function help_nfsubpolicies() {
|
|
290 |
|
291 |
<p><strong>' . sprintf( __('Block serialized PHP objects', 'ninjafirewall'). '</strong><br />' . __('Object Serialization is a PHP feature used by many applications to generate a storable representation of a value. However, some insecure PHP applications and plugins can turn that feature into a critical vulnerability called <a href="%s">PHP Object Injection</a>. This option can block serialized PHP objects found inside a a <code>GET</code> or <code>POST</code> request, cookies, user agent and referrer variables.', 'ninjafirewall'), 'https://www.owasp.org/index.php/PHP_Object_Injection'). '</p>
|
292 |
|
|
|
|
|
293 |
<p><strong>' . __('Hide PHP notice and error messages', 'ninjafirewall'). '</strong><br />' . __('This option lets you hide errors returned by your scripts. Such errors can leak sensitive informations which can be exploited by hackers.', 'ninjafirewall'). '</p>
|
294 |
|
295 |
<p><strong>' . __('Sanitise <code>PHP_SELF</code>, <code>PATH_TRANSLATED</code>, <code>PATH_INFO</code>', 'ninjafirewall'). '</strong><br />' . __('This option can sanitise any dangerous characters found in those 3 server variables to prevent various XSS and database injection attempts.', 'ninjafirewall'). '</p>
|
290 |
|
291 |
<p><strong>' . sprintf( __('Block serialized PHP objects', 'ninjafirewall'). '</strong><br />' . __('Object Serialization is a PHP feature used by many applications to generate a storable representation of a value. However, some insecure PHP applications and plugins can turn that feature into a critical vulnerability called <a href="%s">PHP Object Injection</a>. This option can block serialized PHP objects found inside a a <code>GET</code> or <code>POST</code> request, cookies, user agent and referrer variables.', 'ninjafirewall'), 'https://www.owasp.org/index.php/PHP_Object_Injection'). '</p>
|
292 |
|
293 |
+
<p><strong>' . sprintf( __('Block attempts to override PHP Superglobals', 'ninjafirewall'). '</strong><br />' . __('This policy will block attempts to override superglobals (%s). A plugin or a theme could make an unsafe use of some PHP functions that could potentially override superglobals. Enabling this option will not block the request but unset the dangerous value and write the event ot the firewall log.', 'ninjafirewall'), '<code>_GET</code>, <code>_POST</code>, <code>_COOKIE</code>, <code>_SESSION</code>, <code>_SERVER</code>, <code>_FILES</code>, <code>_ENV</code>, <code>_REQUEST</code> and <code>GLOBALS</code>'). '</p>
|
294 |
+
|
295 |
<p><strong>' . __('Hide PHP notice and error messages', 'ninjafirewall'). '</strong><br />' . __('This option lets you hide errors returned by your scripts. Such errors can leak sensitive informations which can be exploited by hackers.', 'ninjafirewall'). '</p>
|
296 |
|
297 |
<p><strong>' . __('Sanitise <code>PHP_SELF</code>, <code>PATH_TRANSLATED</code>, <code>PATH_INFO</code>', 'ninjafirewall'). '</strong><br />' . __('This option can sanitise any dangerous characters found in those 3 server variables to prevent various XSS and database injection attempts.', 'ninjafirewall'). '</p>
|
lib/install.php
CHANGED
@@ -123,6 +123,11 @@ function nfw_fullwaf_htaccess( $httpserver ) {
|
|
123 |
|
124 |
function nfw_waf_sandbox() {
|
125 |
|
|
|
|
|
|
|
|
|
|
|
126 |
@session_write_close();
|
127 |
|
128 |
$sandbox_error = __('NinjaFirewall detected that the requested changes seemed to crash your blog. %s', 'ninjafirewall') ."\n".
|
@@ -130,6 +135,7 @@ function nfw_waf_sandbox() {
|
|
130 |
$headers['Cache-Control'] = 'no-cache';
|
131 |
$url = home_url( '/' ) .'?'. time();
|
132 |
$res = wp_remote_get( $url );
|
|
|
133 |
if (! is_wp_error( $res ) ) {
|
134 |
// Look for HTTP error
|
135 |
if ( $res['response']['code'] >= 400 ) {
|
@@ -143,6 +149,13 @@ function nfw_waf_sandbox() {
|
|
143 |
);
|
144 |
return $error_msg;
|
145 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
|
147 |
} else {
|
148 |
$error_msg = sprintf(
|
@@ -208,6 +221,15 @@ function nfw_fullwaf_ini( $httpserver, $initype ) {
|
|
208 |
htmlspecialchars( $NFW_ABSPATH . $initype )
|
209 |
);
|
210 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
return true;
|
212 |
}
|
213 |
|
123 |
|
124 |
function nfw_waf_sandbox() {
|
125 |
|
126 |
+
// Bypass (undocumented):
|
127 |
+
if ( defined('NFW_BYPASS_SANDBOX') && NFW_BYPASS_SANDBOX == true ) {
|
128 |
+
return true;
|
129 |
+
}
|
130 |
+
|
131 |
@session_write_close();
|
132 |
|
133 |
$sandbox_error = __('NinjaFirewall detected that the requested changes seemed to crash your blog. %s', 'ninjafirewall') ."\n".
|
135 |
$headers['Cache-Control'] = 'no-cache';
|
136 |
$url = home_url( '/' ) .'?'. time();
|
137 |
$res = wp_remote_get( $url );
|
138 |
+
$blogname = get_option( 'blogname' );
|
139 |
if (! is_wp_error( $res ) ) {
|
140 |
// Look for HTTP error
|
141 |
if ( $res['response']['code'] >= 400 ) {
|
149 |
);
|
150 |
return $error_msg;
|
151 |
}
|
152 |
+
if ( stripos( $res['body'], $blogname ) === false ) {
|
153 |
+
$error_msg = sprintf(
|
154 |
+
$sandbox_error,
|
155 |
+
__('The website front-end did not return the expected page.', 'ninjafirewall')
|
156 |
+
);
|
157 |
+
return $error_msg;
|
158 |
+
}
|
159 |
|
160 |
} else {
|
161 |
$error_msg = sprintf(
|
221 |
htmlspecialchars( $NFW_ABSPATH . $initype )
|
222 |
);
|
223 |
}
|
224 |
+
|
225 |
+
// Sandbox
|
226 |
+
$res = nfw_waf_sandbox();
|
227 |
+
if ( $res !== true ) {
|
228 |
+
// Undo
|
229 |
+
@file_put_contents( $NFW_ABSPATH . $initype, $ini_content, LOCK_EX );
|
230 |
+
return $res;
|
231 |
+
}
|
232 |
+
|
233 |
return true;
|
234 |
}
|
235 |
|
lib/install_default.php
CHANGED
@@ -40,6 +40,9 @@ function nfw_load_default_conf() {
|
|
40 |
wp_clear_scheduled_hook('nfdailyreport');
|
41 |
}
|
42 |
|
|
|
|
|
|
|
43 |
$nfw_options = array(
|
44 |
// ---------------------------------------------------------------
|
45 |
// The next 6 keys must always be present because they are used
|
@@ -47,7 +50,7 @@ function nfw_load_default_conf() {
|
|
47 |
// is corrupted or not:
|
48 |
'enabled' => 1,
|
49 |
'blocked_msg' => base64_encode(NFW_DEFAULT_MSG),
|
50 |
-
'logo' =>
|
51 |
'ret_code' => 403,
|
52 |
'scan_protocol' => 3,
|
53 |
'get_scan' => 1,
|
@@ -69,6 +72,7 @@ function nfw_load_default_conf() {
|
|
69 |
'referer_post' => 0,
|
70 |
'no_host_ip' => 0,
|
71 |
'allow_local_ip' => 1, // 1 == no !
|
|
|
72 |
'php_errors' => 1,
|
73 |
'php_self' => 1,
|
74 |
'php_path_t' => 1,
|
40 |
wp_clear_scheduled_hook('nfdailyreport');
|
41 |
}
|
42 |
|
43 |
+
$logo = plugins_url() . '/ninjafirewall/images/ninjafirewall_75.png';
|
44 |
+
$logo = preg_replace( '/^https?:/', '', $logo );
|
45 |
+
|
46 |
$nfw_options = array(
|
47 |
// ---------------------------------------------------------------
|
48 |
// The next 6 keys must always be present because they are used
|
50 |
// is corrupted or not:
|
51 |
'enabled' => 1,
|
52 |
'blocked_msg' => base64_encode(NFW_DEFAULT_MSG),
|
53 |
+
'logo' => $logo,
|
54 |
'ret_code' => 403,
|
55 |
'scan_protocol' => 3,
|
56 |
'get_scan' => 1,
|
72 |
'referer_post' => 0,
|
73 |
'no_host_ip' => 0,
|
74 |
'allow_local_ip' => 1, // 1 == no !
|
75 |
+
'php_superglobals'=> 0,
|
76 |
'php_errors' => 1,
|
77 |
'php_self' => 1,
|
78 |
'php_path_t' => 1,
|
lib/security_rules_update.php
CHANGED
@@ -381,6 +381,10 @@ function nf_sub_do_updates($update_url, $update_log, $NFUPDATESDO = 1) {
|
|
381 |
$new_rules[NFW_DOC_ROOT]['ena'] = $nfw_rules[NFW_DOC_ROOT]['ena'];
|
382 |
}
|
383 |
|
|
|
|
|
|
|
|
|
384 |
// Update rules in the DB :
|
385 |
nfw_update_option('nfw_rules', $new_rules);
|
386 |
|
381 |
$new_rules[NFW_DOC_ROOT]['ena'] = $nfw_rules[NFW_DOC_ROOT]['ena'];
|
382 |
}
|
383 |
|
384 |
+
// NFW_OBJECTS (Block serialized PHP objects): we must keep the
|
385 |
+
// value defined by the user in the Firewall Policies page:
|
386 |
+
$new_rules[NFW_OBJECTS]['cha'][1]['whe'] = $nfw_rules[NFW_OBJECTS]['cha'][1]['whe'];
|
387 |
+
|
388 |
// Update rules in the DB :
|
389 |
nfw_update_option('nfw_rules', $new_rules);
|
390 |
|
lib/utils.php
CHANGED
@@ -1445,7 +1445,7 @@ add_action( 'plugins_loaded', 'nfw_load_optmon' );
|
|
1445 |
// ---------------------------------------------------------------------
|
1446 |
// $type = settings or injection.
|
1447 |
|
1448 |
-
function nf_monitor_options_alert( $option, $value, $old_value
|
1449 |
|
1450 |
$nfw_options = nfw_get_option( 'nfw_options' );
|
1451 |
|
@@ -1572,5 +1572,16 @@ function nfw_dropins() {
|
|
1572 |
|
1573 |
add_action('plugins_loaded', 'nfw_dropins', -1);
|
1574 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1575 |
// ---------------------------------------------------------------------
|
1576 |
// EOF
|
1445 |
// ---------------------------------------------------------------------
|
1446 |
// $type = settings or injection.
|
1447 |
|
1448 |
+
function nf_monitor_options_alert( $option, $value, $old_value, $type ) {
|
1449 |
|
1450 |
$nfw_options = nfw_get_option( 'nfw_options' );
|
1451 |
|
1572 |
|
1573 |
add_action('plugins_loaded', 'nfw_dropins', -1);
|
1574 |
|
1575 |
+
// ---------------------------------------------------------------------
|
1576 |
+
// For WP <4.9.
|
1577 |
+
|
1578 |
+
if (! function_exists( 'readonly' ) ) {
|
1579 |
+
function readonly( $var, $val) {
|
1580 |
+
if ( $var == $val ) {
|
1581 |
+
echo " readonly='readonly'";
|
1582 |
+
}
|
1583 |
+
}
|
1584 |
+
}
|
1585 |
+
|
1586 |
// ---------------------------------------------------------------------
|
1587 |
// EOF
|
ninjafirewall.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: NinjaFirewall (WP Edition)
|
4 |
Plugin URI: https://nintechnet.com/
|
5 |
Description: A true Web Application Firewall to protect and secure WordPress.
|
6 |
-
Version: 4.
|
7 |
Author: The Ninja Technologies Network
|
8 |
Author URI: https://nintechnet.com/
|
9 |
License: GPLv3 or later
|
@@ -19,7 +19,7 @@ Domain Path: /languages
|
|
19 |
| (c) NinTechNet - https://nintechnet.com/ |
|
20 |
+---------------------------------------------------------------------+
|
21 |
*/
|
22 |
-
define( 'NFW_ENGINE_VERSION', '4.
|
23 |
/*
|
24 |
+---------------------------------------------------------------------+
|
25 |
| This program is free software: you can redistribute it and/or |
|
@@ -319,26 +319,26 @@ function nfw_load_ext( $hook ) {
|
|
319 |
|
320 |
// Generic
|
321 |
'restore_default' =>
|
322 |
-
|
323 |
|
324 |
// Full WAF/WordPress WAF
|
325 |
'missing_nonce' =>
|
326 |
-
|
327 |
'missing_httpserver' =>
|
328 |
-
|
329 |
// Dashboard
|
330 |
'del_errorlog' =>
|
331 |
__('Delete the firewall\'s error log ?', 'ninjafirewall'),
|
332 |
|
333 |
// Firewall Options
|
334 |
'restore_warning' =>
|
335 |
-
|
336 |
|
337 |
// Firewall Policies
|
338 |
'warn_sanitise' =>
|
339 |
-
|
340 |
'ssl_warning' =>
|
341 |
-
|
342 |
'woo_warning' =>
|
343 |
__("WooCommerce is running: if you block accounts creation, your customers won't be able to sign up. Continue?", 'ninjafirewall'),
|
344 |
'reguser_warning' =>
|
@@ -348,39 +348,39 @@ function nfw_load_ext( $hook ) {
|
|
348 |
|
349 |
// File Check
|
350 |
'del_snapshot' =>
|
351 |
-
|
352 |
|
353 |
// Login Protection
|
354 |
'invalid_char' =>
|
355 |
-
|
356 |
'no_admin' =>
|
357 |
-
|
358 |
'max_char' =>
|
359 |
-
|
360 |
'select_when' =>
|
361 |
-
|
362 |
'missing_auth' =>
|
363 |
-
|
364 |
|
365 |
// Firewall Log
|
366 |
'invalid_key' =>
|
367 |
-
|
368 |
|
369 |
// Live Log
|
370 |
'live_log_desc' =>
|
371 |
-
|
372 |
'no_traffic' =>
|
373 |
-
|
374 |
'seconds' =>
|
375 |
-
' ' .
|
376 |
'err_unexpected' =>
|
377 |
-
|
378 |
'error_404' =>
|
379 |
-
|
380 |
'log_not_found' =>
|
381 |
-
|
382 |
'http_error' =>
|
383 |
-
|
384 |
);
|
385 |
|
386 |
wp_localize_script( 'nfw_javascript', 'nfwi18n', $nfw_js_array );
|
@@ -1001,7 +1001,7 @@ function nf_sub_loginprot() {
|
|
1001 |
function nfw_log2($loginfo, $logdata, $loglevel, $ruleid) {
|
1002 |
|
1003 |
// Write incident to the firewall log
|
1004 |
-
|
1005 |
|
1006 |
}
|
1007 |
|
3 |
Plugin Name: NinjaFirewall (WP Edition)
|
4 |
Plugin URI: https://nintechnet.com/
|
5 |
Description: A true Web Application Firewall to protect and secure WordPress.
|
6 |
+
Version: 4.3
|
7 |
Author: The Ninja Technologies Network
|
8 |
Author URI: https://nintechnet.com/
|
9 |
License: GPLv3 or later
|
19 |
| (c) NinTechNet - https://nintechnet.com/ |
|
20 |
+---------------------------------------------------------------------+
|
21 |
*/
|
22 |
+
define( 'NFW_ENGINE_VERSION', '4.3' );
|
23 |
/*
|
24 |
+---------------------------------------------------------------------+
|
25 |
| This program is free software: you can redistribute it and/or |
|
319 |
|
320 |
// Generic
|
321 |
'restore_default' =>
|
322 |
+
__('All fields will be restored to their default values and any changes you made will be lost. Continue?', 'ninjafirewall'),
|
323 |
|
324 |
// Full WAF/WordPress WAF
|
325 |
'missing_nonce' =>
|
326 |
+
__('Missing security nonce, try to reload the page.', 'ninjafirewall'),
|
327 |
'missing_httpserver' =>
|
328 |
+
__('Please select the HTTP server in the list.', 'ninjafirewall'),
|
329 |
// Dashboard
|
330 |
'del_errorlog' =>
|
331 |
__('Delete the firewall\'s error log ?', 'ninjafirewall'),
|
332 |
|
333 |
// Firewall Options
|
334 |
'restore_warning' =>
|
335 |
+
__('This action will restore the selected configuration file and will override all your current firewall options, policies and rules. Continue?', 'ninjafirewall'),
|
336 |
|
337 |
// Firewall Policies
|
338 |
'warn_sanitise' =>
|
339 |
+
__('Any character that is not a letter [a-zA-Z], a digit [0-9], a dot [.], a hyphen [-] or an underscore [_] will be removed from the filename and replaced with the substitution character. Continue?', 'ninjafirewall'),
|
340 |
'ssl_warning' =>
|
341 |
+
__('Ensure that you can access your admin console over HTTPS before enabling this option, otherwise you will lock yourself out of your site. Continue?', 'ninjafirewall'),
|
342 |
'woo_warning' =>
|
343 |
__("WooCommerce is running: if you block accounts creation, your customers won't be able to sign up. Continue?", 'ninjafirewall'),
|
344 |
'reguser_warning' =>
|
348 |
|
349 |
// File Check
|
350 |
'del_snapshot' =>
|
351 |
+
__('Delete the current snapshot ?', 'ninjafirewall'),
|
352 |
|
353 |
// Login Protection
|
354 |
'invalid_char' =>
|
355 |
+
__('Invalid character.', 'ninjafirewall'),
|
356 |
'no_admin' =>
|
357 |
+
__('"admin" is not acceptable, please choose another user name.', 'ninjafirewall'),
|
358 |
'max_char' =>
|
359 |
+
__('Please enter max 1024 character only.', 'ninjafirewall'),
|
360 |
'select_when' =>
|
361 |
+
__('Select when to enable the login protection.', 'ninjafirewall'),
|
362 |
'missing_auth' =>
|
363 |
+
__('Enter a name and a password for the HTTP authentication.', 'ninjafirewall'),
|
364 |
|
365 |
// Firewall Log
|
366 |
'invalid_key' =>
|
367 |
+
__('Your public key is not valid.', 'ninjafirewall'),
|
368 |
|
369 |
// Live Log
|
370 |
'live_log_desc' =>
|
371 |
+
__('Live Log lets you watch your blog traffic in real time. To enable it, click on the button below.', 'ninjafirewall'),
|
372 |
'no_traffic' =>
|
373 |
+
__('No traffic yet, please wait', 'ninjafirewall'),
|
374 |
'seconds' =>
|
375 |
+
' ' . __('seconds...', 'ninjafirewall'),
|
376 |
'err_unexpected' =>
|
377 |
+
__('Error: Live Log did not receive the expected response from your server:', 'ninjafirewall'),
|
378 |
'error_404' =>
|
379 |
+
__('Error: URL does not seem to exist (404 Not Found):', 'ninjafirewall'),
|
380 |
'log_not_found' =>
|
381 |
+
__('Error: Cannot find your log file. Try to reload this page.', 'ninjafirewall'),
|
382 |
'http_error' =>
|
383 |
+
__('Error: The HTTP server returned the following error code:', 'ninjafirewall'),
|
384 |
);
|
385 |
|
386 |
wp_localize_script( 'nfw_javascript', 'nfwi18n', $nfw_js_array );
|
1001 |
function nfw_log2($loginfo, $logdata, $loglevel, $ruleid) {
|
1002 |
|
1003 |
// Write incident to the firewall log
|
1004 |
+
require_once plugin_dir_path(__FILE__) . 'lib/nfw_log.php';
|
1005 |
|
1006 |
}
|
1007 |
|
readme.txt
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
=== NinjaFirewall (WP Edition) - Advanced Security ===
|
2 |
Contributors: nintechnet, bruandet
|
3 |
Tags: security, firewall, malware, antispam, virus, scanner, hacked site, brute force, seguridad, seguranca, sicherheit, sicurezza, veiligheid, classicpress
|
4 |
-
Requires at least: 4.7
|
5 |
-
Tested up to: 5.
|
6 |
-
Stable tag: 4.
|
7 |
Requires PHP: 5.5
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
@@ -203,6 +203,19 @@ NinjaFirewall works on Unix-like servers only. There is no Microsoft Windows ver
|
|
203 |
|
204 |
Need more security? Take the time to explore our supercharged Premium edition: [NinjaFirewall WP+ Edition](https://nintechnet.com/ninjafirewall/wp-edition/?comparison)
|
205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
= 4.2.6 =
|
207 |
|
208 |
* Fixed a database error message on a multisite installation when accessing a subsite.
|
1 |
=== NinjaFirewall (WP Edition) - Advanced Security ===
|
2 |
Contributors: nintechnet, bruandet
|
3 |
Tags: security, firewall, malware, antispam, virus, scanner, hacked site, brute force, seguridad, seguranca, sicherheit, sicurezza, veiligheid, classicpress
|
4 |
+
Requires at least: 4.7
|
5 |
+
Tested up to: 5.6
|
6 |
+
Stable tag: 4.3
|
7 |
Requires PHP: 5.5
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
203 |
|
204 |
Need more security? Take the time to explore our supercharged Premium edition: [NinjaFirewall WP+ Edition](https://nintechnet.com/ninjafirewall/wp-edition/?comparison)
|
205 |
|
206 |
+
= 4.3 =
|
207 |
+
|
208 |
+
* Added a new firewall policy to block attempts to override PHP superglobals. See the "NinjaFirewall > Firewall Policies > Advanced Policies > PHP" section.
|
209 |
+
* WP+ Edition (Premium): Added a whitelist of IP addresses from the following external services: Automattic (JetPack, VaultPress etc), Paypal and Stripes payment gateways. If you use those services, you can easily whitelist them with the "NinjaFirewall > Access Control > IP Access Control > External Services" option.
|
210 |
+
* Fixed PHP 8.0 compatibility issues.
|
211 |
+
* Fixed a potential bug that could reset some advanced policies when updating the firewall security rules.
|
212 |
+
* Fixed a "Call to undefined function readonly" PHP error on old WordPress versions (<4.9).
|
213 |
+
* Fixed a "Cannot redeclare nfw_anonymize_ip2" PHP error message.
|
214 |
+
* Improved the sandbox of the "Full WAF" mode installer.
|
215 |
+
* Updated Chart.js to the latest version.
|
216 |
+
* Many additional small fixes and adjustments.
|
217 |
+
* WP+ Edition (Premium): Updated IPv4/IPv6/ASN GeoIP databases.
|
218 |
+
|
219 |
= 4.2.6 =
|
220 |
|
221 |
* Fixed a database error message on a multisite installation when accessing a subsite.
|
static/chart.min.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
/*!
|
2 |
-
* Chart.js v2.9.
|
3 |
* https://www.chartjs.org
|
4 |
-
* (c)
|
5 |
* Released under the MIT License
|
6 |
*/
|
7 |
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],(function(t){return e(function(){try{return t("moment")}catch(t){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={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]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[e[i]]=i);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var i=n[t];if(i)return i;var a,r,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=e[l],d=(r=t,o=u,Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));d<s&&(s=d,a=l)}return a},a.keyword.rgb=function(t){return e[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),100*((i+n)/2)]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a,r=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;function i(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,a=0;a<i;a++)t[e[a]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;)for(var a=i.pop(),r=Object.keys(n[a]),o=r.length,s=0;s<o;s++){var l=r[s],u=e[l];-1===u.distance&&(u.distance=e[a].distance+1,u.parent=a,i.unshift(l))}return e}function a(t,e){return function(n){return e(t(n))}}function r(t,e){for(var i=[e[t].parent,t],r=n[e[t].parent][t],o=e[t].parent;e[o].parent;)i.unshift(e[o].parent),r=a(n[e[o].parent][o],r),o=e[o].parent;return r.conversion=i,r}var o={};Object.keys(n).forEach((function(t){o[t]={},Object.defineProperty(o[t],"channels",{value:n[t].channels}),Object.defineProperty(o[t],"labels",{value:n[t].labels});var e=function(t){for(var e=i(t),n={},a=Object.keys(e),o=a.length,s=0;s<o;s++){var l=a[s];null!==e[l].parent&&(n[l]=r(l,e))}return n}(t);Object.keys(e).forEach((function(n){var i=e[n];o[t][n]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var i=n.length,a=0;a<i;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(i),o[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)}))}));var s=o,l={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]},u={getRgba:d,getHsla:h,getRgb:function(t){var e=d(t);return e&&e.slice(0,3)},getHsl:function(t){var e=h(t);return e&&e.slice(0,3)},getHwb:c,getAlpha:function(t){var e=d(t);if(e)return e[3];if(e=h(t))return e[3];if(e=c(t))return e[3]},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return f(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:f,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"},percentaString:g,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:p,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return b[t.slice(0,3)]}};function d(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(i[r]+i[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){a=i[2],i=i[1];for(r=0;r<e.length;r++)e[r]=parseInt(i.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(i[r+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=l[i[1]]))return}for(r=0;r<e.length;r++)e[r]=m(e[r],0,255);return n=n||0==n?m(n,0,1):1,e[3]=n,e}}function h(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function c(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function f(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function g(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e,n){return Math.min(Math.max(e,t),n)}function v(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var b={};for(var x in l)b[l[x]]=x;var y=function(t){return t instanceof y?t:this instanceof y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=u.getRgba(t))?this.setValues("rgb",e):(e=u.getHsla(t))?this.setValues("hsl",e):(e=u.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new y(t);var e};y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return u.hexString(this.values.rgb)},rgbString:function(){return u.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return u.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return u.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return u.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return u.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return u.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return u.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new y,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},y.prototype.setValues=function(t,e){var n,i,a=this.values,r=this.spaces,o=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[r[t][0]]){var u=r[t];for(n=0;n<t.length;n++)a[t][n]=e[u[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===l?a.alpha:l)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(o[t][n],a[t][n])),a[t][n]=Math.round(i);for(var d in r)d!==t&&(a[d]=s[t][d](a[t]));return!0},y.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},y.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:n===i[e]?this:(i[e]=n,this.setValues(t,i),this)},"undefined"!=typeof window&&(window.Color=y);var _,k=y,w={noop:function(){},uid:(_=0,function(){return _++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return w.valueOrDefault(w.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(w.isArray(t))if(r=t.length,i)for(a=r-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(w.isObject(t))for(r=(o=Object.keys(t)).length,a=0;a<r;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,i,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(a=t[n],r=e[n],a instanceof Array&&r instanceof Array){if(!w.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(w.isArray(t))return t.map(w.clone);if(w.isObject(t)){for(var e={},n=Object.keys(t),i=n.length,a=0;a<i;++a)e[n[a]]=w.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,i){var a=e[t],r=n[t];w.isObject(a)&&w.isObject(r)?w.merge(a,r,i):e[t]=w.clone(r)},_mergerIf:function(t,e,n){var i=e[t],a=n[t];w.isObject(i)&&w.isObject(a)?w.mergeIf(i,a):e.hasOwnProperty(t)||(e[t]=w.clone(a))},merge:function(t,e,n){var i,a,r,o,s,l=w.isArray(e)?e:[e],u=l.length;if(!w.isObject(t))return t;for(i=(n=n||{}).merger||w._merger,a=0;a<u;++a)if(e=l[a],w.isObject(e))for(s=0,o=(r=Object.keys(e)).length;s<o;++s)i(r[s],t,e,n);return t},mergeIf:function(t,e){return w.merge(t,e,{merger:w._mergerIf})},extend:Object.assign||function(t){return w.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=w.inherits,t&&w.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},M=w;w.callCallback=w.callback,w.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},w.getValueOrDefault=w.valueOrDefault,w.getValueAtIndexOrDefault=w.valueAtIndexOrDefault;var S={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-S.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*S.easeInBounce(2*t):.5*S.easeOutBounce(2*t-1)+.5}},C={effects:S};M.easingEffects=S;var P=Math.PI,A=P/180,D=2*P,T=P/2,I=P/4,F=2*P/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-P,-T),t.arc(u,l,o,-T,0),t.arc(u,d,o,0,T),t.arc(s,d,o,T,P)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-T,T),t.arc(s,l,o,T,P+T)):l<d?(t.arc(s,l,o,-P,0),t.arc(s,d,o,0,P)):t.arc(s,l,o,-P,P),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a,r){var o,s,l,u,d,h=(r||0)*A;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,a),t.rotate(h),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,a,n,0,D),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=F,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=F,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),t.closePath();break;case"rectRounded":u=n-(d=.516*n),s=Math.cos(h+I)*u,l=Math.sin(h+I)*u,t.arc(i-s,a-l,d,h-P,h-T),t.arc(i+l,a-s,d,h-T,h),t.arc(i+s,a+l,d,h,h+T),t.arc(i-l,a+s,d,h+T,h+P),t.closePath();break;case"rect":if(!r){u=Math.SQRT1_2*n,t.rect(i-u,a-u,2*u,2*u);break}h+=I;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+l,a-s),t.lineTo(i+s,a+l),t.lineTo(i-l,a+s),t.closePath();break;case"crossRot":h+=I;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s),h+=I,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(h)*n,a+Math.sin(h)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var a=n.steppedLine;if(a){if("middle"===a){var r=(e.x+n.x)/2;t.lineTo(r,i?n.y:e.y),t.lineTo(r,i?e.y:n.y)}else"after"===a&&!i||"after"!==a&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},O=L;M.clear=L.clear,M.drawRoundedRectangle=function(t){t.beginPath(),L.roundedRect.apply(L,arguments)};var R={_set:function(t,e){return M.merge(this[t]||(this[t]={}),e)}};R._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var z=R,N=M.valueOrDefault;var B={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,a;return M.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,a=+t.left||0):e=n=i=a=+t||0,{top:e,right:n,bottom:i,left:a,height:e+i,width:a+n}},_parseFont:function(t){var e=z.global,n=N(t.fontSize,e.defaultFontSize),i={family:N(t.fontFamily,e.defaultFontFamily),lineHeight:M.options.toLineHeight(N(t.lineHeight,e.defaultLineHeight),n),size:n,style:N(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=function(t){return!t||M.isNullOrUndef(t.size)||M.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i},resolve:function(t,e,n,i){var a,r,o,s=!0;for(a=0,r=t.length;a<r;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==n&&M.isArray(o)&&(o=o[n],s=!1),void 0!==o))return i&&!s&&(i.cacheable=!1),o}},E={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort((function(t,e){return t-e})).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},W=E;M.log10=E.log10;var V=M,H=C,j=O,q=B,U=W,Y={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,i;"ltr"!==e&&"rtl"!==e||(i=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};V.easing=H,V.canvas=j,V.options=q,V.math=U,V.rtl=Y;var G=function(t){V.extend(this,t),this.initialize.apply(this,arguments)};V.extend(G.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=V.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),i||(i=e._start={}),function(t,e,n,i){var a,r,o,s,l,u,d,h,c,f=Object.keys(n);for(a=0,r=f.length;a<r;++a)if(u=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(d=typeof u)===typeof(l=t[o]))if("string"===d){if((h=k(l)).valid&&(c=k(u)).valid){e[o]=c.mix(h,i).rgbString();continue}}else if(V.isFinite(l)&&V.isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,a,n,t),e):(e._view=V.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return V.isNumber(this._model.x)&&V.isNumber(this._model.y)}}),G.extend=V.inherits;var X=G,K=X.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Z=K;Object.defineProperty(K.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(K.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),z._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:V.noop,onComplete:V.noop}});var $={animations:[],request:null,addAnimation:function(t,e,n,i){var a,r,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),a=0,r=o.length;a<r;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=V.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=V.requestAnimFrame.call(window,(function(){t.request=null,t.startDigest()})))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r<a.length;)e=(t=a[r]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),V.callback(t.render,[e,t],e),V.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(V.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},J=V.options.resolve,Q=["push","pop","shift","splice","unshift"];function tt(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(Q.forEach((function(e){delete t[e]})),delete t._chartjs)}}var et=function(t,e){this.initialize(t,e)};V.extend(et.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),a=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||a.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_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&&tt(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(t=0,e=i.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,i=n.getDataset(),a=i.data||(i.data=[]);n._data!==a&&(n._data&&tt(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),Q.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=i.apply(this,e);return V.each(t._chartjs.listeners,(function(t){"function"==typeof t[n]&&t[n].apply(t,e)})),a}})})))),n._data=a),n.resyncElements()},_configure:function(){this._config=V.merge({},[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&V._merger(t,e,n)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:V.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,a=0;a<i;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this.getMeta(),i=n.dataset;return this._configure(),i&&void 0===t?e=this._resolveDatasetElementOptions(i||{}):(t=t||0,e=this._resolveDataElementOptions(n.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,a,r,o=this,s=o.chart,l=o._config,u=t.custom||{},d=s.options.elements[o.datasetElementType.prototype._type]||{},h=o._datasetElementOptions,c={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,i=h.length;n<i;++n)a=h[n],r=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,c[a]=J([u[r],l[r],d[r]],f);return c},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,a=n._cachedDataOpts;if(a&&!i)return a;var r,o,s,l,u=n.chart,d=n._config,h=u.options.elements[n.dataElementType.prototype._type]||{},c=n._dataElementOptions,f={},g={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},p={cacheable:!i};if(i=i||{},V.isArray(c))for(o=0,s=c.length;o<s;++o)f[l=c[o]]=J([i[l],d[l],h[l]],g,e,p);else for(o=0,s=(r=Object.keys(c)).length;o<s;++o)f[l=r[o]]=J([i[l],d[c[l]],d[l],h[l]],g,e,p);return p.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){V.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model,r=V.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=J([i.hoverBackgroundColor,e.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=J([i.hoverBorderColor,e.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=J([i.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,a,r,o=this.getMeta().dataset,s={};if(o){for(r=o._model,a=this._resolveDatasetElementOptions(o,!0),t=0,e=(i=Object.keys(a)).length;t<e;++t)s[n=i[t]]=r[n],r[n]=a[n];o.$previousStyle=s}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,n=t.data.length,i=e.length;i<n?t.data.splice(i,n-i):i>n&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),et.extend=V.inherits;var nt=et,it=2*Math.PI;function at(t,e){var n=e.startAngle,i=e.endAngle,a=e.pixelMargin,r=a/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-r,i+r),e.innerRadius>a?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function rt(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+it,at(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=it,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+it,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+it),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,i),i&&at(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}z._set("global",{elements:{arc:{backgroundColor:z.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var ot=X.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=V.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=it;for(;a>s;)a-=it;for(;a<o;)a+=it;var l=a>=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/it)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+it,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%it}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&rt(e,n,a),e.restore()}}),st=V.valueOrDefault,lt=z.global.defaultColor;z._set("global",{elements:{line:{tension:.4,backgroundColor:lt,borderWidth:3,borderColor:lt,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var ut=X.extend({_type:"line",draw:function(){var t,e,n,i=this,a=i._view,r=i._chart.ctx,o=a.spanGaps,s=i._children.slice(),l=z.global,u=l.elements.line,d=-1,h=i._loop;if(s.length){if(i._loop){for(t=0;t<s.length;++t)if(e=V.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),h=o;break}h&&s.push(s[0])}for(r.save(),r.lineCap=a.borderCapStyle||u.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||u.borderDash),r.lineDashOffset=st(a.borderDashOffset,u.borderDashOffset),r.lineJoin=a.borderJoinStyle||u.borderJoinStyle,r.lineWidth=st(a.borderWidth,u.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.moveTo(n.x,n.y),d=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===d?V.previousItem(s,t):s[d],n.skip||(d!==t-1&&!o||-1===d?r.moveTo(n.x,n.y):V.canvas.lineTo(r,e._view,n),d=t);h&&r.closePath(),r.stroke(),r.restore()}}}),dt=V.valueOrDefault,ht=z.global.defaultColor;function ct(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}z._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ht,borderColor:ht,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var ft=X.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ct,inXRange:ct,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,a=e.rotation,r=e.radius,o=e.x,s=e.y,l=z.global,u=l.defaultColor;e.skip||(void 0===t||V.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=dt(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,V.canvas.drawPoint(n,i,r,o,s,a))}}),gt=z.global.defaultColor;function pt(t){return t&&void 0!==t.width}function mt(t){var e,n,i,a,r;return pt(t)?(r=t.width/2,e=t.x-r,n=t.x+r,i=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-r,a=t.y+r),{left:e,top:i,right:n,bottom:a}}function vt(t,e,n){return t===e?n:t===n?e:t}function bt(t,e,n){var i,a,r,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=vt(e,"left","right")):t.base<t.y&&(e=vt(e,"bottom","top")),n[e]=!0,n):n}(t);return V.isObject(s)?(i=+s.top||0,a=+s.right||0,r=+s.bottom||0,o=+s.left||0):i=a=r=o=+s||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}function xt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&mt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}z._set("global",{elements:{rectangle:{backgroundColor:gt,borderColor:gt,borderSkipped:"bottom",borderWidth:0}}});var yt=X.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=mt(t),n=e.right-e.left,i=e.bottom-e.top,a=bt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return xt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return pt(n)?xt(n,t,null):xt(n,null,e)},inXRange:function(t){return xt(this._view,t,null)},inYRange:function(t){return xt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return pt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return pt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),_t={},kt=ot,wt=ut,Mt=ft,St=yt;_t.Arc=kt,_t.Line=wt,_t.Point=Mt,_t.Rectangle=St;var Ct=V._deprecated,Pt=V.valueOrDefault;function At(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=V.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a<r;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,r=t.getTicks().length;a<r;++a)i=t.getPixelForTick(a),o=a>0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return V.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/2}}z._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),z._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Dt=nt.extend({dataElementType:_t.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;nt.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Ct("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Ct("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Ct("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Ct("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Ct("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e<n;++e)this.updateElement(i[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(a.xAxisID),t._yScale=i.getScaleForId(a.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[e]},V.isArray(r.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var a=this,r=t._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=a._ruler||a.getRuler(),d=a.calculateBarValuePixels(a.index,e,i),h=a.calculateBarIndexPixels(a.index,e,u,i);r.horizontal=l,r.base=n?s:d.base,r.x=l?n?s:d.head:h.center,r.y=l?h.center:n?s:d.head,r.height=l?h.size:void 0,r.width=l?void 0:h.size},_getStacks:function(t){var e,n,i=this._getIndexScale(),a=i._getMatchingVisibleMetas(this._type),r=i.options.stacked,o=a.length,s=[];for(e=0;e<o&&(n=a[e],(!1===r||-1===s.indexOf(n.stack)||void 0===r&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this._getIndexScale(),i=[];for(t=0,e=this.getMeta().data.length;t<e;++t)i.push(n.getPixelForValue(null,t,this.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._getValueScale(),c=h.isHorizontal(),f=d.data.datasets,g=h._getMatchingVisibleMetas(this._type),p=h._parseValue(f[t].data[e]),m=n.minBarLength,v=h.options.stacked,b=this.getMeta().stack,x=void 0===p.start?0:p.max>=0&&p.min>=0?p.min:p.max,y=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(a=g[i]).index!==t;++i)a.stack===b&&(r=void 0===(u=h._parseValue(f[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&r<0||p.max>=0&&r>0)&&(x+=r));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+y))-o,void 0!==m&&Math.abs(l)<m&&(l=m,s=y>=0&&!c||y<0&&c?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===o&&(o=r-(null===s?e.end-e.start:s-r)),null===s&&(s=r+r-o),i=r-(r-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}(e,n,i):At(e,n,i),r=this.getStackIndex(t,this.getMeta().stack),o=a.start+a.chunk*r+a.chunk/2,s=Math.min(Pt(i.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this.chart,e=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),a=n.length,r=0;for(V.canvas.clipArea(t.ctx,t.chartArea);r<a;++r){var o=e._parseValue(i.data[r]);isNaN(o.min)||isNaN(o.max)||n[r].draw()}V.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=this,e=V.extend({},nt.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,i=t._getValueScale().options;return e.barPercentage=Pt(n.barPercentage,e.barPercentage),e.barThickness=Pt(n.barThickness,e.barThickness),e.categoryPercentage=Pt(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=Pt(n.maxBarThickness,e.maxBarThickness),e.minBarLength=Pt(i.minBarLength,e.minBarLength),e}}),Tt=V.valueOrDefault,It=V.options.resolve;z._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}});var Ft=nt.extend({dataElementType:_t.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta().data;V.each(n,(function(n,i){e.updateElement(n,i,t)}))},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=t.custom||{},o=i.getScaleForId(a.xAxisID),s=i.getScaleForId(a.yAxisID),l=i._resolveDataElementOptions(t,e),u=i.getDataset().data[e],d=i.index,h=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,e,d),c=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:r.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Tt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Tt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Tt(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,a=n.getDataset(),r=t.custom||{},o=a.data[e]||{},s=nt.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=V.extend({},s)),s.radius=It([r.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),Lt=V.valueOrDefault,Ot=Math.PI,Rt=2*Ot,zt=Ot/2;z._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-zt,circumference:Rt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return V.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Nt=nt.extend({dataElementType:_t.Arc,linkScales:V.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i,a,r=this,o=r.chart,s=o.chartArea,l=o.options,u=1,d=1,h=0,c=0,f=r.getMeta(),g=f.data,p=l.cutoutPercentage/100||0,m=l.circumference,v=r._getRingWeight(r.index);if(m<Rt){var b=l.rotation%Rt,x=(b+=b>=Ot?-Rt:b<-Ot?Rt:0)+m,y=Math.cos(b),_=Math.sin(b),k=Math.cos(x),w=Math.sin(x),M=b<=0&&x>=0||x>=Rt,S=b<=zt&&x>=zt||x>=Rt+zt,C=b<=-zt&&x>=-zt||x>=Ot+zt,P=b===-Ot||x>=Ot?-1:Math.min(y,y*p,k,k*p),A=C?-1:Math.min(_,_*p,w,w*p),D=M?1:Math.max(y,y*p,k,k*p),T=S?1:Math.max(_,_*p,w,w*p);u=(D-P)/2,d=(T-A)/2,h=-(D+P)/2,c=-(T+A)/2}for(i=0,a=g.length;i<a;++i)g[i]._options=r._resolveDataElementOptions(g[i],i);for(o.borderWidth=r.getMaxBorderWidth(),e=(s.right-s.left-o.borderWidth)/u,n=(s.bottom-s.top-o.borderWidth)/d,o.outerRadius=Math.max(Math.min(e,n)/2,0),o.innerRadius=Math.max(o.outerRadius*p,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),o.offsetX=h*o.outerRadius,o.offsetY=c*o.outerRadius,f.total=r.calculateTotal(),r.outerRadius=o.outerRadius-o.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-o.radiusLength*v,0),i=0,a=g.length;i<a;++i)r.updateElement(g[i],i,t)},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,o=a.options,s=o.animation,l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=o.rotation,h=o.rotation,c=i.getDataset(),f=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(c.data[e])*(o.circumference/Rt),g=n&&s.animateScale?0:i.innerRadius,p=n&&s.animateScale?0:i.outerRadius,m=t._options||{};V.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:p,innerRadius:g,label:V.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var v=t._model;n&&s.animateRotate||(v.startAngle=0===e?o.rotation:i.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return V.each(n.data,(function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))})),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?Rt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e<n;++e)if(d.isDatasetVisible(e)){t=(i=d.getDatasetMeta(e)).data,e!==this.index&&(r=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],r?(r._configure(),o=r._resolveDataElementOptions(a,e)):o=a._options,"inner"!==o.borderAlign&&(s=o.borderWidth,u=(l=o.hoverBorderWidth)>(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Lt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Lt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});z._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),z._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Bt=Dt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Et=V.valueOrDefault,Wt=V.options.resolve,Vt=V.canvas._isPointInArea;function Ht(t,e){var n=t&&t.options.ticks||{},i=n.reverse,a=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:i?r:a,end:i?a:r}}function jt(t,e,n){var i=n/2,a=Ht(t,i),r=Ht(e,i);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}function qt(t){var e,n,i,a;return V.isObject(t)?(e=t.top,n=t.right,i=t.bottom,a=t.left):e=n=i=a=t,{top:e,right:n,bottom:i,left:a}}z._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Ut=nt.extend({datasetElementType:_t.Line,dataElementType:_t.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.options,l=i._config,u=i._showLine=Et(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(a.xAxisID),i._yScale=i.getScaleForId(a.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=i._yScale,r._datasetIndex=i.index,r._children=o,r._model=i._resolveDatasetElementOptions(r),r.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(u&&0!==r._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i,a,r=this,o=r.getMeta(),s=t.custom||{},l=r.getDataset(),u=r.index,d=l.data[e],h=r._xScale,c=r._yScale,f=o.dataset._model,g=r._resolveDataElementOptions(t,e);i=h.getPixelForValue("object"==typeof d?d:NaN,e,u),a=n?c.getBasePixel():r.calculatePointY(d,e,u),t._xScale=h,t._yScale=c,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Et(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,i=t.custom||{},a=e.chart.options,r=a.elements.line,o=nt.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=Et(n.spanGaps,a.spanGaps),o.tension=Et(n.lineTension,r.tension),o.steppedLine=Wt([i.steppedLine,n.steppedLine,r.stepped]),o.clip=qt(Et(n.clip,jt(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._yScale,c=0,f=0;if(h.options.stacked){for(s=+h.getRightValue(t),u=(l=d._getSortedVisibleDatasetMetas()).length,i=0;i<u&&(r=l[i]).index!==n;++i)a=d.data.datasets[r.index],"line"===r.type&&r.yAxisID===h.id&&((o=+h.getRightValue(a.data[e]))<0?f+=o||0:c+=o||0);return s<0?h.getPixelForValue(f+s):h.getPixelForValue(c+s)}return h.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,a=this.chart,r=this.getMeta(),o=r.dataset._model,s=a.chartArea,l=r.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter((function(t){return!t._model.skip}))),"monotone"===o.cubicInterpolationMode)V.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=V.splineCurve(V.previousItem(l,t)._model,n,V.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,Vt(n,s)&&(t>0&&Vt(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Vt(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,n=this.getMeta(),i=n.data||[],a=e.chartArea,r=e.canvas,o=0,s=i.length;for(this._showLine&&(t=n.dataset._model.clip,V.canvas.clipArea(e.ctx,{left:!1===t.left?0:a.left-t.left,right:!1===t.right?r.width:a.right+t.right,top:!1===t.top?0:a.top-t.top,bottom:!1===t.bottom?r.height:a.bottom+t.bottom}),n.dataset.draw(),V.canvas.unclipArea(e.ctx));o<s;++o)i[o].draw(a)},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Et(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Et(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Et(n.hoverBorderWidth,n.borderWidth),e.radius=Et(n.hoverRadius,n.radius)}}),Yt=V.options.resolve;z._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Gt=nt.extend({dataElementType:_t.Arc,linkScales:V.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],d=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=r.data.length;e<n;e++)l[e]=s,i=a._computeAngle(e),u[e]=i,s+=i;for(e=0,n=d.length;e<n;++e)d[e]._options=a._resolveDataElementOptions(d[e],e),a.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,a=i.chart,r=i.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,d=l.xCenter,h=l.yCenter,c=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),g=i._starts[e],p=g+(t.hidden?0:i._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]),v=t._options||{};V.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:h,innerRadius:0,outerRadius:n?m:f,startAngle:n&&s.animateRotate?c:g,endAngle:n&&s.animateRotate?c:p,label:V.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return V.each(e.data,(function(e,i){isNaN(t.data[i])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor,a=V.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),a=e.getMeta();if(isNaN(i.data[t])||a.data[t].hidden)return 0;var r={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return Yt([e.chart.options.elements.arc.angle,2*Math.PI/n],r,t)}});z._set("pie",V.clone(z.doughnut)),z._set("pie",{cutoutPercentage:0});var Xt=Nt,Kt=V.valueOrDefault;z._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Zt=nt.extend({datasetElementType:_t.Line,dataElementType:_t.Point,linkScales:V.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._loop=!0,r._model=i._resolveDatasetElementOptions(r),r.pivot(),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,r.data[e]),l=i._resolveDataElementOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,h=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:h,skip:a.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Kt(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,i=nt.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=Kt(e.spanGaps,n.spanGaps),i.tension=Kt(e.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var t,e,n,i,a=this.getMeta(),r=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(o=o.filter((function(t){return!t._model.skip}))),t=0,e=o.length;t<e;++t)n=o[t]._model,i=V.splineCurve(V.previousItem(o,t,!0)._model,n,V.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,r.left,r.right),n.controlPointPreviousY=s(i.previous.y,r.top,r.bottom),n.controlPointNextX=s(i.next.x,r.left,r.right),n.controlPointNextY=s(i.next.y,r.top,r.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=V.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Kt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Kt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Kt(n.hoverBorderWidth,n.borderWidth),e.radius=Kt(n.hoverRadius,n.radius)}});z._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),z._set("global",{datasets:{scatter:{showLine:!1}}});var $t={bar:Dt,bubble:Ft,doughnut:Nt,horizontalBar:Bt,line:Ut,polarArea:Gt,pie:Xt,radar:Zt,scatter:Ut};function Jt(t,e){return t.native?{x:t.x,y:t.y}:V.getRelativePosition(t,e)}function Qt(t,e){var n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas();for(i=0,r=l.length;i<r;++i)for(a=0,o=(n=l[i].data).length;a<o;++a)(s=n[a])._view.skip||e(s)}function te(t,e){var n=[];return Qt(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function ee(t,e,n,i){var a=Number.POSITIVE_INFINITY,r=[];return Qt(t,(function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=i(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}})),r}function ne(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){var a=e?Math.abs(t.x-i.x):0,r=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function ie(t,e,n){var i=Jt(e,t);n.axis=n.axis||"x";var a=ne(n.axis),r=n.intersect?te(t,i):ee(t,i,!1,a),o=[];return r.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[r[0]._index];e&&!e._view.skip&&o.push(e)})),o):[]}var ae={modes:{single:function(t,e){var n=Jt(e,t),i=[];return Qt(t,(function(t){if(t.inRange(n.x,n.y))return i.push(t),i})),i.slice(0,1)},label:ie,index:ie,dataset:function(t,e,n){var i=Jt(e,t);n.axis=n.axis||"xy";var a=ne(n.axis),r=n.intersect?te(t,i):ee(t,i,!1,a);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ie(t,e,{intersect:!1})},point:function(t,e){return te(t,Jt(e,t))},nearest:function(t,e,n){var i=Jt(e,t);n.axis=n.axis||"xy";var a=ne(n.axis);return ee(t,i,n.intersect,a)},x:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Jt(e,t),a=[],r=!1;return Qt(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},re=V.extend;function oe(t,e){return V.where(t,(function(t){return t.pos===e}))}function se(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function le(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function ue(t,e,n){var i,a,r=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-le(o,t,"left","right"),a=e.outerHeight-le(o,t,"top","bottom"),i!==t.w||a!==t.h)return t.w=i,t.h=a,n.horizontal?i!==t.w:a!==t.h}function de(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function he(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;i<a;++i)(o=(r=t[i]).box).update(r.width||e.w,r.height||e.h,de(r.horizontal,e)),ue(e,n,r)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(r);return s&&he(u,e,n)||l}function ce(t,e,n){var i,a,r,o,s=n.padding,l=e.x,u=e.y;for(i=0,a=t.length;i<a;++i)o=(r=t[i]).box,r.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=u}z._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var fe,ge={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],r=a.length,o=0;o<r;++o)i=a[o],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(t,e,n){if(t){var i=t.options.layout||{},a=V.options.toPadding(i.padding),r=e-a.width,o=n-a.height,s=function(t){var e=function(t){var e,n,i,a=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],a.push({index:e,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return a}(t),n=se(oe(e,"left"),!0),i=se(oe(e,"right")),a=se(oe(e,"top"),!0),r=se(oe(e,"bottom"));return{leftAndTop:n.concat(a),rightAndBottom:i.concat(r),chartArea:oe(e,"chartArea"),vertical:n.concat(i),horizontal:a.concat(r)}}(t.boxes),l=s.vertical,u=s.horizontal,d=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:r,vBoxMaxWidth:r/2/l.length,hBoxMaxHeight:o/2}),h=re({maxPadding:re({},a),w:r,h:o,x:a.left,y:a.top},a);!function(t,e){var n,i,a;for(n=0,i=t.length;n<i;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight}(l.concat(u),d),he(l,h,d),he(u,h,d)&&he(l,h,d),function(t){var e=t.maxPadding;function n(n){var i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(h),ce(s.leftAndTop,h,d),h.x+=h.w,h.y+=h.h,ce(s.rightAndBottom,h,d),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},V.each(s.chartArea,(function(e){var n=e.box;re(n,t.chartArea),n.update(h.w,h.h)}))}}},pe=(fe=Object.freeze({__proto__:null,default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&fe.default||fe,me="$chartjs",ve="chartjs-size-monitor",be="chartjs-render-monitor",xe="chartjs-render-animation",ye=["animationstart","webkitAnimationStart"],_e={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function ke(t,e){var n=V.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var we=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Me(t,e,n){t.addEventListener(e,n,we)}function Se(t,e,n){t.removeEventListener(e,n,we)}function Ce(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Pe(t){var e=document.createElement("div");return e.className=t||"",e}function Ae(t,e,n){var i,a,r,o,s=t[me]||(t[me]={}),l=s.resizer=function(t){var e=Pe(ve),n=Pe(ve+"-expand"),i=Pe(ve+"-shrink");n.appendChild(Pe()),i.appendChild(Pe()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return Me(n,"scroll",a.bind(n,"expand")),Me(i,"scroll",a.bind(i,"shrink")),e}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Ce("resize",n)),i&&i.clientWidth<a&&n.canvas&&e(Ce("resize",n))}},r=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,V.requestAnimFrame.call(window,(function(){r=!1,i.apply(a,o)})))}));!function(t,e){var n=t[me]||(t[me]={}),i=n.renderProxy=function(t){t.animationName===xe&&e()};V.each(ye,(function(e){Me(t,e,i)})),n.reflow=!!t.offsetParent,t.classList.add(be)}(t,(function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}}))}function De(t){var e=t[me]||{},n=e.resizer;delete e.resizer,function(t){var e=t[me]||{},n=e.renderProxy;n&&(V.each(ye,(function(e){Se(t,e,n)})),delete e.renderProxy),t.classList.remove(be)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var Te={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[me]||(t[me]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}(e.host?e:document.head,pe)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[me]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=ke(t,"width");void 0!==r&&(t.width=r)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=ke(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[me]){var n=e[me].initial;["height","width"].forEach((function(t){var i=n[t];V.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)})),V.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[me]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n[me]||(n[me]={});Me(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=_e[t.type]||t.type,i=V.getRelativePosition(t,e);return Ce(n,e,i.x,i.y,t)}(e,t))})}else Ae(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=((n[me]||{}).proxies||{})[t.id+"_"+e];a&&Se(i,e,a)}else De(i)}};V.addEvent=Me,V.removeEvent=Se;var Ie=Te._enabled?Te:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Fe=V.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Ie);z._set("global",{plugins:{}});var Le={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,a,r,o,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if("function"==typeof(s=(r=(a=l[i]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],i=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach((function(t){if(-1===n.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=V.clone(z.global.plugins[e])),n.push(t),i.push({plugin:t,options:a||{}}))}})),e.descriptors=i,e.id=this._cacheId,i},_invalidate:function(t){delete t.$plugins}},Oe={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=V.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?V.merge({},[z.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=V.extend(this.defaults[t],e))},addScalesToLayout:function(t){V.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,ge.addBox(t,e)}))}},Re=V.valueOrDefault,ze=V.rtl.getRtlAdapter;z._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:V.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(t.length>0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=i[r.index])}return n},afterTitle:V.noop,beforeBody:V.noop,beforeLabel:V.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),V.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:V.noop,afterBody:V.noop,beforeFooter:V.noop,footer:V.noop,afterFooter:V.noop}}});var Ne={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,a+=s.y,++r}}return{x:i/r,y:a/r}},nearest:function(t,e){var n,i,a,r=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=V.distanceBetweenPoints(e,u);d<s&&(s=d,a=l)}}if(a){var h=a.tooltipPosition();r=h.x,o=h.y}return{x:r,y:o}}};function Be(t,e){return e&&(V.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function Ee(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function We(t){var e=z.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:Re(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:Re(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:Re(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:Re(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:Re(t.titleFontStyle,e.defaultFontStyle),titleFontSize:Re(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:Re(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:Re(t.footerFontStyle,e.defaultFontStyle),footerFontSize:Re(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function Ve(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function He(t){return Be([],Ee(t))}var je=X.extend({initialize:function(){this._model=We(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=Be(o,Ee(i)),o=Be(o,Ee(a)),o=Be(o,Ee(r))},getBeforeBody:function(){return He(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return V.each(t,(function(t){var r={before:[],lines:[],after:[]};Be(r.before,Ee(i.beforeLabel.call(n,t,e))),Be(r.lines,i.label.call(n,t,e)),Be(r.after,Ee(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return He(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Be(r,Ee(n)),r=Be(r,Ee(i)),r=Be(r,Ee(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=We(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var _=[],k=[];y=Ne[c.position].call(h,p,h._eventPosition);var w=[];for(e=0,n=p.length;e<n;++e)w.push((i=p[e],a=void 0,r=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,a=i._xScale,r=i._yScale||i._scale,o=i._index,s=i._datasetIndex,l=i._chart.getDatasetMeta(s).controller,u=l._getIndexScale(),d=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):"",yLabel:r?r.getLabelForIndex(o,s):"",label:u?""+u.getLabelForIndex(o,s):"",value:d?""+d.getLabelForIndex(o,s):"",index:o,datasetIndex:s,x:i._model.x,y:i._model.y}));c.filter&&(w=w.filter((function(t){return c.filter(t,m)}))),c.itemSort&&(w=w.sort((function(t,e){return c.itemSort(t,e,m)}))),V.each(w,(function(t){_.push(c.callbacks.labelColor.call(h,t,h._chart)),k.push(c.callbacks.labelTextColor.call(h,t,h._chart))})),g.title=h.getTitle(w,m),g.beforeBody=h.getBeforeBody(w,m),g.body=h.getBody(w,m),g.afterBody=h.getAfterBody(w,m),g.footer=h.getFooter(w,m),g.x=y.x,g.y=y.y,g.caretPadding=c.caretPadding,g.labelColors=_,g.labelTextColors=k,g.dataPoints=w,x=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,o=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);o+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=o*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var c=0,f=function(t){a=Math.max(a,n.measureText(t).width+c)};return n.font=V.fontString(u,e._titleFontStyle,e._titleFontFamily),V.each(e.title,f),n.font=V.fontString(d,e._bodyFontStyle,e._bodyFontFamily),V.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?d+2:0,V.each(r,(function(t){V.each(t.before,f),V.each(t.lines,f),V.each(t.after,f)})),c=0,n.font=V.fontString(h,e._footerFontStyle,e._footerFontFamily),V.each(e.footer,f),{width:a+=2*e.xPadding,height:i}}(this,g),b=function(t,e,n,i){var a=t.x,r=t.y,o=t.caretSize,s=t.caretPadding,l=t.cornerRadius,u=n.xAlign,d=n.yAlign,h=o+s,c=l+s;return"right"===u?a-=e.width:"center"===u&&((a-=e.width/2)+e.width>i.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===d?r+=h:r-="bottom"===d?e.height+h:e.height/2,"center"===d?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=c:"right"===u&&(a+=c),{x:a,y:r}}(g,x,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+p)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+p-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+m)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=ze(e.rtl,e.x,e.width);for(t.x=Ve(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=V.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r<s;++r)n.fillText(o[r],l.x(t.x),t.y+i/2),t.y+=i+a,r+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var i,a,r,o,s,l,u,d,h=e.bodyFontSize,c=e.bodySpacing,f=e._bodyAlign,g=e.body,p=e.displayColors,m=0,v=p?Ve(e,"left"):0,b=ze(e.rtl,e.x,e.width),x=function(e){n.fillText(e,b.x(t.x+m),t.y+h/2),t.y+=h+c},y=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=V.fontString(h,e._bodyFontStyle,e._bodyFontFamily),t.x=Ve(e,y),n.fillStyle=e.bodyFontColor,V.each(e.beforeBody,x),m=p&&"right"!==y?"center"===f?h/2+1:h+2:0,s=0,u=g.length;s<u;++s){for(i=g[s],a=e.labelTextColors[s],r=e.labelColors[s],n.fillStyle=a,V.each(i.before,x),l=0,d=(o=i.lines).length;l<d;++l){if(p){var _=b.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,h),t.y,h,h),n.lineWidth=1,n.strokeStyle=r.borderColor,n.strokeRect(b.leftForLtr(_,h),t.y,h,h),n.fillStyle=r.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),h-2),t.y+1,h-2,h-2),n.fillStyle=a}x(o[l])}V.each(i.after,x)}m=0,V.each(e.afterBody,x),t.y-=c},drawFooter:function(t,e,n){var i,a,r=e.footer,o=r.length;if(o){var s=ze(e.rtl,e.x,e.width);for(t.x=Ve(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=V.fontString(i,e._footerFontStyle,e._footerFontFamily),a=0;a<o;++a)n.fillText(r[a],s.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,r=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),"top"===r&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),"center"===r&&"right"===a&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),"bottom"===r&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),"center"===r&&"left"===a&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,V.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),V.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!V.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),qe=Ne,Ue=je;Ue.positioners=qe;var Ye=V.valueOrDefault;function Ge(){return V.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)o=n[t][a],r=Ye(o.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?V.merge(e[t][a],[Oe.getScaleDefaults(r),o]):V.merge(e[t][a],o)}else V._merger(t,e,n,i)}})}function Xe(){return V.merge({},[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||{},r=n[t];"scales"===t?e[t]=Ge(a,r):"scale"===t?e[t]=V.merge(a,[Oe.getScaleDefaults(r.type),r]):V._merger(t,e,n,i)}})}function Ke(t){var e=t.options;V.each(t.scales,(function(e){ge.removeBox(t,e)})),e=Xe(z.global,z[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function Ze(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(V.findIndex(t,a)>=0);return i}function $e(t){return"top"===t||"bottom"===t}function Je(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}z._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 Qe=function(t,e){return this.construct(t,e),this};V.extend(Qe.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Xe(z.global,z[t.type],t.options||{}),t}(e);var i=Fe.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=V.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,Qe.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Le.notify(t,"beforeInit"),V.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Le.notify(t,"afterInit"),t},clear:function(){return V.canvas.clear(this),this},stop:function(){return $.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(V.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:V.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",V.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Le.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;V.each(e.xAxes,(function(t,n){t.id||(t.id=Ze(e.xAxes,"x-axis-",n))})),V.each(e.yAxes,(function(t,n){t.id||(t.id=Ze(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),V.each(i,(function(e){var i=e.options,r=i.id,o=Ye(i.type,e.dtype);$e(i.position)!==$e(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Oe.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),V.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Oe.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var r=a[t],o=n.getDatasetMeta(t),s=r.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=r.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=$t[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,t),i.push(o.controller)}}return i},resetElements:function(){var t=this;V.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),Ke(i),Le._invalidate(i),!1!==Le.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var a=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&V.each(a,(function(t){t.reset()})),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Le.notify(i,"afterUpdate"),i._layers.sort(Je("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var t=this;!1!==Le.notify(t,"beforeLayout")&&(ge.update(this,this.width,this.height),t._layers=[],V.each(t.boxes,(function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}),t),t._layers.forEach((function(t,e){t._idx=e})),Le.notify(t,"afterScaleUpdate"),Le.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Le.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Le.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==Le.notify(this,"beforeDatasetUpdate",[n])&&(e.controller._update(),Le.notify(this,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Ye(t.duration,n&&n.duration),a=t.lazy;if(!1!==Le.notify(e,"beforeRender")){var r=function(t){Le.notify(e,"afterRender"),V.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new Z({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=V.easing.effects[e.easing],i=e.currentStep,a=i/e.numSteps;t.draw(n(a),a,i)},onAnimationProgress:n.onProgress,onAnimationComplete:r});$.addAnimation(e,o,i,a)}else e.draw(),r(new Z({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,i=this;if(i.clear(),V.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==Le.notify(i,"beforeDraw",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),Le.notify(i,"afterDraw",[t])}},transition:function(t){for(var e=0,n=(this.data.datasets||[]).length;e<n;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,i=[];for(e=0,n=(this.data.datasets||[]).length;e<n;++e)t&&!this.isDatasetVisible(e)||i.push(this.getDatasetMeta(e));return i.sort(Je("order","index")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==Le.notify(this,"beforeDatasetsDraw",[t])){for(n=(e=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(e[n],t);Le.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Le.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Le.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Le.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Le.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return ae.modes.single(this,t)},getElementsAtEvent:function(t){return ae.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return ae.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=ae.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return ae.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),V.canvas.clear(n),Fe.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Le.notify(n,"destroy"),delete Qe.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ue({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};V.each(t.options.events,(function(i){Fe.addEventListener(t,i,n),e[i]=n})),t.options.responsive&&(n=function(){t.resize()},Fe.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,V.each(e,(function(e,n){Fe.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var i,a,r,o=n?"set":"remove";for(a=0,r=t.length;a<r;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[o+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Le.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),Le.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,i=n.options||{},a=i.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,a.mode,a),V.callback(i.onHover||i.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!V.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),Qe.instances={};var tn=Qe;Qe.Controller=Qe,Qe.types={},V.configMerge=Xe,V.scaleMerge=Ge;function en(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function nn(t){this.options=t||{}}V.extend(nn.prototype,{formats:en,parse:en,format:en,add:en,diff:en,startOf:en,endOf:en,_create:function(t){return t}}),nn.override=function(t){V.extend(nn.prototype,t)};var an={_date:nn},rn={formatters:{values:function(t){return V.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=V.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=V.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(V.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},on=V.isArray,sn=V.isNullOrUndef,ln=V.valueOrDefault,un=V.valueAtIndexOrDefault;function dn(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=r<e?i:-i)<s-1e-6||o>l+1e-6)))return o}function hn(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,p,m,v=n.length,b=[],x=[],y=[];for(a=0;a<v;++a){if(s=n[a].label,l=n[a].major?e.major:e.minor,t.font=u=l.string,d=i[u]=i[u]||{data:{},gc:[]},h=l.lineHeight,c=f=0,sn(s)||on(s)){if(on(s))for(r=0,o=s.length;r<o;++r)g=s[r],sn(g)||on(g)||(c=V.measureText(t,d.data,d.gc,c,g),f+=h)}else c=V.measureText(t,d.data,d.gc,c,s),f=h;b.push(c),x.push(f),y.push(h/2)}function _(t){return{width:b[t]||0,height:x[t]||0,offset:y[t]||0}}return function(t,e){V.each(t,(function(t){var n,i=t.gc,a=i.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[i[n]];i.splice(0,a)}}))}(i,v),p=b.indexOf(Math.max.apply(null,b)),m=x.indexOf(Math.max.apply(null,x)),{first:_(0),last:_(v-1),widest:_(p),highest:_(m)}}function cn(t){return t.drawTicks?t.tickMarkLength:0}function fn(t){var e,n;return t.display?(e=V.options._parseFont(t),n=V.options.toPadding(t.padding),e.lineHeight+n.height):0}function gn(t,e){return V.extend(V.options._parseFont({fontFamily:ln(e.fontFamily,t.fontFamily),fontSize:ln(e.fontSize,t.fontSize),fontStyle:ln(e.fontStyle,t.fontStyle),lineHeight:ln(e.lineHeight,t.lineHeight)}),{color:V.options.resolve([e.fontColor,t.fontColor,z.global.defaultFontColor])})}function pn(t){var e=gn(t,t.minor);return{minor:e,major:t.major.enabled?gn(t,t.major):e}}function mn(t){var e,n,i,a=[];for(n=0,i=t.length;n<i;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function vn(t,e,n,i){var a,r,o,s,l=ln(n,0),u=Math.min(ln(i,t.length),t.length),d=0;for(e=Math.ceil(e),i&&(e=(a=i-n)/Math.floor(a/e)),s=l;s<0;)d++,s=Math.round(l+d*e);for(r=Math.max(l,0);r<u;r++)o=t[r],r===s?(o._index=r,d++,s=Math.round(l+d*e)):delete o.label}z._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:rn.formatters.values,minor:{},major:{}}});var bn=X.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){V.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,a,r,o,s,l=this,u=l.options.ticks,d=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=V.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],i=0,a=l.ticks.length;i<a;++i)o.push({value:l.ticks[i],major:!1});return l._ticks=o,s=d<o.length,r=l._convertTicksToLabels(s?function(t,e){for(var n=[],i=t.length/e,a=0,r=t.length;a<r;a+=i)n.push(t[Math.floor(a)]);return n}(o,d):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(o):o,s&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){V.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){V.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){V.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){V.callback(this.options.beforeDataLimits,[this])},determineDataLimits:V.noop,afterDataLimits:function(){V.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){V.callback(this.options.beforeBuildTicks,[this])},buildTicks:V.noop,afterBuildTicks:function(t){var e=this;return on(t)&&t.length?V.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=V.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){V.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){V.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){V.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,a,r,o,s=this,l=s.options,u=l.ticks,d=s.getTicks().length,h=u.minRotation||0,c=u.maxRotation,f=h;!s._isVisible()||!u.display||h>=c||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-cn(l.gridLines)-u.padding-fn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=V.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){V.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){V.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=cn(o)+fn(r)),u?s&&(e.height=cn(o)+fn(r)):e.height=t.maxHeight,a.display&&s){var d=pn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,p=h.highest,m=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,x=V.toRadians(t.labelRotation),y=Math.cos(x),_=Math.sin(x),k=_*g.width+y*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+k+v);var w,M,S=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?y*c.width+_*c.offset:_*(c.height-c.offset),M=l?_*(f.height-f.offset):y*f.width+_*f.offset):(w=c.width/2,M=f.width/2),t.paddingLeft=Math.max((w-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-C)*t.width/(t.width-C),0)+3}else{var P=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){V.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(sn(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=hn(t.ctx,pn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,a;return on(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),i=t,a=t),{min:i,max:a,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:V.noop,getPixelForValue:V.noop,getValueForPixel:V.noop,getPixelForTick:function(t){var e=this.options.offset,n=this._ticks.length,i=1/Math.max(n-(e?0:1),1);return t<0||t>n-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(t):[],u=l.length,d=l[0],h=l[u-1];if(u>s)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)a=t[i],i===o?(a._index=i,o=e[++r*n]):delete a.label}(t,l,u/s),mn(t);if(i=function(t,e,n,i){var a,r,o,s,l=function(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/i;if(!l)return Math.max(u,1);for(o=0,s=(a=V.math._factorize(l)).length-1;o<s;o++)if((r=a[o])>u)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e<n;e++)vn(t,i,l[e],l[e+1]);return a=u>1?(h-d)/(u-1):null,vn(t,i,V.isNullOrUndef(a)?0:d-a,d),vn(t,i,h,V.isNullOrUndef(a)?t.length:h+a),mn(t)}return vn(t,i),mn(t)},_tickSize:function(){var t=this.options.ticks,e=V.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i<o*n?s/n:o/i},_isVisible:function(){var t,e,n,i=this.chart,a=this.options.display;if("auto"!==a)return!!a;for(t=0,e=i.data.datasets.length;t<e;++t)if(i.isDatasetVisible(t)&&((n=i.getDatasetMeta(t)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,i,a,r,o,s,l,u,d,h,c,f,g,p,m,v,b=this,x=b.chart,y=b.options,_=y.gridLines,k=y.position,w=_.offsetGridLines,M=b.isHorizontal(),S=b._ticksToDraw,C=S.length+(w?1:0),P=cn(_),A=[],D=_.drawBorder?un(_.lineWidth,0,0):0,T=D/2,I=V._alignPixel,F=function(t){return I(x,t,D)};for("top"===k?(e=F(b.bottom),s=b.bottom-P,u=e-T,h=F(t.top)+T,f=t.bottom):"bottom"===k?(e=F(b.top),h=t.top,f=F(t.bottom)-T,s=e+T,u=b.top+P):"left"===k?(e=F(b.right),o=b.right-P,l=e-T,d=F(t.left)+T,c=t.right):(e=F(b.left),d=t.left,c=F(t.right)-T,o=e+T,l=b.left+P),n=0;n<C;++n)i=S[n]||{},sn(i.label)&&n<S.length||(n===b.zeroLineIndex&&y.offset===w?(g=_.zeroLineWidth,p=_.zeroLineColor,m=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=un(_.lineWidth,n,1),p=un(_.color,n,"rgba(0,0,0,0.1)"),m=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(a=dn(b,i._index||n,w))&&(r=I(x,a,g),M?o=l=d=c=r:s=u=h=f=r,A.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:h,x2:c,y2:f,width:g,color:p,borderDash:m,borderDashOffset:v})));return A.ticksLength=C,A.borderValue=e,A},_computeLabelItems:function(){var t,e,n,i,a,r,o,s,l,u,d,h,c=this,f=c.options,g=f.ticks,p=f.position,m=g.mirror,v=c.isHorizontal(),b=c._ticksToDraw,x=pn(g),y=g.padding,_=cn(f.gridLines),k=-V.toRadians(c.labelRotation),w=[];for("top"===p?(r=c.bottom-_-y,o=k?"left":"center"):"bottom"===p?(r=c.top+_+y,o=k?"right":"center"):"left"===p?(a=c.right-(m?0:_)-y,o=m?"left":"right"):(a=c.left+(m?0:_)+y,o=m?"right":"left"),t=0,e=b.length;t<e;++t)i=(n=b[t]).label,sn(i)||(s=c.getPixelForTick(n._index||t)+g.labelOffset,u=(l=n.major?x.major:x.minor).lineHeight,d=on(i)?i.length:1,v?(a=s,h="top"===p?((k?1:.5)-d)*u:(k?0:.5)*u):(r=s,h=(1-d)*u/2),w.push({x:a,y:r,rotation:k,label:i,font:l,textOffset:h,textAlign:o}));return w},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,a,r,o,s,l=e.ctx,u=e.chart,d=V._alignPixel,h=n.drawBorder?un(n.lineWidth,0,0):0,c=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(r=0,o=c.length;r<o;++r)i=(s=c[r]).width,a=s.color,i&&a&&(l.save(),l.lineWidth=i,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(h){var f,g,p,m,v=h,b=un(n.lineWidth,c.ticksLength-1,1),x=c.borderValue;e.isHorizontal()?(f=d(u,e.left,v)-v/2,g=d(u,e.right,b)+b/2,p=m=x):(p=d(u,e.top,v)-v/2,m=d(u,e.bottom,b)+b/2,f=g=x),l.lineWidth=h,l.strokeStyle=un(n.color,0),l.beginPath(),l.moveTo(f,p),l.lineTo(g,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,i,a,r,o,s,l,u=t.ctx,d=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,i=d.length;e<i;++e){if(o=(r=d[e]).font,u.save(),u.translate(r.x,r.y),u.rotate(r.rotation),u.font=o.string,u.fillStyle=o.color,u.textBaseline="middle",u.textAlign=r.textAlign,s=r.label,l=r.textOffset,on(s))for(n=0,a=s.length;n<a;++n)u.fillText(""+s[n],0,l),l+=o.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var a,r,o=ln(i.fontColor,z.global.defaultFontColor),s=V.options._parseFont(i),l=V.options.toPadding(i.padding),u=s.lineHeight/2,d=n.position,h=0;if(t.isHorizontal())a=t.left+t.width/2,r="bottom"===d?t.bottom-u-l.bottom:t.top+u+l.top;else{var c="left"===d;a=c?t.left+u+l.top:t.right-u-l.top,r=t.top+t.height/2,h=c?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,r),e.rotate(h),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter((function(i){return(!t||i.type===t)&&(n?i.xAxisID===e.id:i.yAxisID===e.id)}))}});bn.prototype._draw=bn.prototype.draw;var xn=bn,yn=V.isNullOrUndef,_n=xn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,a=i.min,r=i.max,o=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;xn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return yn(e)||yn(n)||(t=o.chart.data.datasets[n].data[e]),yn(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=V.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),kn={position:"bottom"};_n._defaults=kn;var wn=V.noop,Mn=V.isNullOrUndef;var Sn=xn.extend({getRightValue:function(t){return"string"==typeof t?+t:xn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=V.sign(t.min),i=V.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:wn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:V.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=V.niceNum((g-f)/u/l)*l;if(p<1e-14&&Mn(d)&&Mn(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=V.niceNum(r*p/u/l)*l),s||Mn(c)?n=Math.pow(10,V._decimalPlaces(p)):(n=Math.pow(10,c),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!Mn(d)&&V.almostWhole(d/p,p/1e3)&&(i=d),!Mn(h)&&V.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-i)/p,r=V.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(Mn(d)?i:d);for(var m=1;m<r;++m)o.push(Math.round((i+m*p)*n)/n);return o.push(Mn(h)?a:h),o}(i,t);t.handleDirectionalChanges(),t.max=V.max(a),t.min=V.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),xn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,a=e.max;xn.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(a-i)/Math.max(n.length-1,1)/2,a+=t),e._startValue=i,e._endValue=a,e._valueRange=a-i}}),Cn={position:"left",ticks:{callback:rn.formatters.linear}};function Pn(t,e,n,i){var a,r,o=t.options,s=function(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}(e,o.stacked,n),l=s.pos,u=s.neg,d=i.length;for(a=0;a<d;++a)r=t._parseValue(i[a]),isNaN(r.min)||isNaN(r.max)||n.data[a].hidden||(l[a]=l[a]||0,u[a]=u[a]||0,o.relativePoints?l[a]=100:r.min<0||r.max<0?u[a]+=r.min:l[a]+=r.max)}function An(t,e,n){var i,a,r=n.length;for(i=0;i<r;++i)a=t._parseValue(n[i]),isNaN(a.min)||isNaN(a.max)||e.data[i].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var Dn=Sn.extend({determineDataLimits:function(){var t,e,n,i,a=this,r=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=r.stacked,u={},d=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<d;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<d;++t)n=o[(e=s[t]).index].data,l?Pn(a,u,e,n):An(a,e,n);V.each(u,(function(t){i=t.pos.concat(t.neg),a.min=Math.min(a.min,V.min(i)),a.max=Math.max(a.max,V.max(i))})),a.min=V.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=V.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=V.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((+this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),Tn=Cn;Dn._defaults=Tn;var In=V.valueOrDefault,Fn=V.math.log10;var Ln={position:"left",ticks:{callback:rn.formatters.logarithmic}};function On(t,e){return V.isFinite(t)&&t>=0?t:e}var Rn=xn.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e)&&void 0!==e.stack){c=!0;break}if(s.stacked||c){var f={};for(t=0;t<u.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&h(e))for(void 0===f[g]&&(f[g]=[]),a=0,r=(i=u[t].data).length;a<r;a++){var p=f[g];n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(p[a]=p[a]||0,p[a]+=n.max)}}V.each(f,(function(t){if(t.length>0){var e=V.min(t),n=V.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e))for(a=0,r=(i=u[t].data).length;a<r;a++)n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=V.isFinite(o.min)?o.min:null,o.max=V.isFinite(o.max)?o.max:null,o.minNotZero=V.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=On(e.min,t.min),t.max=On(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(Fn(t.min))-1),t.max=Math.pow(10,Math.floor(Fn(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(Fn(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(Fn(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(Fn(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:On(e.min),max:On(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=In(t.min,Math.pow(10,Math.floor(Fn(e.min)))),o=Math.floor(Fn(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(Fn(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(Fn(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10===++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n<o||n===o&&i<s);var u=In(t.max,r);return a.push(u),a}(i,t);t.max=V.max(a),t.min=V.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),xn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(Fn(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;xn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=In(t.options.ticks.fontSize,z.global.defaultFontSize)/t._length),t._startValue=Fn(e),t._valueOffset=n,t._valueRange=(Fn(t.max)-Fn(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(Fn(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),zn=Ln;Rn._defaults=zn;var Nn=V.valueOrDefault,Bn=V.valueAtIndexOrDefault,En=V.options.resolve,Wn={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:rn.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Vn(t){var e=t.ticks;return e.display&&t.display?Nn(e.fontSize,z.global.defaultFontSize)+2*e.backdropPaddingY:0}function Hn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function jn(t){return 0===t||180===t?"center":t<180?"left":"right"}function qn(t,e,n,i){var a,r,o=n.y+i/2;if(V.isArray(e))for(a=0,r=e.length;a<r;++a)t.fillText(e[a],n.x,o),o+=i;else t.fillText(e,n.x,o)}function Un(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Yn(t){return V.isNumber(t)?t:0}var Gn=Sn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Vn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;V.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);V.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Vn(this.options))},convertTicksToLabels:function(){var t=this;Sn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=V.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,a=V.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;e<d;e++){i=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,u=t.pointLabels[e],n=V.isArray(u)?{w:V.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var h=t.getIndexAngle(e),c=V.toDegrees(h)%360,f=Hn(c,i.x,n.w,0,180),g=Hn(c,i.y,n.h,90,270);f.start<r.l&&(r.l=f.start,o.l=h),f.end>r.r&&(r.r=f.end,o.r=h),g.start<r.t&&(r.t=g.start,o.t=h),g.end>r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Yn(a),r=Yn(r),o=Yn(o),s=Yn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(V.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=Nn(s.lineWidth,o.lineWidth),u=Nn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Vn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=V.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),d=Bn(i.fontColor,s,z.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=V.toDegrees(h);e.textAlign=jn(c),Un(c,t._pointLabelSizes[s],u),qn(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&V.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=Bn(e.color,i-1),u=Bn(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d<s;d++)a=t.getPointPosition(d,n),r.lineTo(a.x,a.y)}r.closePath(),r.stroke(),r.restore()}}(i,o,e,n))})),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(En([s.borderDash,o.borderDash,[]])),a.lineDashOffset=En([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=V.options._parseFont(n),s=Nn(n.fontColor,z.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",V.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))})),e.restore()}},_drawTitle:V.noop}),Xn=Wn;Gn._defaults=Xn;var Kn=V._deprecated,Zn=V.options.resolve,$n=V.valueOrDefault,Jn=Number.MIN_SAFE_INTEGER||-9007199254740991,Qn=Number.MAX_SAFE_INTEGER||9007199254740991,ti={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}},ei=Object.keys(ti);function ni(t,e){return t-e}function ii(t){return V.valueOrDefault(t.time.min,t.ticks.min)}function ai(t){return V.valueOrDefault(t.time.max,t.ticks.max)}function ri(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(i=o+s>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]<n)o=i+1;else{if(!(a[e]>n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function oi(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),V.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),V.isFinite(o)||(o=n.parse(o))),o)}function si(t,e){if(V.isNullOrUndef(e))return null;var n=t.options.time,i=oi(t,t.getRightValue(e));return null===i?i:(n.round&&(i=+t._adapter.startOf(i,n.round)),i)}function li(t,e,n,i){var a,r,o,s=ei.length;for(a=ei.indexOf(t);a<s-1;++a)if(o=(r=ti[ei[a]]).steps?r.steps:Qn,r.common&&Math.ceil((n-e)/(o*r.size))<=i)return ei[a];return ei[s-1]}function ui(t,e,n){var i,a,r=[],o={},s=e.length;for(i=0;i<s;++i)o[a=e[i]]=i,r.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){var a,r,o=t._adapter,s=+o.startOf(e[0].value,i),l=e[e.length-1].value;for(a=s;a<=l;a=+o.add(a,1,i))(r=n[a])>=0&&(e[r].major=!0);return e}(t,r,o,n):r}var di=xn.extend({initialize:function(){this.mergeTicksOptions(),xn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new an._date(e.adapters.date);return Kn("time scale",n.format,"time.format","time.parser"),Kn("time scale",n.min,"time.min","ticks.min"),Kn("time scale",n.max,"time.max","ticks.max"),V.mergeIf(n.displayFormats,i.formats()),xn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),xn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",c=Qn,f=Jn,g=[],p=[],m=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)m.push(si(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(a=l.data.datasets[t].data,V.isObject(a[0]))for(p[t]=[],e=0,i=a.length;e<i;++e)r=si(s,a[e]),g.push(r),p[t][e]=r;else p[t]=m.slice(0),o||(g=g.concat(m),o=!0);else p[t]=[];m.length&&(c=Math.min(c,m[0]),f=Math.max(f,m[m.length-1])),g.length&&(g=n>1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,r.push(i));return r}(g).sort(ni):g.sort(ni),c=Math.min(c,g[0]),f=Math.max(f,g[g.length-1])),c=si(s,ii(d))||c,f=si(s,ai(d))||f,c=c===Qn?+u.startOf(Date.now(),h):c,f=f===Jn?+u.endOf(Date.now(),h)+1:f,s.min=Math.min(c,f),s.max=Math.max(c+1,f),s._table=[],s._timestamps={data:g,datasets:p,labels:m}},buildTicks:function(){var t,e,n,i=this,a=i.min,r=i.max,o=i.options,s=o.ticks,l=o.time,u=i._timestamps,d=[],h=i.getLabelCapacity(a),c=s.source,f=o.distribution;for(u="data"===c||"auto"===c&&"series"===f?u.data:"labels"===c?u.labels:function(t,e,n,i){var a,r=t._adapter,o=t.options,s=o.time,l=s.unit||li(s.minUnit,e,n,i),u=Zn([s.stepSize,s.unitStepSize,1]),d="week"===l&&s.isoWeekday,h=e,c=[];if(d&&(h=+r.startOf(h,"isoWeek",d)),h=+r.startOf(h,d?"day":l),r.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=h;a<n;a=+r.add(a,u,l))c.push(a);return a!==n&&"ticks"!==o.bounds||c.push(a),c}(i,a,r,h),"ticks"===o.bounds&&u.length&&(a=u[0],r=u[u.length-1]),a=si(i,ii(o))||a,r=si(i,ai(o))||r,t=0,e=u.length;t<e;++t)(n=u[t])>=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?li(l.minUnit,i.min,i.max,h):function(t,e,n,i,a){var r,o;for(r=ei.length-1;r>=ei.indexOf(n);r--)if(o=ei[r],ti[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ei[n?ei.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?function(t){for(var e=ei.indexOf(t)+1,n=ei.length;e<n;++e)if(ti[ei[e]].common)return ei[e]}(i._unit):void 0,i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;a<r;++a)(s=t[a])>e&&s<n&&d.push(s);for(d.push(n),a=0,r=d.length;a<r;++a)l=d[a+1],o=d[a-1],s=d[a],void 0!==o&&void 0!==l&&Math.round((l+o)/2)===s||u.push({time:s,pos:a/(r-1)});return u}(i._timestamps.data,a,r,f),i._offsets=function(t,e,n,i,a){var r,o,s=0,l=0;return a.offset&&e.length&&(r=ri(t,"time",e[0],"pos"),s=1===e.length?1-r:(ri(t,"time",e[1],"pos")-r)/2,o=ri(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-ri(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(i._table,d,0,0,o),s.reverse&&d.reverse(),ui(i,d,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return V.isObject(s)&&(o=n.getRightValue(s)),r.tooltipFormat?i.format(oi(n,o),r.tooltipFormat):"string"==typeof o?o:i.format(oi(n,o),r.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var a=this._adapter,r=this.options,o=r.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=n[e],h=r.ticks,c=l&&u&&d&&d.major,f=a.format(t,i||(c?u:s)),g=c?h.major:h.minor,p=Zn([g.callback,g.userCallback,h.callback,h.userCallback]);return p?p(f,e,n):f},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this._offsets,n=ri(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+n)*e.factor)},getPixelForValue:function(t,e,n){var i=null;if(void 0!==e&&void 0!==n&&(i=this._timestamps.datasets[n][e]),null===i&&(i=si(this,t)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end,i=ri(this._table,"pos",n,"time");return this._adapter._create(i)},_getLabelSize:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=V.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(i),r=Math.sin(i),o=$n(e.fontSize,z.global.defaultFontSize);return{w:n*a+o*r,h:n*r+o*a}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=e.tickFormatFunction(t,0,ui(e,[t],e._majorUnit),a),o=e._getLabelSize(r),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}}),hi={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}}};di._defaults=hi;var ci={category:_n,linear:Dn,logarithmic:Rn,radialLinear:Gn,time:di},fi={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"};an._date.override("function"==typeof t?{_id:"moment",formats:function(){return fi},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),z._set("global",{plugins:{filler:{propagate:!0}}});var gi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return V.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function pi(t,e,n){var i,a=t._model||{},r=a.fill;if(void 0===r&&(r=!!a.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function mi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a<l;++a)r="start"===u||"end"===u?o.getPointPositionForValue(a,"start"===u?e:n):o.getBasePosition(a),s.gridLines.circular&&(r.cx=i.x,r.cy=i.y,r.angle=o.getIndexAngle(a)-Math.PI/2),d.push(r);return d}(t):function(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(V.isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}(t)}function vi(t,e,n){var i,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function bi(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),gi[n](t))}function xi(t){return t&&!t.skip}function yi(t,e,n,i,a){var r,o,s,l;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)V.canvas.lineTo(t,e[r-1],e[r]);if(void 0===n[0].angle)for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)V.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function _i(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,x=0;for(t.beginPath(),o=0,s=g;o<s;++o)d=n(u=e[l=o%g]._view,l,i),h=xi(u),c=xi(d),r&&void 0===f&&h&&(s=g+(f=o+1)),h&&c?(b=m.push(u),x=v.push(d)):b&&x&&(p?(h&&m.push(u),c&&v.push(d)):(yi(t,m,v,b,x),b=x=0,m=[],v=[]));yi(t,m,v,b,x),t.closePath(),t.fillStyle=a,t.fill()}var ki={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,a,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<o;++i)r=null,(a=(n=t.getDatasetMeta(i)).dataset)&&a._model&&a instanceof _t.Line&&(r={visible:t.isDatasetVisible(i),fill:pi(a,i,o),chart:t,el:a}),n.$filler=r,l.push(r);for(i=0;i<o;++i)(r=l[i])&&(r.fill=vi(l,i,s),r.boundary=mi(r),r.mapper=bi(r))},beforeDatasetsDraw:function(t){var e,n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(a=(i=e.el)._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||z.global.defaultColor,o&&s&&r.length&&(V.canvas.clipArea(u,t.chartArea),_i(u,r,o,a,s,i._loop),V.canvas.unclipArea(u)))}},wi=V.rtl.getRtlAdapter,Mi=V.noop,Si=V.valueOrDefault;function Ci(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}z._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;e<n;e++)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[e].backgroundColor,r[e].label&&i.appendChild(document.createTextNode(r[e].label));return a.outerHTML}});var Pi=X.extend({initialize:function(t){V.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:Mi,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Mi,beforeSetDimensions:Mi,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Mi,beforeBuildLabels:Mi,buildLabels:function(){var t=this,e=t.options.labels||{},n=V.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:Mi,beforeFit:Mi,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=V.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i){if(a.font=r.string,u){var d=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="middle",V.each(t.legendItems,(function(t,e){var i=Ci(n,o)+o/2+a.measureText(t.text).width;(0===e||d[d.length-1]+i+2*n.padding>l.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;V.each(t.legendItems,(function(t,e){var i=Ci(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}})),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Mi,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=z.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=wi(e.rtl,t.left,t.minSize.width),c=t.ctx,f=Si(n.fontColor,i.defaultFontColor),g=V.options._parseFont(n),p=g.size;c.textAlign=h.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var m=Ci(n,p),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},x=t.isHorizontal();d=x?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},V.rtl.overrideTextDirection(t.ctx,e.textDirection);var y=p+n.padding;V.each(t.legendItems,(function(e,i){var f=c.measureText(e.text).width,g=m+p/2+f,_=d.x,k=d.y;h.setWidth(t.minSize.width),x?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=d.y+=y,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&k+y>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,k=d.y=t.top+b(o,s[d.line]));var w=h.x(_);!function(t,e,i){if(!(isNaN(m)||m<=0)){c.save();var o=Si(i.lineWidth,r.borderWidth);if(c.fillStyle=Si(i.fillStyle,a),c.lineCap=Si(i.lineCap,r.borderCapStyle),c.lineDashOffset=Si(i.lineDashOffset,r.borderDashOffset),c.lineJoin=Si(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=Si(i.strokeStyle,a),c.setLineDash&&c.setLineDash(Si(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=h.xPlus(t,m/2),u=e+p/2;V.canvas.drawPoint(c,i.pointStyle,s,l,u,i.rotation)}else c.fillRect(h.leftForLtr(t,m),e,m,p),0!==o&&c.strokeRect(h.leftForLtr(t,m),e,m,p);c.restore()}}(w,k,e),v[i].left=h.leftForLtr(w,v[i].width),v[i].top=k,function(t,e,n,i){var a=p/2,r=h.xPlus(t,m+a),o=e+a;c.fillText(n.text,r,o),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,o),c.lineTo(h.xPlus(r,i),o),c.stroke())}(w,k,e,f),x?d.x+=g+n.padding:d.y+=y})),V.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(t>=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Ai(t,e){var n=new Pi({ctx:t.ctx,options:e,chart:t});ge.configure(t,n,e),ge.addBox(t,n),t.legend=n}var Di={id:"legend",_element:Pi,beforeInit:function(t){var e=t.options.legend;e&&Ai(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(V.mergeIf(e,z.global.legend),n?(ge.configure(t,n,e),n.options=e):Ai(t,e)):n&&(ge.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Ti=V.noop;z._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Ii=X.extend({initialize:function(t){V.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Ti,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Ti,beforeSetDimensions:Ti,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Ti,beforeBuildLabels:Ti,buildLabels:Ti,afterBuildLabels:Ti,beforeFit:Ti,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(V.isArray(n.text)?n.text.length:1)*V.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Ti,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=V.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=V.valueOrDefault(n.fontColor,z.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(V.isArray(g))for(var p=0,m=0;m<g.length;++m)e.fillText(g[m],0,p,i),p+=s;else e.fillText(g,0,0,i);e.restore()}}});function Fi(t,e){var n=new Ii({ctx:t.ctx,options:e,chart:t});ge.configure(t,n,e),ge.addBox(t,n),t.titleBlock=n}var Li={},Oi=ki,Ri=Di,zi={id:"title",_element:Ii,beforeInit:function(t){var e=t.options.title;e&&Fi(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(V.mergeIf(e,z.global.title),n?(ge.configure(t,n,e),n.options=e):Fi(t,e)):n&&(ge.removeBox(t,n),delete t.titleBlock)}};for(var Ni in Li.filler=Oi,Li.legend=Ri,Li.title=zi,tn.helpers=V,function(){function t(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function e(t){return null!=t&&"none"!==t}function n(n,i,a){var r=document.defaultView,o=V._getParentNode(n),s=r.getComputedStyle(n)[i],l=r.getComputedStyle(o)[i],u=e(s),d=e(l),h=Number.POSITIVE_INFINITY;return u||d?Math.min(u?t(s,n,a):h,d?t(l,o,a):h):"none"}V.where=function(t,e){if(V.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return V.each(t,(function(t){e(t)&&n.push(t)})),n},V.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i<a;++i)if(e.call(n,t[i],i,t))return i;return-1},V.findNextWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var a=t[i];if(e(a))return a}},V.findPreviousWhere=function(t,e,n){V.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},V.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},V.almostEquals=function(t,e,n){return Math.abs(t-e)<n},V.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},V.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},V.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},V.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},V.toRadians=function(t){return t*(Math.PI/180)},V.toDegrees=function(t){return t*(180/Math.PI)},V._decimalPlaces=function(t){if(V.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},V.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},V.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},V.aliasPixel=function(t){return t%2==0?0:.5},V._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},V.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},V.EPSILON=Number.EPSILON||1e-14,V.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e<h;++e)if(!(i=d[e]).model.skip){if(n=e>0?d[e-1]:null,(a=e<h-1?d[e+1]:null)&&!a.model.skip){var c=a.model.x-i.model.x;i.deltaK=0!==c?(a.model.y-i.model.y)/c:0}!n||n.model.skip?i.mK=i.deltaK:!a||a.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(e=0;e<h-1;++e)i=d[e],a=d[e+1],i.model.skip||a.model.skip||(V.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(r=i.mK/i.deltaK,o=a.mK/i.deltaK,(l=Math.pow(r,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),i.mK=r*s*i.deltaK,a.mK=o*s*i.deltaK)));for(e=0;e<h;++e)(i=d[e]).model.skip||(n=e>0?d[e-1]:null,a=e<h-1?d[e+1]:null,n&&!n.model.skip&&(u=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-u,i.model.controlPointPreviousY=i.model.y-u*i.mK),a&&!a.model.skip&&(u=(a.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+u,i.model.controlPointNextY=i.model.y+u*i.mK))},V.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},V.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},V.niceNum=function(t,e){var n=Math.floor(V.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},V.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},V.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(V.getStyle(r,"padding-left")),u=parseFloat(V.getStyle(r,"padding-top")),d=parseFloat(V.getStyle(r,"padding-right")),h=parseFloat(V.getStyle(r,"padding-bottom")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},V.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},V.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},V._calculatePadding=function(t,e,n){return(e=V.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},V._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},V.getMaximumWidth=function(t){var e=V._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-V._calculatePadding(e,"padding-left",n)-V._calculatePadding(e,"padding-right",n),a=V.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},V.getMaximumHeight=function(t){var e=V._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-V._calculatePadding(e,"padding-top",n)-V._calculatePadding(e,"padding-bottom",n),a=V.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},V.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},V.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},V.fontString=function(t,e,n){return e+" "+t+"px "+n},V.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;o<c;o++)if(null!=(u=n[o])&&!0!==V.isArray(u))h=V.measureText(t,a,r,h,u);else if(V.isArray(u))for(s=0,l=u.length;s<l;s++)null==(d=u[s])||V.isArray(d)||(h=V.measureText(t,a,r,h,d));var f=r.length/2;if(f>n.length){for(o=0;o<f;o++)delete a[r[o]];r.splice(0,f)}return h},V.measureText=function(t,e,n,i,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),r>i&&(i=r),i},V.numberOfLabelLines=function(t){var e=1;return V.each(t,(function(t){V.isArray(t)&&t.length>e&&(e=t.length)})),e},V.color=k?function(t){return t instanceof CanvasGradient&&(t=z.global.defaultColor),k(t)}:function(t){return console.error("Color.js not found!"),t},V.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:V.color(t).saturate(.5).darken(.1).rgbString()}}(),tn._adapters=an,tn.Animation=Z,tn.animationService=$,tn.controllers=$t,tn.DatasetController=nt,tn.defaults=z,tn.Element=X,tn.elements=_t,tn.Interaction=ae,tn.layouts=ge,tn.platform=Fe,tn.plugins=Le,tn.Scale=xn,tn.scaleService=Oe,tn.Ticks=rn,tn.Tooltip=Ue,tn.helpers.each(ci,(function(t,e){tn.scaleService.registerScaleType(e,t,t._defaults)})),Li)Li.hasOwnProperty(Ni)&&tn.plugins.register(Li[Ni]);tn.platform.initialize();var Bi=tn;return"undefined"!=typeof window&&(window.Chart=tn),tn.Chart=tn,tn.Legend=Li.legend._element,tn.Title=Li.title._element,tn.pluginService=tn.plugins,tn.PluginBase=tn.Element.extend({}),tn.canvasHelpers=tn.helpers.canvas,tn.layoutService=tn.layouts,tn.LinearScaleBase=Sn,tn.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){tn[t]=function(e,n){return new tn(e,tn.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Bi}));
|
1 |
/*!
|
2 |
+
* Chart.js v2.9.4
|
3 |
* https://www.chartjs.org
|
4 |
+
* (c) 2020 Chart.js Contributors
|
5 |
* Released under the MIT License
|
6 |
*/
|
7 |
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(function(){try{return require("moment")}catch(t){}}()):"function"==typeof define&&define.amd?define(["require"],(function(t){return e(function(){try{return t("moment")}catch(t){}}())})):(t=t||self).Chart=e(t.moment)}(this,(function(t){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var e={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]},n=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[e[i]]=i);var a=t.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var r in a)if(a.hasOwnProperty(r)){if(!("channels"in a[r]))throw new Error("missing channels property: "+r);if(!("labels"in a[r]))throw new Error("missing channel labels property: "+r);if(a[r].labels.length!==a[r].channels)throw new Error("channel and label counts mismatch: "+r);var o=a[r].channels,s=a[r].labels;delete a[r].channels,delete a[r].labels,Object.defineProperty(a[r],"channels",{value:o}),Object.defineProperty(a[r],"labels",{value:s})}a.rgb.hsl=function(t){var e,n,i=t[0]/255,a=t[1]/255,r=t[2]/255,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o;return s===o?e=0:i===s?e=(a-r)/l:a===s?e=2+(r-i)/l:r===s&&(e=4+(i-a)/l),(e=Math.min(60*e,360))<0&&(e+=360),n=(o+s)/2,[e,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},a.rgb.hsv=function(t){var e,n,i,a,r,o=t[0]/255,s=t[1]/255,l=t[2]/255,u=Math.max(o,s,l),d=u-Math.min(o,s,l),h=function(t){return(u-t)/6/d+.5};return 0===d?a=r=0:(r=d/u,e=h(o),n=h(s),i=h(l),o===u?a=i-n:s===u?a=1/3+e-i:l===u&&(a=2/3+n-e),a<0?a+=1:a>1&&(a-=1)),[360*a,100*r,100*u]},a.rgb.hwb=function(t){var e=t[0],n=t[1],i=t[2];return[a.rgb.hsl(t)[0],100*(1/255*Math.min(e,Math.min(n,i))),100*(i=1-1/255*Math.max(e,Math.max(n,i)))]},a.rgb.cmyk=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255;return[100*((1-n-(e=Math.min(1-n,1-i,1-a)))/(1-e)||0),100*((1-i-e)/(1-e)||0),100*((1-a-e)/(1-e)||0),100*e]},a.rgb.keyword=function(t){var i=n[t];if(i)return i;var a,r,o,s=1/0;for(var l in e)if(e.hasOwnProperty(l)){var u=e[l],d=(r=t,o=u,Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)+Math.pow(r[2]-o[2],2));d<s&&(s=d,a=l)}return a},a.keyword.rgb=function(t){return e[t]},a.rgb.xyz=function(t){var e=t[0]/255,n=t[1]/255,i=t[2]/255;return[100*(.4124*(e=e>.04045?Math.pow((e+.055)/1.055,2.4):e/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(i=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92)),100*(.2126*e+.7152*n+.0722*i),100*(.0193*e+.1192*n+.9505*i)]},a.rgb.lab=function(t){var e=a.rgb.xyz(t),n=e[0],i=e[1],r=e[2];return i/=100,r/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116)-16,500*(n-i),200*(i-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},a.hsl.rgb=function(t){var e,n,i,a,r,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[r=255*l,r,r];e=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(i=o+1/3*-(u-1))<0&&i++,i>1&&i--,r=6*i<1?e+6*(n-e)*i:2*i<1?n:3*i<2?e+(n-e)*(2/3-i)*6:e,a[u]=255*r;return a},a.hsl.hsv=function(t){var e=t[0],n=t[1]/100,i=t[2]/100,a=n,r=Math.max(i,.01);return n*=(i*=2)<=1?i:2-i,a*=r<=1?r:2-r,[e,100*(0===i?2*a/(r+a):2*n/(i+n)),100*((i+n)/2)]},a.hsv.rgb=function(t){var e=t[0]/60,n=t[1]/100,i=t[2]/100,a=Math.floor(e)%6,r=e-Math.floor(e),o=255*i*(1-n),s=255*i*(1-n*r),l=255*i*(1-n*(1-r));switch(i*=255,a){case 0:return[i,l,o];case 1:return[s,i,o];case 2:return[o,i,l];case 3:return[o,s,i];case 4:return[l,o,i];case 5:return[i,o,s]}},a.hsv.hsl=function(t){var e,n,i,a=t[0],r=t[1]/100,o=t[2]/100,s=Math.max(o,.01);return i=(2-r)*o,n=r*s,[a,100*(n=(n/=(e=(2-r)*s)<=1?e:2-e)||0),100*(i/=2)]},a.hwb.rgb=function(t){var e,n,i,a,r,o,s,l=t[0]/360,u=t[1]/100,d=t[2]/100,h=u+d;switch(h>1&&(u/=h,d/=h),i=6*l-(e=Math.floor(6*l)),0!=(1&e)&&(i=1-i),a=u+i*((n=1-d)-u),e){default:case 6:case 0:r=n,o=a,s=u;break;case 1:r=a,o=n,s=u;break;case 2:r=u,o=n,s=a;break;case 3:r=u,o=a,s=n;break;case 4:r=a,o=u,s=n;break;case 5:r=n,o=u,s=a}return[255*r,255*o,255*s]},a.cmyk.rgb=function(t){var e=t[0]/100,n=t[1]/100,i=t[2]/100,a=t[3]/100;return[255*(1-Math.min(1,e*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,i*(1-a)+a))]},a.xyz.rgb=function(t){var e,n,i,a=t[0]/100,r=t[1]/100,o=t[2]/100;return n=-.9689*a+1.8758*r+.0415*o,i=.0557*a+-.204*r+1.057*o,e=(e=3.2406*a+-1.5372*r+-.4986*o)>.0031308?1.055*Math.pow(e,1/2.4)-.055:12.92*e,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,i=i>.0031308?1.055*Math.pow(i,1/2.4)-.055:12.92*i,[255*(e=Math.min(Math.max(0,e),1)),255*(n=Math.min(Math.max(0,n),1)),255*(i=Math.min(Math.max(0,i),1))]},a.xyz.lab=function(t){var e=t[0],n=t[1],i=t[2];return n/=100,i/=108.883,e=(e/=95.047)>.008856?Math.pow(e,1/3):7.787*e+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(e-n),200*(n-(i=i>.008856?Math.pow(i,1/3):7.787*i+16/116))]},a.lab.xyz=function(t){var e,n,i,a=t[0];e=t[1]/500+(n=(a+16)/116),i=n-t[2]/200;var r=Math.pow(n,3),o=Math.pow(e,3),s=Math.pow(i,3);return n=r>.008856?r:(n-16/116)/7.787,e=o>.008856?o:(e-16/116)/7.787,i=s>.008856?s:(i-16/116)/7.787,[e*=95.047,n*=100,i*=108.883]},a.lab.lch=function(t){var e,n=t[0],i=t[1],a=t[2];return(e=360*Math.atan2(a,i)/2/Math.PI)<0&&(e+=360),[n,Math.sqrt(i*i+a*a),e]},a.lch.lab=function(t){var e,n=t[0],i=t[1];return e=t[2]/360*2*Math.PI,[n,i*Math.cos(e),i*Math.sin(e)]},a.rgb.ansi16=function(t){var e=t[0],n=t[1],i=t[2],r=1 in arguments?arguments[1]:a.rgb.hsv(t)[2];if(0===(r=Math.round(r/50)))return 30;var o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(e/255));return 2===r&&(o+=60),o},a.hsv.ansi16=function(t){return a.rgb.ansi16(a.hsv.rgb(t),t[2])},a.rgb.ansi256=function(t){var e=t[0],n=t[1],i=t[2];return e===n&&n===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(i/255*5)},a.ansi16.rgb=function(t){var e=t%10;if(0===e||7===e)return t>50&&(e+=3.5),[e=e/10.5*255,e,e];var n=.5*(1+~~(t>50));return[(1&e)*n*255,(e>>1&1)*n*255,(e>>2&1)*n*255]},a.ansi256.rgb=function(t){if(t>=232){var e=10*(t-232)+8;return[e,e,e]}var n;return t-=16,[Math.floor(t/36)/5*255,Math.floor((n=t%36)/6)/5*255,n%6/5*255]},a.rgb.hex=function(t){var e=(((255&Math.round(t[0]))<<16)+((255&Math.round(t[1]))<<8)+(255&Math.round(t[2]))).toString(16).toUpperCase();return"000000".substring(e.length)+e},a.hex.rgb=function(t){var e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];var n=e[0];3===e[0].length&&(n=n.split("").map((function(t){return t+t})).join(""));var i=parseInt(n,16);return[i>>16&255,i>>8&255,255&i]},a.rgb.hcg=function(t){var e,n=t[0]/255,i=t[1]/255,a=t[2]/255,r=Math.max(Math.max(n,i),a),o=Math.min(Math.min(n,i),a),s=r-o;return e=s<=0?0:r===n?(i-a)/s%6:r===i?2+(a-n)/s:4+(n-i)/s+4,e/=6,[360*(e%=1),100*s,100*(s<1?o/(1-s):0)]},a.hsl.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=1,a=0;return(i=n<.5?2*e*n:2*e*(1-n))<1&&(a=(n-.5*i)/(1-i)),[t[0],100*i,100*a]},a.hsv.hcg=function(t){var e=t[1]/100,n=t[2]/100,i=e*n,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.hcg.rgb=function(t){var e=t[0]/360,n=t[1]/100,i=t[2]/100;if(0===n)return[255*i,255*i,255*i];var a,r=[0,0,0],o=e%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:r[0]=1,r[1]=s,r[2]=0;break;case 1:r[0]=l,r[1]=1,r[2]=0;break;case 2:r[0]=0,r[1]=1,r[2]=s;break;case 3:r[0]=0,r[1]=l,r[2]=1;break;case 4:r[0]=s,r[1]=0,r[2]=1;break;default:r[0]=1,r[1]=0,r[2]=l}return a=(1-n)*i,[255*(n*r[0]+a),255*(n*r[1]+a),255*(n*r[2]+a)]},a.hcg.hsv=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e),i=0;return n>0&&(i=e/n),[t[0],100*i,100*n]},a.hcg.hsl=function(t){var e=t[1]/100,n=t[2]/100*(1-e)+.5*e,i=0;return n>0&&n<.5?i=e/(2*n):n>=.5&&n<1&&(i=e/(2*(1-n))),[t[0],100*i,100*n]},a.hcg.hwb=function(t){var e=t[1]/100,n=e+t[2]/100*(1-e);return[t[0],100*(n-e),100*(1-n)]},a.hwb.hcg=function(t){var e=t[1]/100,n=1-t[2]/100,i=n-e,a=0;return i<1&&(a=(n-i)/(1-i)),[t[0],100*i,100*a]},a.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]},a.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]},a.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]},a.gray.hsl=a.gray.hsv=function(t){return[0,0,t[0]]},a.gray.hwb=function(t){return[0,100,t[0]]},a.gray.cmyk=function(t){return[0,0,0,t[0]]},a.gray.lab=function(t){return[t[0],0,0]},a.gray.hex=function(t){var e=255&Math.round(t[0]/100*255),n=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(n.length)+n},a.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}}));n.rgb,n.hsl,n.hsv,n.hwb,n.cmyk,n.xyz,n.lab,n.lch,n.hex,n.keyword,n.ansi16,n.ansi256,n.hcg,n.apple,n.gray;function i(t){var e=function(){for(var t={},e=Object.keys(n),i=e.length,a=0;a<i;a++)t[e[a]]={distance:-1,parent:null};return t}(),i=[t];for(e[t].distance=0;i.length;)for(var a=i.pop(),r=Object.keys(n[a]),o=r.length,s=0;s<o;s++){var l=r[s],u=e[l];-1===u.distance&&(u.distance=e[a].distance+1,u.parent=a,i.unshift(l))}return e}function a(t,e){return function(n){return e(t(n))}}function r(t,e){for(var i=[e[t].parent,t],r=n[e[t].parent][t],o=e[t].parent;e[o].parent;)i.unshift(e[o].parent),r=a(n[e[o].parent][o],r),o=e[o].parent;return r.conversion=i,r}var o={};Object.keys(n).forEach((function(t){o[t]={},Object.defineProperty(o[t],"channels",{value:n[t].channels}),Object.defineProperty(o[t],"labels",{value:n[t].labels});var e=function(t){for(var e=i(t),n={},a=Object.keys(e),o=a.length,s=0;s<o;s++){var l=a[s];null!==e[l].parent&&(n[l]=r(l,e))}return n}(t);Object.keys(e).forEach((function(n){var i=e[n];o[t][n]=function(t){var e=function(e){if(null==e)return e;arguments.length>1&&(e=Array.prototype.slice.call(arguments));var n=t(e);if("object"==typeof n)for(var i=n.length,a=0;a<i;a++)n[a]=Math.round(n[a]);return n};return"conversion"in t&&(e.conversion=t.conversion),e}(i),o[t][n].raw=function(t){var e=function(e){return null==e?e:(arguments.length>1&&(e=Array.prototype.slice.call(arguments)),t(e))};return"conversion"in t&&(e.conversion=t.conversion),e}(i)}))}));var s=o,l={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]},u={getRgba:d,getHsla:h,getRgb:function(t){var e=d(t);return e&&e.slice(0,3)},getHsl:function(t){var e=h(t);return e&&e.slice(0,3)},getHwb:c,getAlpha:function(t){var e=d(t);if(e)return e[3];if(e=h(t))return e[3];if(e=c(t))return e[3]},hexString:function(t,e){e=void 0!==e&&3===t.length?e:t[3];return"#"+v(t[0])+v(t[1])+v(t[2])+(e>=0&&e<1?v(Math.round(255*e)):"")},rgbString:function(t,e){if(e<1||t[3]&&t[3]<1)return f(t,e);return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},rgbaString:f,percentString:function(t,e){if(e<1||t[3]&&t[3]<1)return g(t,e);var n=Math.round(t[0]/255*100),i=Math.round(t[1]/255*100),a=Math.round(t[2]/255*100);return"rgb("+n+"%, "+i+"%, "+a+"%)"},percentaString:g,hslString:function(t,e){if(e<1||t[3]&&t[3]<1)return p(t,e);return"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)"},hslaString:p,hwbString:function(t,e){void 0===e&&(e=void 0!==t[3]?t[3]:1);return"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+(void 0!==e&&1!==e?", "+e:"")+")"},keyword:function(t){return b[t.slice(0,3)]}};function d(t){if(t){var e=[0,0,0],n=1,i=t.match(/^#([a-fA-F0-9]{3,4})$/i),a="";if(i){a=(i=i[1])[3];for(var r=0;r<e.length;r++)e[r]=parseInt(i[r]+i[r],16);a&&(n=Math.round(parseInt(a+a,16)/255*100)/100)}else if(i=t.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){a=i[2],i=i[1];for(r=0;r<e.length;r++)e[r]=parseInt(i.slice(2*r,2*r+2),16);a&&(n=Math.round(parseInt(a,16)/255*100)/100)}else if(i=t.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=parseInt(i[r+1]);n=parseFloat(i[4])}else if(i=t.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(r=0;r<e.length;r++)e[r]=Math.round(2.55*parseFloat(i[r+1]));n=parseFloat(i[4])}else if(i=t.match(/(\w+)/)){if("transparent"==i[1])return[0,0,0,0];if(!(e=l[i[1]]))return}for(r=0;r<e.length;r++)e[r]=m(e[r],0,255);return n=n||0==n?m(n,0,1):1,e[3]=n,e}}function h(t){if(t){var e=t.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function c(t){if(t){var e=t.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(e){var n=parseFloat(e[4]);return[m(parseInt(e[1]),0,360),m(parseFloat(e[2]),0,100),m(parseFloat(e[3]),0,100),m(isNaN(n)?1:n,0,1)]}}}function f(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"rgba("+t[0]+", "+t[1]+", "+t[2]+", "+e+")"}function g(t,e){return"rgba("+Math.round(t[0]/255*100)+"%, "+Math.round(t[1]/255*100)+"%, "+Math.round(t[2]/255*100)+"%, "+(e||t[3]||1)+")"}function p(t,e){return void 0===e&&(e=void 0!==t[3]?t[3]:1),"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+e+")"}function m(t,e,n){return Math.min(Math.max(e,t),n)}function v(t){var e=t.toString(16).toUpperCase();return e.length<2?"0"+e:e}var b={};for(var x in l)b[l[x]]=x;var y=function(t){return t instanceof y?t:this instanceof y?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof t?(e=u.getRgba(t))?this.setValues("rgb",e):(e=u.getHsla(t))?this.setValues("hsl",e):(e=u.getHwb(t))&&this.setValues("hwb",e):"object"==typeof t&&(void 0!==(e=t).r||void 0!==e.red?this.setValues("rgb",e):void 0!==e.l||void 0!==e.lightness?this.setValues("hsl",e):void 0!==e.v||void 0!==e.value?this.setValues("hsv",e):void 0!==e.w||void 0!==e.whiteness?this.setValues("hwb",e):void 0===e.c&&void 0===e.cyan||this.setValues("cmyk",e)))):new y(t);var e};y.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var t=this.values;return 1!==t.alpha?t.hwb.concat([t.alpha]):t.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var t=this.values;return t.rgb.concat([t.alpha])},hslaArray:function(){var t=this.values;return t.hsl.concat([t.alpha])},alpha:function(t){return void 0===t?this.values.alpha:(this.setValues("alpha",t),this)},red:function(t){return this.setChannel("rgb",0,t)},green:function(t){return this.setChannel("rgb",1,t)},blue:function(t){return this.setChannel("rgb",2,t)},hue:function(t){return t&&(t=(t%=360)<0?360+t:t),this.setChannel("hsl",0,t)},saturation:function(t){return this.setChannel("hsl",1,t)},lightness:function(t){return this.setChannel("hsl",2,t)},saturationv:function(t){return this.setChannel("hsv",1,t)},whiteness:function(t){return this.setChannel("hwb",1,t)},blackness:function(t){return this.setChannel("hwb",2,t)},value:function(t){return this.setChannel("hsv",2,t)},cyan:function(t){return this.setChannel("cmyk",0,t)},magenta:function(t){return this.setChannel("cmyk",1,t)},yellow:function(t){return this.setChannel("cmyk",2,t)},black:function(t){return this.setChannel("cmyk",3,t)},hexString:function(){return u.hexString(this.values.rgb)},rgbString:function(){return u.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return u.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return u.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return u.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return u.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return u.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return u.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var t=this.values.rgb;return t[0]<<16|t[1]<<8|t[2]},luminosity:function(){for(var t=this.values.rgb,e=[],n=0;n<t.length;n++){var i=t[n]/255;e[n]=i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4)}return.2126*e[0]+.7152*e[1]+.0722*e[2]},contrast:function(t){var e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level:function(t){var e=this.contrast(t);return e>=7.1?"AAA":e>=4.5?"AA":""},dark:function(){var t=this.values.rgb;return(299*t[0]+587*t[1]+114*t[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var t=[],e=0;e<3;e++)t[e]=255-this.values.rgb[e];return this.setValues("rgb",t),this},lighten:function(t){var e=this.values.hsl;return e[2]+=e[2]*t,this.setValues("hsl",e),this},darken:function(t){var e=this.values.hsl;return e[2]-=e[2]*t,this.setValues("hsl",e),this},saturate:function(t){var e=this.values.hsl;return e[1]+=e[1]*t,this.setValues("hsl",e),this},desaturate:function(t){var e=this.values.hsl;return e[1]-=e[1]*t,this.setValues("hsl",e),this},whiten:function(t){var e=this.values.hwb;return e[1]+=e[1]*t,this.setValues("hwb",e),this},blacken:function(t){var e=this.values.hwb;return e[2]+=e[2]*t,this.setValues("hwb",e),this},greyscale:function(){var t=this.values.rgb,e=.3*t[0]+.59*t[1]+.11*t[2];return this.setValues("rgb",[e,e,e]),this},clearer:function(t){var e=this.values.alpha;return this.setValues("alpha",e-e*t),this},opaquer:function(t){var e=this.values.alpha;return this.setValues("alpha",e+e*t),this},rotate:function(t){var e=this.values.hsl,n=(e[0]+t)%360;return e[0]=n<0?360+n:n,this.setValues("hsl",e),this},mix:function(t,e){var n=t,i=void 0===e?.5:e,a=2*i-1,r=this.alpha()-n.alpha(),o=((a*r==-1?a:(a+r)/(1+a*r))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*i+n.alpha()*(1-i))},toJSON:function(){return this.rgb()},clone:function(){var t,e,n=new y,i=this.values,a=n.values;for(var r in i)i.hasOwnProperty(r)&&(t=i[r],"[object Array]"===(e={}.toString.call(t))?a[r]=t.slice(0):"[object Number]"===e?a[r]=t:console.error("unexpected color value:",t));return n}},y.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},y.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},y.prototype.getValues=function(t){for(var e=this.values,n={},i=0;i<t.length;i++)n[t.charAt(i)]=e[t][i];return 1!==e.alpha&&(n.a=e.alpha),n},y.prototype.setValues=function(t,e){var n,i,a=this.values,r=this.spaces,o=this.maxes,l=1;if(this.valid=!0,"alpha"===t)l=e;else if(e.length)a[t]=e.slice(0,t.length),l=e[t.length];else if(void 0!==e[t.charAt(0)]){for(n=0;n<t.length;n++)a[t][n]=e[t.charAt(n)];l=e.a}else if(void 0!==e[r[t][0]]){var u=r[t];for(n=0;n<t.length;n++)a[t][n]=e[u[n]];l=e.alpha}if(a.alpha=Math.max(0,Math.min(1,void 0===l?a.alpha:l)),"alpha"===t)return!1;for(n=0;n<t.length;n++)i=Math.max(0,Math.min(o[t][n],a[t][n])),a[t][n]=Math.round(i);for(var d in r)d!==t&&(a[d]=s[t][d](a[t]));return!0},y.prototype.setSpace=function(t,e){var n=e[0];return void 0===n?this.getValues(t):("number"==typeof n&&(n=Array.prototype.slice.call(e)),this.setValues(t,n),this)},y.prototype.setChannel=function(t,e,n){var i=this.values[t];return void 0===n?i[e]:n===i[e]?this:(i[e]=n,this.setValues(t,i),this)},"undefined"!=typeof window&&(window.Color=y);var _=y;function k(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}var w,M={noop:function(){},uid:(w=0,function(){return w++}),isNullOrUndef:function(t){return null==t},isArray:function(t){if(Array.isArray&&Array.isArray(t))return!0;var e=Object.prototype.toString.call(t);return"[object"===e.substr(0,7)&&"Array]"===e.substr(-6)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},isFinite:function(t){return("number"==typeof t||t instanceof Number)&&isFinite(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return M.valueOrDefault(M.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(M.isArray(t))if(r=t.length,i)for(a=r-1;a>=0;a--)e.call(n,t[a],a);else for(a=0;a<r;a++)e.call(n,t[a],a);else if(M.isObject(t))for(r=(o=Object.keys(t)).length,a=0;a<r;a++)e.call(n,t[o[a]],o[a])},arrayEquals:function(t,e){var n,i,a,r;if(!t||!e||t.length!==e.length)return!1;for(n=0,i=t.length;n<i;++n)if(a=t[n],r=e[n],a instanceof Array&&r instanceof Array){if(!M.arrayEquals(a,r))return!1}else if(a!==r)return!1;return!0},clone:function(t){if(M.isArray(t))return t.map(M.clone);if(M.isObject(t)){for(var e=Object.create(t),n=Object.keys(t),i=n.length,a=0;a<i;++a)e[n[a]]=M.clone(t[n[a]]);return e}return t},_merger:function(t,e,n,i){if(k(t)){var a=e[t],r=n[t];M.isObject(a)&&M.isObject(r)?M.merge(a,r,i):e[t]=M.clone(r)}},_mergerIf:function(t,e,n){if(k(t)){var i=e[t],a=n[t];M.isObject(i)&&M.isObject(a)?M.mergeIf(i,a):e.hasOwnProperty(t)||(e[t]=M.clone(a))}},merge:function(t,e,n){var i,a,r,o,s,l=M.isArray(e)?e:[e],u=l.length;if(!M.isObject(t))return t;for(i=(n=n||{}).merger||M._merger,a=0;a<u;++a)if(e=l[a],M.isObject(e))for(s=0,o=(r=Object.keys(e)).length;s<o;++s)i(r[s],t,e,n);return t},mergeIf:function(t,e){return M.merge(t,e,{merger:M._mergerIf})},extend:Object.assign||function(t){return M.merge(t,[].slice.call(arguments,1),{merger:function(t,e,n){e[t]=n[t]}})},inherits:function(t){var e=this,n=t&&t.hasOwnProperty("constructor")?t.constructor:function(){return e.apply(this,arguments)},i=function(){this.constructor=n};return i.prototype=e.prototype,n.prototype=new i,n.extend=M.inherits,t&&M.extend(n.prototype,t),n.__super__=e.prototype,n},_deprecated:function(t,e,n,i){void 0!==e&&console.warn(t+': "'+n+'" is deprecated. Please use "'+i+'" instead')}},S=M;M.callCallback=M.callback,M.indexOf=function(t,e,n){return Array.prototype.indexOf.call(t,e,n)},M.getValueOrDefault=M.valueOrDefault,M.getValueAtIndexOrDefault=M.valueAtIndexOrDefault;var C={linear:function(t){return t},easeInQuad:function(t){return t*t},easeOutQuad:function(t){return-t*(t-2)},easeInOutQuad:function(t){return(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1)},easeInCubic:function(t){return t*t*t},easeOutCubic:function(t){return(t-=1)*t*t+1},easeInOutCubic:function(t){return(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},easeInQuart:function(t){return t*t*t*t},easeOutQuart:function(t){return-((t-=1)*t*t*t-1)},easeInOutQuart:function(t){return(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},easeInQuint:function(t){return t*t*t*t*t},easeOutQuint:function(t){return(t-=1)*t*t*t*t+1},easeInOutQuint:function(t){return(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},easeInSine:function(t){return 1-Math.cos(t*(Math.PI/2))},easeOutSine:function(t){return Math.sin(t*(Math.PI/2))},easeInOutSine:function(t){return-.5*(Math.cos(Math.PI*t)-1)},easeInExpo:function(t){return 0===t?0:Math.pow(2,10*(t-1))},easeOutExpo:function(t){return 1===t?1:1-Math.pow(2,-10*t)},easeInOutExpo:function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},easeInCirc:function(t){return t>=1?t:-(Math.sqrt(1-t*t)-1)},easeOutCirc:function(t){return Math.sqrt(1-(t-=1)*t)},easeInOutCirc:function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},easeInElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n))},easeOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:1===t?1:(n||(n=.3),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/n)+1)},easeInOutElastic:function(t){var e=1.70158,n=0,i=1;return 0===t?0:2==(t/=.5)?1:(n||(n=.45),i<1?(i=1,e=n/4):e=n/(2*Math.PI)*Math.asin(1/i),t<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},easeInBack:function(t){var e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:function(t){return 1-C.easeOutBounce(1-t)},easeOutBounce:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:function(t){return t<.5?.5*C.easeInBounce(2*t):.5*C.easeOutBounce(2*t-1)+.5}},P={effects:C};S.easingEffects=C;var A=Math.PI,D=A/180,T=2*A,I=A/2,F=A/4,O=2*A/3,L={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,a/2,i/2),s=e+o,l=n+o,u=e+i-o,d=n+a-o;t.moveTo(e,l),s<u&&l<d?(t.arc(s,l,o,-A,-I),t.arc(u,l,o,-I,0),t.arc(u,d,o,0,I),t.arc(s,d,o,I,A)):s<u?(t.moveTo(s,n),t.arc(u,l,o,-I,I),t.arc(s,l,o,I,A+I)):l<d?(t.arc(s,l,o,-A,0),t.arc(s,d,o,0,A)):t.arc(s,l,o,-A,A),t.closePath(),t.moveTo(e,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a,r){var o,s,l,u,d,h=(r||0)*D;if(e&&"object"==typeof e&&("[object HTMLImageElement]"===(o=e.toString())||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,a),t.rotate(h),t.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),void t.restore();if(!(isNaN(n)||n<=0)){switch(t.beginPath(),e){default:t.arc(i,a,n,0,T),t.closePath();break;case"triangle":t.moveTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=O,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),h+=O,t.lineTo(i+Math.sin(h)*n,a-Math.cos(h)*n),t.closePath();break;case"rectRounded":u=n-(d=.516*n),s=Math.cos(h+F)*u,l=Math.sin(h+F)*u,t.arc(i-s,a-l,d,h-A,h-I),t.arc(i+l,a-s,d,h-I,h),t.arc(i+s,a+l,d,h,h+I),t.arc(i-l,a+s,d,h+I,h+A),t.closePath();break;case"rect":if(!r){u=Math.SQRT1_2*n,t.rect(i-u,a-u,2*u,2*u);break}h+=F;case"rectRot":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+l,a-s),t.lineTo(i+s,a+l),t.lineTo(i-l,a+s),t.closePath();break;case"crossRot":h+=F;case"cross":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"star":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s),h+=F,s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i+l,a-s),t.lineTo(i-l,a+s);break;case"line":s=Math.cos(h)*n,l=Math.sin(h)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l);break;case"dash":t.moveTo(i,a),t.lineTo(i+Math.cos(h)*n,a+Math.sin(h)*n)}t.fill(),t.stroke()}},_isPointInArea:function(t,e){return t.x>e.left-1e-6&&t.x<e.right+1e-6&&t.y>e.top-1e-6&&t.y<e.bottom+1e-6},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){var a=n.steppedLine;if(a){if("middle"===a){var r=(e.x+n.x)/2;t.lineTo(r,i?n.y:e.y),t.lineTo(r,i?e.y:n.y)}else"after"===a&&!i||"after"!==a&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}else n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}},R=L;S.clear=L.clear,S.drawRoundedRectangle=function(t){t.beginPath(),L.roundedRect.apply(L,arguments)};var z={_set:function(t,e){return S.merge(this[t]||(this[t]={}),e)}};z._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var N=z,B=S.valueOrDefault;var E={toLineHeight:function(t,e){var n=(""+t).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*e;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100}return e*t},toPadding:function(t){var e,n,i,a;return S.isObject(t)?(e=+t.top||0,n=+t.right||0,i=+t.bottom||0,a=+t.left||0):e=n=i=a=+t||0,{top:e,right:n,bottom:i,left:a,height:e+i,width:a+n}},_parseFont:function(t){var e=N.global,n=B(t.fontSize,e.defaultFontSize),i={family:B(t.fontFamily,e.defaultFontFamily),lineHeight:S.options.toLineHeight(B(t.lineHeight,e.defaultLineHeight),n),size:n,style:B(t.fontStyle,e.defaultFontStyle),weight:null,string:""};return i.string=function(t){return!t||S.isNullOrUndef(t.size)||S.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(i),i},resolve:function(t,e,n,i){var a,r,o,s=!0;for(a=0,r=t.length;a<r;++a)if(void 0!==(o=t[a])&&(void 0!==e&&"function"==typeof o&&(o=o(e),s=!1),void 0!==n&&S.isArray(o)&&(o=o[n],s=!1),void 0!==o))return i&&!s&&(i.cacheable=!1),o}},W={_factorize:function(t){var e,n=[],i=Math.sqrt(t);for(e=1;e<i;e++)t%e==0&&(n.push(e),n.push(t/e));return i===(0|i)&&n.push(i),n.sort((function(t,e){return t-e})).pop(),n},log10:Math.log10||function(t){var e=Math.log(t)*Math.LOG10E,n=Math.round(e);return t===Math.pow(10,n)?n:e}},V=W;S.log10=W.log10;var H=S,j=P,q=R,U=E,Y=V,G={getRtlAdapter:function(t,e,n){return t?function(t,e){return{x:function(n){return t+t+e-n},setWidth:function(t){e=t},textAlign:function(t){return"center"===t?t:"right"===t?"left":"right"},xPlus:function(t,e){return t-e},leftForLtr:function(t,e){return t-e}}}(e,n):{x:function(t){return t},setWidth:function(t){},textAlign:function(t){return t},xPlus:function(t,e){return t+e},leftForLtr:function(t,e){return t}}},overrideTextDirection:function(t,e){var n,i;"ltr"!==e&&"rtl"!==e||(i=[(n=t.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=i)},restoreTextDirection:function(t){var e=t.prevTextDirection;void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}};H.easing=j,H.canvas=q,H.options=U,H.math=Y,H.rtl=G;var X=function(t){H.extend(this,t),this.initialize.apply(this,arguments)};H.extend(X.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){var t=this;return t._view||(t._view=H.extend({},t._model)),t._start={},t},transition:function(t){var e=this,n=e._model,i=e._start,a=e._view;return n&&1!==t?(a||(a=e._view={}),i||(i=e._start={}),function(t,e,n,i){var a,r,o,s,l,u,d,h,c,f=Object.keys(n);for(a=0,r=f.length;a<r;++a)if(u=n[o=f[a]],e.hasOwnProperty(o)||(e[o]=u),(s=e[o])!==u&&"_"!==o[0]){if(t.hasOwnProperty(o)||(t[o]=s),(d=typeof u)===typeof(l=t[o]))if("string"===d){if((h=_(l)).valid&&(c=_(u)).valid){e[o]=c.mix(h,i).rgbString();continue}}else if(H.isFinite(l)&&H.isFinite(u)){e[o]=l+(u-l)*i;continue}e[o]=u}}(i,a,n,t),e):(e._view=H.extend({},n),e._start=null,e)},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return H.isNumber(this._model.x)&&H.isNumber(this._model.y)}}),X.extend=H.inherits;var K=X,Z=K.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),$=Z;Object.defineProperty(Z.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(Z.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}}),N._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:H.noop,onComplete:H.noop}});var J={animations:[],request:null,addAnimation:function(t,e,n,i){var a,r,o=this.animations;for(e.chart=t,e.startTime=Date.now(),e.duration=n,i||(t.animating=!0),a=0,r=o.length;a<r;++a)if(o[a].chart===t)return void(o[a]=e);o.push(e),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=H.findIndex(this.animations,(function(e){return e.chart===t}));-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var t=this;null===t.request&&(t.request=H.requestAnimFrame.call(window,(function(){t.request=null,t.startDigest()})))},startDigest:function(){this.advance(),this.animations.length>0&&this.requestAnimationFrame()},advance:function(){for(var t,e,n,i,a=this.animations,r=0;r<a.length;)e=(t=a[r]).chart,n=t.numSteps,i=Math.floor((Date.now()-t.startTime)/t.duration*n)+1,t.currentStep=Math.min(i,n),H.callback(t.render,[e,t],e),H.callback(t.onAnimationProgress,[t],e),t.currentStep>=n?(H.callback(t.onAnimationComplete,[t],e),e.animating=!1,a.splice(r,1)):++r}},Q=H.options.resolve,tt=["push","pop","shift","splice","unshift"];function et(t,e){var n=t._chartjs;if(n){var i=n.listeners,a=i.indexOf(e);-1!==a&&i.splice(a,1),i.length>0||(tt.forEach((function(e){delete t[e]})),delete t._chartjs)}}var nt=function(t,e){this.initialize(t,e)};H.extend(nt.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(t,e){var n=this;n.chart=t,n.index=e,n.linkScales(),n.addElements(),n._type=n.getMeta().type},updateIndex:function(t){this.index=t},linkScales:function(){var t=this.getMeta(),e=this.chart,n=e.scales,i=this.getDataset(),a=e.options.scales;null!==t.xAxisID&&t.xAxisID in n&&!i.xAxisID||(t.xAxisID=i.xAxisID||a.xAxes[0].id),null!==t.yAxisID&&t.yAxisID in n&&!i.yAxisID||(t.yAxisID=i.yAxisID||a.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(t){return this.chart.scales[t]},_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&&et(this._data,this)},createMetaDataset:function(){var t=this.datasetElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(t){var e=this.dataElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index,_index:t})},addElements:function(){var t,e,n=this.getMeta(),i=this.getDataset().data||[],a=n.data;for(t=0,e=i.length;t<e;++t)a[t]=a[t]||this.createMetaData(t);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(t){var e=this.createMetaData(t);this.getMeta().data.splice(t,0,e),this.updateElement(e,t,!0)},buildOrUpdateElements:function(){var t,e,n=this,i=n.getDataset(),a=i.data||(i.data=[]);n._data!==a&&(n._data&&et(n._data,n),a&&Object.isExtensible(a)&&(e=n,(t=a)._chartjs?t._chartjs.listeners.push(e):(Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),tt.forEach((function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),i=t[e];Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:function(){var e=Array.prototype.slice.call(arguments),a=i.apply(this,e);return H.each(t._chartjs.listeners,(function(t){"function"==typeof t[n]&&t[n].apply(t,e)})),a}})})))),n._data=a),n.resyncElements()},_configure:function(){this._config=H.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(t,e,n){"_meta"!==t&&"data"!==t&&H._merger(t,e,n)}})},_update:function(t){this._configure(),this._cachedDataOpts=null,this.update(t)},update:H.noop,transition:function(t){for(var e=this.getMeta(),n=e.data||[],i=n.length,a=0;a<i;++a)n[a].transition(t);e.dataset&&e.dataset.transition(t)},draw:function(){var t=this.getMeta(),e=t.data||[],n=e.length,i=0;for(t.dataset&&t.dataset.draw();i<n;++i)e[i].draw()},getStyle:function(t){var e,n=this.getMeta(),i=n.dataset;return this._configure(),i&&void 0===t?e=this._resolveDatasetElementOptions(i||{}):(t=t||0,e=this._resolveDataElementOptions(n.data[t]||{},t)),!1!==e.fill&&null!==e.fill||(e.backgroundColor=e.borderColor),e},_resolveDatasetElementOptions:function(t,e){var n,i,a,r,o=this,s=o.chart,l=o._config,u=t.custom||{},d=s.options.elements[o.datasetElementType.prototype._type]||{},h=o._datasetElementOptions,c={},f={chart:s,dataset:o.getDataset(),datasetIndex:o.index,hover:e};for(n=0,i=h.length;n<i;++n)a=h[n],r=e?"hover"+a.charAt(0).toUpperCase()+a.slice(1):a,c[a]=Q([u[r],l[r],d[r]],f);return c},_resolveDataElementOptions:function(t,e){var n=this,i=t&&t.custom,a=n._cachedDataOpts;if(a&&!i)return a;var r,o,s,l,u=n.chart,d=n._config,h=u.options.elements[n.dataElementType.prototype._type]||{},c=n._dataElementOptions,f={},g={chart:u,dataIndex:e,dataset:n.getDataset(),datasetIndex:n.index},p={cacheable:!i};if(i=i||{},H.isArray(c))for(o=0,s=c.length;o<s;++o)f[l=c[o]]=Q([i[l],d[l],h[l]],g,e,p);else for(o=0,s=(r=Object.keys(c)).length;o<s;++o)f[l=r[o]]=Q([i[l],d[c[l]],d[l],h[l]],g,e,p);return p.cacheable&&(n._cachedDataOpts=Object.freeze(f)),f},removeHoverStyle:function(t){H.merge(t._model,t.$previousStyle||{}),delete t.$previousStyle},setHoverStyle:function(t){var e=this.chart.data.datasets[t._datasetIndex],n=t._index,i=t.custom||{},a=t._model,r=H.getHoverColor;t.$previousStyle={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderWidth:a.borderWidth},a.backgroundColor=Q([i.hoverBackgroundColor,e.hoverBackgroundColor,r(a.backgroundColor)],void 0,n),a.borderColor=Q([i.hoverBorderColor,e.hoverBorderColor,r(a.borderColor)],void 0,n),a.borderWidth=Q([i.hoverBorderWidth,e.hoverBorderWidth,a.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var t=this.getMeta().dataset;t&&this.removeHoverStyle(t)},_setDatasetHoverStyle:function(){var t,e,n,i,a,r,o=this.getMeta().dataset,s={};if(o){for(r=o._model,a=this._resolveDatasetElementOptions(o,!0),t=0,e=(i=Object.keys(a)).length;t<e;++t)s[n=i[t]]=r[n],r[n]=a[n];o.$previousStyle=s}},resyncElements:function(){var t=this.getMeta(),e=this.getDataset().data,n=t.data.length,i=e.length;i<n?t.data.splice(i,n-i):i>n&&this.insertElements(n,i-n)},insertElements:function(t,e){for(var n=0;n<e;++n)this.addElementAndReset(t+n)},onDataPush:function(){var t=arguments.length;this.insertElements(this.getDataset().data.length-t,t)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(t,e){this.getMeta().data.splice(t,e),this.insertElements(t,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),nt.extend=H.inherits;var it=nt,at=2*Math.PI;function rt(t,e){var n=e.startAngle,i=e.endAngle,a=e.pixelMargin,r=a/e.outerRadius,o=e.x,s=e.y;t.beginPath(),t.arc(o,s,e.outerRadius,n-r,i+r),e.innerRadius>a?(r=a/e.innerRadius,t.arc(o,s,e.innerRadius-a,i+r,n-r,!0)):t.arc(o,s,a,i+Math.PI/2,n-Math.PI/2),t.closePath(),t.clip()}function ot(t,e,n){var i="inner"===e.borderAlign;i?(t.lineWidth=2*e.borderWidth,t.lineJoin="round"):(t.lineWidth=e.borderWidth,t.lineJoin="bevel"),n.fullCircles&&function(t,e,n,i){var a,r=n.endAngle;for(i&&(n.endAngle=n.startAngle+at,rt(t,n),n.endAngle=r,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=at,n.fullCircles--)),t.beginPath(),t.arc(n.x,n.y,n.innerRadius,n.startAngle+at,n.startAngle,!0),a=0;a<n.fullCircles;++a)t.stroke();for(t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.startAngle+at),a=0;a<n.fullCircles;++a)t.stroke()}(t,e,n,i),i&&rt(t,n),t.beginPath(),t.arc(n.x,n.y,e.outerRadius,n.startAngle,n.endAngle),t.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),t.closePath(),t.stroke()}N._set("global",{elements:{arc:{backgroundColor:N.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var st=K.extend({_type:"arc",inLabelRange:function(t){var e=this._view;return!!e&&Math.pow(t-e.x,2)<Math.pow(e.radius+e.hoverRadius,2)},inRange:function(t,e){var n=this._view;if(n){for(var i=H.getAngleFromPoint(n,{x:t,y:e}),a=i.angle,r=i.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=at;for(;a>s;)a-=at;for(;a<o;)a+=at;var l=a>=o&&a<=s,u=r>=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t,e=this._chart.ctx,n=this._view,i="inner"===n.borderAlign?.33:0,a={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-i,0),pixelMargin:i,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/at)};if(e.save(),e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,a.fullCircles){for(a.endAngle=a.startAngle+at,e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),t=0;t<a.fullCircles;++t)e.fill();a.endAngle=a.startAngle+n.circumference%at}e.beginPath(),e.arc(a.x,a.y,a.outerRadius,a.startAngle,a.endAngle),e.arc(a.x,a.y,a.innerRadius,a.endAngle,a.startAngle,!0),e.closePath(),e.fill(),n.borderWidth&&ot(e,n,a),e.restore()}}),lt=H.valueOrDefault,ut=N.global.defaultColor;N._set("global",{elements:{line:{tension:.4,backgroundColor:ut,borderWidth:3,borderColor:ut,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var dt=K.extend({_type:"line",draw:function(){var t,e,n,i=this,a=i._view,r=i._chart.ctx,o=a.spanGaps,s=i._children.slice(),l=N.global,u=l.elements.line,d=-1,h=i._loop;if(s.length){if(i._loop){for(t=0;t<s.length;++t)if(e=H.previousItem(s,t),!s[t]._view.skip&&e._view.skip){s=s.slice(t).concat(s.slice(0,t)),h=o;break}h&&s.push(s[0])}for(r.save(),r.lineCap=a.borderCapStyle||u.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||u.borderDash),r.lineDashOffset=lt(a.borderDashOffset,u.borderDashOffset),r.lineJoin=a.borderJoinStyle||u.borderJoinStyle,r.lineWidth=lt(a.borderWidth,u.borderWidth),r.strokeStyle=a.borderColor||l.defaultColor,r.beginPath(),(n=s[0]._view).skip||(r.moveTo(n.x,n.y),d=0),t=1;t<s.length;++t)n=s[t]._view,e=-1===d?H.previousItem(s,t):s[d],n.skip||(d!==t-1&&!o||-1===d?r.moveTo(n.x,n.y):H.canvas.lineTo(r,e._view,n),d=t);h&&r.closePath(),r.stroke(),r.restore()}}}),ht=H.valueOrDefault,ct=N.global.defaultColor;function ft(t){var e=this._view;return!!e&&Math.abs(t-e.x)<e.radius+e.hitRadius}N._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:ct,borderColor:ct,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var gt=K.extend({_type:"point",inRange:function(t,e){var n=this._view;return!!n&&Math.pow(t-n.x,2)+Math.pow(e-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:ft,inXRange:ft,inYRange:function(t){var e=this._view;return!!e&&Math.abs(t-e.y)<e.radius+e.hitRadius},getCenterPoint:function(){var t=this._view;return{x:t.x,y:t.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y,padding:t.radius+t.borderWidth}},draw:function(t){var e=this._view,n=this._chart.ctx,i=e.pointStyle,a=e.rotation,r=e.radius,o=e.x,s=e.y,l=N.global,u=l.defaultColor;e.skip||(void 0===t||H.canvas._isPointInArea(e,t))&&(n.strokeStyle=e.borderColor||u,n.lineWidth=ht(e.borderWidth,l.elements.point.borderWidth),n.fillStyle=e.backgroundColor||u,H.canvas.drawPoint(n,i,r,o,s,a))}}),pt=N.global.defaultColor;function mt(t){return t&&void 0!==t.width}function vt(t){var e,n,i,a,r;return mt(t)?(r=t.width/2,e=t.x-r,n=t.x+r,i=Math.min(t.y,t.base),a=Math.max(t.y,t.base)):(r=t.height/2,e=Math.min(t.x,t.base),n=Math.max(t.x,t.base),i=t.y-r,a=t.y+r),{left:e,top:i,right:n,bottom:a}}function bt(t,e,n){return t===e?n:t===n?e:t}function xt(t,e,n){var i,a,r,o,s=t.borderWidth,l=function(t){var e=t.borderSkipped,n={};return e?(t.horizontal?t.base>t.x&&(e=bt(e,"left","right")):t.base<t.y&&(e=bt(e,"bottom","top")),n[e]=!0,n):n}(t);return H.isObject(s)?(i=+s.top||0,a=+s.right||0,r=+s.bottom||0,o=+s.left||0):i=a=r=o=+s||0,{t:l.top||i<0?0:i>n?n:i,r:l.right||a<0?0:a>e?e:a,b:l.bottom||r<0?0:r>n?n:r,l:l.left||o<0?0:o>e?e:o}}function yt(t,e,n){var i=null===e,a=null===n,r=!(!t||i&&a)&&vt(t);return r&&(i||e>=r.left&&e<=r.right)&&(a||n>=r.top&&n<=r.bottom)}N._set("global",{elements:{rectangle:{backgroundColor:pt,borderColor:pt,borderSkipped:"bottom",borderWidth:0}}});var _t=K.extend({_type:"rectangle",draw:function(){var t=this._chart.ctx,e=this._view,n=function(t){var e=vt(t),n=e.right-e.left,i=e.bottom-e.top,a=xt(t,n/2,i/2);return{outer:{x:e.left,y:e.top,w:n,h:i},inner:{x:e.left+a.l,y:e.top+a.t,w:n-a.l-a.r,h:i-a.t-a.b}}}(e),i=n.outer,a=n.inner;t.fillStyle=e.backgroundColor,t.fillRect(i.x,i.y,i.w,i.h),i.w===a.w&&i.h===a.h||(t.save(),t.beginPath(),t.rect(i.x,i.y,i.w,i.h),t.clip(),t.fillStyle=e.borderColor,t.rect(a.x,a.y,a.w,a.h),t.fill("evenodd"),t.restore())},height:function(){var t=this._view;return t.base-t.y},inRange:function(t,e){return yt(this._view,t,e)},inLabelRange:function(t,e){var n=this._view;return mt(n)?yt(n,t,null):yt(n,null,e)},inXRange:function(t){return yt(this._view,t,null)},inYRange:function(t){return yt(this._view,null,t)},getCenterPoint:function(){var t,e,n=this._view;return mt(n)?(t=n.x,e=(n.y+n.base)/2):(t=(n.x+n.base)/2,e=n.y),{x:t,y:e}},getArea:function(){var t=this._view;return mt(t)?t.width*Math.abs(t.y-t.base):t.height*Math.abs(t.x-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}}),kt={},wt=st,Mt=dt,St=gt,Ct=_t;kt.Arc=wt,kt.Line=Mt,kt.Point=St,kt.Rectangle=Ct;var Pt=H._deprecated,At=H.valueOrDefault;function Dt(t,e,n){var i,a,r=n.barThickness,o=e.stackCount,s=e.pixels[t],l=H.isNullOrUndef(r)?function(t,e){var n,i,a,r,o=t._length;for(a=1,r=e.length;a<r;++a)o=Math.min(o,Math.abs(e[a]-e[a-1]));for(a=0,r=t.getTicks().length;a<r;++a)i=t.getPixelForTick(a),o=a>0?Math.min(o,Math.abs(i-n)):o,n=i;return o}(e.scale,e.pixels):-1;return H.isNullOrUndef(r)?(i=l*n.categoryPercentage,a=n.barPercentage):(i=r*o,a=1),{chunk:i/o,ratio:a,start:s-i/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 Tt=it.extend({dataElementType:kt.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var t,e,n=this;it.prototype.initialize.apply(n,arguments),(t=n.getMeta()).stack=n.getDataset().stack,t.bar=!0,e=n._getIndexScale().options,Pt("bar chart",e.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Pt("bar chart",e.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Pt("bar chart",e.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Pt("bar chart",n._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Pt("bar chart",e.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(t){var e,n,i=this.getMeta().data;for(this._ruler=this.getRuler(),e=0,n=i.length;e<n;++e)this.updateElement(i[e],e,t)},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=i.getDataset(),o=i._resolveDataElementOptions(t,e);t._xScale=i.getScaleForId(a.xAxisID),t._yScale=i.getScaleForId(a.yAxisID),t._datasetIndex=i.index,t._index=e,t._model={backgroundColor:o.backgroundColor,borderColor:o.borderColor,borderSkipped:o.borderSkipped,borderWidth:o.borderWidth,datasetLabel:r.label,label:i.chart.data.labels[e]},H.isArray(r.data[e])&&(t._model.borderSkipped=null),i._updateElementGeometry(t,e,n,o),t.pivot()},_updateElementGeometry:function(t,e,n,i){var a=this,r=t._model,o=a._getValueScale(),s=o.getBasePixel(),l=o.isHorizontal(),u=a._ruler||a.getRuler(),d=a.calculateBarValuePixels(a.index,e,i),h=a.calculateBarIndexPixels(a.index,e,u,i);r.horizontal=l,r.base=n?s:d.base,r.x=l?n?s:d.head:h.center,r.y=l?h.center:n?s:d.head,r.height=l?h.size:void 0,r.width=l?void 0:h.size},_getStacks:function(t){var e,n,i=this._getIndexScale(),a=i._getMatchingVisibleMetas(this._type),r=i.options.stacked,o=a.length,s=[];for(e=0;e<o&&(n=a[e],(!1===r||-1===s.indexOf(n.stack)||void 0===r&&void 0===n.stack)&&s.push(n.stack),n.index!==t);++e);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(t,e){var n=this._getStacks(t),i=void 0!==e?n.indexOf(e):-1;return-1===i?n.length-1:i},getRuler:function(){var t,e,n=this._getIndexScale(),i=[];for(t=0,e=this.getMeta().data.length;t<e;++t)i.push(n.getPixelForValue(null,t,this.index));return{pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._getValueScale(),c=h.isHorizontal(),f=d.data.datasets,g=h._getMatchingVisibleMetas(this._type),p=h._parseValue(f[t].data[e]),m=n.minBarLength,v=h.options.stacked,b=this.getMeta().stack,x=void 0===p.start?0:p.max>=0&&p.min>=0?p.min:p.max,y=void 0===p.start?p.end:p.max>=0&&p.min>=0?p.max-p.min:p.min-p.max,_=g.length;if(v||void 0===v&&void 0!==b)for(i=0;i<_&&(a=g[i]).index!==t;++i)a.stack===b&&(r=void 0===(u=h._parseValue(f[a.index].data[e])).start?u.end:u.min>=0&&u.max>=0?u.max:u.min,(p.min<0&&r<0||p.max>=0&&r>0)&&(x+=r));return o=h.getPixelForValue(x),l=(s=h.getPixelForValue(x+y))-o,void 0!==m&&Math.abs(l)<m&&(l=m,s=y>=0&&!c||y<0&&c?o-m:o+m),{size:l,base:o,head:s,center:s+l/2}},calculateBarIndexPixels:function(t,e,n,i){var a="flex"===i.barThickness?function(t,e,n){var i,a=e.pixels,r=a[t],o=t>0?a[t-1]:null,s=t<a.length-1?a[t+1]:null,l=n.categoryPercentage;return null===o&&(o=r-(null===s?e.end-e.start:s-r)),null===s&&(s=r+r-o),i=r-(r-Math.min(o,s))/2*l,{chunk:Math.abs(s-o)/2*l/e.stackCount,ratio:n.barPercentage,start:i}}(e,n,i):Dt(e,n,i),r=this.getStackIndex(t,this.getMeta().stack),o=a.start+a.chunk*r+a.chunk/2,s=Math.min(At(i.maxBarThickness,1/0),a.chunk*a.ratio);return{base:o-s/2,head:o+s/2,center:o,size:s}},draw:function(){var t=this.chart,e=this._getValueScale(),n=this.getMeta().data,i=this.getDataset(),a=n.length,r=0;for(H.canvas.clipArea(t.ctx,t.chartArea);r<a;++r){var o=e._parseValue(i.data[r]);isNaN(o.min)||isNaN(o.max)||n[r].draw()}H.canvas.unclipArea(t.ctx)},_resolveDataElementOptions:function(){var t=this,e=H.extend({},it.prototype._resolveDataElementOptions.apply(t,arguments)),n=t._getIndexScale().options,i=t._getValueScale().options;return e.barPercentage=At(n.barPercentage,e.barPercentage),e.barThickness=At(n.barThickness,e.barThickness),e.categoryPercentage=At(n.categoryPercentage,e.categoryPercentage),e.maxBarThickness=At(n.maxBarThickness,e.maxBarThickness),e.minBarLength=At(i.minBarLength,e.minBarLength),e}}),It=H.valueOrDefault,Ft=H.options.resolve;N._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.datasets[t.datasetIndex].label||"",i=e.datasets[t.datasetIndex].data[t.index];return n+": ("+t.xLabel+", "+t.yLabel+", "+i.r+")"}}}});var Ot=it.extend({dataElementType:kt.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(t){var e=this,n=e.getMeta().data;H.each(n,(function(n,i){e.updateElement(n,i,t)}))},updateElement:function(t,e,n){var i=this,a=i.getMeta(),r=t.custom||{},o=i.getScaleForId(a.xAxisID),s=i.getScaleForId(a.yAxisID),l=i._resolveDataElementOptions(t,e),u=i.getDataset().data[e],d=i.index,h=n?o.getPixelForDecimal(.5):o.getPixelForValue("object"==typeof u?u:NaN,e,d),c=n?s.getBasePixel():s.getPixelForValue(u,e,d);t._xScale=o,t._yScale=s,t._options=l,t._datasetIndex=d,t._index=e,t._model={backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,hitRadius:l.hitRadius,pointStyle:l.pointStyle,rotation:l.rotation,radius:n?0:l.radius,skip:r.skip||isNaN(h)||isNaN(c),x:h,y:c},t.pivot()},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=It(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=It(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=It(n.hoverBorderWidth,n.borderWidth),e.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(t,e){var n=this,i=n.chart,a=n.getDataset(),r=t.custom||{},o=a.data[e]||{},s=it.prototype._resolveDataElementOptions.apply(n,arguments),l={chart:i,dataIndex:e,dataset:a,datasetIndex:n.index};return n._cachedDataOpts===s&&(s=H.extend({},s)),s.radius=Ft([r.radius,o.r,n._config.radius,i.options.elements.point.radius],l,e),s}}),Lt=H.valueOrDefault,Rt=Math.PI,zt=2*Rt,Nt=Rt/2;N._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r]&&(a.data[r].hidden=!a.data[r].hidden);o.update()}},cutoutPercentage:50,rotation:-Nt,circumference:zt,tooltips:{callbacks:{title:function(){return""},label:function(t,e){var n=e.labels[t.index],i=": "+e.datasets[t.datasetIndex].data[t.index];return H.isArray(n)?(n=n.slice())[0]+=i:n+=i,n}}}});var Bt=it.extend({dataElementType:kt.Arc,linkScales:H.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&++e;return e},update:function(t){var e,n,i,a,r=this,o=r.chart,s=o.chartArea,l=o.options,u=1,d=1,h=0,c=0,f=r.getMeta(),g=f.data,p=l.cutoutPercentage/100||0,m=l.circumference,v=r._getRingWeight(r.index);if(m<zt){var b=l.rotation%zt,x=(b+=b>=Rt?-zt:b<-Rt?zt:0)+m,y=Math.cos(b),_=Math.sin(b),k=Math.cos(x),w=Math.sin(x),M=b<=0&&x>=0||x>=zt,S=b<=Nt&&x>=Nt||x>=zt+Nt,C=b<=-Nt&&x>=-Nt||x>=Rt+Nt,P=b===-Rt||x>=Rt?-1:Math.min(y,y*p,k,k*p),A=C?-1:Math.min(_,_*p,w,w*p),D=M?1:Math.max(y,y*p,k,k*p),T=S?1:Math.max(_,_*p,w,w*p);u=(D-P)/2,d=(T-A)/2,h=-(D+P)/2,c=-(T+A)/2}for(i=0,a=g.length;i<a;++i)g[i]._options=r._resolveDataElementOptions(g[i],i);for(o.borderWidth=r.getMaxBorderWidth(),e=(s.right-s.left-o.borderWidth)/u,n=(s.bottom-s.top-o.borderWidth)/d,o.outerRadius=Math.max(Math.min(e,n)/2,0),o.innerRadius=Math.max(o.outerRadius*p,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(r._getVisibleDatasetWeightTotal()||1),o.offsetX=h*o.outerRadius,o.offsetY=c*o.outerRadius,f.total=r.calculateTotal(),r.outerRadius=o.outerRadius-o.radiusLength*r._getRingWeightOffset(r.index),r.innerRadius=Math.max(r.outerRadius-o.radiusLength*v,0),i=0,a=g.length;i<a;++i)r.updateElement(g[i],i,t)},updateElement:function(t,e,n){var i=this,a=i.chart,r=a.chartArea,o=a.options,s=o.animation,l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d=o.rotation,h=o.rotation,c=i.getDataset(),f=n&&s.animateRotate?0:t.hidden?0:i.calculateCircumference(c.data[e])*(o.circumference/zt),g=n&&s.animateScale?0:i.innerRadius,p=n&&s.animateScale?0:i.outerRadius,m=t._options||{};H.extend(t,{_datasetIndex:i.index,_index:e,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:l+a.offsetX,y:u+a.offsetY,startAngle:d,endAngle:h,circumference:f,outerRadius:p,innerRadius:g,label:H.valueAtIndexOrDefault(c.label,e,a.data.labels[e])}});var v=t._model;n&&s.animateRotate||(v.startAngle=0===e?o.rotation:i.getMeta().data[e-1]._model.endAngle,v.endAngle=v.startAngle+v.circumference),t.pivot()},calculateTotal:function(){var t,e=this.getDataset(),n=this.getMeta(),i=0;return H.each(n.data,(function(n,a){t=e.data[a],isNaN(t)||n.hidden||(i+=Math.abs(t))})),i},calculateCircumference:function(t){var e=this.getMeta().total;return e>0&&!isNaN(t)?zt*(Math.abs(t)/e):0},getMaxBorderWidth:function(t){var e,n,i,a,r,o,s,l,u=0,d=this.chart;if(!t)for(e=0,n=d.data.datasets.length;e<n;++e)if(d.isDatasetVisible(e)){t=(i=d.getDatasetMeta(e)).data,e!==this.index&&(r=i.controller);break}if(!t)return 0;for(e=0,n=t.length;e<n;++e)a=t[e],r?(r._configure(),o=r._resolveDataElementOptions(a,e)):o=a._options,"inner"!==o.borderAlign&&(s=o.borderWidth,u=(l=o.hoverBorderWidth)>(u=s>u?s:u)?l:u);return u},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=Lt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Lt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Lt(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(t){for(var e=0,n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(e+=this._getRingWeight(n));return e},_getRingWeight:function(t){return Math.max(Lt(this.chart.data.datasets[t].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});N._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),N._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var Et=Tt.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Wt=H.valueOrDefault,Vt=H.options.resolve,Ht=H.canvas._isPointInArea;function jt(t,e){var n=t&&t.options.ticks||{},i=n.reverse,a=void 0===n.min?e:0,r=void 0===n.max?e:0;return{start:i?r:a,end:i?a:r}}function qt(t,e,n){var i=n/2,a=jt(t,i),r=jt(e,i);return{top:r.end,right:a.end,bottom:r.start,left:a.start}}function Ut(t){var e,n,i,a;return H.isObject(t)?(e=t.top,n=t.right,i=t.bottom,a=t.left):e=n=i=a=t,{top:e,right:n,bottom:i,left:a}}N._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var Yt=it.extend({datasetElementType:kt.Line,dataElementType:kt.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.options,l=i._config,u=i._showLine=Wt(l.showLine,s.showLines);for(i._xScale=i.getScaleForId(a.xAxisID),i._yScale=i.getScaleForId(a.yAxisID),u&&(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=i._yScale,r._datasetIndex=i.index,r._children=o,r._model=i._resolveDatasetElementOptions(r),r.pivot()),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(u&&0!==r._model.tension&&i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i,a,r=this,o=r.getMeta(),s=t.custom||{},l=r.getDataset(),u=r.index,d=l.data[e],h=r._xScale,c=r._yScale,f=o.dataset._model,g=r._resolveDataElementOptions(t,e);i=h.getPixelForValue("object"==typeof d?d:NaN,e,u),a=n?c.getBasePixel():r.calculatePointY(d,e,u),t._xScale=h,t._yScale=c,t._options=g,t._datasetIndex=u,t._index=e,t._model={x:i,y:a,skip:s.skip||isNaN(i)||isNaN(a),radius:g.radius,pointStyle:g.pointStyle,rotation:g.rotation,backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,tension:Wt(s.tension,f?f.tension:0),steppedLine:!!f&&f.steppedLine,hitRadius:g.hitRadius}},_resolveDatasetElementOptions:function(t){var e=this,n=e._config,i=t.custom||{},a=e.chart.options,r=a.elements.line,o=it.prototype._resolveDatasetElementOptions.apply(e,arguments);return o.spanGaps=Wt(n.spanGaps,a.spanGaps),o.tension=Wt(n.lineTension,r.tension),o.steppedLine=Vt([i.steppedLine,n.steppedLine,r.stepped]),o.clip=Ut(Wt(n.clip,qt(e._xScale,e._yScale,o.borderWidth))),o},calculatePointY:function(t,e,n){var i,a,r,o,s,l,u,d=this.chart,h=this._yScale,c=0,f=0;if(h.options.stacked){for(s=+h.getRightValue(t),u=(l=d._getSortedVisibleDatasetMetas()).length,i=0;i<u&&(r=l[i]).index!==n;++i)a=d.data.datasets[r.index],"line"===r.type&&r.yAxisID===h.id&&((o=+h.getRightValue(a.data[e]))<0?f+=o||0:c+=o||0);return s<0?h.getPixelForValue(f+s):h.getPixelForValue(c+s)}return h.getPixelForValue(t)},updateBezierControlPoints:function(){var t,e,n,i,a=this.chart,r=this.getMeta(),o=r.dataset._model,s=a.chartArea,l=r.data||[];function u(t,e,n){return Math.max(Math.min(t,n),e)}if(o.spanGaps&&(l=l.filter((function(t){return!t._model.skip}))),"monotone"===o.cubicInterpolationMode)H.splineCurveMonotone(l);else for(t=0,e=l.length;t<e;++t)n=l[t]._model,i=H.splineCurve(H.previousItem(l,t)._model,n,H.nextItem(l,t)._model,o.tension),n.controlPointPreviousX=i.previous.x,n.controlPointPreviousY=i.previous.y,n.controlPointNextX=i.next.x,n.controlPointNextY=i.next.y;if(a.options.elements.line.capBezierPoints)for(t=0,e=l.length;t<e;++t)n=l[t]._model,Ht(n,s)&&(t>0&&Ht(l[t-1]._model,s)&&(n.controlPointPreviousX=u(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=u(n.controlPointPreviousY,s.top,s.bottom)),t<l.length-1&&Ht(l[t+1]._model,s)&&(n.controlPointNextX=u(n.controlPointNextX,s.left,s.right),n.controlPointNextY=u(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var t,e=this.chart,n=this.getMeta(),i=n.data||[],a=e.chartArea,r=e.canvas,o=0,s=i.length;for(this._showLine&&(t=n.dataset._model.clip,H.canvas.clipArea(e.ctx,{left:!1===t.left?0:a.left-t.left,right:!1===t.right?r.width:a.right+t.right,top:!1===t.top?0:a.top-t.top,bottom:!1===t.bottom?r.height:a.bottom+t.bottom}),n.dataset.draw(),H.canvas.unclipArea(e.ctx));o<s;++o)i[o].draw(a)},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Wt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Wt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Wt(n.hoverBorderWidth,n.borderWidth),e.radius=Wt(n.hoverRadius,n.radius)}}),Gt=H.options.resolve;N._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data,o=r.datasets,s=r.labels;if(a.setAttribute("class",t.id+"-legend"),o.length)for(e=0,n=o[0].data.length;e<n;++e)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[e],s[e]&&i.appendChild(document.createTextNode(s[e]));return a.outerHTML},legend:{labels:{generateLabels:function(t){var e=t.data;return e.labels.length&&e.datasets.length?e.labels.map((function(n,i){var a=t.getDatasetMeta(0),r=a.controller.getStyle(i);return{text:n,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(e.datasets[0].data[i])||a.data[i].hidden,index:i}})):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n<i;++n)(a=o.getDatasetMeta(n)).data[r].hidden=!a.data[r].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(t,e){return e.labels[t.index]+": "+t.yLabel}}}});var Xt=it.extend({dataElementType:kt.Arc,linkScales:H.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i,a=this,r=a.getDataset(),o=a.getMeta(),s=a.chart.options.startAngle||0,l=a._starts=[],u=a._angles=[],d=o.data;for(a._updateRadius(),o.count=a.countVisibleElements(),e=0,n=r.data.length;e<n;e++)l[e]=s,i=a._computeAngle(e),u[e]=i,s+=i;for(e=0,n=d.length;e<n;++e)d[e]._options=a._resolveDataElementOptions(d[e],e),a.updateElement(d[e],e,t)},_updateRadius:function(){var t=this,e=t.chart,n=e.chartArea,i=e.options,a=Math.min(n.right-n.left,n.bottom-n.top);e.outerRadius=Math.max(a/2,0),e.innerRadius=Math.max(i.cutoutPercentage?e.outerRadius/100*i.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),t.outerRadius=e.outerRadius-e.radiusLength*t.index,t.innerRadius=t.outerRadius-e.radiusLength},updateElement:function(t,e,n){var i=this,a=i.chart,r=i.getDataset(),o=a.options,s=o.animation,l=a.scale,u=a.data.labels,d=l.xCenter,h=l.yCenter,c=o.startAngle,f=t.hidden?0:l.getDistanceFromCenterForValue(r.data[e]),g=i._starts[e],p=g+(t.hidden?0:i._angles[e]),m=s.animateScale?0:l.getDistanceFromCenterForValue(r.data[e]),v=t._options||{};H.extend(t,{_datasetIndex:i.index,_index:e,_scale:l,_model:{backgroundColor:v.backgroundColor,borderColor:v.borderColor,borderWidth:v.borderWidth,borderAlign:v.borderAlign,x:d,y:h,innerRadius:0,outerRadius:n?m:f,startAngle:n&&s.animateRotate?c:g,endAngle:n&&s.animateRotate?c:p,label:H.valueAtIndexOrDefault(u,e,u[e])}}),t.pivot()},countVisibleElements:function(){var t=this.getDataset(),e=this.getMeta(),n=0;return H.each(e.data,(function(e,i){isNaN(t.data[i])||e.hidden||n++})),n},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor,a=H.valueOrDefault;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth},e.backgroundColor=a(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=a(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=a(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(t){var e=this,n=this.getMeta().count,i=e.getDataset(),a=e.getMeta();if(isNaN(i.data[t])||a.data[t].hidden)return 0;var r={chart:e.chart,dataIndex:t,dataset:i,datasetIndex:e.index};return Gt([e.chart.options.elements.arc.angle,2*Math.PI/n],r,t)}});N._set("pie",H.clone(N.doughnut)),N._set("pie",{cutoutPercentage:0});var Kt=Bt,Zt=H.valueOrDefault;N._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var $t=it.extend({datasetElementType:kt.Line,dataElementType:kt.Point,linkScales:H.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(t){var e,n,i=this,a=i.getMeta(),r=a.dataset,o=a.data||[],s=i.chart.scale,l=i._config;for(void 0!==l.tension&&void 0===l.lineTension&&(l.lineTension=l.tension),r._scale=s,r._datasetIndex=i.index,r._children=o,r._loop=!0,r._model=i._resolveDatasetElementOptions(r),r.pivot(),e=0,n=o.length;e<n;++e)i.updateElement(o[e],e,t);for(i.updateBezierControlPoints(),e=0,n=o.length;e<n;++e)o[e].pivot()},updateElement:function(t,e,n){var i=this,a=t.custom||{},r=i.getDataset(),o=i.chart.scale,s=o.getPointPositionForValue(e,r.data[e]),l=i._resolveDataElementOptions(t,e),u=i.getMeta().dataset._model,d=n?o.xCenter:s.x,h=n?o.yCenter:s.y;t._scale=o,t._options=l,t._datasetIndex=i.index,t._index=e,t._model={x:d,y:h,skip:a.skip||isNaN(d)||isNaN(h),radius:l.radius,pointStyle:l.pointStyle,rotation:l.rotation,backgroundColor:l.backgroundColor,borderColor:l.borderColor,borderWidth:l.borderWidth,tension:Zt(a.tension,u?u.tension:0),hitRadius:l.hitRadius}},_resolveDatasetElementOptions:function(){var t=this,e=t._config,n=t.chart.options,i=it.prototype._resolveDatasetElementOptions.apply(t,arguments);return i.spanGaps=Zt(e.spanGaps,n.spanGaps),i.tension=Zt(e.lineTension,n.elements.line.tension),i},updateBezierControlPoints:function(){var t,e,n,i,a=this.getMeta(),r=this.chart.chartArea,o=a.data||[];function s(t,e,n){return Math.max(Math.min(t,n),e)}for(a.dataset._model.spanGaps&&(o=o.filter((function(t){return!t._model.skip}))),t=0,e=o.length;t<e;++t)n=o[t]._model,i=H.splineCurve(H.previousItem(o,t,!0)._model,n,H.nextItem(o,t,!0)._model,n.tension),n.controlPointPreviousX=s(i.previous.x,r.left,r.right),n.controlPointPreviousY=s(i.previous.y,r.top,r.bottom),n.controlPointNextX=s(i.next.x,r.left,r.right),n.controlPointNextY=s(i.next.y,r.top,r.bottom)},setHoverStyle:function(t){var e=t._model,n=t._options,i=H.getHoverColor;t.$previousStyle={backgroundColor:e.backgroundColor,borderColor:e.borderColor,borderWidth:e.borderWidth,radius:e.radius},e.backgroundColor=Zt(n.hoverBackgroundColor,i(n.backgroundColor)),e.borderColor=Zt(n.hoverBorderColor,i(n.borderColor)),e.borderWidth=Zt(n.hoverBorderWidth,n.borderWidth),e.radius=Zt(n.hoverRadius,n.radius)}});N._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(t){return"("+t.xLabel+", "+t.yLabel+")"}}}}),N._set("global",{datasets:{scatter:{showLine:!1}}});var Jt={bar:Tt,bubble:Ot,doughnut:Bt,horizontalBar:Et,line:Yt,polarArea:Xt,pie:Kt,radar:$t,scatter:Yt};function Qt(t,e){return t.native?{x:t.x,y:t.y}:H.getRelativePosition(t,e)}function te(t,e){var n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas();for(i=0,r=l.length;i<r;++i)for(a=0,o=(n=l[i].data).length;a<o;++a)(s=n[a])._view.skip||e(s)}function ee(t,e){var n=[];return te(t,(function(t){t.inRange(e.x,e.y)&&n.push(t)})),n}function ne(t,e,n,i){var a=Number.POSITIVE_INFINITY,r=[];return te(t,(function(t){if(!n||t.inRange(e.x,e.y)){var o=t.getCenterPoint(),s=i(e,o);s<a?(r=[t],a=s):s===a&&r.push(t)}})),r}function ie(t){var e=-1!==t.indexOf("x"),n=-1!==t.indexOf("y");return function(t,i){var a=e?Math.abs(t.x-i.x):0,r=n?Math.abs(t.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(r,2))}}function ae(t,e,n){var i=Qt(e,t);n.axis=n.axis||"x";var a=ie(n.axis),r=n.intersect?ee(t,i):ne(t,i,!1,a),o=[];return r.length?(t._getSortedVisibleDatasetMetas().forEach((function(t){var e=t.data[r[0]._index];e&&!e._view.skip&&o.push(e)})),o):[]}var re={modes:{single:function(t,e){var n=Qt(e,t),i=[];return te(t,(function(t){if(t.inRange(n.x,n.y))return i.push(t),i})),i.slice(0,1)},label:ae,index:ae,dataset:function(t,e,n){var i=Qt(e,t);n.axis=n.axis||"xy";var a=ie(n.axis),r=n.intersect?ee(t,i):ne(t,i,!1,a);return r.length>0&&(r=t.getDatasetMeta(r[0]._datasetIndex).data),r},"x-axis":function(t,e){return ae(t,e,{intersect:!1})},point:function(t,e){return ee(t,Qt(e,t))},nearest:function(t,e,n){var i=Qt(e,t);n.axis=n.axis||"xy";var a=ie(n.axis);return ne(t,i,n.intersect,a)},x:function(t,e,n){var i=Qt(e,t),a=[],r=!1;return te(t,(function(t){t.inXRange(i.x)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a},y:function(t,e,n){var i=Qt(e,t),a=[],r=!1;return te(t,(function(t){t.inYRange(i.y)&&a.push(t),t.inRange(i.x,i.y)&&(r=!0)})),n.intersect&&!r&&(a=[]),a}}},oe=H.extend;function se(t,e){return H.where(t,(function(t){return t.pos===e}))}function le(t,e){return t.sort((function(t,n){var i=e?n:t,a=e?t:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight}))}function ue(t,e,n,i){return Math.max(t[n],e[n])+Math.max(t[i],e[i])}function de(t,e,n){var i,a,r=n.box,o=t.maxPadding;if(n.size&&(t[n.pos]-=n.size),n.size=n.horizontal?r.height:r.width,t[n.pos]+=n.size,r.getPadding){var s=r.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(i=e.outerWidth-ue(o,t,"left","right"),a=e.outerHeight-ue(o,t,"top","bottom"),i!==t.w||a!==t.h){t.w=i,t.h=a;var l=n.horizontal?[i,t.w]:[a,t.h];return!(l[0]===l[1]||isNaN(l[0])&&isNaN(l[1]))}}function he(t,e){var n=e.maxPadding;function i(t){var i={left:0,top:0,right:0,bottom:0};return t.forEach((function(t){i[t]=Math.max(e[t],n[t])})),i}return i(t?["left","right"]:["top","bottom"])}function ce(t,e,n){var i,a,r,o,s,l,u=[];for(i=0,a=t.length;i<a;++i)(o=(r=t[i]).box).update(r.width||e.w,r.height||e.h,he(r.horizontal,e)),de(e,n,r)&&(l=!0,u.length&&(s=!0)),o.fullWidth||u.push(r);return s&&ce(u,e,n)||l}function fe(t,e,n){var i,a,r,o,s=n.padding,l=e.x,u=e.y;for(i=0,a=t.length;i<a;++i)o=(r=t[i]).box,r.horizontal?(o.left=o.fullWidth?s.left:e.left,o.right=o.fullWidth?n.outerWidth-s.right:e.left+e.w,o.top=u,o.bottom=u+o.height,o.width=o.right-o.left,u=o.bottom):(o.left=l,o.right=l+o.width,o.top=e.top,o.bottom=e.top+e.h,o.height=o.bottom-o.top,l=o.right);e.x=l,e.y=u}N._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ge,pe={defaults:{},addBox:function(t,e){t.boxes||(t.boxes=[]),e.fullWidth=e.fullWidth||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw:function(){e.draw.apply(e,arguments)}}]},t.boxes.push(e)},removeBox:function(t,e){var n=t.boxes?t.boxes.indexOf(e):-1;-1!==n&&t.boxes.splice(n,1)},configure:function(t,e,n){for(var i,a=["fullWidth","position","weight"],r=a.length,o=0;o<r;++o)i=a[o],n.hasOwnProperty(i)&&(e[i]=n[i])},update:function(t,e,n){if(t){var i=t.options.layout||{},a=H.options.toPadding(i.padding),r=e-a.width,o=n-a.height,s=function(t){var e=function(t){var e,n,i,a=[];for(e=0,n=(t||[]).length;e<n;++e)i=t[e],a.push({index:e,box:i,pos:i.position,horizontal:i.isHorizontal(),weight:i.weight});return a}(t),n=le(se(e,"left"),!0),i=le(se(e,"right")),a=le(se(e,"top"),!0),r=le(se(e,"bottom"));return{leftAndTop:n.concat(a),rightAndBottom:i.concat(r),chartArea:se(e,"chartArea"),vertical:n.concat(i),horizontal:a.concat(r)}}(t.boxes),l=s.vertical,u=s.horizontal,d=Object.freeze({outerWidth:e,outerHeight:n,padding:a,availableWidth:r,vBoxMaxWidth:r/2/l.length,hBoxMaxHeight:o/2}),h=oe({maxPadding:oe({},a),w:r,h:o,x:a.left,y:a.top},a);!function(t,e){var n,i,a;for(n=0,i=t.length;n<i;++n)(a=t[n]).width=a.horizontal?a.box.fullWidth&&e.availableWidth:e.vBoxMaxWidth,a.height=a.horizontal&&e.hBoxMaxHeight}(l.concat(u),d),ce(l,h,d),ce(u,h,d)&&ce(l,h,d),function(t){var e=t.maxPadding;function n(n){var i=Math.max(e[n]-t[n],0);return t[n]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}(h),fe(s.leftAndTop,h,d),h.x+=h.w,h.y+=h.h,fe(s.rightAndBottom,h,d),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h},H.each(s.chartArea,(function(e){var n=e.box;oe(n,t.chartArea),n.update(h.w,h.h)}))}}},me=(ge=Object.freeze({__proto__:null,default:"@keyframes chartjs-render-animation{from{opacity:.99}to{opacity:1}}.chartjs-render-monitor{animation:chartjs-render-animation 1ms}.chartjs-size-monitor,.chartjs-size-monitor-expand,.chartjs-size-monitor-shrink{position:absolute;direction:ltr;left:0;top:0;right:0;bottom:0;overflow:hidden;pointer-events:none;visibility:hidden;z-index:-1}.chartjs-size-monitor-expand>div{position:absolute;width:1000000px;height:1000000px;left:0;top:0}.chartjs-size-monitor-shrink>div{position:absolute;width:200%;height:200%;left:0;top:0}"}))&&ge.default||ge,ve="$chartjs",be="chartjs-size-monitor",xe="chartjs-render-monitor",ye="chartjs-render-animation",_e=["animationstart","webkitAnimationStart"],ke={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function we(t,e){var n=H.getStyle(t,e),i=n&&n.match(/^(\d+)(\.\d+)?px$/);return i?Number(i[1]):void 0}var Me=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("e",null,e)}catch(t){}return t}()&&{passive:!0};function Se(t,e,n){t.addEventListener(e,n,Me)}function Ce(t,e,n){t.removeEventListener(e,n,Me)}function Pe(t,e,n,i,a){return{type:t,chart:e,native:a||null,x:void 0!==n?n:null,y:void 0!==i?i:null}}function Ae(t){var e=document.createElement("div");return e.className=t||"",e}function De(t,e,n){var i,a,r,o,s=t[ve]||(t[ve]={}),l=s.resizer=function(t){var e=Ae(be),n=Ae(be+"-expand"),i=Ae(be+"-shrink");n.appendChild(Ae()),i.appendChild(Ae()),e.appendChild(n),e.appendChild(i),e._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,i.scrollLeft=1e6,i.scrollTop=1e6};var a=function(){e._reset(),t()};return Se(n,"scroll",a.bind(n,"expand")),Se(i,"scroll",a.bind(i,"shrink")),e}((i=function(){if(s.resizer){var i=n.options.maintainAspectRatio&&t.parentNode,a=i?i.clientWidth:0;e(Pe("resize",n)),i&&i.clientWidth<a&&n.canvas&&e(Pe("resize",n))}},r=!1,o=[],function(){o=Array.prototype.slice.call(arguments),a=a||this,r||(r=!0,H.requestAnimFrame.call(window,(function(){r=!1,i.apply(a,o)})))}));!function(t,e){var n=t[ve]||(t[ve]={}),i=n.renderProxy=function(t){t.animationName===ye&&e()};H.each(_e,(function(e){Se(t,e,i)})),n.reflow=!!t.offsetParent,t.classList.add(xe)}(t,(function(){if(s.resizer){var e=t.parentNode;e&&e!==l.parentNode&&e.insertBefore(l,e.firstChild),l._reset()}}))}function Te(t){var e=t[ve]||{},n=e.resizer;delete e.resizer,function(t){var e=t[ve]||{},n=e.renderProxy;n&&(H.each(_e,(function(e){Ce(t,e,n)})),delete e.renderProxy),t.classList.remove(xe)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}var Ie={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(t){if(!this.disableCSSInjection){var e=t.getRootNode?t.getRootNode():document;!function(t,e){var n=t[ve]||(t[ve]={});if(!n.containsStyles){n.containsStyles=!0,e="/* Chart.js */\n"+e;var i=document.createElement("style");i.setAttribute("type","text/css"),i.appendChild(document.createTextNode(e)),t.appendChild(i)}}(e.host?e:document.head,me)}},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(this._ensureLoaded(t),function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[ve]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=we(t,"width");void 0!==r&&(t.width=r)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=we(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var e=t.canvas;if(e[ve]){var n=e[ve].initial;["height","width"].forEach((function(t){var i=n[t];H.isNullOrUndef(i)?e.removeAttribute(t):e.setAttribute(t,i)})),H.each(n.style||{},(function(t,n){e.style[n]=t})),e.width=e.width,delete e[ve]}},addEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=n[ve]||(n[ve]={});Se(i,e,(a.proxies||(a.proxies={}))[t.id+"_"+e]=function(e){n(function(t,e){var n=ke[t.type]||t.type,i=H.getRelativePosition(t,e);return Pe(n,e,i.x,i.y,t)}(e,t))})}else De(i,n,t)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=((n[ve]||{}).proxies||{})[t.id+"_"+e];a&&Ce(i,e,a)}else Te(i)}};H.addEvent=Se,H.removeEvent=Ce;var Fe=Ie._enabled?Ie:{acquireContext:function(t){return t&&t.canvas&&(t=t.canvas),t&&t.getContext("2d")||null}},Oe=H.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Fe);N._set("global",{plugins:{}});var Le={_plugins:[],_cacheId:0,register:function(t){var e=this._plugins;[].concat(t).forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),this._cacheId++},unregister:function(t){var e=this._plugins;[].concat(t).forEach((function(t){var n=e.indexOf(t);-1!==n&&e.splice(n,1)})),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(t,e,n){var i,a,r,o,s,l=this.descriptors(t),u=l.length;for(i=0;i<u;++i)if("function"==typeof(s=(r=(a=l[i]).plugin)[e])&&((o=[t].concat(n||[])).push(a.options),!1===s.apply(r,o)))return!1;return!0},descriptors:function(t){var e=t.$plugins||(t.$plugins={});if(e.id===this._cacheId)return e.descriptors;var n=[],i=[],a=t&&t.config||{},r=a.options&&a.options.plugins||{};return this._plugins.concat(a.plugins||[]).forEach((function(t){if(-1===n.indexOf(t)){var e=t.id,a=r[e];!1!==a&&(!0===a&&(a=H.clone(N.global.plugins[e])),n.push(t),i.push({plugin:t,options:a||{}}))}})),e.descriptors=i,e.id=this._cacheId,i},_invalidate:function(t){delete t.$plugins}},Re={constructors:{},defaults:{},registerScaleType:function(t,e,n){this.constructors[t]=e,this.defaults[t]=H.clone(n)},getScaleConstructor:function(t){return this.constructors.hasOwnProperty(t)?this.constructors[t]:void 0},getScaleDefaults:function(t){return this.defaults.hasOwnProperty(t)?H.merge(Object.create(null),[N.scale,this.defaults[t]]):{}},updateScaleDefaults:function(t,e){this.defaults.hasOwnProperty(t)&&(this.defaults[t]=H.extend(this.defaults[t],e))},addScalesToLayout:function(t){H.each(t.scales,(function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,pe.addBox(t,e)}))}},ze=H.valueOrDefault,Ne=H.rtl.getRtlAdapter;N._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:H.noop,title:function(t,e){var n="",i=e.labels,a=i?i.length:0;if(t.length>0){var r=t[0];r.label?n=r.label:r.xLabel?n=r.xLabel:a>0&&r.index<a&&(n=i[r.index])}return n},afterTitle:H.noop,beforeBody:H.noop,beforeLabel:H.noop,label:function(t,e){var n=e.datasets[t.datasetIndex].label||"";return n&&(n+=": "),H.isNullOrUndef(t.value)?n+=t.yLabel:n+=t.value,n},labelColor:function(t,e){var n=e.getDatasetMeta(t.datasetIndex).data[t.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:H.noop,afterBody:H.noop,beforeFooter:H.noop,footer:H.noop,afterFooter:H.noop}}});var Be={average:function(t){if(!t.length)return!1;var e,n,i=0,a=0,r=0;for(e=0,n=t.length;e<n;++e){var o=t[e];if(o&&o.hasValue()){var s=o.tooltipPosition();i+=s.x,a+=s.y,++r}}return{x:i/r,y:a/r}},nearest:function(t,e){var n,i,a,r=e.x,o=e.y,s=Number.POSITIVE_INFINITY;for(n=0,i=t.length;n<i;++n){var l=t[n];if(l&&l.hasValue()){var u=l.getCenterPoint(),d=H.distanceBetweenPoints(e,u);d<s&&(s=d,a=l)}}if(a){var h=a.tooltipPosition();r=h.x,o=h.y}return{x:r,y:o}}};function Ee(t,e){return e&&(H.isArray(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function We(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Ve(t){var e=N.global;return{xPadding:t.xPadding,yPadding:t.yPadding,xAlign:t.xAlign,yAlign:t.yAlign,rtl:t.rtl,textDirection:t.textDirection,bodyFontColor:t.bodyFontColor,_bodyFontFamily:ze(t.bodyFontFamily,e.defaultFontFamily),_bodyFontStyle:ze(t.bodyFontStyle,e.defaultFontStyle),_bodyAlign:t.bodyAlign,bodyFontSize:ze(t.bodyFontSize,e.defaultFontSize),bodySpacing:t.bodySpacing,titleFontColor:t.titleFontColor,_titleFontFamily:ze(t.titleFontFamily,e.defaultFontFamily),_titleFontStyle:ze(t.titleFontStyle,e.defaultFontStyle),titleFontSize:ze(t.titleFontSize,e.defaultFontSize),_titleAlign:t.titleAlign,titleSpacing:t.titleSpacing,titleMarginBottom:t.titleMarginBottom,footerFontColor:t.footerFontColor,_footerFontFamily:ze(t.footerFontFamily,e.defaultFontFamily),_footerFontStyle:ze(t.footerFontStyle,e.defaultFontStyle),footerFontSize:ze(t.footerFontSize,e.defaultFontSize),_footerAlign:t.footerAlign,footerSpacing:t.footerSpacing,footerMarginTop:t.footerMarginTop,caretSize:t.caretSize,cornerRadius:t.cornerRadius,backgroundColor:t.backgroundColor,opacity:0,legendColorBackground:t.multiKeyBackground,displayColors:t.displayColors,borderColor:t.borderColor,borderWidth:t.borderWidth}}function He(t,e){return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-t.xPadding:t.x+t.xPadding}function je(t){return Ee([],We(t))}var qe=K.extend({initialize:function(){this._model=Ve(this._options),this._lastActive=[]},getTitle:function(){var t=this,e=t._options,n=e.callbacks,i=n.beforeTitle.apply(t,arguments),a=n.title.apply(t,arguments),r=n.afterTitle.apply(t,arguments),o=[];return o=Ee(o,We(i)),o=Ee(o,We(a)),o=Ee(o,We(r))},getBeforeBody:function(){return je(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(t,e){var n=this,i=n._options.callbacks,a=[];return H.each(t,(function(t){var r={before:[],lines:[],after:[]};Ee(r.before,We(i.beforeLabel.call(n,t,e))),Ee(r.lines,i.label.call(n,t,e)),Ee(r.after,We(i.afterLabel.call(n,t,e))),a.push(r)})),a},getAfterBody:function(){return je(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var t=this,e=t._options.callbacks,n=e.beforeFooter.apply(t,arguments),i=e.footer.apply(t,arguments),a=e.afterFooter.apply(t,arguments),r=[];return r=Ee(r,We(n)),r=Ee(r,We(i)),r=Ee(r,We(a))},update:function(t){var e,n,i,a,r,o,s,l,u,d,h=this,c=h._options,f=h._model,g=h._model=Ve(c),p=h._active,m=h._data,v={xAlign:f.xAlign,yAlign:f.yAlign},b={x:f.x,y:f.y},x={width:f.width,height:f.height},y={x:f.caretX,y:f.caretY};if(p.length){g.opacity=1;var _=[],k=[];y=Be[c.position].call(h,p,h._eventPosition);var w=[];for(e=0,n=p.length;e<n;++e)w.push((i=p[e],a=void 0,r=void 0,o=void 0,s=void 0,l=void 0,u=void 0,d=void 0,a=i._xScale,r=i._yScale||i._scale,o=i._index,s=i._datasetIndex,l=i._chart.getDatasetMeta(s).controller,u=l._getIndexScale(),d=l._getValueScale(),{xLabel:a?a.getLabelForIndex(o,s):"",yLabel:r?r.getLabelForIndex(o,s):"",label:u?""+u.getLabelForIndex(o,s):"",value:d?""+d.getLabelForIndex(o,s):"",index:o,datasetIndex:s,x:i._model.x,y:i._model.y}));c.filter&&(w=w.filter((function(t){return c.filter(t,m)}))),c.itemSort&&(w=w.sort((function(t,e){return c.itemSort(t,e,m)}))),H.each(w,(function(t){_.push(c.callbacks.labelColor.call(h,t,h._chart)),k.push(c.callbacks.labelTextColor.call(h,t,h._chart))})),g.title=h.getTitle(w,m),g.beforeBody=h.getBeforeBody(w,m),g.body=h.getBody(w,m),g.afterBody=h.getAfterBody(w,m),g.footer=h.getFooter(w,m),g.x=y.x,g.y=y.y,g.caretPadding=c.caretPadding,g.labelColors=_,g.labelTextColors=k,g.dataPoints=w,x=function(t,e){var n=t._chart.ctx,i=2*e.yPadding,a=0,r=e.body,o=r.reduce((function(t,e){return t+e.before.length+e.lines.length+e.after.length}),0);o+=e.beforeBody.length+e.afterBody.length;var s=e.title.length,l=e.footer.length,u=e.titleFontSize,d=e.bodyFontSize,h=e.footerFontSize;i+=s*u,i+=s?(s-1)*e.titleSpacing:0,i+=s?e.titleMarginBottom:0,i+=o*d,i+=o?(o-1)*e.bodySpacing:0,i+=l?e.footerMarginTop:0,i+=l*h,i+=l?(l-1)*e.footerSpacing:0;var c=0,f=function(t){a=Math.max(a,n.measureText(t).width+c)};return n.font=H.fontString(u,e._titleFontStyle,e._titleFontFamily),H.each(e.title,f),n.font=H.fontString(d,e._bodyFontStyle,e._bodyFontFamily),H.each(e.beforeBody.concat(e.afterBody),f),c=e.displayColors?d+2:0,H.each(r,(function(t){H.each(t.before,f),H.each(t.lines,f),H.each(t.after,f)})),c=0,n.font=H.fontString(h,e._footerFontStyle,e._footerFontFamily),H.each(e.footer,f),{width:a+=2*e.xPadding,height:i}}(this,g),b=function(t,e,n,i){var a=t.x,r=t.y,o=t.caretSize,s=t.caretPadding,l=t.cornerRadius,u=n.xAlign,d=n.yAlign,h=o+s,c=l+s;return"right"===u?a-=e.width:"center"===u&&((a-=e.width/2)+e.width>i.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===d?r+=h:r-="bottom"===d?e.height+h:e.height/2,"center"===d?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=c:"right"===u&&(a+=c),{x:a,y:r}}(g,x,v=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.y<e.height?h="top":s.y>l.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;"center"===h?(n=function(t){return t<=c},i=function(t){return t>c}):(n=function(t){return t<=e.width/2},i=function(t){return t>=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,x),h._chart)}else g.opacity=0;return g.xAlign=v.xAlign,g.yAlign=v.yAlign,g.x=b.x,g.y=b.y,g.width=x.width,g.height=x.height,g.caretX=y.x,g.caretY=y.y,h._model=g,t&&c.custom&&c.custom.call(h,g),h},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,p=e.width,m=e.height;if("center"===c)s=g+m/2,"left"===h?(a=(i=f)-u,r=i,o=s+u,l=s-u):(a=(i=f+p)+u,r=i,o=s-u,l=s+u);else if("left"===h?(i=(a=f+d+u)-u,r=a+u):"right"===h?(i=(a=f+p-d-u)-u,r=a+u):(i=(a=n.caretX)-u,r=a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+m)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n){var i,a,r,o=e.title,s=o.length;if(s){var l=Ne(e.rtl,e.x,e.width);for(t.x=He(e,e._titleAlign),n.textAlign=l.textAlign(e._titleAlign),n.textBaseline="middle",i=e.titleFontSize,a=e.titleSpacing,n.fillStyle=e.titleFontColor,n.font=H.fontString(i,e._titleFontStyle,e._titleFontFamily),r=0;r<s;++r)n.fillText(o[r],l.x(t.x),t.y+i/2),t.y+=i+a,r+1===s&&(t.y+=e.titleMarginBottom-a)}},drawBody:function(t,e,n){var i,a,r,o,s,l,u,d,h=e.bodyFontSize,c=e.bodySpacing,f=e._bodyAlign,g=e.body,p=e.displayColors,m=0,v=p?He(e,"left"):0,b=Ne(e.rtl,e.x,e.width),x=function(e){n.fillText(e,b.x(t.x+m),t.y+h/2),t.y+=h+c},y=b.textAlign(f);for(n.textAlign=f,n.textBaseline="middle",n.font=H.fontString(h,e._bodyFontStyle,e._bodyFontFamily),t.x=He(e,y),n.fillStyle=e.bodyFontColor,H.each(e.beforeBody,x),m=p&&"right"!==y?"center"===f?h/2+1:h+2:0,s=0,u=g.length;s<u;++s){for(i=g[s],a=e.labelTextColors[s],r=e.labelColors[s],n.fillStyle=a,H.each(i.before,x),l=0,d=(o=i.lines).length;l<d;++l){if(p){var _=b.x(v);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(_,h),t.y,h,h),n.lineWidth=1,n.strokeStyle=r.borderColor,n.strokeRect(b.leftForLtr(_,h),t.y,h,h),n.fillStyle=r.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(_,1),h-2),t.y+1,h-2,h-2),n.fillStyle=a}x(o[l])}H.each(i.after,x)}m=0,H.each(e.afterBody,x),t.y-=c},drawFooter:function(t,e,n){var i,a,r=e.footer,o=r.length;if(o){var s=Ne(e.rtl,e.x,e.width);for(t.x=He(e,e._footerAlign),t.y+=e.footerMarginTop,n.textAlign=s.textAlign(e._footerAlign),n.textBaseline="middle",i=e.footerFontSize,n.fillStyle=e.footerFontColor,n.font=H.fontString(i,e._footerFontStyle,e._footerFontFamily),a=0;a<o;++a)n.fillText(r[a],s.x(t.x),t.y+i/2),t.y+=i+e.footerSpacing}},drawBackground:function(t,e,n,i){n.fillStyle=e.backgroundColor,n.strokeStyle=e.borderColor,n.lineWidth=e.borderWidth;var a=e.xAlign,r=e.yAlign,o=t.x,s=t.y,l=i.width,u=i.height,d=e.cornerRadius;n.beginPath(),n.moveTo(o+d,s),"top"===r&&this.drawCaret(t,i),n.lineTo(o+l-d,s),n.quadraticCurveTo(o+l,s,o+l,s+d),"center"===r&&"right"===a&&this.drawCaret(t,i),n.lineTo(o+l,s+u-d),n.quadraticCurveTo(o+l,s+u,o+l-d,s+u),"bottom"===r&&this.drawCaret(t,i),n.lineTo(o+d,s+u),n.quadraticCurveTo(o,s+u,o,s+u-d),"center"===r&&"left"===a&&this.drawCaret(t,i),n.lineTo(o,s+d),n.quadraticCurveTo(o,s,o+d,s),n.closePath(),n.fill(),e.borderWidth>0&&n.stroke()},draw:function(){var t=this._chart.ctx,e=this._view;if(0!==e.opacity){var n={width:e.width,height:e.height},i={x:e.x,y:e.y},a=Math.abs(e.opacity<.001)?0:e.opacity,r=e.title.length||e.beforeBody.length||e.body.length||e.afterBody.length||e.footer.length;this._options.enabled&&r&&(t.save(),t.globalAlpha=a,this.drawBackground(i,e,t,n),i.y+=e.yPadding,H.rtl.overrideTextDirection(t,e.textDirection),this.drawTitle(i,e,t),this.drawBody(i,e,t),this.drawFooter(i,e,t),H.rtl.restoreTextDirection(t,e.textDirection),t.restore())}},handleEvent:function(t){var e,n=this,i=n._options;return n._lastActive=n._lastActive||[],"mouseout"===t.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(t,i.mode,i),i.reverse&&n._active.reverse()),(e=!H.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(i.enabled||i.custom)&&(n._eventPosition={x:t.x,y:t.y},n.update(!0),n.pivot())),e}}),Ue=Be,Ye=qe;Ye.positioners=Ue;var Ge=H.valueOrDefault;function Xe(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){if("xAxes"===t||"yAxes"===t){var a,r,o,s=n[t].length;for(e[t]||(e[t]=[]),a=0;a<s;++a)o=n[t][a],r=Ge(o.type,"xAxes"===t?"category":"linear"),a>=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?H.merge(e[t][a],[Re.getScaleDefaults(r),o]):H.merge(e[t][a],o)}else H._merger(t,e,n,i)}})}function Ke(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(t,e,n,i){var a=e[t]||Object.create(null),r=n[t];"scales"===t?e[t]=Xe(a,r):"scale"===t?e[t]=H.merge(a,[Re.getScaleDefaults(r.type),r]):H._merger(t,e,n,i)}})}function Ze(t){var e=t.options;H.each(t.scales,(function(e){pe.removeBox(t,e)})),e=Ke(N.global,N[t.config.type],e),t.options=t.config.options=e,t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.tooltip._options=e.tooltips,t.tooltip.initialize()}function $e(t,e,n){var i,a=function(t){return t.id===i};do{i=e+n++}while(H.findIndex(t,a)>=0);return i}function Je(t){return"top"===t||"bottom"===t}function Qe(t,e){return function(n,i){return n[t]===i[t]?n[e]-i[e]:n[t]-i[t]}}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 tn=function(t,e){return this.construct(t,e),this};H.extend(tn.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||Object.create(null)).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=Ke(N.global,N[t.type],t.options||{}),t}(e);var i=Oe.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=H.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,n._layers=[],n.chart=n,n.controller=n,tn.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return Le.notify(t,"beforeInit"),H.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.initToolTip(),Le.notify(t,"afterInit"),t},clear:function(){return H.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(H.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:H.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",H.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};Le.notify(e,"resize",[s]),n.onResize&&n.onResize(e,s),e.stop(),e.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;H.each(e.xAxes,(function(t,n){t.id||(t.id=$e(e.xAxes,"x-axis-",n))})),H.each(e.yAxes,(function(t,n){t.id||(t.id=$e(e.yAxes,"y-axis-",n))})),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var t=this,e=t.options,n=t.scales||{},i=[],a=Object.keys(n).reduce((function(t,e){return t[e]=!1,t}),{});e.scales&&(i=i.concat((e.scales.xAxes||[]).map((function(t){return{options:t,dtype:"category",dposition:"bottom"}})),(e.scales.yAxes||[]).map((function(t){return{options:t,dtype:"linear",dposition:"left"}})))),e.scale&&i.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),H.each(i,(function(e){var i=e.options,r=i.id,o=Ge(i.type,e.dtype);Je(i.position)!==Je(e.dposition)&&(i.position=e.dposition),a[r]=!0;var s=null;if(r in n&&n[r].type===o)(s=n[r]).options=i,s.ctx=t.ctx,s.chart=t;else{var l=Re.getScaleConstructor(o);if(!l)return;s=new l({id:r,type:o,options:i,ctx:t.ctx,chart:t}),n[s.id]=s}s.mergeTicksOptions(),e.isDefault&&(t.scale=s)})),H.each(a,(function(t,e){t||delete n[e]})),t.scales=n,Re.addScalesToLayout(this)},buildOrUpdateControllers:function(){var t,e,n=this,i=[],a=n.data.datasets;for(t=0,e=a.length;t<e;t++){var r=a[t],o=n.getDatasetMeta(t),s=r.type||n.config.type;if(o.type&&o.type!==s&&(n.destroyDatasetMeta(t),o=n.getDatasetMeta(t)),o.type=s,o.order=r.order||0,o.index=t,o.controller)o.controller.updateIndex(t),o.controller.linkScales();else{var l=Jt[o.type];if(void 0===l)throw new Error('"'+o.type+'" is not a chart type.');o.controller=new l(n,t),i.push(o.controller)}}return i},resetElements:function(){var t=this;H.each(t.data.datasets,(function(e,n){t.getDatasetMeta(n).controller.reset()}),t)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),Ze(i),Le._invalidate(i),!1!==Le.notify(i,"beforeUpdate")){i.tooltip._data=i.data;var a=i.buildOrUpdateControllers();for(e=0,n=i.data.datasets.length;e<n;e++)i.getDatasetMeta(e).controller.buildOrUpdateElements();i.updateLayout(),i.options.animation&&i.options.animation.duration&&H.each(a,(function(t){t.reset()})),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],Le.notify(i,"afterUpdate"),i._layers.sort(Qe("z","_idx")),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t)}},updateLayout:function(){var t=this;!1!==Le.notify(t,"beforeLayout")&&(pe.update(this,this.width,this.height),t._layers=[],H.each(t.boxes,(function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())}),t),t._layers.forEach((function(t,e){t._idx=e})),Le.notify(t,"afterScaleUpdate"),Le.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Le.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t<e;++t)this.updateDataset(t);Le.notify(this,"afterDatasetsUpdate")}},updateDataset:function(t){var e=this.getDatasetMeta(t),n={meta:e,index:t};!1!==Le.notify(this,"beforeDatasetUpdate",[n])&&(e.controller._update(),Le.notify(this,"afterDatasetUpdate",[n]))},render:function(t){var e=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]});var n=e.options.animation,i=Ge(t.duration,n&&n.duration),a=t.lazy;if(!1!==Le.notify(e,"beforeRender")){var r=function(t){Le.notify(e,"afterRender"),H.callback(n&&n.onComplete,[t],e)};if(n&&i){var o=new $({numSteps:i/16.66,easing:t.easing||n.easing,render:function(t,e){var n=H.easing.effects[e.easing],i=e.currentStep,a=i/e.numSteps;t.draw(n(a),a,i)},onAnimationProgress:n.onProgress,onAnimationComplete:r});J.addAnimation(e,o,i,a)}else e.draw(),r(new $({numSteps:0,chart:e}));return e}},draw:function(t){var e,n,i=this;if(i.clear(),H.isNullOrUndef(t)&&(t=1),i.transition(t),!(i.width<=0||i.height<=0)&&!1!==Le.notify(i,"beforeDraw",[t])){for(n=i._layers,e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(i.chartArea);for(i.drawDatasets(t);e<n.length;++e)n[e].draw(i.chartArea);i._drawTooltip(t),Le.notify(i,"afterDraw",[t])}},transition:function(t){for(var e=0,n=(this.data.datasets||[]).length;e<n;++e)this.isDatasetVisible(e)&&this.getDatasetMeta(e).controller.transition(t);this.tooltip.transition(t)},_getSortedDatasetMetas:function(t){var e,n,i=[];for(e=0,n=(this.data.datasets||[]).length;e<n;++e)t&&!this.isDatasetVisible(e)||i.push(this.getDatasetMeta(e));return i.sort(Qe("order","index")),i},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(t){var e,n;if(!1!==Le.notify(this,"beforeDatasetsDraw",[t])){for(n=(e=this._getSortedVisibleDatasetMetas()).length-1;n>=0;--n)this.drawDataset(e[n],t);Le.notify(this,"afterDatasetsDraw",[t])}},drawDataset:function(t,e){var n={meta:t,index:t.index,easingValue:e};!1!==Le.notify(this,"beforeDatasetDraw",[n])&&(t.controller.draw(e),Le.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(t){var e=this.tooltip,n={tooltip:e,easingValue:t};!1!==Le.notify(this,"beforeTooltipDraw",[n])&&(e.draw(),Le.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(t){return re.modes.single(this,t)},getElementsAtEvent:function(t){return re.modes.label(this,t,{intersect:!0})},getElementsAtXAxis:function(t){return re.modes["x-axis"](this,t,{intersect:!0})},getElementsAtEventForMode:function(t,e,n){var i=re.modes[e];return"function"==typeof i?i(this,t,n):[]},getDatasetAtEvent:function(t){return re.modes.dataset(this,t,{intersect:!0})},getDatasetMeta:function(t){var e=this.data.datasets[t];e._meta||(e._meta={});var n=e._meta[this.id];return n||(n=e._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e.order||0,index:t}),n},getVisibleDatasetCount:function(){for(var t=0,e=0,n=this.data.datasets.length;e<n;++e)this.isDatasetVisible(e)&&t++;return t},isDatasetVisible:function(t){var e=this.getDatasetMeta(t);return"boolean"==typeof e.hidden?!e.hidden:!this.data.datasets[t].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(t){var e=this.id,n=this.data.datasets[t],i=n._meta&&n._meta[e];i&&(i.controller.destroy(),delete n._meta[e])},destroy:function(){var t,e,n=this,i=n.canvas;for(n.stop(),t=0,e=n.data.datasets.length;t<e;++t)n.destroyDatasetMeta(t);i&&(n.unbindEvents(),H.canvas.clear(n),Oe.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Le.notify(n,"destroy"),delete tn.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){var t=this;t.tooltip=new Ye({_chart:t,_chartInstance:t,_data:t.data,_options:t.options.tooltips},t)},bindEvents:function(){var t=this,e=t._listeners={},n=function(){t.eventHandler.apply(t,arguments)};H.each(t.options.events,(function(i){Oe.addEventListener(t,i,n),e[i]=n})),t.options.responsive&&(n=function(){t.resize()},Oe.addEventListener(t,"resize",n),e.resize=n)},unbindEvents:function(){var t=this,e=t._listeners;e&&(delete t._listeners,H.each(e,(function(e,n){Oe.removeEventListener(t,n,e)})))},updateHoverStyle:function(t,e,n){var i,a,r,o=n?"set":"remove";for(a=0,r=t.length;a<r;++a)(i=t[a])&&this.getDatasetMeta(i._datasetIndex).controller[o+"HoverStyle"](i);"dataset"===e&&this.getDatasetMeta(t[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(t){var e=this,n=e.tooltip;if(!1!==Le.notify(e,"beforeEvent",[t])){e._bufferedRender=!0,e._bufferedRequest=null;var i=e.handleEvent(t);n&&(i=n._start?n.handleEvent(t):i|n.handleEvent(t)),Le.notify(e,"afterEvent",[t]);var a=e._bufferedRequest;return a?e.render(a):i&&!e.animating&&(e.stop(),e.render({duration:e.options.hover.animationDuration,lazy:!0})),e._bufferedRender=!1,e._bufferedRequest=null,e}},handleEvent:function(t){var e,n=this,i=n.options||{},a=i.hover;return n.lastActive=n.lastActive||[],"mouseout"===t.type?n.active=[]:n.active=n.getElementsAtEventForMode(t,a.mode,a),H.callback(i.onHover||i.hover.onHover,[t.native,n.active],n),"mouseup"!==t.type&&"click"!==t.type||i.onClick&&i.onClick.call(n,t.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,a.mode,!1),n.active.length&&a.mode&&n.updateHoverStyle(n.active,a.mode,!0),e=!H.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,e}}),tn.instances={};var en=tn;tn.Controller=tn,tn.types={},H.configMerge=Ke,H.scaleMerge=Xe;function nn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function an(t){this.options=t||{}}H.extend(an.prototype,{formats:nn,parse:nn,format:nn,add:nn,diff:nn,startOf:nn,endOf:nn,_create:function(t){return t}}),an.override=function(t){H.extend(an.prototype,t)};var rn={_date:an},on={formatters:{values:function(t){return H.isArray(t)?t:""+t},linear:function(t,e,n){var i=n.length>3?n[2]-n[1]:n[1]-n[0];Math.abs(i)>1&&t!==Math.floor(t)&&(i=t-Math.floor(t));var a=H.log10(Math.abs(i)),r="";if(0!==t)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=H.log10(Math.abs(t)),s=Math.floor(o)-Math.floor(a);s=Math.max(Math.min(s,20),0),r=t.toExponential(s)}else{var l=-1*Math.floor(a);l=Math.max(Math.min(l,20),0),r=t.toFixed(l)}else r="0";return r},logarithmic:function(t,e,n){var i=t/Math.pow(10,Math.floor(H.log10(t)));return 0===t?"0":1===i||2===i||5===i||0===e||e===n.length-1?t.toExponential():""}}},sn=H.isArray,ln=H.isNullOrUndef,un=H.valueOrDefault,dn=H.valueAtIndexOrDefault;function hn(t,e,n){var i,a=t.getTicks().length,r=Math.min(e,a-1),o=t.getPixelForTick(r),s=t._startPixel,l=t._endPixel;if(!(n&&(i=1===a?Math.max(o-s,l-o):0===e?(t.getPixelForTick(1)-o)/2:(o-t.getPixelForTick(r-1))/2,(o+=r<e?i:-i)<s-1e-6||o>l+1e-6)))return o}function cn(t,e,n,i){var a,r,o,s,l,u,d,h,c,f,g,p,m,v=n.length,b=[],x=[],y=[],_=0,k=0;for(a=0;a<v;++a){if(s=n[a].label,l=n[a].major?e.major:e.minor,t.font=u=l.string,d=i[u]=i[u]||{data:{},gc:[]},h=l.lineHeight,c=f=0,ln(s)||sn(s)){if(sn(s))for(r=0,o=s.length;r<o;++r)g=s[r],ln(g)||sn(g)||(c=H.measureText(t,d.data,d.gc,c,g),f+=h)}else c=H.measureText(t,d.data,d.gc,c,s),f=h;b.push(c),x.push(f),y.push(h/2),_=Math.max(c,_),k=Math.max(f,k)}function w(t){return{width:b[t]||0,height:x[t]||0,offset:y[t]||0}}return function(t,e){H.each(t,(function(t){var n,i=t.gc,a=i.length/2;if(a>e){for(n=0;n<a;++n)delete t.data[i[n]];i.splice(0,a)}}))}(i,v),p=b.indexOf(_),m=x.indexOf(k),{first:w(0),last:w(v-1),widest:w(p),highest:w(m)}}function fn(t){return t.drawTicks?t.tickMarkLength:0}function gn(t){var e,n;return t.display?(e=H.options._parseFont(t),n=H.options.toPadding(t.padding),e.lineHeight+n.height):0}function pn(t,e){return H.extend(H.options._parseFont({fontFamily:un(e.fontFamily,t.fontFamily),fontSize:un(e.fontSize,t.fontSize),fontStyle:un(e.fontStyle,t.fontStyle),lineHeight:un(e.lineHeight,t.lineHeight)}),{color:H.options.resolve([e.fontColor,t.fontColor,N.global.defaultFontColor])})}function mn(t){var e=pn(t,t.minor);return{minor:e,major:t.major.enabled?pn(t,t.major):e}}function vn(t){var e,n,i,a=[];for(n=0,i=t.length;n<i;++n)void 0!==(e=t[n])._index&&a.push(e);return a}function bn(t,e,n,i){var a,r,o,s,l=un(n,0),u=Math.min(un(i,t.length),t.length),d=0;for(e=Math.ceil(e),i&&(e=(a=i-n)/Math.floor(a/e)),s=l;s<0;)d++,s=Math.round(l+d*e);for(r=Math.max(l,0);r<u;r++)o=t[r],r===s?(o._index=r,d++,s=Math.round(l+d*e)):delete o.label}N._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:on.formatters.values,minor:{},major:{}}});var xn=K.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){H.callback(this.options.beforeUpdate,[this])},update:function(t,e,n){var i,a,r,o,s,l=this,u=l.options.ticks,d=u.sampleSize;if(l.beforeUpdate(),l.maxWidth=t,l.maxHeight=e,l.margins=H.extend({left:0,right:0,top:0,bottom:0},n),l._ticks=null,l.ticks=null,l._labelSizes=null,l._maxLabelLines=0,l.longestLabelWidth=0,l.longestTextCache=l.longestTextCache||{},l._gridLineItems=null,l._labelItems=null,l.beforeSetDimensions(),l.setDimensions(),l.afterSetDimensions(),l.beforeDataLimits(),l.determineDataLimits(),l.afterDataLimits(),l.beforeBuildTicks(),o=l.buildTicks()||[],(!(o=l.afterBuildTicks(o)||o)||!o.length)&&l.ticks)for(o=[],i=0,a=l.ticks.length;i<a;++i)o.push({value:l.ticks[i],major:!1});return l._ticks=o,s=d<o.length,r=l._convertTicksToLabels(s?function(t,e){for(var n=[],i=t.length/e,a=0,r=t.length;a<r;a+=i)n.push(t[Math.floor(a)]);return n}(o,d):o),l._configure(),l.beforeCalculateTickRotation(),l.calculateTickRotation(),l.afterCalculateTickRotation(),l.beforeFit(),l.fit(),l.afterFit(),l._ticksToDraw=u.display&&(u.autoSkip||"auto"===u.source)?l._autoSkip(o):o,s&&(r=l._convertTicksToLabels(l._ticksToDraw)),l.ticks=r,l.afterUpdate(),l.minSize},_configure:function(){var t,e,n=this,i=n.options.ticks.reverse;n.isHorizontal()?(t=n.left,e=n.right):(t=n.top,e=n.bottom,i=!i),n._startPixel=t,n._endPixel=e,n._reversePixels=i,n._length=e-t},afterUpdate:function(){H.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){H.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0},afterSetDimensions:function(){H.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){H.callback(this.options.beforeDataLimits,[this])},determineDataLimits:H.noop,afterDataLimits:function(){H.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){H.callback(this.options.beforeBuildTicks,[this])},buildTicks:H.noop,afterBuildTicks:function(t){var e=this;return sn(t)&&t.length?H.callback(e.options.afterBuildTicks,[e,t]):(e.ticks=H.callback(e.options.afterBuildTicks,[e,e.ticks])||e.ticks,t)},beforeTickToLabelConversion:function(){H.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var t=this.options.ticks;this.ticks=this.ticks.map(t.userCallback||t.callback,this)},afterTickToLabelConversion:function(){H.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){H.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var t,e,n,i,a,r,o,s=this,l=s.options,u=l.ticks,d=s.getTicks().length,h=u.minRotation||0,c=u.maxRotation,f=h;!s._isVisible()||!u.display||h>=c||d<=1||!s.isHorizontal()?s.labelRotation=h:(e=(t=s._getLabelSizes()).widest.width,n=t.highest.height-t.highest.offset,i=Math.min(s.maxWidth,s.chart.width-e),e+6>(a=l.offset?s.maxWidth/d:i/(d-1))&&(a=i/(d-(l.offset?.5:1)),r=s.maxHeight-fn(l.gridLines)-u.padding-gn(l.scaleLabel),o=Math.sqrt(e*e+n*n),f=H.toDegrees(Math.min(Math.asin(Math.min((t.highest.height+6)/a,1)),Math.asin(Math.min(r/o,1))-Math.asin(n/o))),f=Math.max(h,Math.min(c,f))),s.labelRotation=f)},afterCalculateTickRotation:function(){H.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){H.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=t.chart,i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=t._isVisible(),l="bottom"===i.position,u=t.isHorizontal();if(u?e.width=t.maxWidth:s&&(e.width=fn(o)+gn(r)),u?s&&(e.height=fn(o)+gn(r)):e.height=t.maxHeight,a.display&&s){var d=mn(a),h=t._getLabelSizes(),c=h.first,f=h.last,g=h.widest,p=h.highest,m=.4*d.minor.lineHeight,v=a.padding;if(u){var b=0!==t.labelRotation,x=H.toRadians(t.labelRotation),y=Math.cos(x),_=Math.sin(x),k=_*g.width+y*(p.height-(b?p.offset:0))+(b?0:m);e.height=Math.min(t.maxHeight,e.height+k+v);var w,M,S=t.getPixelForTick(0)-t.left,C=t.right-t.getPixelForTick(t.getTicks().length-1);b?(w=l?y*c.width+_*c.offset:_*(c.height-c.offset),M=l?_*(f.height-f.offset):y*f.width+_*f.offset):(w=c.width/2,M=f.width/2),t.paddingLeft=Math.max((w-S)*t.width/(t.width-S),0)+3,t.paddingRight=Math.max((M-C)*t.width/(t.width-C),0)+3}else{var P=a.mirror?0:g.width+v+m;e.width=Math.min(t.maxWidth,e.width+P),t.paddingTop=c.height/2,t.paddingBottom=f.height/2}}t.handleMargins(),u?(t.width=t._length=n.width-t.margins.left-t.margins.right,t.height=e.height):(t.width=e.width,t.height=t._length=n.height-t.margins.top-t.margins.bottom)},handleMargins:function(){var t=this;t.margins&&(t.margins.left=Math.max(t.paddingLeft,t.margins.left),t.margins.top=Math.max(t.paddingTop,t.margins.top),t.margins.right=Math.max(t.paddingRight,t.margins.right),t.margins.bottom=Math.max(t.paddingBottom,t.margins.bottom))},afterFit:function(){H.callback(this.options.afterFit,[this])},isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(ln(t))return NaN;if(("number"==typeof t||t instanceof Number)&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},_convertTicksToLabels:function(t){var e,n,i,a=this;for(a.ticks=t.map((function(t){return t.value})),a.beforeTickToLabelConversion(),e=a.convertTicksToLabels(t)||a.ticks,a.afterTickToLabelConversion(),n=0,i=t.length;n<i;++n)t[n].label=e[n];return e},_getLabelSizes:function(){var t=this,e=t._labelSizes;return e||(t._labelSizes=e=cn(t.ctx,mn(t.options.ticks),t.getTicks(),t.longestTextCache),t.longestLabelWidth=e.widest.width),e},_parseValue:function(t){var e,n,i,a;return sn(t)?(e=+this.getRightValue(t[0]),n=+this.getRightValue(t[1]),i=Math.min(e,n),a=Math.max(e,n)):(e=void 0,n=t=+this.getRightValue(t),i=t,a=t),{min:i,max:a,start:e,end:n}},_getScaleLabel:function(t){var e=this._parseValue(t);return void 0!==e.start?"["+e.start+", "+e.end+"]":+this.getRightValue(t)},getLabelForIndex:H.noop,getPixelForValue:H.noop,getValueForPixel:H.noop,getPixelForTick:function(t){var e=this.options.offset,n=this._ticks.length,i=1/Math.max(n-(e?0:1),1);return t<0||t>n-1?null:this.getPixelForDecimal(t*i+(e?i/2:0))},getPixelForDecimal:function(t){return this._reversePixels&&(t=1-t),this._startPixel+t*this._length},getDecimalForPixel:function(t){var e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:t>0&&e>0?t:0},_autoSkip:function(t){var e,n,i,a,r=this.options.ticks,o=this._length,s=r.maxTicksLimit||o/this._tickSize()+1,l=r.major.enabled?function(t){var e,n,i=[];for(e=0,n=t.length;e<n;e++)t[e].major&&i.push(e);return i}(t):[],u=l.length,d=l[0],h=l[u-1];if(u>s)return function(t,e,n){var i,a,r=0,o=e[0];for(n=Math.ceil(n),i=0;i<t.length;i++)a=t[i],i===o?(a._index=i,o=e[++r*n]):delete a.label}(t,l,u/s),vn(t);if(i=function(t,e,n,i){var a,r,o,s,l=function(t){var e,n,i=t.length;if(i<2)return!1;for(n=t[0],e=1;e<i;++e)if(t[e]-t[e-1]!==n)return!1;return n}(t),u=(e.length-1)/i;if(!l)return Math.max(u,1);for(o=0,s=(a=H.math._factorize(l)).length-1;o<s;o++)if((r=a[o])>u)return r;return Math.max(u,1)}(l,t,0,s),u>0){for(e=0,n=u-1;e<n;e++)bn(t,i,l[e],l[e+1]);return a=u>1?(h-d)/(u-1):null,bn(t,i,H.isNullOrUndef(a)?0:d-a,d),bn(t,i,h,H.isNullOrUndef(a)?t.length:h+a),vn(t)}return bn(t,i),vn(t)},_tickSize:function(){var t=this.options.ticks,e=H.toRadians(this.labelRotation),n=Math.abs(Math.cos(e)),i=Math.abs(Math.sin(e)),a=this._getLabelSizes(),r=t.autoSkipPadding||0,o=a?a.widest.width+r:0,s=a?a.highest.height+r:0;return this.isHorizontal()?s*n>o*i?o/n:s/i:s*i<o*n?s/n:o/i},_isVisible:function(){var t,e,n,i=this.chart,a=this.options.display;if("auto"!==a)return!!a;for(t=0,e=i.data.datasets.length;t<e;++t)if(i.isDatasetVisible(t)&&((n=i.getDatasetMeta(t)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(t){var e,n,i,a,r,o,s,l,u,d,h,c,f,g,p,m,v,b=this,x=b.chart,y=b.options,_=y.gridLines,k=y.position,w=_.offsetGridLines,M=b.isHorizontal(),S=b._ticksToDraw,C=S.length+(w?1:0),P=fn(_),A=[],D=_.drawBorder?dn(_.lineWidth,0,0):0,T=D/2,I=H._alignPixel,F=function(t){return I(x,t,D)};for("top"===k?(e=F(b.bottom),s=b.bottom-P,u=e-T,h=F(t.top)+T,f=t.bottom):"bottom"===k?(e=F(b.top),h=t.top,f=F(t.bottom)-T,s=e+T,u=b.top+P):"left"===k?(e=F(b.right),o=b.right-P,l=e-T,d=F(t.left)+T,c=t.right):(e=F(b.left),d=t.left,c=F(t.right)-T,o=e+T,l=b.left+P),n=0;n<C;++n)i=S[n]||{},ln(i.label)&&n<S.length||(n===b.zeroLineIndex&&y.offset===w?(g=_.zeroLineWidth,p=_.zeroLineColor,m=_.zeroLineBorderDash||[],v=_.zeroLineBorderDashOffset||0):(g=dn(_.lineWidth,n,1),p=dn(_.color,n,"rgba(0,0,0,0.1)"),m=_.borderDash||[],v=_.borderDashOffset||0),void 0!==(a=hn(b,i._index||n,w))&&(r=I(x,a,g),M?o=l=d=c=r:s=u=h=f=r,A.push({tx1:o,ty1:s,tx2:l,ty2:u,x1:d,y1:h,x2:c,y2:f,width:g,color:p,borderDash:m,borderDashOffset:v})));return A.ticksLength=C,A.borderValue=e,A},_computeLabelItems:function(){var t,e,n,i,a,r,o,s,l,u,d,h,c=this,f=c.options,g=f.ticks,p=f.position,m=g.mirror,v=c.isHorizontal(),b=c._ticksToDraw,x=mn(g),y=g.padding,_=fn(f.gridLines),k=-H.toRadians(c.labelRotation),w=[];for("top"===p?(r=c.bottom-_-y,o=k?"left":"center"):"bottom"===p?(r=c.top+_+y,o=k?"right":"center"):"left"===p?(a=c.right-(m?0:_)-y,o=m?"left":"right"):(a=c.left+(m?0:_)+y,o=m?"right":"left"),t=0,e=b.length;t<e;++t)i=(n=b[t]).label,ln(i)||(s=c.getPixelForTick(n._index||t)+g.labelOffset,u=(l=n.major?x.major:x.minor).lineHeight,d=sn(i)?i.length:1,v?(a=s,h="top"===p?((k?1:.5)-d)*u:(k?0:.5)*u):(r=s,h=(1-d)*u/2),w.push({x:a,y:r,rotation:k,label:i,font:l,textOffset:h,textAlign:o}));return w},_drawGrid:function(t){var e=this,n=e.options.gridLines;if(n.display){var i,a,r,o,s,l=e.ctx,u=e.chart,d=H._alignPixel,h=n.drawBorder?dn(n.lineWidth,0,0):0,c=e._gridLineItems||(e._gridLineItems=e._computeGridLineItems(t));for(r=0,o=c.length;r<o;++r)i=(s=c[r]).width,a=s.color,i&&a&&(l.save(),l.lineWidth=i,l.strokeStyle=a,l.setLineDash&&(l.setLineDash(s.borderDash),l.lineDashOffset=s.borderDashOffset),l.beginPath(),n.drawTicks&&(l.moveTo(s.tx1,s.ty1),l.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(l.moveTo(s.x1,s.y1),l.lineTo(s.x2,s.y2)),l.stroke(),l.restore());if(h){var f,g,p,m,v=h,b=dn(n.lineWidth,c.ticksLength-1,1),x=c.borderValue;e.isHorizontal()?(f=d(u,e.left,v)-v/2,g=d(u,e.right,b)+b/2,p=m=x):(p=d(u,e.top,v)-v/2,m=d(u,e.bottom,b)+b/2,f=g=x),l.lineWidth=h,l.strokeStyle=dn(n.color,0),l.beginPath(),l.moveTo(f,p),l.lineTo(g,m),l.stroke()}}},_drawLabels:function(){var t=this;if(t.options.ticks.display){var e,n,i,a,r,o,s,l,u=t.ctx,d=t._labelItems||(t._labelItems=t._computeLabelItems());for(e=0,i=d.length;e<i;++e){if(o=(r=d[e]).font,u.save(),u.translate(r.x,r.y),u.rotate(r.rotation),u.font=o.string,u.fillStyle=o.color,u.textBaseline="middle",u.textAlign=r.textAlign,s=r.label,l=r.textOffset,sn(s))for(n=0,a=s.length;n<a;++n)u.fillText(""+s[n],0,l),l+=o.lineHeight;else u.fillText(s,0,l);u.restore()}}},_drawTitle:function(){var t=this,e=t.ctx,n=t.options,i=n.scaleLabel;if(i.display){var a,r,o=un(i.fontColor,N.global.defaultFontColor),s=H.options._parseFont(i),l=H.options.toPadding(i.padding),u=s.lineHeight/2,d=n.position,h=0;if(t.isHorizontal())a=t.left+t.width/2,r="bottom"===d?t.bottom-u-l.bottom:t.top+u+l.top;else{var c="left"===d;a=c?t.left+u+l.top:t.right-u-l.top,r=t.top+t.height/2,h=c?-.5*Math.PI:.5*Math.PI}e.save(),e.translate(a,r),e.rotate(h),e.textAlign="center",e.textBaseline="middle",e.fillStyle=o,e.font=s.string,e.fillText(i.labelString,0,0),e.restore()}},draw:function(t){this._isVisible()&&(this._drawGrid(t),this._drawTitle(),this._drawLabels())},_layers:function(){var t=this,e=t.options,n=e.ticks&&e.ticks.z||0,i=e.gridLines&&e.gridLines.z||0;return t._isVisible()&&n!==i&&t.draw===t._draw?[{z:i,draw:function(){t._drawGrid.apply(t,arguments),t._drawTitle.apply(t,arguments)}},{z:n,draw:function(){t._drawLabels.apply(t,arguments)}}]:[{z:n,draw:function(){t.draw.apply(t,arguments)}}]},_getMatchingVisibleMetas:function(t){var e=this,n=e.isHorizontal();return e.chart._getSortedVisibleDatasetMetas().filter((function(i){return(!t||i.type===t)&&(n?i.xAxisID===e.id:i.yAxisID===e.id)}))}});xn.prototype._draw=xn.prototype.draw;var yn=xn,_n=H.isNullOrUndef,kn=yn.extend({determineDataLimits:function(){var t,e=this,n=e._getLabels(),i=e.options.ticks,a=i.min,r=i.max,o=0,s=n.length-1;void 0!==a&&(t=n.indexOf(a))>=0&&(o=t),void 0!==r&&(t=n.indexOf(r))>=0&&(s=t),e.minIndex=o,e.maxIndex=s,e.min=n[o],e.max=n[s]},buildTicks:function(){var t=this._getLabels(),e=this.minIndex,n=this.maxIndex;this.ticks=0===e&&n===t.length-1?t:t.slice(e,n+1)},getLabelForIndex:function(t,e){var n=this.chart;return n.getDatasetMeta(e).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[e].data[t]):this._getLabels()[t]},_configure:function(){var t=this,e=t.options.offset,n=t.ticks;yn.prototype._configure.call(t),t.isHorizontal()||(t._reversePixels=!t._reversePixels),n&&(t._startValue=t.minIndex-(e?.5:0),t._valueRange=Math.max(n.length-(e?0:1),1))},getPixelForValue:function(t,e,n){var i,a,r,o=this;return _n(e)||_n(n)||(t=o.chart.data.datasets[n].data[e]),_n(t)||(i=o.isHorizontal()?t.x:t.y),(void 0!==i||void 0!==t&&isNaN(e))&&(a=o._getLabels(),t=H.valueOrDefault(i,t),e=-1!==(r=a.indexOf(t))?r:e,isNaN(e)&&(e=t)),o.getPixelForDecimal((e-o._startValue)/o._valueRange)},getPixelForTick:function(t){var e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t],t+this.minIndex)},getValueForPixel:function(t){var e=Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange);return Math.min(Math.max(e,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),wn={position:"bottom"};kn._defaults=wn;var Mn=H.noop,Sn=H.isNullOrUndef;var Cn=yn.extend({getRightValue:function(t){return"string"==typeof t?+t:yn.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=H.sign(t.min),i=H.sign(t.max);n<0&&i<0?t.max=0:n>0&&i>0&&(t.min=0)}var a=void 0!==e.min||void 0!==e.suggestedMin,r=void 0!==e.max||void 0!==e.suggestedMax;void 0!==e.min?t.min=e.min:void 0!==e.suggestedMin&&(null===t.min?t.min=e.suggestedMin:t.min=Math.min(t.min,e.suggestedMin)),void 0!==e.max?t.max=e.max:void 0!==e.suggestedMax&&(null===t.max?t.max=e.suggestedMax:t.max=Math.max(t.max,e.suggestedMax)),a!==r&&t.min>=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:function(){var t,e=this.options.ticks,n=e.stepSize,i=e.maxTicksLimit;return n?t=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(t=this._computeTickLimit(),i=i||11),i&&(t=Math.min(i,t)),t},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:Mn,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,precision:e.precision,stepSize:H.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i,a,r,o=[],s=t.stepSize,l=s||1,u=t.maxTicks-1,d=t.min,h=t.max,c=t.precision,f=e.min,g=e.max,p=H.niceNum((g-f)/u/l)*l;if(p<1e-14&&Sn(d)&&Sn(h))return[f,g];(r=Math.ceil(g/p)-Math.floor(f/p))>u&&(p=H.niceNum(r*p/u/l)*l),s||Sn(c)?n=Math.pow(10,H._decimalPlaces(p)):(n=Math.pow(10,c),p=Math.ceil(p*n)/n),i=Math.floor(f/p)*p,a=Math.ceil(g/p)*p,s&&(!Sn(d)&&H.almostWhole(d/p,p/1e3)&&(i=d),!Sn(h)&&H.almostWhole(h/p,p/1e3)&&(a=h)),r=(a-i)/p,r=H.almostEquals(r,Math.round(r),p/1e3)?Math.round(r):Math.ceil(r),i=Math.round(i*n)/n,a=Math.round(a*n)/n,o.push(Sn(d)?i:d);for(var m=1;m<r;++m)o.push(Math.round((i+m*p)*n)/n);return o.push(Sn(h)?a:h),o}(i,t);t.handleDirectionalChanges(),t.max=H.max(a),t.min=H.min(a),e.reverse?(a.reverse(),t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max)},convertTicksToLabels:function(){var t=this;t.ticksAsNumbers=t.ticks.slice(),t.zeroLineIndex=t.ticks.indexOf(0),yn.prototype.convertTicksToLabels.call(t)},_configure:function(){var t,e=this,n=e.getTicks(),i=e.min,a=e.max;yn.prototype._configure.call(e),e.options.offset&&n.length&&(i-=t=(a-i)/Math.max(n.length-1,1)/2,a+=t),e._startValue=i,e._endValue=a,e._valueRange=a-i}}),Pn={position:"left",ticks:{callback:on.formatters.linear}};function An(t,e,n,i){var a,r,o=t.options,s=function(t,e,n){var i=[n.type,void 0===e&&void 0===n.stack?n.index:"",n.stack].join(".");return void 0===t[i]&&(t[i]={pos:[],neg:[]}),t[i]}(e,o.stacked,n),l=s.pos,u=s.neg,d=i.length;for(a=0;a<d;++a)r=t._parseValue(i[a]),isNaN(r.min)||isNaN(r.max)||n.data[a].hidden||(l[a]=l[a]||0,u[a]=u[a]||0,o.relativePoints?l[a]=100:r.min<0||r.max<0?u[a]+=r.min:l[a]+=r.max)}function Dn(t,e,n){var i,a,r=n.length;for(i=0;i<r;++i)a=t._parseValue(n[i]),isNaN(a.min)||isNaN(a.max)||e.data[i].hidden||(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}var Tn=Cn.extend({determineDataLimits:function(){var t,e,n,i,a=this,r=a.options,o=a.chart.data.datasets,s=a._getMatchingVisibleMetas(),l=r.stacked,u={},d=s.length;if(a.min=Number.POSITIVE_INFINITY,a.max=Number.NEGATIVE_INFINITY,void 0===l)for(t=0;!l&&t<d;++t)l=void 0!==(e=s[t]).stack;for(t=0;t<d;++t)n=o[(e=s[t]).index].data,l?An(a,u,e,n):Dn(a,e,n);H.each(u,(function(t){i=t.pos.concat(t.neg),a.min=Math.min(a.min,H.min(i)),a.max=Math.max(a.max,H.max(i))})),a.min=H.isFinite(a.min)&&!isNaN(a.min)?a.min:0,a.max=H.isFinite(a.max)&&!isNaN(a.max)?a.max:1,a.handleTickRangeOptions()},_computeTickLimit:function(){var t;return this.isHorizontal()?Math.ceil(this.width/40):(t=H.options._parseFont(this.options.ticks),Math.ceil(this.height/t.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){return this.getPixelForDecimal((+this.getRightValue(t)-this._startValue)/this._valueRange)},getValueForPixel:function(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange},getPixelForTick:function(t){var e=this.ticksAsNumbers;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])}}),In=Pn;Tn._defaults=In;var Fn=H.valueOrDefault,On=H.math.log10;var Ln={position:"left",ticks:{callback:on.formatters.logarithmic}};function Rn(t,e){return H.isFinite(t)&&t>=0?t:e}var zn=yn.extend({determineDataLimits:function(){var t,e,n,i,a,r,o=this,s=o.options,l=o.chart,u=l.data.datasets,d=o.isHorizontal();function h(t){return d?t.xAxisID===o.id:t.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var c=s.stacked;if(void 0===c)for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e)&&void 0!==e.stack){c=!0;break}if(s.stacked||c){var f={};for(t=0;t<u.length;t++){var g=[(e=l.getDatasetMeta(t)).type,void 0===s.stacked&&void 0===e.stack?t:"",e.stack].join(".");if(l.isDatasetVisible(t)&&h(e))for(void 0===f[g]&&(f[g]=[]),a=0,r=(i=u[t].data).length;a<r;a++){var p=f[g];n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(p[a]=p[a]||0,p[a]+=n.max)}}H.each(f,(function(t){if(t.length>0){var e=H.min(t),n=H.max(t);o.min=Math.min(o.min,e),o.max=Math.max(o.max,n)}}))}else for(t=0;t<u.length;t++)if(e=l.getDatasetMeta(t),l.isDatasetVisible(t)&&h(e))for(a=0,r=(i=u[t].data).length;a<r;a++)n=o._parseValue(i[a]),isNaN(n.min)||isNaN(n.max)||e.data[a].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=H.isFinite(o.min)?o.min:null,o.max=H.isFinite(o.max)?o.max:null,o.minNotZero=H.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;t.min=Rn(e.min,t.min),t.max=Rn(e.max,t.max),t.min===t.max&&(0!==t.min&&null!==t.min?(t.min=Math.pow(10,Math.floor(On(t.min))-1),t.max=Math.pow(10,Math.floor(On(t.max))+1)):(t.min=1,t.max=10)),null===t.min&&(t.min=Math.pow(10,Math.floor(On(t.max))-1)),null===t.max&&(t.max=0!==t.min?Math.pow(10,Math.floor(On(t.min))+1):10),null===t.minNotZero&&(t.min>0?t.minNotZero=t.min:t.max<1?t.minNotZero=Math.pow(10,Math.floor(On(t.max))):t.minNotZero=1)},buildTicks:function(){var t=this,e=t.options.ticks,n=!t.isHorizontal(),i={min:Rn(e.min),max:Rn(e.max)},a=t.ticks=function(t,e){var n,i,a=[],r=Fn(t.min,Math.pow(10,Math.floor(On(e.min)))),o=Math.floor(On(e.max)),s=Math.ceil(e.max/Math.pow(10,o));0===r?(n=Math.floor(On(e.minNotZero)),i=Math.floor(e.minNotZero/Math.pow(10,n)),a.push(r),r=i*Math.pow(10,n)):(n=Math.floor(On(r)),i=Math.floor(r/Math.pow(10,n)));var l=n<0?Math.pow(10,Math.abs(n)):1;do{a.push(r),10===++i&&(i=1,l=++n>=0?1:l),r=Math.round(i*Math.pow(10,n)*l)/l}while(n<o||n===o&&i<s);var u=Fn(t.max,r);return a.push(u),a}(i,t);t.max=H.max(a),t.min=H.min(a),e.reverse?(n=!n,t.start=t.max,t.end=t.min):(t.start=t.min,t.end=t.max),n&&a.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),yn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(t,e){return this._getScaleLabel(this.chart.data.datasets[e].data[t])},getPixelForTick:function(t){var e=this.tickValues;return t<0||t>e.length-1?null:this.getPixelForValue(e[t])},_getFirstTickValue:function(t){var e=Math.floor(On(t));return Math.floor(t/Math.pow(10,e))*Math.pow(10,e)},_configure:function(){var t=this,e=t.min,n=0;yn.prototype._configure.call(t),0===e&&(e=t._getFirstTickValue(t.minNotZero),n=Fn(t.options.ticks.fontSize,N.global.defaultFontSize)/t._length),t._startValue=On(e),t._valueOffset=n,t._valueRange=(On(t.max)-On(e))/(1-n)},getPixelForValue:function(t){var e=this,n=0;return(t=+e.getRightValue(t))>e.min&&t>0&&(n=(On(t)-e._startValue)/e._valueRange+e._valueOffset),e.getPixelForDecimal(n)},getValueForPixel:function(t){var e=this,n=e.getDecimalForPixel(t);return 0===n&&0===e.min?0:Math.pow(10,e._startValue+(n-e._valueOffset)*e._valueRange)}}),Nn=Ln;zn._defaults=Nn;var Bn=H.valueOrDefault,En=H.valueAtIndexOrDefault,Wn=H.options.resolve,Vn={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:on.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(t){return t}}};function Hn(t){var e=t.ticks;return e.display&&t.display?Bn(e.fontSize,N.global.defaultFontSize)+2*e.backdropPaddingY:0}function jn(t,e,n,i,a){return t===i||t===a?{start:e-n/2,end:e+n/2}:t<i||t>a?{start:e-n,end:e}:{start:e,end:e+n}}function qn(t){return 0===t||180===t?"center":t<180?"left":"right"}function Un(t,e,n,i){var a,r,o=n.y+i/2;if(H.isArray(e))for(a=0,r=e.length;a<r;++a)t.fillText(e[a],n.x,o),o+=i;else t.fillText(e,n.x,o)}function Yn(t,e,n){90===t||270===t?n.y-=e.h/2:(t>270||t<90)&&(n.y-=e.h)}function Gn(t){return H.isNumber(t)?t:0}var Xn=Cn.extend({setDimensions:function(){var t=this;t.width=t.maxWidth,t.height=t.maxHeight,t.paddingTop=Hn(t.options)/2,t.xCenter=Math.floor(t.width/2),t.yCenter=Math.floor((t.height-t.paddingTop)/2),t.drawingArea=Math.min(t.height-t.paddingTop,t.width)/2},determineDataLimits:function(){var t=this,e=t.chart,n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;H.each(e.data.datasets,(function(a,r){if(e.isDatasetVisible(r)){var o=e.getDatasetMeta(r);H.each(a.data,(function(e,a){var r=+t.getRightValue(e);isNaN(r)||o.data[a].hidden||(n=Math.min(r,n),i=Math.max(r,i))}))}})),t.min=n===Number.POSITIVE_INFINITY?0:n,t.max=i===Number.NEGATIVE_INFINITY?0:i,t.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Hn(this.options))},convertTicksToLabels:function(){var t=this;Cn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map((function(){var e=H.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""}))},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},fit:function(){var t=this.options;t.display&&t.pointLabels.display?function(t){var e,n,i,a=H.options._parseFont(t.options.pointLabels),r={l:0,r:t.width,t:0,b:t.height-t.paddingTop},o={};t.ctx.font=a.string,t._pointLabelSizes=[];var s,l,u,d=t.chart.data.labels.length;for(e=0;e<d;e++){i=t.getPointPosition(e,t.drawingArea+5),s=t.ctx,l=a.lineHeight,u=t.pointLabels[e],n=H.isArray(u)?{w:H.longestText(s,s.font,u),h:u.length*l}:{w:s.measureText(u).width,h:l},t._pointLabelSizes[e]=n;var h=t.getIndexAngle(e),c=H.toDegrees(h)%360,f=jn(c,i.x,n.w,0,180),g=jn(c,i.y,n.h,90,270);f.start<r.l&&(r.l=f.start,o.l=h),f.end>r.r&&(r.r=f.end,o.r=h),g.start<r.t&&(r.t=g.start,o.t=h),g.end>r.b&&(r.b=g.end,o.b=h)}t.setReductions(t.drawingArea,r,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(t,e,n){var i=this,a=e.l/Math.sin(n.l),r=Math.max(e.r-i.width,0)/Math.sin(n.r),o=-e.t/Math.cos(n.t),s=-Math.max(e.b-(i.height-i.paddingTop),0)/Math.cos(n.b);a=Gn(a),r=Gn(r),o=Gn(o),s=Gn(s),i.drawingArea=Math.min(Math.floor(t-(a+r)/2),Math.floor(t-(o+s)/2)),i.setCenterPoint(a,r,o,s)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-a.paddingTop-i-a.drawingArea;a.xCenter=Math.floor((o+r)/2+a.left),a.yCenter=Math.floor((s+l)/2+a.top+a.paddingTop)},getIndexAngle:function(t){var e=this.chart,n=(t*(360/e.data.labels.length)+((e.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){var e=this;if(H.isNullOrUndef(t))return NaN;var n=e.drawingArea/(e.max-e.min);return e.options.ticks.reverse?(e.max-t)*n:(t-e.min)*n},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(t){var e=this.min,n=this.max;return this.getPointPositionForValue(t||0,this.beginAtZero?0:e<0&&n<0?n:e>0&&n>0?e:0)},_drawGrid:function(){var t,e,n,i=this,a=i.ctx,r=i.options,o=r.gridLines,s=r.angleLines,l=Bn(s.lineWidth,o.lineWidth),u=Bn(s.color,o.color);if(r.pointLabels.display&&function(t){var e=t.ctx,n=t.options,i=n.pointLabels,a=Hn(n),r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=H.options._parseFont(i);e.save(),e.font=o.string,e.textBaseline="middle";for(var s=t.chart.data.labels.length-1;s>=0;s--){var l=0===s?a/2:0,u=t.getPointPosition(s,r+l+5),d=En(i.fontColor,s,N.global.defaultFontColor);e.fillStyle=d;var h=t.getIndexAngle(s),c=H.toDegrees(h);e.textAlign=qn(c),Yn(c,t._pointLabelSizes[s],u),Un(e,t.pointLabels[s],u,o.lineHeight)}e.restore()}(i),o.display&&H.each(i.ticks,(function(t,n){0!==n&&(e=i.getDistanceFromCenterForValue(i.ticksAsNumbers[n]),function(t,e,n,i){var a,r=t.ctx,o=e.circular,s=t.chart.data.labels.length,l=En(e.color,i-1),u=En(e.lineWidth,i-1);if((o||s)&&l&&u){if(r.save(),r.strokeStyle=l,r.lineWidth=u,r.setLineDash&&(r.setLineDash(e.borderDash||[]),r.lineDashOffset=e.borderDashOffset||0),r.beginPath(),o)r.arc(t.xCenter,t.yCenter,n,0,2*Math.PI);else{a=t.getPointPosition(0,n),r.moveTo(a.x,a.y);for(var d=1;d<s;d++)a=t.getPointPosition(d,n),r.lineTo(a.x,a.y)}r.closePath(),r.stroke(),r.restore()}}(i,o,e,n))})),s.display&&l&&u){for(a.save(),a.lineWidth=l,a.strokeStyle=u,a.setLineDash&&(a.setLineDash(Wn([s.borderDash,o.borderDash,[]])),a.lineDashOffset=Wn([s.borderDashOffset,o.borderDashOffset,0])),t=i.chart.data.labels.length-1;t>=0;t--)e=i.getDistanceFromCenterForValue(r.ticks.reverse?i.min:i.max),n=i.getPointPosition(t,e),a.beginPath(),a.moveTo(i.xCenter,i.yCenter),a.lineTo(n.x,n.y),a.stroke();a.restore()}},_drawLabels:function(){var t=this,e=t.ctx,n=t.options.ticks;if(n.display){var i,a,r=t.getIndexAngle(0),o=H.options._parseFont(n),s=Bn(n.fontColor,N.global.defaultFontColor);e.save(),e.font=o.string,e.translate(t.xCenter,t.yCenter),e.rotate(r),e.textAlign="center",e.textBaseline="middle",H.each(t.ticks,(function(r,l){(0!==l||n.reverse)&&(i=t.getDistanceFromCenterForValue(t.ticksAsNumbers[l]),n.showLabelBackdrop&&(a=e.measureText(r).width,e.fillStyle=n.backdropColor,e.fillRect(-a/2-n.backdropPaddingX,-i-o.size/2-n.backdropPaddingY,a+2*n.backdropPaddingX,o.size+2*n.backdropPaddingY)),e.fillStyle=s,e.fillText(r,0,-i))})),e.restore()}},_drawTitle:H.noop}),Kn=Vn;Xn._defaults=Kn;var Zn=H._deprecated,$n=H.options.resolve,Jn=H.valueOrDefault,Qn=Number.MIN_SAFE_INTEGER||-9007199254740991,ti=Number.MAX_SAFE_INTEGER||9007199254740991,ei={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}},ni=Object.keys(ei);function ii(t,e){return t-e}function ai(t){return H.valueOrDefault(t.time.min,t.ticks.min)}function ri(t){return H.valueOrDefault(t.time.max,t.ticks.max)}function oi(t,e,n,i){var a=function(t,e,n){for(var i,a,r,o=0,s=t.length-1;o>=0&&o<=s;){if(a=t[(i=o+s>>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]<n)o=i+1;else{if(!(a[e]>n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function si(t,e){var n=t._adapter,i=t.options.time,a=i.parser,r=a||i.format,o=e;return"function"==typeof a&&(o=a(o)),H.isFinite(o)||(o="string"==typeof r?n.parse(o,r):n.parse(o)),null!==o?+o:(a||"function"!=typeof r||(o=r(e),H.isFinite(o)||(o=n.parse(o))),o)}function li(t,e){if(H.isNullOrUndef(e))return null;var n=t.options.time,i=si(t,t.getRightValue(e));return null===i?i:(n.round&&(i=+t._adapter.startOf(i,n.round)),i)}function ui(t,e,n,i){var a,r,o,s=ni.length;for(a=ni.indexOf(t);a<s-1;++a)if(o=(r=ei[ni[a]]).steps?r.steps:ti,r.common&&Math.ceil((n-e)/(o*r.size))<=i)return ni[a];return ni[s-1]}function di(t,e,n){var i,a,r=[],o={},s=e.length;for(i=0;i<s;++i)o[a=e[i]]=i,r.push({value:a,major:!1});return 0!==s&&n?function(t,e,n,i){var a,r,o=t._adapter,s=+o.startOf(e[0].value,i),l=e[e.length-1].value;for(a=s;a<=l;a=+o.add(a,1,i))(r=n[a])>=0&&(e[r].major=!0);return e}(t,r,o,n):r}var hi=yn.extend({initialize:function(){this.mergeTicksOptions(),yn.prototype.initialize.call(this)},update:function(){var t=this,e=t.options,n=e.time||(e.time={}),i=t._adapter=new rn._date(e.adapters.date);return Zn("time scale",n.format,"time.format","time.parser"),Zn("time scale",n.min,"time.min","ticks.min"),Zn("time scale",n.max,"time.max","ticks.max"),H.mergeIf(n.displayFormats,i.formats()),yn.prototype.update.apply(t,arguments)},getRightValue:function(t){return t&&void 0!==t.t&&(t=t.t),yn.prototype.getRightValue.call(this,t)},determineDataLimits:function(){var t,e,n,i,a,r,o,s=this,l=s.chart,u=s._adapter,d=s.options,h=d.time.unit||"day",c=ti,f=Qn,g=[],p=[],m=[],v=s._getLabels();for(t=0,n=v.length;t<n;++t)m.push(li(s,v[t]));for(t=0,n=(l.data.datasets||[]).length;t<n;++t)if(l.isDatasetVisible(t))if(a=l.data.datasets[t].data,H.isObject(a[0]))for(p[t]=[],e=0,i=a.length;e<i;++e)r=li(s,a[e]),g.push(r),p[t][e]=r;else p[t]=m.slice(0),o||(g=g.concat(m),o=!0);else p[t]=[];m.length&&(c=Math.min(c,m[0]),f=Math.max(f,m[m.length-1])),g.length&&(g=n>1?function(t){var e,n,i,a={},r=[];for(e=0,n=t.length;e<n;++e)a[i=t[e]]||(a[i]=!0,r.push(i));return r}(g).sort(ii):g.sort(ii),c=Math.min(c,g[0]),f=Math.max(f,g[g.length-1])),c=li(s,ai(d))||c,f=li(s,ri(d))||f,c=c===ti?+u.startOf(Date.now(),h):c,f=f===Qn?+u.endOf(Date.now(),h)+1:f,s.min=Math.min(c,f),s.max=Math.max(c+1,f),s._table=[],s._timestamps={data:g,datasets:p,labels:m}},buildTicks:function(){var t,e,n,i=this,a=i.min,r=i.max,o=i.options,s=o.ticks,l=o.time,u=i._timestamps,d=[],h=i.getLabelCapacity(a),c=s.source,f=o.distribution;for(u="data"===c||"auto"===c&&"series"===f?u.data:"labels"===c?u.labels:function(t,e,n,i){var a,r=t._adapter,o=t.options,s=o.time,l=s.unit||ui(s.minUnit,e,n,i),u=$n([s.stepSize,s.unitStepSize,1]),d="week"===l&&s.isoWeekday,h=e,c=[];if(d&&(h=+r.startOf(h,"isoWeek",d)),h=+r.startOf(h,d?"day":l),r.diff(n,e,l)>1e5*u)throw e+" and "+n+" are too far apart with stepSize of "+u+" "+l;for(a=h;a<n;a=+r.add(a,u,l))c.push(a);return a!==n&&"ticks"!==o.bounds||c.push(a),c}(i,a,r,h),"ticks"===o.bounds&&u.length&&(a=u[0],r=u[u.length-1]),a=li(i,ai(o))||a,r=li(i,ri(o))||r,t=0,e=u.length;t<e;++t)(n=u[t])>=a&&n<=r&&d.push(n);return i.min=a,i.max=r,i._unit=l.unit||(s.autoSkip?ui(l.minUnit,i.min,i.max,h):function(t,e,n,i,a){var r,o;for(r=ni.length-1;r>=ni.indexOf(n);r--)if(o=ni[r],ei[o].common&&t._adapter.diff(a,i,o)>=e-1)return o;return ni[n?ni.indexOf(n):0]}(i,d.length,l.minUnit,i.min,i.max)),i._majorUnit=s.major.enabled&&"year"!==i._unit?function(t){for(var e=ni.indexOf(t)+1,n=ni.length;e<n;++e)if(ei[ni[e]].common)return ni[e]}(i._unit):void 0,i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;a<r;++a)(s=t[a])>e&&s<n&&d.push(s);for(d.push(n),a=0,r=d.length;a<r;++a)l=d[a+1],o=d[a-1],s=d[a],void 0!==o&&void 0!==l&&Math.round((l+o)/2)===s||u.push({time:s,pos:a/(r-1)});return u}(i._timestamps.data,a,r,f),i._offsets=function(t,e,n,i,a){var r,o,s=0,l=0;return a.offset&&e.length&&(r=oi(t,"time",e[0],"pos"),s=1===e.length?1-r:(oi(t,"time",e[1],"pos")-r)/2,o=oi(t,"time",e[e.length-1],"pos"),l=1===e.length?o:(o-oi(t,"time",e[e.length-2],"pos"))/2),{start:s,end:l,factor:1/(s+1+l)}}(i._table,d,0,0,o),s.reverse&&d.reverse(),di(i,d,i._majorUnit)},getLabelForIndex:function(t,e){var n=this,i=n._adapter,a=n.chart.data,r=n.options.time,o=a.labels&&t<a.labels.length?a.labels[t]:"",s=a.datasets[e].data[t];return H.isObject(s)&&(o=n.getRightValue(s)),r.tooltipFormat?i.format(si(n,o),r.tooltipFormat):"string"==typeof o?o:i.format(si(n,o),r.displayFormats.datetime)},tickFormatFunction:function(t,e,n,i){var a=this._adapter,r=this.options,o=r.time.displayFormats,s=o[this._unit],l=this._majorUnit,u=o[l],d=n[e],h=r.ticks,c=l&&u&&d&&d.major,f=a.format(t,i||(c?u:s)),g=c?h.major:h.minor,p=$n([g.callback,g.userCallback,h.callback,h.userCallback]);return p?p(f,e,n):f},convertTicksToLabels:function(t){var e,n,i=[];for(e=0,n=t.length;e<n;++e)i.push(this.tickFormatFunction(t[e].value,e,t));return i},getPixelForOffset:function(t){var e=this._offsets,n=oi(this._table,"time",t,"pos");return this.getPixelForDecimal((e.start+n)*e.factor)},getPixelForValue:function(t,e,n){var i=null;if(void 0!==e&&void 0!==n&&(i=this._timestamps.datasets[n][e]),null===i&&(i=li(this,t)),null!==i)return this.getPixelForOffset(i)},getPixelForTick:function(t){var e=this.getTicks();return t>=0&&t<e.length?this.getPixelForOffset(e[t].value):null},getValueForPixel:function(t){var e=this._offsets,n=this.getDecimalForPixel(t)/e.factor-e.end,i=oi(this._table,"pos",n,"time");return this._adapter._create(i)},_getLabelSize:function(t){var e=this.options.ticks,n=this.ctx.measureText(t).width,i=H.toRadians(this.isHorizontal()?e.maxRotation:e.minRotation),a=Math.cos(i),r=Math.sin(i),o=Jn(e.fontSize,N.global.defaultFontSize);return{w:n*a+o*r,h:n*r+o*a}},getLabelWidth:function(t){return this._getLabelSize(t).w},getLabelCapacity:function(t){var e=this,n=e.options.time,i=n.displayFormats,a=i[n.unit]||i.millisecond,r=e.tickFormatFunction(t,0,di(e,[t],e._majorUnit),a),o=e._getLabelSize(r),s=Math.floor(e.isHorizontal()?e.width/o.w:e.height/o.h);return e.options.offset&&s--,s>0?s:1}}),ci={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}}};hi._defaults=ci;var fi={category:kn,linear:Tn,logarithmic:zn,radialLinear:Xn,time:hi},gi={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"};rn._date.override("function"==typeof t?{_id:"moment",formats:function(){return gi},parse:function(e,n){return"string"==typeof e&&"string"==typeof n?e=t(e,n):e instanceof t||(e=t(e)),e.isValid()?e.valueOf():null},format:function(e,n){return t(e).format(n)},add:function(e,n,i){return t(e).add(n,i).valueOf()},diff:function(e,n,i){return t(e).diff(t(n),i)},startOf:function(e,n,i){return e=t(e),"isoWeek"===n?e.isoWeekday(i).valueOf():e.startOf(n).valueOf()},endOf:function(e,n){return t(e).endOf(n).valueOf()},_create:function(e){return t(e)}}:{}),N._set("global",{plugins:{filler:{propagate:!0}}});var pi={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e<r&&a[e]._view||null}:null},boundary:function(t){var e=t.boundary,n=e?e.x:null,i=e?e.y:null;return H.isArray(e)?function(t,n){return e[n]}:function(t){return{x:null===n?t.x:n,y:null===i?t.y:i}}}};function mi(t,e,n){var i,a=t._model||{},r=a.fill;if(void 0===r&&(r=!!a.backgroundColor),!1===r||null===r)return!1;if(!0===r)return"origin";if(i=parseFloat(r,10),isFinite(i)&&Math.floor(i)===i)return"-"!==r[0]&&"+"!==r[0]||(i=e+i),!(i===e||i<0||i>=n)&&i;switch(r){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return r;default:return!1}}function vi(t){return(t.el._scale||{}).getPointPositionForValue?function(t){var e,n,i,a,r,o=t.el._scale,s=o.options,l=o.chart.data.labels.length,u=t.fill,d=[];if(!l)return null;for(e=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,i=o.getPointPositionForValue(0,e),a=0;a<l;++a)r="start"===u||"end"===u?o.getPointPositionForValue(a,"start"===u?e:n):o.getBasePosition(a),s.gridLines.circular&&(r.cx=i.x,r.cy=i.y,r.angle=o.getIndexAngle(a)-Math.PI/2),d.push(r);return d}(t):function(t){var e,n=t.el._model||{},i=t.el._scale||{},a=t.fill,r=null;if(isFinite(a))return null;if("start"===a?r=void 0===n.scaleBottom?i.bottom:n.scaleBottom:"end"===a?r=void 0===n.scaleTop?i.top:n.scaleTop:void 0!==n.scaleZero?r=n.scaleZero:i.getBasePixel&&(r=i.getBasePixel()),null!=r){if(void 0!==r.x&&void 0!==r.y)return r;if(H.isFinite(r))return{x:(e=i.isHorizontal())?r:null,y:e?null:r}}return null}(t)}function bi(t,e,n){var i,a=t[e].fill,r=[e];if(!n)return a;for(;!1!==a&&-1===r.indexOf(a);){if(!isFinite(a))return a;if(!(i=t[a]))return!1;if(i.visible)return a;r.push(a),a=i.fill}return!1}function xi(t){var e=t.fill,n="dataset";return!1===e?null:(isFinite(e)||(n="boundary"),pi[n](t))}function yi(t){return t&&!t.skip}function _i(t,e,n,i,a){var r,o,s,l;if(i&&a){for(t.moveTo(e[0].x,e[0].y),r=1;r<i;++r)H.canvas.lineTo(t,e[r-1],e[r]);if(void 0===n[0].angle)for(t.lineTo(n[a-1].x,n[a-1].y),r=a-1;r>0;--r)H.canvas.lineTo(t,n[r],n[r-1],!0);else for(o=n[0].cx,s=n[0].cy,l=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),r=a-1;r>0;--r)t.arc(o,s,l,n[r].angle,n[r-1].angle,!0)}}function ki(t,e,n,i,a,r){var o,s,l,u,d,h,c,f,g=e.length,p=i.spanGaps,m=[],v=[],b=0,x=0;for(t.beginPath(),o=0,s=g;o<s;++o)d=n(u=e[l=o%g]._view,l,i),h=yi(u),c=yi(d),r&&void 0===f&&h&&(s=g+(f=o+1)),h&&c?(b=m.push(u),x=v.push(d)):b&&x&&(p?(h&&m.push(u),c&&v.push(d)):(_i(t,m,v,b,x),b=x=0,m=[],v=[]));_i(t,m,v,b,x),t.closePath(),t.fillStyle=a,t.fill()}var wi={id:"filler",afterDatasetsUpdate:function(t,e){var n,i,a,r,o=(t.data.datasets||[]).length,s=e.propagate,l=[];for(i=0;i<o;++i)r=null,(a=(n=t.getDatasetMeta(i)).dataset)&&a._model&&a instanceof kt.Line&&(r={visible:t.isDatasetVisible(i),fill:mi(a,i,o),chart:t,el:a}),n.$filler=r,l.push(r);for(i=0;i<o;++i)(r=l[i])&&(r.fill=bi(l,i,s),r.boundary=vi(r),r.mapper=xi(r))},beforeDatasetsDraw:function(t){var e,n,i,a,r,o,s,l=t._getSortedVisibleDatasetMetas(),u=t.ctx;for(n=l.length-1;n>=0;--n)(e=l[n].$filler)&&e.visible&&(a=(i=e.el)._view,r=i._children||[],o=e.mapper,s=a.backgroundColor||N.global.defaultColor,o&&s&&r.length&&(H.canvas.clipArea(u,t.chartArea),ki(u,r,o,a,s,i._loop),H.canvas.unclipArea(u)))}},Mi=H.rtl.getRtlAdapter,Si=H.noop,Ci=H.valueOrDefault;function Pi(t,e){return t.usePointStyle&&t.boxWidth>e?e:t.boxWidth}N._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(t,e){var n=e.datasetIndex,i=this.chart,a=i.getDatasetMeta(n);a.hidden=null===a.hidden?!i.data.datasets[n].hidden:null,i.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(t){var e=t.data.datasets,n=t.options.legend||{},i=n.labels&&n.labels.usePointStyle;return t._getSortedDatasetMetas().map((function(n){var a=n.controller.getStyle(i?0:void 0);return{text:e[n.index].label,fillStyle:a.backgroundColor,hidden:!t.isDatasetVisible(n.index),lineCap:a.borderCapStyle,lineDash:a.borderDash,lineDashOffset:a.borderDashOffset,lineJoin:a.borderJoinStyle,lineWidth:a.borderWidth,strokeStyle:a.borderColor,pointStyle:a.pointStyle,rotation:a.rotation,datasetIndex:n.index}}),this)}}},legendCallback:function(t){var e,n,i,a=document.createElement("ul"),r=t.data.datasets;for(a.setAttribute("class",t.id+"-legend"),e=0,n=r.length;e<n;e++)(i=a.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=r[e].backgroundColor,r[e].label&&i.appendChild(document.createTextNode(r[e].label));return a.outerHTML}});var Ai=K.extend({initialize:function(t){H.extend(this,t),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:Si,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Si,beforeSetDimensions:Si,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Si,beforeBuildLabels:Si,buildLabels:function(){var t=this,e=t.options.labels||{},n=H.callback(e.generateLabels,[t.chart],t)||[];e.filter&&(n=n.filter((function(n){return e.filter(n,t.chart.data)}))),t.options.reverse&&n.reverse(),t.legendItems=n},afterBuildLabels:Si,beforeFit:Si,fit:function(){var t=this,e=t.options,n=e.labels,i=e.display,a=t.ctx,r=H.options._parseFont(n),o=r.size,s=t.legendHitBoxes=[],l=t.minSize,u=t.isHorizontal();if(u?(l.width=t.maxWidth,l.height=i?10:0):(l.width=i?10:0,l.height=t.maxHeight),i){if(a.font=r.string,u){var d=t.lineWidths=[0],h=0;a.textAlign="left",a.textBaseline="middle",H.each(t.legendItems,(function(t,e){var i=Pi(n,o)+o/2+a.measureText(t.text).width;(0===e||d[d.length-1]+i+2*n.padding>l.width)&&(h+=o+n.padding,d[d.length-(e>0?0:1)]=0),s[e]={left:0,top:0,width:i,height:o},d[d.length-1]+=i+n.padding})),l.height+=h}else{var c=n.padding,f=t.columnWidths=[],g=t.columnHeights=[],p=n.padding,m=0,v=0;H.each(t.legendItems,(function(t,e){var i=Pi(n,o)+o/2+a.measureText(t.text).width;e>0&&v+o+2*c>l.height&&(p+=m+n.padding,f.push(m),g.push(v),m=0,v=0),m=Math.max(m,i),v+=o+c,s[e]={left:0,top:0,width:i,height:o}})),p+=m,f.push(m),g.push(v),l.width+=p}t.width=l.width,t.height=l.height}else t.width=l.width=t.height=l.height=0},afterFit:Si,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var t=this,e=t.options,n=e.labels,i=N.global,a=i.defaultColor,r=i.elements.line,o=t.height,s=t.columnHeights,l=t.width,u=t.lineWidths;if(e.display){var d,h=Mi(e.rtl,t.left,t.minSize.width),c=t.ctx,f=Ci(n.fontColor,i.defaultFontColor),g=H.options._parseFont(n),p=g.size;c.textAlign=h.textAlign("left"),c.textBaseline="middle",c.lineWidth=.5,c.strokeStyle=f,c.fillStyle=f,c.font=g.string;var m=Pi(n,p),v=t.legendHitBoxes,b=function(t,i){switch(e.align){case"start":return n.padding;case"end":return t-i;default:return(t-i+n.padding)/2}},x=t.isHorizontal();d=x?{x:t.left+b(l,u[0]),y:t.top+n.padding,line:0}:{x:t.left+n.padding,y:t.top+b(o,s[0]),line:0},H.rtl.overrideTextDirection(t.ctx,e.textDirection);var y=p+n.padding;H.each(t.legendItems,(function(e,i){var f=c.measureText(e.text).width,g=m+p/2+f,_=d.x,k=d.y;h.setWidth(t.minSize.width),x?i>0&&_+g+n.padding>t.left+t.minSize.width&&(k=d.y+=y,d.line++,_=d.x=t.left+b(l,u[d.line])):i>0&&k+y>t.top+t.minSize.height&&(_=d.x=_+t.columnWidths[d.line]+n.padding,d.line++,k=d.y=t.top+b(o,s[d.line]));var w=h.x(_);!function(t,e,i){if(!(isNaN(m)||m<=0)){c.save();var o=Ci(i.lineWidth,r.borderWidth);if(c.fillStyle=Ci(i.fillStyle,a),c.lineCap=Ci(i.lineCap,r.borderCapStyle),c.lineDashOffset=Ci(i.lineDashOffset,r.borderDashOffset),c.lineJoin=Ci(i.lineJoin,r.borderJoinStyle),c.lineWidth=o,c.strokeStyle=Ci(i.strokeStyle,a),c.setLineDash&&c.setLineDash(Ci(i.lineDash,r.borderDash)),n&&n.usePointStyle){var s=m*Math.SQRT2/2,l=h.xPlus(t,m/2),u=e+p/2;H.canvas.drawPoint(c,i.pointStyle,s,l,u,i.rotation)}else c.fillRect(h.leftForLtr(t,m),e,m,p),0!==o&&c.strokeRect(h.leftForLtr(t,m),e,m,p);c.restore()}}(w,k,e),v[i].left=h.leftForLtr(w,v[i].width),v[i].top=k,function(t,e,n,i){var a=p/2,r=h.xPlus(t,m+a),o=e+a;c.fillText(n.text,r,o),n.hidden&&(c.beginPath(),c.lineWidth=2,c.moveTo(r,o),c.lineTo(h.xPlus(r,i),o),c.stroke())}(w,k,e,f),x?d.x+=g+n.padding:d.y+=y})),H.rtl.restoreTextDirection(t.ctx,e.textDirection)}},_getLegendItemAt:function(t,e){var n,i,a,r=this;if(t>=r.left&&t<=r.right&&e>=r.top&&e<=r.bottom)for(a=r.legendHitBoxes,n=0;n<a.length;++n)if(t>=(i=a[n]).left&&t<=i.left+i.width&&e>=i.top&&e<=i.top+i.height)return r.legendItems[n];return null},handleEvent:function(t){var e,n=this,i=n.options,a="mouseup"===t.type?"click":t.type;if("mousemove"===a){if(!i.onHover&&!i.onLeave)return}else{if("click"!==a)return;if(!i.onClick)return}e=n._getLegendItemAt(t.x,t.y),"click"===a?e&&i.onClick&&i.onClick.call(n,t.native,e):(i.onLeave&&e!==n._hoveredItem&&(n._hoveredItem&&i.onLeave.call(n,t.native,n._hoveredItem),n._hoveredItem=e),i.onHover&&e&&i.onHover.call(n,t.native,e))}});function Di(t,e){var n=new Ai({ctx:t.ctx,options:e,chart:t});pe.configure(t,n,e),pe.addBox(t,n),t.legend=n}var Ti={id:"legend",_element:Ai,beforeInit:function(t){var e=t.options.legend;e&&Di(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(H.mergeIf(e,N.global.legend),n?(pe.configure(t,n,e),n.options=e):Di(t,e)):n&&(pe.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}},Ii=H.noop;N._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Fi=K.extend({initialize:function(t){H.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:Ii,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:Ii,beforeSetDimensions:Ii,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:Ii,beforeBuildLabels:Ii,buildLabels:Ii,afterBuildLabels:Ii,beforeFit:Ii,fit:function(){var t,e=this,n=e.options,i=e.minSize={},a=e.isHorizontal();n.display?(t=(H.isArray(n.text)?n.text.length:1)*H.options._parseFont(n).lineHeight+2*n.padding,e.width=i.width=a?e.maxWidth:t,e.height=i.height=a?t:e.maxHeight):e.width=i.width=e.height=i.height=0},afterFit:Ii,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this,e=t.ctx,n=t.options;if(n.display){var i,a,r,o=H.options._parseFont(n),s=o.lineHeight,l=s/2+n.padding,u=0,d=t.top,h=t.left,c=t.bottom,f=t.right;e.fillStyle=H.valueOrDefault(n.fontColor,N.global.defaultFontColor),e.font=o.string,t.isHorizontal()?(a=h+(f-h)/2,r=d+l,i=f-h):(a="left"===n.position?h+l:f-l,r=d+(c-d)/2,i=c-d,u=Math.PI*("left"===n.position?-.5:.5)),e.save(),e.translate(a,r),e.rotate(u),e.textAlign="center",e.textBaseline="middle";var g=n.text;if(H.isArray(g))for(var p=0,m=0;m<g.length;++m)e.fillText(g[m],0,p,i),p+=s;else e.fillText(g,0,0,i);e.restore()}}});function Oi(t,e){var n=new Fi({ctx:t.ctx,options:e,chart:t});pe.configure(t,n,e),pe.addBox(t,n),t.titleBlock=n}var Li={},Ri=wi,zi=Ti,Ni={id:"title",_element:Fi,beforeInit:function(t){var e=t.options.title;e&&Oi(t,e)},beforeUpdate:function(t){var e=t.options.title,n=t.titleBlock;e?(H.mergeIf(e,N.global.title),n?(pe.configure(t,n,e),n.options=e):Oi(t,e)):n&&(pe.removeBox(t,n),delete t.titleBlock)}};for(var Bi in Li.filler=Ri,Li.legend=zi,Li.title=Ni,en.helpers=H,function(){function t(t,e,n){var i;return"string"==typeof t?(i=parseInt(t,10),-1!==t.indexOf("%")&&(i=i/100*e.parentNode[n])):i=t,i}function e(t){return null!=t&&"none"!==t}function n(n,i,a){var r=document.defaultView,o=H._getParentNode(n),s=r.getComputedStyle(n)[i],l=r.getComputedStyle(o)[i],u=e(s),d=e(l),h=Number.POSITIVE_INFINITY;return u||d?Math.min(u?t(s,n,a):h,d?t(l,o,a):h):"none"}H.where=function(t,e){if(H.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return H.each(t,(function(t){e(t)&&n.push(t)})),n},H.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i<a;++i)if(e.call(n,t[i],i,t))return i;return-1},H.findNextWhere=function(t,e,n){H.isNullOrUndef(n)&&(n=-1);for(var i=n+1;i<t.length;i++){var a=t[i];if(e(a))return a}},H.findPreviousWhere=function(t,e,n){H.isNullOrUndef(n)&&(n=t.length);for(var i=n-1;i>=0;i--){var a=t[i];if(e(a))return a}},H.isNumber=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},H.almostEquals=function(t,e,n){return Math.abs(t-e)<n},H.almostWhole=function(t,e){var n=Math.round(t);return n-e<=t&&n+e>=t},H.max=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.max(t,e)}),Number.NEGATIVE_INFINITY)},H.min=function(t){return t.reduce((function(t,e){return isNaN(e)?t:Math.min(t,e)}),Number.POSITIVE_INFINITY)},H.sign=Math.sign?function(t){return Math.sign(t)}:function(t){return 0===(t=+t)||isNaN(t)?t:t>0?1:-1},H.toRadians=function(t){return t*(Math.PI/180)},H.toDegrees=function(t){return t*(180/Math.PI)},H._decimalPlaces=function(t){if(H.isFinite(t)){for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}},H.getAngleFromPoint=function(t,e){var n=e.x-t.x,i=e.y-t.y,a=Math.sqrt(n*n+i*i),r=Math.atan2(i,n);return r<-.5*Math.PI&&(r+=2*Math.PI),{angle:r,distance:a}},H.distanceBetweenPoints=function(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))},H.aliasPixel=function(t){return t%2==0?0:.5},H._alignPixel=function(t,e,n){var i=t.currentDevicePixelRatio,a=n/2;return Math.round((e-a)*i)/i+a},H.splineCurve=function(t,e,n,i){var a=t.skip?e:t,r=e,o=n.skip?e:n,s=Math.sqrt(Math.pow(r.x-a.x,2)+Math.pow(r.y-a.y,2)),l=Math.sqrt(Math.pow(o.x-r.x,2)+Math.pow(o.y-r.y,2)),u=s/(s+l),d=l/(s+l),h=i*(u=isNaN(u)?0:u),c=i*(d=isNaN(d)?0:d);return{previous:{x:r.x-h*(o.x-a.x),y:r.y-h*(o.y-a.y)},next:{x:r.x+c*(o.x-a.x),y:r.y+c*(o.y-a.y)}}},H.EPSILON=Number.EPSILON||1e-14,H.splineCurveMonotone=function(t){var e,n,i,a,r,o,s,l,u,d=(t||[]).map((function(t){return{model:t._model,deltaK:0,mK:0}})),h=d.length;for(e=0;e<h;++e)if(!(i=d[e]).model.skip){if(n=e>0?d[e-1]:null,(a=e<h-1?d[e+1]:null)&&!a.model.skip){var c=a.model.x-i.model.x;i.deltaK=0!==c?(a.model.y-i.model.y)/c:0}!n||n.model.skip?i.mK=i.deltaK:!a||a.model.skip?i.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(i.deltaK)?i.mK=0:i.mK=(n.deltaK+i.deltaK)/2}for(e=0;e<h-1;++e)i=d[e],a=d[e+1],i.model.skip||a.model.skip||(H.almostEquals(i.deltaK,0,this.EPSILON)?i.mK=a.mK=0:(r=i.mK/i.deltaK,o=a.mK/i.deltaK,(l=Math.pow(r,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(l),i.mK=r*s*i.deltaK,a.mK=o*s*i.deltaK)));for(e=0;e<h;++e)(i=d[e]).model.skip||(n=e>0?d[e-1]:null,a=e<h-1?d[e+1]:null,n&&!n.model.skip&&(u=(i.model.x-n.model.x)/3,i.model.controlPointPreviousX=i.model.x-u,i.model.controlPointPreviousY=i.model.y-u*i.mK),a&&!a.model.skip&&(u=(a.model.x-i.model.x)/3,i.model.controlPointNextX=i.model.x+u,i.model.controlPointNextY=i.model.y+u*i.mK))},H.nextItem=function(t,e,n){return n?e>=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},H.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},H.niceNum=function(t,e){var n=Math.floor(H.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},H.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},H.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.target||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;s&&s.length>0?(n=s[0].clientX,i=s[0].clientY):(n=a.clientX,i=a.clientY);var l=parseFloat(H.getStyle(r,"padding-left")),u=parseFloat(H.getStyle(r,"padding-top")),d=parseFloat(H.getStyle(r,"padding-right")),h=parseFloat(H.getStyle(r,"padding-bottom")),c=o.right-o.left-l-d,f=o.bottom-o.top-u-h;return{x:n=Math.round((n-o.left-l)/c*r.width/e.currentDevicePixelRatio),y:i=Math.round((i-o.top-u)/f*r.height/e.currentDevicePixelRatio)}},H.getConstraintWidth=function(t){return n(t,"max-width","clientWidth")},H.getConstraintHeight=function(t){return n(t,"max-height","clientHeight")},H._calculatePadding=function(t,e,n){return(e=H.getStyle(t,e)).indexOf("%")>-1?n*parseInt(e,10)/100:parseInt(e,10)},H._getParentNode=function(t){var e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e},H.getMaximumWidth=function(t){var e=H._getParentNode(t);if(!e)return t.clientWidth;var n=e.clientWidth,i=n-H._calculatePadding(e,"padding-left",n)-H._calculatePadding(e,"padding-right",n),a=H.getConstraintWidth(t);return isNaN(a)?i:Math.min(i,a)},H.getMaximumHeight=function(t){var e=H._getParentNode(t);if(!e)return t.clientHeight;var n=e.clientHeight,i=n-H._calculatePadding(e,"padding-top",n)-H._calculatePadding(e,"padding-bottom",n),a=H.getConstraintHeight(t);return isNaN(a)?i:Math.min(i,a)},H.getStyle=function(t,e){return t.currentStyle?t.currentStyle[e]:document.defaultView.getComputedStyle(t,null).getPropertyValue(e)},H.retinaScale=function(t,e){var n=t.currentDevicePixelRatio=e||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var i=t.canvas,a=t.height,r=t.width;i.height=a*n,i.width=r*n,t.ctx.scale(n,n),i.style.height||i.style.width||(i.style.height=a+"px",i.style.width=r+"px")}},H.fontString=function(t,e,n){return e+" "+t+"px "+n},H.longestText=function(t,e,n,i){var a=(i=i||{}).data=i.data||{},r=i.garbageCollect=i.garbageCollect||[];i.font!==e&&(a=i.data={},r=i.garbageCollect=[],i.font=e),t.font=e;var o,s,l,u,d,h=0,c=n.length;for(o=0;o<c;o++)if(null!=(u=n[o])&&!0!==H.isArray(u))h=H.measureText(t,a,r,h,u);else if(H.isArray(u))for(s=0,l=u.length;s<l;s++)null==(d=u[s])||H.isArray(d)||(h=H.measureText(t,a,r,h,d));var f=r.length/2;if(f>n.length){for(o=0;o<f;o++)delete a[r[o]];r.splice(0,f)}return h},H.measureText=function(t,e,n,i,a){var r=e[a];return r||(r=e[a]=t.measureText(a).width,n.push(a)),r>i&&(i=r),i},H.numberOfLabelLines=function(t){var e=1;return H.each(t,(function(t){H.isArray(t)&&t.length>e&&(e=t.length)})),e},H.color=_?function(t){return t instanceof CanvasGradient&&(t=N.global.defaultColor),_(t)}:function(t){return console.error("Color.js not found!"),t},H.getHoverColor=function(t){return t instanceof CanvasPattern||t instanceof CanvasGradient?t:H.color(t).saturate(.5).darken(.1).rgbString()}}(),en._adapters=rn,en.Animation=$,en.animationService=J,en.controllers=Jt,en.DatasetController=it,en.defaults=N,en.Element=K,en.elements=kt,en.Interaction=re,en.layouts=pe,en.platform=Oe,en.plugins=Le,en.Scale=yn,en.scaleService=Re,en.Ticks=on,en.Tooltip=Ye,en.helpers.each(fi,(function(t,e){en.scaleService.registerScaleType(e,t,t._defaults)})),Li)Li.hasOwnProperty(Bi)&&en.plugins.register(Li[Bi]);en.platform.initialize();var Ei=en;return"undefined"!=typeof window&&(window.Chart=en),en.Chart=en,en.Legend=Li.legend._element,en.Title=Li.title._element,en.pluginService=en.plugins,en.PluginBase=en.Element.extend({}),en.canvasHelpers=en.helpers.canvas,en.layoutService=en.layouts,en.LinearScaleBase=Cn,en.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],(function(t){en[t]=function(e,n){return new en(e,en.helpers.merge(n||{},{type:t.charAt(0).toLowerCase()+t.slice(1)}))}})),Ei}));
|